Compare commits

..
Author SHA1 Message Date
Denys Vuika fe9300c8e1 fixes 2023-10-09 15:32:21 +01:00
rbahirsheth fc147074ce [APPS-2136] search datetime range moment changes 2023-10-09 13:54:09 +05:30
5569 changed files with 200480 additions and 237630 deletions
+17
View File
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.
+4
View File
@@ -10,7 +10,10 @@ node_modules
scripts
src
lib
integration
tools
demo-shell/src/
demo-shell/resources/
/angular.json
/desktop.ini
/cspell.json
@@ -18,4 +21,5 @@ tools
/.stylelintignore
/ALFRESCOCORS.md
/CONTRIBUTING.md
/appveyor.yml
/BROWSER-SUPPORT.md
-13
View File
@@ -1,13 +0,0 @@
.angular
nxcache
node_modules
dist
coverage
.github
.vscode
scripts
/angular.json
docs/**/*.md
lib/js-api/docs/**/*.md
.storybook
webpack.config.js
+11 -39
View File
@@ -1,6 +1,5 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*',
'**/node_modules/**/*',
@@ -11,21 +10,20 @@ module.exports = {
'**/scripts',
'**/docs'
],
plugins: ['@nx'],
plugins: ['@nrwl/nx'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json'],
project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'],
createDefaultProgram: true
},
extends: [
'plugin:@nx/typescript',
'plugin:@nx/angular',
'plugin:@nrwl/nx/typescript',
'plugin:@nrwl/nx/angular',
'plugin:@cspell/recommended',
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/ng-cli-compat',
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:jsdoc/recommended-typescript-error'
],
@@ -80,7 +78,6 @@ module.exports = {
accessibility: 'explicit'
}
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
@@ -103,9 +100,8 @@ module.exports = {
}
],
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/no-empty-function': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
'prefer-promise-reject-errors': 'error',
'brace-style': 'off',
'@typescript-eslint/brace-style': 'error',
'comma-dangle': 'error',
@@ -164,7 +160,7 @@ module.exports = {
[
'/*!',
' * @license',
' * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.',
' * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.',
' *',
' * Licensed under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License.',
@@ -184,32 +180,8 @@ module.exports = {
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended', 'plugin:@angular-eslint/template/accessibility'],
parser: '@angular-eslint/template-parser',
rules: {
'@angular-eslint/template/prefer-self-closing-tags': 'error'
}
},
{
files: ['*.spec.ts'],
plugins: ['@alfresco/eslint-angular'],
rules: {
'@alfresco/eslint-angular/no-angular-material-selectors': 'error'
}
},
{
files: ['*.ts'],
extends: ['plugin:@angular-eslint/template/process-inline-templates'],
excludedFiles: ['*.spec.ts']
},
{
files: ['*.json'],
parser: 'jsonc-eslint-parser',
rules: {
'comma-dangle': ['error', 'never']
}
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {}
}
],
extends: ['plugin:storybook/recommended']
]
};
-3
View File
@@ -1,3 +0,0 @@
{
"extends": ["./.eslintrc.js"]
}
@@ -0,0 +1,90 @@
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/download-artifact@v3
with:
name: ${{ inputs.artifact-name }}
- run: ls
shell: bash
- name: Append content
uses: actions/github-script@v6
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@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}
@@ -0,0 +1,40 @@
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@v3
- run: echo "Artifact Extract"
shell: bash
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact-name }}
- id: extract
shell: bash
run: |
value=`cat ${{ inputs.file-name }}`
echo "print $value"
echo "result=$value" >> $GITHUB_OUTPUT
@@ -0,0 +1,32 @@
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@v3
- name: Create empty artifact
shell: bash
run:
echo "${{inputs.content}}" > ${{ inputs.file-name }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}
+2 -3
View File
@@ -60,9 +60,8 @@ runs:
echo "Setting up CI flags for Push develop patch"
else
echo "Setting up CI flags for Push on develop branch"
# base=$(git describe --tags $(git rev-list --tags --max-count=1))
# we publish always all the libs until we don't handle partial release
echo "NX_CALCULATION_FLAGS=--all" >> $GITHUB_ENV
base=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "NX_CALCULATION_FLAGS=--base=$base --head=$HEAD_HASH" >> $GITHUB_ENV
fi
echo "BREAK_ACTION=true" >> $GITHUB_ENV
+200
View File
@@ -0,0 +1,200 @@
name: "e2e"
description: "e2e"
inputs:
e2e-test-id:
description: "Test 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: #
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-test-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
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@v3
with:
name: e2e-artifact-output
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-test-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}"
+5 -3
View File
@@ -20,7 +20,9 @@ runs:
id: sha_out
run: |
if [[ -z $TAG_NPM ]]; then
echo "TAG_NPM not set, aborting"
exit 1
echo "TAG_NPM not set, aborting"
exit 1
fi
./scripts/github/build/npm-check-bundles.sh
ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
echo "check bundle on TAG_NPM='${TAG_NPM}' and ADF_VERSION='${ADF_VERSION}'"
./scripts/github/build/npm-check-bundles.sh -v ${ADF_VERSION}
+215 -260
View File
@@ -11,7 +11,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
@@ -35,25 +35,22 @@
}
},
"node_modules/@actions/github": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
"license": "MIT",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"dependencies": {
"@actions/http-client": "^2.2.0",
"@octokit/core": "^5.0.1",
"@octokit/plugin-paginate-rest": "^9.0.0",
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
"node_modules/@actions/http-client": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
"license": "MIT",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
"integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==",
"dependencies": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
"tunnel": "^0.0.6"
}
},
"node_modules/@actions/io": {
@@ -61,171 +58,105 @@
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
},
"node_modules/@fastify/busboy": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
"license": "MIT",
"engines": {
"node": ">=14"
}
},
"node_modules/@octokit/auth-token": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
"license": "MIT",
"engines": {
"node": ">= 18"
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"dependencies": {
"@octokit/types": "^6.0.3"
}
},
"node_modules/@octokit/core": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"license": "MIT",
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
"dependencies": {
"@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.1.0",
"@octokit/request": "^8.3.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.0.0",
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.3",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/endpoint": {
"version": "9.0.6",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
"license": "MIT",
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"dependencies": {
"@octokit/types": "^13.1.0",
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/graphql": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
"license": "MIT",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"dependencies": {
"@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0",
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
"license": "MIT"
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
"license": "MIT",
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
"@octokit/types": "^6.40.0"
},
"peerDependencies": {
"@octokit/core": "5"
}
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^20.0.0"
"@octokit/core": ">=2"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "10.4.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
"license": "MIT",
"version": "5.16.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
"@octokit/types": "^6.39.0",
"deprecation": "^2.3.1"
},
"peerDependencies": {
"@octokit/core": "5"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
"license": "MIT"
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^20.0.0"
"@octokit/core": ">=3"
}
},
"node_modules/@octokit/request": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz",
"integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==",
"license": "MIT",
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"dependencies": {
"@octokit/endpoint": "^9.0.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.1.0",
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/request-error": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
"license": "MIT",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"dependencies": {
"@octokit/types": "^13.1.0",
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
"@octokit/openapi-types": "^12.11.0"
}
},
"node_modules/@vercel/ncc": {
@@ -240,24 +171,53 @@
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
"license": "Apache-2.0"
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
"license": "ISC"
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
@@ -266,23 +226,10 @@
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/undici": {
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
}
},
"node_modules/universal-user-agent": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==",
"license": "ISC"
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"node_modules/uuid": {
"version": "8.3.2",
@@ -292,11 +239,24 @@
"uuid": "dist/bin/uuid"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"license": "ISC"
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
},
"dependencies": {
@@ -318,23 +278,22 @@
}
},
"@actions/github": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"requires": {
"@actions/http-client": "^2.2.0",
"@octokit/core": "^5.0.1",
"@octokit/plugin-paginate-rest": "^9.0.0",
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
"@actions/http-client": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
"integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==",
"requires": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
"tunnel": "^0.0.6"
}
},
"@actions/io": {
@@ -342,127 +301,99 @@
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
},
"@fastify/busboy": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="
},
"@octokit/auth-token": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA=="
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"requires": {
"@octokit/types": "^6.0.3"
}
},
"@octokit/core": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
"requires": {
"@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.1.0",
"@octokit/request": "^8.3.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.0.0",
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.3",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/endpoint": {
"version": "9.0.6",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"requires": {
"@octokit/types": "^13.1.0",
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/graphql": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"requires": {
"@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0",
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/openapi-types": {
"version": "23.0.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
},
"@octokit/plugin-paginate-rest": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"requires": {
"@octokit/types": "^12.6.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
},
"@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"requires": {
"@octokit/openapi-types": "^20.0.0"
}
}
"@octokit/types": "^6.40.0"
}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "10.4.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
"version": "5.16.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
"requires": {
"@octokit/types": "^12.6.0"
},
"dependencies": {
"@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
},
"@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"requires": {
"@octokit/openapi-types": "^20.0.0"
}
}
"@octokit/types": "^6.39.0",
"deprecation": "^2.3.1"
}
},
"@octokit/request": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz",
"integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==",
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"requires": {
"@octokit/endpoint": "^9.0.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.1.0",
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/request-error": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"requires": {
"@octokit/types": "^13.1.0",
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
"@octokit/openapi-types": "^12.11.0"
}
},
"@vercel/ncc": {
@@ -481,6 +412,19 @@
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -489,29 +433,40 @@
"wrappy": "1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
},
"undici": {
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"requires": {
"@fastify/busboy": "^2.0.0"
}
},
"universal-user-agent": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -12,7 +12,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
+13
View File
@@ -0,0 +1,13 @@
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
+4 -4
View File
@@ -20,18 +20,18 @@ runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: get latest tag sha
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@c1236aee36bb9b35c5972819fcf8a4d07572e6cd # v8.16.0
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@v1.29.0
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
uses: actions/cache@v3
env:
cache-name: node-modules-cache
with:
@@ -43,7 +43,7 @@ runs:
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
uses: actions/cache@v3
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
+1 -1
View File
@@ -18,7 +18,7 @@ runs:
steps:
- name: Append group
id: group
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@v6
env:
affectedLib: ${{ inputs.affected }}
with:
+3 -2
View File
@@ -1,5 +1,6 @@
name: "CodeQL config"
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
- 'e2e/resources/**/*.*'
- 'docs/**/*.*'
+25 -66
View File
@@ -1,72 +1,31 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "07:00"
open-pull-requests-limit: 5
target-branch: develop
groups:
angular:
patterns:
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "07:00"
open-pull-requests-limit: 5
target-branch: develop
groups:
- label: "Angular Updates"
packages:
- "@angular/*"
angular-devkit:
patterns:
version: "widen"
- label: "Angular-devkit Updates"
packages:
- "@angular-devkit/*"
ngrx:
patterns:
version: "widen"
- label: "ngrx Updates"
packages:
- "@ngrx/*"
nrwl:
patterns:
version: "widen"
- label: "nrwl Updates"
packages:
- "@nrwl/*"
ignore:
- dependency-name: "pdfjs-dist"
- dependency-name: "@types/*"
- dependency-name: "typescript"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/before-install"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/download-node-modules-and-artifacts"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/enable-dryrun"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/get-latest-tag-sha"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/npm-check-bundle"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/print-affected-libs"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/set-npm-tag"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/setup"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/slack-group-area"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/upload-node-modules-and-artifacts"
schedule:
interval: "weekly"
version: "widen"
ignore:
- dependency-name: "pdfjs-dist"
- dependency-name: "@types/*"
- dependency-name: "typescript"
+8 -8
View File
@@ -4,14 +4,14 @@ on:
push:
branches: [develop, master]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
- 'e2e/resources/**/*.*'
- 'docs/**/*.*'
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
- 'e2e/resources/**/*.*'
- 'docs/**/*.*'
schedule:
- cron: '0 5 * * 0'
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -30,7 +30,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript
@@ -39,7 +39,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/autobuild@v2
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -53,4 +53,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/analyze@v2
+87
View File
@@ -0,0 +1,87 @@
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@v3
- 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
+40 -3
View File
@@ -25,22 +25,59 @@ 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:
@@ -54,18 +91,18 @@ jobs:
needs: release
timeout-minutes: 20
name: "Release tag"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: $BOT_GITHUB_TOKEN
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- name: install NPM
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: "Release tag"
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
if: github.event.registry_package.package_type == 'npm' && github.event.registry_package.name == 'adf-core'
steps:
- name: Dispatch event to monorepo
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
retries: 3
-23
View File
@@ -1,23 +0,0 @@
name: Pull Translations from Crowdin
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
pull-from-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Pull translations from Crowdin
uses: crowdin/github-action@2cc7959c565767d6bc118118d6df3b63bf361370 # v2.6.1
with:
upload_sources: false
download_translations: true
create_pull_request: true
localization_branch_name: automated-translations-update
pull_request_title: "GH auto: Automated Update of Translations from Crowdin"
pull_request_base_branch_name: develop
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
+265 -39
View File
@@ -11,7 +11,7 @@ on:
devel:
description: 'devel'
required: false
type: boolean
type: string
default: false
cron-run:
description: 'disables jobs which should not run when cron runs e2es'
@@ -42,29 +42,63 @@ 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:
runs-on: ubuntu-latest
check-package-lock:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@25ed13d0628a1601b4b44048e63cc4328ed03633 # v3.0.22
uses: actions/checkout@v3
- name: Check package-lock.json version
run: |
@@ -76,18 +110,18 @@ jobs:
fi
check-if-pr-is-approved:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@c1236aee36bb9b35c5972819fcf8a4d07572e6cd # v8.16.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.36.0
- name: Save commit message
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@c1236aee36bb9b35c5972819fcf8a4d07572e6cd # v8.16.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.36.0
- name: ci:force flag parser
shell: bash
@@ -101,8 +135,8 @@ jobs:
fi
- name: Get PR number
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' }}
uses: kamatama41/get-pr-number-action@0bcaab5752c0b699149e74667c8ce2f764cbb7fa # v0.9.1
if: ${{ github.event_name != 'schedule' }}
uses: kamatama41/get-pr-number-action@5c77b38a1b4974ebf8a9521a689f38a5898eadd6
id: action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -130,7 +164,8 @@ jobs:
echo -e "\033[32mCommit by ${{ github.actor }}. No need for approval.\033[0m"
skip_check="true"
fi
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ "${{ github.event_name }}" == "schedule" ]; then
echo -e "\033[32mSchedule event\033[0m"
skip_check="true"
fi
@@ -157,46 +192,45 @@ jobs:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Setup"
runs-on: ubuntu-latest
needs: [check-if-pr-is-approved, pre-checks]
runs-on: ubuntu-22.04
needs: [check-if-pr-is-approved, check-package-lock]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
npx nx run testing:bundle
- run: npx nx print-affected $NX_CALCULATION_FLAGS
- uses: ./.github/actions/upload-node-modules-and-artifacts
unit-tests:
timeout-minutes: 30
name: "Unit tests: ${{ matrix.unit-tests.name }}"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [setup]
strategy:
fail-fast: false
# max-parallel: 4
matrix:
unit-tests:
- name: js-api
exclude: "core,insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular"
- name: content-services
exclude: "insights,core,extensions,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
exclude: "insights,core,extensions,process-services,process-services-cloud,eslint-plugin-eslint-angular"
- name: core
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular"
- name: insights
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular,js-api"
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular"
- name: process-services
exclude: "core,extensions,content-services,process-services-cloud,insights,eslint-plugin-eslint-angular,js-api"
- name: process-services-cloud
exclude: "insights,core,extensions,content-services,process-services$,eslint-plugin-eslint-angular,js-api"
exclude: "core,extensions,content-services,process-services-cloud,insights,eslint-plugin-eslint-angular"
- name: process-cloud
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular"
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -209,11 +243,11 @@ jobs:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Lint"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -224,31 +258,215 @@ jobs:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Build libs"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- run: NX_REJECT_UNKNOWN_LOCAL_CACHE=0 npx nx affected:build $NX_CALCULATION_FLAGS --prod
- run: NX_REJECT_UNKNOWN_LOCAL_CACHE=0 npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci
- 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-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
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-22.04
strategy:
fail-fast: false
# max-parallel: 4
matrix:
e2e-test:
- description: "Core"
test-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"
folder: "content-services/components"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Directives"
test-id: "content-services"
folder: "content-services/directives"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Document List"
test-id: "content-services"
folder: "content-services/document-list"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Metadata"
test-id: "content-services"
folder: "content-services/metadata"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Content: Upload and Versioning"
test-id: "content-services"
folder: "content-services/upload"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Search"
test-id: "content-services"
folder: "search"
provider: "ECM"
auth: "BASIC"
check-cs-env: "true"
deps: "testing"
- description: "Process: Form"
test-id: "process-services"
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"
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"
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"
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"
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: People"
test-id: "process-services-cloud"
folder: "process-services-cloud/people"
provider: "ALL"
auth: "OAUTH"
apa-proxy: true
check-cs-env: "true"
check-ps-cloud-env: "true"
deps: "testing"
- description: "Process Cloud: Process"
test-id: "process-services-cloud"
folder: "process-services-cloud/process"
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"
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"
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@v3
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: setup chrome
uses: ./.github/actions/setup-chrome
- name: e2e
uses: ./.github/actions/e2e
with:
e2e-test-id: ${{ matrix.e2e-test.test-id }}
e2e-test-folder: ${{ matrix.e2e-test.folder }}
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
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: PR contains forbidden labels
id: pr-forbidden
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@v6
with:
script: |
const issueHasLabels = require('./scripts/github/update/check-issue-has-label.js');
@@ -268,16 +486,23 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs]
needs: [check-if-pr-is-approved, check-package-lock, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@v3
- name: Log e2e result
id: e2e-result
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/actions/artifact-extract
with:
artifact-name: global-e2e-result
file-name: e2e-failures.txt
- name: identify-slack-group
id: groups
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/actions/slack-group-area
with:
affected: ${{ steps.e2e-result.outputs.result }}
- uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
- uses: slackapi/slack-github-action@v1.23.0
name: Nofify QA failure
if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
env:
@@ -294,3 +519,4 @@ jobs:
- name: workflow success
run: exit 0
if: ${{ contains(needs.*.result, 'success') }}
+2 -2
View File
@@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
uses: cirrus-actions/rebase@1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+52 -24
View File
@@ -22,26 +22,63 @@ 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:
timeout-minutes: 20
name: "Setup"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: set TAG_NPM BRANCH
shell: bash
@@ -50,7 +87,7 @@ jobs:
echo "Set TAG with name: ${TAG_NPM}"
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -60,20 +97,20 @@ jobs:
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
npx nx run testing:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
release-npm:
needs: [setup]
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -85,45 +122,36 @@ jobs:
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
- name: build libraries
run: |
set -u;
./scripts/update-version.sh -gnu || exit 1;
- name: Set migrations
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const setMigrations = require('./scripts/github/release/set-migrations.js');
setMigrations();
- name: Build libraries
run: |
npx nx run-many --target=build --prod --exclude="demoshell" --skip-nx-cache
npx nx run-many --target=pretheme
npx nx run-many --target=build-schematics
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
./scripts/update-version.sh -gnu -nextalpha|| exit 1;
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
- uses: actions/setup-node@v3
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
scope: '@alfresco'
- run: npx nx run-many --target=npm-publish --tag=branch|| exit 1
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=branch|| exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: actions/setup-node@v3
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
scope: '@alfresco'
- run: npx nx run-many --target=npm-publish --tag=branch || exit 1
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=branch || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
npm-check-bundle:
needs: [release-npm]
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
- uses: ./.github/actions/npm-check-bundle
+82 -75
View File
@@ -16,10 +16,6 @@ on:
- develop-patch*
- master-patch*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
@@ -32,32 +28,67 @@ 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:
timeout-minutes: 20
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
name: "Setup"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -67,18 +98,44 @@ jobs:
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
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-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
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
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 1
- run: git fetch --all
@@ -102,13 +159,13 @@ jobs:
needs: [setup]
timeout-minutes: 30
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -120,103 +177,53 @@ jobs:
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
- name: build libraries
run: |
set -u;
./scripts/github/build/bumpversion.sh
- name: Set migrations
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const setMigrations = require('./scripts/github/release/set-migrations.js');
setMigrations();
- name: build libraries
run: |
npx nx run-many -t build --prod --skip-nx-cache
npx nx run-many -t pretheme
npx nx run-many -t build-schematics
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
- uses: actions/setup-node@v3
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
scope: '@alfresco'
- run: npx nx run-many -t npm-publish --tag=$TAG_NPM || exit 1
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=$TAG_NPM || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: actions/setup-node@v3
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
scope: '@alfresco'
- run: npx nx run-many -t npm-publish --tag=$TAG_NPM || exit 1
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=$TAG_NPM || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
propagate:
needs: [release-npm]
if: ${{ contains(toJson(github.event.pull_request.labels.*.name), 'hxp-upstream') }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: HxP upstream invoke
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0
with:
repo: Alfresco/hxp-frontend-apps
ref: develop
workflow: upstream-adf.yml
token: ${{ secrets.ALFRESCO_BUILD_GH_TOKEN }}
wait-for-completion: false
inputs: >
{
"tag_version": "alpha"
}
npm-check-bundle:
needs: [release-npm]
timeout-minutes: 15
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@v3
- uses: ./.github/actions/npm-check-bundle
push-translation-keys-to-crowdin:
name: Push translations keys to Crowdin
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
needs: [setup]
permissions:
contents: read
packages: read
actions: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Push Source Files to Crowdin
uses: crowdin/github-action@2cc7959c565767d6bc118118d6df3b63bf361370 # v2.6.1
with:
upload_sources: true
upload_sources_args: --delete-obsolete
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
finalize:
if: always()
runs-on: ubuntu-latest
name: Final Results
needs: [release-storybook, release-npm, npm-check-bundle]
needs: [release-demoshell, release-storybook, release-npm, npm-check-bundle]
steps:
- uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
name: Nofify FE eng-guild-front-end workflow failed
- uses: slackapi/slack-github-action@v1.23.0
name: Nofify FE hxp-front-end-apps workflow failed
if: ${{ contains(toJson(needs.*.result), 'failure') }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C016SMNNL8L' #eng-guild-front-end
slack-message: "🔴 Warning: The release workflow of alfresco-ng2-components pipe failed\n Author username: ${{ github.event.pull_request.user.login }}\n Workflow run <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n>"
channel-id: 'C04N93XU491' #hxp-front-end-apps
slack-message: "🔴 Warning: The release workflow of alfresco-ng2-components pipe failed\n Author: name:${{ github.event.pusher.name }}\n Workflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n>"
+214
View File
@@ -0,0 +1,214 @@
name: Upstream js
on:
schedule:
- cron: '0 */3 * * *' # “At minute 0 past every 3rd hour.”
workflow_dispatch:
inputs:
tag_version:
description: image tag
type: choice
required: true
options:
- alpha
- latest
default: alpha
jobs:
upstream:
runs-on: ubuntu-latest
outputs:
hasAtLeastOneNewVersion: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}
hasNewVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
latestVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
hasAtLeastOneNewVersionWithoutPR: ${{ steps.checkPrAlreadyExist.outputs.hasAtLeastOneNewVersionWithoutPR }}
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- id: fetchLatestPkg
name: Fetch the latest package version
uses: actions/github-script@v6
env:
TAG_VERSION: ${{ inputs.tag_version }}
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
script: |
const tagVersion = process.env.TAG_VERSION;
console.log('tagVersion:',tagVersion);
const getLatestVersionOf = require('./scripts/github/update/latest-version-of.js');
const { hasVersionNew: hasVersionNewJS, latestVersion: latestVersionJS } = await getLatestVersionOf({github, context, dependencyName: 'js-api', tagVersion});
console.log('hasVersionNewJS', hasVersionNewJS)
console.log('latestVersionJS', latestVersionJS)
if (hasVersionNewJS === 'true' ) {
core.setOutput('hasAtLeastOneNewVersion', 'true');
core.setOutput('hasVersionNewJS', 'true');
core.setOutput('latestVersionJS', latestVersionJS);
} else {
core.setOutput('hasAtLeastOneNewVersion', 'false');
console.log('No new version available, skipping upstream!')
}
- name: Check value after
run: |
echo "The value hasAtLeastOneNewVersion is: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}"
echo "The value hasVersionNewJS is: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}"
echo "The value latestVersionJS is: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}"
- id: checkPrAlreadyExist
name: Check PR with latest already exist
if: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: actions/github-script@v6
env:
HAS_NEW_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
LATEST_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const hasVersionNewJS = process.env.HAS_NEW_JS_VERSION;
const latestVersionJS = process.env.LATEST_JS_VERSION;
const checkPRAlreadyExist = require('./scripts/github/update/check-pr-already-exist.js');
let isPRWithLatestJSAlreadyAvailable = false;
if (hasVersionNewJS === 'true') {
isPRWithLatestJSAlreadyAvailable = await checkPRAlreadyExist({github, context, version: latestVersionJS});
console.log('isPRWithLatestJSAlreadyAvailable', isPRWithLatestJSAlreadyAvailable);
}
if (isPRWithLatestJSAlreadyAvailable) {
console.log('Warning: Upstream PR already exist, stop the migration execution!');
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'false');
} else {
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'true');
}
migrate:
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersionWithoutPR == 'true' }}
runs-on: ubuntu-latest
needs: upstream
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
fetch-depth: 1
- name: setup NPM
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: "General :: dbpci-install"
run: |
npm ci --ignore-scripts
- name: Migration
shell: bash
env:
IS_JS_AFFECTED: ${{ needs.upstream.outputs.hasNewVersionAvailableJS }}
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
BRANCH_TO_CREATE: "upstream-dependencies"
run: |
migrateDependenciesJS() {
echo "Update JS dependencies to: ${PACKAGE_VERSION_JS}"
echo "Calling migration JS"
npx nx migrate @alfresco/js-api@${PACKAGE_VERSION_JS}
echo "Migration JS done"
}
migrateLibDependenciesJS() {
eval projects=( "cli"
"core"
"content-services"
"process-services"
"process-services-cloud"
"insights"
"testing"
"extensions" )
projectslength=${#projects[@]}
for (( i=0; i<${projectslength}; i++ ));
do
echo "Update JS dependencies in adf-${projects[$i]} to: ${PACKAGE_VERSION_JS}"
DESTDIR="lib/${projects[$i]}"
sed -i "${sedi[@]}" "s/\"@alfresco\/js-api\": \".*\"/\"@alfresco\/js-api\": \">=${PACKAGE_VERSION_JS}\"/g" ${DESTDIR}/package.json
done
}
regeneratePackageLock() {
echo "Regenerate lock"
npm i --package-lock-only
echo "Package-lock done."
}
if git checkout ${BRANCH_TO_CREATE} 2>/dev/null ; then
git reset --hard origin/develop
echo "Reset branch"
fi
if [[ "$IS_JS_AFFECTED" == "true" ]]; then
migrateDependenciesJS
migrateLibDependenciesJS
fi
regeneratePackageLock
- name: Commit Code
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci:force][auto-commit] Update dependencies JS:${{ needs.upstream.outputs.latestVersionAvailableJS }}"
branch: upstream-dependencies
push_options: '--force'
create_branch: true
- name: Create a Pull request
uses: actions/github-script@v6
env:
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const { PACKAGE_VERSION_JS } = process.env
const BRANCH_TO_CREATE = 'upstream-dependencies';
const { data: prs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop'
});
if (prs.length < 1) {
const payloadPullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop',
body: `Automatic PR`
};
console.log('Payload: ',payloadPullRequest);
const { data: pr } = await github.rest.pulls.create(payloadPullRequest);
return pr.number;
} else {
const upstreamPrOpen = prs[0];
// override the title to contains the latest js dep number
const payloadUpdatePullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: upstreamPrOpen.number,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
};
await github.rest.pulls.update(payloadUpdatePullRequest);
return upstreamPrOpen.number;
}
console.log(`Trigger a dispatch event for the monorepo`);
+5 -1
View File
@@ -13,21 +13,25 @@ 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
.DS_Store
.angular
NX
.nx
+2 -2
View File
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
export NODE_OPTIONS=--max_old_space_size=8192
npx lint-staged
npm run affected:lint
-4
View File
@@ -1,4 +0,0 @@
{
"*.{ts,js}": ["prettier --write", "eslint"],
"*.{css,scss}": ["prettier --write", "stylelint --fix"]
}
+1 -1
View File
@@ -1 +1 @@
20.18.1
18
+4 -7
View File
@@ -1,10 +1,7 @@
module.exports = {
framework: {
name: '@storybook/angular',
options: {}
},
staticDirs: [],
docs: {},
stories: [],
addons: ['@chromatic-com/storybook']
addons: ['@storybook/addon-essentials'],
framework: '@storybook/angular',
staticDirs: [ { from: '../../../demo-shell/src/app.config.json', to: 'app.config.json' } ],
core: { builder: 'webpack5' }
};
-1
View File
@@ -2,4 +2,3 @@ export const parameters = {
docs: { inlineStories: true },
controls: { expanded: true }
};
export const tags = ['autodocs', 'autodocs', 'autodocs'];
-65
View File
@@ -1,65 +0,0 @@
{
"extends": ["stylelint-config-standard-scss"],
"rules": {
"color-function-notation": "legacy",
"alpha-value-notation": "number",
"color-no-invalid-hex": true,
"function-calc-no-unspaced-operator": true,
"function-name-case": "lower",
"function-url-quotes": "always",
"function-url-scheme-disallowed-list": [
"data"
],
"length-zero-no-unit": true,
"string-no-newline": true,
"unit-no-unknown": true,
"unit-allowed-list": [
"px",
"%",
"deg",
"ms",
"em",
"vh",
"vw",
"vmin",
"s",
"rem"
],
"shorthand-property-no-redundant-values": true,
"declaration-no-important": true,
"no-duplicate-at-import-rules": true,
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"declaration-block-single-line-max-declarations": 1,
"declaration-property-value-disallowed-list": [
{
"/.*/": [
"initial"
]
},
{
"message": "The `initial` value is not supported in IE."
}
],
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": [true, {
"ignorePseudoElements": ["ng-deep"]
}],
"selector-type-case": "lower",
"selector-max-id": 0,
"selector-class-pattern": [
"^_?(adf|adf-|app|app-|example-|demo-|textLayer|canvasWrapper|page)",
{
"resolveNestedSelectors": true
}
],
"scss/dollar-variable-empty-line-before": null,
"scss/at-rule-conditional-no-parentheses": null
}
}
+1 -1
View File
@@ -10,7 +10,7 @@
"name": "e2e",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"args": [
"./e2e/protractor.conf.js",
"`${workspaceFolder}/.vscode/closest-config-finder.sh ${file} e2e/protractor.conf.js`",
"--specs=${file}"
],
"envFile": "${workspaceFolder}/.env",
+3 -4
View File
@@ -22,15 +22,14 @@
"css.validate": false,
"scss.validate": false,
"stylelint.config": {
"extends": "./.stylelintrc.json"
"extends": "./stylelint-config"
},
"stylelint.configFile": ".stylelintrc.json",
"stylelint.configFile": "stylelint-config.json",
"stylelint.validate": [
"css",
"less",
"postcss",
"scss"
],
"editor.guides.indentation": true,
"typescript.tsdk": "node_modules/typescript/lib"
"editor.guides.indentation": true
}
+1 -1
View File
@@ -151,7 +151,7 @@ See the [Alfresco community page](https://community.alfresco.com/community/appli
If you want to completely enable CORS calls in your Content Services and Process Services,
please refer to the following Alfresco documents:
* [Enable Cross Origin Resource Sharing (CORS) in Alfresco Process Services](https://support.hyland.com/r/Alfresco/Alfresco-Process-Services/24.4/Alfresco-Process-Services/Configure/Overview/CORS)
* [Enable Cross Origin Resource Sharing (CORS) in Alfresco Process Services](http://docs.alfresco.com/process-services1.6/topics/enabling-cors.html)
* Enable Cross Origin Resource Sharing (CORS) in Alfresco Content Services
+6 -3
View File
@@ -45,11 +45,14 @@ Note: If you need more information about how to sync your fork, see [this page](
## Code style
The code style for ADF follows the [Angular style guide](https://angular.io/guide/styleguide) plus some internal rules.
You dont have to worry too much about those rules because they are automatically checked by tslint/codelyzer/adf-rules.
If your code is not compliant with one of these rules you will see an error when you build the project along with some help on how to fix it.
The codebase is also checked with:
The ADF-Rules are as follows:
- ESLint tool
- Stylelint tool
* File name component/directive cannot start with Alfresco/Activiti/adf - this rule is to help developers find files easily
* Class names cannot start with Alfresco/Activiti/adf for the same reason as above
* scss is mandatory. All the classes need to have the `adf-` prefix
## Test guide
+6
View File
@@ -4,6 +4,10 @@ FROM node:18.16-alpine3.17 AS builder
WORKDIR /usr/src/alfresco
COPY package.json package.json
RUN mkdir -p ./licenses && \
yarn licenses list > ./licenses/licenses.txt && \
yarn licenses generate-disclaimer > ./licenses/disclaimer.txt
# 2. Generate image
FROM nginxinc/nginx-unprivileged:1.21-alpine
@@ -15,9 +19,11 @@ 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
COPY --from=builder /usr/src/alfresco/licenses /usr/share/nginx/html/
USER root
RUN chmod a+w -R /etc/nginx/conf.d
+18 -8
View File
@@ -13,7 +13,7 @@ Node: 18.x
NPM: 9.x
```
Also, check out the tutorial: [Creating your first ADF Application](docs/tutorials/creating-your-first-adf-application.md)
Also, check out the tutorial [Creating your first ADF Application](docs/tutorials/creating-your-first-adf-application.md)
for full details on what you may need to install before using ADF.
### See also
@@ -28,7 +28,6 @@ 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)
@@ -37,13 +36,24 @@ 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 |
+1074
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

-13
View File
@@ -1,13 +0,0 @@
"project_id": "11"
"api_token_env": "CROWDIN_TOKEN"
"base_path": "."
"base_url": "https://hyland.api.crowdin.com"
"preserve_hierarchy": true
"files": [
{
"source": "/**/**/i18n/en.json",
"translation": "/%original_path%/%two_letters_code%.%file_extension%",
"export_only_approved": "true",
"update_option": "update_as_unapproved"
}
]
+4 -8
View File
@@ -1,5 +1,5 @@
{
"version": "0.2",
"version": "0.1",
"language": "en",
"words": [
"activiti",
@@ -77,6 +77,7 @@
"lastname",
"listgrid",
"mapitem",
"markdownlint",
"mimetype",
"mincount",
"minlength",
@@ -90,7 +91,6 @@
"numbervisibilityprocess",
"OAUTHCONFIG",
"oidc",
"overridable",
"pdfjs",
"penta",
"printf",
@@ -138,14 +138,10 @@
"waypoint",
"waypoints",
"webm",
"webscript",
"Whitespaces",
"xdescribe",
"xsrf",
"BPMECM",
"berseria",
"zestiria",
"validatable",
"edjs"
"xsrf"
],
"dictionaries": [
"html",
+95
View File
@@ -0,0 +1,95 @@
/**
* 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("@nrwl/workspace");
/**
* 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"
});
}
+73
View File
@@ -0,0 +1,73 @@
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: {}
}
]
};
+59
View File
@@ -0,0 +1,59 @@
# 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
+75
View File
@@ -0,0 +1,75 @@
# 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
```
+31
View File
@@ -0,0 +1,31 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MyAppPage } from './app.po';
describe('MyApp App', () => {
let page: MyAppPage;
beforeEach(() => {
page = new MyAppPage();
});
it('should display toolbar', () => {
page.navigateTo();
expect(page.getToolbar()).toBeDefined();
});
});
+28
View File
@@ -0,0 +1,28 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { browser, element, by } from 'protractor';
export class MyAppPage {
navigateTo() {
return browser.get('/');
}
getToolbar() {
return element(by.tagName('adf-toolbar'));
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": ["jasmine", "jasminewd2", "node"]
}
}
+56
View File
@@ -0,0 +1,56 @@
// 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
});
};
+21
View File
@@ -0,0 +1,21 @@
{
"name": "Alfresco-ADF-Angular-Demo",
"description": "Demo shell for Alfresco Angular components",
"version": "6.3.0",
"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
}
+76
View File
@@ -0,0 +1,76 @@
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,
},
}
}
};
+15
View File
@@ -0,0 +1,15 @@
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)
};
+39
View File
@@ -0,0 +1,39 @@
{
"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"
}
}
}
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
<div class="app-demo-app-container">
<router-outlet></router-outlet>
<router-outlet name="overlay"></router-outlet>
</div>
+17
View File
@@ -0,0 +1,17 @@
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%;
}
[dir='rtl'] .mat-icon {
transform: scale(-1, 1);
}
+62
View File
@@ -0,0 +1,62 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
import {
AuthenticationService,
AlfrescoApiService,
PageTitleService
} from '@alfresco/adf-core';
import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
@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 alfrescoApiService: AlfrescoApiService,
private authenticationService: AuthenticationService,
private router: Router,
private dialogRef: MatDialog) {
}
ngOnInit() {
this.pageTitleService.setTitle('title');
this.alfrescoApiService.getInstance().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']);
}
}
});
}
}
+151
View File
@@ -0,0 +1,151 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgChartsModule } from 'ng2-charts';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateModule } from '@ngx-translate/core';
import {
AppConfigService,
DebugAppConfigService,
CoreModule,
CoreAutomationService,
AuthModule,
provideTranslations
} from '@alfresco/adf-core';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { AppComponent } from './app.component';
import { MaterialModule } from './material.module';
import { LogoutComponent } from './components/logout/logout.component';
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import { HomeComponent } from './components/home/home.component';
import { SearchBarComponent } from './components/search/search-bar.component';
import { SearchResultComponent } from './components/search/search-result.component';
import { FormComponent } from './components/form/form.component';
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 { FilesComponent } from './components/files/files.component';
import { VersionManagerDialogAdapterComponent } from './components/files/version-manager-dialog-adapter.component';
import { MetadataDialogAdapterComponent } from './components/files/metadata-dialog-adapter.component';
import { appRoutes } from './app.routes';
import { TaskAttachmentsComponent } from './components/process-service/task-attachments.component';
import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component';
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
import { ContentModule } from '@alfresco/adf-content-services';
import { InsightsModule } from '@alfresco/adf-insights';
import { ProcessModule } from '@alfresco/adf-process-services';
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
import { CloudLayoutComponent } from './components/cloud/cloud-layout.component';
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
import { TasksCloudDemoComponent } from './components/cloud/tasks-cloud-demo.component';
import { ProcessesCloudDemoComponent } from './components/cloud/processes-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 { StartTaskCloudDemoComponent } from './components/cloud/start-task-cloud-demo.component';
import { StartProcessCloudDemoComponent } from './components/cloud/start-process-cloud-demo.component';
import { CloudBreadcrumbsComponent } from './components/cloud/cloud-breadcrumb-component';
import { CloudFiltersDemoComponent } from './components/cloud/cloud-filters-demo.component';
import { FormCloudDemoComponent } from './components/app-layout/cloud/form-demo/cloud-form-demo.component';
import { environment } from '../environments/environment';
import { AppCloudSharedModule } from './components/cloud/shared/cloud.shared.module';
import { DemoErrorComponent } from './components/error/demo-error.component';
import { ProcessServicesCloudModule } from '@alfresco/adf-process-services-cloud';
import { RouterModule } from '@angular/router';
import { ProcessCloudLayoutComponent } from './components/cloud/process-cloud-layout.component';
import { CustomEditorComponent, CustomWidgetComponent } from './components/cloud/custom-form-components/custom-editor.component';
import { SearchFilterChipsComponent } from './components/search/search-filter-chips.component';
import { UserInfoComponent } from './components/app-layout/user-info/user-info.component';
@NgModule({
imports: [
BrowserModule,
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
ReactiveFormsModule,
RouterModule.forRoot(appRoutes, { useHash: true, relativeLinkResolution: 'legacy' }),
...(environment.oidc ? [AuthModule.forRoot({ useHash: true })] : []),
FormsModule,
HttpClientModule,
MaterialModule,
TranslateModule.forRoot(),
CoreModule.forRoot(),
ContentModule.forRoot(),
InsightsModule.forRoot(),
ProcessModule.forRoot(),
ProcessServicesCloudModule.forRoot(),
ExtensionsModule.forRoot(),
NgChartsModule,
AppCloudSharedModule,
MonacoEditorModule.forRoot()
],
declarations: [
AppComponent,
LogoutComponent,
AppLayoutComponent,
UserInfoComponent,
HomeComponent,
SearchBarComponent,
SearchResultComponent,
ProcessServiceComponent,
ShowDiagramComponent,
FormViewerComponent,
FormNodeViewerComponent,
AppsViewComponent,
FilesComponent,
FormComponent,
VersionManagerDialogAdapterComponent,
MetadataDialogAdapterComponent,
TaskAttachmentsComponent,
ProcessAttachmentsComponent,
DemoPermissionComponent,
DemoErrorComponent,
TreeViewSampleComponent,
CloudLayoutComponent,
AppsCloudDemoComponent,
TasksCloudDemoComponent,
ProcessesCloudDemoComponent,
TaskDetailsCloudDemoComponent,
CloudViewerComponent,
ProcessDetailsCloudDemoComponent,
StartTaskCloudDemoComponent,
StartProcessCloudDemoComponent,
CloudBreadcrumbsComponent,
CloudFiltersDemoComponent,
FormCloudDemoComponent,
CustomEditorComponent,
CustomWidgetComponent,
ProcessCloudLayoutComponent,
SearchFilterChipsComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
provideTranslations('app', 'resources')
],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(automationService: CoreAutomationService) {
automationService.setup();
}
}
+290
View File
@@ -0,0 +1,290 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { 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 { FormComponent } from './components/form/form.component';
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
import { AppComponent } from './app.component';
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
import { AppsCloudDemoComponent } from './components/cloud/apps-cloud-demo.component';
import { CloudLayoutComponent } from './components/cloud/cloud-layout.component';
import { TasksCloudDemoComponent } from './components/cloud/tasks-cloud-demo.component';
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 { SearchFilterChipsComponent } from './components/search/search-filter-chips.component';
export const appRoutes: Routes = [
{ path: 'login', loadChildren: () => import('./components/login/login.module').then(m => m.AppLoginModule) },
{ path: 'logout', component: LogoutComponent },
{
path: 'settings',
loadChildren: () => import('./components/settings/settings.module').then(m => m.AppSettingsModule)
},
{
path: 'files/:nodeId/view',
component: AppComponent,
canActivate: [AuthGuardEcm],
canActivateChild: [AuthGuardEcm],
outlet: 'overlay',
loadChildren: () => import('./components/file-view/file-view.module').then(m => m.FileViewModule)
},
{
path: 'files/:nodeId/:versionId/view',
component: AppComponent,
canActivate: [AuthGuardEcm],
canActivateChild: [AuthGuardEcm],
outlet: 'overlay',
loadChildren: () => import('./components/file-view/file-view.module').then(m => m.FileViewModule)
},
{
path: 'preview/blob',
component: AppComponent,
outlet: 'overlay',
pathMatch: 'full',
loadChildren: () => import('./components/file-view/file-view.module').then(m => m.FileViewModule)
},
{
path: '',
component: AppLayoutComponent,
canActivate: [AuthGuard],
children: [
{
path: '',
redirectTo: `/home`,
pathMatch: 'full'
},
{
path: 'card-view',
loadChildren: () => import('./components/card-view/card-view.module').then(m => m.AppCardViewModule)
},
{
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',
loadChildren: () => import('./components/settings/settings.module').then(m => m.AppSettingsModule)
},
{
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: SearchFilterChipsComponent,
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: 'treeview',
component: TreeViewSampleComponent,
canActivate: [AuthGuardEcm]
},
{ path: 'form-cloud', component: FormCloudDemoComponent },
{ path: 'form', component: FormComponent },
{
path: 'task-list',
canActivate: [AuthGuardBpm],
loadChildren: () => import('./components/task-list-demo/task-list.module').then(m => m.AppTaskListModule)
},
{
path: 'process-list',
canActivate: [AuthGuardBpm],
loadChildren: () => import('./components/process-list-demo/process-list.module').then(m => m.AppProcessListModule)
},
{
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'
}
];
@@ -0,0 +1,81 @@
<adf-sidenav-layout
[sidenavMin]="70"
[sidenavMax]="220"
[stepOver]="780"
data-automation-id="sidenav-layout">
<adf-sidenav-layout-header>
<ng-template>
<adf-layout-header
id="adf-header"
title="ADF Demo Application"
redirectUrl="/home"
tooltip="ADF Demo Application"
[showSidenavToggle]="false">
<div class="app-layout-menu-spacer"></div>
<app-search-bar></app-search-bar>
<app-shell-user-info [menuPositionX]="'before'" [menuPositionY]="'above'"></app-shell-user-info>
</adf-layout-header>
</ng-template>
</adf-sidenav-layout-header>
<adf-sidenav-layout-navigation>
<ng-template let-isMenuMinimized="isMenuMinimized">
<mat-nav-list class="app-sidenav-linklist">
<ng-container *ngFor="let link of links">
<ng-container *ngIf="link.children">
<mat-list-item (click)="trigger.openMenu()" [attr.data-automation-id]="link.title | translate" class="app-sidenav-link">
<mat-icon matListIcon>{{link.icon}}</mat-icon>
<span matLine *ngIf="!isMenuMinimized()">{{link.title | translate }}</span>
<mat-icon class="app-sidenav-link__expand-button" [matMenuTriggerData]="{links: link.children}"
rippleTrigger mat-icon-button #trigger="matMenuTrigger"
[matMenuTriggerFor]="nestedMenu">arrow_right</mat-icon>
</mat-list-item>
</ng-container>
<ng-container *ngIf="!link.children">
<mat-list-item [routerLink]="link.href"
routerLinkActive="app-sidenav-link--active" [routerLinkActiveOptions]="{ exact: true }"
[attr.data-automation-id]="link.title | translate" class="app-sidenav-link">
<mat-icon matListIcon >{{link.icon}}</mat-icon>
<span matLine *ngIf="!isMenuMinimized()">{{link.title | translate }}</span>
</mat-list-item>
</ng-container>
</ng-container>
<mat-list-item adf-logout [enableRedirect]="enableRedirect" redirectUri="/logout" class="app-sidenav-link" data-automation-id="Logout" >
<mat-icon matListIcon>exit_to_app</mat-icon>
<span matLine *ngIf="!isMenuMinimized()">Logout</span>
</mat-list-item>
</mat-nav-list>
</ng-template>
</adf-sidenav-layout-navigation>
<adf-sidenav-layout-content>
<ng-template>
<router-outlet></router-outlet>
</ng-template>
</adf-sidenav-layout-content>
</adf-sidenav-layout>
<mat-menu #nestedMenu="matMenu" xPosition="after" class="nestedMenu">
<ng-template matMenuContent let-links="links">
<button mat-menu-item *ngFor="let link of links"
class="app-sidenav-link"
[attr.data-automation-id]="link.title | translate"
routerLinkActive="app-sidenav-link--active"
[routerLink]="link.href"
[routerLinkActiveOptions]="{ exact: true }">
<mat-icon matListIcon>{{link.icon}}</mat-icon>
{{ link.title | translate }}
</button>
</ng-template>
</mat-menu>
<adf-file-uploading-dialog #fileDialog position="left"></adf-file-uploading-dialog>
@@ -0,0 +1,36 @@
adf-file-uploading-dialog {
z-index: 1100;
}
.app-layout {
display: flex;
flex: 1;
min-width: 320px;
height: 100%;
.app-sidenav-link--active {
color: var(--theme-primary-color);
}
.app-sidenav-link {
.mat-list-text {
font-size: 14px;
white-space: nowrap;
min-width: 120px;
padding: 0 10px;
}
}
&-menu-spacer {
flex: 1 1 auto;
}
}
mat-sidenav-content > div {
display: flex;
height: 100%;
> div {
flex: auto;
}
}
@@ -0,0 +1,56 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { AlfrescoApiService } from '@alfresco/adf-core';
@Component({
templateUrl: './app-layout.component.html',
styleUrls: ['./app-layout.component.scss'],
host: { class: 'app-layout' },
encapsulation: ViewEncapsulation.None
})
export class AppLayoutComponent {
links: Array<any> = [
{ 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' },
{ href: '/treeview', icon: 'nature', title: 'Tree View' }
];
enableRedirect = true;
constructor(private alfrescoApiService: AlfrescoApiService) {
if (this.alfrescoApiService.getInstance().isOauthConfiguration()) {
this.enableRedirect = false;
}
}
}
@@ -0,0 +1,47 @@
<div class="main-content">
<mat-tab-group [animationDuration]="0">
<mat-tab label="Form" class="form-cloud-render">
<div class="app-form-container">
<adf-cloud-form
[showRefreshButton]="false"
[form]="form"
(formSaved)="onFormSaved()"
(formError)="logErrors($event)">
</adf-cloud-form>
</div>
<div class="app-console" #console>
<h3>Error log:</h3>
<p *ngFor="let error of errorFields">Error {{ error.name }} {{error.validationSummary.message | translate}}</p>
</div>
</mat-tab>
<mat-tab label="Editor" class="form-cloud-editor">
<ngx-monaco-editor
id="adf-form-config-editor"
class="app-form-config-editor"
[options]="editorOptions"
[(ngModel)]="formConfig"
(onInit)="onInitFormEditor($event)">
</ngx-monaco-editor>
<div class="app-form-editor-buttons">
<button mat-raised-button id="app-form-config-save" (click)="onSaveFormConfig()">Save form config</button>
<button mat-raised-button id="app-form-config-clear" (click)="onClearFormConfig()">Clear form config</button>
<a mat-raised-button class="app-upload-config-button">
<mat-icon>file_upload</mat-icon>
<label for="upload-config-file">Upload JSON File</label>
<input
id="upload-config-file"
data-automation-id="upload-single-file"
type="file"
name="uploadConfig"
accept=".json"
(change)="onConfigAdded($event)">
</a>
</div>
</mat-tab>
</mat-tab-group>
</div>
@@ -0,0 +1,48 @@
.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 !important;
}
.app-form-editor-buttons {
& > .mat-raised-button {
margin-right: 5px;
}
}
.app-upload-config-button {
input {
cursor: pointer;
right: 0;
opacity: 0;
position: absolute;
top: 0;
z-index: 4;
}
}
@@ -0,0 +1,133 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
import {
CoreAutomationService,
FormFieldModel,
FormModel,
FormRenderingService,
NotificationService
} from '@alfresco/adf-core';
import {
CloudFormRenderingService,
FormCloudService
} from '@alfresco/adf-process-services-cloud';
import { Subscription } from 'rxjs';
import {
CustomEditorComponent,
CustomWidgetComponent
} from '../../../cloud/custom-form-components/custom-editor.component';
@Component({
templateUrl: './cloud-form-demo.component.html',
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 = '';
}
}
@@ -0,0 +1,21 @@
<ng-container>
<adf-content-user-info
*ngIf="mode === userInfoMode.CONTENT || mode === userInfoMode.CONTENT_SSO"
[ecmUser]="ecmUser$ | async"
[identityUser]="identityUser$ | async"
[isLoggedIn]="isLoggedIn"
[mode]="mode"
></adf-content-user-info>
<adf-identity-user-info
*ngIf="mode === userInfoMode.SSO"
[identityUser]="identityUser$ | async"
[isLoggedIn]="isLoggedIn"
></adf-identity-user-info>
<adf-process-user-info
*ngIf="mode === userInfoMode.PROCESS || mode === userInfoMode.ALL"
[bpmUser]="bpmUser$ | async"
[ecmUser]="ecmUser$ | async"
[isLoggedIn]="isLoggedIn"
[mode]="mode"
></adf-process-user-info>
</ng-container>
@@ -0,0 +1,110 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
import { BpmUserModel, PeopleProcessService } from '@alfresco/adf-process-services';
import { AuthenticationService, IdentityUserModel, IdentityUserService, UserInfoMode } from '@alfresco/adf-core';
import { Component, OnInit, Input } from '@angular/core';
import { MenuPositionX, MenuPositionY } from '@angular/material/menu';
import { Observable, of } from 'rxjs';
@Component({
selector: 'app-shell-user-info',
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<EcmUserModel>;
bpmUser$: Observable<BpmUserModel>;
identityUser$: Observable<IdentityUserModel>;
selectedIndex: number;
userInfoMode = UserInfoMode;
constructor(private peopleContentService: PeopleContentService,
private peopleProcessService: PeopleProcessService,
private identityUserService: IdentityUserService,
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.authService.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.authService.isKerberosEnabled());
}
private isBpmLoggedIn() {
return this.authService.isBpmLoggedIn() || (this.authService.isECMProvider() && this.authService.isKerberosEnabled());
}
private isEcmLoggedIn() {
return this.authService.isEcmLoggedIn() || (this.authService.isECMProvider() && this.authService.isKerberosEnabled());
}
}
@@ -0,0 +1,52 @@
<div class="app-main-content">
<h1>CardView Component</h1>
<mat-card class="app-card-view">
<adf-card-view
[properties]="properties"
[editable]="isEditable"
[displayClearAction]="showClearDateAction"
[displayNoneOption]="showNoneOption"
[displayLabelForChips]="showLabelForChips">
</adf-card-view>
</mat-card>
<div class="app-console" #console>
<h3>Changes log:</h3>
<p *ngFor="let log of logs">{{ log }}</p>
</div>
</div>
<p class="app-toggle">
<mat-slide-toggle
id="app-toggle-editable"
[color]="'primary'"
(change)="toggleEditable()"
[checked]="isEditable">
Editable
</mat-slide-toggle><br>
<mat-slide-toggle
id="app-toggle-clear-date"
[color]="'primary'"
(change)="toggleClearDate()"
[checked]="showClearDateAction">
Show clear date icon
</mat-slide-toggle><br>
<mat-slide-toggle
id="app-toggle-none-option"
[color]="'primary'"
(change)="toggleNoneOption()"
[checked]="showNoneOption">
Show none option
</mat-slide-toggle><br>
<mat-slide-toggle
id="app-toggle-label-multivalued-chip"
[color]="'primary'"
(change)="toggleLabelForChips()"
[checked]="showLabelForChips">
Show label for chips property
</mat-slide-toggle>
</p>
<button mat-raised-button id="adf-reset-card-log" (click)="reset()">Reset Log</button>
@@ -0,0 +1,28 @@
.app-main-content {
padding: 0 15px;
}
.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;
}
}
@@ -0,0 +1,281 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit, ElementRef, ViewChild, OnDestroy } from '@angular/core';
import {
CardViewTextItemModel,
CardViewDateItemModel,
CardViewDatetimeItemModel,
CardViewBoolItemModel,
CardViewIntItemModel,
CardViewFloatItemModel,
CardViewKeyValuePairsItemModel,
CardViewSelectItemModel,
CardViewUpdateService,
CardViewMapItemModel,
UpdateNotification,
DecimalNumberPipe,
CardViewArrayItemModel
} from '@alfresco/adf-core';
import { of, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@Component({
templateUrl: './card-view.component.html',
styleUrls: ['./card-view.component.scss']
})
export class CardViewComponent implements OnInit, OnDestroy {
@ViewChild('console', { static: true }) console: ElementRef;
isEditable = true;
properties: any;
logs: string[];
showClearDateAction = false;
showNoneOption = false;
showLabelForChips = false;
private onDestroy$ = new Subject<boolean>();
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, 24, 10, 0, 30),
key: 'date',
default: new Date(1983, 11, 24, 10, 0, 30),
format: 'shortDate',
editable: this.isEditable
}),
new CardViewDateItemModel({
label: 'CardView Date Item - Multivalue (chips)',
value: [new Date(1983, 11, 24, 10, 0, 30)],
key: 'date',
default: new Date(1983, 11, 24, 10, 0, 30),
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}`);
this.console.nativeElement.scrollTop = this.console.nativeElement.scrollHeight;
}
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 = [];
}
}
@@ -0,0 +1,39 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NgModule } from '@angular/core';
import { CardViewComponent } from './card-view.component';
import { Routes, RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
const routes: Routes = [
{
path: '',
component: CardViewComponent
}
];
@NgModule({
imports: [
CommonModule,
CoreModule,
RouterModule.forChild(routes)
],
declarations: [CardViewComponent]
})
export class AppCardViewModule {}
@@ -0,0 +1 @@
<adf-cloud-app-list (appClick)="onAppClick($event)"></adf-cloud-app-list>
@@ -0,0 +1,35 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { CloudLayoutService } from './services/cloud-layout.service';
@Component({
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}`]);
}
}
@@ -0,0 +1,4 @@
<adf-toolbar>
<div class="app-crumb">{{appName + ' >'}} </div>
<div class="app-filter-crumb"> {{filterName | translate}}</div>
</adf-toolbar>
@@ -0,0 +1,14 @@
app-cloud-breadcrumbs {
.app-app-crumb {
opacity: 0.5;
}
.app-filter-crumb {
opacity: 0.8;
margin-left: 5px;
}
adf-toolbar {
display: flex;
}
}
@@ -0,0 +1,43 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-cloud-breadcrumbs',
templateUrl: './cloud-breadcrumb-component.html',
styleUrls: ['./cloud-breadcrumb-component.scss'],
encapsulation: ViewEncapsulation.None
})
export class CloudBreadcrumbsComponent implements OnInit {
appName: string;
filterName: string;
constructor(private route: ActivatedRoute) {}
ngOnInit() {
this.route.parent.params.subscribe(params => {
this.appName = params.appName;
});
this.route.queryParams.subscribe(params => {
if (params.filterName) {
this.filterName = params.filterName;
}
});
}
}
@@ -0,0 +1,33 @@
<mat-accordion>
<mat-expansion-panel [expanded]="expandTaskFilter" (opened)="onTaskFilterOpen()" (closed)="onTaskFilterClose()" data-automation-id='Task Filters'>
<mat-expansion-panel-header>
<mat-panel-title>
Task Filters
</mat-panel-title>
</mat-expansion-panel-header>
<adf-cloud-task-filters
*ngIf="expandTaskFilter"
[appName]="appName"
[showIcons]="true"
[filterParam]="currentTaskFilter$ | async"
(filterClicked)="onTaskFilterSelected($event)"
(filterSelected)="onTaskFilterSelected($event)">
</adf-cloud-task-filters>
</mat-expansion-panel>
<mat-expansion-panel [expanded]="expandProcessFilter" (opened)="onProcessFilterOpen()" (closed)="onProcessFilterClose()" data-automation-id='Process Filters'>
<mat-expansion-panel-header>
<mat-panel-title>
Process Filters
</mat-panel-title>
</mat-expansion-panel-header>
<adf-cloud-process-filters
*ngIf="expandProcessFilter"
[appName]="appName"
[showIcons]="true"
[filterParam]="currentProcessFilter$ | async"
(filterClicked)="onProcessFilterSelected($event)"
(filterSelected)="onProcessFilterSelected($event)">
</adf-cloud-process-filters>
</mat-expansion-panel>
</mat-accordion>
@@ -0,0 +1,4 @@
app-cloud-task-filters .app-filters__entry,
app-cloud-process-filters .app-filters__entry {
padding-left: 0 !important;
}
@@ -0,0 +1,103 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, 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 } from '@alfresco/adf-process-services-cloud';
@Component({
selector: 'app-cloud-filters-demo',
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<any>;
currentProcessFilter$: Observable<any>;
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;
}
}
@@ -0,0 +1,39 @@
<mat-tab-group class="app-cloud-layout-tab-body">
<mat-tab label="App">
<adf-sidenav-layout [sidenavMin]="70" [sidenavMax]="270" [stepOver]="780">
<adf-sidenav-layout-header>
<ng-template>
<app-cloud-breadcrumbs></app-cloud-breadcrumbs>
</ng-template>
</adf-sidenav-layout-header>
<adf-sidenav-layout-navigation>
<ng-template>
<adf-sidebar-action-menu [expanded]="true" [width]="205" title="CREATE">
<mat-icon adf-sidebar-menu-title-icon>arrow_drop_down</mat-icon>
<div adf-sidebar-menu-options>
<button mat-menu-item data-automation-id="btn-start-task" (click)="onStartTask()">
<mat-icon>assessment</mat-icon>
<span>New Task</span>
</button>
</div>
<div adf-sidebar-menu-options>
<button mat-menu-item data-automation-id="btn-start-process" (click)="onStartProcess()">
<mat-icon>assessment</mat-icon>
<span>New Process</span>
</button>
</div>
</adf-sidebar-action-menu>
<app-cloud-filters-demo [appName]="appName"></app-cloud-filters-demo>
</ng-template>
</adf-sidenav-layout-navigation>
<adf-sidenav-layout-content>
<ng-template>
<router-outlet></router-outlet>
</ng-template>
</adf-sidenav-layout-content>
</adf-sidenav-layout>
</mat-tab>
<mat-tab label="Settings">
<app-cloud-settings></app-cloud-settings>
</mat-tab>
</mat-tab-group>
@@ -0,0 +1,22 @@
.app-cloud-layout-overflow {
overflow: auto;
}
.app-cloud-layout-tab-body .mat-tab-body-wrapper {
height: 100%;
}
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;
}
}
}
@@ -0,0 +1,66 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { CloudLayoutService } from './services/cloud-layout.service';
@Component({
selector: 'app-cloud-layout',
templateUrl: './cloud-layout.component.html',
styleUrls: ['./cloud-layout.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class CloudLayoutComponent implements OnInit {
displayMenu = true;
appName: 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 });
}
});
}
onStartTask() {
this.router.navigate([`/cloud/${this.appName}/start-task/`]);
}
onStartProcess() {
this.router.navigate([`/cloud/${this.appName}/start-process/`]);
}
}
@@ -0,0 +1,3 @@
.activiti-form-viewer {
margin: 10px;
}
@@ -0,0 +1,3 @@
<adf-alfresco-viewer
[nodeId]="nodeId">
</adf-alfresco-viewer>
@@ -0,0 +1,37 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
@Component({
selector: 'app-cloud-viewer',
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'];
});
}
}
@@ -0,0 +1,71 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit } from '@angular/core';
import { FormService, WidgetComponent } from '@alfresco/adf-core';
/* eslint-disable @angular-eslint/component-selector */
@Component({
selector: 'custom-editor-widget',
template: `
<div style="color: green">
ADF version of custom form widget
</div>
`
})
export class CustomEditorComponent extends WidgetComponent {
constructor() {
super();
}
}
@Component({
selector: 'app-sample-widget',
template: `
<div style="color: red">
<p *ngIf="field.readOnly || readOnly">
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span *ngIf="isRequired()">*</span></label>
<span>{{field.value}}</span>
</p>
<mat-form-field *ngIf="!(field.readOnly || readOnly)">
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span *ngIf="isRequired()">*</span></label>
<input matInput
class="adf-input"
type="text"
[id]="field.id"
[required]="isRequired()"
[value]="field.value"
[(ngModel)]="field.value"
(ngModelChange)="onFieldChanged(field)">
<mat-hint>{{field.placeholder}}</mat-hint>
</mat-form-field>
<error-widget [error]="field.validationSummary"></error-widget>
<error-widget *ngIf="isInvalidFieldRequired()" required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>
</div>
`
})
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;
}
}
@@ -0,0 +1,45 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
import { FormRenderingService } from '@alfresco/adf-core';
import { CloudFormRenderingService } from '@alfresco/adf-process-services-cloud';
import { CustomEditorComponent, CustomWidgetComponent } from './custom-form-components/custom-editor.component';
@Component({
template: `<router-outlet></router-outlet>`,
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
});
}
}
@@ -0,0 +1,21 @@
<button data-automation-id="go-back" mat-icon-button (click)="onGoBack()">
<mat-icon>arrow_back</mat-icon> Go Back
</button>
<h4 data-automation-id="process-details-header">Simple page to show the process instance: {{ processInstanceId }} of the app: {{ appName }}</h4>
<div class="app-process-cloud-container">
<adf-cloud-task-list
class="app-cloud-layout-overflow"
[appName]="appName"
[processInstanceId]="processInstanceId"
(rowClick)="onRowClick($event)">
</adf-cloud-task-list>
<adf-cloud-process-header
class="app-process-cloud-header"
[appName]="appName"
[processInstanceId]="processInstanceId">
</adf-cloud-process-header>
</div>
@@ -0,0 +1,17 @@
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%;
}
}
}
@@ -0,0 +1,51 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-process-details-cloud-demo',
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}`]);
}
}
}
@@ -0,0 +1,71 @@
<adf-cloud-edit-process-filter
[appName]="appName"
[id]="filterId"
[filterProperties]="filterProperties"
[sortProperties]="filterSortProperties"
[actions]="filterActions"
[processFilter]="editedFilter"
(filterChange)="onFilterChange($event)"
(action)="onProcessFilterAction($event)">
</adf-cloud-edit-process-filter>
<div
*ngIf="editedFilter"
class="app-processes-list-container">
<adf-cloud-process-list
#processCloud
class="app-cloud-layout-overflow"
[appName]="editedFilter.appName"
[appVersion]="editedFilter.appVersion"
[initiator]="editedFilter.initiator"
[processDefinitionId]="editedFilter.processDefinitionId"
[processDefinitionName]="editedFilter.processDefinitionName"
[processDefinitionKey]="editedFilter.processDefinitionKey"
[id]="editedFilter.processInstanceId"
[status]="editedFilter.status"
[name]="editedFilter.processName"
[businessKey]="editedFilter['businessKey']"
[lastModifiedFrom]="editedFilter.lastModifiedFrom"
[lastModifiedTo]="editedFilter.lastModifiedTo"
[sorting]="[{orderBy: editedFilter.sort, direction: editedFilter.order}]"
[selectionMode]="selectionMode"
[stickyHeader]="true"
[showActions]="actionMenu"
[showContextMenu]="contextMenu"
[multiselect]="multiselect"
(showRowActionsMenu)="onShowRowActionsMenu($event)"
(showRowContextMenu)="onShowRowContextMenu($event)"
(executeRowAction)="onExecuteRowAction($event)"
(rowClick)="onRowClick($event)"
(rowsSelected)="onRowsSelected($event)">
</adf-cloud-process-list>
<adf-pagination
[target]="processCloud"
(changePageSize)="onChangePageSize($event)"
(nextPage)="resetSelectedRows()"
(prevPage)="resetSelectedRows()">
</adf-pagination>
<div *ngIf="testingMode">
<div *ngIf="multiselect">
Selected Rows:
<ul>
<li *ngFor="let row of selectedRows">{{ row.id }}</li>
</ul>
</div>
<div *ngIf="actionMenu">
<span>Action Menu:</span>
<br>
<div *ngIf="selectedAction">
<span>Process Instance ID: {{ selectedAction.id }}</span><br>
<span>Action Type: {{ selectedAction.actionType }}</span>
</div>
</div>
<div *ngIf="contextMenu">
<span>Context Menu:</span>
<br>
<div *ngIf="selectedContextAction">
<span>Process Instance ID: {{ selectedContextAction.id }}</span><br>
<span>Action Type}: {{ selectedContextAction.actionType }}</span>
</div>
</div>
</div>
</div>
@@ -0,0 +1,22 @@
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;
}
}
@@ -0,0 +1,192 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import {
PROCESS_FILTER_ACTION_DELETE,
PROCESS_FILTER_ACTION_SAVE,
PROCESS_FILTER_ACTION_SAVE_AS,
ProcessFilterAction,
ProcessFilterCloudModel
} from '@alfresco/adf-process-services-cloud';
import { ActivatedRoute, Router } from '@angular/router';
import { DataCellEvent, 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';
@Component({
selector: 'app-processes-cloud-demo',
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<any>();
private onDestroy$ = new Subject<boolean>();
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;
}
}
}
@@ -0,0 +1,80 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { 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<FilterSettings>({index: 0});
processFilter$ = new BehaviorSubject<FilterSettings>({index: 0});
settings$ = new BehaviorSubject<CloudServiceSettings>(this.settings);
setCurrentTaskFilterParam(param: FilterSettings) {
this.taskFilter$.next(param);
}
setCurrentProcessFilterParam(param: FilterSettings) {
this.processFilter$.next(param);
}
setCurrentSettings(param: CloudServiceSettings) {
this.settings$.next(param);
}
}
@@ -0,0 +1,55 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { 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);
}
}

Some files were not shown because too many files have changed in this diff Show More