diff --git a/.dockerignore b/.dockerignore
index daeaf46f0e..69e465f656 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -10,10 +10,7 @@ node_modules
scripts
src
lib
-integration
tools
-demo-shell/src/
-demo-shell/resources/
/angular.json
/desktop.ini
/cspell.json
@@ -21,5 +18,4 @@ demo-shell/resources/
/.stylelintignore
/ALFRESCOCORS.md
/CONTRIBUTING.md
-/appveyor.yml
/BROWSER-SUPPORT.md
diff --git a/.eslintrc.js b/.eslintrc.js
index e16fa51890..12a9ddc8a3 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -18,7 +18,7 @@ module.exports = {
{
files: ['*.ts'],
parserOptions: {
- project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'],
+ project: ['tsconfig.json'],
createDefaultProgram: true
},
extends: [
diff --git a/.github/actions/artifact-append/action.yml b/.github/actions/artifact-append/action.yml
deleted file mode 100644
index b1deec5886..0000000000
--- a/.github/actions/artifact-append/action.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-name: Append content to Artifact
-description: 'Allow the user to append content to an existing artifact'
-
-inputs:
- artifact-name:
- description: 'The name of the artifact'
- required: true
- type: string
- file-name:
- description: 'The name of the file with extension created in the artifact'
- required: true
- type: string
- content:
- description: 'The content to append'
- type: string
- default: ""
-
-runs:
- using: "composite"
-
- steps:
- - run: echo "Artifact Append"
- shell: bash
- - name: Download artifact
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- with:
- name: ${{ inputs.artifact-name }}
- pattern: ${{ inputs.artifact-name }}-*
- merge-multiple: true
- - run: ls
- shell: bash
- - name: Append content
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
- env:
- contentFile: ${{ inputs.content }}
- fileName: ${{ inputs.file-name }}
- with:
- script: |
- const fs = require('fs');
-
- const affectedLib = process.env.contentFile;
- const fileName = process.env.fileName;
- core.info(`Input Filename: ${fileName}`);
- core.info(`Input content: ${affectedLib}`);
-
- const content = read(fileName)
- core.info(`File content: ${content}`);
- appendContent(content, affectedLib);
-
- function read(filename) {
- try {
- const contentFile = fs.readFileSync(filename, 'utf8').replace('\n','');
- return contentFile;
- } catch (err) {
- core.error(err);
- }
- }
-
- function write(filename, content) {
- try {
- fs.writeFileSync(filename, content);
- } catch (err) {
- core.error(err);
- }
- }
-
- function appendContent(content, append) {
- let changedContent;
- const libs = content.split(' ');
- if (libs?.length>0) {
- if (libs.length === 1 && libs[0] === '') {
- libs[0] = append;
- changedContent = libs[0];
- }
- else if (!libs.includes(append)) {
- libs.push(append);
- changedContent = libs.join(' ');
- } else {
- core.info(`Lib ${append} already affected`);
- }
- }
- if (changedContent != undefined){
- core.info(`File content append: ${changedContent}`)
- write(fileName, changedContent);
- }
- }
- - name: Upload artifact
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- with:
- name: ${{ inputs.artifact-name }}
- path: ${{ inputs.file-name }}
-
diff --git a/.github/actions/artifact-extract/action.yml b/.github/actions/artifact-extract/action.yml
deleted file mode 100644
index 86bf761297..0000000000
--- a/.github/actions/artifact-extract/action.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Extract Artifact
-description: 'Allow the user to extract content from an artifact'
-
-inputs:
- artifact-name:
- description: 'The name of the artifact'
- required: true
- type: string
- file-name:
- description: 'The name of the file with extension created in the artifact'
- required: true
- type: string
- content:
- description: 'The init content the file should have'
- type: string
- default: ""
-
-outputs:
- result:
- description: "the value extrated from the file inside the artifact"
- value: ${{ steps.extract.outputs.result }}
-
-runs:
- using: "composite"
-
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - run: echo "Artifact Extract"
- shell: bash
- - name: Download artifact
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- with:
- name: ${{ inputs.artifact-name }}
- pattern: ${{ inputs.artifact-name }}-*
- merge-multiple: true
- - id: extract
- shell: bash
- run: |
- value=`cat ${{ inputs.file-name }}`
- echo "print $value"
- echo "result=$value" >> $GITHUB_OUTPUT
-
diff --git a/.github/actions/artifact-initialize/action.yml b/.github/actions/artifact-initialize/action.yml
deleted file mode 100644
index ef351e8f03..0000000000
--- a/.github/actions/artifact-initialize/action.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Initialize Artifact
-description: 'Allow the user to initialize an empty artifact used globally'
-
-inputs:
- artifact-name:
- description: 'The name of the artifact'
- required: true
- type: string
- file-name:
- description: 'The name of the file with extension created in the artifact'
- required: true
- type: string
- content:
- description: 'The init content the file should have'
- type: string
- default: ""
-
-runs:
- using: "composite"
-
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - name: Create empty artifact
- shell: bash
- run:
- echo "${{inputs.content}}" > ${{ inputs.file-name }}
-
- - name: Upload artifact
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- with:
- name: ${{ inputs.artifact-name }}
- path: ${{ inputs.file-name }}
diff --git a/.github/actions/e2e/action.yml b/.github/actions/e2e/action.yml
deleted file mode 100644
index c1173a07ee..0000000000
--- a/.github/actions/e2e/action.yml
+++ /dev/null
@@ -1,204 +0,0 @@
-name: "e2e"
-description: "e2e"
-inputs:
- e2e-test-id:
- description: "Test id"
- required: true
- e2e-artifact-id:
- description: "Artifact id"
- required: true
- e2e-test-folder:
- description: "Test folder"
- required: true
- e2e-test-provider:
- description: "Test provider"
- required: true
- e2e-test-auth:
- description: "Test auth"
- required: true
- output:
- description: "Output path"
- required: true
- check-cs-env:
- required: true
- description: check cs env
- default: "false"
- check-ps-env:
- required: true
- description: check ps env
- default: "false"
- check-external-cs-env:
- required: true
- description: check external cs env
- default: "false"
- check-ps-cloud-env:
- required: true
- description: check ps cloud env
- default: "false"
- e2e-tar-name: #
- description: tarball name
- required: false
- default: e2e.tar.gz
- apa-proxy: #
- description: "proxy host"
- required: true
- deps:
- description: "Library dependencies"
- required: false
- default: ""
-
-runs:
- using: "composite"
- steps:
- - name: Determine if affected
- shell: bash
- id: determine-affected
- run: |
- isAffected=false
- affectedLibs=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
- if [[ $affectedLibs =~ "${{ inputs.e2e-test-id }}" ]]; then
- isAffected=true
- fi;
- echo "Determine if ${{ inputs.e2e-test-id }} is affected: $isAffected";
- echo "isAffected=$isAffected" >> $GITHUB_OUTPUT
- - name: print value
- shell: bash
- run: |
- echo "value: ${{ steps.determine-affected.outputs.isAffected }}"
- - name: use APA as PROXY host if apa-proxy is set
- shell: bash
- run: |
- if [[ -n "${{ inputs.apa-proxy }}" ]]; then
- echo "APA proxy set."
- echo "PROXY_HOST_BPM=${E2E_HOST_APA}" >> $GITHUB_ENV
- echo "PROXY_HOST_ECM=${E2E_IDENTITY_HOST_APA}" >> $GITHUB_ENV
- echo "HOST_SSO=${E2E_IDENTITY_HOST_APA}" >> $GITHUB_ENV
- fi
-
- - name: install aws cli
- shell: bash
- run: pip install awscli
- - name: download smartrunner test results from s3 bucket if they exist
- shell: bash
- env:
- REMOTE_PATH: smart-runner/${{ github.run_id}}/${{ inputs.e2e-test-folder }}-${{ inputs.e2e-artifact-id}}/e2e.tar.gz
- run: |
- set -u;
- mkdir -p "${SMART_RUNNER_PATH}"
- if [[ $(aws s3 ls "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}" > /dev/null; echo $?) -eq 0 ]]; then
- echo "downloading test files"
- aws s3 cp "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}" .;
- tar xzf ${{ inputs.e2e-tar-name }};
- else
- echo "nothing to download";
- fi
-
- - name: check EXTERNAL-CS is UP
- shell: bash
- if: ${{ inputs.check-external-cs-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
- run: |
- echo "running: check EXTERNAL-CS is UP"
- set -u;
- ./node_modules/@alfresco/adf-cli/bin/adf-cli \
- check-cs-env \
- --host "$EXTERNAL_ACS_HOST" \
- -u "$E2E_USERNAME" \
- -p "$E2E_PASSWORD" || exit 1
-
- - name: Check CS is UP
- shell: bash
- if: ${{ inputs.check-cs-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
- run: |
- echo "Running: Check CS is UP"
- set -u;
- ./node_modules/@alfresco/adf-cli/bin/adf-cli \
- check-cs-env \
- --host "$E2E_HOST" \
- -u "$E2E_USERNAME" \
- -p "$E2E_PASSWORD" || exit 1
-
- - name: check PS is UP
- shell: bash
- if: ${{ inputs.check-ps-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
- run: |
- echo "Running: check PS is UP"
- set -u;
- ./node_modules/@alfresco/adf-cli/bin/adf-cli init-aps-env \
- --host "$E2E_HOST" \
- -u "$E2E_USERNAME" \
- -p "$E2E_PASSWORD" \
- --license "$AWS_S3_BUCKET_ACTIVITI_LICENSE" || exit 1
-
- - name: check PS-CLOUD is UP
- shell: bash
- if: ${{ inputs.check-ps-cloud-env == 'true' && steps.determine-affected.outputs.isAffected == 'true' }}
- run: |
- echo "running: check PS-CLOUD is UP"
- set -u;
- ./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env \
- --oauth "$E2E_IDENTITY_HOST_APA" \
- --host "$E2E_HOST_APA" \
- --modelerUsername "$E2E_MODELER_USERNAME" \
- --modelerPassword "$E2E_MODELER_PASSWORD" \
- --devopsUsername "$E2E_DEVOPS_USERNAME" \
- --devopsPassword "$E2E_DEVOPS_PASSWORD" \
- --clientId 'alfresco' || exit 1
-
- - name: variables sanitization
- env:
- FOLDER: "${{ inputs.e2e-test-folder }}"
- PROVIDER: "${{ inputs.e2e-test-provider }}"
- AUTH_TYPE: "${{ inputs.e2e-test-auth }}"
- E2E_TEST_ID: "${{ inputs.e2e-test-id }}"
- DEPS: "${{ inputs.deps }}"
- shell: bash
- run: |
- set -u;
- echo $PROXY_HOST_BPM
- echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
-
- - name: run test
- id: e2e_run
- if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
- env:
- FOLDER: "${{ inputs.e2e-test-folder }}"
- PROVIDER: "${{ inputs.e2e-test-provider }}"
- AUTH_TYPE: "${{ inputs.e2e-test-auth }}"
- E2E_TEST_ID: "${{ inputs.e2e-test-id }}"
- DEPS: "${{ inputs.deps }}"
- shell: bash
- run: |
- set -u;
- if [[ ${{ inputs.e2e-test-folder }} == 'content-services/upload' ]]; then
- export DISPLAY=:99
- chromedriver --url-base=/wd/hub &
- sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" "browser" || exit 1
- else
- bash ./scripts/github/e2e/e2e.sh "$E2E_TEST_ID" "$DEPS" || exit 1
- fi
- - name: Trace failing e2e
- if: ${{ steps.determine-affected.outputs.isAffected == 'true' && github.event_name == 'schedule' && failure() }}
- uses: ./.github/actions/artifact-append
- with:
- artifact-name: "global-e2e-result-${{ inputs.e2e-test-id }}"
- file-name: e2e-failures.txt
- content: "${{ inputs.e2e-test-id }}"
-
- - name: upload artifacts on gh
- id: upload_gh
- if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- with:
- name: e2e-artifact-output-${{inputs.e2e-artifact-id}}
- path: /home/runner/work/alfresco-ng2-components/alfresco-ng2-components/e2e-output-*
-
- - name: upload smart-runner tests results on s3 to cache tests
- shell: bash
- if: always()
- env:
- REMOTE_PATH: "smart-runner/${{ github.run_id}}/${{ inputs.e2e-test-folder }}-${{inputs.e2e-artifact-id}}/e2e.tar.gz"
- # description: always upload newer results
- run: |
- tar czf "${{ inputs.e2e-tar-name }}" "${SMART_RUNNER_PATH}"
- aws s3 cp "${{ inputs.e2e-tar-name }}" "s3://${S3_BUILD_BUCKET_SHORT_NAME}/adf/${REMOTE_PATH}"
diff --git a/.github/actions/setup-chrome/action.yml b/.github/actions/setup-chrome/action.yml
deleted file mode 100644
index 63fbb0947e..0000000000
--- a/.github/actions/setup-chrome/action.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-name: 'Install Google Chrome'
-description: 'Install Google Chrome'
-
-runs:
- using: "composite"
- steps:
- - name: Install google chrome
- shell: bash
- run: |
- wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.133-1_amd64.deb
- sudo apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.133-1_amd64.deb
- sudo ln -s /usr/bin/google-chrome /usr/bin/chrome
- chrome --version
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index f048fd5f85..45581a5aa4 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -30,18 +30,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/.github/actions/artifact-append"
- schedule:
- interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/.github/actions/artifact-extract"
- schedule:
- interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/.github/actions/artifact-initialize"
- schedule:
- interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/before-install"
schedule:
@@ -50,10 +38,6 @@ updates:
directory: "/.github/actions/download-node-modules-and-artifacts"
schedule:
interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/.github/actions/e2e"
- schedule:
- interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/enable-dryrun"
schedule:
@@ -78,10 +62,6 @@ updates:
directory: "/.github/actions/setup"
schedule:
interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/.github/actions/setup-chrome"
- schedule:
- interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/slack-group-area"
schedule:
diff --git a/.github/workflows/cron-e2e.yml b/.github/workflows/cron-e2e.yml
deleted file mode 100644
index 420a1579e6..0000000000
--- a/.github/workflows/cron-e2e.yml
+++ /dev/null
@@ -1,87 +0,0 @@
-name: "cron e2e daily"
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
-
-env:
- BASE_REF: ${{ github.base_ref }}
- HEAD_REF: ${{ github.head_ref }}
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- GITHUB_BRANCH: ${{ github.ref_name }}
- GH_BUILD_DIR: ${{ github.workspace }}
- GH_COMMIT: ${{ github.sha }}
- BUILD_ID: ${{ github.run_id }}
- GH_RUN_NUMBER: ${{ github.run_attempt }}
- GH_BUILD_NUMBER: ${{ github.run_id }}
- JOB_ID: ${{ github.run_id }}
- PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
- E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
- E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
- E2E_HOST: ${{ secrets.E2E_HOST }}
- E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
- E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
- URL_HOST_ADF: "http://localhost:4200"
- IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
- HOST_SSO: ${{ secrets.HOST_SSO }}
- LOG_LEVEL: "ERROR"
- E2E_LOG_LEVEL: "ERROR"
- E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
- E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
- EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
- E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
- E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
- USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
- PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
- HR_USER: ${{ secrets.HR_USER }}
- HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
- SMART_RUNNER_PATH: ".protractor-smartrunner"
- S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
- S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
- NODE_OPTIONS: "--max-old-space-size=5120"
- DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
- DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
- DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
- DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
- DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
- REPO_OWNER: "Alfresco"
- REPO_NAME: "alfresco-ng2-components"
- DEMO_SHELL_DIR: "./dist/demo-shell"
- STORYBOOK_DIR: "./dist/storybook/stories"
- BUILT_LIBS_DIR: "./dist/libs"
- NODE_MODULES_DIR: "./node_modules"
- SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
- SAVE_SCREENSHOT: true
- REDIRECT_URI: /
- BROWSER_RUN: false
- MAXINSTANCES: 2
- PLAYWRIGHT_WORKERS: 2
- PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
- PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
-
-jobs:
- init-artifact:
- runs-on: ubuntu-latest
- name: Initialize artifacts
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: ./.github/actions/artifact-initialize
- with:
- artifact-name: global-e2e-result
- file-name: e2e-failures.txt
-
- run-e2e:
- name: run e2e
- uses: ./.github/workflows/pull-request.yml
- with:
- cron-run: true
- secrets: inherit
diff --git a/.github/workflows/git-tag.yml b/.github/workflows/git-tag.yml
index 2388b7a888..f44b35a531 100644
--- a/.github/workflows/git-tag.yml
+++ b/.github/workflows/git-tag.yml
@@ -25,59 +25,22 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
- PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
- E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
- E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
- E2E_HOST: ${{ secrets.E2E_HOST }}
- E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
- E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
- URL_HOST_ADF: "http://localhost:4200"
- IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
- HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
- E2E_LOG_LEVEL: "ERROR"
- E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
- E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
- EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
- E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
- E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
- USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
- PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
- HR_USER: ${{ secrets.HR_USER }}
- HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
- SMART_RUNNER_PATH: ".protractor-smartrunner"
- S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
- DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
- DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
- SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
- SAVE_SCREENSHOT: true
REDIRECT_URI: /
- BROWSER_RUN: false
- MAXINSTANCES: 2
- PLAYWRIGHT_WORKERS: 2
- PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
- PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index a009742249..bf34939fd4 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -42,56 +42,19 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
- PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
- E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
- E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
- E2E_HOST: ${{ secrets.E2E_HOST }}
- E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
- E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
- URL_HOST_ADF: "http://localhost:4200"
- IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
- HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
- E2E_LOG_LEVEL: "ERROR"
- E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
- E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
- EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
- E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
- E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
- USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
- PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
- HR_USER: ${{ secrets.HR_USER }}
- HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
- SMART_RUNNER_PATH: ".protractor-smartrunner"
- S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
- DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
- DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
- SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
- SAVE_SCREENSHOT: true
REDIRECT_URI: /
- BROWSER_RUN: false
- MAXINSTANCES: 2
- PLAYWRIGHT_WORKERS: 2
- PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
- PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:
pre-checks:
@@ -273,198 +236,9 @@ jobs:
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- run: npx nx affected:build $NX_CALCULATION_FLAGS --prod
- - run: npx nx build demoshell --configuration production
- run: npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci --parallel=1
- uses: ./.github/actions/upload-node-modules-and-artifacts
- e2e-storybook:
- timeout-minutes: 20
- name: "e2e: storybook"
- needs: [build-libs, lint, unit-tests]
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- fetch-depth: 0 # Fetch all history for all
- - uses: ./.github/actions/setup
- - uses: ./.github/actions/download-node-modules-and-artifacts
- - name: Process Cloud Storybook Playwright
- run: |
- npx playwright install chromium
- sudo sysctl -w fs.inotify.max_user_watches=524288
- npx nx affected --target=e2e-playwright $NX_CALCULATION_FLAGS || exit 1
- - uses: ./.github/actions/upload-node-modules-and-artifacts
-
- e2e:
- timeout-minutes: 90
- name: "e2e: ${{ matrix.e2e-test.description }}"
- needs: [build-libs, lint, unit-tests]
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- # max-parallel: 4
- matrix:
- e2e-test:
- - description: "Core"
- test-id: "core"
- artifact-id: "core"
- folder: "core"
- provider: "ALL"
- auth: "OAUTH"
- check-cs-env: "true"
- check-ps-env: "true"
- deps: "testing"
- - description: "Content: Components"
- test-id: "content-services"
- artifact-id: "content-services-components"
- folder: "content-services/components"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Content: Directives"
- test-id: "content-services"
- artifact-id: "content-services-directives"
- folder: "content-services/directives"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Content: Document List"
- test-id: "content-services"
- artifact-id: "content-services-document-list"
- folder: "content-services/document-list"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Content: Metadata"
- test-id: "content-services"
- artifact-id: "content-services-metadata"
- folder: "content-services/metadata"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Content: Upload and Versioning"
- test-id: "content-services"
- artifact-id: "content-services-upload"
- folder: "content-services/upload"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Search"
- test-id: "content-services"
- artifact-id: "content-services-search"
- folder: "search"
- provider: "ECM"
- auth: "BASIC"
- check-cs-env: "true"
- deps: "testing"
- - description: "Process: Form"
- test-id: "process-services"
- artifact-id: "process-services-form"
- folder: "process-services/form"
- provider: "BPM"
- auth: "OAUTH"
- check-ps-env: "true"
- check-external-cs-env: "true"
- deps: "testing"
- - description: "Process: Process"
- test-id: "process-services"
- artifact-id: "process-services-process"
- folder: "process-services/process"
- provider: "BPM"
- auth: "OAUTH"
- check-ps-env: "true"
- check-external-cs-env: "true"
- deps: "testing"
- - description: "Process: Tasks"
- test-id: "process-services"
- artifact-id: "process-services-tasks"
- folder: "process-services/tasks"
- provider: "BPM"
- auth: "OAUTH"
- check-ps-env: "true"
- check-external-cs-env: "true"
- deps: "testing"
- - description: "Process: Widget"
- test-id: "process-services"
- artifact-id: "process-services-widgets"
- folder: "process-services/widgets"
- provider: "BPM"
- auth: "OAUTH"
- check-ps-env: "true"
- check-external-cs-env: "true"
- deps: "testing"
- - description: "Process Cloud: Form"
- test-id: "process-services-cloud"
- artifact-id: "process-services-cloud-form-field"
- folder: "process-services-cloud/form-field"
- 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"
- artifact-id: "process-services-cloud-process"
- folder: "process-services-cloud/process"
- provider: "ALL"
- auth: "OAUTH"
- apa-proxy: true
- check-cs-env: "true"
- check-ps-cloud-env: "true"
- deps: "testing"
- - description: "Process Cloud: Start Task"
- test-id: "process-services-cloud"
- artifact-id: "process-services-cloud-start-task"
- folder: "process-services-cloud/start-task"
- provider: "ALL"
- auth: "OAUTH"
- apa-proxy: true
- check-cs-env: "true"
- check-ps-cloud-env: "true"
- deps: "testing"
- - description: "Process Cloud: Tasks List"
- test-id: "process-services-cloud"
- artifact-id: "process-services-cloud-task-list"
- folder: "process-services-cloud/task-list"
- provider: "ALL"
- auth: "OAUTH"
- apa-proxy: true
- check-cs-env: "true"
- check-ps-cloud-env: "true"
- deps: "testing"
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- fetch-depth: 0 # Fetch all history for all
- - uses: ./.github/actions/setup
- with:
- enable-cache: "true"
- enable-node-modules-cache: "true"
- - uses: ./.github/actions/download-node-modules-and-artifacts
- - name: e2e
- uses: ./.github/actions/e2e
- with:
- e2e-test-id: ${{ matrix.e2e-test.test-id }}
- e2e-test-folder: ${{ matrix.e2e-test.folder }}
- e2e-artifact-id: ${{matrix.e2e-test.artifact-id}}
- e2e-test-provider: ${{ matrix.e2e-test.provider }}
- e2e-test-auth: ${{ matrix.e2e-test.auth }}
- check-cs-env: ${{ matrix.e2e-test.check-cs-env }}
- check-ps-env: ${{ matrix.e2e-test.check-ps-env }}
- check-ps-cloud-env: ${{ matrix.e2e-test.check-ps-cloud-env }}
- check-external-cs-env: ${{ matrix.e2e-test.check-external-cs-env }}
- apa-proxy: ${{ matrix.e2e-test.apa-proxy }}
- deps: ${{ matrix.e2e-test.deps }}
-
PR-forbidden-labels:
if: ${{ inputs.cron-run == '' || inputs.cron-run == 'false' }}
runs-on: ubuntu-latest
@@ -496,7 +270,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
- needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
+ needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: identify-slack-group
diff --git a/.github/workflows/release-branch.yml b/.github/workflows/release-branch.yml
index 26fbcc5300..e57a5ec4e8 100644
--- a/.github/workflows/release-branch.yml
+++ b/.github/workflows/release-branch.yml
@@ -22,57 +22,20 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
- PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
- E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
- E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
- E2E_HOST: ${{ secrets.E2E_HOST }}
- E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
- E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- #USERNAME_ADF: ${{ secrets.E2E_USERNAME }}
- USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
- URL_HOST_ADF: "http://localhost:4200"
- IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
- HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
- E2E_LOG_LEVEL: "ERROR"
- E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
- E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
- EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
- E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
- E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
- USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
- PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
- HR_USER: ${{ secrets.HR_USER }}
- HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
- SMART_RUNNER_PATH: ".protractor-smartrunner"
- S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
- DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
- DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
- SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
- SAVE_SCREENSHOT: true
REDIRECT_URI: /
- BROWSER_RUN: false
- MAXINSTANCES: 2
- PLAYWRIGHT_WORKERS: 2
- PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
jobs:
setup:
@@ -135,7 +98,7 @@ jobs:
setMigrations();
- name: Build libraries
run: |
- npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
+ npx nx affected:build $NX_CALCULATION_FLAGS --prod --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 598f55b1d0..9a829ba8f4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -32,57 +32,22 @@ env:
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
- PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
- E2E_IDENTITY_HOST_APA: ${{ secrets.E2E_IDENTITY_HOST_APA }}
- E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
- E2E_HOST: ${{ secrets.E2E_HOST }}
- E2E_USERNAME: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- #USERNAME_ADF: ${{ secrets.E2E_USERNAME }}
- USERNAME_ADF: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- PASSWORD_ADF: ${{ secrets.E2E_PASSWORD }}
- URL_HOST_ADF: "http://localhost:4200"
- IDENTITY_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
- IDENTITY_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
- AWS_S3_BUCKET_ACTIVITI_LICENSE: ${{ secrets.AWS_S3_BUCKET_ACTIVITI_LICENSE }}
- HOST_SSO: ${{ secrets.HOST_SSO }}
LOG_LEVEL: "ERROR"
- E2E_LOG_LEVEL: "ERROR"
- E2E_MODELER_USERNAME: ${{ secrets.E2E_MODELER_USERNAME }}
- E2E_MODELER_PASSWORD: ${{ secrets.E2E_MODELER_PASSWORD }}
- EXTERNAL_ACS_HOST: ${{ secrets.EXTERNAL_ACS_HOST }}
- E2E_DEVOPS_USERNAME: ${{ secrets.E2E_DEVOPS_USERNAME }}
- E2E_DEVOPS_PASSWORD: ${{ secrets.E2E_DEVOPS_PASSWORD }}
- USERNAME_SUPER_ADMIN_ADF: ${{ secrets.USERNAME_SUPER_ADMIN_ADF }}
- PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
- HR_USER: ${{ secrets.HR_USER }}
- HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
- SMART_RUNNER_PATH: ".protractor-smartrunner"
- S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
- DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
- DEMO_SHELL_DIR: "./dist/demo-shell"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
- SMART_RUNNER_DIRECTORY: ".protractor-smartrunner"
- SAVE_SCREENSHOT: true
REDIRECT_URI: /
- BROWSER_RUN: false
- MAXINSTANCES: 2
- PLAYWRIGHT_WORKERS: 2
- PLAYWRIGHT_STORYBOOK_E2E_HOST: http://localhost
- PLAYWRIGHT_STORYBOOK_E2E_PORT: 4400
jobs:
setup:
@@ -107,32 +72,6 @@ jobs:
npx nx run testing:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
- release-demoshell:
- needs: [setup]
- timeout-minutes: 15
- if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- fetch-depth: 1
- - run: git fetch --all
- - id: set-dryrun
- uses: ./.github/actions/enable-dryrun
- with:
- dry-run-flag: ${{ inputs.dry-run-flag }}
- - uses: ./.github/actions/setup
- with:
- enable-cache: false
- enable-node-modules-cache: false
- - uses: ./.github/actions/download-node-modules-and-artifacts
- - name: release Demoshell docker
- run: |
- npx nx build demoshell --configuration production
- . ./scripts/github/release/docker-tag.sh
- ./scripts/github/release/release-demoshell-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
-
release-storybook:
needs: [setup]
timeout-minutes: 15
@@ -194,7 +133,7 @@ jobs:
setMigrations();
- name: build libraries
run: |
- npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
+ npx nx affected:build $NX_CALCULATION_FLAGS --prod --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -250,7 +189,7 @@ jobs:
if: always()
runs-on: ubuntu-latest
name: Final Results
- needs: [release-demoshell, release-storybook, release-npm, npm-check-bundle]
+ needs: [release-storybook, release-npm, npm-check-bundle]
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
diff --git a/.gitignore b/.gitignore
index 1a0976ffb6..5cb5b1cab2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,22 +13,17 @@ e2e/.env.cloud
tmp
temp
/nxcache
-e2e-output*/
-/e2e/downloads/
*.npmrc
.history
/ng2-components/ng2-alfresco-core/prebuilt-themes/
.ng_pkg_build/
-/demo-shell/dist-dev-temp/
/lib/export-new.json
/lib/config/exportCheck.js
/docs/sourceinfo
/docs/docs.json
-/protractorFailuresReport
coverage/
/desktop.ini
out-tsc
-!/.protractor-smartrunner/
/reports/
e2e-result-*
licenses.txt
diff --git a/.storybook/main.js b/.storybook/main.js
index 9d8a8ebcd9..c15bf0cfa3 100644
--- a/.storybook/main.js
+++ b/.storybook/main.js
@@ -3,7 +3,7 @@ module.exports = {
name: '@storybook/angular',
options: {}
},
- staticDirs: [{ from: '../../../demo-shell/src/app.config.json', to: 'app.config.json' }],
+ staticDirs: [],
docs: {},
stories: [],
addons: []
diff --git a/Dockerfile b/Dockerfile
index fbb75ead2b..47bb8a0909 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,6 @@ USER 101
ARG PROJECT_NAME
COPY docker/default.conf.template /etc/nginx/templates/
-COPY docker/docker-entrypoint.d/* /docker-entrypoint.d/
COPY dist/$PROJECT_NAME /usr/share/nginx/html/
COPY dist/$PROJECT_NAME/app.config.json /etc/nginx/templates/app.config.json.template
diff --git a/README.md b/README.md
index ad4ef99e67..e2360baaf0 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,7 @@ You can find the sources for all ADF components in the [`lib`](/lib) folder.
## Libraries
ADF Libraries list:
+
- [Content services](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/content-services)
- [Core](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/core)
- [Extensions](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/extensions)
@@ -36,24 +37,13 @@ ADF Libraries list:
- [Process service](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/process-services)
- [Stories](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/stories)
-## Demo Application
-
-A separate application showcasing integration of components can be found
-[here](https://github.com/Alfresco/alfresco-ng2-components/tree/master/demo-shell).
-The app has examples of basic interaction for both APS and ACS components.
-
-## Application generator for Yeoman
-
-To speed up the development, you can use the
-[Generator for Yeoman](https://github.com/Alfresco/generator-ng2-alfresco-app).
-
## Browser Support
All components are supported in the following browsers:
-|**Browser** |**Version** |
-|--- |--- |
-| Chrome | Latest |
-| Safari | Latest |
-| Firefox | Latest |
-| Edge | Latest |
+| **Browser** | **Version** |
+|-------------|-------------|
+| Chrome | Latest |
+| Safari | Latest |
+| Firefox | Latest |
+| Edge | Latest |
diff --git a/decorate-angular-cli.js b/decorate-angular-cli.js
deleted file mode 100644
index fb041d72fc..0000000000
--- a/decorate-angular-cli.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching
- * and faster execution of tasks.
- *
- * It does this by:
- *
- * - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command.
- * - Symlinking the ng to nx command, so all commands run through the Nx CLI
- * - Updating the package.json postinstall script to give you control over this script
- *
- * The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it.
- * Every command you run should work the same when using the Nx CLI, except faster.
- *
- * Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case,
- * will point to nx, which will perform optimizations before invoking ng. So the Angular CLI is always invoked.
- * The Nx CLI simply does some optimizations before invoking the Angular CLI.
- *
- * To opt out of this patch:
- * - Replace occurrences of nx with ng in your package.json
- * - Remove the script from your postinstall script in your package.json
- * - Delete and reinstall your node_modules
- */
-
-const fs = require("fs");
-const os = require("os");
-const cp = require("child_process");
-const isWindows = os.platform() === "win32";
-const output = require('nx/src/utils/output').output;
-
-/**
- * Paths to files being patched
- */
-const angularCLIInitPath = "node_modules/@angular/cli/lib/cli/index.js";
-
-/**
- * Patch index.js to warn you if you invoke the undecorated Angular CLI.
- */
-function patchAngularCLI(initPath) {
- const angularCLIInit = fs.readFileSync(initPath, "utf-8").toString();
-
- if (!angularCLIInit.includes("NX_CLI_SET")) {
- fs.writeFileSync(
- initPath,
- `
-if (!process.env['NX_CLI_SET']) {
- const { output } = require('@nrwl/workspace');
- output.warn({ title: 'The Angular CLI was invoked instead of the Nx CLI. Use "npx ng [command]" or "nx [command]" instead.' });
-}
-${angularCLIInit}
- `
- );
- }
-}
-
-/**
- * Symlink of ng to nx, so you can keep using `ng build/test/lint` and still
- * invoke the Nx CLI and get the benefits of computation caching.
- */
-function symlinkNgCLItoNxCLI() {
- try {
- const ngPath = "./node_modules/.bin/ng";
- const nxPath = "./node_modules/.bin/nx";
- if (isWindows) {
- /**
- * This is the most reliable way to create symlink-like behavior on Windows.
- * Such that it works in all shells and works with npx.
- */
- ["", ".cmd", ".ps1"].forEach(ext => {
- fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
- });
- } else {
- // If unix-based, symlink
- cp.execSync(`ln -sf ./nx ${ngPath}`);
- }
- } catch (e) {
- output.error({
- title:
- "Unable to create a symlink from the Angular CLI to the Nx CLI:" +
- e.message
- });
- throw e;
- }
-}
-
-try {
- symlinkNgCLItoNxCLI();
- patchAngularCLI(angularCLIInitPath);
- output.log({
- title: "Angular CLI has been decorated to enable computation caching."
- });
-} catch (e) {
- output.error({
- title: "Decoration of the Angular CLI did not complete successfully"
- });
-}
diff --git a/demo-shell/.eslintrc.js b/demo-shell/.eslintrc.js
deleted file mode 100644
index 52295dfebb..0000000000
--- a/demo-shell/.eslintrc.js
+++ /dev/null
@@ -1,73 +0,0 @@
-path = require('path');
-module.exports = {
- extends: '../.eslintrc.js',
- ignorePatterns: ['!**/*'],
- overrides: [
- {
- files: ['*.ts'],
- parserOptions: {
- project: [
- path.join(__dirname, 'tsconfig.app.json'),
- path.join(__dirname, 'src/tsconfig.spec.json'),
- path.join(__dirname, 'e2e/tsconfig.e2e.json')
- ],
- createDefaultProgram: true
- },
- plugins: ['eslint-plugin-unicorn', 'eslint-plugin-rxjs'],
- rules: {
- '@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/no-inferrable-types': 'off',
- '@typescript-eslint/no-require-imports': 'off',
- '@typescript-eslint/no-var-requires': 'error',
- 'comma-dangle': 'error',
- 'default-case': 'error',
- 'import/order': 'off',
- 'max-len': [
- 'error',
- {
- code: 240
- }
- ],
- 'no-bitwise': 'off',
- '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'
- }
- },
- {
- files: ['*.html'],
- rules: {}
- }
- ]
-};
diff --git a/demo-shell/.gitignore b/demo-shell/.gitignore
deleted file mode 100644
index c443b0d0e1..0000000000
--- a/demo-shell/.gitignore
+++ /dev/null
@@ -1,59 +0,0 @@
-# See http://help.github.com/ignore-files/ for more about ignoring files.
-
-# compiled output
-/dist
-/tmp
-/out-tsc
-
-# dependencies
-/node_modules
-
-# IDEs and editors
-/.idea
-.project
-.classpath
-.c9/
-*.launch
-.settings/
-*.sublime-workspace
-
-# IDE - VSCode
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-
-# misc
-/.sass-cache
-/connect.lock
-/coverage
-/libpeerconnection.log
-npm-debug.log
-testem.log
-/typings
-
-# e2e
-/e2e/*.js
-/e2e/*.map
-
-
-# System Files
-.DS_Store
-Thumbs.db
-
-typings/
-node_modules/
-bower_components/
-lib/
-app/**/*.js
-app/**/*.js.map
-app/**/*.d.ts
-
-!app/js/Polyline.js
-.idea
-
-
-dist/
-coverage/
-!/e2e/protractor.conf.js
diff --git a/demo-shell/README.md b/demo-shell/README.md
deleted file mode 100644
index e35f891389..0000000000
--- a/demo-shell/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-
-# ADF Demo Application
-
-Please note that this application is not an official product, but a testing and demo application to showcase complex interactions of ADF components.
-
-## Installing
-
-To correctly use this demo check that on your machine you have [Node](https://nodejs.org/en/) version 5.x.x or higher.
-
-```sh
-git clone https://github.com/Alfresco/alfresco-ng2-components.git
-cd alfresco-ng2-components
-npm install
-npm start
-```
-
-## Proxy settings and CORS
-
-To simplify development and reduce the time to get the application started, we have the following Proxy settings:
-
-- **http://localhost:3000/ecm** is mapped to **http://localhost:8080**
-- **http://localhost:3000/bpm** is mapped to **http://localhost:9999**
-
-The settings above address most common scenarios for running ACS on port 8080 and APS on port 9999 and allow you to skip the CORS configuration.
-
-If you would like to change default proxy settings, please edit the `proxy.conf.js` file.
-
-## Application settings (server-side)
-
-All server-side application settings are stored in the [src/app.config.json](src/app.config.json).
-By default the configuration files have the content similar to the following one:
-
-```json
-{
- "$schema": "../../lib/core/app-config/schema.json",
- "ecmHost": "http://{hostname}:{port}",
- "bpmHost": "http://{hostname}:{port}",
- "application": {
- "name": "Alfresco ADF Application"
- }
-}
-```
-
-## Development build
-
-```sh
-npm start
-```
-
-This command compiles and starts the project in watch mode.
-Browser will automatically reload upon changes.
-Upon start, you can navigate to `http://localhost:3000` with your preferred browser.
-
-### Important notes
-
-This script is recommended for development environment and not suited for headless servers and network access.
-
-## Production build
-
-```sh
-npm run build
-npm run start:prod
-```
-
-This command builds project in `production` mode.
-All output is placed to `dist` folder and can be served to your preferred web server.
-You should need no additional files outside the `dist` folder.
-
-## Development branch build
-
-If you want to run the demo shell with the latest changes from the development branch, use the following command :
-
-```sh
-npm run start
-```
diff --git a/demo-shell/karma.conf.js b/demo-shell/karma.conf.js
deleted file mode 100644
index 87c6049f60..0000000000
--- a/demo-shell/karma.conf.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// Karma configuration file, see link for more information
-// https://karma-runner.github.io/0.13/config/configuration-file.html
-process.env.CHROME_BIN = require('puppeteer').executablePath();
-
-module.exports = function (config) {
- config.set({
- basePath: './',
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
- plugins: [
- require('karma-jasmine'),
- require('karma-chrome-launcher'),
- require('karma-jasmine-html-reporter'),
- require('karma-coverage-istanbul-reporter'),
- require('@angular-devkit/build-angular/plugins/karma'),
- require('karma-mocha-reporter')
- ],
- client: {
- clearContext: false // leave Jasmine Spec Runner output visible in browser
- },
- files: [],
- preprocessors: {},
- mime: {
- 'text/x-typescript': ['ts', 'tsx']
- },
- coverageIstanbulReporter: {
- dir: require('path').join(__dirname, 'coverage'), reports: ['html', 'lcovonly'],
- fixWebpackSourcePaths: true
- },
-
- customLaunchers: {
- ChromeHeadless: {
- base: 'Chrome',
- flags: [
- '--no-sandbox',
- '--headless',
- '--disable-gpu',
- '--remote-debugging-port=9222'
- ]
- }
- },
-
- captureTimeout: 180000,
- browserDisconnectTimeout: 180000,
- browserDisconnectTolerance: 3,
- browserNoActivityTimeout: 300000,
-
- reporters: ['mocha', 'kjhtml'],
-
- port: 9876,
- colors: true,
- logLevel: config.LOG_INFO,
- autoWatch: true,
- browsers: ['ChromeHeadless'],
- singleRun: false
- });
-};
diff --git a/demo-shell/package.json b/demo-shell/package.json
deleted file mode 100644
index 83bb4c455a..0000000000
--- a/demo-shell/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "Alfresco-ADF-Angular-Demo",
- "description": "Demo shell for Alfresco Angular components",
- "version": "7.0.0-alpha.2",
- "author": "Hyland Software, Inc. and its affiliates",
- "repository": {
- "type": "git",
- "url": "https://github.com/Alfresco/alfresco-ng2-components.git"
- },
- "bugs": {
- "url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
- },
- "license": "Apache-2.0",
- "keywords": [
- "ng2",
- "angular",
- "angular2",
- "alfresco"
- ],
- "private": true
-}
diff --git a/demo-shell/project.json b/demo-shell/project.json
deleted file mode 100644
index f3b5ad833c..0000000000
--- a/demo-shell/project.json
+++ /dev/null
@@ -1,201 +0,0 @@
-{
- "name": "demoshell",
- "$schema": "../node_modules/nx/schemas/project-schema.json",
- "sourceRoot": "demo-shell/src",
- "projectType": "application",
- "targets": {
- "build": {
- "executor": "@angular-devkit/build-angular:browser",
- "options": {
- "allowedCommonJsDependencies": [
- "minimatch",
- "minimatch-browser",
- "superagent",
- "event-emitter",
- "brace-expansion",
- "zen-observable",
- "subscriptions-transport-ws",
- "d",
- "chart.js",
- "cropperjs"
- ],
- "outputPath": "dist/demo-shell",
- "index": "demo-shell/src/index.html",
- "main": "demo-shell/src/main.ts",
- "tsConfig": "tsconfig.dev.json",
- "polyfills": "demo-shell/src/polyfills.ts",
- "stylePreprocessorOptions": {
- "includePaths": ["lib", "lib/core/src/lib"]
- },
- "assets": [
- "demo-shell/src/assets",
- "demo-shell/src/favicon-96x96.png",
- "demo-shell/src/app.config.json",
- {
- "glob": "**/*",
- "input": "demo-shell/src/assets",
- "output": "/assets"
- },
- {
- "glob": "app.config.json",
- "input": "demo-shell/src",
- "output": "/"
- },
- {
- "glob": "**/*",
- "input": "demo-shell/resources",
- "output": "/resources"
- },
- {
- "glob": "**/*",
- "input": "lib/core/src/lib/assets",
- "output": "/assets"
- },
- {
- "glob": "**/*",
- "input": "lib/process-services/src/lib/assets",
- "output": "/assets"
- },
- {
- "glob": "**/*",
- "input": "lib/process-services-cloud/src/lib/assets",
- "output": "/assets"
- },
- {
- "glob": "**/*",
- "input": "lib/content-services/src/lib/assets",
- "output": "/assets"
- },
- {
- "glob": "**/*",
- "input": "lib/core/src/lib/i18n",
- "output": "/assets/adf-core/i18n"
- },
- {
- "glob": "**/*",
- "input": "lib/content-services/src/lib/i18n",
- "output": "/assets/adf-content-services/i18n"
- },
- {
- "glob": "**/*",
- "input": "lib/process-services/src/lib/i18n",
- "output": "/assets/adf-process-services/i18n"
- },
- {
- "glob": "**/*",
- "input": "lib/process-services-cloud/src/lib/i18n",
- "output": "/assets/adf-process-services-cloud/i18n"
- },
- {
- "glob": "**/*",
- "input": "lib/insights/src/lib/i18n",
- "output": "/assets/adf-insights/i18n"
- },
- {
- "glob": "pdf.worker.min.js",
- "input": "node_modules/pdfjs-dist/build",
- "output": "/"
- },
- {
- "glob": "**/*",
- "input": "node_modules/monaco-editor",
- "output": "/assets/monaco/"
- }
- ],
- "styles": [
- "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"
- ],
- "scripts": ["node_modules/pdfjs-dist/build/pdf.js", "node_modules/pdfjs-dist/web/pdf_viewer.js", "node_modules/raphael/raphael.min.js"],
- "vendorChunk": true,
- "extractLicenses": false,
- "buildOptimizer": false,
- "sourceMap": true,
- "optimization": false,
- "namedChunks": true
- },
- "configurations": {
- "production": {
- "budgets": [
- {
- "type": "anyComponentStyle",
- "maximumWarning": "12kb"
- }
- ],
- "optimization": true,
- "outputHashing": "all",
- "sourceMap": false,
- "namedChunks": false,
- "extractLicenses": true,
- "buildOptimizer": true,
- "verbose": false,
- "fileReplacements": [
- {
- "replace": "demo-shell/src/environments/environment.ts",
- "with": "demo-shell/src/environments/environment.prod.ts"
- }
- ]
- },
- "canary": {
- "fileReplacements": [
- {
- "replace": "demo-shell/src/environments/environment.ts",
- "with": "demo-shell/src/environments/environment.canary.ts"
- }
- ]
- },
- "e2e": {
- "budgets": [
- {
- "type": "anyComponentStyle",
- "maximumWarning": "6kb"
- }
- ],
- "optimization": true,
- "outputHashing": "all",
- "sourceMap": false,
- "namedChunks": false,
- "extractLicenses": true,
- "buildOptimizer": true,
- "verbose": false,
- "fileReplacements": [
- {
- "replace": "demo-shell/src/environments/environment.ts",
- "with": "demo-shell/src/environments/environment.e2e.ts"
- }
- ]
- }
- },
- "defaultConfiguration": ""
- },
- "serve": {
- "executor": "@angular-devkit/build-angular:dev-server",
- "options": {
- "browserTarget": "demoshell:build",
- "host": "0.0.0.0",
- "port": 3000,
- "proxyConfig": "demo-shell/proxy.conf.js",
- "disableHostCheck": true
- },
- "configurations": {
- "production": {
- "browserTarget": "demoshell:build:production"
- },
- "canary": {
- "browserTarget": "demoshell:build:canary"
- },
- "e2e": {
- "browserTarget": "demoshell:build:e2e"
- }
- }
- },
- "lint": {
- "executor": "@nrwl/linter:eslint",
- "options": {
- "lintFilePatterns": ["demo-shell/**/*.ts", "demo-shell/**/*.html"]
- }
- }
- }
-}
diff --git a/demo-shell/proxy-helpers.js b/demo-shell/proxy-helpers.js
deleted file mode 100644
index da57709874..0000000000
--- a/demo-shell/proxy-helpers.js
+++ /dev/null
@@ -1,76 +0,0 @@
-module.exports = {
- getDeployedAppsProxy: function(processHost, deployedApps) {
- let deployedAppProxy = {};
-
- if (deployedApps) {
- try {
- const deployedAppsArray = JSON.parse(deployedApps);
- for (const app of deployedAppsArray) {
- const appName = app.name;
- const appPath = `/${appName}`;
- const appPathRewrite = `^/${appName}`;
-
- deployedAppProxy = {
- ...deployedAppProxy,
- [appPath]: {
- target: `${processHost}`,
- secure: false,
- pathRewrite: {
- [appPathRewrite]: appName,
- },
- changeOrigin: true,
- },
- };
- }
- } catch (e) {
- console.log(e);
- }
- }
-
- return deployedAppProxy;
- },
- getShareProxy: function(host) {
- console.log('Target for /alfresco', host);
- return {
- '/alfresco': {
- target: host,
- secure: false,
- logLevel: 'debug',
- changeOrigin: true,
- onProxyReq: function(request) {
- if(request["method"] !== "GET")
- request.setHeader("origin", host);
- },
- // workaround for REPO-2260
- onProxyRes: function (proxyRes, req, res) {
- const header = proxyRes.headers['www-authenticate'];
- if (header && header.startsWith('Basic')) {
- proxyRes.headers['www-authenticate'] = 'x' + header;
- }
- },
- },
- }
- },
- getApsProxy: function(host) {
- console.log('Target for /activiti-app', host);
- return {
- '/activiti-app': {
- target: host,
- secure: false,
- logLevel: 'debug',
- changeOrigin: true,
- },
- }
- },
- getIdentityAdapterServiceProxy: function(host) {
- console.log('Target for /identity-adapter-service', host);
- return {
- '/identity-adapter-service': {
- target: host,
- secure: false,
- logLevel: 'debug',
- changeOrigin: true,
- },
- }
- }
-};
diff --git a/demo-shell/proxy.conf.js b/demo-shell/proxy.conf.js
deleted file mode 100644
index 08c68a4b36..0000000000
--- a/demo-shell/proxy.conf.js
+++ /dev/null
@@ -1,15 +0,0 @@
-require('dotenv').config();
-
-const { getDeployedAppsProxy, getShareProxy, getApsProxy, getIdentityAdapterServiceProxy } = require('./proxy-helpers');
-
-const legacyHost = process.env.PROXY_HOST_ADF;
-const cloudHost = process.env.CLOUD_PROXY_HOST_ADF || process.env.PROXY_HOST_ADF;
-const cloudApps = process.env.APP_CONFIG_APPS_DEPLOYED;
-const apsHost = process.env.PROXY_HOST_ADF;
-
-module.exports = {
- ...getShareProxy(legacyHost),
- ...getApsProxy(apsHost),
- ...getDeployedAppsProxy(cloudHost, cloudApps),
- ...getIdentityAdapterServiceProxy(cloudHost)
-};
diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json
deleted file mode 100644
index bd4128db05..0000000000
--- a/demo-shell/resources/i18n/en.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "title": "Welcome",
- "NOTIFICATIONS": {
- "TASK_ASSIGNED": "{{taskName}} task has been assigned to {{assignee}}",
- "PROCESS_STARTED": "{{processName}} process has been started",
- "TASK_UPDATED": "{{taskName}} task details have been updated",
- "TASK_CREATED": "{{taskName}} task was created"
- },
- "SEARCH": {
- "RESULTS": "Search results",
- "NO_RESULT": "No results found",
- "FACET_FIELDS": {
- "TYPE": "1:Type",
- "SIZE": "2:Size",
- "CREATOR": "3:Creator",
- "MODIFIER": "4:Modifier",
- "CREATED": "5:Created"
- },
- "FACET_QUERIES": {
- "MY_FACET_QUERIES": "My facet queries",
- "CREATED_THIS_YEAR": "1.Created This Year",
- "MIMETYPE": "2.Type: HTML",
- "XTRASMALL": "3.Size: xtra small",
- "SMALL": "4.Size: small",
- "MEDIUM": "5.Size: medium",
- "LARGE": "6.Size: large",
- "XTRALARGE": "7.Size: xtra large",
- "XXTRALARGE": "8.Size: XX large"
- }
- },
- "GROUP-TITLE1-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION ONE",
- "GROUP-TITLE2-TRANSLATION-KEY": "CUSTOM TITLE TRANSLATION TWO",
- "ERROR_CONTENT": {
- "507": {
- "TITLE": "ACS Disk full",
- "DESCRIPTION": "Content exceeds overall storage quota limit configured for the network or system"
- }
- }
-}
diff --git a/demo-shell/resources/images/bpm-background.png b/demo-shell/resources/images/bpm-background.png
deleted file mode 100644
index 923f00885d..0000000000
Binary files a/demo-shell/resources/images/bpm-background.png and /dev/null differ
diff --git a/demo-shell/resources/images/ecm-background.png b/demo-shell/resources/images/ecm-background.png
deleted file mode 100644
index 4a0a39ae5a..0000000000
Binary files a/demo-shell/resources/images/ecm-background.png and /dev/null differ
diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json
deleted file mode 100644
index ddd98f00a6..0000000000
--- a/demo-shell/src/app.config.json
+++ /dev/null
@@ -1,1498 +0,0 @@
-{
- "$schema": "../../lib/core/src/lib/app-config/app.config.schema.json",
- "ecmHost": "{protocol}//{hostname}{:port}",
- "bpmHost": "{protocol}//{hostname}{:port}",
- "identityHost": "{protocol}//{hostname}{:port}/auth/admin/realms/alfresco",
- "loginRoute": "login",
- "providers": "ALL",
- "contextRootBpm": "activiti-app",
- "authType": "BASIC",
- "locale": "en",
- "notificationDefaultDuration": 2000,
- "auth": {
- "withCredentials": false
- },
- "upload": {
- "threads": 1
- },
- "oauth2": {
- "host": "{protocol}//{hostname}{:port}/auth/realms/alfresco",
- "clientId": "alfresco",
- "scope": "openid profile email",
- "secret": "",
- "implicitFlow": false,
- "codeFlow": true,
- "silentLogin": true,
- "redirectSilentIframeUri": "{protocol}//{hostname}{:port}/assets/silent-refresh.html",
- "redirectUri": "/",
- "redirectUriLogout": "#/logout",
- "publicUrls": [
- "**/preview/s/*",
- "**/settings",
- "**/logout"
- ]
- },
- "application": {
- "storagePrefix": "ADF",
- "name": "Alfresco ADF Application",
- "copyright": "© 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved."
- },
- "notifications": true,
- "search": [{
- "filterWithContains": true,
- "app:fields": [
- "cm:name",
- "cm:title",
- "cm:description",
- "ia:whatEvent",
- "ia:descriptionEvent",
- "lnk:title",
- "lnk:description",
- "TEXT",
- "TAG"
- ],
- "include": [
- "path",
- "allowableOperations",
- "properties"
- ],
- "sorting": {
- "options": [
- {
- "key": "name",
- "label": "Name",
- "type": "FIELD",
- "field": "cm:name",
- "ascending": true
- },
- {
- "key": "content.sizeInBytes",
- "label": "Size",
- "type": "FIELD",
- "field": "content.size",
- "ascending": true
- },
- {
- "key": "createdByUser",
- "label": "Author",
- "type": "FIELD",
- "field": "cm:creator",
- "ascending": true
- },
- {
- "key": "createdAt",
- "label": "Created",
- "type": "FIELD",
- "field": "cm:created",
- "ascending": true
- },
- {
- "key": "score",
- "label": "Relevance",
- "type": "SCORE",
- "field": "score",
- "ascending": false
- }
- ],
- "defaults": [
- {
- "key": "score",
- "type": "FIELD",
- "field": "score",
- "ascending": false
- }
- ]
- },
- "resetButton": true,
- "filterQueries": [
- {
- "query": "TYPE:'cm:folder' OR TYPE:'cm:content'"
- },
- {
- "query": "NOT cm:creator:System"
- }
- ],
- "facetFields": {
- "expanded": true,
- "fields": [
- {
- "field": "content.mimetype",
- "mincount": 1,
- "label": "SEARCH.FACET_FIELDS.TYPE"
- },
- {
- "field": "content.size",
- "mincount": 1,
- "label": "SEARCH.FACET_FIELDS.SIZE"
- },
- {
- "field": "creator",
- "mincount": 1,
- "label": "SEARCH.FACET_FIELDS.CREATOR"
- },
- {
- "field": "modifier",
- "mincount": 1,
- "label": "SEARCH.FACET_FIELDS.MODIFIER"
- },
- {
- "field": "created",
- "mincount": 1,
- "label": "SEARCH.FACET_FIELDS.CREATED"
- }
- ]
- },
- "facetQueries": {
- "label": "SEARCH.FACET_QUERIES.MY_FACET_QUERIES",
- "pageSize": 5,
- "expanded": true,
- "mincount": 1,
- "queries": [
- {
- "query": "created:2019",
- "label": "SEARCH.FACET_QUERIES.CREATED_THIS_YEAR"
- },
- {
- "query": "content.mimetype:text/html",
- "label": "SEARCH.FACET_QUERIES.MIMETYPE",
- "group": "Type facet queries"
- },
- {
- "query": "content.size:[0 TO 10240]",
- "label": "SEARCH.FACET_QUERIES.XTRASMALL",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[10240 TO 102400]",
- "label": "SEARCH.FACET_QUERIES.SMALL",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[102400 TO 1048576]",
- "label": "SEARCH.FACET_QUERIES.MEDIUM",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[1048576 TO 16777216]",
- "label": "SEARCH.FACET_QUERIES.LARGE",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[16777216 TO 134217728]",
- "label": "SEARCH.FACET_QUERIES.XTRALARGE",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[134217728 TO MAX]",
- "label": "SEARCH.FACET_QUERIES.XXTRALARGE",
- "group": "Size facet queries"
- }
- ]
- },
- "facetIntervals": {
- "expanded": true,
- "intervals": [
- {
- "label": "The Created",
- "field": "cm:created",
- "sets": [
- {
- "label": "lastYear",
- "start": "2018",
- "end": "2019",
- "endInclusive": false
- },
- {
- "label": "currentYear",
- "start": "NOW/YEAR",
- "end": "NOW/YEAR+1YEAR"
- },
- {
- "label": "earlier",
- "start": "*",
- "end": "2018",
- "endInclusive": false
- }
- ]
- },
- {
- "label": "TheModified",
- "field": "cm:modified",
- "sets": [
- {
- "label": "2017",
- "start": "2017",
- "end": "2018",
- "endInclusive": false
- },
- {
- "label": "2017-2018",
- "start": "2017",
- "end": "2018",
- "endInclusive": true
- },
- {
- "label": "currentYear",
- "start": "NOW/YEAR",
- "end": "NOW/YEAR+1YEAR"
- },
- {
- "label": "earlierThan2017",
- "start": "*",
- "end": "2017",
- "endInclusive": false
- }
- ]
- }
- ]
- },
- "categories": [
- {
- "id": "queryName",
- "name": "Name",
- "enabled": true,
- "expanded": true,
- "component": {
- "selector": "text",
- "settings": {
- "pattern": "cm:name:'(.*?)'",
- "field": "cm:name",
- "placeholder": "Enter the name"
- }
- }
- },
- {
- "id": "checkList",
- "name": "Check List",
- "enabled": true,
- "component": {
- "selector": "check-list",
- "settings": {
- "pageSize": 5,
- "operator": "OR",
- "options": [
- {
- "name": "Folder",
- "value": "TYPE:'cm:folder'"
- },
- {
- "name": "Document",
- "value": "TYPE:'cm:content'"
- }
- ]
- }
- }
- },
- {
- "id": "contentSize",
- "name": "Content Size",
- "enabled": true,
- "component": {
- "selector": "slider",
- "settings": {
- "field": "cm:content.size",
- "min": 0,
- "max": 18,
- "step": 1,
- "thumbLabel": true
- }
- }
- },
- {
- "id": "contentSizeRange",
- "name": "Content Size (range)",
- "enabled": true,
- "component": {
- "selector": "number-range",
- "settings": {
- "field": "cm:content.size",
- "format": "[{FROM} TO {TO}]"
- }
- }
- },
- {
- "id": "createdModifiedDateRange",
- "name": "Date",
- "enabled": true,
- "component": {
- "selector": "date-range",
- "settings": {
- "dateFormat": "dd-MMM-yy",
- "maxDate": "today",
- "field": "cm:created, cm:modified",
- "displayedLabelsByField": {
- "cm:created": "Created Date",
- "cm:modified": "Modified Date"
- }
- }
- }
- },
- {
- "id": "queryType",
- "name": "Type",
- "enabled": true,
- "component": {
- "selector": "radio",
- "settings": {
- "field": null,
- "pageSize": 5,
- "options": [
- {
- "name": "None",
- "value": "",
- "default": true
- },
- {
- "name": "All",
- "value": "TYPE:'cm:folder' OR TYPE:'cm:content'"
- },
- {
- "name": "Folder",
- "value": "TYPE:'cm:folder'"
- },
- {
- "name": "Document",
- "value": "TYPE:'cm:content'"
- }
- ]
- }
- }
- }
- ],
- "highlight": {
- "prefix": " ",
- "postfix": " ",
- "mergeContiguous": true,
- "fields": [
- {
- "field": "cm:title"
- },
- {
- "field": "description",
- "prefix": "(",
- "postfix": ")"
- }
- ]
- },
- "name": "Default",
- "default": true
- },
- {
- "filterWithContains": true,
- "app:fields": [
- "cm:name",
- "cm:title",
- "cm:description",
- "ia:whatEvent",
- "ia:descriptionEvent",
- "lnk:title",
- "lnk:description",
- "TEXT",
- "TAG"
- ],
- "include": [
- "path",
- "allowableOperations",
- "properties"
- ],
- "sorting": {
- "options": [
- {
- "key": "name",
- "label": "Name",
- "type": "FIELD",
- "field": "cm:name",
- "ascending": true
- },
- {
- "key": "content.sizeInBytes",
- "label": "Size",
- "type": "FIELD",
- "field": "content.size",
- "ascending": true
- },
- {
- "key": "createdByUser",
- "label": "Author",
- "type": "FIELD",
- "field": "cm:creator",
- "ascending": true
- },
- {
- "key": "createdAt",
- "label": "Created",
- "type": "FIELD",
- "field": "cm:created",
- "ascending": true
- },
- {
- "key": "score",
- "label": "Relevance",
- "type": "SCORE",
- "field": "score",
- "ascending": false
- }
- ],
- "defaults": [
- {
- "key": "score",
- "type": "FIELD",
- "field": "score",
- "ascending": false
- }
- ]
- },
- "resetButton": true,
- "filterQueries": [
- {
- "query": "TYPE:'cm:folder'"
- },
- {
- "query": "NOT cm:creator:System"
- }
- ],
- "facetFields": {
- "expanded": true,
- "fields": [
- {
- "field": "content.size",
- "mincount": 1,
- "label": "Folder Size",
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true,
- "unit": "Bytes"
- }
- },
- {
- "field": "creator",
- "mincount": 1,
- "label": "Folder created",
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- },
- {
- "field": "modifier",
- "mincount": 1,
- "label": "Folder Modifier",
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- },
- {
- "field": "created",
- "mincount": 1,
- "label": "Folder Created",
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- }
- ]
- },
- "facetQueries": {
- "label": "SEARCH.FACET_QUERIES.MY_FACET_QUERIES",
- "pageSize": 5,
- "expanded": true,
- "mincount": 1,
- "queries": [
- {
- "query": "created:2019",
- "label": "SEARCH.FACET_QUERIES.CREATED_THIS_YEAR"
- },
- {
- "query": "content.mimetype:text/html",
- "label": "SEARCH.FACET_QUERIES.MIMETYPE",
- "group": "Type facet queries"
- },
- {
- "query": "content.size:[0 TO 10240]",
- "label": "SEARCH.FACET_QUERIES.XTRASMALL",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[10240 TO 102400]",
- "label": "SEARCH.FACET_QUERIES.SMALL",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[102400 TO 1048576]",
- "label": "SEARCH.FACET_QUERIES.MEDIUM",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[1048576 TO 16777216]",
- "label": "SEARCH.FACET_QUERIES.LARGE",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[16777216 TO 134217728]",
- "label": "SEARCH.FACET_QUERIES.XTRALARGE",
- "group": "Size facet queries"
- },
- {
- "query": "content.size:[134217728 TO MAX]",
- "label": "SEARCH.FACET_QUERIES.XXTRALARGE",
- "group": "Size facet queries"
- }
- ],
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- },
- "facetIntervals": {
- "expanded": true,
- "intervals": [
- {
- "label": "The Created",
- "field": "cm:created",
- "sets": [
- {
- "label": "lastYear",
- "start": "2018",
- "end": "2019",
- "endInclusive": false
- },
- {
- "label": "currentYear",
- "start": "NOW/YEAR",
- "end": "NOW/YEAR+1YEAR"
- },
- {
- "label": "earlier",
- "start": "*",
- "end": "2018",
- "endInclusive": false
- }
- ],
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- },
- {
- "label": "The Modified",
- "field": "cm:modified",
- "sets": [
- {
- "label": "2017",
- "start": "2017",
- "end": "2018",
- "endInclusive": false
- },
- {
- "label": "2017-2018",
- "start": "2017",
- "end": "2018",
- "endInclusive": true
- },
- {
- "label": "currentYear",
- "start": "NOW/YEAR",
- "end": "NOW/YEAR+1YEAR"
- },
- {
- "label": "earlierThan2017",
- "start": "*",
- "end": "2017",
- "endInclusive": false
- }
- ],
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true
- }
- }
- ]
- },
- "categories": [
- {
- "id": "contentSize",
- "name": "Content Size",
- "enabled": true,
- "component": {
- "selector": "slider",
- "settings": {
- "allowUpdateOnChange": false,
- "hideDefaultAction": true,
- "unit": "Byte",
- "field": "cm:content.size",
- "min": 0,
- "max": 4000,
- "step": 1,
- "thumbLabel": true
- }
- }
- }
- ],
- "highlight": {
- "prefix": " ",
- "postfix": " ",
- "mergeContiguous": true,
- "fields": [
- {
- "field": "cm:title"
- },
- {
- "field": "description",
- "prefix": "(",
- "postfix": ")"
- }
- ]
- },
- "name": "Folder"
- }],
- "search-headers": {
- "filterWithContains": true,
- "app:fields": [
- "cm:name",
- "cm:title",
- "cm:description",
- "ia:whatEvent",
- "ia:descriptionEvent",
- "lnk:title",
- "lnk:description",
- "TEXT",
- "TAG"
- ],
- "categories": [
- {
- "id": "queryName",
- "name": "SEARCH.SEARCH_HEADER.FILTERS.NAME.TITLE",
- "columnKey": "name",
- "enabled": true,
- "component": {
- "selector": "text",
- "settings": {
- "pattern": "cm:name:'(.*?)'",
- "field": "cm:name",
- "placeholder": "SEARCH.SEARCH_HEADER.FILTERS.NAME.PLACEHOLDER",
- "searchSuffix": "*",
- "allowUpdateOnChange": false
- }
- }
- },
- {
- "id": "checkList",
- "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.TITLE",
- "columnKey": "$thumbnail",
- "enabled": true,
- "component": {
- "selector": "check-list",
- "settings": {
- "pageSize": 5,
- "allowUpdateOnChange": false,
- "operator": "OR",
- "options": [
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.FOLDER",
- "value": "TYPE:'cm:folder'"
- },
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.DOCUMENT",
- "value": "TYPE:'cm:content'"
- }
- ]
- }
- }
- },
- {
- "id": "contentSize",
- "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.TITLE",
- "columnKey": "content.sizeInBytes",
- "enabled": true,
- "component": {
- "selector": "check-list",
- "settings": {
- "allowUpdateOnChange": false,
- "options": [
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.SMALL",
- "value": "content.size:[0 TO 1048576] OR TYPE:'cm:folder'"
- },
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.MEDIUM",
- "value": "content.size:[1048576 TO 52428800] OR TYPE:'cm:folder'"
- },
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.LARGE",
- "value": "content.size:<52428800 TO 524288000] OR TYPE:'cm:folder'"
- },
- {
- "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.HUGE",
- "value": "content.size:<524288000 TO MAX] OR TYPE:'cm:folder'"
- }
- ]
- }
- }
- },
- {
- "id": "createdDateRange",
- "name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE",
- "enabled": true,
- "component": {
- "selector": "date-range",
- "settings": {
- "allowUpdateOnChange": false,
- "dateFormat": "dd-MMM-yy",
- "maxDate": "today",
- "field": "cm:created",
- "displayedLabelsByField": {
- "cm:created": "Created Date"
- }
- }
- }
- }
- ],
- "highlight": {
- "prefix": " ",
- "postfix": " ",
- "mergeContiguous": true,
- "fields": [
- {
- "field": "cm:title"
- },
- {
- "field": "description",
- "prefix": "(",
- "postfix": ")"
- }
- ]
- },
- "sorting": {
- "options": [
- {
- "key": "name",
- "label": "Name",
- "type": "FIELD",
- "field": "cm:name",
- "ascending": true
- },
- {
- "key": "content.sizeInBytes",
- "label": "Size",
- "type": "FIELD",
- "field": "content.size",
- "ascending": true
- },
- {
- "key": "createdByUser.displayName",
- "label": "Author",
- "type": "FIELD",
- "field": "cm:creator",
- "ascending": true
- },
- {
- "key": "createdAt",
- "label": "Created",
- "type": "FIELD",
- "field": "cm:created",
- "ascending": true
- },
- {
- "key": "score",
- "label": "Relevance",
- "type": "FIELD",
- "field": "score",
- "ascending": false
- }
- ],
- "defaults": [
- {
- "key": "score",
- "type": "FIELD",
- "field": "score",
- "ascending": false
- }
- ]
- }
- },
- "pagination": {
- "size": 20,
- "supportedPageSizes": [
- 5,
- 10,
- 15,
- 20
- ]
- },
- "dateValues": {
- "defaultDateFormat": "mediumDate",
- "defaultDateTimeFormat": "MMM d, y, H:mm",
- "defaultLocale": "en"
- },
- "decimalValues": {
- "minIntegerDigits": 1,
- "minFractionDigits": 0,
- "maxFractionDigits": 2
- },
- "files": {
- "excluded": [
- ".DS_Store",
- "desktop.ini",
- ".git"
- ],
- "match-options": {
- "nocase": true
- }
- },
- "folders": {
- "excluded": [
- ".git"
- ],
- "match-options": {
- "nocase": true
- }
- },
- "logLevel": "trace",
- "activiti": {
- "rest": {
- "fields": [
- {
- "processId": "0",
- "taskId": "7501",
- "fieldId": "label10",
- "values": [
- {
- "id": "f1",
- "name": "Field 1"
- },
- {
- "id": "f2",
- "name": "Field 2"
- },
- {
- "id": "f3",
- "name": "Field 3"
- }
- ]
- }
- ]
- }
- },
- "document-list": {
- "presets": {
- "-trashcan-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "path",
- "type": "location",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
- "format": "/files",
- "sortable": true
- },
- {
- "key": "content.sizeInBytes",
- "type": "fileSize",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
- "sortable": true
- },
- {
- "key": "archivedAt",
- "type": "date",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
- "format": "timeAgo",
- "sortable": true
- },
- {
- "key": "archivedByUser.displayName",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
- "sortable": true
- }
- ],
- "-sites-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "title",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true,
- "sortingKey": "name"
- },
- {
- "key": "visibility",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
- "sortable": true
- }
- ],
- "-mysites-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "title",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "visibility",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
- "sortable": true
- }
- ],
- "-favorites-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "path",
- "type": "location",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
- "format": "/files",
- "sortable": true
- },
- {
- "key": "content.sizeInBytes",
- "type": "fileSize",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
- "sortable": true
- },
- {
- "key": "modifiedAt",
- "type": "date",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
- "format": "timeAgo",
- "sortable": true
- },
- {
- "key": "modifiedByUser.displayName",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
- "sortable": true
- }
- ],
- "-recent-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "path",
- "type": "location",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
- "cssClass": "ellipsis-cell",
- "format": "/files",
- "sortable": true
- },
- {
- "key": "content.sizeInBytes",
- "type": "fileSize",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
- "sortable": true
- },
- {
- "key": "modifiedAt",
- "type": "date",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
- "format": "timeAgo",
- "sortable": true
- }
- ],
- "-sharedlinks-": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "path",
- "type": "location",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
- "cssClass": "ellipsis-cell",
- "format": "/files",
- "sortable": true
- },
- {
- "key": "content.sizeInBytes",
- "type": "fileSize",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
- "sortable": true
- },
- {
- "key": "modifiedAt",
- "type": "date",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
- "format": "timeAgo",
- "sortable": true
- },
- {
- "key": "modifiedByUser.displayName",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
- "sortable": true
- },
- {
- "key": "sharedByUser.displayName",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
- "sortable": true
- }
- ],
- "default": [
- {
- "key": "$thumbnail",
- "type": "image",
- "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
- "sortable": false
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
- "cssClass": "full-width ellipsis-cell",
- "sortable": true
- },
- {
- "key": "content.sizeInBytes",
- "type": "fileSize",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
- "sortable": true
- },
- {
- "key": "modifiedAt",
- "type": "date",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
- "format": "timeAgo",
- "sortable": true
- },
- {
- "key": "modifiedByUser.displayName",
- "type": "text",
- "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
- "sortable": true
- }
- ]
- }
- },
- "adf-start-task": {
- "name": "My Task Name"
- },
- "adf-task-list": {
- "presets": {
- "default": [
- {
- "key": "name",
- "type": "text",
- "title": "ADF_TASK_LIST.PROPERTIES.NAME",
- "sortable": true
- }
- ]
- }
- },
- "adf-start-process": {
- "name": "My Default Name",
- "processDefinitionName": "My default process def name"
- },
- "adf-cloud-start-process": {
- "name": "My Default Cloud Name"
- },
- "adf-process-list": {
- "presets": {
- "default": [
- {
- "key": "name",
- "type": "text",
- "title": "ADF_PROCESS_LIST.PROPERTIES.NAME",
- "sortable": true
- },
- {
- "key": "id",
- "type": "text",
- "title": "ADF_PROCESS_LIST.PROPERTIES.ID",
- "sortable": true
- }
- ]
- }
- },
- "adf-edit-task-filter": {
- "filterProperties": [
- "status",
- "assignee",
- "sort",
- "order"
- ],
- "sortProperties": [
- "id",
- "name",
- "createdDate",
- "priority",
- "processDefinitionId"
- ],
- "actions": [
- "save",
- "saveAs",
- "delete"
- ]
- },
- "adf-edit-service-task-filter": {
- "filterProperties": [
- "appName",
- "serviceTaskId",
- "activityName",
- "activityType",
- "completedDate",
- "startedDate",
- "sort",
- "order",
- "status",
- "elementId",
- "serviceName",
- "processInstanceId",
- "processDefinitionId",
- "serviceName"
- ],
- "sortProperties": [
- "id",
- "activityName",
- "completedDate",
- "startedDate"
- ],
- "actions": [
- "save",
- "saveAs",
- "delete"
- ]
- },
- "adf-edit-process-filter": {
- "filterProperties": [
- "status",
- "sort",
- "order",
- "processName",
- "name"
- ],
- "sortProperties": [
- "id",
- "name",
- "status",
- "startDate"
- ],
- "actions": [
- "save",
- "saveAs",
- "delete"
- ]
- },
- "content-metadata": {
- "presets": {
- "default": {
- "exif:exif": "*",
- "cm:generalclassifiable": "*",
- "cm:complianceable": "*",
- "cm:dublincore": "*",
- "cm:effectivity": "*",
- "cm:summarizable": "*",
- "cm:versionable": "*",
- "cm:templatable": "*",
- "cm:emailed": "*",
- "emailserver:aliasable": "*",
- "cm:taggable": "*",
- "app:inlineeditable": "*",
- "cm:geographic": "*",
- "audio:audio": "*",
- "cm:indexControl": "*",
- "dp:restrictable": "*",
- "smf:customConfigSmartFolder": "*",
- "smf:systemConfigSmartFolder": "*",
- "ai:products": "*",
- "ai:dates": "*",
- "ai:places": "*",
- "ai:events": "*",
- "ai:organizations": "*",
- "ai:people": "*",
- "ai:things": "*",
- "ai:quantities": "*",
- "ai:creativeWorks": "*",
- "ai:labels": "*",
- "ai:textLines": "*"
- },
- "all-aspects": "*",
- "custom-title": [
- {
- "title": "Exif",
- "items": [
- {
- "aspect": "exif:exif",
- "editing": false,
- "properties": [
- "exif:pixelXDimension",
- {
- "title": "Custom YDimension Name",
- "name": "exif:pixelYDimension"
- }
- ]
- }
- ]
- }
- ]
- },
- "multi-value-pipe-separator": ", ",
- "multi-value-chips": true,
- "copy-to-clipboard-action": true,
- "selectFilterLimit": 5
- },
- "sideNav": {
- "expandedSidenav": true,
- "preserveState": true
- },
- "adf-cloud-task-list": {
- "presets": {
- "default": [
- {
- "key": "id",
- "type": "text",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.ID",
- "cssClass": "adf-expand-cell-4",
- "sortable": true
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.NAME",
- "sortable": true,
- "cssClass": "name-column adf-ellipsis-cell"
- },
- {
- "key": "status",
- "type": "text",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.STATUS",
- "sortable": true
- },
- {
- "key": "priority",
- "type": "text",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY",
- "sortable": true
- },
- {
- "key": "createdDate",
- "type": "date",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED_DATE",
- "sortable": true,
- "format": "timeAgo"
- },
- {
- "key": "lastModified",
- "type": "date",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.LAST_MODIFIED",
- "sortable": true,
- "format": "timeAgo"
- },
- {
- "id": "description",
- "key": "description",
- "type": "text",
- "title": "ADF_CLOUD_TASK_LIST.PROPERTIES.DESCRIPTION",
- "sortable": false,
- "draggable": false,
- "isHidden": true
- }
- ]
- }
- },
- "adf-cloud-service-task-list": {
- "presets": {
- "default": [
- {
- "key": "id",
- "type": "text",
- "title": "ADF_CLOUD_SERVICE_TASK_LIST.PROPERTIES.ID",
- "sortable": true
- },
- {
- "key": "activityName",
- "type": "text",
- "title": "ADF_CLOUD_SERVICE_TASK_LIST.PROPERTIES.ACTIVITY_NAME",
- "sortable": true
- },
- {
- "key": "status",
- "type": "text",
- "title": "ADF_CLOUD_SERVICE_TASK_LIST.PROPERTIES.STATUS",
- "sortable": true
- },
- {
- "key": "startedDate",
- "type": "date",
- "title": "ADF_CLOUD_SERVICE_TASK_LIST.PROPERTIES.STARTED_DATE",
- "sortable": true,
- "format": "timeAgo"
- },
- {
- "key": "completedDate",
- "type": "date",
- "title": "ADF_CLOUD_SERVICE_TASK_LIST.PROPERTIES.COMPLETED_DATE",
- "sortable": true,
- "format": "timeAgo"
- }
- ]
- }
- },
- "adf-cloud-process-list": {
- "presets": {
- "default": [
- {
- "key": "id",
- "type": "text",
- "title": "ADF_CLOUD_PROCESS_LIST.PROPERTIES.ID",
- "sortable": true
- },
- {
- "key": "name",
- "type": "text",
- "title": "ADF_CLOUD_PROCESS_LIST.PROPERTIES.NAME",
- "sortable": true
- },
- {
- "key": "status",
- "type": "text",
- "title": "ADF_CLOUD_PROCESS_LIST.PROPERTIES.STATUS",
- "sortable": true
- },
- {
- "key": "startDate",
- "type": "date",
- "title": "ADF_CLOUD_PROCESS_LIST.PROPERTIES.START_DATE",
- "sortable": true,
- "format": "timeAgo"
- }
- ]
- }
- },
- "adf-cloud-priority-values": [
- {
- "key": "0",
- "value": "0",
- "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE"
- },
- {
- "key": "1",
- "value": "1",
- "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW"
- },
- {
- "key": "2",
- "value": "2",
- "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL"
- },
- {
- "key": "3",
- "value": "3",
- "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH"
- }
- ],
- "alfresco-deployed-apps": [
- {
- "name": "candidatebaseapp",
- "displayName": "candidatebaseapp"
- },
- {
- "name": "simpleapp",
- "displayName": "simpleapp"
- },
- {
- "name": "subprocessapp",
- "displayName": "subprocessapp"
- }
- ],
- "aspect-visible": {
- "default": [
- "cm:generalclassifiable",
- "cm:complianceable",
- "cm:dublincore",
- "cm:effectivity",
- "cm:summarizable",
- "cm:versionable",
- "cm:templatable",
- "cm:emailed",
- "emailserver:aliasable",
- "cm:taggable",
- "app:inlineeditable",
- "cm:geographic",
- "exif:exif",
- "audio:audio",
- "cm:indexControl",
- "dp:restrictable",
- "smf:customConfigSmartFolder",
- "smf:systemConfigSmartFolder"
- ],
- "ai": [
- "ai:products",
- "ai:dates",
- "ai:places",
- "ai:events",
- "ai:organizations",
- "ai:people",
- "ai:things",
- "ai:quantities",
- "ai:creativeWorks",
- "ai:labels",
- "ai:textLines"
- ]
- },
- "viewer": {
- "enableDownloadPrompt": false,
- "enableDownloadPromptReminder": false,
- "downloadPromptDelay": 50,
- "downloadPromptReminderDelay": 30,
- "enableFileAutoDownload": true,
- "fileAutoDownloadSizeThresholdInMB": 15
- }
-}
diff --git a/demo-shell/src/app/app.component.html b/demo-shell/src/app/app.component.html
deleted file mode 100644
index 955c66f6d2..0000000000
--- a/demo-shell/src/app/app.component.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/demo-shell/src/app/app.component.scss b/demo-shell/src/app/app.component.scss
deleted file mode 100644
index 76701d62c9..0000000000
--- a/demo-shell/src/app/app.component.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-router-outlet[name='overlay'] + * {
- width: 100%;
- height: 100%;
- z-index: 999;
- position: absolute;
- top: 0;
- right: 0;
-}
-
-.app-demo-app-container {
- height: 100%;
- width: 100%;
-}
diff --git a/demo-shell/src/app/app.component.ts b/demo-shell/src/app/app.component.ts
deleted file mode 100644
index 82186c8eff..0000000000
--- a/demo-shell/src/app/app.component.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation, OnInit } from '@angular/core';
-import {
- AuthenticationService,
- 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',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class AppComponent implements OnInit {
-
- constructor(private pageTitleService: PageTitleService,
- private adfHttpClient: AdfHttpClient,
- private authenticationService: AuthenticationService,
- private router: Router,
- private dialogRef: MatDialog) {
-
- }
-
- ngOnInit() {
- this.pageTitleService.setTitle('title');
-
- this.adfHttpClient.on('error', (error) => {
- if (error.status === 401) {
- if (!this.authenticationService.isLoggedIn()) {
- this.dialogRef.closeAll();
- this.router.navigate(['/login']);
- }
- }
-
- if (error.status === 507) {
- if (!this.authenticationService.isLoggedIn()) {
- this.dialogRef.closeAll();
- this.router.navigate(['error/507']);
- }
- }
- });
- }
-}
diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts
deleted file mode 100644
index 442a34d993..0000000000
--- a/demo-shell/src/app/app.module.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { BrowserModule } from '@angular/platform-browser';
-import { NgModule } from '@angular/core';
-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, AuthModule, provideTranslations } from '@alfresco/adf-core';
-import { ExtensionsModule } from '@alfresco/adf-extensions';
-import { AppComponent } from './app.component';
-import { appRoutes } from './app.routes';
-import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
-import { ContentModule } from '@alfresco/adf-content-services';
-import { ProcessModule } from '@alfresco/adf-process-services';
-import { environment } from '../environments/environment';
-import { ProcessServicesCloudModule } from '@alfresco/adf-process-services-cloud';
-import { RouterModule } from '@angular/router';
-import { CoreAutomationService } from '../testing/automation.service';
-
-@NgModule({
- imports: [
- BrowserModule,
- environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
- RouterModule.forRoot(appRoutes, { useHash: true }),
- AuthModule.forRoot({ useHash: true }),
- HttpClientModule,
- TranslateModule.forRoot(),
- CoreModule.forRoot(),
- ContentModule.forRoot(),
- ProcessModule.forRoot(),
- ProcessServicesCloudModule.forRoot(),
- ExtensionsModule.forRoot(),
- NgChartsModule,
- MonacoEditorModule.forRoot()
- ],
- declarations: [AppComponent],
- providers: [
- { provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
- provideTranslations('app', 'resources'),
- provideTranslations('adf-insights', 'assets/adf-insights')
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule {
- constructor(automationService: CoreAutomationService) {
- automationService.setup();
- }
-}
diff --git a/demo-shell/src/app/app.routes.ts b/demo-shell/src/app/app.routes.ts
deleted file mode 100644
index be3fee9bf5..0000000000
--- a/demo-shell/src/app/app.routes.ts
+++ /dev/null
@@ -1,327 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Routes } from '@angular/router';
-import { AuthGuard, AuthGuardEcm, ErrorContentComponent, AuthGuardBpm, AuthGuardSsoRoleService } from '@alfresco/adf-core';
-import { AppLayoutComponent } from './components/app-layout/app-layout.component';
-import { HomeComponent } from './components/home/home.component';
-import { LogoutComponent } from './components/logout/logout.component';
-import { ProcessServiceComponent } from './components/process-service/process-service.component';
-import { ShowDiagramComponent } from './components/process-service/show-diagram.component';
-import { FormViewerComponent } from './components/process-service/form-viewer.component';
-import { FormNodeViewerComponent } from './components/process-service/form-node-viewer.component';
-import { AppsViewComponent } from './components/process-service/apps-view.component';
-import { SearchResultComponent } from './components/search/search-result.component';
-import { FilesComponent } from './components/files/files.component';
-import { AppFormComponent } from './components/form/app-form.component';
-import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
-import { AppComponent } from './app.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';
-import { ProcessesCloudDemoComponent } from './components/cloud/processes-cloud-demo.component';
-import { StartTaskCloudDemoComponent } from './components/cloud/start-task-cloud-demo.component';
-import { StartProcessCloudDemoComponent } from './components/cloud/start-process-cloud-demo.component';
-import { TaskDetailsCloudDemoComponent } from './components/cloud/task-details-cloud-demo.component';
-import { CloudViewerComponent } from './components/cloud/cloud-viewer.component';
-import { ProcessDetailsCloudDemoComponent } from './components/cloud/process-details-cloud-demo.component';
-import { FormCloudDemoComponent } from './components/app-layout/cloud/form-demo/cloud-form-demo.component';
-import { DemoErrorComponent } from './components/error/demo-error.component';
-import { ProcessCloudLayoutComponent } from './components/cloud/process-cloud-layout.component';
-import { AppSearchFilterChipsComponent } from './components/search/search-filter-chips.component';
-import { FileViewComponent } from './components/file-view/file-view.component';
-import { SettingsComponent } from './components/settings/settings.component';
-import { AppLoginComponent } from './components/login/login.component';
-import { TaskListDemoComponent } from './components/task-list-demo/task-list-demo.component';
-import { ProcessListDemoComponent } from './components/process-list-demo/process-list-demo.component';
-import { AppCardViewComponent } from './components/card-view/card-view.component';
-
-export const appRoutes: Routes = [
- { path: 'login', component: AppLoginComponent },
- { path: 'logout', component: LogoutComponent },
- {
- path: 'settings',
- component: SettingsComponent
- },
- {
- path: 'files/:nodeId/view',
- component: AppComponent,
- canActivate: [AuthGuardEcm],
- canActivateChild: [AuthGuardEcm],
- outlet: 'overlay',
- children: [
- {
- path: '',
- component: FileViewComponent
- }
- ]
- },
- {
- path: 'files/:nodeId/:versionId/view',
- component: AppComponent,
- canActivate: [AuthGuardEcm],
- canActivateChild: [AuthGuardEcm],
- outlet: 'overlay',
- children: [
- {
- path: '',
- component: FileViewComponent
- }
- ]
- },
- {
- path: 'preview/blob',
- component: AppComponent,
- outlet: 'overlay',
- pathMatch: 'full',
- children: [
- {
- path: '',
- component: FileViewComponent
- }
- ]
- },
- {
- path: '',
- component: AppLayoutComponent,
- canActivate: [AuthGuard],
- children: [
- {
- path: '',
- redirectTo: `/home`,
- pathMatch: 'full'
- },
- {
- path: 'card-view',
- children: [
- {
- path: '',
- component: AppCardViewComponent
- }
- ]
- },
- {
- path: '',
- component: HomeComponent
- },
- {
- path: 'home',
- component: HomeComponent
- },
- {
- path: 'cloud',
- canActivate: [AuthGuardSsoRoleService],
- data: { roles: ['ACTIVITI_ADMIN', 'ACTIVITI_USER'], redirectUrl: '/error/403' },
- children: [
- {
- path: '',
- data: { roles: ['ACTIVITI_USER'], redirectUrl: '/error/403' },
- component: AppsCloudDemoComponent
- },
- {
- path: ':appName',
- canActivate: [AuthGuardSsoRoleService],
- data: { clientRoles: ['appName'], roles: ['ACTIVITI_USER'], redirectUrl: '/error/403' },
- component: ProcessCloudLayoutComponent,
- children: [
- {
- path: '',
- component: CloudLayoutComponent,
- children: [
- {
- path: 'tasks',
- component: TasksCloudDemoComponent
- },
- {
- path: 'processes',
- component: ProcessesCloudDemoComponent
- }
- ]
- },
- {
- path: 'start-task',
- component: StartTaskCloudDemoComponent
- },
- {
- path: 'start-process',
- component: StartProcessCloudDemoComponent
- },
- {
- path: 'task-details/:taskId',
- component: TaskDetailsCloudDemoComponent
- },
- {
- path: 'task-details/:taskId/files/:nodeId/view',
- component: CloudViewerComponent
- },
- {
- path: 'process-details/:processInstanceId',
- component: ProcessDetailsCloudDemoComponent
- }
- ]
- }
- ]
- },
- {
- path: 'settings-layout',
- component: SettingsComponent
- },
- {
- path: 'files',
- component: FilesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'files/:id',
- component: FilesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'files/:id/display/:mode',
- component: FilesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'search',
- component: SearchResultComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'search-filter-chips',
- component: AppSearchFilterChipsComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'activiti',
- component: AppsViewComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps',
- component: AppsViewComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/tasks',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/tasks/:filterId',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/processes',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/processes/:filterId',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/diagram/:processDefinitionId',
- component: ShowDiagramComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/report',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if needed
- {
- path: 'activiti/appId/:appId',
- component: ProcessServiceComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if needed
- {
- path: 'activiti/tasks/:id',
- component: FormViewerComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if needed
- {
- /* cspell:disable-next-line */
- path: 'activiti/tasksnode/:id',
- component: FormNodeViewerComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'permissions/:id',
- component: DemoPermissionComponent,
- canActivate: [AuthGuardEcm]
- },
- { path: 'form-cloud', component: FormCloudDemoComponent },
- { path: 'form', component: AppFormComponent },
- {
- path: 'task-list',
- canActivate: [AuthGuardBpm],
- children: [
- {
- path: '',
- component: TaskListDemoComponent
- },
- {
- path: ':id',
- component: TaskListDemoComponent
- }
- ]
- },
- {
- path: 'process-list',
- canActivate: [AuthGuardBpm],
- children: [
- {
- path: '',
- component: ProcessListDemoComponent
- },
- {
- path: ':id',
- component: ProcessListDemoComponent
- }
- ]
- },
- {
- path: 'error/no-authorization',
- component: ErrorContentComponent
- }
- ]
- },
- {
- path: 'error',
- component: AppLayoutComponent,
- children: [
- {
- path: '',
- redirectTo: '/error/404',
- pathMatch: 'full'
- },
- {
- path: ':id',
- component: DemoErrorComponent
- }
- ]
- },
- {
- path: '**',
- redirectTo: 'error/404'
- }
-];
diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.html b/demo-shell/src/app/components/app-layout/app-layout.component.html
deleted file mode 100644
index 046d22fcb5..0000000000
--- a/demo-shell/src/app/components/app-layout/app-layout.component.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{link.icon}}
- {{ link.title | translate }}
- arrow_right
-
-
-
-
-
- {{link.icon}}
- {{link.title | translate }}
-
-
-
-
-
- exit_to_app
- Logout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.scss b/demo-shell/src/app/components/app-layout/app-layout.component.scss
deleted file mode 100644
index 6bccce0418..0000000000
--- a/demo-shell/src/app/components/app-layout/app-layout.component.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-.app-layout {
- display: flex;
- flex: 1;
- min-width: 320px;
- height: 100%;
-
- .app-sidenav-link--active {
- color: var(--theme-primary-color);
- }
-
- &-menu-spacer {
- flex: 1 1 auto;
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.ts b/demo-shell/src/app/components/app-layout/app-layout.component.ts
deleted file mode 100644
index 9f498c70a9..0000000000
--- a/demo-shell/src/app/components/app-layout/app-layout.component.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation } from '@angular/core';
-import {
- AvatarComponent,
- HeaderLayoutComponent,
- LogoutDirective,
- SidenavLayoutComponent,
- SidenavLayoutContentDirective,
- SidenavLayoutHeaderDirective,
- SidenavLayoutNavigationDirective
-} from '@alfresco/adf-core';
-import { SearchBarComponent } from '../search/search-bar.component';
-import { UserInfoComponent } from './user-info/user-info.component';
-import { MatMenuModule } from '@angular/material/menu';
-import { MatListModule } from '@angular/material/list';
-import { TranslateModule } from '@ngx-translate/core';
-import { MatIconModule } from '@angular/material/icon';
-import { MatLineModule } from '@angular/material/core';
-import { CommonModule } from '@angular/common';
-import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
-import { AlfrescoApiService, FileUploadingDialogComponent } from '@alfresco/adf-content-services';
-
-@Component({
- standalone: true,
- imports: [
- CommonModule,
- SidenavLayoutComponent,
- SidenavLayoutHeaderDirective,
- HeaderLayoutComponent,
- SearchBarComponent,
- UserInfoComponent,
- AvatarComponent,
- MatMenuModule,
- SidenavLayoutNavigationDirective,
- MatListModule,
- TranslateModule,
- MatIconModule,
- MatLineModule,
- RouterLink,
- RouterLinkActive,
- LogoutDirective,
- SidenavLayoutContentDirective,
- RouterOutlet,
- FileUploadingDialogComponent
- ],
- templateUrl: './app-layout.component.html',
- styleUrls: ['./app-layout.component.scss'],
- host: { class: 'app-layout' },
- encapsulation: ViewEncapsulation.None
-})
-export class AppLayoutComponent {
- links: Array = [
- { href: '/home', icon: 'home', title: 'Home' },
- { href: '/files', icon: 'folder_open', title: 'Content Services' },
- { href: '/card-view', icon: 'view_headline', title: 'CardView' },
- { href: '/task-list', icon: 'assignment', title: 'Task List' },
- {
- href: '/cloud',
- icon: 'cloud',
- title: 'Process Cloud',
- children: [
- { href: '/cloud/', icon: 'cloud', title: 'Home' },
- { href: '/form-cloud', icon: 'poll', title: 'Form' }
- ]
- },
- {
- href: '/activiti',
- icon: 'device_hub',
- title: 'Process Services',
- children: [
- { href: '/activiti', icon: 'vpn_key', title: 'App' },
- { href: '/process-list', icon: 'assignment', title: 'Process List' },
- { href: '/form', icon: 'poll', title: 'Form' }
- ]
- },
- { href: '/login', icon: 'vpn_key', title: 'Login' },
- { href: '/settings-layout', icon: 'settings', title: 'Settings' }
- ];
-
- enableRedirect = true;
-
- constructor(private alfrescoApiService: AlfrescoApiService) {
- if (this.alfrescoApiService.getInstance().isOauthConfiguration()) {
- this.enableRedirect = false;
- }
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.html b/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.html
deleted file mode 100644
index 8eae8d236d..0000000000
--- a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
Error log:
-
Error {{ error.name }} {{error.validationSummary.message | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss b/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss
deleted file mode 100644
index 178ea56129..0000000000
--- a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-@import 'styles/mat-selectors';
-
-.app-form-container {
- padding: 10px;
-}
-
-.app-main-content {
- padding: 0 15px;
-}
-
-.app-console {
- width: 60%;
- display: inline-block;
- vertical-align: top;
- margin-left: 10px;
- height: 500px;
- overflow: scroll;
- padding-bottom: 30px;
-
- h3 {
- margin-top: 0;
- }
-
- p {
- display: block;
- font-family: monospace;
- margin: 0;
- }
-}
-
-.app-form-config-editor {
- height: 500px;
-}
-
-.app-form-editor-buttons {
- display: flex;
- flex-direction: row;
- column-gap: 4px;
-}
-
-.app-upload-config-button {
- input {
- cursor: pointer;
- right: 0;
- opacity: 0;
- position: absolute;
- top: 0;
- z-index: 4;
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.ts b/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.ts
deleted file mode 100644
index 0e147d0d9a..0000000000
--- a/demo-shell/src/app/components/app-layout/cloud/form-demo/cloud-form-demo.component.ts
+++ /dev/null
@@ -1,129 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit } from '@angular/core';
-import { FormFieldModel, FormModel, FormRenderingService, NotificationService } from '@alfresco/adf-core';
-import { CloudFormRenderingService, FormCloudModule, FormCloudService } from '@alfresco/adf-process-services-cloud';
-import { Subscription } from 'rxjs';
-import { CustomEditorComponent, CustomWidgetComponent } from '../../../cloud/custom-form-components/custom-editor.component';
-import { CoreAutomationService } from '../../../../../testing/automation.service';
-import { CommonModule } from '@angular/common';
-import { MatTabsModule } from '@angular/material/tabs';
-import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
-import { TranslateModule } from '@ngx-translate/core';
-import { FormsModule } from '@angular/forms';
-import { MatButtonModule } from '@angular/material/button';
-import { MatIconModule } from '@angular/material/icon';
-
-@Component({
- templateUrl: './cloud-form-demo.component.html',
- standalone: true,
- imports: [CommonModule, MatTabsModule, FormCloudModule, MonacoEditorModule, TranslateModule, FormsModule, MatButtonModule, MatIconModule],
- styleUrls: ['./cloud-form-demo.component.scss'],
- providers: [{ provide: FormRenderingService, useClass: CloudFormRenderingService }]
-})
-export class FormCloudDemoComponent implements OnInit, OnDestroy {
- form: FormModel;
- errorFields: FormFieldModel[] = [];
- formConfig: string;
- editor: any;
- private subscriptions: Subscription[] = [];
-
- editorOptions = {
- theme: 'vs-dark',
- language: 'json',
- autoIndent: true,
- formatOnPaste: true,
- formatOnType: true,
- automaticLayout: true
- };
-
- constructor(
- private notificationService: NotificationService,
- private formService: FormCloudService,
- private automationService: CoreAutomationService,
- private formRenderingService: FormRenderingService
- ) {
- this.formRenderingService.register({
- 'demo-widget': () => CustomEditorComponent,
- 'custom-editor': () => CustomEditorComponent,
- 'custom-string': () => CustomWidgetComponent,
- 'custom-datetime': () => CustomWidgetComponent,
- 'custom-file': () => CustomWidgetComponent,
- 'custom-number': () => CustomWidgetComponent,
- 'custom-something': () => CustomWidgetComponent,
- 'custom-boolean': () => CustomWidgetComponent,
- 'custom-date': () => CustomWidgetComponent,
- custom: () => CustomWidgetComponent
- });
- }
-
- logErrors(errorFields: FormFieldModel[]) {
- this.errorFields = errorFields;
- }
-
- ngOnInit() {
- this.formConfig = JSON.stringify(this.automationService.forms.getFormCloudDefinition());
- this.parseForm();
- }
-
- onFormSaved() {
- this.notificationService.openSnackMessage('Task has been saved successfully');
- }
-
- ngOnDestroy() {
- this.subscriptions.forEach((subscription) => subscription.unsubscribe());
- this.subscriptions = [];
- }
-
- onInitFormEditor(editor) {
- this.editor = editor;
- setTimeout(() => {
- this.editor.getAction('editor.action.formatDocument').run();
- }, 1000);
- }
-
- parseForm() {
- this.form = this.formService.parseForm(JSON.parse(this.formConfig));
- }
-
- onSaveFormConfig() {
- try {
- this.parseForm();
- } catch (error) {
- this.notificationService.openSnackMessage('Wrong form configuration');
- }
- }
-
- onClearFormConfig() {
- this.formConfig = '';
- }
-
- onConfigAdded($event: any): void {
- const file = $event.currentTarget.files[0];
-
- const fileReader = new FileReader();
- fileReader.onload = () => {
- this.formConfig = fileReader.result as string;
- };
- fileReader.readAsText(file);
-
- this.onInitFormEditor(this.editor);
-
- $event.target.value = '';
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.html b/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.html
deleted file mode 100644
index 4d6c90674a..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
- {{ecmUser | fullName}}
-
-
-
-
-
diff --git a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.scss b/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.scss
deleted file mode 100644
index b0c7c8f374..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.scss
+++ /dev/null
@@ -1,154 +0,0 @@
-@import 'styles/flex';
-
-.adf {
- &-userinfo-container {
- display: flex;
- align-items: center;
- padding: 0 5px;
- }
-
- &-userinfo-name-right {
- flex-direction: row-reverse;
- }
-
- &-userinfo-name {
- padding: 0 5px;
-
- @include layout-bp(lt-md) {
- display: none;
- }
- }
-
- &-userinfo-pic {
- background: var(--adf-theme-primary-300);
- display: inline-block;
- width: 40px;
- height: 40px;
- border-radius: 100px;
- text-align: center;
- font-weight: bolder;
- font-size: var(--theme-adf-picture-1-font-size);
- text-transform: uppercase;
- vertical-align: middle;
- line-height: 40px;
- }
-
- &-userinfo-profile-image {
- background: var(--adf-theme-primary-300);
- text-align: center;
- border-radius: 90%;
- width: 40px;
- height: 40px;
- margin-right: 0;
- cursor: pointer;
- vertical-align: middle;
- margin-left: 0;
- }
-
- &-userinfo-profile-container {
- display: inline-block;
- }
-
- &-userinfo-menu_button.adf-content-userinfo-button {
- margin-right: 0;
- border-radius: 90%;
- padding: 0;
- min-width: 40px;
- height: 40px;
- }
-
- &-userinfo-card-header {
- align-items: center;
- display: flex;
- justify-content: stretch;
- line-height: normal;
- height: 100px;
- box-sizing: border-box;
- }
-
- &-userinfo-card.adf-content-userinfo-card {
- padding: 0;
- }
-
- &-userinfo-supporting-text {
- overflow: hidden;
- padding: 32px;
- column-count: 2;
- display: flex;
- justify-content: space-between;
-
- @include layout-bp(lt-sm) {
- padding: 10px;
- }
- }
-
- &-userinfo__detail-title {
- text-overflow: ellipsis;
- }
-
- &-userinfo__secondary-info {
- font-size: var(--theme-body-1-font-size);
- font-weight: 400;
- letter-spacing: 0;
- line-height: 18px;
- align-items: flex-end;
- }
-
- &-userinfo-profile-picture {
- background: var(--adf-theme-primary-300);
- background-size: cover;
- border-radius: 50%;
- height: 80px;
- width: 80px;
- margin-left: 0;
- margin-right: 8px;
- }
-
- &-userinfo-profile-initials {
- text-transform: uppercase;
- background-size: cover;
- background-color: var(--adf-theme-primary-300);
- border-radius: 50%;
- height: 80px;
- width: 80px;
- margin-left: 0;
- margin-right: 8px;
- font-size: 35px;
- font-weight: 400;
- letter-spacing: 0;
- line-height: 78px;
- overflow: hidden;
- display: flex;
- justify-content: space-around;
- }
-
- &-userinfo-button-profile {
- display: inline-block;
- border: 0;
- vertical-align: middle;
- }
-
- &-userinfo-detail {
- text-align: left;
- }
-
- &-hide-small.adf-userinfo-profile-initials,
- &-hide-small.adf-userinfo-profile-container {
- @include layout-bp(lt-md) {
- display: none;
- }
- }
-}
-
-@media only screen and (device-width >= 480px) {
- .adf-content-userinfo-menu.adf-userinfo-menu {
- max-height: 450px;
- min-width: 450px;
- overflow: auto;
- padding: 0;
- }
-}
-
-.adf-content-userinfo-menu.adf-userinfo-menu > div {
- padding: 0;
-}
diff --git a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.ts b/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.ts
deleted file mode 100644
index bcbe2a8036..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/content-user-info/content-user-info.component.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { FullNamePipe, IdentityUserModel, InitialUsernamePipe, UserInfoMode } from '@alfresco/adf-core';
-import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
-import { MatMenuModule, MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
-import { Subject } from 'rxjs';
-import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
-import { CommonModule } from '@angular/common';
-import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
-import { TranslateModule } from '@ngx-translate/core';
-
-@Component({
- selector: 'adf-content-user-info',
- standalone: true,
- imports: [CommonModule, FullNamePipe, MatMenuModule, MatButtonModule, InitialUsernamePipe, MatCardModule, TranslateModule],
- templateUrl: './content-user-info.component.html',
- styleUrls: ['./content-user-info.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class ContentUserInfoComponent implements OnDestroy {
- @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger;
-
- /** Determines if user is logged in. */
- @Input()
- isLoggedIn: boolean;
-
- /** ECM user info. */
- @Input()
- ecmUser: EcmUserModel;
-
- /** Identity user info. */
- @Input()
- identityUser: IdentityUserModel;
-
- /** current mode. */
- @Input()
- mode: UserInfoMode = UserInfoMode.CONTENT;
-
- /** Custom path for the background banner image for ACS users. */
- @Input()
- ecmBackgroundImage: string = './resources/images/ecm-background.png';
-
- /** Custom path for the background banner image for APS users. */
- @Input()
- bpmBackgroundImage: string = './resources/images/bpm-background.png';
-
- /** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
- @Input()
- menuPositionX: MenuPositionX = 'after';
-
- /** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
- @Input()
- menuPositionY: MenuPositionY = 'below';
-
- /** Shows/hides the username next to the user info button. */
- @Input()
- showName: boolean = true;
-
- /**
- * When the username is shown, this defines its position relative to the user info button.
- * Can be `right` or `left`.
- */
- @Input()
- namePosition: string = 'right';
-
- userInfoMode = UserInfoMode;
-
- private destroy$ = new Subject();
-
- constructor(private peopleContentService: PeopleContentService) {}
-
- ngOnDestroy(): void {
- this.destroy$.next(true);
- this.destroy$.complete();
- }
-
- onKeyPress(event: KeyboardEvent) {
- this.closeUserModal(event);
- }
-
- private closeUserModal($event: KeyboardEvent) {
- if ($event.keyCode === 27) {
- this.trigger.closeMenu();
- }
- }
-
- stopClosing(event: Event) {
- event.stopPropagation();
- }
-
- getEcmAvatar(avatarId: string): string {
- return this.peopleContentService.getUserProfileImage(avatarId);
- }
-
- get showOnRight(): boolean {
- return this.namePosition === 'right';
- }
-
- get canShow(): boolean {
- return this.isLoggedIn && !!this.ecmUser && !!this.mode;
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/user-info/content-user-info/index.ts b/demo-shell/src/app/components/app-layout/user-info/content-user-info/index.ts
deleted file mode 100644
index 54beb1a252..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/content-user-info/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './public-api';
diff --git a/demo-shell/src/app/components/app-layout/user-info/content-user-info/public-api.ts b/demo-shell/src/app/components/app-layout/user-info/content-user-info/public-api.ts
deleted file mode 100644
index 57371f29d0..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/content-user-info/public-api.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './content-user-info.component';
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/index.ts b/demo-shell/src/app/components/app-layout/user-info/process-user-info/index.ts
deleted file mode 100644
index 54beb1a252..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './public-api';
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.html b/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.html
deleted file mode 100644
index afc551dec8..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
- {{bpmUser | fullName}}
-
-
-
-
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.scss b/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.scss
deleted file mode 100644
index 2c08a80b02..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.scss
+++ /dev/null
@@ -1,174 +0,0 @@
-@import 'styles/flex';
-@import 'styles/mat-selectors';
-
-.adf {
- &-userinfo-container {
- display: flex;
- align-items: center;
- padding: 0 5px;
- }
-
- &-userinfo-name-right {
- flex-direction: row-reverse;
- }
-
- &-userinfo-name {
- padding: 0 5px;
-
- @include layout-bp(lt-md) {
- display: none;
- }
- }
-
- &-userinfo-pic {
- background: var(--adf-theme-primary-300);
- display: inline-block;
- width: 40px;
- height: 40px;
- border-radius: 100px;
- text-align: center;
- font-weight: bolder;
- font-size: var(--theme-adf-picture-1-font-size);
- text-transform: uppercase;
- vertical-align: middle;
- line-height: 40px;
- }
-
- &-userinfo-profile-image {
- background: var(--adf-theme-primary-300);
- text-align: center;
- border-radius: 90%;
- width: 40px;
- height: 40px;
- margin-right: 0;
- cursor: pointer;
- vertical-align: middle;
- margin-left: 0;
- }
-
- &-userinfo-profile-container {
- display: inline-block;
- }
-
- &-userinfo-menu_button#{$mat-button} {
- margin-right: 0;
- border-radius: 90%;
- padding: 0;
- min-width: 40px;
- height: 40px;
- }
-
- &-userinfo-tab #{$mat-tab-header} {
- align-self: center;
- width: 100%;
- min-width: 250px;
- }
-
- &-userinfo-tab #{$mat-tab-label-text} {
- flex: auto;
- font-weight: 500;
- font-size: var(--theme-body-1-font-size);
- text-transform: uppercase;
- line-height: 48px;
- text-align: center;
- }
-
- &-userinfo-card-header {
- align-items: center;
- display: flex;
- justify-content: stretch;
- line-height: normal;
- height: 100px;
- box-sizing: border-box;
- }
-
- &-userinfo-card#{$mat-card} {
- padding: 0;
- }
-
- &-userinfo-supporting-text {
- overflow: hidden;
- padding: 32px;
- column-count: 2;
- display: flex;
- justify-content: space-between;
-
- @include layout-bp(lt-sm) {
- padding: 10px;
- }
- }
-
- &-userinfo__detail-title {
- text-overflow: ellipsis;
- }
-
- &-userinfo__secondary-info {
- font-size: var(--theme-body-1-font-size);
- font-weight: 400;
- letter-spacing: 0;
- line-height: 18px;
- align-items: flex-end;
- }
-
- &-userinfo-profile-picture {
- background: var(--adf-theme-primary-300);
- background-size: cover;
- border-radius: 50%;
- height: 80px;
- width: 80px;
- margin-left: 0;
- margin-right: 8px;
- }
-
- &-userinfo-profile-initials {
- text-transform: uppercase;
- background-size: cover;
- background-color: var(--adf-theme-primary-300);
- border-radius: 50%;
- height: 80px;
- width: 80px;
- margin-left: 0;
- margin-right: 8px;
- font-size: 35px;
- font-weight: 400;
- letter-spacing: 0;
- line-height: 78px;
- overflow: hidden;
- display: flex;
- justify-content: space-around;
- }
-
- &-userinfo-button-profile {
- display: inline-block;
- border: 0;
- vertical-align: middle;
- }
-
- &-userinfo-detail {
- text-align: left;
- }
-
- &-hide-tab.adf-userinfo-tab#tab-group-env {
- display: none;
- }
-
- &-hide-small.adf-userinfo-profile-initials,
- &-hide-small.adf-userinfo-profile-container {
- @include layout-bp(lt-md) {
- display: none;
- }
- }
-}
-
-@media only screen and (min-device-width: 480px) {
- #{$mat-menu-panel}.adf-userinfo-menu {
- max-height: 450px;
- min-width: 450px;
- overflow: auto;
- padding: 0;
- }
-}
-
-#{$mat-menu-panel}.adf-userinfo-menu #{$mat-menu-content} {
- padding: 0;
-}
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.spec.ts b/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.spec.ts
deleted file mode 100644
index aadfc0d03f..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.spec.ts
+++ /dev/null
@@ -1,230 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { CoreTestingModule, UserInfoMode } from '@alfresco/adf-core';
-import { fakeEcmUser, fakeEcmUserNoImage } from '@alfresco/adf-content-services';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { By } from '@angular/platform-browser';
-import { ProcessUserInfoComponent } from './process-user-info.component';
-import { HarnessLoader } from '@angular/cdk/testing';
-import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
-import { MatTabGroupHarness, MatTabHarness } from '@angular/material/tabs/testing';
-
-const fakeBpmUser: any = {
- apps: [],
- capabilities: null,
- company: 'fake-company',
- created: 'fake-create-date',
- email: 'fakeBpm@fake.com',
- externalId: 'fake-external-id',
- firstName: 'fake-bpm-first-name',
- lastName: 'fake-bpm-last-name',
- groups: [],
- id: 'fake-id',
- lastUpdate: 'fake-update-date',
- latestSyncTimeStamp: 'fake-timestamp',
- password: 'fake-password',
- pictureId: 12,
- status: 'fake-status',
- tenantId: 'fake-tenant-id',
- tenantName: 'fake-tenant-name',
- tenantPictureId: 'fake-tenant-picture-id',
- type: 'fake-type'
-};
-
-describe('ProcessUserInfoComponent', () => {
- const profilePictureUrl = 'alfresco-logo.svg';
-
- let component: ProcessUserInfoComponent;
- let fixture: ComponentFixture;
- let loader: HarnessLoader;
- let element: HTMLElement;
-
- const openUserInfo = () => {
- fixture.detectChanges();
- const imageButton = element.querySelector('#logged-user-img');
- imageButton.click();
- fixture.detectChanges();
- };
-
- const whenFixtureReady = async () => {
- fixture.detectChanges();
- await fixture.whenStable();
- fixture.detectChanges();
- };
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [CoreTestingModule, ProcessUserInfoComponent]
- });
- fixture = TestBed.createComponent(ProcessUserInfoComponent);
- component = fixture.componentInstance;
- loader = TestbedHarnessEnvironment.documentRootLoader(fixture);
- element = fixture.nativeElement;
-
- spyOn(window, 'requestAnimationFrame').and.returnValue(1);
- });
-
- afterEach(() => {
- fixture.destroy();
- });
-
- it('should not show any image if the user is not logged in', () => {
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(element.querySelector('#logged-user-img')).toBeNull();
- });
-
- it('should NOT have users immediately after ngOnInit', () => {
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(element.querySelector('#ecm_username')).toBeNull();
- expect(element.querySelector('#bpm_username')).toBeNull();
- expect(element.querySelector('#user-profile-lists')).toBeNull();
- });
-
- describe('when user is logged on bpm', () => {
- beforeEach(async () => {
- component.bpmUser = fakeBpmUser;
- component.isLoggedIn = true;
- });
-
- it('should show full name next the user image', async () => {
- await whenFixtureReady();
- openUserInfo();
- const bpmUserName = fixture.debugElement.query(By.css('#bpm-username'));
- expect(element.querySelector('#userinfo_container')).not.toBeNull();
- expect(bpmUserName).toBeDefined();
- expect(bpmUserName).not.toBeNull();
- expect(bpmUserName.nativeElement.innerHTML).toContain('fake-bpm-first-name fake-bpm-last-name');
- });
-
- it('should get the bpm current user image from the service', async () => {
- spyOn(component, 'getBpmUserImage').and.returnValue(profilePictureUrl);
- await whenFixtureReady();
- expect(element.querySelector('#userinfo_container')).not.toBeNull();
- expect(element.querySelector('#logged-user-img')).not.toBeNull();
- expect(element.querySelector('#logged-user-img').getAttribute('src')).toContain(profilePictureUrl);
- });
-
- it('should show last name if first name is null', async () => {
- component.bpmUser = {
- firstName: null,
- lastName: 'fake-last-name'
- } as any;
- await whenFixtureReady();
- const fullNameElement = element.querySelector('#adf-userinfo-bpm-name-display');
- fixture.detectChanges();
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(element.querySelector('#adf-userinfo-bpm-name-display')).not.toBeNull();
- expect(fullNameElement.textContent).toContain('fake-last-name');
- expect(fullNameElement.textContent).not.toContain('fake-first-name');
- });
-
- it('should not show the tabs', async () => {
- await whenFixtureReady();
- openUserInfo();
- const tabGroupHost = await (await loader.getHarness(MatTabGroupHarness.with({ selector: '#tab-group-env' }))).host();
- expect(await tabGroupHost.hasClass('adf-hide-tab')).toBeTruthy();
- });
- });
-
- describe('when user is logged on bpm and ecm', () => {
- beforeEach(async () => {
- component.bpmUser = fakeBpmUser;
- component.ecmUser = fakeEcmUser as any;
- component.isLoggedIn = true;
- component.mode = UserInfoMode.ALL;
- });
-
- it('should show the tabs', async () => {
- await whenFixtureReady();
- openUserInfo();
- const tabGroupHost = await (await loader.getHarness(MatTabGroupHarness.with({ selector: '#tab-group-env' }))).host();
- expect(await tabGroupHost.hasClass('adf-hide-tab')).toBeFalsy();
- });
-
- it('should get the bpm user information', async () => {
- spyOn(component, 'getBpmUserImage').and.returnValue(profilePictureUrl);
- await whenFixtureReady();
- openUserInfo();
- const bpmTab = await loader.getHarness(MatTabHarness.with({ label: 'USER_PROFILE.TAB.PS' }));
- await bpmTab.select();
- const bpmUsername = fixture.debugElement.query(By.css('#bpm-username'));
- const bpmImage = fixture.debugElement.query(By.css('#bpm-user-detail-image'));
- expect(element.querySelector('#userinfo_container')).not.toBeNull();
- expect(bpmUsername).not.toBeNull();
- expect(bpmImage).not.toBeNull();
- expect(bpmImage.properties.src).toContain(profilePictureUrl);
- expect(bpmUsername.nativeElement.textContent).toContain('fake-bpm-first-name fake-bpm-last-name');
- expect(fixture.debugElement.query(By.css('#bpm-tenant')).nativeElement.textContent).toContain('fake-tenant-name');
- });
-
- it('should get the ecm user information', async () => {
- spyOn(component, 'getEcmAvatar').and.returnValue(profilePictureUrl);
- await whenFixtureReady();
- openUserInfo();
- const ecmUsername = fixture.debugElement.query(By.css('#ecm-username'));
- const ecmImage = fixture.debugElement.query(By.css('#ecm-user-detail-image'));
-
- fixture.detectChanges();
- await fixture.whenStable();
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(ecmUsername).not.toBeNull();
- expect(ecmImage).not.toBeNull();
- expect(ecmImage.properties.src).toContain(profilePictureUrl);
- expect(fixture.debugElement.query(By.css('#ecm-full-name')).nativeElement.textContent).toContain(
- 'fake-ecm-first-name fake-ecm-last-name'
- );
- expect(fixture.debugElement.query(By.css('#ecm-job-title')).nativeElement.textContent).toContain('job-ecm-test');
- });
-
- it('should show the ecm image if exists', async () => {
- spyOn(component, 'getEcmAvatar').and.returnValue(profilePictureUrl);
- await whenFixtureReady();
- openUserInfo();
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(element.querySelector('#logged-user-img')).toBeDefined();
- expect(element.querySelector('#logged-user-img').getAttribute('src')).toEqual(profilePictureUrl);
- });
-
- it('should show the ecm initials if the ecm user has no image', async () => {
- component.ecmUser = fakeEcmUserNoImage as any;
- await whenFixtureReady();
-
- expect(element.querySelector('#userinfo_container')).toBeDefined();
- expect(element.querySelector('[data-automation-id="user-initials-image"]').textContent).toContain('ff');
- });
-
- it('should show the tabs for the env', async () => {
- await whenFixtureReady();
- openUserInfo();
- const tabGroup = await loader.getHarness(MatTabGroupHarness.with({ selector: '#tab-group-env' }));
- const tabs = await tabGroup.getTabs();
-
- expect(await (await tabGroup.host()).hasClass('adf-hide-tab')).toBeFalsy();
- expect(tabs.length).toBe(2);
- });
-
- it('should not close the menu when a tab is clicked', async () => {
- await whenFixtureReady();
- openUserInfo();
- const bpmTab = await loader.getHarness(MatTabHarness.with({ label: 'USER_PROFILE.TAB.PS' }));
-
- bpmTab.select();
- expect(fixture.debugElement.query(By.css('#user-profile-lists'))).not.toBeNull();
- });
- });
-});
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.ts b/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.ts
deleted file mode 100644
index 692c58e053..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/process-user-info.component.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { FullNamePipe, InitialUsernamePipe, UserInfoMode } from '@alfresco/adf-core';
-import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
-import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
-import { MatMenuModule, MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
-import { Subject } from 'rxjs';
-import { PeopleProcessService } from '@alfresco/adf-process-services';
-import { UserRepresentation } from '@alfresco/js-api';
-import { CommonModule } from '@angular/common';
-import { MatButtonModule } from '@angular/material/button';
-import { MatTabsModule } from '@angular/material/tabs';
-import { TranslateModule } from '@ngx-translate/core';
-import { MatCardModule } from '@angular/material/card';
-
-@Component({
- selector: 'adf-process-user-info',
- standalone: true,
- imports: [CommonModule, FullNamePipe, MatButtonModule, MatMenuModule, InitialUsernamePipe, MatTabsModule, TranslateModule, MatCardModule],
- templateUrl: './process-user-info.component.html',
- styleUrls: ['./process-user-info.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class ProcessUserInfoComponent implements OnDestroy {
- @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger;
-
- /** Determines if user is logged in. */
- @Input()
- isLoggedIn: boolean;
-
- /** BPM user info. */
- @Input()
- bpmUser: UserRepresentation;
-
- /** ECM user info. */
- @Input()
- ecmUser: EcmUserModel;
-
- /** current mode. */
- @Input()
- mode: UserInfoMode = UserInfoMode.PROCESS;
-
- /** Custom path for the background banner image for APS users. */
- @Input()
- bpmBackgroundImage: string = './resources/images/bpm-background.png';
-
- /** Custom path for the background banner image for ACS users. */
- @Input()
- ecmBackgroundImage: string = './resources/images/ecm-background.png';
-
- /** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
- @Input()
- menuPositionX: MenuPositionX = 'after';
-
- /** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
- @Input()
- menuPositionY: MenuPositionY = 'below';
-
- /** Shows/hides the username next to the user info button. */
- @Input()
- showName: boolean = true;
-
- /**
- * When the username is shown, this defines its position relative to the user info button.
- * Can be `right` or `left`.
- */
- @Input()
- namePosition: string = 'right';
-
- userInfoMode = UserInfoMode;
-
- private destroy$ = new Subject();
-
- constructor(private peopleProcessService: PeopleProcessService, private peopleContentService: PeopleContentService) {}
-
- ngOnDestroy(): void {
- this.destroy$.next(true);
- this.destroy$.complete();
- }
-
- onKeyPress(event: KeyboardEvent) {
- this.closeUserModal(event);
- }
-
- private closeUserModal($event: KeyboardEvent) {
- if ($event.keyCode === 27) {
- this.trigger.closeMenu();
- }
- }
-
- stopClosing(event: Event) {
- event.stopPropagation();
- }
-
- getBpmUserImage(): string {
- return this.peopleProcessService.getCurrentUserProfileImage();
- }
-
- getEcmAvatar(avatarId: string): string {
- return this.peopleContentService.getUserProfileImage(avatarId);
- }
-
- get showOnRight(): boolean {
- return this.namePosition === 'right';
- }
-
- get canShow(): boolean {
- return this.isLoggedIn && !!this.bpmUser && !!this.mode;
- }
-}
diff --git a/demo-shell/src/app/components/app-layout/user-info/process-user-info/public-api.ts b/demo-shell/src/app/components/app-layout/user-info/process-user-info/public-api.ts
deleted file mode 100644
index b409d7274b..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/process-user-info/public-api.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './process-user-info.component';
diff --git a/demo-shell/src/app/components/app-layout/user-info/user-info.component.html b/demo-shell/src/app/components/app-layout/user-info/user-info.component.html
deleted file mode 100644
index e4820fb808..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/user-info.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
diff --git a/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts b/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts
deleted file mode 100644
index 03345a005b..0000000000
--- a/demo-shell/src/app/components/app-layout/user-info/user-info.component.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
-import { PeopleProcessService } from '@alfresco/adf-process-services';
-import {
- AuthenticationService,
- BasicAlfrescoAuthService,
- IdentityUserInfoComponent,
- 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';
-import { CommonModule } from '@angular/common';
-import { UserRepresentation } from '@alfresco/js-api';
-import { ContentUserInfoComponent } from './content-user-info';
-import { ProcessUserInfoComponent } from './process-user-info';
-
-@Component({
- selector: 'app-shell-user-info',
- standalone: true,
- imports: [CommonModule, ContentUserInfoComponent, IdentityUserInfoComponent, ProcessUserInfoComponent],
- templateUrl: './user-info.component.html'
-})
-export class UserInfoComponent implements OnInit {
- /** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
- @Input()
- menuPositionX: MenuPositionX = 'after';
-
- /** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
- @Input()
- menuPositionY: MenuPositionY = 'below';
-
- mode: UserInfoMode;
- ecmUser$: Observable;
- bpmUser$: Observable;
- identityUser$: Observable;
- userInfoMode = UserInfoMode;
-
- constructor(
- private peopleContentService: PeopleContentService,
- private peopleProcessService: PeopleProcessService,
- private identityUserService: IdentityUserService,
- private basicAlfrescoAuthService: BasicAlfrescoAuthService,
- private authService: AuthenticationService
- ) {}
-
- ngOnInit() {
- this.getUserInfo();
- }
-
- getUserInfo() {
- if (this.authService.isOauth()) {
- this.loadIdentityUserInfo();
- this.mode = UserInfoMode.SSO;
-
- if (this.authService.isECMProvider() && this.authService.isEcmLoggedIn()) {
- this.mode = UserInfoMode.CONTENT_SSO;
- this.loadEcmUserInfo();
- }
- } else if (this.isAllLoggedIn()) {
- this.loadEcmUserInfo();
- this.loadBpmUserInfo();
- this.mode = UserInfoMode.ALL;
- } else if (this.isEcmLoggedIn()) {
- this.loadEcmUserInfo();
- this.mode = UserInfoMode.CONTENT;
- } else if (this.isBpmLoggedIn()) {
- this.loadBpmUserInfo();
- this.mode = UserInfoMode.PROCESS;
- }
- }
-
- get isLoggedIn(): boolean {
- if (this.basicAlfrescoAuthService.isKerberosEnabled()) {
- return true;
- }
- return this.authService.isLoggedIn();
- }
-
- private loadEcmUserInfo(): void {
- this.ecmUser$ = this.peopleContentService.getCurrentUserInfo();
- }
-
- private loadBpmUserInfo() {
- this.bpmUser$ = this.peopleProcessService.getCurrentUserInfo();
- }
-
- private loadIdentityUserInfo() {
- this.identityUser$ = of(this.identityUserService.getCurrentUserInfo());
- }
-
- private isAllLoggedIn() {
- return (
- (this.authService.isEcmLoggedIn() && this.authService.isBpmLoggedIn()) ||
- (this.authService.isALLProvider() && this.basicAlfrescoAuthService.isKerberosEnabled())
- );
- }
-
- private isBpmLoggedIn() {
- return this.authService.isBpmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled());
- }
-
- private isEcmLoggedIn() {
- return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.basicAlfrescoAuthService.isKerberosEnabled());
- }
-}
diff --git a/demo-shell/src/app/components/card-view/card-view.component.html b/demo-shell/src/app/components/card-view/card-view.component.html
deleted file mode 100644
index 03a2cb9566..0000000000
--- a/demo-shell/src/app/components/card-view/card-view.component.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
CardView Component
-
-
-
-
-
-
Changes log:
-
{{ log }}
-
-
-
-
-
-
- Editable
-
-
- Show clear date icon
-
-
- Show none option
-
-
- Show label for chips property
-
-
-
-
diff --git a/demo-shell/src/app/components/card-view/card-view.component.scss b/demo-shell/src/app/components/card-view/card-view.component.scss
deleted file mode 100644
index 2f736a1e94..0000000000
--- a/demo-shell/src/app/components/card-view/card-view.component.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-.app-main-content {
- padding: 0 15px;
-}
-
-adf-card-view {
- width: 30%;
- display: inline-block;
-}
-
-.app-console {
- width: 60%;
- display: inline-block;
- vertical-align: top;
- margin-left: 10px;
- height: 500px;
- overflow: scroll;
- padding-bottom: 30px;
-
- h3 {
- margin-top: 0;
- }
-
- p {
- display: block;
- font-family: monospace;
- margin: 0;
- }
-}
diff --git a/demo-shell/src/app/components/card-view/card-view.component.ts b/demo-shell/src/app/components/card-view/card-view.component.ts
deleted file mode 100644
index 0a0e685a20..0000000000
--- a/demo-shell/src/app/components/card-view/card-view.component.ts
+++ /dev/null
@@ -1,289 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, OnDestroy } from '@angular/core';
-import {
- CardViewTextItemModel,
- CardViewDateItemModel,
- CardViewDatetimeItemModel,
- CardViewBoolItemModel,
- CardViewIntItemModel,
- CardViewFloatItemModel,
- CardViewKeyValuePairsItemModel,
- CardViewSelectItemModel,
- CardViewUpdateService,
- CardViewMapItemModel,
- UpdateNotification,
- DecimalNumberPipe,
- CardViewArrayItemModel,
- CardViewComponent
-} from '@alfresco/adf-core';
-import { of, Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { CommonModule } from '@angular/common';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { MatButtonModule } from '@angular/material/button';
-
-@Component({
- standalone: true,
- imports: [CommonModule, MatSlideToggleModule, MatButtonModule, CardViewComponent],
- templateUrl: './card-view.component.html',
- styleUrls: ['./card-view.component.scss']
-})
-export class AppCardViewComponent implements OnInit, OnDestroy {
- isEditable = true;
- properties: any;
- logs: string[];
- showClearDateAction = false;
- showNoneOption = false;
- showLabelForChips = false;
-
- private onDestroy$ = new Subject();
-
- constructor(private cardViewUpdateService: CardViewUpdateService, private decimalNumberPipe: DecimalNumberPipe) {
- this.logs = [];
- this.createCard();
- }
-
- respondToCardClick() {
- this.logs.push(`clickable field`);
- }
-
- ngOnInit() {
- this.cardViewUpdateService.itemUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe(this.onItemChange.bind(this));
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- createCard() {
- this.properties = [
- new CardViewTextItemModel({
- label: 'CardView Text Item',
- value: 'Spock',
- key: 'name',
- default: 'default bar',
- editable: this.isEditable
- }),
- new CardViewTextItemModel({
- label: 'CardView Text Item - Protected value',
- value: 'Spock',
- key: 'name',
- default: 'default bar',
- multiline: false,
- icon: 'icon',
- editable: false
- }),
- new CardViewTextItemModel({
- label: 'CardView Text Item - Multiline',
- value: 'Spock',
- key: 'name',
- default: 'default bar',
- multiline: true,
- icon: 'icon',
- editable: this.isEditable
- }),
- new CardViewTextItemModel({
- label: 'CardView Text Item - Default Value',
- value: '',
- key: 'name',
- default: 'default bar',
- multiline: false,
- icon: 'icon',
- editable: this.isEditable
- }),
- new CardViewTextItemModel({
- label: 'CardView Text Item - Multivalue (chips)',
- value: [1, 2, 3],
- key: 'name',
- default: 'default bar',
- multiline: true,
- multivalued: true,
- icon: 'icon',
- editable: this.isEditable
- }),
- new CardViewDateItemModel({
- label: 'CardView Date Item',
- value: new Date('1983-11-24T00:00:00Z'),
- key: 'date',
- default: new Date('1983-11-24T00:00:00Z'),
- format: 'shortDate',
- editable: this.isEditable
- }),
- new CardViewDateItemModel({
- label: 'CardView Date Item - Multivalue (chips)',
- value: [new Date('1983-11-24T00:00:00Z')],
- key: 'date',
- default: new Date('1983-11-24T00:00:00Z'),
- format: 'shortDate',
- editable: this.isEditable,
- multivalued: true
- }),
- new CardViewDatetimeItemModel({
- label: 'CardView Datetime Item',
- value: new Date(1983, 11, 24, 10, 0, 0),
- key: 'datetime',
- default: new Date(1983, 11, 24, 10, 0, 0),
- format: 'short',
- editable: this.isEditable
- }),
- new CardViewDatetimeItemModel({
- label: 'CardView Datetime Item - Multivalue (chips)',
- value: [new Date(1983, 11, 24, 10, 0, 0)],
- key: 'datetime',
- default: new Date(1983, 11, 24, 10, 0, 0),
- format: 'short',
- editable: this.isEditable,
- multivalued: true
- }),
- new CardViewBoolItemModel({
- label: 'CardView Boolean Item',
- value: true,
- key: 'boolean',
- default: false,
- editable: this.isEditable
- }),
- new CardViewBoolItemModel({
- label: 'Agree to all terms and conditions',
- value: true,
- key: 'boolean',
- default: false,
- editable: this.isEditable
- }),
- new CardViewIntItemModel({
- label: 'CardView Int Item',
- value: 213,
- key: 'int',
- default: 1,
- editable: this.isEditable
- }),
- new CardViewFloatItemModel({
- label: 'CardView Float Item',
- value: 9.9,
- key: 'float',
- default: 0.0,
- editable: this.isEditable,
- pipes: [{ pipe: this.decimalNumberPipe }]
- }),
- new CardViewFloatItemModel({
- label: 'CardView Float Item - Multivalue (chips)',
- value: [9.9],
- key: 'float',
- default: 0.0,
- editable: this.isEditable,
- multivalued: true,
- pipes: [{ pipe: this.decimalNumberPipe }]
- }),
- new CardViewKeyValuePairsItemModel({
- label: 'CardView Key-Value Pairs Item',
- 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' }
- ],
- key: 'key-value-pairs',
- editable: false
- }),
- new CardViewSelectItemModel({
- label: 'CardView Select Item',
- value: 'one',
- options$: of([
- { key: 'one', label: 'One' },
- { key: 'two', label: 'Two' }
- ]),
- key: 'select',
- editable: this.isEditable
- }),
- new CardViewMapItemModel({
- label: 'My map',
- value: new Map([['999', 'My Value']]),
- key: 'map',
- default: 'default map value'
- }),
- new CardViewTextItemModel({
- label: 'This is clickable ',
- value: 'click here',
- key: 'click',
- default: 'click here',
- editable: this.isEditable,
- clickable: true,
- icon: 'close',
- clickCallBack: () => {
- this.respondToCardClick();
- }
- }),
- new CardViewArrayItemModel({
- label: 'CardView Array of items',
- value: of([
- { icon: 'directions_bike', value: 'Zlatan' },
- { icon: 'directions_bike', value: 'Lionel Messi' },
- // eslint-disable-next-line @typescript-eslint/naming-convention
- { value: 'Mohamed', directions_bike: 'save' },
- { value: 'Ronaldo' }
- ]),
- key: 'array',
- icon: 'edit',
- default: 'Empty',
- noOfItemsToDisplay: 2,
- editable: this.isEditable
- })
- ];
- }
-
- onItemChange(notification: UpdateNotification) {
- let value = notification.changed[notification.target.key];
-
- if (notification.target.type === 'keyvaluepairs') {
- value = JSON.stringify(value);
- }
-
- this.logs.push(`[${notification.target.label}] - ${value}`);
- }
-
- toggleEditable() {
- this.isEditable = !this.isEditable;
- this.createCard();
- }
-
- toggleClearDate() {
- this.showClearDateAction = !this.showClearDateAction;
- }
-
- toggleNoneOption() {
- this.showNoneOption = !this.showNoneOption;
- }
-
- toggleLabelForChips() {
- this.showLabelForChips = !this.showLabelForChips;
- }
-
- reset() {
- this.isEditable = true;
- this.createCard();
- this.logs = [];
- }
-}
diff --git a/demo-shell/src/app/components/cloud/apps-cloud-demo.component.html b/demo-shell/src/app/components/cloud/apps-cloud-demo.component.html
deleted file mode 100644
index a7bcd4d9ae..0000000000
--- a/demo-shell/src/app/components/cloud/apps-cloud-demo.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/demo-shell/src/app/components/cloud/apps-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/apps-cloud-demo.component.ts
deleted file mode 100644
index b444da185c..0000000000
--- a/demo-shell/src/app/components/cloud/apps-cloud-demo.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { Router } from '@angular/router';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { AppListCloudModule } from '@alfresco/adf-process-services-cloud';
-
-@Component({
- standalone: true,
- imports: [AppListCloudModule],
- templateUrl: './apps-cloud-demo.component.html'
-})
-export class AppsCloudDemoComponent {
- constructor(private router: Router, private cloudLayoutService: CloudLayoutService) {}
-
- onAppClick(app) {
- this.cloudLayoutService.setCurrentTaskFilterParam({ key: 'my-tasks' });
- this.router.navigate([`/cloud/${app.name}`]);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.html b/demo-shell/src/app/components/cloud/cloud-filters-demo.component.html
deleted file mode 100644
index 3e3887d1b4..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
- Task Filters
-
-
-
-
-
-
-
-
-
- Process Filters
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.scss b/demo-shell/src/app/components/cloud/cloud-filters-demo.component.scss
deleted file mode 100644
index 4c7032fc38..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-app-cloud-task-filters .app-filters__entry,
-app-cloud-process-filters .app-filters__entry {
- padding-left: 0;
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.ts b/demo-shell/src/app/components/cloud/cloud-filters-demo.component.ts
deleted file mode 100644
index 22a59b2e8d..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-filters-demo.component.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation, Input, OnInit } from '@angular/core';
-import { Observable } from 'rxjs';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { Router, ActivatedRoute } from '@angular/router';
-import { CloudProcessFiltersService } from './services/cloud-process-filters.service';
-import { ProcessFilterCloudModel, ProcessFiltersCloudModule, TaskFiltersCloudModule } from '@alfresco/adf-process-services-cloud';
-import { CommonModule } from '@angular/common';
-import { MatExpansionModule } from '@angular/material/expansion';
-@Component({
- selector: 'app-cloud-filters-demo',
- standalone: true,
- imports: [CommonModule, MatExpansionModule, TaskFiltersCloudModule, ProcessFiltersCloudModule],
- templateUrl: './cloud-filters-demo.component.html',
- styleUrls: ['./cloud-filters-demo.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class CloudFiltersDemoComponent implements OnInit {
- @Input()
- appName: string;
-
- currentTaskFilter$: Observable;
- currentProcessFilter$: Observable;
-
- toggleTaskFilter = true;
- toggleProcessFilter = true;
-
- expandTaskFilter = true;
- expandProcessFilter = false;
-
- constructor(
- private cloudLayoutService: CloudLayoutService,
- private router: Router,
- private route: ActivatedRoute,
- private cloudProcessFiltersService: CloudProcessFiltersService
- ) {}
-
- ngOnInit() {
- this.currentTaskFilter$ = this.cloudLayoutService.taskFilter$;
- this.currentProcessFilter$ = this.cloudLayoutService.processFilter$;
-
- let root = '';
- if (this.route.snapshot?.firstChild) {
- root = this.route.snapshot.firstChild.url[0].path;
- if (root === 'tasks') {
- this.expandTaskFilter = true;
- this.expandProcessFilter = false;
- } else if (root === 'processes') {
- this.expandProcessFilter = true;
- this.expandTaskFilter = false;
- }
- }
- }
-
- onTaskFilterSelected(filter) {
- if (filter) {
- this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filter });
- }
- }
-
- onProcessFilterSelected(filter: ProcessFilterCloudModel) {
- if (filter) {
- const { appName } = this;
- const { id } = filter;
-
- const queryParams = this.cloudProcessFiltersService.writeQueryParams(filter, appName, id);
- this.router.navigate([`/cloud/${appName}/processes/`], { queryParams });
- }
- }
-
- onTaskFilterOpen(): boolean {
- this.expandTaskFilter = true;
- this.expandProcessFilter = false;
- return this.toggleTaskFilter;
- }
-
- onTaskFilterClose(): boolean {
- return !this.toggleTaskFilter;
- }
-
- onProcessFilterOpen(): boolean {
- this.expandProcessFilter = true;
- this.expandTaskFilter = false;
- return this.toggleProcessFilter;
- }
-
- onProcessFilterClose(): boolean {
- return !this.toggleProcessFilter;
- }
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-layout.component.html b/demo-shell/src/app/components/cloud/cloud-layout.component.html
deleted file mode 100644
index 89820441c0..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-layout.component.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- {{appName}}
- {{ ' > ' + (filterName | translate)}}
-
-
-
-
-
-
- arrow_drop_down
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/cloud/cloud-layout.component.scss b/demo-shell/src/app/components/cloud/cloud-layout.component.scss
deleted file mode 100644
index 433d0c5756..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-layout.component.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-@import 'styles/mat-selectors';
-
-.app-cloud-layout-overflow {
- overflow: auto;
-}
-
-app-cloud-layout {
- .app-cloud-layout-tab-body {
- height: 100%;
- min-height: 100%;
- min-width: 100%;
- width: 100%;
-
- adf-sidenav-layout {
- flex-direction: row;
- box-sizing: border-box;
- display: flex;
- }
-
- & > div {
- height: 100%;
- }
- }
-
- .app-cloud-layout-toolbar {
- display: flex;
- }
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-layout.component.ts b/demo-shell/src/app/components/cloud/cloud-layout.component.ts
deleted file mode 100644
index 3929371119..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-layout.component.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, ViewEncapsulation } from '@angular/core';
-import { Router, ActivatedRoute, RouterOutlet } from '@angular/router';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { CommonModule } from '@angular/common';
-import { MatTabsModule } from '@angular/material/tabs';
-import {
- SidebarActionMenuComponent,
- SidenavLayoutComponent,
- SidenavLayoutContentDirective,
- SidenavLayoutHeaderDirective,
- SidenavLayoutNavigationDirective
-} from '@alfresco/adf-core';
-import { TranslateModule } from '@ngx-translate/core';
-import { MatIconModule } from '@angular/material/icon';
-import { MatMenuModule } from '@angular/material/menu';
-import { CloudFiltersDemoComponent } from './cloud-filters-demo.component';
-import { CloudSettingsComponent } from './shared/cloud-settings.component';
-
-@Component({
- selector: 'app-cloud-layout',
- standalone: true,
- imports: [
- CommonModule,
- MatTabsModule,
- SidenavLayoutComponent,
- TranslateModule,
- SidenavLayoutHeaderDirective,
- SidenavLayoutNavigationDirective,
- SidebarActionMenuComponent,
- MatIconModule,
- MatMenuModule,
- SidenavLayoutContentDirective,
- RouterOutlet,
- CloudFiltersDemoComponent,
- CloudSettingsComponent
- ],
- templateUrl: './cloud-layout.component.html',
- styleUrls: ['./cloud-layout.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class CloudLayoutComponent implements OnInit {
- appName: string;
- filterName: string;
-
- constructor(private router: Router, private route: ActivatedRoute, private cloudLayoutService: CloudLayoutService) {}
-
- ngOnInit() {
- let root: string = '';
- this.route.params.subscribe((params) => {
- this.appName = params.appName;
- });
-
- if (this.route.snapshot?.firstChild) {
- root = this.route.snapshot.firstChild.url[0].path;
- }
-
- this.route.queryParams.subscribe((params) => {
- if (root === 'tasks' && params.id) {
- this.cloudLayoutService.setCurrentTaskFilterParam({ id: params.id });
- }
-
- if (root === 'processes' && params.id) {
- this.cloudLayoutService.setCurrentProcessFilterParam({ id: params.id });
- }
-
- if (params.filterName) {
- this.filterName = params.filterName;
- }
- });
- }
-
- onStartTask() {
- this.router.navigate([`/cloud/${this.appName}/start-task/`]);
- }
-
- onStartProcess() {
- this.router.navigate([`/cloud/${this.appName}/start-process/`]);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-viewer.component.css b/demo-shell/src/app/components/cloud/cloud-viewer.component.css
deleted file mode 100644
index 0e5cdfdd65..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-viewer.component.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.activiti-form-viewer {
- margin: 10px;
-}
diff --git a/demo-shell/src/app/components/cloud/cloud-viewer.component.html b/demo-shell/src/app/components/cloud/cloud-viewer.component.html
deleted file mode 100644
index dd2808c4ac..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-viewer.component.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/demo-shell/src/app/components/cloud/cloud-viewer.component.ts b/demo-shell/src/app/components/cloud/cloud-viewer.component.ts
deleted file mode 100644
index d0e4ab2c16..0000000000
--- a/demo-shell/src/app/components/cloud/cloud-viewer.component.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute, Params } from '@angular/router';
-import { AlfrescoViewerComponent } from '@alfresco/adf-content-services';
-
-@Component({
- selector: 'app-cloud-viewer',
- standalone: true,
- imports: [AlfrescoViewerComponent],
- templateUrl: './cloud-viewer.component.html'
-})
-export class CloudViewerComponent implements OnInit {
- nodeId: string;
-
- constructor(private route: ActivatedRoute) {}
-
- ngOnInit() {
- this.route.params.subscribe((params: Params) => {
- this.nodeId = params['nodeId'];
- });
- }
-}
diff --git a/demo-shell/src/app/components/cloud/custom-form-components/custom-editor.component.ts b/demo-shell/src/app/components/cloud/custom-form-components/custom-editor.component.ts
deleted file mode 100644
index 694e273891..0000000000
--- a/demo-shell/src/app/components/cloud/custom-form-components/custom-editor.component.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ErrorWidgetComponent, FormService, WidgetComponent } from '@alfresco/adf-core';
-import { CommonModule } from '@angular/common';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { TranslateModule } from '@ngx-translate/core';
-import { FormsModule } from '@angular/forms';
-/* eslint-disable @angular-eslint/component-selector */
-
-@Component({
- selector: 'custom-editor-widget',
- standalone: true,
- template: ` ADF version of custom form widget
`
-})
-export class CustomEditorComponent extends WidgetComponent {
- constructor() {
- super();
- }
-}
-
-@Component({
- selector: 'app-sample-widget',
- standalone: true,
- imports: [CommonModule, MatFormFieldModule, MatInputModule, TranslateModule, FormsModule, ErrorWidgetComponent],
- template: `
-
-
-
- {{ field.value }}
-
-
-
-
-
- {{ field.placeholder }}
-
-
-
-
- `
-})
-export class CustomWidgetComponent extends WidgetComponent implements OnInit {
- constructor(public formService: FormService) {
- super(formService);
- }
-
- ngOnInit() {
- this.field.value = typeof this.field.value === 'object' ? JSON.stringify(this.field.value) : this.field.value;
- }
-}
diff --git a/demo-shell/src/app/components/cloud/process-cloud-layout.component.ts b/demo-shell/src/app/components/cloud/process-cloud-layout.component.ts
deleted file mode 100644
index 30d3d6c8a9..0000000000
--- a/demo-shell/src/app/components/cloud/process-cloud-layout.component.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { FormRenderingService } from '@alfresco/adf-core';
-import { CloudFormRenderingService } from '@alfresco/adf-process-services-cloud';
-import { CustomEditorComponent, CustomWidgetComponent } from './custom-form-components/custom-editor.component';
-import { RouterOutlet } from '@angular/router';
-
-@Component({
- template: ``,
- standalone: true,
- imports: [RouterOutlet],
- providers: [{ provide: FormRenderingService, useClass: CloudFormRenderingService }]
-})
-export class ProcessCloudLayoutComponent {
- constructor(private formRenderingService: FormRenderingService) {
- this.formRenderingService.register({
- 'custom-editor': () => CustomEditorComponent,
- 'demo-widget': () => CustomEditorComponent,
- 'custom-string': () => CustomWidgetComponent,
- 'custom-datetime': () => CustomWidgetComponent,
- 'custom-file': () => CustomWidgetComponent,
- 'custom-number': () => CustomWidgetComponent,
- 'custom-something': () => CustomWidgetComponent,
- 'custom-boolean': () => CustomWidgetComponent,
- 'custom-date': () => CustomWidgetComponent,
- custom: () => CustomWidgetComponent
- });
- }
-}
diff --git a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.html b/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.html
deleted file mode 100644
index 66bc74d19c..0000000000
--- a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-Simple page to show the process instance: {{ processInstanceId }} of the app: {{ appName }}
-
-
diff --git a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.scss b/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.scss
deleted file mode 100644
index 02457315d0..0000000000
--- a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-app-process-details-cloud-demo {
- .app {
- &-process-cloud-container {
- display: flex;
- }
-
- &-cloud-layout-overflow {
- width: 67%;
- flex: 1;
- }
-
- &-process-cloud-header {
- margin-left: 10px;
- width: 25%;
- }
- }
-}
diff --git a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.ts
deleted file mode 100644
index 13008e79d8..0000000000
--- a/demo-shell/src/app/components/cloud/process-details-cloud-demo.component.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { MatIconModule } from '@angular/material/icon';
-import { MatButtonModule } from '@angular/material/button';
-import { ProcessHeaderCloudModule, TaskListCloudModule } from '@alfresco/adf-process-services-cloud';
-
-@Component({
- selector: 'app-process-details-cloud-demo',
- standalone: true,
- imports: [MatIconModule, MatButtonModule, TaskListCloudModule, ProcessHeaderCloudModule],
- templateUrl: './process-details-cloud-demo.component.html',
- styleUrls: ['./process-details-cloud-demo.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class ProcessDetailsCloudDemoComponent {
- processInstanceId: string;
- appName: string;
-
- constructor(private route: ActivatedRoute, private router: Router) {
- this.route.params.subscribe((params) => {
- this.processInstanceId = params.processInstanceId;
- });
-
- this.route.parent.params.subscribe((params) => {
- this.appName = params.appName;
- });
- }
-
- onGoBack() {
- this.router.navigate([`/cloud/${this.appName}/`]);
- }
-
- onRowClick(taskId: string) {
- if (taskId) {
- this.router.navigate([`/cloud/${this.appName}/task-details/${taskId}`]);
- }
- }
-}
diff --git a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html
deleted file mode 100644
index e375c9fd24..0000000000
--- a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
Action Menu:
-
-
- Process Instance ID: {{ selectedAction.id }}
- Action Type: {{ selectedAction.actionType }}
-
-
-
-
Context Menu:
-
-
- Process Instance ID: {{ selectedContextAction.id }}
- Action Type}: {{ selectedContextAction.actionType }}
-
-
-
-
diff --git a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.scss b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.scss
deleted file mode 100644
index c9a04537a1..0000000000
--- a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.scss
+++ /dev/null
@@ -1,22 +0,0 @@
-app-processes-cloud-demo {
- height: 100%;
- min-height: 100%;
- min-width: 100%;
- width: 100%;
-
- .app-processes-list-container {
- box-sizing: border-box;
- place-content: stretch space-between;
- align-items: stretch;
- margin-top: 2px;
- }
-
- &, .app-processes-list-container {
- flex-direction: column;
- display: flex;
- }
-
- .app-processes-list-container, .app-cloud-layout-overflow {
- flex: 1;
- }
-}
diff --git a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts
deleted file mode 100644
index 32e2df4883..0000000000
--- a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts
+++ /dev/null
@@ -1,192 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
-import {
- PROCESS_FILTER_ACTION_DELETE,
- PROCESS_FILTER_ACTION_SAVE,
- PROCESS_FILTER_ACTION_SAVE_AS,
- ProcessFilterAction,
- ProcessFilterCloudModel,
- ProcessFiltersCloudModule,
- ProcessListCloudModule
-} from '@alfresco/adf-process-services-cloud';
-import { ActivatedRoute, Router } from '@angular/router';
-import { DataCellEvent, PaginationComponent, UserPreferencesService } from '@alfresco/adf-core';
-import { CloudLayoutService, CloudServiceSettings } from './services/cloud-layout.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { Pagination } from '@alfresco/js-api';
-import { CloudProcessFiltersService } from './services/cloud-process-filters.service';
-import { CommonModule } from '@angular/common';
-
-@Component({
- selector: 'app-processes-cloud-demo',
- standalone: true,
- imports: [CommonModule, ProcessFiltersCloudModule, ProcessListCloudModule, PaginationComponent],
- templateUrl: './processes-cloud-demo.component.html',
- styleUrls: ['./processes-cloud-demo.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
- appName: string = '';
- isFilterLoaded = false;
-
- filterId: string = '';
- selectedRow: any;
- multiselect: boolean;
- selectionMode: string;
- selectedRows: any[] = [];
- testingMode: boolean;
- actionMenu: boolean;
- contextMenu: boolean;
- actions: any[] = [];
- selectedAction: { id: number; name: string; actionType: string };
- selectedContextAction: { id: number; name: string; actionType: string };
-
- filterProperties: string[];
- filterSortProperties: string[];
- filterActions: string[];
-
- processDetailsRedirection: boolean;
-
- editedFilter: ProcessFilterCloudModel;
-
- private performAction$ = new Subject();
- private onDestroy$ = new Subject();
-
- constructor(
- private route: ActivatedRoute,
- private router: Router,
- private cloudLayoutService: CloudLayoutService,
- private cloudProcessFiltersService: CloudProcessFiltersService,
- private userPreference: UserPreferencesService
- ) {}
-
- ngOnInit() {
- this.filterProperties = this.cloudProcessFiltersService.filterProperties;
- this.filterSortProperties = this.cloudProcessFiltersService.sortProperties;
- this.filterActions = this.cloudProcessFiltersService.actions;
-
- this.route.queryParams.subscribe((params) => {
- this.isFilterLoaded = true;
-
- this.appName = params.appName;
- this.filterId = params.id;
-
- const model = this.cloudProcessFiltersService.readQueryParams(params);
- this.loadFilter(model);
- });
-
- this.cloudLayoutService.settings$.pipe(takeUntil(this.onDestroy$)).subscribe((settings) => this.setCurrentSettings(settings));
- this.performContextActions();
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- setCurrentSettings(settings: CloudServiceSettings) {
- if (settings) {
- this.multiselect = settings.multiselect;
- this.testingMode = settings.testingMode;
- this.selectionMode = settings.selectionMode;
- this.processDetailsRedirection = settings.processDetailsRedirection;
- this.actionMenu = settings.actionMenu;
- this.contextMenu = settings.contextMenu;
- this.actions = settings.actions;
- }
- }
-
- onChangePageSize(event: Pagination) {
- this.userPreference.paginationSize = event.maxItems;
- }
-
- resetSelectedRows() {
- this.selectedRows = [];
- }
-
- onRowClick(processInstanceId: string) {
- if (!this.multiselect && this.selectionMode !== 'multiple' && this.processDetailsRedirection) {
- this.router.navigate([`/cloud/${this.appName}/process-details/${processInstanceId}`]);
- }
- }
-
- onFilterChange(filter: ProcessFilterCloudModel) {
- const queryParams = {
- ...this.cloudProcessFiltersService.writeQueryParams(filter, this.appName, filter.id),
- filterId: filter.id
- };
- this.router.navigate([`/cloud/${this.appName}/processes/`], { queryParams });
- }
-
- onProcessFilterAction(filterAction: ProcessFilterAction) {
- if (filterAction.actionType === PROCESS_FILTER_ACTION_DELETE) {
- this.cloudLayoutService.setCurrentProcessFilterParam({ index: 0 });
- } else {
- this.cloudLayoutService.setCurrentProcessFilterParam({ id: filterAction.filter.id });
- }
-
- if ([PROCESS_FILTER_ACTION_SAVE, PROCESS_FILTER_ACTION_SAVE_AS].includes(filterAction.actionType)) {
- this.onFilterChange(filterAction.filter);
- }
- }
-
- onRowsSelected(nodes) {
- this.resetSelectedRows();
- this.selectedRows = nodes.map((node) => node.obj);
- }
-
- onShowRowActionsMenu(event: DataCellEvent) {
- event.value.actions = this.actions;
- }
-
- onShowRowContextMenu(event: DataCellEvent) {
- event.value.actions = this.actions.map((action) => ({
- data: event.value.row['obj'],
- model: action,
- subject: this.performAction$
- }));
- }
-
- onExecuteRowAction(row: any) {
- const value = row.value.row['obj'].entry;
- const action = row.value.action;
- this.selectedAction = { id: value.id, name: value.name, actionType: action.title };
- }
-
- performContextActions() {
- this.performAction$.pipe(takeUntil(this.onDestroy$)).subscribe((action: any) => {
- if (action) {
- this.onExecuteContextAction(action);
- }
- });
- }
-
- onExecuteContextAction(contextAction: any) {
- const value = contextAction.data.entry;
- const action = contextAction.model;
- this.selectedContextAction = { id: value.id, name: value.name, actionType: action.title };
- }
-
- private loadFilter(model: ProcessFilterCloudModel) {
- if (model?.appName && model.id) {
- this.editedFilter = model;
- }
- }
-}
diff --git a/demo-shell/src/app/components/cloud/services/cloud-layout.service.ts b/demo-shell/src/app/components/cloud/services/cloud-layout.service.ts
deleted file mode 100644
index 55215afa07..0000000000
--- a/demo-shell/src/app/components/cloud/services/cloud-layout.service.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Injectable } from '@angular/core';
-import { BehaviorSubject } from 'rxjs';
-
-export interface CloudServiceSettings {
- multiselect: boolean;
- actionMenu: boolean;
- contextMenu: boolean;
- testingMode: boolean;
- taskDetailsRedirection: boolean;
- processDetailsRedirection: boolean;
- selectionMode: string;
- actions: any[];
-}
-
-export interface FilterSettings {
- id?: string;
- index?: number;
- key?: string;
-}
-
-export class ActionMenuModel {
- constructor(
- public key: string,
- public icon: string,
- public title: string,
- public visible?: boolean,
- public disabled?: boolean
- ) { }
-
-}
-
-@Injectable({
- providedIn: 'root'
-})
-export class CloudLayoutService {
-
- private settings: CloudServiceSettings = {
- multiselect: false,
- actionMenu: false,
- contextMenu: false,
- testingMode: false,
- taskDetailsRedirection: true,
- processDetailsRedirection: true,
- selectionMode: 'single',
- actions: []
- };
-
- taskFilter$ = new BehaviorSubject({index: 0});
- processFilter$ = new BehaviorSubject({index: 0});
- settings$ = new BehaviorSubject(this.settings);
-
- setCurrentTaskFilterParam(param: FilterSettings) {
- this.taskFilter$.next(param);
- }
-
- setCurrentProcessFilterParam(param: FilterSettings) {
- this.processFilter$.next(param);
- }
-
- setCurrentSettings(param: CloudServiceSettings) {
- this.settings$.next(param);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/services/cloud-process-filters.service.ts b/demo-shell/src/app/components/cloud/services/cloud-process-filters.service.ts
deleted file mode 100644
index 7ed56fa059..0000000000
--- a/demo-shell/src/app/components/cloud/services/cloud-process-filters.service.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Injectable } from '@angular/core';
-import { ProcessFilterCloudModel, ProcessFilterCloudService } from '@alfresco/adf-process-services-cloud';
-import { AppConfigService } from '@alfresco/adf-core';
-
-@Injectable({ providedIn: 'root' })
-export class CloudProcessFiltersService {
- constructor(private appConfigService: AppConfigService, private processFilterCloudService: ProcessFilterCloudService) {
- }
-
- get filterProperties(): string[] {
- return this.appConfigService.get(
- 'adf-edit-process-filter.filterProperties',
- ['status', 'sort', 'order', 'processName']
- );
- }
-
- get sortProperties(): string[] {
- return this.appConfigService.get(
- 'adf-edit-process-filter.sortProperties',
- ['id', 'name', 'status', 'startDate']
- );
- }
-
- get actions(): string[] {
- return this.appConfigService.get(
- 'adf-edit-process-filter.actions',
- ['save', 'saveAs', 'delete']
- );
- }
-
- readQueryParams(obj: any): ProcessFilterCloudModel {
- return this.processFilterCloudService.readQueryParams(obj);
- }
-
- writeQueryParams(value: any, appName?: string, id?: string): any {
- return this.processFilterCloudService.writeQueryParams(value, this.filterProperties, appName, id);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html b/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html
deleted file mode 100644
index bdc8ab70be..0000000000
--- a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
- Multiselection
-
-
- Action Menu
-
-
- Context Menu
-
-
- Testing Mode
-
-
- Display task details on task click
-
-
- Display process details on process click
-
-
-
- Selection Mode
-
-
- {{ option.title }}
-
-
-
-
-
-
Add Action
-
-
0">
-
-
- {{action.title}}
- cancel
-
-
-
-
diff --git a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.scss b/demo-shell/src/app/components/cloud/shared/cloud-settings.component.scss
deleted file mode 100644
index b572aa69c6..0000000000
--- a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-app-cloud-settings {
- padding: 20px 30px;
- flex-direction: column;
- display: flex;
- flex: 1;
-
- .app-cloud-actions {
- background-color: white;
- }
-
- .adf-cloud-settings-selection-mode {
- max-width: 200px;
- }
-
- .app-cloud-settings-form {
- display: flex;
- place-content: center space-around;
- align-items: center;
-
- .app-cloud-settings-form-input {
- flex: 1 1 100%;
- max-width: 23%;
- }
- }
-}
diff --git a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.ts b/demo-shell/src/app/components/cloud/shared/cloud-settings.component.ts
deleted file mode 100644
index 4d508a7bf2..0000000000
--- a/demo-shell/src/app/components/cloud/shared/cloud-settings.component.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
-import { ActionMenuModel, CloudLayoutService } from '../services/cloud-layout.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { FormsModule, ReactiveFormsModule, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
-import { CommonModule } from '@angular/common';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatSelectModule } from '@angular/material/select';
-import { MatInputModule } from '@angular/material/input';
-import { MatCheckboxModule } from '@angular/material/checkbox';
-import { MatButtonModule } from '@angular/material/button';
-import { MatChipsModule } from '@angular/material/chips';
-import { MatIconModule } from '@angular/material/icon';
-
-@Component({
- selector: 'app-cloud-settings',
- standalone: true,
- imports: [
- CommonModule,
- MatSlideToggleModule,
- MatFormFieldModule,
- MatSelectModule,
- FormsModule,
- MatInputModule,
- ReactiveFormsModule,
- MatCheckboxModule,
- MatButtonModule,
- MatChipsModule,
- MatIconModule
- ],
- templateUrl: './cloud-settings.component.html',
- styleUrls: ['./cloud-settings.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class CloudSettingsComponent implements OnInit, OnDestroy {
- private onDestroy$ = new Subject();
-
- multiselect: boolean;
- actionMenu: boolean;
- contextMenu: boolean;
- actions: ActionMenuModel[] = [];
- selectionMode: string;
- testingMode: boolean;
- taskDetailsRedirection: boolean;
- processDetailsRedirection: boolean;
-
- selectionModeOptions = [
- { value: '', title: 'None' },
- { value: 'single', title: 'Single' },
- { value: 'multiple', title: 'Multiple' }
- ];
-
- actionMenuForm = new UntypedFormGroup({
- key: new UntypedFormControl(''),
- title: new UntypedFormControl(''),
- icon: new UntypedFormControl(''),
- visible: new UntypedFormControl(true),
- disabled: new UntypedFormControl(false)
- });
-
- constructor(private cloudLayoutService: CloudLayoutService) {}
-
- ngOnInit() {
- this.cloudLayoutService.settings$.pipe(takeUntil(this.onDestroy$)).subscribe((settings) => this.setCurrentSettings(settings));
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- setCurrentSettings(settings) {
- if (settings) {
- this.multiselect = settings.multiselect;
- this.testingMode = settings.testingMode;
- this.selectionMode = settings.selectionMode;
- this.taskDetailsRedirection = settings.taskDetailsRedirection;
- this.processDetailsRedirection = settings.processDetailsRedirection;
- this.actionMenu = settings.actionMenu;
- this.contextMenu = settings.contextMenu;
- this.actions = settings.actions;
- }
- }
-
- toggleMultiselect() {
- this.multiselect = !this.multiselect;
- this.setSetting();
- }
-
- toggleTestingMode() {
- this.testingMode = !this.testingMode;
- this.setSetting();
- }
-
- toggleTaskDetailsRedirection() {
- this.taskDetailsRedirection = !this.taskDetailsRedirection;
- this.setSetting();
- }
-
- toggleProcessDetailsRedirection() {
- this.processDetailsRedirection = !this.processDetailsRedirection;
- this.setSetting();
- }
-
- onSelectionModeChange() {
- this.setSetting();
- }
-
- toggleActionMenu() {
- this.actionMenu = !this.actionMenu;
- this.setSetting();
- }
-
- toggleContextMenu() {
- this.contextMenu = !this.contextMenu;
- this.setSetting();
- }
-
- addAction() {
- this.actions.push(this.actionMenuForm.value);
- this.actionMenuForm.get('key').reset();
- this.actionMenuForm.get('title').reset();
- this.actionMenuForm.get('icon').reset();
- this.setSetting();
- }
-
- removeAction(removedAction: ActionMenuModel) {
- this.actions = this.actions.filter((action: ActionMenuModel) => action.key !== removedAction.key);
- this.setSetting();
- }
-
- setSetting() {
- this.cloudLayoutService.setCurrentSettings({
- multiselect: this.multiselect,
- actionMenu: this.actionMenu,
- contextMenu: this.contextMenu,
- actions: this.actions,
- testingMode: this.testingMode,
- selectionMode: this.selectionMode,
- taskDetailsRedirection: this.taskDetailsRedirection,
- processDetailsRedirection: this.processDetailsRedirection
- });
- }
-}
diff --git a/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.html b/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.html
deleted file mode 100644
index 1862ea1a6e..0000000000
--- a/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
diff --git a/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.ts
deleted file mode 100644
index 98be58bae8..0000000000
--- a/demo-shell/src/app/components/cloud/start-process-cloud-demo.component.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { NotificationService, AppConfigService, FormRenderingService } from '@alfresco/adf-core';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { PreviewService } from '../../services/preview.service';
-import { CloudFormRenderingService, StartProcessCloudModule } from '@alfresco/adf-process-services-cloud';
-
-@Component({
- standalone: true,
- imports: [StartProcessCloudModule],
- templateUrl: './start-process-cloud-demo.component.html',
- providers: [{ provide: FormRenderingService, useClass: CloudFormRenderingService }]
-})
-export class StartProcessCloudDemoComponent implements OnInit {
- appName;
- processName: string;
- formValues: any;
- variables: any;
-
- constructor(
- private appConfig: AppConfigService,
- private cloudLayoutService: CloudLayoutService,
- private route: ActivatedRoute,
- private previewService: PreviewService,
- private notificationService: NotificationService,
- private router: Router
- ) {}
-
- ngOnInit() {
- this.route.parent.params.subscribe((params) => {
- this.appName = params.appName;
- });
-
- this.processName = this.appConfig.get('adf-cloud-start-process.name');
- this.formValues = this.appConfig.get('adf-cloud-start-process.values');
- this.variables = this.appConfig.get('adf-cloud-start-process.variables');
- }
-
- onStartProcessSuccess() {
- this.cloudLayoutService.setCurrentProcessFilterParam({ key: 'running-processes' });
- this.router.navigate([`/cloud/${this.appName}/processes`]);
- }
-
- onCancelStartProcess() {
- this.cloudLayoutService.setCurrentProcessFilterParam({ key: 'all-processes' });
- this.router.navigate([`/cloud/${this.appName}/processes`]);
- }
-
- openSnackMessage(event: any) {
- this.notificationService.openSnackMessage(event.response.body.entry.message);
- }
-
- onFormContentClicked(resourceClicked: any) {
- this.previewService.showResource(resourceClicked.nodeId);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.html b/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.html
deleted file mode 100644
index adf11967eb..0000000000
--- a/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
diff --git a/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.ts
deleted file mode 100644
index 6beaf525ac..0000000000
--- a/demo-shell/src/app/components/cloud/start-task-cloud-demo.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { NotificationService } from '@alfresco/adf-core';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { StartTaskCloudModule } from '@alfresco/adf-process-services-cloud';
-
-@Component({
- standalone: true,
- imports: [StartTaskCloudModule],
- templateUrl: './start-task-cloud-demo.component.html'
-})
-export class StartTaskCloudDemoComponent implements OnInit {
- appName;
-
- constructor(
- private cloudLayoutService: CloudLayoutService,
- private route: ActivatedRoute,
- private notificationService: NotificationService,
- private router: Router
- ) {}
-
- ngOnInit() {
- this.route.parent.params.subscribe((params) => {
- this.appName = params.appName;
- });
- }
-
- onStartTaskSuccess() {
- this.cloudLayoutService.setCurrentTaskFilterParam({ key: 'my-tasks' });
- this.router.navigate([`/cloud/${this.appName}/tasks`]);
- }
-
- onCancelStartTask() {
- this.cloudLayoutService.setCurrentTaskFilterParam({ key: 'my-tasks' });
- this.router.navigate([`/cloud/${this.appName}/tasks`]);
- }
-
- openSnackMessage(event: any) {
- this.notificationService.openSnackMessage(event.response.body.message);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html
deleted file mode 100644
index c0fcec543c..0000000000
--- a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html
+++ /dev/null
@@ -1,20 +0,0 @@
-Simple page to show the taskId: {{ taskId }} of the app: {{ appName }}
-
-
diff --git a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.scss b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.scss
deleted file mode 100644
index 53d63b6220..0000000000
--- a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-app-task-details-cloud-demo {
- .app {
- &-task-detail-container {
- display: flex;
- }
-
- &-task-title {
- margin-left: 15px;
- }
-
- &-task-control {
- width: 70%;
- }
-
- &-demop-card-container {
- width: 30%;
- font-family: inherit;
- }
-
- &-task-details-cloud-column {
- margin: 0;
- flex-direction: column;
-
- .app-task-details-cloud-row {
- flex-direction: row;
-
- adf-cloud-task-form {
- flex: 1 1 100%;
- flex-direction: column;
- display: flex;
- max-width: 80%;
- }
-
- adf-cloud-task-header {
- flex: 1;
- }
- }
- }
-
- &-task-details-cloud-column, &-task-details-cloud-row {
- height: 100%;
- min-height: 100%;
- min-width: 100%;
- width: 100%;
- display: flex;
- }
- }
-}
diff --git a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts
deleted file mode 100644
index 9ddd8ed68a..0000000000
--- a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewChild, ViewEncapsulation } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { NotificationService } from '@alfresco/adf-core';
-import { TaskFormModule, TaskHeaderCloudComponent, TaskHeaderCloudModule } from '@alfresco/adf-process-services-cloud';
-import { PreviewService } from '../../services/preview.service';
-
-@Component({
- selector: 'app-task-details-cloud-demo',
- standalone: true,
- imports: [TaskFormModule, TaskHeaderCloudModule],
- templateUrl: './task-details-cloud-demo.component.html',
- styleUrls: ['./task-details-cloud-demo.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class TaskDetailsCloudDemoComponent {
- @ViewChild('taskHeader', { static: true })
- taskHeader: TaskHeaderCloudComponent;
-
- taskId: string;
- appName: string;
-
- constructor(
- private route: ActivatedRoute,
- private router: Router,
- private notificationService: NotificationService,
- private previewService: PreviewService
- ) {
- this.route.params.subscribe((params) => {
- this.taskId = params.taskId;
- });
- this.route.parent.params.subscribe((params) => {
- this.appName = params.appName;
- });
- }
-
- isTaskValid(): boolean {
- return this.appName !== undefined && this.taskId !== undefined;
- }
-
- goBack() {
- this.router.navigate([`/cloud/${this.appName}/`]);
- }
-
- onTaskCompleted() {
- this.goBack();
- }
-
- onFormContentClicked(resourceClicked: any) {
- this.previewService.showResource(resourceClicked.nodeId);
- }
-
- onFormSaved() {
- this.notificationService.openSnackMessage('Task has been saved successfully');
- }
-
- onError({ message: error }: Error) {
- let errorMessage;
- try {
- errorMessage = JSON.parse(error).message || JSON.parse(error).entry?.message;
- errorMessage = JSON.parse(errorMessage).message;
- } catch {}
- this.notificationService.showError(errorMessage || error);
- }
-}
diff --git a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html b/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html
deleted file mode 100644
index 256dc9e1c8..0000000000
--- a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
Action Menu:
-
-
- Task ID: {{ selectedAction.id }}
- Action Type: {{ selectedAction.actionType }}
-
-
-
-
Context Menu:
-
-
- Task ID: {{ selectedContextAction.id }}
- Action Type: {{ selectedContextAction.actionType }}
-
-
-
-
diff --git a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.scss b/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.scss
deleted file mode 100644
index e46fec9dcd..0000000000
--- a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.scss
+++ /dev/null
@@ -1,22 +0,0 @@
-app-tasks-cloud-demo {
- height: 100%;
- min-height: 100%;
- min-width: 100%;
- width: 100%;
-
- .adf-cloud-task-list-container {
- box-sizing: border-box;
- place-content: stretch space-between;
- align-items: stretch;
- margin-top: 2px;
- }
-
- &, .adf-cloud-task-list-container {
- flex-direction: column;
- display: flex;
- }
-
- .adf-cloud-task-list-container, .app-cloud-layout-overflow {
- flex: 1;
- }
-}
diff --git a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.ts
deleted file mode 100644
index 3c7d3c7068..0000000000
--- a/demo-shell/src/app/components/cloud/tasks-cloud-demo.component.ts
+++ /dev/null
@@ -1,187 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
-import {
- TaskFilterCloudModel,
- TaskFiltersCloudModule,
- TaskListCloudComponent,
- TaskListCloudModule,
- TaskListCloudSortingModel
-} from '@alfresco/adf-process-services-cloud';
-import { AppConfigService, DataCellEvent, PaginationComponent, UserPreferencesService } from '@alfresco/adf-core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { CloudLayoutService } from './services/cloud-layout.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { CommonModule } from '@angular/common';
-
-const ACTION_SAVE_AS = 'saveAs';
-const ACTION_DELETE = 'delete';
-const TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
-
-@Component({
- selector: 'app-tasks-cloud-demo',
- standalone: true,
- imports: [CommonModule, TaskFiltersCloudModule, TaskListCloudModule, PaginationComponent],
- templateUrl: './tasks-cloud-demo.component.html',
- styleUrls: ['./tasks-cloud-demo.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class TasksCloudDemoComponent implements OnInit, OnDestroy {
- @ViewChild('taskCloud')
- taskCloud: TaskListCloudComponent;
-
- appName: string = '';
-
- isFilterLoaded = false;
-
- selectedRow: any;
-
- sortArray: TaskListCloudSortingModel[];
- editedFilter: TaskFilterCloudModel;
- taskFilterProperties: any = { filterProperties: [], sortProperties: [], actions: [] };
-
- filterId;
- multiselect: boolean;
- selectedRows: any[] = [];
- actionMenu: boolean;
- contextMenu: boolean;
- actions: any[] = [];
- selectedAction: { id: number; name: string; actionType: string };
- selectedContextAction: { id: number; name: string; actionType: string };
- testingMode: boolean;
- selectionMode: string;
- taskDetailsRedirection: boolean;
-
- private performAction$ = new Subject();
- private onDestroy$ = new Subject();
-
- constructor(
- private cloudLayoutService: CloudLayoutService,
- private route: ActivatedRoute,
- private router: Router,
- private userPreference: UserPreferencesService,
- private appConfig: AppConfigService
- ) {
- const properties = this.appConfig.get>(TASK_FILTER_PROPERTY_KEYS);
- if (properties) {
- this.taskFilterProperties = properties;
- }
- }
-
- ngOnInit() {
- this.isFilterLoaded = false;
- this.route.parent.params.subscribe((params) => {
- this.appName = params.appName;
- });
-
- this.route.queryParams.subscribe((params) => {
- this.isFilterLoaded = true;
- this.onFilterChange(params);
- this.filterId = params.id;
- });
-
- this.cloudLayoutService.settings$.pipe(takeUntil(this.onDestroy$)).subscribe((settings) => this.setCurrentSettings(settings));
- this.performContextActions();
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- setCurrentSettings(settings) {
- if (settings) {
- this.multiselect = settings.multiselect;
- this.testingMode = settings.testingMode;
- this.selectionMode = settings.selectionMode;
- this.taskDetailsRedirection = settings.taskDetailsRedirection;
- this.actionMenu = settings.actionMenu;
- this.contextMenu = settings.contextMenu;
- this.actions = settings.actions;
- }
- }
-
- onChangePageSize(event) {
- this.userPreference.paginationSize = event.maxItems;
- }
-
- resetSelectedRows() {
- this.selectedRows = [];
- }
-
- onRowClick(taskId) {
- if (!this.multiselect && this.selectionMode !== 'multiple' && this.taskDetailsRedirection) {
- this.router.navigate([`/cloud/${this.appName}/task-details/${taskId}`]);
- }
- }
-
- onRowsSelected(nodes) {
- this.resetSelectedRows();
- this.selectedRows = nodes.map((node) => node.obj);
- }
-
- onFilterChange(filter: any) {
- this.editedFilter = Object.assign({}, filter);
- this.sortArray = [new TaskListCloudSortingModel({ orderBy: this.editedFilter.sort, direction: this.editedFilter.order })];
- }
-
- onTaskFilterAction(filterAction: any) {
- if (filterAction.actionType === ACTION_DELETE) {
- this.cloudLayoutService.setCurrentTaskFilterParam({ index: 0 });
- } else {
- this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
- }
-
- if (filterAction.actionType === ACTION_SAVE_AS) {
- this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filterAction.filter });
- }
- }
-
- onShowRowActionsMenu(event: DataCellEvent) {
- event.value.actions = this.actions;
- }
-
- onShowRowContextMenu(event: DataCellEvent) {
- event.value.actions = this.actions.map((action) => ({
- data: event.value.row['obj'],
- model: action,
- subject: this.performAction$
- }));
- }
-
- onExecuteRowAction(row: any) {
- const value = row.value.row['obj'].entry;
- const action = row.value.action;
- this.selectedAction = { id: value.id, name: value.name, actionType: action.title };
- }
-
- performContextActions() {
- this.performAction$.pipe(takeUntil(this.onDestroy$)).subscribe((action: any) => {
- if (action) {
- this.onExecuteContextAction(action);
- }
- });
- }
-
- onExecuteContextAction(contextAction: any) {
- const value = contextAction.data.entry;
- const action = contextAction.model;
- this.selectedContextAction = { id: value.id, name: value.name, actionType: action.title };
- }
-}
diff --git a/demo-shell/src/app/components/error/demo-error.component.html b/demo-shell/src/app/components/error/demo-error.component.html
deleted file mode 100644
index 4a6c79c833..0000000000
--- a/demo-shell/src/app/components/error/demo-error.component.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/demo-shell/src/app/components/error/demo-error.component.ts b/demo-shell/src/app/components/error/demo-error.component.ts
deleted file mode 100644
index 6271878e58..0000000000
--- a/demo-shell/src/app/components/error/demo-error.component.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute, Params, Router } from '@angular/router';
-import { ErrorContentComponent } from '@alfresco/adf-core';
-import { MatButtonModule } from '@angular/material/button';
-
-@Component({
- selector: 'app-demo-error',
- standalone: true,
- imports: [ErrorContentComponent, MatButtonModule],
- templateUrl: './demo-error.component.html'
-})
-export class DemoErrorComponent implements OnInit {
- errorCode: string = '';
-
- constructor(private route: ActivatedRoute, private router: Router) {}
-
- ngOnInit() {
- if (this.route) {
- this.route.params.subscribe((params: Params) => {
- if (params['id']) {
- this.errorCode = params['id'];
- }
- });
- }
- }
-
- onReturnButton() {
- this.router.navigate(['/']);
- }
-}
diff --git a/demo-shell/src/app/components/file-view/file-view.component.html b/demo-shell/src/app/components/file-view/file-view.component.html
deleted file mode 100644
index 936ed69521..0000000000
--- a/demo-shell/src/app/components/file-view/file-view.component.html
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Display Default Properties
-
-
-
-
-
- Display Empty Metadata
-
-
-
-
-
- Multi accordion
-
-
-
-
-
- Read Only
-
-
-
-
-
- Custom preset
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/file-view/file-view.component.ts b/demo-shell/src/app/components/file-view/file-view.component.ts
deleted file mode 100644
index e3a83d8ae7..0000000000
--- a/demo-shell/src/app/components/file-view/file-view.component.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, ViewEncapsulation } from '@angular/core';
-import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router';
-import { InfoDrawerComponent, InfoDrawerTabComponent, NotificationService, ViewerComponent } from '@alfresco/adf-core';
-import {
- AlfrescoViewerComponent,
- AllowableOperationsEnum,
- ContentMetadataComponent,
- ContentService,
- FileUploadErrorEvent,
- NodeCommentsComponent,
- NodesApiService,
- PermissionsEnum,
- VersionManagerComponent
-} from '@alfresco/adf-content-services';
-import { PreviewService } from '../../services/preview.service';
-import { CommonModule } from '@angular/common';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatButtonModule } from '@angular/material/button';
-import { MatInputModule } from '@angular/material/input';
-import { FormsModule } from '@angular/forms';
-
-@Component({
- selector: 'app-file-view',
- standalone: true,
- imports: [
- CommonModule,
- AlfrescoViewerComponent,
- ViewerComponent,
- NodeCommentsComponent,
- ContentMetadataComponent,
- MatSlideToggleModule,
- MatFormFieldModule,
- MatButtonModule,
- MatInputModule,
- FormsModule,
- VersionManagerComponent,
- InfoDrawerTabComponent,
- InfoDrawerComponent
- ],
- templateUrl: './file-view.component.html',
- encapsulation: ViewEncapsulation.None
-})
-export class FileViewComponent implements OnInit {
- nodeId: string = null;
- versionId: string = null;
- displayEmptyMetadata = false;
- expanded: boolean;
- multi = false;
- isReadOnly = false;
- isPreset = false;
- customPreset: string = null;
- displayDefaultProperties = true;
- isCommentEnabled = 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
- ) {}
-
- ngOnInit() {
- this.route.params.subscribe((params) => {
- const id = params.nodeId;
- this.versionId = params.versionId;
- if (id) {
- this.nodeApiService.getNode(id).subscribe(
- (node) => {
- if (node?.isFile) {
- this.isCommentEnabled =
- this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
- this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
- this.nodeId = id;
- return;
- }
- this.router.navigate(['/files', id]);
- },
- () => this.router.navigate(['/files', id])
- );
- } else if (this.preview?.content) {
- this.blobFile = this.preview.content;
- this.fileName = this.preview.name;
- }
- });
- }
-
- onViewVersion(versionId: string) {
- this.preview.showResource(this.nodeId, versionId);
- }
-
- onViewerClosed() {
- const primaryUrl = this.router.parseUrl(this.router.url).root.children[PRIMARY_OUTLET].toString();
- this.router.navigateByUrl(primaryUrl);
- }
-
- onUploadError(event: FileUploadErrorEvent) {
- this.notificationService.showError(event.error);
- }
-
- toggleEmptyMetadata() {
- this.displayEmptyMetadata = !this.displayEmptyMetadata;
- }
-
- toggleMulti() {
- this.multi = !this.multi;
- }
-
- toggleReadOnly() {
- this.isReadOnly = !this.isReadOnly;
- }
-
- toggleDisplayProperties() {
- this.displayDefaultProperties = !this.displayDefaultProperties;
- }
-
- togglePreset() {
- this.isPreset = !this.isPreset;
- if (!this.isPreset) {
- this.customPreset = null;
- }
- }
-
- applyCustomPreset() {
- this.isPreset = false;
- setTimeout(() => {
- this.isPreset = true;
- }, 100);
- }
-
- applyAspect() {
- this.showAspect = this.desiredAspect;
- }
-}
diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html
deleted file mode 100644
index f66a7bab96..0000000000
--- a/demo-shell/src/app/components/files/files.component.html
+++ /dev/null
@@ -1,393 +0,0 @@
-
-
-
-
-
- {{errorMessage}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ 'SEARCH.NO_RESULT' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Current folder ID: {{ documentList.currentFolderId }}
-
-
- Selected Nodes:
-
- -
- {{ node.entry.name }}
-
-
-
-
-
-
-
- Multiselect (with checkboxes)
-
-
-
-
-
- Multiple File Upload
-
-
-
-
-
-
-
- Custom extensions filter
-
-
-
-
-
-
-
- Enable versioning
-
-
-
-
-
- Enable version download
-
-
-
-
-
- Display Empty Metadata
-
-
-
-
-
-
Upload
-
-
-
-
-
-
-
-
-
Use Cmd (Mac) or Ctrl (Windows) to toggle selection of multiple items
-
-
-
- {{mode.viewValue}}
-
-
-
-
-
diff --git a/demo-shell/src/app/components/files/files.component.scss b/demo-shell/src/app/components/files/files.component.scss
deleted file mode 100644
index cbce74ceff..0000000000
--- a/demo-shell/src/app/components/files/files.component.scss
+++ /dev/null
@@ -1,76 +0,0 @@
-.app-container:has(.app-document-list-container) {
- margin: 10px;
-}
-
-.app-error-message {
- text-align: left;
-}
-
-.app-error-message--text {
- color: var(--theme-warn-color);
-}
-
-.app-document-list-container {
- min-height: 400px;
-
- .app-datatable-list {
- min-height: 400px;
- }
-
- adf-upload-drag-area {
- margin-right: 16px;
-
- adf-toolbar-title {
- flex: 0 1 auto;
- }
-
- .app-document-action-buttons {
- flex: 0 0 auto;
- }
- }
-
- &:not(.app-document-list-container-in-upload-drag-area) {
- display: flex;
- place-content: stretch flex-start;
- align-items: stretch;
- max-height: 100%;
- }
-}
-
-.adf-datatable-card .app-lock-button {
- top: -10px;
- position: absolute;
-}
-
-.app-content-service-settings {
- padding: 16px;
-}
-
-.app-manage-versions-sidebar {
- flex: 0 0 auto;
-
- &.adf-info-drawer-layout {
- width: 360px;
- }
-}
-
-.app-no-result__empty_doc_lib {
- width: 565px;
- height: 161px;
- object-fit: contain;
- margin-top: 17px;
-}
-
-.app-empty_template {
- text-align: center;
- margin-top: 20px;
- margin-bottom: 20px;
-}
-
-.app-no-result-message {
- height: 32px;
- opacity: 0.26;
- font-size: var(--theme-headline-font-size);
- line-height: 1.33;
- letter-spacing: -1px;
-}
diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts
deleted file mode 100644
index 41cb970f94..0000000000
--- a/demo-shell/src/app/components/files/files.component.ts
+++ /dev/null
@@ -1,571 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- Input,
- OnInit,
- OnChanges,
- OnDestroy,
- Optional,
- EventEmitter,
- ViewChild,
- SimpleChanges,
- Output,
- ViewEncapsulation
-} from '@angular/core';
-import { MatDialog } from '@angular/material/dialog';
-import { ActivatedRoute, Params, Router } from '@angular/router';
-import { NodeEntry, NodePaging, Pagination, Node, SearchEntry } from '@alfresco/js-api';
-import {
- NotificationService,
- UserPreferencesService,
- PaginationComponent,
- ShowHeaderMode,
- FormRenderingService,
- ToolbarTitleComponent,
- ToolbarComponent,
- ToolbarDividerComponent,
- DataColumnComponent,
- HighlightPipe,
- DataColumnListComponent,
- CustomEmptyContentTemplateDirective,
- InfoDrawerTabComponent,
- InfoDrawerComponent,
- InfoDrawerLayoutComponent
-} from '@alfresco/adf-core';
-import {
- ContentService,
- FolderCreatedEvent,
- UploadService,
- DocumentListComponent,
- PermissionStyleModel,
- ContentMetadataService,
- FilterSearch,
- DialogAspectListService,
- FileUploadEvent,
- NodesApiService,
- UploadDragAreaComponent,
- CheckAllowableOperationDirective,
- BreadcrumbComponent,
- DropdownBreadcrumbComponent,
- NodeDownloadDirective,
- NodeDeleteDirective,
- NodeLockDirective,
- ContentActionListComponent,
- ContentActionComponent,
- ContentMetadataComponent,
- VersionManagerComponent,
- UploadButtonComponent
-} from '@alfresco/adf-content-services';
-import { ProcessFormRenderingService } from '@alfresco/adf-process-services';
-import { VersionManagerDialogAdapterComponent } from './version-manager-dialog-adapter.component';
-import { Subject } from 'rxjs';
-import { PreviewService } from '../../services/preview.service';
-import { takeUntil, debounceTime, scan } from 'rxjs/operators';
-import { CommonModule } from '@angular/common';
-import { MatButtonModule } from '@angular/material/button';
-import { MatIconModule } from '@angular/material/icon';
-import { FolderCreateDirective } from '../../folder-directive';
-import { MatMenuModule } from '@angular/material/menu';
-import { TranslateModule } from '@ngx-translate/core';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { FormsModule } from '@angular/forms';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { MatCheckboxModule } from '@angular/material/checkbox';
-import { MatSelectModule } from '@angular/material/select';
-
-const DEFAULT_FOLDER_TO_SHOW = '-my-';
-
-@Component({
- selector: 'app-files-component',
- standalone: true,
- imports: [
- CommonModule,
- UploadDragAreaComponent,
- MatButtonModule,
- MatIconModule,
- CheckAllowableOperationDirective,
- ToolbarTitleComponent,
- ToolbarComponent,
- BreadcrumbComponent,
- DropdownBreadcrumbComponent,
- DocumentListComponent,
- FolderCreateDirective,
- NodeDownloadDirective,
- NodeDeleteDirective,
- ToolbarDividerComponent,
- MatMenuModule,
- TranslateModule,
- DataColumnComponent,
- NodeLockDirective,
- ContentActionListComponent,
- ContentActionComponent,
- PaginationComponent,
- ContentMetadataComponent,
- VersionManagerComponent,
- MatSlideToggleModule,
- FormsModule,
- MatFormFieldModule,
- MatInputModule,
- UploadButtonComponent,
- MatCheckboxModule,
- MatSelectModule,
- HighlightPipe,
- DataColumnListComponent,
- CustomEmptyContentTemplateDirective,
- VersionManagerDialogAdapterComponent,
- InfoDrawerTabComponent,
- InfoDrawerComponent,
- InfoDrawerLayoutComponent
- ],
- templateUrl: './files.component.html',
- styleUrls: ['./files.component.scss'],
- encapsulation: ViewEncapsulation.None,
- providers: [{ provide: FormRenderingService, useClass: ProcessFormRenderingService }]
-})
-export class FilesComponent implements OnInit, OnChanges, OnDestroy {
- protected onDestroy$ = new Subject();
-
- errorMessage: string = null;
- nodeId: any;
- showViewer = false;
- showVersions = false;
- allowDropFiles = true;
- includeFields = ['isFavorite', 'isLocked', 'aspectNames', 'definition'];
-
- selectionModes = [
- { value: 'none', viewValue: 'None' },
- { value: 'single', viewValue: 'Single' },
- { value: 'multiple', viewValue: 'Multiple' }
- ];
-
- // The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
- @Input()
- currentFolderId: string = DEFAULT_FOLDER_TO_SHOW;
-
- @Input()
- sorting = ['name', 'ASC'];
-
- @Input()
- sortingMode: 'server' | 'client' = 'server';
-
- @Input()
- showSettingsPanel = true;
-
- @Input()
- showHeader = ShowHeaderMode.Always;
-
- @Input()
- selectionMode = 'multiple';
-
- @Input()
- multiselect = false;
-
- @Input()
- multipleFileUpload = false;
-
- @Input()
- folderUpload = false;
-
- @Input()
- acceptedFilesTypeShow = false;
-
- @Input()
- maxSizeShow = false;
-
- @Input()
- versioning = false;
-
- @Input()
- allowVersionDownload = true;
-
- @Input()
- acceptedFilesType = '.jpg,.pdf,.js';
-
- @Input()
- maxFilesSize: number = null;
-
- @Input()
- enableUpload = true;
-
- @Input()
- nodeResult: NodePaging;
-
- @Input()
- pagination: Pagination;
-
- @Input()
- disableDragArea = false;
-
- @Input()
- searchTerm = '';
-
- @Input()
- navigationRoute = '/files';
-
- @Input()
- headerFilters = false;
-
- @Input()
- paramValues: Map = null;
-
- @Input()
- filterSorting: string = null;
-
- @Output()
- documentListReady: EventEmitter = new EventEmitter();
-
- @Output()
- changedPageSize: EventEmitter = new EventEmitter();
-
- @Output()
- changedPageNumber: EventEmitter = new EventEmitter();
-
- @Output()
- turnedNextPage: EventEmitter = new EventEmitter();
-
- @Output()
- turnedPreviousPage: EventEmitter = new EventEmitter();
-
- @Output()
- loadNext: EventEmitter = new EventEmitter();
-
- @Output()
- deleteElementSuccess: EventEmitter = new EventEmitter();
-
- @ViewChild('documentList', { static: true })
- documentList: DocumentListComponent;
-
- @ViewChild('standardPagination')
- standardPagination: PaginationComponent;
-
- permissionsStyle: PermissionStyleModel[] = [];
- stickyHeader: boolean;
- displayEmptyMetadata = false;
-
- constructor(
- private notificationService: NotificationService,
- private uploadService: UploadService,
- private contentService: ContentService,
- private dialog: MatDialog,
- private router: Router,
- private preference: UserPreferencesService,
- private preview: PreviewService,
- @Optional() private route: ActivatedRoute,
- private contentMetadataService: ContentMetadataService,
- private dialogAspectListService: DialogAspectListService,
- private nodeService: NodesApiService
- ) {}
-
- showFile(event) {
- const entry = event.value.entry;
- if (entry?.isFile) {
- this.preview.showResource(entry.id);
- }
- }
-
- ngOnInit() {
- if (!this.pagination) {
- this.pagination = {
- maxItems: this.preference.paginationSize,
- skipCount: 0
- } as Pagination;
- }
-
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- if (params['id'] && this.currentFolderId !== params['id']) {
- this.currentFolderId = params['id'];
- }
- });
- }
-
- this.uploadService.fileUploadComplete
- .pipe(
- debounceTime(300),
- scan((files, currentFile) => [...files, currentFile], []),
- takeUntil(this.onDestroy$)
- )
- .subscribe((value: any[]) => {
- this.onFileUploadEvent(value[0]);
- });
-
- this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.onFileUploadEvent(value));
-
- this.contentService.folderCreated.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.onFolderCreated(value));
-
- this.contentService.folderCreate.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.onFolderAction(value));
-
- this.contentService.folderEdit.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.onFolderAction(value));
-
- this.contentMetadataService.error.pipe(takeUntil(this.onDestroy$)).subscribe((err: { message: string }) => {
- this.notificationService.showError(err.message);
- });
- }
-
- onFileUploadEvent(event: FileUploadEvent) {
- if (event && event.file.options.parentId === this.documentList.currentFolderId) {
- this.documentList.reload();
- }
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- ngOnChanges(changes: SimpleChanges) {
- if (changes.nodeResult?.currentValue) {
- this.nodeResult = changes.nodeResult.currentValue;
- this.pagination = this.nodeResult.list.pagination;
- }
- if (!this.pagination) {
- this.giveDefaultPaginationWhenNotDefined();
- }
- }
-
- giveDefaultPaginationWhenNotDefined() {
- this.pagination = {
- maxItems: this.preference.paginationSize,
- skipCount: 0,
- totalItems: 0,
- hasMoreItems: false
- } as Pagination;
- }
-
- getCurrentDocumentListNode(): NodeEntry[] {
- if (this.documentList.folderNode) {
- return [{ entry: this.documentList.folderNode }];
- } else {
- return [];
- }
- }
-
- onNavigationError(error: any) {
- if (error) {
- this.router.navigate(['/error', error.status]);
- }
- }
-
- resetError() {
- this.errorMessage = null;
- }
-
- onFolderCreated(event: FolderCreatedEvent) {
- if (event && event.parentId === this.documentList.currentFolderId) {
- this.documentList.reload();
- }
- }
-
- onFolderAction(node) {
- if (node && node.parentId === this.documentList.currentFolderId) {
- this.documentList.reload();
- }
- }
-
- onFolderChange($event) {
- this.router.navigate([this.navigationRoute, $event.value.id]);
- }
-
- handlePermissionError(event: any) {
- this.notificationService.showError('PERMISSION.LACKOF', null, {
- permission: event.permission,
- action: event.action,
- type: event.type
- });
- }
-
- openSnackMessageError(error: any) {
- this.notificationService.showError(error.value || error);
- }
-
- openSnackMessageInfo(message: string) {
- this.notificationService.showInfo(message);
- }
-
- emitReadyEvent(event: NodePaging) {
- this.documentListReady.emit(event);
- }
-
- onContentActionError(errors: any) {
- const errorStatusCode = JSON.parse(errors.message).error.statusCode;
- let message: string;
-
- switch (errorStatusCode) {
- case 403:
- message = 'OPERATION.ERROR.PERMISSION';
- break;
- case 409:
- message = 'OPERATION.ERROR.CONFLICT';
- break;
- default:
- message = 'OPERATION.ERROR.UNKNOWN';
- }
-
- this.openSnackMessageError(message);
- }
-
- onDeleteActionSuccess(message: string) {
- this.uploadService.fileDeleted.next(message);
- this.deleteElementSuccess.emit();
- this.documentList.reload();
- this.openSnackMessageInfo(message);
- }
-
- onPermissionRequested(node: any) {
- this.router.navigate(['/permissions', node.value.entry.id]);
- }
-
- onManageVersions(event: any) {
- const contentEntry = event.value.entry;
- const showComments = true;
- const allowDownload = this.allowVersionDownload;
-
- if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
- this.dialog.open(VersionManagerDialogAdapterComponent, {
- data: { contentEntry, showComments, allowDownload },
- panelClass: 'adf-version-manager-dialog',
- width: '630px'
- });
- } else {
- this.openSnackMessageError('OPERATION.ERROR.PERMISSION');
- }
- }
-
- onAspectUpdate(event: any) {
- this.dialogAspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => {
- this.nodeService.updateNode(event.value.entry.id, { aspectNames: [...aspectList] }).subscribe(() => {
- this.openSnackMessageInfo('Node Aspects Updated');
- });
- });
- }
-
- hasSelection(selection: Array): boolean {
- return selection && selection.length > 0;
- }
-
- hasOneFileSelected(): boolean {
- const selection = this.documentList.selection;
- return selection && selection.length === 1 && selection[0].entry.isFile;
- }
-
- userHasPermissionToManageVersions(): boolean {
- const selection = this.documentList.selection;
- return this.contentService.hasAllowableOperations(selection[0].entry, 'update');
- }
-
- canCreateContent(parentNode: Node): boolean {
- if (parentNode) {
- return this.contentService.hasAllowableOperations(parentNode, 'create');
- }
- return false;
- }
-
- onChangePageSize(event: Pagination): void {
- this.preference.paginationSize = event.maxItems;
- this.pagination.maxItems = event.maxItems;
- this.pagination.skipCount = event.skipCount;
- this.changedPageSize.emit(event);
- }
-
- onChangePageNumber(event: Pagination): void {
- this.pagination.maxItems = event.maxItems;
- this.pagination.skipCount = event.skipCount;
- this.changedPageNumber.emit(event);
- }
-
- onNextPage(event: Pagination): void {
- this.pagination.maxItems = event.maxItems;
- this.pagination.skipCount = event.skipCount;
- this.turnedNextPage.emit(event);
- }
-
- onPrevPage(event: Pagination): void {
- this.pagination.maxItems = event.maxItems;
- this.pagination.skipCount = event.skipCount;
- this.turnedPreviousPage.emit(event);
- }
-
- onUploadNewVersion(ev) {
- const contentEntry = ev.detail.data.node.entry;
- const showComments = true;
- const allowDownload = this.allowVersionDownload;
- const newFileVersion = ev.detail.files[0].file;
-
- if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
- this.dialog.open(VersionManagerDialogAdapterComponent, {
- data: {
- contentEntry,
- showComments,
- allowDownload,
- newFileVersion,
- showComparison: true
- },
- panelClass: 'adf-version-manager-dialog',
- width: '630px'
- });
- } else {
- this.openSnackMessageError('OPERATION.ERROR.PERMISSION');
- }
- }
-
- getFileFiltering(): string {
- return this.acceptedFilesTypeShow ? this.acceptedFilesType : '*';
- }
-
- searchResultsHighlight(search: SearchEntry): string {
- if (search?.highlight) {
- return search.highlight.map((currentHighlight) => currentHighlight.snippets).join(', ');
- }
- return '';
- }
-
- onFilterSelected(activeFilters: FilterSearch[]) {
- if (activeFilters.length) {
- this.navigateToFilter(activeFilters);
- } else {
- this.clearFilterNavigation();
- }
- }
-
- navigateToFilter(activeFilters: FilterSearch[]) {
- const objectFromMap = {};
- activeFilters.forEach((filter: FilterSearch) => {
- let paramValue = null;
- if (filter.value?.from && filter.value.to) {
- paramValue = `${filter.value.from}||${filter.value.to}`;
- } else {
- paramValue = filter.value;
- }
- objectFromMap[filter.key] = paramValue;
- });
-
- this.router.navigate([], { relativeTo: this.route, queryParams: objectFromMap });
- }
-
- clearFilterNavigation() {
- this.documentList.node = null;
- if (this.currentFolderId === '-my-') {
- this.router.navigate([this.navigationRoute, '']);
- } else {
- this.router.navigate([this.navigationRoute, this.currentFolderId]);
- }
- this.documentList.reload();
- }
-}
diff --git a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html
deleted file mode 100644
index bfeea6d6be..0000000000
--- a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
- Enable version download
-
-
-
-
-
-
-
- Show version comparison
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.ts b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.ts
deleted file mode 100644
index 3288d8e401..0000000000
--- a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
-import { Node } from '@alfresco/js-api';
-import { PreviewService } from '../../services/preview.service';
-import { NotificationService } from '@alfresco/adf-core';
-import { FileUploadErrorEvent, VersionListComponent, VersionManagerComponent } from '@alfresco/adf-content-services';
-import { CommonModule } from '@angular/common';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { FormsModule } from '@angular/forms';
-import { MatButtonModule } from '@angular/material/button';
-
-@Component({
- templateUrl: './version-manager-dialog-adapter.component.html',
- standalone: true,
- imports: [CommonModule, MatDialogModule, MatSlideToggleModule, FormsModule, VersionManagerComponent, VersionListComponent, MatButtonModule],
- encapsulation: ViewEncapsulation.None
-})
-export class VersionManagerDialogAdapterComponent {
- contentEntry: Node;
- newFileVersion: File;
- showComments = true;
- allowDownload = true;
- readOnly = false;
- showVersionComparison = false;
-
- constructor(
- private previewService: PreviewService,
- private notificationService: NotificationService,
- @Inject(MAT_DIALOG_DATA) data: any,
- private containingDialog?: MatDialogRef
- ) {
- this.contentEntry = data.contentEntry;
- this.newFileVersion = Object.prototype.hasOwnProperty.call(data, 'newFileVersion') ? data.newFileVersion : this.newFileVersion;
- this.showComments = Object.prototype.hasOwnProperty.call(data, 'showComments') ? data.showComments : this.showComments;
- this.allowDownload = Object.prototype.hasOwnProperty.call(data, 'allowDownload') ? data.allowDownload : this.allowDownload;
- }
-
- uploadError(event: FileUploadErrorEvent) {
- this.notificationService.showError(event.error);
- }
-
- close() {
- this.containingDialog.close();
- }
-
- onViewVersion(versionId: string) {
- this.previewService.showResource(this.contentEntry.id, versionId);
- this.close();
- }
-
- hideVersionComparison(isCancelled: any) {
- if (isCancelled) {
- this.showVersionComparison = false;
- this.newFileVersion = null;
- }
- }
-}
diff --git a/demo-shell/src/app/components/form/app-form.component.html b/demo-shell/src/app/components/form/app-form.component.html
deleted file mode 100644
index f6e484eed9..0000000000
--- a/demo-shell/src/app/components/form/app-form.component.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
Error log:
-
Error {{ error.name }} {{error.validationSummary.message | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/form/app-form.component.scss b/demo-shell/src/app/components/form/app-form.component.scss
deleted file mode 100644
index 01e2aa41cc..0000000000
--- a/demo-shell/src/app/components/form/app-form.component.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-.app-form-container {
- padding: 10px;
-}
-
-.app-card-view {
- width: 30%;
- display: inline-block;
-}
-
-.app-console {
- width: 60%;
- display: inline-block;
- vertical-align: top;
- margin-left: 10px;
- height: 500px;
- overflow: scroll;
- padding-bottom: 30px;
-
- h3 {
- margin-top: 0;
- }
-
- p {
- display: block;
- font-family: monospace;
- margin: 0;
- }
-}
-
-.app-main-content {
- padding: 0 15px;
-
- .adf-form-config-editor {
- height: 500px;
- }
-}
-
-.app-form-editor-buttons {
- display: flex;
- justify-content: space-evenly;
-}
-
-.app-upload-config-button {
- display: flex;
- justify-content: center;
-
- input {
- cursor: pointer;
- height: 100%;
- right: 0;
- opacity: 0;
- position: absolute;
- top: 0;
- width: 300px;
- z-index: 4;
- }
-}
diff --git a/demo-shell/src/app/components/form/app-form.component.ts b/demo-shell/src/app/components/form/app-form.component.ts
deleted file mode 100644
index ded685d090..0000000000
--- a/demo-shell/src/app/components/form/app-form.component.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
-import { FormModel, FormFieldModel, FormService, FormOutcomeEvent, NotificationService, FormRenderingService } from '@alfresco/adf-core';
-import { FormComponent, ProcessFormRenderingService } from '@alfresco/adf-process-services';
-import { InMemoryFormService } from '../../services/in-memory-form.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { CoreAutomationService } from '../../../testing/automation.service';
-import { CommonModule } from '@angular/common';
-import { MatTabsModule } from '@angular/material/tabs';
-import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
-import { MatButtonModule } from '@angular/material/button';
-import { FormsModule } from '@angular/forms';
-import { TranslateModule } from '@ngx-translate/core';
-import { MatIconModule } from '@angular/material/icon';
-
-@Component({
- selector: 'app-form',
- standalone: true,
- imports: [CommonModule, MatTabsModule, FormComponent, MonacoEditorModule, MatButtonModule, FormsModule, TranslateModule, MatIconModule],
- templateUrl: './app-form.component.html',
- styleUrls: ['./app-form.component.scss'],
- providers: [
- { provide: FormService, useClass: InMemoryFormService },
- { provide: FormRenderingService, useClass: ProcessFormRenderingService }
- ],
- encapsulation: ViewEncapsulation.None
-})
-export class AppFormComponent implements OnInit, OnDestroy {
- private formService = inject(FormService);
- private notificationService = inject(NotificationService);
- private automationService = inject(CoreAutomationService);
-
- form: FormModel;
- errorFields: FormFieldModel[] = [];
- formConfig: string;
- editor: any;
-
- editorOptions = {
- theme: 'vs-dark',
- language: 'json',
- autoIndent: true,
- formatOnPaste: true,
- formatOnType: true,
- automaticLayout: true
- };
-
- private onDestroy$ = new Subject();
-
- logErrors(errorFields: FormFieldModel[]) {
- this.errorFields = errorFields;
- }
-
- ngOnInit() {
- this.formService.executeOutcome.pipe(takeUntil(this.onDestroy$)).subscribe((formOutcomeEvent: FormOutcomeEvent) => {
- formOutcomeEvent.preventDefault();
- });
-
- this.formConfig = JSON.stringify(this.automationService.forms.getFormDefinition());
- this.parseForm();
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onInitFormEditor(editor) {
- this.editor = editor;
- setTimeout(() => {
- this.editor.getAction('editor.action.formatDocument').run();
- }, 1000);
- }
-
- parseForm() {
- this.form = this.formService.parseForm(JSON.parse(this.formConfig), null, false, true);
- }
-
- onSaveFormConfig() {
- try {
- this.parseForm();
- } catch (error) {
- this.notificationService.openSnackMessage('Wrong form configuration');
- }
- }
-
- onClearFormConfig() {
- this.formConfig = '';
- }
-
- onConfigAdded($event: any): void {
- const file = $event.currentTarget.files[0];
-
- const fileReader = new FileReader();
- fileReader.onload = () => {
- this.formConfig = fileReader.result as string;
- };
- fileReader.readAsText(file);
-
- this.onInitFormEditor(this.editor);
-
- $event.target.value = '';
- }
-}
diff --git a/demo-shell/src/app/components/home/home.component.html b/demo-shell/src/app/components/home/home.component.html
deleted file mode 100644
index d8f542b749..0000000000
--- a/demo-shell/src/app/components/home/home.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
ADF
- Angular components for Alfresco
-
-
diff --git a/demo-shell/src/app/components/home/home.component.scss b/demo-shell/src/app/components/home/home.component.scss
deleted file mode 100644
index 46999f70d5..0000000000
--- a/demo-shell/src/app/components/home/home.component.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-app-home-view {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- text-align: center;
-
- .app-home-headline {
- h1 {
- font-size: 56px;
- font-weight: 300;
- }
-
- h2 {
- font-size: 18px;
- font-weight: 300;
- }
- }
-}
diff --git a/demo-shell/src/app/components/home/home.component.ts b/demo-shell/src/app/components/home/home.component.ts
deleted file mode 100644
index 06132af49e..0000000000
--- a/demo-shell/src/app/components/home/home.component.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation } from '@angular/core';
-
-@Component({
- standalone: true,
- selector: 'app-home-view',
- templateUrl: './home.component.html',
- styleUrls: ['./home.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class HomeComponent {}
diff --git a/demo-shell/src/app/components/login/login.component.html b/demo-shell/src/app/components/login/login.component.html
deleted file mode 100644
index 65bd4e60ef..0000000000
--- a/demo-shell/src/app/components/login/login.component.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
- settings
-
-
-
-
diff --git a/demo-shell/src/app/components/login/login.component.scss b/demo-shell/src/app/components/login/login.component.scss
deleted file mode 100644
index 093c81fef6..0000000000
--- a/demo-shell/src/app/components/login/login.component.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-.app-setting-button {
- position: absolute;
- right: 10px;
- top: 10px;
- z-index: 1;
- color: white;
-}
diff --git a/demo-shell/src/app/components/login/login.component.ts b/demo-shell/src/app/components/login/login.component.ts
deleted file mode 100644
index 56a5fbcd5f..0000000000
--- a/demo-shell/src/app/components/login/login.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, ViewEncapsulation } from '@angular/core';
-import { MatIconModule } from '@angular/material/icon';
-import { AppConfigPipe, LoginComponent } from '@alfresco/adf-core';
-import { RouterLink } from '@angular/router';
-
-@Component({
- selector: 'app-login',
- standalone: true,
- imports: [MatIconModule, LoginComponent, AppConfigPipe, RouterLink],
- templateUrl: './login.component.html',
- styleUrls: ['./login.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class AppLoginComponent {}
diff --git a/demo-shell/src/app/components/logout/logout.component.html b/demo-shell/src/app/components/logout/logout.component.html
deleted file mode 100644
index 384db29bf9..0000000000
--- a/demo-shell/src/app/components/logout/logout.component.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/demo-shell/src/app/components/logout/logout.component.scss b/demo-shell/src/app/components/logout/logout.component.scss
deleted file mode 100644
index be914c1c72..0000000000
--- a/demo-shell/src/app/components/logout/logout.component.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-:host {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-
-.app-logout-section {
- text-align: center;
- padding-top: 60px;
-}
-
-.app-logout-headline {
- h1 {
- margin: 15px 5px;
- }
-
- h2 {
- margin: 15px 0 25px;
- }
-}
-
-.app-logout-docs-button {
- margin: 8px;
-}
diff --git a/demo-shell/src/app/components/logout/logout.component.ts b/demo-shell/src/app/components/logout/logout.component.ts
deleted file mode 100644
index 4e31a8a838..0000000000
--- a/demo-shell/src/app/components/logout/logout.component.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { MatButtonModule } from '@angular/material/button';
-
-@Component({
- selector: 'app-logout',
- standalone: true,
- imports: [MatButtonModule],
- templateUrl: './logout.component.html',
- styleUrls: ['./logout.component.scss']
-})
-export class LogoutComponent {}
diff --git a/demo-shell/src/app/components/permissions/demo-permissions.component.html b/demo-shell/src/app/components/permissions/demo-permissions.component.html
deleted file mode 100644
index 006d957df5..0000000000
--- a/demo-shell/src/app/components/permissions/demo-permissions.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/demo-shell/src/app/components/permissions/demo-permissions.component.scss b/demo-shell/src/app/components/permissions/demo-permissions.component.scss
deleted file mode 100644
index fd5f327d80..0000000000
--- a/demo-shell/src/app/components/permissions/demo-permissions.component.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.app-permission-section {
- box-sizing: border-box;
- height: 100%;
-}
diff --git a/demo-shell/src/app/components/permissions/demo-permissions.component.ts b/demo-shell/src/app/components/permissions/demo-permissions.component.ts
deleted file mode 100644
index 661c866140..0000000000
--- a/demo-shell/src/app/components/permissions/demo-permissions.component.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, Optional } from '@angular/core';
-import { ActivatedRoute, Params } from '@angular/router';
-import { PermissionListComponent } from '@alfresco/adf-content-services';
-
-@Component({
- selector: 'app-permissions',
- standalone: true,
- imports: [PermissionListComponent],
- templateUrl: './demo-permissions.component.html',
- styleUrls: ['./demo-permissions.component.scss']
-})
-export class DemoPermissionComponent implements OnInit {
- nodeId: string;
-
- constructor(@Optional() private route: ActivatedRoute) {}
-
- ngOnInit() {
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- if (params['id']) {
- this.nodeId = params['id'];
- }
- });
- }
- }
-}
diff --git a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.html b/demo-shell/src/app/components/process-list-demo/process-list-demo.component.html
deleted file mode 100644
index d23b18befa..0000000000
--- a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{getStatus(entry.row.obj.ended)}}
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.scss b/demo-shell/src/app/components/process-list-demo/process-list-demo.component.scss
deleted file mode 100644
index 6a37d4404f..0000000000
--- a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-.app-process-list-inputs {
- margin: 20px auto 0;
- max-width: 1200px;
-
- & mat-form-field {
- margin: 20px 5px;
- width: calc(100% * (1 / 4) - 10px);
- }
-}
diff --git a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts b/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts
deleted file mode 100644
index a233fed685..0000000000
--- a/demo-shell/src/app/components/process-list-demo/process-list-demo.component.ts
+++ /dev/null
@@ -1,196 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, OnDestroy } from '@angular/core';
-import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';
-import { ActivatedRoute, Params } from '@angular/router';
-import { debounceTime, takeUntil } from 'rxjs/operators';
-import { Subject } from 'rxjs';
-import { ProcessInstanceQueryRepresentationSort, ProcessInstanceQueryRepresentationState } from '@alfresco/js-api';
-import { CommonModule } from '@angular/common';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { MatSelectModule } from '@angular/material/select';
-import { MatButtonModule } from '@angular/material/button';
-import { ProcessInstanceListComponent } from '@alfresco/adf-process-services';
-import { DataColumnComponent, DataColumnListComponent, PaginationComponent } from '@alfresco/adf-core';
-
-const DEFAULT_SIZE = 20;
-
-@Component({
- standalone: true,
- imports: [
- CommonModule,
- ReactiveFormsModule,
- MatFormFieldModule,
- MatInputModule,
- MatSelectModule,
- MatButtonModule,
- ProcessInstanceListComponent,
- DataColumnListComponent,
- DataColumnComponent,
- PaginationComponent
- ],
- templateUrl: './process-list-demo.component.html',
- styleUrls: [`./process-list-demo.component.scss`]
-})
-export class ProcessListDemoComponent implements OnInit, OnDestroy {
- minValue = 0;
- processListForm: UntypedFormGroup;
- appId: number;
- processDefId: string;
- processInsId: string;
- state: ProcessInstanceQueryRepresentationState;
- sort: ProcessInstanceQueryRepresentationSort;
- size: number = DEFAULT_SIZE;
- page: number = 0;
-
- presetColumn = 'default';
-
- stateOptions = [
- { value: 'all', title: 'All' },
- { value: 'active', title: 'Active' },
- { value: 'completed', title: 'Completed' }
- ];
-
- sortOptions = [
- { value: 'created-asc', title: 'Created (asc)' },
- { value: 'created-desc', title: 'Created (desc)' }
- ];
-
- private onDestroy$ = new Subject();
-
- constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) {}
-
- ngOnInit() {
- this.resetQueryParameters();
-
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- if (params['id']) {
- this.appId = params['id'];
- }
- });
- }
-
- this.buildForm();
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- buildForm() {
- this.processListForm = this.formBuilder.group({
- processAppId: new UntypedFormControl(this.appId, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
- processDefinitionId: new UntypedFormControl(''),
- processInstanceId: new UntypedFormControl(''),
- processState: new UntypedFormControl(''),
- processSort: new UntypedFormControl(''),
- processSize: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
- processPage: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)])
- });
-
- this.processListForm.valueChanges
- .pipe(takeUntil(this.onDestroy$))
- .pipe(debounceTime(500))
- .subscribe((processFilter) => {
- if (this.isFormValid()) {
- this.filterProcesses(processFilter);
- }
- });
- }
-
- filterProcesses(processFilter: any) {
- if (processFilter.processAppId && processFilter.processAppId !== 0) {
- this.appId = processFilter.processAppId;
- } else {
- this.appId = null;
- }
- this.processDefId = processFilter.processDefinitionId;
- this.processInsId = processFilter.processInstanceId;
- this.state = processFilter.processState;
- if (!processFilter.processState) {
- this.state = this.stateOptions[0].value;
- }
- this.sort = processFilter.processSort;
- if (processFilter.processSize) {
- this.size = parseInt(processFilter.processSize, 10);
- }
- if (processFilter.processPage) {
- const pageValue = parseInt(processFilter.processPage, 10);
- this.page = pageValue > 0 ? pageValue - 1 : pageValue;
- } else {
- this.page = 0;
- }
- }
-
- isFormValid() {
- return this.processListForm?.dirty && this.processListForm.valid;
- }
-
- resetProcessForm() {
- this.processListForm.reset();
- this.resetQueryParameters();
- }
-
- resetQueryParameters() {
- this.appId = null;
- this.processDefId = null;
- this.state = this.stateOptions[0].value;
- this.sort = null;
- this.size = DEFAULT_SIZE;
- this.page = null;
- }
-
- getStatus(ended: Date) {
- return ended ? 'Completed' : 'Active';
- }
-
- private getControl(key: string): T {
- return this.processListForm.get(key) as T;
- }
-
- get processAppId(): UntypedFormControl {
- return this.getControl('processAppId');
- }
-
- get processDefinitionId(): UntypedFormControl {
- return this.getControl('processDefinitionId');
- }
-
- get processInstanceId(): UntypedFormControl {
- return this.getControl('processInstanceId');
- }
-
- get processState(): UntypedFormControl {
- return this.getControl('processState');
- }
-
- get processSort(): UntypedFormControl {
- return this.getControl('processSort');
- }
-
- get processSize(): UntypedFormControl {
- return this.getControl('processSize');
- }
-
- get processPage(): UntypedFormControl {
- return this.getControl('processPage');
- }
-}
diff --git a/demo-shell/src/app/components/process-service/apps-view.component.html b/demo-shell/src/app/components/process-service/apps-view.component.html
deleted file mode 100644
index 092ca26c33..0000000000
--- a/demo-shell/src/app/components/process-service/apps-view.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/demo-shell/src/app/components/process-service/apps-view.component.ts b/demo-shell/src/app/components/process-service/apps-view.component.ts
deleted file mode 100644
index 5909fcfebb..0000000000
--- a/demo-shell/src/app/components/process-service/apps-view.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { Router } from '@angular/router';
-import { AppDefinitionRepresentation } from '@alfresco/js-api';
-import { AppsListComponent } from '@alfresco/adf-process-services';
-
-@Component({
- selector: 'app-process-list-view',
- standalone: true,
- imports: [AppsListComponent],
- templateUrl: './apps-view.component.html'
-})
-export class AppsViewComponent {
- constructor(private router: Router) {}
-
- onAppClicked(app: AppDefinitionRepresentation) {
- this.router.navigate(['/activiti/apps', app.id || 0, 'tasks']);
- }
-}
diff --git a/demo-shell/src/app/components/process-service/form-node-viewer.component.css b/demo-shell/src/app/components/process-service/form-node-viewer.component.css
deleted file mode 100644
index 0e5cdfdd65..0000000000
--- a/demo-shell/src/app/components/process-service/form-node-viewer.component.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.activiti-form-viewer {
- margin: 10px;
-}
diff --git a/demo-shell/src/app/components/process-service/form-node-viewer.component.html b/demo-shell/src/app/components/process-service/form-node-viewer.component.html
deleted file mode 100644
index c66bacf054..0000000000
--- a/demo-shell/src/app/components/process-service/form-node-viewer.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/demo-shell/src/app/components/process-service/form-node-viewer.component.ts b/demo-shell/src/app/components/process-service/form-node-viewer.component.ts
deleted file mode 100644
index 8d39ff90be..0000000000
--- a/demo-shell/src/app/components/process-service/form-node-viewer.component.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
-import { FormComponent } from '@alfresco/adf-process-services';
-import { CommonModule } from '@angular/common';
-
-@Component({
- selector: 'app-form-node-viewer',
- standalone: true,
- imports: [CommonModule, FormComponent],
- templateUrl: './form-node-viewer.component.html',
- styleUrls: ['./form-node-viewer.component.css']
-})
-export class FormNodeViewerComponent implements OnInit {
- nodeId: string;
-
- constructor(private route: ActivatedRoute) {}
-
- ngOnInit() {
- this.route.params.subscribe((params) => {
- this.nodeId = params['id'];
- });
- }
-}
diff --git a/demo-shell/src/app/components/process-service/form-viewer.component.css b/demo-shell/src/app/components/process-service/form-viewer.component.css
deleted file mode 100644
index 0e5cdfdd65..0000000000
--- a/demo-shell/src/app/components/process-service/form-viewer.component.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.activiti-form-viewer {
- margin: 10px;
-}
diff --git a/demo-shell/src/app/components/process-service/form-viewer.component.html b/demo-shell/src/app/components/process-service/form-viewer.component.html
deleted file mode 100644
index d5997172b9..0000000000
--- a/demo-shell/src/app/components/process-service/form-viewer.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/demo-shell/src/app/components/process-service/form-viewer.component.ts b/demo-shell/src/app/components/process-service/form-viewer.component.ts
deleted file mode 100644
index b899e66a46..0000000000
--- a/demo-shell/src/app/components/process-service/form-viewer.component.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit } from '@angular/core';
-import { ActivatedRoute, Params } from '@angular/router';
-import { CommonModule } from '@angular/common';
-import { FormComponent } from '@alfresco/adf-process-services';
-
-@Component({
- selector: 'app-form-viewer',
- standalone: true,
- imports: [CommonModule, FormComponent],
- templateUrl: './form-viewer.component.html',
- styleUrls: ['./form-viewer.component.css']
-})
-export class FormViewerComponent implements OnInit {
- taskId: string;
-
- constructor(private route: ActivatedRoute) {}
-
- ngOnInit() {
- this.route.params.subscribe((params: Params) => {
- this.taskId = params['id'];
- });
- }
-}
diff --git a/demo-shell/src/app/components/process-service/process-attachments.component.css b/demo-shell/src/app/components/process-service/process-attachments.component.css
deleted file mode 100644
index 2b929be2ee..0000000000
--- a/demo-shell/src/app/components/process-service/process-attachments.component.css
+++ /dev/null
@@ -1,9 +0,0 @@
-app-process-attachments adf-create-process-attachment button {
- float: right;
-}
-
-@media screen and (max-width: 960px) {
- app-process-attachments .app-empty-list-drag_drop, app-process-attachments .app-empty-list__any-files-here-to-add {
- display: none;
- }
-}
diff --git a/demo-shell/src/app/components/process-service/process-attachments.component.html b/demo-shell/src/app/components/process-service/process-attachments.component.html
deleted file mode 100644
index f987a7082e..0000000000
--- a/demo-shell/src/app/components/process-service/process-attachments.component.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}
-
-
- {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/process-service/process-attachments.component.ts b/demo-shell/src/app/components/process-service/process-attachments.component.ts
deleted file mode 100644
index 66918feb04..0000000000
--- a/demo-shell/src/app/components/process-service/process-attachments.component.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, Input, OnChanges, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
-import {
- CreateProcessAttachmentComponent,
- ProcessAttachmentListComponent,
- ProcessService,
- ProcessUploadService
-} from '@alfresco/adf-process-services';
-import { UploadDragAreaComponent, UploadService } from '@alfresco/adf-content-services';
-import { PreviewService } from '../../services/preview.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { ProcessInstanceRepresentation } from '@alfresco/js-api';
-import { CommonModule } from '@angular/common';
-import { EmptyListComponent } from '@alfresco/adf-core';
-import { TranslateModule } from '@ngx-translate/core';
-
-@Component({
- selector: 'app-process-attachments',
- standalone: true,
- imports: [
- CommonModule,
- UploadDragAreaComponent,
- ProcessAttachmentListComponent,
- EmptyListComponent,
- TranslateModule,
- CreateProcessAttachmentComponent
- ],
- templateUrl: './process-attachments.component.html',
- styleUrls: ['./process-attachments.component.css'],
- providers: [{ provide: UploadService, useClass: ProcessUploadService }],
- encapsulation: ViewEncapsulation.None
-})
-export class ProcessAttachmentsComponent implements OnInit, OnChanges, OnDestroy {
- @ViewChild('processAttachList')
- processAttachList: ProcessAttachmentListComponent;
-
- @Input()
- processInstanceId: string;
-
- processInstance: ProcessInstanceRepresentation;
-
- private uploadService = inject(UploadService);
- private processService = inject(ProcessService);
- private preview = inject(PreviewService);
-
- private onDestroy$ = new Subject();
-
- ngOnInit() {
- this.uploadService.fileUploadComplete.pipe(takeUntil(this.onDestroy$)).subscribe((value) => this.onFileUploadComplete(value.data));
- }
-
- ngOnChanges() {
- if (this.processInstanceId) {
- this.processService.getProcess(this.processInstanceId).subscribe((processInstance) => {
- this.processInstance = processInstance;
- });
- }
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onFileUploadComplete(content: any) {
- this.processAttachList.add(content);
- }
-
- onAttachmentClick(content: any): void {
- this.preview.showBlob(content.name, content.contentBlob);
- }
-
- isCompletedProcess(): boolean {
- return this.processInstance?.ended != null;
- }
-}
diff --git a/demo-shell/src/app/components/process-service/process-service.component.html b/demo-shell/src/app/components/process-service/process-service.component.html
deleted file mode 100644
index d80a425abf..0000000000
--- a/demo-shell/src/app/components/process-service/process-service.component.html
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
diff --git a/demo-shell/src/app/components/process-service/process-service.component.scss b/demo-shell/src/app/components/process-service/process-service.component.scss
deleted file mode 100644
index 3227a47832..0000000000
--- a/demo-shell/src/app/components/process-service/process-service.component.scss
+++ /dev/null
@@ -1,54 +0,0 @@
-.app-grid {
- flex-direction: row;
- display: flex;
- max-height: 100%;
- place-content: stretch flex-start;
- align-items: stretch;
- background-color: white;
-
- .app-grid-item {
- flex: 1;
- margin: 4px;
- border: 1px solid rgba(0, 0, 0, 0.14);
- padding: 10px;
- }
-
- @media screen and (min-width: 1280px) {
- .app-tasks-menu {
- flex: 1 1 265px;
- max-width: 265px;
- min-width: 265px;
- }
-
- .app-tasks-list, .app-processes-list {
- flex: 1 1 380px;
- max-width: 380px;
- min-width: 380px;
- }
-
- .app-processes-menu {
- flex: 1 1 225px;
- max-width: 225px;
- min-width: 225px;
- }
-
- .app-tasks-details, .app-tasks-start, .app-processes-details, .app-processes-start {
- flex: 1 1 auto;
- min-width: auto;
- }
- }
-
- @media screen and (max-width: 959px) {
- container-widget .app-grid-list {
- flex-direction: column;
- }
- }
-}
-
-@media screen and (max-width: 1279px) {
- .app-grid {
- flex-direction: column;
- max-width: 100%;
- max-height: initial;
- }
-}
diff --git a/demo-shell/src/app/components/process-service/process-service.component.ts b/demo-shell/src/app/components/process-service/process-service.component.ts
deleted file mode 100644
index eb47c6dc11..0000000000
--- a/demo-shell/src/app/components/process-service/process-service.component.ts
+++ /dev/null
@@ -1,446 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-// eslint-disable-next-line
-import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation, EventEmitter, Output } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { AlfrescoApiService } from '@alfresco/adf-content-services';
-import { Pagination, UserProcessInstanceFilterRepresentation, ScriptFilesApi, UserTaskFilterRepresentation } from '@alfresco/js-api';
-import {
- FORM_FIELD_VALIDATORS,
- FormRenderingService,
- FormService,
- AppConfigService,
- PaginationComponent,
- UserPreferenceValues,
- UserPreferencesService,
- NotificationService,
- SidebarActionMenuComponent
-} from '@alfresco/adf-core';
-import {
- ProcessFiltersComponent,
- ProcessInstanceListComponent,
- StartProcessInstanceComponent,
- TaskDetailsEvent,
- TaskFiltersComponent,
- TaskListComponent,
- ProcessFormRenderingService,
- APP_LIST_LAYOUT_LIST,
- ValidateDynamicTableRowEvent,
- DynamicTableRow,
- TaskDetailsComponent,
- TaskAuditDirective,
- StartTaskComponent,
- ProcessInstanceDetailsComponent,
- ProcessAuditDirective
-} from '@alfresco/adf-process-services';
-import { Subject } from 'rxjs';
-import { PreviewService } from '../../services/preview.service';
-import { CommonModule, Location } from '@angular/common';
-import { takeUntil } from 'rxjs/operators';
-import { MatTabsModule } from '@angular/material/tabs';
-import { MatIconModule } from '@angular/material/icon';
-import { MatMenuModule } from '@angular/material/menu';
-import { TaskAttachmentsComponent } from './task-attachments.component';
-import { MatButtonModule } from '@angular/material/button';
-import { ProcessAttachmentsComponent } from './process-attachments.component';
-
-const currentProcessIdNew = '__NEW__';
-const currentTaskIdNew = '__NEW__';
-
-const TASK_ROUTE = 0;
-const PROCESS_ROUTE = 1;
-const REPORT_ROUTE = 2;
-
-@Component({
- selector: 'app-process-service',
- standalone: true,
- imports: [
- CommonModule,
- MatTabsModule,
- SidebarActionMenuComponent,
- MatIconModule,
- MatMenuModule,
- TaskFiltersComponent,
- TaskListComponent,
- PaginationComponent,
- TaskDetailsComponent,
- TaskAuditDirective,
- TaskAttachmentsComponent,
- StartTaskComponent,
- ProcessFiltersComponent,
- ProcessInstanceListComponent,
- ProcessInstanceDetailsComponent,
- ProcessAuditDirective,
- MatButtonModule,
- ProcessAttachmentsComponent,
- StartProcessInstanceComponent
- ],
- templateUrl: './process-service.component.html',
- styleUrls: ['./process-service.component.scss'],
- encapsulation: ViewEncapsulation.None,
- providers: [{ provide: FormRenderingService, useClass: ProcessFormRenderingService }]
-})
-export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit {
- @ViewChild('activitiFilter')
- activitiFilter: TaskFiltersComponent;
-
- @ViewChild('taskListPagination')
- taskListPagination: PaginationComponent;
-
- @ViewChild('taskList')
- taskList: TaskListComponent;
-
- @ViewChild('activitiProcessFilter')
- activitiProcessFilter: ProcessFiltersComponent;
-
- @ViewChild('processList')
- processList: ProcessInstanceListComponent;
-
- @ViewChild('activitiStartProcess')
- activitiStartProcess: StartProcessInstanceComponent;
-
- @Input()
- appId: number = null;
-
- filterSelected: any = null;
-
- @Output()
- changePageSize = new EventEmitter();
-
- private tabs = { tasks: 0, processes: 1, reports: 2 };
-
- layoutType: string;
- currentTaskId: string;
- currentProcessInstanceId: string;
-
- taskPage = 0;
- processPage = 0;
- paginationPageSize = 0;
-
- defaultProcessDefinitionName: string;
- defaultProcessName: string;
- defaultTaskName: string;
-
- activeTab: number = this.tabs.tasks; // tasks|processes|reports
-
- taskFilter: UserTaskFilterRepresentation;
- processFilter: UserProcessInstanceFilterRepresentation;
- blobFile: any;
- flag = true;
-
- presetColumn = 'default';
-
- applicationId: number;
- processDefinitionName: string;
-
- fieldValidators = [...FORM_FIELD_VALIDATORS];
-
- private onDestroy$ = new Subject();
- private scriptFileApi: ScriptFilesApi;
-
- constructor(
- private elementRef: ElementRef,
- private route: ActivatedRoute,
- private router: Router,
- private apiService: AlfrescoApiService,
- private appConfigService: AppConfigService,
- private previewService: PreviewService,
- formService: FormService,
- private location: Location,
- private notificationService: NotificationService,
- private preferenceService: UserPreferencesService
- ) {
- this.scriptFileApi = new ScriptFilesApi(this.apiService.getInstance());
- this.defaultProcessName = this.appConfigService.get('adf-start-process.name');
- this.defaultProcessDefinitionName = this.appConfigService.get('adf-start-process.processDefinitionName');
- this.defaultTaskName = this.appConfigService.get('adf-start-task.name');
- this.processDefinitionName = this.defaultProcessDefinitionName;
-
- this.preferenceService
- .select(UserPreferenceValues.PaginationSize)
- .pipe(takeUntil(this.onDestroy$))
- .subscribe((pageSize) => {
- this.paginationPageSize = pageSize;
- });
-
- formService.validateDynamicTableRow
- .pipe(takeUntil(this.onDestroy$))
- .subscribe((validateDynamicTableRowEvent: ValidateDynamicTableRowEvent) => {
- const row: DynamicTableRow = validateDynamicTableRowEvent.row;
- if (row?.value && row.value.name === 'admin') {
- validateDynamicTableRowEvent.summary.isValid = false;
- validateDynamicTableRowEvent.summary.message = 'Sorry, wrong value. You cannot use "admin".';
- validateDynamicTableRowEvent.preventDefault();
- }
- });
-
- formService.formContentClicked.pipe(takeUntil(this.onDestroy$)).subscribe((content) => {
- this.showContentPreview(content);
- });
- }
-
- ngOnInit() {
- if (this.router.url.includes('processes')) {
- this.activeTab = this.tabs.processes;
- }
- this.route.params.subscribe((params) => {
- const applicationId = params['appId'];
-
- this.filterSelected = params['filterId'] ? { id: +params['filterId'] } : { index: 0 };
-
- if (applicationId && applicationId !== '0') {
- this.appId = params['appId'];
- this.applicationId = this.appId;
- }
-
- this.taskFilter = null;
- this.currentTaskId = null;
- this.processFilter = null;
- this.currentProcessInstanceId = null;
- });
- this.layoutType = APP_LIST_LAYOUT_LIST;
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onTaskFilterClick(filter: UserTaskFilterRepresentation): void {
- this.applyTaskFilter(filter);
- this.taskPage = 0;
- }
-
- onTabChange(event: any): void {
- const index = event.index;
- if (index === TASK_ROUTE) {
- this.relocateLocationToTask();
- } else if (index === PROCESS_ROUTE) {
- this.relocateLocationToProcess();
- if (this.processList) {
- this.processList.reload();
- }
- } else if (index === REPORT_ROUTE) {
- this.relocateLocationToReport();
- }
- }
-
- onChangePageSize(event: Pagination): void {
- this.preferenceService.paginationSize = event.maxItems;
- this.changePageSize.emit(event);
- }
-
- onSuccessTaskFilterList(): void {
- this.applyTaskFilter(this.activitiFilter.getCurrentFilter());
- }
-
- applyTaskFilter(filter: UserTaskFilterRepresentation) {
- this.taskFilter = Object.assign({}, filter);
-
- if (filter && this.taskList) {
- this.taskList.hasCustomDataSource = false;
- }
- this.relocateLocationToTask();
- }
-
- onStartTaskSuccess(event: any): void {
- this.activitiFilter.selectFilterWithTask(event.id);
- this.currentTaskId = event.id;
- }
-
- onCancelStartTask() {
- this.currentTaskId = null;
- this.reloadTaskFilters();
- }
-
- onSuccessTaskList() {
- this.currentTaskId = this.taskList.getCurrentId();
- }
-
- onProcessFilterChange(event: UserProcessInstanceFilterRepresentation): void {
- this.processFilter = event;
- this.resetProcessPaginationPage();
- this.relocateLocationToProcess();
- }
-
- resetProcessPaginationPage() {
- this.processPage = 0;
- }
-
- onSuccessProcessFilterList(): void {
- this.processFilter = this.activitiProcessFilter.getCurrentFilter();
- }
-
- onSuccessProcessList(): void {
- this.currentProcessInstanceId = this.processList.getCurrentId();
- }
-
- onTaskRowClick(taskId: string): void {
- this.currentTaskId = taskId;
- }
-
- onTaskRowDblClick(event: CustomEvent) {
- const taskId = event.detail.value.obj.id;
- this.currentTaskId = taskId;
- }
-
- onProcessRowDblClick(event: CustomEvent) {
- const processInstanceId = event.detail.value.obj.id;
- this.currentProcessInstanceId = processInstanceId;
- }
-
- onProcessRowClick(processInstanceId: string): void {
- this.currentProcessInstanceId = processInstanceId;
- }
-
- navigateStartProcess(): void {
- this.currentProcessInstanceId = currentProcessIdNew;
- }
-
- navigateStartTask(): void {
- this.currentTaskId = currentTaskIdNew;
- }
-
- onStartProcessInstance(instanceId: string): void {
- this.currentProcessInstanceId = instanceId;
- this.activitiStartProcess.reset();
- this.activitiProcessFilter.selectRunningFilter();
- }
-
- onCancelProcessInstance() {
- this.currentProcessInstanceId = null;
- this.reloadProcessFilters();
- }
-
- onStartProcessError(event: any) {
- this.notificationService.showError(event.message);
- }
-
- isStartProcessMode(): boolean {
- return this.currentProcessInstanceId === currentProcessIdNew;
- }
-
- isStartTaskMode(): boolean {
- return this.currentTaskId === currentTaskIdNew;
- }
-
- processCancelled(): void {
- this.currentProcessInstanceId = null;
- this.processList.reload();
- }
-
- onFormCompleted(): void {
- this.currentTaskId = null;
- if (this.taskListPagination) {
- this.taskPage = this.taskListPagination.current - 1;
- }
- if (!this.taskList) {
- this.navigateToProcess();
- } else {
- this.taskList.hasCustomDataSource = false;
- this.taskList.reload();
- }
- }
-
- navigateToProcess(): void {
- this.router.navigate([`/activiti/apps/${this.appId}/processes/`]);
- }
-
- relocateLocationToProcess(): void {
- this.location.go(`/activiti/apps/${this.appId || 0}/processes/${this.processFilter ? this.processFilter.id : 0}`);
- }
-
- relocateLocationToTask(): void {
- this.location.go(`/activiti/apps/${this.appId || 0}/tasks/${this.taskFilter ? this.taskFilter.id : 0}`);
- }
-
- relocateLocationToReport(): void {
- this.location.go(`/activiti/apps/${this.appId || 0}/report/`);
- }
-
- onContentClick(content: any): void {
- this.showContentPreview(content);
- }
-
- private showContentPreview(content: any) {
- if (content.contentBlob) {
- this.previewService.showBlob(content.name, content.contentBlob);
- } else {
- this.previewService.showResource(content.sourceId.split(';')[0]);
- }
- }
-
- onTaskCreated(data: any): void {
- this.currentTaskId = data.parentTaskId;
- this.taskList.reload();
- }
-
- onTaskDeleted(): void {
- this.taskList.reload();
- }
-
- ngAfterViewInit() {
- this.loadStencilScriptsInPageFromProcessService();
- }
-
- private loadStencilScriptsInPageFromProcessService() {
- this.scriptFileApi.getControllers().then((response) => {
- if (response) {
- const stencilScript = document.createElement('script');
- stencilScript.type = 'text/javascript';
- stencilScript.text = response;
- this.elementRef.nativeElement.appendChild(stencilScript);
- }
- });
- }
-
- onShowProcessDiagram(event: any): void {
- this.router.navigate(['/activiti/apps/' + this.appId + '/diagram/' + event.value]);
- }
-
- onProcessDetailsTaskClick(event: TaskDetailsEvent): void {
- event.preventDefault();
- this.activeTab = this.tabs.tasks;
-
- const taskId = event.value.id;
- const processTaskDataRow: any = {
- id: taskId,
- name: event.value.name || 'No name',
- created: event.value.created
- };
-
- if (this.taskList) {
- this.taskList.setCustomDataSource([processTaskDataRow]);
- this.taskList.selectTask(taskId);
- }
- this.currentTaskId = taskId;
- }
-
- private reloadProcessFilters(): void {
- this.activitiProcessFilter.selectFilter(this.activitiProcessFilter.getCurrentFilter());
- }
-
- private reloadTaskFilters(): void {
- this.activitiFilter.selectFilter(this.activitiFilter.getCurrentFilter());
- }
-
- onAssignTask() {
- this.taskList.reload();
- this.currentTaskId = null;
- }
-}
diff --git a/demo-shell/src/app/components/process-service/show-diagram.component.html b/demo-shell/src/app/components/process-service/show-diagram.component.html
deleted file mode 100644
index 5d3c4d4ff0..0000000000
--- a/demo-shell/src/app/components/process-service/show-diagram.component.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
diff --git a/demo-shell/src/app/components/process-service/show-diagram.component.ts b/demo-shell/src/app/components/process-service/show-diagram.component.ts
deleted file mode 100644
index 5553566cf8..0000000000
--- a/demo-shell/src/app/components/process-service/show-diagram.component.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { ActivatedRoute, Router, Params } from '@angular/router';
-import { CommonModule } from '@angular/common';
-import { MatIconModule } from '@angular/material/icon';
-import { MatButtonModule } from '@angular/material/button';
-import { DiagramComponent } from '@alfresco/adf-insights';
-
-@Component({
- selector: 'app-show-diagram',
- standalone: true,
- imports: [CommonModule, MatIconModule, MatButtonModule, DiagramComponent],
- templateUrl: './show-diagram.component.html'
-})
-export class ShowDiagramComponent {
- processDefinitionId: string;
- appId: string;
-
- constructor(private route: ActivatedRoute, private router: Router) {
- this.route.params.subscribe((params: Params) => {
- this.processDefinitionId = params['processDefinitionId'];
- this.appId = params['appId'];
- });
- }
-
- onClickBack() {
- this.router.navigate(['/activiti/apps/' + this.appId + '/processes']);
- }
-}
diff --git a/demo-shell/src/app/components/process-service/task-attachments.component.css b/demo-shell/src/app/components/process-service/task-attachments.component.css
deleted file mode 100644
index 1f4772e519..0000000000
--- a/demo-shell/src/app/components/process-service/task-attachments.component.css
+++ /dev/null
@@ -1,9 +0,0 @@
-app-task-attachments adf-create-task-attachment button {
- float: right;
-}
-
-@media screen and (max-width: 960px) {
- app-task-attachments .app-empty-list-drag_drop, app-task-attachments .app-empty-list__any-files-here-to-add {
- display: none;
- }
-}
diff --git a/demo-shell/src/app/components/process-service/task-attachments.component.html b/demo-shell/src/app/components/process-service/task-attachments.component.html
deleted file mode 100644
index 1ced5c3264..0000000000
--- a/demo-shell/src/app/components/process-service/task-attachments.component.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.TITLE' | translate}}
-
-
- {{'ADF_TASK_LIST.ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/process-service/task-attachments.component.ts b/demo-shell/src/app/components/process-service/task-attachments.component.ts
deleted file mode 100644
index fadbf54150..0000000000
--- a/demo-shell/src/app/components/process-service/task-attachments.component.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, Input, OnChanges, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
-import { AttachmentComponent, TaskAttachmentListComponent, TaskListService, TaskUploadService } from '@alfresco/adf-process-services';
-import { UploadDragAreaComponent, UploadService } from '@alfresco/adf-content-services';
-import { PreviewService } from '../../services/preview.service';
-import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { TaskRepresentation } from '@alfresco/js-api';
-import { CommonModule } from '@angular/common';
-import { EmptyListComponent } from '@alfresco/adf-core';
-import { TranslateModule } from '@ngx-translate/core';
-
-@Component({
- selector: 'app-task-attachments',
- standalone: true,
- imports: [CommonModule, UploadDragAreaComponent, TaskAttachmentListComponent, EmptyListComponent, TranslateModule, AttachmentComponent],
- templateUrl: './task-attachments.component.html',
- styleUrls: ['./task-attachments.component.css'],
- encapsulation: ViewEncapsulation.None,
- providers: [{ provide: UploadService, useClass: TaskUploadService }]
-})
-export class TaskAttachmentsComponent implements OnInit, OnChanges, OnDestroy {
- @ViewChild('taskAttachList')
- taskAttachList: TaskAttachmentListComponent;
-
- @Input()
- taskId: string;
-
- taskDetails: TaskRepresentation;
-
- private uploadService = inject(UploadService);
- private taskListService = inject(TaskListService);
- private previewService = inject(PreviewService);
-
- private onDestroy$ = new Subject();
-
- ngOnInit() {
- this.uploadService.fileUploadComplete.pipe(takeUntil(this.onDestroy$)).subscribe((event) => this.onFileUploadComplete(event.data));
- }
-
- ngOnChanges() {
- if (this.taskId) {
- this.taskListService.getTaskDetails(this.taskId).subscribe((taskDetails) => (this.taskDetails = taskDetails));
- }
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onFileUploadComplete(content: any) {
- this.taskAttachList.add(content);
- }
-
- onAttachmentClick(content: any): void {
- this.previewService.showBlob(content.name, content.contentBlob);
- }
-
- isCompletedTask(): boolean {
- return this.taskDetails?.endDate != null;
- }
-}
diff --git a/demo-shell/src/app/components/search/search-bar.component.html b/demo-shell/src/app/components/search/search-bar.component.html
deleted file mode 100644
index f94df07e23..0000000000
--- a/demo-shell/src/app/components/search/search-bar.component.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
diff --git a/demo-shell/src/app/components/search/search-bar.component.scss b/demo-shell/src/app/components/search/search-bar.component.scss
deleted file mode 100644
index 44723d36c6..0000000000
--- a/demo-shell/src/app/components/search/search-bar.component.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.app-search-elements {
- display: flex;
- align-items: center;
-}
diff --git a/demo-shell/src/app/components/search/search-bar.component.ts b/demo-shell/src/app/components/search/search-bar.component.ts
deleted file mode 100644
index c2b3530577..0000000000
--- a/demo-shell/src/app/components/search/search-bar.component.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { Router } from '@angular/router';
-import { NodeEntry } from '@alfresco/js-api';
-import { PreviewService } from '../../services/preview.service';
-import { CommonModule } from '@angular/common';
-import { SearchControlComponent } from '@alfresco/adf-content-services';
-
-@Component({
- selector: 'app-search-bar',
- standalone: true,
- imports: [CommonModule, SearchControlComponent],
- templateUrl: './search-bar.component.html',
- styleUrls: ['./search-bar.component.scss']
-})
-export class SearchBarComponent {
- constructor(public router: Router, private preview: PreviewService) {}
-
- /**
- * Called when the user submits the search, e.g. hits enter or clicks submit
- *
- * @param event Parameters relating to the search
- */
- onSearchSubmit(event: KeyboardEvent) {
- const value = (event.target as HTMLInputElement).value;
- this.router.navigate([
- '/search',
- {
- q: value
- }
- ]);
- }
-
- onItemClicked(event: NodeEntry) {
- if (event.entry.isFile) {
- this.preview.showResource(event.entry.id);
- } else if (event.entry.isFolder) {
- this.router.navigate(['/files', event.entry.id]);
- }
- }
-}
diff --git a/demo-shell/src/app/components/search/search-config-test.service.ts b/demo-shell/src/app/components/search/search-config-test.service.ts
deleted file mode 100644
index 9ce4a13914..0000000000
--- a/demo-shell/src/app/components/search/search-config-test.service.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { SearchRequest } from '@alfresco/js-api';
-import { SearchConfigurationInterface } from '@alfresco/adf-content-services';
-import { Injectable } from '@angular/core';
-
-@Injectable()
-export class TestSearchConfigurationService implements SearchConfigurationInterface {
- public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): SearchRequest {
- return {
- query: {
- query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm
- },
- include: ['path', 'allowableOperations'],
- paging: {
- maxItems: maxResults,
- skipCount
- },
- filterQueries: [
- /* eslint-disable-next-line */
- { query: "TYPE:'cm:folder'" },
- { query: 'NOT cm:creator:System' }
- ]
- };
- }
-}
diff --git a/demo-shell/src/app/components/search/search-filter-chips.component.html b/demo-shell/src/app/components/search/search-filter-chips.component.html
deleted file mode 100644
index 2b5c03c8b5..0000000000
--- a/demo-shell/src/app/components/search/search-filter-chips.component.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
refresh
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/search/search-filter-chips.component.scss b/demo-shell/src/app/components/search/search-filter-chips.component.scss
deleted file mode 100644
index 8867d6b753..0000000000
--- a/demo-shell/src/app/components/search/search-filter-chips.component.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-.app-search-results {
- display: flex;
- margin-left: 5px;
-
- .app-search-settings {
- width: 260px;
- border: 1px solid #eee;
- }
-
- &__facets {
- margin: 5px;
- }
-
- &__content {
- flex: 1;
- }
-
- &__sorting {
- padding-top: 16px;
- padding-bottom: 16px;
- display: flex;
- }
-}
-
-div.app-search-results-container {
- padding: 0 20px 20px;
-}
-
-.app-search-title {
- font-size: 22px;
- padding: 15px 0;
-}
-
-@media screen and (max-width: 600px) {
- :host .app-col-display-name {
- min-width: 100px;
- }
-
- :host .app-col-modified-at,
- :host .app-col-modified-by {
- display: none;
- }
-
- :host div.app-search-results-container table {
- width: 100%;
- }
-}
diff --git a/demo-shell/src/app/components/search/search-filter-chips.component.ts b/demo-shell/src/app/components/search/search-filter-chips.component.ts
deleted file mode 100644
index 713ec33fea..0000000000
--- a/demo-shell/src/app/components/search/search-filter-chips.component.ts
+++ /dev/null
@@ -1,191 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit } from '@angular/core';
-import { ActivatedRoute, Params, Router } from '@angular/router';
-import { Pagination, ResultSetPaging } from '@alfresco/js-api';
-import {
- ResetSearchDirective,
- SearchConfiguration,
- SearchFilterChipsComponent,
- SearchFormComponent,
- SearchQueryBuilderService,
- SearchService,
- SearchSortingPickerComponent
-} from '@alfresco/adf-content-services';
-import { ShowHeaderMode, UserPreferencesService } from '@alfresco/adf-core';
-import { combineLatest, Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { CommonModule } from '@angular/common';
-import { MatProgressBarModule } from '@angular/material/progress-bar';
-import { MatDividerModule } from '@angular/material/divider';
-import { MatIconModule } from '@angular/material/icon';
-import { FilesComponent } from '../files/files.component';
-
-@Component({
- selector: 'app-search-filter-chips',
- standalone: true,
- imports: [
- CommonModule,
- MatProgressBarModule,
- SearchFormComponent,
- MatDividerModule,
- MatIconModule,
- ResetSearchDirective,
- SearchSortingPickerComponent,
- FilesComponent,
- SearchFilterChipsComponent
- ],
- templateUrl: './search-filter-chips.component.html',
- styleUrls: ['./search-filter-chips.component.scss'],
- providers: [SearchService]
-})
-export class AppSearchFilterChipsComponent implements OnInit, OnDestroy {
- queryParamName = 'q';
- searchedWord = '';
- data: ResultSetPaging;
- pagination: Pagination;
- isLoading = true;
-
- sorting = ['name', 'asc'];
- showHeader = ShowHeaderMode.Always;
-
- private onDestroy$ = new Subject();
-
- constructor(
- public router: Router,
- private preferences: UserPreferencesService,
- private queryBuilder: SearchQueryBuilderService,
- private route: ActivatedRoute
- ) {
- combineLatest([this.route.params, this.queryBuilder.configUpdated])
- .pipe(takeUntil(this.onDestroy$))
- .subscribe(([params, searchConfig]) => {
- this.updateSearchSetting(searchConfig);
- this.searchedWord = Object.prototype.hasOwnProperty.call(params, this.queryParamName) ? params[this.queryParamName] : null;
- const query = this.formatSearchQuery(this.searchedWord, searchConfig['app:fields']);
- if (query) {
- this.queryBuilder.userQuery = query;
- }
- });
-
- queryBuilder.paging = {
- maxItems: this.preferences.paginationSize,
- skipCount: 0
- };
- }
-
- ngOnInit() {
- this.queryBuilder.resetToDefaults();
-
- this.sorting = this.getSorting();
-
- this.queryBuilder.updated.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
- this.sorting = this.getSorting();
- this.isLoading = true;
- });
-
- this.queryBuilder.executed.pipe(takeUntil(this.onDestroy$)).subscribe((resultSetPaging: ResultSetPaging) => {
- this.queryBuilder.paging.skipCount = 0;
-
- this.onSearchResultLoaded(resultSetPaging);
- this.isLoading = false;
- });
-
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- this.searchedWord = Object.prototype.hasOwnProperty.call(params, this.queryParamName) ? params[this.queryParamName] : null;
- if (this.searchedWord) {
- this.queryBuilder.update();
- } else {
- this.queryBuilder.userQuery = null;
- this.queryBuilder.executed.next(
- new ResultSetPaging({
- list: {
- pagination: { totalItems: 0 },
- entries: []
- }
- })
- );
- }
- });
- }
- }
-
- private formatSearchQuery(userInput: string, fields = ['cm:name']) {
- if (!userInput) {
- return null;
- }
- return fields.map((field) => `${field}:"${userInput}*"`).join(' OR ');
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onSearchResultLoaded(resultSetPaging: ResultSetPaging) {
- this.data = resultSetPaging;
- this.pagination = { ...resultSetPaging.list.pagination };
- }
-
- onRefreshPagination(pagination: Pagination) {
- this.queryBuilder.paging = {
- maxItems: pagination.maxItems,
- skipCount: pagination.skipCount
- };
- this.queryBuilder.update();
- }
-
- onDeleteElementSuccess() {
- this.queryBuilder.execute();
- }
-
- private getSorting(): string[] {
- const primary = this.queryBuilder.getPrimarySorting();
-
- if (primary) {
- return [primary.key, primary.ascending ? 'asc' : 'desc'];
- }
-
- return ['name', 'asc'];
- }
-
- private updateSearchSetting(config: SearchConfiguration): void {
- if (config.facetQueries) {
- this.updateSetting(config.facetQueries);
- }
-
- if (config.facetFields?.fields?.length) {
- config.facetFields.fields.forEach((field) => this.updateSetting(field));
- }
-
- if (config.facetIntervals?.intervals?.length) {
- config.facetIntervals.intervals.forEach((field) => this.updateSetting(field));
- }
-
- if (config.categories.length) {
- config.categories.forEach((field) => this.updateSetting(field.component));
- }
- }
-
- private updateSetting(field) {
- field.settings = field.settings ?? {};
- field.settings.allowUpdateOnChange = false;
- field.settings.hideDefaultAction = true;
- }
-}
diff --git a/demo-shell/src/app/components/search/search-result.component.html b/demo-shell/src/app/components/search/search-result.component.html
deleted file mode 100644
index 3b036e75a7..0000000000
--- a/demo-shell/src/app/components/search/search-result.component.html
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/search/search-result.component.scss b/demo-shell/src/app/components/search/search-result.component.scss
deleted file mode 100644
index a0334839f8..0000000000
--- a/demo-shell/src/app/components/search/search-result.component.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-.app-search-results {
- display: flex;
- margin-left: 5px;
-
- .app-search-settings {
- border: 1px solid #eee;
- }
-
- &__facets {
- margin: 5px;
- }
-
- &__content {
- flex: 1;
- }
-
- &__sorting {
- padding-top: 16px;
- padding-bottom: 16px;
- display: flex;
- flex-direction: row-reverse;
- justify-content: space-between;
- }
-}
-
-div.app-search-results-container {
- padding: 0 20px 20px;
-}
-
-.app-search-title {
- font-size: 22px;
- padding: 15px 0;
-}
-
-@media screen and (max-width: 600px) {
- :host .app-col-display-name {
- min-width: 100px;
- }
-
- :host .app-col-modified-at,
- :host .app-col-modified-by {
- display: none;
- }
-
- :host div.app-search-results-container table {
- width: 100%;
- }
-}
diff --git a/demo-shell/src/app/components/search/search-result.component.ts b/demo-shell/src/app/components/search/search-result.component.ts
deleted file mode 100644
index 3717a47c31..0000000000
--- a/demo-shell/src/app/components/search/search-result.component.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnDestroy, OnInit } from '@angular/core';
-import { ActivatedRoute, Params, Router } from '@angular/router';
-import { Pagination, ResultSetPaging } from '@alfresco/js-api';
-import {
- SearchChipListComponent,
- SearchFilterComponent,
- SearchForm,
- SearchQueryBuilderService,
- SearchService,
- SearchSortingPickerComponent
-} from '@alfresco/adf-content-services';
-import { ShowHeaderMode, UserPreferencesService } from '@alfresco/adf-core';
-import { combineLatest, Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
-import { CommonModule } from '@angular/common';
-import { MatProgressBarModule } from '@angular/material/progress-bar';
-import { MatButtonModule } from '@angular/material/button';
-import { FilesComponent } from '../files/files.component';
-
-@Component({
- selector: 'app-search-result-component',
- standalone: true,
- imports: [
- CommonModule,
- SearchChipListComponent,
- SearchFilterComponent,
- MatProgressBarModule,
- SearchSortingPickerComponent,
- MatButtonModule,
- FilesComponent
- ],
- templateUrl: './search-result.component.html',
- styleUrls: ['./search-result.component.scss'],
- providers: [SearchService]
-})
-export class SearchResultComponent implements OnInit, OnDestroy {
- queryParamName = 'q';
- searchedWord = '';
- data: ResultSetPaging;
- pagination: Pagination;
- isLoading = true;
-
- sorting = ['name', 'asc'];
- searchForms: SearchForm[];
- showHeader = ShowHeaderMode.Always;
-
- private onDestroy$ = new Subject();
-
- constructor(
- public router: Router,
- private preferences: UserPreferencesService,
- private queryBuilder: SearchQueryBuilderService,
- private route: ActivatedRoute
- ) {
- combineLatest([this.route.params, this.queryBuilder.configUpdated])
- .pipe(takeUntil(this.onDestroy$))
- .subscribe(([params, searchConfig]) => {
- this.searchedWord = Object.prototype.hasOwnProperty.call(params, this.queryParamName) ? params[this.queryParamName] : null;
- const query = this.formatSearchQuery(this.searchedWord, searchConfig['app:fields']);
- if (query) {
- this.queryBuilder.userQuery = query;
- }
- });
-
- queryBuilder.paging = {
- maxItems: this.preferences.paginationSize,
- skipCount: 0
- };
- }
-
- ngOnInit() {
- this.queryBuilder.resetToDefaults();
-
- this.sorting = this.getSorting();
-
- this.queryBuilder.updated.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
- this.sorting = this.getSorting();
- this.isLoading = true;
- });
-
- this.queryBuilder.executed.pipe(takeUntil(this.onDestroy$)).subscribe((resultSetPaging: ResultSetPaging) => {
- this.queryBuilder.paging.skipCount = 0;
-
- this.onSearchResultLoaded(resultSetPaging);
- this.isLoading = false;
- });
-
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- this.searchedWord = Object.prototype.hasOwnProperty.call(params, this.queryParamName) ? params[this.queryParamName] : null;
- if (this.searchedWord) {
- this.queryBuilder.update();
- } else {
- this.queryBuilder.userQuery = null;
- this.queryBuilder.executed.next(
- new ResultSetPaging({
- list: {
- pagination: { totalItems: 0 },
- entries: []
- }
- })
- );
- }
- });
- }
- }
-
- private formatSearchQuery(userInput: string, fields = ['cm:name']) {
- if (!userInput) {
- return null;
- }
- return fields.map((field) => `${field}:"${userInput}*"`).join(' OR ');
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- onSearchResultLoaded(resultSetPaging: ResultSetPaging) {
- this.data = resultSetPaging;
- this.pagination = { ...resultSetPaging.list.pagination };
- }
-
- onRefreshPagination(pagination: Pagination) {
- this.queryBuilder.paging = {
- maxItems: pagination.maxItems,
- skipCount: pagination.skipCount
- };
- this.queryBuilder.update();
- }
-
- onDeleteElementSuccess() {
- this.queryBuilder.execute();
- }
-
- private getSorting(): string[] {
- const primary = this.queryBuilder.getPrimarySorting();
-
- if (primary) {
- return [primary.key, primary.ascending ? 'asc' : 'desc'];
- }
-
- return ['name', 'asc'];
- }
-
- switchLayout() {
- this.router.navigate(['search-filter-chips', { q: this.searchedWord }]);
- }
-}
diff --git a/demo-shell/src/app/components/settings/host-settings.component.html b/demo-shell/src/app/components/settings/host-settings.component.html
deleted file mode 100644
index cca0e48ac0..0000000000
--- a/demo-shell/src/app/components/settings/host-settings.component.html
+++ /dev/null
@@ -1,106 +0,0 @@
-
diff --git a/demo-shell/src/app/components/settings/host-settings.component.scss b/demo-shell/src/app/components/settings/host-settings.component.scss
deleted file mode 100644
index e2715b668f..0000000000
--- a/demo-shell/src/app/components/settings/host-settings.component.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-.adf-host-settings {
- display: flex;
- 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;
- margin: 0 auto;
- border-collapse: collapse;
- border-spacing: 0;
- }
-
- .adf-full-width {
- width: 100%;
- }
-}
diff --git a/demo-shell/src/app/components/settings/host-settings.component.ts b/demo-shell/src/app/components/settings/host-settings.component.ts
deleted file mode 100644
index 877791ec17..0000000000
--- a/demo-shell/src/app/components/settings/host-settings.component.ts
+++ /dev/null
@@ -1,302 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, EventEmitter, Output, ViewEncapsulation, OnInit, Input } from '@angular/core';
-import { Validators, UntypedFormGroup, UntypedFormBuilder, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
-import { AppConfigService, AppConfigValues, StorageService, AuthenticationService } from '@alfresco/adf-core';
-import { ENTER } from '@angular/cdk/keycodes';
-import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
-import { CommonModule } from '@angular/common';
-import { MatSelectModule } from '@angular/material/select';
-import { MatRadioModule } from '@angular/material/radio';
-import { MatInputModule } from '@angular/material/input';
-import { MatSlideToggleModule } from '@angular/material/slide-toggle';
-import { MatButtonModule } from '@angular/material/button';
-import { AlfrescoApiService } from '@alfresco/adf-content-services';
-
-export const HOST_REGEX = '^(http|https)://.*[^/]$';
-
-@Component({
- providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'always' } }],
- selector: 'adf-host-settings',
- standalone: true,
- imports: [
- CommonModule,
- ReactiveFormsModule,
- MatFormFieldModule,
- MatSelectModule,
- MatRadioModule,
- MatInputModule,
- MatSlideToggleModule,
- MatButtonModule
- ],
- templateUrl: 'host-settings.component.html',
- host: { class: 'adf-host-settings' },
- styleUrls: ['./host-settings.component.scss'],
- encapsulation: ViewEncapsulation.None
-})
-export class HostSettingsComponent implements OnInit {
- /**
- * Tells the component which provider options are available. Possible valid values
- * are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO.
- */
- @Input()
- providers: string[] = ['BPM', 'ECM', 'ALL'];
-
- showSelectProviders = true;
- form: UntypedFormGroup;
-
- ERR_REQUIRED = 'This field is required';
- ERR_INVALID_URL = 'http(s)://host|ip:port(/path) not recognized, try a different URL.';
- PLACEHOLDER_URL: 'http(s)://host|ip:port(/path)';
-
- /** Emitted when the URL is invalid. */
- @Output()
- // eslint-disable-next-line @angular-eslint/no-output-native
- error = new EventEmitter();
-
- /** Emitted when the user cancels the changes. */
- @Output()
- cancel = new EventEmitter();
-
- /** Emitted when the changes are successfully applied. */
- @Output()
- // eslint-disable-next-line @angular-eslint/no-output-native
- success = new EventEmitter();
-
- constructor(
- private formBuilder: UntypedFormBuilder,
- private storageService: StorageService,
- private alfrescoApiService: AlfrescoApiService,
- private appConfig: AppConfigService,
- private authenticationService: AuthenticationService
- ) {}
-
- ngOnInit() {
- if (this.providers.length === 1) {
- this.showSelectProviders = false;
- }
-
- const providerSelected = this.appConfig.get(AppConfigValues.PROVIDERS);
-
- const authType = this.appConfig.get(AppConfigValues.AUTHTYPE, 'BASIC');
-
- this.form = this.formBuilder.group({
- providersControl: [providerSelected, Validators.required],
- authType
- });
-
- this.addFormGroups();
-
- if (authType === 'OAUTH') {
- this.addOAuthFormGroup();
- this.addIdentityHostFormControl();
- }
-
- this.form.get('authType').valueChanges.subscribe((value) => {
- if (value === 'BASIC') {
- this.form.removeControl('oauthConfig');
- this.form.removeControl('identityHost');
- } else {
- this.addOAuthFormGroup();
- this.addIdentityHostFormControl();
- }
- });
-
- this.providersControl.valueChanges.subscribe(() => {
- this.removeFormGroups();
- this.addFormGroups();
- });
- }
-
- private removeFormGroups() {
- this.form.removeControl('bpmHost');
- this.form.removeControl('ecmHost');
- }
-
- private addFormGroups() {
- this.addBPMFormControl();
- this.addECMFormControl();
- }
-
- private addOAuthFormGroup() {
- const oauthFormGroup = this.createOAuthFormGroup();
- this.form.addControl('oauthConfig', oauthFormGroup);
- }
-
- private addBPMFormControl() {
- if ((this.isBPM() || this.isALL() || this.isOAUTH()) && !this.bpmHost) {
- const bpmFormControl = this.createBPMFormControl();
- this.form.addControl('bpmHost', bpmFormControl);
- }
- }
-
- private addIdentityHostFormControl() {
- const identityHostFormControl = this.createIdentityFormControl();
- this.form.addControl('identityHost', identityHostFormControl);
- }
-
- private addECMFormControl() {
- if ((this.isECM() || this.isALL()) && !this.ecmHost) {
- const ecmFormControl = this.createECMFormControl();
- this.form.addControl('ecmHost', ecmFormControl);
- }
- }
-
- private createOAuthFormGroup(): UntypedFormGroup {
- const oauth = this.appConfig.oauth2;
-
- return this.formBuilder.group({
- host: [oauth.host, [Validators.required, Validators.pattern(HOST_REGEX)]],
- clientId: [oauth.clientId, Validators.required],
- redirectUri: [oauth.redirectUri, Validators.required],
- redirectUriLogout: [oauth.redirectUriLogout],
- scope: [oauth.scope, Validators.required],
- secret: oauth.secret,
- silentLogin: oauth.silentLogin,
- implicitFlow: oauth.implicitFlow,
- codeFlow: oauth.codeFlow,
- publicUrls: [oauth.publicUrls]
- });
- }
-
- private createBPMFormControl(): UntypedFormControl {
- return new UntypedFormControl(this.appConfig.get(AppConfigValues.BPMHOST), [Validators.required, Validators.pattern(HOST_REGEX)]);
- }
-
- private createIdentityFormControl(): UntypedFormControl {
- return new UntypedFormControl(this.appConfig.get(AppConfigValues.IDENTITY_HOST), [
- Validators.required,
- Validators.pattern(HOST_REGEX)
- ]);
- }
-
- private createECMFormControl(): UntypedFormControl {
- return new UntypedFormControl(this.appConfig.get(AppConfigValues.ECMHOST), [Validators.required, Validators.pattern(HOST_REGEX)]);
- }
-
- onCancel() {
- this.cancel.emit(true);
- }
-
- onSubmit(values: any) {
- this.storageService.setItem(AppConfigValues.PROVIDERS, values.providersControl);
-
- if (this.isBPM()) {
- this.saveBPMValues(values);
- } else if (this.isECM()) {
- this.saveECMValues(values);
- } else if (this.isALL()) {
- this.saveECMValues(values);
- this.saveBPMValues(values);
- }
-
- if (this.isOAUTH()) {
- this.saveOAuthValues(values);
- }
-
- this.storageService.setItem(AppConfigValues.AUTHTYPE, values.authType);
-
- this.alfrescoApiService.reset();
- this.authenticationService.reset();
- this.authenticationService.logout();
- this.success.emit(true);
- }
-
- keyDownFunction(event: any) {
- if (event.keyCode === ENTER && this.form.valid) {
- this.onSubmit(this.form.value);
- }
- }
-
- private saveOAuthValues(values: any) {
- if (values.oauthConfig.publicUrls && typeof values.oauthConfig.publicUrls === 'string') {
- values.oauthConfig.publicUrls = values.oauthConfig.publicUrls.split(',');
- }
-
- this.storageService.setItem(AppConfigValues.OAUTHCONFIG, JSON.stringify(values.oauthConfig));
- this.storageService.setItem(AppConfigValues.IDENTITY_HOST, values.identityHost);
- }
-
- private saveBPMValues(values: any) {
- this.storageService.setItem(AppConfigValues.BPMHOST, values.bpmHost);
- }
-
- private saveECMValues(values: any) {
- this.storageService.setItem(AppConfigValues.ECMHOST, values.ecmHost);
- }
-
- isBPM(): boolean {
- return this.providersControl.value === 'BPM';
- }
-
- isECM(): boolean {
- return this.providersControl.value === 'ECM';
- }
-
- isALL(): boolean {
- return this.providersControl.value === 'ALL';
- }
-
- isOAUTH(): boolean {
- return this.form.get('authType').value === 'OAUTH';
- }
-
- get providersControl(): UntypedFormControl {
- return this.form.get('providersControl') as UntypedFormControl;
- }
-
- get bpmHost(): UntypedFormControl {
- return this.form.get('bpmHost') as UntypedFormControl;
- }
-
- get ecmHost(): UntypedFormControl {
- return this.form.get('ecmHost') as UntypedFormControl;
- }
-
- get host(): UntypedFormControl {
- return this.oauthConfig.get('host') as UntypedFormControl;
- }
-
- get identityHost(): UntypedFormControl {
- return this.form.get('identityHost') as UntypedFormControl;
- }
-
- get clientId(): UntypedFormControl {
- return this.oauthConfig.get('clientId') as UntypedFormControl;
- }
-
- get scope(): UntypedFormControl {
- return this.oauthConfig.get('scope') as UntypedFormControl;
- }
-
- get secret(): UntypedFormControl {
- return this.oauthConfig.get('secret') as UntypedFormControl;
- }
-
- get silentLogin(): UntypedFormControl {
- return this.oauthConfig.get('silentLogin') as UntypedFormControl;
- }
-
- get redirectUri(): UntypedFormControl {
- return this.oauthConfig.get('redirectUri') as UntypedFormControl;
- }
-
- get oauthConfig(): UntypedFormControl {
- return this.form.get('oauthConfig') as UntypedFormControl;
- }
-}
diff --git a/demo-shell/src/app/components/settings/settings.component.html b/demo-shell/src/app/components/settings/settings.component.html
deleted file mode 100644
index ab701c3f09..0000000000
--- a/demo-shell/src/app/components/settings/settings.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/demo-shell/src/app/components/settings/settings.component.ts b/demo-shell/src/app/components/settings/settings.component.ts
deleted file mode 100644
index 0f01b52391..0000000000
--- a/demo-shell/src/app/components/settings/settings.component.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { Router } from '@angular/router';
-import { CommonModule } from '@angular/common';
-import { HostSettingsComponent } from './host-settings.component';
-
-@Component({
- selector: 'app-settings',
- standalone: true,
- imports: [CommonModule, HostSettingsComponent],
- templateUrl: './settings.component.html'
-})
-export class SettingsComponent {
- constructor(private router: Router) {}
-
- onCancel() {
- this.router.navigate(['/login']);
- }
-
- onSuccess() {
- this.router.navigate(['/login']);
- }
-}
diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.html b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.html
deleted file mode 100644
index ab7fc8f192..0000000000
--- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{entry.row.obj.assignee | fullName}}
-
-
-
-
-
-
- {{entry.row.obj.created | adfLocalizedDate: 'MMM d, yyyy' }}
-
-
-
-
- {{entry.row.obj.dueDate | adfLocalizedDate: 'MMM d, yyyy' }}
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.scss b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.scss
deleted file mode 100644
index 88ebd7425c..0000000000
--- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-.app-task-list-demo-inputs {
- margin: 20px auto 0;
- max-width: 1200px;
-
- & mat-form-field {
- margin: 20px 5px;
- width: calc(100% * (1 / 4) - 10px);
- }
-}
-
-.app-reset-button {
- margin-bottom: 50px;
- display: flex;
- justify-content: center;
-}
-
-.app-task-list-demo-error-message {
- color: var(--theme-warn-color);
- text-align: center;
-}
diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts
deleted file mode 100644
index 100f03e348..0000000000
--- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts
+++ /dev/null
@@ -1,271 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, OnInit, OnDestroy } from '@angular/core';
-import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl, AbstractControl, ReactiveFormsModule } from '@angular/forms';
-import { ActivatedRoute, Params } from '@angular/router';
-import { debounceTime, takeUntil } from 'rxjs/operators';
-import { Subject } from 'rxjs';
-import { set } from 'date-fns';
-import { CommonModule } from '@angular/common';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { MatDatepickerModule } from '@angular/material/datepicker';
-import { MatSelectModule } from '@angular/material/select';
-import { MatButtonModule } from '@angular/material/button';
-import { TaskListComponent } from '@alfresco/adf-process-services';
-import { DataColumnComponent, DataColumnListComponent, FullNamePipe, LocalizedDatePipe, PaginationComponent } from '@alfresco/adf-core';
-
-const DEFAULT_SIZE = 20;
-
-@Component({
- selector: 'app-task-list-demo',
- standalone: true,
- imports: [
- CommonModule,
- ReactiveFormsModule,
- MatFormFieldModule,
- MatInputModule,
- MatDatepickerModule,
- MatSelectModule,
- MatButtonModule,
- TaskListComponent,
- DataColumnListComponent,
- DataColumnComponent,
- FullNamePipe,
- LocalizedDatePipe,
- PaginationComponent
- ],
- templateUrl: './task-list-demo.component.html',
- styleUrls: [`./task-list-demo.component.scss`]
-})
-export class TaskListDemoComponent implements OnInit, OnDestroy {
- taskListForm: UntypedFormGroup;
-
- errorMessage: string;
- minValue = 1;
-
- appId: number;
- defaultAppId: number;
- id: string;
- processDefinitionId: string;
- processInstanceId: string;
- state: string;
- assignment: string;
- name: string;
- sort: string;
- start: number;
- size: number = DEFAULT_SIZE;
- page: number = 0;
- dueAfter: string;
- dueBefore: string;
-
- includeProcessInstance: boolean;
-
- assignmentOptions = [
- { value: 'assignee', title: 'Assignee' },
- { value: 'candidate', title: 'Candidate' }
- ];
-
- includeProcessInstanceOptions = [
- { value: 'include', title: 'Include' },
- { value: 'exclude', title: 'Exclude' }
- ];
-
- stateOptions = [
- { value: 'all', title: 'All' },
- { value: 'active', title: 'Active' },
- { value: 'completed', title: 'Completed' }
- ];
-
- sortOptions = [
- { value: 'created-asc', title: 'Created (asc)' },
- { value: 'created-desc', title: 'Created (desc)' },
- { value: 'due-asc', title: 'Due (asc)' },
- { value: 'due-desc', title: 'Due (desc)' }
- ];
-
- private onDestroy$ = new Subject();
-
- constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) {}
-
- ngOnInit() {
- if (this.route) {
- this.route.params.forEach((params: Params) => {
- if (params['id']) {
- this.defaultAppId = +params['id'];
- }
- });
- }
-
- this.appId = this.defaultAppId;
- this.errorMessage = 'Insert App Id';
-
- this.buildForm();
- }
-
- ngOnDestroy() {
- this.onDestroy$.next(true);
- this.onDestroy$.complete();
- }
-
- buildForm() {
- this.taskListForm = this.formBuilder.group({
- taskAppId: new UntypedFormControl(this.defaultAppId, [Validators.pattern('^[0-9]*$')]),
- taskName: new UntypedFormControl(),
- taskId: new UntypedFormControl(),
- taskProcessDefinitionId: new UntypedFormControl(),
- taskProcessInstanceId: new UntypedFormControl(),
- taskAssignment: new UntypedFormControl(),
- taskState: new UntypedFormControl(),
- taskSort: new UntypedFormControl(),
- taskSize: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
- taskPage: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]),
- taskDueAfter: new UntypedFormControl(),
- taskDueBefore: new UntypedFormControl(),
- taskStart: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$')]),
- taskIncludeProcessInstance: new UntypedFormControl()
- });
-
- this.taskListForm.valueChanges.pipe(debounceTime(500), takeUntil(this.onDestroy$)).subscribe((taskFilter) => {
- if (this.isFormValid()) {
- this.filterTasks(taskFilter);
- }
- });
- }
-
- filterTasks(taskFilter: any) {
- this.appId = taskFilter.taskAppId;
- this.id = taskFilter.taskId;
- this.processDefinitionId = taskFilter.taskProcessDefinitionId;
- this.processInstanceId = taskFilter.taskProcessInstanceId;
- this.name = taskFilter.taskName;
- this.assignment = taskFilter.taskAssignment;
- this.state = taskFilter.taskState;
- this.sort = taskFilter.taskSort;
- this.start = taskFilter.taskStart;
- this.dueAfter = taskFilter.taskDueAfter ? this.setDueAfterFilter(taskFilter.taskDueAfter) : null;
- this.dueBefore = taskFilter.taskDueBefore;
-
- if (taskFilter.taskSize) {
- this.size = parseInt(taskFilter.taskSize, 10);
- }
-
- if (taskFilter.taskPage) {
- const pageValue = parseInt(taskFilter.taskPage, 10);
- this.page = pageValue > 0 ? pageValue - 1 : pageValue;
- } else {
- this.page = 0;
- }
-
- this.includeProcessInstance = taskFilter.taskIncludeProcessInstance === 'include';
- }
-
- setDueAfterFilter(date): string {
- const dueDateFilter = set(new Date(date), {
- hours: 23,
- minutes: 59,
- seconds: 59
- });
- return dueDateFilter.toString();
- }
-
- resetTaskForm() {
- this.taskListForm.reset();
- this.resetQueryParameters();
- }
-
- resetQueryParameters() {
- this.appId = null;
- this.id = null;
- this.processDefinitionId = null;
- this.processInstanceId = null;
- this.name = null;
- this.assignment = null;
- this.state = null;
- this.sort = null;
- this.start = null;
- this.size = DEFAULT_SIZE;
- this.page = null;
- this.dueAfter = null;
- this.dueBefore = null;
- }
-
- isFormValid() {
- return this.taskListForm?.dirty && this.taskListForm.valid;
- }
-
- private getControl(key: string): T {
- return this.taskListForm.get(key) as T;
- }
-
- get taskAppId(): UntypedFormControl {
- return this.getControl('taskAppId');
- }
-
- get taskId(): UntypedFormControl {
- return this.getControl('taskId');
- }
-
- get taskProcessDefinitionId(): UntypedFormControl {
- return this.getControl('taskProcessDefinitionId');
- }
-
- get taskProcessInstanceId(): UntypedFormControl {
- return this.getControl('taskProcessInstanceId');
- }
-
- get taskName(): UntypedFormControl {
- return this.getControl('taskName');
- }
-
- get taskAssignment(): UntypedFormControl {
- return this.getControl('taskAssignment');
- }
-
- get taskState(): UntypedFormControl {
- return this.getControl('taskState');
- }
-
- get taskSort(): UntypedFormControl {
- return this.getControl('taskSort');
- }
-
- get taskIncludeProcessInstance(): UntypedFormControl {
- return this.getControl('taskIncludeProcessInstance');
- }
-
- get taskStart(): UntypedFormControl {
- return this.getControl('taskStart');
- }
-
- get taskSize(): UntypedFormControl {
- return this.getControl('taskSize');
- }
-
- get taskPage(): UntypedFormControl {
- return this.getControl('taskPage');
- }
-
- get taskDueAfter(): UntypedFormControl {
- return this.getControl('taskDueAfter');
- }
-
- get taskDueBefore(): UntypedFormControl {
- return this.getControl('taskDueBefore');
- }
-}
diff --git a/demo-shell/src/app/folder-directive/folder-create.directive.md b/demo-shell/src/app/folder-directive/folder-create.directive.md
deleted file mode 100644
index 1d48413477..0000000000
--- a/demo-shell/src/app/folder-directive/folder-create.directive.md
+++ /dev/null
@@ -1,55 +0,0 @@
----
-Title: Folder Create directive
-Added: v2.0.0
-Status: Deprecated
-Last reviewed: 2019-01-16
----
-
-# [Folder Create directive](../../../lib/content-services/src/lib/folder-directive/folder-create.directive.ts "Defined in folder-create.directive.ts")
-
-Creates folders.
-
-## Basic Usage
-
-```html
-
-
-
-
-
- ...
-
-```
-
-## Class members
-
-### Properties
-
-| Name | Type | Default value | Description |
-| ---- | ---- | ------------- | ----------- |
-| nodeType | `string` | "cm:folder" | Type of node to create. |
-| parentNodeId | `string` | | Parent folder where the new folder will be located after creation. |
-| title | `string` | null | Title of folder creation dialog. |
-
-### Events
-
-| Name | Type | Description |
-| ---- | ---- | ----------- |
-| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs (eg, a folder with same name already exists). |
-| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the folder is created successfully. |
-
-## Details
-
-Pass this directive the id of the parent folder where you want the new folder node to be created.
-If no value is provided, the '-my-' alias is used.
-This will open a [Folder Dialog component](../../../lib/content-services/dialogs/folder.dialog.ts) to receive data for the new folder. If the data is valid
-then the dialog will emit a `success` event when it closes.
-
-## See also
-
-- [Folder Edit directive](folder-edit.directive.md)
diff --git a/demo-shell/src/app/folder-directive/folder-create.directive.spec.ts b/demo-shell/src/app/folder-directive/folder-create.directive.spec.ts
deleted file mode 100644
index 5a8c1fd666..0000000000
--- a/demo-shell/src/app/folder-directive/folder-create.directive.spec.ts
+++ /dev/null
@@ -1,149 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { MatDialog } from '@angular/material/dialog';
-import { By } from '@angular/platform-browser';
-import { Subject, of } from 'rxjs';
-import { FolderCreateDirective } from './folder-create.directive';
-import { Node } from '@alfresco/js-api';
-import { ContentService } from '@alfresco/adf-content-services';
-import { ContentTestingModule } from 'lib/content-services/src/lib/testing/content.testing.module';
-
-@Component({
- standalone: true,
- imports: [FolderCreateDirective],
- template: ` `
-})
-class TestTypeComponent {
- parentNode = '';
- public successParameter: Node = null;
-
- success(node: Node) {
- this.successParameter = node;
- }
-}
-
-@Component({
- standalone: true,
- imports: [FolderCreateDirective],
- template: ``
-})
-class TestComponent {
- parentNode = '';
- public successParameter: Node = null;
-}
-
-describe('FolderCreateDirective', () => {
- let fixture: ComponentFixture;
- let element;
- let dialog: MatDialog;
- let contentService: ContentService;
- let dialogRefMock;
-
- const event = { type: 'click', preventDefault: () => null };
-
- beforeEach(() => {
- TestBed.configureTestingModule({
- imports: [ContentTestingModule, TestTypeComponent, TestComponent]
- });
- fixture = TestBed.createComponent(TestComponent);
- element = fixture.debugElement.query(By.directive(FolderCreateDirective));
- dialog = TestBed.inject(MatDialog);
- contentService = TestBed.inject(ContentService);
-
- dialogRefMock = {
- afterClosed: (val) => of(val),
- componentInstance: {
- error: new Subject(),
- success: new Subject()
- }
- };
- });
-
- describe('With overrides', () => {
- beforeEach(() => {
- fixture = TestBed.createComponent(TestTypeComponent);
- element = fixture.debugElement.query(By.directive(FolderCreateDirective));
- dialog = TestBed.inject(MatDialog);
- contentService = TestBed.inject(ContentService);
- spyOn(dialog, 'open').and.returnValue(dialogRefMock);
- });
-
- it('should not emit folderCreate event when input value is undefined', async () => {
- spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
- spyOn(contentService.folderCreate, 'next');
-
- fixture.detectChanges();
- await fixture.whenStable();
-
- element.nativeElement.click();
- expect(contentService.folderCreate.next).not.toHaveBeenCalled();
- });
-
- it('should emit success event with node if the folder creation was successful', async () => {
- const testNode = {};
-
- element.triggerEventHandler('click', event);
- dialogRefMock.componentInstance.success.next(testNode);
-
- fixture.whenStable();
- await fixture.whenStable();
-
- expect(fixture.componentInstance.successParameter).toBe(testNode);
- });
-
- it('should open the dialog with the proper title and nodeType', () => {
- fixture.detectChanges();
- element.triggerEventHandler('click', event);
-
- expect(dialog.open).toHaveBeenCalledWith(jasmine.any(Function), {
- data: {
- parentNodeId: jasmine.any(String),
- createTitle: 'create-title',
- nodeType: 'cm:my-little-pony'
- },
- width: jasmine.any(String)
- });
- });
- });
-
- describe('Without overrides', () => {
- beforeEach(() => {
- fixture = TestBed.createComponent(TestComponent);
- element = fixture.debugElement.query(By.directive(FolderCreateDirective));
- dialog = TestBed.inject(MatDialog);
- contentService = TestBed.inject(ContentService);
- spyOn(dialog, 'open').and.returnValue(dialogRefMock);
- });
-
- it('should open the dialog with the default title and nodeType', () => {
- fixture.detectChanges();
- element.triggerEventHandler('click', event);
-
- expect(dialog.open).toHaveBeenCalledWith(jasmine.any(Function), {
- data: {
- parentNodeId: jasmine.any(String),
- createTitle: null,
- nodeType: 'cm:folder'
- },
- width: jasmine.any(String)
- });
- });
- });
-});
diff --git a/demo-shell/src/app/folder-directive/folder-create.directive.ts b/demo-shell/src/app/folder-directive/folder-create.directive.ts
deleted file mode 100644
index 9161b7d8fa..0000000000
--- a/demo-shell/src/app/folder-directive/folder-create.directive.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-/* eslint-disable */
-
-import { Directive, HostListener, Input, Output, EventEmitter } from '@angular/core';
-import { MatDialog } from '@angular/material/dialog';
-import { Node } from '@alfresco/js-api';
-import { ContentService, FolderDialogComponent } from '@alfresco/adf-content-services';
-
-const DEFAULT_FOLDER_PARENT_ID = '-my-';
-const DIALOG_WIDTH: number = 400;
-
-@Directive({
- selector: '[adf-create-folder]',
- standalone: true
-})
-export class FolderCreateDirective {
- /** Parent folder where the new folder will be located after creation. */
- @Input('adf-create-folder')
- parentNodeId: string = DEFAULT_FOLDER_PARENT_ID;
-
- /** Title of folder creation dialog. */
- @Input()
- title: string = null;
-
- /** Type of node to create. */
- @Input()
- nodeType = 'cm:folder';
-
- /** Emitted when an error occurs (eg, a folder with same name already exists). */
- @Output()
- error: EventEmitter = new EventEmitter();
-
- /** Emitted when the folder is created successfully. */
- @Output()
- success: EventEmitter = new EventEmitter();
-
- @HostListener('click', ['$event'])
- onClick(event) {
- event.preventDefault();
- this.openDialog();
- }
-
- constructor(public dialogRef: MatDialog, public content: ContentService) {}
-
- private get dialogConfig() {
- const { parentNodeId, title: createTitle, nodeType } = this;
-
- return {
- data: { parentNodeId, createTitle, nodeType },
- width: `${DIALOG_WIDTH}px`
- };
- }
-
- private openDialog(): void {
- const { dialogRef, dialogConfig, content } = this;
- const dialogInstance = dialogRef.open(FolderDialogComponent, dialogConfig);
-
- dialogInstance.componentInstance.error.subscribe((error) => {
- this.error.emit(error);
- });
-
- dialogInstance.componentInstance.success.subscribe((node: Node) => {
- this.success.emit(node);
- });
-
- dialogInstance.afterClosed().subscribe((node: Node) => {
- if (node) {
- content.folderCreate.next(node);
- }
- });
- }
-}
diff --git a/demo-shell/src/app/folder-directive/index.ts b/demo-shell/src/app/folder-directive/index.ts
deleted file mode 100644
index 417b5dad12..0000000000
--- a/demo-shell/src/app/folder-directive/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './folder-create.directive';
diff --git a/demo-shell/src/app/services/in-memory-form.service.ts b/demo-shell/src/app/services/in-memory-form.service.ts
deleted file mode 100644
index 41086684a8..0000000000
--- a/demo-shell/src/app/services/in-memory-form.service.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Injectable } from '@angular/core';
-import { AppConfigService, FormFieldOption, FormService, FormValues, FormModel, FormOutcomeModel, FormOutcomeEvent } from '@alfresco/adf-core';
-import { Observable, Subject } from 'rxjs';
-
-interface ProcessServiceData {
- rest: {
- fields: Array<{
- processId?: string;
- taskId?: string;
- fieldId?: string;
- values?: Array<{
- id: string;
- name: string;
- }>;
- }>;
- };
-}
-//
-@Injectable()
-export class InMemoryFormService extends FormService {
- private data: ProcessServiceData;
-
- executeOutcome = new Subject();
-
- constructor(appConfig: AppConfigService) {
- super();
- this.data = appConfig.get('activiti');
- }
-
- /** @override */
- getRestFieldValues(taskId: string, field: string): Observable {
- // Uncomment this to use original call
- // return super.getRestFieldValues(taskId, fieldId);
-
- return new Observable((observer) => {
- const currentField = this.data.rest.fields.find((f) => f.taskId === taskId && f.fieldId === field);
- if (currentField) {
- const values: FormFieldOption[] = currentField.values || [];
- observer.next(values);
- }
- });
- }
-
- parseForm(json: any, data?: FormValues, readOnly: boolean = false, prefixedSpace: boolean = true): FormModel {
- if (json) {
- const flattenForm = {
- ...json.formRepresentation,
- ...json.formRepresentation.formDefinition
- };
- delete flattenForm.formDefinition;
-
- const formValues: FormValues = {};
- (data || []).forEach((variable) => {
- formValues[variable.name] = variable.value;
- });
-
- const form = new FormModel(flattenForm, formValues, readOnly, this, prefixedSpace);
- if (!json.fields) {
- form.outcomes = [
- new FormOutcomeModel(form, {
- id: '$save',
- name: FormOutcomeModel.SAVE_ACTION,
- isSystem: true
- })
- ];
- }
- return form;
- }
- return null;
- }
-
- /** @override */
- getRestFieldValuesByProcessId(processDefinitionId: string, fieldId: string): Observable {
- // Uncomment this to use original call
- // return super.getRestFieldValuesByProcessId(processDefinitionId, fieldId);
-
- return new Observable((observer) => {
- const field = this.data.rest.fields.find(
- (currentField) => currentField.processId === processDefinitionId && currentField.fieldId === fieldId
- );
- const values: FormFieldOption[] = field.values || [];
- observer.next(values);
- });
- }
-}
diff --git a/demo-shell/src/app/services/preview.service.ts b/demo-shell/src/app/services/preview.service.ts
deleted file mode 100644
index 9d276f3c85..0000000000
--- a/demo-shell/src/app/services/preview.service.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Injectable } from '@angular/core';
-import { Router } from '@angular/router';
-
-@Injectable({ providedIn: 'root' })
-export class PreviewService {
-
- public content: Blob = null;
- public name: string = null;
-
- constructor(private router: Router) {}
-
- showResource(resourceId, versionId?): void {
- if (versionId) {
- this.router.navigate([{outlets: {overlay: ['files', resourceId, versionId, 'view']}}]);
- } else {
- this.router.navigate([{outlets: {overlay: ['files', resourceId, 'view']}}]);
- }
- }
-
- showBlob(name: string, content: Blob): void {
- this.name = name;
- this.content = content;
- this.router.navigate([{ outlets: { overlay: ['preview', 'blob'] } }]);
- }
-}
diff --git a/demo-shell/src/assets/app.extensions.json b/demo-shell/src/assets/app.extensions.json
deleted file mode 100644
index e32a4e5cab..0000000000
--- a/demo-shell/src/assets/app.extensions.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "$schema": "../../../lib/extensions/src/lib/config/schema/app-extension.schema.json",
- "$references": [],
- "$dependencies": [],
-
- "features": {
- "viewer": {
- "extensions": []
- },
-
- "documentList": {
- "files": [
- {
- "id": "app.files.thumbnail",
- "key": "$thumbnail",
- "type": "image",
- "sortable": false,
- "desktopOnly": false
- },
- {
- "id": "app.files.name",
- "key": "name",
- "title": "Name",
- "type": "text",
- "class": "adf-ellipsis-cell adf-expand-cell-5",
- "sortable": true,
- "template": "app.columns.name",
- "desktopOnly": false
- },
- {
- "id": "app.files.size",
- "key": "content.sizeInBytes",
- "title": "Size",
- "type": "fileSize",
- "sortable": true,
- "desktopOnly": true
- },
- {
- "id": "app.files.modifiedOn",
- "key": "modifiedAt",
- "title": "Modified on",
- "type": "date",
- "format": "timeAgo",
- "sortable": true,
- "desktopOnly": true
- },
- {
- "id": "app.files.modifiedBy",
- "key": "modifiedByUser.displayName",
- "title": "Modified by",
- "type": "text",
- "class": "adf-ellipsis-cell",
- "sortable": true,
- "desktopOnly": true
- }
- ]
- }
- }
-}
diff --git a/demo-shell/src/assets/logo.png b/demo-shell/src/assets/logo.png
deleted file mode 100644
index de3a224635..0000000000
Binary files a/demo-shell/src/assets/logo.png and /dev/null differ
diff --git a/demo-shell/src/custom-style-dev.scss b/demo-shell/src/custom-style-dev.scss
deleted file mode 100644
index de41105603..0000000000
--- a/demo-shell/src/custom-style-dev.scss
+++ /dev/null
@@ -1,22 +0,0 @@
-@use '@angular/material' as mat;
-@import '../../lib/core/src/lib/styles/index';
-@import '../../lib/core/src/lib/styles/typography';
-@include mat.all-component-typographies;
-@include mat.core;
-
-$primary: mat.define-palette($alfresco-accent-orange);
-$accent: mat.define-palette($alfresco-accent-purple);
-$warn: mat.define-palette($alfresco-warn);
-$theme: mat.define-light-theme(
- (
- color: (
- primary: $primary,
- accent: $accent,
- warn: $warn
- ),
- typography: $alfresco-typography
- )
-);
-
-@include mat.all-component-themes($theme);
-@include alfresco-material-theme($theme);
diff --git a/demo-shell/src/custom-style.scss b/demo-shell/src/custom-style.scss
deleted file mode 100644
index efc8d27631..0000000000
--- a/demo-shell/src/custom-style.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-@use '@angular/material' as mat;
-@import '~@alfresco/adf-core/theming';
-@include mat.all-component-typographies($alfresco-typography);
-@include mat.core;
-
-$primary: mat.define-palette($alfresco-accent-orange);
-$accent: mat.define-palette($alfresco-accent-purple);
-$warn: mat.define-palette($alfresco-warn);
-$theme: mat.define-light-theme(
- (
- color: (
- primary: $primary,
- accent: $accent,
- )
- )
-);
-
-@include mat.all-component-themes($theme);
-@include alfresco-material-theme($theme);
diff --git a/demo-shell/src/environments/environment.canary.ts b/demo-shell/src/environments/environment.canary.ts
deleted file mode 100644
index c0c066bb48..0000000000
--- a/demo-shell/src/environments/environment.canary.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export const environment = {
- production: true,
- e2e: false,
- oidc: true
-};
diff --git a/demo-shell/src/environments/environment.e2e.ts b/demo-shell/src/environments/environment.e2e.ts
deleted file mode 100644
index 1509df8ad3..0000000000
--- a/demo-shell/src/environments/environment.e2e.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export const environment = {
- production: false,
- e2e: true,
- oidc: false
-};
diff --git a/demo-shell/src/environments/environment.prod.ts b/demo-shell/src/environments/environment.prod.ts
deleted file mode 100644
index 9b1e69cf59..0000000000
--- a/demo-shell/src/environments/environment.prod.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export const environment = {
- production: true,
- e2e: false,
- oidc: false
-};
diff --git a/demo-shell/src/environments/environment.ts b/demo-shell/src/environments/environment.ts
deleted file mode 100644
index efed09f795..0000000000
--- a/demo-shell/src/environments/environment.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-// The file contents for the current environment will overwrite these during build.
-// The build system defaults to the dev environment which uses `environment.ts`, but if you do
-// `ng build --env=prod` then `environment.prod.ts` will be used instead.
-// The list of which env maps to which file can be found in `.angular-cli.json`.
-
-export const environment = {
- production: false,
- e2e: false,
- oidc: false
-};
diff --git a/demo-shell/src/favicon-96x96.png b/demo-shell/src/favicon-96x96.png
deleted file mode 100644
index 5ec10d4acd..0000000000
Binary files a/demo-shell/src/favicon-96x96.png and /dev/null differ
diff --git a/demo-shell/src/index.html b/demo-shell/src/index.html
deleted file mode 100644
index 453b4edbdd..0000000000
--- a/demo-shell/src/index.html
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- ACS APS ADF Application with Angular CLI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo-shell/src/main.ts b/demo-shell/src/main.ts
deleted file mode 100644
index 5c5d4715f6..0000000000
--- a/demo-shell/src/main.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { enableProdMode } from '@angular/core';
-import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
-
-import { AppModule } from './app/app.module';
-import { environment } from './environments/environment';
-import 'chart.js';
-import 'ng2-charts';
-
-if (environment.production) {
- enableProdMode();
-}
-
-platformBrowserDynamic().bootstrapModule(AppModule);
diff --git a/demo-shell/src/polyfills.ts b/demo-shell/src/polyfills.ts
deleted file mode 100644
index 68684fe594..0000000000
--- a/demo-shell/src/polyfills.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-/**
- * This file includes polyfills needed by Angular and is loaded before the app.
- * You can add your own extra polyfills to this file.
- *
- * This file is divided into 2 sections:
- * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
- * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
- * file.
- *
- * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
- * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
- * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
- *
- * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
- */
-
-/***************************************************************************************************
- * BROWSER POLYFILLS
- */
-
-/***************************************************************************************************
- * Zone JS is required by Angular itself.
- */
-import 'zone.js'; // Included with Angular CLI.
-
-/**
- * Support custom event in IE11
- *
- */
-(window as any).global = window;
-
-// import 'custom-event-polyfill/custom-event-polyfill'; // Run `npm install --save custom-event-polyfill`.
diff --git a/demo-shell/src/styles.scss b/demo-shell/src/styles.scss
deleted file mode 100644
index 17bf97bc5c..0000000000
--- a/demo-shell/src/styles.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import 'material-icons/iconfont/material-icons.css';
diff --git a/demo-shell/src/test.ts b/demo-shell/src/test.ts
deleted file mode 100644
index 9ad9b3711f..0000000000
--- a/demo-shell/src/test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-// This file is required by karma.conf.js and loads recursively all the .spec and framework files
-
-import 'zone.js/testing';
-import { getTestBed } from '@angular/core/testing';
-import {
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting
-} from '@angular/platform-browser-dynamic/testing';
-
-declare const require: any;
-
-// First, initialize the Angular testing environment.
-getTestBed().initTestEnvironment(
- BrowserDynamicTestingModule,
- platformBrowserDynamicTesting(), {
- teardown: { destroyAfterEach: false }
-}
-);
-// Then we find all the tests.
-const context = require.context('./', true, /\.spec\.ts$/);
-// And load the modules.
-context.keys().map(context);
diff --git a/demo-shell/src/testing/automation.service.ts b/demo-shell/src/testing/automation.service.ts
deleted file mode 100644
index c6bb5597b8..0000000000
--- a/demo-shell/src/testing/automation.service.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { AppConfigService, UserPreferencesService, StorageService, AuthenticationService } from '@alfresco/adf-core';
-import { Injectable } from '@angular/core';
-import { DemoForm } from './demo-form.mock';
-import { AlfrescoApiService } from '@alfresco/adf-content-services';
-
-@Injectable({
- providedIn: 'root'
-})
-export class CoreAutomationService {
- public forms = new DemoForm();
-
- constructor(
- private appConfigService: AppConfigService,
- private alfrescoApiService: AlfrescoApiService,
- private userPreferencesService: UserPreferencesService,
- private storageService: StorageService,
- private auth: AuthenticationService
- ) {}
-
- setup() {
- const adfProxy = window['adf'] || {};
-
- adfProxy.getConfigField = (field: string): any => this.appConfigService.get(field);
-
- adfProxy.setConfigField = (field: string, value: string) => {
- this.appConfigService.config[field] = JSON.parse(value);
- };
-
- adfProxy.setStorageItem = (key: string, data: string) => {
- this.storageService.setItem(key, data);
- };
-
- adfProxy.removeStorageItem = (key: string) => {
- this.storageService.removeItem(key);
- };
-
- adfProxy.getStorageItem = (key: string): string => this.storageService.getItem(key);
-
- adfProxy.setUserPreference = (key: string, data: any) => {
- this.userPreferencesService.set(key, data);
- };
-
- adfProxy.setFormInEditor = (json: string) => {
- this.forms.formDefinition = JSON.parse(json);
- };
-
- adfProxy.setCloudFormInEditor = (json: string) => {
- this.forms.cloudFormDefinition = JSON.parse(json);
- };
-
- adfProxy.clearStorage = () => {
- this.storageService.clear();
- };
-
- adfProxy.apiReset = () => {
- this.alfrescoApiService.reset();
- this.auth.reset();
- };
-
- window['adf'] = adfProxy;
- }
-}
diff --git a/demo-shell/src/testing/demo-form.mock.ts b/demo-shell/src/testing/demo-form.mock.ts
deleted file mode 100644
index 54c21707d6..0000000000
--- a/demo-shell/src/testing/demo-form.mock.ts
+++ /dev/null
@@ -1,1953 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export class DemoForm {
- easyForm: any = {
- formRepresentation: {
- id: 1001,
- name: 'ISSUE_FORM',
- tabs: [],
- fields: [
- {
- fieldType: 'ContainerRepresentation',
- id: '1498212398417',
- name: 'Label',
- type: 'container',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: false,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- dateDisplayFormat: null,
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'label',
- name: 'Label',
- type: 'dropdown',
- value: 'Choose one...',
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: true,
- options: [
- {
- id: 'empty',
- name: 'Choose one...'
- },
- {
- id: 'option_1',
- name: 'test1'
- },
- {
- id: 'option_2',
- name: 'test2'
- },
- {
- id: 'option_3',
- name: 'test3'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'Date',
- name: 'Date',
- type: 'date',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label5',
- name: 'Label5',
- type: 'boolean',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label6',
- name: 'Label6',
- type: 'boolean',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label4',
- name: 'Label4',
- type: 'integer',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'RestFieldRepresentation',
- id: 'label12',
- name: 'Label12',
- type: 'radio-buttons',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: [
- {
- id: 'option_1',
- name: 'Option 1'
- },
- {
- id: 'option_2',
- name: 'Option 2'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ]
- }
- }
- ],
- outcomes: [],
- javascriptEvents: [],
- className: '',
- style: '',
- customFieldTemplates: {},
- metadata: {},
- variables: [
- {
- id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
- name: 'name1',
- type: 'string',
- value: ''
- },
- {
- id: '3ed9f28a-dbae-463f-b991-47ef06658bb6',
- name: 'name2',
- type: 'string',
- value: ''
- },
- {
- id: 'a7710978-1e9c-4b54-a19c-c6267d2b19a2',
- name: 'input02',
- type: 'integer'
- }
- ],
- customFieldsValueInfo: {},
- gridsterForm: false,
- globalDateFormat: 'D-M-YYYY'
- }
- };
-
- formDefinition: any = {
- formRepresentation: {
- id: 3003,
- name: 'demo-01',
- taskId: '7501',
- taskName: 'Demo Form 01',
- tabs: [
- {
- id: 'tab1',
- title: 'Text',
- visibilityCondition: null
- },
- {
- id: 'tab2',
- title: 'Misc',
- visibilityCondition: null
- }
- ],
- fields: [
- {
- fieldType: 'ContainerRepresentation',
- id: '1488274019966',
- name: 'Label',
- type: 'container',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- dateDisplayFormat: null,
- layout: null,
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [],
- 2: []
- }
- },
- {
- fieldType: 'ContainerRepresentation',
- id: 'section4',
- name: 'Section 4',
- type: 'group',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 2
- },
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label8',
- name: 'Label8',
- type: 'people',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label13',
- name: 'Label13',
- type: 'functional-group',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label18',
- name: 'Label18',
- type: 'readonly',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label19',
- name: 'Label19',
- type: 'readonly-text',
- value: 'Display text as part of the form',
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- }
- ],
- 2: [
- {
- fieldType: 'HyperlinkRepresentation',
- id: 'label15',
- name: 'Label15',
- type: 'hyperlink',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- hyperlinkUrl: 'www.google.com',
- displayText: null
- },
- {
- fieldType: 'AttachFileFieldRepresentation',
- id: 'label16',
- name: 'Label16',
- type: 'upload',
- value: [],
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1,
- fileSource: {
- serviceId: 'all-file-sources',
- name: 'All file sources'
- }
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- metaDataColumnDefinitions: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label17',
- name: 'Label17',
- type: 'select-folder',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1,
- folderSource: {
- serviceId: 'alfresco-1',
- name: 'Alfresco 5.2 Local',
- metaDataAllowed: true
- }
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- }
- ]
- }
- },
- {
- fieldType: 'DynamicTableRepresentation',
- id: 'label14',
- name: 'Label14',
- type: 'dynamic-table',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab2',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 2
- },
- sizeX: 2,
- sizeY: 2,
- row: -1,
- col: -1,
- visibilityCondition: null,
- columnDefinitions: [
- {
- id: 'id',
- name: 'id',
- type: 'String',
- value: null,
- optionType: null,
- options: null,
- restResponsePath: null,
- restUrl: null,
- restIdProperty: null,
- restLabelProperty: null,
- amountCurrency: null,
- amountEnableFractions: false,
- required: true,
- editable: true,
- sortable: true,
- visible: true,
- endpoint: null,
- requestHeaders: null
- },
- {
- id: 'name',
- name: 'name',
- type: 'String',
- value: null,
- optionType: null,
- options: null,
- restResponsePath: null,
- restUrl: null,
- restIdProperty: null,
- restLabelProperty: null,
- amountCurrency: null,
- amountEnableFractions: false,
- required: true,
- editable: true,
- sortable: true,
- visible: true,
- endpoint: null,
- requestHeaders: null
- }
- ]
- },
- {
- fieldType: 'ContainerRepresentation',
- id: 'section1',
- name: 'Section 1',
- type: 'group',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 2
- },
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label1',
- name: 'Label1',
- type: 'text',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label3',
- name: 'Label3',
- type: 'text',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- }
- ],
- 2: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label2',
- name: 'Label2',
- type: 'multi-line-text',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 2,
- row: -1,
- col: -1,
- visibilityCondition: null
- }
- ]
- }
- },
- {
- fieldType: 'ContainerRepresentation',
- id: 'section2',
- name: 'Section 2',
- type: 'group',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 2
- },
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label4',
- name: 'Label4',
- type: 'integer',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label7',
- name: 'Label7',
- type: 'date',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- }
- ],
- 2: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label5',
- name: 'Label5',
- type: 'boolean',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'FormFieldRepresentation',
- id: 'label6',
- name: 'Label6',
- type: 'boolean',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null
- },
- {
- fieldType: 'AmountFieldRepresentation',
- id: 'label11',
- name: 'Label11',
- type: 'amount',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: '10',
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- enableFractions: false,
- currency: null
- }
- ]
- }
- },
- {
- fieldType: 'ContainerRepresentation',
- id: 'section3',
- name: 'Section 3',
- type: 'group',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 2
- },
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'label9',
- name: 'Label9',
- type: 'dropdown',
- value: 'Choose one...',
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: true,
- options: [
- {
- id: 'empty',
- name: 'Choose one...'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- },
- {
- fieldType: 'RestFieldRepresentation',
- id: 'label12',
- name: 'Label12',
- type: 'radio-buttons',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: [
- {
- id: 'option_1',
- name: 'Option 1'
- },
- {
- id: 'option_2',
- name: 'Option 2'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ],
- 2: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'label10',
- name: 'Label10',
- type: 'typeahead',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: 'tab1',
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ]
- }
- }
- ],
- outcomes: [],
- javascriptEvents: [],
- className: '',
- style: '',
- customFieldTemplates: {},
- metadata: {},
- variables: [
- {
- id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
- name: 'name1',
- type: 'string',
- value: ''
- },
- {
- id: '3ed9f28a-dbae-463f-b991-47ef06658bb6',
- name: 'name2',
- type: 'string',
- value: ''
- },
- {
- id: 'a7710978-1e9c-4b54-a19c-c6267d2b19a2',
- name: 'input02',
- type: 'integer'
- }
- ],
- gridsterForm: false,
- globalDateFormat: 'D-M-YYYY'
- }
- };
-
- simpleFormDefinition: any = {
- formRepresentation: {
- id: 1001,
- name: 'SIMPLE_FORM_EXAMPLE',
- description: '',
- version: 1,
- lastUpdatedBy: 2,
- lastUpdatedByFullName: 'Test01 01Test',
- lastUpdated: '2018-02-26T17:44:04.543+0000',
- stencilSetId: 0,
- referenceId: null,
- taskId: '9999',
- formDefinition: {
- tabs: [],
- fields: [
- {
- fieldType: 'ContainerRepresentation',
- id: '1519666726245',
- name: 'Label',
- type: 'container',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- dateDisplayFormat: null,
- layout: null,
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'typeaheadField',
- name: 'TypeaheadField',
- type: 'typeahead',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: 'https://jsonplaceholder.typicode.com/users',
- restResponsePath: null,
- restIdProperty: 'id',
- restLabelProperty: 'name',
- tab: null,
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ],
- 2: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'radioButton',
- name: 'RadioButtons',
- type: 'radio-buttons',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: [
- {
- id: 'option_1',
- name: 'Option 1'
- },
- {
- id: 'option_2',
- name: 'Option 2'
- },
- {
- id: 'option_3',
- name: 'Option 3'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 1
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 2,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ]
- }
- },
- {
- fieldType: 'ContainerRepresentation',
- id: '1519666735185',
- name: 'Label',
- type: 'container',
- value: null,
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: null,
- hasEmptyValue: null,
- options: null,
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- dateDisplayFormat: null,
- layout: null,
- sizeX: 2,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'RestFieldRepresentation',
- id: 'selectBox',
- name: 'SelectBox',
- type: 'dropdown',
- value: 'Choose one...',
- required: false,
- readOnly: false,
- overrideId: false,
- colspan: 1,
- placeholder: null,
- minLength: 0,
- maxLength: 0,
- minValue: null,
- maxValue: null,
- regexPattern: null,
- optionType: 'manual',
- hasEmptyValue: true,
- options: [
- {
- id: 'empty',
- name: 'Choose one...'
- },
- {
- id: 'option_1',
- name: '1'
- },
- {
- id: 'option_2',
- name: '2'
- },
- {
- id: 'option_3',
- name: '3'
- }
- ],
- restUrl: null,
- restResponsePath: null,
- restIdProperty: null,
- restLabelProperty: null,
- tab: null,
- className: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- },
- dateDisplayFormat: null,
- layout: {
- row: -1,
- column: -1,
- colspan: 1
- },
- sizeX: 1,
- sizeY: 1,
- row: -1,
- col: -1,
- visibilityCondition: null,
- endpoint: null,
- requestHeaders: null
- }
- ],
- 2: []
- }
- }
- ],
- outcomes: [],
- javascriptEvents: [],
- className: '',
- style: '',
- customFieldTemplates: {},
- metadata: {},
- variables: [
- {
- id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
- name: 'name1',
- type: 'string',
- value: ''
- },
- {
- id: '3ed9f28a-dbae-463f-b991-47ef06658bb6',
- name: 'name2',
- type: 'string',
- value: ''
- },
- {
- id: 'a7710978-1e9c-4b54-a19c-c6267d2b19a2',
- name: 'input02',
- type: 'integer'
- }
- ],
- customFieldsValueInfo: {},
- gridsterForm: false
- }
- }
- };
-
- cloudFormDefinition: any = {
- formRepresentation: {
- id: 'text-form',
- name: 'test-start-form',
- version: 0,
- description: '',
- formDefinition: {
- tabs: [],
- fields: [
- {
- id: '1511517333638',
- type: 'container',
- fieldType: 'ContainerRepresentation',
- name: 'Label',
- tab: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- fieldType: 'FormFieldRepresentation',
- id: 'texttest',
- name: 'texttest',
- type: 'text',
- value: null,
- required: false,
- placeholder: 'text',
- params: {
- existingColspan: 2,
- maxColspan: 6,
- inputMaskReversed: true,
- inputMask: '0#',
- inputMaskPlaceholder: '(0-9)'
- }
- }
- ],
- 2: [
- {
- fieldType: 'AttachFileFieldRepresentation',
- id: 'attachfiletest',
- name: 'attachfiletest',
- type: 'upload',
- required: true,
- colspan: 2,
- placeholder: 'attachfile',
- params: {
- existingColspan: 2,
- maxColspan: 2,
- fileSource: {
- serviceId: 'local-file',
- name: 'Local File'
- },
- multiple: true,
- link: false,
- displayableCMProperties: []
- },
- visibilityCondition: {}
- }
- ]
- }
- },
- {
- id: 'c23bf7e8-d43c-48b6-86b9-56d174faec4f',
- name: 'Label',
- type: 'container',
- tab: null,
- numberOfColumns: 2,
- fields: {
- 1: [
- {
- id: 'DisplayRichtext06jsjb',
- name: 'Display Rich text',
- type: 'display-rich-text',
- readOnly: false,
- value: {
- time: 1658423394276,
- blocks: [
- {
- id: 'dry4RE17v_',
- type: 'header',
- data: {
- text: 'Display Rich Text widget example',
- level: 1
- }
- },
- {
- id: 'my1r7YmMOs',
- type: 'paragraph',
- data: {
- text: `Is simply a readonly
- dummy text
- of the printing and typesetting industry.\n
- Lorem Ipsum has been the industry's standard du
- mmy text ever since the 1500s,\n when an unknown printer took a galley of type
- and scrambled it to make a type specimen book.
- It has survived not only five centuries,\n
- but also the leap into electronic typesetting,
- remaining essentially unchanged.\n
- It was underline
- in the 1960s with the release of sheets containing\n
- Lorem Ipsum passages, and more recently with desktop
- publishing software like Aldus PageMaker including versions of Lorem,
- example of inline code
`
- }
- },
- {
- id: 'vgpY3obXS7',
- type: 'list',
- data: {
- style: 'unordered',
- items: ['Unordered list example', 'Unordered list example']
- }
- },
- {
- id: 'lWR9x3OF1M',
- type: 'list',
- data: {
- style: 'ordered',
- items: ['Ordered list example', 'Ordered list example']
- }
- },
- {
- id: 'aeZV7M8sU1',
- type: 'code',
- data: {
- code: '// Code Block Example\ncatch(Exception ex){\n // Houston, we have a problem\n}'
- }
- }
- ],
- version: '2.25.0'
- },
- isCustomType: false,
- colspan: 1,
- rowspan: 1,
- visibilityCondition: null,
- params: {
- existingColspan: 1,
- maxColspan: 2
- }
- }
- ],
- 2: []
- }
- }
- ],
- outcomes: [],
- metadata: {
- property1: 'value1',
- property2: 'value2'
- },
- variables: [
- {
- name: 'variable1',
- type: 'string',
- value: 'value1'
- },
- {
- name: 'variable2',
- type: 'string',
- value: 'value2'
- }
- ]
- }
- }
- };
-
- getEasyForm(): any {
- return this.easyForm;
- }
-
- getFormDefinition(): any {
- return this.formDefinition;
- }
-
- getSimpleFormDefinition(): any {
- return this.simpleFormDefinition;
- }
-
- getFormCloudDefinition(): any {
- return this.cloudFormDefinition;
- }
-}
diff --git a/demo-shell/src/tsconfig.spec.json b/demo-shell/src/tsconfig.spec.json
deleted file mode 100644
index a86ddf08f1..0000000000
--- a/demo-shell/src/tsconfig.spec.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": "../../tsconfig.json",
- "compilerOptions": {
- "outDir": "../out-tsc/spec",
- "types": [
- "jasmine",
- "node"
- ]
- },
- "files": [
- "test.ts",
- "polyfills.ts"
- ],
- "include": [
- "**/*.spec.ts",
- "**/*.d.ts"
- ]
-}
diff --git a/demo-shell/tsconfig.app.json b/demo-shell/tsconfig.app.json
deleted file mode 100644
index 3c43903cfd..0000000000
--- a/demo-shell/tsconfig.app.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "../tsconfig.json"
-}
diff --git a/docker/build.sh b/docker/build.sh
deleted file mode 100755
index 7c9a02b9d3..0000000000
--- a/docker/build.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-echo building $1
-npm install
-npm run build $*
diff --git a/docker/docker-entrypoint.d/30-sed-on-appconfig.sh b/docker/docker-entrypoint.d/30-sed-on-appconfig.sh
deleted file mode 100755
index 8c63b22489..0000000000
--- a/docker/docker-entrypoint.d/30-sed-on-appconfig.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-set -e
-
-echo Running sed on "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-
-if [ -n "${APP_CONFIG_AUTH_TYPE}" ]; then
- sed -e "s/\"authType\": \".*\"/\"authType\": \"${APP_CONFIG_AUTH_TYPE}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_IDENTITY_HOST}" ]; then
- replace="\/"
- encodedIdentity=${APP_CONFIG_IDENTITY_HOST//\//$replace}
- sed -e "s/\"identityHost\": \".*\"/\"identityHost\": \"$encodedIdentity\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_HOST}" ]; then
- replace="\/"
- encoded=${APP_CONFIG_OAUTH2_HOST//\//$replace}
- sed -e "s/\"host\": \".*\"/\"host\": \"${encoded}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_CLIENTID}" ]; then
- sed -e "s/\"clientId\": \".*\"/\"clientId\": \"${APP_CONFIG_OAUTH2_CLIENTID}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_CLIENT_SECRET}" ]; then
- sed -e "s/\"secret\": \".*\"/\"secret\": \"${APP_CONFIG_OAUTH2_CLIENT_SECRET}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}" ]; then
- sed -e "s/\"implicitFlow\": [^,]*/\"implicitFlow\": ${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_CODE_FLOW}" ]; then
- sed -e "s/\"codeFlow\": [^,]*/\"codeFlow\": ${APP_CONFIG_OAUTH2_CODE_FLOW}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_LOGOUT_URL}" ]; then
- sed -e "s/\"logoutUrl\": [^,]*/\"logoutUrl\": ${APP_CONFIG_OAUTH2_LOGOUT_URL}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_LOGOUT_PARAMETERS}" ]; then
- sed -e "s/\"logoutParameters\": [^,]*/\"logoutParameters\": ${APP_CONFIG_OAUTH2_LOGOUT_PARAMETERS}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_AUDIENCE}" ]; then
- sed -e "s/\"audience\": [^,]*/\"audience\": ${APP_CONFIG_OAUTH2_AUDIENCE}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_SCOPE}" ]; then
- sed -e "s/\"scope\": [^,]*/\"scope\": ${APP_CONFIG_OAUTH2_SCOPE}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_SILENT_LOGIN}" ]; then
- sed -e "s/\"silentLogin\": [^,]*/\"silentLogin\": ${APP_CONFIG_OAUTH2_SILENT_LOGIN}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI}" ]; then
- replace="\/"
- encoded=${APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI//\//$replace}
- sed -e "s/\"redirectSilentIframeUri\": \".*\"/\"redirectSilentIframeUri\": \"${encoded}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [[ -n "${APP_CONFIG_BPM_HOST}" ]]; then
- replace="\/"
- encoded=${APP_CONFIG_BPM_HOST//\//$replace}
- sed -e "s/\"bpmHost\": \".*\"/\"bpmHost\": \"${encoded}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [[ -n "${APP_CONFIG_ECM_HOST}" ]]; then
- replace="\/"
- encoded=${APP_CONFIG_ECM_HOST//\//$replace}
- sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [[ -n "${APP_CONFIG_KERBEROS_ENABLED}" ]]; then
- sed -e "s/\"withCredentials\": [^,]*/\"withCredentials\": ${APP_CONFIG_KERBEROS_ENABLED}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [[ -n "${APP_CONFIG_PROVIDERS}" ]]; then
- sed -e "s/\"providers\": [^,]*/\"providers\": \"${APP_CONFIG_PROVIDERS}\"/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
-
-if [ -n "${APP_CONFIG_APPS_DEPLOYED}" ]; then
- sed -e "s/\"alfresco-deployed-apps\": \[.*\]/\"alfresco-deployed-apps\": ${APP_CONFIG_APPS_DEPLOYED}/g" \
- -i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
-fi
diff --git a/docker/run-demo-shell.sh b/docker/run-demo-shell.sh
deleted file mode 100755
index 8bbcb7ccbe..0000000000
--- a/docker/run-demo-shell.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-[[ "$BUILD_ENABLED" == "true" ]] && $(dirname $0)/build.sh
-
-env \
- PROJECT_NAME=demo-shell \
- BASE_PATH=${BASE_PATH:-/adf} \
- DOCKER_IMAGE_REPO=alfresco/demo-shell \
- $(dirname $0)/run.sh
diff --git a/docker/run.sh b/docker/run.sh
deleted file mode 100755
index e2d8c7d5e6..0000000000
--- a/docker/run.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-HOST_PORT=8081
-CONTAINER_PORT=8080
-docker rmi -f $DOCKER_IMAGE_REPO
-docker build --build-arg PROJECT_NAME=$PROJECT_NAME -t $DOCKER_IMAGE_REPO .
-echo "http://localhost:${HOST_PORT}${BASE_PATH}"
-docker run --rm -it \
- --env BASE_PATH=$BASE_PATH \
- --env APP_CONFIG_AUTH_TYPE=$APP_CONFIG_AUTH_TYPE \
- --env APP_CONFIG_IDENTITY_HOST=$APP_CONFIG_IDENTITY_HOST \
- --env APP_CONFIG_OAUTH2_HOST=$APP_CONFIG_OAUTH2_HOST \
- --env APP_CONFIG_OAUTH2_CLIENTID=$APP_CONFIG_OAUTH2_CLIENTID \
- --env APP_CONFIG_OAUTH2_CLIENT_SECRET=$APP_CONFIG_OAUTH2_SECRET \
- --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=$APP_CONFIG_OAUTH2_IMPLICIT_FLOW \
- --env APP_CONFIG_OAUTH2_CODE_FLOW=$APP_CONFIG_OAUTH2_CODE_FLOW \
- --env APP_CONFIG_OAUTH2_LOGOUT_URL=$APP_CONFIG_OAUTH2_LOGOUT_URL \
- --env APP_CONFIG_OAUTH2_LOGOUT_PARAMETERS=$APP_CONFIG_OAUTH2_LOGOUT_PARAMETERS \
- --env APP_CONFIG_OAUTH2_AUDIENCE=$APP_CONFIG_OAUTH2_AUDIENCE \
- --env APP_CONFIG_OAUTH2_SCOPE=$APP_CONFIG_OAUTH2_SCOPE \
- --env APP_CONFIG_OAUTH2_SILENT_LOGIN=$APP_CONFIG_OAUTH2_SILENT_LOGIN \
- --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI=$APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI \
- --env APP_CONFIG_BPM_HOST=$APP_CONFIG_BPM_HOST \
- --env APP_CONFIG_ECM_HOST=$APP_CONFIG_ECM_HOST \
- --env APP_CONFIG_PROVIDERS=$APP_CONFIG_PROVIDERS \
- --env APP_CONFIG_KERBEROS_ENABLED=$APP_CONFIG_KERBEROS_ENABLED \
- --user 1000:1000 --publish $HOST_PORT:$CONTAINER_PORT $DOCKER_IMAGE_REPO
diff --git a/docs/content-services/components/search-filter-chips.component.md b/docs/content-services/components/search-filter-chips.component.md
index a7cb4d467d..a8197d9eb8 100644
--- a/docs/content-services/components/search-filter-chips.component.md
+++ b/docs/content-services/components/search-filter-chips.component.md
@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2021-06-26
---
-# [Search Filter chip component](../../../lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts "Defined in search-filter-chips.component.ts")
+# Search Filter Chip Component
Represents a chip based container component for custom search and faceted search settings.
@@ -21,9 +21,9 @@ Represents a chip based container component for custom search and faceted search
### Properties
-| Name | Type | Default value | Description |
-| ---- | ---- | ------------- | ----------- |
-| showContextFacets | `boolean` | true | Toggles whether to show or not the context facet filters |
+| Name | Type | Default value | Description |
+|-------------------|-----------|---------------|----------------------------------------------------------|
+| showContextFacets | `boolean` | true | Toggles whether to show or not the context facet filters |
## Details
@@ -35,11 +35,9 @@ Configured widgets(`categories, facetQueries, facetIntervals, facetFields`) shou
```json
{
- ...
"settings": {
"allowUpdateOnChange": false,
- "hideDefaultAction": true,
- ...
+ "hideDefaultAction": true
}
}
```
@@ -47,23 +45,19 @@ Configured widgets(`categories, facetQueries, facetIntervals, facetFields`) shou
### Migrate from expansion card layout
Here are the steps to move from expansion layout to chip layout
- 1\. Use this component to render the new layout ``
- 2\. Add the following settings to old configured widgets(`categories, facetQueries, facetIntervals, facetFields`) i.e
+
+ 1. Use this component to render the new layout ``
+ 2. Add the following settings to old configured widgets(`categories, facetQueries, facetIntervals, facetFields`) i.e
```json
{
- ...
"settings": {
"allowUpdateOnChange": false,
- "hideDefaultAction": true,
- ...
+ "hideDefaultAction": true
}
-
}
```
-here is the [example configuration](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/demo-shell/src/app.config.json#L373)
-
## See also
- [Search Configuration Guide](../../user-guide/search-configuration-guide.md)
diff --git a/docs/core/directives/context-menu.directive.md b/docs/core/directives/context-menu.directive.md
index 05158f2aaf..779d6da95e 100644
--- a/docs/core/directives/context-menu.directive.md
+++ b/docs/core/directives/context-menu.directive.md
@@ -5,7 +5,7 @@ Status: Deprecated
Last reviewed: 2018-11-20
---
-# [Context Menu directive](../../../lib/core/src/lib/context-menu/context-menu.directive.ts "Defined in context-menu.directive.ts")
+# Context Menu Directive
Adds a context menu to a component.
@@ -52,7 +52,6 @@ export class MyComponent implements OnInit {
| enabled | `boolean` | false | Is the menu enabled? |
| links | `any[]` | | Items for the menu. |
-## Details
+## See Also
-See the [Demo Shell](../../../demo-shell/README.md)
-or [Document List component](../../content-services/components/document-list.component.md) implementation for more details and use cases.
+- [Document List component](../../content-services/components/document-list.component.md)
diff --git a/docs/tutorials/content-metadata-component.md b/docs/tutorials/content-metadata-component.md
index 1243e911e2..9f954a133a 100644
--- a/docs/tutorials/content-metadata-component.md
+++ b/docs/tutorials/content-metadata-component.md
@@ -3,15 +3,18 @@ Title: Content metadata component
Level: Advanced
---
-# Content metadata component
+# Content Metadata Component
-In this tutorial you will learn how to work with the [`ContentMetadataComponent`](../../lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts).
+In this tutorial you will learn how to work with the `ContentMetadataComponent`.
-This component is used to render the standard and custom metadata of generic content item (called a _node_) stored in Alfresco Content Services. With the usual approach "learning by doing", you will see here some practical examples you might find useful in your own applicatioin. As a starting point, we will use and customize the [Alfresco Content App](https://github.com/Alfresco/alfresco-content-app).
+This component is used to render the standard and custom metadata of generic content item (called a _node_) stored in Alfresco Content Services.
+With the usual approach "learning by doing", you will see here some practical examples you might find useful in your own application.
-## About the `ContentMetadataComponent`
+As a starting point, we will use and customize the [Alfresco Content App](https://github.com/Alfresco/alfresco-content-app).
-As described in the [`ContentMetadataComponent`](../../lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts) documentation, the `adf-content-metadata-card` tag has some useful attributes, included the `preset` attribute, which is used to point to a collection of aspects/properties to render.
+## About the ContentMetadataComponent
+
+As described in the `ContentMetadataComponent` documentation, the `adf-content-metadata-card` tag has some useful attributes, included the `preset` attribute, which is used to point to a collection of aspects/properties to render.
Below, you can see the `preset` value requesting to render all the available aspects/properties:
@@ -34,28 +37,31 @@ As another example, you can see the `preset` value requesting to render all the
All the `preset` configurations are defined in one single configuration file named `app.config.json`, stored in the `src` folder of the project. The `app.config.json` file contains all the configurations of the ADF application, including a section named `content-metadata`, which is used to store the `presets`. The following JSON excerpt gives an example of configuration for the `preset` named `custom`:
```json
-"content-metadata": {
- "presets": {
- "custom": [
- {
- "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE",
- "items": [
- {
- "aspect": "exif:exif",
- "properties": [
- "exif:pixelXDimension",
- "exif:pixelYDimension",
- ...
- ]
- }
- ]
- }
- ]
+{
+ "content-metadata": {
+ "presets": {
+ "custom": [
+ {
+ "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE",
+ "items": [
+ {
+ "aspect": "exif:exif",
+ "properties": [
+ "exif:pixelXDimension",
+ "exif:pixelYDimension"
+ ]
+ }
+ ]
+ }
+ ]
+ }
}
-},
+}
```
-This configuration will show all the listed properties prefixed with `exif:*` in a group titled with the value of the variable `APP.CONTENT_METADATA.EXIF_GROUP_TITLE` for the aspect `exif:exif`. Since this aspect is not related to the node, the component will simply ignore the rendering and nothing will be displayed for these properties. In other words: the aspects to be displayed are calculated as an intersection of the preset's aspects and the aspects related to the node.
+This configuration will show all the listed properties prefixed with `exif:*` in a group titled with the value of the variable `APP.CONTENT_METADATA.EXIF_GROUP_TITLE` for the aspect `exif:exif`.
+Since this aspect is not related to the node, the component will simply ignore the rendering and nothing will be displayed for these properties.
+In other words: the aspects to be displayed are calculated as an intersection of the preset aspects and the aspects related to the node.
## Adding and using a new `preset` configuration
@@ -63,46 +69,49 @@ In this example we will add a new preset configuration and see how it looks in t
### Adding a new `preset` configuration
-To add a new `preset` configuration, edit the `src/app.config.json` file and locate the `content-metadata` section. Then, append the following JSON to the `presets` content and save the file:
+To add a new `preset` configuration, edit the `src/app.config.json` file and locate the `content-metadata` section.
+Then, append the following JSON to the `presets` content and save the file:
```json
-...,
-"content-metadata": {
- "presets": {
- "custom": [...],
- "my-preset": [
- {
- "title": "This is my preset",
- "items": [
- {
- "aspect": "st:siteContainer",
- "properties": ["*"]
- }
- ]
- }
- ]
+{
+ "content-metadata": {
+ "presets": {
+ "custom": [],
+ "my-preset": [
+ {
+ "title": "This is my preset",
+ "items": [
+ {
+ "aspect": "st:siteContainer",
+ "properties": [
+ "*"
+ ]
+ }
+ ]
+ }
+ ]
+ }
}
-},
+}
```
**Note:** As an alternative to `"properties": ["*"]` (which matches all the properties of the `st:siteContainer` aspect), you can use `"properties": ["st:componentId"]`, which will render one property only.
### Using the `my-preset` configuration
-Now that the `my-preset` configuration is defined, let's use it in a view of the ADF application. As an example, let's edit the files view, stored in the `src/app/files` folder. Specifically, let's change the [`files.component`](../../demo-shell/src/app/components/files/files.component.ts)`.html` file as follows:
+Now that the `my-preset` configuration is defined, let's use it in a view of the ADF application
```html
```
### Properties
-| Name | Type | Default value | Description |
-| ---- | ---- | ------------- | ----------- |
-| readOnly | `boolean` | false | (optional) This flag sets the metadata in read only mode preventing changes. |
+| Name | Type | Default value | Description |
+|----------|-----------|---------------|------------------------------------------------------------------------------|
+| readOnly | `boolean` | false | (optional) This flag sets the metadata in read only mode preventing changes. |
### Viewing the result
diff --git a/docs/tutorials/working-with-nodes-api-service.md b/docs/tutorials/working-with-nodes-api-service.md
index d2d5d45345..d1799bbd0d 100644
--- a/docs/tutorials/working-with-nodes-api-service.md
+++ b/docs/tutorials/working-with-nodes-api-service.md
@@ -43,8 +43,10 @@ if (node.isFile) {
Now add the `myOnNodeDoubleClick` method as described below and save the file:
```ts
-myOnNodeDoubleClick(nodeId) {
- console.log("You ckicked on the node '" + nodeId + "'.");
+class MyComponent {
+ myOnNodeDoubleClick(nodeId) {
+ console.log("You ckicked on the node '" + nodeId + "'.");
+ }
}
```
@@ -60,7 +62,7 @@ The Alfresco Example Content app is now set up to demonstrate the usage of the [
For a first look at the [`NodesApiService`](../core/services/nodes-api.service.md), let's check the `FileComponent` component stored in
`src/app/components/files/files.component.ts`. In the source code, you can see the `nodesApi`
-property that represents the [`NodesApiService`](../core/services/nodes-api.service.md) in the [`FilesComponent`](../../demo-shell/src/app/components/files/files.component.ts). See the `fetchNode` and
+property that represents the [`NodesApiService`](../core/services/nodes-api.service.md). See the `fetchNode` and
`fetchNodes` methods for some very basic examples.
## About the NodesApiService
@@ -81,37 +83,40 @@ You "subscribe" to the asynchronous messaging using the following syntax:
```ts
this.nodesApi.getNode(nodeId).subscribe(
- (node) => { ... },
- error => { ... }
+ (node) => { /*...*/ },
+ error => { /*...*/ }
);
```
### MinimalNode
-All the methods that manage content nodes return an [`Observable`](http://reactivex.io/documentation/observable.html) of the [`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)
-class. [`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) is used to represent the node's content. See the
-[official documentation](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)
-for further details.
+All the methods that manage content nodes return an `Observable` of the `MinimalNode`class.
+The `MinimalNode` is used to represent the node's content.
+
+See the [official documentation](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) for further details.
### NodePaging
-When a method returns a list of nodes rather than a single node, it usually returns an [`Observable`](http://reactivex.io/documentation/observable.html) of the [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md) class. See the
-[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)
-docs for further details.
+When a method returns a list of nodes rather than a single node, it usually returns an `Observable` of the `NodePaging` class.
+See the [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md) docs for further details.
## Retrieving info and metadata from a node
As a first example of the usage of the [`NodesApiService`](../core/services/nodes-api.service.md), let's retrieve the properties of a content node using its identifier. Edit the `myOnNodeDoubleClick` method in `src/app/components/files/files.component.ts`, as shown below:
```ts
-myOnNodeDoubleClick(nodeId) {
- this.nodesApi.getNode(nodeId)
- .subscribe(
- (node) => {
- console.log(node.properties);
- },
- error => { console.log("Ouch, an error happened!"); }
- );
+class MyComponent {
+ myOnNodeDoubleClick(nodeId) {
+ this.nodesApi.getNode(nodeId)
+ .subscribe(
+ (node) => {
+ console.log(node.properties);
+ },
+ error => {
+ console.log("Ouch, an error happened!");
+ }
+ );
+ }
}
```
@@ -138,14 +143,18 @@ to match the source code below:
Now add the `myOnFolderNodeDoubleClick` method as shown below and save the file:
```ts
-myOnFolderNodeDoubleClick(nodeId) {
- this.nodesApi.getNodeChildren(nodeId)
- .subscribe(
- (nodePaging) => {
- console.log(nodePaging.list);
- },
- error => { console.log("Ouch, an error happened!"); }
- );
+class MyComponent {
+ myOnFolderNodeDoubleClick(nodeId) {
+ this.nodesApi.getNodeChildren(nodeId)
+ .subscribe(
+ (nodePaging) => {
+ console.log(nodePaging.list);
+ },
+ error => {
+ console.log("Ouch, an error happened!");
+ }
+ );
+ }
}
```
@@ -165,14 +174,18 @@ a subfolder of the double clicked folder and also how to delete it.
To create a subfolder, change the `myOnFolderNodeDoubleClick` method as described below and save the Typescript file.
```ts
-myOnFolderNodeDoubleClick(nodeId) {
- this.nodesApi.createFolder(nodeId, { "name": "My new subfolder" })
- .subscribe(
- (node) => {
- console.log("Subfolder created with name '" + node.name + "' (id:'" + node.id + "').");
- },
- error => { console.log("Ouch, an error happened!"); }
- );
+class MyComponent {
+ myOnFolderNodeDoubleClick(nodeId) {
+ this.nodesApi.createFolder(nodeId, { "name": "My new subfolder" })
+ .subscribe(
+ (node) => {
+ console.log("Subfolder created with name '" + node.name + "' (id:'" + node.id + "').");
+ },
+ error => {
+ console.log("Ouch, an error happened!");
+ }
+ );
+ }
}
```
@@ -187,7 +200,7 @@ Alfresco Share client or by replacing the content of the `myOnFolderNodeDoubleCl
with:
```ts
-this.navigate(nodeId);`
+this.navigate(nodeId);
```
...and then saving and navigating to the `Shared` folder.
@@ -205,14 +218,18 @@ with the same name in the same parent folder, which is not permitted by Alfresco
To delete a folder, change the `myOnFolderNodeDoubleClick` method as described below and save the Typescript file.
```ts
-myOnFolderNodeDoubleClick(nodeId) {
- this.nodesApi.deleteNode(nodeId)
- .subscribe(
- success => {
- alert("Node deleted! Click on a folder into the left menu.");
- },
- error => { console.log("Ouch, an error happened!"); }
- );
+class MyComponent {
+ myOnFolderNodeDoubleClick(nodeId) {
+ this.nodesApi.deleteNode(nodeId)
+ .subscribe(
+ success => {
+ alert("Node deleted! Click on a folder into the left menu.");
+ },
+ error => {
+ console.log("Ouch, an error happened!");
+ }
+ );
+ }
}
```
diff --git a/e2e-playwright/models/component-titles.model.ts b/e2e-playwright/models/component-titles.model.ts
deleted file mode 100644
index 37fb24a458..0000000000
--- a/e2e-playwright/models/component-titles.model.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export enum ComponentTitles {
- processServicesCloud = 'process-services-cloud',
-}
diff --git a/e2e-playwright/page-object/components/base.component.ts b/e2e-playwright/page-object/components/base.component.ts
deleted file mode 100644
index fb8e381f14..0000000000
--- a/e2e-playwright/page-object/components/base.component.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Locator, Page } from '@playwright/test';
-import { PlaywrightBase } from '../playwright-base';
-
-export abstract class BaseComponent extends PlaywrightBase {
- private rootElement: string;
-
- constructor(page: Page,rootElement: string) {
- super(page);
- this.rootElement = rootElement;
- }
-
- /**
- * Method which should be used across the repository, while creating
- * reference to elements, which are in root element of component.
- *
- * @param cssLocator css selector as String. Need to be in the tree under the root element
- * @param options if you want to localize it by text, then provide an optional hasText
- * @returns Locator object
- */
- getChild(cssLocator: string, options?: { hasText: string | RegExp }): Locator {
- return this.page.locator(`${this.rootElement} ${cssLocator}`, options);
- }
-
-}
diff --git a/e2e-playwright/page-object/components/basic/index.ts b/e2e-playwright/page-object/components/basic/index.ts
deleted file mode 100644
index 4f80532399..0000000000
--- a/e2e-playwright/page-object/components/basic/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './listbox.component';
diff --git a/e2e-playwright/page-object/components/basic/listbox.component.ts b/e2e-playwright/page-object/components/basic/listbox.component.ts
deleted file mode 100644
index f9aaff184b..0000000000
--- a/e2e-playwright/page-object/components/basic/listbox.component.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-import { BaseComponent } from '../base.component';
-
-export class ListboxComponent extends BaseComponent {
- private static rootElement = 'div[role=listbox]';
- public allOptions = this.getChild('');
- public oneOption = this.getChild('span >> span');
-
- constructor(page: Page) {
- super(page, ListboxComponent.rootElement);
- }
-}
diff --git a/e2e-playwright/page-object/components/index.ts b/e2e-playwright/page-object/components/index.ts
deleted file mode 100644
index e31bb179bb..0000000000
--- a/e2e-playwright/page-object/components/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './material';
-export * from './basic';
-export * from './base.component';
diff --git a/e2e-playwright/page-object/components/material/error.component.ts b/e2e-playwright/page-object/components/material/error.component.ts
deleted file mode 100644
index 287a1f4382..0000000000
--- a/e2e-playwright/page-object/components/material/error.component.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-import { BaseComponent } from '../base.component';
-import { materialLocators } from './material-locators';
-
-export class ErrorComponent extends BaseComponent {
- private static rootElement = materialLocators.Error.root;
- public content = this.getChild('');
-
- constructor(page: Page) {
- super(page, ErrorComponent.rootElement);
- }
-}
diff --git a/e2e-playwright/page-object/components/material/index.ts b/e2e-playwright/page-object/components/material/index.ts
deleted file mode 100644
index f3f96ee95e..0000000000
--- a/e2e-playwright/page-object/components/material/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './error.component';
diff --git a/e2e-playwright/page-object/components/material/material-locators.ts b/e2e-playwright/page-object/components/material/material-locators.ts
deleted file mode 100644
index 87d3af572c..0000000000
--- a/e2e-playwright/page-object/components/material/material-locators.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export const materialLocators = {
- Error: {
- root: 'mat-error'
- }
-};
diff --git a/e2e-playwright/page-object/components/material/validation.component.ts b/e2e-playwright/page-object/components/material/validation.component.ts
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/e2e-playwright/page-object/index.ts b/e2e-playwright/page-object/index.ts
deleted file mode 100644
index 05c7640600..0000000000
--- a/e2e-playwright/page-object/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export * from './components';
-export * from './stories/base-stories';
diff --git a/e2e-playwright/page-object/playwright-base.ts b/e2e-playwright/page-object/playwright-base.ts
deleted file mode 100644
index 35fdc4af94..0000000000
--- a/e2e-playwright/page-object/playwright-base.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-
-export abstract class PlaywrightBase {
- public page: Page;
-
- constructor(page: Page) {
- this.page = page;
- }
-}
diff --git a/e2e-playwright/page-object/stories/base-stories.ts b/e2e-playwright/page-object/stories/base-stories.ts
deleted file mode 100644
index 6cffd21bf3..0000000000
--- a/e2e-playwright/page-object/stories/base-stories.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-import { timeouts } from '../../utils/timeouts';
-import { ComponentTitles } from '../../models/component-titles.model';
-import { PlaywrightBase } from '../playwright-base';
-
-interface NavigationParameters {
- moduleNames: string[];
- componentName: string;
- story: string;
-}
-
-export class BaseStories extends PlaywrightBase {
- private libraryName: string;
-
- constructor(page: Page, libraryName: ComponentTitles) {
- super(page);
- this.libraryName = libraryName;
- }
-
- private buildStoryId({ moduleNames, componentName, story }: NavigationParameters): string {
- const moduleNamesConcatenated = moduleNames.reduce((module, submodule) => module + '-' + submodule);
- return this.libraryName + '-' + moduleNamesConcatenated + '-' + componentName + '--' + story;
- }
-
- async navigateTo(navigationParameters: NavigationParameters): Promise {
- await this.page.goto(`/iframe.html?viewMode=story&id=${this.buildStoryId(navigationParameters)}`);
- await this.page.waitForSelector('storybook-root', { timeout: timeouts.large });
- }
-}
diff --git a/e2e-playwright/playwright.config.ts b/e2e-playwright/playwright.config.ts
deleted file mode 100644
index 7deefa77d3..0000000000
--- a/e2e-playwright/playwright.config.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-/* eslint-disable @typescript-eslint/no-unused-expressions */
-import { PlaywrightTestConfig, ReporterDescription } from '@playwright/test';
-import { dotenvConfig } from '../lib/cli/tooling';
-import { paths } from './utils/paths';
-import { timeouts } from './utils/timeouts';
-import path from 'path';
-
-export const getGlobalConfig = (): PlaywrightTestConfig => {
- dotenvConfig();
- const env = process.env;
- const baseUrl = `${env.PLAYWRIGHT_STORYBOOK_E2E_HOST}:${env.PLAYWRIGHT_STORYBOOK_E2E_PORT}`;
- let startCommand: string;
- let report: ReporterDescription;
-
- if (!!env.CI) {
- startCommand = 'nx run stories:storybook';
- report = ['html', { outputFolder: path.resolve(`../${paths.report}`), open: 'never' }];
- } else {
- startCommand = 'nx run stories:build-storybook && nx run stories:storybook';
- report = ['html', { outputFolder: path.resolve(`../${paths.report}`), open: 'on-failure' }];
- }
-
- const webServer = {
- command: `cd .. && ${startCommand}`,
- // It's true, but watch on on localhost! If you'll have other app up and running then it'll use this app to run the tests.
- // It won't check what application is currently running.
- reuseExistingServer: true,
- timeout: timeouts.webServer,
- url: baseUrl
- };
-
- return {
- timeout: timeouts.globalTest,
- globalTimeout: timeouts.globalSpec,
- testMatch: /.*\.e2e\.ts/,
-
- expect: {
- timeout: timeouts.large
- },
-
- /* Fail the build on CI if you accidentally left test.only in the source code. */
- forbidOnly: !!env.CI,
-
- /* Retry on CI only */
- retries: env.CI ? 2 : 0,
-
- /* Opt out of parallel tests on CI. */
- workers: env.PLAYWRIGHT_WORKERS ? parseInt(env.PLAYWRIGHT_WORKERS, 10) : 1,
-
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
- reporter: [['list'], report],
- quiet: false,
-
- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
- use: {
- actionTimeout: 0,
- trace: 'retain-on-failure',
- screenshot: 'only-on-failure',
- headless: !!env.PLAYWRIGHT_HEADLESS ? (env.PLAYWRIGHT_HEADLESS === 'true') : !!env.CI,
- ignoreHTTPSErrors: true,
- bypassCSP: true,
- browserName: 'chromium',
- baseURL: baseUrl,
- viewport: {
- height: 900,
- width: 1400
- },
- launchOptions: {
- devtools: false,
- args: [
- '--disable-web-security',
- '--no-sandbox'
- ]
- }
- },
-
- projects: [
- {
- name: 'Process Services Cloud : People',
- testMatch: /.people-cloud*\.e2e\.ts/
- },
- {
- name: 'Process Services Cloud : Groups',
- testMatch: /.groups-cloud*\.e2e\.ts/
- }
- ],
-
- webServer
- };
-
-};
-
-export default getGlobalConfig();
diff --git a/e2e-playwright/process-services-cloud/components/group.component.ts b/e2e-playwright/process-services-cloud/components/group.component.ts
deleted file mode 100644
index 658c3891b8..0000000000
--- a/e2e-playwright/process-services-cloud/components/group.component.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-import { BaseComponent } from '../../page-object/components/base.component';
-import { ErrorComponent } from '../../page-object/components';
-
-export class GroupComponent extends BaseComponent {
- private static rootElement = 'adf-cloud-group';
- public error = new ErrorComponent(this.page);
-
- public groupNaming = this.getChild('[data-automation-id="adf-cloud-group-chip-list"]');
- public groupInput = this.getChild('[data-automation-id="adf-group-cloud-search-input"]');
-
- constructor(page: Page, rootElement = GroupComponent.rootElement) {
- super(page, rootElement);
- }
-
- public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-cloud-group-chip-${userName}"]`);
-}
diff --git a/e2e-playwright/process-services-cloud/components/people.component.ts b/e2e-playwright/process-services-cloud/components/people.component.ts
deleted file mode 100644
index 1d5b511c4d..0000000000
--- a/e2e-playwright/process-services-cloud/components/people.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { Page } from '@playwright/test';
-import { BaseComponent } from '../../page-object/components/base.component';
-import { ErrorComponent, ListboxComponent } from '../../page-object/components';
-
-export class PeopleComponent extends BaseComponent {
- private static rootElement = 'adf-cloud-people';
- public error = new ErrorComponent(this.page);
- public listbox = new ListboxComponent(this.page);
-
- public usersNaming = this.getChild('[data-automation-id="adf-cloud-people-chip-list"]');
- public usersInput = this.getChild('[data-automation-id="adf-people-cloud-search-input"]');
-
- constructor(page: Page, rootElement = PeopleComponent.rootElement) {
- super(page, rootElement);
- }
-
- public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-people-cloud-chip-${userName}"]`);
-}
diff --git a/e2e-playwright/process-services-cloud/fixtures/page-initialization.ts b/e2e-playwright/process-services-cloud/fixtures/page-initialization.ts
deleted file mode 100644
index f32625d0e6..0000000000
--- a/e2e-playwright/process-services-cloud/fixtures/page-initialization.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { test as base } from '@playwright/test';
-import { BaseStories } from '../../page-object';
-import { ComponentTitles } from '../../models/component-titles.model';
-import { PeopleComponent } from '../components/people.component';
-import { GroupComponent } from '../components/group.component';
-
-interface Pages {
- processServicesCloud: BaseStories;
- peopleComponent: PeopleComponent;
- groupComponent: GroupComponent;
-}
-
-export const test = base.extend({
- processServicesCloud: async ({ page }, use) => {
- await use(new BaseStories(page, ComponentTitles.processServicesCloud));
- },
- peopleComponent: async ({ page }, use) => {
- await use(new PeopleComponent(page));
- },
- groupComponent: async ({ page }, use) => {
- await use(new GroupComponent(page));
- }
-});
-
-export { expect } from '@playwright/test';
diff --git a/e2e-playwright/process-services-cloud/specs/groups-cloud.e2e.ts b/e2e-playwright/process-services-cloud/specs/groups-cloud.e2e.ts
deleted file mode 100644
index cf1020a6e9..0000000000
--- a/e2e-playwright/process-services-cloud/specs/groups-cloud.e2e.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { test, expect } from '../fixtures/page-initialization';
-
-test.describe.configure({ mode: 'parallel' });
-
-test.describe('Groups component stories tests', () => {
- test('Valid Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
- const expectedUsersName = `
- Vegetable Aubergine cancel
- Meat Chicken cancel
- `;
-
- await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'valid-preselected-groups' });
-
- await expect(groupComponent.groupNaming).toContainText(expectedUsersName);
- });
-
- test('Mandatory Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
- const expectedUsersName = `
- Vegetable Aubergine cancel
- Meat Chicken
- `;
-
- await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'mandatory-preselected-groups' });
- await expect.soft(groupComponent.groupNaming).toContainText(expectedUsersName);
- });
-
- test('Invalid Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
- const expectedWarningMessage = 'Group not found';
- const expectedWarningIcon = 'error_outline';
-
- await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'invalid-preselected-groups' });
-
- await expect(groupComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
- });
-});
diff --git a/e2e-playwright/process-services-cloud/specs/people-cloud.e2e.ts b/e2e-playwright/process-services-cloud/specs/people-cloud.e2e.ts
deleted file mode 100644
index 01cc1267de..0000000000
--- a/e2e-playwright/process-services-cloud/specs/people-cloud.e2e.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { test, expect } from '../fixtures/page-initialization';
-
-test.describe.configure({ mode: 'parallel' });
-
-test.describe('People component stories tests', () => {
- test('Valid Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
- const expectedUsersName = `
- Yorkshire Pudding cancel
- Shepherds Pie cancel
- Kielbasa Sausage cancel
- `;
-
- await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'valid-preselected-users' });
-
- await expect(peopleComponent.usersNaming).toContainText(expectedUsersName);
- });
-
- test('Mandatory Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
- const expectedUsersName = `
- Kielbasa Sausage
- Shepherds Pie cancel
- `;
-
- await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'mandatory-preselected-users' });
- await peopleComponent.getUserLocator('Kielbasa Sausage').hover();
-
- await expect.soft(peopleComponent.usersNaming).toContainText(expectedUsersName);
- });
-
- test('Invalid Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
- const expectedWarningMessage = 'No user found with the username Invalid User';
- const expectedWarningIcon = 'error_outline';
-
- await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'invalid-preselected-users' });
-
- await expect(peopleComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
- });
-
- test('Excluded Users', async ({ processServicesCloud, peopleComponent }) => {
- const expectedExcludedUsers = `
- kielbasa
- yorkshire
- `;
-
- await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'excluded-users' });
- await peopleComponent.usersInput.type('user');
-
- await expect(peopleComponent.listbox.allOptions).not.toContainText(expectedExcludedUsers);
- });
-
- test('No Users', async ({ processServicesCloud, peopleComponent }) => {
- const expectedInformation = 'No user found with the username user';
-
- await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'no-users' });
- await peopleComponent.usersInput.type('user');
-
- await expect(peopleComponent.listbox.oneOption).toContainText(expectedInformation);
- });
-});
diff --git a/e2e-playwright/utils/paths.ts b/e2e-playwright/utils/paths.ts
deleted file mode 100644
index 2665750797..0000000000
--- a/e2e-playwright/utils/paths.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-const rootFolder = 'e2e-output/playwright-data';
-
-export const paths = {
- rootFolder,
- files: `${rootFolder}/downloads`,
- report: `${rootFolder}/report`,
- userStates: `${rootFolder}/user-states`
-};
diff --git a/e2e-playwright/utils/timeouts.ts b/e2e-playwright/utils/timeouts.ts
deleted file mode 100644
index 3500fd94c4..0000000000
--- a/e2e-playwright/utils/timeouts.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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.
- */
-
-export const timeouts = {
- tiny: 500,
- short: 1000,
- medium: 5000,
- large: 10000,
- globalTest: 30 * 1000,
- webServer: 240 * 1000,
- globalSpec: 60 * 10 * 1000
-};
diff --git a/e2e/content-services/components/comment-component.e2e.ts b/e2e/content-services/components/comment-component.e2e.ts
deleted file mode 100644
index 51d00e067e..0000000000
--- a/e2e/content-services/components/comment-component.e2e.ts
+++ /dev/null
@@ -1,188 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, StringUtil, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { CommentsPage } from '../../core/pages/comments.page';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { browser } from 'protractor';
-import CONSTANTS = require('../../util/constants');
-import { SitesApi, SiteEntry, CommentsApi } from '@alfresco/js-api';
-
-describe('Comment', () => {
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const viewerPage = new ViewerPage();
- const commentsPage = new CommentsPage();
- const navigationBarPage = new NavigationBarPage();
-
- const apiService = createApiService();
- const commentsApi = new CommentsApi(apiService.getInstance());
-
- let userFullName: string;
- let nodeId: string;
- 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
- });
-
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- const comments = {
- first: 'This is a comment',
- multiline: 'This is a comment\n' + 'with a new line',
- second: 'This is another comment',
- test: 'Test'
- };
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- });
-
- describe('component', () => {
- beforeEach(async () => {
- await apiService.login(acsUser.username, acsUser.password);
-
- const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
-
- nodeId = pngUploadedFile.entry.id;
-
- userFullName = pngUploadedFile.entry.createdByUser.displayName;
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- });
-
- afterEach(async () => {
- await apiService.loginWithProfile('admin');
- await uploadActions.deleteFileOrFolder(nodeId);
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C276947] Should be able to add a comment on ACS and view on ADF', async () => {
- await commentsApi.createComment(nodeId, { content: comments.test });
-
- await viewerPage.viewFile(pngFileModel.name);
-
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
-
- await commentsPage.checkCommentsTabIsSelected();
- await commentsPage.checkCommentInputIsDisplayed();
-
- await commentsPage.getTotalNumberOfComments('Comments (1)');
- expect(await commentsPage.getMessage(0)).toEqual(comments.test);
- expect(await commentsPage.getUserName(0)).toEqual(userFullName);
- expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
- });
-
- it('[C276948] Should be able to add a comment on a file', async () => {
- await viewerPage.viewFile(pngFileModel.name);
-
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await viewerPage.clickOnCommentsTab();
-
- await commentsPage.addComment(comments.first);
- await commentsPage.checkUserIconIsDisplayed();
-
- await commentsPage.getTotalNumberOfComments('Comments (1)');
- expect(await commentsPage.getMessage(0)).toEqual(comments.first);
- expect(await commentsPage.getUserName(0)).toEqual(userFullName);
- expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
- });
-
- it('[C280021] Should be able to add a multiline comment on a file', async () => {
- await viewerPage.viewFile(pngFileModel.name);
-
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await viewerPage.clickOnCommentsTab();
-
- await commentsPage.addComment(comments.multiline);
- await commentsPage.checkUserIconIsDisplayed();
-
- await commentsPage.getTotalNumberOfComments('Comments (1)');
- expect(await commentsPage.getMessage(0)).toEqual(comments.multiline);
- expect(await commentsPage.getUserName(0)).toEqual(userFullName);
- expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
-
- await commentsPage.addComment(comments.second);
- await commentsPage.checkUserIconIsDisplayed();
-
- await commentsPage.getTotalNumberOfComments('Comments (2)');
- expect(await commentsPage.getMessage(0)).toEqual(comments.second);
- expect(await commentsPage.getUserName(0)).toEqual(userFullName);
- expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
- });
- });
-
- describe('Consumer Permissions', () => {
- let site: SiteEntry;
- let pngUploadedFile;
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- const sitesApi = new SitesApi(apiService.getInstance());
- site = await sitesApi.createSite({
- title: StringUtil.generateRandomString(8),
- visibility: 'PUBLIC'
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: acsUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONSUMER
- });
-
- pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
-
- const sitesApi = new SitesApi(apiService.getInstance());
- await sitesApi.deleteSite(site.entry.id, { permanent: true });
- });
-
- it('[C290147] Should NOT be able to add comments to a site file with Consumer permissions', async () => {
- await navigationBarPage.goToSite(site);
- await contentServicesPage.checkAcsContainer();
-
- await viewerPage.viewFile(pngUploadedFile.entry.name);
- await viewerPage.checkInfoButtonIsDisplayed();
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
-
- await commentsPage.checkCommentsTabIsSelected();
- await commentsPage.checkCommentInputIsNotDisplayed();
- await viewerPage.clickCloseButton();
- });
- });
-});
diff --git a/e2e/content-services/components/viewer-content-services-component.e2e.ts b/e2e/content-services/components/viewer-content-services-component.e2e.ts
deleted file mode 100644
index 752e4679fd..0000000000
--- a/e2e/content-services/components/viewer-content-services-component.e2e.ts
+++ /dev/null
@@ -1,377 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, by, element, protractor } from 'protractor';
-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';
-
-describe('Content Services Viewer', () => {
- const acsUser = new UserModel();
- const viewerPage = new ViewerPage();
- const contentServicesPage = new ContentServicesPage();
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
-
- const pdfFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
- firstPageText: browser.params.resources.Files.ADF_DOCUMENTS.PDF.first_page_text,
- secondPageText: browser.params.resources.Files.ADF_DOCUMENTS.PDF.second_page_text,
- lastPageNumber: browser.params.resources.Files.ADF_DOCUMENTS.PDF.last_page_number
- });
- const protectedFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.file_name,
- firstPageText: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.first_page_text,
- secondPageText: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.second_page_text,
- lastPageNumber: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.last_page_number,
- password: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.password,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_PROTECTED.file_path
- });
- const docxFile = new FileModel({
- location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_path,
- name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
- firstPageText: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.first_page_text
- });
- const jpgFile = new FileModel({
- location: browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
- name: browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_name
- });
- const mp4File = new FileModel({
- location: browser.params.resources.Files.ADF_DOCUMENTS.MP4.file_path,
- name: browser.params.resources.Files.ADF_DOCUMENTS.MP4.file_name
- });
- const unsupportedFile = new FileModel({
- location: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_path,
- name: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name
- });
- const pptFile = new FileModel({
- location: browser.params.resources.Files.ADF_DOCUMENTS.PPT.file_path,
- name: browser.params.resources.Files.ADF_DOCUMENTS.PPT.file_name,
- firstPageText: browser.params.resources.Files.ADF_DOCUMENTS.PPT.first_page_text
- });
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const uploadActions = new UploadActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- await usersActions.createUser(acsUser);
-
- await apiService.login(acsUser.username, acsUser.password);
-
- const pdfFileUploaded = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
- Object.assign(pdfFile, pdfFileUploaded.entry);
-
- const protectedFileUploaded = await uploadActions.uploadFile(protectedFile.location, protectedFile.name, '-my-');
- Object.assign(protectedFile, protectedFileUploaded.entry);
-
- const docxFileUploaded = await uploadActions.uploadFile(docxFile.location, docxFile.name, '-my-');
- Object.assign(docxFile, docxFileUploaded.entry);
-
- const jpgFileUploaded = await uploadActions.uploadFile(jpgFile.location, jpgFile.name, '-my-');
- Object.assign(jpgFile, jpgFileUploaded.entry);
-
- const mp4FileUploaded = await uploadActions.uploadFile(mp4File.location, mp4File.name, '-my-');
- Object.assign(mp4File, mp4FileUploaded.entry);
-
- const pptFileUploaded = await uploadActions.uploadFile(pptFile.location, pptFile.name, '-my-');
- Object.assign(pptFile, pptFileUploaded.entry);
-
- const unsupportedFileUploaded = await uploadActions.uploadFile(unsupportedFile.location, unsupportedFile.name, '-my-');
- Object.assign(unsupportedFile, unsupportedFileUploaded.entry);
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await contentServicesPage.goToDocumentList();
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await uploadActions.deleteFileOrFolder(pdfFile.getId());
- await uploadActions.deleteFileOrFolder(protectedFile.getId());
- await uploadActions.deleteFileOrFolder(docxFile.getId());
- await uploadActions.deleteFileOrFolder(jpgFile.getId());
- await uploadActions.deleteFileOrFolder(mp4File.getId());
- await uploadActions.deleteFileOrFolder(pptFile.getId());
- await uploadActions.deleteFileOrFolder(unsupportedFile.getId());
- await navigationBarPage.clickLogoutButton();
- });
-
- describe('Usual type files', () => {
- it('[C260038] Should display first page, toolbar and pagination when opening a .pdf file', async () => {
- await contentServicesPage.doubleClickRow(pdfFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(pdfFile.name);
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkFullScreenButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
- await viewerPage.checkPreviousPageButtonIsDisplayed();
- await viewerPage.checkNextPageButtonIsDisplayed();
- await viewerPage.checkPageSelectorInputIsDisplayed('1');
- await viewerPage.checkPercentageIsDisplayed();
- await viewerPage.checkZoomInButtonIsDisplayed();
- await viewerPage.checkZoomOutButtonIsDisplayed();
- await viewerPage.checkScalePageButtonIsDisplayed();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260040] Should be able to change pages and zoom when .pdf file is open', async () => {
- await contentServicesPage.doubleClickRow(pdfFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.clickNextPageButton();
- await viewerPage.checkFileContent('2', pdfFile.secondPageText);
- await viewerPage.checkPageSelectorInputIsDisplayed('2');
-
- await viewerPage.clickPreviousPageButton();
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.checkPageSelectorInputIsDisplayed('1');
-
- await viewerPage.clearPageNumber();
- await viewerPage.checkPageSelectorInputIsDisplayed('');
-
- const initialWidth = await viewerPage.getCanvasWidth();
- const initialHeight = await viewerPage.getCanvasHeight();
-
- await viewerPage.clickZoomInButton();
- expect(+(await viewerPage.getCanvasWidth())).toBeGreaterThan(+initialWidth);
- expect(+(await viewerPage.getCanvasHeight())).toBeGreaterThan(+initialHeight);
-
- await viewerPage.clickActualSize();
- expect(+(await viewerPage.getCanvasWidth())).toEqual(+initialWidth);
- expect(+(await viewerPage.getCanvasHeight())).toEqual(+initialHeight);
-
- await viewerPage.clickZoomOutButton();
- expect(+(await viewerPage.getCanvasWidth())).toBeLessThan(+initialWidth);
- expect(+(await viewerPage.getCanvasHeight())).toBeLessThan(+initialHeight);
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260042] Should be able to download, open full-screen and Info container from the Viewer', async () => {
- await contentServicesPage.doubleClickRow(jpgFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkImgContainerIsDisplayed();
-
- await viewerPage.checkFullScreenButtonIsDisplayed();
- await viewerPage.clickFullScreenButton();
-
- await viewerPage.exitFullScreen();
-
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.clickDownloadButton();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260052] Should display image, toolbar and pagination when opening a .jpg file', async () => {
- await contentServicesPage.doubleClickRow(jpgFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkImgContainerIsDisplayed();
-
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(jpgFile.name);
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkFullScreenButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
- await viewerPage.checkZoomInButtonIsDisplayed();
- await viewerPage.checkZoomOutButtonIsDisplayed();
- await viewerPage.checkPercentageIsDisplayed();
- await viewerPage.checkScaleImgButtonIsDisplayed();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260483] Should be able to zoom and rotate image when .jpg file is open', async () => {
- await contentServicesPage.doubleClickRow(jpgFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkPercentageIsDisplayed();
-
- let zoom = await viewerPage.getZoom();
- await viewerPage.clickZoomInButton();
- await viewerPage.checkZoomedIn(zoom);
-
- zoom = await viewerPage.getZoom();
- await viewerPage.clickZoomOutButton();
- await viewerPage.checkZoomedOut(zoom);
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C279922] Should display first page, toolbar and pagination when opening a .ppt file', async () => {
- await contentServicesPage.doubleClickRow(pptFile.name);
- await viewerPage.waitTillContentLoaded();
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkFileContent('1', pptFile.firstPageText);
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(pptFile.name);
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
- await viewerPage.checkPreviousPageButtonIsDisplayed();
- await viewerPage.checkNextPageButtonIsDisplayed();
- await viewerPage.checkPageSelectorInputIsDisplayed('1');
- await viewerPage.checkZoomInButtonIsDisplayed();
- await viewerPage.checkZoomOutButtonIsDisplayed();
- await viewerPage.checkScalePageButtonIsDisplayed();
-
- 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();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkFileContent('1', docxFile.firstPageText);
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(docxFile.name);
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
- await viewerPage.checkPreviousPageButtonIsDisplayed();
- await viewerPage.checkNextPageButtonIsDisplayed();
- await viewerPage.checkPageSelectorInputIsDisplayed('1');
- await viewerPage.checkZoomInButtonIsDisplayed();
- await viewerPage.checkZoomOutButtonIsDisplayed();
- await viewerPage.checkScalePageButtonIsDisplayed();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260054] Should display Preview could not be loaded and viewer toolbar when opening an unsupported file', async () => {
- await contentServicesPage.doubleClickRow(unsupportedFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(unsupportedFile.name);
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
-
- await viewerPage.checkZoomInButtonIsNotDisplayed();
- await viewerPage.checkUnknownFormatIsDisplayed();
- expect(await viewerPage.getUnknownFormatMessage()).toBe(
- `Couldn't load preview. Unsupported file type or loading error. Please try refreshing the page.`
- );
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C260056] Should display video and viewer toolbar when opening a media file', async () => {
- await contentServicesPage.doubleClickRow(mp4File.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkMediaPlayerContainerIsDisplayed();
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.checkFileThumbnailIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(mp4File.name);
- await viewerPage.checkDownloadButtonIsDisplayed();
- await viewerPage.checkInfoButtonIsDisplayed();
-
- await viewerPage.checkZoomInButtonIsNotDisplayed();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C261123] Should be able to preview all pages and navigate to a page when using thumbnails', async () => {
- await contentServicesPage.doubleClickRow(pdfFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.checkThumbnailsBtnIsDisplayed();
- await viewerPage.clickThumbnailsBtn();
-
- await viewerPage.checkThumbnailsContentIsDisplayed();
- await viewerPage.checkThumbnailsCloseIsDisplayed();
- await viewerPage.checkAllThumbnailsDisplayed(pdfFile.lastPageNumber);
-
- await viewerPage.clickSecondThumbnail();
- await viewerPage.checkFileContent('2', pdfFile.secondPageText);
- await viewerPage.checkCurrentThumbnailIsSelected();
-
- await viewerPage.checkPreviousPageButtonIsDisplayed();
- await viewerPage.clickPreviousPageButton();
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.checkCurrentThumbnailIsSelected();
-
- await viewerPage.clickThumbnailsBtn();
- await viewerPage.checkThumbnailsContentIsNotDisplayed();
- await viewerPage.clickThumbnailsBtn();
- await viewerPage.checkThumbnailsCloseIsDisplayed();
- await viewerPage.clickThumbnailsClose();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C268105] Should display current thumbnail when getting to the page following the last visible thumbnail', async () => {
- await contentServicesPage.doubleClickRow(pdfFile.name);
- await viewerPage.waitTillContentLoaded();
-
- await viewerPage.checkZoomInButtonIsDisplayed();
-
- await viewerPage.checkFileContent('1', pdfFile.firstPageText);
- await viewerPage.checkThumbnailsBtnIsDisplayed();
- await viewerPage.clickThumbnailsBtn();
- await viewerPage.clickLastThumbnailDisplayed();
- await viewerPage.checkCurrentThumbnailIsSelected();
-
- await viewerPage.checkNextPageButtonIsDisplayed();
- await viewerPage.clickNextPageButton();
- await viewerPage.checkCurrentThumbnailIsSelected();
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C269109] Should not be able to open thumbnail panel before the pdf is loaded', async () => {
- const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${pdfFile.name}"]`)).first();
- await BrowserActions.click(fileView);
- await browser.actions().sendKeys(protractor.Key.ENTER).perform();
-
- await viewerPage.checkThumbnailsBtnIsDisabled();
-
- await viewerPage.checkCloseButtonIsDisplayed();
- await viewerPage.clickCloseButton();
- });
- });
-});
diff --git a/e2e/content-services/components/viewer-vesion.e2e.ts b/e2e/content-services/components/viewer-vesion.e2e.ts
deleted file mode 100644
index e26a5033b2..0000000000
--- a/e2e/content-services/components/viewer-vesion.e2e.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { createApiService, FileBrowserUtil, 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';
-
-describe('Viewer', () => {
-
- const navigationBarPage = new NavigationBarPage();
- const viewerPage = new ViewerPage();
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
-
- const apiService = createApiService();
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- const versionManagePage = new VersionManagePage();
- const acsUser = new UserModel();
- let txtFileUploaded;
-
- const txtFileInfo = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
- });
-
- const fileModelVersionTwo = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_location
- });
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- await usersActions.createUser(acsUser);
-
- await apiService.login(acsUser.username, acsUser.password);
-
- txtFileUploaded = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, '-my-');
-
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await uploadActions.deleteFileOrFolder(txtFileUploaded.entry.id);
- await navigationBarPage.clickLogoutButton();
- });
-
- beforeEach(async () => {
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.doubleClickRow(txtFileUploaded.entry.name);
- await viewerPage.waitTillContentLoaded();
- });
-
- afterEach(async () => {
- await viewerPage.clickCloseButton();
- });
-
- 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();
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
- await versionManagePage.closeVersionDialog();
- await contentServicesPage.doubleClickRow(txtFileUploaded.entry.name);
- await viewerPage.waitTillContentLoaded();
- await viewerPage.clickInfoButton();
- await viewerPage.clickOnTab('Versions');
- await versionManagePage.viewFileVersion('1.0');
- await viewerPage.expectUrlToContain('1.0');
- });
-
- it('[C362265] Should the Viewer be able to download a previous version of a file', async () => {
- await viewerPage.clickDownloadButton();
- await FileBrowserUtil.isFileDownloaded(txtFileInfo.name);
- });
-});
diff --git a/e2e/content-services/directives/sso-download-directive-component.e2e.ts b/e2e/content-services/directives/sso-download-directive-component.e2e.ts
deleted file mode 100644
index 3fcc899272..0000000000
--- a/e2e/content-services/directives/sso-download-directive-component.e2e.ts
+++ /dev/null
@@ -1,143 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-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();
- const contentListPage = contentServicesPage.getDocumentList();
- const loginSsoPage = new LoginPage();
- const viewerPage = new ViewerPage();
-
- const apiService = createApiService({ authType: 'OAUTH' });
- const uploadActions = new UploadActions(apiService);
- const identityService = new IdentityService(apiService);
- const usersActions = new UsersActions(apiService);
-
- const firstPdfFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
- });
-
- 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 folder: NodeEntry;
- let acsUser: UserModel;
- const folderName = StringUtil.generateRandomString(5);
-
- beforeAll(async () => {
- await apiService.login(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
-
- acsUser = await usersActions.createUser();
-
- await apiService.login(acsUser.username, acsUser.password);
-
- folder = await uploadActions.createFolder(folderName, '-my-');
-
- 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,
- browser.params.testConfig.appConfig.oauth2.host,
- browser.params.testConfig.appConfig.identityHost,
- false,
- true,
- browser.params.testConfig.appConfig.oauth2.clientId
- );
-
- await browser.refresh();
-
- await loginSsoPage.loginSSOIdentityService(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.checkAcsContainer();
- await contentServicesPage.openFolder(folderName);
- await contentListPage.waitForTableBody();
- });
-
- afterAll(async () => {
- try {
- await apiService.loginWithProfile('admin');
- await uploadActions.deleteFileOrFolder(folder.entry.id);
- await identityService.deleteIdentityUser(acsUser.email);
- } 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();
- });
-
- it('[C291936] Should be able to download a file', async () => {
- await contentListPage.selectRow(pngFileModel.name);
- await contentServicesPage.clickDownloadButton();
- await FileBrowserUtil.isFileDownloaded(pngFileModel.name);
- });
-
- it('[C291938] Should be able to open a document', async () => {
- await contentServicesPage.doubleClickRow(firstPdfFileModel.name);
- await viewerPage.checkFileIsLoaded();
- await viewerPage.checkFileNameIsDisplayed(firstPdfFileModel.name);
- await viewerPage.clickCloseButton();
- await contentListPage.waitForTableBody();
- });
-
- it('[C291942] Should be able to open an image', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.checkImgViewerIsDisplayed();
- await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
- await viewerPage.clickCloseButton();
- await contentListPage.waitForTableBody();
- });
-
- it('[C291941] Should be able to download multiple files', async () => {
- await contentServicesPage.clickMultiSelectToggle();
- await contentServicesPage.checkAcsContainer();
- await contentListPage.dataTablePage().checkAllRows();
- await contentListPage.dataTablePage().checkRowIsChecked('Display name', pngFileModel.name);
- await contentListPage.dataTablePage().checkRowIsChecked('Display name', firstPdfFileModel.name);
- await contentServicesPage.clickDownloadButton();
- await FileBrowserUtil.isFileDownloaded('archive.zip');
- });
- });
-});
diff --git a/e2e/content-services/document-list/document-list-component.e2e.ts b/e2e/content-services/document-list/document-list-component.e2e.ts
deleted file mode 100644
index f99b24edb6..0000000000
--- a/e2e/content-services/document-list/document-list-component.e2e.ts
+++ /dev/null
@@ -1,321 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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', () => {
- let uploadedFolder: NodeEntry;
- let uploadedFolderExtra: NodeEntry;
-
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
-
- const contentServicesPage = new ContentServicesPage();
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- const uploadActions = new UploadActions(apiService);
- let acsUser: UserModel = null;
- let testFileNode: NodeEntry;
- let pdfBFileNode: NodeEntry;
-
- afterEach(async () => {
- await apiService.loginWithProfile('admin');
- if (uploadedFolder) {
- await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
- uploadedFolder = null;
- }
- if (uploadedFolderExtra) {
- await uploadActions.deleteFileOrFolder(uploadedFolderExtra.entry.id);
- uploadedFolderExtra = null;
- }
- if (testFileNode) {
- await uploadActions.deleteFileOrFolder(testFileNode.entry.id);
- testFileNode = null;
- }
- if (pdfBFileNode) {
- await uploadActions.deleteFileOrFolder(pdfBFileNode.entry.id);
- pdfBFileNode = null;
- }
- });
-
- describe('Custom Column', () => {
- 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
- });
- const docxFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_path
- });
-
- let pdfUploadedNode: NodeEntry;
- let docxUploadedNode: NodeEntry;
- let timeAgoUploadedNode: NodeEntry;
- let mediumDateUploadedNode: NodeEntry;
-
- beforeAll(async () => {
- /* cspell:disable-next-line */
- folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
-
- await apiService.loginWithProfile('admin');
-
- acsUser = await usersActions.createUser();
-
- await apiService.login(acsUser.username, acsUser.password);
- uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
- pdfUploadedNode = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
- docxUploadedNode = await uploadActions.uploadFile(docxFileModel.location, docxFileModel.name, '-my-');
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
-
- if (pdfUploadedNode) {
- await uploadActions.deleteFileOrFolder(pdfUploadedNode.entry.id);
- }
- if (docxUploadedNode) {
- await uploadActions.deleteFileOrFolder(docxUploadedNode.entry.id);
- }
- if (timeAgoUploadedNode) {
- await uploadActions.deleteFileOrFolder(timeAgoUploadedNode.entry.id);
- }
- if (mediumDateUploadedNode) {
- await uploadActions.deleteFileOrFolder(mediumDateUploadedNode.entry.id);
- }
- });
-
- beforeEach(async () => {
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- afterEach(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C279926] Should only display the user files and folders', async () => {
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkContentIsDisplayed(folderName);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
- expect(await contentServicesPage.getDocumentListRowNumber()).toBe(4);
- });
-
- it('[C279927] Should display default columns', async () => {
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkColumnNameHeader();
- await contentServicesPage.checkColumnSizeHeader();
- await contentServicesPage.checkColumnCreatedByHeader();
- await contentServicesPage.checkColumnCreatedHeader();
- });
- });
-
- describe('Column Sorting', () => {
- const fakeFileA = new FileModel({
- name: 'A',
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
- });
-
- const fakeFileB = new FileModel({
- name: 'B',
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
- });
-
- const fakeFileC = new FileModel({
- name: 'C',
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
- });
-
- let fileANode: NodeEntry;
- let fileBNode: NodeEntry;
- let fileCNode: NodeEntry;
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- const user = await usersActions.createUser();
- await apiService.login(user.username, user.password);
-
- fileANode = await uploadActions.uploadFile(fakeFileA.location, fakeFileA.name, '-my-');
- fileBNode = await uploadActions.uploadFile(fakeFileB.location, fakeFileB.name, '-my-');
- fileCNode = await uploadActions.uploadFile(fakeFileC.location, fakeFileC.name, '-my-');
-
- await loginPage.login(user.username, user.password);
-
- await contentServicesPage.goToDocumentList();
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
-
- await apiService.loginWithProfile('admin');
- if (fileANode) {
- await uploadActions.deleteFileOrFolder(fileANode.entry.id);
- }
- if (fileBNode) {
- await uploadActions.deleteFileOrFolder(fileBNode.entry.id);
- }
- if (fileCNode) {
- await uploadActions.deleteFileOrFolder(fileCNode.entry.id);
- }
- });
-
- it('[C260112] Should be able to sort by name (Ascending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByName('asc')).toBe(true);
- });
-
- it('[C272770] Should be able to sort by name (Descending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByName('desc')).toBe(true);
- });
-
- it('[C272771] Should be able to sort by author (Ascending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc')).toBe(true);
- });
-
- it('[C272772] Should be able to sort by author (Descending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc')).toBe(true);
- });
-
- it('[C272773] Should be able to sort by date (Ascending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByCreated('asc')).toBe(true);
- });
-
- it('[C272774] Should be able to sort by date (Descending)', async () => {
- expect(await contentServicesPage.sortAndCheckListIsOrderedByCreated('desc')).toBe(true);
- });
- });
-
- describe('', () => {
- afterEach(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C279959] Should display empty folder state for new folders', async () => {
- const folderName = 'BANANA';
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
-
- await loginPage.login(acsUser.username, acsUser.password);
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.createNewFolder(folderName);
- await contentServicesPage.openFolder(folderName);
- await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
- await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
- });
-
- it('[C272775] Should be able to upload a file in new folder', async () => {
- const testFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_location
- });
- /* cspell:disable-next-line */
- const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
-
- await loginPage.login(acsUser.username, acsUser.password);
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
- await contentServicesPage.openFolder(uploadedFolder.entry.name);
- await contentServicesPage.uploadFile(testFile.location);
- await contentServicesPage.checkContentIsDisplayed(testFile.name);
- });
-
- it('[C279970] Should display Islocked field for folders', async () => {
- const folderNameA = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
- const folderNameB = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- uploadedFolder = await uploadActions.createFolder(folderNameA, '-my-');
- uploadedFolderExtra = await uploadActions.createFolder(folderNameB, '-my-');
-
- await loginPage.login(acsUser.username, acsUser.password);
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkContentIsDisplayed(folderNameA);
- await contentServicesPage.checkContentIsDisplayed(folderNameB);
- await contentServicesPage.checkLockIsDisplayedForElement(folderNameA);
- await contentServicesPage.checkLockIsDisplayedForElement(folderNameB);
- });
-
- it('[C269086] Should display IsLocked field for files', async () => {
- const testFileA = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
- });
- const testFileB = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
- });
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- testFileNode = await uploadActions.uploadFile(testFileA.location, testFileA.name, '-my-');
- pdfBFileNode = await uploadActions.uploadFile(testFileB.location, testFileB.name, '-my-');
-
- await loginPage.login(acsUser.username, acsUser.password);
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkContentIsDisplayed(testFileA.name);
- await contentServicesPage.checkContentIsDisplayed(testFileB.name);
- await contentServicesPage.checkLockIsDisplayedForElement(testFileA.name);
- await contentServicesPage.checkLockIsDisplayedForElement(testFileB.name);
- });
- });
-
- describe('Once uploaded 20 folders', () => {
- let folderCreated: NodeEntry[];
-
- beforeAll(async () => {
- folderCreated = [];
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- let folderName = '';
- let folder = null;
-
- for (let i = 0; i < 20; i++) {
- folderName = `MEESEEKS_000${i}`;
- folder = await uploadActions.createFolder(folderName, '-my-');
- folderCreated.push(folder);
- }
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- for (const item of folderCreated) {
- await uploadActions.deleteFileOrFolder(item.entry.id);
- }
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C277093] Should sort files with Items per page set to default', async () => {
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- await contentServicesPage.goToDocumentList();
- await contentServicesPage.checkListIsSortedByNameColumn('asc');
- });
- });
-});
diff --git a/e2e/content-services/document-list/document-list-pagination.e2e.ts b/e2e/content-services/document-list/document-list-pagination.e2e.ts
deleted file mode 100644
index cae62ec3df..0000000000
--- a/e2e/content-services/document-list/document-list-pagination.e2e.ts
+++ /dev/null
@@ -1,434 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- ArrayUtil,
- FileBrowserUtil,
- LocalStorageUtil,
- LoginPage,
- PaginationPage,
- StringUtil,
- UploadActions,
- 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 '../pages/upload-dialog.page';
-
-describe('Document List - Pagination', () => {
- const pagination = {
- base: 'newFile',
- secondSetBase: 'secondSet',
- extension: '.txt'
- };
-
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const paginationPage = new PaginationPage();
- const navigationBarPage = new NavigationBarPage();
- const uploadDialog = new UploadDialogPage();
-
- const newFolderModel = new FolderModel({ name: 'newFolder' });
-
- let acsUser: UserModel;
- let fileNames = [];
- let secondSetOfFiles = [];
-
- const nrOfFiles = 20;
- const numberOfFilesAfterUpload = 21;
- const secondSetNumber = 25;
- const folderTwoModel = new FolderModel({ name: 'folderTwo' });
- const folderThreeModel = new FolderModel({ name: 'folderThree' });
- const numberOfSubFolders = 6;
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const uploadActions = new UploadActions(apiService);
-
- const docxFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_location
- });
-
- beforeAll(async () => {
- fileNames = StringUtil.generateFilesNames(10, nrOfFiles + 9, pagination.base, pagination.extension);
- secondSetOfFiles = StringUtil.generateFilesNames(10, secondSetNumber + 9, pagination.secondSetBase, pagination.extension);
-
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
-
- const folderThreeUploadedModel = await uploadActions.createFolder(folderThreeModel.name, '-my-');
- const newFolderUploadedModel = await uploadActions.createFolder(newFolderModel.name, '-my-');
-
- await uploadActions.createEmptyFiles(fileNames, newFolderUploadedModel.entry.id);
- await uploadActions.createEmptyFiles(secondSetOfFiles, folderThreeUploadedModel.entry.id);
-
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- beforeEach(async () => {
- await contentServicesPage.goToDocumentList();
- });
-
- it('[C260062] Should use default pagination settings', async () => {
- await contentServicesPage.openFolder(newFolderModel.name);
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${nrOfFiles} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
- const list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames)).toEqual(true);
- await paginationPage.checkNextPageButtonIsDisabled();
- await paginationPage.checkPreviousPageButtonIsDisabled();
- });
-
- it('[C274713] Should be able to set Items per page to 20', async () => {
- await contentServicesPage.openFolder(newFolderModel.name);
- await paginationPage.selectItemsPerPage('20');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${nrOfFiles} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
- const list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames)).toEqual(true);
- await paginationPage.checkNextPageButtonIsDisabled();
- await paginationPage.checkPreviousPageButtonIsDisabled();
-
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
-
- await contentServicesPage.goToDocumentList();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
-
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- it('[C260069] Should be able to set Items per page to 5', async () => {
- let currentPage = 1;
- await contentServicesPage.openFolder(newFolderModel.name);
- await paginationPage.selectItemsPerPage('5');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${5 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(5);
- let list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
-
- await paginationPage.clickOnNextPage();
- currentPage++;
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${5 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(5);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true);
-
- await paginationPage.clickOnNextPage();
- currentPage++;
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${5 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(5);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true);
-
- await paginationPage.clickOnNextPage();
- currentPage++;
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${5 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(5);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
-
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- it('[C260067] Should be able to set Items per page to 10', async () => {
- let currentPage = 1;
- await contentServicesPage.openFolder(newFolderModel.name);
- await paginationPage.selectItemsPerPage('10');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('10');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${10 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(10);
- let list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 10))).toEqual(true);
- await paginationPage.clickOnNextPage();
- currentPage++;
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('10');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${10 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(10);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(10, 20))).toEqual(true);
-
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('10');
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- currentPage = 1;
- });
-
- it('[C260065] Should be able to set Items per page to 15', async () => {
- let currentPage = 1;
- await contentServicesPage.openFolder(newFolderModel.name);
- await paginationPage.selectItemsPerPage('15');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('15');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${15 * currentPage} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(15);
- let list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 15))).toEqual(true);
- currentPage++;
- await paginationPage.clickOnNextPage();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('15');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${nrOfFiles} of ${nrOfFiles}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles - 15);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
-
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('15');
- });
-
- it('[C91320] Pagination should preserve sorting', async () => {
- await contentServicesPage.openFolder(newFolderModel.name);
-
- await paginationPage.selectItemsPerPage('20');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('ASC', 'Display name'));
-
- await contentServicesPage.sortByName('DESC');
- expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
-
- await paginationPage.selectItemsPerPage('5');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
-
- await paginationPage.clickOnNextPage();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
-
- await paginationPage.selectItemsPerPage('10');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
- });
-
- it('[C260107] Should not display pagination bar when a folder is empty', async () => {
- await paginationPage.selectItemsPerPage('5');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
- await contentServicesPage.openFolder(newFolderModel.name);
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
-
- await contentServicesPage.createAndOpenNewFolder(folderTwoModel.name);
- await contentServicesPage.checkPaginationIsNotDisplayed();
- await contentServicesPage.deleteSubFolderUnderRoot(newFolderModel.name, folderTwoModel.name);
- });
-
- it('[C260071] Should be able to change pagination when having 25 files', async () => {
- let currentPage = 1;
- await contentServicesPage.openFolder(folderThreeModel.name);
- await paginationPage.selectItemsPerPage('15');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('15');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${15 * currentPage} of ${secondSetNumber}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(15);
- let list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, secondSetOfFiles.slice(0, 15))).toEqual(true);
-
- currentPage++;
- await paginationPage.clickOnNextPage();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('15');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${secondSetNumber} of ${secondSetNumber}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - 15);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, secondSetOfFiles.slice(15, 25))).toEqual(true);
-
- currentPage = 1;
- await paginationPage.selectItemsPerPage('20');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${20 * currentPage} of ${secondSetNumber}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(20);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, secondSetOfFiles.slice(0, 20))).toEqual(true);
-
- currentPage++;
- await paginationPage.clickOnNextPage();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 21-${secondSetNumber} of ${secondSetNumber}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - 20);
- list = await contentServicesPage.getAllRowsNameColumn();
- expect(ArrayUtil.arrayContainsArray(list, secondSetOfFiles.slice(20, 25))).toEqual(true);
- });
-
- it('[C216321] Should be able to modify the supported page size value', async () => {
- await paginationPage.clickItemsPerPageDropdown();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']);
-
- await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 21]));
- await contentServicesPage.goToDocumentList();
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- await contentServicesPage.openFolder(newFolderModel.name);
- await contentServicesPage.uploadFile(docxFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await paginationPage.clickItemsPerPageDropdown();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '21']);
-
- await paginationPage.clickItemsPerPageDropdown();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- await paginationPage.selectItemsPerPage('21');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('21');
- await browser.refresh();
-
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-21 of ${numberOfFilesAfterUpload}`);
- expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(21);
-
- await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 20]));
- await browser.refresh();
-
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- await paginationPage.clickItemsPerPageDropdown();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']);
- });
-
- it('[C272767] Should propagate the option chosen regarding displaying items per page to files/folders inside a folder', async () => {
- await paginationPage.selectItemsPerPage('5');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- await contentServicesPage.openFolder(newFolderModel.name);
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
-
- await apiService.login(acsUser.username, acsUser.password);
- await contentServicesPage.createNewFolder(folderTwoModel.name);
- const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id');
- await contentServicesPage.openFolder(folderTwoModel.name);
-
- for (let i = 0; i < numberOfSubFolders; i++) {
- await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolderTwo);
- }
-
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-5 of ${numberOfSubFolders}`);
-
- await paginationPage.clickOnNextPage();
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${numberOfSubFolders} of ${numberOfSubFolders}`);
- const nodeIdSubFolder6 = await contentServicesPage.getAttributeValueForElement('subfolder6', 'Node id');
-
- for (let i = 0; i < numberOfSubFolders; i++) {
- await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolder6);
- }
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-5 of ${numberOfSubFolders}`);
- expect(await paginationPage.getCurrentPage()).toEqual('Page 1');
- expect(await paginationPage.getTotalPages()).toEqual('of 2');
-
- await contentServicesPage.deleteSubFolderUnderRoot(newFolderModel.name, folderTwoModel.name);
- });
-
- it('[C260064] Should download only the last selection when changing pages in Single mode', async () => {
- await paginationPage.selectItemsPerPage('5');
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- await contentServicesPage.openFolder(newFolderModel.name);
- expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
-
- await contentServicesPage.createNewFolder(folderTwoModel.name);
- const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id');
- await contentServicesPage.openFolder(folderTwoModel.name);
-
- await apiService.login(acsUser.username, acsUser.password);
-
- for (let i = 0; i < numberOfSubFolders; i++) {
- await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolderTwo);
- }
-
- await browser.refresh();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
-
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-5 of ${numberOfSubFolders}`);
-
- await contentServicesPage.chooseSelectionMode('Single');
-
- await contentServicesPage.selectFolder('subfolder1');
- await paginationPage.clickOnNextPage();
- expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${numberOfSubFolders} of ${numberOfSubFolders}`);
- await contentServicesPage.selectFolderWithCommandKey('subfolder6');
- await contentServicesPage.clickDownloadButton();
-
- await FileBrowserUtil.isFileDownloaded('subfolder6.zip');
-
- await contentServicesPage.deleteSubFolderUnderRoot(newFolderModel.name, folderTwoModel.name);
- });
-});
diff --git a/e2e/content-services/metadata/metadata-content-type.e2e.ts b/e2e/content-services/metadata/metadata-content-type.e2e.ts
deleted file mode 100644
index efd25ce601..0000000000
--- a/e2e/content-services/metadata/metadata-content-type.e2e.ts
+++ /dev/null
@@ -1,195 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- BrowserActions,
- LoginPage,
- ModelActions,
- StringUtil,
- UploadActions,
- UserModel,
- UsersActions,
- ViewerPage,
- Logger
-} from '@alfresco/adf-testing';
-import { CustomModel, CustomType } from '@alfresco/js-api';
-import { FileModel } from '../../models/ACS/file.model';
-import { browser } from 'protractor';
-import { MetadataViewPage } from '../../core/pages/metadata-view.page';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-
-describe('content type', () => {
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const modelActions = new ModelActions(apiService);
- const uploadActions = new UploadActions(apiService);
-
- const viewerPage = new ViewerPage();
- const metadataViewPage = new MetadataViewPage();
- const navigationBarPage = new NavigationBarPage();
- const contentServicesPage = new ContentServicesPage();
- const loginPage = new LoginPage();
- const randomString = StringUtil.generateRandomString();
-
- const model: CustomModel = {
- name: `test-${randomString}`,
- namespaceUri: `http://www.customModel.com/model/${randomString}/1.0`,
- namespacePrefix: `e2e-${randomString}`,
- author: 'E2e Automation User',
- description: 'Custom type e2e model',
- status: 'DRAFT'
- };
- const type: CustomType = { name: `test-type-${randomString}`, parentName: 'cm:content', title: `Test type - ${randomString}` };
- const property = {
- name: `test-property-${randomString}`,
- title: `Test property - ${randomString}`,
- dataType: 'd:text',
- defaultValue: randomString
- };
- const pdfFile = new FileModel({ name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name });
- const docxFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
- });
- let acsUser: UserModel;
-
- beforeAll(async () => {
- try {
- await apiService.loginWithProfile('admin');
- await modelActions.createModel(model);
- await modelActions.createType(model.name, type);
- await modelActions.addPropertyToType(model.name, type.name, [property]);
- await modelActions.activateCustomModel(model.name);
- await modelActions.isCustomTypeSearchable(type.title);
-
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
-
- const filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
- pdfFile.id = filePdfNode.entry.id;
- const docsNode = await uploadActions.uploadFile(docxFileModel.location, docxFileModel.name, '-my-');
- docxFileModel.id = docsNode.entry.id;
- } catch (e) {
- fail('Failed to setup custom types :: ' + JSON.stringify(e, null, 2));
- }
- });
-
- afterAll(async () => {
- await apiService.login(acsUser.username, acsUser.password);
- await uploadActions.deleteFileOrFolder(pdfFile.id);
- await uploadActions.deleteFileOrFolder(docxFileModel.id);
- try {
- await apiService.loginWithProfile('admin');
- await modelActions.deactivateCustomModel(model.name);
- await modelActions.deleteCustomModel(model.name);
- } catch (e) {
- Logger.error('failed to delete the model {e}');
- }
- });
-
- beforeEach(async () => {
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- });
-
- afterEach(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C593560] Should the user be able to select a new content type and save it only after the confirmation dialog', async () => {
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`);
- await viewerPage.checkFileIsLoaded(pdfFile.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
- const defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
- expect(defaultType).toBe(true);
-
- await metadataViewPage.clickEditIconGeneral();
-
- expect(await metadataViewPage.changeContentType(type.title)).toBe(true, 'Failed to update node type.');
- await metadataViewPage.clickSaveGeneralMetadata();
- await metadataViewPage.checkConfirmDialogDisplayed();
- await metadataViewPage.applyNodeProperties();
-
- expect(await metadataViewPage.checkPropertyDisplayed(`properties.${model.namespacePrefix}:${property.name}`)).toContain(
- property.defaultValue
- );
-
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`);
- await viewerPage.checkFileIsLoaded(pdfFile.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
- const customType =
- (await metadataViewPage.hasContentType(type.title)) || (await metadataViewPage.hasContentType(`${model.namespacePrefix}:${type.name}`));
- expect(customType).toBe(true);
- expect(await metadataViewPage.getPropertyText(`properties.${model.namespacePrefix}:${property.name}`)).toContain(property.defaultValue);
-
- await viewerPage.clickCloseButton();
- });
-
- it('[C593559] Should the user be able to select a new content type and not save it when press cancel in the confirmation dialog', async () => {
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`);
- await viewerPage.checkFileIsLoaded(docxFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
- let defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
- expect(defaultType).toBe(true);
-
- await metadataViewPage.clickEditIconGeneral();
-
- expect(await metadataViewPage.changeContentType(type.title)).toBe(true);
- await metadataViewPage.clickSaveGeneralMetadata();
-
- await metadataViewPage.checkConfirmDialogDisplayed();
- await metadataViewPage.cancelNodeProperties();
-
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`);
- await viewerPage.checkFileIsLoaded(docxFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
- defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
- expect(defaultType).toBe(true);
- await viewerPage.clickCloseButton();
- });
-});
diff --git a/e2e/content-services/metadata/metadata-permissions.e2e.ts b/e2e/content-services/metadata/metadata-permissions.e2e.ts
deleted file mode 100644
index 0b7799dd47..0000000000
--- a/e2e/content-services/metadata/metadata-permissions.e2e.ts
+++ /dev/null
@@ -1,136 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, StringUtil, 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 CONSTANTS = require('../../util/constants');
-import { SitesApi } from '@alfresco/js-api';
-
-describe('permissions', () => {
- const loginPage = new LoginPage();
- const viewerPage = new ViewerPage();
- const metadataViewPage = new MetadataViewPage();
- const navigationBarPage = new NavigationBarPage();
-
- const consumerUser = new UserModel();
- const collaboratorUser = new UserModel();
- const contributorUser = new UserModel();
- let site;
-
- const pngFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
- });
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- const uploadActions = new UploadActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- await usersActions.createUser(consumerUser);
- await usersActions.createUser(collaboratorUser);
- await usersActions.createUser(contributorUser);
-
- const sitesApi = new SitesApi(apiService.getInstance());
-
- site = await sitesApi.createSite({
- title: StringUtil.generateRandomString(),
- visibility: 'PUBLIC'
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: consumerUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONSUMER
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: collaboratorUser.username,
- role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: contributorUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
- });
-
- await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
-
- const sitesApi = new SitesApi(apiService.getInstance());
- await sitesApi.deleteSite(site.entry.id, { permanent: true });
- });
-
- afterEach(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C274692] Should not be possible edit metadata properties when the user is a consumer user', async () => {
- await loginPage.login(consumerUser.username, consumerUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
-
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.editIconIsNotDisplayed();
- });
-
- it('[C279971] Should be possible edit metadata properties when the user is a collaborator user', async () => {
- await loginPage.login(collaboratorUser.username, collaboratorUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
-
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.editIconIsDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
-
- await metadataViewPage.clickMetadataGroup('EXIF');
-
- await metadataViewPage.editIconIsDisplayed();
- });
-
- it('[C279972] Should be possible edit metadata properties when the user is a contributor user', async () => {
- await loginPage.login(collaboratorUser.username, collaboratorUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
-
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.editIconIsDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual('Properties');
-
- await metadataViewPage.clickMetadataGroup('EXIF');
-
- await metadataViewPage.editIconIsDisplayed();
- });
-});
diff --git a/e2e/content-services/metadata/metadata-properties.e2e.ts b/e2e/content-services/metadata/metadata-properties.e2e.ts
deleted file mode 100644
index 1296018aea..0000000000
--- a/e2e/content-services/metadata/metadata-properties.e2e.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- LoginPage,
- UploadActions,
- UserModel,
- UsersActions,
- ViewerPage,
- TogglePage
-} from '@alfresco/adf-testing';
-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 { ContentServicesPage } from '../../core/pages/content-services.page';
-
-describe('CardView Component - properties', () => {
- const METADATA = {
- DATA_FORMAT: 'mmm dd yyyy',
- TITLE: 'Details',
- COMMENTS_TAB: 'Comments',
- PROPERTY_TAB: 'Properties',
- DEFAULT_ASPECT: 'Properties',
- EDIT_BUTTON_TOOLTIP: 'Edit'
- };
-
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
- const viewerPage = new ViewerPage();
- const metadataViewPage = new MetadataViewPage();
- const contentServicesPage = new ContentServicesPage();
- const togglePage = new TogglePage();
-
- 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
- });
- const apiService = createApiService();
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
-
- const pdfUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
-
- Object.assign(pngFileModel, pdfUploadedFile.entry);
-
- pngFileModel.update(pdfUploadedFile.entry);
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- });
-
- afterEach(async () => {
- await viewerPage.clickCloseButton();
- });
-
- it('[C246516] Should show/hide the empty metadata when the property displayEmpty is true/false', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.editIconIsDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
-
- await metadataViewPage.clickMetadataGroup('EXIF');
-
- await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
- await metadataViewPage.checkPropertyIsNotVisible('properties.exif:model', 'textitem');
-
- await CheckboxPage.check(metadataViewPage.displayEmptySwitch);
-
- await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
- await metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
- });
-
- it('[C260179] Should not be possible edit the basic property when readOnly is true', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- await CheckboxPage.check(metadataViewPage.readonlySwitch);
- });
-
- it('[C268965] Should multi property allow expand multi accordion at the same time when set', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- await metadataViewPage.checkMetadataGroupIsExpand('properties');
- await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
-
- await metadataViewPage.clickMetadataGroup('EXIF');
-
- await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
- await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
-
- await CheckboxPage.check(metadataViewPage.multiSwitch);
-
- await metadataViewPage.clickMetadataGroup('properties');
-
- await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
- await metadataViewPage.checkMetadataGroupIsExpand('properties');
- });
-
- it('[C280559] Should show/hide the default metadata properties when displayDefaultProperties is true/false', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- await togglePage.disableToggle(metadataViewPage.defaultPropertiesSwitch);
-
- await metadataViewPage.checkMetadataGroupIsNotPresent('properties');
- await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
- await metadataViewPage.checkMetadataGroupIsExpand('Versionable');
-
- await togglePage.enableToggle(metadataViewPage.defaultPropertiesSwitch);
-
- await metadataViewPage.checkMetadataGroupIsPresent('properties');
- await metadataViewPage.checkMetadataGroupIsExpand('properties');
- });
-
- it('[C280560] Should show/hide the more properties button when displayDefaultProperties is true/false', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- await metadataViewPage.checkMetadataGroupIsPresent('properties');
-
- await togglePage.disableToggle(metadataViewPage.defaultPropertiesSwitch);
-
- await metadataViewPage.checkMetadataGroupIsNotPresent('properties');
- });
-
- it('[C307975] Should be able to choose which aspect to show expanded in the info-drawer', async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- await metadataViewPage.typeAspectName('EXIF');
- await metadataViewPage.clickApplyAspect();
-
- await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
- await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
- await CheckboxPage.check(metadataViewPage.displayEmptySwitch);
-
- await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
- await metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
-
- await metadataViewPage.typeAspectName('nonexistent');
- await metadataViewPage.clickApplyAspect();
- await metadataViewPage.checkMetadataGroupIsNotPresent('nonexistent');
-
- await metadataViewPage.typeAspectName('Properties');
- await metadataViewPage.clickApplyAspect();
- await metadataViewPage.checkMetadataGroupIsPresent('properties');
- await metadataViewPage.checkMetadataGroupIsExpand('properties');
- });
-});
diff --git a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts b/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts
deleted file mode 100644
index 8116525b47..0000000000
--- a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts
+++ /dev/null
@@ -1,237 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- BrowserActions,
- LocalStorageUtil,
- LoginPage,
- UploadActions,
- UserModel,
- UsersActions,
- ViewerPage
-} from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-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 { format } from 'date-fns';
-
-describe('Metadata component', () => {
- const METADATA = {
- DATA_FORMAT: 'PP',
- TITLE: 'Details',
- COMMENTS_TAB: 'Comments',
- PROPERTY_TAB: 'Properties',
- DEFAULT_ASPECT: 'General info'
- };
-
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const viewerPage = new ViewerPage();
- const metadataViewPage = new MetadataViewPage();
- const navigationBarPage = new NavigationBarPage();
-
- 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
- });
-
- const apiService = createApiService();
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
- Object.assign(pngFileModel, pngUploadedFile.entry);
- pngFileModel.update(pngUploadedFile.entry);
- });
-
- describe('Viewer Metadata', () => {
- beforeAll(async () => {
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- await LocalStorageUtil.setConfigField(
- 'content-metadata',
- JSON.stringify({
- presets: {
- default: {
- 'exif:exif': '*'
- }
- }
- })
- );
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- beforeEach(async () => {
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.checkFileIsLoaded();
- });
-
- afterEach(async () => {
- await viewerPage.clickCloseButton();
- await contentServicesPage.waitForTableBody();
- });
-
- it('[C245652] Should be possible to display a file properties', async () => {
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- 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());
- });
-
- it('[C270952] Should be possible to open/close properties using info icon', async () => {
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsNotDisplayed();
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.COMMENTS_TAB);
- await metadataViewPage.clickOnPropertiesTab();
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
- });
-
- it('[C245654] Should be possible edit the basic Metadata Info of a Document', async () => {
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
-
- await metadataViewPage.clickEditIconGeneral();
-
- await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText');
- await metadataViewPage.clickResetMetadata();
- expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
-
- await metadataViewPage.clickEditIconGeneral();
- await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText.png');
- await metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
- await metadataViewPage.enterDescriptionText('example description');
- await metadataViewPage.clickSaveGeneralMetadata();
-
- expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual('exampleText.png');
- expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
- expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
-
- await viewerPage.clickCloseButton();
- await contentServicesPage.waitForTableBody();
-
- await viewerPage.viewFile('exampleText.png');
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual('exampleText.png');
- expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
-
- await metadataViewPage.clickEditIconGeneral();
- await metadataViewPage.enterPropertyText('properties.cm:name', browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
- expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
- await metadataViewPage.clickSaveGeneralMetadata();
- });
-
- it('[C260181] Should be possible edit all the metadata aspect', async () => {
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
- await metadataViewPage.clickMetadataGroupEditIcon('EXIF');
-
- await metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software');
- await metadataViewPage.enterPropertyText('properties.exif:isoSpeedRatings', 'test custom text isoSpeedRatings');
- await metadataViewPage.enterPropertyText('properties.exif:fNumber', 22);
- await metadataViewPage.clickSaveMetadata();
-
- expect(await metadataViewPage.getPropertyText('properties.exif:isoSpeedRatings')).toEqual('test custom text isoSpeedRatings');
- expect(await metadataViewPage.getPropertyText('properties.exif:software')).toEqual('test custom text software');
- expect(await metadataViewPage.getPropertyText('properties.exif:fNumber')).toEqual('22');
- });
- });
-
- it('[C279960] Should show the last username modifier when modify a File', async () => {
- await loginPage.loginWithProfile('admin');
-
- await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pngFileModel.id}/view)`);
-
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
- await metadataViewPage.isEditGeneralIconDisplayed();
-
- expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
-
- await metadataViewPage.clickEditIconGeneral();
-
- await metadataViewPage.enterDescriptionText('check author example description');
- await metadataViewPage.clickSaveGeneralMetadata();
- expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
-
- await navigationBarPage.clickLogoutButton();
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
-
- await viewerPage.viewFile(pngFileModel.name);
- await viewerPage.checkFileIsLoaded();
-
- await viewerPage.clickInfoButton();
- await viewerPage.checkInfoSideBarIsDisplayed();
- await metadataViewPage.clickOnPropertiesTab();
-
- expect(await metadataViewPage.getPropertyText('modifiedByUser.displayName')).toEqual('Administrator');
-
- await viewerPage.clickCloseButton();
- await contentServicesPage.waitForTableBody();
- });
-});
diff --git a/e2e/content-services/pages/upload-dialog.page.ts b/e2e/content-services/pages/upload-dialog.page.ts
deleted file mode 100644
index f753da1fd0..0000000000
--- a/e2e/content-services/pages/upload-dialog.page.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { by, browser, ElementFinder, $, $$ } from 'protractor';
-import { BrowserVisibility, BrowserActions, materialLocators } from '@alfresco/adf-testing';
-
-export class UploadDialogPage {
- closeButton = $('#adf-upload-dialog-close');
- dialog = $('div[id="upload-dialog"]');
- minimizedDialog = $('div[class*="upload-dialog--minimized"]');
- uploadedStatusIcon = '.adf-file-uploading-row__status--done';
- cancelledStatusIcon = 'div[class*="status--cancelled"]';
- errorStatusIcon = `div[class*="status--error"] ${materialLocators.Icon.root}`;
- rowByRowName = by.xpath('ancestor::adf-file-uploading-list-row');
- title = $('span[class*="upload-dialog__title"]');
- toggleMinimizeButton = $(`[data-automation-id='adf-upload-dialog__toggle-minimize']`);
-
- async clickOnCloseButton(): Promise {
- await this.checkCloseButtonIsDisplayed();
- await BrowserActions.click(this.closeButton);
- }
-
- async checkCloseButtonIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.closeButton);
- }
-
- async dialogIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
- }
-
- async dialogIsMinimized(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.minimizedDialog);
- }
-
- async dialogIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.dialog);
- }
-
- async getRowByRowName(content: string): Promise {
- const row = await $$(`div[class*='uploading-row'] span[title="${content}"]`).last();
- await BrowserVisibility.waitUntilElementIsVisible(row);
- return row.element(this.rowByRowName);
- }
-
- async fileIsUploaded(content: string): Promise {
- const row: ElementFinder = await this.getRowByRowName(content);
- await BrowserVisibility.waitUntilElementIsVisible(row.$(this.uploadedStatusIcon), 10000);
- }
-
- async fileIsError(content: string) {
- const row: ElementFinder = await this.getRowByRowName(content);
- await BrowserVisibility.waitUntilElementIsVisible(row.$(this.errorStatusIcon));
- }
-
- async filesAreUploaded(content: string[]): Promise {
- for (const item of content) {
- await this.fileIsUploaded(item);
- }
- }
-
- async fileIsNotDisplayedInDialog(content: string): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible($(`div[class*='uploading-row'] span[title="${content}"]`));
- }
-
- async fileIsCancelled(content: string): Promise {
- const row: ElementFinder = await this.getRowByRowName(content);
- await BrowserVisibility.waitUntilElementIsVisible(row);
- await BrowserVisibility.waitUntilElementIsVisible(row.$(this.cancelledStatusIcon), 10000);
- }
-
- async removeUploadedFile(content: string): Promise {
- const row: ElementFinder = await this.getRowByRowName(content);
- await BrowserVisibility.waitUntilElementIsVisible(row.$(this.uploadedStatusIcon));
- const elementRow = await this.getRowByRowName(content);
- await BrowserActions.click(elementRow.$(this.uploadedStatusIcon));
- }
-
- async getTitleText(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.title);
- return this.title.getText();
- }
-
- async numberOfCurrentFilesUploaded(): Promise {
- const text = await this.getTitleText();
- return text.split('Uploaded ')[1].split(' / ')[0];
- }
-
- async numberOfInitialFilesUploaded(): Promise {
- const text = await this.getTitleText();
- return text.split('Uploaded ')[1].split(' / ')[1];
- }
-
- async minimizeUploadDialog(): Promise {
- await BrowserActions.click(this.toggleMinimizeButton);
- }
-
- async maximizeUploadDialog(): Promise {
- await BrowserActions.click(this.toggleMinimizeButton);
- }
-
- async displayTooltip(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible($(this.errorStatusIcon));
- await browser.actions().mouseMove($(this.errorStatusIcon)).perform();
- }
-
- async getTooltip(): Promise {
- return BrowserActions.getAttribute($(this.errorStatusIcon), 'title');
- }
-}
diff --git a/e2e/content-services/pages/version-manager.page.ts b/e2e/content-services/pages/version-manager.page.ts
deleted file mode 100644
index c0fd4131e8..0000000000
--- a/e2e/content-services/pages/version-manager.page.ts
+++ /dev/null
@@ -1,165 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 * as path from 'path';
-import { BrowserActions, TestElement, TogglePage, materialLocators } from '@alfresco/adf-testing';
-import { $, browser } from 'protractor';
-
-export class VersionManagePage {
-
- togglePage = new TogglePage();
-
- showNewVersionButton = TestElement.byId('adf-show-version-upload-button');
- uploadNewVersionInput = TestElement.byCss('.adf-upload-version-button input[data-automation-id="upload-single-file"]');
- uploadNewVersionButton = TestElement.byCss('.adf-upload-version-button');
- uploadNewVersionContainer = TestElement.byId('adf-new-version-uploader-container');
- cancelButton = TestElement.byId('adf-new-version-cancel');
- majorRadio = TestElement.byId('adf-new-version-major');
- minorRadio = TestElement.byId('adf-new-version-minor');
- commentText = TestElement.byId('adf-new-version-text-area');
- readOnlySwitch = $('#adf-version-manager-switch-readonly');
- downloadSwitch = $('#adf-version-manager-switch-download');
- commentsSwitch = $('#adf-version-manager-switch-comments');
- confirmAccept = TestElement.byId('adf-confirm-accept');
- confirmCancel = TestElement.byId('adf-confirm-cancel');
-
- async uploadNewVersionFile(fileLocation: string): Promise {
- const filePath = path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation));
-
- await this.uploadNewVersionInput.waitPresent();
- await this.uploadNewVersionInput.elementFinder.sendKeys(filePath);
- await this.showNewVersionButton.waitVisible();
- }
-
- getFileVersionName(version: string): Promise {
- return TestElement.byCss(`[id="adf-version-list-item-name-${version}"]`).getText();
- }
-
- checkFileVersionExist(version: string): Promise {
- return TestElement.byId(`adf-version-list-item-version-${version}`).waitVisible();
- }
-
- checkFileVersionNotExist(version: string): Promise {
- return TestElement.byId(`adf-version-list-item-version-${version}`).waitNotVisible();
- }
-
- getFileVersionComment(version: string): Promise {
- return TestElement.byId(`adf-version-list-item-comment-${version}`).getText();
- }
-
- getFileVersionDate(version: string): Promise {
- return TestElement.byId(`adf-version-list-item-date-${version}`).getText();
- }
-
- /**
- * disables readOnly
- */
- async disableReadOnly(): Promise {
- await this.togglePage.disableToggle(this.readOnlySwitch);
- }
-
- /**
- * enables readOnly
- */
- async enableReadOnly(): Promise {
- await this.togglePage.enableToggle(this.readOnlySwitch);
- }
-
- /**
- * disables download
- */
- async disableDownload(): Promise {
- await this.togglePage.disableToggle(this.downloadSwitch);
- }
-
- /**
- * enables download
- */
- async enableDownload(): Promise {
- await this.togglePage.enableToggle(this.downloadSwitch);
- }
-
- /**
- *
- * disables comments
- */
- async disableComments(): Promise {
- await this.togglePage.disableToggle(this.commentsSwitch);
- }
-
- /**
- * enables comments
- */
- async enableComments(): Promise {
- await this.togglePage.enableToggle(this.commentsSwitch);
- }
-
- async clickActionButton(version: string): Promise {
- await TestElement.byId(`adf-version-list-action-menu-button-${version}`).click();
- await TestElement.byCss(`.cdk-overlay-container ${materialLocators.Menu.content.class}`).waitVisible();
- }
-
- async closeActionsMenu(): Promise {
- await BrowserActions.closeMenuAndDialogs();
- }
-
- async closeDisabledActionsMenu(): Promise {
- const container = TestElement.byCss('div.cdk-overlay-backdrop.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing');
- await BrowserActions.closeDisabledMenu();
- await container.waitNotVisible();
- }
-
- async downloadFileVersion(version: string): Promise {
- await this.clickActionButton(version);
-
- const downloadButton = TestElement.byId(`adf-version-list-action-download-${version}`);
- await downloadButton.click();
- await downloadButton.waitNotVisible();
- }
-
- async deleteFileVersion(version: string): Promise {
- await this.clickActionButton(version);
-
- const deleteButton = TestElement.byId(`adf-version-list-action-delete-${version}`);
- await deleteButton.click();
- }
-
- async restoreFileVersion(version: string): Promise {
- await this.clickActionButton(version);
-
- const restoreButton = TestElement.byId(`adf-version-list-action-restore-${version}`);
- await restoreButton.click();
- }
-
- async viewFileVersion(version): Promise {
- await this.clickActionButton(version);
-
- const viewButton = TestElement.byId(`adf-version-list-action-view-${version}`);
- await viewButton.click();
- }
-
- async checkActionsArePresent(version: string): Promise {
- await TestElement.byId(`adf-version-list-action-download-${version}`).waitVisible();
- await TestElement.byId(`adf-version-list-action-delete-${version}`).waitVisible();
- await TestElement.byId(`adf-version-list-action-restore-${version}`).waitVisible();
- }
-
- async closeVersionDialog(): Promise {
- await BrowserActions.closeMenuAndDialogs();
- await this.uploadNewVersionContainer.waitNotVisible();
- }
-}
diff --git a/e2e/content-services/upload/cancel-upload.e2e.ts b/e2e/content-services/upload/cancel-upload.e2e.ts
deleted file mode 100644
index db3f0fd078..0000000000
--- a/e2e/content-services/upload/cancel-upload.e2e.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
-import { FileModel } from '../../models/ACS/file.model';
-
-describe('Upload component', async () => {
- const apiService = createApiService();
- const contentServicesPage = new ContentServicesPage();
- const uploadDialog = new UploadDialogPage();
- const uploadToggles = new UploadTogglesPage();
- const loginPage = new LoginPage();
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- let acsUser: UserModel;
-
- const pngFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
- });
-
- const mediumFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.MEDIUM_FILE.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.MEDIUM_FILE.file_location
- });
-
- const largeFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_location
- });
-
- beforeAll(async () => {
- 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();
- });
-
- const deleteNodesInCurrentPage = async () => {
- const nodeList = await contentServicesPage.getElementsDisplayedId();
-
- for (const node of nodeList) {
- try {
- await uploadActions.deleteFileOrFolder(node);
- } catch (error) {}
- }
- };
-
- it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', async () => {
- await browser.executeScript(`setInterval(() => {document.querySelector('div[data-automation-id="cancel-upload-progress"]').click();}, 500)`);
-
- await contentServicesPage.uploadFile(mediumFile.location);
-
- expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.checkContentIsNotDisplayed(mediumFile.name);
- });
-
- it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', async () => {
- await browser.executeScript(
- ' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
- 'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)'
- );
-
- await contentServicesPage.uploadFile(largeFile.location);
- expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
- });
-
- it('[C272793] Should be able to cancel multiple files upload', async () => {
- await uploadToggles.enableMultipleFileUpload();
-
- await browser.executeScript(
- ' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
- 'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)'
- );
-
- await contentServicesPage.uploadMultipleFile([mediumFile.location, largeFile.location]);
-
- expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.checkContentIsNotDisplayed(mediumFile.name);
- await contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
- await uploadToggles.disableMultipleFileUpload();
- });
-
- it('[C315257] Should be able to cancel file in upload queue', async () => {
- await uploadToggles.enableMultipleFileUpload();
-
- await browser.executeScript(`setInterval(() => {document.querySelector('button[data-automation-id="cancel-upload-queue"]').click();}, 500)`);
-
- await contentServicesPage.uploadMultipleFile([mediumFile.location, pngFile.location]);
- await uploadDialog.fileIsCancelled(pngFile.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await uploadToggles.disableMultipleFileUpload();
- await deleteNodesInCurrentPage();
- });
-});
diff --git a/e2e/content-services/upload/excluded-file.e2e.ts b/e2e/content-services/upload/excluded-file.e2e.ts
deleted file mode 100644
index 413296e59b..0000000000
--- a/e2e/content-services/upload/excluded-file.e2e.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, by, element } from 'protractor';
-import { createApiService,
- DropActions,
- LocalStorageUtil,
- LoginPage,
- UserModel,
- UsersActions
-} from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { FolderModel } from '../../models/ACS/folder.model';
-
-describe('Upload component - Excluded Files', () => {
-
- const contentServicesPage = new ContentServicesPage();
- const uploadDialog = new UploadDialogPage();
- const uploadToggles = new UploadTogglesPage();
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- let acsUser: UserModel;
-
- const iniExcludedFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.INI.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.INI.file_location
- });
-
- const txtFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
- });
-
- const pngFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
- });
-
- const folderUpload = new FolderModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
- });
-
- const acceptedFileInsideFolder = new FolderModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_ACCEPTED_INSIDE_TEXT_FOLDER.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_ACCEPTED_INSIDE_TEXT_FOLDER.file_location
- });
-
- const excludedFileInsideFolder = new FolderModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_EXCLUDED_INSIDE_TEXT_FOLDER.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_EXCLUDED_INSIDE_TEXT_FOLDER.file_location
- });
-
- beforeAll(async () => {
- 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();
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- afterEach(async () => {
- await contentServicesPage.goToDocumentList();
- });
-
- it('[C279914] Should not allow upload default excluded files using D&D', async () => {
- await contentServicesPage.checkDragAndDropDIsDisplayed();
-
- const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
-
- await DropActions.dropFile(dragAndDropArea, iniExcludedFile.location);
-
- await browser.sleep(5000);
-
- await uploadDialog.dialogIsNotDisplayed();
-
- await contentServicesPage.checkContentIsNotDisplayed(iniExcludedFile.name);
- });
-
- it('[C260122] Should not allow upload default excluded files using Upload button', async () => {
- await contentServicesPage.uploadFile(iniExcludedFile.location);
- await contentServicesPage.checkContentIsNotDisplayed(iniExcludedFile.name);
- });
-
- it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
- await LocalStorageUtil.setConfigField('files', JSON.stringify({
- excluded: ['.DS_Store', 'desktop.ini', '*.txt'],
- 'match-options': { nocase: true }
- }));
-
- await contentServicesPage.goToDocumentList();
-
- await contentServicesPage
- .uploadFile(txtFileModel.location);
-
- await contentServicesPage.checkContentIsNotDisplayed(txtFileModel.name);
- });
-
- it('[C260125] Should not upload excluded file when they are in a Folder', async () => {
- await LocalStorageUtil.setConfigField('files', JSON.stringify({
- excluded: ['*.cpio'],
- 'match-options': { nocase: true }
- }));
-
- await uploadToggles.enableFolderUpload();
- await contentServicesPage.uploadFolder(folderUpload.location);
-
- await contentServicesPage.checkContentIsDisplayed(folderUpload.name);
-
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await contentServicesPage.openFolder(folderUpload.name);
- await contentServicesPage.checkContentIsDisplayed(acceptedFileInsideFolder.name);
- await contentServicesPage.checkContentIsNotDisplayed(excludedFileInsideFolder.name);
- });
-
- it('[C274688] Should extension type added as excluded and accepted not be uploaded', async () => {
- await LocalStorageUtil.setConfigField('files', JSON.stringify({
- excluded: ['.DS_Store', 'desktop.ini', '*.png'],
- 'match-options': { nocase: true }
- }));
-
- await contentServicesPage.goToDocumentList();
-
- await uploadToggles.enableExtensionFilter();
- await browser.sleep(1000);
- await uploadToggles.addExtension('.png');
-
- await contentServicesPage.uploadFile(pngFile.location);
- await browser.sleep(1000);
- await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
- });
-});
diff --git a/e2e/content-services/upload/upload-dialog.e2e.ts b/e2e/content-services/upload/upload-dialog.e2e.ts
deleted file mode 100644
index 874c0942cb..0000000000
--- a/e2e/content-services/upload/upload-dialog.e2e.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { browser } from 'protractor';
-import { VersionManagePage } from '../pages/version-manager.page';
-
-describe('Upload component', () => {
- const contentServicesPage = new ContentServicesPage();
- const uploadDialog = new UploadDialogPage();
- const uploadToggles = new UploadTogglesPage();
- const loginPage = new LoginPage();
- const versionManagePage = new VersionManagePage();
- const apiService = createApiService();
-
- const uploadActions = new UploadActions(apiService);
- const usersActions = new UsersActions(apiService);
-
- let acsUser: UserModel;
-
- const FILES = browser.params.resources.Files;
-
- const firstPdfFileModel = new FileModel({
- name: FILES.ADF_DOCUMENTS.PDF_B.file_name,
- location: FILES.ADF_DOCUMENTS.PDF_B.file_location
- });
- const docxFileModel = new FileModel({
- name: FILES.ADF_DOCUMENTS.DOCX.file_name,
- location: FILES.ADF_DOCUMENTS.DOCX.file_location
- });
- const pdfFileModel = new FileModel({
- name: FILES.ADF_DOCUMENTS.PDF.file_name,
- location: FILES.ADF_DOCUMENTS.PDF.file_location
- });
- const pngFileModelTwo = new FileModel({
- name: FILES.ADF_DOCUMENTS.PNG_B.file_name,
- location: FILES.ADF_DOCUMENTS.PNG_B.file_location
- });
- const pngFileModel = new FileModel({
- name: FILES.ADF_DOCUMENTS.PNG.file_name,
- location: FILES.ADF_DOCUMENTS.PNG.file_location
- });
- const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
- const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];
-
- beforeAll(async () => {
- 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();
- });
-
- beforeEach(async () => {
- await contentServicesPage.goToDocumentList();
- });
-
- afterEach(async () => {
- const nbResults = await contentServicesPage.emptyFolder.isPresent();
- if (!nbResults) {
- const nodeIds = await contentServicesPage.getElementsDisplayedId();
- for (const nodeId of nodeIds) {
- await uploadActions.deleteFileOrFolder(nodeId);
- }
- }
- });
-
- it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
- await contentServicesPage.uploadFile(docxFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
-
- await uploadDialog.fileIsUploaded(docxFileModel.name);
- await uploadDialog.checkCloseButtonIsDisplayed();
- expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
- expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
- await uploadDialog.minimizeUploadDialog();
- await uploadDialog.dialogIsMinimized();
- expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
- expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
- await uploadDialog.maximizeUploadDialog();
- await uploadDialog.dialogIsDisplayed();
- await uploadDialog.fileIsUploaded(docxFileModel.name);
- expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
- expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
- await uploadDialog.checkCloseButtonIsDisplayed();
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C291902] Should be shown upload counter display in dialog box', async () => {
- await contentServicesPage.uploadFile(docxFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
-
- await uploadDialog.fileIsUploaded(docxFileModel.name);
- await uploadDialog.checkCloseButtonIsDisplayed();
- expect(await uploadDialog.getTitleText()).toEqual('Uploaded 1 / 1');
- await uploadDialog.checkCloseButtonIsDisplayed();
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C260176] Should remove files from upload dialog box when closed', async () => {
- await contentServicesPage.uploadFile(pngFileModelTwo.location);
- await contentServicesPage.checkContentIsDisplayed(pngFileModelTwo.name);
-
- await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
- await contentServicesPage.uploadFile(pngFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
- await uploadDialog.fileIsUploaded(pngFileModel.name);
- await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
- await uploadDialog.fileIsUploaded(pdfFileModel.name);
- await uploadDialog.fileIsNotDisplayedInDialog(pngFileModel.name);
- await uploadDialog.fileIsNotDisplayedInDialog(pngFileModelTwo.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C260170] Should be possible to upload multiple files', async () => {
- await contentServicesPage.checkAcsContainer();
- await uploadToggles.enableMultipleFileUpload();
- await contentServicesPage.uploadMultipleFile(filesLocation);
- await contentServicesPage.checkContentsAreDisplayed(filesName);
- await uploadDialog.filesAreUploaded(filesName);
- expect(await uploadDialog.getTitleText()).toEqual('Uploaded 4 / 4');
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await uploadToggles.disableMultipleFileUpload();
- });
-
- it('[C311305] Should NOT be able to remove uploaded version', async () => {
- await contentServicesPage.uploadFile(docxFileModel.location);
- await uploadDialog.fileIsUploaded(docxFileModel.name);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
-
- await contentServicesPage.versionManagerContent(docxFileModel.name);
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(pngFileModel.location);
- await versionManagePage.closeVersionDialog();
-
- await uploadDialog.removeUploadedFile(pngFileModel.name);
- await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-});
diff --git a/e2e/content-services/upload/uploader-component.e2e.ts b/e2e/content-services/upload/uploader-component.e2e.ts
deleted file mode 100644
index ae5eabc188..0000000000
--- a/e2e/content-services/upload/uploader-component.e2e.ts
+++ /dev/null
@@ -1,255 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, by, element } from 'protractor';
-
-import { createApiService, DropActions, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { UploadTogglesPage } from '../../core/pages/dialog/upload-toggles.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-
-describe('Upload component', () => {
- const contentServicesPage = new ContentServicesPage();
- const uploadDialog = new UploadDialogPage();
- const uploadToggles = new UploadTogglesPage();
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const uploadActions = new UploadActions(apiService);
-
- let acsUser: UserModel;
-
- const firstPdfFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
- });
- 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 pdfFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PDF.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 fileWithSpecificSize = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_400B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_400B.file_location
- });
- const emptyFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
- });
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- await loginPage.login(acsUser.username, acsUser.password);
- const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
- Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- beforeEach(async () => {
- await contentServicesPage.goToDocumentList();
- });
-
- describe('', () => {
- afterEach(async () => {
- const nodeList = await contentServicesPage.getElementsDisplayedId();
- for (const node of nodeList) {
- try {
- await uploadActions.deleteFileOrFolder(node);
- } catch (error) {}
- }
- });
-
- it('[C272788] Should display upload button', async () => {
- await contentServicesPage.checkUploadButton();
- await contentServicesPage.checkContentIsDisplayed(firstPdfFileModel.name);
- });
-
- it('[C272789] Should be able to upload PDF file', async () => {
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
-
- await uploadDialog.fileIsUploaded(pdfFileModel.name);
-
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C272790] Should be able to upload text file', async () => {
- await contentServicesPage.uploadFile(docxFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
-
- await uploadDialog.fileIsUploaded(docxFileModel.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C260141] Should be possible to upload PNG file', async () => {
- await contentServicesPage.uploadFile(pngFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
-
- await uploadDialog.fileIsUploaded(pngFileModel.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- });
-
- it('[C279920] Should rename a file uploaded twice', async () => {
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
-
- pdfFileModel.setVersion('1');
-
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.getVersionName());
-
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- pdfFileModel.setVersion('');
- });
-
- it('[C260172] Should be possible to enable versioning', async () => {
- await uploadToggles.enableVersioning();
-
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
-
- pdfFileModel.setVersion('1');
-
- await contentServicesPage.uploadFile(pdfFileModel.location);
- await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
-
- await uploadDialog.fileIsUploaded(pdfFileModel.name);
-
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.getVersionName());
-
- pdfFileModel.setVersion('');
- await uploadToggles.disableVersioning();
- });
-
- it('[C260174] Should be possible to set a max size', async () => {
- await contentServicesPage.goToDocumentList();
-
- await uploadToggles.enableMaxSize();
- await uploadToggles.addMaxSize('400');
-
- await contentServicesPage.uploadFile(fileWithSpecificSize.location);
- await uploadDialog.fileIsUploaded(fileWithSpecificSize.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.deleteContent(fileWithSpecificSize.name);
- await contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
- await uploadToggles.addMaxSize('399');
- await contentServicesPage.uploadFile(fileWithSpecificSize.location);
-
- await contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
- await uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
- await contentServicesPage.uploadFile(emptyFile.location);
- await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
- await uploadDialog.fileIsUploaded(emptyFile.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await uploadToggles.disableMaxSize();
- });
-
- it('[C272796] Should be possible to set max size to 0', async () => {
- await contentServicesPage.goToDocumentList();
- await uploadToggles.enableMaxSize();
- await uploadToggles.addMaxSize('0');
- await contentServicesPage.uploadFile(fileWithSpecificSize.location);
- // expect(await contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
-
- await uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
- await contentServicesPage.uploadFile(emptyFile.location);
- await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
- await uploadDialog.fileIsUploaded(emptyFile.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await uploadToggles.disableMaxSize();
- });
-
- it('[C272797] Should be possible to set max size to 1', async () => {
- await uploadToggles.enableMaxSize();
- await browser.sleep(1000);
- await uploadToggles.addMaxSize('1');
- await uploadToggles.disableMaxSize();
- await contentServicesPage.uploadFile(fileWithSpecificSize.location);
- await uploadDialog.fileIsUploaded(fileWithSpecificSize.name);
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
- await contentServicesPage.checkContentIsDisplayed(fileWithSpecificSize.name);
- });
- });
-
- it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', async () => {
- await uploadToggles.enableExtensionFilter();
- await browser.sleep(1000);
- await uploadToggles.addExtension('.docx');
- await contentServicesPage.uploadFile(pngFileModel.location);
- await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
- await uploadDialog.dialogIsNotDisplayed();
- await uploadToggles.disableExtensionFilter();
- });
-
- it('[C274687] Should upload with drag and drop only the extension filter allowed when Enable extension filter is enabled', async () => {
- await uploadToggles.enableExtensionFilter();
- await browser.sleep(1000);
- await uploadToggles.addExtension('.docx');
-
- const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
-
- await DropActions.dropFile(dragAndDropArea, pngFileModel.location);
- await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
- await uploadDialog.dialogIsNotDisplayed();
- await uploadToggles.disableExtensionFilter();
- });
-
- it('[C291921] Should display tooltip for uploading files on a not found location', async () => {
- const folderName = StringUtil.generateRandomString(8);
-
- const folderUploadedModel = await uploadActions.createFolder(folderName, '-my-');
- await navigationBarPage.openContentServicesFolder(folderUploadedModel.entry.id);
- await contentServicesPage.checkUploadButton();
-
- await uploadActions.deleteFileOrFolder(folderUploadedModel.entry.id);
-
- await contentServicesPage.uploadFile(pdfFileModel.location);
-
- await uploadDialog.displayTooltip();
- expect(await uploadDialog.getTooltip()).toEqual('Upload location no longer exists [404]');
- });
-});
diff --git a/e2e/content-services/upload/user-permission.e2e.ts b/e2e/content-services/upload/user-permission.e2e.ts
deleted file mode 100644
index 069e584ec3..0000000000
--- a/e2e/content-services/upload/user-permission.e2e.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { createApiService, LoginPage, SnackbarPage, StringUtil, UserModel, UsersActions } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { FileModel } from '../../models/ACS/file.model';
-import CONSTANTS = require('../../util/constants');
-import { SiteEntry, SitesApi } from '@alfresco/js-api';
-
-describe('Upload - User permission', () => {
- const contentServicesPage = new ContentServicesPage();
- const uploadDialog = new UploadDialogPage();
- const loginPage = new LoginPage();
- const navigationBarPage = new NavigationBarPage();
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- const emptyFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
- });
-
- let acsUser: UserModel;
- let acsUserTwo: UserModel;
- let consumerSite: SiteEntry;
- let managerSite: SiteEntry;
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- acsUser = await usersActions.createUser(acsUser);
- acsUserTwo = await usersActions.createUser(acsUserTwo);
- await loginPage.login(acsUser.username, acsUser.password);
- });
-
- beforeEach(async () => {
- await apiService.loginWithProfile('admin');
- const sitesApi = new SitesApi(apiService.getInstance());
-
- consumerSite = await sitesApi.createSite({
- title: StringUtil.generateRandomString(),
- visibility: 'PUBLIC'
- });
-
- managerSite = await sitesApi.createSite({
- title: StringUtil.generateRandomString(),
- visibility: 'PUBLIC'
- });
-
- await sitesApi.createSiteMembership(consumerSite.entry.id, {
- id: acsUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONSUMER
- });
-
- await sitesApi.createSiteMembership(managerSite.entry.id, {
- id: acsUser.username,
- role: CONSTANTS.CS_USER_ROLES.MANAGER
- });
- });
-
- afterEach(async () => {
- const sitesApi = new SitesApi(apiService.getInstance());
-
- await sitesApi.deleteSite(managerSite.entry.id, { permanent: true });
- await sitesApi.deleteSite(consumerSite.entry.id, { permanent: true });
- });
-
- describe('Consumer permissions', () => {
- beforeEach(async () => {
- await contentServicesPage.goToDocumentList();
- });
-
- it('[C291921] Should display tooltip for uploading files without permissions', async () => {
- await navigationBarPage.openContentServicesFolder(consumerSite.entry.guid);
-
- await contentServicesPage.checkDragAndDropDIsDisplayed();
-
- await contentServicesPage.dragAndDropFile(emptyFile.location);
-
- await uploadDialog.fileIsError(emptyFile.name);
- await uploadDialog.displayTooltip();
-
- expect(await uploadDialog.getTooltip()).toEqual('Insufficient permissions to upload in this location [403]');
- });
-
- it('[C279915] Should not be allowed to upload a file in folder with consumer permissions', async () => {
- await contentServicesPage.uploadFile(emptyFile.location);
- await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
-
- await uploadDialog.fileIsUploaded(emptyFile.name);
-
- await uploadDialog.clickOnCloseButton();
- await uploadDialog.dialogIsNotDisplayed();
-
- await navigationBarPage.openContentServicesFolder(consumerSite.entry.guid);
-
- await browser.sleep(3000);
-
- await contentServicesPage.uploadFile(emptyFile.location);
-
- const message = await new SnackbarPage().getSnackBarMessage();
- expect(message).toEqual(`You don't have the create permission to upload the content`);
- });
- });
-
- describe('full permissions', () => {
- beforeEach(async () => {
- await apiService.loginWithProfile('admin');
- await navigationBarPage.openContentServicesFolder(managerSite.entry.guid);
- await contentServicesPage.goToDocumentList();
- });
-
- it('[C279917] Should be allowed to upload a file in a folder with manager permissions', async () => {
- await contentServicesPage.uploadFile(emptyFile.location);
- await uploadDialog.fileIsUploaded(emptyFile.name);
- });
- });
-});
diff --git a/e2e/content-services/upload/version-actions.e2e.ts b/e2e/content-services/upload/version-actions.e2e.ts
deleted file mode 100644
index cbd699b4fd..0000000000
--- a/e2e/content-services/upload/version-actions.e2e.ts
+++ /dev/null
@@ -1,185 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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,
- BrowserActions,
- BrowserVisibility,
- FileBrowserUtil,
- LoginPage,
- UploadActions,
- UserModel,
- UsersActions,
- ViewerPage
-} from '@alfresco/adf-testing';
-import { browser, by, element } from 'protractor';
-import { FileModel } from '../../models/ACS/file.model';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { VersionManagePage } from '../pages/version-manager.page';
-
-describe('Version component actions', () => {
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const versionManagePage = new VersionManagePage();
- const navigationBarPage = new NavigationBarPage();
- const uploadDialog = new UploadDialogPage();
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const viewerPage = new ViewerPage();
-
- let acsUser: UserModel;
-
- const txtFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
- });
-
- const fileModelVersionTwo = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_location
- });
-
- const bigFileToCancel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_location
- });
-
- beforeAll(async () => {
- const uploadActions = new UploadActions(apiService);
- await apiService.loginWithProfile('admin');
- acsUser = await usersActions.createUser();
- await apiService.login(acsUser.username, acsUser.password);
- const txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
- Object.assign(txtFileModel, txtUploadedFile.entry);
- txtFileModel.update(txtUploadedFile.entry);
- await loginPage.login(acsUser.username, acsUser.password);
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- });
-
- beforeEach(async () => {
- await contentServicesPage.versionManagerContent(txtFileModel.name);
- });
-
- afterEach(async () => {
- await BrowserActions.closeMenuAndDialogs();
- });
-
- it('[C280003] Should not be possible delete a file version if there is only one version', async () => {
- await versionManagePage.clickActionButton('1.0');
- expect(await element(by.css(`[id="adf-version-list-action-delete-1.0"]`)).isEnabled()).toBe(false);
- await versionManagePage.closeActionsMenu();
- await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)));
- });
-
- it('[C280004] Should not be possible restore the version if there is only one version', async () => {
- await versionManagePage.clickActionButton('1.0');
- expect(await element(by.css(`[id="adf-version-list-action-restore-1.0"]`)).isEnabled()).toBe(false);
- await versionManagePage.closeActionsMenu();
- await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)));
- });
-
- it('[C280005] Should be showed all the default action when you have more then one version', async () => {
- await versionManagePage.showNewVersionButton.click();
-
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
-
- await versionManagePage.clickActionButton('1.1');
- await versionManagePage.checkActionsArePresent('1.1');
-
- await versionManagePage.closeActionsMenu();
-
- await versionManagePage.closeVersionDialog();
-
- await uploadDialog.clickOnCloseButton();
- });
-
- it('[C269081] Should be possible download all the version of a file', async () => {
- await versionManagePage.downloadFileVersion('1.0');
- await FileBrowserUtil.isFileDownloaded(txtFileModel.name);
- await versionManagePage.downloadFileVersion('1.1');
- await FileBrowserUtil.isFileDownloaded(fileModelVersionTwo.name);
- });
-
- it('[C272819] Should be possible delete a version when click on delete version action', async () => {
- await versionManagePage.deleteFileVersion('1.1');
-
- await versionManagePage.confirmAccept.click();
-
- await versionManagePage.checkFileVersionNotExist('1.1');
- await versionManagePage.checkFileVersionExist('1.0');
- });
-
- it('[C280006] Should be possible prevent a version to be deleted when click on No on the confirm dialog', async () => {
- await versionManagePage.showNewVersionButton.click();
-
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
- await versionManagePage.checkFileVersionExist('1.1');
- await versionManagePage.deleteFileVersion('1.1');
- await versionManagePage.confirmCancel.click();
-
- await versionManagePage.checkFileVersionExist('1.1');
- await versionManagePage.checkFileVersionExist('1.0');
- await versionManagePage.closeVersionDialog();
- });
-
- it('[C280007] Should be possible to restore an old version of your file and the document list updated', async () => {
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
-
- await versionManagePage.restoreFileVersion('1.0');
- await versionManagePage.checkFileVersionExist('2.0');
- await versionManagePage.closeVersionDialog();
- await contentServicesPage.waitForTableBody();
- await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
- });
-
- it('[C362240] Should be possible to view a previous document version', async () => {
- await contentServicesPage.versionManagerContent(fileModelVersionTwo.name);
- await versionManagePage.viewFileVersion('1.0');
- await viewerPage.expectUrlToContain('1.0');
- });
-
- it('[C362241] Should be possible to download a previous document version', async () => {
- await viewerPage.clickDownloadButton();
- await FileBrowserUtil.isFileDownloaded(fileModelVersionTwo.name);
- await viewerPage.clickCloseButton();
- });
-
- it('[C307033] Should be possible to cancel the upload of a new version', async () => {
- await browser.refresh();
- await contentServicesPage.versionManagerContent(txtFileModel.name);
-
- await versionManagePage.showNewVersionButton.click();
-
- await browser.executeScript(
- ' setTimeout(() => {document.querySelector("div[data-automation-id=\'cancel-upload-progress\']").click();}, 1000)'
- );
- await versionManagePage.uploadNewVersionFile(bigFileToCancel.location);
- await versionManagePage.closeVersionDialog();
-
- expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
-
- await browser.refresh();
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
- });
-});
diff --git a/e2e/content-services/upload/version-permissions.e2e.ts b/e2e/content-services/upload/version-permissions.e2e.ts
deleted file mode 100644
index 0fdeb0a87d..0000000000
--- a/e2e/content-services/upload/version-permissions.e2e.ts
+++ /dev/null
@@ -1,321 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, by, element } from 'protractor';
-import { createApiService, LoginPage, SnackbarPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-import { VersionManagePage } from '../pages/version-manager.page';
-import { UploadDialogPage } from '../pages/upload-dialog.page';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { FileModel } from '../../models/ACS/file.model';
-import CONSTANTS = require('../../util/constants');
-import { NodesApi, SitesApi } from '@alfresco/js-api';
-
-describe('Version component permissions', () => {
- const loginPage = new LoginPage();
- const versionManagePage = new VersionManagePage();
- const navigationBarPage = new NavigationBarPage();
- const uploadDialog = new UploadDialogPage();
- const contentServices = new ContentServicesPage();
- let site;
-
- const acsUser = new UserModel();
- const consumerUser = new UserModel();
- const collaboratorUser = new UserModel();
- const contributorUser = new UserModel();
- const managerUser = new UserModel();
- const fileCreatorUser = new UserModel();
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
- const nodesApi = new NodesApi(apiService.getInstance());
-
- const newVersionFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_location
- });
-
- const lockFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_C.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_C.file_path
- });
-
- const differentCreatorFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_path
- });
-
- const uploadActions = new UploadActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
- await usersActions.createUser(acsUser);
- await usersActions.createUser(consumerUser);
- await usersActions.createUser(collaboratorUser);
- await usersActions.createUser(contributorUser);
- await usersActions.createUser(managerUser);
- await usersActions.createUser(fileCreatorUser);
-
- const sitesApi = new SitesApi(apiService.getInstance());
-
- site = await sitesApi.createSite({
- title: StringUtil.generateRandomString(),
- visibility: 'PUBLIC'
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: consumerUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONSUMER
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: collaboratorUser.username,
- role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: contributorUser.username,
- role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: managerUser.username,
- role: CONSTANTS.CS_USER_ROLES.MANAGER
- });
-
- await sitesApi.createSiteMembership(site.entry.id, {
- id: fileCreatorUser.username,
- role: CONSTANTS.CS_USER_ROLES.MANAGER
- });
-
- const lockFileUploaded = await uploadActions.uploadFile(lockFileModel.location, lockFileModel.name, site.entry.guid);
- Object.assign(lockFileModel, lockFileUploaded.entry);
-
- await nodesApi.lockNode(lockFileModel.id, {
- type: 'FULL',
- lifetime: 'PERSISTENT'
- });
-
- await apiService.login(fileCreatorUser.username, fileCreatorUser.password);
-
- await uploadActions.uploadFile(differentCreatorFile.location, differentCreatorFile.name, site.entry.guid);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
-
- const sitesApi = new SitesApi(apiService.getInstance());
- await sitesApi.deleteSite(site.entry.id, { permanent: true });
- });
-
- describe('Manager', () => {
- const sameCreatorFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
- });
-
- beforeAll(async () => {
- await apiService.login(managerUser.username, managerUser.password);
-
- const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
- Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
-
- await loginPage.login(managerUser.username, managerUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await nodesApi.deleteNode(sameCreatorFile.id);
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C277200] should a user with Manager permission be able to upload a new version for a file with different creator', async () => {
- await contentServices.versionManagerContent(differentCreatorFile.name);
-
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(newVersionFile.location);
-
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
- expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
-
- await versionManagePage.deleteFileVersion('1.1');
- await versionManagePage.confirmAccept.click();
-
- await versionManagePage.checkFileVersionNotExist('1.1');
-
- await versionManagePage.closeVersionDialog();
-
- await uploadDialog.clickOnCloseButton();
- });
-
- it('[C277204] Should be disabled the option for locked file', async () => {
- await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
- expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage versions is enabled');
- });
- });
-
- describe('Consumer', () => {
- beforeAll(async () => {
- await loginPage.login(consumerUser.username, consumerUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
- });
-
- afterAll(async () => {
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C277197] Should a user with Consumer permission not be able to upload a new version for a file with different creator', async () => {
- await contentServices.versionManagerContent(differentCreatorFile.name);
-
- const message = await new SnackbarPage().getSnackBarMessage();
- expect(message).toEqual(`You don't have access to do this.`);
- });
-
- it('[C277201] Should a user with Consumer permission not be able to upload a new version for a locked file', async () => {
- await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
- expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false);
- });
- });
-
- describe('Contributor', () => {
- const sameCreatorFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
- });
-
- beforeAll(async () => {
- await apiService.login(contributorUser.username, contributorUser.password);
-
- const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
- Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
-
- await loginPage.login(contributorUser.username, contributorUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await nodesApi.deleteNode(sameCreatorFile.id);
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C277177] Should a user with Contributor permission be able to upload a new version for the created file', async () => {
- await contentServices.versionManagerContent(sameCreatorFile.name);
-
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(newVersionFile.location);
-
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
- expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
-
- await versionManagePage.deleteFileVersion('1.1');
- await versionManagePage.confirmAccept.click();
-
- await versionManagePage.checkFileVersionNotExist('1.1');
-
- await versionManagePage.closeVersionDialog();
-
- await uploadDialog.clickOnCloseButton();
- });
-
- it('[C277198] Should a user with Contributor permission not be able to upload a new version for a file with different creator', async () => {
- await contentServices.versionManagerContent(differentCreatorFile.name);
-
- const message = await new SnackbarPage().getSnackBarMessage();
- expect(message).toEqual(`You don't have access to do this.`);
- });
-
- it('[C277202] Should be disabled the option for a locked file', async () => {
- await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
- expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false);
- });
- });
-
- describe('Collaborator', () => {
- const sameCreatorFile = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
- });
-
- beforeAll(async () => {
- await apiService.login(collaboratorUser.username, collaboratorUser.password);
-
- const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
- Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
-
- await loginPage.login(collaboratorUser.username, collaboratorUser.password);
-
- await navigationBarPage.openContentServicesFolder(site.entry.guid);
- });
-
- afterAll(async () => {
- await apiService.loginWithProfile('admin');
- await nodesApi.deleteNode(sameCreatorFile.id);
- await navigationBarPage.clickLogoutButton();
- });
-
- it('[C277195] Should a user with Collaborator permission be able to upload a new version for the created file', async () => {
- await contentServices.versionManagerContent(sameCreatorFile.name);
-
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(newVersionFile.location);
-
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
- expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
-
- await versionManagePage.deleteFileVersion('1.1');
- await versionManagePage.confirmAccept.click();
-
- await versionManagePage.checkFileVersionNotExist('1.1');
-
- await versionManagePage.closeVersionDialog();
-
- await uploadDialog.clickOnCloseButton();
- });
-
- it('[C277199] should a user with Collaborator permission be able to upload a new version for a file with different creator', async () => {
- await contentServices.versionManagerContent(differentCreatorFile.name);
-
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(newVersionFile.location);
-
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
- expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
-
- await versionManagePage.clickActionButton('1.1');
-
- expect(await element(by.css(`[id="adf-version-list-action-delete-1.1"]`)).isEnabled()).toBe(false);
-
- await versionManagePage.closeActionsMenu();
-
- await versionManagePage.closeVersionDialog();
- });
-
- it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', async () => {
- await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
- expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false);
- });
- });
-});
diff --git a/e2e/content-services/upload/version-properties.e2e.ts b/e2e/content-services/upload/version-properties.e2e.ts
deleted file mode 100644
index 7b5ca0449f..0000000000
--- a/e2e/content-services/upload/version-properties.e2e.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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, by, element } from 'protractor';
-import { createApiService, BrowserVisibility, LoginPage, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { VersionManagePage } from '../pages/version-manager.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-
-describe('Version Properties', () => {
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const versionManagePage = new VersionManagePage();
- const navigationBarPage = new NavigationBarPage();
- const viewerPage = new ViewerPage();
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- let acsUser: UserModel;
-
- const txtFileModel = 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 fileModelVersionTwo = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
- });
-
- const uploadActions = new UploadActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- acsUser = await usersActions.createUser();
-
- await apiService.login(acsUser.username, acsUser.password);
-
- const txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
-
- Object.assign(txtFileModel, txtUploadedFile.entry);
-
- txtFileModel.update(txtUploadedFile.entry);
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- });
-
- beforeEach(async () => {
- await contentServicesPage.versionManagerContent(txtFileModel.name);
- });
-
- it('[C277277] Should show/hide actions menu when readOnly is true/false', async () => {
- await versionManagePage.disableReadOnly();
- await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
- await versionManagePage.enableReadOnly();
- await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
- });
-
- it('[C279994] Should show/hide upload new version button when readOnly is true/false', async () => {
- await versionManagePage.disableReadOnly();
- await versionManagePage.showNewVersionButton.waitVisible();
- await versionManagePage.enableReadOnly();
- await versionManagePage.showNewVersionButton.waitNotVisible();
- await versionManagePage.uploadNewVersionButton.waitNotVisible();
- });
-
- it('[C272817] Should NOT be present the download action when allowDownload property is false', async () => {
- await versionManagePage.disableDownload();
- await versionManagePage.clickActionButton('1.0');
- await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
- await versionManagePage.closeDisabledActionsMenu();
- await viewerPage.clickCloseButton();
- });
-
- it('[C279992] Should be present the download action when allowDownload property is true', async () => {
- await versionManagePage.enableDownload();
- await versionManagePage.clickActionButton('1.0');
- await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
- });
-
- it('[C269085] Should show/hide comments when showComments true/false', async () => {
- await versionManagePage.enableComments();
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.commentText.typeText('Example comment text');
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionComment('1.1')).toEqual('Example comment text');
- await versionManagePage.disableComments();
- await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-item-comment-1.1"]`)));
- });
-});
diff --git a/e2e/content-services/upload/version-smoke-tests.e2e.ts b/e2e/content-services/upload/version-smoke-tests.e2e.ts
deleted file mode 100644
index 2b138820e1..0000000000
--- a/e2e/content-services/upload/version-smoke-tests.e2e.ts
+++ /dev/null
@@ -1,152 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { createApiService, LoginPage, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
-import { ContentServicesPage } from '../../core/pages/content-services.page';
-import { VersionManagePage } from '../pages/version-manager.page';
-import { FileModel } from '../../models/ACS/file.model';
-import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
-
-describe('Version component', () => {
- let txtUploadedFile;
- const loginPage = new LoginPage();
- const contentServicesPage = new ContentServicesPage();
- const navigationBarPage = new NavigationBarPage();
- const versionManagePage = new VersionManagePage();
-
- const apiService = createApiService();
- const usersActions = new UsersActions(apiService);
-
- let acsUser: UserModel;
-
- const txtFileModel = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
- });
-
- const fileModelVersionTwo = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
- });
-
- const fileModelVersionThree = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_location
- });
-
- const fileModelVersionFor = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_C.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_C.file_location
- });
-
- const fileModelVersionFive = new FileModel({
- name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
- location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_location
- });
-
- const uploadActions = new UploadActions(apiService);
-
- beforeAll(async () => {
- await apiService.loginWithProfile('admin');
-
- acsUser = await usersActions.createUser();
-
- await apiService.login(acsUser.username, acsUser.password);
-
- txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
- Object.assign(txtFileModel, txtUploadedFile.entry);
-
- txtFileModel.update(txtUploadedFile.entry);
-
- await loginPage.login(acsUser.username, acsUser.password);
-
- await navigationBarPage.navigateToContentServices();
- await contentServicesPage.waitForTableBody();
- await contentServicesPage.versionManagerContent(txtFileModel.name);
- });
-
- it('[C272768] Should be visible the first file version when you upload a file', async () => {
- await versionManagePage.showNewVersionButton.waitVisible();
-
- await versionManagePage.checkFileVersionExist('1.0');
- expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
- expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
- });
-
- it('[C279995] Should show/hide the new upload file options when click on add New version/cancel button', async () => {
- await versionManagePage.showNewVersionButton.click();
-
- await versionManagePage.cancelButton.waitVisible();
- await versionManagePage.majorRadio.waitVisible();
- await versionManagePage.minorRadio.waitVisible();
- await versionManagePage.commentText.waitVisible();
- await versionManagePage.uploadNewVersionButton.waitVisible();
-
- await versionManagePage.cancelButton.click();
-
- await versionManagePage.cancelButton.waitNotVisible();
- await versionManagePage.majorRadio.waitNotVisible();
- await versionManagePage.minorRadio.waitNotVisible();
- await versionManagePage.commentText.waitNotVisible();
- await versionManagePage.uploadNewVersionButton.waitNotVisible();
-
- await versionManagePage.showNewVersionButton.waitVisible();
- });
-
- it('[C260244] Should show the version history when select a file with multiple version', async () => {
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
-
- await versionManagePage.checkFileVersionExist('1.0');
- expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
- expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
-
- await versionManagePage.checkFileVersionExist('1.1');
- expect(await versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
- expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
- });
-
- it('[C269084] Should be possible add a comment when add a new version', async () => {
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.commentText.typeText('Example comment text');
- await versionManagePage.uploadNewVersionFile(fileModelVersionThree.location);
-
- await versionManagePage.checkFileVersionExist('1.2');
- expect(await versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
- expect(await versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
- expect(await versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
- });
-
- it('[C275719] Should be possible preview the file when you add a new version', async () => {
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.majorRadio.click();
-
- await versionManagePage.uploadNewVersionFile(fileModelVersionFor.location);
-
- await versionManagePage.checkFileVersionExist('2.0');
- expect(await versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
-
- await versionManagePage.showNewVersionButton.click();
- await versionManagePage.minorRadio.click();
-
- await versionManagePage.uploadNewVersionFile(fileModelVersionFive.location);
-
- await versionManagePage.checkFileVersionExist('2.1');
- expect(await versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
- });
-});
diff --git a/e2e/core/login/login-sso/login-sso.e2e.ts b/e2e/core/login/login-sso/login-sso.e2e.ts
deleted file mode 100644
index a0b7fad1ab..0000000000
--- a/e2e/core/login/login-sso/login-sso.e2e.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { LoginPage, SettingsPage, BrowserVisibility } from '@alfresco/adf-testing';
-import { browser } from 'protractor';
-import { NavigationBarPage } from '../../../core/pages/navigation-bar.page';
-import { LoginShellPage } from '../../../core/pages/login-shell.page';
-
-describe('Login component - SSO', () => {
- const settingsPage = new SettingsPage();
- const loginSSOPage = new LoginPage();
- const loginPage = new LoginShellPage();
- const navigationBarPage = new NavigationBarPage();
-
- describe('Login component - SSO implicit Flow', () => {
- afterEach(async () => {
- await navigationBarPage.clickLogoutButton();
- await browser.executeScript('window.sessionStorage.clear();');
- await browser.executeScript('window.localStorage.clear();');
- await browser.refresh();
- });
-
- it('[C261050] Should be possible login with SSO', async () => {
- 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.oauth2.redirectUriLogout
- );
-
- await browser.refresh();
-
- await loginSSOPage.loginSSOIdentityService(
- browser.params.testConfig.users.admin.username,
- browser.params.testConfig.users.admin.password
- );
- });
-
- it('[C280667] Should be redirect directly to keycloak without show the login page with silent login', async () => {
- await settingsPage.setProviderEcmSso(
- browser.params.testConfig.appConfig.ecmHost,
- browser.params.testConfig.appConfig.oauth2.host,
- browser.params.testConfig.appConfig.identityHost,
- true,
- true,
- browser.params.testConfig.appConfig.oauth2.clientId,
- browser.params.testConfig.appConfig.oauth2.redirectUriLogout
- );
-
- await browser.refresh();
-
- await loginSSOPage.loginSSOIdentityService(
- browser.params.testConfig.users.admin.username,
- browser.params.testConfig.users.admin.password
- );
- });
- });
-
- describe('Login component - SSO Grant type password (implicit flow false)', () => {
- it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
- await settingsPage.setProviderEcmSsoWithoutCodeFlow(
- browser.params.testConfig.appConfig.ecmHost,
- browser.params.testConfig.appConfig.oauth2.host,
- browser.params.testConfig.appConfig.identityHost,
- false,
- false,
- browser.params.testConfig.appConfig.oauth2.clientId,
- browser.params.testConfig.appConfig.oauth2.redirectUriLogout
- );
-
- await browser.refresh();
- await loginPage.waitForElements();
-
- await loginPage.enterUsername(browser.params.testConfig.users.admin.username);
- await loginPage.enterPassword(browser.params.testConfig.users.admin.password);
- await loginPage.clickSignInButton();
-
- await BrowserVisibility.waitUntilElementIsVisible(loginPage.sidenavLayout);
- });
- });
-});
diff --git a/e2e/core/pages/comments.page.ts b/e2e/core/pages/comments.page.ts
deleted file mode 100644
index d11aae739d..0000000000
--- a/e2e/core/pages/comments.page.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { BrowserActions, BrowserVisibility, TabsPage } from '@alfresco/adf-testing';
-import { $, $$ } from 'protractor';
-
-export class CommentsPage {
-
- tabsPage = new TabsPage();
- numberOfComments = $('#comment-header');
- commentUserIcon = $$('.adf-comment-img-container');
- commentUserName = $$('.adf-comment-user-name');
- commentMessage = $$('.adf-comment-message');
- commentTime = $$('.adf-comment-message-time');
- commentInput = $('#comment-input');
- addCommentButton = $('[data-automation-id=\'comments-input-add\']');
-
- async getTotalNumberOfComments(text: string): Promise {
- await BrowserVisibility.waitUntilElementHasText(this.numberOfComments, text);
- }
-
- async checkUserIconIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.commentUserIcon.first());
- }
-
- getUserName(position: number): Promise {
- return BrowserActions.getText(this.commentUserName.get(position));
- }
-
- getMessage(position: number): Promise {
- return BrowserActions.getText(this.commentMessage.get(position));
-
- }
-
- getTime(position: number): Promise {
- return BrowserActions.getText(this.commentTime.get(position));
- }
-
- async checkCommentInputIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.commentInput);
- }
-
- async addComment(comment: string): Promise {
- await BrowserActions.clearSendKeys(this.commentInput, comment);
- await BrowserActions.click(this.addCommentButton);
- }
-
- async checkCommentsTabIsSelected(): Promise {
- await this.tabsPage.checkTabIsSelectedByTitle('Comments');
- }
-
- async checkCommentInputIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.commentInput);
- }
-}
diff --git a/e2e/core/pages/content-services.page.ts b/e2e/core/pages/content-services.page.ts
deleted file mode 100644
index 437eb018cd..0000000000
--- a/e2e/core/pages/content-services.page.ts
+++ /dev/null
@@ -1,324 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { DropActions, BrowserActions, BrowserVisibility, DocumentListPage, DropdownPage, Logger, materialLocators } from '@alfresco/adf-testing';
-import { $$, browser, protractor, $ } from 'protractor';
-import { FolderDialogPage } from './dialog/folder-dialog.page';
-import { NavigationBarPage } from './navigation-bar.page';
-import * as path from 'path';
-
-export class ContentServicesPage {
- columns = {
- name: 'Display name',
- size: 'Size',
- nodeId: 'Node id',
- createdBy: 'Created by',
- created: 'Created'
- };
-
- contentList = new DocumentListPage($$('adf-upload-drag-area adf-document-list').first());
- createFolderDialog = new FolderDialogPage();
- uploadBorder = $('#document-list-container');
- currentFolder = $('div[class*="adf-breadcrumb-item adf-active"] div');
- createFolderButton = $('button[data-automation-id="create-new-folder"]');
- uploadFileButton = $('.adf-upload-button-file-container label');
- uploadFileButtonInput = $('input[data-automation-id="upload-single-file"]');
- uploadMultipleFileButton = $('input[data-automation-id="upload-multiple-files"]');
- uploadFolderButton = $('input[data-automation-id="uploadFolder"]');
- emptyPagination = $('adf-pagination[class*="adf-pagination__empty"]');
- dragAndDrop = $$('adf-upload-drag-area div').first();
- nameHeader = $$('div[data-automation-id="auto_header_content_id_name"] > span').first();
- sizeHeader = $$('div[data-automation-id="auto_header_content_id_content.sizeInBytes"] > span').first();
- createdByHeader = $$('div[data-automation-id="auto_header_content_id_createdByUser.displayName"] > span').first();
- createdHeader = $$('div[data-automation-id="auto_header_content_id_createdAt"] > span').first();
- emptyFolder = $('.adf-empty-folder-this-space-is-empty');
- emptyFolderImage = $('.adf-empty-folder-image');
- nameColumnHeader = 'name';
- createdByColumnHeader = 'createdByUser.displayName';
- createdColumnHeader = 'createdAt';
- deleteContentElement = $('button[data-automation-id="Delete"]');
- versionManagerAction = $('button[data-automation-id="Manage versions"]');
- downloadContent = $('button[data-automation-id="Download"]');
- downloadButton = $('button[title="Download"]');
- multiSelectToggle = $('[data-automation-id="multiSelectToggle"]');
- selectionModeDropdown = $(`${materialLocators.Select.class}[placeholder="Selection Mode"]`);
-
- async isContextActionEnabled(actionName: string): Promise {
- const actionButton = $(`button[data-automation-id="context-${actionName}"`);
- await BrowserVisibility.waitUntilElementIsVisible(actionButton);
- return actionButton.isEnabled();
- }
-
- getDocumentList(): DocumentListPage {
- return this.contentList;
- }
-
- async deleteContent(content: string): Promise {
- await this.contentList.clickOnActionMenu(content);
- await BrowserActions.click(this.deleteContentElement);
- await this.checkContentIsNotDisplayed(content);
- }
-
- async versionManagerContent(content: string): Promise {
- await this.contentList.clickOnActionMenu(content);
- await BrowserActions.click(this.versionManagerAction);
- }
-
- async getElementsDisplayedId() {
- return this.contentList.dataTablePage().getAllRowsColumnValues(this.columns.nodeId);
- }
-
- // @deprecated prefer waitTillContentLoaded
- async checkDocumentListElementsAreDisplayed(): Promise {
- await this.checkAcsContainer();
- await this.waitForTableBody();
- }
-
- // @deprecated prefer waitTillContentLoaded
- async checkAcsContainer(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.uploadBorder);
- }
-
- // @deprecated prefer waitTillContentLoaded
- async waitForTableBody(): Promise {
- await this.contentList.dataTablePage().waitTillContentLoaded();
- }
-
- async goToDocumentList(): Promise {
- const navigationBarPage = new NavigationBarPage();
- await navigationBarPage.navigateToContentServices();
- await this.contentList.dataTablePage().waitTillContentLoaded();
- }
-
- async numberOfResultsDisplayed(): Promise {
- return this.contentList.dataTablePage().numberOfRows();
- }
-
- async currentFolderName(): Promise {
- return BrowserActions.getText(this.currentFolder);
- }
-
- async getAllRowsNameColumn(): Promise {
- return this.contentList.getAllRowsColumnValues(this.columns.name);
- }
-
- async sortByName(sortOrder: string): Promise {
- await this.contentList.dataTable.sortByColumn(sortOrder, this.nameColumnHeader);
- }
-
- async sortByAuthor(sortOrder: string): Promise {
- await this.contentList.dataTable.sortByColumn(sortOrder, this.createdByColumnHeader);
- }
-
- async sortByCreated(sortOrder: string): Promise {
- await this.contentList.dataTable.sortByColumn(sortOrder, this.createdColumnHeader);
- }
-
- async sortAndCheckListIsOrderedByName(sortOrder: string): Promise {
- await this.sortByName(sortOrder);
- return this.checkListIsSortedByNameColumn(sortOrder);
- }
-
- async checkListIsSortedByNameColumn(sortOrder: string): Promise {
- return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.name);
- }
-
- async checkListIsSortedByCreatedColumn(sortOrder: string): Promise {
- return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.created);
- }
-
- async checkListIsSortedByAuthorColumn(sortOrder: string): Promise {
- return this.contentList.dataTablePage().checkListIsSorted(sortOrder, this.columns.createdBy);
- }
-
- async sortAndCheckListIsOrderedByAuthor(sortOrder: string): Promise {
- await this.sortByAuthor(sortOrder);
- return this.checkListIsSortedByAuthorColumn(sortOrder);
- }
-
- async sortAndCheckListIsOrderedByCreated(sortOrder: string): Promise {
- await this.sortByCreated(sortOrder);
- return this.checkListIsSortedByCreatedColumn(sortOrder);
- }
-
- async doubleClickRow(nodeName: string): Promise {
- Logger.log(`Open Folder/File ${nodeName}`);
- await this.contentList.doubleClickRow(nodeName);
- }
-
- async selectRow(nodeName: string): Promise {
- await this.contentList.selectRow(nodeName);
- }
-
- async clickOnCreateNewFolder(): Promise {
- await BrowserActions.click(this.createFolderButton);
- }
-
- async createNewFolder(folderName: string): Promise {
- await this.clickOnCreateNewFolder();
- await this.createFolderDialog.addFolderName(folderName);
- await this.createFolderDialog.clickOnCreateUpdateButton();
- }
-
- async createAndOpenNewFolder(folderName: string): Promise {
- await this.createNewFolder(folderName);
- await this.checkContentIsDisplayed(folderName);
- await this.openFolder(folderName);
- }
-
- async openFolder(folderName: string): Promise {
- await this.doubleClickRow(folderName);
- await this.contentList.dataTablePage().waitTillContentLoaded();
- }
-
- async checkContentIsDisplayed(content: string): Promise {
- await this.contentList.dataTablePage().checkContentIsDisplayed(this.columns.name, content);
- }
-
- async checkContentsAreDisplayed(content: string[]): Promise {
- for (const item of content) {
- await this.checkContentIsDisplayed(item);
- }
- }
-
- async checkContentIsNotDisplayed(content: string): Promise {
- await this.contentList.dataTablePage().checkContentIsNotDisplayed(this.columns.name, content);
- }
-
- async deleteAndCheckFolderNotDisplayed(folderName: string): Promise {
- await this.deleteContent(folderName);
- await this.checkContentIsNotDisplayed(folderName);
- }
-
- async deleteSubFolderUnderRoot(folderName: string, subFolderName: string): Promise {
- await this.goToDocumentList();
- await this.openFolder(folderName);
- await this.deleteAndCheckFolderNotDisplayed(subFolderName);
- }
-
- async uploadFile(fileLocation: string): Promise {
- await this.checkUploadButton();
- await this.uploadFileButtonInput.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
- await this.checkUploadButton();
- }
-
- async uploadMultipleFile(files: string[]): Promise {
- await BrowserVisibility.waitUntilElementIsPresent(this.uploadMultipleFileButton);
- let allFiles = path.resolve(path.join(browser.params.testConfig.main.rootPath, files[0]));
- for (let i = 1; i < files.length; i++) {
- allFiles = allFiles + '\n' + path.resolve(path.join(browser.params.testConfig.main.rootPath, files[i]));
- }
- await this.uploadMultipleFileButton.sendKeys(allFiles);
- await BrowserVisibility.waitUntilElementIsPresent(this.uploadMultipleFileButton);
- }
-
- async uploadFolder(folderLocation: string): Promise {
- await BrowserVisibility.waitUntilElementIsPresent(this.uploadFolderButton);
- await this.uploadFolderButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, folderLocation)));
- }
-
- async checkUploadButton(): Promise {
- await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
- }
-
- async checkPaginationIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.emptyPagination);
- }
-
- async getDocumentListRowNumber(): Promise {
- const documentList = $('adf-upload-drag-area adf-document-list');
- await BrowserVisibility.waitUntilElementIsVisible(documentList);
- return $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
- }
-
- async checkColumnNameHeader(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.nameHeader);
- }
-
- async checkColumnSizeHeader(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.sizeHeader);
- }
-
- async checkColumnCreatedByHeader(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.createdByHeader);
- }
-
- async checkColumnCreatedHeader(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.createdHeader);
- }
-
- async checkDragAndDropDIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.dragAndDrop);
- }
-
- async dragAndDropFile(file: string): Promise {
- await this.checkDragAndDropDIsDisplayed();
- await DropActions.dropFile(this.dragAndDrop, file);
- }
-
- async checkLockIsDisplayedForElement(name: string): Promise {
- const lockButton = $(`div.adf-datatable-cell[data-automation-id="${name}"] button`);
- await BrowserVisibility.waitUntilElementIsVisible(lockButton);
- }
-
- async getColumnValueForRow(file: string, columnName: string): Promise {
- return this.contentList.dataTablePage().getColumnValueForRow(this.columns.name, file, columnName);
- }
-
- async checkEmptyFolderTextToBe(text: string): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.emptyFolder);
- expect(await this.emptyFolder.getText()).toContain(text);
- }
-
- async checkEmptyFolderImageUrlToContain(url): Promise {
- expect(await BrowserActions.getAttribute(this.emptyFolderImage, 'src')).toContain(url);
- }
-
- async getAttributeValueForElement(elementName: string, propertyName: string): Promise {
- const elementSize = $(
- `.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`
- );
- return BrowserActions.getText(elementSize);
- }
-
- async clickDownloadButton(): Promise {
- await BrowserActions.closeMenuAndDialogs();
- await BrowserActions.click(this.downloadButton);
- }
-
- async clickMultiSelectToggle() {
- await BrowserActions.closeMenuAndDialogs();
- await BrowserActions.click(this.multiSelectToggle);
- }
-
- async selectFolder(folderName: string): Promise {
- const folderSelected = $(`div[data-automation-id="${folderName}"] .adf-datatable-center-img-ie`);
- await BrowserVisibility.waitUntilElementIsVisible(folderSelected);
- await BrowserActions.click(folderSelected);
- }
-
- async selectFolderWithCommandKey(folderName: string): Promise {
- await browser.actions().sendKeys(protractor.Key.COMMAND).perform();
- await this.selectRow(folderName);
- await browser.actions().sendKeys(protractor.Key.NULL).perform();
- }
-
- async chooseSelectionMode(option: string): Promise {
- const dropdownPage = new DropdownPage(this.selectionModeDropdown);
- await dropdownPage.selectDropdownOption(option);
- }
-}
diff --git a/e2e/core/pages/dialog/folder-dialog.page.ts b/e2e/core/pages/dialog/folder-dialog.page.ts
deleted file mode 100644
index 78888516fb..0000000000
--- a/e2e/core/pages/dialog/folder-dialog.page.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { $$ } from 'protractor';
-import { BrowserActions } from '@alfresco/adf-testing';
-
-export class FolderDialogPage {
- folderDialog = $$('adf-folder-dialog').first();
- folderNameField = this.folderDialog.$('#adf-folder-name-input');
- createUpdateButton = this.folderDialog.$('#adf-folder-create-button');
- cancelButton = this.folderDialog.$('#adf-folder-cancel-button');
-
- async clickOnCreateUpdateButton(): Promise {
- await BrowserActions.click(this.createUpdateButton);
- }
-
- async addFolderName(folderName: string): Promise {
- await BrowserActions.clearSendKeys(this.folderNameField, folderName);
- }
-}
diff --git a/e2e/core/pages/dialog/upload-toggles.page.ts b/e2e/core/pages/dialog/upload-toggles.page.ts
deleted file mode 100644
index 8cb218a4c9..0000000000
--- a/e2e/core/pages/dialog/upload-toggles.page.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { $ } from 'protractor';
-import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
-
-export class UploadTogglesPage {
- togglePage = new TogglePage();
- multipleFileUploadToggle = $('#adf-multiple-upload-switch');
- uploadFolderToggle = $('#adf-folder-upload-switch');
- extensionFilterToggle = $('#adf-extension-filter-upload-switch');
- maxSizeToggle = $('#adf-max-size-filter-upload-switch');
- versioningToggle = $('#adf-version-upload-switch');
- extensionAcceptedField = $('[data-automation-id="accepted-files-type"]');
- maxSizeField = $('[data-automation-id="max-files-size"]');
-
- async enableMultipleFileUpload(): Promise {
- await this.togglePage.enableToggle(this.multipleFileUploadToggle);
- }
-
- async disableMultipleFileUpload(): Promise {
- await this.togglePage.disableToggle(this.multipleFileUploadToggle);
- }
-
- async enableFolderUpload(): Promise {
- await this.togglePage.enableToggle(this.uploadFolderToggle);
- }
-
- async enableExtensionFilter(): Promise {
- await this.togglePage.enableToggle(this.extensionFilterToggle);
- }
-
- async disableExtensionFilter(): Promise {
- await this.togglePage.disableToggle(this.extensionFilterToggle);
- }
-
- async enableMaxSize(): Promise {
- await this.togglePage.enableToggle(this.maxSizeToggle);
- }
-
- async disableMaxSize(): Promise {
- await this.togglePage.disableToggle(this.maxSizeToggle);
- }
-
- async enableVersioning(): Promise {
- await this.togglePage.enableToggle(this.versioningToggle);
- }
-
- async disableVersioning(): Promise {
- await this.togglePage.disableToggle(this.versioningToggle);
- }
-
- async addExtension(extension: string): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.extensionAcceptedField);
- await this.extensionAcceptedField.sendKeys(',' + extension);
- }
-
- async addMaxSize(size): Promise {
- await this.clearText();
- await this.maxSizeField.sendKeys(size);
- }
-
- async clearText(): Promise {
- await BrowserActions.clearSendKeys(this.maxSizeField, '');
- }
-}
diff --git a/e2e/core/pages/login-shell.page.ts b/e2e/core/pages/login-shell.page.ts
deleted file mode 100644
index 17b4dad837..0000000000
--- a/e2e/core/pages/login-shell.page.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { $ } from 'protractor';
-import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
-
-export class LoginShellPage {
- private txtUsername = $('input[id="username"]');
- private txtPassword = $('input[id="password"]');
- private signInButton = $('#login-button');
- sidenavLayout = $(`[data-automation-id="sidenav-layout"]`);
-
- async waitForElements(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.txtUsername);
- await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
- }
-
- async enterUsername(username: string): Promise {
- await BrowserActions.clearSendKeys(this.txtUsername, username);
- }
-
- async enterPassword(password: string): Promise {
- await BrowserActions.clearSendKeys(this.txtPassword, password);
- }
-
- async clickSignInButton(): Promise {
- await BrowserActions.click(this.signInButton);
- }
-}
diff --git a/e2e/core/pages/metadata-view.page.ts b/e2e/core/pages/metadata-view.page.ts
deleted file mode 100644
index ef2db6ccfd..0000000000
--- a/e2e/core/pages/metadata-view.page.ts
+++ /dev/null
@@ -1,281 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { $, by, element, Key, protractor, ElementFinder } from 'protractor';
-import { BrowserActions, BrowserVisibility, DropdownPage, TestElement, Logger, materialLocators } from '@alfresco/adf-testing';
-
-export class MetadataViewPage {
- title = $(`div[info-drawer-title]`);
- expandedAspect = $(`${materialLocators.Expansion.panel.header.root}[aria-expanded='true']`);
- aspectTitle = materialLocators.Panel.title;
- name = $(`[data-automation-id='card-textitem-value-properties.cm:name']`);
- creator = $(`[data-automation-id='card-textitem-value-createdByUser.displayName']`);
- createdDate = $(`span[data-automation-id='card-dateitem-createdAt']`);
- modifier = $(`[data-automation-id='card-textitem-value-modifiedByUser.displayName']`);
- modifiedDate = $(`span[data-automation-id='card-dateitem-modifiedAt']`);
- mimetypeName = $(`[data-automation-id='card-textitem-value-content.mimeTypeName']`);
- size = $(`[data-automation-id='card-textitem-value-content.sizeInBytes']`);
- description = $(`span[data-automation-id='card-textitem-value-properties.cm:description']`);
- author = $(`[data-automation-id='card-textitem-value-properties.cm:author']`);
- editIcon = $(`button[data-automation-id='meta-data-card-toggle-edit']`);
- editIconGeneral = $(`button[data-automation-id='meta-data-general-info-edit']`);
- displayEmptySwitch = $(`#adf-metadata-empty`);
- readonlySwitch = $(`#adf-metadata-readonly`);
- multiSwitch = $(`#adf-metadata-multi`);
- defaultPropertiesSwitch = $('#adf-metadata-default-properties');
- closeButton = element(by.cssContainingText(`button${materialLocators.Button.class} span`, 'Close'));
- displayAspect = $(`input[placeholder='Display Aspect']`);
- applyAspect = element(by.cssContainingText(`button span${materialLocators.Button.label}`, 'Apply Aspect'));
- saveMetadataButton = $(`[data-automation-id='save-metadata']`);
- saveGeneralMetadataButton = $(`[data-automation-id='save-general-info-metadata']`);
- resetMetadataButton = $(`[data-automation-id='reset-metadata']`);
- informationButton = $(`button[data-automation-id='meta-data-card-toggle-expand']`);
-
- private getMetadataGroupLocator = async (groupName: string): Promise =>
- $(`[data-automation-id="adf-metadata-group-${groupName}"]`);
- private getMetadataGroupEditIconLocator = async (groupName: string): Promise =>
- $(`[data-automation-id="adf-metadata-group-${groupName}"]`).$(this.editIcon.locator().value);
- private getExpandedMetadataGroupLocator = async (groupName: string): Promise =>
- $(`[data-automation-id="adf-metadata-group-${groupName}"] > ${materialLocators.Expansion.panel.header.root}`);
-
- async getTitle(): Promise {
- return BrowserActions.getText(this.title);
- }
-
- async getExpandedAspectName(): Promise {
- return BrowserActions.getText(this.expandedAspect.$(this.aspectTitle));
- }
-
- async getName(): Promise {
- return BrowserActions.getInputValue(this.name);
- }
-
- async getCreator(): Promise {
- return BrowserActions.getInputValue(this.creator);
- }
-
- async getCreatedDate(): Promise {
- return BrowserActions.getText(this.createdDate);
- }
-
- async getModifier(): Promise {
- return BrowserActions.getInputValue(this.modifier);
- }
-
- async getModifiedDate(): Promise {
- return BrowserActions.getText(this.modifiedDate);
- }
-
- async getMimetypeName(): Promise {
- return BrowserActions.getInputValue(this.mimetypeName);
- }
-
- async getSize(): Promise {
- return BrowserActions.getInputValue(this.size);
- }
-
- async getDescription(): Promise {
- return BrowserActions.getInputValue(this.description);
- }
-
- async getAuthor(): Promise {
- return BrowserActions.getInputValue(this.author);
- }
-
- async editIconIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.editIcon);
- }
-
- async editIconIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.editIcon);
- }
-
- async isEditGeneralIconDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral);
- }
-
- async clickEditIconGeneral(): Promise {
- await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral);
- await BrowserActions.click(this.editIconGeneral);
- }
-
- async clickOnPropertiesTab(): Promise {
- const propertiesTab = element(by.cssContainingText(`.adf-info-drawer-layout-content ${materialLocators.Tab.labels.class}`, `Properties`));
- await BrowserActions.click(propertiesTab);
- }
-
- async getEditIconTooltip(): Promise {
- return BrowserActions.getAttribute(this.editIcon, 'title');
- }
-
- async enterPropertyText(propertyName: string, text: string | number): Promise {
- const textField = $('input[data-automation-id="card-textitem-value-' + propertyName + '"]');
- await BrowserActions.clearSendKeys(textField, text.toString());
- await textField.sendKeys(protractor.Key.ENTER);
- }
-
- async enterDescriptionText(text: string): Promise {
- const textField = $('textarea[data-automation-id="card-textitem-value-properties.cm:description"]');
- await BrowserActions.clearSendKeys(textField, text);
- await textField.sendKeys(Key.TAB);
- }
-
- async getPropertyText(propertyName: string, type?: string): Promise {
- const propertyType = type || 'textitem';
- const textField = $('[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]');
-
- return BrowserActions.getInputValue(textField);
- }
-
- async clickMetadataGroup(groupName: string): Promise {
- const group = await this.getMetadataGroupLocator(groupName);
- await BrowserActions.click(group);
- }
-
- async clickMetadataGroupEditIcon(groupName: string): Promise {
- const group = await this.getMetadataGroupEditIconLocator(groupName);
- await BrowserActions.click(group);
- }
-
- async checkMetadataGroupIsPresent(groupName: string): Promise {
- const group = await this.getMetadataGroupLocator(groupName);
- await BrowserVisibility.waitUntilElementIsVisible(group);
- }
-
- async checkMetadataGroupIsNotPresent(groupName: string): Promise {
- const group = await this.getMetadataGroupLocator(groupName);
- await BrowserVisibility.waitUntilElementIsNotVisible(group);
- }
-
- async checkMetadataGroupIsExpand(groupName: string): Promise {
- const group = await this.getExpandedMetadataGroupLocator(groupName);
- expect(await BrowserActions.getAttribute(group, 'class')).toContain(materialLocators.Expanded.root);
- }
-
- async checkMetadataGroupIsNotExpand(groupName: string): Promise {
- const group = await this.getExpandedMetadataGroupLocator(groupName);
- expect(await BrowserActions.getAttribute(group, 'class')).not.toContain(materialLocators.Expanded.root);
- }
-
- async checkPropertyIsVisible(propertyName: string, type: string): Promise {
- const property = $('[data-automation-id="card-' + type + '-label-' + propertyName + '"]');
- await BrowserVisibility.waitUntilElementIsVisible(property);
- }
-
- async hasContentType(contentType: string, attempt = 0, maxAttempt = 3): Promise {
- const contentTypeSelector = '[data-automation-id="select-readonly-value-nodeType"]';
- const type = TestElement.byText(contentTypeSelector, contentType);
- try {
- if (attempt > maxAttempt) {
- return false;
- }
- await type.waitVisible();
- const isPresent = await type.isPresent();
- if (isPresent) {
- return true;
- }
- return this.hasContentType(contentType, attempt + 1, maxAttempt);
- } catch (e) {
- Logger.log(`re trying content type attempt :: ${attempt}`);
- return this.hasContentType(contentType, attempt + 1, maxAttempt);
- }
- }
-
- async checkPropertyDisplayed(propertyName: string, type?: string, attempt = 0, maxAttempt = 3): Promise {
- try {
- if (attempt > maxAttempt) {
- return '';
- }
- const propertyType = type || 'textitem';
- await TestElement.byCss('[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]').waitVisible();
- return this.getPropertyText(propertyName);
- } catch (e) {
- Logger.log(`re trying custom property attempt :: ${attempt}`);
- return this.checkPropertyDisplayed(propertyName, type, attempt + 1, maxAttempt);
- }
- }
-
- async changeContentType(option: string, attempt = 0, maxAttempt = 3): Promise {
- const nodeType = TestElement.byCss(`div[data-automation-id="header-nodeType"] ${materialLocators.Select.trigger}`);
- if (attempt > maxAttempt) {
- Logger.error(`content type select option not found. check acs version may be lesser than 7.0.0`);
- return false;
- }
- try {
- await nodeType.waitVisible();
- if (await nodeType.isPresent()) {
- await nodeType.click();
- const typesDropDownPage = new DropdownPage(nodeType.elementFinder);
- await typesDropDownPage.checkOptionIsDisplayed(option);
- await typesDropDownPage.selectOption(option);
- return true;
- }
- return this.changeContentType(option, attempt + 1, maxAttempt);
- } catch (error) {
- Logger.log(`re trying content type options attempt :: ${attempt}`);
- await BrowserActions.closeMenuAndDialogs();
- return this.changeContentType(option, attempt + 1, maxAttempt);
- }
- }
-
- async checkConfirmDialogDisplayed(): Promise {
- const confirmButton = TestElement.byCss('adf-content-type-dialog');
- await confirmButton.waitPresent();
- }
-
- async applyNodeProperties(): Promise {
- const confirmButton = TestElement.byId('content-type-dialog-apply-button');
- await confirmButton.click();
- }
-
- async cancelNodeProperties(): Promise {
- const cancelButton = TestElement.byId('content-type-dialog-actions-cancel');
- await cancelButton.click();
- }
-
- async checkPropertyIsNotVisible(propertyName: string, type: string): Promise {
- await TestElement.byCss('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]').waitNotVisible();
- }
-
- async typeAspectName(aspectName): Promise {
- await BrowserActions.clearSendKeys(this.displayAspect, aspectName);
- }
-
- async clickApplyAspect(): Promise {
- await BrowserActions.click(this.applyAspect);
- }
-
- async clickSaveMetadata(): Promise {
- await BrowserActions.click(this.saveMetadataButton);
- }
-
- async clickResetMetadata(): Promise {
- await BrowserActions.click(this.resetMetadataButton);
- }
-
- async clickSaveGeneralMetadata(): Promise {
- await BrowserActions.click(this.saveGeneralMetadataButton);
- }
-
- async informationButtonIsDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsClickable(this.informationButton);
- }
-
- async informationButtonIsNotDisplayed(): Promise {
- await BrowserVisibility.waitUntilElementIsNotVisible(this.informationButton);
- }
-}
diff --git a/e2e/core/pages/navigation-bar.page.ts b/e2e/core/pages/navigation-bar.page.ts
deleted file mode 100644
index a2db913768..0000000000
--- a/e2e/core/pages/navigation-bar.page.ts
+++ /dev/null
@@ -1,112 +0,0 @@
-/*!
- * @license
- * Copyright © 2005-2024 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 { AppListCloudPage, BrowserActions, BrowserVisibility, Logger } from '@alfresco/adf-testing';
-import { $, browser, ElementFinder } from 'protractor';
-import { ProcessServicesPage } from '../../process-services/pages/process-services.page';
-
-export class NavigationBarPage {
- linkMenuChildrenContainer = $('.nestedMenu');
- processServicesNestedButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="App"]');
- processServicesCloudHomeButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Home"]');
- formButton = this.linkMenuChildrenContainer.$('.app-sidenav-link[data-automation-id="Form"]');
- logoutSection = $('[data-automation-id="adf-logout-section"]');
- personalFiles = $('div [title="Personal Files"]');
-
- getMenuItemLocator = (title: string) => $(`.app-sidenav-link[data-automation-id="${title}"]`);
-
- async clickNavigationBarItem(title: string, untilElementIsVisible?: ElementFinder): Promise