@alfresco/aca-content 5.2.0 → 5.3.0-11955434723

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/esm2022/folder-rules/manage-rules/manage-rules.smart-component.mjs +13 -17
  2. package/esm2022/folder-rules/rule-details/actions/rule-action.ui-component.mjs +9 -12
  3. package/esm2022/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.mjs +8 -12
  4. package/esm2022/folder-rules/rule-details/rule-details.ui-component.mjs +8 -12
  5. package/esm2022/folder-rules/rule-list/rule-list/rule-list.ui-component.mjs +5 -7
  6. package/esm2022/folder-rules/rule-set-picker/rule-set-picker.smart-component.mjs +7 -10
  7. package/esm2022/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.mjs +8 -11
  8. package/esm2022/lib/components/common/toggle-shared/toggle-shared.component.mjs +6 -11
  9. package/esm2022/lib/components/context-menu/context-menu-outside-event.directive.mjs +7 -12
  10. package/esm2022/lib/components/context-menu/context-menu.component.mjs +2 -2
  11. package/esm2022/lib/components/details/details.component.mjs +4 -3
  12. package/esm2022/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.mjs +5 -10
  13. package/esm2022/lib/components/dl-custom-components/name-column/name-column.component.mjs +8 -12
  14. package/esm2022/lib/components/files/files.component.mjs +9 -8
  15. package/esm2022/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.mjs +12 -15
  16. package/esm2022/lib/components/info-drawer/metadata-tab/metadata-tab.component.mjs +12 -16
  17. package/esm2022/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.mjs +7 -10
  18. package/esm2022/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.mjs +6 -11
  19. package/esm2022/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.mjs +5 -8
  20. package/esm2022/lib/components/search/search-input/search-input.component.mjs +6 -9
  21. package/esm2022/lib/components/search/search-input-control/search-input-control.component.mjs +2 -8
  22. package/esm2022/lib/components/search/search-libraries-results/search-libraries-results.component.mjs +3 -3
  23. package/esm2022/lib/components/search/search-results/search-results.component.mjs +2 -3
  24. package/esm2022/lib/components/search/search-results-row/search-results-row.component.mjs +7 -11
  25. package/esm2022/lib/components/search/search-save/sidenav/save-search-sidenav.component.mjs +5 -10
  26. package/esm2022/lib/components/shared-link-view/shared-link-view.component.mjs +8 -11
  27. package/esm2022/lib/components/sidenav/components/sidenav-header.component.mjs +5 -10
  28. package/esm2022/lib/components/sidenav/directives/active-link.directive.mjs +6 -6
  29. package/esm2022/lib/components/sidenav/directives/expansion-panel.directive.mjs +7 -11
  30. package/esm2022/lib/components/sidenav/directives/menu-panel.directive.mjs +7 -11
  31. package/esm2022/lib/components/sidenav/sidenav.component.mjs +9 -13
  32. package/esm2022/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.mjs +6 -10
  33. package/esm2022/lib/components/upload-files-dialog/upload-files-dialog.component.mjs +4 -9
  34. package/esm2022/lib/components/view-profile/view-profile.component.mjs +4 -9
  35. package/esm2022/lib/directives/document-list.directive.mjs +8 -12
  36. package/esm2022/viewer/lib/components/preview/preview.component.mjs +9 -11
  37. package/esm2022/viewer/lib/components/viewer/viewer.component.mjs +15 -16
  38. package/fesm2022/alfresco-aca-content-folder-rules.mjs +27 -49
  39. package/fesm2022/alfresco-aca-content-folder-rules.mjs.map +1 -1
  40. package/fesm2022/alfresco-aca-content-viewer.mjs +16 -20
  41. package/fesm2022/alfresco-aca-content-viewer.mjs.map +1 -1
  42. package/fesm2022/alfresco-aca-content.mjs +73 -168
  43. package/fesm2022/alfresco-aca-content.mjs.map +1 -1
  44. package/folder-rules/manage-rules/manage-rules.smart-component.d.ts +3 -5
  45. package/folder-rules/rule-details/actions/rule-action.ui-component.d.ts +4 -5
  46. package/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.d.ts +3 -4
  47. package/folder-rules/rule-details/rule-details.ui-component.d.ts +4 -5
  48. package/folder-rules/rule-list/rule-list/rule-list.ui-component.d.ts +3 -4
  49. package/folder-rules/rule-set-picker/rule-set-picker.smart-component.d.ts +3 -5
  50. package/lib/components/bulk-actions-dropdown/bulk-actions-dropdown.component.d.ts +3 -4
  51. package/lib/components/common/toggle-shared/toggle-shared.component.d.ts +4 -5
  52. package/lib/components/context-menu/context-menu-outside-event.directive.d.ts +3 -4
  53. package/lib/components/context-menu/context-menu.component.d.ts +1 -1
  54. package/lib/components/details/details.component.d.ts +1 -2
  55. package/lib/components/dl-custom-components/datatable-cell-badges/datatable-cell-badges.component.d.ts +3 -4
  56. package/lib/components/dl-custom-components/name-column/name-column.component.d.ts +3 -4
  57. package/lib/components/files/files.component.d.ts +1 -1
  58. package/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.d.ts +4 -6
  59. package/lib/components/info-drawer/metadata-tab/metadata-tab.component.d.ts +6 -7
  60. package/lib/components/knowledge-retrieval/search-ai/agents-button/agents-button.component.d.ts +3 -4
  61. package/lib/components/knowledge-retrieval/search-ai/search-ai-input/search-ai-input.component.d.ts +3 -4
  62. package/lib/components/knowledge-retrieval/search-ai/search-ai-results/search-ai-results.component.d.ts +2 -3
  63. package/lib/components/search/search-input/search-input.component.d.ts +1 -2
  64. package/lib/components/search/search-input-control/search-input-control.component.d.ts +2 -5
  65. package/lib/components/search/search-results/search-results.component.d.ts +0 -1
  66. package/lib/components/search/search-results-row/search-results-row.component.d.ts +3 -4
  67. package/lib/components/search/search-save/sidenav/save-search-sidenav.component.d.ts +3 -5
  68. package/lib/components/shared-link-view/shared-link-view.component.d.ts +4 -5
  69. package/lib/components/sidenav/components/sidenav-header.component.d.ts +3 -4
  70. package/lib/components/sidenav/directives/active-link.directive.d.ts +1 -1
  71. package/lib/components/sidenav/directives/expansion-panel.directive.d.ts +3 -4
  72. package/lib/components/sidenav/directives/menu-panel.directive.d.ts +3 -4
  73. package/lib/components/sidenav/sidenav.component.d.ts +3 -4
  74. package/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.d.ts +3 -4
  75. package/lib/components/upload-files-dialog/upload-files-dialog.component.d.ts +1 -27
  76. package/lib/components/view-profile/view-profile.component.d.ts +2 -4
  77. package/lib/directives/document-list.directive.d.ts +3 -5
  78. package/package.json +5 -5
  79. package/viewer/lib/components/preview/preview.component.d.ts +3 -4
  80. package/viewer/lib/components/viewer/viewer.component.d.ts +2 -2
