mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
🚀🚀🚀 Release 5.0.0-angular.13 🚀🚀🚀 (#7751)
* Angular 13 migration author Denys Vuika <denys.vuika@gmail.com> 1645535464 +0000 committer Andras Popovics <popovics@ndras.hu> 1658854099 +0200 gpgsig -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQp4kkcEG/HRJq2bsSpIH4RXC/6cgUCYuAa0wAKCRCpIH4RXC/6 cpbgAQDdXzCpsWqAu2yGX+KHYg+pO1mY/ChSMVyqmEpJ92cf2QEAj+4v68ezwM7R eWYLTjZtLXNu0oHKejFZbDT2QgR6dQk= =PM8X -----END PGP SIGNATURE----- Angular 13 upgrade ng 11 material 11 remove node-sass flex layout upgrade angular 12 with theming workaround flex 12 upgrade nrwl libs update lock file update builder configs update lock file Angular 13 upgrade fix fix lint workaround to remove remove some unused dependencies fix flex import Signed-off-by: eromano <eugenioromano16@gmail.com> renmove gropu and container as form field to review fix most of the content cycle deps Signed-off-by: eromano <eugenioromano16@gmail.com> nx Signed-off-by: eromano <eugenioromano16@gmail.com> all build not sure all work Signed-off-by: eromano <eugenioromano16@gmail.com> fix demo shell Signed-off-by: eromano <eugenioromano16@gmail.com> fix demo shell Signed-off-by: eromano <eugenioromano16@gmail.com> [AAE-7662] attach file modal TabPage selector update - protractor (#7538) * tab selector update * trigger travis * exclude failing test [AAE-6345] New start process page APA (#7521) * [AAE-6345] New start process page APA * [AAE-6345] Added test * [AAE-6345] Update * CR * Revrite wrapper to component * Quick fix to e2e * Show errors as ng-content * Add Inplace word * Fix unit tests * Fix e2e [ADF-5470] [E2E Automation] Test cases failing on the newest Chrome b… (#7539) * [ADF-5470] [E2E Automation] Test cases failing on the newest Chrome browser 98 [AAE-7160] Setup Playwright in ADF - Storybook testing (#7537) * [AAE-7160] Setup Playwright in ADF - Storybook testing * New test cases for groups component. Reorganize the files * Add to package.json scripts - npm run playwright * Change amount of workers * Change workesr to 2 [AAE-7338] Changed endpoint for process task list (#7522) * [AAE-7338] Changed approach to use token injection * [AAE-7338] moved model files up * [AAE-7338] fixed imports * [AAE-7338] changed class to interface * [AAE-7338] fixed model imports * * Fixed failing unit tests due recent changes * [AAE-7338] fixed unit test Co-authored-by: sivakumar414ram <sivakumar414ram@gmail.com> [AAE-7765] Improved display mandatory form fields (#7531) * [MNT-22765] Improved display mandatory form fields * [MNT-22765] added unit tests * [MNT-22765] fixed test with error icon on rest fail * Trigger travis * [MNT-22765] removed underscore from var name * [AAE-7765] removed underscore from unit test * [AAE-7765] fixed css lint * [AAE-7765] fixed e2e error message css class * [AAE-7765] fixed storybook e2e additional unit tests for Viewer component (#7543) * additional unit tests for Viewer component * extra unit tests * fix unit test [ADF-5472] Missing placeholder for inplace input (#7541) [AAE-7801] Export TaskListCloudServiceInterface and BaseCloudService (#7546) [AAE-7376] Added process instance link in task details (#7544) * [AAE-7376] Added process instance link in task details * [AAE-7376] removed redirect logic from ADF * Trigger travis * [AAE-7376] added unit test Playwright travis.yml update (#7545) * Playwright travis.yml update * Travis: Trigger [AAE-7705] unexclude fixed test (#7547) * [AAE-7705] unexclude fixed test * trigger travis LOC-359 - Full fix - UI files localized in 16 languages for ADF 4.9 (#7551) Fail in case of error (#7550) Release 4.9.0 (#7552) * bump versions * generate reports * release notes * update release link Update .travis.yml (#7555) Fix new URL configuration (#7557) * Fix new URL configuration * Update check-ps-cloud-env.sh * Update check-ps-cloud-env.sh * Update .travis.yml * Update test.config.js [AAE-5880] Add Tasks Create, DueDate range testing methods in the testing page (#7549) * [AAE-5880] Add Tasks Create, DueDate range testing methods in the testing page * [AAE-5880] fixed process definition name dropdown select Co-authored-by: Tomasz <tomasz.gnyp@hyland.com> [ci:force] Manually upgrade to latest js-api (#7560) [AAE-7818] e2e - Task involved users can access process instance details (#7554) * [AAE-7818] e2e - Task involved users can access process instance details * Trigger travis Bump eslint-plugin-import from 2.22.1 to 2.25.4 (#7527) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.22.1 to 2.25.4. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.22.1...v2.25.4) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump minimist from 1.2.5 to 1.2.6 (#7563) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump minimist from 1.2.5 to 1.2.6 in /tools/doc (#7561) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump minimist from 1.2.5 to 1.2.6 in /lib/cli (#7562) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Update header.component.md [AAE-7819] Change column order - enable drag and drop for datatable - [1/3] (#7567) * [AAE-7819] Enable drag and drop for datatable [1/3] * [AAE-7819] Change column order - load and save columns order preferences for PROCESSES - [2/3] (#7568) * [AAE-7819] Load and save column order preferences for processes * [AAE-7819] Load and save column order preferences for tasks [3/3] (#7569) * fix css * fix icon module import * Fix unit tests * Fix test * Fix e2e * Fix C279927 [AAE-8086] Propagate form events (#7572) * [AAE-8086] Propagate events * [AAE-8086] Add form rules manager to the form renderer * [AAE-8086] Extensibility improvements * [AAE-8086] Fix wrong import * [AAE-8087] Add form actions * [AAE-8086] Initialize form rules manager on form renderer component changes * [AAE-8087] Fix form actions * [AAE-8087] Fix unit tests for field visibility * trigger travis Provide preference services on for tasks/processes on component module level (#7579) [AAE-8086] Remove form rules events that kill performance (#7583) * [AAE-8086] Remove form rules events that kill performance * [AAE-8086] Handle form loaded event in form rules [AAE-7313] User can claim a task only if he is an candidate and relea… (#7558) * [AAE-7313] User can claim a task only if he is an candidate and release if he is assigned * [AAE-7313] unit test improvements * revert change on angular.json * [AAE-7313] removed focus from unit test describe * Trigger travis * Trigger travis * [AAE-7313] exclude C593997 e2e [AAE-8086] Add form field changed event (#7584) * [AAE-8086] Add form field changed event * [AAE-8086] Send field changed event only qhen value changes (not in visibility check) [AAE-8061] Add groups restriction to people widget (#7586) * [AAE-8061] add groups restriction to people widget * Trigger travis * [AAE-8061] fix lint * [AAE-8061] fix unit tests [AAE-7819] Fix for custom header (#7585) Update branch for JS-API PR#63 (#7581) * [ci:force][auto-commit] Update JS-API to 4.10.0-63 for branch: update-js-api originated from JS-API PR: 63 * [ci:force][auto-commit] Update JS-API to 4.10.0-64 for branch: update-js-api originated from JS-API PR: 64 * [ci:force][auto-commit] Update JS-API to 4.10.0-65 for branch: update-js-api originated from JS-API PR: 65 * [ci:force][auto-commit] Update JS-API to 4.10.0-66 for branch: update-js-api originated from JS-API PR: 66 * [ci:force][auto-commit] Update JS-API to 4.10.0-69 for branch: update-js-api originated from JS-API PR: 69 * [ci:force][auto-commit] Update JS-API to 4.10.0-70 for branch: update-js-api originated from JS-API PR: 70 * [ci:force][auto-commit] Update JS-API to 4.10.0-77 for branch: update-js-api originated from JS-API PR: 77 * generate package lock * fix eslint plugin versions Co-authored-by: Denys Vuika <denys.vuika@gmail.com> [ci:force][auto-commit] Update JS-API to 4.10.0-78 for branch: update-js-api originated from JS-API PR: 78 (#7589) Bump karma from 6.3.16 to 6.3.17 (#7576) Bumps [karma](https://github.com/karma-runner/karma) from 6.3.16 to 6.3.17. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v6.3.16...v6.3.17) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump moment from 2.29.1 to 2.29.2 in /tools/doc (#7574) Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2) --- updated-dependencies: - dependency-name: moment dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> [AAE-8554] - Fix linked dropdown values are displayed but not submitted (#7590) * [AAE-8554] - Fix dropdown values are displayed but not submitted * Make eslint allow ternary [ADF-5480] Fix partially hidden icon on permissions (#7591) Fix reules event filtering when no form is provided (#7592) [AAE-8565] multiple use viewer in form (#7594) * multiple use viewer multiple use in the form of viewer needs multiple instance of ViewUtilService * Update viewer.component.spec.ts * Update viewer.component.spec.ts * Update viewer.component.spec.ts * Update viewer.component.spec.ts use all the filter fields to count the elements (#7595) [AAE-8061] Fix the group restriction for people widget (#7601) * FIx the restrinction * Fix unit test about restricted groups * Add a small sleep to make it green * Add sleep to other checks * Remove sleeps, improve assertions Co-authored-by: MichalFidor <michal.fidor@hyland.com> AAE-8476 Update sample app (#7603) Release 4.10.0 (#7602) * bump library versions * update package lock * generate reports * release notes for 4.10.0 Fix demo shell proxies (#7613) Added font awesome to icons model map (#7616) * Added font awesome to icons model map * update Update branch for JS-API PR#5 (#7615) * [ci:force][auto-commit] Update JS-API to 4.11.0-121 for branch: update-js-api originated from JS-API PR: 5 * [ci:force][auto-commit] Update JS-API to 4.11.0-122 for branch: update-js-api originated from JS-API PR: 122 [AAE-7817] Show hide columns on datatable (#7580) * [AAE-7817] Show hide columns for data-table * Update * update tests and uses material harness * added pipes test * update * update * added tests for datatable * update * Added documentation * Fix for drop column header * lint fix * fix lint Update branch for JS-API PR#9 (#7625) * [ci:force][auto-commit] Update JS-API to 4.11.0-124 for branch: update-js-api originated from JS-API PR: 9 * [ci:force][auto-commit] Update JS-API to 4.11.0-125 for branch: update-js-api originated from JS-API PR: 125 [AAE-8659] fix eslint configuration for rxjs (#7607) * fix eslint configuration for rxjs * update vs code settings * disable arror-functions warning [MNT-22924] Fix slow search results loading, limit number of pages (#7609) * [MNT-22924] Fix slow search results loading, limit number of pages * Add unit test * Changed some of the values Add eslint ban rule (#7611) [AAE-8648] Fix deprecated copy to clipboard api (#7610) [ci:force] Fix failing copy to clipboard test (#7631) Added missing top-level export for MainMenuDataTableTemplateDirective (#7633) [AAE-8639] Discovery OpenId - Load discovery and pass info to jsapi (#7632) * Load discovery and pass info to jsapi * fix the roles empty scenario tests * Make lint happier * Rename the initApi method * Add secret field Co-authored-by: arditdomi <ardit.domi@hyland.com> [AAE-8764] Enable left labels in text, number and dropdown cloud widget (#7628) Update branch for JS-API PR#126 (#7629) * [ci:force][auto-commit] Update JS-API to 4.11.0-126 for branch: update-js-api originated from JS-API PR: 126 * [ci:force][auto-commit] Update JS-API to 4.11.0-127 for branch: update-js-api originated from JS-API PR: 127 * [ci:force][auto-commit] Update JS-API to 4.11.0-131 for branch: update-js-api originated from JS-API PR: 131 * [ci:force][auto-commit] Update JS-API to 4.11.0-132 for branch: update-js-api originated from JS-API PR: 132 * [ci:force][auto-commit] Update JS-API to 4.11.0-133 for branch: update-js-api originated from JS-API PR: 133 [AAE-7077] Reset people content service cache on logout (#7637) * reset people content state on logout * unit test * use property accessor [AAE-7817] Add columns selector for processes and tasks tasks (#7612) * [AAE-7817] Add columns selector for processes and tasks tasks * cr * Update * fix unit tests * preserve order while sorting * add input toggle to show main actions * fix test [AAE-8713] feat: create api registry with factories support (#7634) Co-authored-by: Andras Popovics <popovics@ndras.hu> Co-authored-by: Michal Dobkiewicz <michal.dobkiewicz@hyland.com> Co-authored-by: Michał Dobkiewicz <ddohcim@users.noreply.github.com> use default profile email as scope (#7639) [AAE-8856] Enable left label for form widgets in several widgets (#7640) test: remove flaky file upload e2e test (#7648) * test: remove flaky file upload e2e test Revert "[AAE-8713] feat: create api registry with factories support (… (#7647) * Revert "[AAE-8713] feat: create api registry with factories support (#7634)" This reverts commit 226a6548a1fbaecad9f340e0ac688ef334ab4049. fix small viewport attach file (#7650) [AAE-6242] upload a new version of a file attached in a form (#7651) * [AAE-6242] Create upload new version dialog to handle the upload of the new file version * [AAE-6242] Create version manager service to open version manager dialog * [AAE-6242] Export service and dialog * [AAE-6242] add adf-upload button to the show the upload new file button * [AAE-6242] open upload new version dialog * [AAE-6242] Removed console log * [AAE-8798] display update option name to newVersion * [AAE-8799] Emit version manager data when new file version is uploaded * [AAE-8799] When a new file version is uploaded open new version dialog and update current file version with the new file version * [AAE-8799] Rename UploadNewVersionDialogComponent to VersionManagerDialogComponent and UploadNewVersionDialogData to VersionManagerDialogData * [AAE-8799] Use default root folder id * [AAE-8799] Add #uploadSingleFile ViewChild in order get the input reference * [AAE-8799] Trigger adf-upload-button by clicking on the button in order to open the file chooser and upload a new file version * [AAE-8799] Version manager dialog emits file upload error * [AAE-8799] Format version manager dialog code * [AAE-8799] Reject upload and permission errors * [AAE-8799] Catch upload new version errors * [AAE-8799] Update allowable operation type * [AAE-8799] Rename VersionManagerDialogComponent into NewVersionUploaderDialogComponent and VersionManagerService into NewVersionUploaderService, create specific folder for new version uploader component and service * Restore previous UploadButtonComponent version * [AAE-8799] Use [adf-upload] directive to upload new file version * [AAE-8799] Add mock file for new version uploader unit tests * [AAE-8799] Override mat dialog configuration * [AAE-8799] Add unit test related to event emitted from Dialog * [AAE-8799] Create model to handle New Version Uploader data * [AAE-8799] Return data on dialog close * [AAE-8799] Add showVersionsOnly property to dialog to show only file version list * [AAE-8799] Add dialogAction to emit dialog actions * [AAE-8799] Return observable instead of promise * [AAE-8799] Update new file version type * [AAE-8799] Subscribe dialog because return an Observable * [AAE-8799] Add license header * [AAE-8799] Add i18n new version uploader translations * [AAE-8799] If data.title is not provided, add a default title * [AAE-8799] Change panelClass for manage versions visualizations, add dialog styles * [AAE-8799] Add upload new version dialog unit test * [AAE-8799] Add upload new version dialog unit test related to manage versions section * [AAE-8799] Add onUploadNewFileVersion unit tests * [AAE-8799] Test new dialog panelClass * [AAE-8799] Create a method to set dialog title, if title isn't provided from parent component, a default title is set * [AAE-8799] Add doc to new-version-uploader-dilog component and service * [AAE-8799] Add new-version-uploader.dialog.service documentation [AAE-8929] Get start event form static inputs (#7652) * [AAE-8929] Get start event form static inputs * [AAE-8929] Fix tests [AAE-8948] Fix placeholders styles for left labels (#7656) [AAE-8740 Add a confirmation message in ADW (#7660) * [AAE-8740 Add a confirmation message in ADW * update tests * use MatDialogHarness for tests * Cleaning tests Co-authored-by: Bartosz Sekula <Bartosz.Sekula@hyland.com> [AAE-7856] Show process variables in table (#7630) * [AAE-7856] Show variables in table * Exclude flaky tests * Revert "Exclude flaky tests" This reverts commit 6ac24cc14a90d7b494fbc4dcc72e073e83a46457. [AAE-7856] Show variables columns for tasks (#7659) * Exclude flaky tests * Revert "Exclude flaky tests" This reverts commit 6ac24cc14a90d7b494fbc4dcc72e073e83a46457. * [AAE-7856] Show variable columns in tasks * revert loadTask to reload method name * Temporary solution due to incompatible type used for dates Update process variable column type (#7664) [AAE-8748] - Auth guards call api when access is not in JWT (#7662) * [AAE-8748] - Auth guards call api when access is not in JWT * [ci:force] fix unit tests * Remove fdescribe * Add documentation and unit tests for the user access service * Rename mocks, make e2e independent * Fix login e2e * Move forbidden access e2e under cloud [AAE-8740] Fix default ConfirmDialogComponent title (#7665) [ADF-5272] fe files upload form width is increasing if we upload file name too long (#7666) * [ADF-5272] Add tooltip to show the entire filename * [ADF-5272] Set max-width to div that contains filename to show ellipsis [AAE-8155] Check if it is content admin only when content provider is available (#7667) [AAE-8155] Fix typo in providers (#7669) Update content-node-selector.component.scss (#7673) [ADF-5479] Disable clam/release button for standalone tasks on APA (#7670) * [ADF-5479] Disable clam/release button for standalone tasks on APA * [ADF-5479] remove focus on unit test describe * Trigger travis [AAE-8076] Add groupsRestriction input to docs (#7645) * [AAE-8076] revert storybook changes * Trigger travis [AAE-9094] - Fix app breaking when configured with BASIC auth (#7672) Update branch for JS-API PR#134 (#7638) * [ci:force][auto-commit] Update JS-API to 4.11.0-134 for branch: update-js-api originated from JS-API PR: 134 * [ci:force][auto-commit] Update JS-API to 4.11.0-136 for branch: update-js-api originated from JS-API PR: 136 * [ci:force][auto-commit] Update JS-API to 4.11.0-137 for branch: update-js-api originated from JS-API PR: 137 * [ci:force][auto-commit] Update JS-API to 4.11.0-138 for branch: update-js-api originated from JS-API PR: 138 * [ci:force][auto-commit] Update JS-API to 4.11.0-138 for branch: update-js-api originated from JS-API PR: 139 * [ci:force][auto-commit] Update JS-API to 4.11.0-140 for branch: update-js-api originated from JS-API PR: 140 * [ci:force][auto-commit] Update JS-API to 4.11.0-142 for branch: update-js-api originated from JS-API PR: 142 * [ci:force][auto-commit] Update JS-API to 4.11.0-144 for branch: update-js-api originated from JS-API PR: 144 * [ci:force][auto-commit] Update JS-API to 4.11.0-145 for branch: update-js-api originated from JS-API PR: 145 * [ci:force][auto-commit] Update JS-API to 4.11.0-146 for branch: update-js-api originated from JS-API PR: 146 * [ci:force][auto-commit] Update JS-API to 4.11.0-147 for branch: update-js-api originated from JS-API PR: 147 * [ci:force][auto-commit] Update JS-API to 4.11.0-148 for branch: update-js-api originated from JS-API PR: 148 * [ci:force][auto-commit] Update JS-API to 4.11.0-149 for branch: update-js-api originated from JS-API PR: 149 * [ci:force][auto-commit] Update JS-API to 4.11.0-150 for branch: update-js-api originated from JS-API PR: 150 * [ci:force][auto-commit] Update JS-API to 4.11.0-154 for branch: update-js-api originated from JS-API PR: 154 * [ci:force][auto-commit] Update JS-API to 4.11.0-154 for branch: update-js-api originated from JS-API PR: 157 * [ci:force][auto-commit] Update JS-API to 4.11.0-158 for branch: update-js-api originated from JS-API PR: 158 * [ci:force][auto-commit] Update JS-API to 4.11.0-159 for branch: update-js-api originated from JS-API PR: 159 * [ci:force][auto-commit] Update JS-API to 4.11.0-161 for branch: update-js-api originated from JS-API PR: 161 * [ci:force][auto-commit] Update JS-API to 4.11.0-162 for branch: update-js-api originated from JS-API PR: 162 * [ci:force][auto-commit] Update JS-API to 4.11.0-163 for branch: update-js-api originated from JS-API PR: 163 * [ci:force][auto-commit] Update JS-API to 4.11.0-164 for branch: update-js-api originated from JS-API PR: 164 * [ci:force][auto-commit] Update JS-API to 4.11.0-165 for branch: update-js-api originated from JS-API PR: 165 * [ci:force][auto-commit] Update JS-API to 4.11.0-166 for branch: update-js-api originated from JS-API PR: 166 * [ci:force][auto-commit] Update JS-API to 4.11.0-167 for branch: update-js-api originated from JS-API PR: 167 * [ci:force][auto-commit] Update JS-API to 4.11.0-169 for branch: update-js-api originated from JS-API PR: 169 Convert login fields validation e2e to unit (#7674) [ci:force][auto-commit] Update JS-API to 4.11.0 for branch: update-js-api originated from JS-API PR: 173 (#7675) [ADF-5494] Remove useless imports (#7678) * Remove useless imports * rollback constants * Remove useless variable [ACS-3108] Release 4.11.0 (#7677) * bump versions * generate reports * release notes Transform e2e into unit (#7671) [AAE-8713] feat: create api registry with factories support (#7649) Co-authored-by: Andras Popovics <popovics@ndras.hu> Co-authored-by: Michal Dobkiewicz <michal.dobkiewicz@hyland.com> Co-authored-by: Michał Dobkiewicz <ddohcim@users.noreply.github.com> Fix the nx path to avoid installing it globally (#7681) * fix nx path * fix nx * fix nx * fix nx * fix nx * fix nx * fix nx [AAE-9293] Allow editing and restoring default process cloud filter (#7684) * [AAE-9293] Allow editing and restoring default process cloud filter * [AAE-9293] Fix e2e tests * [AAE-9293] Fix review comments [AAE-9135] Print simple form (#7683) Fetch the userInfo once loggedIn and expose the capability of admin (#7682) * Fetch the userInfo once loggedIn and expose the cabilibility of admin * Rollback method * Return same use if defined * Use the same pepleContent service for UserInfoCOmpnent * Remove useless import * Use interface * Use angular resolver instead of guard * Remove fdescribe * Fix linting * Regenerate doc * Improve doc * Fix optional * Fix the unit test * Fix comment * Fix lint * Fix unit * Add fetch user as part of the ssoGuard * Fix unit test after fetch * Add additional unit * Fix await [AAE-9337] Improve update project script (#7687) [ci:force][auto-commit] Update JS-API to 4.12.0-191 for branch: update-js-api originated from JS-API PR: 32 (#7676) APPS-1568 ACA should be extended to support visibility rules for Document List columns (#7685) * APPS-1568 Extended rules functionality for Document List columns [AAE-9298] FE ADF Date widget handle dynamic date values (#7689) * [AAE-9298] Add dynamic date fields to FormFieldModel * [AAE-9298] Change dynamic date range types from string to integer * [AAE-9298] If dynamicDateRangeSelection is true, it will evaluate minDateRangeValue and maxDateRangeValue to set min and max date if are set * [AAE-9298] Check if date range values are numbers [AAE-9314] Fix preselected user display in completed task (#7688) * [AAE-9314] Fix preselected user display in completed task * [AAE-9314] add unit tests * Trigger travis [AAE-9019] - People/Group cloud with HxP (#7658) * Cover the use cases by mocking them * Replace the mock with real stream and remove useless code * Provide new service to fetch groups * Fix group tests * Use the interface and token injection * [AAE-8870] add unit test and mock for new service * Improve roles condifion * initialize the stream as part of NgOnInit to be sure it relies on the correct FormControl instance(input) * Rollback tmp change for roles * [AAE-8641] people abstraction mock * [AAE-8641] revert angular.json changes * [AAE-8641] few conditions and code improvements * [AAE-8641] revert change input controls name * [AAE-8641] initialize the stream as part of ngOnInit * [AAE-8641] people abstraction improvements * [AAE-8870] cherry pick people abstraction * [AAE-8641] fix people-group e2es * fix lint * remove hardcoded identityHost * Use the identityhost api in case of cloud * Solve issue with returnType array string * Rebase and use GroupModel from cloud * Rebase and use GroupModel from cloud * Use the bpmHost instead of identityFor * Add identity ingress for user access service * Rename test * Fix linting issues * Fix playwright storybook e2e for people and group * Trigger travis * Fix people group e2e * improved formatting * Remove not needed travis var override * Remove unused import after rebase * Make roles in filter optional + remove comments Co-authored-by: Tomasz <tomasz.gnyp@hyland.com> Co-authored-by: arditdomi <ardit.domi@hyland.com> [AAE-9365] - Auth guards should return true when no roles to check are passed (#7695) [AAE-9190] - ATTACH FILE: view file content directly by clicking (#7693) * [AAE-9190] ATTACH FILE: view file content directly by clicking * unit test added * fix * delete comment * fix CR * fix * fix identation * delete extra spaces * change import in unit test * fix * fix space lint [AAE-9112] Included a output event on change of language (#7697) [AAE-9382] SSOGuard - Call the acs user only in case of ECM (#7696) * Call the acs user only * Fix and add unit test [AAE-9370] Add manageruser to default apps (#7698) * Add manageruser to default apps * Try to ignore resource file to avoid affected [ci:force][auto-commit] Update JS-API to 4.12.0-197 for branch: update-js-api originated from JS-API PR: 197 (#7692) [AAE-9310] Add missing initial on task assignment dialog (#7694) * [AAE-9310] Add missing initial on task assignment dialog * [AAE-9310] rewrite full-name pipe * [AAE-9310] improved build username or email * Trigger travis * [AAE-9310] improve buildFromUsernameOrEmail [AAE-7865] Added process with displayable variables (#7703) [AAE-7865] Configuration of columns in Task and Process Lists in ADW e2e (#7701) * [AAE-7865] Configuration of columns in Task and Process Lists in ADW e2e test * Update * Cr * Added variable task data Angular 13 upgrade Signed-off-by: eromano <eugenioromano16@gmail.com> make unit test start Signed-off-by: eromano <eugenioromano16@gmail.com> some fix for unit test Signed-off-by: eromano <eugenioromano16@gmail.com> full compilation mode Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> core fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix cloud unit test Signed-off-by: eromano <eugenioromano16@gmail.com> nx 13 Signed-off-by: eromano <eugenioromano16@gmail.com> remove S3 Signed-off-by: eromano <eugenioromano16@gmail.com> fix command Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix lint Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> rebase Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> Fix imports and storybook stories fix Signed-off-by: eromano <eugenioromano16@gmail.com> revert modify package.json and uncommented code Signed-off-by: eromano <eugenioromano16@gmail.com> fix lock Signed-off-by: eromano <eugenioromano16@gmail.com> fic Signed-off-by: eromano <eugenioromano16@gmail.com> Use proper file name fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> revert Signed-off-by: eromano <eugenioromano16@gmail.com> fix travis before and after e2e Signed-off-by: eromano <eugenioromano16@gmail.com> try Signed-off-by: eromano <eugenioromano16@gmail.com> ls node Signed-off-by: eromano <eugenioromano16@gmail.com> tentative n1 Signed-off-by: eromano <eugenioromano16@gmail.com> before Signed-off-by: eromano <eugenioromano16@gmail.com> release alpha version A13 Signed-off-by: eromano <eugenioromano16@gmail.com> release alpha Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> partial Signed-off-by: eromano <eugenioromano16@gmail.com> refactor form rendering : remove tabs widget and container widget due dependency loop Signed-off-by: eromano <eugenioromano16@gmail.com> lint Signed-off-by: eromano <eugenioromano16@gmail.com> handle group Signed-off-by: eromano <eugenioromano16@gmail.com> [AAE-7958] update - playwright and C260040 exclude fix build content Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix render dynamic table Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix unit Signed-off-by: eromano <eugenioromano16@gmail.com> revert Signed-off-by: eromano <eugenioromano16@gmail.com> fix increase use of the field cache check before if tab is visible improve performance tabs visibility Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix style Signed-off-by: eromano <eugenioromano16@gmail.com> fix module Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix after rebase Signed-off-by: eromano <eugenioromano16@gmail.com> fix after rebase Signed-off-by: eromano <eugenioromano16@gmail.com> fix import Signed-off-by: eromano <eugenioromano16@gmail.com> update lock Signed-off-by: eromano <eugenioromano16@gmail.com> node 14 back Signed-off-by: eromano <eugenioromano16@gmail.com> fix lock Signed-off-by: eromano <eugenioromano16@gmail.com> cli build Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix build testing and cli Signed-off-by: eromano <eugenioromano16@gmail.com> version bump 5 Signed-off-by: eromano <eugenioromano16@gmail.com> fix Signed-off-by: eromano <eugenioromano16@gmail.com> fix build cli Signed-off-by: eromano <eugenioromano16@gmail.com> fix cli Signed-off-by: eromano <eugenioromano16@gmail.com> fix duplicate build and themes Signed-off-by: eromano <eugenioromano16@gmail.com> fix storybook Signed-off-by: eromano <eugenioromano16@gmail.com> fix unit test Signed-off-by: eromano <eugenioromano16@gmail.com> update package json files to reflect esm reqs fix lib path remove type module for karma sake Get rid of moment-es6 package fix after rebase fix different version commander use same commander main pkg new release strategy for ng next Signed-off-by: eromano <eugenioromano16@gmail.com> peer dep Signed-off-by: eromano <eugenioromano16@gmail.com> fix test Signed-off-by: eromano <eugenioromano16@gmail.com> fix shared enty point testing Signed-off-by: eromano <eugenioromano16@gmail.com> fix moment import Signed-off-by: eromano <eugenioromano16@gmail.com> fix moment in testing fix moment Signed-off-by: eromano <eugenioromano16@gmail.com> Update mat-datetimepicker package version Update peerDeps version to match the ones in the root Fix invalid storybook configuration Revert the file due a wrong rebase (I suppose) aligning the file with latest develop Revowe flaky e2e that will be replaced by storybook Fix the autoscaling for page-fit * Syncing angular version to be patch perfect * Pre-release of 5.0.0-angular.13 Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
parent
562b7583b7
commit
c974623741
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/.angular/cache
|
||||
*.log
|
||||
node_modules
|
||||
bundles
|
||||
@ -30,3 +31,5 @@ out-tsc
|
||||
e2e-result-*
|
||||
licenses.txt
|
||||
.DS_Store
|
||||
|
||||
.angular
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": [
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
"include": ["../**/*"]
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": [
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
"include": ["../**/*"]
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Export a function. Accept the base config as the only param.
|
||||
* @param {Object} options
|
||||
* @param {Required<import('webpack').Configuration>} options.config
|
||||
* @param {'DEVELOPMENT' | 'PRODUCTION'} options.mode - change the build configuration. 'PRODUCTION' is used when building the static version of storybook.
|
||||
*/
|
||||
module.exports = async ({ config, mode }) => {
|
||||
// Make whatever fine-grained changes you need
|
||||
|
||||
// Return the altered config
|
||||
return config;
|
||||
};
|
@ -1,2 +1,3 @@
|
||||
_theming.scss
|
||||
lib/core/viewer/components/pdf-viewer-host.component.scss
|
||||
lib/dist
|
||||
|
225
.travis.yml
225
.travis.yml
@ -47,6 +47,13 @@ branches:
|
||||
only:
|
||||
- /^master(-patch.*)?$/
|
||||
- /^develop(-patch.*)?$/
|
||||
- master
|
||||
- develop
|
||||
#remove after upgrade
|
||||
- angular-upgrade-v13
|
||||
- angular-upgrade-v14
|
||||
- /.*old-env.*/
|
||||
- /.*next-release.*/
|
||||
- /.*beta.*/
|
||||
|
||||
stages:
|
||||
@ -61,9 +68,9 @@ stages:
|
||||
- name: "Build Demo shell"
|
||||
if: tag IS blank
|
||||
- name: "Unit test Lib"
|
||||
if: type = pull_request || (type = cron || type = api)
|
||||
if: type = pull_request || (type = cron || type = api) || branch = "angular-upgrade-v13"
|
||||
- name: "e2e Test"
|
||||
if: type = pull_request || (type = cron || type = api)
|
||||
if: type = pull_request || (type = cron || type = api) || branch = "angular-upgrade-v13"
|
||||
- name: "Release tag"
|
||||
if: branch =~ /^master(-patch.*)?$/
|
||||
- name: "Deprecate develop builds"
|
||||
@ -123,7 +130,7 @@ jobs:
|
||||
script:
|
||||
# Build Demo shell & Storybook for production docker"
|
||||
- NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production
|
||||
- NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci
|
||||
- NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci --projectBuildConfig=stories:build-storybook
|
||||
- ./scripts/travis/release/release-docker.sh
|
||||
workspaces:
|
||||
create:
|
||||
@ -187,11 +194,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="core"
|
||||
- PROVIDER='ALL'
|
||||
@ -203,11 +214,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="content-services/components"
|
||||
- PROVIDER="ECM"
|
||||
@ -219,11 +234,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="content-services/directives"
|
||||
- PROVIDER="ECM"
|
||||
@ -235,11 +254,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="content-services/document-list"
|
||||
- PROVIDER="ECM"
|
||||
@ -251,11 +274,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="content-services/metadata"
|
||||
- PROVIDER="ECM"
|
||||
@ -267,11 +294,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="content-services/upload"
|
||||
- PROVIDER="ECM"
|
||||
@ -283,11 +314,15 @@ jobs:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="search"
|
||||
- PROVIDER="ECM"
|
||||
@ -296,15 +331,19 @@ jobs:
|
||||
- stage: "e2e Test"
|
||||
name: "Process: Form"
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services/form"
|
||||
- PROVIDER="BPM"
|
||||
@ -313,15 +352,19 @@ jobs:
|
||||
- stage: "e2e Test"
|
||||
name: "Process: Process"
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services/process"
|
||||
- PROVIDER="BPM"
|
||||
@ -330,15 +373,19 @@ jobs:
|
||||
- stage: "e2e Test"
|
||||
name: "Process: Tasks"
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services/tasks"
|
||||
- PROVIDER="BPM"
|
||||
@ -347,20 +394,36 @@ jobs:
|
||||
- stage: "e2e Test"
|
||||
name: "Process: Widgets"
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services/widgets"
|
||||
- PROVIDER="BPM"
|
||||
- AUTH_TYPE="OAUTH"
|
||||
|
||||
- stage: "e2e Test"
|
||||
name: "Process Cloud:playwright"
|
||||
before_script:
|
||||
- ./scripts/ci/job_hooks/before_e2e.sh
|
||||
- ./scripts/ci/jobs/dbpci-before-playwright || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/storybook-testing/storybook-test.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
|
||||
- stage: "e2e Test"
|
||||
name: "Process Cloud : Form"
|
||||
before_script:
|
||||
@ -368,11 +431,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services-cloud/form-field"
|
||||
- PROVIDER="ALL"
|
||||
@ -386,11 +453,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services-cloud/people"
|
||||
- PROVIDER="ALL"
|
||||
@ -404,11 +475,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services-cloud/process"
|
||||
- PROVIDER="ALL"
|
||||
@ -422,11 +497,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services-cloud/start-task"
|
||||
- PROVIDER="ALL"
|
||||
@ -440,11 +519,15 @@ jobs:
|
||||
- ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1
|
||||
- ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1
|
||||
script: ./scripts/travis/e2e/e2e.sh
|
||||
after_script: ./scripts/ci/job_hooks/after_e2e.sh
|
||||
workspaces:
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
create:
|
||||
name: e2e_cache
|
||||
paths:
|
||||
- "$SMART_RUNNER_DIRECTORY"
|
||||
use:
|
||||
- built_libs_cache
|
||||
- built_demo_shell_cache
|
||||
- e2e_cache
|
||||
env:
|
||||
- FOLDER="process-services-cloud/task-list"
|
||||
- PROVIDER="ALL"
|
||||
|
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@ -1,6 +1,4 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"stylelint.vscode-stylelint",
|
||||
"editorconfig.editorconfig",
|
||||
]
|
||||
}
|
||||
|
@ -72,4 +72,3 @@ All components are supported in the following browsers:
|
||||
* Due to a [known issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1188880) in Firefox, the Alfresco Upload Component does not currently support folder upload functionality on Firefox.
|
||||
|
||||
See the [Browser Support](BROWSER-SUPPORT.md) article for more details.
|
||||
|
||||
|
80
angular.json
80
angular.json
@ -11,12 +11,10 @@
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"extractCss": true,
|
||||
"aot": true,
|
||||
"allowedCommonJsDependencies": [
|
||||
"minimatch",
|
||||
"minimatch-browser",
|
||||
"moment-es6",
|
||||
"superagent",
|
||||
"event-emitter",
|
||||
"brace-expansion",
|
||||
@ -177,24 +175,27 @@
|
||||
"node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"node_modules/raphael/raphael.min.js",
|
||||
"node_modules/moment/min/moment.min.js"
|
||||
]
|
||||
],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
"maximumWarning": "12kb"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": true,
|
||||
"buildOptimizer": true,
|
||||
"verbose": false,
|
||||
"fileReplacements": [
|
||||
@ -214,11 +215,8 @@
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": true,
|
||||
"buildOptimizer": true,
|
||||
"verbose": false,
|
||||
"fileReplacements": [
|
||||
@ -228,7 +226,8 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": ""
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
@ -389,29 +388,17 @@
|
||||
"protractorConfig": "./e2e/protractor.conf.js",
|
||||
"devServerTarget": "lib-e2e-test:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"./e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/lib/**/*",
|
||||
"**/node_modules/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"core": {
|
||||
"projectType": "library",
|
||||
"root": "lib/core",
|
||||
"sourceRoot": "lib/core",
|
||||
"projectType": "library",
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/core/tsconfig.lib.json",
|
||||
"project": "lib/core/ng-package.json"
|
||||
@ -420,8 +407,12 @@
|
||||
"production": {
|
||||
"project": "lib/core/ng-package.json",
|
||||
"tsConfig": "lib/core/tsconfig.lib.prod.json"
|
||||
},
|
||||
"development": {
|
||||
"tsConfig": "lib/core/tsconfig.lib.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
@ -486,7 +477,7 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/content-services/tsconfig.lib.json",
|
||||
"project": "lib/content-services/ng-package.json"
|
||||
@ -558,7 +549,7 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/process-services/tsconfig.lib.json",
|
||||
"project": "lib/process-services/ng-package.json"
|
||||
@ -597,7 +588,7 @@
|
||||
"prefix": "adf-cloud",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/process-services-cloud/tsconfig.lib.json",
|
||||
"project": "lib/process-services-cloud/ng-package.json"
|
||||
@ -669,7 +660,7 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/insights/tsconfig.lib.json",
|
||||
"project": "lib/insights/ng-package.json"
|
||||
@ -708,7 +699,7 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "lib/extensions/tsconfig.lib.json",
|
||||
"project": "lib/extensions/ng-package.json"
|
||||
@ -746,13 +737,26 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@nrwl/node:webpack",
|
||||
"options": {
|
||||
"tsConfig": "lib/testing/tsconfig.lib.json",
|
||||
"project": "lib/testing/ng-package.json"
|
||||
"projectRoot": "lib/testing",
|
||||
"outputPath": "lib/dist/testing",
|
||||
"main": "lib/testing/index.ts",
|
||||
"generatePackageJson" : true,
|
||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
||||
"additionalEntryPoints": [
|
||||
{
|
||||
"entryName": "shared",
|
||||
"entryPath": "/lib/testing/src/lib/shared/index.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"projectRoot": "lib/testing",
|
||||
"outputPath": "lib/dist/testing",
|
||||
"main": "lib/testing/index.ts",
|
||||
"generatePackageJson" : true,
|
||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
@ -775,13 +779,15 @@
|
||||
"prefix": "adf",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"builder": "@nrwl/workspace:run-commands",
|
||||
"options": {
|
||||
"tsConfig": "lib/cli/tsconfig.json"
|
||||
"commands": [
|
||||
"cd lib/cli && npm i && npm run dist"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "lib/cli/tsconfig.lib.prod.json"
|
||||
"tsConfig": "lib/cli/tsconfig.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,10 +4,6 @@
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types":[
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Alfresco-ADF-Angular-Demo",
|
||||
"description": "Demo shell for Alfresco Angular components",
|
||||
"version": "4.11.0",
|
||||
"version": "5.0.0-angular.13",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AspectListService } from '@alfresco/adf-content-services';
|
||||
import { DialogAspectListService } from '@alfresco/adf-content-services';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
@ -30,14 +30,14 @@ export class AspectListSampleComponent {
|
||||
|
||||
currentResult: string[] = [];
|
||||
|
||||
constructor(private aspectListService: AspectListService) { }
|
||||
constructor(private dialogAspectListService: DialogAspectListService) { }
|
||||
|
||||
showAspectForNode() {
|
||||
this.isShowed = !this.isShowed;
|
||||
}
|
||||
|
||||
openAspectDialog() {
|
||||
this.aspectListService.openAspectListDialog(this.currentNodeId).subscribe((result) => this.currentResult = Array.from(result));
|
||||
this.dialogAspectListService.openAspectListDialog(this.currentNodeId).subscribe((result) => this.currentResult = Array.from(result));
|
||||
}
|
||||
|
||||
onValueChanged(aspects) {
|
||||
|
@ -38,7 +38,7 @@ import {
|
||||
LibraryDialogComponent,
|
||||
ContentMetadataService,
|
||||
FilterSearch,
|
||||
AspectListService
|
||||
DialogAspectListService
|
||||
} from '@alfresco/adf-content-services';
|
||||
|
||||
import { SelectAppsDialogComponent, ProcessFormRenderingService } from '@alfresco/adf-process-services';
|
||||
@ -233,7 +233,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
public alfrescoApiService: AlfrescoApiService,
|
||||
private contentMetadataService: ContentMetadataService,
|
||||
private sharedLinksApiService: SharedLinksApiService,
|
||||
private aspectListService: AspectListService,
|
||||
private dialogAspectListService: DialogAspectListService,
|
||||
private nodeService: NodesApiService) {
|
||||
}
|
||||
|
||||
@ -474,7 +474,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
onAspectUpdate(event: any) {
|
||||
this.aspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => {
|
||||
this.dialogAspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => {
|
||||
this.nodeService.updateNode(event.value.entry.id, {aspectNames : [...aspectList]}).subscribe(() => {
|
||||
this.openSnackMessageInfo('Node Aspects Updated');
|
||||
});
|
||||
|
@ -19,7 +19,7 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import moment from 'moment-es6';
|
||||
import moment from 'moment';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
const DEFAULT_SIZE = 20;
|
||||
|
@ -1,11 +1,11 @@
|
||||
@import '~@angular/material/theming';
|
||||
@use '@angular/material' as mat;
|
||||
@import '../../lib/core/styles/index';
|
||||
@include mat-core($alfresco-typography);
|
||||
@include mat.core($alfresco-typography);
|
||||
|
||||
$primary: mat-palette($alfresco-accent-orange);
|
||||
$accent: mat-palette($alfresco-accent-purple);
|
||||
$warn: mat-palette($alfresco-warn);
|
||||
$theme: mat-light-theme(
|
||||
$primary: mat.define-palette($alfresco-accent-orange);
|
||||
$accent: mat.define-palette($alfresco-accent-purple);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
@ -14,7 +14,7 @@ $theme: mat-light-theme(
|
||||
)
|
||||
);
|
||||
|
||||
@include angular-material-theme($theme);
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
||||
|
||||
body,
|
||||
@ -22,9 +22,9 @@ html {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-size: mat-font-size($alfresco-typography, body-1);
|
||||
font-family: mat-font-family($alfresco-typography);
|
||||
line-height: mat-line-height($alfresco-typography, body-1);
|
||||
font-size: mat.font-size($alfresco-typography, body-1);
|
||||
font-family: mat.font-family($alfresco-typography);
|
||||
line-height: mat.line-height($alfresco-typography, body-1);
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -1,11 +1,11 @@
|
||||
@import '~@angular/material/theming';
|
||||
@use '@angular/material' as mat;
|
||||
@import '~@alfresco/adf-core/theming';
|
||||
@include mat-core($alfresco-typography);
|
||||
@include mat.core($alfresco-typography);
|
||||
|
||||
$primary: mat-palette($alfresco-accent-orange);
|
||||
$accent: mat-palette($alfresco-accent-purple);
|
||||
$warn: mat-palette($alfresco-warn);
|
||||
$theme: mat-light-theme(
|
||||
$primary: mat.define-palette($alfresco-accent-orange);
|
||||
$accent: mat.define-palette($alfresco-accent-purple);
|
||||
$warn: mat.define-palette($alfresco-warn);
|
||||
$theme: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $primary,
|
||||
@ -14,7 +14,7 @@ $theme: mat-light-theme(
|
||||
)
|
||||
);
|
||||
|
||||
@include angular-material-theme($theme);
|
||||
@include mat.all-component-themes($theme);
|
||||
@include alfresco-material-theme($theme);
|
||||
|
||||
body,
|
||||
@ -22,9 +22,9 @@ html {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-size: mat-font-size($alfresco-typography, body-1);
|
||||
font-family: mat-font-family($alfresco-typography);
|
||||
line-height: mat-line-height($alfresco-typography, body-1);
|
||||
font-size: mat.font-size($alfresco-typography, body-1);
|
||||
font-family: mat.font-family($alfresco-typography);
|
||||
line-height: mat.line-height($alfresco-typography, body-1);
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -35,13 +35,10 @@
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
/**
|
||||
* Support custom event in IE11
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
@ -29,7 +29,9 @@ declare const require: any;
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
}
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
|
@ -29,3 +29,4 @@ The pages linked below contain the licenses for all third party dependencies of
|
||||
- [ADF 4.9.0](license-info-4.9.0.md)
|
||||
- [ADF 4.10.0](license-info-4.10.0.md)
|
||||
- [ADF 4.11.0](license-info-4.11.0.md)
|
||||
- [ADF 5.0.0-angular.13](license-info-5.0.0-angular.13.md)
|
||||
|
193
docs/license-info/license-info-5.0.0-angular.13.md
Normal file
193
docs/license-info/license-info-5.0.0-angular.13.md
Normal file
@ -0,0 +1,193 @@
|
||||
---
|
||||
Title: License info, alfresco-ng2-components 5.0.0-angular.13
|
||||
---
|
||||
|
||||
# License information for alfresco-ng2-components 5.0.0-angular.13
|
||||
|
||||
This page lists all third party libraries the project depends on.
|
||||
|
||||
## Libraries
|
||||
|
||||
| Name | Version | License |
|
||||
| --- | --- | --- |
|
||||
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.12.0-238 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [@angular/animations](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/cdk](https://github.com/angular/components) | 13.2.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/common](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/compiler](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/compiler](https://github.com/angular/angular) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/core](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/core](https://github.com/angular/angular) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/flex-layout](https://github.com/angular/flex-layout) | 13.0.0-beta.38 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/forms](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/material-moment-adapter](https://github.com/angular/components) | 13.3.9 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/material](https://github.com/angular/components) | 13.3.9 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/platform-browser](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@angular/router](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.6.9 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@babel/code-frame](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@babel/helper-validator-identifier](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@babel/highlight](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@editorjs/editorjs](https://github.com/codex-team/editor.js) | 2.25.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [@editorjs/header](https://github.com/editor-js/header) | 2.6.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@editorjs/list](https://github.com/editor-js/list) | 1.7.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@editorjs/underline](https://github.com/editor-js/underline) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@graphql-typed-document-node/core](https://github.com/dotansimha/graphql-typed-document-node) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 9.0.68 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@mat-datetimepicker/moment](https://github.com/kuhnroyal/mat-datetimepicker) | 9.0.68 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@ngx-translate/core](https://github.com/ngx-translate/core) | 13.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@types/chart.js](https://github.com/DefinitelyTyped/DefinitelyTyped) | 2.9.37 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@wry/context](https://github.com/benjamn/wryware) | 0.6.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@wry/equality](https://github.com/benjamn/wryware) | 0.5.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [@wry/trie](https://github.com/benjamn/wryware) | 0.3.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [adf-tslint-rules](https://github.com/Alfresco/alfresco-ng2-components) | 0.0.7 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [alfresco-ng2-components](https://github.com/Alfresco/alfresco-ng2-components) | 5.0.0-angular.13 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [ansi-styles](https://github.com/chalk/ansi-styles) | 3.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [app-root-path](https://github.com/inxilpro/node-app-root-path) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [app-root-path](https://github.com/inxilpro/node-app-root-path) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [argparse](https://github.com/nodeca/argparse) | 1.0.10 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [aria-query](https://github.com/A11yance/aria-query) | 3.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [ast-types-flow](https://github.com/kyldvs/ast-types-flow) | 0.0.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [axobject-query](https://github.com/A11yance/axobject-query) | 2.0.2 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [backo2](https://github.com/mokesmokes/backo) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.11 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [builtin-modules](https://github.com/sindresorhus/builtin-modules) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [chalk](https://github.com/chalk/chalk) | 2.4.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [chart.js](https://github.com/chartjs/Chart.js) | 2.9.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [chartjs-color-string](https://github.com/chartjs/chartjs-color-string) | 0.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [chartjs-color](https://github.com/chartjs/chartjs-color) | 2.4.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [codelyzer](https://github.com/mgechev/codelyzer) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [codex-notifier](https://github.com/codex-team/js-notifier) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [codex-tooltip](https://github.com/codex-team/codex.tooltips) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [color-convert](https://github.com/Qix-/color-convert) | 1.9.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [color-name](https://github.com/dfcreative/color-name) | 1.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [color-name](https://github.com/colorjs/color-name) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [commander](https://github.com/tj/commander.js) | 2.20.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.5.12 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [css-selector-tokenizer](https://github.com/css-modules/css-selector-tokenizer) | 0.7.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [css-selector-tokenizer](https://github.com/css-modules/css-selector-tokenizer) | 0.7.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [cssauron](https://github.com/chrisdickinson/cssauron) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [cssesc](https://github.com/mathiasbynens/cssesc) | 0.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [cssesc](https://github.com/mathiasbynens/cssesc) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [custom-event-polyfill](https://github.com/kumarharsh/custom-event-polyfill) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [damerau-levenshtein](https://github.com/tad-lispy/node-damerau-levenshtein) | 1.0.8 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
|
||||
| [debug](https://github.com/debug-js/debug) | 4.3.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [diff](https://github.com/kpdecker/jsdiff) | 4.0.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
|
||||
| editorjs-html | 3.4.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [editorjs-paragraph-with-alignment](https://github.com/kaaaaaaaaaaai/paragraph-with-alignment) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.61 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [esprima](https://github.com/jquery/esprima) | 4.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
|
||||
| [eve-raphael](https://github.com/tomasAlabes/eve) | 0.5.0 | [Apache](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [eventemitter3](https://github.com/primus/eventemitter3) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [ext](https://github.com/medikoo/es5-ext.git#ext) | 1.6.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [extract-files](https://github.com/jaydenseric/extract-files) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [fastparse](https://github.com/webpack/fastparse) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [fs.realpath](https://github.com/isaacs/fs.realpath) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [glob](https://github.com/isaacs/node-glob) | 7.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [graphql-tag](https://github.com/apollographql/graphql-tag) | 2.12.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [graphql](https://github.com/graphql/graphql-js) | 15.8.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [has-flag](https://github.com/sindresorhus/has-flag) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [hoist-non-react-statics](https://github.com/mridgway/hoist-non-react-statics) | 3.3.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [inflight](https://github.com/npm/inflight) | 1.0.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [inherits](https://github.com/isaacs/inherits) | 2.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [is-core-module](https://github.com/inspect-js/is-core-module) | 2.9.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [iterall](https://github.com/leebyron/iterall) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [js-tokens](https://github.com/lydell/js-tokens) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [js-yaml](https://github.com/nodeca/js-yaml) | 3.14.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [jsesc](https://github.com/mathiasbynens/jsesc) | 0.5.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [lodash-es](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [loose-envify](https://github.com/zertosh/loose-envify) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [mime-db](https://github.com/jshttp/mime-db) | 1.52.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.35 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [minimatch](https://github.com/isaacs/minimatch) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [minimist](https://github.com/substack/minimist) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [mkdirp](https://github.com/substack/node-mkdirp) | 0.5.6 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [moment](https://github.com/moment/moment) | 2.29.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [nanoid](https://github.com/ai/nanoid) | 3.3.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [next-tick](https://github.com/medikoo/next-tick) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [ng2-charts](https://github.com/valor-software/ng2-charts) | 2.4.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [ngx-monaco-editor](https://github.com/atularen/ngx-monaco-editor) | 8.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [object-assign](https://github.com/sindresorhus/object-assign) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [optimism](https://github.com/benjamn/optimism) | 0.16.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [parse5](https://github.com/inikulin/parse5) | 5.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [path-is-absolute](https://github.com/sindresorhus/path-is-absolute) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [path-parse](https://github.com/jbgutierrez/path-parse) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 2.5.207 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [prop-types](https://github.com/facebook/prop-types) | 15.8.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [react-is](https://github.com/facebook/react) | 16.13.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [react](https://github.com/facebook/react) | 16.14.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [regenerate](https://github.com/mathiasbynens/regenerate) | 1.4.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [regexpu-core](https://github.com/mathiasbynens/regexpu-core) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [regjsgen](https://github.com/d10/regjsgen) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [regjsparser](https://github.com/jviereck/regjsparser) | 0.1.5 | [BSD](http://www.opensource.org/licenses/BSD-2-Clause) |
|
||||
| [resolve](https://github.com/browserify/resolve) | 1.22.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [rxjs](https://github.com/reactivex/rxjs) | 6.6.7 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [semver-dsl](https://github.com/mgechev/semver-dsl) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [semver](https://github.com/npm/node-semver) | 5.7.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [semver](https://github.com/npm/node-semver) | 7.3.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [source-map](https://github.com/mozilla/source-map) | 0.5.6 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [source-map](https://github.com/mozilla/source-map) | 0.5.7 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [sprintf-js](https://github.com/alexei/sprintf.js) | 1.0.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [sprintf-js](https://github.com/alexei/sprintf.js) | 1.1.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
|
||||
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [supports-color](https://github.com/chalk/supports-color) | 5.5.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [supports-preserve-symlinks-flag](https://github.com/inspect-js/node-supports-preserve-symlinks-flag) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [symbol-observable](https://github.com/blesh/symbol-observable) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [symbol-observable](https://github.com/blesh/symbol-observable) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [through](https://github.com/dominictarr/through) | 2.3.8 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [ts-invariant](https://github.com/apollographql/invariant-packages) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [tslib](https://github.com/Microsoft/tslib) | 1.14.1 | [0BSD](http://landley.net/toybox/license.html) |
|
||||
| [tslib](https://github.com/Microsoft/tslib) | 2.4.0 | [0BSD](http://landley.net/toybox/license.html) |
|
||||
| [tslint](https://github.com/palantir/tslint) | 6.1.3 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [tsutils](https://github.com/ajafff/tsutils) | 2.29.0 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [type](https://github.com/medikoo/type) | 2.6.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [typescript](https://github.com/Microsoft/TypeScript) | 4.5.5 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
|
||||
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [ws](https://github.com/websockets/ws) | 7.5.9 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
|
||||
| [zen-observable-ts](https://github.com/apollographql/zen-observable-ts) | 1.2.5 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [zen-observable](https://github.com/zenparsing/zen-observable) | 0.8.15 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [zone.js](https://github.com/angular/angular) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
| [zone.js](https://github.com/angular/angular) | 0.11.7 | [MIT](http://www.opensource.org/licenses/MIT) |
|
||||
|
@ -26,3 +26,4 @@ The pages linked below contain the audit for all third party dependencies of ADF
|
||||
- [ADF 4.9.0](audit-info-4.9.0.md)
|
||||
- [ADF 4.10.0](audit-info-4.10.0.md)
|
||||
- [ADF 4.11.0](audit-info-4.11.0.md)
|
||||
- [ADF 5.0.0-angular.13](audit-info-5.0.0-angular.13.md)
|
||||
|
22
docs/vulnerability/audit-info-5.0.0-angular.13.md
Normal file
22
docs/vulnerability/audit-info-5.0.0-angular.13.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
Title: Audit info, alfresco-ng2-components 5.0.0-angular.13
|
||||
---
|
||||
|
||||
# Audit information for alfresco-ng2-components 5.0.0-angular.13
|
||||
|
||||
This page lists the security audit of the dependencies this project depends on.
|
||||
|
||||
## Risks
|
||||
|
||||
- Critical risk: 0
|
||||
- High risk: 0
|
||||
- Moderate risk: 0
|
||||
- Low risk: 0
|
||||
|
||||
Dependencies analyzed: 138
|
||||
|
||||
## Libraries
|
||||
|
||||
| Severity | Module | Vulnerable versions |
|
||||
| --- | --- | --- |
|
||||
|
@ -149,7 +149,7 @@ describe('Delete Directive', () => {
|
||||
await contentListPage.dataTable.checkContentIsNotDisplayed('Display name', folderInfo.name);
|
||||
});
|
||||
|
||||
it('[C260193] Delete file when different selections are set', async () => {
|
||||
it('[C260193] Delete file when different selections are set', async () => {
|
||||
await contentServicesPage.chooseSelectionMode('None');
|
||||
await contentListPage.selectRow(txtFileModel.name);
|
||||
await contentListPage.dataTable.checkRowIsNotSelected('Display name', txtFileModel.name);
|
||||
|
@ -19,7 +19,7 @@ import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import moment from 'moment-es6';
|
||||
import * as moment from 'moment';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
|
@ -109,7 +109,7 @@ describe('content type', () => {
|
||||
});
|
||||
|
||||
it('[C593560] Should the user be able to select a new content type and save it only after the confirmation dialog', async () => {
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`);
|
||||
await viewerPage.checkFileIsLoaded(pdfFile.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
@ -134,7 +134,7 @@ describe('content type', () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`);
|
||||
await viewerPage.checkFileIsLoaded(pdfFile.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
@ -150,7 +150,7 @@ describe('content type', () => {
|
||||
});
|
||||
|
||||
it('[C593559] Should the user be able to select a new content type and not save it when press cancel in the confirmation dialog', async () => {
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`);
|
||||
await viewerPage.checkFileIsLoaded(docxFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
@ -173,7 +173,7 @@ describe('content type', () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`);
|
||||
await viewerPage.checkFileIsLoaded(docxFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
@ -30,7 +30,7 @@ import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Metadata component', () => {
|
||||
|
||||
@ -269,7 +269,7 @@ describe('Metadata component', () => {
|
||||
it('[C279960] Should show the last username modifier when modify a File', async () => {
|
||||
await loginPage.loginWithProfile('admin');
|
||||
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pngFileModel.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pngFileModel.id}/view)`);
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
@ -29,8 +29,6 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Datatable component', () => {
|
||||
|
||||
const dataTablePage = new DataTablePage('defaultTable');
|
||||
const copyContentDataTablePage = new DataTablePage('copyClipboardDataTable');
|
||||
const dragAndDropDataTablePage = new DataTablePage();
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new UserModel();
|
||||
@ -56,48 +54,6 @@ describe('Datatable component', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Datatable component - copyContent', () => {
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToCopyContentDatatable();
|
||||
await dataTablePage.dataTable.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C307040] A column value with copyContent set to true is copied when clicking on it', async () => {
|
||||
await dataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await dataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.clickOnIdColumn('2');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.pasteClipboard();
|
||||
await expect(await dataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
|
||||
it('[C307073] A column value with copyContent set to true is copied when clicking on it', async () => {
|
||||
await copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await copyContentDataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await copyContentDataTablePage.clickOnIdColumn('2');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await copyContentDataTablePage.pasteClipboard();
|
||||
await expect(await copyContentDataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
|
||||
it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', async () => {
|
||||
await dataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await dataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.pasteClipboard();
|
||||
await expect(await dataTablePage.getClipboardInputText()).toEqual('1');
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Datatable component - Drag and Drop', () => {
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToDragAndDropDatatable();
|
||||
|
@ -93,7 +93,7 @@ export class ContentServicesPage {
|
||||
notMarkedFavorite = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border'));
|
||||
multiSelectToggle = $('[data-automation-id="multiSelectToggle"]');
|
||||
selectAllCheckbox = $$('.adf-checkbox-sr-only').first();
|
||||
selectionModeDropdown = $('.mat-select[aria-label="Selection Mode"]');
|
||||
selectionModeDropdown = $('.mat-select[placeholder="Selection Mode"]');
|
||||
selectedNodesList = $$('.app-content-service-settings li');
|
||||
siteListDropdown = new DropdownPage($(`mat-select[data-automation-id='site-my-files-option']`));
|
||||
sortingDropdown = new DropdownPage($('mat-select[data-automation-id="grid-view-sorting"]'));
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { $$, $ } from 'protractor';
|
||||
import { BrowserVisibility, TogglePage, BrowserActions, DateTimePickerPage } from '@alfresco/adf-testing';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
export class ShareDialogPage {
|
||||
|
||||
|
@ -32,8 +32,8 @@ export class LoginShellPage {
|
||||
usernameError = $('span[data-automation-id="username-error"]');
|
||||
passwordError = $('span[data-automation-id="password-required"]');
|
||||
loginError = $('.adf-login-error-message');
|
||||
usernameInactive = $('input[id="username"][aria-invalid="false"]');
|
||||
passwordInactive = $('input[id="password"][aria-invalid="false"]');
|
||||
usernameInactive = $('input[id="username"][class*="ng-invalid"]');
|
||||
passwordInactive = $('input[id="password"][class*="ng-invalid"]');
|
||||
adfLogo = $('.adf-img-logo');
|
||||
|
||||
usernameHighlighted = $('input[id="username"][aria-invalid="true"]');
|
||||
@ -115,6 +115,7 @@ export class LoginShellPage {
|
||||
|
||||
async checkPasswordHighlighted(): Promise<void> {
|
||||
await BrowserActions.click(this.adfLogo);
|
||||
await browser.sleep(900000);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.passwordHighlighted);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ export class PeopleGroupCloudComponentPage {
|
||||
groupAppInput = $('input[data-automation-id="app-group-app-input"]');
|
||||
peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
||||
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
||||
preselectValidation = $$('mat-checkbox.app-preselect-value').first();
|
||||
preselectValidation = $$('mat-checkbox.app-preselect-value label').first();
|
||||
preselectValidationStatus = $$('mat-checkbox.app-preselect-value label input').first();
|
||||
|
||||
async navigateTo() {
|
||||
|
@ -35,7 +35,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessListPage } from '../../process-services/pages/process-list.page';
|
||||
import { EditProcessFilterConfiguration } from './../config/edit-process-filter.config';
|
||||
import { ProcessListCloudConfiguration } from './../config/process-list-cloud.config';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Process filters cloud', () => {
|
||||
|
||||
|
@ -21,7 +21,7 @@ import { ProcessCloudDemoPage } from './../pages/process-cloud-demo.page';
|
||||
import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
import { EditProcessFilterConfiguration } from './../config/edit-process-filter.config';
|
||||
|
||||
describe('Process Header cloud component', () => {
|
||||
|
@ -29,7 +29,7 @@ import { createApiService,
|
||||
import { browser } from 'protractor';
|
||||
import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
const isValueInvalid = (value: any): boolean => {
|
||||
return value === null || value === undefined;
|
||||
|
@ -25,7 +25,7 @@ import {
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page';
|
||||
import { TaskListCloudConfiguration } from './../config/task-list-cloud.config';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
import { taskFilterConfiguration } from './../config/task-filter.config';
|
||||
|
||||
describe('Edit task filters and task list properties', () => {
|
||||
|
@ -28,7 +28,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.page';
|
||||
import { ProcessListPage } from './../pages/process-list.page';
|
||||
import { ProcessDetailsPage } from './../pages/process-details.page';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
import { ProcessInstancesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Process Instance Details', () => {
|
||||
|
@ -28,7 +28,7 @@ import { browser } from 'protractor';
|
||||
import { TaskListDemoPage } from './../pages/task-list-demo.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TaskActionsApi, TaskRepresentation, TasksApi } from '@alfresco/js-api';
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Start Task - Custom App', () => {
|
||||
|
||||
|
@ -33,7 +33,7 @@ import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.pag
|
||||
import { ProcessFiltersPage } from './../pages/process-filters.page';
|
||||
import { infoDrawerConfiguration } from './../config/task.config';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Info Drawer', () => {
|
||||
|
||||
|
@ -31,7 +31,7 @@ import Task = require('../../models/APS/Task');
|
||||
import TaskModel = require('../../models/APS/TaskModel');
|
||||
import FormModel = require('../../models/APS/FormModel');
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import moment = require('moment');
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Task Details component', () => {
|
||||
|
||||
|
Binary file not shown.
@ -20,7 +20,8 @@ import { SearchFiltersPage } from './pages/search-filters.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
BrowserActions,
|
||||
DocumentListPage,
|
||||
LocalStorageUtil,
|
||||
@ -33,7 +34,7 @@ import { createApiService,
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { SearchConfiguration } from './search.config';
|
||||
import moment from 'moment-es6';
|
||||
import * as moment from 'moment';
|
||||
|
||||
describe('Search Filters', () => {
|
||||
|
||||
@ -104,6 +105,9 @@ describe('Search Filters', () => {
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
@ -118,6 +122,37 @@ describe('Search Filters', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C291980] Should group search facets under specified labels', async () => {
|
||||
const currentYear = moment().year();
|
||||
|
||||
jsonFile.facetQueries.queries[0] = {
|
||||
'query': `created:${currentYear}`,
|
||||
'label': 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR'
|
||||
};
|
||||
jsonFile.facetQueries.queries[1] = {
|
||||
'query': `content.mimetype:text/html`,
|
||||
'label': 'SEARCH.FACET_QUERIES.MIMETYPE',
|
||||
'group': 'Type facet queries'
|
||||
};
|
||||
jsonFile.facetQueries.queries[2] = {
|
||||
'query': `content.size:[0 TO 10240]`,
|
||||
'label': 'SEARCH.FACET_QUERIES.XTRASMALL',
|
||||
'group': 'Size facet queries'
|
||||
};
|
||||
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed();
|
||||
await searchFiltersPage.checkTypeFacetQueryGroupIsDisplayed();
|
||||
|
||||
await searchFiltersPage.checkSizeFacetQueryGroupIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286298] Should be able to cancel a filter using "x" button from the toolbar', async () => {
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
@ -176,25 +211,6 @@ describe('Search Filters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C291980] Should group search facets under specified labels', async () => {
|
||||
const currentYear = moment().year();
|
||||
|
||||
jsonFile.facetQueries.queries[0] = {'query': `created:${currentYear}`, 'label': 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR'};
|
||||
jsonFile.facetQueries.queries[1] = {'query': `content.mimetype:text/html`, 'label': 'SEARCH.FACET_QUERIES.MIMETYPE', 'group': 'Type facet queries'};
|
||||
jsonFile.facetQueries.queries[2] = {'query': `content.size:[0 TO 10240]`, 'label': 'SEARCH.FACET_QUERIES.XTRASMALL', 'group': 'Size facet queries'};
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed();
|
||||
await searchFiltersPage.checkTypeFacetQueryGroupIsDisplayed();
|
||||
|
||||
await searchFiltersPage.checkSizeFacetQueryGroupIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C297509] Should display search intervals under specified labels from config', async () => {
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter('*');
|
||||
|
@ -7,7 +7,7 @@ require('dotenv').config({path: process.env.ENV_FILE});
|
||||
|
||||
const HOST = process.env.URL_HOST_ADF;
|
||||
|
||||
const LOG = process.env.LOG;
|
||||
const LOG = process.env.E2E_LOG_LEVEL;
|
||||
|
||||
const HOST_ECM = process.env.PROXY_HOST_ECM || HOST || 'ecm';
|
||||
const HOST_BPM = process.env.PROXY_HOST_BPM || HOST || 'bpm';
|
||||
|
@ -22,7 +22,7 @@
|
||||
* @class util.Resources
|
||||
*/
|
||||
var path = require('path');
|
||||
const ACTIVITI_CLOUD_APPS = require('../../lib/dist/testing/src');
|
||||
const ACTIVITI_CLOUD_APPS = require('../../lib/dist/testing');
|
||||
|
||||
const RESOURCES = {
|
||||
...ACTIVITI_CLOUD_APPS,
|
||||
|
1924
lib/cli/package-lock.json
generated
1924
lib/cli/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-cli",
|
||||
"description": "Alfresco ADF cli and utils",
|
||||
"version": "4.11.0",
|
||||
"version": "5.0.0-angular.13",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"bin": {
|
||||
"adf-cli": "./bin/adf-cli",
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alfresco/js-api": "4.12.0-244",
|
||||
"commander": "^4.0.0",
|
||||
"commander": "6.2.1",
|
||||
"ejs": "^2.6.1",
|
||||
"license-checker": "^25.0.1",
|
||||
"npm-registry-fetch": "^4.0.5",
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
import { exec } from './exec';
|
||||
import { logger } from './logger';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
|
||||
function test(output: string) {
|
||||
const response = exec('test !', [`-d ${output} && mkdir ${output}`], {});
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
import { exec } from './exec';
|
||||
import { logger } from './logger';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
|
||||
function zipArtifact(artifact: string) {
|
||||
logger.info(`Perform zip artifact ${artifact}`);
|
||||
|
@ -21,7 +21,7 @@ import * as shell from 'shelljs';
|
||||
import * as ejs from 'ejs';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
|
||||
export default function main(_args: string[], workingDir: string) {
|
||||
program
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
import * as shell from 'shelljs';
|
||||
import * as path from 'path';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import * as fs from 'fs';
|
||||
import * as ejs from 'ejs';
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import { exec } from './exec';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import { logger } from './logger';
|
||||
import { resolve } from 'path';
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import request = require('request');
|
||||
import * as fs from 'fs';
|
||||
import { logger } from './logger';
|
||||
|
@ -17,8 +17,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as program from 'commander';
|
||||
import moment from 'moment-es6';
|
||||
import program from 'commander';
|
||||
import moment from 'moment';
|
||||
import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api';
|
||||
import { logger } from './logger';
|
||||
import * as kube from './kube-utils';
|
||||
|
@ -17,7 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import * as kube from './kube-utils';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import { exec } from './exec';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import { logger } from './logger';
|
||||
import * as kube from './kube-utils';
|
||||
|
||||
|
@ -22,7 +22,7 @@ import * as fs from 'fs';
|
||||
import * as checker from 'license-checker';
|
||||
import * as licenseList from 'spdx-license-list';
|
||||
import * as ejs from 'ejs';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
|
||||
interface PackageInfo {
|
||||
name: string;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import * as path from 'path';
|
||||
import fs = require('fs');
|
||||
import { exec } from './exec';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import { logger } from './logger';
|
||||
|
||||
export interface PublishArgs {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AlfrescoApi, PeopleApi, NodesApi, GroupsApi, SitesApi, SearchApi, AlfrescoApiConfig } from '@alfresco/js-api';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import { logger } from './logger';
|
||||
|
||||
interface PeopleTally { enabled: number; disabled: number }
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import { exec } from './exec';
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import { logger } from './logger';
|
||||
|
||||
export interface CommitArgs {
|
||||
|
@ -17,7 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as program from 'commander';
|
||||
import program from 'commander';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as shell from 'shelljs';
|
||||
|
@ -10,6 +10,7 @@
|
||||
"noImplicitThis": false,
|
||||
"noUnusedParameters": true,
|
||||
"noUnusedLocals": true,
|
||||
"esModuleInterop": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": ".",
|
||||
"skipLibCheck": true,
|
||||
|
@ -4,6 +4,6 @@
|
||||
"declarationMap": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": false
|
||||
"compilationMode": "partial"
|
||||
}
|
||||
}
|
||||
|
7
lib/config/app.config.json
Normal file
7
lib/config/app.config.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"description" : "this config file is used in the unit test",
|
||||
"ecmHost": "http://{hostname}:{port}/ecm",
|
||||
"bpmHost": "http://{hostname}:{port}/bpm",
|
||||
"baseShareUrl": null,
|
||||
"logLevel" : "silent"
|
||||
}
|
38
lib/config/webpack.style.js
Normal file
38
lib/config/webpack.style.js
Normal file
@ -0,0 +1,38 @@
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const path = require("path");
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
|
||||
mode: 'production',
|
||||
|
||||
optimization: {
|
||||
minimizer: [new CssMinimizerPlugin({})],
|
||||
},
|
||||
|
||||
entry: {
|
||||
'adf-blue-orange': './lib/core/styles/prebuilt/adf-blue-orange.scss',
|
||||
'adf-blue-purple': './lib/core/styles/prebuilt/adf-blue-purple.scss',
|
||||
'adf-cyan-orange': './lib/core/styles/prebuilt/adf-cyan-orange.scss',
|
||||
'adf-cyan-purple': './lib/core/styles/prebuilt/adf-cyan-purple.scss',
|
||||
'adf-green-purple': './lib/core/styles/prebuilt/adf-green-purple.scss',
|
||||
'adf-green-orange': './lib/core/styles/prebuilt/adf-green-orange.scss',
|
||||
'adf-pink-bluegrey': './lib/core/styles/prebuilt/adf-pink-bluegrey.scss',
|
||||
'adf-indigo-pink': './lib/core/styles/prebuilt/adf-indigo-pink.scss',
|
||||
'adf-purple-green': './lib/core/styles/prebuilt/adf-purple-green.scss'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist/core/prebuilt-themes/'),
|
||||
filename: '[name].js',
|
||||
publicPath: '/dist'
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.scss$/,
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"]
|
||||
}]
|
||||
},
|
||||
plugins: [new MiniCssExtractPlugin()]
|
||||
};
|
@ -15,7 +15,12 @@ module.exports = function (config) {
|
||||
},
|
||||
{pattern: 'node_modules/moment/min/moment.min.js', included: true, watched: false},
|
||||
{pattern: 'lib/content-services/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
|
||||
{pattern: 'lib/content-services/src/lib/assets/images/**/*.svg', included: false, served: true, watched: false},
|
||||
{
|
||||
pattern: 'lib/content-services/src/lib/assets/images/**/*.svg',
|
||||
included: false,
|
||||
served: true,
|
||||
watched: false
|
||||
},
|
||||
{pattern: 'lib/core/assets/images/ft_ic_folder.svg', included: false, served: true, watched: false},
|
||||
{pattern: 'lib/core/i18n/**/en.json', included: false, served: true, watched: false},
|
||||
{pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false},
|
||||
@ -39,12 +44,15 @@ module.exports = function (config) {
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
require('karma-mocha-reporter')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
clearContext: false,
|
||||
jasmine: {
|
||||
random: false
|
||||
}
|
||||
},
|
||||
|
||||
coverageIstanbulReporter: {
|
||||
|
@ -8,22 +8,6 @@
|
||||
],
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts",
|
||||
"flatModuleFile": "adf-content-services",
|
||||
"umdModuleIds": {
|
||||
"@alfresco/js-api": "@alfresco/js-api",
|
||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
||||
"@angular/material": "@angular/material",
|
||||
"@mat-datetimepicker/core": "@mat-datetimepicker/core",
|
||||
"@mat-datetimepicker/moment": "@mat-datetimepicker/moment",
|
||||
"@angular/flex-layout": "@angular/flex-layout",
|
||||
"@alfresco/adf-core": "@alfresco/adf-core",
|
||||
"@angular/animations": "@angular/animations",
|
||||
"@angular/cdk/platform": "@angular/cdk/platform",
|
||||
"@angular/material/core": "@angular/material/core",
|
||||
"moment": "moment",
|
||||
"moment-es6": "moment-es6",
|
||||
"moment/src/moment": "moment/src/moment",
|
||||
"@ngx-translate/core": "@ngx-translate/core"
|
||||
}
|
||||
"flatModuleFile": "adf-content-services"
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
{
|
||||
"name": "@alfresco/adf-content-services",
|
||||
"description": "Alfresco ADF content services",
|
||||
"version": "4.11.0",
|
||||
"version": "5.0.0-angular.13",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-content-services.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
|
||||
@ -12,18 +11,21 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/animations": ">=10.0.2",
|
||||
"@angular/cdk": ">=10.0.1",
|
||||
"@angular/common": ">10.0.2",
|
||||
"@angular/core": ">=10.0.2",
|
||||
"@angular/flex-layout": ">=10.0.0-beta.32",
|
||||
"@angular/forms": ">=10.0.2",
|
||||
"@angular/material": ">=10.0.1",
|
||||
"@angular/router": ">=10.0.2",
|
||||
"@angular/animations": ">=13.3.11",
|
||||
"@angular/cdk": ">=13.3.9",
|
||||
"@angular/common": ">=13.3.11",
|
||||
"@angular/compiler": ">=13.3.11",
|
||||
"@angular/core": ">=13.3.11",
|
||||
"@angular/flex-layout": ">=13.0.0-beta.38",
|
||||
"@angular/forms": ">=13.3.11",
|
||||
"@angular/material": ">=13.3.9",
|
||||
"@angular/platform-browser": ">=13.3.11",
|
||||
"@angular/platform-browser-dynamic": ">=13.3.11",
|
||||
"@angular/router": ">=13.3.11",
|
||||
"@alfresco/js-api": "4.12.0-244",
|
||||
"@alfresco/adf-core": "4.11.0",
|
||||
"@ngx-translate/core": ">=13.0.0",
|
||||
"moment": ">=2.22.2"
|
||||
"moment": ">=2.22.2",
|
||||
"@alfresco/adf-core": "5.0.0-angular.13"
|
||||
},
|
||||
"keywords": [
|
||||
"content-services",
|
||||
|
@ -22,10 +22,10 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface';
|
||||
import { NodesApiService } from 'core';
|
||||
import { AspectListService } from './aspect-list.service';
|
||||
import { AspectListService } from './services/aspect-list.service';
|
||||
import { delay } from 'rxjs/operators';
|
||||
import { AspectEntry, MinimalNode } from '@alfresco/js-api';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
|
||||
const aspectListMock: AspectEntry[] = [{
|
||||
entry: {
|
||||
|
@ -18,6 +18,7 @@
|
||||
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-aspect-list-dialog',
|
||||
templateUrl: './aspect-list-dialog.component.html',
|
||||
|
@ -20,7 +20,7 @@ import { NodesApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AspectListComponent } from './aspect-list.component';
|
||||
import { AspectListService } from './aspect-list.service';
|
||||
import { AspectListService } from './services/aspect-list.service';
|
||||
import { of } from 'rxjs';
|
||||
import { AspectEntry } from '@alfresco/js-api';
|
||||
import { delay } from 'rxjs/operators';
|
||||
|
@ -19,7 +19,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsul
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
import { Observable, Subject, zip } from 'rxjs';
|
||||
import { concatMap, map, takeUntil, tap } from 'rxjs/operators';
|
||||
import { AspectListService } from './aspect-list.service';
|
||||
import { AspectListService } from './services/aspect-list.service';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { AspectEntry } from '@alfresco/js-api';
|
||||
@Component({
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
export * from './aspect-list.component';
|
||||
export * from './aspect-list-dialog.component';
|
||||
export * from './aspect-list.service';
|
||||
export * from './node-aspect.service';
|
||||
export * from './services/aspect-list.service';
|
||||
export * from './services/node-aspect.service';
|
||||
export * from './services/dialog-aspect-list.service';
|
||||
|
||||
export * from './aspect-list-dialog-data.interface';
|
||||
|
||||
|
@ -16,11 +16,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf-core';
|
||||
import { from, Observable, of, Subject, zip } from 'rxjs';
|
||||
import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface';
|
||||
import { AspectListDialogComponent } from './aspect-list-dialog.component';
|
||||
import { from, Observable, of, zip } from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api';
|
||||
|
||||
@ -37,7 +34,6 @@ export class AspectListService {
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
private appConfigService: AppConfigService,
|
||||
private dialog: MatDialog,
|
||||
private logService: LogService) {
|
||||
}
|
||||
|
||||
@ -101,34 +97,4 @@ export class AspectListService {
|
||||
return visibleAspectList;
|
||||
}
|
||||
|
||||
openAspectListDialog(nodeId?: string): Observable<string[]> {
|
||||
const select = new Subject<string[]>();
|
||||
select.subscribe({
|
||||
complete: this.close.bind(this)
|
||||
});
|
||||
|
||||
const data: AspectListDialogComponentData = {
|
||||
title: 'ADF-ASPECT-LIST.DIALOG.TITLE',
|
||||
description: 'ADF-ASPECT-LIST.DIALOG.DESCRIPTION',
|
||||
overTableMessage: 'ADF-ASPECT-LIST.DIALOG.OVER-TABLE-MESSAGE',
|
||||
select,
|
||||
nodeId
|
||||
};
|
||||
|
||||
this.openDialog(data, 'adf-aspect-list-dialog', '750px');
|
||||
return select;
|
||||
}
|
||||
|
||||
private openDialog(data: AspectListDialogComponentData, panelClass: string, width: string) {
|
||||
this.dialog.open(AspectListDialogComponent, {
|
||||
data,
|
||||
panelClass,
|
||||
width,
|
||||
disableClose: true
|
||||
});
|
||||
}
|
||||
|
||||
close() {
|
||||
this.dialog.closeAll();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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 { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { AspectListDialogComponentData } from '../aspect-list-dialog-data.interface';
|
||||
import { AspectListDialogComponent } from '../aspect-list-dialog.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DialogAspectListService {
|
||||
|
||||
constructor(private dialog: MatDialog) {
|
||||
}
|
||||
|
||||
openAspectListDialog(nodeId?: string): Observable<string[]> {
|
||||
const select = new Subject<string[]>();
|
||||
select.subscribe({
|
||||
complete: this.close.bind(this)
|
||||
});
|
||||
|
||||
const data: AspectListDialogComponentData = {
|
||||
title: 'ADF-ASPECT-LIST.DIALOG.TITLE',
|
||||
description: 'ADF-ASPECT-LIST.DIALOG.DESCRIPTION',
|
||||
overTableMessage: 'ADF-ASPECT-LIST.DIALOG.OVER-TABLE-MESSAGE',
|
||||
select,
|
||||
nodeId
|
||||
};
|
||||
|
||||
this.openDialog(data, 'adf-aspect-list-dialog', '750px');
|
||||
return select;
|
||||
}
|
||||
|
||||
private openDialog(data: AspectListDialogComponentData, panelClass: string, width: string) {
|
||||
this.dialog.open(AspectListDialogComponent, {
|
||||
data,
|
||||
panelClass,
|
||||
width,
|
||||
disableClose: true
|
||||
});
|
||||
}
|
||||
|
||||
close() {
|
||||
this.dialog.closeAll();
|
||||
}
|
||||
}
|
@ -18,15 +18,15 @@
|
||||
import { MinimalNode } from '@alfresco/js-api';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AlfrescoApiService, CardViewUpdateService, NodesApiService, setupTestBed } from 'core';
|
||||
import { AlfrescoApiService, CardViewUpdateService, NodesApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { AspectListService } from './aspect-list.service';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { NodeAspectService } from './node-aspect.service';
|
||||
import { DialogAspectListService } from './dialog-aspect-list.service';
|
||||
|
||||
describe('NodeAspectService', () => {
|
||||
|
||||
let aspectListService: AspectListService;
|
||||
let dialogAspectListService: DialogAspectListService;
|
||||
let nodeAspectService: NodeAspectService;
|
||||
let nodeApiService: NodesApiService;
|
||||
let alfrescoApiService: AlfrescoApiService;
|
||||
@ -40,7 +40,7 @@ describe('NodeAspectService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
aspectListService = TestBed.inject(AspectListService);
|
||||
dialogAspectListService = TestBed.inject(DialogAspectListService);
|
||||
nodeAspectService = TestBed.inject(NodeAspectService);
|
||||
nodeApiService = TestBed.inject(NodesApiService);
|
||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
||||
@ -48,15 +48,15 @@ describe('NodeAspectService', () => {
|
||||
});
|
||||
|
||||
it('should open the aspect list dialog', () => {
|
||||
spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of([]));
|
||||
spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of([]));
|
||||
spyOn(nodeApiService, 'updateNode').and.returnValue(of(null));
|
||||
nodeAspectService.updateNodeAspects('fake-node-id');
|
||||
expect(aspectListService.openAspectListDialog).toHaveBeenCalledWith('fake-node-id');
|
||||
expect(dialogAspectListService.openAspectListDialog).toHaveBeenCalledWith('fake-node-id');
|
||||
});
|
||||
|
||||
it('should update the node when the aspect dialog apply the changes', () => {
|
||||
const expectedParameters = { aspectNames: ['a', 'b', 'c'] };
|
||||
spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(nodeApiService, 'updateNode').and.returnValue(of(null));
|
||||
nodeAspectService.updateNodeAspects('fake-node-id');
|
||||
expect(nodeApiService.updateNode).toHaveBeenCalledWith('fake-node-id', expectedParameters);
|
||||
@ -69,7 +69,7 @@ describe('NodeAspectService', () => {
|
||||
done();
|
||||
});
|
||||
const fakeNode = new MinimalNode({ id: 'fake-node-id', aspectNames: ['a', 'b', 'c'] });
|
||||
spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(nodeApiService, 'updateNode').and.returnValue(of(fakeNode));
|
||||
nodeAspectService.updateNodeAspects('fake-node-id');
|
||||
});
|
||||
@ -81,7 +81,7 @@ describe('NodeAspectService', () => {
|
||||
done();
|
||||
});
|
||||
const fakeNode = new MinimalNode({ id: 'fake-node-id', aspectNames: ['a', 'b', 'c'] });
|
||||
spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c']));
|
||||
spyOn(nodeApiService, 'updateNode').and.returnValue(of(fakeNode));
|
||||
nodeAspectService.updateNodeAspects('fake-node-id');
|
||||
});
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlfrescoApiService, CardViewUpdateService, NodesApiService } from '@alfresco/adf-core';
|
||||
import { AspectListService } from './aspect-list.service';
|
||||
import { DialogAspectListService } from './dialog-aspect-list.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -26,12 +26,12 @@ export class NodeAspectService {
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
private nodesApiService: NodesApiService,
|
||||
private aspectListService: AspectListService,
|
||||
private dialogAspectListService: DialogAspectListService,
|
||||
private cardViewUpdateService: CardViewUpdateService) {
|
||||
}
|
||||
|
||||
updateNodeAspects(nodeId: string) {
|
||||
this.aspectListService.openAspectListDialog(nodeId).subscribe((aspectList) => {
|
||||
this.dialogAspectListService.openAspectListDialog(nodeId).subscribe((aspectList) => {
|
||||
this.nodesApiService.updateNode(nodeId, { aspectNames: [...aspectList] }).subscribe((updatedNode) => {
|
||||
this.alfrescoApiService.nodeUpdated.next(updatedNode);
|
||||
this.cardViewUpdateService.updateNodeAspect(updatedNode);
|
@ -28,7 +28,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { MatSelect } from '@angular/material/select';
|
||||
import { Node, PathElementEntity } from '@alfresco/js-api';
|
||||
import { DocumentListComponent } from '../document-list';
|
||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
|
@ -24,7 +24,7 @@ import { setupTestBed, AllowableOperationsEnum } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NodeAspectService } from 'content-services/src/lib/aspect-list';
|
||||
import { NodeAspectService } from '../../../aspect-list/services/node-aspect.service';
|
||||
import { ContentMetadataService } from '../../services/content-metadata.service';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ContentService, AllowableOperationsEnum, VersionCompatibilityService } from '@alfresco/adf-core';
|
||||
import { NodeAspectService } from '../../../aspect-list/node-aspect.service';
|
||||
import { NodeAspectService } from '../../../aspect-list/services/node-aspect.service';
|
||||
import { PresetConfig } from '../../interfaces/content-metadata.interfaces';
|
||||
@Component({
|
||||
selector: 'adf-content-metadata-card',
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ContentTypePropertiesService } from './content-type-property.service';
|
||||
import { CardViewItem, CardViewSelectItemModel, CardViewTextItemModel, setupTestBed, VersionCompatibilityService } from 'core';
|
||||
import { CardViewItem, CardViewSelectItemModel, CardViewTextItemModel, setupTestBed, VersionCompatibilityService } from '@alfresco/adf-core';
|
||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ContentTypeService } from '../../content-type';
|
||||
|
@ -0,0 +1,787 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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 { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import {
|
||||
MinimalNode,
|
||||
Node,
|
||||
NodeEntry,
|
||||
NodePaging,
|
||||
RequestScope,
|
||||
ResultSetPaging,
|
||||
SiteEntry,
|
||||
SitePaging
|
||||
} from '@alfresco/js-api';
|
||||
import {
|
||||
|
||||
NodesApiService,
|
||||
setupTestBed,
|
||||
SitesService
|
||||
} from '@alfresco/adf-core';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
||||
import { NodeEntryEvent, ShareDataRow } from '../document-list';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchQueryBuilderService } from '../search';
|
||||
import { mockQueryBody } from '../mock/search-query.mock';
|
||||
|
||||
const fakeResultSetPaging: ResultSetPaging = {
|
||||
list: {
|
||||
pagination: {
|
||||
totalItems: 1
|
||||
},
|
||||
entries: [
|
||||
{
|
||||
entry: {
|
||||
id: '123',
|
||||
name: 'MyFolder',
|
||||
isFile: false,
|
||||
isFolder: true,
|
||||
nodeType: 'mock'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
describe('ContentNodeSelectorPanelComponent', () => {
|
||||
const debounceSearch = 200;
|
||||
let component: ContentNodeSelectorPanelComponent;
|
||||
let fixture: ComponentFixture<ContentNodeSelectorPanelComponent>;
|
||||
let nodeService: NodesApiService;
|
||||
let sitesService: SitesService;
|
||||
let searchSpy: jasmine.Spy;
|
||||
const fakeNodeEntry = new Node({ id: 'fakeId' });
|
||||
const nodeEntryEvent = new NodeEntryEvent(fakeNodeEntry);
|
||||
let searchQueryBuilderService: SearchQueryBuilderService;
|
||||
|
||||
const typeToSearchBox = (searchTerm = 'string-to-search') => {
|
||||
const searchInput = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-input"]'));
|
||||
searchInput.nativeElement.value = searchTerm;
|
||||
component.searchInput.setValue(searchTerm);
|
||||
fixture.detectChanges();
|
||||
};
|
||||
|
||||
const triggerSearchResults = (searchResults: ResultSetPaging) => {
|
||||
component.queryBuilderService.executed.next(searchResults);
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ContentTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
describe('General component features', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
fixture = TestBed.createComponent(ContentNodeSelectorPanelComponent);
|
||||
component = fixture.componentInstance;
|
||||
component.debounceSearch = 0;
|
||||
|
||||
nodeService = TestBed.inject(NodesApiService);
|
||||
sitesService = TestBed.inject(SitesService);
|
||||
|
||||
searchQueryBuilderService = component.queryBuilderService;
|
||||
component.queryBuilderService.resetToDefaults();
|
||||
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({
|
||||
id: 'fake-node',
|
||||
path: { elements: [{ nodeType: 'st:site', name: 'fake-site' }] }
|
||||
})));
|
||||
searchSpy = spyOn(searchQueryBuilderService, 'execute');
|
||||
const fakeSite = new SiteEntry({
|
||||
entry: {
|
||||
id: 'fake-site',
|
||||
guid: 'fake-site',
|
||||
title: 'fake-site',
|
||||
visibility: 'visible'
|
||||
}
|
||||
});
|
||||
spyOn(sitesService, 'getSite').and.returnValue(of(fakeSite));
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
fixture.destroy();
|
||||
component = null;
|
||||
});
|
||||
|
||||
describe('Search functionality', () => {
|
||||
let getCorrespondingNodeIdsSpy;
|
||||
let customResourcesService: CustomResourcesService;
|
||||
const entry: Node = { id: 'fakeid' } as Node;
|
||||
|
||||
beforeEach(() => {
|
||||
const documentListService = TestBed.inject(DocumentListService);
|
||||
const expectedDefaultFolderNode = new NodeEntry();
|
||||
component.isSelectionValid = (node: Node) => node.isFile;
|
||||
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(expectedDefaultFolderNode));
|
||||
spyOn(documentListService, 'getFolder').and.returnValue(of(new NodePaging({
|
||||
list: {
|
||||
pagination: {},
|
||||
entries: [],
|
||||
source: {}
|
||||
}
|
||||
})));
|
||||
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } })));
|
||||
|
||||
customResourcesService = TestBed.inject(CustomResourcesService);
|
||||
getCorrespondingNodeIdsSpy = spyOn(customResourcesService, 'getCorrespondingNodeIds').and
|
||||
.callFake((id) => {
|
||||
if (id === '-sites-') {
|
||||
return of(['123456testId', '09876543testId']);
|
||||
}
|
||||
return of([id]);
|
||||
});
|
||||
|
||||
component.currentFolderId = 'cat-girl-nuku-nuku';
|
||||
component.documentList.ngOnInit();
|
||||
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should the user query get updated when the user types in the search input', fakeAsync(() => {
|
||||
const updateSpy = spyOn(searchQueryBuilderService, 'update');
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(updateSpy).toHaveBeenCalled();
|
||||
expect(searchQueryBuilderService.userQuery).toEqual('(search-term*)');
|
||||
expect(component.searchTerm).toEqual('search-term');
|
||||
}));
|
||||
|
||||
it('should perform a search when the queryBody gets updated and it is defined', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
}));
|
||||
|
||||
it('should NOT perform a search and clear the results when the queryBody gets updated and it is NOT defined', async () => {
|
||||
spyOn(component, 'clearSearch');
|
||||
|
||||
searchQueryBuilderService.userQuery = '';
|
||||
searchQueryBuilderService.update();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(searchSpy).not.toHaveBeenCalled();
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reset the search term when clicking the clear icon', async () => {
|
||||
component.searchTerm = 'search-term';
|
||||
searchQueryBuilderService.userQuery = 'search-term';
|
||||
spyOn(component, 'clearSearch');
|
||||
|
||||
fixture.detectChanges();
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
clearIcon.nativeElement.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchQueryBuilderService.userQuery).toEqual('');
|
||||
expect(component.searchTerm).toEqual('');
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should load the results by calling the search api on search change', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
}));
|
||||
|
||||
it('should the query include the show files filterQuery', fakeAsync(() => {
|
||||
component.showFilesInResult = true;
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries.push({
|
||||
query: `TYPE:'cm:folder' OR TYPE:'cm:content'`
|
||||
});
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should reset the currently chosen node in case of starting a new search', fakeAsync(() => {
|
||||
component.chosenNode = [entry];
|
||||
typeToSearchBox('kakarot');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.chosenNode).toBeNull();
|
||||
}));
|
||||
|
||||
it('should update the breadcrumb when changing to a custom site', async () => {
|
||||
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
|
||||
|
||||
component.siteChanged({ entry: { guid: '-mysites-', title: 'My Sites' } } as SiteEntry);
|
||||
|
||||
expect(component.breadcrumbFolderTitle).toBe('My Sites');
|
||||
});
|
||||
|
||||
it('should perform a search when selecting a site with the correct query', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1, 'Search count should be one after only one search');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries = [{ query: `ANCESTOR:'workspace://SpacesStore/namek'` }];
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(2, 'Search count should be two after the site change');
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should create the query with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBodyWithSiteChange = mockQueryBody;
|
||||
expectedQueryBodyWithSiteChange.filterQueries = [
|
||||
{ query: `ANCESTOR:'workspace://SpacesStore/-sites-' OR ANCESTOR:'workspace://SpacesStore/123456testId' OR ANCESTOR:'workspace://SpacesStore/09876543testId'` }
|
||||
];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalled();
|
||||
expect(searchSpy.calls.count()).toBe(2);
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange);
|
||||
}));
|
||||
|
||||
it('should get the corresponding node ids on search when a known alias is selected from dropdown', fakeAsync(() => {
|
||||
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1, 'getCorrespondingNodeIdsSpy calls count should be one after the site changes to known alias \'-sites\-');
|
||||
expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-');
|
||||
}));
|
||||
|
||||
it('should get the corresponding node ids on search when a known alias is selected from CUSTOM dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-');
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NOTHING is selected from dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy calls count should be 0 when no site is selected');
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NO known alias is selected from dropdown', fakeAsync(() => {
|
||||
typeToSearchBox('vegeta');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NO known alias is selected from CUSTOM dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should show the search icon by default without the X (clear) icon', fakeAsync(() => {
|
||||
fixture.detectChanges();
|
||||
tick(debounceSearch);
|
||||
|
||||
const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]'));
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
|
||||
expect(searchIcon).not.toBeNull('Search icon should be in the DOM');
|
||||
expect(clearIcon).toBeNull('Clear icon should NOT be in the DOM');
|
||||
}));
|
||||
|
||||
it('should show the X (clear) icon without the search icon when the search contains at least one character', fakeAsync(() => {
|
||||
fixture.detectChanges();
|
||||
typeToSearchBox('123');
|
||||
tick(debounceSearch);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]'));
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
|
||||
expect(searchIcon).toBeNull('Search icon should NOT be in the DOM');
|
||||
expect(clearIcon).not.toBeNull('Clear icon should be in the DOM');
|
||||
}));
|
||||
|
||||
it('should clear the search field, nodes and chosenNode when clicking on the X (clear) icon', async () => {
|
||||
component.chosenNode = [entry];
|
||||
|
||||
component.nodePaging = {
|
||||
list: {
|
||||
entries: [{ entry }]
|
||||
}
|
||||
};
|
||||
component.searchTerm = 'piccolo';
|
||||
component.showingSearchResults = true;
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.searchTerm).toBe('');
|
||||
expect(component.nodePaging).toEqual(null);
|
||||
expect(component.chosenNode).toBeNull();
|
||||
expect(component.showingSearchResults).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should the query restrict the search to the currentFolderId in case is defined', fakeAsync(() => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.ngOnInit();
|
||||
typeToSearchBox('search-term');
|
||||
tick(debounceSearch);
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries = [{ query: `ANCESTOR:'workspace://SpacesStore/my-root-id'` }];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should emit showingSearch event with true while searching', async () => {
|
||||
searchQueryBuilderService.userQuery = 'mock-search-term';
|
||||
searchQueryBuilderService.update();
|
||||
spyOn(customResourcesService, 'hasCorrespondingNodeIds').and.returnValue(true);
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
|
||||
component.queryBuilderService.execute({ query: { query: 'search' } });
|
||||
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.showingSearchResults).toBe(true);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
it('should emit showingSearch event with false if you remove search term without clicking on X (icon) icon', fakeAsync(() => {
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
typeToSearchBox('');
|
||||
tick(debounceSearch);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.showingSearchResults).toBe(false);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(false);
|
||||
}));
|
||||
|
||||
it('should emit showingResults event with false when clicking on the X (clear) icon', async () => {
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
component.chosenNode = [entry];
|
||||
|
||||
component.nodePaging = {
|
||||
list: {
|
||||
entries: [{ entry }]
|
||||
}
|
||||
};
|
||||
component.searchTerm = 'piccolo';
|
||||
component.showingSearchResults = true;
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.showingSearchResults).toBe(false);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
it('should emit showingResults event with false if search api fails', async () => {
|
||||
searchQueryBuilderService.userQuery = 'mock-search-term';
|
||||
searchQueryBuilderService.update();
|
||||
getCorrespondingNodeIdsSpy.and.throwError('Failed');
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
component.queryBuilderService.execute({ query: { query: 'search' } });
|
||||
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.showingSearchResults).toBe(true);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
it('should the query restrict the search to the site and not to the currentFolderId in case is changed', async () => {
|
||||
component.queryBuilderService.userQuery = 'search-term*';
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.siteChanged({ entry: { guid: 'my-site-id' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBodyWithSiteChange = mockQueryBody;
|
||||
expectedQueryBodyWithSiteChange.filterQueries = [
|
||||
{ query: `ANCESTOR:'workspace://SpacesStore/my-site-id'` }
|
||||
];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange);
|
||||
});
|
||||
|
||||
it('should restrict the breadcrumb to the currentFolderId in case restrictedRoot is true', async () => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.ngOnInit();
|
||||
expect(component.breadcrumbRootId).toEqual('my-root-id');
|
||||
});
|
||||
|
||||
it('should NOT restrict the breadcrumb to the currentFolderId in case restrictedRoot is false', async () => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = false;
|
||||
component.ngOnInit();
|
||||
expect(component.breadcrumbRootId).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should clear the search field, nodes and chosenNode when deleting the search input', fakeAsync(() => {
|
||||
spyOn(component, 'clearSearch').and.callThrough();
|
||||
typeToSearchBox('a');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
typeToSearchBox('');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1, 'no other search has been performed');
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed');
|
||||
}));
|
||||
|
||||
it('should folderIdToShow equal the folder node id when navigation changes', async () => {
|
||||
component.folderIdToShow = null;
|
||||
const folderChangeEvent: NodeEntryEvent = new NodeEntryEvent(fakeNodeEntry);
|
||||
component.onFolderChange(folderChangeEvent);
|
||||
|
||||
expect(component.folderIdToShow).toEqual(fakeNodeEntry.id);
|
||||
});
|
||||
|
||||
it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => {
|
||||
spyOn(component, 'clearSearch').and.callThrough();
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
component.onFolderChange(nodeEntryEvent);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should show nodes from the same folder as selected in the dropdown on clearing the search input', fakeAsync(() => {
|
||||
typeToSearchBox('piccolo');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(2);
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.searchTerm).toBe('');
|
||||
expect(component.folderIdToShow).toBe('namek');
|
||||
}));
|
||||
|
||||
it('should show the current folder\'s content instead of search results if search was not performed', async () => {
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
});
|
||||
|
||||
it('should pass through the rowFilter to the documentList', async () => {
|
||||
const filter = (shareDataRow: ShareDataRow) =>
|
||||
shareDataRow.node.entry.name === 'impossible-name';
|
||||
|
||||
component.rowFilter = filter;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.rowFilter({
|
||||
node: {
|
||||
entry: new Node({
|
||||
name: 'impossible-name',
|
||||
id: 'name'
|
||||
})
|
||||
}
|
||||
}))
|
||||
.toBe(filter({
|
||||
node: {
|
||||
entry: new Node({
|
||||
name: 'impossible-name',
|
||||
id: 'name'
|
||||
})
|
||||
}
|
||||
} as ShareDataRow));
|
||||
});
|
||||
|
||||
it('should pass through the excludeSiteContent to the rowFilter of the documentList', async () => {
|
||||
component.excludeSiteContent = ['blog'];
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.rowFilter).toBeTruthy('Document list should have had a rowFilter');
|
||||
|
||||
const testSiteContent = new Node({ id: 'blog-id', properties: { 'st:componentId': 'blog' } });
|
||||
expect(documentList.componentInstance.rowFilter({ node: { entry: testSiteContent } }, null, null))
|
||||
.toBe(false);
|
||||
});
|
||||
|
||||
it('should pass through the imageResolver to the documentList', async () => {
|
||||
const resolver = () => 'piccolo';
|
||||
component.imageResolver = resolver;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.imageResolver).toBe(resolver);
|
||||
});
|
||||
|
||||
it('should show the result list when search was performed', (done) => {
|
||||
typeToSearchBox();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
|
||||
fixture.detectChanges();
|
||||
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(component.hasValidQuery).toEqual(true);
|
||||
expect(documentList.componentInstance.currentFolderId).toBeNull();
|
||||
done();
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should not show the result list when results are returned but there is no search term typed', (done) => {
|
||||
searchQueryBuilderService.userQuery = '';
|
||||
searchQueryBuilderService.update();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.hasValidQuery).toEqual(false);
|
||||
expect(component.showingSearchResults).toEqual(false);
|
||||
done();
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should highlight the results when search was performed in the next timeframe', (done) => {
|
||||
typeToSearchBox('My');
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-highlight').innerHTML).toBe('My');
|
||||
|
||||
done();
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should show the default text instead of result list if search was cleared', (done) => {
|
||||
typeToSearchBox();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
expect(clearButton).not.toBeNull('Clear button should be in DOM');
|
||||
clearButton.triggerEventHandler('click', {});
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
done();
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should reload the original folderId when clearing the search input', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.folderIdToShow).toBe(null);
|
||||
|
||||
typeToSearchBox('');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku');
|
||||
}));
|
||||
|
||||
it('should set the folderIdToShow to the default "currentFolderId" if siteId is undefined', (done) => {
|
||||
component.siteChanged({ entry: { guid: 'Kame-Sennin Muten Roshi' } } as SiteEntry);
|
||||
fixture.detectChanges();
|
||||
|
||||
let documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('Kame-Sennin Muten Roshi');
|
||||
|
||||
component.siteChanged({ entry: { guid: undefined } } as SiteEntry);
|
||||
fixture.detectChanges();
|
||||
|
||||
documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Pagination "Load more" button', () => {
|
||||
|
||||
it('should NOT be shown by default', () => {
|
||||
fixture.detectChanges();
|
||||
const pagination = fixture.debugElement.query(By.css('[data-automation-id="adf-infinite-pagination-button"]'));
|
||||
expect(pagination).toBeNull();
|
||||
});
|
||||
|
||||
it('button callback should load the next batch of folder results when there is no searchTerm', () => {
|
||||
component.searchTerm = '';
|
||||
fixture.detectChanges();
|
||||
|
||||
component.getNextPageOfSearch({
|
||||
hasMoreItems: false,
|
||||
skipCount: 10,
|
||||
maxItems: 45,
|
||||
totalItems: 0
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
expect(component.searchTerm).toBe('');
|
||||
|
||||
expect(component.infiniteScroll).toBeTruthy();
|
||||
expect(component.queryBuilderService.paging.maxItems).toBe(45);
|
||||
expect(searchSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should set its loading state to true to perform a new search', async () => {
|
||||
component.prepareDialogForNewSearch(mockQueryBody);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const spinnerSelector = By.css('[data-automation-id="content-node-selector-search-pagination"] [data-automation-id="adf-infinite-pagination-spinner"]');
|
||||
const paginationLoading = fixture.debugElement.query(spinnerSelector);
|
||||
|
||||
expect(paginationLoading).not.toBeNull();
|
||||
});
|
||||
|
||||
it('Should infinite pagination target be null when we use it for search ', fakeAsync(() => {
|
||||
component.showingSearchResults = true;
|
||||
typeToSearchBox('shenron');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.target).toBeNull();
|
||||
}));
|
||||
|
||||
it('Should infinite pagination target be present when search finish', () => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.target).not.toBeNull();
|
||||
});
|
||||
|
||||
it('Should infinite pagination target on init be the document list', fakeAsync(() => {
|
||||
component.showingSearchResults = true;
|
||||
|
||||
expect(component.target).toEqual(component.documentList);
|
||||
}));
|
||||
|
||||
it('Should set the scope to nodes when the component inits', () => {
|
||||
const expectedScope: RequestScope = { locations: 'nodes' };
|
||||
const setScopeSpy = spyOn(component.queryBuilderService, 'setScope');
|
||||
component.ngOnInit();
|
||||
|
||||
expect(setScopeSpy).toHaveBeenCalledWith(expectedScope);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
@ -18,20 +18,39 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MinimalNode, Node, NodeEntry, NodePaging, RequestScope, ResultSetPaging, SiteEntry, SitePaging, UserInfo } from '@alfresco/js-api';
|
||||
import { AppConfigService, FileModel, FileUploadStatus, NodesApiService, setupTestBed, SitesService, UploadService, FileUploadCompleteEvent, DataRow, ThumbnailService, ContentService, DataColumn } from '@alfresco/adf-core';
|
||||
import {
|
||||
MinimalNode,
|
||||
Node,
|
||||
NodeEntry,
|
||||
NodePaging,
|
||||
ResultSetPaging,
|
||||
SiteEntry,
|
||||
SitePaging,
|
||||
UserInfo
|
||||
} from '@alfresco/js-api';
|
||||
import {
|
||||
AppConfigService,
|
||||
FileModel,
|
||||
FileUploadStatus,
|
||||
NodesApiService,
|
||||
setupTestBed,
|
||||
SitesService,
|
||||
UploadService,
|
||||
FileUploadCompleteEvent,
|
||||
DataRow,
|
||||
ThumbnailService,
|
||||
ContentService,
|
||||
DataColumn
|
||||
} from '@alfresco/adf-core';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { DropdownBreadcrumbComponent } from '../breadcrumb';
|
||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||
import { DropdownSitesComponent } from '../site-dropdown/sites-dropdown.component';
|
||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
||||
import { NodeEntryEvent, ShareDataRow, ShareDataTableAdapter } from '../document-list';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchQueryBuilderService } from '../search';
|
||||
import { mockQueryBody } from '../mock/search-query.mock';
|
||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||
import { mockContentModelTextProperty } from '../mock/content-model.mock';
|
||||
|
||||
@ -55,12 +74,10 @@ const fakeResultSetPaging: ResultSetPaging = {
|
||||
};
|
||||
|
||||
describe('ContentNodeSelectorPanelComponent', () => {
|
||||
const debounceSearch = 200;
|
||||
let component: ContentNodeSelectorPanelComponent;
|
||||
let fixture: ComponentFixture<ContentNodeSelectorPanelComponent>;
|
||||
let nodeService: NodesApiService;
|
||||
let sitesService: SitesService;
|
||||
let searchSpy: jasmine.Spy;
|
||||
const fakeNodeEntry = new Node({ id: 'fakeId' });
|
||||
const nodeEntryEvent = new NodeEntryEvent(fakeNodeEntry);
|
||||
let searchQueryBuilderService: SearchQueryBuilderService;
|
||||
@ -69,13 +86,6 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
let thumbnailService: ThumbnailService;
|
||||
let contentService: ContentService;
|
||||
|
||||
const typeToSearchBox = (searchTerm = 'string-to-search') => {
|
||||
const searchInput = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-input"]'));
|
||||
searchInput.nativeElement.value = searchTerm;
|
||||
component.searchInput.setValue(searchTerm);
|
||||
fixture.detectChanges();
|
||||
};
|
||||
|
||||
const triggerSearchResults = (searchResults: ResultSetPaging) => {
|
||||
component.queryBuilderService.executed.next(searchResults);
|
||||
};
|
||||
@ -105,9 +115,18 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
searchQueryBuilderService = component.queryBuilderService;
|
||||
component.queryBuilderService.resetToDefaults();
|
||||
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({ id: 'fake-node', path: { elements: [{ nodeType: 'st:site', name: 'fake-site'}] } })));
|
||||
searchSpy = spyOn(searchQueryBuilderService, 'execute');
|
||||
const fakeSite = new SiteEntry({ entry: { id: 'fake-site', guid: 'fake-site', title: 'fake-site', visibility: 'visible' } });
|
||||
spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({
|
||||
id: 'fake-node',
|
||||
path: { elements: [{ nodeType: 'st:site', name: 'fake-site' }] }
|
||||
})));
|
||||
const fakeSite = new SiteEntry({
|
||||
entry: {
|
||||
id: 'fake-site',
|
||||
guid: 'fake-site',
|
||||
title: 'fake-site',
|
||||
visibility: 'visible'
|
||||
}
|
||||
});
|
||||
spyOn(sitesService, 'getSite').and.returnValue(of(fakeSite));
|
||||
});
|
||||
|
||||
@ -115,6 +134,40 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
describe('Site selection', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } })));
|
||||
component.currentFolderId = 'fake-starting-folder';
|
||||
});
|
||||
|
||||
it('should trigger siteChange event on init with parent site Title of start folder', (done) => {
|
||||
component.siteChange.subscribe((siteTitle: string) => {
|
||||
expect(siteTitle).toBe('fake-site');
|
||||
done();
|
||||
});
|
||||
|
||||
component.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
expect(component.startSiteGuid).toBe('fake-site');
|
||||
});
|
||||
|
||||
it('should trigger siteChange event when a site is selected in sites-dropdown', (done) => {
|
||||
const fakeSiteEntry = new SiteEntry({ entry: { title: 'fake-new-site', guid: 'fake-new-site' } });
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
component.siteChange.subscribe((siteTitle: string) => {
|
||||
expect(siteTitle).toBe('fake-new-site');
|
||||
done();
|
||||
});
|
||||
|
||||
const sitesDropdown = fixture.debugElement.query(By.directive(DropdownSitesComponent));
|
||||
sitesDropdown.componentInstance.selectedSite({ value: fakeSiteEntry });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Parameters', () => {
|
||||
|
||||
let documentListService: DocumentListService;
|
||||
@ -122,7 +175,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
beforeEach(() => {
|
||||
documentListService = TestBed.inject(DocumentListService);
|
||||
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of({ entry: { path: { elements: [] } } }));
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(new NodeEntry()));
|
||||
spyOn(documentListService, 'getFolder').and.returnValue(throwError('No results for test'));
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({
|
||||
list: {
|
||||
@ -142,7 +195,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
});
|
||||
|
||||
it('should trigger the select event when selection has been made', (done) => {
|
||||
const expectedNode = { id: 'fakeid'} as Node;
|
||||
const expectedNode = { id: 'fakeid' } as Node;
|
||||
component.select.subscribe((nodes) => {
|
||||
expect(nodes.length).toBe(1);
|
||||
expect(nodes[0]).toBe(expectedNode);
|
||||
@ -196,27 +249,27 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
it('should render search input by default', () => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-content-node-selector-content-input'))
|
||||
.not.toBe(null);
|
||||
.not.toBe(null);
|
||||
});
|
||||
|
||||
it('should not render search input if `showSearch` is false', () => {
|
||||
component.showSearch = false;
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-content-node-selector-content-input'))
|
||||
.toBe(null);
|
||||
.toBe(null);
|
||||
});
|
||||
|
||||
it('should render sites list dropdown by default', () => {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('adf-sites-dropdown'))
|
||||
.not.toBe(null);
|
||||
.not.toBe(null);
|
||||
});
|
||||
|
||||
it('should not render sites list dropdown if `showDropdownSiteList` is false', () => {
|
||||
component.showDropdownSiteList = false;
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('adf-sites-dropdown'))
|
||||
.toBe(null);
|
||||
.toBe(null);
|
||||
});
|
||||
});
|
||||
|
||||
@ -227,7 +280,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
beforeEach(() => {
|
||||
documentListService = TestBed.inject(DocumentListService);
|
||||
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of({ entry: { path: { elements: [] } } }));
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(new NodeEntry()));
|
||||
spyOn(documentListService, 'getFolder').and.returnValue(throwError('No results for test'));
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } })));
|
||||
|
||||
@ -275,7 +328,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
|
||||
const chosenNode = new Node({ path: { elements: ['one'] } });
|
||||
component.onCurrentSelection([ { entry: chosenNode } ]);
|
||||
component.onCurrentSelection([{ entry: chosenNode }]);
|
||||
fixture.detectChanges();
|
||||
|
||||
const breadcrumb = fixture.debugElement.query(By.directive(DropdownBreadcrumbComponent));
|
||||
@ -306,7 +359,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const chosenNode = { path: { elements: [] } } as Node;
|
||||
component.onCurrentSelection([ { entry: chosenNode } ]);
|
||||
component.onCurrentSelection([{ entry: chosenNode }]);
|
||||
fixture.detectChanges();
|
||||
|
||||
const breadcrumb = fixture.debugElement.query(By.directive(DropdownBreadcrumbComponent));
|
||||
@ -348,692 +401,9 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Site selection', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } })));
|
||||
component.currentFolderId = 'fake-starting-folder';
|
||||
});
|
||||
|
||||
it('should trigger siteChange event on init with parent site Title of start folder', (done) => {
|
||||
component.siteChange.subscribe((siteTitle: string) => {
|
||||
expect(siteTitle).toBe('fake-site');
|
||||
done();
|
||||
});
|
||||
|
||||
component.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
expect(component.startSiteGuid).toBe('fake-site');
|
||||
});
|
||||
|
||||
it('should trigger siteChange event when a site is selected in sites-dropdown', (done) => {
|
||||
const fakeSiteEntry = new SiteEntry({ entry: { title: 'fake-new-site', guid: 'fake-new-site' } });
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
component.siteChange.subscribe((siteTitle: string) => {
|
||||
expect(siteTitle).toBe('fake-new-site');
|
||||
done();
|
||||
});
|
||||
|
||||
const sitesDropdown = fixture.debugElement.query(By.directive(DropdownSitesComponent));
|
||||
sitesDropdown.componentInstance.selectedSite({value: fakeSiteEntry});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Search functionality', () => {
|
||||
let getCorrespondingNodeIdsSpy;
|
||||
let customResourcesService: CustomResourcesService;
|
||||
const entry: Node = { id: 'fakeid'} as Node;
|
||||
|
||||
beforeEach(() => {
|
||||
const documentListService = TestBed.inject(DocumentListService);
|
||||
const expectedDefaultFolderNode = { entry: { path: { elements: [] } } };
|
||||
component.isSelectionValid = (node: Node) => node.isFile;
|
||||
|
||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(expectedDefaultFolderNode));
|
||||
spyOn(documentListService, 'getFolder').and.returnValue(of(new NodePaging({
|
||||
list: {
|
||||
pagination: {},
|
||||
entries: [],
|
||||
source: {}
|
||||
}
|
||||
})));
|
||||
|
||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } })));
|
||||
|
||||
customResourcesService = TestBed.inject(CustomResourcesService);
|
||||
getCorrespondingNodeIdsSpy = spyOn(customResourcesService, 'getCorrespondingNodeIds').and
|
||||
.callFake((id) => {
|
||||
if (id === '-sites-') {
|
||||
return of(['123456testId', '09876543testId']);
|
||||
}
|
||||
return of([id]);
|
||||
});
|
||||
|
||||
component.currentFolderId = 'cat-girl-nuku-nuku';
|
||||
component.documentList.ngOnInit();
|
||||
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should the user query get updated when the user types in the search input', fakeAsync(() => {
|
||||
const updateSpy = spyOn(searchQueryBuilderService, 'update');
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(updateSpy).toHaveBeenCalled();
|
||||
expect(searchQueryBuilderService.userQuery).toEqual('(search-term*)');
|
||||
expect(component.searchTerm).toEqual('search-term');
|
||||
}));
|
||||
|
||||
it('should perform a search when the queryBody gets updated and it is defined', async () => {
|
||||
searchQueryBuilderService.userQuery = 'search-term*';
|
||||
searchQueryBuilderService.update();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
});
|
||||
|
||||
it('should NOT perform a search and clear the results when the queryBody gets updated and it is NOT defined', async () => {
|
||||
spyOn(component, 'clearSearch');
|
||||
|
||||
searchQueryBuilderService.userQuery = '';
|
||||
searchQueryBuilderService.update();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(searchSpy).not.toHaveBeenCalled();
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reset the search term when clicking the clear icon', () => {
|
||||
component.searchTerm = 'search-term';
|
||||
searchQueryBuilderService.userQuery = 'search-term';
|
||||
spyOn(component, 'clearSearch');
|
||||
|
||||
fixture.detectChanges();
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
clearIcon.nativeElement.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchQueryBuilderService.userQuery).toEqual('');
|
||||
expect(component.searchTerm).toEqual('');
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should load the results by calling the search api on search change', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
}));
|
||||
|
||||
it('should the query include the show files filterQuery', fakeAsync(() => {
|
||||
component.showFilesInResult = true;
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries.push({
|
||||
query: `TYPE:'cm:folder' OR TYPE:'cm:content'`
|
||||
});
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should reset the currently chosen node in case of starting a new search', fakeAsync(() => {
|
||||
component.chosenNode = [entry];
|
||||
typeToSearchBox('kakarot');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.chosenNode).toBeNull();
|
||||
}));
|
||||
|
||||
it('should update the breadcrumb when changing to a custom site', async () => {
|
||||
component.siteChanged({ entry: { guid: '-mysites-', title: 'My Sites' } } as SiteEntry);
|
||||
|
||||
expect(component.breadcrumbFolderTitle).toBe('My Sites');
|
||||
});
|
||||
|
||||
it('should perform a search when selecting a site with the correct query', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1, 'Search count should be one after only one search');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries = [ { query: `ANCESTOR:'workspace://SpacesStore/namek'`} ];
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(2, 'Search count should be two after the site change');
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should create the query with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('search-term');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBodyWithSiteChange = mockQueryBody;
|
||||
expectedQueryBodyWithSiteChange.filterQueries = [
|
||||
{ query: `ANCESTOR:'workspace://SpacesStore/-sites-' OR ANCESTOR:'workspace://SpacesStore/123456testId' OR ANCESTOR:'workspace://SpacesStore/09876543testId'` }
|
||||
];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalled();
|
||||
expect(searchSpy.calls.count()).toBe(2);
|
||||
expect(searchSpy).toHaveBeenCalledWith(mockQueryBody);
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange);
|
||||
}));
|
||||
|
||||
it('should get the corresponding node ids on search when a known alias is selected from dropdown', fakeAsync(() => {
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1, 'getCorrespondingNodeIdsSpy calls count should be one after the site changes to known alias \'-sites\-');
|
||||
expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-');
|
||||
}));
|
||||
|
||||
it('should get the corresponding node ids on search when a known alias is selected from CUSTOM dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1);
|
||||
expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-');
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NOTHING is selected from dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy calls count should be 0 when no site is selected');
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NO known alias is selected from dropdown', fakeAsync(() => {
|
||||
typeToSearchBox('vegeta');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should NOT get the corresponding node ids on search when NO known alias is selected from CUSTOM dropdown', fakeAsync(() => {
|
||||
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
|
||||
fixture.detectChanges();
|
||||
|
||||
typeToSearchBox('vegeta');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called');
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('should show the search icon by default without the X (clear) icon', fakeAsync(() => {
|
||||
fixture.detectChanges();
|
||||
tick(debounceSearch);
|
||||
|
||||
const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]'));
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
|
||||
expect(searchIcon).not.toBeNull('Search icon should be in the DOM');
|
||||
expect(clearIcon).toBeNull('Clear icon should NOT be in the DOM');
|
||||
}));
|
||||
|
||||
it('should show the X (clear) icon without the search icon when the search contains at least one character', fakeAsync(() => {
|
||||
fixture.detectChanges();
|
||||
typeToSearchBox('123');
|
||||
tick(debounceSearch);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]'));
|
||||
const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
|
||||
expect(searchIcon).toBeNull('Search icon should NOT be in the DOM');
|
||||
expect(clearIcon).not.toBeNull('Clear icon should be in the DOM');
|
||||
}));
|
||||
|
||||
it('should clear the search field, nodes and chosenNode when clicking on the X (clear) icon', () => {
|
||||
component.chosenNode = [entry];
|
||||
|
||||
component.nodePaging = {
|
||||
list: {
|
||||
entries: [{ entry }]
|
||||
}
|
||||
};
|
||||
component.searchTerm = 'piccolo';
|
||||
component.showingSearchResults = true;
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.searchTerm).toBe('');
|
||||
expect(component.nodePaging).toEqual(null);
|
||||
expect(component.chosenNode).toBeNull();
|
||||
expect(component.showingSearchResults).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should the query restrict the search to the currentFolderId in case is defined', fakeAsync(() => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.ngOnInit();
|
||||
typeToSearchBox('search-term');
|
||||
tick(debounceSearch);
|
||||
|
||||
const expectedQueryBody = mockQueryBody;
|
||||
expectedQueryBody.filterQueries = [ { query: `ANCESTOR:'workspace://SpacesStore/my-root-id'`} ];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody);
|
||||
}));
|
||||
|
||||
it('should emit showingSearch event with true while searching', async () => {
|
||||
searchQueryBuilderService.userQuery = 'mock-search-term';
|
||||
searchQueryBuilderService.update();
|
||||
spyOn(customResourcesService, 'hasCorrespondingNodeIds').and.returnValue(true);
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
|
||||
component.queryBuilderService.execute({ query: { query: 'search' } });
|
||||
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.showingSearchResults).toBe(true);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
it('should emit showingSearch event with false if you remove search term without clicking on X (icon) icon', fakeAsync(() => {
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
typeToSearchBox('');
|
||||
tick(debounceSearch);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.showingSearchResults).toBe(false);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(false);
|
||||
}));
|
||||
|
||||
it('should emit showingResults event with false when clicking on the X (clear) icon', () => {
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
component.chosenNode = [entry];
|
||||
|
||||
component.nodePaging = {
|
||||
list: {
|
||||
entries: [{ entry }]
|
||||
}
|
||||
};
|
||||
component.searchTerm = 'piccolo';
|
||||
component.showingSearchResults = true;
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.showingSearchResults).toBe(false);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
it('should emit showingResults event with false if search api fails', async () => {
|
||||
searchQueryBuilderService.userQuery = 'mock-search-term';
|
||||
searchQueryBuilderService.update();
|
||||
getCorrespondingNodeIdsSpy.and.throwError('Failed');
|
||||
const showingSearchSpy = spyOn(component.showingSearch, 'emit');
|
||||
component.queryBuilderService.execute({ query: { query: 'search' } });
|
||||
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.showingSearchResults).toBe(true);
|
||||
expect(showingSearchSpy).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
it('should the query restrict the search to the site and not to the currentFolderId in case is changed', () => {
|
||||
component.queryBuilderService.userQuery = 'search-term*';
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.siteChanged({ entry: { guid: 'my-site-id' } } as SiteEntry);
|
||||
|
||||
const expectedQueryBodyWithSiteChange = mockQueryBody;
|
||||
expectedQueryBodyWithSiteChange.filterQueries = [
|
||||
{ query: `ANCESTOR:'workspace://SpacesStore/my-site-id'` }
|
||||
];
|
||||
|
||||
expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange);
|
||||
});
|
||||
|
||||
it('should restrict the breadcrumb to the currentFolderId in case restrictedRoot is true', () => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = true;
|
||||
component.ngOnInit();
|
||||
expect(component.breadcrumbRootId).toEqual('my-root-id');
|
||||
});
|
||||
|
||||
it('should NOT restrict the breadcrumb to the currentFolderId in case restrictedRoot is false', () => {
|
||||
component.currentFolderId = 'my-root-id';
|
||||
component.restrictRootToCurrentFolderId = false;
|
||||
component.ngOnInit();
|
||||
expect(component.breadcrumbRootId).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should clear the search field, nodes and chosenNode when deleting the search input', fakeAsync (() => {
|
||||
spyOn(component, 'clearSearch').and.callThrough();
|
||||
typeToSearchBox('a');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
typeToSearchBox('');
|
||||
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1, 'no other search has been performed');
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed');
|
||||
}));
|
||||
|
||||
it('should folderIdToShow equal the folder node id when navigation changes', () => {
|
||||
component.folderIdToShow = null;
|
||||
const folderChangeEvent: NodeEntryEvent = new NodeEntryEvent(fakeNodeEntry);
|
||||
component.onFolderChange(folderChangeEvent);
|
||||
|
||||
expect(component.folderIdToShow).toEqual(fakeNodeEntry.id);
|
||||
});
|
||||
|
||||
it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => {
|
||||
spyOn(component, 'clearSearch').and.callThrough();
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
component.onFolderChange(nodeEntryEvent);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.clearSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should show nodes from the same folder as selected in the dropdown on clearing the search input', fakeAsync (() => {
|
||||
typeToSearchBox('piccolo');
|
||||
tick(debounceSearch);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(1);
|
||||
|
||||
component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry);
|
||||
|
||||
expect(searchSpy.calls.count()).toBe(2);
|
||||
|
||||
component.clear();
|
||||
|
||||
expect(component.searchTerm).toBe('');
|
||||
expect(component.folderIdToShow).toBe('namek');
|
||||
}));
|
||||
|
||||
it('should show the current folder\'s content instead of search results if search was not performed', () => {
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
});
|
||||
|
||||
it('should pass through the rowFilter to the documentList', () => {
|
||||
const filter = (shareDataRow: ShareDataRow) =>
|
||||
shareDataRow.node.entry.name === 'impossible-name';
|
||||
|
||||
component.rowFilter = filter;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.rowFilter({
|
||||
node: {
|
||||
entry: new Node({
|
||||
name: 'impossible-name',
|
||||
id: 'name'
|
||||
})
|
||||
}
|
||||
}))
|
||||
.toBe(filter({
|
||||
node: {
|
||||
entry: new Node({
|
||||
name: 'impossible-name',
|
||||
id: 'name'
|
||||
})
|
||||
}
|
||||
} as ShareDataRow));
|
||||
});
|
||||
|
||||
it('should pass through the excludeSiteContent to the rowFilter of the documentList', () => {
|
||||
component.excludeSiteContent = ['blog'];
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.rowFilter).toBeTruthy('Document list should have had a rowFilter');
|
||||
|
||||
const testSiteContent = new Node({ id: 'blog-id', properties: { 'st:componentId': 'blog' } });
|
||||
expect(documentList.componentInstance.rowFilter({ node: { entry: testSiteContent } }, null, null))
|
||||
.toBe(false);
|
||||
});
|
||||
|
||||
it('should pass through the imageResolver to the documentList', () => {
|
||||
const resolver = () => 'piccolo';
|
||||
component.imageResolver = resolver;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.imageResolver).toBe(resolver);
|
||||
});
|
||||
|
||||
it('should show the result list when search was performed', (done) => {
|
||||
typeToSearchBox();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
|
||||
fixture.detectChanges();
|
||||
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(component.hasValidQuery).toEqual(true);
|
||||
expect(documentList.componentInstance.currentFolderId).toBeNull();
|
||||
done();
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should not show the result list when results are returned but there is no search term typed', (done) => {
|
||||
searchQueryBuilderService.userQuery = '';
|
||||
searchQueryBuilderService.update();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.hasValidQuery).toEqual(false);
|
||||
expect(component.showingSearchResults).toEqual(false);
|
||||
done();
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should highlight the results when search was performed in the next timeframe', (done) => {
|
||||
typeToSearchBox('My');
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-highlight').innerHTML).toBe('My');
|
||||
|
||||
done();
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should show the default text instead of result list if search was cleared', (done) => {
|
||||
typeToSearchBox();
|
||||
|
||||
setTimeout(() => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||
expect(clearButton).not.toBeNull('Clear button should be in DOM');
|
||||
clearButton.triggerEventHandler('click', {});
|
||||
fixture.detectChanges();
|
||||
|
||||
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList).not.toBeNull('Document list should be shown');
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
done();
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
it('should reload the original folderId when clearing the search input', fakeAsync(() => {
|
||||
typeToSearchBox('search-term');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.folderIdToShow).toBe(null);
|
||||
|
||||
typeToSearchBox('');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku');
|
||||
}));
|
||||
|
||||
it('should set the folderIdToShow to the default "currentFolderId" if siteId is undefined', (done) => {
|
||||
component.siteChanged({ entry: { guid: 'Kame-Sennin Muten Roshi' } } as SiteEntry);
|
||||
fixture.detectChanges();
|
||||
|
||||
let documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('Kame-Sennin Muten Roshi');
|
||||
|
||||
component.siteChanged({ entry: { guid: undefined } } as SiteEntry);
|
||||
fixture.detectChanges();
|
||||
|
||||
documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Pagination "Load more" button', () => {
|
||||
|
||||
it('should NOT be shown by default', () => {
|
||||
fixture.detectChanges();
|
||||
const pagination = fixture.debugElement.query(By.css('[data-automation-id="adf-infinite-pagination-button"]'));
|
||||
expect(pagination).toBeNull();
|
||||
});
|
||||
|
||||
it('button callback should load the next batch of folder results when there is no searchTerm', () => {
|
||||
component.searchTerm = '';
|
||||
fixture.detectChanges();
|
||||
|
||||
component.getNextPageOfSearch({
|
||||
hasMoreItems: false,
|
||||
skipCount: 10,
|
||||
maxItems: 45,
|
||||
totalItems: 0
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
expect(component.searchTerm).toBe('');
|
||||
|
||||
expect(component.infiniteScroll).toBeTruthy();
|
||||
expect(component.queryBuilderService.paging.maxItems).toBe(45);
|
||||
expect(searchSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should set its loading state to true to perform a new search', async () => {
|
||||
component.prepareDialogForNewSearch(mockQueryBody);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const spinnerSelector = By.css('[data-automation-id="content-node-selector-search-pagination"] [data-automation-id="adf-infinite-pagination-spinner"]');
|
||||
const paginationLoading = fixture.debugElement.query(spinnerSelector);
|
||||
|
||||
expect(paginationLoading).not.toBeNull();
|
||||
});
|
||||
|
||||
it('Should infinite pagination target be null when we use it for search ', fakeAsync (() => {
|
||||
component.showingSearchResults = true;
|
||||
typeToSearchBox('shenron');
|
||||
tick(debounceSearch);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.target).toBeNull();
|
||||
}));
|
||||
|
||||
it('Should infinite pagination target be present when search finish', () => {
|
||||
triggerSearchResults(fakeResultSetPaging);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.target).not.toBeNull();
|
||||
});
|
||||
|
||||
it('Should infinite pagination target on init be the document list', fakeAsync(() => {
|
||||
component.showingSearchResults = true;
|
||||
|
||||
expect(component.target).toEqual(component.documentList);
|
||||
}));
|
||||
|
||||
it('Should set the scope to nodes when the component inits', () => {
|
||||
const expectedScope: RequestScope = { locations: 'nodes' };
|
||||
const setScopeSpy = spyOn(component.queryBuilderService, 'setScope');
|
||||
component.ngOnInit();
|
||||
|
||||
expect(setScopeSpy).toHaveBeenCalledWith(expectedScope);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Chosen node', () => {
|
||||
|
||||
const entry: Node = { id: 'fakeid'} as Node;
|
||||
const entry: Node = { id: 'fakeid' } as Node;
|
||||
const nodePage: NodePaging = { list: { pagination: {} } };
|
||||
let hasAllowableOperations;
|
||||
const fakeFolderNode = { id: 'fakeNodeId', isFolder: true } as Node;
|
||||
@ -1145,7 +515,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
expect(component.chosenNode[0]).toBe(entry);
|
||||
});
|
||||
|
||||
component.onCurrentSelection([ { entry } ]);
|
||||
component.onCurrentSelection([{ entry }]);
|
||||
});
|
||||
|
||||
it('should remain empty when clicking on a node (with the WRONG permissions) in the list (onNodeSelect)', async () => {
|
||||
@ -1157,7 +527,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
expect(component.chosenNode).toEqual([]);
|
||||
});
|
||||
|
||||
component.onCurrentSelection([ { entry } ]);
|
||||
component.onCurrentSelection([{ entry }]);
|
||||
});
|
||||
|
||||
it('should become empty when clicking on a node (with the WRONG permissions) after previously selecting a right node', async () => {
|
||||
@ -1299,8 +669,11 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
const isUploadingSpy = spyOn(uploadService, 'isUploading').and.returnValue(true);
|
||||
const documentListReloadSpy = spyOn(component.documentList, 'reloadWithoutResettingSelection');
|
||||
|
||||
const fakeFileModels = [new FileModel({ name: 'fake-name', size: 100 } as File), new FileModel({ name: 'fake-name-2', size: 200 } as File)];
|
||||
const fileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[0], 1, fakeFileModels[0], 0);
|
||||
const fakeFileModels = [new FileModel({
|
||||
name: 'fake-name',
|
||||
size: 100
|
||||
} as File), new FileModel({ name: 'fake-name-2', size: 200 } as File)];
|
||||
const fileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[0], 1, fakeFileModels[0], 0);
|
||||
uploadService.fileUploadComplete.next(fileUploadCompleteEvent);
|
||||
|
||||
tick(500);
|
||||
@ -1312,7 +685,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
|
||||
isUploadingSpy.and.returnValue(false);
|
||||
|
||||
const secondFileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[1], 2, fakeFileModels[1], 0);
|
||||
const secondFileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[1], 2, fakeFileModels[1], 0);
|
||||
uploadService.fileUploadComplete.next(secondFileUploadCompleteEvent);
|
||||
tick(500);
|
||||
|
||||
@ -1371,7 +744,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
contentNodeSelectorPanelService.customModels = undefined;
|
||||
});
|
||||
|
||||
it ('should search panel be collapsed by default and expand when clicking the filter button', async () => {
|
||||
it('should search panel be collapsed by default and expand when clicking the filter button', async () => {
|
||||
contentNodeSelectorPanelService.customModels = [mockContentModelTextProperty];
|
||||
fixture.detectChanges();
|
||||
|
||||
@ -1386,7 +759,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
expect(component.searchPanelExpanded).toEqual(true);
|
||||
});
|
||||
|
||||
it ('should search panel be present when the filter section is expanded', () => {
|
||||
it('should search panel be present when the filter section is expanded', () => {
|
||||
component.searchPanelExpanded = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
@ -1395,7 +768,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
expect(searchPanelContainer).not.toBe(null);
|
||||
});
|
||||
|
||||
it('should filter button be present only when there are custom models', () => {
|
||||
it('should filter button be present only when there are custom models', () => {
|
||||
contentNodeSelectorPanelService.customModels = [mockContentModelTextProperty];
|
||||
fixture.detectChanges();
|
||||
|
||||
@ -1404,7 +777,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
||||
expect(toggleFiltersPanelButton).not.toEqual(null);
|
||||
});
|
||||
|
||||
it('should filter button not be present when there are no custom models', () => {
|
||||
it('should filter button not be present when there are no custom models', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const toggleFiltersPanelButton = fixture.debugElement.query(By.css('[data-automation-id="adf-toggle-search-panel-button"]'));
|
||||
|
@ -47,11 +47,12 @@ import { RowFilter } from '../document-list/data/row-filter.model';
|
||||
import { ImageResolver } from '../document-list/data/image-resolver.model';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
||||
import { NodeEntryEvent, ShareDataRow } from '../document-list';
|
||||
import { ShareDataRow } from '../document-list/data/share-data-row.model';
|
||||
import { Subject } from 'rxjs';
|
||||
import { SEARCH_QUERY_SERVICE_TOKEN } from '../search/search-query-service.token';
|
||||
import { SearchQueryBuilderService } from '../search/services/search-query-builder.service';
|
||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||
import { NodeEntryEvent } from '../document-list/components/node.event';
|
||||
|
||||
export type ValidationFunction = (entry: Node) => boolean;
|
||||
|
||||
|
@ -27,7 +27,7 @@ import {
|
||||
AppConfigService
|
||||
} from '@alfresco/adf-core';
|
||||
import { ShareDialogComponent } from './content-node-share.dialog';
|
||||
import moment from 'moment-es6';
|
||||
import moment from 'moment';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
|
@ -36,7 +36,7 @@ import {
|
||||
} from '@alfresco/adf-core';
|
||||
import { SharedLinkEntry, Node } from '@alfresco/js-api';
|
||||
import { ConfirmDialogComponent } from '../dialogs/confirm.dialog';
|
||||
import moment from 'moment-es6';
|
||||
import moment from 'moment';
|
||||
import { ContentNodeShareSettings } from './content-node-share.settings';
|
||||
import { takeUntil, debounceTime } from 'rxjs/operators';
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import moment from 'moment-es6';
|
||||
import moment from 'moment';
|
||||
|
||||
import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import moment from 'moment-es6';
|
||||
import moment from 'moment';
|
||||
|
||||
import { Component, Inject, OnInit, Optional, ViewEncapsulation } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
|
@ -19,7 +19,7 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
|
||||
import {
|
||||
AfterContentInit, Component, ContentChild, ElementRef, EventEmitter, HostListener, Input, NgZone,
|
||||
AfterContentInit, Component, ContentChild, ElementRef, EventEmitter, HostListener, Input,
|
||||
OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
|
||||
@ -63,11 +63,16 @@ import { RowFilter } from '../data/row-filter.model';
|
||||
import { DocumentListService } from '../services/document-list.service';
|
||||
import { DocumentLoaderNode } from '../models/document-folder.model';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { ADF_DOCUMENT_PARENT_COMPONENT } from './document-list.token';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-document-list',
|
||||
templateUrl: './document-list.component.html',
|
||||
styleUrls: ['./document-list.component.scss'],
|
||||
providers:[{
|
||||
provide: ADF_DOCUMENT_PARENT_COMPONENT,
|
||||
useExisting: DocumentListComponent
|
||||
}],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-document-list' }
|
||||
})
|
||||
@ -352,7 +357,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
}
|
||||
|
||||
constructor(private documentListService: DocumentListService,
|
||||
private ngZone: NgZone,
|
||||
private elementRef: ElementRef,
|
||||
private appConfig: AppConfigService,
|
||||
private userPreferencesService: UserPreferencesService,
|
||||
@ -507,10 +511,8 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.ngZone.run(() => {
|
||||
this.resetSelection();
|
||||
this.reloadWithoutResettingSelection();
|
||||
});
|
||||
this.resetSelection();
|
||||
this.reloadWithoutResettingSelection();
|
||||
}
|
||||
|
||||
reloadWithoutResettingSelection() {
|
||||
|
@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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.
|
||||
*/
|
||||
|
||||
/* eslint-disable rxjs/no-subject-value */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
export const ADF_DOCUMENT_PARENT_COMPONENT = new InjectionToken(
|
||||
'ADF_DOCUMENT_PARENT_COMPONENT'
|
||||
);
|
@ -26,6 +26,7 @@ import { SEARCH_QUERY_SERVICE_TOKEN } from './../../../search/search-query-servi
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { FilterHeaderComponent } from './filter-header.component';
|
||||
import { Pagination } from '@alfresco/js-api';
|
||||
import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token';
|
||||
|
||||
describe('FilterHeaderComponent', () => {
|
||||
let fixture: ComponentFixture<FilterHeaderComponent>;
|
||||
@ -52,6 +53,7 @@ describe('FilterHeaderComponent', () => {
|
||||
ContentTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: ADF_DOCUMENT_PARENT_COMPONENT, useExisting: DocumentListComponent },
|
||||
{ provide: SearchService, useValue: searchMock },
|
||||
{ provide: SEARCH_QUERY_SERVICE_TOKEN, useClass: SearchHeaderQueryBuilderService },
|
||||
{ provide: DocumentListComponent, useValue: documentListMock },
|
||||
@ -121,7 +123,7 @@ describe('FilterHeaderComponent', () => {
|
||||
await fixture.whenStable();
|
||||
expect(queryBuilder.getActiveFilters().length).toBe(0);
|
||||
|
||||
const initialFilterValue = { name: 'pinocchio'};
|
||||
const initialFilterValue = { name: 'pinocchio' };
|
||||
component.value = initialFilterValue;
|
||||
const currentFolderNodeIdChange = new SimpleChange('current-node-id', 'next-node-id', true);
|
||||
component.ngOnChanges({ currentFolderId: currentFolderNodeIdChange });
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
import { Component, Inject, OnInit, OnChanges, SimpleChanges, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
|
||||
import { PaginationModel, DataSorting } from '@alfresco/adf-core';
|
||||
import { DocumentListComponent } from '../document-list.component';
|
||||
import { SEARCH_QUERY_SERVICE_TOKEN } from '../../../search/search-query-service.token';
|
||||
import { SearchHeaderQueryBuilderService } from '../../../search/services/search-header-query-builder.service';
|
||||
import { FilterSearch } from './../../../search/models/filter-search.interface';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { NodePaging, MinimalNode } from '@alfresco/js-api';
|
||||
import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-filter-header',
|
||||
@ -47,7 +47,7 @@ export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy {
|
||||
isFilterServiceActive: boolean;
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(@Inject(DocumentListComponent) private documentList: DocumentListComponent,
|
||||
constructor(@Inject(ADF_DOCUMENT_PARENT_COMPONENT) private documentList: any,
|
||||
@Inject(SEARCH_QUERY_SERVICE_TOKEN) private searchFilterQueryBuilder: SearchHeaderQueryBuilderService) {
|
||||
this.isFilterServiceActive = this.searchFilterQueryBuilder.isFilterServiceActive();
|
||||
}
|
||||
|
@ -68,4 +68,5 @@ import { SearchModule } from './../search/search.module';
|
||||
FilterHeaderComponent
|
||||
]
|
||||
})
|
||||
export class DocumentListModule {}
|
||||
export class DocumentListModule {
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ describe('NewVersionUploaderService', () => {
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(true);
|
||||
spyOn(service.versionsApi, 'listVersionHistory').and.returnValue(Promise.resolve({
|
||||
list: { entries: [{ entry: '2' }] }
|
||||
}));
|
||||
} as any));
|
||||
mockNewVersionUploaderDialogData = {
|
||||
node: mockNode,
|
||||
file: mockFile
|
||||
@ -115,7 +115,7 @@ describe('NewVersionUploaderService', () => {
|
||||
data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined },
|
||||
panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'],
|
||||
width: '630px'
|
||||
});
|
||||
} as any);
|
||||
}));
|
||||
|
||||
it('Should override default dialog panelClass', fakeAsync(() => {
|
||||
@ -129,7 +129,7 @@ describe('NewVersionUploaderService', () => {
|
||||
data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined },
|
||||
panelClass: 'adf-custom-class',
|
||||
width: '500px'
|
||||
});
|
||||
} as any);
|
||||
}));
|
||||
|
||||
it('Should set dialog height', fakeAsync(() => {
|
||||
@ -143,7 +143,7 @@ describe('NewVersionUploaderService', () => {
|
||||
panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'],
|
||||
width: '630px',
|
||||
height: '600px'
|
||||
});
|
||||
} as any);
|
||||
}));
|
||||
|
||||
it('Should not override dialog configuration, if dialog configuration is empty', fakeAsync(() => {
|
||||
@ -154,7 +154,7 @@ describe('NewVersionUploaderService', () => {
|
||||
data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined },
|
||||
panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'],
|
||||
width: '630px'
|
||||
});
|
||||
} as any);
|
||||
}));
|
||||
|
||||
it('Should dialog add list css class if showVersionsOnly is true', fakeAsync(() => {
|
||||
@ -169,7 +169,7 @@ describe('NewVersionUploaderService', () => {
|
||||
data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: true },
|
||||
panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-list'],
|
||||
width: '630px'
|
||||
});
|
||||
} as any);
|
||||
}));
|
||||
|
||||
});
|
||||
@ -181,7 +181,7 @@ describe('NewVersionUploaderService', () => {
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(true);
|
||||
spyOn(service.versionsApi, 'listVersionHistory').and.returnValue(Promise.resolve({
|
||||
list: { entries: [{ entry: '2' }] }
|
||||
}));
|
||||
}) as any);
|
||||
mockNewVersionUploaderDialogData = {
|
||||
node: mockNode,
|
||||
file: mockFile
|
||||
|
@ -1,5 +1,5 @@
|
||||
<mat-card class="adf-permission-card" id="adf-permission-manager-card">
|
||||
<div *ngIf="!(permissionList.data$ | async) && permissionList.loading$ | async" class="adf-permission-loader">
|
||||
<div *ngIf="(permissionList.data$ | async) === null && permissionList.loading$ | async" class="adf-permission-loader">
|
||||
<mat-progress-spinner [color]="'primary'"
|
||||
[mode]="'indeterminate'">
|
||||
</mat-progress-spinner>
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { NodesApiService, SearchService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { of, throwError } from 'rxjs';
|
||||
@ -128,7 +128,7 @@ describe('PermissionListComponent', () => {
|
||||
.toBe('PERMISSION_MANAGER.LABELS.INHERITED-SUBTITLE');
|
||||
});
|
||||
|
||||
it('should toggle the inherited button', fakeAsync(() => {
|
||||
it('should toggle the inherited button', async () => {
|
||||
getNodeSpy.and.returnValue(of(fakeNodeInheritedOnly));
|
||||
component.ngOnInit();
|
||||
|
||||
@ -152,7 +152,7 @@ describe('PermissionListComponent', () => {
|
||||
.toBe('PERMISSION_MANAGER.LABELS.INHERITED-PERMISSIONS PERMISSION_MANAGER.LABELS.OFF');
|
||||
expect(element.querySelector('span[title="total"]').textContent.trim())
|
||||
.toBe('PERMISSION_MANAGER.LABELS.INHERITED-SUBTITLE');
|
||||
}));
|
||||
});
|
||||
|
||||
it('should not toggle inherited button for read only users', async () => {
|
||||
getNodeSpy.and.returnValue(of(fakeReadOnlyNodeInherited));
|
||||
@ -186,7 +186,7 @@ describe('PermissionListComponent', () => {
|
||||
|
||||
});
|
||||
|
||||
describe('locally set permission', () => {
|
||||
describe('locally set permission', () => {
|
||||
beforeEach(() => {
|
||||
getNodeSpy.and.returnValue(of(fakeLocalPermission));
|
||||
});
|
||||
|
@ -19,33 +19,35 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { RoleModel } from '../../models/role.model';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-user-role-column',
|
||||
template: `
|
||||
<mat-form-field floatLabel="never" class="adf-role-selector-field" *ngIf="!readonly">
|
||||
<mat-select
|
||||
(click)="$event.stopPropagation()"
|
||||
[placeholder]="placeholder | translate"
|
||||
[value]="value"
|
||||
(selectionChange)="onRoleChanged($event.value)">
|
||||
<mat-option *ngFor="let role of roles" [value]="role.role">
|
||||
{{ role.label | adfLocalizedRole }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
selector: 'adf-user-role-column',
|
||||
template: `
|
||||
<mat-form-field floatLabel="never" class="adf-role-selector-field" *ngIf="!readonly">
|
||||
<mat-select
|
||||
(click)="$event.stopPropagation()"
|
||||
[placeholder]="placeholder | translate"
|
||||
[value]="value"
|
||||
(selectionChange)="onRoleChanged($event.value)">
|
||||
<mat-option *ngFor="let role of roles" [value]="role.role">
|
||||
{{ role.label | adfLocalizedRole }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<span class="adf-datatable-cell-value adf-readonly-role" [title]="value | adfLocalizedRole" *ngIf="readonly">
|
||||
<span class="adf-datatable-cell-value adf-readonly-role" [title]="value | adfLocalizedRole" *ngIf="readonly">
|
||||
{{value | adfLocalizedRole}}
|
||||
</span>
|
||||
`,
|
||||
`,
|
||||
host: { class: 'adf-user-role-column adf-datatable-content-cell adf-expand-cell-4' },
|
||||
styles: [
|
||||
`.adf-role-selector-field {
|
||||
width: 100%;
|
||||
.mat-form-field {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-role-selector-field .mat-form-field {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.adf-readonly-role {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
@import '~@angular/material/theming';
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
$mat-menu-overlay-min-width: 112px !default; // 56 * 2
|
||||
$mat-menu-overlay-max-width: 280px !default; // 56 * 5
|
||||
|
||||
.adf {
|
||||
&-search-result-autocomplete {
|
||||
@include mat-overridable-elevation(2);
|
||||
@include mat.overridable-elevation(2);
|
||||
|
||||
min-width: $mat-menu-overlay-min-width;
|
||||
max-width: $mat-menu-overlay-max-width;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
.adf-search-filter-chip {
|
||||
&.mat-chip {
|
||||
@ -53,6 +53,6 @@
|
||||
min-width: 320px;
|
||||
border-radius: 12px;
|
||||
|
||||
@include mat-elevation(2);
|
||||
@include mat.elevation(2);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
.adf-search-form {
|
||||
&.mat-button {
|
||||
@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
&-menu + * .mat-menu-panel {
|
||||
@include mat-elevation(2);
|
||||
@include mat.elevation(2);
|
||||
|
||||
border-radius: 6px;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
font-size: var(--theme-title-font-size);
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
fill: currentColor;
|
||||
fill: currentcolor;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
color: var(--theme-primary-color-default-contrast) !important;
|
||||
|
@ -22,7 +22,7 @@ import { VersionListComponent } from './version-list.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { of } from 'rxjs';
|
||||
import { Node, VersionPaging, VersionEntry } from '@alfresco/js-api';
|
||||
import { Node, VersionPaging, VersionEntry, NodeEntry } from '@alfresco/js-api';
|
||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ContentVersionService } from './content-version.service';
|
||||
@ -63,7 +63,7 @@ describe('VersionListComponent', () => {
|
||||
component.node = { id: nodeId, allowableOperations: ['update'] } as Node;
|
||||
|
||||
spyOn(component, 'downloadContent').and.stub();
|
||||
spyOn(component['nodesApi'], 'getNode').and.returnValue(Promise.resolve({ entry: { id: 'nodeInfoId' } }));
|
||||
spyOn(component['nodesApi'], 'getNode').and.returnValue(Promise.resolve(new NodeEntry({ entry: { id: 'nodeInfoId' } })));
|
||||
});
|
||||
|
||||
it('should raise confirmation dialog on delete', () => {
|
||||
@ -299,7 +299,7 @@ describe('VersionListComponent', () => {
|
||||
fixture.detectChanges();
|
||||
tick();
|
||||
|
||||
expect(component.restored.emit).toHaveBeenCalledWith({ id: 'nodeInfoId' });
|
||||
expect(component.restored.emit).toHaveBeenCalledWith(new Node({ id: 'nodeInfoId' }));
|
||||
}));
|
||||
|
||||
it('should reload the version list after a version restore', fakeAsync(() => {
|
||||
|
@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import 'zone.js';
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
@ -28,7 +28,9 @@ declare const require: any;
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
}
|
||||
);
|
||||
|
||||
declare const pdfjsLib: any;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user