Compare commits

..
Author SHA1 Message Date
Eugenio Romano ee5fe6dab9 1.9.0 (#2451)
* remove lock files

* [ADF-1516] added parsing on date check (#2301)

* Remove MDL from demo shell (#2302)

* [ADF-1492] Document List - Export ContentNodeSelectorComponent and ContentNodeSelectorComponentData (#2297)

* fix wrapped field resolving (#2305)

check for the type property before resolving a wrapped field (addresses issue with empty field objects)

* support redirection on successful login (#2306)

* new "document" widget (#2307)

* [ADF-1090] support custom dynamic table row validation (#2308)

* support custom dynamic table row validation

* test fixes

* export missing models

* allow loading layout presets from app.config (#2310)

* [ADF-1250] Remove MDL from Analytics (#2311)

* Removal of MDL dialog from report parameters

* Futher mdl removal

* Futher mdl removal

* Fixing demo shell icon position issues

* Futher mdl removal

* Futher mdl removal, tests fix

* Remove mdl leftover

* [ADF-1534] Automatic PDF rendering for unsupported types. (#2313)

* move viewer dialog to a separate folder

* make dialog take full screen size

* automatic PDF conversion

* mime type icon in the title

* [ADF-1530] correct plain text viewer resolving

* separate lightweigh pdf view for the dialog

* [ADF-1238] Removed mdl from alfresco search component (#2309)

* [ADF-1328] removed mdl from adf search

* [ADF-11328] removed mdl from search added theme style

* Fix failing tests

* Fix the last bit of stylings

* [ADF-1478] Make the pagination more responsive (#2315)

* [ADF-1444] Fix name display issue (#2317)

* fix memory leaks for pdf viewers (#2316)

* remove unused checkbox from demo shell (#2322)

* allow toggling viwer dialog toolbar elements (#2319)

* [ADF-1537] Fix check property defined (#2320)

* [ADF-1521] Form string type is not rendered (#2318)

* Fix missing string widget and task list loading

* Update tasklist.component.ts

call initStream

* avoid in app list long name are displayed under the logo. (#2323)

* remove max length attribute (#2321)

* remove unused document var

* Fix minimal responsiveness of demo app's activiti section (#2324)

* [ADF-1012] Hide delete checklist button when the checklist is in readonly mode (#2325)

* disable button to delete when the checklist is in readonly mode

* style issues

* fix test

* skipcount 0 after pagesize change (#2327)

* breadcrumb enhancements (#2328)

* [ADF-1247] Remove MDL from processlist package (#2329)

* Removing mdl stuff

* Further mdl removal

* Further mdl removal

* Removing mdl is finished

* unused label in search component

* [ADF-1547] tooltip fixes and enhancements (#2333)

* tooltip enhancements

* fix unit tests

* disable upload content for completed task (#2332)

use primary color for upload button in proccess attachment and task attachment

* doc update

* change name export module userinfo (#2334)

* [ADF-1543] Remove local copy of muli (#2335)

Use http request to load the font
Add the Muli font in all the theme
Remove the overwritten font-family not necessary

* [ADF-1544] app config file management refactoring (#2331)

* application configuration service refactoring

* fix demo shell

* remove logging to console

* [ADF-1515] Internationalization - ADF strings review (#2336)

* Update en.json

ADF-1515
Update to match Content Services terminology

* Update en.json

ADF-1515
Improvements to readability in line with docs.alfresco.com/writing-for-alfresco

* Update en.json

ADF-1515
Improvements to readability and consistency

* Update en.json

* Update en.json

ADF-1515
Fix typo

* Update en.json

ADF-1515
Updated for US spelling and consistency with docs.alfresco.com/writing-for-alfresco

* Update en.json

ADF-1515 - reduced word count

* Update en.json

ADF-1515
Readability improvements

* Update en.json

ADF-1515
Updates for readability and consistency

* Update en.json

ADF-1515
Updated for readability and consistency

* Update en.json

* Update en.json

* Update en.json

ADF-1515 - removed variables section as discussed w. Eugenio

* Update en.json

ADF-1515 - removed search label as discussed with Eugenio

* [ADF-1246] Remove mdl from Tasklist (#2339)

* Remove mdl from app list

* Remove mdl from adf-people

* Update prebuuilt styles

* Remove mdl dialog from task details

* Remove some mdl from checklist

* Further mdl removal

* Last mdl parts removed

* fix toolbar and page port view for size in small devices (#2338)

remove old alfresco and activiti prefix
fix login toggle mobile devices

* move readonly checklist from icon to button

* [ADF-1518] Update material2 beta 10 and angular 4.3.6 (#2304)

* ignore pkg lock

* update pkg json

* date picker update material beta.10

* isDateInstance moment adapter

* style and  datepicker update material2 beta 10

* update test dateitem to beta10

* regenerate style files

* use material icons web font

* fix data range material 2 beta 10

* minors cleaning

* recreate styles

* remove unused componentHandler var

* fix failing test checkbox

* [ADF-1488] reset selection on Document List data change (#2341)

* reset selection on data change

* unit tests

* fix unit tests

* [ADF-1549] Initial files for new doc format (#2342)

* [ADF-1555] add animation on show and hide of results (#2343)

* add animation on show and hide of results
make the style similar to the other material 2 menu
fix issue popup always stays on the screen
fix Search does not collapse if its input is focused

* minor code style issues

* minors fix and test fix

* fix app.config.json error in test

* update beta10 mat-menu-base method

* karma configuration all

* [ADF-1548] deprecate the usage of the "forRoot" methods in modules (#2344)

* remove CoreModule.forRoot

* remove forRoot methods

* fix form issues (lint)

* save js-api version in demo shell

* [ADF-1560] Process fields are not translated when starting a process and on process pag. (#2346)

* Detached extra curly brace in en.json.

* [ADF-1549] Added files for Core library (#2345)

* [ADF-1549] Added files for Core library

* [ADF-1549] Updated md files following checks

* [ADF-1549] Added doc files for Datatable library (#2348)

* fix people widget form component when no images are present (#2349)

* [ADF-1568] Clean polyfills (#2347)

Use msSaveOrOpenBlob in content service for save fiel in IE

* Disable the attachment component when the task/process is completed (#2351)

* [ADF-1549] Added doc files for Tasklist library (#2350)

* [ADF-1549] Added doc files for Processlist library (#2353)

* [ADF-1549] Added doc files for remaining Activiti libraries (#2354)

* Fix start task form (#2356)

* [ADF-1549] Added docs for Login, Search, Social and Tag (#2355)

* Disable drag drop parent component (#2357)

* [ADF-1549] Added docs for Upload, Userinfo, Viewer and Webscript (#2359)

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab (#2352)

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab

* Added a output event in adf-info-drawer component to get the currently active tab

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab

* Added a output event in adf-info-drawer component to get the currently active tab

* Added unit test file

* Updated info-drawer.md

* refactoring autocomplete fields form in order to use the material 2 autocomplete (#2358)

* proxy setup to fix native login dialog (for local runs) (#2363)

* [ADF-1364] Infinite scrolling for Copy & Move (#2362)

* Use infinite pagination for search also
* Fix highlight in copy & move
* Fix highlight and material menu issue
* Update documentation

* [ADF-1549] Improved formatting for doc index (#2365)

* [ADF-1549] Added undoc stoplist feature

* [ADF-1549] Better grouping of items in doc index

* [ADF-1549] Added undoc stoplist feature

* [ADF-1549] Better grouping of items in doc index

* [ADF-226] Add requeue button to task header (#2366)

* Add requeue button to task header

* Fixing typescript declaration

* [ADF-1238] Search debounce click issue fix and minor style clean (#2361)

* fix search issues no result table not shown
minor issues style button

* fix issue animation search input field debouncing toggle search

* fix test search
remove expandable probeprties

* remove test expand

* ripristinate expandable properties

* fix test

* [ADF-1584] remove primary color from user description in userinfo

* [ADF-1549] Moved docassets folder inside docs folder (#2367)

* Update package json typescript version (#2368)

* update package json typescript version

* fix test problem

* fix minor upload type bug

* improved "start:dist" script (#2369)

* Save host only when apply (#2371)

[ADF-1581] Demo shell - Improve host setting configuration check

* [ADF-1582] Revert error widget style modification (#2372)

* Revert error widget style modification

* Fix start form issues

* Fix call start form with processInstance instead of processDefinition (#2373)

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters (#2370)

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters

* Added property [cursor: pointer] in accordion-group.component.scss

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters

* Added property [cursor: pointer] in accordion-group.component.scss

* Added css property for expand/collapse problem on heading click

* Fix styles (#2376)

* Fix check taskList exist (#2375)

* [ADF-1585] - Fix datatable styles (#2374)

* Unify datatable hover and selection color

* Fix prebuilt styles collision

* Show missing list after starting a process (#2379)

* Fix dropdown should show the value in readonly mode (#2380)

* [ADF-1586] Added new Core doc files (#2383)

* Fix datewidget's moment issue (#2384)

* Update to comments for 508 compliance with translation (#2386)

* 508 fixes to bring the comments table into compliance. The <thead> element must be visible to users and <th> must display text that indicates what resides in the columns below.

* Updated to properly use the i18 translation

* fix minor typo: remove spaces from versions

* [ADF-1291] Attachment list is not instantly refreshed after upload (#2387)

* [ADF-1291] Attachment list after upload list is not instantly refreshed

* Implemented NgZone to ensure change detection

* [#2377 Github] Attachments control won't let you add a document you removed

* Reset the value of input after each upload so that change will be detected if the same file is selected repeatedly

* [#2377 Github] Attachments control won't let you add a document you removed

* Added test to make sure the input value is rest after upload

* [ADF-1595] Typeahead - Fetch the value from the process variables (#2388)

* Get the typeahead value from the process variables. We should not use the processDefinition to get again all the values

* Improve the dropdown widget

* Fix running process issue (#2391)

* [ADF-1608] Start Form - Improve the unit test cases. (#2390)

* * Covered more test case scenarios for start-form component

* [ADF-1608] Start Form - Improve the unit test cases.
* Refactored start-form.component.spec.ts
* Covered more test case scenarios for start-form component

* add style builder in demo shell for development purpose (#2385)

remove precompiled css theme from repository

* fix layout issues for report list (#2394)

* configurable 'supportedPageSizes' for document list (#2395)

* [ADF-1616] download zip dialog title (#2397)

* [ADF-1615] Datatable - The ellipsis class doesn't work for a custom template (#2398)

* Added ellipsis property for data-column rendered using custom html template

* [ADF-1613] logout directive (#2393)

* logout directive

* test fixes

* remove prebuilt theme

* Fix shared service design issue (#2399)

* fix build issues

* remove unused scss import

* Provide a multiselection property to select more than one row (#2389)

* [ADF-1583] Fix change detection error (the quick way) (#2396)

* Fix change detection error (the quick way)

* Fix it the second time

* raise keyboard events, improve task list keyboard handling (#2401)

* page title service (#2403)

* improved ecm auth guard (#2402)

* Fix dev build

* Fix input stylings for adf-people-search and modify existing fix for form inputs (#2405)

* 508 compliance fix for upload widget (#2406)

* 508 fixes to bring the comments table into compliance. The <thead> element must be visible to users and <th> must display text that indicates what resides in the columns below.

* Updated to properly use the i18 translation

* This is a 508 Compliance fix to add a keyup.enter, role, and tabindex to both the icon and span associated with the file upload widget. This will allow keyboard-only users the ability to tab to a file loaded with the Upload Widget and select the element using the enter key.

* [ADF-1549] Removed doc content from library README files (#2400)

* [ADF-1549] Removed doc content from library README files

* [ADF-1549] Removed doc content from library README files

* [ADF-1583] Fix change detection error (the quick way) (#2396)

* Fix change detection error (the quick way)

* Fix it the second time

* raise keyboard events, improve task list keyboard handling (#2401)

* [ADF-1549] Removed doc content from library README files

* [ADF-1549] Added doc update from Tasklist readme

* THe login component should check the minLength as default (#2407)

* Adding some responsiveness to demo shell app (#2408)

* Revert "Adding some responsiveness to demo shell app (#2408)" (#2410)

This reverts commit 6fa135faf3.

* [ADF-1623] routing integration for Viewer (#2404)

* routed viewer (demo app)

* toolbar support

* app menu component for demo shell

* navigate back button

* fix unit tests

* improve viewer type detection and rendering

* download button

* automatic pdf rendition, spinners, ui tweaks

* border for pdf pages

* scroll top support

* docs update

* info drawer placeholder

* [ADF-1632] Task Header - The default parent name value should be None (#2409)

* The default parent name should be None

* Fix trim

* add js doc

* Fix selection reset issue (#2414)

* Fix input line-height issue (#2417)

* fix closing search bar has not to trigger search (#2415)

* [ADF-1626] Fix double tabbing issue in datatable (#2416)

* Fix double tabbing issue in datatable

* Fix accessibility issue for process list

* add service suffix page title service (#2418)

* [ADF-1634] floating toolbar for PDF viewer (#2413)

* floating toolbar for PDF viewer

* use routing settings to toggle app menu

* remove dialog viewer

* remove duplicate menu

* fix error message size in login component (#2419)

* remove header duplicated webscript demo and move template in external HTML

* remove template old reference in documentation (#2421)

* remove console log (#2422)

* add presets document list in an external model (#2420)

* [ADF-1629] Fix check the visibility before render the form (#2423)

* support page picker for document list (#2424)

* [ADF-1586] Added new doc files for Document List library (#2427)

* [ADF-1611] Demo shell responsiveness (#2426)

* Reapplying the unreappliable

* Fix buggy search button

* Fix settings

* Last bit of responsive stylings

* Fix breadcrumb responsiveness (#2430)

* fix page size not being saved (#2429)

* [ADF-1640] Start form - Get the variables from the process instance API (#2425)

* Get the variables from the process instance API
/api/enterprise/process-instances/XXX
instead of
/api/enterprise/process-instances/382/variables
because the latest api returns 404 if the process is completed

* Fix unit test

* Add field id

* User info center title (#2432)

* [ADF-1586] Added doc files for Document List library (#2435)

* [ADF-1664] fix color text login for dark theme (#2433)

* fix color text login for dark theme

* fix test

* Update en.json (#2436)

A couple of very minor changes (I'll raise a Jira next time, sorry!)

* fix the menu height issue (#2438)

* Fix Form Service parseForm (#2440)

* [ADF-1636] fix issues with i18n resource composing (#2434)

* fix issues with i18n resource composing

merge resources instead of concatenating, make 'app' resource always load last

refs #2412

* unit tests

* type for style in remote env

* Change task/process on double click (#2439)

* [ADF-1674] align amount prefix widget

* fix user model process service and image loading (#2431)

* remove prebuilt-themes from npmignore

* public peopleProcessService in search component in order to use it in template

* [ADF-1676] hide fake content in the viewer (#2442)

* hide fake content in the viewer

* add missing property

* reset pagination on data source change (#2443)

* [ADF-1625] removed wrong select into typeahed widget, readded validati… (#2411)

* #ADF-1625 removed wrong select into typeahed widget, readded validation on blur

* #ADF-1625 added validator for typeahead fixed tests

* #ADF-1625 removed wrong fdescribe

* [ADF-1625] cleaned behaviour on typeahed

* [ADF-1625] fixed some selection bug on typeahed and start fixing test

* [ADF-1625] fixed typeahead test for autocomplete

* [ADF-1586] Updated Datatable docs (#2445)

* [ADF-1586] Updates to Datatable docs

* [ADF-1586] Fixed broken link in doc index page

* [ADF-1671] visibility fix use id instead of name during comparison (#2441)

* visibility fix use id instead of name during comparison

* fix tslint problems

* [ADF-1677] fix issues with paging (#2446)

* fix issues with paging

* update unit test

* make comments always editable for process (#2447)

make comments editable only when there are users involved

* change indentation task-details

* lint fix demo shell

* [ADF-1685] tasklist is not loading after logout

* pagination fixes (#2448)

* [ADF-1687] pass entire createdBy obj in user process constructor

* [ADF-1653] cleaned user suggestion when input type is an empty string (#2444)

* [ADF-1653] cleaned user suggestion when input type is an empty string

* [ADF-1653] removed wrong fdescribe

* [ADF-1653] improved behaviour of people widget

* Removed fdescribe

* [ADF-1689] fix task comment when the task is running (#2449)

* [ADF-1689] fix task comment when the task is running

* fix test

* reintroduce old name export BC clean postpone in 2.0.0

* [ADF-1688] Update value for the form field when is empty string (#2450)

* 1.9.0

* remove >>>  in favor of ::ng-deep
fix license check
2017-10-09 15:54:37 +01:00
Eugenio Romano 6516b9f0ce remove lock files 2017-09-05 18:38:35 +02:00
7171 changed files with 145807 additions and 569799 deletions
-21
View File
@@ -1,21 +0,0 @@
.git
.github
.vscode
assets
coverage
docs
e2e
e2e-output
node_modules
scripts
src
lib
tools
/angular.json
/desktop.ini
/cspell.json
/CODE_OF_CONDUCT.md
/.stylelintignore
/ALFRESCOCORS.md
/CONTRIBUTING.md
/BROWSER-SUPPORT.md
+4 -16
View File
@@ -1,4 +1,5 @@
# Editor configuration, see http://editorconfig.org
# http://editorconfig.org
root = true
[*]
@@ -9,23 +10,10 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.json]
indent_style = space
indent_size = 2
[*.yaml]
indent_style = space
indent_size = 2
[*.yml]
[package.json]
indent_style = space
indent_size = 2
[*.md]
max_line_length = off
trim_trailing_whitespace = false
[resources/*.json]
indent_size = 2
max_line_length = off
insert_final_newline = false
trim_trailing_whitespace = false
-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
-215
View File
@@ -1,215 +0,0 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*',
'**/node_modules/**/*',
'lib/cli/node_modules/**/*',
'**/node_modules',
'**/docker',
'**/assets',
'**/scripts',
'**/docs'
],
plugins: ['@nx'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json'],
createDefaultProgram: true
},
extends: [
'plugin:@nx/typescript',
'plugin:@nx/angular',
'plugin:@cspell/recommended',
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:jsdoc/recommended-typescript-error'
],
plugins: [
'eslint-plugin-unicorn',
'eslint-plugin-rxjs',
'prettier',
'ban',
'license-header',
'@cspell',
'eslint-plugin-import',
'@angular-eslint/eslint-plugin',
'@typescript-eslint',
'jsdoc'
],
rules: {
// Uncomment this to enable prettier checks as part of the ESLint
// 'prettier/prettier': 'error',
'ban/ban': [
'error',
{ name: 'eval', message: 'Calls to eval is not allowed.' },
{ name: 'fdescribe', message: 'Calls to fdescribe is not allowed' },
{ name: 'fit', message: 'Calls to fit is not allowed' },
{ name: 'xit', message: 'Calls to xit is not allowed' },
{ name: 'xdescribe', message: 'Calls to xdescribe is not allowed' },
{ name: ['test', 'only'], message: 'Calls to test.only is not allowed' },
{ name: ['describe', 'only'], message: 'Calls to describe.only is not allowed' }
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
type: ['element', 'attribute'],
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-input-prefix': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
accessibility: 'explicit'
}
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: [
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
'enumMember'
],
format: null,
modifiers: ['requiresQuotes']
}
],
'@typescript-eslint/member-ordering': 'off',
'@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',
'default-case': 'error',
'import/order': 'off',
'max-len': [
'error',
{
code: 240
}
],
'no-bitwise': 'off',
'no-console': [
'error',
{
allow: [
'warn',
'dir',
'timeLog',
'assert',
'clear',
'count',
'countReset',
'group',
'groupEnd',
'table',
'dirxml',
'error',
'groupCollapsed',
'Console',
'profile',
'profileEnd',
'timeStamp',
'context'
]
}
],
'no-duplicate-imports': 'error',
'no-multiple-empty-lines': 'error',
'no-redeclare': 'error',
'no-return-await': 'error',
'rxjs/no-create': 'error',
'rxjs/no-subject-unsubscribe': 'error',
'rxjs/no-subject-value': 'error',
'rxjs/no-unsafe-takeuntil': 'error',
'unicorn/filename-case': 'error',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true
}
],
'license-header/header': [
'error',
[
'/*!',
' * @license',
' * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.',
' *',
' * Licensed under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License.',
' * You may obtain a copy of the License at',
' *',
' * http://www.apache.org/licenses/LICENSE-2.0',
' *',
' * Unless required by applicable law or agreed to in writing, software',
' * distributed under the License is distributed on an "AS IS" BASIS,',
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
' * See the License for the specific language governing permissions and',
' * limitations under the License.',
' */'
]
]
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended', '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:storybook/recommended']
};
-3
View File
@@ -1,3 +0,0 @@
{
"extends": ["./.eslintrc.js"]
}
-18
View File
@@ -1,18 +0,0 @@
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# these users will be requested for
# review when someone opens a pull request.
* @eromano @popovicsandras @DenysVuika
# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
/e2e/ @eromano @cristinaj
# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
/docs/ @m-hulbert @eromano
-76
View File
@@ -1,76 +0,0 @@
name: "before-install"
description: "launch before_install.sh and then parse env vars"
inputs:
act:
description: 'enable act debug'
required: false
type: boolean
default: 'false'
runs:
using: "composite"
steps:
- name: Before install
if: ${{ ! env.ACT }}
shell: bash
run: |
pip install --user --quiet awscli
- name: base vars
shell: bash
run: |
{
echo "GIT_HASH=$(git rev-parse HEAD)";
echo "BASE_HASH=$(git merge-base origin/${GITHUB_BASE_REF} HEAD)";
echo "HEAD_HASH=HEAD";
echo "HEAD_COMMIT_HASH=${GH_COMMIT}";
echo "NX_CALCULATION_FLAGS=--all";
echo "BUILD_OPTS=--configuration production";
echo CI_FORCE_RUN=false;
echo NODE_VERSION=$(node -v);
} >> $GITHUB_ENV
- name: affected:* flag parser
shell: bash
if: ${{ contains(github.event.head_commit.message , '[affected:*]') }}
run: |
echo "Setting up CI to run with commit flag [affected:*] flag."
echo "BREAK_ACTION=true" >> $GITHUB_ENV
- name: PULL_REQUEST event
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
shell: bash
run: |
echo "Setting up CI flags for Pull Request event"
NX_CALCULATION_FLAGS="--base=origin/${GITHUB_BASE_REF} --head=$HEAD_HASH"
{
echo "NX_CALCULATION_FLAGS=$NX_CALCULATION_FLAGS";
echo "BASE_HASH=origin/${GITHUB_BASE_REF}";
echo "BREAK_ACTION=true";
} >> $GITHUB_ENV
- name: RELEASE on master/develop patch branch
if: ${{ env.BREAK_ACTION == false && github.event.pull_request.merged }}
shell: bash
run: |
if [[ "${{ github.ref_name }}" =~ ^master(-patch.*)?$ ]]; then
# into master(-patch*)
echo "Setting up CI flags for Push on master patch"
elif [[ "${{ github.ref_name }}" =~ ^develop-patch.*$ ]]; then
# into develop-patch*
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
fi
echo "BREAK_ACTION=true" >> $GITHUB_ENV
- name: SCHEDULE event
if: ${{ github.event_name == 'schedule' }}
shell: bash
env:
EV_NAME: ${{ github.event_name }}
run: |
echo "Setting up CI to run on SCHEDULE"
echo "NX_CALCULATION_FLAGS=--all" >> $GITHUB_ENV
@@ -1,27 +0,0 @@
name: "Download build artifacts"
description: "Download build artifacts"
runs:
using: "composite"
steps:
- name: download and extract artifacts from s3
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time aws s3 cp --no-progress s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz $i.tar.gz
du -h $i.tar.gz
time tar xzf $i.tar.gz
done
- name: show files
shell: bash
run: |
pwd
ls -lha
echo "====DIST===="
find dist -maxdepth 1 -type d
echo "====NXCACHE===="
find nxcache -maxdepth 1 -type d
echo "====ADF===="
find node_modules/@alfresco/ -maxdepth 1 -type d
-30
View File
@@ -1,30 +0,0 @@
name: 'enable dryrun'
description: 'check if must run pipeline in dryrun mode'
inputs:
dry-run-flag:
description: 'enable dryrun'
required: false
type: boolean
default: true
outputs:
dryrun:
description: "long sha of the tag"
value: ${{ steps.dryrun.outputs.dryrun }}
runs:
using: "composite"
steps:
- name: set dryrun flag to TRUE
shell: bash
id: dryrun
run: |
if [[ '${{ inputs.dry-run-flag }}' == 'true' ]]; then
echo "dryrun=--dryrun" >> $GITHUB_OUTPUT;
echo "enabling dryrun"
else
echo "dryrun=" >> $GITHUB_OUTPUT;
echo "dryrun NOT enabled"
fi
@@ -1,19 +0,0 @@
name: 'Get tag sha'
description: 'get the sha of the latest or a specific tag'
outputs:
tag_sha:
description: "long sha of the tag"
value: ${{ steps.sha_out.outputs.tag_sha }}
runs:
using: "composite"
steps:
- name: get tag short sha
shell: bash
id: sha_out
run: |
tag_sha=$(git rev-list -n 1 $(git tag --sort=-creatordate | head -n 1))
echo "tag_sha=$tag_sha" >> $GITHUB_OUTPUT
echo $tag_sha
@@ -1,26 +0,0 @@
name: 'Check NPM bundle'
description: 'check npm bundle'
inputs:
branch_name:
description: "override GITHUB_REF_NAME"
required: false
default: $GITHUB_REF_NAME
runs:
using: "composite"
steps:
- name: load "NPM TAG"
uses: ./.github/actions/set-npm-tag
with:
branch_name: ${{ inputs.branch_name }}
- name: check npm bundle
shell: bash
id: sha_out
run: |
if [[ -z $TAG_NPM ]]; then
echo "TAG_NPM not set, aborting"
exit 1
fi
./scripts/github/build/npm-check-bundles.sh
@@ -1,21 +0,0 @@
name: "print affected libs"
description: "Retrive the affected libs based on the based and head input"
inputs:
base:
description: 'the base sha'
required: true
type: string
default: main
head:
description: 'the head sha'
required: true
type: string
default: HEAD
output:
affected:
description: 'the affected libs of the repo'
affected_is_empty:
description: 'true or false accondingly'
runs:
using: "node16"
main: 'dist/index.js'
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-521
View File
@@ -1,521 +0,0 @@
{
"name": "print-affected-libs",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "print-affected-libs",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
}
},
"node_modules/@actions/core": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/exec": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"dependencies": {
"@actions/io": "^1.0.1"
}
},
"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",
"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"
}
},
"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",
"dependencies": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
}
},
"node_modules/@actions/io": {
"version": "1.1.3",
"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"
}
},
"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",
"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",
"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",
"dependencies": {
"@octokit/types": "^13.1.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",
"dependencies": {
"@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0",
"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"
},
"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",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
},
"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"
}
},
"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",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
},
"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"
}
},
"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",
"dependencies": {
"@octokit/endpoint": "^9.0.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.1.0",
"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",
"dependencies": {
"@octokit/types": "^13.1.0",
"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",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@vercel/ncc": {
"version": "0.36.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz",
"integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
}
},
"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"
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
"license": "ISC"
},
"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/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"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"
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"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"
}
},
"dependencies": {
"@actions/core": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"requires": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"@actions/exec": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"requires": {
"@actions/io": "^1.0.1"
}
},
"@actions/github": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
"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": {
"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==",
"requires": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
}
},
"@actions/io": {
"version": "1.1.3",
"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=="
},
"@octokit/core": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"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",
"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==",
"requires": {
"@octokit/types": "^13.1.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==",
"requires": {
"@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0",
"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=="
},
"@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==",
"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/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==",
"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/request": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz",
"integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==",
"requires": {
"@octokit/endpoint": "^9.0.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.1.0",
"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==",
"requires": {
"@octokit/types": "^13.1.0",
"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==",
"requires": {
"@octokit/openapi-types": "^23.0.1"
}
},
"@vercel/ncc": {
"version": "0.36.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz",
"integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==",
"dev": true
},
"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=="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"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=="
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
}
}
@@ -1,20 +0,0 @@
{
"name": "print-affected-libs",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "ncc build src/index.js -o dist --source-map"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
}
}
@@ -1,32 +0,0 @@
const core = require('@actions/core');
const exec = require('@actions/exec');
async function run() {
const base = core.getInput('base', {required: false }) || '5288597580';
core.setOutput('affected_is_empty', 'true');
let affected = '';
let myError = '';
const options = {};
options.listeners = {
stdout: (data) => {
affected += data.toString()
},
stderr: (data) => {
myError += data.toString();
}
};
await exec.exec(`npx nx print-affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options)
const affectedTrimmed = affected.trim();
if (affectedTrimmed !== '') {
core.setOutput('affected_is_empty', 'false');
}
core.notice(`Retriving affected libs: ${affectedTrimmed}`);
core.setOutput('affected', affectedTrimmed);
}
run();
-37
View File
@@ -1,37 +0,0 @@
name: "set npm tag"
description: "se NPM tag"
inputs:
event_name:
description: "override github.event_name"
required: false
default: ${{ github.event_name }}
branch_name:
description: "override GITHUB_REF_NAME"
required: false
default: $GITHUB_REF_NAME
runs:
using: "composite"
steps:
- name: set TAG_NPM
shell: bash
run: |
TAG_NPM="alpha"
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
# Pre-release versions
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
then
TAG_NPM=next
# Stable major versions
else
TAG_NPM=latest
fi
fi
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
TAG_NPM=alpha
fi
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
-58
View File
@@ -1,58 +0,0 @@
name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
enable-cache:
description: 'enable caching'
required: false
type: boolean
default: 'true'
enable-node-modules-cache:
description: 'enable caching for node modules'
required: false
type: boolean
default: 'true'
act:
description: 'enable act debug'
required: false
type: boolean
default: 'false'
runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
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
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
env:
cache-name: node-modules-cache
with:
path: |
node_modules
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-
restore-keys: |
${{ runner.os }}
- name: load "NPM TAG"
uses: ./.github/actions/set-npm-tag
- name: before install script
uses: ./.github/actions/before-install
with:
act: ${{ inputs.act }}
@@ -1,49 +0,0 @@
name: Identify the slack group
description: 'Identify the slack group area based on the affected'
inputs:
affected:
description: 'The name of the affected lib'
required: true
type: string
outputs:
groups:
description: "the slack groups"
value: ${{ steps.group.outputs.result }}
runs:
using: "composite"
steps:
- name: Append group
id: group
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
affectedLib: ${{ inputs.affected }}
with:
script: |
const affectedLib = process.env.affectedLib;
core.info(`Input ${affectedLib}`);
const slackGroups = new Set();
const AlfrescoQAGroup = '@alfresco-testing-qa';
const HxpQAGroup = '@hxp-studio-qa-group';
const libs = affectedLib.split(' ')
if (libs.includes('content-services') || libs.includes('process-services')) {
slackGroups.add(AlfrescoQAGroup);
}
if (libs.includes('process-services-cloud')) {
slackGroups.add(HxpQAGroup);
}
if (libs.includes('core')) {
slackGroups.add(AlfrescoQAGroup);
slackGroups.add(HxpQAGroup);
}
const result = Array.from(slackGroups.values()).join(' ');
core.info(`Result ${result}`);
return result;
@@ -1,19 +0,0 @@
name: "Upload build artifacts"
description: "Upload build artifacts"
runs:
using: "composite"
steps:
- name: tar and upload artifacts
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time tar czf $i.tar.gz $i
du -h $i.tar.gz
time aws s3 cp --no-progress $i.tar.gz "s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz"
done
-5
View File
@@ -1,5 +0,0 @@
name: "CodeQL config"
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
-72
View File
@@ -1,72 +0,0 @@
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:
- "@angular/*"
angular-devkit:
patterns:
- "@angular-devkit/*"
ngrx:
patterns:
- "@ngrx/*"
nrwl:
patterns:
- "@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"
-56
View File
@@ -1,56 +0,0 @@
name: "CodeQL"
on:
push:
branches: [develop, master]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
schedule:
- cron: '0 5 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript
config-file: ./.github/codeql/codeql-config.yml
# 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
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
-75
View File
@@ -1,75 +0,0 @@
name: "git-tag"
on:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
push:
branches:
- master
- master-patch-*
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 }}
LOG_LEVEL: "ERROR"
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"
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"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
release:
uses: ./.github/workflows/release.yml
secrets: inherit
with:
dry-run-flag: false
setup:
needs: release
timeout-minutes: 20
name: "Release tag"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: $BOT_GITHUB_TOKEN
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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
with:
node-version-file: '.nvmrc'
- name: "Release tag"
run: |
git fetch --all --quiet
BRANCH=${GITHUB_REF##*/} ./scripts/github/release/git-tag.sh ${{ steps.set-dryrun.outputs.dryrun }}
-29
View File
@@ -1,29 +0,0 @@
name: Package published
on:
registry_package:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
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
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
retries: 3
script: |
const payload = {
package_name: "${{ github.event.registry_package.name }}",
package_version: "${{ github.event.registry_package.package_version.name }}"
};
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: "alfresco-apps",
event_type: "package-published",
client_payload: payload
});
console.log(`Trigger a dispatch event for the monorepo`);
-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 }}
-296
View File
@@ -1,296 +0,0 @@
name: "pull-request"
on:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
devel:
description: 'devel'
required: false
type: boolean
default: false
cron-run:
description: 'disables jobs which should not run when cron runs e2es'
required: false
type: boolean
default: false
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- master
- develop-patch*
- master-patch*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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 }}
LOG_LEVEL: "ERROR"
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"
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
pre-checks:
runs-on: ubuntu-latest
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
- name: Check package-lock.json version
run: |
if [[ $(jq '.lockfileVersion == 3' package-lock.json) == "true" ]] ; then
echo "package-lock.json has a correct version"
else
echo "package-lock must be version 3"
exit 1
fi
check-if-pr-is-approved:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@c1236aee36bb9b35c5972819fcf8a4d07572e6cd # v8.16.0
- name: Save commit message
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@c1236aee36bb9b35c5972819fcf8a4d07572e6cd # v8.16.0
- name: ci:force flag parser
shell: bash
run: |
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.actor }}" == "dependabot[bot]" ]; then
echo -e "\033[32mci:force check can be skipped\033[0m"
skip_check="true"
elif [[ "$COMMIT_MESSAGE" == *"[ci:force]"* ]]; then
echo -e "\033[32m[ci:force] flag detected. No need for approval.\033[0m"
skip_check="true"
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
id: action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: show pr number
shell: bash
run: |
echo "PR: ${{ steps.action.outputs.number }}"
- name: check if pr is approved
env:
DEVEL_FLAG: ${{ inputs.devel }}
GH_TOKEN: ${{ github.token }}
skip_check: "false"
run: |
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.actor }}" == "dependabot[bot]" ]; then
echo -e "\033[32mci:force check can be skipped\033[0m"
skip_check="true"
elif [[ "$COMMIT_MESSAGE" == *"[ci:force]"* ]]; then
echo -e "\033[32m[ci:force] flag detected. No need for approval.\033[0m"
skip_check="true"
fi
if [ "${{ github.actor }}" == "dependabot[bot]" ] || [ "${{ github.actor }}" == "alfresco-build" ]; then
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
echo -e "\033[32mSchedule event\033[0m"
skip_check="true"
fi
if [[ "$DEVEL_FLAG" == "true" ]]; then
echo -e "\033[32mDevel flag\033[0m"
skip_check="true"
fi
if [ "$skip_check" == "false" ]; then
echo "Checking PR approval"
prNumber=${{ steps.action.outputs.number }}
echo "PR: $prNumber"
checkApproval=$(gh api /repos/$GITHUB_REPOSITORY/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
if [[ $checkApproval ]]; then
echo -e "\033[32mPR approved\033[0m"
else
echo -e "\033[31mPR NOT approved\033[0m"
exit 1
fi
fi
setup:
# 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]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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
- uses: ./.github/actions/upload-node-modules-and-artifacts
unit-tests:
timeout-minutes: 30
name: "Unit tests: ${{ matrix.unit-tests.name }}"
runs-on: ubuntu-latest
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"
- name: core
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
- name: insights
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular,js-api"
- 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"
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Run unit tests
run: |
/usr/bin/xvfb-run --auto-servernum npx nx affected:test $NX_CALCULATION_FLAGS --exclude=${{ matrix.unit-tests.exclude }}
lint:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Lint"
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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: npx nx affected --target=lint $NX_CALCULATION_FLAGS
build-libs:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Build libs"
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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
- uses: ./.github/actions/upload-node-modules-and-artifacts
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
with:
fetch-depth: 1
- name: PR contains forbidden labels
id: pr-forbidden
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const issueHasLabels = require('./scripts/github/update/check-issue-has-label.js');
const checkLabels = ['next version ➡️', 'do not merge🙅🏻‍♂️'];
const hasLabel = await issueHasLabels({github, context, checkLabels})
if(hasLabel) {
core.setFailed('The PR contains a forbidden label! You are not allowed to merge until the label is there.');
}
- name: Check value after
run: |
echo "result ${{ toJson(steps.pr-forbidden.*.result) }}" && echo "result ${{ steps.pr-forbidden.*.result }}"
echo "result ${{ contains(toJson(steps.pr-forbidden.*.result), 'failure') }}"
finalize:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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
name: Nofify QA failure
if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C016SMNNL8L' #guild-channel
slack-message: "🔴 Warning: The daily ADF cronjob failed\nWorkflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\nDetails: ${{ steps.e2e-result.outputs.result }}\nArea: ${{ steps.groups.outputs.groups}}"
- name: workflow failure
run: exit 1
if: ${{ contains(needs.*.result, 'failure') }}
- name: workflow canceled
run: exit 1
if: ${{ contains(needs.*.result, 'cancelled') }}
- name: workflow success
run: exit 0
if: ${{ contains(needs.*.result, 'success') }}
-18
View File
@@ -1,18 +0,0 @@
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-129
View File
@@ -1,129 +0,0 @@
name: Release lib on branch
run-name: Release lib on branch ${{ github.ref_name }}
on:
workflow_dispatch:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
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 }}
LOG_LEVEL: "ERROR"
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"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
setup:
timeout-minutes: 20
name: "Setup"
runs-on: ubuntu-latest
steps:
- name: set TAG_NPM BRANCH
shell: bash
run: |
TAG_NPM="branch"
echo "Set TAG with name: ${TAG_NPM}"
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
release-npm:
needs: [setup]
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
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
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
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
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
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
npm-check-bundle:
needs: [release-npm]
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/npm-check-bundle
-222
View File
@@ -1,222 +0,0 @@
name: "release"
on:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
pull_request:
types: [closed]
branches:
- develop
- master
- 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 }}
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 }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
LOG_LEVEL: "ERROR"
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"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
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
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
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
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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
act: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: release Storybook docker
run: |
npx nx run stories:build-storybook --configuration ci
. ./scripts/github/release/docker-tag.sh
./scripts/github/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
release-npm:
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
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
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
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
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
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
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
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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]
steps:
- uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
name: Nofify FE eng-guild-front-end 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>"
+14 -26
View File
@@ -1,33 +1,21 @@
/.angular/cache
*.log
node_modules
bundles
workspace.xml
.idea/
*.iml
.env.*
.env
dist
!./.github/actions/**/dist
e2e/.env.cloud
tmp
temp
/nxcache
dist/
ng2-components/coverage/
!systemjs.config.js
demo-shell-ng2/app/components/router/
ng2-components/ng2-alfresco-userinfo-old/demo/src/app/
ng2-components/ng2-alfresco-userinfo-old/src/services/bpm-user.service.spec.ts
ng2-components/ng2-alfresco-userinfo-old/src/services/ecm-user.service.spec.ts
src/environments/
/ng2-components/ng2-example-webpack/
/ng2-components/config/coverage/
*.npmrc
/demo-shell-ng2/ng2-components/
.happypack/
.happypack/
.history
package-lock.*
/ng2-components/ng2-alfresco-core/prebuilt-themes/
.ng_pkg_build/
/lib/export-new.json
/lib/config/exportCheck.js
/docs/sourceinfo
/docs/docs.json
coverage/
/desktop.ini
out-tsc
/reports/
e2e-result-*
licenses.txt
.DS_Store
.angular
NX
.nx
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
export NODE_OPTIONS=--max_old_space_size=8192
npx lint-staged
-4
View File
@@ -1,4 +0,0 @@
{
"*.{ts,js}": ["prettier --write", "eslint"],
"*.{css,scss}": ["prettier --write", "stylelint --fix"]
}
-1
View File
@@ -1 +0,0 @@
20.18.1
-1
View File
@@ -1 +0,0 @@
/lib/cli/scripts/resources.ts
-5
View File
@@ -1,5 +0,0 @@
{
"singleQuote": true,
"trailingComma": "none",
"printWidth": 150
}
-9
View File
@@ -1,9 +0,0 @@
import { create } from '@storybook/theming';
import alfrescoLogo from '../lib/core/src/lib/assets/images/alfresco-logo.svg';
export default create({
base: 'light',
brandTitle: 'Hyland | Alfresco Storybook App',
brandUrl: 'https://www.alfresco.com/',
brandImage: alfrescoLogo,
});
-10
View File
@@ -1,10 +0,0 @@
module.exports = {
framework: {
name: '@storybook/angular',
options: {}
},
staticDirs: [],
docs: {},
stories: [],
addons: ['@chromatic-com/storybook']
};
-5
View File
@@ -1,5 +0,0 @@
export const parameters = {
docs: { inlineStories: true },
controls: { expanded: true }
};
export const tags = ['autodocs', 'autodocs', 'autodocs'];
-10
View File
@@ -1,10 +0,0 @@
{
"extends": "../tsconfig.json",
"exclude": [
"../**/*.spec.js",
"../**/*.spec.ts",
"../**/*.spec.tsx",
"../**/*.spec.jsx"
],
"include": ["../**/*"]
}
-2
View File
@@ -1,2 +0,0 @@
_theming.scss
lib/core/src/lib/viewer/components/pdf-viewer-host.component.scss
-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
}
}
+74
View File
@@ -0,0 +1,74 @@
language: node_js
dist: trusty
sudo: false
node_js:
- "8"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
env:
matrix:
- MODULE=ng2-components-alfresco
- MODULE=ng2-components-activiti
- MODULE=ng2-demo-shell
install:
- if ([ "$MODULE" == "ng2-components-alfresco" -o "$MODULE" == "ng2-components-activiti" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
(./scripts/npm-build-all.sh -vjsapi alpha || exit 1;);
fi
fi
script:
- if ([ "$MODULE" == "ng2-components-activiti" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-activiti*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-components-alfresco" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-alfresco*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-demo-shell" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/start.sh -t -ss || exit 1;);
else
(./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
fi
fi
# jobs:
# include:
# - stage: Publish alpha to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $(./scripts/next_version.sh)-$(git rev-parse HEAD) -vj $(npm view alfresco-js-api@alpha version) -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t alpha --sleep 20 || exit 1;);
# on:
# branch: development
# skip_cleanup: true
# - stage: Publish beta to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $TRAVIS_TAG -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t beta --sleep 20 || exit 1;);
# on:
# tags: true
# skip_cleanup: true
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
cache:
directories:
- ./node_modules/material-design-lite
- ./node_modules/material-design-icons
- demo-shell-ng2/node_modules
- ng2-components/node_modules
-17
View File
@@ -1,17 +0,0 @@
specFile=$1;
configFile=$2;
findconfig() {
if [ -f "$1" ]; then
printf '%s\n' "${PWD%/}/$1"
elif [ "$PWD" = / ]; then
false
else
(cd .. && findconfig $1)
fi
}
DIR=$(dirname "$specFile")
cd $DIR
configFile=`findconfig "$configFile"`;
echo "$configFile";
-5
View File
@@ -1,5 +0,0 @@
{
"recommendations": [
"lucono.karma-test-explorer"
]
}
-27
View File
@@ -1,27 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "e2e",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"args": [
"./e2e/protractor.conf.js",
"--specs=${file}"
],
"envFile": "${workspaceFolder}/.env",
"console": "integratedTerminal",
"sourceMaps": true,
"smartStep": true,
"skipFiles": [
"${workspaceFolder}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"internalConsoleOptions": "neverOpen"
}
]
}
+20 -33
View File
@@ -1,36 +1,23 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/coverage": true,
"**/.happypack": true
},
"markdownlint.config": {
"MD032": false,
"MD004": false,
"MD024": false,
"MD009": false,
"MD013": false,
"MD036": false,
"MD033": false,
"MD031": false
},
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false,
"stylelint.config": {
"extends": "./.stylelintrc.json"
},
"stylelint.configFile": ".stylelintrc.json",
"stylelint.validate": [
"css",
"less",
"postcss",
"scss"
],
"editor.guides.indentation": true,
"typescript.tsdk": "node_modules/typescript/lib"
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/coverage": true,
"**/.happypack": true
},
"editor.renderIndentGuides": true,
"tslint.configFile": "ng2-components/tslint.json",
"markdownlint.config": {
"MD032": false,
"MD004": false,
"MD024": false,
"MD009": false,
"MD013": false,
"MD036": false,
"MD033" : false,
"MD031" : false
}
}
+37 -47
View File
@@ -1,30 +1,25 @@
# CORS solving strategies
### CORS solving strategies
A web client built with ADF typically won't be loaded from the same web server that the Alfresco Platform is running on.
This means you need to tell the Alfresco server explicitly that any request coming in from this custom web client should be allowed access
to the Content Repository. This is done by enabling
[Cross Origin Resource Sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)
(CORS).
The web client that we are building with the application development framework will be loaded from a different web server than the Alfresco Platform is running on.
So we need to tell the Alfresco server that any request that comes in from this custom web client should be allowed access
to the Content Repository. This is done by enabling CORS.
If you are experiencing this kind of problem, use **one of the following approaches**,
depending on your setup:
If you are experiencing this kind of problem, see **one of the following**:
1. [Configure Webpack Proxy](#configure-webpack-proxy)
2. [Configure angular-cli Proxy](#configure-angular-cli-proxy)
3. [Configure nginx proxy](#configure-nginx-proxy)
4. [Enable CORS in CS and PS](#configure-webpack-proxy)
## Configure Webpack Proxy
If you are using a project created with the [Yeoman Generator](https://github.com/Alfresco/generator-ng2-alfresco-app) or the demo shell (>=1.6.0), you already have
a suitable configuration out of the box in your `config/webpack.common.js` file.
# Configure Webpack Proxy
If you are using a project created with the [Yeoman Generator](https://github.com/Alfresco/generator-ng2-alfresco-app) or the demo shell >=1.6.0, you have already out of the box in your `config/webpack.common.js` the following configuration.
Say we have an app running on http://localhost:3000/ and we want to redirect all calls with the following strategy:
* Content Service http://localhost:8080/ redirect to -> http://localhost:3000/ecm/
* Process Service http://localhost:9999/ redirect to -> http://localhost:3000/bpm/
Open the `config/webpack.common.js` file, find the `devServer` section and add the content:
Open the `config/webpack.common.js` file, find the `devServer` section and add the content:
```javascript
devServer: {
@@ -60,21 +55,18 @@ devServer: {
```
Notes:
- With a different configuration of webpack, the `devServer` properties could be in other webpack files. Search your configuration files to find the correct location.
- With different configuration of webpack the `devServer` properties could be in other webpack files. Search in your configuration files
- If you are running the App, Content Service or Process Service on different ports change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://webpack.js.org/configuration/dev-server/#devserver-proxy).
## Configure angular-cli Proxy
# Configure angular-cli Proxy
Say we have an app running on http://localhost:3000/ and we want to redirect all the calls with the following strategy:
* Content Service http://localhost:8080/ redirect to -> http://localhost:3000/ecm/
* Process Service http://localhost:9999/ redirect to -> http://localhost:3000/bpm/
Create a file next to the project's `package.json`, call it `proxy.conf.json` and add the following content:
Create a file next to project's `package.json`, call it `proxy.conf.json` and add the following content:
```javascript
{
@@ -101,37 +93,36 @@ Create a file next to the project's `package.json`, call it `proxy.conf.json` an
}
```
Note that if you are running the App, Content Service or Process Service on different ports, you should change the ports accordingly in your local configuration.
Note if you are running the App, Content Service or Process Service on different ports change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md).
## Configure nginx proxy
# Configure nginx proxy
### Installing nginx
## Installing nginx
Most Linux distributions will come with nginx available to install via your
package manager and on Mac OS you can use [Homebrew](http://brew.sh/).
If you want to install manually, you can follow the instructions on the
If you want to install manually however, you can follow the instructions on the
[download page](http://nginx.org/en/download.html). See also the specific information for
[Windows users](http://nginx.org/en/docs/windows.html).
[windows users](http://nginx.org/en/docs/windows.html).
#### Start nginx
### Start nginx
Start nginx using the supplied configuration in [nginx.conf](nginx.conf)
nginx -c nginx.conf
#### Review nginx configuration
### Review nginx configuration
To correctly configure nginx, use the [nginx.conf](nginx.conf) file in the project root folder.
To correctly configure nginx use the following file [nginx.conf](/nginx.conf).
This will host Activiti, Alfresco and the app dev framework under the same origin.
* ECM : http://localhost:8888/alfresco/
* BPM : http://localhost:8888/activiti/
To make everything work, you should change the address of ECM and BPM. In the demo app you can do that by clicking on the top right settings menu and changing the bottom left options: *ECM host* and *BPM host*.
To make everything work, you should change the address of the ECM and BPM. In the demo app you can do that by clicking on the top right settings menu and change the bottom left options: *ECM host* and *BPM host*.
This configuration assumes a few things:
@@ -141,31 +132,30 @@ This configuration assumes a few things:
* Alfresco: localhost:8080
* Activiti: localhost:9999
You can modify all these values at their respective `location` directive in the
[nginx.conf](/nginx.conf) file.
All those values can be modified at their respective `location` directive on the [nginx.conf](/nginx.conf) file.
See the [Alfresco community page](https://community.alfresco.com/community/application-development-framework/blog/2016/09/28/adf-development-set-up-with-nginx-proxy) about using nginx with ADF for further information.
If you want to know more on how to install and configure nginx to work with the Application Development Framework, information can be found [here](https://community.alfresco.com/community/application-development-framework/blog/2016/09/28/adf-development-set-up-with-nginx-proxy)
## Enable CORS in CS and PS
If you want to completely enable CORS calls in your Content Services and Process Services,
please refer to the following Alfresco documents:
# Enable CORS in CS and PS
* [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)
If you want to completely enable CORS calls on your Content Service and Process Service, please refer to the following Alfresco documents:
* [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
The easiest approach is to add the [enablecors](https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/enablecors/1.0/enablecors-1.0.jar)
platform module JAR to the `$ALF_INSTALL_DIR/modules/platform` directory and restart the server.
This is the easiest way, add the [enablecors](https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/enablecors/1.0/enablecors-1.0.jar)
platform module JAR to the *$ALF_INSTALL_DIR/modules/platform* directory and restart the server.
Note that, by default, the CORS filter that is enabled will allow any origin.
Note. by default, the CORS filter that is enabled will allow any origin.
Or - Manually update the web.xml file
Alternatively, you can update the `web.xml` file manually.
Modify *$ALF_INSTALL_DIR/tomcat/webapps/alfresco/WEB-INF/web.xml* and uncomment the following section and update
`cors.allowOrigin` to `http://localhost:3000` :
Modify `$ALF_INSTALL_DIR/tomcat/webapps/alfresco/WEB-INF/web.xml` and uncomment the following section and update
`cors.allowOrigin` to `http://localhost:3000`:
```xml
```
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
@@ -199,11 +189,11 @@ Modify `$ALF_INSTALL_DIR/tomcat/webapps/alfresco/WEB-INF/web.xml` and uncomment
</init-param>
</filter>
```
When specifying the `cors.allowOrigin` URL, make sure that you use the URL that will be used by the web client.
When specifying the `cors.allowOrigin` URL make sure to use the URL that will be used by the web client.
Then uncomment the filter mappings:
Then uncomment filter mappings:
```xml
```
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/api/*</url-pattern>
+55
View File
@@ -0,0 +1,55 @@
# Browser Support
Browser support and polyfills guide.
Browser compatibility and support depends on targeted browsers and 3rd party libraries. ADF is based on the following libraries and components:
- Angular 2 (all ADF components)
- Material Design Lite (all ADF components)
- Moment.js (many ADF components)
- PDF.js (`ng2-alfresco-viewer` component)
- Raphael.js (`ng2-alfresco-diagrams`, `ng2-alfresco-analytics`)
- Chart.js (`ng2-alfresco-analytics`)
- Material Design - Date and Time Picker (`ng2-activiti-form`, `ng2-alfresco-analytics`)
## Browser polyfills
### Angular 2
Please refer to the [official guide](https://angular.io/docs/ts/latest/guide/browser-support.html) for Angular 2 browser support.
ADF (demo shell) imports by default the following set of recommended polyfills:
- [core-js](https://www.npmjs.com/package/core-js) (ES6 standard support)
### 3rd party libraries
Please refer to the following list of [popular polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills) for HTML5 cross-browser compatibility.
ADF (demo shell) imports by default the following set of recommended polyfills:
- [intl](https://www.npmjs.com/package/intl), Polyfill the ECMA-402 Intl API (except collation), **IE**/**Safari**
- [dom4](https://github.com/WebReflection/dom4), A fully tested and covered polyfill for new DOM Level 4 entries, **IE**
- [element.scrollintoviewifneeded-polyfill](https://www.npmjs.com/package/element.scrollintoviewifneeded-polyfill), simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements, **IE**/**Firefox**/**Safari**, required only to support **Material Design - Date and Time Picker** component
- [pdfjs compatibility](https://www.npmjs.com/package/pdfjs-dist), Portable Document Format (PDF) library that is built with HTML5, **IE**
- (dialog-polyfill)[https://www.npmjs.com/package/dialog-polyfill], Polyfill for the dialog element, **IE**/**Safari**/**Firefox**
## Example
```html
<!-- Polyfill(s) for Safari (pre-10.x) -->
<script src="node_modules/intl/dist/Intl.min.js"></script>
<script src="node_modules/intl/locale-data/jsonp/en.js"></script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/dom4/1.8.3/dom4.js"></script>
<script src="node_modules/element.scrollintoviewifneeded-polyfill/index.js"></script>
<!-- Polyfill(s) for pdf support -->
<script src="node_modules/pdfjs-dist/web/compatibility.js"></script>
<!-- Polyfill(s) for dialogs -->
<script src="node_modules/dialog-polyfill/dialog-polyfill.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/dialog-polyfill/dialog-polyfill.css" />
```
For a complete code please refer to [demo shell](demo-shell-ng2/index.html) example.
-23
View File
@@ -1,23 +0,0 @@
# Contributor Code of Conduct
We want to make everyone feel welcome to contribute to ADF.
We promise to respect everyone who posts issues, updates documentation,
submits pull requests, provides feedback in comments, or makes any other contribution to the project.
We expect all discussion about the project (on GitHub, social media and other channels) to be positive and constructive.
We do not accept personal attacks, trolling, public or private harassment, insults,
or other unprofessional conduct towards anyone.
We promise to show respect to all contributors regardless of their gender, gender identity,
sexual orientation, disability, age, race, ethnicity, religion, or level of experience.
We expect all contributors to understand and follow these standards
If any member of the community does not follow the code of conduct,
the maintainers will do whatever they consider appropriate to stop the unacceptable behavior.
This may include removing issues, comments, and PRs or blocking accounts.
Any bans may be temporary or permanent, at the maintainers discretion.
Contact us if you see any behavior that breaks the code of conduct, whether it is directed at you or at anyone else.
We take responsibility for making sure the code of conduct is clear and understandable,
so you should also contact us if you think there is anything that needs to be explained better.
Our contact email address is: [conduct@alfresco.com](mailto:conduct@alfresco.com)
+23 -23
View File
@@ -6,21 +6,21 @@
## Submitting a Pull Request (PR)
Before you submit a pull request please follow the steps below:
Before you submit please follow the steps below:
* Search in [GitHub PR](https://github.com/Alfresco/alfresco-ng2-components/pulls) for an open or closed PR
that could solve or already solves your issue.
* Search in the [GitHub release history](https://github.com/Alfresco/alfresco-ng2-components/releases) to see if your
* Search in the [GitHub release history](https://github.com/Alfresco/alfresco-ng2-components/releases) if your
issue has already been solved in a new version of ADF.
* Fork our repository (if you don't know how to do this, read [this GitHub document](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)).
* Make your changes in a new git branch starting from develop and following our [naming convention](https://github.com/Alfresco/alfresco-ng2-components/wiki/Branching-Strategy)
* Fork our repository - [if you don't know how to do it read this GitHub document](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
* Make your changes in a new git branch starting from development and following the [naming convention](https://github.com/Alfresco/alfresco-ng2-components/wiki/Branching-Strategy)
```shell
git checkout -b dev-{developerName}-{GitIssuedId/JiraIssueId} develop
git checkout -b dev-{developerName}-{GitIssuedId/JiraIssueId} development
```
* Create your PR **including appropriate test cases** following the [code contribution acceptance criteria](https://github.com/Alfresco/alfresco-ng2-components/wiki/Code-contribution-acceptance-criteria)
* Run the tests and make sure they are green. Please don't comment out or exclude the tests that are already in place.
* Run the tests and make sure they are green. Please don't comment out or exclude the already existing tests
* Commit your change using the [commit format message good practice](https://github.com/Alfresco/alfresco-ng2-components/wiki/Commit-format)
* Push your branch to GitHub:
@@ -28,32 +28,32 @@ Before you submit a pull request please follow the steps below:
git push origin dev-{developerName}-{GitIssuedId/JiraIssueId}
```
* In GitHub, send a pull request to `develop`.
* In GitHub, send a pull request to `development`.
* If we suggest changes then:
* Make the required updates.
* Re-run the tests.
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
```shell
git fetch develop
git fetch development
git checkout dev-my-branch
git rebase develop -i
git rebase development -i
git push -f
```
Note: If you need more information about how to sync your fork, see [this page](https://help.github.com/articles/syncing-a-fork/).
Note: If you need more information about how to sync your fork, see [here](https://help.github.com/articles/syncing-a-fork/)
## Code style
The code style for ADF follows the [Angular style guide](https://angular.io/guide/styleguide) plus some internal rules.
The codebase is also checked with:
- ESLint tool
- Stylelint tool
The code style in the ADF code 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 to one of these rules you will receive an error when you build the project with some help on how to fix it.
The ADF-Rules :
* 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
In ADF, we encourage the use of behavior-driven development (BDD).
In ADF we are encouraging the use of behavior-driven development (BDD)
### General guidelines
@@ -63,16 +63,16 @@ In ADF, we encourage the use of behavior-driven development (BDD).
### File name
* The file name specification must be the same as the component/service/pipe it tests plus the .spec. suffix.
* The specification file must be in the same folder as the component/service/pipe it tests.
* The file name specification as to be the same of the component/service/pipe it test plus the .spec. suffix
* The specification file has to be in the same folder of the component/service/pipe it test
### Describer Name
* The Main describer of the test should be the name of the class under test
* The sub describe is used for grouping related behavior test. Do not overuse it.
* The sub describe is used for grouping related behavior test. Do not over use it
### Test Name
Any test should follow the naming convention:
Any test should follow the naming convetion:
[Should] [ ***Expected Behavior*** ] [when/after/before] [ ***State Under Test*** ].
[Should] [ ***Expected Behavior** ] [when/after/before] [ ***State Under Test*** ].
-27
View File
@@ -1,27 +0,0 @@
# 1. Generate licenses
FROM node:18.16-alpine3.17 AS builder
WORKDIR /usr/src/alfresco
COPY package.json package.json
# 2. Generate image
FROM nginxinc/nginx-unprivileged:1.21-alpine
USER root
RUN apk update && apk upgrade
USER 101
ARG PROJECT_NAME
COPY docker/default.conf.template /etc/nginx/templates/
COPY dist/$PROJECT_NAME /usr/share/nginx/html/
COPY dist/$PROJECT_NAME/app.config.json /etc/nginx/templates/app.config.json.template
USER root
RUN chmod a+w -R /etc/nginx/conf.d
USER 101
ENV BASE_PATH=/
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
+41
View File
@@ -0,0 +1,41 @@
# Introduction to the Alfresco Application Development Framework
The Alfresco application development framework is based on the [Angular 2 JavaScript library](https://angular.io/).
The framework is provided by Alfresco to make it easy to build custom web applications that
should manage and view content in the [Alfresco Platform Repository](http://docs.alfresco.com/5.1/concepts/content-repo-about.html) in a custom way.
As you probably know, there is a general user interface called [Alfresco Share](http://docs.alfresco.com/5.1/concepts/gs-intro.html) available out-of-the-box.
Share is usually used as a quick way of getting started with content management with Alfresco. It gives you access to pretty much all
the features provided by the Alfresco ECM system. And a lot of customers customize it for their specific domain.
However, there are use-cases that Share does not fit very well, such as:
- Feature-based clients, exposing functionality to perform a specific task(s)
- Role-based clients, exposing functionality based on role
- Clients where the UI layout and style differs significantly from the Share layout and styling
- [Mashup clients](http://whatis.techtarget.com/definition/mash-up)
This is where this application development framework comes into play, it can be used to create exactly the user interface
(i.e. web client) that the requirements demand.
The framework consists of several components that can be combined to form a customized content management application.
Here is a list of some of the available web components:
- [Core library](ng2-components/ng2-alfresco-core/README.md)
- [DataTable](ng2-components/ng2-alfresco-datatable/README.md)
- [DocumentList](ng2-components/ng2-alfresco-documentlist/README.md)
- [Viewer](ng2-components/ng2-alfresco-viewer/README.md)
- [Login](ng2-components/ng2-alfresco-login/README.md)
- [Upload](ng2-components/ng2-alfresco-upload/README.md)
You can browse all the components at this [page](http://devproducts.alfresco.com/).
An architecture overview looks like this:
<p align="center">
<img title="alfresco-ng2-components-architecture" alt='alfresco' src='assets/alfresco-app-dev-framework-architecture.png'></img>
</p>
Here we can also see that there is an Alfresco JavaScript framework in use that wraps the Alfresco REST API, to make things easier for the client developer.
+27
View File
@@ -0,0 +1,27 @@
# Prerequisites for building and running apps with the Alfresco Application Development Framework
The [Angular 2](https://angular.io/) based application development framework requires the following:
- An Alfresco Platform Repository (version [201609 Early Access](https://community.alfresco.com/docs/DOC-6372-alfresco-community-edition-file-list-201609-ea) or newer)
- [Download and install the process service](https://www.alfresco.com/products/bpm/alfresco-activiti/trial)
- [Node.js](https://nodejs.org/en/) JavaScript runtime.
- [npm](https://www.npmjs.com/) package manager for JavaScript.
- (If you use CS and PS together) Make sure your user has the same username and password in both system
- [If you are experiencing CORS problem read this guide](/ALFRESCOCORS.md)
*Note: Default username for activiti is "admin@app.activiti.com" and "admin" for Alfresco, and also the default password are different. Change them to be equal.*
**Verify that you are running at least node `v5.x.x` and npm `3.x.x`**
by running `node -v` and `npm -v` in a terminal/console window.
Older versions produce errors.
## Installing Node.js
If you don't have Node.js installed then access this [page](https://nodejs.org/en/download/) and use the appropriate installer for your OS.
Make sure the Node.js version is > 5:
```
$ node -v
v5.12.0
```
+74 -33
View File
@@ -1,49 +1,90 @@
# Alfresco Application Development Framework (ADF)
# ALFRESCO ANGULAR COMPONENTS
[![Join the chat at https://gitter.im/Alfresco/alfresco-ng2-components](https://badges.gitter.im/Alfresco/alfresco-ng2-components.svg)](https://gitter.im/Alfresco/alfresco-ng2-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<p>
<a title='Build Status Travis' href="https://travis-ci.org/Alfresco/alfresco-ng2-components">
<img src='https://travis-ci.org/Alfresco/alfresco-ng2-components.svg?branch=master' alt='travis
Status' />
</a>
<a title='Build Status AppVeyor' href="https://ci.appveyor.com/project/alfresco/alfresco-ng2-components">
<img src='https://ci.appveyor.com/api/projects/status/github/Alfresco/alfresco-ng2-components' alt='travis
Status' />
</a>
<a href='https://codecov.io/gh/Alfresco/alfresco-ng2-components'>
<img src='http://img.shields.io/codecov/c/github/Alfresco/alfresco-ng2-components/master.svg?maxAge=2592000' alt='Coverage Status' />
</a>
<a href='https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE'>
<img src='https://img.shields.io/hexpm/l/plug.svg' alt='license' />
</a>
</p>
## Introduction
See the [introduction page](docs/user-guide/adf-introduction.md) in our
[documentation](docs/README.md) for an overview of ADF along with links
to useful starting points.
See the following [page](INTRODUCTION.md) for an introduction to the Alfresco Application Development Framework.
## Prerequisites
```text
Node: 18.x
NPM: 9.x
```
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
- [Node Version Manager](docs/tutorials/nvm.md)
- [CORS guide](ALFRESCOCORS.md)
Before you start using this development framework, make sure you have installed all required software and done all the
necessary configuration, see this [page](PREREQUISITES.md).
## Components
You can find the sources for all ADF components in the [`lib`](/lib) folder.
To view the complete list of all the components that you can use to build your custom Alfresco (ECM,BPM) client follow this link:
[Components](/ng2-components).
## Libraries
You can browse all the components at the following [page](http://devproducts.alfresco.com/).
ADF Libraries list:
## Demo Application
- [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)
- [Insights](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/insights)
- [Process Service Cloud](https://github.com/Alfresco/alfresco-ng2-components/tree/develop/lib/process-services-cloud)
- [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)
A separate application showcasing integration of components can be found [here](https://github.com/Alfresco/alfresco-ng2-components/tree/master/demo-shell-ng2).
You will find examples of basic interaction for both BPM and ECM sets of widgets.
## Yeoman generators
To speed up the development of your Alfresco Angular 2 application, or Alfresco Angular 2 component, use one of the Yeoman generators.
These generators will create a full working project with all the right libraries and tools.
<p align="center">
<img title="yeoman generator" src='https://github.com/yeoman/media/blob/master/optimized/yeoman-150x150-opaque.png' alt='yeoman logo' />
</p>
### Generate an Alfresco web component starter project
To generate your Alfresco Angular 2 component you can use the following Yeoman generator:
- [Yeoman Generator Angular 2 Alfresco component](https://github.com/Alfresco/generator-ng2-alfresco-component)
### Generate an Alfresco web application starter project
To generate your Alfresco Angular 2 application you can use the following Yeoman generator:
- [Yeoman Generator Angular 2 Alfresco application](https://github.com/Alfresco/generator-ng2-alfresco-app)
## Amazon AWS Elastic Beanstalk fast deploy
<p align="center">
<img alt="AmazonWebservices Logo.svg" src="https://upload.wikimedia.org/wikipedia/commons/1/1d/AmazonWebservices_Logo.svg" width="250" height="94">
</p>
To deploy directly on your AWS instance our demo shell click the button below:
<a title="Deploy to AWS" href="https://console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/newApplication?applicationName=Alfresco&solutionStackName=Node.js&tierName=WebServer&sourceBundleUrl=https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-677901592050/ADF_1.0.zip" target="_blank"><img src="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png" height="40"></a>
## 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 (OS X) |9.x |
|Firefox* |Latest |
|Edge |13, 14 |
|Internet Explorer |11 |
* Due to a [Firefox known issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1188880), the Alfresco Upload Component does not currently support folder upload functionality on Firefox.
Please refer to the [Browser Support](BROWSER-SUPPORT.md) article for more details.
+44
View File
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
const sprintf_js_1 = require("sprintf-js");
const walkerFactory_1 = require("codelyzer/walkerFactory/walkerFactory");
const walkerFn_1 = require("codelyzer/walkerFactory/walkerFn");
const function_1 = require("codelyzer/util/function");
class Rule extends Lint.Rules.AbstractRule {
static invalidName(className) {
var whiteList = ['ActivitiContentComponent', 'ActivitiForm'];
var classNameReg = /^(alfresco|activiti|adf|activity)/ig;
var classNameMatch = classNameReg.exec(className);
var isWhiteListName = whiteList.find((currentWhiteListName) => {
return currentWhiteListName === className;
});
if (classNameMatch && !isWhiteListName) {
return true;
}
return false;
}
apply(sourceFile) {
return this.applyWithWalker(Rule.walkerBuilder(sourceFile, this.getOptions()));
}
}
Rule.metadata = {
ruleName: 'adf-class-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify class when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
Rule.FAILURE_STRING = 'The name of the class should not start with ADF Alfresco or Activiti prefix ';
Rule.walkerBuilder = walkerFn_1.all(walkerFn_1.validateComponent((meta, suffixList) => function_1.Maybe.lift(meta.controller)
.fmap(controller => controller.name)
.fmap(name => {
const className = name.text;
if (Rule.invalidName(className)) {
return [new walkerFactory_1.Failure(name, sprintf_js_1.sprintf(Rule.FAILURE_STRING + className, className, suffixList))];
}
})));
exports.Rule = Rule;
+61
View File
@@ -0,0 +1,61 @@
import * as Lint from 'tslint';
import * as ts from 'typescript';
import {sprintf} from 'sprintf-js';
import {ComponentMetadata} from 'codelyzer/angular/metadata';
import {Failure} from 'codelyzer/walkerFactory/walkerFactory';
import {all, validateComponent} from 'codelyzer/walkerFactory/walkerFn';
import {Maybe, F2} from 'codelyzer/util/function';
import {IOptions} from 'tslint';
import {NgWalker} from 'codelyzer/angular/ngWalker';
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: 'adf-class-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify class when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
public static FAILURE_STRING = 'The name of the class should not start with ADF Alfresco or Activiti prefix ';
static walkerBuilder: F2<ts.SourceFile, IOptions, NgWalker> =
all(
validateComponent((meta: ComponentMetadata, suffixList?: string[]) =>
Maybe.lift(meta.controller)
.fmap(controller => controller.name)
.fmap(name => {
const className = name.text;
if (Rule.invalidName(className)) {
return [new Failure(name, sprintf(Rule.FAILURE_STRING + className , className, suffixList))];
}
})
));
static invalidName(className: string): boolean {
var whiteList = ['ActivitiContentComponent', 'ActivitiForm'];
var classNameReg = /^(alfresco|activiti|adf|activity)/ig;
var classNameMatch = classNameReg.exec(className);
var isWhiteListName = whiteList.find((currentWhiteListName)=>{
return currentWhiteListName === className;
});
if (classNameMatch && !isWhiteListName) {
return true;
}
return false;
}
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(
Rule.walkerBuilder(sourceFile, this.getOptions())
);
}
}
+47
View File
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile) {
return this.applyWithWalker(new AdfFileName(sourceFile, this.getOptions()));
}
}
Rule.metadata = {
ruleName: 'adf-file-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify files when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
Rule.FAILURE_STRING = 'The name of the File should not start with ADF Alfresco or Activiti prefix ';
exports.Rule = Rule;
class AdfFileName extends Lint.RuleWalker {
visitSourceFile(node) {
var whiteList = ['activiti-content.component.ts', 'activiti-alfresco.service.ts', 'activiti-content-service.ts',
'alfresco-api.service.ts', 'alfresco-settings.service.ts', 'alfresco-content.service.ts',
'activiti-content.component.spec.ts', 'activiti-alfresco.service.spec.ts', 'activiti-content-service.spec.ts',
'alfresco-api.service.spec.ts', 'alfresco-settings.service.spec.ts', 'alfresco-content.service.spec.ts',
'activiti-content.service.spec.ts', 'activiti-content.service.ts'];
var fileName = this.getFilename();
var fileNameReg = /^(alfresco|activiti|adf|activity)/ig;
var filenameMatch = fileNameReg.exec(fileName);
var isWhiteListName = whiteList.find((currentWhiteListName) => {
return currentWhiteListName === fileName;
});
if (filenameMatch && !isWhiteListName) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING + fileName));
super.visitSourceFile(node);
}
}
getFilename() {
const filename = this.getSourceFile().fileName;
const lastSlash = filename.lastIndexOf('/');
if (lastSlash > -1) {
return filename.substring(lastSlash + 1);
}
return filename;
}
}
+56
View File
@@ -0,0 +1,56 @@
import * as ts from "typescript";
import * as Lint from "tslint";
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: 'adf-file-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify files when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
public static FAILURE_STRING = 'The name of the File should not start with ADF Alfresco or Activiti prefix ';
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(new AdfFileName(sourceFile, this.getOptions()));
}
}
// The walker takes care of all the work.
class AdfFileName extends Lint.RuleWalker {
public visitSourceFile(node: ts.SourceFile) {
var whiteList = ['activiti-content.component.ts', 'activiti-alfresco.service.ts', 'activiti-content-service.ts',
'alfresco-api.service.ts', 'alfresco-settings.service.ts', 'alfresco-content.service.ts',
'activiti-content.component.spec.ts', 'activiti-alfresco.service.spec.ts', 'activiti-content-service.spec.ts',
'alfresco-api.service.spec.ts', 'alfresco-settings.service.spec.ts', 'alfresco-content.service.spec.ts',
'activiti-content.service.spec.ts', 'activiti-content.service.ts'];
var fileName = this.getFilename();
var fileNameReg = /^(alfresco|activiti|adf|activity)/ig;
var filenameMatch = fileNameReg.exec(fileName);
var isWhiteListName = whiteList.find((currentWhiteListName)=>{
return currentWhiteListName === fileName;
});
if (filenameMatch && !isWhiteListName) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING + fileName));
super.visitSourceFile(node);
}
}
private getFilename(): string {
const filename = this.getSourceFile().fileName;
const lastSlash = filename.lastIndexOf('/');
if (lastSlash > -1) {
return filename.substring(lastSlash + 1);
}
return filename;
}
}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var adfClassNameRule_1 = require("./adfClassNameRule");
exports.ADFClassNameRule = adfClassNameRule_1.Rule;
var adfFileNameRule_1 = require("./adfFileNameRule");
exports.ComponentSelectorRule = adfFileNameRule_1.Rule;
+2
View File
@@ -0,0 +1,2 @@
export { Rule as ADFClassNameRule } from './adfClassNameRule';
export { Rule as ComponentSelectorRule } from './adfFileNameRule';
+2141
View File
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
{
"name": "adf-tslint-rules",
"description": "Custom Rules for the ADF project",
"version": "0.0.3",
"author": "Alfresco Software, Ltd.",
"scripts": {
"build": "tsc",
"tscv": "tsc --version",
"tsc": "tsc",
"tsc:watch": "tsc --w"
},
"contributors": [
{
"name": "Eugenio Romano",
"email": "eugenio.romano@alfresco.com"
}
],
"devDependencies": {
"@angular/compiler": "^4.2.3",
"@angular/core": "^4.2.3",
"@types/chai": "^3.4.33",
"@types/less": "0.0.31",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.41",
"@types/node-sass": "^3.10.31",
"@types/source-map": "^0.5.0",
"@types/sprintf-js": "0.0.27",
"chai": "^3.5.0",
"chai-spies": "^0.7.1",
"minimalist": "1.0.0",
"mocha": "3.0.2",
"node-sass": "^3.13.0",
"rimraf": "^2.5.2",
"rxjs": "5.4.1",
"ts-node": "1.2.2",
"tslint": "^5.0.0",
"typescript": "2.4.0",
"zone.js": "^0.8.4",
"js-yaml": "^3.8.4",
"json-stringify-pretty-compact": "^1.0.4",
"@types/js-yaml": "^3.5.31"
},
"peerDependencies": {
"tslint": "^5.0.0"
},
"dependencies": {
"app-root-path": "^2.0.1",
"css-selector-tokenizer": "^0.7.0",
"cssauron": "^1.4.0",
"semver-dsl": "^1.0.1",
"source-map": "^0.5.6",
"sprintf-js": "^1.0.3",
"codelyzer": "3.1.2"
},
"license": "Apache-2.0"
}
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"target": "es6",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"lib": ["es6", "es2015", "dom"],
"noLib": false,
"typeRoots": [
"./node_modules/@types",
"./node_modules"
],
"types": [
"mocha",
"chai",
"node",
"sprintf-js"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"rules": {
"adf-file-naming": true
}
}
+41
View File
@@ -0,0 +1,41 @@
# Test against this version of Node.js
branches:
only:
- master
- development
- dev-build-test
environment:
nodejs_version: "8"
matrix:
- COMPONENT_NAME: ng2-components-activiti
- COMPONENT_NAME: ng2-components-alfresco
# - COMPONENT_NAME: ng2-demo-shell
# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install module
- if %COMPONENT_NAME% EQU ng2-components-activiti (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" -vjsapi alpha|| exit 1)
)
- if %COMPONENT_NAME% EQU ng2-components-alfresco (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" -vjsapi alpha|| exit 1)
)
# - if %COMPONENT_NAME% EQU ng2-demo-shell (
# if %APPVEYOR_REPO_BRANCH EQU master
# (cd scripts && sh start.sh -t -ss || exit 1)
# else
# (cd scripts && sh start.sh -dev -t -ss -vjsapi alpha || exit 1)
# )
# Don't actually build.
build: off
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 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"
}
]
-164
View File
@@ -1,164 +0,0 @@
{
"version": "0.2",
"language": "en",
"words": [
"activiti",
"adhoc",
"afts",
"appkey",
"Arial",
"arrowdown",
"arrowup",
"auditable",
"AUTHTYPE",
"backend",
"baseitem",
"BASESHAREURL",
"booleanvisibility",
"booleanvisibilityprocess",
"boolitem",
"BPMHOST",
"cardview",
"checkboxes",
"classlist",
"Collapsable",
"CONTEXTROOTBPM",
"CONTEXTROOTECM",
"cryptodoc",
"CSRF",
"datacolumn",
"datarow",
"Datasource",
"datatable",
"dateitem",
"datepicker",
"datetimeitem",
"Datetimepicker",
"dbpci",
"DDTHH",
"devops",
"devtools",
"dialpad",
"DISABLECSRF",
"doclib",
"docx",
"dropdownrestprocess",
"Droppable",
"dryrun",
"ECMBPM",
"ECMHOST",
"Examinate",
"exif",
"filedata",
"filelink",
"filesize",
"firstname",
"floatitem",
"folderlink",
"formtotestvalidations",
"fullname",
"fullscreen",
"gitter",
"glyphicon",
"gridster",
"hardend",
"highlightable",
"hotfix",
"Hyland",
"imgpreview",
"Inplace",
"intitem",
"jira",
"jsons",
"jwks",
"keycodes",
"keyvaluepairs",
"keyvaluepairsitem",
"lastname",
"listgrid",
"mapitem",
"mimetype",
"mincount",
"minlength",
"minmax",
"MLTEXT",
"mousedrag",
"mouseenter",
"multiselect",
"mysites",
"nginx",
"numbervisibilityprocess",
"OAUTHCONFIG",
"oidc",
"overridable",
"pdfjs",
"penta",
"printf",
"processparent",
"processstring",
"processwithstarteventform",
"processwithvariables",
"Promise",
"promisify",
"qshare",
"quicktime",
"repo",
"requirednumbervisibility",
"rowspan",
"selectitem",
"sharedlinks",
"sidenav",
"snackbar",
"SOLR",
"starteventform",
"subfolders",
"swimlanes",
"swsdp",
"tabindex",
"taggable",
"tasklist",
"textitem",
"Theming",
"transcluded",
"transclusion",
"truthy",
"typeahead",
"typeahed",
"uncheck",
"Unclaim",
"Undeployed",
"unfavorite",
"unlisten",
"unshare",
"UPDATEPERMISSIONS",
"uploader",
"uploadfileform",
"userinfo",
"validators",
"waypoint",
"waypoints",
"webm",
"Whitespaces",
"xdescribe",
"xsrf",
"BPMECM",
"berseria",
"zestiria",
"validatable",
"edjs"
],
"dictionaries": [
"html",
"en-gb",
"en_US",
"softwareTerms",
"node"
],
"ignorePaths": [
"lib/{content-services,core,extensions,insights,process-services}/**/*.spec.ts",
"lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts"
],
"ignoreRegExpList": [
"(\"|'|`)((?:\\\\1|(?:(?!\\1).))*)\\1"
]
}
@@ -0,0 +1,18 @@
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh" :
mode: "000775"
owner: root
group: root
content: |
#!/bin/bash
function error_exit
{
eventHelper.py --msg "$1" --severity ERROR
exit $2
}
export HOME=/home/ec2-user
echo "export home"
sudo curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
sudo yum install -y nodejs
+19
View File
@@ -0,0 +1,19 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
indent_size = 2
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
+17
View File
@@ -0,0 +1,17 @@
typings/
node_modules/
bower_components/
ng2-components/
app/**/*.js
app/**/*.js.map
app/**/*.d.ts
!app/js/Polyline.js
.idea
versions.json
dist/
coverage/
# docker files
docker-compose.yml
Dockerfile
+101
View File
@@ -0,0 +1,101 @@
# 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/demo-shell-ng2/
npm install
```
## 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 `config/webpack.common.js` file.
## Application settings (server-side)
All server-side application settings are stored in the `app.config-dev.json` and `app.config-prod.json` files.
By default the configuration files have the content similar to the following one:
```json
{
"ecmHost": "http://localhost:3000/ecm",
"bpmHost": "http://localhost:3000/bpm",
"application": {
"name": "Alfresco"
}
}
```
You can add any additional settings to the application configuration file if needed.
Configuration files are picked based on environment settings (see `app.module.ts` for more details).
```ts
let appConfigFile = 'app.config-dev.json';
if (process.env.ENV === 'production') {
appConfigFile = 'app.config-prod.json';
}
@NgModule({
imports: [
...
CoreModule.forRoot({
appConfigFile: appConfigFile
}),
...
]
})
```
## 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:dist
```
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.
### Important notes
By default demo application is configured to use [wsrv](https://www.npmjs.com/package/wsrv) tool (lightweight web server)
to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you to access your application
via network. However, you can use any web server of your choice in production.
## Development branch build
If you want to run the demo shell with the latest changes from the development branch, use the following command from the /script folder:
```sh
./npm-clean.sh
./start-linked.sh -install
```
+255
View File
@@ -0,0 +1,255 @@
{
"ecmHost": "http://{hostname}:{port}/ecm",
"bpmHost": "http://{hostname}:{port}/bpm",
"application": {
"name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
},
"files": {
"excluded": [".DS_Store", "desktop.ini", ".git"]
},
"activiti": {
"rest": {
"fields": [
{
"processId": "0",
"taskId": "7501",
"fieldId": "label10",
"values": [
{ "id": "f1", "name": "Field 1" },
{ "id": "f2", "name": "Field 2" },
{ "id": "f3", "name": "Field 3" }
]
}
]
}
},
"document-list": {
"supportedPageSizes": [5, 10, 15, 20],
"presets": {
"-trashcan-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "archivedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "archivedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
"sortable": true
}
],
"-sites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "title",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "visibility",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
"sortable": true
}
],
"-favorites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
],
"-recent-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
}
],
"-sharedlinks-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
},
{
"key": "sharedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
"sortable": true
}
],
"default": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
]
}
}
}
+255
View File
@@ -0,0 +1,255 @@
{
"ecmHost": "http://{hostname}",
"bpmHost": "http://{hostname}",
"application": {
"name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
},
"files": {
"excluded": [".DS_Store", "desktop.ini", ".git"]
},
"activiti": {
"rest": {
"fields": [
{
"processId": "0",
"taskId": "7501",
"fieldId": "label10",
"values": [
{ "id": "f1", "name": "Field 1" },
{ "id": "f2", "name": "Field 2" },
{ "id": "f3", "name": "Field 3" }
]
}
]
}
},
"document-list": {
"supportedPageSizes": [5, 10, 15, 20],
"presets": {
"-trashcan-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "archivedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "archivedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
"sortable": true
}
],
"-sites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "title",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "visibility",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
"sortable": true
}
],
"-favorites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
],
"-recent-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
}
],
"-sharedlinks-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
},
{
"key": "sharedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
"sortable": true
}
],
"default": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
]
}
}
}
+77
View File
@@ -0,0 +1,77 @@
var port = process.env.PORT || 3000,
http = require('http'),
fs = require('fs'),
url = require('url'),
mime = require('mime'),
html = fs.readFileSync('index.html');
var log = function(entry) {
fs.appendFileSync('/tmp/sample-app.log', new Date().toISOString() + ' - ' + entry + '\n');
};
var server = http.createServer(function (req, res) {
// Parse the request containing file name
var pathname = url.parse(req.url).pathname;
// Print the name of the file for which request is made.
console.log("Request for " + pathname + " received.");
if (req.method === 'POST') {
var body = '';
req.on('data', function(chunk) {
body += chunk;
});
req.on('end', function() {
if (req.url === '/') {
log('Received message: ' + body);
} else if (req.url = '/scheduled') {
log('Received task ' + req.headers['x-aws-sqsd-taskname'] + ' scheduled at ' + req.headers['x-aws-sqsd-scheduled-at']);
}
res.writeHead(200, 'OK', {'Content-Type': 'text/plain'});
res.end();
});
} else {
var filename = pathname.substr(1);
if(filename === '' || filename.indexOf('.') === -1){
filename = 'index.html';
}
// Read the requested file content from file system
fs.readFile(filename, function (err, data) {
if (err) {
console.log(err, filename);
// HTTP Status: 404 : NOT FOUND
// Content Type: text/plain
res.writeHead(404, {'Content-Type': 'text/html'});
}else{
//Page found
// HTTP Status: 200 : OK
// Content Type: text/plain
var type = mime.lookup(filename);
console.log('type',type);
if (!res.getHeader('content-type')) {
var charset = mime.charsets.lookup(type);
res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''));
}
if(type.indexOf('image') > -1 || type.indexOf('font') > -1){
var img = fs.readFileSync(pathname.substr(1));
res.end(img, 'binary');
}else{
res.write(data.toString());
}
// Write the content of the file to response body
}
// Send the response body
res.end();
});
}
});
// Listen on port 3000, IP defaults to 127.0.0.1
server.listen(port);
// Put a friendly message on the terminal
console.log('Server running at http://127.0.0.1:' + port + '/');
+1
View File
@@ -0,0 +1 @@
<router-outlet></router-outlet>
+45
View File
@@ -0,0 +1,45 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { AlfrescoSettingsService, PageTitleService, StorageService } from 'ng2-alfresco-core';
@Component({
selector: 'adf-app',
templateUrl: './app.component.html',
styleUrls: ['./theme.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
searchTerm: string = '';
constructor(private settingsService: AlfrescoSettingsService,
private storage: StorageService,
pageTitleService: PageTitleService,
route: ActivatedRoute,
router: Router) {
this.setProvider();
pageTitleService.setTitle();
}
private setProvider() {
if (this.storage.hasItem(`providers`)) {
this.settingsService.setProviders(this.storage.getItem(`providers`));
}
}
}
+141
View File
@@ -0,0 +1,141 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* 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 { BrowserModule } from '@angular/platform-browser';
import { AnalyticsModule } from 'ng2-activiti-analytics';
import { DiagramsModule } from 'ng2-activiti-diagrams';
import { ActivitiFormModule } from 'ng2-activiti-form';
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
import { AppConfigService, CoreModule, TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { LoginModule } from 'ng2-alfresco-login';
import { SearchModule } from 'ng2-alfresco-search';
import { SocialModule } from 'ng2-alfresco-social';
import { TagModule } from 'ng2-alfresco-tag';
import { UploadModule } from 'ng2-alfresco-upload';
import { UserInfoModule } from 'ng2-alfresco-userinfo';
import { ViewerModule } from 'ng2-alfresco-viewer';
import { WebScriptModule } from 'ng2-alfresco-webscript';
import { FlexLayoutModule } from '@angular/flex-layout';
import { Editor3DModule } from 'ng2-3d-editor';
import { ChartsModule } from 'ng2-charts';
import { AppComponent } from './app.component';
import { routing } from './app.routes';
import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component';
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import { FileViewComponent } from './components/file-view/file-view.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
import { ThemePickerModule } from './components/theme-picker/theme-picker';
import { MaterialModule } from './material.module';
import { DebugAppConfigService } from './services/debug-app-config.service';
import { CustomSourcesComponent } from './components/files/custom-sources.component';
import {
AboutComponent,
ActivitiAppsViewComponent,
ActivitiDemoComponent,
ActivitiProcessAttachmentsComponent,
ActivitiShowDiagramComponent,
ActivitiTaskAttachmentsComponent,
DataTableDemoComponent,
FilesComponent,
FormDemoComponent,
FormNodeViewerComponent,
FormViewerComponent,
HomeComponent,
LoginDemoComponent,
SearchBarComponent,
SearchComponent,
SettingsComponent,
SocialComponent,
TagComponent,
WebscriptComponent
} from './components/index';
@NgModule({
imports: [
BrowserModule,
routing,
CoreModule,
MaterialModule,
LoginModule,
SearchModule,
DataTableModule,
DocumentListModule,
UploadModule,
TagModule,
SocialModule,
WebScriptModule,
ViewerModule,
ActivitiFormModule,
ActivitiTaskListModule,
ActivitiProcessListModule,
UserInfoModule,
AnalyticsModule,
DiagramsModule,
CustomEditorsModule,
Editor3DModule,
ChartsModule,
ThemePickerModule,
FlexLayoutModule
],
declarations: [
AppComponent,
HomeComponent,
DataTableDemoComponent,
SearchComponent,
SearchBarComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiTaskAttachmentsComponent,
ActivitiProcessAttachmentsComponent,
ActivitiShowDiagramComponent,
ActivitiAppsViewComponent,
FormViewerComponent,
WebscriptComponent,
TagComponent,
SocialComponent,
AboutComponent,
FilesComponent,
FormNodeViewerComponent,
SettingsComponent,
FormDemoComponent,
FormListDemoComponent,
CustomSourcesComponent,
FileViewComponent,
AppLayoutComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService },
{
provide: TRANSLATION_PROVIDER,
multi: true,
useValue: {
name: 'app',
source: 'resources'
}
}
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
+158
View File
@@ -0,0 +1,158 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* 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 { ModuleWithProviders } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard, AuthGuardBpm, AuthGuardEcm } from 'ng2-alfresco-core';
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import {
AboutComponent,
ActivitiAppsViewComponent,
ActivitiDemoComponent,
ActivitiShowDiagramComponent,
DataTableDemoComponent,
FilesComponent,
FormDemoComponent,
FormNodeViewerComponent,
FormViewerComponent,
HomeComponent,
LoginDemoComponent,
SearchComponent,
SettingsComponent,
SocialComponent,
TagComponent,
WebscriptComponent
} from './components/index';
import { UploadButtonComponent } from 'ng2-alfresco-upload';
import { FileViewComponent } from './components/file-view/file-view.component';
import { CustomSourcesComponent } from './components/files/custom-sources.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
export const appRoutes: Routes = [
{ path: 'login', component: LoginDemoComponent },
{ path: 'settings', component: SettingsComponent },
{ path: 'files/:nodeId/view', component: FileViewComponent, canActivate: [ AuthGuardEcm ] },
{
path: '',
component: AppLayoutComponent,
canActivate: [AuthGuard],
children: [
{
path: '',
component: HomeComponent
},
{
path: 'home',
component: HomeComponent
},
{
path: 'files',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'files/:id',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'dl-custom-sources',
component: CustomSourcesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'datatable',
component: DataTableDemoComponent
},
{
path: 'uploader',
component: UploadButtonComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'search',
component: SearchComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'activiti',
component: ActivitiAppsViewComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps',
component: ActivitiAppsViewComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/tasks',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/processes',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/diagram/:processDefinitionId',
component: ActivitiShowDiagramComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if neeeded
{
path: 'activiti/appId/:appId',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasks/:id',
component: FormViewerComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasksnode/:id',
component: FormNodeViewerComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'webscript',
component: WebscriptComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'tag',
component: TagComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'social',
component: SocialComponent,
canActivate: [AuthGuardEcm]
},
{ path: 'about', component: AboutComponent },
{ path: 'form', component: FormDemoComponent },
{ path: 'form-list', component: FormListDemoComponent }
]
}
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
@@ -0,0 +1,10 @@
.about-container {
padding: 10px;
}
.adf-table-version {
width: 60%;
border: 0;
border-spacing: 0;
text-align: center;
}
@@ -0,0 +1,49 @@
<div class="about-container">
<h3>Server settings</h3>
<md-list>
<small>The values below are taken from the AppConfigService and loaded from the '{{ configFile }}' file.</small>
<md-list-item>
<h4 md-line> Alfresco Process Services URL: {{ bpmHost }}</h4>
</md-list-item>
<md-divider></md-divider>
<md-list-item>
<h4 md-line>Alfresco Content Services URL: {{ ecmHost }}</h4>
</md-list-item>
</md-list>
<h3>Product Versions</h3>
<div *ngIf="bpmVersion">
<h3>BPM</h3>
<label> Edition </label> {{ bpmVersion.edition }}
<p></p>
<label> Version </label> {{ bpmVersion.majorVersion }}.{{ bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
</div>
<div *ngIf="ecmVersion">
<h3>ECM</h3>
<label> Edition </label> {{ ecmVersion.edition }}
<p></p>
<label> Version </label> {{ ecmVersion.version.display }}
<p></p>
<h4>License</h4>
<adf-datatable [data]="license"></adf-datatable>
<h4> Status</h4>
<adf-datatable [data]="status"></adf-datatable>
<h4>Modules</h4>
<adf-datatable [data]="modules"></adf-datatable>
</div>
<div *ngIf="githubUrlCommitAlpha">
<h3>Source code</h3>
<small>You are running the project based on the following commit:</small>
<div>
<a [href]="githubUrlCommitAlpha">{{githubUrlCommitAlpha}}</a>
</div>
</div>
<h3>Packages</h3>
<small>Current project is using the following ADF libraries:</small>
<adf-datatable [data]="data"></adf-datatable>
</div>
@@ -0,0 +1,132 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* 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 { Http } from '@angular/http';
import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel, DiscoveryApiService, EcmProductVersionModel } from 'ng2-alfresco-core';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
@Component({
selector: 'adf-about-page',
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
data: ObjectDataTableAdapter;
status: ObjectDataTableAdapter;
license: ObjectDataTableAdapter;
modules: ObjectDataTableAdapter;
githubUrlCommitAlpha: string = 'https://github.com/Alfresco/alfresco-ng2-components/commits/';
configFile: string = 'app.config.json';
ecmHost: string = '';
bpmHost: string = '';
ecmVersion: EcmProductVersionModel = null;
bpmVersion: BpmProductVersionModel = null;
constructor(private http: Http,
private appConfig: AppConfigService,
private authService: AlfrescoAuthenticationService,
private discovery: DiscoveryApiService) {
}
ngOnInit() {
if (this.authService.isEcmLoggedIn()) {
this.discovery.getEcmProductInfo().subscribe((ecmVers) => {
this.ecmVersion = ecmVers;
this.modules = new ObjectDataTableAdapter(this.ecmVersion.modules, [
{type: 'text', key: 'id', title: 'ID', sortable: true},
{type: 'text', key: 'title', title: 'Title', sortable: true},
{type: 'text', key: 'version', title: 'Description', sortable: true},
{type: 'text', key: 'installDate', title: 'Install Date', sortable: true},
{type: 'text', key: 'installState', title: 'Install State', sortable: true},
{type: 'text', key: 'versionMin', title: 'Version Minor', sortable: true},
{type: 'text', key: 'versionMax', title: 'Version Max', sortable: true}
]);
this.status = new ObjectDataTableAdapter([this.ecmVersion.status], [
{type: 'text', key: 'isReadOnly', title: 'ReadOnly', sortable: true},
{type: 'text', key: 'isAuditEnabled', title: 'Is Audit Enable', sortable: true},
{type: 'text', key: 'isQuickShareEnabled', title: 'Is quick shared enable', sortable: true},
{type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true}
]);
this.license = new ObjectDataTableAdapter([this.ecmVersion.license], [
{type: 'text', key: 'issuedAt', title: 'Issued At', sortable: true},
{type: 'text', key: 'expiresAt', title: 'Expires At', sortable: true},
{type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true},
{type: 'text', key: 'holder', title: 'Holder', sortable: true},
{type: 'text', key: 'mode', title: 'Is Cluster Enabled', sortable: true},
{type: 'text', key: 'isClusterEnabled', title: 'Is Cluster Enabled', sortable: true},
{type: 'text', key: 'isCryptodocEnabled', title: 'Is Cryptodoc Enable', sortable: true}
]);
});
}
if (this.authService.isBpmLoggedIn()) {
this.discovery.getBpmProductInfo().subscribe((bpmVers) => {
this.bpmVersion = bpmVers;
});
}
this.http.get('/versions.json').subscribe(response => {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)');
let alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
return regexp.test(val);
});
let alfrescoPackagesTableRepresentation = [];
alfrescoPackages.forEach((val) => {
alfrescoPackagesTableRepresentation.push({
name: val,
version: response.json().dependencies[val].version
});
});
this.gitHubLinkCreation(alfrescoPackagesTableRepresentation);
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRepresentation, [
{type: 'text', key: 'name', title: 'Name', sortable: true},
{type: 'text', key: 'version', title: 'Version', sortable: true}
]);
});
this.ecmHost = this.appConfig.get<string>('ecmHost');
this.bpmHost = this.appConfig.get<string>('bpmHost');
}
private gitHubLinkCreation(alfrescoPackagesTableRepresentation): void {
let corePackage = alfrescoPackagesTableRepresentation.find((packageUp) => {
return packageUp.name === 'ng2-alfresco-core';
});
if (corePackage) {
let commitIsh = corePackage.version.split('-');
if (commitIsh.length > 1) {
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + commitIsh[1];
} else {
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + corePackage.version;
}
}
}
}
@@ -0,0 +1,229 @@
<md-tab-group [(selectedIndex)]="activeTab">
<md-tab id="tasks-header" href="#tasks" label="{{'PS-TAB.TASKS-TAB' | translate}}">
<div class="page-content">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-tasks-menu" fxFlex.gt-md="225px">
<div class="activiti-demo-list-buttons">
<button color="primary" md-raised-button data-automation-id="btn-start-task" class="activiti-demo-list-buttons-start" (click)="navigateStartTask()">
<md-icon>add</md-icon>
<span>{{'PS-TAB.START-TASK' | translate}}</span>
</button>
</div>
<adf-accordion>
<adf-accordion-group [heading]="'Tasks'" [isSelected]="true" [isOpen]="true"
[headingIcon]="'assignment'">
<adf-filters
[filterParam]="{name:'MY tasks'}"
[appId]="appId"
[hasIcon]="false"
(filterClick)="onTaskFilterClick($event)"
(onSuccess)="onSuccessTaskFilterList($event)"
#activitifilter>
</adf-filters>
</adf-accordion-group>
</adf-accordion>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
*ngIf="taskFilter && !isStartTaskMode()">
<adf-tasklist
[appId]="taskFilter?.appId"
[page]="taskPage"
[size]="taskPagination.maxItems"
[processDefinitionKey]="taskFilter?.filter?.processDefinitionKey"
[name]="taskFilter?.filter?.name"
[assignment]="taskFilter?.filter?.assignment"
[state]="taskFilter?.filter?.state"
[sort]="taskFilter?.filter?.sort"
[data]="dataTasks"
[landingTaskId]="currentTaskId"
(rowClick)="onTaskRowClick($event)"
(onSuccess)="onSuccessTaskList($event)"
(row-click)="onRowClick($event)"
(row-dblclick)="onTaskRowDblClick($event)"
#activititasklist>
<!-- Custom column definition demo -->
<!--
<data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column>
</data-columns>
-->
</adf-tasklist>
<adf-pagination
(changePageNumber)="onChangePageNumber($event)"
(changePageSize)="onChangePageSize($event)"
(nextPage)="onNextPage($event)"
(prevPage)="onPrevPage($event)"
[pagination]="taskPagination"
[supportedPageSizes]="[2, 4, 6, 8, 10, 12]">
</adf-pagination>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-details" *ngIf="!isStartTaskMode()" fxFlex.gt-md="1 1 auto">
<adf-task-details #activitidetails
[debugMode]="true"
[taskId]="currentTaskId"
[fieldValidators]="fieldValidators"
(formCompleted)="onFormCompleted($event)"
(formContentClicked)="onFormContentClick($event)"
(taskCreated)="onTaskCreated($event)"
(assignTask)="onAssignTask()"
(taskDeleted)="onTaskDeleted($event)">
</adf-task-details>
<hr>
<div *ngIf="currentTaskId">
{{'PS-TAB.AUDIT-LOG' | translate}}
<button
adf-task-audit
[task-id]="currentTaskId"
[download]="true"
md-icon-button (clicked)="onAuditClick($event)" (error)="onAuditError($event)">
<md-icon>assignment_ind</md-icon>
</button>
<hr>
</div>
<md-card>
<md-card-content>
<activiti-task-attachments
[taskId]="currentTaskId">
</activiti-task-attachments>
</md-card-content>
</md-card>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-start" *ngIf="isStartTaskMode()" fxFlex.gt-md="1 1 auto">
<adf-start-task
[appId]="appId"
(success)="onStartTaskSuccess($event)"
(cancel)="onCancelStartTask()">
</adf-start-task>
</div>
</div>
</div>
</md-tab>
<md-tab id="processes-header" href="#processes"
label="{{'PS-TAB.PROCESSES-TAB' | translate}}">
<div class="page-content">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-processes-menu" fxFlex.gt-md="225px">
<div class="activiti-demo-list-buttons">
<button
color="primary"
md-raised-button
class="activiti-demo-list-buttons-start"
data-automation-id="btn-start-process"
(click)="navigateStartProcess()">
<md-icon>add</md-icon>
<span>{{'PS-TAB.START-PROCESS' | translate}}</span>
</button>
</div>
<adf-accordion>
<adf-accordion-group [heading]="'Processes'" [isSelected]="true" [isOpen]="true"
[headingIcon]="'assessment'">
<adf-process-instance-filters
[filterParam]="{index: 0}"
[appId]="appId"
(filterClick)="onProcessFilterClick($event)"
(onSuccess)="onSuccessProcessFilterList($event)">
</adf-process-instance-filters>
</adf-accordion-group>
</adf-accordion>
</div>
<div class="activiti-demo-grid-item activiti-demo-processes-list activiti-demo-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
*ngIf="processFilter && !isStartProcessMode()">
<adf-process-instance-list
*ngIf="processFilter?.hasFilter()" [appId]="processFilter.appId"
[processDefinitionKey]="processFilter.filter.processDefinitionKey"
[name]="processFilter.filter.name"
[state]="processFilter.filter.state"
[sort]="processFilter.filter.sort"
[data]="dataProcesses"
(rowClick)="onProcessRowClick($event)"
(row-dblclick)="onProcessRowDblClick($event)"
(onSuccess)="onSuccessProcessList($event)">
<!-- Custom column definition demo -->
<!--
<data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column>
</data-columns>
-->
</adf-process-instance-list>
</div>
<div class="activiti-demo-grid-item activiti-demo-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto">
<adf-process-instance-details
[processInstanceId]="currentProcessInstanceId"
(processCancelled)="processCancelled()"
(showProcessDiagram)="onShowProcessDiagram($event)"
(taskClick)="onProcessDetailsTaskClick($event)">
</adf-process-instance-details>
<hr>
<div *ngIf="currentProcessInstanceId">
{{'PS-TAB.AUDIT-LOG' | translate}}
<button adf-process-audit
[process-id]="currentProcessInstanceId"
[download]="true" md-icon-button
[format]="'pdf'"
(clicked)="onAuditClick($event)"
(error)="onAuditError($event)">
<md-icon>assignment_ind</md-icon>
</button>
<hr>
</div>
<md-card>
<md-card-content>
<activiti-process-attachments
[processId]="currentProcessInstanceId">
</activiti-process-attachments>
</md-card-content>
</md-card>
</div>
<div class="activiti-demo-grid-item activiti-demo-processes-start" fxFlex.gt-md="1 1 auto"
*ngIf="isStartProcessMode()">
<adf-start-process
[appId]="appId"
(start)="onStartProcessInstance($event)"
(cancel)="onCancelProcessInstance()">
</adf-start-process>
</div>
</div>
</div>
</md-tab>
<md-tab id="report-header" href="#report"
label="{{'PS-TAB.REPORTS-TAB' | translate}}">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-reports-menu" fxFlex.gt-md="300px">
<span><h5>Report List</h5></span>
<hr>
<analytics-report-list
[appId]="appId"
[selectFirst]="selectFirstReport"
(reportClick)="onReportClick($event)"
#analyticsreportlist>
</analytics-report-list>
</div>
<div class="activiti-demo-grid-item activiti-demo-reports-details" fxFlex.gt-md="1 1 auto">
<adf-analytics
*ngIf="report"
[appId]="appId"
[reportId]="report.id"
[hideParameters]="false"
(editReport)="onEditReport($event)"
(reportSaved)="onReportSaved($event)"
(reportDeleted)="onReportDeleted()">
</adf-analytics>
<div *ngIf="!report">
<span>{{'ANALYTICS_REPORT.NO_REPORT_MESSAGE' | translate}}</span>
</div>
</div>
</div>
</md-tab>
</md-tab-group>
<div *ngIf="fileShowed">
<alfresco-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</alfresco-viewer>
</div>
@@ -0,0 +1,106 @@
.adf-no-form-container {
text-align: center;
font-weight: 600;
font-size: 18px;
}
.activiti-demo-grid {
.activiti-demo-grid-item {
margin: 4px;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
padding: 10px;
}
.activiti-demo-list-buttons {
margin-bottom: 24px;
}
.activiti-demo-list-buttons-start {
width: 100%;
}
.activiti-demo-tasks-list.small-pagination,
.activiti-demo-processes-list.small-pagination {
.adf-pagination {
flex-wrap: wrap;
padding-bottom: 24px;
padding-top: 8px;
&__block {
border-right: none;
}
&__range-block.adf-pagination__block:first-child {
order: 1;
width: 60%;
flex: 0 0 auto;
box-sizing: border-box;
padding-left: 2px;
justify-content: flex-start;
}
&__perpage-block {
order: 3;
width: 60%;
box-sizing: border-box;
padding-left: 2px;
justify-content: flex-start;
}
&__actualinfo-block {
order: 2;
width: 40%;
box-sizing: border-box;
padding-right: 2px;
justify-content: flex-end;
}
&__controls-block {
order: 4;
width: 40%;
box-sizing: border-box;
padding-right: 2px;
justify-content: flex-end;
}
}
}
.activiti-demo-list {
.adf-data-table {
border: none;
}
.adf-data-table tr,
.adf-data-table td {
height: 36px;
font-size: 14px;
}
.adf-data-table td {
padding-top: 0;
padding-bottom: 0;
border-bottom: none;
}
.adf-data-table th {
padding-top: 0;
padding-bottom: 0;
height: 40px;
vertical-align: middle;
font-size: 14px;
}
}
@media screen and (max-width: 1279px) {
container-widget .grid-list {
flex-direction: column;
.grid-list-item {
width: 100% !important;
}
}
}
}
@@ -0,0 +1,464 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* 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.
*/
// tslint:disable-next-line:adf-file-name
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Pagination } from 'alfresco-js-api';
import { AnalyticsReportListComponent } from 'ng2-activiti-analytics';
import {
DynamicTableRow, FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService,
FormService, ValidateDynamicTableRowEvent
} from 'ng2-activiti-form';
import {
FilterProcessRepresentationModel,
ProcessFiltersComponent,
ProcessInstance,
ProcessInstanceDetailsComponent,
ProcessInstanceListComponent,
StartProcessInstanceComponent
} from 'ng2-activiti-processlist';
import {
AppsListComponent,
FilterRepresentationModel,
TaskDetailsComponent,
TaskDetailsEvent,
TaskFiltersComponent,
TaskListComponent,
TaskListService
} from 'ng2-activiti-tasklist';
import { AlfrescoApiService } from 'ng2-alfresco-core';
import {
DataSorting,
ObjectDataRow,
ObjectDataTableAdapter
} from 'ng2-alfresco-datatable';
import { Subscription } from 'rxjs/Rx';
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
import { DemoFieldValidator } from './demo-field-validator';
const currentProcessIdNew = '__NEW__';
const currentTaskIdNew = '__NEW__';
@Component({
selector: 'adf-activiti-demo',
templateUrl: './activiti-demo.component.html',
styleUrls: ['./activiti-demo.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
@ViewChild(TaskFiltersComponent)
activitifilter: TaskFiltersComponent;
@ViewChild(TaskListComponent)
taskList: TaskListComponent;
@ViewChild(ProcessFiltersComponent)
activitiprocessfilter: ProcessFiltersComponent;
@ViewChild(ProcessInstanceListComponent)
processList: ProcessInstanceListComponent;
@ViewChild(ProcessInstanceDetailsComponent)
activitiprocessdetails: ProcessInstanceDetailsComponent;
@ViewChild(TaskDetailsComponent)
activitidetails: TaskDetailsComponent;
@ViewChild(StartProcessInstanceComponent)
activitiStartProcess: StartProcessInstanceComponent;
@ViewChild(AnalyticsReportListComponent)
analyticsreportlist: AnalyticsReportListComponent;
@Input()
appId: number = null;
fileShowed: boolean = false;
selectFirstReport: boolean = false;
private tabs = { tasks: 0, processes: 1, reports: 2 };
content: Blob;
contentName: string;
layoutType: string;
currentTaskId: string;
currentProcessInstanceId: string;
taskSchemaColumns: any[] = [];
taskPagination: Pagination = {
skipCount: 0,
maxItems: 10,
totalItems: 0
};
taskPage: number = 0;
processSchemaColumns: any[] = [];
activeTab: number = this.tabs.tasks; // tasks|processes|reports
taskFilter: FilterRepresentationModel;
report: any;
processFilter: FilterProcessRepresentationModel;
sub: Subscription;
blobFile: any;
flag: boolean = true;
dataTasks: ObjectDataTableAdapter;
dataProcesses: ObjectDataTableAdapter;
fieldValidators = [
...FORM_FIELD_VALIDATORS,
new DemoFieldValidator()
];
constructor(private elementRef: ElementRef,
private route: ActivatedRoute,
private router: Router,
private taskListService: TaskListService,
private apiService: AlfrescoApiService,
formRenderingService: FormRenderingService,
formService: FormService) {
this.dataTasks = new ObjectDataTableAdapter();
this.dataTasks.setSorting(new DataSorting('created', 'desc'));
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true }
]
);
this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
// Uncomment this line to replace all 'text' field editors with custom component
// formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);
// Uncomment this line to map 'custom_stencil_01' to local editor component
formRenderingService.setComponentTypeResolver('custom_stencil_01', () => CustomStencil01, true);
formService.formLoaded.subscribe((e: FormEvent) => {
console.log(`Form loaded: ${e.form.id}`);
});
formService.formFieldValueChanged.subscribe((e: FormFieldEvent) => {
console.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
});
formService.validateDynamicTableRow.subscribe(
(e: ValidateDynamicTableRowEvent) => {
const row: DynamicTableRow = e.row;
if (row && row.value && row.value.name === 'admin') {
e.summary.isValid = false;
e.summary.text = 'Sorry, wrong value. You cannot use "admin".';
e.preventDefault();
}
}
);
// Uncomment this block to see form event handling in action
/*
formService.formEvents.subscribe((event: Event) => {
console.log('Event fired:' + event.type);
console.log('Event Target:' + event.target);
});
*/
}
onPrevPage(pagination: Pagination): void {
this.taskPagination.skipCount = pagination.skipCount;
this.taskPage--;
}
onNextPage(pagination: Pagination): void {
this.taskPagination.skipCount = pagination.skipCount;
this.taskPage++;
}
onChangePageSize(pagination: Pagination): void {
const { skipCount, maxItems } = pagination;
this.taskPage = this.currentPage(skipCount, maxItems);
this.taskPagination.maxItems = maxItems;
this.taskPagination.skipCount = skipCount;
}
onChangePageNumber(pagination: Pagination): void {
const { maxItems, skipCount } = pagination;
this.taskPage = this.currentPage(skipCount, maxItems);
this.taskPagination.maxItems = maxItems;
this.taskPagination.skipCount = skipCount;
}
currentPage(skipCount: number, maxItems: number): number {
return (skipCount && maxItems) ? Math.floor(skipCount / maxItems) : 0;
}
ngOnInit() {
this.taskListService.tasksList$.subscribe(
(tasks) => {
this.taskPagination = { count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total };
console.log({ count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total });
}, (err) => {
console.log('err' + err);
});
if (this.router.url.includes('processes')) {
this.activeTab = this.tabs.processes;
}
this.sub = this.route.params.subscribe(params => {
let applicationId = params['appId'];
if (applicationId && applicationId !== '0') {
this.appId = params['appId'];
}
this.taskFilter = null;
this.currentTaskId = null;
this.processFilter = null;
this.currentProcessInstanceId = null;
});
this.layoutType = AppsListComponent.LAYOUT_GRID;
}
ngOnDestroy() {
this.sub.unsubscribe();
this.taskListService.tasksList$.subscribe();
}
onTaskFilterClick(filter: FilterRepresentationModel): void {
this.applyTaskFilter(filter);
}
onReportClick(event: any): void {
this.report = event;
}
onSuccessTaskFilterList(event: any): void {
this.applyTaskFilter(this.activitifilter.getCurrentFilter());
}
applyTaskFilter(filter: FilterRepresentationModel) {
this.taskFilter = filter;
if (filter && this.taskList) {
this.taskList.hasCustomDataSource = false;
}
}
onStartTaskSuccess(event: any): void {
this.activitifilter.selectFilterWithTask(event.id);
this.currentTaskId = event.id;
}
onCancelStartTask() {
this.currentTaskId = null;
this.reloadTaskFilters();
}
onSuccessTaskList(event: FilterRepresentationModel) {
this.currentTaskId = this.taskList.getCurrentId();
}
onProcessFilterClick(event: FilterProcessRepresentationModel): void {
this.currentProcessInstanceId = null;
this.processFilter = event;
}
onSuccessProcessFilterList(): void {
this.processFilter = this.activitiprocessfilter.getCurrentFilter();
}
onSuccessProcessList(event: any): void {
this.currentProcessInstanceId = this.processList.getCurrentId();
}
onTaskRowClick(taskId): void {
this.currentTaskId = taskId;
}
onTaskRowDblClick(event: CustomEvent) {
const taskId = event.detail.value.obj.id;
this.currentTaskId = taskId;
}
onProcessRowDblClick(event: CustomEvent) {
const processInstanceId = event.detail.value.obj.id;
this.currentProcessInstanceId = processInstanceId;
}
onProcessRowClick(processInstanceId): void {
this.currentProcessInstanceId = processInstanceId;
}
onEditReport(name: string): void {
this.analyticsreportlist.reload();
}
onReportSaved(reportId): void {
this.analyticsreportlist.reload(reportId);
}
onReportDeleted(): void {
this.analyticsreportlist.reload();
this.analyticsreportlist.selectReport(null);
}
navigateStartProcess(): void {
this.resetProcessFilters();
this.reloadProcessFilters();
this.currentProcessInstanceId = currentProcessIdNew;
}
navigateStartTask(): void {
this.resetTaskFilters();
this.reloadTaskFilters();
this.currentTaskId = currentTaskIdNew;
}
onStartProcessInstance(instance: ProcessInstance): void {
this.currentProcessInstanceId = instance.id;
this.activitiStartProcess.reset();
this.activitiprocessfilter.selectRunningFilter();
}
onCancelProcessInstance() {
this.currentProcessInstanceId = null;
this.reloadProcessFilters();
}
isStartProcessMode(): boolean {
return this.currentProcessInstanceId === currentProcessIdNew;
}
isStartTaskMode(): boolean {
return this.currentTaskId === currentTaskIdNew;
}
processCancelled(data: any): void {
this.currentProcessInstanceId = null;
this.processList.reload();
}
onSuccessNewProcess(data: any): void {
this.processList.reload();
}
onFormCompleted(form): void {
this.currentTaskId = null;
this.taskPagination.totalItems--;
const { skipCount, maxItems, totalItems } = this.taskPagination;
if (totalItems > 0 && (skipCount >= totalItems)) {
this.taskPagination.skipCount -= maxItems;
}
this.taskPage = this.currentPage(this.taskPagination.skipCount, maxItems);
this.taskList.reload();
}
onFormContentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
onAuditClick(event: any) {
console.log(event);
}
onAuditError(event: any): void {
console.error('My custom error message' + event);
}
onTaskCreated(data: any): void {
this.currentTaskId = data.parentTaskId;
this.taskList.reload();
}
onTaskDeleted(data: any): void {
this.taskList.reload();
}
ngAfterViewInit() {
this.loadStencilScriptsInPageFromActiviti();
}
loadStencilScriptsInPageFromActiviti() {
this.apiService.getInstance().activiti.scriptFileApi.getControllers().then(response => {
if (response) {
let s = document.createElement('script');
s.type = 'text/javascript';
s.text = response;
this.elementRef.nativeElement.appendChild(s);
}
});
}
onShowProcessDiagram(event: any): void {
this.router.navigate(['/activiti/apps/' + this.appId + '/diagram/' + event.value]);
}
onProcessDetailsTaskClick(event: TaskDetailsEvent): void {
event.preventDefault();
this.activeTab = this.tabs.tasks;
const taskId = event.value.id;
const processTaskDataRow = new ObjectDataRow({
id: taskId,
name: event.value.name || 'No name',
created: event.value.created
});
this.activitifilter.selectFilter(null);
if (this.taskList) {
this.taskList.setCustomDataSource([processTaskDataRow]);
this.taskList.selectTask(taskId);
}
this.currentTaskId = taskId;
}
private resetProcessFilters(): void {
this.processFilter = null;
}
private resetTaskFilters(): void {
this.taskFilter = null;
}
private reloadProcessFilters(): void {
this.activitiprocessfilter.selectFilter(this.activitiprocessfilter.getCurrentFilter());
}
private reloadTaskFilters(): void {
this.activitifilter.selectFilter(this.activitifilter.getCurrentFilter());
}
onRowClick(event): void {
console.log(event);
}
onRowDblClick(event): void {
console.log(event);
}
isTaskCompleted(): boolean {
return this.activitidetails.isCompletedTask();
}
onAssignTask() {
this.taskList.reload();
this.currentTaskId = null;
}
}
@@ -0,0 +1,3 @@
adf-create-process-attachment ::ng-deep button {
float: right;
}
@@ -0,0 +1,32 @@
<div id="attachment-process-list" *ngIf="processId">
<h5>Attachments</h5>
<div class="adf-no-form-container">
<adf-upload-drag-area
[parentId]="processId"
[disabled]="isCompletedProcess()"
[showNotificationBar]="false">
<adf-process-attachment-list #processAttachList
*ngIf="processId"
[disabled]="isCompletedProcess()"
[processInstanceId]="processId"
(attachmentClick)="onAttachmentClick($event)">
</adf-process-attachment-list>
</adf-upload-drag-area>
<adf-create-process-attachment
*ngIf="!isCompletedProcess()"
[processInstanceId]="processId"
(success)="onFileUploadComplete($event)">
</adf-create-process-attachment>
</div>
</div>
<div *ngIf="fileShowed">
<adf-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</adf-viewer>
</div>
@@ -0,0 +1,74 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
import { ProcessAttachmentListComponent, ProcessUploadService } from 'ng2-activiti-processlist';
import { ProcessInstance, ProcessService } from 'ng2-activiti-processlist';
import { UploadService } from 'ng2-alfresco-core';
@Component({
selector: 'activiti-process-attachments',
templateUrl: './activiti-process-attachments.component.html',
styleUrls: ['./activiti-process-attachments.component.css'],
providers: [
{provide: UploadService, useClass: ProcessUploadService}
]
})
export class ActivitiProcessAttachmentsComponent implements OnInit, OnChanges {
@Input()
processId: string;
@ViewChild(ProcessAttachmentListComponent)
processAttachList: ProcessAttachmentListComponent;
fileShowed: boolean = false;
content: Blob;
contentName: string;
processInstance: ProcessInstance;
constructor(private uploadService: UploadService, private processService: ProcessService) {
}
ngOnInit() {
this.uploadService.fileUploadComplete.subscribe(value => this.onFileUploadComplete(value.data));
}
ngOnChanges() {
if (this.processId) {
this.processService.getProcess(this.processId).subscribe((processInstance: ProcessInstance) => {
this.processInstance = processInstance;
});
}
}
onFileUploadComplete(content: any) {
this.processAttachList.add(content);
}
onAttachmentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
isCompletedProcess(): boolean {
return this.processInstance && this.processInstance.ended !== undefined && this.processInstance.ended !== null;
}
}
@@ -0,0 +1,4 @@
<div>
<button md-mini-fab (click)="onClickBack()" ><md-icon>keyboard_backspace</md-icon></button>
<adf-diagram [processInstanceId]="processDefinitionId"></adf-diagram>
</div>
@@ -0,0 +1,43 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'activiti-show-diagram',
templateUrl: './activiti-show-diagram.component.html',
styleUrls: ['./activiti-show-diagram.component.css']
})
export class ActivitiShowDiagramComponent {
processDefinitionId: string;
appId: string;
constructor(private route: ActivatedRoute,
private router: Router) {
this.route.params.subscribe(params => {
this.processDefinitionId = params['processDefinitionId'];
this.appId = params['appId'];
});
}
onClickBack() {
this.router.navigate(['/activiti/apps/' + this.appId + '/processes']);
}
}
@@ -0,0 +1,3 @@
adf-create-task-attachment ::ng-deep button {
float: right;
}
@@ -0,0 +1,32 @@
<div id="attachment-task-list" *ngIf="taskId">
<h5>Attachments</h5>
<div class="adf-no-form-container">
<adf-upload-drag-area
[parentId]="taskId"
[disabled]="isCompletedTask()"
[showNotificationBar]="false">
<adf-task-attachment-list #taskAttachList
*ngIf="taskId"
[taskId]="taskId"
[disabled]="isCompletedTask()"
(attachmentClick)="onAttachmentClick($event)">
</adf-task-attachment-list>
</adf-upload-drag-area>
<adf-create-task-attachment
*ngIf="!isCompletedTask()"
[taskId]="taskId"
(success)="onFileUploadComplete($event)">
</adf-create-task-attachment>
</div>
</div>
<div *ngIf="fileShowed">
<adf-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</adf-viewer>
</div>

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