@@ -3,7 +3,7 @@ import { CardViewSelectItemModel, CardViewTextItemModel, CardViewBoolItemModel,
3
3
  import * as i2$4 from '@alfresco/adf-extensions';
4
4
  import { provideExtensionConfig } from '@alfresco/adf-extensions';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, forwardRef, Component, ViewEncapsulation, inject, Input, HostBinding, EventEmitter, Output, Inject, ChangeDetectionStrategy, NgModule } from '@angular/core';
6
+ import { Injectable, forwardRef, Component, ViewEncapsulation, inject, DestroyRef, Input, HostBinding, EventEmitter, Output, Inject, ChangeDetectionStrategy, NgModule } from '@angular/core';
7
7
  import { canEditFolder, hasFolderSelected, isNotFavorites, isSmartFolder } from '@alfresco/aca-shared/rules';
8
8
  import * as i3$2 from '@angular/router';
9
9
  import { RouterModule } from '@angular/router';
@@ -19,10 +19,10 @@ import * as i9$1 from '@angular/material/icon';
19
19
  import { MatIconModule } from '@angular/material/icon';
20
20
  import * as i3$1 from '@angular/forms';
21
21
  import { NG_VALUE_ACCESSOR, FormGroup, FormControl, ReactiveFormsModule, FormArray, Validators, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
22
- import { BehaviorSubject, from, Subject, of, forkJoin, startWith, combineLatest } from 'rxjs';
23
- import { map, finalize, first, takeUntil, distinctUntilChanged, debounceTime, switchMap, catchError, tap, delay } from 'rxjs/operators';
22
+ import { map, finalize, first, distinctUntilChanged, debounceTime, switchMap, catchError, tap, delay } from 'rxjs/operators';
24
23
  import * as i1 from '@alfresco/adf-content-services';
25
24
  import { CategoryService, TagService, NodeAction, ContentNodeSelectorComponent, CategorySelectorDialogComponent, ContentNodeSelectorModule } from '@alfresco/adf-content-services';
25
+ import { BehaviorSubject, from, of, Subject, forkJoin, startWith, combineLatest } from 'rxjs';
26
26
  import * as i5 from '@angular/material/form-field';
27
27
  import { MatFormFieldModule } from '@angular/material/form-field';
28
28
  import * as i7 from '@angular/material/input';
@@ -41,6 +41,7 @@ import * as i9 from '@angular/material/progress-spinner';
41
41
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
42
42
  import * as i2$2 from '@alfresco/aca-shared';
43
43
  import { AppSettingsService, PageLayoutComponent, GenericErrorComponent, PluginEnabledGuard } from '@alfresco/aca-shared';
44
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
44
45
  import { ActionsApi } from '@alfresco/js-api';
45
46
  import * as i2$3 from '@angular/material/slide-toggle';
46
47
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
@@ -621,8 +622,8 @@ class RuleSimpleConditionUiComponent {
621
622
  autoCompleteOptions = [];
622
623
  showLoadingSpinner;
623
624
  readOnly = false;
624
- onDestroy$ = new Subject();
625
625
  autoCompleteOptionsSubscription;
626
+ destroyRef = inject(DestroyRef);
626
627
  disabledTags = !this.tagService.areTagsEnabled();
627
628
  disabledCategories = !this.categoryService.areCategoriesEnabled();
628
629
  fields = ruleConditionFields.filter((condition) => !((this.disabledTags && condition.name === 'tag') || (this.disabledCategories && condition.name === 'category')));
@@ -690,23 +691,19 @@ class RuleSimpleConditionUiComponent {
690
691
  this.parameterControl.setValue('');
691
692
  }
692
693
  }
693
- ngOnDestroy() {
694
- this.onDestroy$.next();
695
- this.onDestroy$.complete();
696
- }
697
694
  ngOnInit() {
698
- this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe((value) => {
695
+ this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
699
696
  this.onChange(value);
700
697
  this.onTouch();
701
698
  });
702
699
  this.form
703
700
  .get('field')
704
- .valueChanges.pipe(distinctUntilChanged(), takeUntil(this.onDestroy$))
701
+ .valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
705
702
  .subscribe((field) => {
706
703
  if (field === 'category') {
707
704
  this.autoCompleteOptionsSubscription = this.form
708
705
  .get('parameter')
709
- .valueChanges.pipe(distinctUntilChanged(), debounceTime(AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME), takeUntil(this.onDestroy$))
706
+ .valueChanges.pipe(distinctUntilChanged(), debounceTime(AUTOCOMPLETE_OPTIONS_DEBOUNCE_TIME), takeUntilDestroyed(this.destroyRef))
710
707
  .subscribe((categoryName) => {
711
708
  this.getCategories(categoryName);
712
709
  });
@@ -996,7 +993,6 @@ class RuleActionUiComponent {
996
993
  });
997
994
  cardViewItems = [];
998
995
  parameters = {};
999
- onDestroy$ = new Subject();
1000
996
  get selectedActionDefinitionId() {
1001
997
  return this.form.get('actionDefinitionId').value;
1002
998
  }
@@ -1005,6 +1001,7 @@ class RuleActionUiComponent {
1005
1001
  }
1006
1002
  onChange = () => undefined;
1007
1003
  onTouch = () => undefined;
1004
+ destroyRef = inject(DestroyRef);
1008
1005
  constructor(cardViewUpdateService, dialog, translate, tagService, categoryService, securityControlsService) {
1009
1006
  this.cardViewUpdateService = cardViewUpdateService;
1010
1007
  this.dialog = dialog;
@@ -1034,7 +1031,7 @@ class RuleActionUiComponent {
1034
1031
  }
1035
1032
  ngOnInit() {
1036
1033
  this.actionDefinitions = this.actionDefinitions.sort((firstActionDefinition, secondActionDefinition) => firstActionDefinition.title.localeCompare(secondActionDefinition.title));
1037
- this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
1034
+ this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1038
1035
  this.setDefaultParameters();
1039
1036
  this.setCardViewProperties();
1040
1037
  this.onChange({
@@ -1043,7 +1040,7 @@ class RuleActionUiComponent {
1043
1040
  });
1044
1041
  this.onTouch();
1045
1042
  });
1046
- this.cardViewUpdateService.itemUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe((updateNotification) => {
1043
+ this.cardViewUpdateService.itemUpdated$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((updateNotification) => {
1047
1044
  const isSecurityGroupUpdated = updateNotification.target.key === 'securityGroupId';
1048
1045
  if (isSecurityGroupUpdated) {
1049
1046
  this.parameters.securityMarkId = null;
@@ -1076,10 +1073,6 @@ class RuleActionUiComponent {
1076
1073
  }
1077
1074
  }
1078
1075
  }
1079
- ngOnDestroy() {
1080
- this.onDestroy$.next();
1081
- this.onDestroy$.complete();
1082
- }
1083
1076
  setCardViewProperties(securityMarkOptions) {
1084
1077
  const disabledTags = !this.tagService.areTagsEnabled();
1085
1078
  const disabledCategories = !this.categoryService.areCategoriesEnabled();
@@ -1193,7 +1186,7 @@ class RuleActionUiComponent {
1193
1186
  data,
1194
1187
  width: '630px'
1195
1188
  });
1196
- data.select.pipe(takeUntil(this.onDestroy$)).subscribe((selections) => {
1189
+ data.select.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((selections) => {
1197
1190
  if (selections[0].id) {
1198
1191
  this.writeValue({
1199
1192
  actionDefinitionId: this.selectedActionDefinitionId,
@@ -1561,7 +1554,6 @@ class RuleDetailsUiComponent {
1561
1554
  nodeId = '';
1562
1555
  formValidationChanged = new EventEmitter();
1563
1556
  formValueChanged = new EventEmitter();
1564
- onDestroy$ = new Subject();
1565
1557
  form;
1566
1558
  errorScriptConstraint;
1567
1559
  get name() {
@@ -1579,6 +1571,7 @@ class RuleDetailsUiComponent {
1579
1571
  get showOptionsSection() {
1580
1572
  return !this.readOnly || this.value.isAsynchronous || this.value.isInheritable;
1581
1573
  }
1574
+ destroyRef = inject(DestroyRef);
1582
1575
  constructor(categoryService) {
1583
1576
  this.categoryService = categoryService;
1584
1577
  }
@@ -1605,12 +1598,12 @@ class RuleDetailsUiComponent {
1605
1598
  })
1606
1599
  });
1607
1600
  this.form.statusChanges
1608
- .pipe(map(() => this.form.valid), distinctUntilChanged(), takeUntil(this.onDestroy$))
1601
+ .pipe(map(() => this.form.valid), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
1609
1602
  .subscribe((value) => {
1610
1603
  this.formValidationChanged.emit(value);
1611
1604
  });
1612
1605
  this.formValidationChanged.emit(this.form.valid);
1613
- this.form.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
1606
+ this.form.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1614
1607
  this.formValueChanged.emit(this.value);
1615
1608
  });
1616
1609
  if (this.readOnly) {
@@ -1624,10 +1617,6 @@ class RuleDetailsUiComponent {
1624
1617
  : 'ACA_FOLDER_RULES.RULE_DETAILS.PLACEHOLDER.DESCRIPTION';
1625
1618
  this.errorScriptConstraint = this.parameterConstraints.find((parameterConstraint) => parameterConstraint.name === 'script-ref');
1626
1619
  }
1627
- ngOnDestroy() {
1628
- this.onDestroy$.next();
1629
- this.onDestroy$.complete();
1630
- }
1631
1620
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: RuleDetailsUiComponent, deps: [{ token: i1.CategoryService }], target: i0.ɵɵFactoryTarget.Component });
1632
1621
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: RuleDetailsUiComponent, isStandalone: true, selector: "aca-rule-details", inputs: { readOnly: "readOnly", value: "value", preview: "preview", actionDefinitions: "actionDefinitions", parameterConstraints: "parameterConstraints", nodeId: "nodeId" }, outputs: { formValidationChanged: "formValidationChanged", formValueChanged: "formValueChanged" }, host: { classAttribute: "aca-rule-details" }, ngImport: i0, template: "<form class=\"aca-rule-details__form\" [ngClass]=\"{ 'aca-read-only': readOnly }\" [formGroup]=\"form\">\n\n <ng-container *ngIf=\"!preview\">\n <div class=\"aca-rule-details__form__row\">\n <label class=\"aca-rule-details__name__label\" for=\"rule-details-name-input\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.NAME' | translate }}</label>\n <div>\n <mat-form-field appearance=\"fill\" floatLabel='always' class=\"aca-rule-details__form__row__field\">\n <mat-label *ngIf=\"!name.value\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.PLACEHOLDER.NAME' | translate }}</mat-label>\n <input\n id=\"rule-details-name-input\"\n matInput type=\"text\" formControlName=\"name\" data-automation-id=\"rule-details-name-input\">\n <mat-error>{{ 'ACA_FOLDER_RULES.RULE_DETAILS.ERROR.REQUIRED' | translate }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"aca-rule-details__form__row aca-rule-details__form__description\">\n <label for=\"rule-details-description-textarea\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.DESCRIPTION' | translate }}</label>\n <div>\n <mat-form-field floatLabel='auto' appearance=\"fill\" class=\"aca-rule-details__form__row__field\">\n <textarea\n class=\"aca-rule-details__form__row__field__textarea\"\n id=\"rule-details-description-textarea\"\n matInput formControlName=\"description\" data-automation-id=\"rule-details-description-textarea\"\n [placeholder]=\"descriptionPlaceHolder | translate\">\n </textarea>\n </mat-form-field>\n </div>\n </div>\n </ng-container>\n\n <div class=\"aca-rule-details__form__row aca-rule-details__form__triggers\">\n <div class=\"aca-label\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.WHEN' | translate }}</div>\n <div>\n <aca-rule-triggers formControlName=\"triggers\" data-automation-id=\"rule-details-triggers-component\" />\n <mat-error class=\"aca-rule-details-error\" *ngIf=\"triggers.hasError('required')\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.ERROR.INSUFFICIENT_TRIGGERS_SELECTED' | translate }}</mat-error>\n </div>\n </div>\n\n <div class=\"aca-rule-details__form__conditions\">\n <aca-rule-composite-condition [readOnly]=\"readOnly\" formControlName=\"conditions\" />\n <mat-error class=\"aca-rule-details-error\" *ngIf=\"conditions.hasError('ruleCompositeConditionInvalid')\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.ERROR.RULE_COMPOSITE_CONDITION_INVALID' | translate }}</mat-error>\n </div>\n\n <div class=\"aca-rule-details__form__row aca-rule-details__form__actions\">\n <div class=\"aca-label\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.PERFORM_ACTIONS' | translate }}</div>\n <aca-rule-action-list\n formControlName=\"actions\"\n [actionDefinitions]=\"actionDefinitions\"\n [parameterConstraints]=\"parameterConstraints\"\n [readOnly]=\"readOnly\"\n [nodeId]=\"nodeId\" />\n </div>\n\n <div class=\"aca-rule-details__form__row aca-rule-details__form__others\" *ngIf=\"showOptionsSection\">\n <div class=\"aca-label\">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.OPTIONS' | translate }}</div>\n <aca-rule-options\n formControlName=\"options\"\n data-automation-id=\"rule-details-options-component\"\n [errorScriptConstraint]=\"errorScriptConstraint\" />\n </div>\n\n</form>\n", styles: [".aca-rule-details .aca-rule-details__form__triggers{margin-top:10px}.aca-rule-details .aca-rule-details__name__label{padding-top:1.5em}.aca-rule-details .aca-rule-details__form__others{margin-bottom:12px}.aca-rule-details__form{position:relative}.aca-rule-details__form>div{padding:0 20px;width:100%;box-sizing:border-box}.aca-rule-details__form>div.aca-rule-details__form__description{padding-top:0;border:none;align-items:flex-start}.aca-rule-details__form__row{display:flex;align-items:baseline;gap:8px}.aca-rule-details__form__row>label,.aca-rule-details__form__row>.aca-label{font-weight:700;color:var(--adf-theme-foreground-text-color);width:20%;min-width:100px;max-width:150px;padding:.5em 0}.aca-rule-details__form__row>div{flex-grow:1}.aca-rule-details__form__row__field{width:100%;max-width:400px;font-size:inherit}.aca-rule-details__form__row__field label[for=rule-details-name-input]{transform:translateY(-20%) scale(1)}.aca-rule-details__form__row__field__textarea{min-height:4em}.aca-rule-details__form:not(:nth-child(1)){border-top:1px solid var(--theme-border-color)}.aca-rule-details__form__conditions{width:100%;margin:14px 0 36px}.aca-rule-details__form__conditions>.aca-rule-details-error{margin-left:16px;color:inherit}.aca-rule-details__form .aca-rule-details-error{font-size:75%;height:1em}.aca-rule-details__form__actions .aca-rule-action-list{flex:1}.aca-rule-details__form.aca-read-only .mdc-notched-outline__leading,.aca-rule-details__form.aca-read-only .mdc-notched-outline__trailing,.aca-rule-details__form.aca-read-only .mdc-notched-outline__notch,.aca-rule-details__form .mat-form-field-disabled .mdc-notched-outline__leading,.aca-rule-details__form .mat-form-field-disabled .mdc-notched-outline__trailing,.aca-rule-details__form .mat-form-field-disabled .mdc-notched-outline__notch{border:none}.aca-rule-details__form.aca-read-only .mdc-line-ripple:before,.aca-rule-details__form.aca-read-only .mdc-line-ripple:after,.aca-rule-details__form .mat-form-field-disabled .mdc-line-ripple:before,.aca-rule-details__form .mat-form-field-disabled .mdc-line-ripple:after{display:none}.aca-rule-details__form.aca-read-only *:disabled,.aca-rule-details__form.aca-read-only .mat-mdc-select-disabled .mat-mdc-select-value,.aca-rule-details__form .mat-form-field-disabled *:disabled,.aca-rule-details__form .mat-form-field-disabled .mat-mdc-select-disabled .mat-mdc-select-value{color:inherit}.aca-rule-details__form.aca-read-only .mat-mdc-select-arrow-wrapper,.aca-rule-details__form .mat-form-field-disabled .mat-mdc-select-arrow-wrapper{display:none}.aca-rule-details__form .aca-rule-details__form__row .mat-mdc-form-field-flex .mat-mdc-form-field-infix{padding-bottom:.375em}.aca-rule-details__form .aca-rule-details__form__row aca-rule-action .mat-mdc-form-field-flex .mat-mdc-form-field-infix{padding-top:.1em;padding-bottom:.1em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: RuleTriggersUiComponent, selector: "aca-rule-triggers" }, { kind: "component", type: RuleCompositeConditionUiComponent, selector: "aca-rule-composite-condition", inputs: ["secondaryBackground", "childCondition", "readOnly"] }, { kind: "component", type: RuleActionListUiComponent, selector: "aca-rule-action-list", inputs: ["actionDefinitions", "readOnly", "parameterConstraints", "nodeId"] }, { kind: "component", type: RuleOptionsUiComponent, selector: "aca-rule-options", inputs: ["errorScriptConstraint"] }], encapsulation: i0.ViewEncapsulation.None });
1633
1622
  }
@@ -2145,7 +2134,7 @@ class RuleSetPickerSmartComponent {
2145
2134
  folderLoading$ = new BehaviorSubject(true);
2146
2135
  mainRuleSet$ = this.folderRuleSetsService.mainRuleSet$;
2147
2136
  rulesLoading$ = combineLatest(this.folderRuleSetsService.isLoading$, this.folderLoading$).pipe(map(([rulesLoading, folderLoading]) => rulesLoading || folderLoading));
2148
- onDestroy$ = new Subject();
2137
+ destroyRef = inject(DestroyRef);
2149
2138
  constructor(data, folderRuleSetsService, dialogRef, notificationService) {
2150
2139
  this.data = data;
2151
2140
  this.folderRuleSetsService = folderRuleSetsService;
@@ -2156,14 +2145,10 @@ class RuleSetPickerSmartComponent {
2156
2145
  this.existingRuleSet = this.data?.existingRuleSet ?? null;
2157
2146
  }
2158
2147
  ngOnInit() {
2159
- this.mainRuleSet$.pipe(takeUntil(this.onDestroy$)).subscribe((mainRuleSet) => {
2148
+ this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((mainRuleSet) => {
2160
2149
  this.hasOwnedRules = mainRuleSet?.rules.length > 0 && FolderRuleSetsService.isOwnedRuleSet(mainRuleSet, this.selectedNodeId);
2161
2150
  });
2162
2151
  }
2163
- ngOnDestroy() {
2164
- this.onDestroy$.next();
2165
- this.onDestroy$.complete();
2166
- }
2167
2152
  onNodeSelect(nodes) {
2168
2153
  if (nodes?.length && nodes[0].isFolder && nodes[0].id !== this.selectedNodeId) {
2169
2154
  this.selectedNodeId = nodes[0].id;
@@ -2320,9 +2305,9 @@ class RuleListUiComponent {
2320
2305
  inheritedRuleSetGroupingItems = [];
2321
2306
  isMainRuleSetOwned = false;
2322
2307
  isMainRuleSetLinked = false;
2323
- _mainRuleSetSub;
2308
+ destroyRef = inject(DestroyRef);
2324
2309
  ngOnInit() {
2325
- this._mainRuleSetSub = this.mainRuleSet$.subscribe((ruleSet) => {
2310
+ this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet) => {
2326
2311
  if (ruleSet) {
2327
2312
  this.mainRuleSet = ruleSet;
2328
2313
  this.isMainRuleSetOwned = FolderRuleSetsService.isOwnedRuleSet(ruleSet, this.folderId);
@@ -2340,9 +2325,6 @@ class RuleListUiComponent {
2340
2325
  });
2341
2326
  }
2342
2327
  }
2343
- ngOnDestroy() {
2344
- this._mainRuleSetSub.unsubscribe();
2345
- }
2346
2328
  getRuleSetGroupingItems(ruleSet, filterOutDisabledRules) {
2347
2329
  const items = ruleSet.rules
2348
2330
  .filter((rule) => rule.isEnabled || !filterOutDisabledRules)
@@ -2471,8 +2453,7 @@ class ManageRulesSmartComponent {
2471
2453
  canEditSelectedRule = false;
2472
2454
  isMainRuleSetNotEmpty = false;
2473
2455
  isInheritedRuleSetsNotEmpty = false;
2474
- destroyed$ = new Subject();
2475
- _actionDefinitionsSub;
2456
+ destroyRef = inject(DestroyRef);
2476
2457
  constructor(location, folderRulesService, route, matDialogService, notificationService, actionsService, folderRuleSetsService) {
2477
2458
  this.location = location;
2478
2459
  this.folderRulesService = folderRulesService;
@@ -2493,7 +2474,7 @@ class ManageRulesSmartComponent {
2493
2474
  this.actionsLoading$ = this.actionsService.loading$.pipe(delay(0));
2494
2475
  this.actionDefinitions$ = this.actionsService.actionDefinitionsListing$;
2495
2476
  this.parameterConstraints$ = this.actionsService.parameterConstraints$;
2496
- this.folderRulesService.deletedRuleId$.pipe(takeUntil(this.destroyed$)).subscribe((deletedRuleId) => this.onRuleDelete(deletedRuleId));
2477
+ this.folderRulesService.deletedRuleId$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((deletedRuleId) => this.onRuleDelete(deletedRuleId));
2497
2478
  this.actionsService.loadActionDefinitions();
2498
2479
  this.route.params.subscribe((params) => {
2499
2480
  this.nodeId = params.nodeId;
@@ -2504,23 +2485,20 @@ class ManageRulesSmartComponent {
2504
2485
  this.folderRuleSetsService.loadRuleSets(this.nodeId);
2505
2486
  }
2506
2487
  });
2507
- this._actionDefinitionsSub = this.actionDefinitions$.subscribe((actionDefinitions) => this.actionsService.loadActionParameterConstraints(actionDefinitions));
2508
- this.mainRuleSet$.pipe(takeUntil(this.destroyed$)).subscribe((ruleSet) => {
2488
+ this.actionDefinitions$
2489
+ .pipe(takeUntilDestroyed(this.destroyRef))
2490
+ .subscribe((actionDefinitions) => this.actionsService.loadActionParameterConstraints(actionDefinitions));
2491
+ this.mainRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet) => {
2509
2492
  this.canEditMainRule = this.canEditRule(ruleSet);
2510
2493
  this.isMainRuleSetNotEmpty = !!ruleSet;
2511
2494
  });
2512
- this.inheritedRuleSets$.pipe(takeUntil(this.destroyed$)).subscribe((inheritedRuleSet) => {
2495
+ this.inheritedRuleSets$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((inheritedRuleSet) => {
2513
2496
  this.isInheritedRuleSetsNotEmpty = inheritedRuleSet.some((ruleSet) => ruleSet.rules.some((rule) => rule.isEnabled));
2514
2497
  });
2515
- this.selectedRuleSet$.pipe(takeUntil(this.destroyed$)).subscribe((ruleSet) => {
2498
+ this.selectedRuleSet$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((ruleSet) => {
2516
2499
  this.canEditSelectedRule = this.canEditRule(ruleSet);
2517
2500
  });
2518
2501
  }
2519
- ngOnDestroy() {
2520
- this.destroyed$.next();
2521
- this.destroyed$.complete();
2522
- this._actionDefinitionsSub.unsubscribe();
2523
- }
2524
2502
  goBack() {
2525
2503
  this.location.back();
2526
2504
  }