mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-16 18:13:06 +00:00
Compare commits
117
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2c116c25a | ||
|
|
f2df3c4143 | ||
|
|
168bb0b6ca | ||
|
|
c0194029c7 | ||
|
|
625cf2b85a | ||
|
|
622cf8bdee | ||
|
|
f0a11fdab0 | ||
|
|
479cc8b545 | ||
|
|
54fa5d8864 | ||
|
|
0891a60f4d | ||
|
|
a01a1b9e9a | ||
|
|
34c82f4a49 | ||
|
|
41a788d974 | ||
|
|
00c05315a2 | ||
|
|
10361b9065 | ||
|
|
08da9ae2c3 | ||
|
|
057e0bcd7c | ||
|
|
bac7cc98e1 | ||
|
|
7c127eb957 | ||
|
|
fe8f4a5e74 | ||
|
|
adf5a5e008 | ||
|
|
a29f63cd9b | ||
|
|
94fb61541c | ||
|
|
3687cc58e0 | ||
|
|
93fd0bec6c | ||
|
|
9278d9296f | ||
|
|
85ddcdf22c | ||
|
|
0b677e7189 | ||
|
|
0b56a4858f | ||
|
|
15f82c812c | ||
|
|
54e95bc5f7 | ||
|
|
81f0df3da1 | ||
|
|
5d72597d7d | ||
|
|
e8ea75d9f3 | ||
|
|
a59ab203b4 | ||
|
|
d300003f69 | ||
|
|
620911cf70 | ||
|
|
1f94c592da | ||
|
|
32f6c746f0 | ||
|
|
fa7eb8722d | ||
|
|
b847383249 | ||
|
|
2d3175ef4a | ||
|
|
53ad9f729b | ||
|
|
ba96ed14b2 | ||
|
|
7ebdce7875 | ||
|
|
abf369bc37 | ||
|
|
67f1a4c506 | ||
|
|
e6bc457d26 | ||
|
|
8bd24dbb7c | ||
|
|
352e0e4933 | ||
|
|
72e646bdf8 | ||
|
|
36d90b314d | ||
|
|
46104e9246 | ||
|
|
a73e72facb | ||
|
|
f366cf7c0a | ||
|
|
879c5a6d2c | ||
|
|
36c6e6d8ea | ||
|
|
3912a652d5 | ||
|
|
f6f74f4660 | ||
|
|
33f1147671 | ||
|
|
7c4304a1e7 | ||
|
|
6644f539fa | ||
|
|
962a2be698 | ||
|
|
d13db25609 | ||
|
|
b49c86fda5 | ||
|
|
cda12730f6 | ||
|
|
d500bc67d7 | ||
|
|
678df4298d | ||
|
|
7d5fbecf3f | ||
|
|
af24aceb65 | ||
|
|
e6d625253c | ||
|
|
f7b0544172 | ||
|
|
ef285a1f10 | ||
|
|
82fafff114 | ||
|
|
462166293a | ||
|
|
2f36da5765 | ||
|
|
c637f3eb2a | ||
|
|
96d0a617a4 | ||
|
|
03a52dc10f | ||
|
|
2f28ec9b6f | ||
|
|
a86b9e625c | ||
|
|
f6d48cb85c | ||
|
|
ce549249e5 | ||
|
|
4cc4498b0e | ||
|
|
3a374ad2a4 | ||
|
|
e42e0869ba | ||
|
|
93f45062fe | ||
|
|
ea65756660 | ||
|
|
ecbee581a7 | ||
|
|
93fe29503a | ||
|
|
441d8003af | ||
|
|
11b4f5186b | ||
|
|
c548fc7763 | ||
|
|
43242b1185 | ||
|
|
e638b54fcd | ||
|
|
0b1fc4faa4 | ||
|
|
fc8a443d32 | ||
|
|
8a6fe3071d | ||
|
|
0811525c95 | ||
|
|
a69c089f87 | ||
|
|
e76d2fb169 | ||
|
|
034e9574d0 | ||
|
|
94baaf7d33 | ||
|
|
e21ad3ca02 | ||
|
|
c2d45e10f8 | ||
|
|
21a029163a | ||
|
|
d72eb5ebd3 | ||
|
|
501516c8f5 | ||
|
|
d78dcd2156 | ||
|
|
a48438e1c1 | ||
|
|
b03011c3d2 | ||
|
|
016e5ec089 | ||
|
|
65d70bffb2 | ||
|
|
d7e0bb6cd3 | ||
|
|
a0c79e6c64 | ||
|
|
094acf77ce | ||
|
|
ed0dd094b4 |
+6
-3
@@ -24,7 +24,8 @@ module.exports = {
|
||||
'plugin:@cspell/recommended',
|
||||
'plugin:@angular-eslint/ng-cli-compat',
|
||||
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
|
||||
'plugin:@angular-eslint/template/process-inline-templates'
|
||||
'plugin:@angular-eslint/template/process-inline-templates',
|
||||
'plugin:jsdoc/recommended-typescript-error'
|
||||
],
|
||||
plugins: [
|
||||
'eslint-plugin-unicorn',
|
||||
@@ -35,7 +36,8 @@ module.exports = {
|
||||
'@cspell',
|
||||
'eslint-plugin-import',
|
||||
'@angular-eslint/eslint-plugin',
|
||||
'@typescript-eslint'
|
||||
'@typescript-eslint',
|
||||
'jsdoc'
|
||||
],
|
||||
rules: {
|
||||
// Uncomment this to enable prettier checks as part of the ESLint
|
||||
@@ -76,6 +78,7 @@ module.exports = {
|
||||
accessibility: 'explicit'
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/await-thenable': 'error',
|
||||
'@typescript-eslint/prefer-optional-chain': 'warn',
|
||||
'@typescript-eslint/no-inferrable-types': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
@@ -99,7 +102,7 @@ module.exports = {
|
||||
],
|
||||
'@typescript-eslint/member-ordering': 'off',
|
||||
'prefer-arrow/prefer-arrow-functions': 'off',
|
||||
|
||||
'prefer-promise-reject-errors': 'error',
|
||||
'brace-style': 'off',
|
||||
'@typescript-eslint/brace-style': 'error',
|
||||
'comma-dangle': 'error',
|
||||
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
ignorePatterns: [
|
||||
'projects/**/*',
|
||||
'**/node_modules/**/*',
|
||||
'lib/cli/node_modules/**/*',
|
||||
'**/node_modules',
|
||||
'**/docker',
|
||||
'**/assets',
|
||||
'**/scripts',
|
||||
'**/docs'
|
||||
],
|
||||
plugins: ['@nrwl/nx'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
parserOptions: {
|
||||
project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'],
|
||||
createDefaultProgram: true
|
||||
},
|
||||
extends: [
|
||||
'plugin:@nrwl/nx/typescript',
|
||||
'plugin:@nrwl/nx/angular',
|
||||
'plugin:@cspell/recommended',
|
||||
'plugin:@angular-eslint/ng-cli-compat',
|
||||
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
|
||||
'plugin:@angular-eslint/template/process-inline-templates',
|
||||
'plugin:jsdoc/recommended-typescript-error'
|
||||
],
|
||||
plugins: [
|
||||
'eslint-plugin-unicorn',
|
||||
'eslint-plugin-rxjs',
|
||||
'prettier',
|
||||
'ban',
|
||||
'license-header',
|
||||
'@cspell',
|
||||
'eslint-plugin-import',
|
||||
'@angular-eslint/eslint-plugin',
|
||||
'@typescript-eslint',
|
||||
'jsdoc'
|
||||
],
|
||||
rules: {
|
||||
// Uncomment this to enable prettier checks as part of the ESLint
|
||||
// 'prettier/prettier': 'error',
|
||||
'ban/ban': [
|
||||
'error',
|
||||
{ name: 'eval', message: 'Calls to eval is not allowed.' },
|
||||
{ name: 'fdescribe', message: 'Calls to fdescribe is not allowed' },
|
||||
{ name: 'fit', message: 'Calls to fit is not allowed' },
|
||||
{ name: 'xit', message: 'Calls to xit is not allowed' },
|
||||
{ name: 'xdescribe', message: 'Calls to xdescribe is not allowed' },
|
||||
{ name: ['test', 'only'], message: 'Calls to test.only is not allowed' },
|
||||
{ name: ['describe', 'only'], message: 'Calls to describe.only is not allowed' }
|
||||
],
|
||||
'@angular-eslint/component-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'element',
|
||||
prefix: ['adf', 'app'],
|
||||
style: 'kebab-case'
|
||||
}
|
||||
],
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{
|
||||
type: ['element', 'attribute'],
|
||||
prefix: ['adf', 'app'],
|
||||
style: 'kebab-case'
|
||||
}
|
||||
],
|
||||
'@angular-eslint/no-host-metadata-property': 'off',
|
||||
'@angular-eslint/no-input-prefix': 'error',
|
||||
'@typescript-eslint/consistent-type-definitions': 'error',
|
||||
'@typescript-eslint/dot-notation': 'off',
|
||||
'@typescript-eslint/explicit-member-accessibility': [
|
||||
'off',
|
||||
{
|
||||
accessibility: 'explicit'
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/await-thenable': 'error',
|
||||
'@typescript-eslint/prefer-optional-chain': 'warn',
|
||||
'@typescript-eslint/no-inferrable-types': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'error',
|
||||
'@typescript-eslint/naming-convention': [
|
||||
'error',
|
||||
{
|
||||
selector: [
|
||||
'classProperty',
|
||||
'objectLiteralProperty',
|
||||
'typeProperty',
|
||||
'classMethod',
|
||||
'objectLiteralMethod',
|
||||
'typeMethod',
|
||||
'accessor',
|
||||
'enumMember'
|
||||
],
|
||||
format: null,
|
||||
modifiers: ['requiresQuotes']
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/member-ordering': 'off',
|
||||
'prefer-arrow/prefer-arrow-functions': 'off',
|
||||
'prefer-promise-reject-errors': 'error',
|
||||
'brace-style': 'off',
|
||||
'@typescript-eslint/brace-style': 'error',
|
||||
'comma-dangle': 'error',
|
||||
'default-case': 'error',
|
||||
'import/order': 'off',
|
||||
'max-len': [
|
||||
'error',
|
||||
{
|
||||
code: 240
|
||||
}
|
||||
],
|
||||
'no-bitwise': 'off',
|
||||
'no-console': [
|
||||
'error',
|
||||
{
|
||||
allow: [
|
||||
'warn',
|
||||
'dir',
|
||||
'timeLog',
|
||||
'assert',
|
||||
'clear',
|
||||
'count',
|
||||
'countReset',
|
||||
'group',
|
||||
'groupEnd',
|
||||
'table',
|
||||
'dirxml',
|
||||
'error',
|
||||
'groupCollapsed',
|
||||
'Console',
|
||||
'profile',
|
||||
'profileEnd',
|
||||
'timeStamp',
|
||||
'context'
|
||||
]
|
||||
}
|
||||
],
|
||||
'no-duplicate-imports': 'error',
|
||||
'no-multiple-empty-lines': 'error',
|
||||
'no-redeclare': 'error',
|
||||
'no-return-await': 'error',
|
||||
'rxjs/no-create': 'error',
|
||||
'rxjs/no-subject-unsubscribe': 'error',
|
||||
'rxjs/no-subject-value': 'error',
|
||||
'rxjs/no-unsafe-takeuntil': 'error',
|
||||
'unicorn/filename-case': 'error',
|
||||
'@typescript-eslint/no-unused-expressions': [
|
||||
'error',
|
||||
{
|
||||
allowShortCircuit: true,
|
||||
allowTernary: true
|
||||
}
|
||||
],
|
||||
'license-header/header': [
|
||||
'error',
|
||||
[
|
||||
'/*!',
|
||||
' * @license',
|
||||
' * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.',
|
||||
' *',
|
||||
' * Licensed under the Apache License, Version 2.0 (the "License");',
|
||||
' * you may not use this file except in compliance with the License.',
|
||||
' * You may obtain a copy of the License at',
|
||||
' *',
|
||||
' * http://www.apache.org/licenses/LICENSE-2.0',
|
||||
' *',
|
||||
' * Unless required by applicable law or agreed to in writing, software',
|
||||
' * distributed under the License is distributed on an "AS IS" BASIS,',
|
||||
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
|
||||
' * See the License for the specific language governing permissions and',
|
||||
' * limitations under the License.',
|
||||
' */'
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['*.html'],
|
||||
extends: ['plugin:@angular-eslint/template/recommended'],
|
||||
rules: {}
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -153,7 +153,7 @@ runs:
|
||||
echo $PROXY_HOST_BPM
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
|
||||
- name: run test
|
||||
- name: run test
|
||||
id: e2e_run
|
||||
if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
|
||||
env:
|
||||
|
||||
@@ -392,15 +392,6 @@ jobs:
|
||||
check-cs-env: "true"
|
||||
check-ps-cloud-env: "true"
|
||||
deps: "testing"
|
||||
- description: "Process Cloud: People"
|
||||
test-id: "process-services-cloud"
|
||||
folder: "process-services-cloud/people"
|
||||
provider: "ALL"
|
||||
auth: "OAUTH"
|
||||
apa-proxy: true
|
||||
check-cs-env: "true"
|
||||
check-ps-cloud-env: "true"
|
||||
deps: "testing"
|
||||
- description: "Process Cloud: Process"
|
||||
test-id: "process-services-cloud"
|
||||
folder: "process-services-cloud/process"
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
||||
"name": "e2e",
|
||||
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
|
||||
"args": [
|
||||
"`${workspaceFolder}/.vscode/closest-config-finder.sh ${file} e2e/protractor.conf.js`",
|
||||
"./e2e/protractor.conf.js",
|
||||
"--specs=${file}"
|
||||
],
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
|
||||
+110
-31
@@ -29,7 +29,7 @@
|
||||
"polyfills": "demo-shell/src/polyfills.ts",
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib"
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
@@ -108,7 +108,6 @@
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
@@ -117,8 +116,7 @@
|
||||
"scripts": [
|
||||
"node_modules/pdfjs-dist/build/pdf.js",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"node_modules/raphael/raphael.min.js",
|
||||
"node_modules/moment/min/moment.min.js"
|
||||
"node_modules/raphael/raphael.min.js"
|
||||
],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
@@ -272,6 +270,11 @@
|
||||
"karmaConfig": "lib/core/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
},
|
||||
"styles": [
|
||||
"demo-shell/src/styles.scss"
|
||||
]
|
||||
@@ -302,12 +305,16 @@
|
||||
"configDir": "lib/core/.storybook",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -323,12 +330,16 @@
|
||||
"outputDir": "dist/storybook/core",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -378,7 +389,12 @@
|
||||
"command": "npm publish --tag {args.tag}",
|
||||
"forwardAllArgs": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -410,7 +426,12 @@
|
||||
"tsConfig": "lib/content-services/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/content-services/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -430,12 +451,16 @@
|
||||
"configDir": "lib/content-services/.storybook",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -451,12 +476,16 @@
|
||||
"outputDir": "dist/storybook/content-services",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -518,7 +547,12 @@
|
||||
"tsConfig": "lib/process-services/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/process-services/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -584,7 +618,12 @@
|
||||
"tsConfig": "lib/process-services-cloud/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/process-services-cloud/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -604,12 +643,16 @@
|
||||
"configDir": "lib/process-services-cloud/.storybook",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -625,12 +668,16 @@
|
||||
"outputDir": "dist/storybook/process-services-cloud",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
@@ -703,7 +750,12 @@
|
||||
"tsConfig": "lib/insights/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/insights/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -768,7 +820,12 @@
|
||||
"tsConfig": "lib/extensions/tsconfig.spec.json",
|
||||
"karmaConfig": "lib/extensions/karma.conf.js",
|
||||
"sourceMap": true,
|
||||
"codeCoverage": true
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@@ -816,7 +873,12 @@
|
||||
"entryName": "shared",
|
||||
"entryPath": "/lib/testing/src/lib/shared/index.ts"
|
||||
}
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -897,7 +959,12 @@
|
||||
"outputPath": "dist/libs/eslint-plugin-eslint-angular",
|
||||
"main": "lib/eslint-angular/index.ts",
|
||||
"generatePackageJson" : true,
|
||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json"
|
||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json",
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -952,11 +1019,15 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@nrwl/workspace:run-commands",
|
||||
"builder": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
"cd lib/cli && npm i && npm run dist"
|
||||
]
|
||||
"command":
|
||||
"cd lib/cli && npm i && npm run dist",
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -1032,8 +1103,12 @@
|
||||
"browserTarget": "stories:storybook",
|
||||
"configDir": "lib/stories/.storybook",
|
||||
"compodoc": false,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
},
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
@@ -1054,12 +1129,16 @@
|
||||
"outputDir": "dist/storybook/stories",
|
||||
"compodoc": false,
|
||||
"styles": [
|
||||
"demo-shell/src/assets/fonts/muli/muli.css",
|
||||
"demo-shell/src/styles.scss",
|
||||
"demo-shell/src/custom-style-dev.scss",
|
||||
"node_modules/cropperjs/dist/cropper.min.css",
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||
]
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"lib", "lib/core/src/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
|
||||
+2
-1
@@ -141,7 +141,8 @@
|
||||
"webscript",
|
||||
"Whitespaces",
|
||||
"xdescribe",
|
||||
"xsrf"
|
||||
"xsrf",
|
||||
"BPMECM"
|
||||
],
|
||||
"dictionaries": [
|
||||
"html",
|
||||
|
||||
@@ -25,7 +25,7 @@ const fs = require("fs");
|
||||
const os = require("os");
|
||||
const cp = require("child_process");
|
||||
const isWindows = os.platform() === "win32";
|
||||
const { output } = require("@nrwl/workspace");
|
||||
const output = require('nx/src/utils/output').output;
|
||||
|
||||
/**
|
||||
* Paths to files being patched
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { MyAppPage } from './app.po';
|
||||
|
||||
describe('MyApp App', () => {
|
||||
let page: MyAppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new MyAppPage();
|
||||
});
|
||||
|
||||
it('should display toolbar', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getToolbar()).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Alfresco-ADF-Angular-Demo",
|
||||
"description": "Demo shell for Alfresco Angular components",
|
||||
"version": "6.3.0",
|
||||
"version": "6.5.1",
|
||||
"author": "Hyland Software, Inc. and its affiliates",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -11,7 +11,3 @@ router-outlet[name='overlay'] + * {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
[dir='rtl'] .mat-icon {
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
|
||||
import {
|
||||
AuthenticationService,
|
||||
AlfrescoApiService,
|
||||
PageTitleService
|
||||
} from '@alfresco/adf-core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -33,7 +33,7 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
constructor(private pageTitleService: PageTitleService,
|
||||
private alfrescoApiService: AlfrescoApiService,
|
||||
private adfHttpClient: AdfHttpClient,
|
||||
private authenticationService: AuthenticationService,
|
||||
private router: Router,
|
||||
private dialogRef: MatDialog) {
|
||||
@@ -43,7 +43,7 @@ export class AppComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.pageTitleService.setTitle('title');
|
||||
|
||||
this.alfrescoApiService.getInstance().on('error', (error) => {
|
||||
this.adfHttpClient.on('error', (error) => {
|
||||
if (error.status === 401) {
|
||||
if (!this.authenticationService.isLoggedIn()) {
|
||||
this.dialogRef.closeAll();
|
||||
|
||||
@@ -22,20 +22,12 @@ import { NgChartsModule } from 'ng2-charts';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import {
|
||||
AppConfigService,
|
||||
DebugAppConfigService,
|
||||
CoreModule,
|
||||
CoreAutomationService,
|
||||
AuthModule,
|
||||
provideTranslations
|
||||
} from '@alfresco/adf-core';
|
||||
import { AppConfigService, DebugAppConfigService, CoreModule, CoreAutomationService, AuthModule, provideTranslations } from '@alfresco/adf-core';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { AppComponent } from './app.component';
|
||||
import { MaterialModule } from './material.module';
|
||||
import { LogoutComponent } from './components/logout/logout.component';
|
||||
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { SearchBarComponent } from './components/search/search-bar.component';
|
||||
import { SearchResultComponent } from './components/search/search-result.component';
|
||||
import { FormComponent } from './components/form/form.component';
|
||||
@@ -46,7 +38,6 @@ import { FormNodeViewerComponent } from './components/process-service/form-node-
|
||||
import { AppsViewComponent } from './components/process-service/apps-view.component';
|
||||
import { FilesComponent } from './components/files/files.component';
|
||||
import { VersionManagerDialogAdapterComponent } from './components/files/version-manager-dialog-adapter.component';
|
||||
import { MetadataDialogAdapterComponent } from './components/files/metadata-dialog-adapter.component';
|
||||
import { appRoutes } from './app.routes';
|
||||
import { TaskAttachmentsComponent } from './components/process-service/task-attachments.component';
|
||||
import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component';
|
||||
@@ -55,7 +46,6 @@ import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
|
||||
import { ContentModule } from '@alfresco/adf-content-services';
|
||||
import { InsightsModule } from '@alfresco/adf-insights';
|
||||
import { ProcessModule } from '@alfresco/adf-process-services';
|
||||
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
||||
import { CloudLayoutComponent } from './components/cloud/cloud-layout.component';
|
||||
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
|
||||
import { TasksCloudDemoComponent } from './components/cloud/tasks-cloud-demo.component';
|
||||
@@ -84,7 +74,7 @@ import { UserInfoComponent } from './components/app-layout/user-info/user-info.c
|
||||
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule.forRoot(appRoutes, { useHash: true, relativeLinkResolution: 'legacy' }),
|
||||
...(environment.oidc ? [AuthModule.forRoot({ useHash: true })] : []),
|
||||
AuthModule.forRoot({ useHash: true }),
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
MaterialModule,
|
||||
@@ -104,7 +94,6 @@ import { UserInfoComponent } from './components/app-layout/user-info/user-info.c
|
||||
LogoutComponent,
|
||||
AppLayoutComponent,
|
||||
UserInfoComponent,
|
||||
HomeComponent,
|
||||
SearchBarComponent,
|
||||
SearchResultComponent,
|
||||
ProcessServiceComponent,
|
||||
@@ -115,12 +104,10 @@ import { UserInfoComponent } from './components/app-layout/user-info/user-info.c
|
||||
FilesComponent,
|
||||
FormComponent,
|
||||
VersionManagerDialogAdapterComponent,
|
||||
MetadataDialogAdapterComponent,
|
||||
TaskAttachmentsComponent,
|
||||
ProcessAttachmentsComponent,
|
||||
DemoPermissionComponent,
|
||||
DemoErrorComponent,
|
||||
TreeViewSampleComponent,
|
||||
CloudLayoutComponent,
|
||||
AppsCloudDemoComponent,
|
||||
TasksCloudDemoComponent,
|
||||
|
||||
@@ -30,7 +30,6 @@ import { FilesComponent } from './components/files/files.component';
|
||||
import { FormComponent } from './components/form/form.component';
|
||||
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
|
||||
import { AppComponent } from './app.component';
|
||||
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
||||
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
|
||||
import { CloudLayoutComponent } from './components/cloud/cloud-layout.component';
|
||||
import { TasksCloudDemoComponent } from './components/cloud/tasks-cloud-demo.component';
|
||||
@@ -245,11 +244,6 @@ export const appRoutes: Routes = [
|
||||
component: DemoPermissionComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{
|
||||
path: 'treeview',
|
||||
component: TreeViewSampleComponent,
|
||||
canActivate: [AuthGuardEcm]
|
||||
},
|
||||
{ path: 'form-cloud', component: FormCloudDemoComponent },
|
||||
{ path: 'form', component: FormComponent },
|
||||
{
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
</adf-sidenav-layout-header>
|
||||
|
||||
<adf-sidenav-layout-navigation>
|
||||
<ng-template let-isMenuMinimized="isMenuMinimized">
|
||||
<ng-template>
|
||||
<mat-nav-list class="app-sidenav-linklist">
|
||||
<ng-container *ngFor="let link of links">
|
||||
<ng-container *ngIf="link.children">
|
||||
<mat-list-item (click)="trigger.openMenu()" [attr.data-automation-id]="link.title | translate" class="app-sidenav-link">
|
||||
<mat-icon matListIcon>{{link.icon}}</mat-icon>
|
||||
<span matLine *ngIf="!isMenuMinimized()">{{link.title | translate }}</span>
|
||||
<span matLine>{{ link.title | translate }}</span>
|
||||
<mat-icon class="app-sidenav-link__expand-button" [matMenuTriggerData]="{links: link.children}"
|
||||
rippleTrigger mat-icon-button #trigger="matMenuTrigger"
|
||||
[matMenuTriggerFor]="nestedMenu">arrow_right</mat-icon>
|
||||
@@ -41,14 +41,14 @@
|
||||
routerLinkActive="app-sidenav-link--active" [routerLinkActiveOptions]="{ exact: true }"
|
||||
[attr.data-automation-id]="link.title | translate" class="app-sidenav-link">
|
||||
<mat-icon matListIcon >{{link.icon}}</mat-icon>
|
||||
<span matLine *ngIf="!isMenuMinimized()">{{link.title | translate }}</span>
|
||||
<span matLine>{{link.title | translate }}</span>
|
||||
</mat-list-item>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<mat-list-item adf-logout [enableRedirect]="enableRedirect" redirectUri="/logout" class="app-sidenav-link" data-automation-id="Logout" >
|
||||
<mat-icon matListIcon>exit_to_app</mat-icon>
|
||||
<span matLine *ngIf="!isMenuMinimized()">Logout</span>
|
||||
<span matLine>Logout</span>
|
||||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
adf-file-uploading-dialog {
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
.app-layout {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
@@ -12,25 +8,7 @@ adf-file-uploading-dialog {
|
||||
color: var(--theme-primary-color);
|
||||
}
|
||||
|
||||
.app-sidenav-link {
|
||||
.mat-list-text {
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
min-width: 120px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-menu-spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
mat-sidenav-content > div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
|
||||
> div {
|
||||
flex: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,7 @@ export class AppLayoutComponent {
|
||||
{ href: '/form', icon: 'poll', title: 'Form' }
|
||||
]},
|
||||
{ href: '/login', icon: 'vpn_key', title: 'Login' },
|
||||
{ href: '/settings-layout', icon: 'settings', title: 'Settings' },
|
||||
{ href: '/treeview', icon: 'nature', title: 'Tree View' }
|
||||
{ href: '/settings-layout', icon: 'settings', title: 'Settings' }
|
||||
];
|
||||
|
||||
enableRedirect = true;
|
||||
|
||||
@@ -17,7 +17,13 @@
|
||||
|
||||
import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
|
||||
import { BpmUserModel, PeopleProcessService } from '@alfresco/adf-process-services';
|
||||
import { AuthenticationService, IdentityUserModel, IdentityUserService, UserInfoMode } from '@alfresco/adf-core';
|
||||
import {
|
||||
AuthenticationService,
|
||||
BasicAlfrescoAuthService,
|
||||
IdentityUserModel,
|
||||
IdentityUserService,
|
||||
UserInfoMode
|
||||
} from '@alfresco/adf-core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
||||
import { Observable, of } from 'rxjs';
|
||||
@@ -46,6 +52,7 @@ export class UserInfoComponent implements OnInit {
|
||||
constructor(private peopleContentService: PeopleContentService,
|
||||
private peopleProcessService: PeopleProcessService,
|
||||
private identityUserService: IdentityUserService,
|
||||
private basicAlfrescoAuthService: BasicAlfrescoAuthService,
|
||||
private authService: AuthenticationService) {
|
||||
}
|
||||
|
||||
@@ -77,7 +84,7 @@ export class UserInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
get isLoggedIn(): boolean {
|
||||
if (this.authService.isKerberosEnabled()) {
|
||||
if (this.basicAlfrescoAuthService.isKerberosEnabled()) {
|
||||
return true;
|
||||
}
|
||||
return this.authService.isLoggedIn();
|
||||
@@ -96,15 +103,15 @@ export class UserInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
private isAllLoggedIn() {
|
||||
return (this.authService.isEcmLoggedIn() && this.authService.isBpmLoggedIn()) || (this.authService.isALLProvider() && this.authService.isKerberosEnabled());
|
||||
return (this.authService.isEcmLoggedIn() && this.authService.isBpmLoggedIn()) || (this.authService.isALLProvider() && this.basicAlfrescoAuthService.isKerberosEnabled());
|
||||
}
|
||||
|
||||
private isBpmLoggedIn() {
|
||||
return this.authService.isBpmLoggedIn() || (this.authService.isECMProvider() && this.authService.isKerberosEnabled());
|
||||
return this.authService.isBpmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled());
|
||||
}
|
||||
|
||||
private isEcmLoggedIn() {
|
||||
return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.authService.isKerberosEnabled());
|
||||
return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
<div class="app-main-content">
|
||||
<h1>CardView Component</h1>
|
||||
|
||||
<mat-card class="app-card-view">
|
||||
<adf-card-view
|
||||
[properties]="properties"
|
||||
[editable]="isEditable"
|
||||
[displayClearAction]="showClearDateAction"
|
||||
[displayNoneOption]="showNoneOption"
|
||||
[displayLabelForChips]="showLabelForChips">
|
||||
</adf-card-view>
|
||||
</mat-card>
|
||||
<adf-card-view
|
||||
[properties]="properties"
|
||||
[editable]="isEditable"
|
||||
[displayClearAction]="showClearDateAction"
|
||||
[displayNoneOption]="showNoneOption"
|
||||
[displayLabelForChips]="showLabelForChips">
|
||||
</adf-card-view>
|
||||
|
||||
<div class="app-console" #console>
|
||||
<div class="app-console">
|
||||
<h3>Changes log:</h3>
|
||||
<p *ngFor="let log of logs">{{ log }}</p>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.app-card-view {
|
||||
adf-card-view {
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ElementRef, ViewChild, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import {
|
||||
CardViewTextItemModel,
|
||||
CardViewDateItemModel,
|
||||
@@ -39,9 +39,6 @@ import { takeUntil } from 'rxjs/operators';
|
||||
styleUrls: ['./card-view.component.scss']
|
||||
})
|
||||
export class CardViewComponent implements OnInit, OnDestroy {
|
||||
|
||||
@ViewChild('console', { static: true }) console: ElementRef;
|
||||
|
||||
isEditable = true;
|
||||
properties: any;
|
||||
logs: string[];
|
||||
@@ -51,8 +48,7 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService,
|
||||
private decimalNumberPipe: DecimalNumberPipe) {
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService, private decimalNumberPipe: DecimalNumberPipe) {
|
||||
this.logs = [];
|
||||
this.createCard();
|
||||
}
|
||||
@@ -62,9 +58,7 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.cardViewUpdateService.itemUpdated$
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(this.onItemChange.bind(this));
|
||||
this.cardViewUpdateService.itemUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe(this.onItemChange.bind(this));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@@ -192,20 +186,29 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
}),
|
||||
new CardViewKeyValuePairsItemModel({
|
||||
label: 'CardView Key-Value Pairs Item',
|
||||
value: [{ name: 'hey', value: 'you' }, { name: 'hey', value: 'you' }],
|
||||
value: [
|
||||
{ name: 'hey', value: 'you' },
|
||||
{ name: 'hey', value: 'you' }
|
||||
],
|
||||
key: 'key-value-pairs',
|
||||
editable: this.isEditable
|
||||
}),
|
||||
new CardViewKeyValuePairsItemModel({
|
||||
label: 'CardView Key-Value Pairs Item',
|
||||
value: [{ name: 'hey', value: 'you' }, { name: 'hey', value: 'you' }],
|
||||
value: [
|
||||
{ name: 'hey', value: 'you' },
|
||||
{ name: 'hey', value: 'you' }
|
||||
],
|
||||
key: 'key-value-pairs',
|
||||
editable: false
|
||||
}),
|
||||
new CardViewSelectItemModel({
|
||||
label: 'CardView Select Item',
|
||||
value: 'one',
|
||||
options$: of([{ key: 'one', label: 'One' }, { key: 'two', label: 'Two' }]),
|
||||
options$: of([
|
||||
{ key: 'one', label: 'One' },
|
||||
{ key: 'two', label: 'Two' }
|
||||
]),
|
||||
key: 'select',
|
||||
editable: this.isEditable
|
||||
}),
|
||||
@@ -253,7 +256,6 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
this.logs.push(`[${notification.target.label}] - ${value}`);
|
||||
this.console.nativeElement.scrollTop = this.console.nativeElement.scrollHeight;
|
||||
}
|
||||
|
||||
toggleEditable() {
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
<mat-slide-toggle [checked]="processDetailsRedirection" (change)="toggleProcessDetailsRedirection()" data-automation-id="processDetailsRedirection">
|
||||
Display process details on process click
|
||||
</mat-slide-toggle>
|
||||
<mat-form-field data-automation-id="selectionMode">
|
||||
|
||||
<mat-form-field data-automation-id="selectionMode" class="adf-cloud-settings-selection-mode">
|
||||
<mat-label>Selection Mode</mat-label>
|
||||
<mat-select [(ngModel)]="selectionMode" (selectionChange)="onSelectionModeChange()">
|
||||
<mat-option *ngFor="let option of selectionModeOptions" [value]="option.value">
|
||||
@@ -24,32 +25,29 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-card *ngIf="actionMenu || contextMenu">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Add Action</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form class="app-cloud-settings-form" [formGroup]="actionMenuForm">
|
||||
<mat-form-field>
|
||||
<input matInput formControlName="key" placeholder="Key">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput formControlName="title" placeholder="Title">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput formControlName="icon" placeholder="Icon">
|
||||
</mat-form-field>
|
||||
<mat-checkbox formControlName="visible">Visible</mat-checkbox>
|
||||
<mat-checkbox formControlName="disabled">Disable</mat-checkbox>
|
||||
<button mat-raised-button (click)="addAction()">Add</button>
|
||||
</form>
|
||||
<div *ngIf="actions.length > 0">
|
||||
<mat-chip-list>
|
||||
<mat-chip *ngFor="let action of actions" [removable]="true">
|
||||
{{action.title}}
|
||||
<mat-icon matChipRemove (click)="removeAction(action)">cancel</mat-icon>
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<div class="app-cloud-actions" *ngIf="actionMenu || contextMenu">
|
||||
<h2>Add Action</h2>
|
||||
<form class="app-cloud-settings-form" [formGroup]="actionMenuForm">
|
||||
<mat-form-field class="app-cloud-settings-form-input">
|
||||
<input matInput formControlName="key" placeholder="Key">
|
||||
</mat-form-field>
|
||||
<mat-form-field class="app-cloud-settings-form-input">
|
||||
<input matInput formControlName="title" placeholder="Title">
|
||||
</mat-form-field>
|
||||
<mat-form-field class="app-cloud-settings-form-input">
|
||||
<input matInput formControlName="icon" placeholder="Icon">
|
||||
</mat-form-field>
|
||||
<mat-checkbox formControlName="visible">Visible</mat-checkbox>
|
||||
<mat-checkbox formControlName="disabled">Disable</mat-checkbox>
|
||||
<button mat-raised-button (click)="addAction()">Add</button>
|
||||
</form>
|
||||
<div *ngIf="actions.length > 0">
|
||||
<mat-chip-list>
|
||||
<mat-chip *ngFor="let action of actions" [removable]="true">
|
||||
{{action.title}}
|
||||
<mat-icon matChipRemove (click)="removeAction(action)">cancel</mat-icon>
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,11 @@ app-cloud-settings {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
mat-form-field {
|
||||
.app-cloud-actions {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.adf-cloud-settings-selection-mode {
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
@@ -13,13 +17,9 @@ app-cloud-settings {
|
||||
place-content: center space-around;
|
||||
align-items: center;
|
||||
|
||||
mat-form-field {
|
||||
.app-cloud-settings-form-input {
|
||||
flex: 1 1 100%;
|
||||
max-width: 23%;
|
||||
}
|
||||
|
||||
mat-form-field, mat-checkbox {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +1,24 @@
|
||||
<ng-container *ngIf="nodeId">
|
||||
|
||||
<adf-alfresco-viewer
|
||||
(showViewerChange)="onViewerClosed()"
|
||||
[nodeId]="nodeId"
|
||||
[versionId]="versionId"
|
||||
[showRightSidebar]="showRightSidebar"
|
||||
[showLeftSidebar]="showLeftSidebar"
|
||||
[allowGoBack]="allowGoBack"
|
||||
[showToolbar]="showToolbar"
|
||||
[allowPrint]="allowPrint"
|
||||
[allowDownload]="allowDownload"
|
||||
[allowRightSidebar]="allowRightSidebar"
|
||||
[allowLeftSidebar]="allowLeftSidebar"
|
||||
[sidebarLeftTemplate]="sidebarLeftTemplate"
|
||||
[showToolbar]="true"
|
||||
[allowRightSidebar]="true"
|
||||
[sidebarRightTemplate]="sidebarRightTemplate">
|
||||
|
||||
<adf-viewer-toolbar *ngIf="customToolbar" data-automation-id="adf-viewer-custom-toolbar">
|
||||
<h1>My custom toolbar</h1>
|
||||
</adf-viewer-toolbar>
|
||||
|
||||
<adf-viewer-toolbar-actions *ngIf="moreActions">
|
||||
<button mat-icon-button id="adf-viewer-time">
|
||||
<mat-icon>alarm</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button id="adf-viewer-upload">
|
||||
<mat-icon>backup</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button id="adf-viewer-bug">
|
||||
<mat-icon>bug_report</mat-icon>
|
||||
</button>
|
||||
</adf-viewer-toolbar-actions>
|
||||
|
||||
<adf-viewer-more-actions *ngIf="moreActionsMenu">
|
||||
<button mat-menu-item id="adf-viewer-more-menu-alarm">
|
||||
<mat-icon>alarm</mat-icon>
|
||||
<span>Alarm</span>
|
||||
</button>
|
||||
<button mat-menu-item id="adf-viewer-more-menu-backup">
|
||||
<mat-icon>backup</mat-icon>
|
||||
<span>Backup</span>
|
||||
</button>
|
||||
<button mat-menu-item id="adf-viewer-more-menu-bug">
|
||||
<mat-icon>bug_report</mat-icon>
|
||||
<span>Bug report</span>
|
||||
</button>
|
||||
</adf-viewer-more-actions>
|
||||
|
||||
<ng-container *ngIf="openWith">
|
||||
<adf-viewer-open-with>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>dialpad</mat-icon>
|
||||
<span>Option 1</span>
|
||||
</button>
|
||||
<button mat-menu-item disabled>
|
||||
<mat-icon>voicemail</mat-icon>
|
||||
<span>Option 2</span>
|
||||
</button>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>notifications_off</mat-icon>
|
||||
<span>Option 3</span>
|
||||
</button>
|
||||
</adf-viewer-open-with>
|
||||
</ng-container>
|
||||
</adf-alfresco-viewer>
|
||||
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="blobFile">
|
||||
<adf-viewer
|
||||
[blobFile]="blobFile"
|
||||
[fileName]="fileName"
|
||||
[showToolbar]="true"
|
||||
[allowRightSidebar]="true"
|
||||
(showViewerChange)="onViewerClosed()"
|
||||
[sidebarRightTemplate]="sidebarRightTemplate">
|
||||
</adf-viewer>
|
||||
</ng-container>
|
||||
|
||||
<ng-template let-node="node" #sidebarRightTemplate>
|
||||
<adf-info-drawer title="Details">
|
||||
@@ -157,242 +110,10 @@
|
||||
</adf-info-drawer-tab>
|
||||
|
||||
<adf-info-drawer-tab label="Versions">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<adf-version-manager [node]="node"
|
||||
(uploadError)="onUploadError($event)"
|
||||
(viewVersion)="onViewVersion($event)">
|
||||
</adf-version-manager>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<adf-version-manager [node]="node"
|
||||
(uploadError)="onUploadError($event)"
|
||||
(viewVersion)="onViewVersion($event)">
|
||||
</adf-version-manager>
|
||||
</adf-info-drawer-tab>
|
||||
</adf-info-drawer>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #sidebarLeftTemplate>
|
||||
<adf-info-drawer [title]="'Viewer Options'">
|
||||
|
||||
<adf-info-drawer-tab label="Settings">
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-fileurl"
|
||||
(change)="toggleFileUrl()"
|
||||
[checked]="fileUrlSwitch">
|
||||
Url File
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<ng-container *ngIf="fileUrlSwitch">
|
||||
<mat-form-field floatPlaceholder="float">
|
||||
<input matInput
|
||||
placeholder="Url File"
|
||||
[(ngModel)]="urlFile"
|
||||
data-automation-id="adf-text-file-url">
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-toolbar"
|
||||
(change)="toggleShowToolbar()"
|
||||
[checked]="showToolbar">
|
||||
Show Toolbar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-goback"
|
||||
(change)="toggleAllowGoBack()"
|
||||
[checked]="allowGoBack">
|
||||
Allow GoBack
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-openwith"
|
||||
(change)="toggleOpenWith()"
|
||||
[checked]="openWith">
|
||||
Open With
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-moreactions"
|
||||
(change)="toggleOpenMoreActions()"
|
||||
[checked]="moreActions">
|
||||
More Actions
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-moreactionsmenu"
|
||||
(change)="toggleMoreActionsMenu()"
|
||||
[checked]="moreActionsMenu">
|
||||
More Actions Menu
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-download"
|
||||
(change)="toggleAllowDownload()"
|
||||
[checked]="allowDownload">
|
||||
Allow Download
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-print"
|
||||
(change)="toggleAllowPrint()"
|
||||
[checked]="allowPrint">
|
||||
Allow Print
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-allowsidebar"
|
||||
(change)="toggleAllowRightSidebar()"
|
||||
[checked]="allowRightSidebar">
|
||||
Allow Right Sidebar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-allowLeftSidebar"
|
||||
(change)="toggleAllowLeftSidebar()"
|
||||
[checked]="allowLeftSidebar">
|
||||
Allow Left Sidebar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-toggle-custom-toolbar"
|
||||
(change)="toggleToolbar()"
|
||||
[checked]="customToolbar">
|
||||
Custom Toolbar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-tab-with-icon"
|
||||
(change)="toggleShowTabWithIcon()"
|
||||
[checked]="showTabWithIcon">
|
||||
Show tab with icon
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-icon-and-label-tab"
|
||||
(change)="toggleShowTabWithIconAndLabel()"
|
||||
[checked]="showTabWithIconAndLabel">
|
||||
Show tab with icon and label
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<button mat-raised-button id="adf-switch-showrightsidebar" (click)="toggleShowRightSidebar()">
|
||||
Toggle Right Sidebar
|
||||
</button>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<button mat-raised-button id="adf-switch-showleftsidebar" (click)="hideLeftSidebar()">
|
||||
Hide Left Sidebar
|
||||
</button>
|
||||
</p>
|
||||
|
||||
</adf-info-drawer-tab>
|
||||
|
||||
<adf-info-drawer-tab
|
||||
*ngIf="showTabWithIcon"
|
||||
[label]=""
|
||||
[icon]="'face'"
|
||||
data-automation-id="adf-settings-tab">
|
||||
</adf-info-drawer-tab>
|
||||
|
||||
<adf-info-drawer-tab
|
||||
*ngIf="showTabWithIconAndLabel"
|
||||
[label]="'Comments'"
|
||||
[icon]="'comment'"
|
||||
data-automation-id="adf-settings-tab">
|
||||
</adf-info-drawer-tab>
|
||||
</adf-info-drawer>
|
||||
</ng-template>
|
||||
|
||||
<ng-container *ngIf="blobFile">
|
||||
<adf-viewer
|
||||
[blobFile]="blobFile"
|
||||
[fileName]="fileName"
|
||||
[showRightSidebar]="showRightSidebar"
|
||||
[showLeftSidebar]="showLeftSidebar"
|
||||
[allowGoBack]="allowGoBack"
|
||||
[showToolbar]="showToolbar"
|
||||
[allowRightSidebar]="allowRightSidebar"
|
||||
[allowLeftSidebar]="allowLeftSidebar"
|
||||
(showViewerChange)="onViewerClosed()"
|
||||
[sidebarLeftTemplate]="sidebarLeftTemplate"
|
||||
[sidebarRightTemplate]="sidebarRightTemplate">
|
||||
|
||||
<adf-viewer-toolbar *ngIf="customToolbar" data-automation-id="adf-viewer-custom-toolbar">
|
||||
<h1>My custom toolbar</h1>
|
||||
</adf-viewer-toolbar>
|
||||
|
||||
<adf-viewer-toolbar-actions *ngIf="moreActions">
|
||||
<button mat-icon-button id="adf-viewer-time">
|
||||
<mat-icon>alarm</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button id="adf-viewer-upload">
|
||||
<mat-icon>backup</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button id="adf-viewer-bug">
|
||||
<mat-icon>bug_report</mat-icon>
|
||||
</button>
|
||||
</adf-viewer-toolbar-actions>
|
||||
|
||||
<adf-viewer-more-actions *ngIf="moreActionsMenu">
|
||||
<button mat-menu-item id="adf-viewer-more-menu-alarm">
|
||||
<mat-icon>alarm</mat-icon>
|
||||
<span>Alarm</span>
|
||||
</button>
|
||||
<button mat-menu-item id="adf-viewer-more-menu-backup">
|
||||
<mat-icon>backup</mat-icon>
|
||||
<span>Backup</span>
|
||||
</button>
|
||||
<button mat-menu-item id="adf-viewer-more-menu-bug">
|
||||
<mat-icon>bug_report</mat-icon>
|
||||
<span>Bug report</span>
|
||||
</button>
|
||||
</adf-viewer-more-actions>
|
||||
|
||||
<ng-container *ngIf="openWith">
|
||||
<adf-viewer-open-with>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>dialpad</mat-icon>
|
||||
<span>Option 1</span>
|
||||
</button>
|
||||
<button mat-menu-item disabled>
|
||||
<mat-icon>voicemail</mat-icon>
|
||||
<span>Option 2</span>
|
||||
</button>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>notifications_off</mat-icon>
|
||||
<span>Option 3</span>
|
||||
</button>
|
||||
</adf-viewer-open-with>
|
||||
</ng-container>
|
||||
|
||||
</adf-viewer>
|
||||
</ng-container>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
.app-viewer__sidebar {
|
||||
width: 380px !important;
|
||||
}
|
||||
|
||||
/* stylelint-disable */
|
||||
.monaco-scrollable-element {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
app-preview-extension {
|
||||
width: 600px;
|
||||
}
|
||||
@@ -17,26 +17,16 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, Router, PRIMARY_OUTLET } from '@angular/router';
|
||||
import {
|
||||
NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
ContentService,
|
||||
AllowableOperationsEnum,
|
||||
PermissionsEnum,
|
||||
NodesApiService,
|
||||
FileUploadErrorEvent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { NotificationService } from '@alfresco/adf-core';
|
||||
import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService, FileUploadErrorEvent } from '@alfresco/adf-content-services';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-file-view',
|
||||
templateUrl: './file-view.component.html',
|
||||
styleUrls: ['./file-view.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FileViewComponent implements OnInit {
|
||||
|
||||
nodeId: string = null;
|
||||
versionId: string = null;
|
||||
displayEmptyMetadata = false;
|
||||
@@ -46,36 +36,21 @@ export class FileViewComponent implements OnInit {
|
||||
isPreset = false;
|
||||
customPreset: string = null;
|
||||
displayDefaultProperties = true;
|
||||
showToolbar = true;
|
||||
urlFile = null;
|
||||
allowGoBack = true;
|
||||
openWith = false;
|
||||
allowDownload = true;
|
||||
allowPrint = true;
|
||||
allowRightSidebar = true;
|
||||
allowLeftSidebar = true;
|
||||
moreActions = true;
|
||||
moreActionsMenu = false;
|
||||
fileUrlSwitch = false;
|
||||
showLeftSidebar = null;
|
||||
showRightSidebar = false;
|
||||
customToolbar = false;
|
||||
isCommentEnabled = false;
|
||||
showTabWithIcon = false;
|
||||
showTabWithIconAndLabel = false;
|
||||
desiredAspect: string = null;
|
||||
showAspect: string = null;
|
||||
name: string;
|
||||
fileName: string;
|
||||
blobFile: Blob;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private nodeApiService: NodesApiService,
|
||||
private contentServices: ContentService,
|
||||
private preview: PreviewService,
|
||||
private notificationService: NotificationService) {
|
||||
}
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private nodeApiService: NodesApiService,
|
||||
private contentServices: ContentService,
|
||||
private preview: PreviewService,
|
||||
private notificationService: NotificationService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe((params) => {
|
||||
@@ -85,7 +60,8 @@ export class FileViewComponent implements OnInit {
|
||||
this.nodeApiService.getNode(id).subscribe(
|
||||
(node) => {
|
||||
if (node?.isFile) {
|
||||
this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
|
||||
this.isCommentEnabled =
|
||||
this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
|
||||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
|
||||
this.nodeId = id;
|
||||
return;
|
||||
@@ -131,66 +107,6 @@ export class FileViewComponent implements OnInit {
|
||||
this.displayDefaultProperties = !this.displayDefaultProperties;
|
||||
}
|
||||
|
||||
toggleShowToolbar() {
|
||||
this.showToolbar = !this.showToolbar;
|
||||
}
|
||||
|
||||
toggleAllowGoBack() {
|
||||
this.allowGoBack = !this.allowGoBack;
|
||||
}
|
||||
|
||||
toggleOpenWith() {
|
||||
this.openWith = !this.openWith;
|
||||
}
|
||||
|
||||
toggleAllowDownload() {
|
||||
this.allowDownload = !this.allowDownload;
|
||||
}
|
||||
|
||||
toggleAllowPrint() {
|
||||
this.allowPrint = !this.allowPrint;
|
||||
}
|
||||
|
||||
toggleOpenMoreActions() {
|
||||
this.moreActions = !this.moreActions;
|
||||
}
|
||||
|
||||
toggleMoreActionsMenu() {
|
||||
this.moreActionsMenu = !this.moreActionsMenu;
|
||||
}
|
||||
|
||||
toggleShowRightSidebar() {
|
||||
this.showRightSidebar = !this.showRightSidebar;
|
||||
}
|
||||
|
||||
hideLeftSidebar() {
|
||||
this.showLeftSidebar = false;
|
||||
}
|
||||
|
||||
toggleAllowRightSidebar() {
|
||||
this.allowRightSidebar = !this.allowRightSidebar;
|
||||
}
|
||||
|
||||
toggleAllowLeftSidebar() {
|
||||
this.allowLeftSidebar = !this.allowLeftSidebar;
|
||||
}
|
||||
|
||||
toggleShowTabWithIcon() {
|
||||
this.showTabWithIcon = !this.showTabWithIcon;
|
||||
}
|
||||
|
||||
toggleShowTabWithIconAndLabel() {
|
||||
this.showTabWithIconAndLabel = !this.showTabWithIconAndLabel;
|
||||
}
|
||||
|
||||
toggleFileUrl() {
|
||||
this.fileUrlSwitch = !this.fileUrlSwitch;
|
||||
|
||||
if (!this.fileUrlSwitch) {
|
||||
this.urlFile = null;
|
||||
}
|
||||
}
|
||||
|
||||
togglePreset() {
|
||||
this.isPreset = !this.isPreset;
|
||||
if (!this.isPreset) {
|
||||
@@ -198,10 +114,6 @@ export class FileViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
toggleToolbar() {
|
||||
this.customToolbar = !this.customToolbar;
|
||||
}
|
||||
|
||||
applyCustomPreset() {
|
||||
this.isPreset = false;
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
<div class="app-container">
|
||||
<div *ngIf="showSitePicker" class="app-site-container-style" id="site-container">
|
||||
<adf-sites-dropdown (change)="onSiteChange($event)" [hideMyFiles]="false" [relations]="'members'">
|
||||
</adf-sites-dropdown>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="document-list-container"
|
||||
class="app-document-list-container">
|
||||
@@ -14,7 +9,6 @@
|
||||
[versioning]="versioning"
|
||||
[adf-check-allowable-operation]="'create'"
|
||||
[adf-nodes]="disableDragArea ? getCurrentDocumentListNode() : []"
|
||||
(beginUpload)="onBeginUpload($event)"
|
||||
(updateFileVersion)="onUploadNewVersion($event)">
|
||||
<div *ngIf="errorMessage" class="app-error-message">
|
||||
<button (click)="resetError()" mat-icon-button>
|
||||
@@ -30,16 +24,7 @@
|
||||
</adf-dropdown-breadcrumb>
|
||||
</adf-toolbar-title>
|
||||
|
||||
<adf-toolbar-divider></adf-toolbar-divider>
|
||||
|
||||
<div class="app-document-action-buttons">
|
||||
<button
|
||||
mat-icon-button
|
||||
data-automation-id="document-list-grid-view"
|
||||
title="Toggle display mode"
|
||||
(click)="toggleGalleryView()">
|
||||
<mat-icon>list</mat-icon>
|
||||
</button>
|
||||
<button
|
||||
data-automation-id="create-new-folder"
|
||||
mat-icon-button
|
||||
@@ -79,11 +64,6 @@
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item (click)="toggleGalleryView()">
|
||||
<mat-icon *ngIf="displayMode === 'list'">view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'">list</mat-icon>
|
||||
<span>Card view mode</span>
|
||||
</button>
|
||||
<button mat-menu-item
|
||||
(error)="openSnackMessageError($event)"
|
||||
[adf-create-folder]="currentFolderId">
|
||||
@@ -125,7 +105,6 @@
|
||||
[sorting]="sorting"
|
||||
[sortingMode]="sortingMode"
|
||||
[showHeader]="showHeader"
|
||||
[thumbnails]="thumbnails"
|
||||
[stickyHeader]="stickyHeader"
|
||||
[headerFilters]="headerFilters"
|
||||
[filterValue]="paramValues"
|
||||
@@ -147,41 +126,26 @@
|
||||
<data-column
|
||||
key="$thumbnail"
|
||||
type="image"
|
||||
[sortable]="false"
|
||||
class="app-image-table-cell"
|
||||
[class.adf-cell-thumbnail]="thumbnails">
|
||||
[sortable]="false">
|
||||
</data-column>
|
||||
<data-column
|
||||
*ngIf="showNameColumn && hyperlinkNavigation"
|
||||
key="name"
|
||||
sortingKey="name"
|
||||
class="app-ellipsis-cell"
|
||||
title="Display name"
|
||||
[formatTooltip]="getNodeNameTooltip">
|
||||
<ng-template let-context>
|
||||
<adf-name-column key="name" [context]="context"></adf-name-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
<data-column
|
||||
*ngIf="showNameColumn && !hyperlinkNavigation"
|
||||
key="name"
|
||||
sortingKey="name"
|
||||
title="Display name"
|
||||
[formatTooltip]="getNodeNameTooltip"
|
||||
class="app-ellipsis-cell adf-expand-cell-5">
|
||||
class="adf-expand-cell-5">
|
||||
</data-column>
|
||||
<data-column
|
||||
key="content.sizeInBytes"
|
||||
title="Size"
|
||||
type="fileSize"
|
||||
sortingKey="sizeInBytes"
|
||||
class="app-desktop-only adf-ellipsis-cell">
|
||||
class="adf-ellipsis-cell">
|
||||
</data-column>
|
||||
<data-column
|
||||
*ngIf="searchTerm"
|
||||
key="search"
|
||||
title="Search"
|
||||
class="app-desktop-only adf-expand-cell-3">
|
||||
class="adf-expand-cell-3">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div [innerHTML]="searchResultsHighlight(entry.row.node.entry.search) | highlight:searchTerm">
|
||||
</div>
|
||||
@@ -200,7 +164,7 @@
|
||||
key="lock"
|
||||
[focus]="false"
|
||||
[sortable]="false"
|
||||
class="app-desktop-only adf-ellipsis-cell">
|
||||
class="adf-ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<button mat-icon-button [adf-node-lock]="entry.row.node.entry" class="app-lock-button">
|
||||
<mat-icon *ngIf="entry.row.getValue('isLocked')">lock</mat-icon>
|
||||
@@ -212,7 +176,7 @@
|
||||
title="Created by"
|
||||
key="createdByUser.displayName"
|
||||
sortingKey="createdByUser"
|
||||
class="app-desktop-only adf-ellipsis-cell">
|
||||
class="adf-ellipsis-cell">
|
||||
</data-column>
|
||||
<data-column
|
||||
title="Created"
|
||||
@@ -220,7 +184,7 @@
|
||||
sortingKey="createdAt"
|
||||
type="date"
|
||||
[format]="enableMediumTimeFormat ? 'medium' : 'timeAgo'"
|
||||
class="app-desktop-only adf-ellipsis-cell">
|
||||
class="adf-ellipsis-cell">
|
||||
</data-column>
|
||||
|
||||
</data-columns>
|
||||
@@ -240,11 +204,6 @@
|
||||
(success)="onDeleteActionSuccess($event)"
|
||||
handler="delete">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="info"
|
||||
title="Info"
|
||||
(execute)="onManageMetadata($event)">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="supervisor_account"
|
||||
title="Permission"
|
||||
@@ -269,21 +228,12 @@
|
||||
</adf-document-list>
|
||||
</div>
|
||||
<adf-pagination
|
||||
#standardPagination
|
||||
*ngIf="!infiniteScrolling"
|
||||
class="app-documentlist-pagination"
|
||||
[target]="documentList"
|
||||
(changePageSize)="onChangePageSize($event)"
|
||||
(changePageNumber)="onChangePageNumber($event)"
|
||||
(nextPage)="onNextPage($event)"
|
||||
(prevPage)="onPrevPage($event)">
|
||||
</adf-pagination>
|
||||
<adf-infinite-pagination
|
||||
[hidden]="!infiniteScrolling"
|
||||
[target]="documentList"
|
||||
[loading]="documentList.loading">
|
||||
{{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }}
|
||||
</adf-infinite-pagination>
|
||||
</adf-upload-drag-area>
|
||||
|
||||
<adf-info-drawer-layout *ngIf="showVersions" class="app-manage-versions-sidebar">
|
||||
@@ -301,7 +251,7 @@
|
||||
<ng-container *ngIf="userHasPermissionToManageVersions(); else no_permission_to_versions">
|
||||
<adf-version-manager
|
||||
[node]="documentList.selection[0].entry"
|
||||
[showComments]="showVersionComments"
|
||||
[showComments]="true"
|
||||
[allowDownload]="allowVersionDownload">
|
||||
</adf-version-manager>
|
||||
</ng-container>
|
||||
@@ -338,18 +288,6 @@
|
||||
</div>
|
||||
|
||||
<div class="app-container">
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="showNameColumn">
|
||||
Show Name Column
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="hyperlinkNavigation">
|
||||
Hyperlink navigation
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle data-automation-id="multiSelectToggle" [(ngModel)]="multiselect">
|
||||
Multiselect (with checkboxes)
|
||||
@@ -380,42 +318,18 @@
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle id="adf-thumbnails-upload-switch" (click)="toggleThumbnails()">
|
||||
Enable Thumbnails
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle id="adf-version-upload-switch" [(ngModel)]="versioning">
|
||||
Enable versioning
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle (click)="onInfiniteScrolling()">
|
||||
Enable Infinite Scrolling
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="showVersionComments">
|
||||
Show comments on versions
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="allowVersionDownload">
|
||||
Enable version download
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="warnOnMultipleUploads">
|
||||
Display warning for multiple uploads
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [(ngModel)]="enableMediumTimeFormat" id="enableMediumTimeFormat">
|
||||
Enable medium time format for document list
|
||||
@@ -461,8 +375,7 @@
|
||||
[versioning]="versioning"
|
||||
[adf-check-allowable-operation]="'create'"
|
||||
[adf-nodes]="enableUpload ? getCurrentDocumentListNode() : []"
|
||||
(permissionEvent)="handlePermissionError($event)"
|
||||
(beginUpload)="onBeginUpload($event)">
|
||||
(permissionEvent)="handlePermissionError($event)">
|
||||
</adf-upload-button>
|
||||
</div>
|
||||
<div *ngIf="acceptedFilesTypeShow">
|
||||
|
||||
@@ -2,16 +2,6 @@
|
||||
margin: 10px !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 599px) {
|
||||
.app-container {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.app-show-versions-button.mat-icon-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.app-error-message {
|
||||
text-align: left;
|
||||
}
|
||||
@@ -37,18 +27,6 @@
|
||||
.app-document-action-buttons {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
adf-breadcrumb, .app-document-action-buttons {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
adf-dropdown-breadcrumb, .app-toolbar-divider-before-more-menu, .app-toolbar-more-menu-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.app-document-list-container-in-upload-drag-area) {
|
||||
@@ -64,13 +42,6 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.app-site-container-style {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.app-content-service-settings {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@@ -28,29 +28,23 @@ import {
|
||||
Output,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { NodeEntry, NodePaging, Pagination, Node, SiteEntry, SearchEntry } from '@alfresco/js-api';
|
||||
import { NodeEntry, NodePaging, Pagination, Node, SearchEntry } from '@alfresco/js-api';
|
||||
import {
|
||||
NotificationService,
|
||||
DataRow,
|
||||
UserPreferencesService,
|
||||
PaginationComponent,
|
||||
DisplayMode,
|
||||
ShowHeaderMode,
|
||||
InfinitePaginationComponent,
|
||||
FormRenderingService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import {
|
||||
ContentService,
|
||||
FolderCreatedEvent,
|
||||
UploadService,
|
||||
DocumentListComponent,
|
||||
PermissionStyleModel,
|
||||
UploadFilesEvent,
|
||||
ConfirmDialogComponent,
|
||||
ContentMetadataService,
|
||||
FilterSearch,
|
||||
DialogAspectListService,
|
||||
@@ -59,7 +53,6 @@ import {
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { ProcessFormRenderingService } from '@alfresco/adf-process-services';
|
||||
import { VersionManagerDialogAdapterComponent } from './version-manager-dialog-adapter.component';
|
||||
import { MetadataDialogAdapterComponent } from './metadata-dialog-adapter.component';
|
||||
import { Subject } from 'rxjs';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { takeUntil, debounceTime, scan } from 'rxjs/operators';
|
||||
@@ -100,12 +93,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Input()
|
||||
sortingMode: 'server' | 'client' = 'server';
|
||||
|
||||
@Input()
|
||||
showRecentFiles = true;
|
||||
|
||||
@Input()
|
||||
showSitePicker = true;
|
||||
|
||||
@Input()
|
||||
showSettingsPanel = true;
|
||||
|
||||
@@ -130,9 +117,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Input()
|
||||
maxSizeShow = false;
|
||||
|
||||
@Input()
|
||||
showVersionComments = true;
|
||||
|
||||
@Input()
|
||||
versioning = false;
|
||||
|
||||
@@ -157,9 +141,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Input()
|
||||
disableDragArea = false;
|
||||
|
||||
@Input()
|
||||
showNameColumn = true;
|
||||
|
||||
@Input()
|
||||
searchTerm = '';
|
||||
|
||||
@@ -202,24 +183,16 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@ViewChild('standardPagination')
|
||||
standardPagination: PaginationComponent;
|
||||
|
||||
@ViewChild(InfinitePaginationComponent, { static: true })
|
||||
infinitePaginationComponent: InfinitePaginationComponent;
|
||||
|
||||
permissionsStyle: PermissionStyleModel[] = [];
|
||||
infiniteScrolling: boolean;
|
||||
stickyHeader: boolean;
|
||||
warnOnMultipleUploads = false;
|
||||
thumbnails = false;
|
||||
enableMediumTimeFormat = false;
|
||||
displayEmptyMetadata = false;
|
||||
hyperlinkNavigation = false;
|
||||
|
||||
constructor(
|
||||
private notificationService: NotificationService,
|
||||
private uploadService: UploadService,
|
||||
private contentService: ContentService,
|
||||
private dialog: MatDialog,
|
||||
private location: Location,
|
||||
private router: Router,
|
||||
private preference: UserPreferencesService,
|
||||
private preview: PreviewService,
|
||||
@@ -236,11 +209,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
toggleThumbnails() {
|
||||
this.thumbnails = !this.thumbnails;
|
||||
this.documentList.reload();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (!this.pagination) {
|
||||
this.pagination = {
|
||||
@@ -399,7 +367,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
onManageVersions(event: any) {
|
||||
const contentEntry = event.value.entry;
|
||||
const showComments = this.showVersionComments;
|
||||
const showComments = true;
|
||||
const allowDownload = this.allowVersionDownload;
|
||||
|
||||
if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
|
||||
@@ -421,28 +389,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
onManageMetadata(event: any) {
|
||||
const contentEntry = event.value.entry;
|
||||
const displayEmptyMetadata = this.displayEmptyMetadata;
|
||||
|
||||
if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
|
||||
this.dialog.open(MetadataDialogAdapterComponent, {
|
||||
data: {
|
||||
contentEntry,
|
||||
displayEmptyMetadata
|
||||
},
|
||||
panelClass: 'adf-metadata-manager-dialog',
|
||||
width: '630px'
|
||||
});
|
||||
} else {
|
||||
this.openSnackMessageError('OPERATION.ERROR.PERMISSION');
|
||||
}
|
||||
}
|
||||
|
||||
onSiteChange(site: SiteEntry) {
|
||||
this.currentFolderId = site.entry.guid;
|
||||
}
|
||||
|
||||
hasSelection(selection: Array<any>): boolean {
|
||||
return selection && selection.length > 0;
|
||||
}
|
||||
@@ -457,13 +403,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
return this.contentService.hasAllowableOperations(selection[0].entry, 'update');
|
||||
}
|
||||
|
||||
getNodeNameTooltip(row: DataRow): string {
|
||||
if (row) {
|
||||
return row.getValue('name');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
canEditFolder(selection: Array<NodeEntry>): boolean {
|
||||
if (selection && selection.length === 1) {
|
||||
const entry = selection[0].entry;
|
||||
@@ -507,44 +446,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
this.turnedPreviousPage.emit(event);
|
||||
}
|
||||
|
||||
toggleGalleryView(): void {
|
||||
this.displayMode = this.displayMode === DisplayMode.List ? DisplayMode.Gallery : DisplayMode.List;
|
||||
const url = this.router.createUrlTree(['/files', this.currentFolderId, 'display', this.displayMode]).toString();
|
||||
|
||||
this.location.go(url);
|
||||
}
|
||||
|
||||
onInfiniteScrolling(): void {
|
||||
this.infiniteScrolling = !this.infiniteScrolling;
|
||||
this.infinitePaginationComponent.reset();
|
||||
}
|
||||
|
||||
onBeginUpload(event: UploadFilesEvent) {
|
||||
if (this.warnOnMultipleUploads && event) {
|
||||
const files = event.files || [];
|
||||
if (files.length > 1) {
|
||||
event.pauseUpload();
|
||||
|
||||
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
message: `Are you sure you want to upload ${files.length} file(s)?`
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result) => {
|
||||
if (result === true) {
|
||||
event.resumeUpload();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onUploadNewVersion(ev) {
|
||||
const contentEntry = ev.detail.data.node.entry;
|
||||
const showComments = this.showVersionComments;
|
||||
const showComments = true;
|
||||
const allowDownload = this.allowVersionDownload;
|
||||
const newFileVersion = ev.detail.files[0].file;
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header mat-dialog-title>Metadata</header>
|
||||
<section mat-dialog-content>
|
||||
<adf-content-metadata-card
|
||||
[node]="contentEntry"
|
||||
[displayEmpty]="displayEmptyMetadata">
|
||||
</adf-content-metadata-card>
|
||||
</section>
|
||||
<footer mat-dialog-actions>
|
||||
<button mat-button (click)="close()">Close</button>
|
||||
</footer>
|
||||
@@ -1,38 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
|
||||
@Component({
|
||||
templateUrl: './metadata-dialog-adapter.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class MetadataDialogAdapterComponent {
|
||||
contentEntry: Node;
|
||||
displayEmptyMetadata = false;
|
||||
|
||||
constructor(@Inject(MAT_DIALOG_DATA) data: any, private containingDialog?: MatDialogRef<MetadataDialogAdapterComponent>) {
|
||||
this.contentEntry = data.contentEntry;
|
||||
this.displayEmptyMetadata = data.displayEmptyMetadata;
|
||||
}
|
||||
|
||||
close() {
|
||||
this.containingDialog.close();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,4 @@
|
||||
<h1>ADF</h1>
|
||||
<h2>Angular components for Alfresco</h2>
|
||||
</div>
|
||||
|
||||
<a mat-raised-button href="https://github.com/Alfresco/alfresco-ng2-components/tree/master/docs">Documentation</a>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app-home-view',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss'],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<a mat-fab class="app-setting-button" data-automation-id="settings" href="" routerLink="/settings">
|
||||
<a class="app-setting-button" data-automation-id="settings" href="" routerLink="/settings">
|
||||
<mat-icon>settings</mat-icon>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.app-setting-button.mat-fab {
|
||||
.app-setting-button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
z-index: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<header class="app-logout-background">
|
||||
<header>
|
||||
<div class="app-logout-section" data-automation-id="adf-logout-section">
|
||||
<div class="app-logout-headline">
|
||||
<h1 class="mat-h1">Logout Page</h1>
|
||||
<h2 class="mat-h2">You are now logged out</h2>
|
||||
</div>
|
||||
|
||||
<div class="app-logout-login">
|
||||
<a mat-raised-button class="app-logout-docs-button" href="#/login">Login}</a>
|
||||
</div>
|
||||
<div class="app-logout-home">
|
||||
<a mat-raised-button class="app-logout-docs-button" href="/">Home</a>
|
||||
</div>
|
||||
<a mat-raised-button class="app-logout-docs-button" href="#/login">Login</a>
|
||||
<a mat-raised-button class="app-logout-docs-button" href="/">Home</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.app-logout-header-background {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app-logout-section {
|
||||
text-align: center;
|
||||
padding-top: 60px;
|
||||
@@ -24,9 +20,5 @@
|
||||
}
|
||||
|
||||
.app-logout-docs-button {
|
||||
margin: 30px;
|
||||
}
|
||||
|
||||
.app-logout-login {
|
||||
float: left;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,14 @@ import { PreviewService } from '../../services/preview.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
/**
|
||||
* Provide a factory for process upload service
|
||||
*
|
||||
* @param api api client
|
||||
* @param config config service
|
||||
* @param discoveryApiService discovery service
|
||||
* @returns factory function
|
||||
*/
|
||||
export function processUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService, discoveryApiService: DiscoveryApiService) {
|
||||
return new ProcessUploadService(api, config, discoveryApiService);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,14 @@ import { PreviewService } from '../../services/preview.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
/**
|
||||
* Provide a task upload service factory
|
||||
*
|
||||
* @param api api client
|
||||
* @param config config service
|
||||
* @param discoveryApiService discovery service
|
||||
* @returns factory function
|
||||
*/
|
||||
export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService, discoveryApiService: DiscoveryApiService) {
|
||||
return new TaskUploadService(api, config, discoveryApiService);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
[showHeader]="showHeader"
|
||||
[sorting]="sorting"
|
||||
[sortingMode]="'server'"
|
||||
[showRecentFiles]="false"
|
||||
[showSitePicker]="false"
|
||||
[showSettingsPanel]="false"
|
||||
[currentFolderId]="null"
|
||||
[nodeResult]="$any(data)"
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
[showHeader]="showHeader"
|
||||
[sorting]="sorting"
|
||||
[sortingMode]="'server'"
|
||||
[showRecentFiles]="false"
|
||||
[showSitePicker]="false"
|
||||
[showSettingsPanel]="false"
|
||||
[currentFolderId]="null"
|
||||
[nodeResult]="$any(data)"
|
||||
|
||||
@@ -1,120 +1,106 @@
|
||||
<div class="adf-setting-container">
|
||||
<mat-card class="adf-setting-card">
|
||||
<form id="host-form" [formGroup]="form" (submit)="onSubmit(form.value)" (keydown)="keyDownFunction($event)">
|
||||
<mat-form-field *ngIf="showSelectProviders">
|
||||
<mat-select id="adf-provider-selector" [formControl]="providersControl">
|
||||
<mat-option *ngFor="let provider of providers" [value]="provider">
|
||||
{{ provider }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<form id="host-form" [formGroup]="form" (submit)="onSubmit(form.value)" (keydown)="keyDownFunction($event)">
|
||||
<mat-form-field *ngIf="showSelectProviders">
|
||||
<mat-select id="adf-provider-selector" [formControl]="providersControl">
|
||||
<mat-option *ngFor="let provider of providers" [value]="provider">
|
||||
{{ provider }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div class="adf-authentication-type">
|
||||
<div>Authentication type:</div>
|
||||
<mat-radio-group formControlName="authType" class="adf-authentication-radio-group">
|
||||
<mat-radio-button value="BASIC" class="adf-authentication-radio-button">Basic Authentication</mat-radio-button>
|
||||
<mat-radio-button value="OAUTH" class="adf-authentication-radio-button">SSO</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="isALL() || isECM()" class="adf-full-width">
|
||||
<mat-label>Content Services URL</mat-label>
|
||||
<input matInput [formControl]="ecmHost" data-automation-id="ecmHost" type="text" id="ecmHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="ecmHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="ecmHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isALL() || isBPM()" class="adf-full-width">
|
||||
<mat-label>Process Services URL</mat-label>
|
||||
<input matInput [formControl]="bpmHost" data-automation-id="bpmHost" type="text" id="bpmHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="bpmHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="bpmHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isOAUTH()" class="adf-full-width">
|
||||
<mat-label>Identity Host</mat-label>
|
||||
<input matInput name="identityHost" id="identityHost" formControlName="identityHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="identityHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="identityHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div *ngIf="isOAUTH()" formGroupName="oauthConfig">
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Auth Host</mat-label>
|
||||
<input matInput name="host" id="oauthHost" formControlName="host" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="host.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="host.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div class="adf-authentication-type">
|
||||
<div>Authentication type :</div>
|
||||
<mat-radio-group formControlName="authType" >
|
||||
<mat-radio-button value="BASIC">Basic Authentication</mat-radio-button>
|
||||
<mat-radio-button value="OAUTH">SSO</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Client ID</mat-label>
|
||||
<input matInput name="clientId" id="clientId" formControlName="clientId">
|
||||
<mat-error *ngIf="clientId.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="isALL() || isECM()">
|
||||
<mat-card-content>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Content Services URL</mat-label>
|
||||
<input matInput [formControl]="ecmHost" data-automation-id="ecmHost" type="text" id="ecmHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="ecmHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="ecmHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Scope Id</mat-label>
|
||||
<input matInput name="Scope" formControlName="scope">
|
||||
<mat-error *ngIf="scope.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Secret</mat-label>
|
||||
<input matInput name="Secret" formControlName="secret">
|
||||
<mat-error *ngIf="secret.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-label>Silent Login</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="silentLogin" formControlName="silentLogin">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<mat-label>Implicit Flow</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="implicitFlow" formControlName="implicitFlow">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<ng-container *ngIf="isOAUTH">
|
||||
<mat-label>Code Flow</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="codeFlow" formControlName="codeFlow">
|
||||
</mat-slide-toggle>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="isALL() || isBPM()">
|
||||
<mat-card-content>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Process Services URL</mat-label>
|
||||
<input matInput [formControl]="bpmHost" data-automation-id="bpmHost" type="text" id="bpmHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="bpmHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="bpmHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</ng-container>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Redirect URI</mat-label>
|
||||
<input matInput name="redirectUri" formControlName="redirectUri">
|
||||
<mat-error *ngIf="redirectUri.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="isOAUTH()">
|
||||
<mat-card-content>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Identity Host</mat-label>
|
||||
<input matInput name="identityHost" id="identityHost" formControlName="identityHost" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="identityHost.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="identityHost.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</ng-container>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Redirect URI Logout</mat-label>
|
||||
<input id="logout-url" matInput name="redirectUriLogout" formControlName="redirectUriLogout">
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="isOAUTH()">
|
||||
<div formGroupName="oauthConfig">
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Auth Host</mat-label>
|
||||
<input matInput name="host" id="oauthHost" formControlName="host" [placeholder]="PLACEHOLDER_URL">
|
||||
<mat-error *ngIf="host.hasError('pattern')">{{ ERR_INVALID_URL }}</mat-error>
|
||||
<mat-error *ngIf="host.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Public urls silent Login</mat-label>
|
||||
<input id="public-url" matInput name="publicUrls" formControlName="publicUrls">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Client ID</mat-label>
|
||||
<input matInput name="clientId" id="clientId" formControlName="clientId">
|
||||
<mat-error *ngIf="clientId.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Scope Id</mat-label>
|
||||
<input matInput name="Scope" formControlName="scope">
|
||||
<mat-error *ngIf="scope.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Secret</mat-label>
|
||||
<input matInput name="Secret" formControlName="secret">
|
||||
<mat-error *ngIf="secret.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-label>Silent Login</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="silentLogin" formControlName="silentLogin">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<mat-label>Implicit Flow</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="implicitFlow" formControlName="implicitFlow">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<ng-container *ngIf="supportsCodeFlow">
|
||||
<mat-label>Code Flow</mat-label>
|
||||
<mat-slide-toggle class="adf-full-width" name="codeFlow" formControlName="codeFlow">
|
||||
</mat-slide-toggle>
|
||||
</ng-container>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Redirect URI</mat-label>
|
||||
<input matInput name="redirectUri" formControlName="redirectUri">
|
||||
<mat-error *ngIf="redirectUri.hasError('required')">{{ ERR_REQUIRED }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Redirect URI Logout</mat-label>
|
||||
<input id="logout-url" matInput name="redirectUriLogout" formControlName="redirectUriLogout">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="adf-full-width">
|
||||
<mat-label>Public urls silent Login</mat-label>
|
||||
<input id="public-url" matInput name="publicUrls" formControlName="publicUrls">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</ng-container>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-button (click)="onCancel()">Back</button>
|
||||
<button type="submit" class="adf-login-button" mat-button
|
||||
color="primary" data-automation-id="settings-apply-button"
|
||||
[disabled]="!form.valid">Apply</button>
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
</mat-card>
|
||||
<div class="adf-host-settings-actions">
|
||||
<button mat-button (click)="onCancel()">Back</button>
|
||||
<button type="submit"
|
||||
mat-button
|
||||
color="primary"
|
||||
data-automation-id="settings-apply-button"
|
||||
[disabled]="!form.valid">Apply</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -3,11 +3,26 @@
|
||||
min-height: 100%;
|
||||
align-items: center;
|
||||
|
||||
.adf-host-settings-actions {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.adf-authentication-type {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.adf-authentication-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 15px 0;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.adf-authentication-radio-button {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.adf-setting-container {
|
||||
width: 800px;
|
||||
display: table;
|
||||
|
||||
@@ -65,7 +65,7 @@ export class HostSettingsComponent implements OnInit {
|
||||
private storageService: StorageService,
|
||||
private alfrescoApiService: AlfrescoApiService,
|
||||
private appConfig: AppConfigService,
|
||||
private auth: AuthenticationService
|
||||
private authenticationService: AuthenticationService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -191,8 +191,8 @@ export class HostSettingsComponent implements OnInit {
|
||||
this.storageService.setItem(AppConfigValues.AUTHTYPE, values.authType);
|
||||
|
||||
this.alfrescoApiService.reset();
|
||||
this.auth.reset();
|
||||
this.alfrescoApiService.getInstance().invalidateSession();
|
||||
this.authenticationService.reset();
|
||||
this.authenticationService.logout();
|
||||
this.success.emit(true);
|
||||
}
|
||||
|
||||
@@ -235,10 +235,6 @@ export class HostSettingsComponent implements OnInit {
|
||||
return this.form.get('authType').value === 'OAUTH';
|
||||
}
|
||||
|
||||
get supportsCodeFlow(): boolean {
|
||||
return this.auth.supportCodeFlow;
|
||||
}
|
||||
|
||||
get providersControl(): UntypedFormControl {
|
||||
return this.form.get('providersControl') as UntypedFormControl;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { NgModule } from '@angular/core';
|
||||
import { TaskListDemoComponent } from './task-list-demo.component';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { CoreModule, LocalizedDatePipe } from '@alfresco/adf-core';
|
||||
import { ProcessModule } from '@alfresco/adf-process-services';
|
||||
|
||||
const routes: Routes = [
|
||||
@@ -38,7 +38,8 @@ const routes: Routes = [
|
||||
CommonModule,
|
||||
RouterModule.forChild(routes),
|
||||
CoreModule,
|
||||
ProcessModule.forChild()
|
||||
ProcessModule.forChild(),
|
||||
LocalizedDatePipe
|
||||
],
|
||||
declarations: [TaskListDemoComponent]
|
||||
})
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<div>TREE VIEW TEST</div>
|
||||
<mat-form-field class="example-full-width">
|
||||
<input matInput placeholder="Node Id"
|
||||
[(ngModel)]="nodeIdSample"
|
||||
(ngModelChange)="reset()">
|
||||
</mat-form-field>
|
||||
<span>
|
||||
CLICKED NODE: {{clickedNodeName}}
|
||||
</span>
|
||||
|
||||
<adf-tree-view-list *ngIf="!errorMessage; else errorOccurred"
|
||||
[nodeId]="nodeIdSample"
|
||||
(nodeClicked)="onClick($event)"
|
||||
(error)="onErrorOccurred($event)">
|
||||
</adf-tree-view-list>
|
||||
<ng-template #errorOccurred>
|
||||
<span>An Error Occurred </span>
|
||||
<span>{{errorMessage}}</span>
|
||||
</ng-template>
|
||||
@@ -1,3 +0,0 @@
|
||||
.example-full-width {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tree-view',
|
||||
templateUrl: './tree-view-sample.component.html',
|
||||
styleUrls: ['./tree-view-sample.component.scss']
|
||||
})
|
||||
export class TreeViewSampleComponent {
|
||||
|
||||
clickedNodeName: string = '';
|
||||
errorMessage: string = '';
|
||||
|
||||
nodeIdSample: string = '-my-';
|
||||
|
||||
onClick(node) {
|
||||
this.clickedNodeName = node.entry.name;
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.clickedNodeName = '';
|
||||
this.errorMessage = '';
|
||||
}
|
||||
|
||||
onErrorOccurred(error: string) {
|
||||
this.clickedNodeName = '';
|
||||
this.errorMessage = error;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,93 +0,0 @@
|
||||
Copyright (c) 2016 The Muli Project Authors (contact@sansoxygen.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -1,63 +0,0 @@
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Muli Regular'),
|
||||
local('Muli-Regular'),
|
||||
url(Muli-Regular.ttf) format('truetype');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Muli Regular'),
|
||||
local('Muli-Regular'),
|
||||
url(Muli-Regular.ttf) format('truetype');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Muli Regular'),
|
||||
local('Muli-Regular'),
|
||||
url(Muli-Regular.ttf) format('truetype');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: local('Muli Light'),
|
||||
local('Muli-Light'),
|
||||
url(Muli-Light.ttf) format('truetype');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: local('Muli Light'),
|
||||
local('Muli-Light'),
|
||||
url(Muli-Light.ttf) format('truetype');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: local('Muli Light'),
|
||||
local('Muli-Light'),
|
||||
url(Muli-Light.ttf) format('truetype');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
@@ -357,6 +357,7 @@ for more information about installing and using the source code.
|
||||
| [Base Card View Content Update interface](content-services/interfaces/base-card-view-content-update.interface.md) | Specifies required properties and methods for Card View Content Update service. | |
|
||||
| Extends from BaseCardViewUpdate. | [Source](../lib/content-services/src/lib/interfaces/base-card-view-content-update.interface.ts) | |
|
||||
| [Search widget interface](content-services/interfaces/search-widget.interface.md) | Specifies required properties for Search filter component widgets. | [Source](../lib/content-services/src/lib/search/models/search-widget.interface.ts) |
|
||||
| [Content Metadata Custom Panel interface](content-services/interfaces/content-metadata-custom-panel.interface.md) | Specifies required properties for metadata custom panel. | [Source](../lib/content-services/src/lib/content-metadata/interfaces/content-metadata-custom-panel.interface.ts) |
|
||||
|
||||
### Models
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ Displays and edits metadata related to a node.
|
||||
- [Use chips for multi value properties](#use-chips-for-multi-value-properties)
|
||||
- [Copy to Clipboard on click](#copy-to-clipboard-on-click)
|
||||
- [Search select options (ACS 7+)](#search-select-options-acs-7)
|
||||
- [Custom metadata panels](#custom-metadata-panels)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@@ -53,6 +54,7 @@ Displays and edits metadata related to a node.
|
||||
| readOnly | `boolean` | false | (optional) This flag sets the metadata in read only mode preventing changes. |
|
||||
| displayDefaultProperties | `boolean` | | (optional) This flag displays/hides the metadata properties. |
|
||||
| editable | `boolean` | | (optional) This flag toggles editable of content. |
|
||||
| customPanels | [`ContentMetadataCustomPanel`](../interfaces/content-metadata-custom-panel.interface.md)`[]` | | (optional) List of custom metadata panels to be displayed as [`Dynamic components`](../../extensions/components/dynamic.component.md). |
|
||||
|
||||
### Events
|
||||
|
||||
@@ -438,3 +440,7 @@ When the list of values is too long, the options selection panel will be enhance
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Custom metadata panels
|
||||
|
||||
If there is a need to display some custom node properties that require additional UI or data to be fetched you can define custom metadata panels for the metadata component. After creating custom component to be displayed it has to be registered in [Extension Service](../../extensions/services/extension.service.md). Both `panelTitle` and `component` properties have to be defined.
|
||||
|
||||
@@ -60,6 +60,7 @@ Displays the documents from a repository.
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| additionalSorting | [`DataSorting`](../../../lib/core/src/lib/datatable/data/data-sorting.model.ts) | | Defines default sorting. The format is an array of strings `[key direction, otherKey otherDirection]` i.e. `['name desc', 'nodeType asc']` or `['name asc']`. Set this value if you want a base rule to be added to the sorting apart from the one driven by the header. |
|
||||
| allowDropFiles | `boolean` | false | When true, this enables you to drop files directly into subfolders shown as items in the list or into another file to trigger updating it's version. When false, the dropped file will be added to the current folder (ie, the one containing all the items shown in the list). See the [Upload directive](../../core/directives/upload.directive.md) for further details about how the file drop is handled. |
|
||||
| columnsPresetKey | `string` | | Key of columns preset set in extension.json|
|
||||
| contentActions | `boolean` | false | Toggles content actions for each row |
|
||||
| contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". |
|
||||
| contextMenuActions | `boolean` | false | Toggles context menus for each row |
|
||||
@@ -72,6 +73,7 @@ Displays the documents from a repository.
|
||||
| includeFields | `string[]` | | Include additional information about the node in the server request. For example: association, isLink, isLocked and others. |
|
||||
| loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
|
||||
| locationFormat | `string` | "/" | The default route for all the location-based columns (if declared). |
|
||||
| maxColumnsVisible | `number` | | Limit of possible visible columns, including "$thumbnail" column if provided |
|
||||
| maxItems | `number` | | Default value is stored in the user preference settings. Use this only if you are not using pagination. |
|
||||
| multiselect | `boolean` | false | Toggles multiselect mode |
|
||||
| navigate | `boolean` | true | Toggles navigation to folder content or file preview |
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
Title: Content Metadata Custom Panel interface
|
||||
Added: v6.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-10-06
|
||||
---
|
||||
|
||||
# [Content Metadata Custom Panel interface](../../../lib/content-services/src/lib/content-metadata/interfaces/content-metadata-custom-panel.interface.ts "Defined in content-metadata-custom-panel.interface.ts")
|
||||
|
||||
Specifies required properties for custom metadata panel to be displayed in [ContentMetadataCardComponent](../components/content-metadata-card.component.md).
|
||||
|
||||
## Basic usage
|
||||
|
||||
```ts
|
||||
export interface ContentMetadataCustomPanel {
|
||||
panelTitle: string;
|
||||
component: string;
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| panelTitle | `string` | | Title for the panel the will be displayed in expansion panel header. |
|
||||
| component | `string` | | Id of the registered [Dynamic component](../../extensions/components/dynamic.component.md) to be displayed inside expansion panel. |
|
||||
|
||||
## See also
|
||||
|
||||
- [ContentMetadataCardComponent](../components/content-metadata-card.component.md)
|
||||
- [Dynamic Component](../../extensions/components/dynamic.component.md)
|
||||
@@ -11,18 +11,18 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
|
||||
## Contents
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
- [Class members](#class-members)
|
||||
- [Properties](#properties)
|
||||
- [Details](#details)
|
||||
- [Conditional visibility](#conditional-visibility)
|
||||
- [Automatic column header translation](#automatic-column-header-translation)
|
||||
- [Custom tooltips](#custom-tooltips)
|
||||
- [Column Template](#column-template)
|
||||
- [Styling Techniques](#styling-techniques)
|
||||
- [Using the copyContent option](#using-the-copycontent-option)
|
||||
- [Example of column customData](#example-of-column-customdata)
|
||||
- [See also](#see-also)
|
||||
- [Basic Usage](#basic-usage)
|
||||
- [Class members](#class-members)
|
||||
- [Properties](#properties)
|
||||
- [Details](#details)
|
||||
- [Conditional visibility](#conditional-visibility)
|
||||
- [Automatic column header translation](#automatic-column-header-translation)
|
||||
- [Custom tooltips](#custom-tooltips)
|
||||
- [Column Template](#column-template)
|
||||
- [Styling Techniques](#styling-techniques)
|
||||
- [Using the copyContent option](#using-the-copycontent-option)
|
||||
- [Example of column customData](#example-of-column-customdata)
|
||||
- [See also](#see-also)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@@ -59,7 +59,90 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
| sortingKey | `string` | | When using server side sorting the column used by the api call where the sorting will be performed |
|
||||
| srTitle | `string` | | Title to be used for screen readers. |
|
||||
| title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. |
|
||||
| type | `string` | "text" | Value type for the column. Possible settings are 'text', 'image', 'date', 'fileSize', 'location', and 'json'. |
|
||||
| type | `string` | "text" | Value type for the column. Possible settings are 'text', 'boolean', 'icon', 'image', 'date', 'fileSize', 'location', 'json', 'amount' and 'number'. |
|
||||
| order | `number` | | Sets position of column. |
|
||||
| currencyConfig | `CurrencyConfig` | [Default currency config](#default-currency-config) | Currency configuration to customize the formatting and display of currency values within the component. |
|
||||
| decimalConfig | `DecimalConfig` | [Default decimal config](#default-decimal-config) | Decimal configuration to customize the formatting and display of decimal values within the component. |
|
||||
| dateConfig | `DateConfig` | [Default date config](#default-date-config) | Date configuration to customize the formatting and localization of date values within the component. |
|
||||
|
||||
## Properties configuration
|
||||
|
||||
### `type` Input
|
||||
|
||||
The `type` input allows us to specify the type of hosted values for a given column. The complete array of possible values is outlined below:
|
||||
|
||||
- `text` - The given values are represented as a strings (default option).
|
||||
- `boolean` - The column expects true / false (boolean values) and in addition accepts two strings - 'false' and 'true'. Other values are not recognized by the column, and the cell remains empty.
|
||||
- `date` - This column is responsible for displaying dates. It expects date represented by a string, number or Date object. This type comes with [`dateConfig`](#default-date-config),
|
||||
- `amount` - This column is responsible for displaying currencies. It expects numerals represented by a string or a number. This type comes with [`currencyConfig`](#default-currency-config),
|
||||
- `number` - This column is responsible for displaying numbers (integers and decimals). It expects numerals represented by a string or a number. This type comes with [`decimalConfig`](#default-decimal-config)
|
||||
- `location` - This column displays a clickable location link pointing to the parent path of the node. **Note:** This type is strongly related to the document list component ([document-list.component.md](../../content-services/components/document-list.component.md)).
|
||||
|
||||
### `currencyConfig` Input
|
||||
|
||||
The `currencyConfig` input allows you to customize the formatting and display of currency values within the component. It accepts an object of type `CurrencyConfig` with optional properties for specifying the currency code, display format, decimal precision, and locale.
|
||||
|
||||
#### Properties
|
||||
|
||||
- `code` (optional): A string representing the currency code (e.g., "USD" for US Dollars).
|
||||
- `display` (optional): A string specifying how the currency value should be displayed.
|
||||
- `digitsInfo` (optional): A string determining the number of decimal places and other formatting details.
|
||||
- `locale` (optional): A string indicating the locale or region-specific formatting to use for the currency.
|
||||
|
||||
#### Default currency config
|
||||
|
||||
By default, the `currencyConfig` input is not required. If not provided, the component will use the following default values:
|
||||
|
||||
- `code`: "USD"
|
||||
- `display`: "symbol"
|
||||
- `digitsInfo`: undefined
|
||||
- `locale`: undefined
|
||||
|
||||
These properties offer flexibility in customizing how currency values are presented within the component.
|
||||
|
||||
For more details on the possible use cases of the above properties, see the [official Angular documents](https://angular.io/api/common/CurrencyPipe).
|
||||
|
||||
### `decimalConfig` Input
|
||||
|
||||
The `decimalConfig` input allows you to customize the formatting and display of decimal values within the component. It accepts an object of type `DecimalConfig` with optional properties for specifying the decimal precision and locale.
|
||||
|
||||
#### Properties
|
||||
|
||||
- `digitsInfo` (optional): A string determining the number of decimal places and other formatting details.
|
||||
- `locale` (optional): A string indicating the locale or region-specific formatting to use for the currency.
|
||||
|
||||
#### Default decimal config
|
||||
|
||||
By default, the `decimalConfig` input is not required. If not provided, the component will use the following default values:
|
||||
|
||||
- `digitsInfo`: undefined
|
||||
- `locale`: undefined
|
||||
|
||||
These properties offer flexibility in customizing how decimal values are presented within the component.
|
||||
|
||||
For more details on the possible use cases of the above properties, see the [official Angular documents](https://angular.io/api/common/DecimalPipe).
|
||||
|
||||
### `dateConfig` Input
|
||||
|
||||
The `dateConfig` input allows you to configure date formatting and localization for a component. It accepts an object of type `DateConfig` with optional properties for specifying the format of displayed date, tooltip and locale.
|
||||
|
||||
#### Properties
|
||||
|
||||
- `format` (optional): A string specifying the date format ([pre-defined formats](https://angular.io/api/common/DatePipe#pre-defined-format-options)).
|
||||
- `tooltipFormat` (optional): A string specifying the date format for tooltips.
|
||||
- `locale` (optional): A string indicating the locale or region-specific formatting to use for the currency.
|
||||
|
||||
#### Default date config
|
||||
|
||||
By default, the `dateConfig` object is not required. If not provided, the component will use the following default values:
|
||||
|
||||
- `format`: "medium"
|
||||
- `tooltipFormat`: "medium"
|
||||
- `locale`: undefined
|
||||
|
||||
These properties offer flexibility in customizing how date values are presented within the component.
|
||||
|
||||
For more details on the possible use cases of the above properties, see the [official Angular documents](https://angular.io/api/common/DatePipe).
|
||||
|
||||
## Details
|
||||
|
||||
@@ -384,6 +467,6 @@ if (shouldPerformAction) { /* action */}
|
||||
|
||||
## See also
|
||||
|
||||
- [Document list component](../../content-services/components/document-list.component.md)
|
||||
- [Datatable component](datatable.component.md)
|
||||
- [Task list component](../../process-services/components/task-list.component.md)
|
||||
- [Document list component](../../content-services/components/document-list.component.md)
|
||||
- [Datatable component](datatable.component.md)
|
||||
- [Task list component](../../process-services/components/task-list.component.md)
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
# Date and Time
|
||||
|
||||
> As of v.6.4.0 the ADF is no longer using `moment.js` for date and time processing.
|
||||
> This is related to the `moment.js`` sunset (<https://momentjs.com/docs/?/displaying/format/#/-project-status/>)
|
||||
|
||||
## Components
|
||||
|
||||
Date and DateTime ADF components are based on the following components:
|
||||
|
||||
* Date Picker: <https://v14.material.angular.io/components/datepicker/>
|
||||
* DateTime Picker: <https://kuhnroyal.github.io/mat-datetimepicker/>
|
||||
|
||||
## Adapters
|
||||
|
||||
ADF 6.4.0 and later provides custom date and time adapters for <https://date-fns.org/> library.
|
||||
|
||||
### ADF DateFns Adapter
|
||||
|
||||
The `AdfDateFnsAdapter` is an implementation of an Angular DateAdapter,
|
||||
that provides backwards compatibility with the [moment.js](https://momentjs.com).
|
||||
|
||||
The adapter works with both [moment.js](https://momentjs.com) and [date-fns](https://date-fns.org) formats,
|
||||
and dynamically translates `moment.js` formatting tokens to `date-fns`.
|
||||
|
||||
In addition, the adapter automatically detects the current locale and switches to the corresponding values.
|
||||
|
||||
```ts
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { AdfDateFnsAdapter, ADF_DATE_FORMATS } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
providers: [
|
||||
{ provide: MAT_DATE_FORMATS, useValue: ADF_DATE_FORMATS },
|
||||
{ provide: DateAdapter, useClass: AdfDateFnsAdapter }
|
||||
]
|
||||
})
|
||||
export class MyComponent() {
|
||||
constructor(private dateAdapter: DateAdapter<Date>) {}
|
||||
}
|
||||
```
|
||||
|
||||
The default set of ADF formats for Date picker components is as following:
|
||||
|
||||
```ts
|
||||
export const ADF_DATE_FORMATS: MatDateFormats = {
|
||||
parse: {
|
||||
dateInput: 'dd-MM-yyyy'
|
||||
},
|
||||
display: {
|
||||
dateInput: 'dd-MM-yyyy',
|
||||
monthLabel: 'LLL',
|
||||
monthYearLabel: 'LLL uuuu',
|
||||
dateA11yLabel: 'PP',
|
||||
monthYearA11yLabel: 'LLLL uuuu'
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
You can provide own format defaults by injecting a different `MAT_DATE_FORMATS` value:
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
providers: [
|
||||
{ provide: MAT_DATE_FORMATS, useValue: MY_CUSTOM_FORMATS }
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
### ADF DateTimeFns Adapter
|
||||
|
||||
The `AdfDateTimeFnsAdapter` is an implementation of the `mat-datetimepicker` DateTimeAdapter,
|
||||
that provides backwards compatibility with the [moment.js](https://momentjs.com).
|
||||
|
||||
The adapter works with both [moment.js](https://momentjs.com) and [date-fns](https://date-fns.org) formats,
|
||||
and dynamically translates `moment.js` formatting tokens to `date-fns`.
|
||||
|
||||
In addition, the adapter automatically detects the current locale and switches to the corresponding values.
|
||||
|
||||
```ts
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { DatetimeAdapter, MAT_DATETIME_FORMATS } from '@mat-datetimepicker/core';
|
||||
import {
|
||||
ADF_DATE_FORMATS,
|
||||
ADF_DATETIME_FORMATS,
|
||||
AdfDateFnsAdapter,
|
||||
AdfDateTimeFnsAdapter
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
providers: [
|
||||
{ provide: MAT_DATE_FORMATS, useValue: ADF_DATE_FORMATS },
|
||||
{ provide: MAT_DATETIME_FORMATS, useValue: ADF_DATETIME_FORMATS },
|
||||
{ provide: DateAdapter, useClass: AdfDateFnsAdapter },
|
||||
{ provide: DatetimeAdapter, useClass: AdfDateTimeFnsAdapter }
|
||||
]
|
||||
})
|
||||
export class MyComponent() {
|
||||
constructor(private dateAdapter: DateAdapter<Date>,
|
||||
private dateTimeAdapter: DatetimeAdapter<Date>) {}
|
||||
}
|
||||
```
|
||||
|
||||
The default set of formatting rules, compared to the `moment.js` equivalents, is as following:
|
||||
|
||||
```ts
|
||||
export const ADF_DATETIME_FORMATS: MatDatetimeFormats = {
|
||||
parse: {
|
||||
dateInput: 'P', // L
|
||||
monthInput: 'LLLL', // MMMM
|
||||
timeInput: 'p', // LT
|
||||
datetimeInput: 'Pp' // L LT
|
||||
},
|
||||
display: {
|
||||
dateInput: 'P', // L
|
||||
monthInput: 'LLLL', // MMMM
|
||||
datetimeInput: 'Pp', // L LT
|
||||
timeInput: 'p', // LT
|
||||
monthYearLabel: 'LLL uuuu', // MMM YYYY
|
||||
dateA11yLabel: 'PP', // LL
|
||||
monthYearA11yLabel: 'LLLL uuuu', // MMMM YYYY
|
||||
popupHeaderDateLabel: 'ccc, dd MMM' // ddd, DD MMM
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
You can provide own format defaults by injecting a different `MAT_DATETIME_FORMATS` value:
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
providers: [
|
||||
{ provide: MAT_DATETIME_FORMATS, useValue: MY_CUSTOM_FORMATS }
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
## Date Utils
|
||||
|
||||
If you need lower-level manipulations with dates, ADF provides `DateFnsUtils` that addresses various scenarios like:
|
||||
|
||||
- converting `moment.js` format tokens to `date-fns`
|
||||
- parsing dates from strings, with moment.js/date-fns formatting tokens
|
||||
- formatting dates as strings, using moment.js/date-fns formatting tokens
|
||||
- validating dates
|
||||
- converting UTC to Local datetime, or Local to UTC
|
||||
|
||||
```ts
|
||||
import { DateFnsUtils } from '@alfresco/adf-core';
|
||||
|
||||
// format using moment.js tokens
|
||||
const momentString = DateFnsUtils.formatDate(new Date(), 'll');
|
||||
|
||||
// format using date-fns tokens
|
||||
const dateFnsString = DateFnsUtils.formatDate(new Date(), 'PP');
|
||||
```
|
||||
|
||||
You can find more details on the format conversion in the DateFnsUtils [unit tests](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/core/src/lib/common/utils/date-fns-utils.spec.ts).
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
Title: Boolean pipe
|
||||
Added: v6.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-10-12
|
||||
---
|
||||
|
||||
# [Boolean pipe](../../../lib/core/src/lib/pipes/boolean.pipe.ts "Defined in boolean.pipe.ts")
|
||||
|
||||
Converts the received values to one of the possible strings: 'true', 'false' or ""(empty string).
|
||||
|
||||
## Basic Usage
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```HTML
|
||||
<div>
|
||||
Is available: {{ isAvailable | adfBoolean }}
|
||||
</div>
|
||||
```
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
## Details
|
||||
|
||||
This pipe is prepared for any input values. The value `'true'` will be returned if true (boolean) or 'true' (exact string) appears on the input. The situation is identical for the value `'false'` - it will be returned in the case of false(boolean) or 'false'. In other cases, we can expect an `empty string('')`.
|
||||
@@ -62,6 +62,12 @@ Manipulates content related to a Process Instance or Task Instance in APS.
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _opts:_ `any` - (Optional) Options supported by JS-API
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Metadata for the content
|
||||
- **getProcessesAndTasksOnContent**(sourceId: `string`, source: `string`, size?: `number`, page?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)<[`ResultListDataRepresentationRelatedProcessTask`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/ResultListDataRepresentation%C2%ABRelatedContentRepresentation%C2%BB.md)><br/>
|
||||
Lists processes and tasks on workflow started with provided document
|
||||
- _sourceId:_ `string` - id of the document that workflow or task has been started with
|
||||
- _source:_ `string` - source of the document that workflow or task has been started with
|
||||
- _size:_ `number` - size of the entries to get
|
||||
- _page:_ `number` - page number
|
||||
- **handleError**(error: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Reports an error message.
|
||||
- _error:_ `any` - Data object with optional `message` and `status` fields for the error
|
||||
@@ -377,6 +383,21 @@ this.contentService.getTaskRelatedContent(taskId).subscribe(
|
||||
|
||||
The response format is the same as for the `getProcessRelatedContent` method, see its docs.
|
||||
|
||||
#### getProcessesAndTasksOnContent(sourceId: string, source: string, size?: number, page?: number): Observable`<ResultListDataRepresentationRelatedProcessTask>`
|
||||
|
||||
Lists processes and tasks on workflow started with provided document.
|
||||
|
||||
```ts
|
||||
const sourceId = 'sourceId';
|
||||
const source = 'source';
|
||||
this.contentService.getProcessesAndTasksOnContent(sourceId, source).subscribe(
|
||||
res => {
|
||||
console.log('Response: ', res);
|
||||
}, error => {
|
||||
console.log('Error: ', error);
|
||||
});
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
## Importing
|
||||
|
||||
@@ -40,3 +40,6 @@ The pages linked below contain the licenses for all third party dependencies of
|
||||
- [ADF 6.1.0](license-info-6.1.0.md)
|
||||
- [ADF 6.2.0](license-info-6.2.0.md)
|
||||
- [ADF 6.3.0](license-info-6.3.0.md)
|
||||
- [ADF 6.4.0](license-info-6.4.0.md)
|
||||
- [ADF 6.5.0](license-info-6.5.0.md)
|
||||
- [ADF 6.5.1](license-info-6.5.1.md)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,9 @@ The first **General Availability** release was v2.0.0.
|
||||
|
||||
## General Availability
|
||||
|
||||
- [6.5.1](RelNote-6.5.1.md)
|
||||
- [6.5.0](RelNote-6.5.0.md)
|
||||
- [6.4.0](RelNote-6.4.0.md)
|
||||
- [6.3.0](RelNote-6.3.0.md)
|
||||
- [6.2.0](RelNote-6.2.0.md)
|
||||
- [6.1.0](RelNote-6.1.0.md)
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
---
|
||||
Title: Release notes v6.3.0
|
||||
---
|
||||
|
||||
# Alfresco Application Development Framework (ADF) version 6.4.0 Release Note
|
||||
|
||||
This document provides information on the Alfresco Application Development Framework **v6.4.0**.
|
||||
|
||||
You can find release artifacts on [GitHub](https://github.com/Alfresco/alfresco-ng2-components/releases/tag/6.4.0).
|
||||
|
||||
## Contents
|
||||
|
||||
- [New Package Versions](#new-package-versions)
|
||||
- [Features](#features)
|
||||
- [Changelog](#changelog)
|
||||
- [See Also](#see-also)
|
||||
|
||||
## New Package Versions
|
||||
|
||||
| Name | Version |
|
||||
|--------------------------------|---------|
|
||||
| @alfresco/js-api | 7.1.0 |
|
||||
| @alfresco/adf-content-services | 6.4.0 |
|
||||
| @alfresco/adf-process-services | 6.4.0 |
|
||||
| @alfresco/adf-core | 6.4.0 |
|
||||
| @alfresco/adf-insights | 6.4.0 |
|
||||
| @alfresco/adf-extensions | 6.4.0 |
|
||||
| @alfresco/adf-testing | 6.4.0 |
|
||||
| @alfresco/adf-cli | 6.4.0 |
|
||||
|
||||
## Features
|
||||
|
||||
The suggested stack is:
|
||||
|
||||
| Name | Version |
|
||||
|------------|---------|
|
||||
| Node | 18.x |
|
||||
| npm | 8.x |
|
||||
| Angular | 14.x |
|
||||
| Typescript | 4.7 |
|
||||
|
||||
For a complete list of changes, supported browsers and new feature please refer to the official documentation
|
||||
|
||||
## Deprecations
|
||||
|
||||
- `adfMomentDate` pipe is deprecated and no longer used by ADF components and apps
|
||||
- `adfMomentDateTime` pipe is deprecated and no longer used by ADF components and apps
|
||||
- custom `MomentDateAdapter` is deprecated and no longer used by ADF components and apps
|
||||
|
||||
## Changelog
|
||||
|
||||
- [620911cf7](git@github.com:Alfresco/alfresco-ng2-components/commit/620911cf7) Protractor cleanup for demo shell (#9019)
|
||||
- [fa7eb8722](git@github.com:Alfresco/alfresco-ng2-components/commit/fa7eb8722) fix linting for ADF (#9036)
|
||||
- [b84738324](git@github.com:Alfresco/alfresco-ng2-components/commit/b84738324) [ACS-6222] Fixed missing display name for groups (#9034)
|
||||
- [2d3175ef4](git@github.com:Alfresco/alfresco-ng2-components/commit/2d3175ef4) [ACS-6227] cleanup error handling and fix typing issues (#9035)
|
||||
- [53ad9f729](git@github.com:Alfresco/alfresco-ng2-components/commit/53ad9f729) AAE-15874 enable local development option for simpleapp (#9031)
|
||||
- [ba96ed14b](git@github.com:Alfresco/alfresco-ng2-components/commit/ba96ed14b) [ACS-6196] await-thenable rule for ESLint, fix issues (#9027)
|
||||
- [7ebdce787](git@github.com:Alfresco/alfresco-ng2-components/commit/7ebdce787) [APPS-2108] break direct dependency on moment.js (#9032)
|
||||
- [abf369bc3](git@github.com:Alfresco/alfresco-ng2-components/commit/abf369bc3) [ACS-6189] Moved date adapter from module to component (#9029)
|
||||
- [67f1a4c50](git@github.com:Alfresco/alfresco-ng2-components/commit/67f1a4c50) [ACS-6189] broken decision table dates after deprecation of moment date adapter 3 (#9026)
|
||||
- [e6bc457d2](git@github.com:Alfresco/alfresco-ng2-components/commit/e6bc457d2) [ACS-5831] Adding generic error to Library Modal. (#9025)
|
||||
- [8bd24dbb7](git@github.com:Alfresco/alfresco-ng2-components/commit/8bd24dbb7) [ACS-6190] prefer-promise-reject-errors rule and fixes (#9021)
|
||||
- [a73e72fac](git@github.com:Alfresco/alfresco-ng2-components/commit/a73e72fac) [ACS-6189] Corrected date format (#9016)
|
||||
- [f366cf7c0](git@github.com:Alfresco/alfresco-ng2-components/commit/f366cf7c0) [ACS-5645] metadata fixes for encapsulation and host classes (#9018)
|
||||
- [879c5a6d2](git@github.com:Alfresco/alfresco-ng2-components/commit/879c5a6d2) [ACS-5645] card view dateitem parse fix (#9017)
|
||||
- [36c6e6d8e](git@github.com:Alfresco/alfresco-ng2-components/commit/36c6e6d8e) [ACS-5566] - Add configurable columns to document list (#8968)
|
||||
- [3912a652d](git@github.com:Alfresco/alfresco-ng2-components/commit/3912a652d) [AAE-16369] use layout-bp mixin where applicable (#8945)
|
||||
- [f6f74f466](git@github.com:Alfresco/alfresco-ng2-components/commit/f6f74f466) [AAE-16982] Add default ui with custom theme to simpleapp (#9014)
|
||||
- [33f114767](git@github.com:Alfresco/alfresco-ng2-components/commit/33f114767) [AAE-16962] Handle number data table column type (#9013)
|
||||
- [7c4304a1e](git@github.com:Alfresco/alfresco-ng2-components/commit/7c4304a1e) Fix AAE-16968 BC (#9010)
|
||||
- [6644f539f](git@github.com:Alfresco/alfresco-ng2-components/commit/6644f539f) [AAE-16964] Handle amount data table cloumn type (#8984)
|
||||
- [962a2be69](git@github.com:Alfresco/alfresco-ng2-components/commit/962a2be69) [ACS-6126] Fixed accessibility issues (#9007)
|
||||
- [d13db2560](git@github.com:Alfresco/alfresco-ng2-components/commit/d13db2560) [ACS-6136] cleanup e2e files (protractor) (#9009)
|
||||
- [b49c86fda](git@github.com:Alfresco/alfresco-ng2-components/commit/b49c86fda) [AAE-16968] Add boolean type (#8972)
|
||||
- [cda12730f](git@github.com:Alfresco/alfresco-ng2-components/commit/cda12730f) [APPS-2255] documentation on date adapters (#9008)
|
||||
- [d500bc67d](git@github.com:Alfresco/alfresco-ng2-components/commit/d500bc67d) [ACS-5831] Added Generic Error to Library Dialog. (#9005)
|
||||
- [678df4298](git@github.com:Alfresco/alfresco-ng2-components/commit/678df4298) [APPS-2108] migrate cardview and task filters to date-fns (#9006)
|
||||
- [7d5fbecf3](git@github.com:Alfresco/alfresco-ng2-components/commit/7d5fbecf3) [APPS-2136] migrate search-datetime-range to date-fns (#9004)
|
||||
- [e6d625253](git@github.com:Alfresco/alfresco-ng2-components/commit/e6d625253) [APPS-2132] migrate components to date-fns (#9001)
|
||||
- [f7b054417](git@github.com:Alfresco/alfresco-ng2-components/commit/f7b054417) [ACS-6019] Added node-fetch to adf-cli package.json (#9003)
|
||||
- [ef285a1f1](git@github.com:Alfresco/alfresco-ng2-components/commit/ef285a1f1) [ACS-6019] [ACS-6021] [ACS-6023] Replaced request with node-fetch (#8999)
|
||||
- [82fafff11](git@github.com:Alfresco/alfresco-ng2-components/commit/82fafff11) Remove demo shell protractor TreeView e2e (#9000)
|
||||
- [462166293](git@github.com:Alfresco/alfresco-ng2-components/commit/462166293) Remove useless protractor tests (#8998)
|
||||
- [2f36da576](git@github.com:Alfresco/alfresco-ng2-components/commit/2f36da576) [APPS-2108] date-fns adapter for datetime pickers, many datetime parsing and validation fixes (#8992)
|
||||
- [c637f3eb2](git@github.com:Alfresco/alfresco-ng2-components/commit/c637f3eb2) [ACS-5611] Add the option to initially expand custom panel (#8986)
|
||||
- [96d0a617a](git@github.com:Alfresco/alfresco-ng2-components/commit/96d0a617a) [APPS-2108] migrate unit tests to date-fns (#8991)
|
||||
- [03a52dc10](git@github.com:Alfresco/alfresco-ng2-components/commit/03a52dc10) [APPS-2108] migrate form field validators to date-fns (#8988)
|
||||
- [2f28ec9b6](git@github.com:Alfresco/alfresco-ng2-components/commit/2f28ec9b6) [ACS-5877] Migrate widget-visibility service do date-fns (#8870)
|
||||
- [a86b9e625](git@github.com:Alfresco/alfresco-ng2-components/commit/a86b9e625) [APPS-2108] migrate analytics report to date-fns (#8985)
|
||||
- [f6d48cb85](git@github.com:Alfresco/alfresco-ng2-components/commit/f6d48cb85) [ACS-5348] Fixed accessibility issues for the Date facet (#8982)
|
||||
- [ce549249e](git@github.com:Alfresco/alfresco-ng2-components/commit/ce549249e) [APPS-2108] ADF date-fns adapter implementation (#8983)
|
||||
- [4cc4498b0](git@github.com:Alfresco/alfresco-ng2-components/commit/4cc4498b0) [ACS-5611] Add custom metadata side panels to metadata card component (#8974)
|
||||
- [3a374ad2a](git@github.com:Alfresco/alfresco-ng2-components/commit/3a374ad2a) [APPS-2108] migrate date widget to Angular date picker (#8975)
|
||||
- [e42e0869b](git@github.com:Alfresco/alfresco-ng2-components/commit/e42e0869b) [APPS-2108] Switch search date range to the material date adapter (#8973)
|
||||
- [93f45062f](git@github.com:Alfresco/alfresco-ng2-components/commit/93f45062f) migrate node lock dialog to date-fns (#8970)
|
||||
- [ea6575666](git@github.com:Alfresco/alfresco-ng2-components/commit/ea6575666) [APPS-2157][APPS-2158][APPS-2161][APPS-2162][APPS-2165] Migration from moment to date-fns (#8965)
|
||||
- [ecbee581a](git@github.com:Alfresco/alfresco-ng2-components/commit/ecbee581a) [APPS-2133] migration of dependency from moment to date-fns in start-task.component (#8844)
|
||||
- [93fe29503](git@github.com:Alfresco/alfresco-ng2-components/commit/93fe29503) [ACS-6002] Add permissions displaying Site Permissions outside of Sites (#8952)
|
||||
- [11b4f5186](git@github.com:Alfresco/alfresco-ng2-components/commit/11b4f5186) [AAE-16969] Remove force casting of all types to text (#8963)
|
||||
- [43242b118](git@github.com:Alfresco/alfresco-ng2-components/commit/43242b118) pre angular 15 cleanup (#8961)
|
||||
- [e638b54fc](git@github.com:Alfresco/alfresco-ng2-components/commit/e638b54fc) [MNT-23648] Clicking on Load More button no longer causes scroll position to reset to top (#8951)
|
||||
- [034e9574d](git@github.com:Alfresco/alfresco-ng2-components/commit/034e9574d) [AAE-16884] revert request removal (#8959)
|
||||
- [94baaf7d3](git@github.com:Alfresco/alfresco-ng2-components/commit/94baaf7d3) [AAE-16884] init aae script fixes (#8957)
|
||||
- [e21ad3ca0](git@github.com:Alfresco/alfresco-ng2-components/commit/e21ad3ca0) [AAE-15316] - Refactored UserInfoComponent to get typography from theme (#8937)
|
||||
- [21a029163](git@github.com:Alfresco/alfresco-ng2-components/commit/21a029163) [ACS-5878] implemented migration using the convertor approach (#8953)
|
||||
- [d72eb5ebd](git@github.com:Alfresco/alfresco-ng2-components/commit/d72eb5ebd) [ACS-6071] fix jsdoc warnings and errors (#8948)
|
||||
- [501516c8f](git@github.com:Alfresco/alfresco-ng2-components/commit/501516c8f) [ACS-6003] - waitRendition in rendition.service.ts not working (#8936)
|
||||
- [d78dcd215](git@github.com:Alfresco/alfresco-ng2-components/commit/d78dcd215) [ACS-6071] fix docs for process cloud (#8947)
|
||||
- [a48438e1c](git@github.com:Alfresco/alfresco-ng2-components/commit/a48438e1c) [ACS-5613] Renamed name to task name (#8946)
|
||||
- [b03011c3d](git@github.com:Alfresco/alfresco-ng2-components/commit/b03011c3d) [ACS-6071] documentation fixes for process lib (#8943)
|
||||
- [016e5ec08](git@github.com:Alfresco/alfresco-ng2-components/commit/016e5ec08) Revert "[AAE-16369] use layout-bp mixin where applicable" (#8944)
|
||||
- [65d70bffb](git@github.com:Alfresco/alfresco-ng2-components/commit/65d70bffb) [ACS-6071] fix JSDoc issues for Core lib (#8942)
|
||||
- [d7e0bb6cd](git@github.com:Alfresco/alfresco-ng2-components/commit/d7e0bb6cd) [AAE-16369] use layout-bp mixin where applicable (#8896)
|
||||
- [a0c79e6c6](git@github.com:Alfresco/alfresco-ng2-components/commit/a0c79e6c6) [ACS-5601] Add getProcessesAndTasksOnContent to process content service (#8940)
|
||||
- [094acf77c](git@github.com:Alfresco/alfresco-ng2-components/commit/094acf77c) [ACS-5613] process preview on popup displaying the details of selected running process on the popup (#8933)
|
||||
- [44694c0ee](git@github.com:Alfresco/alfresco-ng2-components/commit/44694c0ee) [ACS-5748] The file gets unshared when setting the past expiration date (#8876)
|
||||
- [4786a2632](git@github.com:Alfresco/alfresco-ng2-components/commit/4786a2632) Revert "[APPS-2157] [APPS-2158] [APPS-2161] [APPS-2162] [APPS-2165] migration of e2e test cases from moment to date-fns (#8864)" (#8938)
|
||||
- [8f684a9f6](git@github.com:Alfresco/alfresco-ng2-components/commit/8f684a9f6) [ACS-5987] improved security for shell scripts (#8889)
|
||||
- [83b2d9f8b](git@github.com:Alfresco/alfresco-ng2-components/commit/83b2d9f8b) [APPS-2202] Added custom utils for syncing moment and date-fns formats (#8934)
|
||||
- [0933e2dad](git@github.com:Alfresco/alfresco-ng2-components/commit/0933e2dad) [APPS-2159] [APPS-2163] Replaced from moment.js to date-fns (#8878)
|
||||
- [926347b8f](git@github.com:Alfresco/alfresco-ng2-components/commit/926347b8f) [ACS-5878] Migrated moment occurrences to date-fns equivalent in ProcessService (#8879)
|
||||
- [3638ed06e](git@github.com:Alfresco/alfresco-ng2-components/commit/3638ed06e) [APPS-2157] [APPS-2158] [APPS-2161] [APPS-2162] [APPS-2165] migration of e2e test cases from moment to date-fns (#8864)
|
||||
- [f48852075](git@github.com:Alfresco/alfresco-ng2-components/commit/f48852075) [APPS-2164] migration of dependency from moment to date-fns in task-list-properties.e2e.ts (#8873)
|
||||
- [ef551a9c7](git@github.com:Alfresco/alfresco-ng2-components/commit/ef551a9c7) Improved ESLint configuration, integrated spellcheck and error fixes (#8931)
|
||||
- [8370a3de6](git@github.com:Alfresco/alfresco-ng2-components/commit/8370a3de6) [MNT-23560] TIFF PDF Renderer Error (#8921)
|
||||
- [534583874](git@github.com:Alfresco/alfresco-ng2-components/commit/534583874) [AAE-16353] - Refactoring error component to get typography from theme (#8932)
|
||||
- [16ab6e330](git@github.com:Alfresco/alfresco-ng2-components/commit/16ab6e330) [ACS-5271] - replace deprecated 'request' library (#8916)
|
||||
|
||||
## See Also
|
||||
|
||||
- [Issue Tracker](https://github.com/Alfresco/alfresco-ng2-components/issues/new)
|
||||
- [Discussion forum](http://gitter.im/Alfresco/alfresco-ng2-components)
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
Title: Release notes v6.5.0
|
||||
---
|
||||
|
||||
# Alfresco Application Development Framework (ADF) version 6.5.0 Release Note
|
||||
|
||||
This document provides information on the Alfresco Application Development Framework **v6.5.0**.
|
||||
|
||||
You can find release artifacts on [GitHub](https://github.com/Alfresco/alfresco-ng2-components/releases/tag/6.5.0).
|
||||
|
||||
## Contents
|
||||
|
||||
- [New Package Versions](#new-package-versions)
|
||||
- [Features](#features)
|
||||
- [Changelog](#changelog)
|
||||
- [See Also](#see-also)
|
||||
|
||||
## New Package Versions
|
||||
|
||||
| Name | Version |
|
||||
|--------------------------------|---------|
|
||||
| @alfresco/js-api | 7.2.0 |
|
||||
| @alfresco/adf-content-services | 6.5.0 |
|
||||
| @alfresco/adf-process-services | 6.5.0 |
|
||||
| @alfresco/adf-core | 6.5.0 |
|
||||
| @alfresco/adf-insights | 6.5.0 |
|
||||
| @alfresco/adf-extensions | 6.5.0 |
|
||||
| @alfresco/adf-testing | 6.5.0 |
|
||||
| @alfresco/adf-cli | 6.5.0 |
|
||||
|
||||
## Features
|
||||
|
||||
The suggested stack is:
|
||||
|
||||
| Name | Version |
|
||||
|------------|---------|
|
||||
| Node | 18.x |
|
||||
| npm | 8.x |
|
||||
| Angular | 14.x |
|
||||
| Typescript | 4.7 |
|
||||
|
||||
For a complete list of changes, supported browsers and new feature please refer to the official documentation
|
||||
|
||||
## Changelog
|
||||
|
||||
- [54fa5d886](https://github.com/Alfresco/alfresco-ng2-components/commit/54fa5d886) Update init-aae-env.ts (#9073)
|
||||
- [a01a1b9e9](https://github.com/Alfresco/alfresco-ng2-components/commit/a01a1b9e9) [AAE-17804] Fix login redirection, add redirectUri from the app.config (#9066)
|
||||
- [34c82f4a4](https://github.com/Alfresco/alfresco-ng2-components/commit/34c82f4a4) [AAE-17807] fix for header background color (#9067)
|
||||
- [41a788d97](https://github.com/Alfresco/alfresco-ng2-components/commit/41a788d97) [AAE-17475] Fix process for call activities (#9068)
|
||||
- [10361b906](https://github.com/Alfresco/alfresco-ng2-components/commit/10361b906) fix broken expression code in people cloud (#9065)
|
||||
- [08da9ae2c](https://github.com/Alfresco/alfresco-ng2-components/commit/08da9ae2c) [AAE-12501] move auth in ADF (#8689)
|
||||
- [057e0bcd7](https://github.com/Alfresco/alfresco-ng2-components/commit/057e0bcd7) [AAE-17746] Remove secret from required prop from app.config.schema.json (#9063)
|
||||
- [bac7cc98e](https://github.com/Alfresco/alfresco-ng2-components/commit/bac7cc98e) [ACS-6210] - ACA column alinement shifted when we have very long file/folder name (#9060)
|
||||
- [7c127eb95](https://github.com/Alfresco/alfresco-ng2-components/commit/7c127eb95) [AAE-17669] Custom theme should use default font (#9062)
|
||||
- [fe8f4a5e7](https://github.com/Alfresco/alfresco-ng2-components/commit/fe8f4a5e7) [ACS-6251] remove dead code and imports from insights (#9059)
|
||||
- [adf5a5e00](https://github.com/Alfresco/alfresco-ng2-components/commit/adf5a5e00) [AAE-17476] update default app by missing process (#9061)
|
||||
- [a29f63cd9](https://github.com/Alfresco/alfresco-ng2-components/commit/a29f63cd9) [AAE-17551] added backgroundImage property for header (#9058)
|
||||
- [94fb61541](https://github.com/Alfresco/alfresco-ng2-components/commit/94fb61541) [ACS-5311] Notification History Bug Fix (#9011)
|
||||
- [93fd0bec6](https://github.com/Alfresco/alfresco-ng2-components/commit/93fd0bec6) [ACS-6140] reduce access to internal material classes (#9053)
|
||||
- [9278d9296](https://github.com/Alfresco/alfresco-ng2-components/commit/9278d9296) [AAE-16965] Improve data table date column (#9038)
|
||||
- [85ddcdf22](https://github.com/Alfresco/alfresco-ng2-components/commit/85ddcdf22) Fix missing primary scss variable (#9056)
|
||||
- [0b56a4858](https://github.com/Alfresco/alfresco-ng2-components/commit/0b56a4858) [AAE-16579] upgrade nrwl dep solve critical webpack loader-utils issue in develop (#9030)
|
||||
- [15f82c812](https://github.com/Alfresco/alfresco-ng2-components/commit/15f82c812) [AAE-15296] added design tokens to InfoDrawerComponent (#9051)
|
||||
- [54e95bc5f](https://github.com/Alfresco/alfresco-ng2-components/commit/54e95bc5f) [AAE-16970] Custom colors are not calculating correctly in default UI (#9054)
|
||||
- [81f0df3da](https://github.com/Alfresco/alfresco-ng2-components/commit/81f0df3da) [AAE-16995] Code refactor of LocationCellComponent (#9033)
|
||||
- [5d72597d7](https://github.com/Alfresco/alfresco-ng2-components/commit/5d72597d7) [ACS-6245] remove mat-card and internal styling from demo shell (#9050)
|
||||
|
||||
## See Also
|
||||
|
||||
- [Issue Tracker](https://github.com/Alfresco/alfresco-ng2-components/issues/new)
|
||||
- [Discussion forum](http://gitter.im/Alfresco/alfresco-ng2-components)
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
Title: Release notes v6.5.1
|
||||
---
|
||||
|
||||
# Alfresco Application Development Framework (ADF) version 6.5.1 Release Note
|
||||
|
||||
This document provides information on the Alfresco Application Development Framework **v6.5.1**.
|
||||
|
||||
You can find release artifacts on [GitHub](https://github.com/Alfresco/alfresco-ng2-components/releases/tag/6.5.1).
|
||||
|
||||
## Contents
|
||||
|
||||
- [Changelog](#changelog)
|
||||
- [See Also](#see-also)
|
||||
|
||||
## Changelog
|
||||
|
||||
- [f2df3c414](git@github.com:Alfresco/alfresco-ng2-components/commit/f2df3c414) [AAE-17909][AAE-17964] fix silent-refresh url is not set with the value - fix background image set to undefined (#9080)
|
||||
- [168bb0b6c](git@github.com:Alfresco/alfresco-ng2-components/commit/168bb0b6c) [AAE-17258] Update storybook for datatable and datacolumn (#9052)
|
||||
- [c0194029c](git@github.com:Alfresco/alfresco-ng2-components/commit/c0194029c) [AAE-17865] Remove few already covered e2es from ADF (#9078)
|
||||
- [625cf2b85](git@github.com:Alfresco/alfresco-ng2-components/commit/625cf2b85) [ADF-5561] Remove unused dep (#9064)
|
||||
- [f0a11fdab](git@github.com:Alfresco/alfresco-ng2-components/commit/f0a11fdab) [ACS-6140] migrate tests to harness (#9071)
|
||||
|
||||
## See Also
|
||||
|
||||
- [Issue Tracker](https://github.com/Alfresco/alfresco-ng2-components/issues/new)
|
||||
- [Discussion forum](http://gitter.im/Alfresco/alfresco-ng2-components)
|
||||
@@ -12,6 +12,7 @@ backend services have been tested with each released version of ADF.
|
||||
|
||||
## Versions
|
||||
|
||||
- [v6.4.0](#v640)
|
||||
- [v6.2.0](#v620)
|
||||
- [v6.1.0](#v610)
|
||||
- [v6.0.0](#v600)
|
||||
@@ -43,6 +44,14 @@ backend services have been tested with each released version of ADF.
|
||||
- [v2.1.0](#v210)
|
||||
- [v2.0.0](#v200)
|
||||
|
||||
## v6.4.0
|
||||
|
||||
<!--v640 start-->
|
||||
|
||||
- [Content Metadata Custom Panel interface](content-services/interfaces/content-metadata-custom-panel.interface.md)
|
||||
|
||||
<!--v640 end-->
|
||||
|
||||
## v6.2.0
|
||||
|
||||
<!--v620 start-->
|
||||
|
||||
@@ -37,3 +37,6 @@ The pages linked below contain the audit for all third party dependencies of ADF
|
||||
- [ADF 6.1.0](audit-info-6.1.0.md)
|
||||
- [ADF 6.2.0](audit-info-6.2.0.md)
|
||||
- [ADF 6.3.0](audit-info-6.3.0.md)
|
||||
- [ADF 6.4.0](audit-info-6.4.0.md)
|
||||
- [ADF 6.5.0](audit-info-6.5.0.md)
|
||||
- [ADF 6.5.1](audit-info-6.5.1.md)
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
Title: Audit info, alfresco-ng2-components 6.4.0
|
||||
---
|
||||
|
||||
# Audit information for alfresco-ng2-components 6.4.0
|
||||
|
||||
This page lists the security audit of the dependencies this project depends on.
|
||||
|
||||
## Risks
|
||||
|
||||
- Critical risk: 0
|
||||
- High risk: 17
|
||||
- Moderate risk: 12
|
||||
- Low risk: 0
|
||||
|
||||
Dependencies analyzed:
|
||||
|
||||
## Libraries
|
||||
|
||||
| Severity | Module | Vulnerable versions |
|
||||
| --- | --- | --- |
|
||||
|high | @mdx-js/mdx | "<=1.6.22" |
|
||||
|moderate | @storybook/builder-webpack4 | "*" |
|
||||
|high | @storybook/core-server | "<=7.0.0-rc.11" |
|
||||
|high | @storybook/csf-tools | "6.5.0-alpha.1 - 6.5.17-alpha.0" |
|
||||
|moderate | @storybook/manager-webpack4 | "*" |
|
||||
|high | @storybook/mdx1-csf | "*" |
|
||||
|moderate | autoprefixer | "1.0.20131222 - 9.8.8" |
|
||||
|high | chokidar | "1.0.0-rc1 - 2.1.8" |
|
||||
|high | cpy | "7.0.0 - 8.1.2" |
|
||||
|moderate | css-loader | "0.15.0 - 4.3.0" |
|
||||
|high | fast-glob | "<=2.2.7" |
|
||||
|high | glob-parent | "<5.1.2" |
|
||||
|high | globby | "8.0.0 - 9.2.0" |
|
||||
|moderate | icss-utils | "<=4.1.1" |
|
||||
|high | meow | "3.4.0 - 5.0.0" |
|
||||
|moderate | postcss | "<8.4.31" |
|
||||
|moderate | postcss-flexbugs-fixes | "<=4.2.1" |
|
||||
|moderate | postcss-modules-extract-imports | "<=2.0.0" |
|
||||
|moderate | postcss-modules-local-by-default | "<=4.0.0-rc.4" |
|
||||
|moderate | postcss-modules-scope | "<=2.2.0" |
|
||||
|moderate | postcss-modules-values | "<=4.0.0-rc.5" |
|
||||
|high | remark-mdx | "<=1.6.22" |
|
||||
|high | remark-parse | "<=8.0.3" |
|
||||
|moderate | semver | "7.0.0 - 7.5.1" |
|
||||
|high | trim | "<0.0.3" |
|
||||
|high | trim-newlines | "<3.0.1" |
|
||||
|high | watchpack | "1.7.2 - 1.7.5" |
|
||||
|high | watchpack-chokidar2 | "*" |
|
||||
|high | webpack | "4.44.0 - 4.47.0" |
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
Title: Audit info, alfresco-ng2-components 6.5.0
|
||||
---
|
||||
|
||||
# Audit information for alfresco-ng2-components 6.5.0
|
||||
|
||||
This page lists the security audit of the dependencies this project depends on.
|
||||
|
||||
## Risks
|
||||
|
||||
- Critical risk: 0
|
||||
- High risk: 17
|
||||
- Moderate risk: 12
|
||||
- Low risk: 0
|
||||
|
||||
Dependencies analyzed:
|
||||
|
||||
## Libraries
|
||||
|
||||
| Severity | Module | Vulnerable versions |
|
||||
| --- | --- | --- |
|
||||
|high | @mdx-js/mdx | "<=1.6.22" |
|
||||
|moderate | @storybook/builder-webpack4 | "*" |
|
||||
|high | @storybook/core-server | "<=7.0.0-rc.11" |
|
||||
|high | @storybook/csf-tools | "6.5.0-alpha.1 - 6.5.17-alpha.0" |
|
||||
|moderate | @storybook/manager-webpack4 | "*" |
|
||||
|high | @storybook/mdx1-csf | "*" |
|
||||
|moderate | autoprefixer | "1.0.20131222 - 9.8.8" |
|
||||
|high | chokidar | "1.0.0-rc1 - 2.1.8" |
|
||||
|high | cpy | "7.0.0 - 8.1.2" |
|
||||
|moderate | css-loader | "0.15.0 - 4.3.0" |
|
||||
|high | fast-glob | "<=2.2.7" |
|
||||
|high | glob-parent | "<5.1.2" |
|
||||
|high | globby | "8.0.0 - 9.2.0" |
|
||||
|moderate | icss-utils | "<=4.1.1" |
|
||||
|high | meow | "3.4.0 - 5.0.0" |
|
||||
|moderate | postcss | "<8.4.31" |
|
||||
|moderate | postcss-flexbugs-fixes | "<=4.2.1" |
|
||||
|moderate | postcss-modules-extract-imports | "<=2.0.0" |
|
||||
|moderate | postcss-modules-local-by-default | "<=4.0.0-rc.4" |
|
||||
|moderate | postcss-modules-scope | "<=2.2.0" |
|
||||
|moderate | postcss-modules-values | "<=4.0.0-rc.5" |
|
||||
|high | remark-mdx | "<=1.6.22" |
|
||||
|high | remark-parse | "<=8.0.3" |
|
||||
|moderate | semver | "7.0.0 - 7.5.1" |
|
||||
|high | trim | "<0.0.3" |
|
||||
|high | trim-newlines | "<3.0.1" |
|
||||
|high | watchpack | "1.7.2 - 1.7.5" |
|
||||
|high | watchpack-chokidar2 | "*" |
|
||||
|high | webpack | "4.44.0 - 4.47.0" |
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
Title: Audit info, alfresco-ng2-components 6.5.1
|
||||
---
|
||||
|
||||
# Audit information for alfresco-ng2-components 6.5.1
|
||||
|
||||
This page lists the security audit of the dependencies this project depends on.
|
||||
|
||||
## Risks
|
||||
|
||||
- Critical risk: 0
|
||||
- High risk: 17
|
||||
- Moderate risk: 12
|
||||
- Low risk: 0
|
||||
|
||||
Dependencies analyzed:
|
||||
|
||||
## Libraries
|
||||
|
||||
| Severity | Module | Vulnerable versions |
|
||||
| --- | --- | --- |
|
||||
|high | @mdx-js/mdx | "<=1.6.22" |
|
||||
|moderate | @storybook/builder-webpack4 | "*" |
|
||||
|high | @storybook/core-server | "<=7.0.0-rc.11" |
|
||||
|high | @storybook/csf-tools | "6.5.0-alpha.1 - 6.5.17-alpha.0" |
|
||||
|moderate | @storybook/manager-webpack4 | "*" |
|
||||
|high | @storybook/mdx1-csf | "*" |
|
||||
|moderate | autoprefixer | "1.0.20131222 - 9.8.8" |
|
||||
|high | chokidar | "1.0.0-rc1 - 2.1.8" |
|
||||
|high | cpy | "7.0.0 - 8.1.2" |
|
||||
|moderate | css-loader | "0.15.0 - 4.3.0" |
|
||||
|high | fast-glob | "<=2.2.7" |
|
||||
|high | glob-parent | "<5.1.2" |
|
||||
|high | globby | "8.0.0 - 9.2.0" |
|
||||
|moderate | icss-utils | "<=4.1.1" |
|
||||
|high | meow | "3.4.0 - 5.0.0" |
|
||||
|moderate | postcss | "<8.4.31" |
|
||||
|moderate | postcss-flexbugs-fixes | "<=4.2.1" |
|
||||
|moderate | postcss-modules-extract-imports | "<=2.0.0" |
|
||||
|moderate | postcss-modules-local-by-default | "<=4.0.0-rc.4" |
|
||||
|moderate | postcss-modules-scope | "<=2.2.0" |
|
||||
|moderate | postcss-modules-values | "<=4.0.0-rc.5" |
|
||||
|high | remark-mdx | "<=1.6.22" |
|
||||
|high | remark-parse | "<=8.0.3" |
|
||||
|moderate | semver | "7.0.0 - 7.5.1" |
|
||||
|high | trim | "<0.0.3" |
|
||||
|high | trim-newlines | "<3.0.1" |
|
||||
|high | watchpack | "1.7.2 - 1.7.5" |
|
||||
|high | watchpack-chokidar2 | "*" |
|
||||
|high | webpack | "4.44.0 - 4.47.0" |
|
||||
|
||||
|
||||
@@ -1,413 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PermissionsPage } from '../../content-services/pages/permissions.page';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import {
|
||||
createApiService,
|
||||
BrowserActions, Logger,
|
||||
LoginPage,
|
||||
PermissionActions,
|
||||
SearchService,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage,
|
||||
SnackbarPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
import { GroupsApi, NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
describe('Permissions Component', () => {
|
||||
|
||||
const apiService = createApiService();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const permissionsPage = new PermissionsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const snackbarPage = new SnackbarPage();
|
||||
const searchService = new SearchService(apiService);
|
||||
const permissionActions = new PermissionActions(apiService);
|
||||
const groupsApi = new GroupsApi(apiService.getInstance());
|
||||
|
||||
const contentList = contentServicesPage.getDocumentList();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const uploadDialog = new UploadDialogPage();
|
||||
let file;
|
||||
const fileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path
|
||||
});
|
||||
const fileLocation = browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_location;
|
||||
|
||||
const testFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const groupBody = {
|
||||
id: `GROUP_${StringUtil.generateRandomString()}`,
|
||||
displayName: StringUtil.generateRandomString()
|
||||
};
|
||||
|
||||
const fileOwnerUser = new UserModel();
|
||||
const filePermissionUser = new UserModel();
|
||||
|
||||
const roleConsumerFolderModel = new FolderModel({ name: 'roleConsumer' + StringUtil.generateRandomString() });
|
||||
const roleCoordinatorFolderModel = new FolderModel({ name: 'roleCoordinator' + StringUtil.generateRandomString() });
|
||||
const roleCollaboratorFolderModel = new FolderModel({ name: 'roleCollaborator' + StringUtil.generateRandomString() });
|
||||
const roleContributorFolderModel = new FolderModel({ name: 'roleContributor' + StringUtil.generateRandomString() });
|
||||
const roleEditorFolderModel = new FolderModel({ name: 'roleEditor' + StringUtil.generateRandomString() });
|
||||
|
||||
let roleConsumerFolder: NodeEntry;
|
||||
let roleCoordinatorFolder: NodeEntry;
|
||||
let roleContributorFolder: NodeEntry;
|
||||
let roleCollaboratorFolder: NodeEntry;
|
||||
let roleEditorFolder: NodeEntry;
|
||||
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(fileOwnerUser);
|
||||
await usersActions.createUser(filePermissionUser);
|
||||
await groupsApi.createGroup(groupBody);
|
||||
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
roleConsumerFolder = await uploadActions.createFolder(roleConsumerFolderModel.name, '-my-');
|
||||
roleCoordinatorFolder = await uploadActions.createFolder(roleCoordinatorFolderModel.name, '-my-');
|
||||
roleContributorFolder = await uploadActions.createFolder(roleContributorFolderModel.name, '-my-');
|
||||
roleCollaboratorFolder = await uploadActions.createFolder(roleCollaboratorFolderModel.name, '-my-');
|
||||
roleEditorFolder = await uploadActions.createFolder(roleEditorFolderModel.name, '-my-');
|
||||
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleConsumer' + fileModel.name, roleConsumerFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleContributor' + fileModel.name, roleContributorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCoordinator' + fileModel.name, roleCoordinatorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
|
||||
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Consumer', roleConsumerFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Collaborator', roleCollaboratorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Coordinator', roleCoordinatorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Contributor', roleContributorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Editor', roleEditorFolder);
|
||||
|
||||
// to sync user in acs
|
||||
try {
|
||||
await searchService.isUserSearchable(filePermissionUser);
|
||||
} catch (e) {
|
||||
Logger.error(`*****\n Failed to sync user \n*****`);
|
||||
}
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
} catch (e) {
|
||||
fail('Failed to set up permission : \n' + JSON.stringify(e, null, 2));
|
||||
}
|
||||
});
|
||||
|
||||
describe('Inherit and assigning permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
|
||||
await contentList.rightClickOnRow(fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkPermissionManagerDisplayed();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
} catch (error) {
|
||||
}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286272] Should be able to see results when searching for a user', async () => {
|
||||
await permissionsPage.addPermissionButton.waitVisible();
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup('a');
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C276979] Should be able to give permissions to a group of people', async () => {
|
||||
await permissionsPage.addPermissionButton.waitVisible();
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(groupBody.id);
|
||||
await permissionsPage.addPermissionsDialog.clickUserOrGroup(groupBody.displayName);
|
||||
await permissionsPage.addPermissionsDialog.selectRole(groupBody.displayName, 'Consumer');
|
||||
await expect(await permissionsPage.addPermissionsDialog.addButtonIsEnabled()).toBe(true, 'button should be enabled');
|
||||
await permissionsPage.addPermissionsDialog.clickAddButton();
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toEqual('Added 0 user(s) 1 group(s)');
|
||||
await permissionsPage.checkUserIsAdded(groupBody.id);
|
||||
});
|
||||
|
||||
it('[C277100] Should display EVERYONE group in the search result set', async () => {
|
||||
await permissionsPage.addPermissionButton.waitVisible();
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.username);
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup('somerandomtext');
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
});
|
||||
|
||||
it('should be able to toggle the inherited permission', async () => {
|
||||
await permissionsPage.checkPermissionListDisplayed();
|
||||
await expect(await permissionsPage.isInherited()).toBe(true, 'Inherited permission should be on');
|
||||
await permissionsPage.toggleInheritPermission();
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toContain('Disabled inherited permission', 'Disabled notification not shown');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await expect(await permissionsPage.isInherited()).toBe(false, 'Inherited permission should be off');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Changing and duplicate Permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
await loginPage.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentList.rightClickOnRow(fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkPermissionManagerDisplayed();
|
||||
await permissionsPage.addPermissionButton.waitVisible();
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.clickUserOrGroup(filePermissionUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.selectRole(filePermissionUser.fullName, 'Contributor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.addButtonIsEnabled()).toBe(true, 'button should be enabled');
|
||||
await permissionsPage.addPermissionsDialog.clickAddButton();
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toEqual('Added 1 user(s) 0 group(s)');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await permissionsPage.checkUserIsAdded(filePermissionUser.username);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C274691] Should be able to add a new User with permission to the file and also change locally set permissions', async () => {
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.username);
|
||||
const roleDropdownOptions = permissionsPage.addPermissionsDialog.getRoleDropdownOptions();
|
||||
await expect(await roleDropdownOptions.count()).toBe(5);
|
||||
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(0))).toBe('Contributor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(1))).toBe('Collaborator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(2))).toBe('Coordinator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(3))).toBe('Editor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(4))).toBe('Consumer');
|
||||
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Collaborator');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Collaborator');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Coordinator');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Coordinator');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Editor');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Editor');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Consumer');
|
||||
await snackbarPage.waitForSnackBarToClose();
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Consumer');
|
||||
});
|
||||
|
||||
it('[C276980] Should not be able to duplicate User or Group to the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.clickUserOrGroup(filePermissionUser.firstName);
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.fullName)).toEqual('Contributor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.addButtonIsEnabled()).toBe(false, 'button should not be enabled');
|
||||
});
|
||||
|
||||
it('[C276982] Should be able to remove User or Group from the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.clickDeletePermissionButton(filePermissionUser.username);
|
||||
await permissionsPage.checkUserIsDeleted(filePermissionUser.username);
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toEqual('User/Group deleted');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Role: Consumer, Contributor, Coordinator, Collaborator, Editor, No Permissions', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C276993] Role Consumer', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleConsumer' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleConsumer' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleConsumer' + fileModel.name);
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toEqual('You don\'t have access to do this.');
|
||||
await browser.sleep(3000);
|
||||
await contentServicesPage.uploadFile(fileLocation);
|
||||
await expect(await snackbarPage.getSnackBarMessage()).toEqual('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
|
||||
it('[C276996] Role Contributor', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleContributorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleContributor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleContributor' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleContributor' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleContributor' + fileModel.name);
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C277000] Role Editor', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleEditorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleEditor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleEditor' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleEditor' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleEditor' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle1');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle1');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(fileLocation);
|
||||
});
|
||||
|
||||
it('[C277003] Role Collaborator', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleCollaboratorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCollaborator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCollaborator' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleCollaborator' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleCollaborator' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle2');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle2');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C277004] Role Coordinator', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleCoordinatorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCoordinator' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.metadataContent('RoleCoordinator' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle3');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle3');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
await contentServicesPage.deleteContent('RoleCoordinator' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed('RoleCoordinator' + fileModel.name);
|
||||
});
|
||||
|
||||
it('[C279881] No Permission User', async () => {
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentList.rightClickOnRow('RoleConsumer' + fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkPermissionManagerDisplayed();
|
||||
await permissionsPage.errorElement.waitPresent();
|
||||
await expect(await permissionsPage.noPermissionContent()).toContain('This item no longer exists or you don\'t have permission to view it.');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,139 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TreeViewPage } from './../pages/tree-view.page';
|
||||
import { NodesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Tree View Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const treeViewPage = new TreeViewPage();
|
||||
|
||||
let acsUser: UserModel;
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
||||
let treeFolder; let secondTreeFolder; let thirdTreeFolder;
|
||||
|
||||
const nodeNames = {
|
||||
folder: 'Folder1',
|
||||
secondFolder: 'Folder2',
|
||||
thirdFolder: 'Folder3',
|
||||
parentFolder: '-my-',
|
||||
document: 'MyFile'
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
treeFolder = await nodesApi.createNode(nodeNames.parentFolder, {
|
||||
name: nodeNames.folder,
|
||||
nodeType: 'cm:folder'
|
||||
});
|
||||
secondTreeFolder = await nodesApi.createNode(nodeNames.parentFolder, {
|
||||
name: nodeNames.secondFolder,
|
||||
nodeType: 'cm:folder'
|
||||
});
|
||||
thirdTreeFolder = await nodesApi.createNode(secondTreeFolder.entry.id, {
|
||||
name: nodeNames.thirdFolder,
|
||||
nodeType: 'cm:folder'
|
||||
});
|
||||
await nodesApi.createNode(thirdTreeFolder.entry.id, {
|
||||
name: nodeNames.document,
|
||||
nodeType: 'cm:content'
|
||||
});
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.clickTreeViewButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await uploadActions.deleteFileOrFolder(treeFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(secondTreeFolder.entry.id);
|
||||
});
|
||||
|
||||
it('[C289972] Should be able to show folders and sub-folders of a node as a tree view', async () => {
|
||||
await treeViewPage.checkTreeViewTitleIsDisplayed();
|
||||
|
||||
await expect(await treeViewPage.getNodeId()).toEqual(nodeNames.parentFolder);
|
||||
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
await treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.thirdFolder);
|
||||
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsNotDisplayed(nodeNames.thirdFolder);
|
||||
});
|
||||
|
||||
it('[C289973] Should be able to change the default nodeId', async () => {
|
||||
await treeViewPage.clearNodeIdInput();
|
||||
|
||||
await treeViewPage.checkNoNodeIdMessageIsDisplayed();
|
||||
await treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
await treeViewPage.addNodeId('ThisIdDoesNotExist');
|
||||
await treeViewPage.checkErrorMessageIsDisplayed();
|
||||
|
||||
await treeViewPage.addNodeId(nodeNames.parentFolder);
|
||||
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
});
|
||||
|
||||
it('[C290071] Should not be able to display files', async () => {
|
||||
await treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
await treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
|
||||
await expect(await treeViewPage.getTotalNodes()).toEqual(1);
|
||||
});
|
||||
});
|
||||
+4
-24
@@ -16,19 +16,12 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { createApiService,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, BrowserActions, LoginPage, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { VersionManagePage } from '../pages/version-manager.page';
|
||||
import { MetadataViewPage } from '../pages/metadata-view.page';
|
||||
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
|
||||
describe('Content Services Viewer', () => {
|
||||
const acsUser = new UserModel();
|
||||
@@ -271,19 +264,6 @@ describe('Content Services Viewer', () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C291903] Should display the buttons in order in the adf viewer toolbar', async () => {
|
||||
await contentServicesPage.doubleClickRow(pdfFile.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
|
||||
await viewerPage.checkLeftSideBarIsNotDisplayed();
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
await viewerPage.enableMoreActionsMenu();
|
||||
await viewerPage.checkToolbarIsDisplayed();
|
||||
await expect(await viewerPage.getLastButtonTitle()).toEqual(await viewerPage.getMoreActionsMenuTitle());
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C260053] Should display first page, toolbar and pagination when opening a .docx file', async () => {
|
||||
await contentServicesPage.doubleClickRow(docxFile.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
@@ -318,7 +298,7 @@ describe('Content Services Viewer', () => {
|
||||
|
||||
await viewerPage.checkZoomInButtonIsNotDisplayed();
|
||||
await viewerPage.checkUnknownFormatIsDisplayed();
|
||||
await expect(await viewerPage.getUnknownFormatMessage()).toBe('Couldn\'t load preview. Unknown format.');
|
||||
await expect(await viewerPage.getUnknownFormatMessage()).toBe("Couldn't load preview. Unknown format.");
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
@@ -434,7 +414,7 @@ describe('Content Services Viewer', () => {
|
||||
await contentServicesPage.doubleClickRow(unsupportedFileName);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.checkUnknownFormatIsDisplayed();
|
||||
await expect(await viewerPage.getUnknownFormatMessage()).toBe('Couldn\'t load preview. Unknown format.');
|
||||
await expect(await viewerPage.getUnknownFormatMessage()).toBe("Couldn't load preview. Unknown format.");
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
|
||||
-20
@@ -74,26 +74,6 @@ describe('Viewer', () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C260096] Should the Viewer able to accept a customToolbar', async () => {
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
await viewerPage.checkToolbarIsDisplayed();
|
||||
await viewerPage.enableCustomToolbar();
|
||||
await viewerPage.checkCustomToolbarIsDisplayed();
|
||||
await viewerPage.disableCustomToolbar();
|
||||
});
|
||||
|
||||
it('[C260097] Should the viewer able to show a custom info-drawer when the sidebarTemplate is set', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnTab('Comments');
|
||||
await viewerPage.checkTabIsActive('Comments');
|
||||
await viewerPage.clickOnTab('Properties');
|
||||
await viewerPage.checkTabIsActive('Properties');
|
||||
await viewerPage.clickOnTab('Versions');
|
||||
await viewerPage.checkTabIsActive('Versions');
|
||||
});
|
||||
|
||||
it('[C362242] Should the Viewer be able to view a previous version of a file', async () => {
|
||||
await contentServicesPage.versionManagerContent(txtFileInfo.name);
|
||||
await versionManagePage.showNewVersionButton.click();
|
||||
@@ -18,20 +18,22 @@
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
FileBrowserUtil,
|
||||
IdentityService,
|
||||
LoginPage,
|
||||
SettingsPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList, implicitFlow true', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -54,7 +56,8 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
});
|
||||
|
||||
let pdfUploadedFile; let pngUploadedFile; let folder; let acsUser;
|
||||
let folder: NodeEntry;
|
||||
let acsUser: UserModel;
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -66,12 +69,17 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
|
||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, folder.entry.id);
|
||||
await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
||||
await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, folder.entry.id);
|
||||
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
await settingsPage.setProviderEcmSso(
|
||||
browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
browser.params.testConfig.appConfig.identityHost,
|
||||
false,
|
||||
true,
|
||||
browser.params.testConfig.appConfig.oauth2.clientId
|
||||
);
|
||||
|
||||
await loginSsoPage.loginSSOIdentityService(acsUser.username, acsUser.password);
|
||||
|
||||
@@ -86,15 +94,13 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
await identityService.deleteIdentityUser(acsUser.email);
|
||||
} catch (error) {
|
||||
}
|
||||
} catch (error) {}
|
||||
await apiService.getInstance().logout();
|
||||
await browser.executeScript('window.sessionStorage.clear();');
|
||||
await browser.executeScript('window.localStorage.clear();');
|
||||
});
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, implicit flow set', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
await contentListPage.waitForTableBody();
|
||||
@@ -131,15 +137,5 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded('archive.zip');
|
||||
});
|
||||
|
||||
it('[C291940] Should be able to view thumbnails when enabled', async () => {
|
||||
await contentServicesPage.enableThumbnails();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
const filePdfIconUrl = await contentServicesPage.getRowIconImageUrl(firstPdfFileModel.name);
|
||||
await expect(filePdfIconUrl).toContain(`/versions/1/nodes/${pdfUploadedFile.entry.id}/renditions`);
|
||||
const filePngIconUrl = await contentServicesPage.getRowIconImageUrl(pngFileModel.name);
|
||||
await expect(filePngIconUrl).toContain(`/versions/1/nodes/${pngUploadedFile.entry.id}/renditions`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import * as moment from 'moment';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
let uploadedFolder: NodeEntry;
|
||||
@@ -35,9 +35,9 @@ describe('Document List Component', () => {
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let acsUser = null;
|
||||
let testFileNode: any;
|
||||
let pdfBFileNode: any;
|
||||
let acsUser: UserModel = null;
|
||||
let testFileNode: NodeEntry;
|
||||
let pdfBFileNode: NodeEntry;
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -60,7 +60,8 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
describe('Custom Column', () => {
|
||||
let folderName;
|
||||
let folderName: string;
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_path
|
||||
@@ -78,7 +79,10 @@ describe('Document List Component', () => {
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
|
||||
});
|
||||
|
||||
let pdfUploadedNode; let docxUploadedNode; let timeAgoUploadedNode; let mediumDateUploadedNode;
|
||||
let pdfUploadedNode: NodeEntry;
|
||||
let docxUploadedNode: NodeEntry;
|
||||
let timeAgoUploadedNode: NodeEntry;
|
||||
let mediumDateUploadedNode: NodeEntry;
|
||||
|
||||
beforeAll(async () => {
|
||||
/* cspell:disable-next-line */
|
||||
@@ -119,7 +123,7 @@ describe('Document List Component', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C279926] Should only display the user\'s files and folders', async () => {
|
||||
it("[C279926] Should only display the user's files and folders", async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
@@ -146,7 +150,7 @@ describe('Document List Component', () => {
|
||||
it('[C279929] Should be able to display the date with date type', async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
|
||||
const createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
|
||||
const createdDate = format(new Date(mediumDateUploadedNode.entry.createdAt), 'PP');
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.enableMediumTimeFormat();
|
||||
const dateValue = await contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
|
||||
@@ -170,7 +174,9 @@ describe('Document List Component', () => {
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
|
||||
});
|
||||
|
||||
let fileANode; let fileBNode; let fileCNode;
|
||||
let fileANode: NodeEntry;
|
||||
let fileBNode: NodeEntry;
|
||||
let fileCNode: NodeEntry;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -228,7 +234,6 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
describe('', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
@@ -340,31 +345,4 @@ describe('Document List Component', () => {
|
||||
await contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Column Template', () => {
|
||||
const file0BytesModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path
|
||||
});
|
||||
|
||||
let file: any;
|
||||
const viewer = new ViewerPage();
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
file = await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C291843] Should be able to navigate using nodes hyperlink when activated', async () => {
|
||||
await contentServicesPage.clickHyperlinkNavigationToggle();
|
||||
await contentServicesPage.checkFileHyperlinkIsEnabled(file.entry.name);
|
||||
await contentServicesPage.clickFileHyperlink(file.entry.name);
|
||||
await viewer.checkFileIsLoaded();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let acsUser: UserModel;
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
describe('Gallery View', () => {
|
||||
const cardProperties = {
|
||||
DISPLAY_NAME: 'Display name',
|
||||
SIZE: 'Size',
|
||||
LOCK: 'Lock',
|
||||
CREATED_BY: 'Created by',
|
||||
CREATED: 'Created'
|
||||
};
|
||||
|
||||
const pdfFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_path
|
||||
});
|
||||
|
||||
const testFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
|
||||
});
|
||||
|
||||
const docxFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_path
|
||||
});
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
let filePdfNode; let fileTestNode; let fileDocxNode; let folderNode; let filePDFSubNode;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
fileTestNode = await uploadActions.uploadFile(testFile.location, testFile.name, '-my-');
|
||||
fileDocxNode = await uploadActions.uploadFile(docxFile.location, docxFile.name, '-my-');
|
||||
folderNode = await uploadActions.createFolder(folderName, '-my-');
|
||||
filePDFSubNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, folderNode.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
if (filePdfNode) {
|
||||
await uploadActions.deleteFileOrFolder(filePdfNode.entry.id);
|
||||
}
|
||||
if (fileTestNode) {
|
||||
await uploadActions.deleteFileOrFolder(fileTestNode.entry.id);
|
||||
}
|
||||
if (fileDocxNode) {
|
||||
await uploadActions.deleteFileOrFolder(fileDocxNode.entry.id);
|
||||
}
|
||||
if (filePDFSubNode) {
|
||||
await uploadActions.deleteFileOrFolder(filePDFSubNode.entry.id);
|
||||
}
|
||||
if (folderNode) {
|
||||
await uploadActions.deleteFileOrFolder(folderNode.entry.id);
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.clickGridViewButton();
|
||||
await contentServicesPage.checkCardViewContainerIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280016] Should be able to choose Gallery View', async () => {
|
||||
await expect(await contentServicesPage.getCardElementShowedInPage()).toBe(4);
|
||||
});
|
||||
|
||||
it('[C280023] Gallery Card should show details', async () => {
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(folderName)).toContain('/assets/images/ft_ic_folder.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(docxFile.name)).toContain('/assets/images/ft_ic_ms_word.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(testFile.name)).toContain('/assets/images/ft_ic_document.svg');
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(0);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(1);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(2);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(3);
|
||||
});
|
||||
|
||||
it('[C280069] Gallery Card should show attributes', async () => {
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.DISPLAY_NAME)).toBe(folderName);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED_BY)).toBe(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.DISPLAY_NAME)).toBe(pdfFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.SIZE)).toBe(`105.02 KB`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED_BY)).toBe(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.DISPLAY_NAME)).toBe(docxFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.SIZE)).toBe(`11.81 KB`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED_BY))
|
||||
.toBe(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.DISPLAY_NAME)).toBe(testFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.SIZE)).toBe(`14 Bytes`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED_BY))
|
||||
.toBe(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C261993] Should be able to sort Gallery Cards by display name', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.DISPLAY_NAME);
|
||||
await contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
});
|
||||
|
||||
it('[C261995] Should be able to sort Gallery Cards by author', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED_BY);
|
||||
await contentServicesPage.checkListIsSortedByAuthorColumn('asc');
|
||||
});
|
||||
|
||||
it('[C261996] Should be able to sort Gallery Cards by created date', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
|
||||
await contentServicesPage.checkListIsSortedByCreatedColumn('asc');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -31,7 +31,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
import { browser } from 'protractor';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
import { UploadDialogPage } from '../pages/upload-dialog.page';
|
||||
|
||||
describe('Document List - Pagination', () => {
|
||||
const pagination = {
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { createApiService, BrowserActions, ErrorPage, LoginPage, StringUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const errorPage = new ErrorPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let privateSite;
|
||||
let acsUser = null;
|
||||
|
||||
describe('Permission Message', () => {
|
||||
beforeAll(async () => {
|
||||
const siteName = `PRIVATE_TEST_SITE_${StringUtil.generateRandomString(5)}`;
|
||||
const privateSiteBody = { visibility: 'PRIVATE', title: siteName };
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
privateSite = await sitesApi.createSite(privateSiteBody);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(privateSite.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
it('[C217334] Should display a message when accessing file without permissions', async () => {
|
||||
await BrowserActions.getUrl(browser.baseUrl + '/files/' + privateSite.entry.guid);
|
||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,131 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService, LoginPage, PaginationPage, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
import { browser } from 'protractor';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
|
||||
|
||||
describe('Document List - Selection', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadDialog = new UploadDialogPage();
|
||||
const paginationPage = new PaginationPage();
|
||||
let acsUser: UserModel;
|
||||
const folderModel = new FolderModel({ name: 'folder' });
|
||||
const docxFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const displayColumnName = 'Display name';
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderModel.name);
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
} catch (error) {
|
||||
throw new Error(`API call failed in beforeAll: ${error}`);
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C274696] Should be able to select and unselect a file or folder', async () => {
|
||||
await contentServicesPage.selectRow(docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, docxFileModel.name);
|
||||
|
||||
await paginationPage.clickItemsPerPageDropdown();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, docxFileModel.name);
|
||||
|
||||
await contentServicesPage.selectRow(docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, docxFileModel.name);
|
||||
|
||||
await contentServicesPage.selectRow(folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
|
||||
await paginationPage.clickItemsPerPageDropdown();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
|
||||
await contentServicesPage.selectRow(folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, folderModel.name);
|
||||
});
|
||||
|
||||
it('[C260057] Should be able to choose between the Selection Mode options and select items accordingly', async () => {
|
||||
await contentServicesPage.chooseSelectionMode('None');
|
||||
|
||||
await contentServicesPage.selectRow(docxFileModel.name);
|
||||
await contentServicesPage.selectFolderWithCommandKey(folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, folderModel.name);
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[]');
|
||||
|
||||
await contentServicesPage.chooseSelectionMode('Single');
|
||||
|
||||
await contentServicesPage.selectRow(docxFileModel.name);
|
||||
await contentServicesPage.selectFolderWithCommandKey(folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, docxFileModel.name );
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[\"' + folderModel.name + '\"]');
|
||||
|
||||
await contentServicesPage.chooseSelectionMode('Multiple');
|
||||
|
||||
await contentServicesPage.selectRow(docxFileModel.name);
|
||||
await contentServicesPage.selectFolderWithCommandKey(folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[\"' + docxFileModel.name + '","' + folderModel.name + '\"]');
|
||||
});
|
||||
|
||||
it('[C212928] Should be able to enable the Multiselect (with checkboxes) toggle and select items accordingly', async () => {
|
||||
await contentServicesPage.chooseSelectionMode('Multiple');
|
||||
await contentServicesPage.clickMultiSelectToggle();
|
||||
await expect(await contentServicesPage.multiSelectToggleIsEnabled()).toBe(true);
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[]');
|
||||
|
||||
await contentServicesPage.selectItemWithCheckbox(docxFileModel.name);
|
||||
await contentServicesPage.selectItemWithCheckbox(folderModel.name);
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[\"' + docxFileModel.name + '","' + folderModel.name + '\"]');
|
||||
|
||||
await contentServicesPage.unSelectItemWithCheckbox(docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected(displayColumnName, docxFileModel.name );
|
||||
|
||||
await contentServicesPage.clickSelectAllCheckbox();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, docxFileModel.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected(displayColumnName, folderModel.name);
|
||||
await expect(JSON.stringify(await contentServicesPage.getItemSelected())).toEqual('[\"' + folderModel.name + '","' + docxFileModel.name + '\"]');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,92 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
||||
describe('Thumbnails and tooltips', () => {
|
||||
const pdfFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_path
|
||||
});
|
||||
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
let filePdfNode: NodeEntry;
|
||||
let folderNode: NodeEntry;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
folderNode = await uploadActions.createFolder(folderName, '-my-');
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
if (filePdfNode) {
|
||||
await uploadActions.deleteFileOrFolder(filePdfNode.entry.id);
|
||||
}
|
||||
if (folderNode) {
|
||||
await uploadActions.deleteFileOrFolder(folderNode.entry.id);
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260108] Should display tooltip for file\'s name', async () => {
|
||||
await expect(await contentServicesPage.getDocumentList().getTooltip(pdfFile.name)).toEqual(pdfFile.name);
|
||||
});
|
||||
|
||||
it('[C260109] Should display tooltip for folder\'s name', async () => {
|
||||
await expect(await contentServicesPage.getDocumentList().getTooltip(folderName)).toEqual(folderName);
|
||||
});
|
||||
|
||||
it('[C274701] Should be able to enable thumbnails', async () => {
|
||||
await contentServicesPage.enableThumbnails();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
const fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
|
||||
await expect(fileIconUrl).toContain(`/versions/1/nodes/${filePdfNode.entry.id}/renditions`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,320 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
CheckboxPage,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { CustomModelApi, NodesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Aspect oriented config', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const modelOneName = 'modelOne'; const emptyAspectName = 'emptyAspect';
|
||||
const defaultModel = 'cm'; const defaultEmptyPropertiesAspect = 'taggable'; const aspectName = 'Taggable';
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
const customModelApi = new CustomModelApi(apiService.getInstance());
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
});
|
||||
let uploadActions;
|
||||
|
||||
beforeAll(async () => {
|
||||
uploadActions = new UploadActions(apiService);
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
try {
|
||||
await customModelApi.createCustomModel('ACTIVE', modelOneName, modelOneName, modelOneName, modelOneName);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
await customModelApi.createCustomAspect(modelOneName, emptyAspectName, null, emptyAspectName, emptyAspectName);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const uploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
const aspects = await nodesApi.getNode(uploadedFile.entry.id);
|
||||
|
||||
aspects.entry.aspectNames.push(modelOneName.concat(':', emptyAspectName));
|
||||
|
||||
aspects.entry.aspectNames.push(defaultModel.concat(':', defaultEmptyPropertiesAspect));
|
||||
|
||||
await nodesApi.updateNode(uploadedFile.entry.id, { aspectNames: aspects.entry.aspectNames });
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
it('[C261117] Should be possible restrict the display properties of one an aspect', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: [
|
||||
{
|
||||
title: 'IMAGE',
|
||||
items: [
|
||||
{
|
||||
aspect: 'exif:exif',
|
||||
properties: [
|
||||
'exif:pixelXDimension',
|
||||
'exif:pixelYDimension',
|
||||
'exif:isoSpeedRatings'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}));
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('IMAGE');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:pixelXDimension', 'textitem');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:pixelYDimension', 'textitem');
|
||||
await metadataViewPage.checkPropertyIsNotVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
});
|
||||
|
||||
it('[C260185] Should ignore not existing aspect when present in the configuration', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
'exif:exif': '*',
|
||||
'cm:versionable': '*',
|
||||
'not:exists': '*'
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent('exists');
|
||||
});
|
||||
|
||||
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{}');
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C260182] Should show all the aspects if the default configuration contains the star symbol', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: '*'
|
||||
}
|
||||
}));
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C268899] Should be possible use a Translation key as Title of a metadata group', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": {' +
|
||||
' "default": [' +
|
||||
' {' +
|
||||
' "title": "GROUP-TITLE1-TRANSLATION-KEY",' +
|
||||
' "items": [' +
|
||||
' {' +
|
||||
' "aspect": "exif:exif",' +
|
||||
' "properties": "*"' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' },' +
|
||||
' {' +
|
||||
' "title": "GROUP-TITLE2-TRANSLATION-KEY",' +
|
||||
' "items": [' +
|
||||
' {' +
|
||||
' "aspect": "exif:exif",' +
|
||||
' "properties": "*"' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE1-TRANSLATION-KEY');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE2-TRANSLATION-KEY');
|
||||
|
||||
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE1-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION ONE');
|
||||
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE2-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION TWO');
|
||||
});
|
||||
|
||||
it('[C279968] Should be possible use a custom preset', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": {' +
|
||||
' "custom-preset": {' +
|
||||
' "exif:exif": "*",' +
|
||||
' "cm:versionable": "*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await CheckboxPage.check(metadataViewPage.presetSwitch);
|
||||
|
||||
await metadataViewPage.enterPresetText('custom-preset');
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C299186] The aspect without properties is not displayed', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": { "' + modelOneName +
|
||||
' ": { "' + modelOneName + ':' + emptyAspectName +
|
||||
' ":"*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent(emptyAspectName);
|
||||
});
|
||||
|
||||
it('[C299187] The aspect with empty properties is displayed when edit', async () => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": { "' + defaultModel +
|
||||
' ": { "' + defaultModel + ':' + defaultEmptyPropertiesAspect +
|
||||
' ":"*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent(aspectName);
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent(aspectName);
|
||||
});
|
||||
});
|
||||
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
BrowserActions,
|
||||
LocalStorageUtil,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
@@ -30,12 +30,11 @@ import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import * as moment from 'moment';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
describe('Metadata component', () => {
|
||||
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'll',
|
||||
DATA_FORMAT: 'PP',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
@@ -55,8 +54,6 @@ describe('Metadata component', () => {
|
||||
|
||||
let acsUser: UserModel;
|
||||
|
||||
const folderName = StringUtil.generateRandomString();
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
@@ -80,13 +77,16 @@ describe('Metadata component', () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
'exif:exif': '*'
|
||||
await LocalStorageUtil.setConfigField(
|
||||
'content-metadata',
|
||||
JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
'exif:exif': '*'
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -103,26 +103,41 @@ describe('Metadata component', () => {
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C245652] Should be possible to display a file\'s properties', async () => {
|
||||
it("[C245652] Should be possible to display a file's properties", async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await expect(await metadataViewPage.getTitle()).toEqual(METADATA.TITLE);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await metadataViewPage.getExpandedAspectName()).toEqual(METADATA.DEFAULT_ASPECT);
|
||||
await expect(await metadataViewPage.getName()).toEqual(pngFileModel.name);
|
||||
await expect(await metadataViewPage.getCreator()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
await expect(await metadataViewPage.getCreatedDate()).toEqual(moment(pngFileModel.createdAt).format(METADATA.DATA_FORMAT));
|
||||
await expect(await metadataViewPage.getModifier()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
await expect(await metadataViewPage.getModifiedDate()).toEqual(moment(pngFileModel.createdAt).format(METADATA.DATA_FORMAT));
|
||||
await expect(await metadataViewPage.getMimetypeName()).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
await expect(await metadataViewPage.getSize()).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
const title = await metadataViewPage.getTitle();
|
||||
const activeTab = await viewerPage.getActiveTab();
|
||||
const expandedAspectName = await metadataViewPage.getExpandedAspectName();
|
||||
const name = await metadataViewPage.getName();
|
||||
const creator = await metadataViewPage.getCreator();
|
||||
const createdDate = await metadataViewPage.getCreatedDate();
|
||||
const modifier = await metadataViewPage.getModifier();
|
||||
const modifiedDate = await metadataViewPage.getModifiedDate();
|
||||
const mimeTypeName = await metadataViewPage.getMimetypeName();
|
||||
const size = await metadataViewPage.getSize();
|
||||
|
||||
expect(title).toEqual(METADATA.TITLE);
|
||||
expect(activeTab).toEqual(METADATA.PROPERTY_TAB);
|
||||
expect(expandedAspectName).toEqual(METADATA.DEFAULT_ASPECT);
|
||||
expect(name).toEqual(pngFileModel.name);
|
||||
expect(creator).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(createdDate).toEqual(format(new Date(pngFileModel.createdAt), METADATA.DATA_FORMAT), pngFileModel.createdAt);
|
||||
expect(modifier).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(modifiedDate).toEqual(format(new Date(pngFileModel.createdAt), METADATA.DATA_FORMAT), pngFileModel.createdAt);
|
||||
expect(mimeTypeName).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
expect(size).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await expect(await metadataViewPage.getInformationButtonText()).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
await expect(await metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_DOWN);
|
||||
|
||||
const informationButtonText = await metadataViewPage.getInformationButtonText();
|
||||
const informationIconText = await metadataViewPage.getInformationIconText();
|
||||
|
||||
expect(informationButtonText).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
expect(informationIconText).toEqual(METADATA.ARROW_DOWN);
|
||||
});
|
||||
|
||||
it('[C272769] Should be possible to display more details when clicking on More Information button', async () => {
|
||||
@@ -131,8 +146,12 @@ describe('Metadata component', () => {
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
await expect(await metadataViewPage.getInformationButtonText()).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
await expect(await metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_UP);
|
||||
|
||||
const informationButtonText = await metadataViewPage.getInformationButtonText();
|
||||
const informationIconText = await metadataViewPage.getInformationIconText();
|
||||
|
||||
expect(informationButtonText).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
expect(informationIconText).toEqual(METADATA.ARROW_UP);
|
||||
});
|
||||
|
||||
it('[C270952] Should be possible to open/close properties using info icon', async () => {
|
||||
@@ -169,7 +188,9 @@ describe('Metadata component', () => {
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText');
|
||||
await metadataViewPage.clickResetMetadata();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(
|
||||
browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name
|
||||
);
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText.png');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
|
||||
@@ -195,7 +216,9 @@ describe('Metadata component', () => {
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(
|
||||
browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name
|
||||
);
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
});
|
||||
|
||||
@@ -224,48 +247,6 @@ describe('Metadata component', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Folder metadata', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C261157] Should be possible use the metadata component When the node is a Folder', async () => {
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(folderName);
|
||||
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C261158] Should be possible edit the metadata When the node is a Folder', async () => {
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'newnameFolder');
|
||||
await metadataViewPage.clickResetButton();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(folderName);
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'newnameFolder');
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual('newnameFolder');
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', folderName);
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(folderName);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279960] Should show the last username modifier when modify a File', async () => {
|
||||
await loginPage.loginWithProfile('admin');
|
||||
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
AddPermissionsDialogPage,
|
||||
BrowserActions,
|
||||
DataTableComponentPage,
|
||||
DropdownPage,
|
||||
TestElement
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
export class PermissionsPage {
|
||||
|
||||
dataTableComponentPage = new DataTableComponentPage();
|
||||
addPermissionsDialog = new AddPermissionsDialogPage();
|
||||
|
||||
rootElement = 'adf-permission-manager-card';
|
||||
inheritedButton = '[data-automation-id="adf-inherit-toggle-button"]';
|
||||
errorElement = TestElement.byId('adf-permission-manager-error');
|
||||
localPermissionList = TestElement.byCss('[data-automation-id="adf-locally-set-permission"]');
|
||||
addPermissionButton = TestElement.byCss('button[data-automation-id=\'adf-add-permission-button\']');
|
||||
|
||||
async changePermission(name: string, role: string): Promise<void> {
|
||||
await browser.sleep(1000);
|
||||
await this.clickRoleDropdownByUserOrGroupName(name);
|
||||
await new DropdownPage().selectOption(role);
|
||||
await this.dataTableComponentPage.checkRowByContentIsNotSelected(name);
|
||||
}
|
||||
|
||||
async checkUserIsAdded(id: string) {
|
||||
const userOrGroupName = TestElement.byCss('div[data-automation-id="' + id + '"]');
|
||||
await userOrGroupName.waitPresent();
|
||||
}
|
||||
|
||||
async getRoleCellValue(username: string): Promise<string> {
|
||||
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Users and Groups', username, 'Role');
|
||||
return BrowserActions.getText(locator);
|
||||
}
|
||||
|
||||
async clickRoleDropdownByUserOrGroupName(name: string): Promise<void> {
|
||||
const row = this.dataTableComponentPage.getRow('Users and Groups', name);
|
||||
await row.click();
|
||||
await BrowserActions.click(row.$('[id="adf-select-role-permission"] .mat-select-trigger'));
|
||||
await TestElement.byCss('.mat-select-panel').waitVisible();
|
||||
}
|
||||
|
||||
async clickDeletePermissionButton(username: string): Promise<void> {
|
||||
const userOrGroupName = TestElement.byCss(`[data-automation-id="adf-delete-permission-button-${username}"]`);
|
||||
await userOrGroupName.waitPresent();
|
||||
await userOrGroupName.click();
|
||||
}
|
||||
|
||||
async checkUserIsDeleted(username: string): Promise<void> {
|
||||
const userOrGroupName = TestElement.byCss('div[data-automation-id="' + username + '"]');
|
||||
await userOrGroupName.waitNotPresent();
|
||||
}
|
||||
|
||||
async noPermissionContent(): Promise<string> {
|
||||
const noPermission = TestElement.byCss('.adf-no-permission__template--text');
|
||||
return noPermission.getText();
|
||||
}
|
||||
|
||||
async checkPermissionManagerDisplayed(): Promise<void> {
|
||||
await TestElement.byId(this.rootElement).waitVisible();
|
||||
}
|
||||
|
||||
async checkPermissionListDisplayed(): Promise<void> {
|
||||
await browser.sleep(500);
|
||||
await this.localPermissionList.waitVisible();
|
||||
}
|
||||
|
||||
async isInherited(): Promise<boolean> {
|
||||
const inheritButton = TestElement.byCss(this.inheritedButton);
|
||||
await inheritButton.waitVisible();
|
||||
return (await inheritButton.getAttribute('class')).indexOf('mat-checked') !== -1;
|
||||
}
|
||||
|
||||
async toggleInheritPermission(): Promise<void> {
|
||||
const inheritButton = TestElement.byCss(`${this.inheritedButton} label`);
|
||||
await inheritButton.click();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user