- Included React version 19.2.4 and ReactDOM version 19.2.4 to enhance UI capabilities.
- Updated package-lock.json to reflect the new dependencies and their integrity checks.
- Upgraded webpack from 5.104.1 to 5.105.3 for improved performance and features.
- Updated acorn from 8.15.0 to 8.16.0 to incorporate the latest fixes.
- Adjusted enhanced-resolve and watchpack versions for compatibility.
- Removed duplicate entries for workspace dependencies under @nx/cypress and @nx/storybook.
- Streamlined the structure of the package-lock.json for better clarity and maintainability.
- Added a template reference variable to the file-uploading-dialog component for better access to the dialog element.
- Updated focus handling in ngOnInit to use the new reference, simplifying the code and improving clarity.
- Streamlined property initializations for consistency.
- Changed the stylelint.configFile path to use the workspace folder variable for better compatibility across different environments.
- Added stylelint.configBasedir to ensure correct base directory resolution for stylelint configuration.
- Reorganized conditional rendering in file-uploading-dialog.component.html to enhance readability by using if-else statements.
- Updated upload-button.component.html to streamline the label rendering logic, ensuring consistent display of static titles and translated text.
- Replaced switch-case syntax with if-else statements in breadcrumb.component.html to enhance readability and maintainability of the template logic.
- Streamlined the rendering of breadcrumb items while preserving functionality.
- Updated dropdown-breadcrumb.component.html to track node IDs instead of nodes for better performance.
- Refactored file-uploading-list-row.component.html to enhance readability by restructuring conditional rendering and simplifying the template logic.
- Revised the Decimal Number Pipe documentation to improve clarity by removing unnecessary links and formatting.
- Enhanced the description of the `digitsInfo` parameter and updated the Result section for better readability.
- Deleted the ecm-user.service.mock file to eliminate unused mock data, enhancing code clarity.
- Updated public API exports to remove the reference to the deleted mock file.
- Introduced the fakeEcmUser object directly in the people-content.service.spec.ts for improved test isolation and maintainability.
- Deleted the BreadcrumbModule and its associated directives to streamline the ContentModule.
- Updated ContentModule imports and exports to reflect the removal, enhancing maintainability.
- Enhanced the breadcrumb.component.html for better readability by restructuring the template and using structural directives.
- Streamlined the rendering logic for previous and last nodes in the breadcrumb.
- Removed the unused CommonModule import from breadcrumb.component.ts to simplify dependencies.
- Updated breadcrumb.component.html and dropdown-breadcrumb.component.html to use structural directives for better readability and maintainability.
- Simplified the rendering of previous nodes and last nodes in the breadcrumb, ensuring proper handling of optional values.
- Removed unnecessary imports in dropdown-breadcrumb.component.ts to streamline the component's dependencies.
- Removed several unused components from the ContentModule, including TreeViewComponent, ContentTypeDialogComponent, and others, to streamline the module.
- Updated the module's exports and imports accordingly to reflect these changes, enhancing maintainability.
- Deleted the DecimalNumberModel class from the models directory to streamline the codebase.
- Updated public API exports to remove references to DecimalNumberModel.
- Replaced the class with an interface in the decimal-number.pipe.ts file to maintain functionality while simplifying the implementation.
- Deleted the File Upload Error Pipe documentation and its references from various components and the version index.
- Updated README and component documentation to reflect the removal of the pipe, ensuring consistency across the documentation.
- Introduced unit tests for the getFileUploadErrorKey method in the file uploading list row component.
- Added tests for various error codes (500, 404, 403) and scenarios for null, undefined, and zero values to ensure correct key format retrieval. [ci:force]
- Updated the getFileUploadErrorKey method to accept an optional errorCode parameter, allowing for better handling of undefined or null values.
- This change improves the robustness of error message generation in the file uploading list row component.
- Modified the aria-label attribute in the file uploading list row component to improve translation handling for upload error messages.
- Removed unnecessary translation parameter to streamline the error message retrieval process.
- Introduced unit tests for the toggle icon state in the file uploading list row component.
- Added tests for mouse enter, mouse leave, focus, and blur events to ensure correct state management.
- Verified independent state handling for toggleIconState and toggleIconCancelState. [ci:force]
- Deleted the Toggle Icon directive implementation and its associated tests.
- Updated documentation to reflect the removal of the directive.
- Adjusted components to eliminate dependencies on the Toggle Icon directive.
- Removed the FileUploadErrorPipe and its associated tests to streamline error handling.
- Updated the upload button and file uploading list row components to enhance translation handling for error messages.
- Adjusted HTML templates to ensure consistent spacing in static titles.
- Minor refactoring in the file uploading list row component to introduce a new method for error key retrieval.
* [ACS-11153] Removed usages of ng reflect from card view dateitem and diagram activities
* [ACS-11153] Removed usages of ng-reflect
* [ACS-11153] Added eslint rule
* AAE-33828 fix for the runtime errors on datatable should be handled in runtime
* AAE-33828 removing the unwanted try catches
* AAE-33828 adding units to test the number value is a valid value
* refactor: improve context menu overlay service implementation
- Introduced a new interface for overlay references with backdrop handling.
- Updated event listener for backdrop clicks to use the new interface, enhancing type safety.
- Refactored the injector creation method to utilize the Injector.create method for better clarity and maintainability.
- Improved the fake element's type definition in the getOverlayConfig method for better type inference.
These changes enhance the overall robustness and readability of the context menu overlay service.
* refactor: enhance type safety in context menu components
- Introduced the ContextMenuItem interface to improve type definitions for context menu items.
- Updated the ContextMenuListComponent to use ContextMenuItem for links and menu item parameters, enhancing clarity and maintainability.
- Modified CONTEXT_MENU_DATA injection token to specify ContextMenuItem[] for better type safety.
- Adjusted the ContextMenuOverlayConfig interface to accept an array of ContextMenuItem, ensuring consistent data handling.
These changes improve the overall robustness and readability of the context menu implementation.
[ci:force]
* refactor: remove unnecessary eslint-disable comments in category management and search components
- Eliminated eslint-disable comments related to no-underscore-dangle in the CategoriesManagementComponent and SearchControlComponent tests, improving code clarity and adherence to linting rules.
- This change enhances the overall readability of the test files by ensuring consistent coding standards.
* refactor: simplify backdrop click handling in context menu overlay service
- Removed the unnecessary backdrop click handling logic, replacing it with a direct call to close the overlay reference. This change enhances code clarity and reduces complexity in the event listener implementation.
* refactor: streamline backdrop handling in context menu overlay service
- Removed the custom interface for overlay references with backdrop handling, simplifying the code.
- Updated the event listener for backdrop clicks to directly use the overlay's backdropElement, enhancing clarity and maintainability.
- This change improves the overall robustness of the context menu overlay service.
* refactor: clean up code in SuperagentHttpClient and upload.spec
- Removed unnecessary eslint-disable comment in SuperagentHttpClient for improved code clarity.
- Refactored promise handling in upload.spec to utilize an array for better management of multiple promises during file upload error handling.
* chore: update cspell and ESLint configurations
- Added "webscript" to the cspell dictionary for improved spell checking.
- Updated ESLint configuration to disable the "@typescript-eslint/no-explicit-any" rule, allowing more flexibility in type definitions.
* fix: enhance ImgViewerComponent to handle cleanup and prevent errors after destruction
- Added a `destroyed` flag to manage component lifecycle and prevent operations on a destroyed instance.
- Implemented `afterEach` hooks in tests to ensure proper fixture cleanup.
- Updated key event handlers and methods to check for the `destroyed` state before executing actions, improving stability and preventing errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: add aria-hidden attribute to notification history button for accessibility
- Updated the notification history button to include the `aria-hidden` attribute, improving accessibility for screen readers and enhancing user experience.
* fix: improve key event handling in ImgViewerComponent
- Updated key event handlers to check for the presence of the cropper before executing actions, enhancing stability and preventing errors when the component is destroyed.
- Removed redundant checks from individual arrow key handlers, streamlining the code.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
- Modified several components to use optional chaining for safer property access, enhancing code robustness.
- Updated ESLint configuration to enforce stricter rules on the use of optional chaining.
- Adjusted tests to reflect changes in property access patterns.
* Refactor enums to const objects and update ESLint rules
- Converted several TypeScript enums to const objects for better type inference and immutability.
- Updated ESLint configuration to disable 'no-redeclare' rule and added new restrictions on schema usage.
- Adjusted package-lock.json to mark several dependencies as peer dependencies.
* Refactor enums to const objects in site-dropdown and new-version-uploader models
- Converted TypeScript enums to const objects for improved type safety and immutability in `sites-dropdown.component.ts` and `new-version-uploader.model.ts`.
- Updated related types to reflect the changes in both files.
- Enhanced error handling in the `DropdownSitesComponent` by using the `subscribe` method with an object for better readability.
* Refactor TypeScript types and improve error handling in component tests
- Updated type annotations in `upload.service.ts` and `node-actions.service.ts` for better type safety.
- Enhanced error handling in various component tests by using more descriptive error messages in `task-attachment-list.component.spec.ts`, `attach-file-widget-dialog.component.spec.ts`, and `task-form.component.spec.ts`.
- Removed unnecessary schemas from test configurations in several component spec files to streamline the testing setup.
* Refactor TypeScript enums to const objects for improved type safety
- Converted multiple TypeScript enums to const objects across various models, including `AppConfigValues`, `Status`, `ShowHeaderMode`, `WidgetTypeEnum`, and others.
- Updated related type definitions to enhance type inference and immutability.
- Adjusted ESLint configurations by removing the 'no-redeclare' rule to streamline code quality checks.
* Refactor TypeScript types for improved type safety and consistency
- Updated type annotations in `document-list.component.ts`, `document-actions.service.ts`, and `node-actions.service.ts` to use `Observable` instead of `Subject` for better reactive programming practices.
- Enhanced type definitions in `search-date-range.component.ts` and related spec files to allow `inLastValue` to be either a string or a number, improving flexibility in handling date range inputs.
- Adjusted test cases to reflect these type changes, ensuring consistency across the application.
* Enhance type safety in ViewerComponent by specifying type for closeButtonPosition
- Updated the type annotation for `closeButtonPosition` in `viewer.component.ts` to explicitly define it as `CloseButtonPosition`, improving type safety and clarity.
* Enhance type safety in DataTableComponent by specifying type for showHeader
- Updated the type annotation for `showHeader` in `datatable.component.ts` to explicitly define it as `ShowHeaderMode`, improving type safety and clarity.
* Update PDF viewer test to accommodate varying date formats
- Modified the test for the annotation popup in `pdf-viewer.component.spec.ts` to check for the presence of date components instead of a specific date format, enhancing test robustness across different locales.
* [ACS-10193] make library title bolder to indicate it is a link
* [ACS-10193] use higher font weight
* [ACS-10193] move weight to proper scss file
* [ACS-10193] fix css class encapsulation
* [ACS-10281] a11y fix: Approve step folder control is focusable twice
* [ci:force]
* [ACS-10281] revert to div
* [ACS-10281] a11y fix: Approve step folder control is focusable twice
* fix for e2e's
* [ACS-10302] Add aria-live to selected aspects counter
* [ACS-10302] Add the live announcer for amount of selected items in breadcrumb
* [ACS-10302] CR fixes
* [ACS-10274] Corrected reading green check mark and red cross by screen reader
* [ACS-10274] Unit tests, cleaning code, centering content
* [ACS-10274] Fixed formatting
* [ACS-10274] Moved code for getting cell to unit testing utils
Removes specific styling for the icon button in array items
to inherit the correct color.
This ensures the button's icon color aligns with the theme.
Fixes AAE-41713
* AAE-41553 Fix CI validation on crowdin PRs
* trigger pull after crowdin push to keep the translation PR up to date
* pass only required secrets to workflow call to make sonar happy
* AAE-40748 Various i18n and storage bug fixes
* refactor: update NoopTranslateModule to use provideHttpClient and provideHttpClientTesting
Replaced HttpClientTestingModule with provideHttpClient and provideHttpClientTesting for improved dependency injection in the NoopTranslateModule.
* refactor: update FileUploadErrorPipe tests to use TestBed for dependency injection
Replaced direct instantiation of FileUploadErrorPipe with TestBed configuration, utilizing NoopTranslateModule for improved testing practices.
* test: enhance StorageService and UserPreferencesService tests for improved initialization logic
Added tests for UserPreferencesService to verify locale and pagination initialization from storage and config. Updated StorageService tests to restore original localStorage after each test for better isolation.
* refactor: simplify TranslationService by removing direct StorageService dependency
* [ACS-10205]: updates base DataTableAdapter class with optional props
* [ACS-10205]: updates ShareDataTableAdapter with new props for focus handling
* [ACS-10205]: bind new focus props to template
* [ACS-10205]: uts update
* [ACS-10205]: uts refactor
* [ACS-10205]: fixes circullar deps
* AAE-40934 style: replace mat-raise-button with mat-flat-button
* AAE-40934 style: remove unnecessary color declarations from material buttons, rely on MD3 default primary button color
Implements the ability to close the dropdown list by pressing the Escape key.
This enhances the user experience by providing a keyboard shortcut to dismiss the dropdown, improving accessibility and efficiency.
* AAE-40359 Filter out service processes on start process
* AAE-40359 Filter out service processes on start process
* make triggerable optional
* make type more strict
* Replace shelljs with native node api
* Refactor command execution in audit and changelog scripts to use spawnSync for improved security and error handling
Adds the `quickRunDeployment` property to the `ApplicationInstanceModel` interface.
This allows the admin app to determine if an application instance is a quick run deployment, which is necessary to block upgrades and restores for those instances.
Relates to AAE-39821
* [ACS-10263] Exclude mark all as read button from menu items
* [ACS-10263] Keyboard navigation for notifications list
* [ACS-10263] Excluded load more button from screen reader list for notifications
* [ACS-10263] Excluded non list related elements from screen reading as list for columns visibility
* [ACS-10263] Unit tests
* [ACS-10263] Added readonly and private for constructor parameters
* [ACS-10263] Marked fields as readonly
* [AAE-37713] amount widget formats value based on locale
* [AAE-37713] added unit test with currency icon
* [AAE-37713] provided amount widget config as observable
* [AAE-37713] applied pr comments
* [AAE-37713] subscribed amount widget to changes from form rules
* [AAE-37713] applied pr comments
* [AAE-37713] moved getLocale to service
* [AAE-37713] moved getLocale to translation service
* AAE-39612 Remove click from base and add it directly to the implementations
* AAE-39612 Add unit tests for the Text Widgets
* AAE-39612 Add unit tests for the Date Widgets
* AAE-39612 Add unit tests for the UI Widgets
* AAE-39612 Add unit tests for the People Widgets
* AAE-39612 Add unit tests for the Display Text Widgets
* AAE-39612 Add unit tests for the Base Viewer Widget
* AAE-39612 Add unit tests for the Object View Widgets
* AAE-39612 Add unit tests for the File Upload Widgets
* AAE-39612 Add unit tests for the Data Table Widget
* [AAE-37713] amount widget formats value based on locale
* [AAE-37713] added unit test with currency icon
* [AAE-37713] provided amount widget config as observable
* [AAE-37713] applied pr comments
* [ACS-10083]: fixes setValue flow; handles initial stream values properly
* [ACS-10083]: migrates to category.id instead of column key for filter key
* [ACS-10083]: refactoring to prevent setting nullish query
* [ACS-10083]: unit tests
* [ACS-10083]: adds method for getting operator by category id
* [ACS-10083]: removes API call trigger from component on initial value set
* [ACS-10083]: adds data for building initial query after page reload
* [ACS-10083]: removes nodes API call if has filter in query
* [ACS-10083]: no need to call submit inside of the comp on initial value
* [ACS-10083]: updated unit tests
* [ACS-10083]: minor fixes and refactorings
* [ACS-10083]: removes redundant types
- Added support for 'pt' locale code in DateFnsUtils.getLocaleFromString()
- Both 'pt' and 'pt-BR' now correctly map to ptBR locale (dd/mm/yyyy format)
- Added comprehensive test coverage for all locale mappings using data-driven tests
- Fixed naming conflict by aliasing Italian locale import
Co-authored-by: Fabian Kindgen <39992669+fkindgen@users.noreply.github.com>
* Fixes WebSocket client re-initialization.
Ensures proper handling of WebSocket client re-initialization by
creating a unique client for each user session and token refresh, and removing the client on logout.
Addresses issues with deployment updates not being received due to
incorrect client handling. This change ensures that the WebSocket
connection is properly re-established when the user logs in again and when tokens are refreshed.
* reverts changes
* Removes HttpClientTestingModule import
Replaces the `HttpClientTestingModule` import with `provideHttpClientTesting`
to align with Angular's updated testing practices.
This change ensures compatibility and avoids potential issues
related to the deprecated module.
Fixes AAE-38919
* revert more changes
* Update lib/process-services-cloud/src/lib/services/web-socket.service.spec.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adds the `lastModifiedAt` property to the `ApplicationInstanceModel`.
This allows the UI to display the last modification time of a workspace deployment, addressing the requirement to show when a deployment was last modified.
Fixes AAE-38881
* [ACS-10238] Fix screen reading clear icon for search filter and for searching for user for adding permissions
* [ACS-10238] Fix screen reading remove icon for removing user or group from list to add permissions
* Bonus Content: Remove warnings from console
* Fixes: Prevents display issues during form loading
Ensures the process definition card and start button are not rendered until the form is fully loaded or an error occurs during the loading process.
This prevents flickering and ensures a smoother user experience.
* BONUS content: calm down sonar cube
* Removes unnecessary error handling
Removes the error handler from the `subscribe` block of the `startProcess` method in `StartProcessCloudComponent`.
The error handling was redundant, as errors are already handled by other mechanisms.
This simplifies the code and avoids potential duplicate error handling.
* Uses `test` method for regex checks
Replaces the `exec` method with the `test` method for regular
expression checks to determine if a pattern exists within a string.
This resolves potential issues where the return value of `exec`
(an array or null) was not being properly evaluated as a boolean
condition, leading to incorrect logic execution.
---------
Co-authored-by: Fabian Kindgen <39992669+fkindgen@users.noreply.github.com>
* [AAE-30878] - Migrating from event-emitter to eventemitter3 which is ESM and commonJs compatibile
* [AAE-30878] - Using types to avoid compilation isues with the new ruels
* AAE-30878 - fixed lint issue on js-api
* AAE-30878 - reverted misplaced changes
* [AAE-30882] - migrating from superagent to axios
* AAE-30882 - Fixed unit test for js-api
* AAE-30882 - Fixed unit test for js-api
* AAE-30882 - Fixed unit test for js-api
* AAE-30882 - Improved some unit tests
* [ci:force]
* AAE-30882 - Checking why is ok locally but fails on CI
* AAE-30882 - Start fixing some unit tests - check 1
* AAE-30882 - Start fixing some unit tests - check 2
* [AAE-30882] - rebased
* [AAE-30882] - added missing import
* CSX-73 Date and Select Satori
* CSX-73 Fix process-header unit test
* CSX-73 Fix core unit test
* CSX-73 Fix core unit test
* CSX-73 Fix task-header unit test
* CSX-73 Fix task-header unit test
* CSX-73 Fix task-header unit test
* CSX-73 Fix card-view dateitem
* CSX-73 Fix card-view dateitem
---------
Co-authored-by: Sahana Ghosal <sahana.ghosal@hyland.com>
* AAE-37073 fix error location and make field highlight red if error
* AAE-37073 code review update - revert change from TranslateModule back to TranslatePipe
* Removes showNextTaskCheckbox input
Removes the `showNextTaskCheckbox` input from the `UserTaskCloudComponent` and related files.
The `showNextTaskCheckbox` input is no longer needed, instead the visibility of the 'Open next task' checkbox will depend on the canCompleteTask() method.
This change simplifies the component's API and ensures that the checkbox is always displayed when it should be.
* Adds option to open next task after completion
Introduces a new checkbox on the task screen that, when checked, automatically navigates the user to the next available task upon completion of the current one.
It enhances user experience by streamlining task completion workflows, eliminating the need for manual navigation.
* revert changes
* review
* [ADF-5582] Update NodeCommentsService to take userId as an argument in getUserImage
* [ADF-5582] Add unit tests for avatar caching and retrieval in NodeCommentsService
* Refactor NodeCommentsService unit tests to avoid accessing private members
* [ADF-5582] Remove picture Id from getUserImage
* [ADF-5582] Add comment to getAvatarCache and fix sonarcloud issues
* Update node-comments.service.spec.ts
* Trigger sonar
* [ADF-5582] Add method to return avatar url in people api
* [ADF-5582] Fix sonar cloud issue
* [ADF-5582] Add comment to getUserImage and fix request address for getAvatarImageUrl
* Handles error messages with wrong JSON format
Handles cases where the error message from the backend is not a valid JSON.
If the message is not a valid JSON, it displays the error as a string.
This prevents the application from crashing when receiving error messages with wrong JSON format.
Fixes AAE-36869
* SonarCloud solution
* Displays the error message from the response
The error message is now extracted from the response body,
providing more context when process start fails.
This change ensures that the user sees the specific error
message returned by the service when a process instance
cannot be started, improving the user experience.
* Refactors start process template to use `@if` blocks
Migrates the start process component template from `*ngIf` directives to the new Angular `@if` syntax for improved readability and performance.
This change enhances the structure and efficiency of conditional rendering within the template.
* prettier
* cleanup deprecated AppConfigModule
* migrate factory to initializer
* add provideAppExtensions() api to allow deprecating ExtensionsModule in apps
* fix viewer render import
* use Angular control flow instead of NgIf
* use Angular control flow instead of NgSwitch
* temp checkin to share
* add id attribute
* [AAE-36536] test fix for form.model.ts changes
---------
Co-authored-by: Alex Molodyh <alex.molodyh@hyland.com>
* update api docs and clean dead code
* update api docs and clean dead code
rebasing onto develop branch
* [ACS-8770] fix unit test after auth refactor
* [ACS-8770] fix sonarcube issues
* [ACS-8770] update auth service doc file
* [ACS-8770] clean up demo-shell artifacts
---------
Co-authored-by: Anton Ramanovich <Anton.Ramanovich@hyland.com>
* AAE-36368 fixing labels and form-fields on content-ee and apa
* AAE-36368 removing padding for ACA
* AAE-36368 fixing the PR for ACA issues
* AAE-36368 resolving PR comments removing adf-form-field-input class
* [ACS-9790] Fix Tags and Categories content is missing during editing other panel in metadata sidebar
* [ACS-9790] remove commented code
* [ACS-9790] cr fix
* [ADF-5581] Reset filterValue when navigating to a new folder to ensure filters are cleared
* [ADF-5581] Added unit tests to verify filterValue reset
* [ADF-5581] Add unit tests to verify filter reset on navigation and preservation on sorting
* [ADF-5581] Use SpyObj<ShareDataTableAdapter> in unit test to avoid any type
* [ADF-5581] Remove redundant type on mockData declaration in unit test
* Revert loadFolder() to reload() in onSortingChanged and update unit test accordingly
* [ADF-5580] emit commentAdded event from adf-comments component
* [ADF-5580] Emit commentAdded event from adf-comments and expose it in adf-node-comments
* [ADF-5580] Emit commentAdded event from NodeCommentsComponent, add unit test, and update docs
* [ADF-5580] Add unit test for commentAdded output in NodeCommentsComponent, update docs and create testing utils
* [ADF-5580] Mark debugElement as readOnly
* [ADF-5580] Add mock services and fix unit test setup
* [ADF-5580] Reuse shared comment mocks across multiple test files
* [ADF-5580] Align comments component documentation
* [ADF-5580] Remove redundant setup and use ContentTestingModule in comment components tests
* AAE-35976 adding auto-required instead of manually handling required using asterisks inside mat-form-field elements
* AAE-35976 removing hiderequiredmarker as it'll be handled by the form-fields itself
Resolving merge conflicts with develop
* AAE-35976 fixing units
* AAE-35976 adding isVisible condition with the required field
* AAE-35976 removing the method call from html and using the variable instead for conditions
* AAE-34482 fixing card view datetime component in adf using mat-label
* AAE-34482 fixing the padding for mat-form-field labels
* AAE-34482 resolving the pr review comments
* AAE-34482 changing the floatType from 'auto' to null
* AAE-34482 changing the scss class name as per the review comment
* AAE-34482 fixing the left units
* AAE-34902 updating styles for input controls to maintain the ui consistency with studio-hxp
* AAE-34902 changing class prefix-names from hxp to adf
* AAE-34902 float level conditional on placeholder
* AAE-34902 fixing the placeholder in text-widgets
* AAE-34902 fixing the left and right side margins on workspace forms
* AAE-35882 fixing the double asterix issue on require fields on preview and form-editors and workspace
* AAE-35882 altering one unit as the asterisks are now handled by mat-form-fields
* Adds loading state accessibility
Improves accessibility by adding screen reader support to loading indicators.
This ensures that users with disabilities are informed when the document is loading, improving the overall user experience.
* Trigger Build
* Fixes accessibility issue on loading spinner
Removes the redundant `attr.` prefix from the `aria-labelledby` attribute in the loading spinner.
This resolves an accessibility issue where the spinner's label was not correctly associated, enhancing the user experience for assistive technologies.
* Trigger Build
Improves accessibility by adding screen reader support to loading indicators.
This ensures that users with disabilities are informed when the document is loading, improving the overall user experience.
* Handles null values in number widget
Ensures the number widget correctly handles null, undefined, and empty string values, setting the field value to null in these cases.
This change prevents unexpected behavior when the user clears the input field, ensuring data consistency.
* Adds test for readonly number widget
Adds a test case to verify the behavior of the number widget when it's in readonly mode.
The test checks if the displayValue is correctly set using the decimalNumberPipe when the readOnly property is true.
* Refactors number widget tests
Updates number widget tests to use `overrideComponent` for providing mocked dependencies. This approach ensures proper isolation and avoids potential issues with shared state between tests.
Additionally, it adds a test case to verify the `displayValue` is correctly set using the mocked `DecimalNumberPipe`.
---------
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
* [ACS-9377] Added function for file plans to get file plan roles
* [ACS-9377] Types and documentation
* [ACS-9377] Unit tests
* [ACS-9377] Fixed sonar cloud issue
* AAE-34959 Run security options loader when alfresco-api-v2-loader.serfvice is initialized because on content app the app-config.loader is run after AlfrescoApiLoaderService.init and the callback function that should setDefaultSecurityOption is not executed
* AAE-34959 Provide SecurityOptionsLoaderService in root to fix No Provider error
* AAE-34482 fixing label and alignment issues in forms
* AAE-34482 fixing margin issues
* AAE-34482 adding span inside mat-label
* AAE-34482 fixing units
* AAE-34482 removing unwanted unit
* AAE-34482 fixing unit
* AAE-34482 fixing native element class in unit tests
* [AAE-33907] Adds input for 'Open next task' checkbox
* Adds input for 'Open next task' checkbox
Adds an input to the task screen component to determine whether the "Open next task" checkbox is checked by default.
Also, adds an output that emits an event when the state of the "Open next task" checkbox changes.
* [AAE-33907] added condition for isNextTaskCheckboxChecked
* [AAE-33907] added showNextTaskCheckbox property and moved condition
* Adds next task checkbox functionality.
* Adds support for next task navigation
* Enhances screen cloud component testing
* Makes openNextTask optional for complete task
* removed tests
* Cleans up unnecessary blank lines in spec file
* fixed unit test
* AAE-34885 Form tabs preview frame size and width fix
* AAE-34885 fixing form preview in modeling app
* AAE-34485 workspace-app form scroll fix
* AAE-34485 fixing margin issues on the modeling app form preview
* fixing width issues on preview
---------
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
* Fix the "open next task" checkbox is not showing anymore in the process start section
* Add test
* adjust description of the test
* revert the format changes
* prettier
* rebase changes fix
* prettier
* fix tests
* [AAE-33090] Add optional checkbox for 'open next task' feature
* [AAE-33090] move translation to LABEL property
* [33090] add unit tests
* add tests for checkbox value
* [AAE-33090] remove some comments
* [AAE-33090] update documentation
* AAE-33090 kind of a typo
* AAE-33090 remove all comments
* Add rerun function after first approval is there.
* Adjust pull request with github pr number as var
* Add check label step to check "do not merge" label
* cleanup
* [ACS-5184] show progress spinner on file navigation
* [ACS-5184] show spinner unitl content is ready
* [ACS-5184] unit test fix
* [ACS-5184] cr fix
* [ACS-5184] spelling error fix
* [ACS-9406] Add getContentRenditionTypePreview to process-content service
* [ACS-9406] remove extra space
* [ACS-9406] fix unit tests
* [ACS-9406] fix unit tests
* [ACS-9406] cr fixes
* [AAE-32763] fixed retrieving preferences from local storage
* [AAE-32763] added a test
* [AAE-32763] Reverted to old implementation
* [AAE-32763] renamed test
* [AAE-32763] Be able to use getitems from local storage in the same way as cloud storage
* [AAE-32763] added more tests
* Simple Templates: Keep templates as simple as possible, avoiding complex logic directly in the template. Delegate complex logic to the component's TypeScript code.
* Native Control Flow: Use the new built-in control flow syntax (`@if`, `@for`, `@switch`) instead of the older structural directives (`*ngIf`, `*ngFor`, `*ngSwitch`).
* NgOptimizedImage: Use `NgOptimizedImage` for all static images to automatically optimize image loading and performance.
* Async Pipe: Use the `async` pipe to handle observables in templates. This automatically subscribes and unsubscribes, preventing memory leaks.
* Prefer pipes over functions in templates for performance reasons, as pipes are only re-evaluated when their inputs change.
## Accessibility Standards
* Add `alt` text to all images
* Label form inputs with `<mat-label>` or `aria-label`
* Ensure interactive elements have accessible names
* Add `role`, `aria-labelledby`, and `aria-describedby` when semantic HTML isn't sufficient
* All interactive elements must be keyboard accessible
* Ensure 4.5:1 contrast ratio for normal text, 3:1 for large text
* Use `aria-live="polite"` for status updates
* Watch out for misused/non-semantic elements (e.g., <div> instead of <section>)
* Strict Type Checking: Always enable and adhere to strict type checking. This helps catch errors early and improves code quality.
* Prefer Type Inference: Allow TypeScript to infer types when they are obvious from the context. This reduces verbosity while maintaining type safety.
* Avoid `any`: Do not use the `any` type unless absolutely necessary as it bypasses type checking. Prefer `unknown` when a type is uncertain and you need to handle it safely.
* Use strict null checks (no `null` or `undefined` without explicit handling)
* Use type guards and union types for robust type checking
* Check for missing return types in function signatures
* Avoid implicit `any` (untyped function parameters)
## Naming Conventions
* Use PascalCase for types, interfaces, and classes
* Use camelCase for variables, functions, and methods
* Use UPPER_CASE for constants
## Modern TypeScript Patterns
* Use optional chaining (`?.`) and nullish coalescing (`??`)
* Prefer `const` over `let`; never use `var`
* Use arrow functions for callbacks and short functions
* Avoid enums - they generate additional code at compile time, which increases the size of the final file. This can have a negative impact on the loading speed and performance of the app. Prefer union types or literal types instead.
* Avoid unhandled promise rejections (missing .catch() or try/catch)
* Standalone Components: Always use standalone components, directives, and pipes. Avoid using `NgModules` for new features or refactoring existing ones.
* Implicit Standalone: When creating standalone components, you do not need to explicitly set `standalone: true` inside the `@Component`, `@Directive` and `@Pipe` decorators, as it is implied by default.
* Lazy Loading: Implement lazy loading for feature routes to improve initial load times of your application.
* Use Angular Material or other modern UI libraries for consistent styling and UI components.
* Implement proper error handling with RxJS operators (e.g., catchError)
* Verify if newly added functionalities can utilize Angular Signals for fine-grained reactivity, reducing change detection overhead.
* Utilize AOT (Ahead-of-Time) compilation and tree-shaking for efficient, smaller bundle sizes.
* Prefer class binding over `ngClass` and `ngStyle` for better performance.
* Use protected on class members that are only used by a component's template, as it allows for better encapsulation while still being accessible to the template.
* Use readonly for properties that shouldn't change.
* Use `takeUntilDestroyed` & `destroyRef`: The `takeUntilDestroyed` and `destroyRef` have been introduced with Angular 16 and help to reduce boilerplate code related to unsubscribing on the `OnDestroy` hook.
* Organize the order of properties and methods in Angular components for readability and maintainability. Recommended order is:
1.**Injected services** Whether they are public or private, it's clear they are dependencies of the class.
2.**Inputs**: Properties that receive data from outside.
3.**Outputs**: Events that the component can trigger.
4.**ViewChild/ContentChild**: References to HTML elements.
5.**Public static properties**: Constants and static members that are accessible to everyone.
6.**Readonly properties**: Immutable public properties.
7.**Public properties**: Data and functions available to everyone.
8.**Private static properties**: Constants and static members that are only accessible within the class.
10.**Private properties**: Data and functions used only inside the component.
11.**Setters and Getters**: Methods for accessing and modifying properties.
12.**Constructor**: Used to initialize the component.
13.**Lifecycle Hooks**: Methods that run at specific times in the component’s lifecycle.
14.**Public methods**: Functions available to everyone.
15.**Private methods**: Functions used only inside the component.
## Components
* Single Responsibility: Keep components small, focused, and responsible for a single piece of functionality.
* Reactive Forms: Prefer Reactive forms over Template-driven forms for complex forms, validation, and dynamic controls due to their explicit, immutable, and synchronous nature.
* Use Typed Forms: Typed Forms in Angular are a new feature introduced in Angular 14 that provide stronger type checking for reactive forms. They allow developers to define the structure and types of form controls, making it easier to catch errors at compile-time rather than runtime.
## Services
* Single Responsibility: Design services around a single, well-defined responsibility.
*`providedIn: 'root'`: Use the `providedIn: 'root'` option when declaring injectable services to ensure they are singletons and tree-shakable.
*`inject()` Function: Prefer the `inject()` function over constructor injection when injecting dependencies, especially within `provide` functions, `computed` properties, or outside of constructor context.
## Unit testing
* Write unit tests for components, services, and pipes using Jasmine and Karma.
* Test cases should be reasonably groupped based on tested functionality/behaviour using describe blocks.
* Use plain English test names based on the should <expectedBehavior> when <stateUnderTest> pattern as a guideline.
* Use Angular's TestBed for component testing with mocked dependencies
* Avoid Direct Calls to Component Lifecycle Hooks: Instead of directly invoking lifecycle hooks like `ngOnInit()`, use Angular's testing utilities to trigger them naturally. For example, use `fixture.detectChanges()` to trigger change detection, which will automatically call `ngOnInit()` and other lifecycle hooks in the correct order.
* Use fixture.componentRef.setInput() Instead of Direct Input Assignment: When testing components with inputs, use `fixture.componentRef.setInput()` to set input values. This method ensures that Angular's change detection is properly triggered, allowing the component to react to input changes as it would in a real application.
* Use the Provide Mock Store for testing components that rely on NgRx state management. This allows you to mock the store and control the state during tests without needing to set up a full NgRx environment.
* Mock HTTP requests using provideHttpClientTesting
* Import only the minimal required modules
* Avoid NO_ERRORS_SCHEMA and CUSTOM_ELEMENTS_SCHEMA in tests to ensure proper error detection
@@ -103,8 +103,6 @@ Create a file next to the project's `package.json`, call it `proxy.conf.json` an
Note that if you are running the App, Content Service or Process Service on different ports, you should change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md).
| [Avatar](core/components/avatar.component.md) | Displays user avatars. |
| [Button](core/components/button.component.md) | A standard button component. |
| [Progress](core/components/progress.component.md) | A progress bar component. |
| [Header](core/components/adf-header.component.md) | A simple reusable application header component. |
### Components
@@ -114,7 +111,6 @@ A collection of Angular components for generic use.
| [Json Cell component](core/components/json-cell.component.md) | Shows a JSON-formatted value inside a datatable component. | [Source](../lib/core/src/lib/datatable/components/json-cell/json-cell.component.ts) |
| [Language Menu component](core/components/language-menu.component.md) | Displays all the languages that are present in "app.config.json" and the default (EN). | [Source](../lib/core/src/lib/language-menu/language-menu.component.ts) |
| [Login Dialog Panel component](core/components/login-dialog-panel.component.md) | Shows and manages a login dialog. | [Source](../lib/core/src/lib/login/components/login-dialog-panel.component.ts) |
| [Login Dialog component](core/components/login-dialog.component.md) | Allows a user to perform a login via a dialog. | [Source](../lib/core/src/lib/login/components/login-dialog.component.ts) |
| [Login component](core/components/login.component.md) | Authenticates to Alfresco Content Services and Alfresco Process Services. | [Source](../lib/core/src/lib/login/components/login.component.ts) |
| [Notification History component](core/components/notification-history.component.md)  | This component is in the current status just an experimental component. The main purpose of the Notification history component is list all the notification received in the current session. They will disappear from the list after the refresh. | [Source](../lib/core/src/lib/notifications/components/notification-history.component.ts) | |
| [Pagination Component](core/components/pagination.component.md) | Adds pagination to the component it is used with. | [Source](../lib/core/src/lib/pagination/pagination.component.ts) |
@@ -122,7 +118,6 @@ A collection of Angular components for generic use.
| [Sidebar action menu component](core/components/sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../lib/core/src/lib/layout/components/sidebar-action/sidebar-action-menu.component.ts) |
| [Sidenav Layout component](core/components/sidenav-layout.component.md) | Displays the standard three-region ADF application layout. | [Source](../lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts) |
| [Snackbar Content Component](core/components/snackbar-content.component.md) | Custom content for Snackbar which allows use icon as action. | [Source](../lib/core/src/lib/snackbar-content/snackbar-content.component.ts) |
| [Sorting Picker Component](core/components/sorting-picker.component.md) | Selects from a set of predefined sorting definitions and directions. | [Source](../lib/core/src/lib/sorting-picker/sorting-picker.component.ts) |
| [Start Form component](core/components/start-form.component.md) | Displays the Start Form for a process. | [Source](../lib/process-services/src/lib/form/start-form/start-form.component.ts) |
| [Text Mask directive](core/components/text-mask.component.md) | Implements text field input masks. | [Source](../lib/core/src/lib/form/components/widgets/text/text-mask.component.ts) |
| [Toolbar Divider Component](core/components/toolbar-divider.component.md) | Divides groups of elements in a Toolbar with a visual separator. | [Source](../lib/core/src/lib/toolbar/toolbar-divider.component.ts) |
@@ -142,7 +137,7 @@ A collection of Angular components for generic use.
| [Logout directive](core/directives/logout.directive.md) | Logs the user out when the decorated element is clicked. | [Source](../lib/core/src/lib/directives/logout.directive.ts) |
| [Node Download directive](core/directives/node-download.directive.md) | Allows folders and/or files to be downloaded, with multiple nodes packed as a '.ZIP' archive. | [Source](../lib/content-services/src/lib/directives/node-download.directive.ts) |
| [Upload Directive](core/directives/upload.directive.md) | Uploads content in response to file drag and drop. | [Source](../lib/core/src/lib/directives/upload.directive.ts) |
| [CardViewPropertyValidator Directive](core/directives/card-view-property-validator.directive.md) | Checks validators defined on property.| [Source](../lib/core/src/lib/card-view/directives/card-view-property-validator.directive.ts) |
### Dialogs
| Name | Description | Source link |
@@ -181,8 +176,6 @@ A collection of Angular components for generic use.
| [Format Space pipe](core/pipes/format-space.pipe.md) | Replaces all the white space in a string with a supplied character. | [Source](../lib/core/src/lib/pipes/format-space.pipe.ts) |
| [Full name pipe](core/pipes/full-name.pipe.md) | Joins the first and last name properties from a `UserLike` object into a single string. | [Source](../lib/core/src/lib/pipes/full-name.pipe.ts) |
| [Localized Date pipe](core/pipes/localized-date.pipe.md) | Converts a date to a given format and locale. | [Source](../lib/core/src/lib/pipes/localized-date.pipe.ts) |
| [Multi Value Pipe](core/pipes/multi-value.pipe.md) | Takes an array of strings and turns it into one string where items are separated by a separator. The default separator applied to the list is the comma , however, you can set your own separator in the params of the pipe. | [Source](../lib/core/src/lib/pipes/multi-value.pipe.ts) |
| [Node Name Tooltip pipe](core/pipes/node-name-tooltip.pipe.md) | Formats the tooltip for a Node. | [Source](../lib/content-services/src/lib/pipes/node-name-tooltip.pipe.ts) |
| [Text Highlight pipe](core/pipes/text-highlight.pipe.md) | Adds highlighting to words or sections of text that match a search string. | [Source](../lib/core/src/lib/pipes/text-highlight.pipe.ts) |
| [Time Ago pipe](core/pipes/time-ago.pipe.md) | Converts a recent past date into a number of days ago. | [Source](../lib/core/src/lib/pipes/time-ago.pipe.ts) |
| [User Initial pipe](core/pipes/user-initial.pipe.md) | Takes the name fields of a `UserLike` object and extracts and formats the initials. | [Source](../lib/core/src/lib/pipes/user-initial.pipe.ts) |
@@ -223,7 +216,6 @@ A collection of Angular components for generic use.
| [Identity user service](core/services/identity-user.service.md) | Gets OAuth2 personal details and roles for users and performs CRUD operations on identity users. | [Source](../lib/process-services-cloud/src/lib/people/services/identity-user.service.ts) |
| [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/src/lib/auth/services/jwt-helper.service.ts) |
| [Nodes Api service](core/services/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/content-services/src/lib/common/services/nodes-api.service.ts) |
| [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/src/lib/notifications/services/notification.service.ts) |
| [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](../lib/core/src/lib/common/services/page-title.service.ts) |
@@ -300,7 +292,6 @@ for more information about installing and using the source code.
| [Search number range component](content-services/components/search-number-range.component.md) | Implements a number range widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-number-range/search-number-range.component.ts) |
| [Search radio component](content-services/components/search-radio.component.md) | Implements a radio button list widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-radio/search-radio.component.ts) |
| [Search slider component](content-services/components/search-slider.component.md) | Implements a numeric slider widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts) |
| [Search Sorting Picker Component](content-services/components/search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.ts) |
| [Search text component](content-services/components/search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-text/search-text.component.ts) |
| [Sites Dropdown component](content-services/components/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/src/lib/content-node-selector/site-dropdown/sites-dropdown.component.ts) |
@@ -324,7 +315,6 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Auto Focus directive](content-services/directives/auto-focus.directive.md) | Automatically focuses HTML element after content is initialized. | [Source](../lib/content-services/src/lib/directives/auto-focus.directive.ts) |
| [Check Allowable Operation directive](content-services/directives/check-allowable-operation.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts) |
| [Node Public File Share Directive](content-services/directives/content-node-share.directive.md) | Creates and manages public shared links for files. | [Source](../lib/content-services/src/lib/content-node-share/content-node-share.directive.ts) |
| [File Draggable directive](content-services/directives/file-draggable.directive.md) | Provides drag-and-drop features for an element such as a div. | [Source](../lib/content-services/src/lib/upload/directives/file-draggable.directive.ts) |
| [Inherit Permission directive](content-services/directives/inherited-button.directive.md) | Update the current node by adding/removing the inherited permissions. | [Source](../lib/content-services/src/lib/permission-manager/components/inherited-button.directive.ts) |
@@ -333,7 +323,6 @@ for more information about installing and using the source code.
| [Node Lock directive](content-services/directives/node-lock.directive.md) | Locks or unlocks a node. | [Source](../lib/content-services/src/lib/directives/node-lock.directive.ts) |
| [Node Restore directive](content-services/directives/node-restore.directive.md) | Restores deleted nodes to their original location. | [Source](../lib/content-services/src/lib/directives/node-restore.directive.ts) |
| [Toggle Icon directive](content-services/directives/toggle-icon.directive.md) | Toggle icon on mouse or keyboard event for a selectable element. | [Source](../lib/content-services/src/lib/upload/directives/toggle-icon.directive.ts) |
| [Version Compatibility Directive](content-services/directives/version-compatibility.directive.md) | Enables/disables components based on ACS version in use. | [Source](../lib/content-services/src/lib/version-compatibility/version-compatibility.directive.ts) |
### Dialogs
@@ -347,7 +336,6 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Base Card View Content Update interface](content-services/interfaces/base-card-view-content-update.interface.md) | Specifies required properties and methods for Card View Content Update service. Extends from BaseCardViewUpdate. | [Source](../lib/content-services/src/lib/interfaces/base-card-view-content-update.interface.ts) | |
@@ -359,12 +347,6 @@ for more information about installing and using the source code.
| [Permission Style model](content-services/models/permissions-style.model.md) | Sets custom CSS styles for rows of a Document List according to the item's permissions. | [Source](../lib/content-services/src/lib/document-list/models/permissions-style.model.ts) |
| [Row Filter Model](content-services/models/row-filter.model.md) | Defines the Row Filter function used by the Document List Component. | [Source](../lib/content-services/document-list/data/row-filter.model.ts) |
### Pipes
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [File upload error pipe](content-services/pipes/file-upload-error.pipe.md) | Converts an upload error code to an error message. | [Source](../lib/content-services/src/lib/upload/pipes/file-upload-error.pipe.ts) |
### Services
| Name | Description | Source link |
@@ -444,7 +426,6 @@ for more information about installing and using the source code.
| [Process Audit Directive](process-services/directives/process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../lib/process-services/src/lib/process-list/components/process-audit/process-audit.directive.ts) |
| [Form cloud custom outcomes component](process-services-cloud/components/form-cloud-custom-outcome.component.md) | Supplies custom outcome buttons to be included in Form cloud component. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud-custom-outcomes.component.ts) |
| [Form cloud component](process-services-cloud/components/form-cloud.component.md) | Shows a form from Process Services. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts) |
| [Form Definition Selector Cloud](process-services-cloud/components/form-definition-selector-cloud.component.md) | Allows one form to be selected from a dropdown list. For forms to be displayed in this component they will need to be compatible with standAlone tasks. | [Source](../lib/process-services-cloud/src/lib/form/components/form-definition-selector-cloud.component.ts) |
This guide for migrating ADF from Angular version 15 to version 16. Follow these steps to ensure a smooth transition.
## 1. Update Nx
First, update the Nx development dependencies. Use the `nx migrate` command for this purpose.
```bash
npx nx migrate 16.10.0
```
Updated Nx dependencies:
```json
{
"nx":"16.10.0",
"@nx/angular":"16.10.0",
"@nx/eslint-plugin":"16.10.0",
"@nx/js":"16.10.0",
"@nx/node":"16.10.0",
"@nx/storybook":"19.6.2",
"@nx/workspace":"16.10.0"
}
```
**As of Nx 16 package scope has changed from `@nrwl/*` to `@nx/*`.**
Nx's migration scripts will replace all `@nrwl` references in the project with `@nx`. This includes any imports, configuration files, and scripts.
## 2. Run Nx migrations
After the initial update a `migrations.json` file will be created containing all the additional changes that need to be made. You can run the migration script to apply these changes.
```bash
npx nx migrate --run-migrations
```
Those migrations should update required packages to the Angular 16 compatible version including Angular itself, Storybook, and others.
```json
{
"@angular/animations":"16.2.9",
"@angular/cdk":"16.2.9",
"@angular/common":"16.2.9",
"@angular/compiler":"16.2.9",
"@angular/core":"16.2.9",
"@angular/forms":"16.2.9",
"@angular/material":"16.2.9",
"@angular/material-date-fns-adapter":"16.2.9",
"@angular/platform-browser":"16.2.9",
"@angular/platform-browser-dynamic":"16.2.9",
"@angular/router":"16.2.9",
"@schematics/angular":"16.2.9",
"ng-packagr":"16.2.3"
}
```
Reference `storybook-migration-summary.md` file for more details on Storybook migration.
## 3. Manually update other dependencies
There are a few dependencies that require manual update, here is the list:
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
Work through all the problems topic by topic. If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Despite Angular 16 not introducing major breaking changes, you may still encounter issues with unit tests. Run the unit tests and fix any problems that arise.
- delete `test-old-mocha` job from the project configuration
## 4. Fixing CI/CD issues
### General migration issues
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
Work through all the problems topic by topic. If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Despite Angular 16 not introducing major breaking changes, you may still encounter issues with unit tests. Run the unit tests and fix any problems that arise.
This guide describes how to migrate ADF from Angular version 17 to version 18. Follow these steps to ensure a smooth transition.
## 1. Update changed dependencies
Update the following packages in your `package.json`:
### dependencies
```json
{
"@angular/animations":"18.2.13",
"@angular/cdk":"18.2.14",
"@angular/common":"18.2.13",
"@angular/compiler":"18.2.13",
"@angular/core":"18.2.13",
"@angular/forms":"18.2.13",
"@angular/material":"18.2.14",
"@angular/material-date-fns-adapter":"18.2.14",
"@angular/platform-browser":"18.2.13",
"@angular/platform-browser-dynamic":"18.2.13",
"@angular/router":"18.2.13",
"@apollo/client":"3.13.1",
"@mat-datetimepicker/core":"14.0.0",
"apollo-angular":"10.0.3",
"minimatch-browser":"1.0.0",
"node-fetch":"^3.3.2",
"zone.js":"0.14.10"
}
```
### devDependencies
```json
{
"@angular-devkit/architect":"0.1802.13",
"@angular-devkit/build-angular":"18.2.14",
"@angular-devkit/core":"18.2.13",
"@angular-devkit/schematics":"18.2.13",
"@angular/compiler-cli":"18.2.13",
"@nx/angular":"19.2.0",
"@nx/js":"18.3.5",
"@nx/workspace":"18.3.5",
"@storybook/angular":"8.4.7",
"ng-packagr":"18.2.1",
"npm-run-all":"^4.1.5",
"postcss":"8.4.41",
"postcss-sass":"^0.5.0",
"tsconfig-paths":"^4.1.1",
"typescript":"5.5.4",
"webpack-cli":"^5.1.4"
}
```
## 2. Material mixins update
Angular Material 18 introduced Material 3 mixins as new default. As we are still using Material 2, we need to ensure that we are still using the Material 2 version.
In order to use Material 2 mixins, you need to add a `m2-` prefix to the mixins in your stylesheets. For example:
```scss
mat.define-typography-config()
mat.get-color-from-palette()
```
should be changed to:
```scss
mat.m2-define-typography-config()
mat.m2-get-color-from-palette()
```
## 3. Fixing CI/CD issues
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Run the unit tests and fix any problems that arise.
```bash
npx nx run-many --target=test --skip-nx-cache
```
## 4. Review Angular 18 breaking changes
Angular 18 is a minor update with no major breaking changes for most projects. However, always review the [Angular 18 changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) and [official update guide](https://angular.dev/update-guide?v=17.0-18.0).
@@ -378,7 +378,7 @@ displayed. The aspects to be displayed are calculated as an intersection of the
## Multi value card properties
Multi value properties are displayed one after another separated by a comma. This card makes use of the [Multi Value Pipe](../../core/pipes/multi-value.pipe.ts).
Multi value properties are displayed one after another separated by a comma.
To customize the separator used by this card you can set it in your `app.config.json` inside your content-metadata configuration:
| imageResolver | `any \| null` | null | Custom function to choose image file paths to show. See the [Image Resolver Model](image-resolver.model.md) page for more information. |
| field | string | Field to apply the query to. Required value |
| maxDate | string | A fixed date (default format: dd-MMM-yy) or the string `"today"` that will set the maximum searchable date. Default is today. |
| dateFormat | string | Date format. Dates used by the datepicker are Javascript Date objects, using [date-fns](https://date-fns.org/v2.30.0/docs/format) for formatting, so you can use any date format supported by the library. Default is 'dd-MMM-yy (sample date - 07-Jun-23) |
| initialValue | SearchDateRange | Initial value for the component |
| field | string | Field to apply the query to. Required value |
| maxDate | string | A fixed date (default format: dd-MMM-yy) or the string `"today"` that will set the maximum searchable date. Default is today. |
| dateFormat | string | Date format. Dates used by the datepicker are Javascript Date objects, using [date-fns](https://date-fns.org/v2.30.0/docs/format) for formatting, so you can use any date format supported by the library. Default is 'dd-MMM-yy (sample date - 07-Jun-23) |
| initialValue | SearchDateRange | Initial value for the component |
The [Check Allowable Operation Directive](../../../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts) lets you disable an HTML element or Angular component
by taking a collection of [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) instances and checking their permissions.
The decorated element will be disabled if:
- there are no nodes in the collection
- at least one of the nodes does not have the required permission
### HTML element example
A typical use case is to bind a [Document List](../components/document-list.component.md)
selection property to a toolbar button. In the following example, the "Delete" button should
be disabled if no selection is present or if user does not have permission to delete at least one node in the selection:
```html
<adf-toolbartitle="toolbar example">
<buttonmat-icon-button
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection">
<mat-icon>delete</mat-icon>
</button>
</adf-toolbar>
<adf-document-list#documentList...>
...
</adf-document-list>
```
The button will be disabled by default and will change state when the user selects or deselects
one or more documents that they have permission to delete.
### Angular component example
You can add the directive to any Angular component that implements the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts)
interface (the [Upload Drag Area component](../components/upload-drag-area.component.md),
for example). You can also use it in much the same way as you would with an HTML element:
```html
<alfresco-upload-drag-area
[rootFolderId]="..."
[versioning]="..."
[adf-check-allowable-operation]="'create'"
[adf-nodes]="getCurrentDocumentListNode()">
...
</alfresco-upload-drag-area>
```
To enable your own component to work with this directive, you need to implement the
[`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface and also define it as an
### Implementing the NodeAllowableOperationSubject interface
The component must implement the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface which means it must have a
boolean `disabled` property. This is the property that will be set by the directive:
**Note:** the usage of **viewProviders** (instead of **providers**) is very important, especially if you want to use this directive on a transcluded component.
@@ -47,12 +47,13 @@ Manages Document List information that is specific to a user.
-_includeFields:_`string[]` - List of data field names to include in the results
-_where:_`string` - (Optional) A string to restrict the returned objects by using a predicate
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of favorite files
-_pagination:_ [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts) - Specifies how to paginate the results
-_includeFields:_`string[]` - List of data field names to include in the results
-_where:_`string` - (Optional) Filters the Node list using the _where_ condition of the REST API (for example, isFolder=true). See the REST API documentation for more information.
-_filters:_`string[]` - Specifies additional filters to apply (joined with **AND**). Applied for '-recent-' only.
-**Returns**`any` - List of items contained in the folder
@@ -20,7 +20,7 @@ Adds and retrieves comments for nodes in Content Services.
Gets all comments that have been added to a task.
-_id:_`string` - ID of the target task
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../../lib/core/src/lib/models/comment.model.ts)`[]>` - Details for each comment
@@ -23,10 +23,10 @@ Manages tags in Content Services.
-_nodeId:_`string` - Id of node to which tags should be assigned.
-_tags:_`TagBody[]` - List of tags to create and assign or just assign if they already exist.
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagPaging.md)`|`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`>` - Just linked tags to node or single tag if linked only one tag.
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`[]>` - Created tags.
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagEntry) `|` [`TagPaging`](../../../lib/js-api/src/api/content-rest-api/docs/TagsApi.md#TagPaging)`>` - Created tags.
@@ -464,6 +464,8 @@ Learn more about styling your datatable: [Customizing the component's styles](#c
## Details
This component supports rows reordering via keyboard. To enable it first set `enableDragRows` to `true`, focus any selected row and use shift + ArrowUp/ArrowDown combination to reorder selected row.
### Supplying data for the table
The column layout and row data are supplied to the table using an object that implements the
# [Icon Component](../../../lib/core/src/lib/icon/icon.component.ts "Defined in icon.component.ts")
@@ -29,7 +29,9 @@ Provides a universal way of rendering registered and named icons.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Theme color palette for the component. |
| fontSet | `string` | | Icon font set. |
| value | `string` | | Icon value, which can be either a ligature name or a custom icon in the format `[namespace]:[name]`. |
| isSvg | `boolean` | false | Is icon of type svg. |
## Details
@@ -78,6 +80,73 @@ using the `adf:` namespace.
<adf-iconvalue="adf:image/gif"></adf-icon>
```
### Icon alias mapping
The Icon Alias Mapping feature allows you to provide custom icon value mappings at runtime using the `ICON_ALIAS_MAP_TOKEN` injection token. When an icon value matches a key in the alias map, the component automatically replaces it with the mapped value. This is useful for creating consistent icon conventions across your application without modifying component code.
**How icon name replacement works:**
When you provide an alias map, the component checks if the icon value matches any key in the map. If a match is found, the icon name is replaced with the corresponding mapped value. This happens automatically and transparently:
- Original icon name: `icon-mock`
- Alias map entry: `'icon-mock': 'alias-mock'`
- Result: Icon renders as `alias-mock` instead of `icon-mock`
This allows you to:
- **Rename icons** without changing component code
- **Support legacy icon names** by mapping them to new ones
- **Centralize icon naming conventions** in your application
- **Create icon aliases** for shorter or more descriptive names
# [Login Dialog component](../../../lib/core/src/lib/login/components/login-dialog.component.ts "Defined in login-dialog.component.ts")
Allows a user to perform a login via a dialog.
## Details
The [Login Dialog component](login-dialog.component.md) allows you to perform a login via a dialog.
### Showing the dialog
Unlike most components, the [Login Dialog Component](login-dialog.component.md) is typically shown in a dialog box
rather than the main page and you are responsible for opening the dialog yourself. You can use the
[Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this,
as shown in the usage example. ADF provides the [`LoginDialogComponentData`](../../../lib/core/src/lib/login/components/login-dialog-component-data.interface.ts) interface
//action called when an action or cancel is clicked on the dialog
this.dialog.closeAll();
});
}
```
All the results will be streamed to the logged [subject](http://reactivex.io/rxjs/manual/overview.html#subject) present in the [`LoginDialogComponentData`](../../../lib/core/src/lib/login/components/login-dialog-component-data.interface.ts) object passed to the dialog.
When the dialog action is selected by clicking, the `data.logged` stream will be completed.
@@ -64,6 +64,7 @@ Using with file [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob):
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| viewerTemplateExtensions | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | Template containing ViewerExtensionDirective instances providing different viewer extensions based on supported file extension. |
| nodeId | `string` | null | Identifier of a node opened by a viewer. |
| customError | `string` | undefined | Custom error message to be displayed in the viewer. |
### Events
@@ -75,12 +76,14 @@ Using with file [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob):
| Left | Invoke 'Navigate before' action. Disabled in image edit mode. |
| Right | Invoke 'Navigate next' action. Disabled in image edit mode. |
| Shift + Arrow Key | Increase image crop area. Active only in image edit mode. |
| Alt + Arrow Key | Decrease image crop area. Active only in image edit mode. |
| Ctrl+F | Activate full-screen mode. |
## Details
@@ -205,22 +208,24 @@ The Viewer supports dynamically-loaded viewer preview extensions, to know more a
#### Code extension mechanism
You can define your own custom handler to override supported file formats or handle other file formats that are not yet supported by
the [Viewer render component](viewer.component.md). In order to do that first you need to define a template containing at least one `adf-viewer-extension`:
the [Viewer render component](viewer.component.md). In order to do that first you need to define a template containing at least one `adf-viewer-extension`. `contentLoaded` should be an `EventEmitter` that will emit as soon as the component responsible for rendering finishes.
| overlayMode | `boolean` | false | If`true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| readOnly | `boolean` | true | Enable when where is possible the editing functionalities |
| allowedEditActions | `{ [key: string]: boolean }` | `{ rotate: true, crop: true }` | Controls which editing actions are enabled when not in read-only mode. Allows granular control over actions like rotation and cropping. |
| showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. |
| showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. |
| showToolbar | `boolean` | true | Hide or show the toolbar |
| showViewer | `boolean` | true | Hide or show the viewer |
| sidebarLeftTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the left sidebar. The template context contains the loaded node data. |
| sidebarLeftTemplateContext | | null | Context object available for binding by the local sidebarLeftTemplate with let declarations. |
| sidebarRightTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the right sidebar. The template context contains the loaded node data. |
| sidebarRightTemplateContext | | null | Context object available for binding by the local sidebarRightTemplate with let declarations. |
| tracks | [`Track`](../../../lib/core/src/lib/viewer/models/viewer.model.ts)`[]` | \[] | media subtitles for the media player |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| viewerExtensions | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | Template containing ViewerExtensionDirective instances providing different viewer extensions based on supported file extension. |
| nodeId | `string` | null | Identifier of a node opened by a viewer. |
| nodeMimeType | `string` | undefined | Original node mime type, should be provided when renditiona mime type is different. |
| overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| readOnly | `boolean` | true | Enable when where is possible the editing functionalities |
| allowedEditActions | `{ [key: string]: boolean }` | `{ rotate: true, crop: true }` | Controls which editing actions are enabled when not in read-only mode. Allows granular control over actions like rotation and cropping. |
| showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. |
| showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. |
| showToolbar | `boolean` | true | Hide or show the toolbar |
| showViewer | `boolean` | true | Hide or show the viewer |
| sidebarLeftTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the left sidebar. The template context contains the loaded node data. |
| sidebarLeftTemplateContext | | null | Context object available for binding by the local sidebarLeftTemplate with let declarations. |
| sidebarRightTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the right sidebar. The template context contains the loaded node data. |
| sidebarRightTemplateContext | | null | Context object available for binding by the local sidebarRightTemplate with let declarations. |
| tracks | [`Track`](../../../lib/core/src/lib/viewer/models/viewer.model.ts)`[]` | \[] | media subtitles for the media player |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| viewerExtensions | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | Template containing ViewerExtensionDirective instances providing different viewer extensions based on supported file extension. |
| nodeId | `string` | null | Identifier of a node opened by a viewer. |
| nodeMimeType | `string` | undefined | Original node mime type, should be provided when renditiona mime type is different. |
| customError | `string` | undefined | Custom error message to be displayed in the viewer. |
### Events
@@ -103,12 +105,14 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
| property | [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts) | | Property for which validations should be triggered. |
| validated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string[]>` | Emitted after validation. Emits list of errors or empty array if input is valid. |
| actionsTemplate | `TemplateRef<any>` | | Inserts a template styled on the left. Should be used for additional `mat-button` style buttons. (optional) |
| actionsTemplate | `TemplateRef<unknown>` | | Inserts a template styled on the left. Should be used for additional `mat-button` style buttons. (optional) |
@@ -43,6 +43,7 @@ Contains the value and metadata for a field of a [`Form`](../../../lib/process-s
| displayText | string | | Displayed text for Hyperlink widgets |
| isVisible | boolean | true | Is the field shown on the form? |
| visibilityCondition | [`WidgetVisibilityModel`](../../../lib/core/src/lib/form/models/widget-visibility.model.ts) | null | Defines a expression that determines whether the field is visible or not, based on its logical relation to values in other fields |
| checkParentVisibilityForValidation | boolean | false | When enabled (and `FormModel.enableParentVisibilityCheck` is true), validation will be skipped if the field's parent container/group/section is hidden, even if the field itself is visible. |
| enableFractions | boolean | false | Are numeric values allowed to contain a decimal point? |
| currency | string | null | Currency symbol for Amount widgets |
|enableParentVisibilityCheck| boolean | false|Enables checking parent container/group/section visibility for validation. When enabled, fields with `checkParentVisibilityForValidation: true` will skip validation if their parent is hidden.|
## Methods
@@ -112,3 +113,5 @@ Contains the value and metadata for a form.
Checks if a field or any of its parent containers/groups/sections is hidden. Returns true if the field should skip validation. Only checks parent visibility if `enableParentVisibilityCheck` is true and the field has `checkParentVisibilityForValidation` set to true.
# [Decimal Number Pipe](../../../lib/core/src/lib/pipes/decimal-number.pipe.ts "Defined in decimal-number.pipe.ts")
# Decimal Number Pipe
Transforms a number to have a certain amount of digits in its integer part and also in its decimal part.
@@ -15,7 +15,7 @@ Transforms a number to have a certain amount of digits in its integer part and a
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| digitsInfo | [`DecimalNumberModel`](../../../lib/core/src/lib/models/decimal-number.model.ts) | | A format to apply to the date value. [Date Pipe Formats.](https://angular.io/api/common/DatePipe#custom-format-options) |
| digitsInfo | `DecimalNumberModel` | | A format to apply to the date value. [Date Pipe Formats.](https://angular.io/api/common/DatePipe#custom-format-options) |
| locale | string | 'en-US' | A locale id for the locale format rules to use. |
## Details
@@ -30,11 +30,11 @@ This pipe transforms a given number so it follows the set configuration for the
}
```
You can also overwrite this config by passing a [`DecimalNumberModel`](../../../lib/core/src/lib/models/decimal-number.model.ts) as an argument for this pipe.
You can also overwrite this config by passing a `DecimalNumberModel` as an argument for this pipe.
The number can be also localized so it applies commas and dots in the right place depending on the locale id in use.
# [Multi Value Pipe](../../../lib/core/src/lib/pipes/multi-value.pipe.ts "Defined in multi-value.pipe.ts")
Takes an array of strings and turns it into one string where items are separated by a separator. The default separator applied to the list is the comma `,` however, you can set your own separator in the params of the pipe.
Gets information about the user currently logged into APS.
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/UserRepresentation.md)`>` - User information
-**getBpmUsername**(): `string`<br/>
Gets the BPM username
-**Returns**`string` - The BPM username
-**getEcmUsername**(): `string`<br/>
Gets the ECM username.
-**Returns**`string` - The ECM username
-**getRedirect**(): `string`<br/>
Gets the URL to redirect to after login.
-**Returns**`string` - The redirect URL
-**getTicketBpm**(): `string|null`<br/>
Gets the BPM ticket stored in the Storage.
-**Returns**`string|null` - The ticket or `null` if none was found
-**getTicketEcm**(): `string|null`<br/>
Gets the ECM ticket stored in the Storage.
-**Returns**`string|null` - The ticket or `null` if none was found
-**getTicketEcmBase64**(): `string|null`<br/>
Gets the BPM ticket from the Storage in Base 64 format.
-**Returns**`string|null` - The ticket or `null` if none was found
-_rememberMe:_`boolean` - Stores the user's login details if true
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<Function>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
-_rememberMe:_`boolean` - (Optional) Stores the user's login details if true
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<{ type: string; ticket: any }>` - An Observable that emits an object containing the authentication type (`type`) and the authentication ticket (`ticket`) upon successful login.
-**logout**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> Logs the user out.
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Response event called when logout is complete
-_url:_ [`RedirectionModel`](../../../lib/core/src/lib/auth/models/redirection.model.ts) - (Optional) URL to redirect to
-**ssoImplicitLogin**()<br/>
Logs the user in with SSO
-**reset**(): `void`<br/>Resets the authentication state of the service.
-**on**(event: `string`, listener: `Function`): `void`<br/> Adds an event listener for the specified event.
-**off**(event: `string`, listener?: `Function`): `void`<br/> Removes an event listener for the specified event.
-**once**(event: `string`, listener: `Function`): `void`<br/> Adds a one-time event listener for the specified event.
-**emit**(event: `string`, ...args: `any[]`): `void`<br/> Emits an event with optional arguments.
-**onLogin**: [`Subject`](https://reactivex.io/documentation/subject)`<any>`<br/> Emitted when the user logs in successfully.
-**onLogout**: [`Subject`](https://reactivex.io/documentation/subject)`<any>`<br/> Emitted when the user logs out.
-**onTokenReceived**: [`Subject`](https://reactivex.io/documentation/subject)`<any>`<br/> Emitted when an authentication token is received.
-**onError**: [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/> An Observable that emits an error object when an authentication-related error occurs.
@@ -98,6 +98,11 @@ Accesses and manipulates ACS document nodes using their node IDs.
-_nodeId:_`string` - ID of the target node
-_jobId:_`string` - ID of the job started by the `initiateFolderSizeCalculation` request
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SizeDetailsEntry`](../../../lib/js-api/src/api/content-rest-api/docs/NodesApi.md#sizedetailsentry)`>` - Details of the folder
-_opts:_`{ where?: string; includeSource?: boolean;} & NodesIncludeQuery & ContentPagingQuery` - additional options that API can take
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeAssociationPaging`](../../../lib/js-api/src/api/content-rest-api/docs/NodesApi.md#NodeAssociationPaging)`>` - List of node's parents.
@@ -40,6 +40,10 @@ Manipulates content related to a Process Instance or Task Instance in APS.
Gets the thumbnail for a related content file.
-_contentId:_`number` - ID of the related content
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the thumbnail image
Gets the preview rendition for a related content file.
-_contentId:_`number` - ID of the related content
-**Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the related content
As soon as you assign the storage prefix, all settings that you get or set via the [`UserPreferencesService`](../../core/services/user-preferences.service.md) will be saved to a dedicated profile.
As soon as you assign the storage prefix, all settings that you get or set via the `UserPreferencesService` will be saved to a dedicated profile.
You can import the service into your controller and use its APIs as shown below:
@@ -96,7 +96,7 @@ The service also provides quick access to a set of the "known" properties used a
| ---- | ---- | ----------- |
| authType | `string` | Authorization type (can be "ECM", "BPM" or "ALL"). |
| disableCSRF | `boolean` | Prevents the CSRF Token from being submitted if true. Only valid for Process Services. |
@@ -112,7 +112,13 @@ whole set of user properties. This is useful when a component needs to react to
```
You can also use the `select` method to get notification when a particular property is changed.
A set of basic properties is added into the enumeration [`UserPreferenceValues`](lib/core/src/lib/services/user-preferences.service.ts) which gives you the key value to access the standard user preference service properties: **PaginationSize**, **DisableCSRF**, **Locale**, **SupportedPageSizes** and **ExpandedSideNavStatus**.
A set of basic properties is added into the enumeration `UserPreferenceValues` which gives you the key value to access the standard user preference service properties:
-`PaginationSize`
-`DisableCSRF`
-`Locale`
-`SupportedPageSizes`
-`ExpandedSideNavStatus`
```ts
userPreferences.disableCSRF=true;
@@ -120,3 +126,58 @@ A set of basic properties is added into the enumeration [`UserPreferenceValues`]
console.log(CSRFflag);//this will be true;
});
```
### Convenience Observables and Signals
For commonly accessed preferences like `locale`, the service provides both observables and signals that simplify access patterns.
#### Using Signals (Recommended - No Subscription Needed!)
Signals automatically handle cleanup and don't require manual unsubscription:
// Observable - requires takeUntilDestroyed() to prevent memory leaks
this.userPreferences.locale$
.pipe(takeUntilDestroyed())
.subscribe(locale=>{
this.currentLocale=locale;
});
}
```
Available observables:
-`locale$` - Observable for locale changes
-`paginationSize$` - Observable for pagination size changes
-`supportedPageSizes$` - Observable for supported page sizes changes
**Note:** When subscribing to observables from a singleton service in a component, always use `takeUntilDestroyed()` or `takeUntil()` to prevent memory leaks.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.