@alfresco/adf-content-services 8.1.0-16072835889 → 8.1.0-16111552428
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.
|
@@ -183,7 +183,9 @@
|
|
|
183
183
|
"ALREADY_EXISTS": "Category already exists",
|
|
184
184
|
"DUPLICATED_CATEGORY": "Category is already added",
|
|
185
185
|
"CREATE_CATEGORIES": "Error while creating categories",
|
|
186
|
-
"EXISTING_CATEGORIES": "Some categories already exist"
|
|
186
|
+
"EXISTING_CATEGORIES": "Some categories already exist",
|
|
187
|
+
"SPECIAL_CHARACTERS": "Category name cannot contain prohibited characters",
|
|
188
|
+
"ENDS_WITH_DOT": "Category name cannot end with a dot"
|
|
187
189
|
},
|
|
188
190
|
"CATEGORIES_SEARCH_PLACEHOLDER": "Search Categories"
|
|
189
191
|
},
|
|
@@ -19332,11 +19332,19 @@ class CategoriesManagementComponent {
|
|
|
19332
19332
|
['duplicatedExistingCategory', 'ALREADY_EXISTS'],
|
|
19333
19333
|
['duplicatedCategory', 'DUPLICATED_CATEGORY'],
|
|
19334
19334
|
['emptyCategory', 'EMPTY_CATEGORY'],
|
|
19335
|
-
['required', 'REQUIRED']
|
|
19335
|
+
['required', 'REQUIRED'],
|
|
19336
|
+
['specialCharacters', 'SPECIAL_CHARACTERS'],
|
|
19337
|
+
['endsWithDot', 'ENDS_WITH_DOT']
|
|
19336
19338
|
]);
|
|
19337
19339
|
this.existingCategoryLoaded$ = new Subject();
|
|
19338
19340
|
this.cancelExistingCategoriesLoading$ = new Subject();
|
|
19339
|
-
this._categoryNameControl = new FormControl('', [
|
|
19341
|
+
this._categoryNameControl = new FormControl('', [
|
|
19342
|
+
this.validateIfNotAlreadyAdded.bind(this),
|
|
19343
|
+
this.validateEmptyCategory,
|
|
19344
|
+
this.validateSpecialCharacters,
|
|
19345
|
+
this.validateEndsWithDot,
|
|
19346
|
+
Validators.required
|
|
19347
|
+
], this.validateIfNotAlreadyCreated.bind(this));
|
|
19340
19348
|
this._categoryNameErrorMessageKey = '';
|
|
19341
19349
|
this._existingCategoriesLoading = false;
|
|
19342
19350
|
this._typing = false;
|
|
@@ -19518,6 +19526,13 @@ class CategoriesManagementComponent {
|
|
|
19518
19526
|
validateEmptyCategory(categoryNameControl) {
|
|
19519
19527
|
return categoryNameControl.value.length && !categoryNameControl.value.trim() ? { emptyCategory: true } : null;
|
|
19520
19528
|
}
|
|
19529
|
+
validateSpecialCharacters(categoryNameControl) {
|
|
19530
|
+
const specialSymbolsRegex = /[:"\\|<>/?*]/;
|
|
19531
|
+
return categoryNameControl.value.length && specialSymbolsRegex.test(categoryNameControl.value) ? { specialCharacters: true } : null;
|
|
19532
|
+
}
|
|
19533
|
+
validateEndsWithDot(categoryNameControl) {
|
|
19534
|
+
return categoryNameControl.value.trim().endsWith('.') ? { endsWithDot: true } : null;
|
|
19535
|
+
}
|
|
19521
19536
|
setCategoryNameControlErrorMessageKey() {
|
|
19522
19537
|
this._categoryNameErrorMessageKey = this.categoryNameControl.invalid
|
|
19523
19538
|
? `CATEGORIES_MANAGEMENT.ERRORS.${this.nameErrorMessagesByErrors.get(Object.keys(this.categoryNameControl.errors)[0])}`
|
|
@@ -19531,7 +19546,7 @@ class CategoriesManagementComponent {
|
|
|
19531
19546
|
this.categoryNameControl.markAsUntouched();
|
|
19532
19547
|
}
|
|
19533
19548
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CategoriesManagementComponent, deps: [{ token: CategoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19534
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: CategoriesManagementComponent, isStandalone: true, selector: "adf-categories-management", inputs: { categories: "categories", categoryNameControlVisible: "categoryNameControlVisible", classifiableChanged: "classifiableChanged", disableRemoval: "disableRemoval", managementMode: "managementMode", parentId: "parentId", multiSelect: "multiSelect" }, outputs: { categoriesChange: "categoriesChange", categoryNameControlVisibleChange: "categoryNameControlVisibleChange" }, viewQueries: [{ propertyName: "categoryNameInputElement", first: true, predicate: ["categoryNameInput"], descendants: true }], ngImport: i0, template: "<div class=\"adf-categories-management\">\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-category-name-field\">\n <input #categoryNameInput\n [formControl]=\"categoryNameControl\"\n (keyup.enter)=\"addCategory()\"\n placeholder=\"{{'CATEGORIES_MANAGEMENT.CATEGORIES_SEARCH_PLACEHOLDER' | translate }}\"\n adf-auto-focus\n />\n <mat-error *ngIf=\"categoryNameControl.invalid\">{{ categoryNameErrorMessageKey | translate }}</mat-error>\n </div>\n <div class=\"adf-categories-list\" *ngIf=\"categories?.length > 0\" [class.adf-categories-list-fixed]=\"!categoryNameControlVisible\">\n <span\n *ngFor=\"let category of categories\"\n [class.adf-categories-padded]=\"!isCRUDMode\"\n class=\"adf-assigned-categories\">\n {{ category.name }}\n <button\n data-automation-id=\"categories-remove-category-button\"\n mat-icon-button\n (click)=\"removeCategory(category)\"\n [attr.title]=\"removeCategoryTitle | translate\"\n [disabled]=\"disableRemoval\">\n <mat-icon>remove</mat-icon>\n </button>\n </span>\n </div>\n <p *ngIf=\"showEmptyCategoryMessage\" class=\"adf-no-categories-message\">\n {{ noCategoriesMsg | translate }}\n </p>\n</div>\n<div class=\"adf-existing-categories-panel\" *ngIf=\"existingCategoriesPanelVisible\">\n <ng-container *ngIf=\"isCRUDMode && (!existingCategoriesLoading || existingCategories)\">\n <span class=\"adf-create-category-label\"\n (click)=\"addCategory()\"\n tabindex=\"0\"\n role=\"button\"\n (keyup.enter)=\"addCategory()\"\n [hidden]=\"categoryNameControl.invalid || typing\">\n {{ 'CATEGORIES_MANAGEMENT.GENERIC_CREATE' | translate : { name: categoryNameControl.value } }}\n </span>\n </ng-container>\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-categories-list\">\n <ng-container *ngIf=\"!existingCategoriesLoading && existingCategories\">\n <p class=\"adf-existing-categories-label\">\n {{ existingCategoriesMsg | translate }}\n </p>\n <mat-list\n [disabled]=\"isCRUDMode || !multiSelect && categories.length > 0\"\n class=\"adf-categories-management-list\">\n <mat-list-item\n *ngFor=\"let category of existingCategories\"\n class=\"adf-category\"\n (click)='addCategoryToAssign(category)'>\n {{ category.name }}\n </mat-list-item>\n <p *ngIf=\"!existingCategories?.length && !existingCategoriesLoading\"\n data-automation-id=\"no-categories-message\">\n {{ 'CATEGORIES_MANAGEMENT.NO_EXISTING_CATEGORIES' | translate }}\n </p>\n </mat-list>\n </ng-container>\n <mat-spinner\n *ngIf=\"existingCategoriesLoading\"\n [diameter]=\"50\"\n class=\"adf-categories-management-spinner\"\n [attr.aria-label]=\"'CATEGORIES_MANAGEMENT.LOADING' | translate\" />\n </div>\n</div>\n", styles: [".adf-categories-management .adf-category-name-field{display:flex;flex-direction:column;margin-right:12px}.adf-categories-management .adf-category-name-field input{background:var(--adf-metadata-buttons-background-color);border-radius:12px;padding:7px 8px;border:none;outline:none;font:inherit;color:currentcolor;margin:0;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.adf-categories-management .adf-category-name-field .mat-mdc-form-field-error{padding-top:5px}.adf-categories-management .adf-assigned-categories{display:flex;justify-content:space-between;align-items:center;word-break:break-word}.adf-categories-management .adf-categories-padded{padding:5px 0}.adf-categories-management [hidden]{visibility:hidden}.adf-categories-management .adf-no-categories-message{margin-bottom:0;height:30px}.adf-categories-list .adf-categories-management-list .adf-category{display:flex;height:100%;overflow-wrap:anywhere;padding:5px 0;font-size:14px;background-color:inherit;color:inherit}.adf-categories-list .adf-categories-management-list .adf-category:not(.mdc-list-item--disabled):hover{cursor:pointer;background:var(--adf-theme-mat-grey-color-a200)}.adf-categories-list .adf-categories-management-list .adf-category span{padding:0}.adf-categories-list .adf-existing-categories-label{font-size:10px;color:var(--theme-secondary-text-color);margin-bottom:2px}.adf-categories-list .adf-categories-management-spinner{margin:auto}.adf-existing-categories-panel{min-height:22vh}.adf-existing-categories-panel .adf-create-category-label{color:var(--theme-primary-color);cursor:pointer;overflow-wrap:anywhere}.adf-existing-categories-panel .mdc-list-item--disabled .mdc-list-item__primary-text{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: AutoFocusDirective, selector: "[adf-auto-focus]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.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: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i7$4.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i7$4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19549
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: CategoriesManagementComponent, isStandalone: true, selector: "adf-categories-management", inputs: { categories: "categories", categoryNameControlVisible: "categoryNameControlVisible", classifiableChanged: "classifiableChanged", disableRemoval: "disableRemoval", managementMode: "managementMode", parentId: "parentId", multiSelect: "multiSelect" }, outputs: { categoriesChange: "categoriesChange", categoryNameControlVisibleChange: "categoryNameControlVisibleChange" }, viewQueries: [{ propertyName: "categoryNameInputElement", first: true, predicate: ["categoryNameInput"], descendants: true }], ngImport: i0, template: "<div class=\"adf-categories-management\">\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-category-name-field\">\n <input #categoryNameInput\n [formControl]=\"categoryNameControl\"\n (keyup.enter)=\"addCategory()\"\n placeholder=\"{{'CATEGORIES_MANAGEMENT.CATEGORIES_SEARCH_PLACEHOLDER' | translate }}\"\n adf-auto-focus\n />\n <mat-error *ngIf=\"categoryNameControl.invalid && categoryNameControl.touched\">{{ categoryNameErrorMessageKey | translate }}</mat-error>\n </div>\n <div class=\"adf-categories-list\" *ngIf=\"categories?.length > 0\" [class.adf-categories-list-fixed]=\"!categoryNameControlVisible\">\n <span\n *ngFor=\"let category of categories\"\n [class.adf-categories-padded]=\"!isCRUDMode\"\n class=\"adf-assigned-categories\">\n {{ category.name }}\n <button\n data-automation-id=\"categories-remove-category-button\"\n mat-icon-button\n (click)=\"removeCategory(category)\"\n [attr.title]=\"removeCategoryTitle | translate\"\n [disabled]=\"disableRemoval\">\n <mat-icon>remove</mat-icon>\n </button>\n </span>\n </div>\n <p *ngIf=\"showEmptyCategoryMessage\" class=\"adf-no-categories-message\">\n {{ noCategoriesMsg | translate }}\n </p>\n</div>\n<div class=\"adf-existing-categories-panel\" *ngIf=\"existingCategoriesPanelVisible\">\n <ng-container *ngIf=\"isCRUDMode && (!existingCategoriesLoading || existingCategories)\">\n <span class=\"adf-create-category-label\"\n (click)=\"addCategory()\"\n tabindex=\"0\"\n role=\"button\"\n (keyup.enter)=\"addCategory()\"\n [hidden]=\"categoryNameControl.invalid || typing\">\n {{ 'CATEGORIES_MANAGEMENT.GENERIC_CREATE' | translate : { name: categoryNameControl.value } }}\n </span>\n </ng-container>\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-categories-list\">\n <ng-container *ngIf=\"!existingCategoriesLoading && existingCategories\">\n <p class=\"adf-existing-categories-label\">\n {{ existingCategoriesMsg | translate }}\n </p>\n <mat-list\n [disabled]=\"isCRUDMode || !multiSelect && categories.length > 0\"\n class=\"adf-categories-management-list\">\n <mat-list-item\n *ngFor=\"let category of existingCategories\"\n class=\"adf-category\"\n (click)='addCategoryToAssign(category)'>\n {{ category.name }}\n </mat-list-item>\n <p *ngIf=\"!existingCategories?.length && !existingCategoriesLoading\"\n data-automation-id=\"no-categories-message\">\n {{ 'CATEGORIES_MANAGEMENT.NO_EXISTING_CATEGORIES' | translate }}\n </p>\n </mat-list>\n </ng-container>\n <mat-spinner\n *ngIf=\"existingCategoriesLoading\"\n [diameter]=\"50\"\n class=\"adf-categories-management-spinner\"\n [attr.aria-label]=\"'CATEGORIES_MANAGEMENT.LOADING' | translate\" />\n </div>\n</div>\n", styles: [".adf-categories-management .adf-category-name-field{display:flex;flex-direction:column;margin-right:12px}.adf-categories-management .adf-category-name-field input{background:var(--adf-metadata-buttons-background-color);border-radius:12px;padding:7px 8px;border:none;outline:none;font:inherit;color:currentcolor;margin:0;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.adf-categories-management .adf-category-name-field .mat-mdc-form-field-error{padding-top:5px}.adf-categories-management .adf-assigned-categories{display:flex;justify-content:space-between;align-items:center;word-break:break-word}.adf-categories-management .adf-categories-padded{padding:5px 0}.adf-categories-management [hidden]{visibility:hidden}.adf-categories-management .adf-no-categories-message{margin-bottom:0;height:30px}.adf-categories-list .adf-categories-management-list .adf-category{display:flex;height:100%;overflow-wrap:anywhere;padding:5px 0;font-size:14px;background-color:inherit;color:inherit}.adf-categories-list .adf-categories-management-list .adf-category:not(.mdc-list-item--disabled):hover{cursor:pointer;background:var(--adf-theme-mat-grey-color-a200)}.adf-categories-list .adf-categories-management-list .adf-category span{padding:0}.adf-categories-list .adf-existing-categories-label{font-size:10px;color:var(--theme-secondary-text-color);margin-bottom:2px}.adf-categories-list .adf-categories-management-spinner{margin:auto}.adf-existing-categories-panel{min-height:22vh}.adf-existing-categories-panel .adf-create-category-label{color:var(--theme-primary-color);cursor:pointer;overflow-wrap:anywhere}.adf-existing-categories-panel .mdc-list-item--disabled .mdc-list-item__primary-text{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: AutoFocusDirective, selector: "[adf-auto-focus]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.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: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i7$4.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i7$4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19535
19550
|
}
|
|
19536
19551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CategoriesManagementComponent, decorators: [{
|
|
19537
19552
|
type: Component,
|
|
@@ -19545,7 +19560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
19545
19560
|
MatIconModule,
|
|
19546
19561
|
MatListModule,
|
|
19547
19562
|
MatProgressSpinnerModule
|
|
19548
|
-
], encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-categories-management\">\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-category-name-field\">\n <input #categoryNameInput\n [formControl]=\"categoryNameControl\"\n (keyup.enter)=\"addCategory()\"\n placeholder=\"{{'CATEGORIES_MANAGEMENT.CATEGORIES_SEARCH_PLACEHOLDER' | translate }}\"\n adf-auto-focus\n />\n <mat-error *ngIf=\"categoryNameControl.invalid\">{{ categoryNameErrorMessageKey | translate }}</mat-error>\n </div>\n <div class=\"adf-categories-list\" *ngIf=\"categories?.length > 0\" [class.adf-categories-list-fixed]=\"!categoryNameControlVisible\">\n <span\n *ngFor=\"let category of categories\"\n [class.adf-categories-padded]=\"!isCRUDMode\"\n class=\"adf-assigned-categories\">\n {{ category.name }}\n <button\n data-automation-id=\"categories-remove-category-button\"\n mat-icon-button\n (click)=\"removeCategory(category)\"\n [attr.title]=\"removeCategoryTitle | translate\"\n [disabled]=\"disableRemoval\">\n <mat-icon>remove</mat-icon>\n </button>\n </span>\n </div>\n <p *ngIf=\"showEmptyCategoryMessage\" class=\"adf-no-categories-message\">\n {{ noCategoriesMsg | translate }}\n </p>\n</div>\n<div class=\"adf-existing-categories-panel\" *ngIf=\"existingCategoriesPanelVisible\">\n <ng-container *ngIf=\"isCRUDMode && (!existingCategoriesLoading || existingCategories)\">\n <span class=\"adf-create-category-label\"\n (click)=\"addCategory()\"\n tabindex=\"0\"\n role=\"button\"\n (keyup.enter)=\"addCategory()\"\n [hidden]=\"categoryNameControl.invalid || typing\">\n {{ 'CATEGORIES_MANAGEMENT.GENERIC_CREATE' | translate : { name: categoryNameControl.value } }}\n </span>\n </ng-container>\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-categories-list\">\n <ng-container *ngIf=\"!existingCategoriesLoading && existingCategories\">\n <p class=\"adf-existing-categories-label\">\n {{ existingCategoriesMsg | translate }}\n </p>\n <mat-list\n [disabled]=\"isCRUDMode || !multiSelect && categories.length > 0\"\n class=\"adf-categories-management-list\">\n <mat-list-item\n *ngFor=\"let category of existingCategories\"\n class=\"adf-category\"\n (click)='addCategoryToAssign(category)'>\n {{ category.name }}\n </mat-list-item>\n <p *ngIf=\"!existingCategories?.length && !existingCategoriesLoading\"\n data-automation-id=\"no-categories-message\">\n {{ 'CATEGORIES_MANAGEMENT.NO_EXISTING_CATEGORIES' | translate }}\n </p>\n </mat-list>\n </ng-container>\n <mat-spinner\n *ngIf=\"existingCategoriesLoading\"\n [diameter]=\"50\"\n class=\"adf-categories-management-spinner\"\n [attr.aria-label]=\"'CATEGORIES_MANAGEMENT.LOADING' | translate\" />\n </div>\n</div>\n", styles: [".adf-categories-management .adf-category-name-field{display:flex;flex-direction:column;margin-right:12px}.adf-categories-management .adf-category-name-field input{background:var(--adf-metadata-buttons-background-color);border-radius:12px;padding:7px 8px;border:none;outline:none;font:inherit;color:currentcolor;margin:0;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.adf-categories-management .adf-category-name-field .mat-mdc-form-field-error{padding-top:5px}.adf-categories-management .adf-assigned-categories{display:flex;justify-content:space-between;align-items:center;word-break:break-word}.adf-categories-management .adf-categories-padded{padding:5px 0}.adf-categories-management [hidden]{visibility:hidden}.adf-categories-management .adf-no-categories-message{margin-bottom:0;height:30px}.adf-categories-list .adf-categories-management-list .adf-category{display:flex;height:100%;overflow-wrap:anywhere;padding:5px 0;font-size:14px;background-color:inherit;color:inherit}.adf-categories-list .adf-categories-management-list .adf-category:not(.mdc-list-item--disabled):hover{cursor:pointer;background:var(--adf-theme-mat-grey-color-a200)}.adf-categories-list .adf-categories-management-list .adf-category span{padding:0}.adf-categories-list .adf-existing-categories-label{font-size:10px;color:var(--theme-secondary-text-color);margin-bottom:2px}.adf-categories-list .adf-categories-management-spinner{margin:auto}.adf-existing-categories-panel{min-height:22vh}.adf-existing-categories-panel .adf-create-category-label{color:var(--theme-primary-color);cursor:pointer;overflow-wrap:anywhere}.adf-existing-categories-panel .mdc-list-item--disabled .mdc-list-item__primary-text{opacity:1}\n"] }]
|
|
19563
|
+
], encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-categories-management\">\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-category-name-field\">\n <input #categoryNameInput\n [formControl]=\"categoryNameControl\"\n (keyup.enter)=\"addCategory()\"\n placeholder=\"{{'CATEGORIES_MANAGEMENT.CATEGORIES_SEARCH_PLACEHOLDER' | translate }}\"\n adf-auto-focus\n />\n <mat-error *ngIf=\"categoryNameControl.invalid && categoryNameControl.touched\">{{ categoryNameErrorMessageKey | translate }}</mat-error>\n </div>\n <div class=\"adf-categories-list\" *ngIf=\"categories?.length > 0\" [class.adf-categories-list-fixed]=\"!categoryNameControlVisible\">\n <span\n *ngFor=\"let category of categories\"\n [class.adf-categories-padded]=\"!isCRUDMode\"\n class=\"adf-assigned-categories\">\n {{ category.name }}\n <button\n data-automation-id=\"categories-remove-category-button\"\n mat-icon-button\n (click)=\"removeCategory(category)\"\n [attr.title]=\"removeCategoryTitle | translate\"\n [disabled]=\"disableRemoval\">\n <mat-icon>remove</mat-icon>\n </button>\n </span>\n </div>\n <p *ngIf=\"showEmptyCategoryMessage\" class=\"adf-no-categories-message\">\n {{ noCategoriesMsg | translate }}\n </p>\n</div>\n<div class=\"adf-existing-categories-panel\" *ngIf=\"existingCategoriesPanelVisible\">\n <ng-container *ngIf=\"isCRUDMode && (!existingCategoriesLoading || existingCategories)\">\n <span class=\"adf-create-category-label\"\n (click)=\"addCategory()\"\n tabindex=\"0\"\n role=\"button\"\n (keyup.enter)=\"addCategory()\"\n [hidden]=\"categoryNameControl.invalid || typing\">\n {{ 'CATEGORIES_MANAGEMENT.GENERIC_CREATE' | translate : { name: categoryNameControl.value } }}\n </span>\n </ng-container>\n <div *ngIf=\"categoryNameControlVisible\" class=\"adf-categories-list\">\n <ng-container *ngIf=\"!existingCategoriesLoading && existingCategories\">\n <p class=\"adf-existing-categories-label\">\n {{ existingCategoriesMsg | translate }}\n </p>\n <mat-list\n [disabled]=\"isCRUDMode || !multiSelect && categories.length > 0\"\n class=\"adf-categories-management-list\">\n <mat-list-item\n *ngFor=\"let category of existingCategories\"\n class=\"adf-category\"\n (click)='addCategoryToAssign(category)'>\n {{ category.name }}\n </mat-list-item>\n <p *ngIf=\"!existingCategories?.length && !existingCategoriesLoading\"\n data-automation-id=\"no-categories-message\">\n {{ 'CATEGORIES_MANAGEMENT.NO_EXISTING_CATEGORIES' | translate }}\n </p>\n </mat-list>\n </ng-container>\n <mat-spinner\n *ngIf=\"existingCategoriesLoading\"\n [diameter]=\"50\"\n class=\"adf-categories-management-spinner\"\n [attr.aria-label]=\"'CATEGORIES_MANAGEMENT.LOADING' | translate\" />\n </div>\n</div>\n", styles: [".adf-categories-management .adf-category-name-field{display:flex;flex-direction:column;margin-right:12px}.adf-categories-management .adf-category-name-field input{background:var(--adf-metadata-buttons-background-color);border-radius:12px;padding:7px 8px;border:none;outline:none;font:inherit;color:currentcolor;margin:0;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.adf-categories-management .adf-category-name-field .mat-mdc-form-field-error{padding-top:5px}.adf-categories-management .adf-assigned-categories{display:flex;justify-content:space-between;align-items:center;word-break:break-word}.adf-categories-management .adf-categories-padded{padding:5px 0}.adf-categories-management [hidden]{visibility:hidden}.adf-categories-management .adf-no-categories-message{margin-bottom:0;height:30px}.adf-categories-list .adf-categories-management-list .adf-category{display:flex;height:100%;overflow-wrap:anywhere;padding:5px 0;font-size:14px;background-color:inherit;color:inherit}.adf-categories-list .adf-categories-management-list .adf-category:not(.mdc-list-item--disabled):hover{cursor:pointer;background:var(--adf-theme-mat-grey-color-a200)}.adf-categories-list .adf-categories-management-list .adf-category span{padding:0}.adf-categories-list .adf-existing-categories-label{font-size:10px;color:var(--theme-secondary-text-color);margin-bottom:2px}.adf-categories-list .adf-categories-management-spinner{margin:auto}.adf-existing-categories-panel{min-height:22vh}.adf-existing-categories-panel .adf-create-category-label{color:var(--theme-primary-color);cursor:pointer;overflow-wrap:anywhere}.adf-existing-categories-panel .mdc-list-item--disabled .mdc-list-item__primary-text{opacity:1}\n"] }]
|
|
19549
19564
|
}], ctorParameters: () => [{ type: CategoryService }], propDecorators: { categories: [{
|
|
19550
19565
|
type: Input
|
|
19551
19566
|
}], categoryNameControlVisible: [{
|