@masterteam/accessibilities 0.0.7 → 0.0.9
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.
|
@@ -352,8 +352,8 @@ let AccessibilitiesState = class AccessibilitiesState extends CrudStateBase {
|
|
|
352
352
|
errorMessage: 'Failed to update levels tree for category',
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
356
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
356
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesState });
|
|
357
357
|
};
|
|
358
358
|
__decorate([
|
|
359
359
|
Action(GetAccessibilities)
|
|
@@ -433,7 +433,7 @@ AccessibilitiesState = __decorate([
|
|
|
433
433
|
},
|
|
434
434
|
})
|
|
435
435
|
], AccessibilitiesState);
|
|
436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesState, decorators: [{
|
|
437
437
|
type: Injectable
|
|
438
438
|
}], propDecorators: { getAccessibilities: [], updateAccessibility: [], updateAccessibilities: [], getGroups: [], getCategories: [], addCategory: [], updateCategory: [], deleteCategory: [], getCategoryDetails: [], addGroupsToCategory: [], removeGroupFromCategory: [], getLevelsTree: [], updateLevelsTreeForCategory: [] } });
|
|
439
439
|
function mergeAccessibilitiesByCategory(current, updates) {
|
|
@@ -460,42 +460,42 @@ class AccessibilitiesFacade {
|
|
|
460
460
|
// ============================================================================
|
|
461
461
|
// Loading Signals - Computed from slice (minimal reactivity)
|
|
462
462
|
// ============================================================================
|
|
463
|
-
isLoadingAccessibilities = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetAccessibilities), ...(ngDevMode ? [{ debugName: "isLoadingAccessibilities" }] : []));
|
|
464
|
-
isUpdatingAccessibility = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateAccessibility), ...(ngDevMode ? [{ debugName: "isUpdatingAccessibility" }] : []));
|
|
465
|
-
isUpdatingAccessibilities = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateAccessibilities), ...(ngDevMode ? [{ debugName: "isUpdatingAccessibilities" }] : []));
|
|
466
|
-
isLoadingGroups = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetGroups), ...(ngDevMode ? [{ debugName: "isLoadingGroups" }] : []));
|
|
467
|
-
isLoadingCategories = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetCategories), ...(ngDevMode ? [{ debugName: "isLoadingCategories" }] : []));
|
|
468
|
-
isAddingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.AddCategory), ...(ngDevMode ? [{ debugName: "isAddingCategory" }] : []));
|
|
469
|
-
isUpdatingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateCategory), ...(ngDevMode ? [{ debugName: "isUpdatingCategory" }] : []));
|
|
470
|
-
isDeletingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.DeleteCategory), ...(ngDevMode ? [{ debugName: "isDeletingCategory" }] : []));
|
|
471
|
-
isLoadingCategoryDetails = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetCategoryDetails), ...(ngDevMode ? [{ debugName: "isLoadingCategoryDetails" }] : []));
|
|
472
|
-
isAddingGroupsToCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.AddGroupsToCategory), ...(ngDevMode ? [{ debugName: "isAddingGroupsToCategory" }] : []));
|
|
473
|
-
isRemovingGroupFromCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.RemoveGroupFromCategory), ...(ngDevMode ? [{ debugName: "isRemovingGroupFromCategory" }] : []));
|
|
474
|
-
isLoadingLevelsTree = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetLevelsTree), ...(ngDevMode ? [{ debugName: "isLoadingLevelsTree" }] : []));
|
|
475
|
-
isUpdatingLevelsTreeForCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateLevelsTreeForCategory), ...(ngDevMode ? [{ debugName: "isUpdatingLevelsTreeForCategory" }] : []));
|
|
463
|
+
isLoadingAccessibilities = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetAccessibilities), ...(ngDevMode ? [{ debugName: "isLoadingAccessibilities" }] : /* istanbul ignore next */ []));
|
|
464
|
+
isUpdatingAccessibility = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateAccessibility), ...(ngDevMode ? [{ debugName: "isUpdatingAccessibility" }] : /* istanbul ignore next */ []));
|
|
465
|
+
isUpdatingAccessibilities = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateAccessibilities), ...(ngDevMode ? [{ debugName: "isUpdatingAccessibilities" }] : /* istanbul ignore next */ []));
|
|
466
|
+
isLoadingGroups = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetGroups), ...(ngDevMode ? [{ debugName: "isLoadingGroups" }] : /* istanbul ignore next */ []));
|
|
467
|
+
isLoadingCategories = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetCategories), ...(ngDevMode ? [{ debugName: "isLoadingCategories" }] : /* istanbul ignore next */ []));
|
|
468
|
+
isAddingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.AddCategory), ...(ngDevMode ? [{ debugName: "isAddingCategory" }] : /* istanbul ignore next */ []));
|
|
469
|
+
isUpdatingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateCategory), ...(ngDevMode ? [{ debugName: "isUpdatingCategory" }] : /* istanbul ignore next */ []));
|
|
470
|
+
isDeletingCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.DeleteCategory), ...(ngDevMode ? [{ debugName: "isDeletingCategory" }] : /* istanbul ignore next */ []));
|
|
471
|
+
isLoadingCategoryDetails = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetCategoryDetails), ...(ngDevMode ? [{ debugName: "isLoadingCategoryDetails" }] : /* istanbul ignore next */ []));
|
|
472
|
+
isAddingGroupsToCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.AddGroupsToCategory), ...(ngDevMode ? [{ debugName: "isAddingGroupsToCategory" }] : /* istanbul ignore next */ []));
|
|
473
|
+
isRemovingGroupFromCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.RemoveGroupFromCategory), ...(ngDevMode ? [{ debugName: "isRemovingGroupFromCategory" }] : /* istanbul ignore next */ []));
|
|
474
|
+
isLoadingLevelsTree = computed(() => this.loadingActive().includes(AccessibilityActionKey.GetLevelsTree), ...(ngDevMode ? [{ debugName: "isLoadingLevelsTree" }] : /* istanbul ignore next */ []));
|
|
475
|
+
isUpdatingLevelsTreeForCategory = computed(() => this.loadingActive().includes(AccessibilityActionKey.UpdateLevelsTreeForCategory), ...(ngDevMode ? [{ debugName: "isUpdatingLevelsTreeForCategory" }] : /* istanbul ignore next */ []));
|
|
476
476
|
// ============================================================================
|
|
477
477
|
// Error Signals - Computed from slice (minimal reactivity)
|
|
478
478
|
// ============================================================================
|
|
479
|
-
accessibilitiesError = computed(() => this.errors()[AccessibilityActionKey.GetAccessibilities] ?? null, ...(ngDevMode ? [{ debugName: "accessibilitiesError" }] : []));
|
|
480
|
-
updateAccessibilityError = computed(() => this.errors()[AccessibilityActionKey.UpdateAccessibility] ?? null, ...(ngDevMode ? [{ debugName: "updateAccessibilityError" }] : []));
|
|
481
|
-
updateAccessibilitiesError = computed(() => this.errors()[AccessibilityActionKey.UpdateAccessibilities] ?? null, ...(ngDevMode ? [{ debugName: "updateAccessibilitiesError" }] : []));
|
|
482
|
-
groupsError = computed(() => this.errors()[AccessibilityActionKey.GetGroups] ?? null, ...(ngDevMode ? [{ debugName: "groupsError" }] : []));
|
|
483
|
-
categoriesError = computed(() => this.errors()[AccessibilityActionKey.GetCategories] ?? null, ...(ngDevMode ? [{ debugName: "categoriesError" }] : []));
|
|
484
|
-
addCategoryError = computed(() => this.errors()[AccessibilityActionKey.AddCategory] ?? null, ...(ngDevMode ? [{ debugName: "addCategoryError" }] : []));
|
|
485
|
-
updateCategoryError = computed(() => this.errors()[AccessibilityActionKey.UpdateCategory] ?? null, ...(ngDevMode ? [{ debugName: "updateCategoryError" }] : []));
|
|
486
|
-
deleteCategoryError = computed(() => this.errors()[AccessibilityActionKey.DeleteCategory] ?? null, ...(ngDevMode ? [{ debugName: "deleteCategoryError" }] : []));
|
|
487
|
-
getCategoryDetailsError = computed(() => this.errors()[AccessibilityActionKey.GetCategoryDetails] ?? null, ...(ngDevMode ? [{ debugName: "getCategoryDetailsError" }] : []));
|
|
488
|
-
addGroupsToCategoryError = computed(() => this.errors()[AccessibilityActionKey.AddGroupsToCategory] ?? null, ...(ngDevMode ? [{ debugName: "addGroupsToCategoryError" }] : []));
|
|
489
|
-
removeGroupFromCategoryError = computed(() => this.errors()[AccessibilityActionKey.RemoveGroupFromCategory] ?? null, ...(ngDevMode ? [{ debugName: "removeGroupFromCategoryError" }] : []));
|
|
490
|
-
getLevelsTreeError = computed(() => this.errors()[AccessibilityActionKey.GetLevelsTree] ?? null, ...(ngDevMode ? [{ debugName: "getLevelsTreeError" }] : []));
|
|
491
|
-
updateLevelsTreeForCategoryError = computed(() => this.errors()[AccessibilityActionKey.UpdateLevelsTreeForCategory] ?? null, ...(ngDevMode ? [{ debugName: "updateLevelsTreeForCategoryError" }] : []));
|
|
479
|
+
accessibilitiesError = computed(() => this.errors()[AccessibilityActionKey.GetAccessibilities] ?? null, ...(ngDevMode ? [{ debugName: "accessibilitiesError" }] : /* istanbul ignore next */ []));
|
|
480
|
+
updateAccessibilityError = computed(() => this.errors()[AccessibilityActionKey.UpdateAccessibility] ?? null, ...(ngDevMode ? [{ debugName: "updateAccessibilityError" }] : /* istanbul ignore next */ []));
|
|
481
|
+
updateAccessibilitiesError = computed(() => this.errors()[AccessibilityActionKey.UpdateAccessibilities] ?? null, ...(ngDevMode ? [{ debugName: "updateAccessibilitiesError" }] : /* istanbul ignore next */ []));
|
|
482
|
+
groupsError = computed(() => this.errors()[AccessibilityActionKey.GetGroups] ?? null, ...(ngDevMode ? [{ debugName: "groupsError" }] : /* istanbul ignore next */ []));
|
|
483
|
+
categoriesError = computed(() => this.errors()[AccessibilityActionKey.GetCategories] ?? null, ...(ngDevMode ? [{ debugName: "categoriesError" }] : /* istanbul ignore next */ []));
|
|
484
|
+
addCategoryError = computed(() => this.errors()[AccessibilityActionKey.AddCategory] ?? null, ...(ngDevMode ? [{ debugName: "addCategoryError" }] : /* istanbul ignore next */ []));
|
|
485
|
+
updateCategoryError = computed(() => this.errors()[AccessibilityActionKey.UpdateCategory] ?? null, ...(ngDevMode ? [{ debugName: "updateCategoryError" }] : /* istanbul ignore next */ []));
|
|
486
|
+
deleteCategoryError = computed(() => this.errors()[AccessibilityActionKey.DeleteCategory] ?? null, ...(ngDevMode ? [{ debugName: "deleteCategoryError" }] : /* istanbul ignore next */ []));
|
|
487
|
+
getCategoryDetailsError = computed(() => this.errors()[AccessibilityActionKey.GetCategoryDetails] ?? null, ...(ngDevMode ? [{ debugName: "getCategoryDetailsError" }] : /* istanbul ignore next */ []));
|
|
488
|
+
addGroupsToCategoryError = computed(() => this.errors()[AccessibilityActionKey.AddGroupsToCategory] ?? null, ...(ngDevMode ? [{ debugName: "addGroupsToCategoryError" }] : /* istanbul ignore next */ []));
|
|
489
|
+
removeGroupFromCategoryError = computed(() => this.errors()[AccessibilityActionKey.RemoveGroupFromCategory] ?? null, ...(ngDevMode ? [{ debugName: "removeGroupFromCategoryError" }] : /* istanbul ignore next */ []));
|
|
490
|
+
getLevelsTreeError = computed(() => this.errors()[AccessibilityActionKey.GetLevelsTree] ?? null, ...(ngDevMode ? [{ debugName: "getLevelsTreeError" }] : /* istanbul ignore next */ []));
|
|
491
|
+
updateLevelsTreeForCategoryError = computed(() => this.errors()[AccessibilityActionKey.UpdateLevelsTreeForCategory] ?? null, ...(ngDevMode ? [{ debugName: "updateLevelsTreeForCategoryError" }] : /* istanbul ignore next */ []));
|
|
492
492
|
// ============================================================================
|
|
493
493
|
// Derived Data - Computed from data selectors
|
|
494
494
|
// ============================================================================
|
|
495
|
-
categoriesCount = computed(() => this.categories().length, ...(ngDevMode ? [{ debugName: "categoriesCount" }] : []));
|
|
496
|
-
hasCategories = computed(() => this.categories().length > 0, ...(ngDevMode ? [{ debugName: "hasCategories" }] : []));
|
|
497
|
-
groupsCount = computed(() => this.groups().length, ...(ngDevMode ? [{ debugName: "groupsCount" }] : []));
|
|
498
|
-
hasGroups = computed(() => this.groups().length > 0, ...(ngDevMode ? [{ debugName: "hasGroups" }] : []));
|
|
495
|
+
categoriesCount = computed(() => this.categories().length, ...(ngDevMode ? [{ debugName: "categoriesCount" }] : /* istanbul ignore next */ []));
|
|
496
|
+
hasCategories = computed(() => this.categories().length > 0, ...(ngDevMode ? [{ debugName: "hasCategories" }] : /* istanbul ignore next */ []));
|
|
497
|
+
groupsCount = computed(() => this.groups().length, ...(ngDevMode ? [{ debugName: "groupsCount" }] : /* istanbul ignore next */ []));
|
|
498
|
+
hasGroups = computed(() => this.groups().length > 0, ...(ngDevMode ? [{ debugName: "hasGroups" }] : /* istanbul ignore next */ []));
|
|
499
499
|
// ============================================================================
|
|
500
500
|
// Action Dispatchers
|
|
501
501
|
// ============================================================================
|
|
@@ -539,10 +539,10 @@ class AccessibilitiesFacade {
|
|
|
539
539
|
updateLevelsTreeForCategory(categoryId, keys) {
|
|
540
540
|
return this.store.dispatch(new UpdateLevelsTreeForCategory(categoryId, { levelDataIds: keys }));
|
|
541
541
|
}
|
|
542
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
543
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
543
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesFacade, providedIn: 'root' });
|
|
544
544
|
}
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesFacade, decorators: [{
|
|
546
546
|
type: Injectable,
|
|
547
547
|
args: [{ providedIn: 'root' }]
|
|
548
548
|
}] });
|
|
@@ -552,7 +552,7 @@ class Accessibilities {
|
|
|
552
552
|
route = inject(ActivatedRoute);
|
|
553
553
|
router = inject(Router);
|
|
554
554
|
translocoService = inject(TranslocoService);
|
|
555
|
-
selectedTab = signal('accessibilities', ...(ngDevMode ? [{ debugName: "selectedTab" }] : []));
|
|
555
|
+
selectedTab = signal('accessibilities', ...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
|
|
556
556
|
tabsList = [
|
|
557
557
|
{
|
|
558
558
|
label: this.translocoService.translate('accessibilities.accessibilities'),
|
|
@@ -598,10 +598,10 @@ class Accessibilities {
|
|
|
598
598
|
this.router.navigate(['categories'], { relativeTo: this.route });
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
602
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
601
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Accessibilities, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
602
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: Accessibilities, isStandalone: true, selector: "mt-accessibilities", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <mt-page\r\n [title]=\"t('accessibilities')\"\r\n [avatarIcon]=\"'security.passcode-lock'\"\r\n [contentClass]=\"'max-[1025px]:p-4 max-[640px]:p-3'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-pink-50)',\r\n '--p-avatar-color': 'var(--p-pink-700)',\r\n }\"\r\n [tabs]=\"tabsList\"\r\n [activeTab]=\"selectedTab()\"\r\n (tabChange)=\"onTabChange($event)\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n >\r\n <router-outlet />\r\n </mt-page>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
603
603
|
}
|
|
604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Accessibilities, decorators: [{
|
|
605
605
|
type: Component,
|
|
606
606
|
args: [{ selector: 'mt-accessibilities', standalone: true, imports: [CommonModule, Page, RouterOutlet, TranslocoDirective], template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <mt-page\r\n [title]=\"t('accessibilities')\"\r\n [avatarIcon]=\"'security.passcode-lock'\"\r\n [contentClass]=\"'max-[1025px]:p-4 max-[640px]:p-3'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-pink-50)',\r\n '--p-avatar-color': 'var(--p-pink-700)',\r\n }\"\r\n [tabs]=\"tabsList\"\r\n [activeTab]=\"selectedTab()\"\r\n (tabChange)=\"onTabChange($event)\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n >\r\n <router-outlet />\r\n </mt-page>\r\n</ng-container>\r\n" }]
|
|
607
607
|
}] });
|
|
@@ -611,10 +611,10 @@ class AccessibilityPermissionsEditModal {
|
|
|
611
611
|
ref = inject(ModalRef);
|
|
612
612
|
accessibilitiesFacade = inject(AccessibilitiesFacade);
|
|
613
613
|
confirmationService = inject(ConfirmationService);
|
|
614
|
-
accessibility = input(null, ...(ngDevMode ? [{ debugName: "accessibility" }] : []));
|
|
614
|
+
accessibility = input(null, ...(ngDevMode ? [{ debugName: "accessibility" }] : /* istanbul ignore next */ []));
|
|
615
615
|
groups = this.accessibilitiesFacade.groups;
|
|
616
616
|
saveLoading = this.accessibilitiesFacade.isUpdatingAccessibilities;
|
|
617
|
-
selectedGroups = signal({}, ...(ngDevMode ? [{ debugName: "selectedGroups" }] : []));
|
|
617
|
+
selectedGroups = signal({}, ...(ngDevMode ? [{ debugName: "selectedGroups" }] : /* istanbul ignore next */ []));
|
|
618
618
|
getAvailableGroupsOptions = computed(() => (settingId) => {
|
|
619
619
|
const selectedIds = this.selectedGroups()[settingId] || [];
|
|
620
620
|
return this.groups()
|
|
@@ -623,7 +623,7 @@ class AccessibilityPermissionsEditModal {
|
|
|
623
623
|
label: group.name?.display,
|
|
624
624
|
value: group.id,
|
|
625
625
|
}));
|
|
626
|
-
}, ...(ngDevMode ? [{ debugName: "getAvailableGroupsOptions" }] : []));
|
|
626
|
+
}, ...(ngDevMode ? [{ debugName: "getAvailableGroupsOptions" }] : /* istanbul ignore next */ []));
|
|
627
627
|
ngOnInit() {
|
|
628
628
|
const initialSelectedGroups = {};
|
|
629
629
|
this.accessibility()?.settings?.forEach((setting) => {
|
|
@@ -685,10 +685,10 @@ class AccessibilityPermissionsEditModal {
|
|
|
685
685
|
reject: () => { },
|
|
686
686
|
});
|
|
687
687
|
}
|
|
688
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
689
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
688
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilityPermissionsEditModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: AccessibilityPermissionsEditModal, isStandalone: true, selector: "mt-accessibility-permissions-edit-modal", inputs: { accessibility: { classPropertyName: "accessibility", publicName: "accessibility", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <div\r\n [class]=\"\r\n 'accessibility-permissions-modal-content flex min-w-0 flex-col gap-4 overflow-x-hidden p-4 max-[640px]:p-3 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n @if (accessibility()) {\r\n <div class=\"space-y-4\">\r\n @for (setting of this.accessibility()?.settings; track setting.id) {\r\n <div class=\"border border-gray-200 rounded-lg overflow-hidden\">\r\n <div class=\"bg-sky-50 px-4 py-3 border-b border-gray-200\">\r\n <h4 class=\"font-medium text-gray-900\">\r\n {{ setting.name?.display }}\r\n </h4>\r\n </div>\r\n\r\n <div class=\"p-4\">\r\n <div class=\"mb-3\">\r\n <mt-select-field\r\n [placeholder]=\"t('accessibilities.selectGroupsPlaceholder')\"\r\n [options]=\"getAvailableGroupsOptions()(setting.id)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"null\"\r\n (ngModelChange)=\"onGroupSelect(setting.id, $event)\"\r\n class=\"w-full\"\r\n >\r\n </mt-select-field>\r\n </div>\r\n\r\n @if (getSelectedGroupsForSetting(setting.id).length > 0) {\r\n <div class=\"mt-4\">\r\n <h5 class=\"text-sm font-medium text-gray-700 mb-2\">\r\n {{ t(\"accessibilities.selectedGroups\") }}\r\n </h5>\r\n <div class=\"space-y-2\">\r\n @for (\r\n group of getSelectedGroupsForSetting(setting.id);\r\n track group.id\r\n ) {\r\n <div\r\n class=\"flex flex-col gap-3 rounded-lg border border-gray-100 bg-gray-50 px-3 py-2 sm:flex-row sm:items-center sm:justify-between\"\r\n >\r\n <div class=\"flex min-w-0 items-center gap-2\">\r\n <mt-avatar\r\n class=\"shrink-0\"\r\n [icon]=\"'user.users-01'\"\r\n shape=\"square\"\r\n >\r\n </mt-avatar>\r\n <span\r\n class=\"min-w-0 break-words text-sm font-medium\"\r\n >{{ group.name?.display }}</span\r\n >\r\n </div>\r\n <mt-button\r\n variant=\"text\"\r\n size=\"small\"\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n styleClass=\"w-full sm:w-auto\"\r\n (click)=\"\r\n removeGroupFromSetting($event, setting.id, group.id)\r\n \"\r\n title=\"Remove Group\"\r\n >\r\n </mt-button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @empty {\r\n <div class=\"text-center text-gray-500 py-8 bg-gray-50 rounded-lg\">\r\n <p>{{ \"no-data-found\" | transloco }}</p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'accessibility-permissions-modal-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n [label]=\"t('save')\"\r\n (click)=\"onSave()\"\r\n [loading]=\"saveLoading()\"\r\n severity=\"primary\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"saveLoading()\"\r\n (click)=\"onClose()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-width:0}:host ::ng-deep .accessibility-permissions-modal-footer{height:auto!important;min-height:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
690
690
|
}
|
|
691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilityPermissionsEditModal, decorators: [{
|
|
692
692
|
type: Component,
|
|
693
693
|
args: [{ selector: 'mt-accessibility-permissions-edit-modal', standalone: true, imports: [
|
|
694
694
|
CommonModule,
|
|
@@ -710,7 +710,7 @@ class AccessibilitiesList {
|
|
|
710
710
|
confirmationService = inject(ConfirmationService);
|
|
711
711
|
accessibilities = this.accessibilitiesFacade.accessibilities;
|
|
712
712
|
isLoading = this.accessibilitiesFacade.isLoadingAccessibilities;
|
|
713
|
-
itemDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "itemDeletedId" }] : []));
|
|
713
|
+
itemDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "itemDeletedId" }] : /* istanbul ignore next */ []));
|
|
714
714
|
openPermissionsModal(accessibility) {
|
|
715
715
|
this.modal.openModal(AccessibilityPermissionsEditModal, 'drawer', {
|
|
716
716
|
header: this.translocoService.translate('accessibilities.setPermissions'),
|
|
@@ -724,10 +724,10 @@ class AccessibilitiesList {
|
|
|
724
724
|
},
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
728
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
727
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
728
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: AccessibilitiesList, isStandalone: true, selector: "mt-accessibilities-list", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <mt-card class=\"mx-auto my-5 w-full max-w-[78rem]\">\r\n <div class=\"flex min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div class=\"p-5 mb-5 border-b border-surface\">\r\n <h2 class=\"text-lg font-semibold m-0\">\r\n {{ t(\"system-accessibilities\") }}\r\n </h2>\r\n </div>\r\n @if (isLoading()) {\r\n <div class=\"space-y-4 p-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n } @else {\r\n <div class=\"overflow-auto\">\r\n @for (\r\n accessibility of accessibilities();\r\n track accessibility.category\r\n ) {\r\n <div\r\n class=\"mx-4 mb-4 flex flex-col gap-3 rounded-lg border-1 border-surface p-3 sm:mx-5 sm:flex-row sm:items-center sm:justify-between\"\r\n >\r\n <div class=\"flex min-w-0 items-start gap-3\">\r\n <mt-avatar\r\n class=\"shrink-0\"\r\n [icon]=\"'security.lock-unlocked-01'\"\r\n shape=\"square\"\r\n size=\"normal\"\r\n [style.--p-avatar-background]=\"\r\n 'var(--p-' + 'surface' + '-100)'\r\n \"\r\n [style.--p-avatar-color]=\"'var(--p-' + 'primary' + '-600)'\"\r\n >\r\n </mt-avatar>\r\n <div class=\"min-w-0\">\r\n <div class=\"break-words font-semibold\">\r\n {{ accessibility.name?.display }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-wrap items-center gap-3 sm:justify-end\">\r\n <div\r\n class=\"rounded-lg border-1 border-surface px-3 py-1 text-sm font-semibold\"\r\n >\r\n {{ accessibility.groupsCount }} {{ t(\"groups\") }}\r\n </div>\r\n <div class=\"border-surface px-1 sm:border-s-1\">\r\n <mt-button\r\n [text]=\"true\"\r\n icon=\"security.lock-unlocked-01\"\r\n severity=\"primary\"\r\n (click)=\"openPermissionsModal(accessibility)\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n </div>\r\n } @empty {\r\n <div\r\n class=\"mt-20 flex items-center justify-center px-4 text-center text-muted-color\"\r\n >\r\n {{ \"no-data-found\" | transloco }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
729
729
|
}
|
|
730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesList, decorators: [{
|
|
731
731
|
type: Component,
|
|
732
732
|
args: [{ selector: 'mt-accessibilities-list', standalone: true, imports: [
|
|
733
733
|
CommonModule,
|
|
@@ -746,7 +746,7 @@ class AddCategoryModal {
|
|
|
746
746
|
facade = inject(AccessibilitiesFacade);
|
|
747
747
|
translocoService = inject(TranslocoService);
|
|
748
748
|
// Input for edit mode - receives category with rawName
|
|
749
|
-
category = input(null, ...(ngDevMode ? [{ debugName: "category" }] : []));
|
|
749
|
+
category = input(null, ...(ngDevMode ? [{ debugName: "category" }] : /* istanbul ignore next */ []));
|
|
750
750
|
categoryFormControl = new FormControl(null);
|
|
751
751
|
dynamicFormConfig = linkedSignal(() => ({
|
|
752
752
|
sections: [
|
|
@@ -773,7 +773,7 @@ class AddCategoryModal {
|
|
|
773
773
|
],
|
|
774
774
|
},
|
|
775
775
|
],
|
|
776
|
-
}), ...(ngDevMode ? [{ debugName: "dynamicFormConfig" }] : []));
|
|
776
|
+
}), ...(ngDevMode ? [{ debugName: "dynamicFormConfig" }] : /* istanbul ignore next */ []));
|
|
777
777
|
isAddingCategory = this.facade.isAddingCategory;
|
|
778
778
|
isUpdatingCategory = this.facade.isUpdatingCategory;
|
|
779
779
|
constructor() {
|
|
@@ -816,10 +816,10 @@ class AddCategoryModal {
|
|
|
816
816
|
onCancel() {
|
|
817
817
|
this.ref.close(false);
|
|
818
818
|
}
|
|
819
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
820
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
819
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AddCategoryModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: AddCategoryModal, isStandalone: true, selector: "mt-add-category-modal", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div\r\n [class]=\"\r\n 'add-category-modal-content flex min-w-0 flex-col gap-3 overflow-x-hidden p-4 max-[640px]:p-3 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"categoryFormControl\"\r\n />\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'add-category-modal-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n variant=\"outlined\"\r\n [label]=\"t('cancel')\"\r\n (click)=\"onCancel()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"'add' | transloco\"\r\n (click)=\"onSubmit()\"\r\n [loading]=\"isAddingCategory() || isUpdatingCategory()\"\r\n [disabled]=\"!this.categoryFormControl.valid\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
821
821
|
}
|
|
822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AddCategoryModal, decorators: [{
|
|
823
823
|
type: Component,
|
|
824
824
|
args: [{ selector: 'mt-add-category-modal', standalone: true, imports: [
|
|
825
825
|
CommonModule,
|
|
@@ -835,14 +835,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
835
835
|
class CategoryGroups {
|
|
836
836
|
accessibilitiesFacade = inject(AccessibilitiesFacade);
|
|
837
837
|
confirmationService = inject(ConfirmationService);
|
|
838
|
-
groupSelectControl = input.required(...(ngDevMode ? [{ debugName: "groupSelectControl" }] : []));
|
|
839
|
-
availableGroups = input.required(...(ngDevMode ? [{ debugName: "availableGroups" }] : []));
|
|
840
|
-
categoryGroups = input.required(...(ngDevMode ? [{ debugName: "categoryGroups" }] : []));
|
|
841
|
-
selectedCategoryId = input.required(...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : []));
|
|
842
|
-
isLoadingCategoryDetails = input.required(...(ngDevMode ? [{ debugName: "isLoadingCategoryDetails" }] : []));
|
|
838
|
+
groupSelectControl = input.required(...(ngDevMode ? [{ debugName: "groupSelectControl" }] : /* istanbul ignore next */ []));
|
|
839
|
+
availableGroups = input.required(...(ngDevMode ? [{ debugName: "availableGroups" }] : /* istanbul ignore next */ []));
|
|
840
|
+
categoryGroups = input.required(...(ngDevMode ? [{ debugName: "categoryGroups" }] : /* istanbul ignore next */ []));
|
|
841
|
+
selectedCategoryId = input.required(...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : /* istanbul ignore next */ []));
|
|
842
|
+
isLoadingCategoryDetails = input.required(...(ngDevMode ? [{ debugName: "isLoadingCategoryDetails" }] : /* istanbul ignore next */ []));
|
|
843
843
|
isAddingGroupsToCategory = this.accessibilitiesFacade.isAddingGroupsToCategory;
|
|
844
844
|
isRemovingGroupFromCategory = this.accessibilitiesFacade.isRemovingGroupFromCategory;
|
|
845
|
-
groupDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "groupDeletedId" }] : []));
|
|
845
|
+
groupDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "groupDeletedId" }] : /* istanbul ignore next */ []));
|
|
846
846
|
onDeleteGroup(event, groupId) {
|
|
847
847
|
event.stopPropagation();
|
|
848
848
|
const categoryId = this.selectedCategoryId();
|
|
@@ -877,10 +877,10 @@ class CategoryGroups {
|
|
|
877
877
|
});
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
881
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CategoryGroups, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
881
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CategoryGroups, isStandalone: true, selector: "mt-category-groups", inputs: { groupSelectControl: { classPropertyName: "groupSelectControl", publicName: "groupSelectControl", isSignal: true, isRequired: true, transformFunction: null }, availableGroups: { classPropertyName: "availableGroups", publicName: "availableGroups", isSignal: true, isRequired: true, transformFunction: null }, categoryGroups: { classPropertyName: "categoryGroups", publicName: "categoryGroups", isSignal: true, isRequired: true, transformFunction: null }, selectedCategoryId: { classPropertyName: "selectedCategoryId", publicName: "selectedCategoryId", isSignal: true, isRequired: true, transformFunction: null }, isLoadingCategoryDetails: { classPropertyName: "isLoadingCategoryDetails", publicName: "isLoadingCategoryDetails", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div class=\"p-4\">\r\n <!-- Group Selection Section -->\r\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-end\">\r\n <div class=\"w-full sm:w-1/2\">\r\n <mt-select-field\r\n [formControl]=\"groupSelectControl()\"\r\n [label]=\"t('groups')\"\r\n [options]=\"availableGroups()\"\r\n optionLabel=\"name.display\"\r\n optionValue=\"id\"\r\n >\r\n </mt-select-field>\r\n </div>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('add-group')\"\r\n (click)=\"onAddGroupToCategory()\"\r\n [disabled]=\"!groupSelectControl().value || !selectedCategoryId()\"\r\n [loading]=\"isAddingGroupsToCategory()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n >\r\n </mt-button>\r\n </div>\r\n\r\n <div class=\"mt-6\">\r\n @if (isLoadingCategoryDetails()) {\r\n <div class=\"space-y-4 p-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n } @else {\r\n @for (group of categoryGroups(); track group.id) {\r\n <div\r\n class=\"my-3 flex flex-col gap-3 rounded-lg border border-surface p-3 sm:flex-row sm:items-center\"\r\n >\r\n <div class=\"min-w-0 flex-1\">\r\n <div class=\"break-words text-base font-medium\">\r\n {{ group.name?.display }}\r\n </div>\r\n </div>\r\n <div class=\"text-sm text-muted-color\">\r\n {{ group.usersCount }} {{ t(\"users\") }}\r\n </div>\r\n <div\r\n class=\"flex items-center gap-0 self-end sm:ms-auto sm:self-auto\"\r\n >\r\n <!-- <mt-button variant=\"text\" size=\"large\" icon=\"user.users-03\">\r\n </mt-button> -->\r\n <mt-button\r\n variant=\"text\"\r\n size=\"large\"\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n (click)=\"onDeleteGroup($event, group.groupId)\"\r\n [loading]=\"\r\n isRemovingGroupFromCategory() &&\r\n groupDeletedId() === group.groupId\r\n \"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n } @empty {\r\n <div class=\"flex items-center justify-center h-20 text-muted-color\">\r\n {{ \"no-data-found\" | transloco }}\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
882
882
|
}
|
|
883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CategoryGroups, decorators: [{
|
|
884
884
|
type: Component,
|
|
885
885
|
args: [{ selector: 'mt-category-groups', standalone: true, imports: [
|
|
886
886
|
CommonModule,
|
|
@@ -896,15 +896,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
896
896
|
|
|
897
897
|
class CategoryElements {
|
|
898
898
|
accessibilitiesFacade = inject(AccessibilitiesFacade);
|
|
899
|
-
selectedCategoryId = input.required(...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : []));
|
|
900
|
-
categoryLevels = model(...(ngDevMode ? [undefined, { debugName: "categoryLevels" }] : []));
|
|
899
|
+
selectedCategoryId = input.required(...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : /* istanbul ignore next */ []));
|
|
900
|
+
categoryLevels = model(...(ngDevMode ? [undefined, { debugName: "categoryLevels" }] : /* istanbul ignore next */ []));
|
|
901
901
|
nodes = computed(() => {
|
|
902
902
|
const tree = this.accessibilitiesFacade.levelsTree();
|
|
903
903
|
return this.transformTreeNodes(tree);
|
|
904
|
-
}, ...(ngDevMode ? [{ debugName: "nodes" }] : []));
|
|
904
|
+
}, ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
905
905
|
isLoadingTree = this.accessibilitiesFacade.isLoadingLevelsTree;
|
|
906
906
|
isLoadingCategoryDetails = this.accessibilitiesFacade.isLoadingCategoryDetails;
|
|
907
|
-
selection = model(null, ...(ngDevMode ? [{ debugName: "selection" }] : []));
|
|
907
|
+
selection = model(null, ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
908
908
|
constructor() {
|
|
909
909
|
effect(() => {
|
|
910
910
|
const selectedLevels = this.categoryLevels();
|
|
@@ -956,12 +956,12 @@ class CategoryElements {
|
|
|
956
956
|
: undefined,
|
|
957
957
|
}));
|
|
958
958
|
}
|
|
959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
960
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
959
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CategoryElements, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
960
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: CategoryElements, isStandalone: true, selector: "mt-category-elements", inputs: { selectedCategoryId: { classPropertyName: "selectedCategoryId", publicName: "selectedCategoryId", isSignal: true, isRequired: true, transformFunction: null }, categoryLevels: { classPropertyName: "categoryLevels", publicName: "categoryLevels", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { categoryLevels: "categoryLevelsChange", selection: "selectionChange" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div class=\"p-4\">\r\n <mt-tree\r\n [value]=\"nodes()\"\r\n [(selection)]=\"selection\"\r\n selectionMode=\"checkbox\"\r\n [loading]=\"isLoadingTree() || isLoadingCategoryDetails()\"\r\n (action)=\"onTreeAction($event)\"\r\n [checkAllChildren]=\"true\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"400px\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tree, selector: "mt-tree", inputs: ["value", "selection", "selectionMode", "nodeIcon", "propagateSelectionUp", "propagateSelectionDown", "checkAllChildren", "loading", "emptyMessage", "checkAllLabel", "filterPlaceholder", "dataKey", "filter", "filterMode", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "styleClass", "style", "pInputs", "nodeActions", "nodeContextmenuActions", "contextMenuSelection"], outputs: ["selectionChange", "contextMenuSelectionChange", "action"] }] });
|
|
961
961
|
}
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CategoryElements, decorators: [{
|
|
963
963
|
type: Component,
|
|
964
|
-
args: [{ selector: 'mt-category-elements', standalone: true, imports: [CommonModule, TranslocoDirective, Tree], template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div class=\"p-4\">\r\n <mt-tree\r\n [value]=\"nodes()\"\r\n [(selection)]=\"selection\"\r\n selectionMode=\"checkbox\"\r\n [loading]=\"isLoadingTree() || isLoadingCategoryDetails()\"\r\n (action)=\"onTreeAction($event)\"\r\n [checkAllChildren]=\"true\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
964
|
+
args: [{ selector: 'mt-category-elements', standalone: true, imports: [CommonModule, TranslocoDirective, Tree], template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div class=\"p-4\">\r\n <mt-tree\r\n [value]=\"nodes()\"\r\n [(selection)]=\"selection\"\r\n selectionMode=\"checkbox\"\r\n [loading]=\"isLoadingTree() || isLoadingCategoryDetails()\"\r\n (action)=\"onTreeAction($event)\"\r\n [checkAllChildren]=\"true\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"400px\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
965
965
|
}], ctorParameters: () => [], propDecorators: { selectedCategoryId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCategoryId", required: true }] }], categoryLevels: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryLevels", required: false }] }, { type: i0.Output, args: ["categoryLevelsChange"] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }] } });
|
|
966
966
|
|
|
967
967
|
class AccessibilitiesCategories {
|
|
@@ -980,24 +980,24 @@ class AccessibilitiesCategories {
|
|
|
980
980
|
selectedCategory = this.accessibilitiesFacade.selectedCategory;
|
|
981
981
|
isLoadingCategoryDetails = this.accessibilitiesFacade.isLoadingCategoryDetails;
|
|
982
982
|
isUpdatingCategory = this.accessibilitiesFacade.isUpdatingCategory;
|
|
983
|
-
selectedCategoryId = signal(null, ...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : []));
|
|
984
|
-
categoryDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "categoryDeletedId" }] : []));
|
|
985
|
-
categoryEditedId = signal(null, ...(ngDevMode ? [{ debugName: "categoryEditedId" }] : []));
|
|
986
|
-
groupDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "groupDeletedId" }] : []));
|
|
983
|
+
selectedCategoryId = signal(null, ...(ngDevMode ? [{ debugName: "selectedCategoryId" }] : /* istanbul ignore next */ []));
|
|
984
|
+
categoryDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "categoryDeletedId" }] : /* istanbul ignore next */ []));
|
|
985
|
+
categoryEditedId = signal(null, ...(ngDevMode ? [{ debugName: "categoryEditedId" }] : /* istanbul ignore next */ []));
|
|
986
|
+
groupDeletedId = signal(null, ...(ngDevMode ? [{ debugName: "groupDeletedId" }] : /* istanbul ignore next */ []));
|
|
987
987
|
groupSelectControl = new FormControl(null);
|
|
988
988
|
availableGroups = computed(() => {
|
|
989
989
|
const allGroups = this.groups();
|
|
990
990
|
const selectedCategoryGroups = this.selectedCategory()?.groups || [];
|
|
991
991
|
const selectedGroupIds = selectedCategoryGroups.map((g) => g.groupId);
|
|
992
992
|
return allGroups.filter((group) => !selectedGroupIds.includes(group.id));
|
|
993
|
-
}, ...(ngDevMode ? [{ debugName: "availableGroups" }] : []));
|
|
993
|
+
}, ...(ngDevMode ? [{ debugName: "availableGroups" }] : /* istanbul ignore next */ []));
|
|
994
994
|
categoryGroups = computed(() => {
|
|
995
995
|
return this.selectedCategory()?.groups || [];
|
|
996
|
-
}, ...(ngDevMode ? [{ debugName: "categoryGroups" }] : []));
|
|
996
|
+
}, ...(ngDevMode ? [{ debugName: "categoryGroups" }] : /* istanbul ignore next */ []));
|
|
997
997
|
categoryLevels = computed(() => {
|
|
998
998
|
return this.selectedCategory()?.levels || [];
|
|
999
|
-
}, ...(ngDevMode ? [{ debugName: "categoryLevels" }] : []));
|
|
1000
|
-
selectedTab = signal('elements', ...(ngDevMode ? [{ debugName: "selectedTab" }] : []));
|
|
999
|
+
}, ...(ngDevMode ? [{ debugName: "categoryLevels" }] : /* istanbul ignore next */ []));
|
|
1000
|
+
selectedTab = signal('elements', ...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
|
|
1001
1001
|
tabsList = [
|
|
1002
1002
|
{
|
|
1003
1003
|
label: this.translocoService.translate('accessibilities.elements'),
|
|
@@ -1100,10 +1100,10 @@ class AccessibilitiesCategories {
|
|
|
1100
1100
|
isCategorySelected(categoryId) {
|
|
1101
1101
|
return this.selectedCategoryId() === categoryId;
|
|
1102
1102
|
}
|
|
1103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesCategories, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: AccessibilitiesCategories, isStandalone: true, selector: "mt-accessibilities-categories", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div\r\n class=\"mt-4 grid min-h-0 gap-4 xl:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)] xl:gap-7\"\r\n >\r\n <mt-card class=\"h-full min-h-0 max-[1279px]:h-auto\">\r\n <div class=\"flex h-full min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface p-5\"\r\n >\r\n <h2 class=\"text-lg font-semibold m-0\">{{ t(\"categories\") }}</h2>\r\n </div>\r\n @if (isLoadingCategories()) {\r\n <div class=\"space-y-4 p-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"my-4 flex min-h-0 flex-col gap-3 overflow-auto pb-4 max-[1279px]:max-h-[40vh]\"\r\n >\r\n @for (category of categories(); track category.id) {\r\n <div\r\n class=\"mx-4 flex items-start gap-3 rounded-lg border-1 border-gray-300 p-3 transition-colors cursor-pointer\"\r\n [class.bg-primary-50]=\"isCategorySelected(category.id)\"\r\n [class.border-primary-400]=\"isCategorySelected(category.id)\"\r\n [style.--p-avatar-background]=\"\r\n isCategorySelected(category.id)\r\n ? 'var(--p-primary-color)'\r\n : 'var(--p-surface-100)'\r\n \"\r\n [style.--p-avatar-color]=\"\r\n isCategorySelected(category.id) ? '#ffffff' : ''\r\n \"\r\n (click)=\"onCategoryClick(category.id)\"\r\n >\r\n <mt-avatar\r\n class=\"shrink-0\"\r\n [icon]=\"'user.user-check-01'\"\r\n shape=\"square\"\r\n >\r\n </mt-avatar>\r\n <div class=\"flex-1 min-w-0\">\r\n <div class=\"font-medium truncate\">\r\n {{ category.name?.display }}\r\n </div>\r\n </div>\r\n <div class=\"flex shrink-0 self-start\">\r\n <mt-button\r\n variant=\"text\"\r\n size=\"small\"\r\n icon=\"editor.pencil-01\"\r\n severity=\"primary\"\r\n (click)=\"onEditCategory($event, category)\"\r\n [loading]=\"\r\n isUpdatingCategory() &&\r\n categoryEditedId() === category.id\r\n \"\r\n >\r\n </mt-button>\r\n <mt-button\r\n variant=\"text\"\r\n size=\"small\"\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n (click)=\"onDeleteCategory($event, category.id)\"\r\n [loading]=\"\r\n isDeletingCategory() &&\r\n categoryDeletedId() === category.id\r\n \"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n } @empty {\r\n <div\r\n class=\"flex items-center justify-center h-12 text-muted-color\"\r\n >\r\n {{ \"no-data-found\" | transloco }}\r\n </div>\r\n }\r\n <div class=\"mx-4 mt-2\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n (click)=\"onAddCategory()\"\r\n [label]=\"t('add-category')\"\r\n styleClass=\"w-full sm:w-auto\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n <mt-card class=\"h-full min-h-0 max-[1279px]:h-auto\">\r\n <div class=\"flex h-full min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div class=\"p-5 mb-5 border-b border-surface\">\r\n <h2 class=\"text-lg font-semibold m-0\">\r\n {{ t(\"category-relations\") }}\r\n </h2>\r\n </div>\r\n\r\n <div class=\"mb-4 overflow-x-auto px-4 sm:px-5\">\r\n <mt-tabs\r\n class=\"min-w-max\"\r\n [(active)]=\"selectedTab\"\r\n [options]=\"tabsList\"\r\n size=\"small\"\r\n >\r\n </mt-tabs>\r\n </div>\r\n\r\n @if (selectedTab() === \"elements\") {\r\n <mt-category-elements\r\n [selectedCategoryId]=\"selectedCategoryId()\"\r\n [categoryLevels]=\"categoryLevels()\"\r\n />\r\n } @else if (selectedTab() === \"groups\") {\r\n <mt-category-groups\r\n [groupSelectControl]=\"groupSelectControl\"\r\n [availableGroups]=\"availableGroups()\"\r\n [categoryGroups]=\"categoryGroups()\"\r\n [selectedCategoryId]=\"selectedCategoryId()\"\r\n [isLoadingCategoryDetails]=\"isLoadingCategoryDetails()\"\r\n />\r\n }\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: CategoryGroups, selector: "mt-category-groups", inputs: ["groupSelectControl", "availableGroups", "categoryGroups", "selectedCategoryId", "isLoadingCategoryDetails"] }, { kind: "component", type: CategoryElements, selector: "mt-category-elements", inputs: ["selectedCategoryId", "categoryLevels", "selection"], outputs: ["categoryLevelsChange", "selectionChange"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
1105
1105
|
}
|
|
1106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AccessibilitiesCategories, decorators: [{
|
|
1107
1107
|
type: Component,
|
|
1108
1108
|
args: [{ selector: 'mt-accessibilities-categories', standalone: true, imports: [
|
|
1109
1109
|
CommonModule,
|
|
@@ -1118,7 +1118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1118
1118
|
TranslocoPipe,
|
|
1119
1119
|
CategoryGroups,
|
|
1120
1120
|
CategoryElements,
|
|
1121
|
-
], template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div\r\n class=\"mt-4 grid min-h-0 gap-4 xl:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)] xl:gap-7\"\r\n >\r\n <mt-card class=\"h-full min-h-0 max-[1279px]:h-auto\">\r\n <div class=\"flex h-full min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface p-5\"\r\n >\r\n <h2 class=\"text-lg font-semibold m-0\">{{ t(\"categories\") }}</h2>\r\n </div>\r\n @if (isLoadingCategories()) {\r\n <div class=\"space-y-4 p-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"
|
|
1121
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'accessibilities'\">\r\n <div\r\n class=\"mt-4 grid min-h-0 gap-4 xl:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)] xl:gap-7\"\r\n >\r\n <mt-card class=\"h-full min-h-0 max-[1279px]:h-auto\">\r\n <div class=\"flex h-full min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface p-5\"\r\n >\r\n <h2 class=\"text-lg font-semibold m-0\">{{ t(\"categories\") }}</h2>\r\n </div>\r\n @if (isLoadingCategories()) {\r\n <div class=\"space-y-4 p-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"my-4 flex min-h-0 flex-col gap-3 overflow-auto pb-4 max-[1279px]:max-h-[40vh]\"\r\n >\r\n @for (category of categories(); track category.id) {\r\n <div\r\n class=\"mx-4 flex items-start gap-3 rounded-lg border-1 border-gray-300 p-3 transition-colors cursor-pointer\"\r\n [class.bg-primary-50]=\"isCategorySelected(category.id)\"\r\n [class.border-primary-400]=\"isCategorySelected(category.id)\"\r\n [style.--p-avatar-background]=\"\r\n isCategorySelected(category.id)\r\n ? 'var(--p-primary-color)'\r\n : 'var(--p-surface-100)'\r\n \"\r\n [style.--p-avatar-color]=\"\r\n isCategorySelected(category.id) ? '#ffffff' : ''\r\n \"\r\n (click)=\"onCategoryClick(category.id)\"\r\n >\r\n <mt-avatar\r\n class=\"shrink-0\"\r\n [icon]=\"'user.user-check-01'\"\r\n shape=\"square\"\r\n >\r\n </mt-avatar>\r\n <div class=\"flex-1 min-w-0\">\r\n <div class=\"font-medium truncate\">\r\n {{ category.name?.display }}\r\n </div>\r\n </div>\r\n <div class=\"flex shrink-0 self-start\">\r\n <mt-button\r\n variant=\"text\"\r\n size=\"small\"\r\n icon=\"editor.pencil-01\"\r\n severity=\"primary\"\r\n (click)=\"onEditCategory($event, category)\"\r\n [loading]=\"\r\n isUpdatingCategory() &&\r\n categoryEditedId() === category.id\r\n \"\r\n >\r\n </mt-button>\r\n <mt-button\r\n variant=\"text\"\r\n size=\"small\"\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n (click)=\"onDeleteCategory($event, category.id)\"\r\n [loading]=\"\r\n isDeletingCategory() &&\r\n categoryDeletedId() === category.id\r\n \"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n } @empty {\r\n <div\r\n class=\"flex items-center justify-center h-12 text-muted-color\"\r\n >\r\n {{ \"no-data-found\" | transloco }}\r\n </div>\r\n }\r\n <div class=\"mx-4 mt-2\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n (click)=\"onAddCategory()\"\r\n [label]=\"t('add-category')\"\r\n styleClass=\"w-full sm:w-auto\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n <mt-card class=\"h-full min-h-0 max-[1279px]:h-auto\">\r\n <div class=\"flex h-full min-h-0 flex-col\">\r\n <ng-template #headless>\r\n <div class=\"p-5 mb-5 border-b border-surface\">\r\n <h2 class=\"text-lg font-semibold m-0\">\r\n {{ t(\"category-relations\") }}\r\n </h2>\r\n </div>\r\n\r\n <div class=\"mb-4 overflow-x-auto px-4 sm:px-5\">\r\n <mt-tabs\r\n class=\"min-w-max\"\r\n [(active)]=\"selectedTab\"\r\n [options]=\"tabsList\"\r\n size=\"small\"\r\n >\r\n </mt-tabs>\r\n </div>\r\n\r\n @if (selectedTab() === \"elements\") {\r\n <mt-category-elements\r\n [selectedCategoryId]=\"selectedCategoryId()\"\r\n [categoryLevels]=\"categoryLevels()\"\r\n />\r\n } @else if (selectedTab() === \"groups\") {\r\n <mt-category-groups\r\n [groupSelectControl]=\"groupSelectControl\"\r\n [availableGroups]=\"availableGroups()\"\r\n [categoryGroups]=\"categoryGroups()\"\r\n [selectedCategoryId]=\"selectedCategoryId()\"\r\n [isLoadingCategoryDetails]=\"isLoadingCategoryDetails()\"\r\n />\r\n }\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
1122
1122
|
}], ctorParameters: () => [] });
|
|
1123
1123
|
|
|
1124
1124
|
/**
|