@acorex/platform 0.0.0-ACOREX
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.
- package/README.md +7 -0
- package/auth/README.md +3 -0
- package/common/README.md +3 -0
- package/core/README.md +4 -0
- package/fesm2022/acorex-platform-auth.mjs +1362 -0
- package/fesm2022/acorex-platform-auth.mjs.map +1 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs +127 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +4601 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -0
- package/fesm2022/acorex-platform-core.mjs +4374 -0
- package/fesm2022/acorex-platform-core.mjs.map +1 -0
- package/fesm2022/acorex-platform-domain.mjs +3234 -0
- package/fesm2022/acorex-platform-domain.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-builder.mjs +2847 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +8583 -0
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-designer.mjs +2474 -0
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +19150 -0
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-views.mjs +1468 -0
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2950 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs +72 -0
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs +158 -0
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs +29 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs +172 -0
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs +274 -0
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs +64 -0
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs +34 -0
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +29791 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -0
- package/fesm2022/acorex-platform-native.mjs +155 -0
- package/fesm2022/acorex-platform-native.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs +20 -0
- package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs +20 -0
- package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime.mjs +899 -0
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs +237 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs +31 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs +25 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2589 -0
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs +57 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs +168 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs +65 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs +64 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +2125 -0
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -0
- package/fesm2022/acorex-platform-workflow.mjs +2501 -0
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -0
- package/fesm2022/acorex-platform.mjs +6 -0
- package/fesm2022/acorex-platform.mjs.map +1 -0
- package/layout/builder/README.md +1578 -0
- package/layout/components/README.md +3 -0
- package/layout/designer/README.md +4 -0
- package/layout/entity/README.md +4 -0
- package/layout/views/README.md +3 -0
- package/layout/widget-core/README.md +4 -0
- package/layout/widgets/README.md +3 -0
- package/native/README.md +4 -0
- package/package.json +103 -0
- package/runtime/README.md +3 -0
- package/themes/default/README.md +3 -0
- package/themes/shared/README.md +3 -0
- package/types/acorex-platform-auth.d.ts +680 -0
- package/types/acorex-platform-common.d.ts +2926 -0
- package/types/acorex-platform-core.d.ts +2896 -0
- package/types/acorex-platform-domain.d.ts +2353 -0
- package/types/acorex-platform-layout-builder.d.ts +926 -0
- package/types/acorex-platform-layout-components.d.ts +2903 -0
- package/types/acorex-platform-layout-designer.d.ts +422 -0
- package/types/acorex-platform-layout-entity.d.ts +3189 -0
- package/types/acorex-platform-layout-views.d.ts +667 -0
- package/types/acorex-platform-layout-widget-core.d.ts +1086 -0
- package/types/acorex-platform-layout-widgets.d.ts +5478 -0
- package/types/acorex-platform-native.d.ts +28 -0
- package/types/acorex-platform-runtime-catalog-command-definition.d.ts +137 -0
- package/types/acorex-platform-runtime-catalog-query-definition.d.ts +125 -0
- package/types/acorex-platform-runtime.d.ts +470 -0
- package/types/acorex-platform-themes-default.d.ts +573 -0
- package/types/acorex-platform-themes-shared.d.ts +170 -0
- package/types/acorex-platform-workflow.d.ts +1806 -0
- package/types/acorex-platform.d.ts +2 -0
- package/workflow/README.md +4 -0
|
@@ -0,0 +1,1468 @@
|
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, viewChild, afterNextRender, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, signal, computed, Injectable, input, output, ViewContainerRef, Directive, HostListener } from '@angular/core';
|
|
5
|
+
import { AXCommonModule } from '@acorex/cdk/common';
|
|
6
|
+
import * as i4 from '@acorex/components/breadcrumbs';
|
|
7
|
+
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
|
8
|
+
import * as i6 from '@acorex/components/button';
|
|
9
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
10
|
+
import * as i3 from '@acorex/components/decorators';
|
|
11
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
12
|
+
import * as i5 from '@acorex/components/dropdown';
|
|
13
|
+
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
14
|
+
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
15
|
+
import { AXPStickyDirective, AXPHomePageService, AXPCommonSettings, AXPSettingsService, AXPEntityCommandScope } from '@acorex/platform/common';
|
|
16
|
+
import * as i8 from '@acorex/platform/core';
|
|
17
|
+
import { AXPDeviceService, AXPComponentSlotModule, getSmart, getChangedPaths, AXPExpressionEvaluatorService, AXPBroadcastEventService } from '@acorex/platform/core';
|
|
18
|
+
import * as i1 from '@acorex/cdk/drawer';
|
|
19
|
+
import { AXDrawerDirectiveModule, AXDrawerContainerDirective } from '@acorex/cdk/drawer';
|
|
20
|
+
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
21
|
+
import * as i3$1 from '@acorex/core/translation';
|
|
22
|
+
import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
|
|
23
|
+
import { AXPThemeLayoutBlockComponent, AXPThemeLayoutActionsComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutContainerComponent, AXPPageComponentRegistryService, AXPThemeLayoutListComponent, AXPThemeLayoutListItemComponent, AXPThemeLayoutStartSideComponent } from '@acorex/platform/layout/components';
|
|
24
|
+
import { AXPStatusChipComponent } from '@acorex/platform/layout/widgets';
|
|
25
|
+
import { AXPCommandService, AXPPolicyEngineService } from '@acorex/platform/runtime';
|
|
26
|
+
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
27
|
+
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
|
28
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
29
|
+
import { AXFormatService, AXFormatModule } from '@acorex/core/format';
|
|
30
|
+
import { AXPSessionService } from '@acorex/platform/auth';
|
|
31
|
+
import { isNil, isEmpty, cloneDeep, isEqual, get } from 'lodash-es';
|
|
32
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
33
|
+
import * as i6$1 from '@acorex/platform/layout/widget-core';
|
|
34
|
+
import { AXPPageStatus, AXPWidgetContainerComponent, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
35
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
36
|
+
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
37
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
|
38
|
+
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
39
|
+
import { AXLoadingModule } from '@acorex/components/loading';
|
|
40
|
+
import { AXMenuModule } from '@acorex/components/menu';
|
|
41
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
42
|
+
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
43
|
+
import { AXFileModule } from '@acorex/core/file';
|
|
44
|
+
import * as i7 from '@acorex/components/form';
|
|
45
|
+
import { AXFormModule } from '@acorex/components/form';
|
|
46
|
+
import * as i5$1 from '@acorex/components/tabs';
|
|
47
|
+
import { AXTabsModule } from '@acorex/components/tabs';
|
|
48
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
49
|
+
|
|
50
|
+
class AXPPageLayoutBase {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class AXPPageLayoutComponent {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.page = inject(AXPPageLayoutBase, { optional: true });
|
|
56
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
57
|
+
this.deviceService = inject(AXPDeviceService);
|
|
58
|
+
this.startSideDrawer = viewChild('startSideDrawer', ...(ngDevMode ? [{ debugName: "startSideDrawer" }] : /* istanbul ignore next */ []));
|
|
59
|
+
this.workflow = inject(AXPWorkflowService);
|
|
60
|
+
this.commandService = inject(AXPCommandService);
|
|
61
|
+
this.#initialize = afterNextRender(async () => {
|
|
62
|
+
this.checkScrollableContent();
|
|
63
|
+
});
|
|
64
|
+
this.#effect = effect(() => {
|
|
65
|
+
this.page?.title();
|
|
66
|
+
this.page?.description();
|
|
67
|
+
this.checkScrollableContent();
|
|
68
|
+
}, ...(ngDevMode ? [{ debugName: "#effect" }] : /* istanbul ignore next */ []));
|
|
69
|
+
}
|
|
70
|
+
#initialize;
|
|
71
|
+
#effect;
|
|
72
|
+
checkScrollableContent() {
|
|
73
|
+
const content = document.querySelector('axp-page-content');
|
|
74
|
+
if (content && content.scrollHeight >= content.clientHeight) {
|
|
75
|
+
content.classList.add('--scrollable');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
handleActionClick(item) {
|
|
79
|
+
if (item.command && (item.items?.length ?? 0) == 0) {
|
|
80
|
+
this.execute(item.command);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
toggleStartSide() {
|
|
84
|
+
this.startSideDrawer()?.toggle();
|
|
85
|
+
}
|
|
86
|
+
handleSecondaryActionClick(item) {
|
|
87
|
+
if (item.command) {
|
|
88
|
+
this.execute(item.command);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
handleBackdropClick(e) {
|
|
92
|
+
e.nativeEvent.preventDefault();
|
|
93
|
+
e.nativeEvent.stopPropagation();
|
|
94
|
+
e.component.hide();
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
async execute(command) {
|
|
98
|
+
const reserved = ['navigate'];
|
|
99
|
+
if (reserved.includes(command.name)) {
|
|
100
|
+
await this.workflow.execute(command.name, { options: command.options });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (this.commandService.exists(command.name)) {
|
|
104
|
+
await this.commandService.execute(command.name, command.options ?? {});
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
await this.page?.execute(command);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
handleOnBackdropClick(event) {
|
|
111
|
+
event.stopPropagation();
|
|
112
|
+
this.startSideDrawer()?.hide();
|
|
113
|
+
}
|
|
114
|
+
//#region ---------------- Status Helpers ----------------
|
|
115
|
+
getEntityData() {
|
|
116
|
+
// Get entity data from page context if available
|
|
117
|
+
if (this.page && 'getEntityData' in this.page && typeof this.page.getEntityData === 'function') {
|
|
118
|
+
return this.page.getEntityData();
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
async handleStatusTransition(transition) {
|
|
123
|
+
// Convert status transition to command and execute
|
|
124
|
+
await this.execute({
|
|
125
|
+
name: 'update-status',
|
|
126
|
+
options: {
|
|
127
|
+
transition,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPPageLayoutComponent, isStandalone: true, selector: "axp-page-layout", providers: [], viewQueries: [{ propertyName: "startSideDrawer", first: true, predicate: ["startSideDrawer"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.AXDrawerContainerDirective }], ngImport: i0, template: "<!-------- Begin Start Side Drawer -------->\n<div id=\"axp-drawer-start\" [mode]=\"deviceService.isSmall() ? 'overlay' : 'push'\" [transition]=\"250\" axDrawerItem\n [backDrop]=\"true\" (onBackdropClick)=\"handleBackdropClick($event)\" #startSideDrawer=\"axDrawerItem\"\n [backdropClass]=\"'ax-bg-darkest/75'\" [collapsed]=\"deviceService.isSmall()\" drawerLocation=\"start\"\n class=\"ax-z-50 ax-h-full\">\n <ng-content select=\"axp-layout-start-side\"></ng-content>\n</div>\n<!-------- Finish Start Side Drawer -------->\n<!--------------------------------------------------------------->\n<!-------- Begin Main Layout Container -------->\n<axp-layout-container id=\"axp-page-layout\" #container>\n <!-------- Begin Page Header -------->\n <axp-layout-header id=\"axp-page-header\" *translate=\"let t\" #sticky=\"axpSticky\" [axpSticky]=\"'axp-is-sticky'\"\n [stickyOffset]=\"50\" [stickyParent]=\"container.hostElement\">\n <!-------- Begin Back Button (Mobile Only) -------->\n @if (page?.hasBackButton() && deviceService.isSmall()) {\n <ax-button id=\"axp-btn-back\" [look]=\"'blank'\" class=\"ax-sm ax-w-fit ax-ms-1\" color=\"secondary\"\n (click)=\"page?.onBackButtonClick()\" [text]=\"page?.backButton()?.title\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-chevron-left rtl:ax-rotate-180\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n <!-------- Finish Back Button -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Bar -------->\n <axp-layout-title-bar id=\"axp-title-bar\">\n <!-------- Begin Title Section -------->\n <div class=\"ax-flex ax-flex-col ax-transition ax-shrink-1 ax-min-w-0\">\n <!-------- Begin Breadcrumbs -------->\n @if (page?.hasBreadcrumbs() && !deviceService.isSmall()) {\n <ax-breadcrumbs id=\"axp-breadcrumb\" class=\"ax-mb-1\">\n @for (item of page?.breadcrumbs(); track $index) {\n <ax-breadcrumbs-item [attr.id]=\"'axp-breadcrumb-item-' + $index\" [active]=\"$last\"\n (click)=\"item.command ? execute(item.command) : null\">\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n {{ t(item.title) | async }}\n </ax-breadcrumbs-item>\n }\n <ng-template #divider>\n <i class=\"fa-regular fa-chevron-right rtl:ax-rotate-180 fa-sm\"></i>\n </ng-template>\n </ax-breadcrumbs>\n }\n <!-------- Finish Breadcrumbs -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Container -------->\n <div class=\"__title-container\">\n <!-------- Begin Page Title -------->\n @if (page?.hasTitle()) {\n <axp-layout-title id=\"axp-page-title\">\n @if (page?.hasTitleIcon()) {\n <ax-icon [icon]=\"page?.titleIcon()!\" class=\"ax-me-2\"></ax-icon>\n }\n {{ t(page?.title()) | async }}\n </axp-layout-title>\n }\n <!-------- Finish Page Title -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Actions -------->\n @if (page?.hasTitleActions()) {\n <ax-button id=\"axp-btn-title-actions\" [look]=\"'blank'\" class=\"ax-sm -ax-mx-2\">\n <ax-prefix>\n <i class=\"fa-solid fa-caret-down fa-fw\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of page?.titleActions(); track $index) {\n <ng-container>\n <ax-button-item [attr.id]=\"'axp-btn-title-action-' + (sub.name || $index)\"\n [text]=\"(t(sub.title) | async)!\" [color]=\"sub.color\" [disabled]=\"sub.disabled\"\n [selected]=\"sub.command?.metadata?.['isSelected']\" (onClick)=\"handleActionClick(sub)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n @if (sub.command?.metadata?.['isSelected']) {\n <ax-suffix class=\"ax-ms-2\">\n <ax-icon icon=\"fa-solid fa-check\"></ax-icon>\n </ax-suffix>\n }\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n </ng-container>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n <!-------- Finish Title Actions -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Badge -------->\n @if (page?.hasBadge()) {\n <div id=\"axp-page-badge\" class=\"__title-badge --{{ page?.badge()?.color }}\"\n [attr.title]=\"page?.badge()?.description\">\n <i class=\"fa-solid fa-circle\"></i>\n {{ page?.badge()?.title }}\n </div>\n }\n <!-------- Finish Title Badge -------->\n\n <!-------- Begin Page Status -------->\n\n @if (page?.hasStatus()) {\n <axp-status-chip [value]=\"page?.status()?.value ?? null\" [readonly]=\"page?.status()?.readonly || false\"\n [definitionKey]=\"page?.status()?.definitionKey ?? null\" [entityData]=\"getEntityData()\"\n (transitionExecuted)=\"handleStatusTransition($event)\" class=\"__title-status\"></axp-status-chip>\n }\n <!-------- Finish Page Status -------->\n\n </div>\n <!-------- Finish Title Container -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Description -------->\n @if (page?.hasDescription()) {\n <axp-layout-description id=\"axp-page-description\">\n {{ t(page?.description()) | async }}</axp-layout-description>\n }\n <!-------- Finish Page Description -------->\n </div>\n <!-------- Finish Title Section -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Actions -------->\n <axp-layout-actions id=\"axp-page-actions\" class=\"ax-shrink-0\">\n <axp-component-slot name=\"page-header-actions\"></axp-component-slot>\n <!-------- Begin Primary Actions -------->\n @if (page?.hasPrimaryActions()) {\n @for (item of page?.primaryMenuItems(); track $index) {\n @if (item.visible != false) {\n <ax-button [attr.id]=\"'axp-btn-primary-' + (item.name || item.title)\" [class.ax-sm]=\"deviceService.isSmall()\"\n [iconOnly]=\"deviceService.isSmall()\" [disabled]=\"item.disabled\" [text]=\"(t(item.title) | async)!\"\n [look]=\"'solid'\" [color]=\"item.color\" (onClick)=\"handleActionClick(item)\">\n <ax-prefix>\n <i class=\"{{ item.icon }}\"></i>\n </ax-prefix>\n @if (item?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of item?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item [attr.id]=\"'axp-btn-primary-' + (item.name || item.title) + '-' + (sub.name || sub.title)\"\n [text]=\"(t(sub.title) | async)!\" [color]=\"sub.color\" [disabled]=\"sub.disabled\"\n (onClick)=\"handleActionClick(sub)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n <!-------- Finish Primary Actions -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Secondary Actions -------->\n @if (page?.hasSecondaryActions()) {\n <ax-button id=\"axp-btn-secondary\" [class.ax-sm]=\"deviceService.isSmall()\" [iconOnly]=\"deviceService.isSmall()\"\n [text]=\"'@general:terms.interface.actions' | translate | async\"\n [look]=\"deviceService.isSmall() ? 'blank' : 'solid'\" [color]=\"'default'\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (item of page?.secondaryMenuItems(); track $index) {\n @if (item.visible != false) {\n <ax-button-item [attr.id]=\"'axp-btn-secondary-' + (item.name || item.title)\"\n [text]=\"(item.title | translate | async)!\" [color]=\"item.color\" [disabled]=\"item.disabled\"\n (onClick)=\"handleSecondaryActionClick(item)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n <!-------- Finish Secondary Actions -------->\n </axp-layout-actions>\n <!-------- Finish Page Actions -------->\n </axp-layout-title-bar>\n <!-------- Finish Title Bar -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Toolbar / Navbar -------->\n @if (!sticky.isSticky) {}\n <ng-content select=\"axp-page-toolbar\"></ng-content>\n <!-------- Finish Page Toolbar / Navbar -------->\n </axp-layout-header>\n <!-------- Finish Page Header -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Content -------->\n <ng-content select=\"axp-page-content\"></ng-content>\n <!-------- Finish Page Content -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Footer -------->\n <axp-page-footer-container id=\"axp-page-footer-container\"\n [ngStyle]=\"{ display: tt.isEmpty() && prefixSlot.isEmpty() && suffixSlot.isEmpty() ? 'none' : 'block' }\">\n <axp-layout-container #tt>\n <ng-content select=\"axp-page-footer\"></ng-content>\n </axp-layout-container>\n <axp-page-footer id=\"axp-page-footer\">\n <axp-layout-prefix>\n <axp-component-slot name=\"page-footer-start\" #prefixSlot=\"slot\"></axp-component-slot>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <axp-component-slot name=\"page-footer-end\" #suffixSlot=\"slot\"></axp-component-slot>\n </axp-layout-suffix>\n </axp-page-footer>\n </axp-page-footer-container>\n <!-------- Finish Page Footer -------->\n</axp-layout-container>\n<!-------- Finish Main Layout Container -------->", styles: [".axp-status-icon{font-size:.875rem;line-height:1}.axp-status-chip{display:inline-flex}.axp-status-chip--primary{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface))}.axp-status-icon--primary{color:rgb(var(--ax-sys-color-primary-dark-surface))}.axp-status-chip--secondary{background-color:rgb(var(--ax-sys-color-secondary-lighter-surface));color:rgb(var(--ax-sys-color-on-secondary-lighter-surface))}.axp-status-icon--secondary{color:rgb(var(--ax-sys-color-secondary-dark-surface))}.axp-status-chip--success{background-color:rgb(var(--ax-sys-color-success-lighter-surface));color:rgb(var(--ax-sys-color-on-success-lighter-surface))}.axp-status-icon--success{color:rgb(var(--ax-sys-color-success-dark-surface))}.axp-status-chip--warning{background-color:rgb(var(--ax-sys-color-warning-lighter-surface));color:rgb(var(--ax-sys-color-on-warning-lighter-surface))}.axp-status-icon--warning{color:rgb(var(--ax-sys-color-warning-dark-surface))}.axp-status-chip--danger{background-color:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.axp-status-icon--danger{color:rgb(var(--ax-sys-color-danger-dark-surface))}.axp-status-chip--info{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--info{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--accent1{background-color:rgb(var(--ax-sys-color-accent1-lighter-surface));color:rgb(var(--ax-sys-color-on-accent1-lighter-surface))}.axp-status-icon--accent1{color:rgb(var(--ax-sys-color-accent1-dark-surface))}.axp-status-chip--accent2{background-color:rgb(var(--ax-sys-color-accent2-lighter-surface));color:rgb(var(--ax-sys-color-on-accent2-lighter-surface))}.axp-status-icon--accent2{color:rgb(var(--ax-sys-color-accent2-dark-surface))}.axp-status-chip--accent3{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--accent3{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--neutral{background-color:rgb(var(--ax-sys-color-neutral-lighter-surface));color:rgb(var(--ax-sys-color-on-neutral-lighter-surface))}.axp-status-icon--neutral{color:rgb(var(--ax-sys-color-neutral-dark-surface))}axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}axp-layout-list{display:flex;flex-direction:column}axp-layout-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed}axp-layout-list:focus{outline:none}axp-layout-list-group{display:flex;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-group>axp-layout-title{padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600}axp-layout-list-group>axp-layout-header{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-item{margin-top:.25rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem;font-size:.875rem;line-height:1.25rem}axp-layout-list-item:focus{outline:none}axp-layout-list-item.axp-state-focused,axp-layout-list-item:hover{cursor:pointer;border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-list-item>axp-layout-prefix{margin-inline-end:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-list-item>axp-layout-content{flex:1 1 0%}axp-layout-list-item>axp-layout-content axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-list-item>axp-layout-suffix{margin-inline-start:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-sections{display:flex;flex-direction:column;gap:1rem}axp-layout-sections axp-layout-section{display:block;border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding:.5rem 1rem}@media(min-width:1280px){axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-layout-sections axp-layout-section>axp-layout-header{display:flex;flex-direction:column;gap:0px;border-top-left-radius:.375rem;border-top-right-radius:.375rem;border-bottom-width:1px}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-title{font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem}axp-layout-sections axp-layout-section>axp-layout-footer{display:flex;align-items:center;justify-content:space-between;border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem;border-top-width:1px;padding:1rem}axp-layout-sections axp-layout-section>axp-layout-footer>axp-layout-suffix{margin-inline-start:auto;display:flex;gap:.5rem}axp-layout-sections axp-layout-section>axp-layout-footer{opacity:0;animation:fadeInDown .5s ease-out forwards}@keyframes fadeInDown{0%{opacity:0}to{opacity:1}}axp-page-layout{display:flex;width:100%;height:100%;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout axp-layout-start-side,axp-page-layout axp-layout-end-side{display:flex;min-height:100%;min-width:16rem;flex-direction:column;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout axp-layout-start-side axp-layout-header,axp-page-layout axp-layout-end-side axp-layout-header{display:flex;flex-direction:column;gap:.5rem;padding:1rem}axp-page-layout axp-layout-start-side axp-layout-header>axp-layout-title,axp-page-layout axp-layout-end-side axp-layout-header>axp-layout-title{font-size:1.125rem;line-height:1.75rem;font-weight:500}axp-page-layout axp-layout-start-side>axp-layout-content,axp-page-layout axp-layout-end-side>axp-layout-content{flex:1 1 0%}axp-page-layout>axp-layout-container{position:relative;display:flex;width:100%;height:100%;flex-direction:column;overflow:auto;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header{position:sticky;top:0;z-index:20;display:flex;flex-direction:column;align-items:flex-start;gap:0px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(min-width:768px){axp-page-layout>axp-layout-container>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-page-layout>axp-layout-container>axp-layout-header.axp-is-sticky{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-page-layout>axp-layout-container>axp-layout-header ax-breadcrumbs ax-breadcrumbs-item{font-size:.75rem;line-height:1rem}axp-page-layout>axp-layout-container>axp-layout-header ax-breadcrumbs ax-breadcrumbs-item.ax-state-active .ax-breadcrumb-item-content{cursor:default;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1));opacity:.75}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar{display:flex;width:100%;align-items:center;justify-content:space-between;padding-left:1rem;padding-right:1rem}@media(min-width:1280px){axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar{border-width:0px}}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar ax-layout-nav-button{display:flex;align-items:center;justify-content:space-between}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container{display:flex;align-items:baseline;gap:.75rem}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container axp-layout-title{display:inline-block;width:fit-content;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;line-height:1.75rem;font-weight:500;line-height:1}@media(min-width:1024px){axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container axp-layout-title{font-size:1.5rem;line-height:2rem}}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge{display:inline-flex;--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;align-self:baseline;border-radius:.375rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:600;line-height:1}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge i{margin-inline-end:.25rem;line-height:1;font-size:.5rem}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--warning{background-color:rgb(var(--ax-sys-color-warning-lightest-surface));color:rgb(var(--ax-sys-color-on-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--danger{background-color:rgb(var(--ax-sys-color-danger-lightest-surface));color:rgb(var(--ax-sys-color-on-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--success{background-color:rgb(var(--ax-sys-color-success-lightest-surface));color:rgb(var(--ax-sys-color-on-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--primary{background-color:rgb(var(--ax-sys-color-primary-lightest-surface));color:rgb(var(--ax-sys-color-on-primary-lightest-surface));border-color:rgb(var(--ax-sys-color-border-primary-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-page-toolbar{margin-top:.5rem;padding-left:1rem;padding-right:1rem}axp-page-layout>axp-layout-container>axp-page-content{display:flex;width:100%;flex:1 1 0%;flex-direction:column;padding:.75rem 1rem}axp-page-layout>axp-layout-container>axp-page-content.--scrollable{padding-bottom:1rem}axp-page-layout>axp-layout-container>axp-page-footer-container{border-top-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout>axp-layout-container>axp-page-footer-container:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-page-layout>axp-layout-container>axp-page-footer-container{position:sticky;bottom:0;z-index:20;padding:.75rem;--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@keyframes ax-fadeInUp{0%{transform:translate3d(0,100%,0);opacity:0}}axp-page-layout>axp-layout-container>axp-page-footer-container.--animated{animation:1s both ax-fadeInUp;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type:
|
|
133
|
+
//
|
|
134
|
+
AXCommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: i4.AXBreadCrumbsComponent, selector: "ax-breadcrumbs" }, { kind: "component", type: i4.AXBreadCrumbsItemComponent, selector: "ax-breadcrumbs-item", inputs: ["disabled", "active"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i5.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i6.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i6.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDrawerDirectiveModule }, { kind: "directive", type: i1.AXDrawerItemDirective, selector: "[axDrawerItem]", inputs: ["location", "collapsed", "backDrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "singleOpenMode"], outputs: ["collapseStateChanged", "locationChange", "collapsedChange", "backDropChange", "modeChange", "transitionChange", "closeOnBackdropClickChange", "backdropClassChange", "onBackdropClick", "singleOpenModeChange"], exportAs: ["axDrawerItem"] }, { kind: "ngmodule", type:
|
|
135
|
+
//
|
|
136
|
+
AXPComponentSlotModule }, { kind: "directive", type: i8.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutActionsComponent, selector: "axp-layout-actions" }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "directive", type: AXPStickyDirective, selector: "[axpSticky]", inputs: ["axpSticky", "stickyOffset", "stickyParent", "stickyTarget"], outputs: ["isStickyChange"], exportAs: ["axpSticky"] }, { kind: "component", type: AXPThemeLayoutContainerComponent, selector: "axp-layout-container" }, { kind: "component", type: AXPStatusChipComponent, selector: "axp-status-chip", inputs: ["status", "value", "readonly", "availableTransitions", "definitionKey", "entityData"], outputs: ["openChange", "transitionExecuted", "transitionError"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
137
|
+
}
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageLayoutComponent, decorators: [{
|
|
139
|
+
type: Component,
|
|
140
|
+
args: [{ standalone: true, imports: [
|
|
141
|
+
CommonModule,
|
|
142
|
+
//
|
|
143
|
+
AXCommonModule,
|
|
144
|
+
AXDecoratorModule,
|
|
145
|
+
AXBreadcrumbsModule,
|
|
146
|
+
AXDropdownButtonModule,
|
|
147
|
+
AXDropdownModule,
|
|
148
|
+
AXButtonModule,
|
|
149
|
+
AXTranslationModule,
|
|
150
|
+
AXDrawerModule,
|
|
151
|
+
AXDrawerDirectiveModule,
|
|
152
|
+
//
|
|
153
|
+
AXPComponentSlotModule,
|
|
154
|
+
AXPThemeLayoutBlockComponent,
|
|
155
|
+
AXPThemeLayoutActionsComponent,
|
|
156
|
+
AXPThemeLayoutHeaderComponent,
|
|
157
|
+
AXPStickyDirective,
|
|
158
|
+
AXPThemeLayoutContainerComponent,
|
|
159
|
+
AXPStatusChipComponent,
|
|
160
|
+
], selector: 'axp-page-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [AXDrawerContainerDirective], providers: [], template: "<!-------- Begin Start Side Drawer -------->\n<div id=\"axp-drawer-start\" [mode]=\"deviceService.isSmall() ? 'overlay' : 'push'\" [transition]=\"250\" axDrawerItem\n [backDrop]=\"true\" (onBackdropClick)=\"handleBackdropClick($event)\" #startSideDrawer=\"axDrawerItem\"\n [backdropClass]=\"'ax-bg-darkest/75'\" [collapsed]=\"deviceService.isSmall()\" drawerLocation=\"start\"\n class=\"ax-z-50 ax-h-full\">\n <ng-content select=\"axp-layout-start-side\"></ng-content>\n</div>\n<!-------- Finish Start Side Drawer -------->\n<!--------------------------------------------------------------->\n<!-------- Begin Main Layout Container -------->\n<axp-layout-container id=\"axp-page-layout\" #container>\n <!-------- Begin Page Header -------->\n <axp-layout-header id=\"axp-page-header\" *translate=\"let t\" #sticky=\"axpSticky\" [axpSticky]=\"'axp-is-sticky'\"\n [stickyOffset]=\"50\" [stickyParent]=\"container.hostElement\">\n <!-------- Begin Back Button (Mobile Only) -------->\n @if (page?.hasBackButton() && deviceService.isSmall()) {\n <ax-button id=\"axp-btn-back\" [look]=\"'blank'\" class=\"ax-sm ax-w-fit ax-ms-1\" color=\"secondary\"\n (click)=\"page?.onBackButtonClick()\" [text]=\"page?.backButton()?.title\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-chevron-left rtl:ax-rotate-180\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n <!-------- Finish Back Button -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Bar -------->\n <axp-layout-title-bar id=\"axp-title-bar\">\n <!-------- Begin Title Section -------->\n <div class=\"ax-flex ax-flex-col ax-transition ax-shrink-1 ax-min-w-0\">\n <!-------- Begin Breadcrumbs -------->\n @if (page?.hasBreadcrumbs() && !deviceService.isSmall()) {\n <ax-breadcrumbs id=\"axp-breadcrumb\" class=\"ax-mb-1\">\n @for (item of page?.breadcrumbs(); track $index) {\n <ax-breadcrumbs-item [attr.id]=\"'axp-breadcrumb-item-' + $index\" [active]=\"$last\"\n (click)=\"item.command ? execute(item.command) : null\">\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n {{ t(item.title) | async }}\n </ax-breadcrumbs-item>\n }\n <ng-template #divider>\n <i class=\"fa-regular fa-chevron-right rtl:ax-rotate-180 fa-sm\"></i>\n </ng-template>\n </ax-breadcrumbs>\n }\n <!-------- Finish Breadcrumbs -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Container -------->\n <div class=\"__title-container\">\n <!-------- Begin Page Title -------->\n @if (page?.hasTitle()) {\n <axp-layout-title id=\"axp-page-title\">\n @if (page?.hasTitleIcon()) {\n <ax-icon [icon]=\"page?.titleIcon()!\" class=\"ax-me-2\"></ax-icon>\n }\n {{ t(page?.title()) | async }}\n </axp-layout-title>\n }\n <!-------- Finish Page Title -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Actions -------->\n @if (page?.hasTitleActions()) {\n <ax-button id=\"axp-btn-title-actions\" [look]=\"'blank'\" class=\"ax-sm -ax-mx-2\">\n <ax-prefix>\n <i class=\"fa-solid fa-caret-down fa-fw\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of page?.titleActions(); track $index) {\n <ng-container>\n <ax-button-item [attr.id]=\"'axp-btn-title-action-' + (sub.name || $index)\"\n [text]=\"(t(sub.title) | async)!\" [color]=\"sub.color\" [disabled]=\"sub.disabled\"\n [selected]=\"sub.command?.metadata?.['isSelected']\" (onClick)=\"handleActionClick(sub)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n @if (sub.command?.metadata?.['isSelected']) {\n <ax-suffix class=\"ax-ms-2\">\n <ax-icon icon=\"fa-solid fa-check\"></ax-icon>\n </ax-suffix>\n }\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n </ng-container>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n <!-------- Finish Title Actions -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Title Badge -------->\n @if (page?.hasBadge()) {\n <div id=\"axp-page-badge\" class=\"__title-badge --{{ page?.badge()?.color }}\"\n [attr.title]=\"page?.badge()?.description\">\n <i class=\"fa-solid fa-circle\"></i>\n {{ page?.badge()?.title }}\n </div>\n }\n <!-------- Finish Title Badge -------->\n\n <!-------- Begin Page Status -------->\n\n @if (page?.hasStatus()) {\n <axp-status-chip [value]=\"page?.status()?.value ?? null\" [readonly]=\"page?.status()?.readonly || false\"\n [definitionKey]=\"page?.status()?.definitionKey ?? null\" [entityData]=\"getEntityData()\"\n (transitionExecuted)=\"handleStatusTransition($event)\" class=\"__title-status\"></axp-status-chip>\n }\n <!-------- Finish Page Status -------->\n\n </div>\n <!-------- Finish Title Container -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Description -------->\n @if (page?.hasDescription()) {\n <axp-layout-description id=\"axp-page-description\">\n {{ t(page?.description()) | async }}</axp-layout-description>\n }\n <!-------- Finish Page Description -------->\n </div>\n <!-------- Finish Title Section -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Actions -------->\n <axp-layout-actions id=\"axp-page-actions\" class=\"ax-shrink-0\">\n <axp-component-slot name=\"page-header-actions\"></axp-component-slot>\n <!-------- Begin Primary Actions -------->\n @if (page?.hasPrimaryActions()) {\n @for (item of page?.primaryMenuItems(); track $index) {\n @if (item.visible != false) {\n <ax-button [attr.id]=\"'axp-btn-primary-' + (item.name || item.title)\" [class.ax-sm]=\"deviceService.isSmall()\"\n [iconOnly]=\"deviceService.isSmall()\" [disabled]=\"item.disabled\" [text]=\"(t(item.title) | async)!\"\n [look]=\"'solid'\" [color]=\"item.color\" (onClick)=\"handleActionClick(item)\">\n <ax-prefix>\n <i class=\"{{ item.icon }}\"></i>\n </ax-prefix>\n @if (item?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of item?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item [attr.id]=\"'axp-btn-primary-' + (item.name || item.title) + '-' + (sub.name || sub.title)\"\n [text]=\"(t(sub.title) | async)!\" [color]=\"sub.color\" [disabled]=\"sub.disabled\"\n (onClick)=\"handleActionClick(sub)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n <!-------- Finish Primary Actions -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Secondary Actions -------->\n @if (page?.hasSecondaryActions()) {\n <ax-button id=\"axp-btn-secondary\" [class.ax-sm]=\"deviceService.isSmall()\" [iconOnly]=\"deviceService.isSmall()\"\n [text]=\"'@general:terms.interface.actions' | translate | async\"\n [look]=\"deviceService.isSmall() ? 'blank' : 'solid'\" [color]=\"'default'\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (item of page?.secondaryMenuItems(); track $index) {\n @if (item.visible != false) {\n <ax-button-item [attr.id]=\"'axp-btn-secondary-' + (item.name || item.title)\"\n [text]=\"(item.title | translate | async)!\" [color]=\"item.color\" [disabled]=\"item.disabled\"\n (onClick)=\"handleSecondaryActionClick(item)\">\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n <!-------- Finish Secondary Actions -------->\n </axp-layout-actions>\n <!-------- Finish Page Actions -------->\n </axp-layout-title-bar>\n <!-------- Finish Title Bar -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Toolbar / Navbar -------->\n @if (!sticky.isSticky) {}\n <ng-content select=\"axp-page-toolbar\"></ng-content>\n <!-------- Finish Page Toolbar / Navbar -------->\n </axp-layout-header>\n <!-------- Finish Page Header -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Content -------->\n <ng-content select=\"axp-page-content\"></ng-content>\n <!-------- Finish Page Content -------->\n <!--------------------------------------------------------------->\n <!-------- Begin Page Footer -------->\n <axp-page-footer-container id=\"axp-page-footer-container\"\n [ngStyle]=\"{ display: tt.isEmpty() && prefixSlot.isEmpty() && suffixSlot.isEmpty() ? 'none' : 'block' }\">\n <axp-layout-container #tt>\n <ng-content select=\"axp-page-footer\"></ng-content>\n </axp-layout-container>\n <axp-page-footer id=\"axp-page-footer\">\n <axp-layout-prefix>\n <axp-component-slot name=\"page-footer-start\" #prefixSlot=\"slot\"></axp-component-slot>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <axp-component-slot name=\"page-footer-end\" #suffixSlot=\"slot\"></axp-component-slot>\n </axp-layout-suffix>\n </axp-page-footer>\n </axp-page-footer-container>\n <!-------- Finish Page Footer -------->\n</axp-layout-container>\n<!-------- Finish Main Layout Container -------->", styles: [".axp-status-icon{font-size:.875rem;line-height:1}.axp-status-chip{display:inline-flex}.axp-status-chip--primary{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface))}.axp-status-icon--primary{color:rgb(var(--ax-sys-color-primary-dark-surface))}.axp-status-chip--secondary{background-color:rgb(var(--ax-sys-color-secondary-lighter-surface));color:rgb(var(--ax-sys-color-on-secondary-lighter-surface))}.axp-status-icon--secondary{color:rgb(var(--ax-sys-color-secondary-dark-surface))}.axp-status-chip--success{background-color:rgb(var(--ax-sys-color-success-lighter-surface));color:rgb(var(--ax-sys-color-on-success-lighter-surface))}.axp-status-icon--success{color:rgb(var(--ax-sys-color-success-dark-surface))}.axp-status-chip--warning{background-color:rgb(var(--ax-sys-color-warning-lighter-surface));color:rgb(var(--ax-sys-color-on-warning-lighter-surface))}.axp-status-icon--warning{color:rgb(var(--ax-sys-color-warning-dark-surface))}.axp-status-chip--danger{background-color:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.axp-status-icon--danger{color:rgb(var(--ax-sys-color-danger-dark-surface))}.axp-status-chip--info{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--info{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--accent1{background-color:rgb(var(--ax-sys-color-accent1-lighter-surface));color:rgb(var(--ax-sys-color-on-accent1-lighter-surface))}.axp-status-icon--accent1{color:rgb(var(--ax-sys-color-accent1-dark-surface))}.axp-status-chip--accent2{background-color:rgb(var(--ax-sys-color-accent2-lighter-surface));color:rgb(var(--ax-sys-color-on-accent2-lighter-surface))}.axp-status-icon--accent2{color:rgb(var(--ax-sys-color-accent2-dark-surface))}.axp-status-chip--accent3{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--accent3{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--neutral{background-color:rgb(var(--ax-sys-color-neutral-lighter-surface));color:rgb(var(--ax-sys-color-on-neutral-lighter-surface))}.axp-status-icon--neutral{color:rgb(var(--ax-sys-color-neutral-dark-surface))}axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}axp-layout-list{display:flex;flex-direction:column}axp-layout-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed}axp-layout-list:focus{outline:none}axp-layout-list-group{display:flex;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-group>axp-layout-title{padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600}axp-layout-list-group>axp-layout-header{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-item{margin-top:.25rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem;font-size:.875rem;line-height:1.25rem}axp-layout-list-item:focus{outline:none}axp-layout-list-item.axp-state-focused,axp-layout-list-item:hover{cursor:pointer;border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-list-item>axp-layout-prefix{margin-inline-end:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-list-item>axp-layout-content{flex:1 1 0%}axp-layout-list-item>axp-layout-content axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-list-item>axp-layout-suffix{margin-inline-start:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-sections{display:flex;flex-direction:column;gap:1rem}axp-layout-sections axp-layout-section{display:block;border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding:.5rem 1rem}@media(min-width:1280px){axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-layout-sections axp-layout-section>axp-layout-header{display:flex;flex-direction:column;gap:0px;border-top-left-radius:.375rem;border-top-right-radius:.375rem;border-bottom-width:1px}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-title{font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem}axp-layout-sections axp-layout-section>axp-layout-footer{display:flex;align-items:center;justify-content:space-between;border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem;border-top-width:1px;padding:1rem}axp-layout-sections axp-layout-section>axp-layout-footer>axp-layout-suffix{margin-inline-start:auto;display:flex;gap:.5rem}axp-layout-sections axp-layout-section>axp-layout-footer{opacity:0;animation:fadeInDown .5s ease-out forwards}@keyframes fadeInDown{0%{opacity:0}to{opacity:1}}axp-page-layout{display:flex;width:100%;height:100%;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout axp-layout-start-side,axp-page-layout axp-layout-end-side{display:flex;min-height:100%;min-width:16rem;flex-direction:column;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout axp-layout-start-side axp-layout-header,axp-page-layout axp-layout-end-side axp-layout-header{display:flex;flex-direction:column;gap:.5rem;padding:1rem}axp-page-layout axp-layout-start-side axp-layout-header>axp-layout-title,axp-page-layout axp-layout-end-side axp-layout-header>axp-layout-title{font-size:1.125rem;line-height:1.75rem;font-weight:500}axp-page-layout axp-layout-start-side>axp-layout-content,axp-page-layout axp-layout-end-side>axp-layout-content{flex:1 1 0%}axp-page-layout>axp-layout-container{position:relative;display:flex;width:100%;height:100%;flex-direction:column;overflow:auto;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header{position:sticky;top:0;z-index:20;display:flex;flex-direction:column;align-items:flex-start;gap:0px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(min-width:768px){axp-page-layout>axp-layout-container>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-page-layout>axp-layout-container>axp-layout-header.axp-is-sticky{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-page-layout>axp-layout-container>axp-layout-header ax-breadcrumbs ax-breadcrumbs-item{font-size:.75rem;line-height:1rem}axp-page-layout>axp-layout-container>axp-layout-header ax-breadcrumbs ax-breadcrumbs-item.ax-state-active .ax-breadcrumb-item-content{cursor:default;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1));opacity:.75}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar{display:flex;width:100%;align-items:center;justify-content:space-between;padding-left:1rem;padding-right:1rem}@media(min-width:1280px){axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar{border-width:0px}}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar ax-layout-nav-button{display:flex;align-items:center;justify-content:space-between}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container{display:flex;align-items:baseline;gap:.75rem}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container axp-layout-title{display:inline-block;width:fit-content;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem;line-height:1.75rem;font-weight:500;line-height:1}@media(min-width:1024px){axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container axp-layout-title{font-size:1.5rem;line-height:2rem}}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge{display:inline-flex;--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;align-self:baseline;border-radius:.375rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:600;line-height:1}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge i{margin-inline-end:.25rem;line-height:1;font-size:.5rem}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--warning{background-color:rgb(var(--ax-sys-color-warning-lightest-surface));color:rgb(var(--ax-sys-color-on-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--danger{background-color:rgb(var(--ax-sys-color-danger-lightest-surface));color:rgb(var(--ax-sys-color-on-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--success{background-color:rgb(var(--ax-sys-color-success-lightest-surface));color:rgb(var(--ax-sys-color-on-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-layout-title-bar .__title-container .__title-badge.--primary{background-color:rgb(var(--ax-sys-color-primary-lightest-surface));color:rgb(var(--ax-sys-color-on-primary-lightest-surface));border-color:rgb(var(--ax-sys-color-border-primary-lightest-surface))}axp-page-layout>axp-layout-container>axp-layout-header axp-page-toolbar{margin-top:.5rem;padding-left:1rem;padding-right:1rem}axp-page-layout>axp-layout-container>axp-page-content{display:flex;width:100%;flex:1 1 0%;flex-direction:column;padding:.75rem 1rem}axp-page-layout>axp-layout-container>axp-page-content.--scrollable{padding-bottom:1rem}axp-page-layout>axp-layout-container>axp-page-footer-container{border-top-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-page-layout>axp-layout-container>axp-page-footer-container:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-page-layout>axp-layout-container>axp-page-footer-container{position:sticky;bottom:0;z-index:20;padding:.75rem;--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@keyframes ax-fadeInUp{0%{transform:translate3d(0,100%,0);opacity:0}}axp-page-layout>axp-layout-container>axp-page-footer-container.--animated{animation:1s both ax-fadeInUp;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(0,0,.2,1)}\n"] }]
|
|
161
|
+
}], propDecorators: { startSideDrawer: [{ type: i0.ViewChild, args: ['startSideDrawer', { isSignal: true }] }] } });
|
|
162
|
+
|
|
163
|
+
class AXPPageLayoutBaseComponent {
|
|
164
|
+
constructor() {
|
|
165
|
+
//#region ---------------- Services ----------------
|
|
166
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
167
|
+
this.sessionService = inject(AXPSessionService);
|
|
168
|
+
this.translateService = inject(AXTranslationService);
|
|
169
|
+
this.formatService = inject(AXFormatService);
|
|
170
|
+
this.toastService = inject(AXToastService);
|
|
171
|
+
this.homePageService = inject(AXPHomePageService);
|
|
172
|
+
this.policyService = inject(AXPPolicyEngineService);
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region ---------------- Signal to force recomputation ----------------
|
|
175
|
+
this._updateTrigger = signal(0, ...(ngDevMode ? [{ debugName: "_updateTrigger" }] : /* istanbul ignore next */ []));
|
|
176
|
+
this.updateTrigger = this._updateTrigger.asReadonly();
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region ---------------- Title ----------------
|
|
179
|
+
this.title = signal('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
180
|
+
this.titleIcon = signal(null, ...(ngDevMode ? [{ debugName: "titleIcon" }] : /* istanbul ignore next */ []));
|
|
181
|
+
this.#titleEffect = effect(async () => {
|
|
182
|
+
this.updateTrigger();
|
|
183
|
+
this.title.set(await this.getPageTitle());
|
|
184
|
+
const icon = await this.getPageIcon();
|
|
185
|
+
this.titleIcon.set(icon);
|
|
186
|
+
}, ...(ngDevMode ? [{ debugName: "#titleEffect" }] : /* istanbul ignore next */ []));
|
|
187
|
+
this.hasTitle = computed(() => this.title() !== '', ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
|
|
188
|
+
this.hasTitleIcon = computed(() => this.titleIcon() !== null, ...(ngDevMode ? [{ debugName: "hasTitleIcon" }] : /* istanbul ignore next */ []));
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region ---------------- Description ----------------
|
|
191
|
+
this.description = signal(null, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
192
|
+
this.hasDescription = computed(() => !isNil(this.description()) && !isEmpty(this.description()), ...(ngDevMode ? [{ debugName: "hasDescription" }] : /* istanbul ignore next */ []));
|
|
193
|
+
this.#descriptionEffect = effect(async () => {
|
|
194
|
+
this.updateTrigger();
|
|
195
|
+
this.description.set(await this.getPageDescription());
|
|
196
|
+
}, ...(ngDevMode ? [{ debugName: "#descriptionEffect" }] : /* istanbul ignore next */ []));
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ---------------- Breadcrumbs ----------------
|
|
199
|
+
this.defaultBreadCrumbs = [
|
|
200
|
+
{
|
|
201
|
+
title: '@general:terms.interface.navigation.home',
|
|
202
|
+
icon: 'fa-solid fa-home ax-text-xs ax-me-1',
|
|
203
|
+
command: {
|
|
204
|
+
name: 'navigate',
|
|
205
|
+
options: {
|
|
206
|
+
path: this.homePageService.getCurrent().path,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
this.breadcrumbs = signal(this.defaultBreadCrumbs, ...(ngDevMode ? [{ debugName: "breadcrumbs" }] : /* istanbul ignore next */ []));
|
|
212
|
+
this.#breadcrumbsEffect = effect(async () => {
|
|
213
|
+
this.updateTrigger();
|
|
214
|
+
const breadCrumbs = await this.getPageBreadcrumbs();
|
|
215
|
+
this.breadcrumbs.set([...this.defaultBreadCrumbs, ...breadCrumbs]);
|
|
216
|
+
}, ...(ngDevMode ? [{ debugName: "#breadcrumbsEffect" }] : /* istanbul ignore next */ []));
|
|
217
|
+
this.hasBreadcrumbs = computed(() => this.breadcrumbs().length > 1, ...(ngDevMode ? [{ debugName: "hasBreadcrumbs" }] : /* istanbul ignore next */ []));
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region ---------------- Badge ----------------
|
|
220
|
+
this.badge = signal(null, ...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
|
|
221
|
+
this.hasBadge = computed(() => this.badge() !== null, ...(ngDevMode ? [{ debugName: "hasBadge" }] : /* istanbul ignore next */ []));
|
|
222
|
+
this.#badgeEffect = effect(async () => {
|
|
223
|
+
this.updateTrigger();
|
|
224
|
+
this.badge.set(await this.getPageBadge());
|
|
225
|
+
}, ...(ngDevMode ? [{ debugName: "#badgeEffect" }] : /* istanbul ignore next */ []));
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region ---------------- Status ----------------
|
|
228
|
+
this.status = signal(null, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
229
|
+
this.hasStatus = computed(() => this.status() !== null, ...(ngDevMode ? [{ debugName: "hasStatus" }] : /* istanbul ignore next */ []));
|
|
230
|
+
this.#statusEffect = effect(async () => {
|
|
231
|
+
this.updateTrigger();
|
|
232
|
+
this.status.set(await this.getPageStatus());
|
|
233
|
+
}, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region ---------------- Layout ----------------
|
|
236
|
+
this.layout = viewChild(AXPPageLayoutComponent, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region ---------------- Actions ----------------
|
|
239
|
+
this.primaryMenuItems = signal([], ...(ngDevMode ? [{ debugName: "primaryMenuItems" }] : /* istanbul ignore next */ []));
|
|
240
|
+
this.hasPrimaryActions = computed(() => this.primaryMenuItems().filter((item) => item.visible != false).length > 0, ...(ngDevMode ? [{ debugName: "hasPrimaryActions" }] : /* istanbul ignore next */ []));
|
|
241
|
+
this.#primaryMenuItemsEffect = effect(async () => {
|
|
242
|
+
this.updateTrigger();
|
|
243
|
+
const items = await this.getPrimaryMenuItems();
|
|
244
|
+
this.primaryMenuItems.set(items);
|
|
245
|
+
}, ...(ngDevMode ? [{ debugName: "#primaryMenuItemsEffect" }] : /* istanbul ignore next */ []));
|
|
246
|
+
this.secondaryMenuItems = signal([], ...(ngDevMode ? [{ debugName: "secondaryMenuItems" }] : /* istanbul ignore next */ []));
|
|
247
|
+
this.hasSecondaryActions = computed(() => this.secondaryMenuItems().filter((item) => item.visible != false).length > 0, ...(ngDevMode ? [{ debugName: "hasSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
248
|
+
this.#secondaryMenuItemsEffect = effect(async () => {
|
|
249
|
+
this.updateTrigger();
|
|
250
|
+
const items = await this.getSecondaryMenuItems();
|
|
251
|
+
this.secondaryMenuItems.set(items);
|
|
252
|
+
}, ...(ngDevMode ? [{ debugName: "#secondaryMenuItemsEffect" }] : /* istanbul ignore next */ []));
|
|
253
|
+
this.hasActions = computed(() => this.hasPrimaryActions() || this.hasSecondaryActions(), ...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
254
|
+
this.titleActions = signal([], ...(ngDevMode ? [{ debugName: "titleActions" }] : /* istanbul ignore next */ []));
|
|
255
|
+
this.hasTitleActions = computed(() => this.titleActions().length > 0, ...(ngDevMode ? [{ debugName: "hasTitleActions" }] : /* istanbul ignore next */ []));
|
|
256
|
+
this.#titleActionsEffect = effect(async () => {
|
|
257
|
+
this.updateTrigger();
|
|
258
|
+
this.titleActions.set(await this.getTitleActions());
|
|
259
|
+
}, ...(ngDevMode ? [{ debugName: "#titleActionsEffect" }] : /* istanbul ignore next */ []));
|
|
260
|
+
this.backButton = signal(null, ...(ngDevMode ? [{ debugName: "backButton" }] : /* istanbul ignore next */ []));
|
|
261
|
+
this.hasBackButton = computed(() => this.backButton() !== null, ...(ngDevMode ? [{ debugName: "hasBackButton" }] : /* istanbul ignore next */ []));
|
|
262
|
+
this.#backButtonEffect = effect(async () => {
|
|
263
|
+
this.updateTrigger();
|
|
264
|
+
this.backButton.set(await this.getBackButton());
|
|
265
|
+
}, ...(ngDevMode ? [{ debugName: "#backButtonEffect" }] : /* istanbul ignore next */ []));
|
|
266
|
+
}
|
|
267
|
+
recompute() {
|
|
268
|
+
this._updateTrigger.set(this._updateTrigger() + 1);
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region ---------------- Lifecycle hooks ----------------
|
|
272
|
+
async ngOnInit() {
|
|
273
|
+
this.translateService.langChanges$.subscribe(() => {
|
|
274
|
+
this.recompute();
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
#titleEffect;
|
|
278
|
+
getPageTitle() {
|
|
279
|
+
return '';
|
|
280
|
+
}
|
|
281
|
+
getPageIcon() {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
#descriptionEffect;
|
|
285
|
+
getPageDescription() {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
#breadcrumbsEffect;
|
|
289
|
+
getPageBreadcrumbs() {
|
|
290
|
+
return [];
|
|
291
|
+
}
|
|
292
|
+
#badgeEffect;
|
|
293
|
+
getPageBadge() {
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
#statusEffect;
|
|
297
|
+
getPageStatus() {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
//TODO: Remove this after migration to the new layout
|
|
301
|
+
toggleEndSide() {
|
|
302
|
+
//this.layout()?.toggleStartSide()
|
|
303
|
+
}
|
|
304
|
+
//TODO: Remove this after migration to the new layout
|
|
305
|
+
toggleStartSide() {
|
|
306
|
+
this.layout()?.toggleStartSide();
|
|
307
|
+
}
|
|
308
|
+
#primaryMenuItemsEffect;
|
|
309
|
+
getPrimaryMenuItems() {
|
|
310
|
+
return [];
|
|
311
|
+
}
|
|
312
|
+
#secondaryMenuItemsEffect;
|
|
313
|
+
getSecondaryMenuItems() {
|
|
314
|
+
return [];
|
|
315
|
+
}
|
|
316
|
+
#titleActionsEffect;
|
|
317
|
+
getTitleActions() {
|
|
318
|
+
return [];
|
|
319
|
+
}
|
|
320
|
+
getBackButton() {
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
#backButtonEffect;
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region ---------------- Handle Commands ----------------
|
|
326
|
+
execute(command) { }
|
|
327
|
+
startSideToggle() {
|
|
328
|
+
this.layout();
|
|
329
|
+
}
|
|
330
|
+
onBackButtonClick() { }
|
|
331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageLayoutBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXPPageLayoutBaseComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "layout", first: true, predicate: AXPPageLayoutComponent, descendants: true, isSignal: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
333
|
+
}
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageLayoutBaseComponent, decorators: [{
|
|
335
|
+
type: Component,
|
|
336
|
+
args: [{
|
|
337
|
+
standalone: true,
|
|
338
|
+
template: '',
|
|
339
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
340
|
+
}]
|
|
341
|
+
}], propDecorators: { layout: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPPageLayoutComponent), { isSignal: true }] }] } });
|
|
342
|
+
|
|
343
|
+
class AXPPopupLayoutBase {
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
class AXPPopupLayoutComponent {
|
|
347
|
+
constructor() {
|
|
348
|
+
this.popup = inject(AXPPopupLayoutBase);
|
|
349
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
350
|
+
this.workflow = inject(AXPWorkflowService);
|
|
351
|
+
this.#initialize = afterNextRender(async () => {
|
|
352
|
+
this.checkScrollableContent();
|
|
353
|
+
});
|
|
354
|
+
this.#effect = effect(() => {
|
|
355
|
+
this.popup?.title();
|
|
356
|
+
this.checkScrollableContent();
|
|
357
|
+
}, ...(ngDevMode ? [{ debugName: "#effect" }] : /* istanbul ignore next */ []));
|
|
358
|
+
}
|
|
359
|
+
#initialize;
|
|
360
|
+
#effect;
|
|
361
|
+
checkScrollableContent() {
|
|
362
|
+
const content = document.querySelector('axp-popup-content');
|
|
363
|
+
if (content && content.scrollHeight >= content.clientHeight) {
|
|
364
|
+
content.classList.add('--scrollable');
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
handleActionClick(item) {
|
|
368
|
+
if (item.command && (item.items?.length ?? 0) == 0) {
|
|
369
|
+
this.popup?.execute(item.command);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
handleSecondaryActionClick(item) {
|
|
373
|
+
if (item.command) {
|
|
374
|
+
this.popup?.execute(item.command);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
handleBackdropClick(e) {
|
|
378
|
+
e.nativeEvent.preventDefault();
|
|
379
|
+
e.nativeEvent.stopPropagation();
|
|
380
|
+
e.component.hide();
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPopupLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
384
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPPopupLayoutComponent, isStandalone: true, selector: "axp-popup-layout", ngImport: i0, template: "<axp-layout-container id=\"axp-popup-layout\" #container>\n <ng-content select=\"axp-page-content\"></ng-content>\n <axp-page-footer id=\"axp-popup-footer\" *translate=\"let t\">\n <ax-prefix> </ax-prefix>\n @if (popup.hasPrimaryActions()) {\n <ax-suffix>\n @for (item of popup.primaryMenuItems(); track $index) {\n <ax-button\n [attr.id]=\"'axp-btn-primary-' + (item.name || item.title)\"\n [text]=\"(t(item.title) | async)!\"\n [look]=\"'solid'\"\n [color]=\"item.color\"\n (onClick)=\"handleActionClick(item)\"\n >\n <ax-prefix>\n <i class=\"{{ item.icon }}\"></i>\n </ax-prefix>\n </ax-button>\n }\n </ax-suffix>\n }\n </axp-page-footer>\n</axp-layout-container>\n", styles: [".axp-status-icon{font-size:.875rem;line-height:1}.axp-status-chip{display:inline-flex}.axp-status-chip--primary{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface))}.axp-status-icon--primary{color:rgb(var(--ax-sys-color-primary-dark-surface))}.axp-status-chip--secondary{background-color:rgb(var(--ax-sys-color-secondary-lighter-surface));color:rgb(var(--ax-sys-color-on-secondary-lighter-surface))}.axp-status-icon--secondary{color:rgb(var(--ax-sys-color-secondary-dark-surface))}.axp-status-chip--success{background-color:rgb(var(--ax-sys-color-success-lighter-surface));color:rgb(var(--ax-sys-color-on-success-lighter-surface))}.axp-status-icon--success{color:rgb(var(--ax-sys-color-success-dark-surface))}.axp-status-chip--warning{background-color:rgb(var(--ax-sys-color-warning-lighter-surface));color:rgb(var(--ax-sys-color-on-warning-lighter-surface))}.axp-status-icon--warning{color:rgb(var(--ax-sys-color-warning-dark-surface))}.axp-status-chip--danger{background-color:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.axp-status-icon--danger{color:rgb(var(--ax-sys-color-danger-dark-surface))}.axp-status-chip--info{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--info{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--accent1{background-color:rgb(var(--ax-sys-color-accent1-lighter-surface));color:rgb(var(--ax-sys-color-on-accent1-lighter-surface))}.axp-status-icon--accent1{color:rgb(var(--ax-sys-color-accent1-dark-surface))}.axp-status-chip--accent2{background-color:rgb(var(--ax-sys-color-accent2-lighter-surface));color:rgb(var(--ax-sys-color-on-accent2-lighter-surface))}.axp-status-icon--accent2{color:rgb(var(--ax-sys-color-accent2-dark-surface))}.axp-status-chip--accent3{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--accent3{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--neutral{background-color:rgb(var(--ax-sys-color-neutral-lighter-surface));color:rgb(var(--ax-sys-color-on-neutral-lighter-surface))}.axp-status-icon--neutral{color:rgb(var(--ax-sys-color-neutral-dark-surface))}axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}axp-layout-list{display:flex;flex-direction:column}axp-layout-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed}axp-layout-list:focus{outline:none}axp-layout-list-group{display:flex;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-group>axp-layout-title{padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600}axp-layout-list-group>axp-layout-header{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-item{margin-top:.25rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem;font-size:.875rem;line-height:1.25rem}axp-layout-list-item:focus{outline:none}axp-layout-list-item.axp-state-focused,axp-layout-list-item:hover{cursor:pointer;border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-list-item>axp-layout-prefix{margin-inline-end:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-list-item>axp-layout-content{flex:1 1 0%}axp-layout-list-item>axp-layout-content axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-list-item>axp-layout-suffix{margin-inline-start:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-sections{display:flex;flex-direction:column;gap:1rem}axp-layout-sections axp-layout-section{display:block;border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding:.5rem 1rem}@media(min-width:1280px){axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-layout-sections axp-layout-section>axp-layout-header{display:flex;flex-direction:column;gap:0px;border-top-left-radius:.375rem;border-top-right-radius:.375rem;border-bottom-width:1px}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-title{font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem}axp-layout-sections axp-layout-section>axp-layout-footer{display:flex;align-items:center;justify-content:space-between;border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem;border-top-width:1px;padding:1rem}axp-layout-sections axp-layout-section>axp-layout-footer>axp-layout-suffix{margin-inline-start:auto;display:flex;gap:.5rem}axp-layout-sections axp-layout-section>axp-layout-footer{opacity:0;animation:fadeInDown .5s ease-out forwards}@keyframes fadeInDown{0%{opacity:0}to{opacity:1}}axp-popup-layout{display:flex;width:100%;height:100%;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-popup-layout>axp-layout-container{position:relative;display:flex;width:100%;height:100%;flex-direction:column;overflow:auto;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-popup-layout>axp-layout-container>axp-layout-header{position:sticky;top:0;z-index:10;display:flex;flex-direction:column;align-items:flex-start;gap:0px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(min-width:768px){axp-popup-layout>axp-layout-container>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-popup-layout>axp-layout-container>axp-page-content{display:flex;width:100%;flex:1 1 0%;flex-direction:column}axp-popup-layout>axp-layout-container>axp-page-footer{border-top-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-popup-layout>axp-layout-container>axp-page-footer:is(.ax-dark *){--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-dark-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-dark-surface),var(--tw-bg-opacity, 1))}axp-popup-layout>axp-layout-container>axp-page-footer{position:sticky;bottom:0;padding:.75rem;--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@keyframes ax-fadeInUp{0%{transform:translate3d(0,100%,0);opacity:0}}axp-popup-layout>axp-layout-container>axp-page-footer.--animated{animation:1s both ax-fadeInUp;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type:
|
|
385
|
+
//
|
|
386
|
+
AXCommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDrawerDirectiveModule }, { kind: "component", type:
|
|
387
|
+
//
|
|
388
|
+
AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutContainerComponent, selector: "axp-layout-container" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
389
|
+
}
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPopupLayoutComponent, decorators: [{
|
|
391
|
+
type: Component,
|
|
392
|
+
args: [{ standalone: true, imports: [
|
|
393
|
+
CommonModule,
|
|
394
|
+
//
|
|
395
|
+
AXCommonModule,
|
|
396
|
+
AXDecoratorModule,
|
|
397
|
+
AXBreadcrumbsModule,
|
|
398
|
+
AXDropdownButtonModule,
|
|
399
|
+
AXDropdownModule,
|
|
400
|
+
AXButtonModule,
|
|
401
|
+
AXTranslationModule,
|
|
402
|
+
AXDrawerModule,
|
|
403
|
+
AXDrawerDirectiveModule,
|
|
404
|
+
//
|
|
405
|
+
AXPThemeLayoutBlockComponent,
|
|
406
|
+
AXPThemeLayoutContainerComponent,
|
|
407
|
+
], selector: 'axp-popup-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<axp-layout-container id=\"axp-popup-layout\" #container>\n <ng-content select=\"axp-page-content\"></ng-content>\n <axp-page-footer id=\"axp-popup-footer\" *translate=\"let t\">\n <ax-prefix> </ax-prefix>\n @if (popup.hasPrimaryActions()) {\n <ax-suffix>\n @for (item of popup.primaryMenuItems(); track $index) {\n <ax-button\n [attr.id]=\"'axp-btn-primary-' + (item.name || item.title)\"\n [text]=\"(t(item.title) | async)!\"\n [look]=\"'solid'\"\n [color]=\"item.color\"\n (onClick)=\"handleActionClick(item)\"\n >\n <ax-prefix>\n <i class=\"{{ item.icon }}\"></i>\n </ax-prefix>\n </ax-button>\n }\n </ax-suffix>\n }\n </axp-page-footer>\n</axp-layout-container>\n", styles: [".axp-status-icon{font-size:.875rem;line-height:1}.axp-status-chip{display:inline-flex}.axp-status-chip--primary{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface))}.axp-status-icon--primary{color:rgb(var(--ax-sys-color-primary-dark-surface))}.axp-status-chip--secondary{background-color:rgb(var(--ax-sys-color-secondary-lighter-surface));color:rgb(var(--ax-sys-color-on-secondary-lighter-surface))}.axp-status-icon--secondary{color:rgb(var(--ax-sys-color-secondary-dark-surface))}.axp-status-chip--success{background-color:rgb(var(--ax-sys-color-success-lighter-surface));color:rgb(var(--ax-sys-color-on-success-lighter-surface))}.axp-status-icon--success{color:rgb(var(--ax-sys-color-success-dark-surface))}.axp-status-chip--warning{background-color:rgb(var(--ax-sys-color-warning-lighter-surface));color:rgb(var(--ax-sys-color-on-warning-lighter-surface))}.axp-status-icon--warning{color:rgb(var(--ax-sys-color-warning-dark-surface))}.axp-status-chip--danger{background-color:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.axp-status-icon--danger{color:rgb(var(--ax-sys-color-danger-dark-surface))}.axp-status-chip--info{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--info{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--accent1{background-color:rgb(var(--ax-sys-color-accent1-lighter-surface));color:rgb(var(--ax-sys-color-on-accent1-lighter-surface))}.axp-status-icon--accent1{color:rgb(var(--ax-sys-color-accent1-dark-surface))}.axp-status-chip--accent2{background-color:rgb(var(--ax-sys-color-accent2-lighter-surface));color:rgb(var(--ax-sys-color-on-accent2-lighter-surface))}.axp-status-icon--accent2{color:rgb(var(--ax-sys-color-accent2-dark-surface))}.axp-status-chip--accent3{background-color:rgb(var(--ax-sys-color-accent3-lighter-surface));color:rgb(var(--ax-sys-color-on-accent3-lighter-surface))}.axp-status-icon--accent3{color:rgb(var(--ax-sys-color-accent3-dark-surface))}.axp-status-chip--neutral{background-color:rgb(var(--ax-sys-color-neutral-lighter-surface));color:rgb(var(--ax-sys-color-on-neutral-lighter-surface))}.axp-status-icon--neutral{color:rgb(var(--ax-sys-color-neutral-dark-surface))}axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}axp-layout-list{display:flex;flex-direction:column}axp-layout-list>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed}axp-layout-list:focus{outline:none}axp-layout-list-group{display:flex;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-group>axp-layout-title{padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600}axp-layout-list-group>axp-layout-header{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}axp-layout-list-item{margin-top:.25rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem;font-size:.875rem;line-height:1.25rem}axp-layout-list-item:focus{outline:none}axp-layout-list-item.axp-state-focused,axp-layout-list-item:hover{cursor:pointer;border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-list-item>axp-layout-prefix{margin-inline-end:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-list-item>axp-layout-content{flex:1 1 0%}axp-layout-list-item>axp-layout-content axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-list-item>axp-layout-suffix{margin-inline-start:auto;display:flex;flex-direction:row;gap:.5rem}axp-layout-sections{display:flex;flex-direction:column;gap:1rem}axp-layout-sections axp-layout-section{display:block;border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding:.5rem 1rem}@media(min-width:1280px){axp-layout-sections axp-layout-section>axp-layout-footer,axp-layout-sections axp-layout-section>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-layout-sections axp-layout-section>axp-layout-header{display:flex;flex-direction:column;gap:0px;border-top-left-radius:.375rem;border-top-right-radius:.375rem;border-bottom-width:1px}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-title{font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-layout-sections axp-layout-section>axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem}axp-layout-sections axp-layout-section>axp-layout-footer{display:flex;align-items:center;justify-content:space-between;border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem;border-top-width:1px;padding:1rem}axp-layout-sections axp-layout-section>axp-layout-footer>axp-layout-suffix{margin-inline-start:auto;display:flex;gap:.5rem}axp-layout-sections axp-layout-section>axp-layout-footer{opacity:0;animation:fadeInDown .5s ease-out forwards}@keyframes fadeInDown{0%{opacity:0}to{opacity:1}}axp-popup-layout{display:flex;width:100%;height:100%;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-popup-layout>axp-layout-container{position:relative;display:flex;width:100%;height:100%;flex-direction:column;overflow:auto;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-popup-layout>axp-layout-container>axp-layout-header{position:sticky;top:0;z-index:10;display:flex;flex-direction:column;align-items:flex-start;gap:0px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(min-width:768px){axp-popup-layout>axp-layout-container>axp-layout-header{padding-top:1rem;padding-bottom:1rem}}axp-popup-layout>axp-layout-container>axp-page-content{display:flex;width:100%;flex:1 1 0%;flex-direction:column}axp-popup-layout>axp-layout-container>axp-page-footer{border-top-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-popup-layout>axp-layout-container>axp-page-footer:is(.ax-dark *){--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-dark-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-dark-surface),var(--tw-bg-opacity, 1))}axp-popup-layout>axp-layout-container>axp-page-footer{position:sticky;bottom:0;padding:.75rem;--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@keyframes ax-fadeInUp{0%{transform:translate3d(0,100%,0);opacity:0}}axp-popup-layout>axp-layout-container>axp-page-footer.--animated{animation:1s both ax-fadeInUp;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(0,0,.2,1)}\n"] }]
|
|
408
|
+
}] });
|
|
409
|
+
|
|
410
|
+
class AXPPopupLayoutBaseComponent extends AXBasePageComponent {
|
|
411
|
+
constructor() {
|
|
412
|
+
super(...arguments);
|
|
413
|
+
//#region ---------------- Services ----------------
|
|
414
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
415
|
+
this.sessionService = inject(AXPSessionService);
|
|
416
|
+
this.translateService = inject(AXTranslationService);
|
|
417
|
+
this.formatService = inject(AXFormatService);
|
|
418
|
+
this.toastService = inject(AXToastService);
|
|
419
|
+
this.homePageService = inject(AXPHomePageService);
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region ---------------- Signal to force recomputation ----------------
|
|
422
|
+
this._updateTrigger = signal(0, ...(ngDevMode ? [{ debugName: "_updateTrigger" }] : /* istanbul ignore next */ []));
|
|
423
|
+
this.updateTrigger = this._updateTrigger.asReadonly();
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region ---------------- Title ----------------
|
|
426
|
+
this.title = signal('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
427
|
+
this.#titleEffect = effect(async () => {
|
|
428
|
+
this.updateTrigger();
|
|
429
|
+
this.title.set(await this.getPopupTitle());
|
|
430
|
+
}, ...(ngDevMode ? [{ debugName: "#titleEffect" }] : /* istanbul ignore next */ []));
|
|
431
|
+
this.hasTitle = computed(() => this.title() !== '', ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region ---------------- Layout ----------------
|
|
434
|
+
// Placeholder for popup layout reference if needed
|
|
435
|
+
this.layout = viewChild(AXPPopupLayoutComponent, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region ---------------- Actions ----------------
|
|
438
|
+
this.primaryMenuItems = signal([], ...(ngDevMode ? [{ debugName: "primaryMenuItems" }] : /* istanbul ignore next */ []));
|
|
439
|
+
this.hasPrimaryActions = computed(() => this.primaryMenuItems().length > 0, ...(ngDevMode ? [{ debugName: "hasPrimaryActions" }] : /* istanbul ignore next */ []));
|
|
440
|
+
this.#primaryMenuItemsEffect = effect(async () => {
|
|
441
|
+
this.updateTrigger();
|
|
442
|
+
this.primaryMenuItems.set(await this.getPrimaryMenuItems());
|
|
443
|
+
}, ...(ngDevMode ? [{ debugName: "#primaryMenuItemsEffect" }] : /* istanbul ignore next */ []));
|
|
444
|
+
this.secondaryMenuItems = signal([], ...(ngDevMode ? [{ debugName: "secondaryMenuItems" }] : /* istanbul ignore next */ []));
|
|
445
|
+
this.hasSecondaryActions = computed(() => this.secondaryMenuItems().length > 0, ...(ngDevMode ? [{ debugName: "hasSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
446
|
+
this.#secondaryMenuItemsEffect = effect(async () => {
|
|
447
|
+
this.updateTrigger();
|
|
448
|
+
this.secondaryMenuItems.set(await this.getSecondaryMenuItems());
|
|
449
|
+
}, ...(ngDevMode ? [{ debugName: "#secondaryMenuItemsEffect" }] : /* istanbul ignore next */ []));
|
|
450
|
+
this.hasActions = computed(() => this.hasPrimaryActions() || this.hasSecondaryActions(), ...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
451
|
+
this.titleActions = signal([], ...(ngDevMode ? [{ debugName: "titleActions" }] : /* istanbul ignore next */ []));
|
|
452
|
+
this.hasTitleActions = computed(() => this.titleActions().length > 0, ...(ngDevMode ? [{ debugName: "hasTitleActions" }] : /* istanbul ignore next */ []));
|
|
453
|
+
this.#titleActionsEffect = effect(async () => {
|
|
454
|
+
this.updateTrigger();
|
|
455
|
+
this.titleActions.set(await this.getTitleActions());
|
|
456
|
+
}, ...(ngDevMode ? [{ debugName: "#titleActionsEffect" }] : /* istanbul ignore next */ []));
|
|
457
|
+
}
|
|
458
|
+
recompute() {
|
|
459
|
+
this._updateTrigger.set(this._updateTrigger() + 1);
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region ---------------- Lifecycle hooks ----------------
|
|
463
|
+
async ngOnInit() {
|
|
464
|
+
super.ngOnInit();
|
|
465
|
+
this.translateService.langChanges$.subscribe(() => {
|
|
466
|
+
this.recompute();
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
#titleEffect;
|
|
470
|
+
getPopupTitle() {
|
|
471
|
+
return '';
|
|
472
|
+
}
|
|
473
|
+
#primaryMenuItemsEffect;
|
|
474
|
+
getPrimaryMenuItems() {
|
|
475
|
+
return [];
|
|
476
|
+
}
|
|
477
|
+
#secondaryMenuItemsEffect;
|
|
478
|
+
getSecondaryMenuItems() {
|
|
479
|
+
return [];
|
|
480
|
+
}
|
|
481
|
+
#titleActionsEffect;
|
|
482
|
+
getTitleActions() {
|
|
483
|
+
return [];
|
|
484
|
+
}
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region ---------------- Handle Commands ----------------
|
|
487
|
+
execute(command) { }
|
|
488
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPopupLayoutBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
489
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXPPopupLayoutBaseComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "layout", first: true, predicate: AXPPopupLayoutComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
490
|
+
}
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPopupLayoutBaseComponent, decorators: [{
|
|
492
|
+
type: Component,
|
|
493
|
+
args: [{
|
|
494
|
+
standalone: true,
|
|
495
|
+
template: '',
|
|
496
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
497
|
+
}]
|
|
498
|
+
}], propDecorators: { layout: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPPopupLayoutComponent), { isSignal: true }] }] } });
|
|
499
|
+
|
|
500
|
+
//#region ---- Root-context widget expression resolution ----
|
|
501
|
+
/**
|
|
502
|
+
* Evaluates `{{ ... }}` strings inside `options.customFilterDefinitions` using `rootContext`
|
|
503
|
+
* (details adapter load data), so filter UI does not depend on widget-renderer contextService.
|
|
504
|
+
*/
|
|
505
|
+
async function buildEvaluatedPageContentsForRootContext(currentPage, rootContext, evaluatorService) {
|
|
506
|
+
if (!currentPage) {
|
|
507
|
+
return { evaluatedPageContent: [], evaluatedTabContentsById: {} };
|
|
508
|
+
}
|
|
509
|
+
const scope = {
|
|
510
|
+
context: {
|
|
511
|
+
eval: (path) => getSmart(rootContext, path),
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
const resolveNodes = async (nodes) => {
|
|
515
|
+
if (!nodes?.length) {
|
|
516
|
+
return [];
|
|
517
|
+
}
|
|
518
|
+
const cloned = cloneDeep(nodes);
|
|
519
|
+
for (const node of cloned) {
|
|
520
|
+
const defs = node.options?.['customFilterDefinitions'];
|
|
521
|
+
if (Array.isArray(defs) && defs.length > 0) {
|
|
522
|
+
node.options['customFilterDefinitions'] = await evaluatorService.evaluate(defs, scope);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return cloned;
|
|
526
|
+
};
|
|
527
|
+
const evaluatedPageContent = await resolveNodes(currentPage.content);
|
|
528
|
+
const evaluatedTabContentsById = {};
|
|
529
|
+
for (const tab of currentPage.tabs ?? []) {
|
|
530
|
+
evaluatedTabContentsById[tab.id] = await resolveNodes(tab.content);
|
|
531
|
+
}
|
|
532
|
+
return { evaluatedPageContent, evaluatedTabContentsById };
|
|
533
|
+
}
|
|
534
|
+
//#endregion
|
|
535
|
+
const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
536
|
+
const state = {
|
|
537
|
+
adapter: null,
|
|
538
|
+
rootContext: {},
|
|
539
|
+
previousContext: {},
|
|
540
|
+
context: {},
|
|
541
|
+
scope: null,
|
|
542
|
+
status: AXPPageStatus.Processing,
|
|
543
|
+
currentPage: null,
|
|
544
|
+
currentTab: null,
|
|
545
|
+
pageSelectedRows: [],
|
|
546
|
+
// Cache for rendered tabs per page to prevent re-rendering
|
|
547
|
+
renderedTabsCache: {},
|
|
548
|
+
/** Page main column widgets with `customFilterDefinitions` evaluated against `rootContext` */
|
|
549
|
+
evaluatedPageContent: [],
|
|
550
|
+
/** Tab panel widgets keyed by tab id (same evaluation as `evaluatedPageContent`) */
|
|
551
|
+
evaluatedTabContentsById: {},
|
|
552
|
+
};
|
|
553
|
+
return state;
|
|
554
|
+
}), withComputed((store, deviceService = inject(AXPDeviceService)) => ({
|
|
555
|
+
icon: computed(() => store.adapter()?.icon ?? null),
|
|
556
|
+
content: computed(() => {
|
|
557
|
+
const pages = store.adapter()?.pages ?? [];
|
|
558
|
+
const primaryPage = pages.find((p) => p.isPrimary) ?? pages[0];
|
|
559
|
+
return primaryPage?.content ?? [];
|
|
560
|
+
}),
|
|
561
|
+
//
|
|
562
|
+
showPages: computed(() => !store.currentPage() && !deviceService.isLarge()),
|
|
563
|
+
isLarge: computed(() => deviceService.isLarge()),
|
|
564
|
+
//
|
|
565
|
+
isBusy: computed(() => store.status() == AXPPageStatus.Processing),
|
|
566
|
+
isSaving: computed(() => store.status() == AXPPageStatus.Submitting),
|
|
567
|
+
isDirty: computed(() => !isEqual(store.context(), store.previousContext())),
|
|
568
|
+
changesCount: computed(() => getChangedPaths(store.context(), store.previousContext()).length),
|
|
569
|
+
isLoaded: computed(() => store.adapter() != null),
|
|
570
|
+
currentPageSelectedRows: computed(() => store.pageSelectedRows()),
|
|
571
|
+
//
|
|
572
|
+
// Rendered tabs for current page - prevents re-rendering on tab switch
|
|
573
|
+
currentPageRenderedTabs: computed(() => {
|
|
574
|
+
const currentPage = store.currentPage();
|
|
575
|
+
if (!currentPage?.id) {
|
|
576
|
+
return [];
|
|
577
|
+
}
|
|
578
|
+
const pageId = currentPage.id;
|
|
579
|
+
const cache = store.renderedTabsCache();
|
|
580
|
+
return cache[pageId] || [];
|
|
581
|
+
}),
|
|
582
|
+
})), withMethods((store, evaluatorService = inject(AXPExpressionEvaluatorService), router = inject(Router), route = inject(ActivatedRoute), deviceService = inject(AXPDeviceService), formatService = inject(AXFormatService), toastService = inject(AXToastService), translateService = inject(AXTranslationService), settingsService = inject(AXPSettingsService)) => {
|
|
583
|
+
// Effect to automatically cache current tab when it changes
|
|
584
|
+
effect(() => {
|
|
585
|
+
const currentPage = store.currentPage();
|
|
586
|
+
const currentTab = store.currentTab();
|
|
587
|
+
if (currentPage?.id && currentTab?.id) {
|
|
588
|
+
const pageId = currentPage.id;
|
|
589
|
+
const tabId = currentTab.id;
|
|
590
|
+
const cache = store.renderedTabsCache();
|
|
591
|
+
const pageCache = cache[pageId] || [];
|
|
592
|
+
// Check if tab is already in cache
|
|
593
|
+
const isTabCached = pageCache.some((cached) => cached.tabId === tabId);
|
|
594
|
+
if (!isTabCached) {
|
|
595
|
+
// Add tab to cache for this page
|
|
596
|
+
const newTabCache = {
|
|
597
|
+
tabId: tabId,
|
|
598
|
+
tab: currentTab,
|
|
599
|
+
};
|
|
600
|
+
const updatedPageCache = [...pageCache, newTabCache];
|
|
601
|
+
// Update the cache immutably
|
|
602
|
+
const updatedCache = {
|
|
603
|
+
...cache,
|
|
604
|
+
[pageId]: updatedPageCache,
|
|
605
|
+
};
|
|
606
|
+
patchState(store, {
|
|
607
|
+
renderedTabsCache: updatedCache,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
// Create an effect to handle route changes
|
|
613
|
+
effect(() => {
|
|
614
|
+
if (store.adapter()) {
|
|
615
|
+
route.queryParams.subscribe((params) => {
|
|
616
|
+
const pageId = params['page'];
|
|
617
|
+
const adapter = store.adapter();
|
|
618
|
+
if (adapter) {
|
|
619
|
+
// Find current page from query param or conditionally default to first page
|
|
620
|
+
let currentPage = null;
|
|
621
|
+
if (pageId) {
|
|
622
|
+
const foundPage = adapter.pages.find((p) => p.id === pageId);
|
|
623
|
+
if (foundPage) {
|
|
624
|
+
currentPage = foundPage;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
// Only auto-select primary page if layout is large
|
|
629
|
+
if (deviceService.isLarge() || adapter.pages.length == 1) {
|
|
630
|
+
const primaryPage = adapter.pages.find((p) => p.isPrimary) ?? adapter.pages[0];
|
|
631
|
+
currentPage = primaryPage;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
// Set current tab to first tab of the current page (internal state only)
|
|
635
|
+
let currentTab = currentPage?.tabs?.[0] ?? null;
|
|
636
|
+
// Only update if there's a change. When `currentPage` is still null, `load()` → `loadPage`
|
|
637
|
+
// will set `currentPage` and evaluated content; the first `queryParams` emit would otherwise
|
|
638
|
+
// race and duplicate `buildEvaluatedPageContentsForRootContext` (double render).
|
|
639
|
+
if (store.currentPage()?.id !== currentPage?.id) {
|
|
640
|
+
if (store.currentPage() == null) {
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
patchState(store, {
|
|
644
|
+
currentPage,
|
|
645
|
+
currentTab,
|
|
646
|
+
});
|
|
647
|
+
void (async () => {
|
|
648
|
+
const rootCtx = store.rootContext();
|
|
649
|
+
const { evaluatedPageContent, evaluatedTabContentsById } = await buildEvaluatedPageContentsForRootContext(currentPage, rootCtx, evaluatorService);
|
|
650
|
+
patchState(store, {
|
|
651
|
+
evaluatedPageContent,
|
|
652
|
+
evaluatedTabContentsById,
|
|
653
|
+
});
|
|
654
|
+
})();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
return {
|
|
661
|
+
async loadAdapter(adapter) {
|
|
662
|
+
patchState(store, { adapter });
|
|
663
|
+
// Load adapter context if adapter has load function
|
|
664
|
+
let adapterContext = {};
|
|
665
|
+
if (adapter.load) {
|
|
666
|
+
const adapterResult = await adapter.load();
|
|
667
|
+
adapterContext = adapterResult?.data ?? {};
|
|
668
|
+
}
|
|
669
|
+
patchState(store, {
|
|
670
|
+
rootContext: cloneDeep(adapterContext),
|
|
671
|
+
});
|
|
672
|
+
},
|
|
673
|
+
async loadPage(pageId, forceRefresh) {
|
|
674
|
+
const adapter = store.adapter();
|
|
675
|
+
if (!adapter) {
|
|
676
|
+
throw new Error('Adapter must be loaded before loading page');
|
|
677
|
+
}
|
|
678
|
+
patchState(store, {
|
|
679
|
+
status: AXPPageStatus.Processing,
|
|
680
|
+
});
|
|
681
|
+
// Get page ID from parameter or query params
|
|
682
|
+
const queryParams = router.routerState.snapshot.root.queryParams;
|
|
683
|
+
const targetPageId = pageId || queryParams['page'];
|
|
684
|
+
// Find current page from page ID or conditionally default to first page
|
|
685
|
+
let currentPage = null;
|
|
686
|
+
if (targetPageId) {
|
|
687
|
+
const foundPage = adapter.pages.find((p) => p.id === targetPageId);
|
|
688
|
+
if (foundPage) {
|
|
689
|
+
currentPage = foundPage;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
// Only auto-select primary page if layout is large
|
|
694
|
+
if (deviceService.isLarge() || adapter.pages.length == 1) {
|
|
695
|
+
const primaryPage = adapter.pages.find((p) => p.isPrimary) ?? adapter.pages[0];
|
|
696
|
+
currentPage = primaryPage;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
// Load page data if current page exists
|
|
700
|
+
let context = {};
|
|
701
|
+
if (currentPage) {
|
|
702
|
+
const currentPageIndex = adapter.pages.findIndex((p) => p.id === currentPage.id);
|
|
703
|
+
const loadResult = await adapter.pages[currentPageIndex]?.load?.({ forceRefresh });
|
|
704
|
+
context = loadResult?.data ?? {};
|
|
705
|
+
}
|
|
706
|
+
// Set current tab to first tab of the current page (internal state only)
|
|
707
|
+
let currentTab = currentPage?.tabs?.[0] ?? null;
|
|
708
|
+
const rootCtx = store.rootContext();
|
|
709
|
+
const { evaluatedPageContent, evaluatedTabContentsById } = await buildEvaluatedPageContentsForRootContext(currentPage, rootCtx, evaluatorService);
|
|
710
|
+
patchState(store, {
|
|
711
|
+
previousContext: cloneDeep(context),
|
|
712
|
+
context: cloneDeep(context),
|
|
713
|
+
status: AXPPageStatus.Rendered,
|
|
714
|
+
currentPage,
|
|
715
|
+
currentTab,
|
|
716
|
+
evaluatedPageContent,
|
|
717
|
+
evaluatedTabContentsById,
|
|
718
|
+
});
|
|
719
|
+
},
|
|
720
|
+
async load(adapter) {
|
|
721
|
+
// Setup expression evaluator scope
|
|
722
|
+
const scope = {
|
|
723
|
+
context: {
|
|
724
|
+
eval: (path) => {
|
|
725
|
+
return getSmart(store.context(), path);
|
|
726
|
+
},
|
|
727
|
+
isDirty: () => store.isDirty(),
|
|
728
|
+
},
|
|
729
|
+
};
|
|
730
|
+
patchState(store, {
|
|
731
|
+
scope,
|
|
732
|
+
});
|
|
733
|
+
//
|
|
734
|
+
await this.loadAdapter(adapter);
|
|
735
|
+
await this.loadPage(undefined, true);
|
|
736
|
+
},
|
|
737
|
+
updateContext(context) {
|
|
738
|
+
patchState(store, {
|
|
739
|
+
context,
|
|
740
|
+
});
|
|
741
|
+
},
|
|
742
|
+
updatePageSelectedRows(rows) {
|
|
743
|
+
patchState(store, {
|
|
744
|
+
pageSelectedRows: rows,
|
|
745
|
+
});
|
|
746
|
+
},
|
|
747
|
+
//Current Page
|
|
748
|
+
currentPageTitle() {
|
|
749
|
+
const raw = store.currentPage()?.title;
|
|
750
|
+
if (raw) {
|
|
751
|
+
return formatService.format(raw, 'string', store.context());
|
|
752
|
+
}
|
|
753
|
+
else {
|
|
754
|
+
return null;
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
currentPageDescription() {
|
|
758
|
+
const raw = store.currentPage()?.description;
|
|
759
|
+
if (raw) {
|
|
760
|
+
return formatService.format(raw, 'string', store.context());
|
|
761
|
+
}
|
|
762
|
+
else {
|
|
763
|
+
return null;
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
async currentPagePrimaryActions() {
|
|
767
|
+
// Use getActions() if available for reactive updates, otherwise fall back to static actions
|
|
768
|
+
const currentPage = store.currentPage();
|
|
769
|
+
const allActions = currentPage?.getActions ? await currentPage.getActions() : (currentPage?.actions ?? []);
|
|
770
|
+
const raw = allActions.filter((a) => a.priority == 'primary');
|
|
771
|
+
const acceptAction = currentPage?.settings?.commands?.accept;
|
|
772
|
+
const rejectAction = currentPage?.settings?.commands?.reject;
|
|
773
|
+
if (rejectAction) {
|
|
774
|
+
raw.push({
|
|
775
|
+
priority: 'primary',
|
|
776
|
+
zone: 'footer',
|
|
777
|
+
name: 'reject',
|
|
778
|
+
title: rejectAction.title,
|
|
779
|
+
color: rejectAction.color,
|
|
780
|
+
icon: rejectAction.icon,
|
|
781
|
+
command: rejectAction.command,
|
|
782
|
+
visible: rejectAction.visible,
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
if (acceptAction) {
|
|
786
|
+
raw.push({
|
|
787
|
+
priority: 'primary',
|
|
788
|
+
zone: 'footer',
|
|
789
|
+
name: 'accept',
|
|
790
|
+
title: acceptAction.title,
|
|
791
|
+
color: acceptAction.color,
|
|
792
|
+
icon: acceptAction.icon,
|
|
793
|
+
command: acceptAction.command,
|
|
794
|
+
visible: acceptAction.visible,
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
const processed = await evaluatorService.evaluate(raw, store.scope());
|
|
798
|
+
return processed;
|
|
799
|
+
},
|
|
800
|
+
async currentPageSecondaryActions() {
|
|
801
|
+
// Use getActions() if available for reactive updates, otherwise fall back to static actions
|
|
802
|
+
const currentPage = store.currentPage();
|
|
803
|
+
const allActions = currentPage?.getActions ? await currentPage.getActions() : (currentPage?.actions ?? []);
|
|
804
|
+
const raw = allActions.filter((a) => a.priority == 'secondary');
|
|
805
|
+
const processed = await evaluatorService.evaluate(raw, store.scope());
|
|
806
|
+
return processed;
|
|
807
|
+
},
|
|
808
|
+
currentPageContent() {
|
|
809
|
+
return store.evaluatedPageContent();
|
|
810
|
+
},
|
|
811
|
+
currentPageTabs() {
|
|
812
|
+
return store.currentPage()?.tabs?.filter((tab) => tab.visible !== false);
|
|
813
|
+
},
|
|
814
|
+
setCurrentPage(page) {
|
|
815
|
+
// Clear previous page cache if changing pages
|
|
816
|
+
const previousPage = store.currentPage();
|
|
817
|
+
if (previousPage?.id && previousPage.id !== page?.id) {
|
|
818
|
+
this.clearPageTabCache(previousPage.id);
|
|
819
|
+
}
|
|
820
|
+
if (page) {
|
|
821
|
+
const firstTab = page.tabs?.[0] ?? null;
|
|
822
|
+
patchState(store, {
|
|
823
|
+
currentPage: page,
|
|
824
|
+
currentTab: firstTab,
|
|
825
|
+
});
|
|
826
|
+
router.navigate([], {
|
|
827
|
+
queryParams: {
|
|
828
|
+
page: page.id,
|
|
829
|
+
},
|
|
830
|
+
queryParamsHandling: 'merge',
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
834
|
+
patchState(store, {
|
|
835
|
+
currentPage: null,
|
|
836
|
+
currentTab: null,
|
|
837
|
+
});
|
|
838
|
+
// Remove page query parameter
|
|
839
|
+
const currentParams = { ...route.snapshot.queryParams };
|
|
840
|
+
delete currentParams['page'];
|
|
841
|
+
router.navigate([], {
|
|
842
|
+
queryParams: currentParams,
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
//Current Tab
|
|
847
|
+
setCurrentTab(tab) {
|
|
848
|
+
patchState(store, {
|
|
849
|
+
currentTab: tab,
|
|
850
|
+
});
|
|
851
|
+
// Cache management is handled automatically by the effect
|
|
852
|
+
},
|
|
853
|
+
getCurrentTabContent() {
|
|
854
|
+
return store.currentTab()?.content ?? [];
|
|
855
|
+
},
|
|
856
|
+
//#region ---- Rendered Tabs Management ----
|
|
857
|
+
/**
|
|
858
|
+
* Get content for a specific rendered tab
|
|
859
|
+
*/
|
|
860
|
+
getRenderedTabContent(tabId) {
|
|
861
|
+
const byTab = store.evaluatedTabContentsById();
|
|
862
|
+
if (Object.prototype.hasOwnProperty.call(byTab, tabId)) {
|
|
863
|
+
return byTab[tabId];
|
|
864
|
+
}
|
|
865
|
+
const renderedTabs = store.currentPageRenderedTabs();
|
|
866
|
+
const renderedTab = renderedTabs.find((cached) => cached.tabId === tabId);
|
|
867
|
+
return renderedTab?.tab?.content ?? [];
|
|
868
|
+
},
|
|
869
|
+
/**
|
|
870
|
+
* Clear cache when page changes to free memory
|
|
871
|
+
*/
|
|
872
|
+
clearPageTabCache(pageId) {
|
|
873
|
+
const cache = store.renderedTabsCache();
|
|
874
|
+
const updatedCache = { ...cache };
|
|
875
|
+
delete updatedCache[pageId];
|
|
876
|
+
patchState(store, {
|
|
877
|
+
renderedTabsCache: updatedCache,
|
|
878
|
+
});
|
|
879
|
+
},
|
|
880
|
+
//#endregion
|
|
881
|
+
title() {
|
|
882
|
+
const raw = store.showPages() ? (store.adapter()?.title ?? '') : (store.adapter()?.label ?? '');
|
|
883
|
+
return raw ? formatService.format(raw, 'string', store.rootContext()) : null;
|
|
884
|
+
},
|
|
885
|
+
backButtonTitle() {
|
|
886
|
+
const raw = store.showPages() ? (store.adapter()?.label ?? '') : (store.adapter()?.title ?? '');
|
|
887
|
+
return raw ? formatService.format(raw, 'string', store.rootContext()) : null;
|
|
888
|
+
},
|
|
889
|
+
description() {
|
|
890
|
+
const raw = store.adapter()?.description;
|
|
891
|
+
if (raw) {
|
|
892
|
+
return formatService.format(raw, 'string', store.rootContext());
|
|
893
|
+
}
|
|
894
|
+
else {
|
|
895
|
+
return null;
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
async primaryActions() {
|
|
899
|
+
const raw = store.adapter()?.actions?.filter((a) => a.priority == 'primary') ?? [];
|
|
900
|
+
const processed = await evaluatorService.evaluate(raw, store.scope());
|
|
901
|
+
return processed;
|
|
902
|
+
},
|
|
903
|
+
async secondaryActions() {
|
|
904
|
+
const raw = store.adapter()?.actions?.filter((a) => a.priority == 'secondary') ?? [];
|
|
905
|
+
const processed = await evaluatorService.evaluate(raw, store.scope());
|
|
906
|
+
return processed;
|
|
907
|
+
},
|
|
908
|
+
async breadcrumbs() {
|
|
909
|
+
const rootContext = store.rootContext();
|
|
910
|
+
const scope = {
|
|
911
|
+
...rootContext,
|
|
912
|
+
context: {
|
|
913
|
+
eval: (path) => get(rootContext, path),
|
|
914
|
+
},
|
|
915
|
+
};
|
|
916
|
+
const breadcrumbs = await Promise.all(store.adapter()?.breadcrumbs?.map(async (b) => {
|
|
917
|
+
const raw = b?.title ?? '';
|
|
918
|
+
const evaluated = typeof raw === 'string' && raw.includes('{{')
|
|
919
|
+
? await evaluatorService.evaluate(raw, scope)
|
|
920
|
+
: await formatService.format(raw, 'string', rootContext);
|
|
921
|
+
return {
|
|
922
|
+
...b,
|
|
923
|
+
title: typeof evaluated === 'string' ? evaluated : raw,
|
|
924
|
+
};
|
|
925
|
+
}) ?? []);
|
|
926
|
+
// Add current page title as the last breadcrumb item
|
|
927
|
+
const currentPageLabel = store.currentPage()?.label;
|
|
928
|
+
const pages = store.adapter()?.pages ?? [];
|
|
929
|
+
const primaryPage = pages.find((p) => p.isPrimary) ?? pages[0];
|
|
930
|
+
const isMainPage = primaryPage?.id === store.currentPage()?.id;
|
|
931
|
+
if (currentPageLabel && !isMainPage) {
|
|
932
|
+
const pageScope = {
|
|
933
|
+
...store.context(),
|
|
934
|
+
context: {
|
|
935
|
+
eval: (path) => get(store.context(), path),
|
|
936
|
+
},
|
|
937
|
+
};
|
|
938
|
+
const processedCurrentPageTitle = typeof currentPageLabel === 'string' && currentPageLabel.includes('{{')
|
|
939
|
+
? await evaluatorService.evaluate(currentPageLabel, pageScope)
|
|
940
|
+
: await formatService.format(currentPageLabel, 'string', store.context());
|
|
941
|
+
breadcrumbs.push({
|
|
942
|
+
title: typeof processedCurrentPageTitle === 'string' ? processedCurrentPageTitle : currentPageLabel,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
return breadcrumbs;
|
|
946
|
+
},
|
|
947
|
+
async discard() {
|
|
948
|
+
patchState(store, {
|
|
949
|
+
context: cloneDeep(store.previousContext()),
|
|
950
|
+
});
|
|
951
|
+
},
|
|
952
|
+
async save(command, form) {
|
|
953
|
+
const formResult = await form.validate();
|
|
954
|
+
if (!formResult.result) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
patchState(store, {
|
|
958
|
+
status: AXPPageStatus.Submitting,
|
|
959
|
+
});
|
|
960
|
+
const result = await store.currentPage()?.execute?.(command, store.context());
|
|
961
|
+
const enableOperationToasts = await settingsService.get(AXPCommonSettings.EnableOperationToasts);
|
|
962
|
+
if (result?.success) {
|
|
963
|
+
patchState(store, {
|
|
964
|
+
previousContext: store.context(),
|
|
965
|
+
});
|
|
966
|
+
// After successful save, force refresh the rootContext and reload the current page
|
|
967
|
+
try {
|
|
968
|
+
await this.loadPage(store.currentPage()?.id, true);
|
|
969
|
+
}
|
|
970
|
+
catch (error) {
|
|
971
|
+
console.error('Failed to refresh page after save', error);
|
|
972
|
+
}
|
|
973
|
+
if (enableOperationToasts) {
|
|
974
|
+
toastService.show({
|
|
975
|
+
color: 'success',
|
|
976
|
+
title: await translateService.translateAsync('@general:messages.generic.success.title'),
|
|
977
|
+
content: await translateService.translateAsync('@general:messages.generic.success.description'),
|
|
978
|
+
location: 'bottom-center',
|
|
979
|
+
closeButton: true,
|
|
980
|
+
timeOut: 3000,
|
|
981
|
+
timeOutProgress: true,
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
if (enableOperationToasts) {
|
|
987
|
+
toastService.show({
|
|
988
|
+
color: 'danger',
|
|
989
|
+
title: await translateService.translateAsync('@general:messages.generic.error.title'),
|
|
990
|
+
content: result?.message?.text ||
|
|
991
|
+
(await translateService.translateAsync('@general:messages.generic.error.description')),
|
|
992
|
+
location: 'bottom-center',
|
|
993
|
+
closeButton: true,
|
|
994
|
+
timeOut: 3000,
|
|
995
|
+
timeOutProgress: true,
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
patchState(store, {
|
|
1000
|
+
status: AXPPageStatus.Submitted,
|
|
1001
|
+
});
|
|
1002
|
+
},
|
|
1003
|
+
goToListPage() {
|
|
1004
|
+
if (store.adapter()?.exitUrl) {
|
|
1005
|
+
router.navigate([store.adapter()?.exitUrl]);
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
};
|
|
1009
|
+
}));
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Registry of rendered page component instances by component key.
|
|
1013
|
+
* Used so page execute can delegate to the actual component instance in the view.
|
|
1014
|
+
*/
|
|
1015
|
+
class AXPPageComponentInstanceRegistryService {
|
|
1016
|
+
constructor() {
|
|
1017
|
+
this.instances = new Map();
|
|
1018
|
+
}
|
|
1019
|
+
register(key, instance) {
|
|
1020
|
+
this.instances.set(key, instance);
|
|
1021
|
+
}
|
|
1022
|
+
unregister(key) {
|
|
1023
|
+
this.instances.delete(key);
|
|
1024
|
+
}
|
|
1025
|
+
get(key) {
|
|
1026
|
+
return this.instances.get(key) ?? null;
|
|
1027
|
+
}
|
|
1028
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentInstanceRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1029
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentInstanceRegistryService, providedIn: 'root' }); }
|
|
1030
|
+
}
|
|
1031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentInstanceRegistryService, decorators: [{
|
|
1032
|
+
type: Injectable,
|
|
1033
|
+
args: [{
|
|
1034
|
+
providedIn: 'root',
|
|
1035
|
+
}]
|
|
1036
|
+
}] });
|
|
1037
|
+
|
|
1038
|
+
//#region ---- Page Component Renderer Directive ----
|
|
1039
|
+
/**
|
|
1040
|
+
* Directive for rendering page components dynamically
|
|
1041
|
+
* Similar to component-slot pattern but specifically for page components
|
|
1042
|
+
*/
|
|
1043
|
+
class AXPPageComponentRendererDirective {
|
|
1044
|
+
constructor() {
|
|
1045
|
+
this.componentKey = input.required(...(ngDevMode ? [{ debugName: "componentKey" }] : /* istanbul ignore next */ []));
|
|
1046
|
+
this.rootContext = input({}, ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
|
|
1047
|
+
this.pageConfig = input(...(ngDevMode ? [undefined, { debugName: "pageConfig" }] : /* istanbul ignore next */ []));
|
|
1048
|
+
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
1049
|
+
/** Emitted when the component instance is registered and ready */
|
|
1050
|
+
this.componentReady = output();
|
|
1051
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1052
|
+
this.pageComponentRegistry = inject(AXPPageComponentRegistryService);
|
|
1053
|
+
this.instanceRegistry = inject(AXPPageComponentInstanceRegistryService);
|
|
1054
|
+
this.componentRef = null;
|
|
1055
|
+
this.#contextEffect = effect(() => {
|
|
1056
|
+
const context = this.rootContext();
|
|
1057
|
+
if (this.componentRef && context) {
|
|
1058
|
+
this.componentRef.setInput('rootContext', context);
|
|
1059
|
+
}
|
|
1060
|
+
}, ...(ngDevMode ? [{ debugName: "#contextEffect" }] : /* istanbul ignore next */ []));
|
|
1061
|
+
this.#pageConfigEffect = effect(() => {
|
|
1062
|
+
const config = this.pageConfig();
|
|
1063
|
+
if (this.componentRef && config) {
|
|
1064
|
+
this.componentRef.setInput('pageConfig', config);
|
|
1065
|
+
}
|
|
1066
|
+
}, ...(ngDevMode ? [{ debugName: "#pageConfigEffect" }] : /* istanbul ignore next */ []));
|
|
1067
|
+
this.#optionsEffect = effect(() => {
|
|
1068
|
+
const options = this.options();
|
|
1069
|
+
if (this.componentRef && options) {
|
|
1070
|
+
this.componentRef.setInput('options', options);
|
|
1071
|
+
}
|
|
1072
|
+
}, ...(ngDevMode ? [{ debugName: "#optionsEffect" }] : /* istanbul ignore next */ []));
|
|
1073
|
+
}
|
|
1074
|
+
#contextEffect;
|
|
1075
|
+
#pageConfigEffect;
|
|
1076
|
+
#optionsEffect;
|
|
1077
|
+
async ngOnInit() {
|
|
1078
|
+
await this.loadComponent();
|
|
1079
|
+
}
|
|
1080
|
+
ngOnDestroy() {
|
|
1081
|
+
if (this.componentRef) {
|
|
1082
|
+
this.instanceRegistry.unregister(this.componentKey());
|
|
1083
|
+
this.componentRef.destroy();
|
|
1084
|
+
this.componentRef = null;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
async loadComponent() {
|
|
1088
|
+
try {
|
|
1089
|
+
// Clear any existing component
|
|
1090
|
+
this.viewContainerRef.clear();
|
|
1091
|
+
// Get component loader from registry
|
|
1092
|
+
const loader = await this.pageComponentRegistry.find(this.componentKey());
|
|
1093
|
+
if (!loader) {
|
|
1094
|
+
console.error(`Component with key "${this.componentKey()}" not found in registry`);
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
// Load component type
|
|
1098
|
+
const ComponentType = await loader();
|
|
1099
|
+
// Create component instance
|
|
1100
|
+
this.componentRef = this.viewContainerRef.createComponent(ComponentType);
|
|
1101
|
+
this.instanceRegistry.register(this.componentKey(), this.componentRef.instance);
|
|
1102
|
+
const context = this.rootContext();
|
|
1103
|
+
if (context) {
|
|
1104
|
+
this.componentRef.setInput('rootContext', context);
|
|
1105
|
+
}
|
|
1106
|
+
const options = this.options();
|
|
1107
|
+
if (options) {
|
|
1108
|
+
this.componentRef.setInput('options', options);
|
|
1109
|
+
}
|
|
1110
|
+
const pageConfig = this.pageConfig();
|
|
1111
|
+
if (pageConfig) {
|
|
1112
|
+
this.componentRef.setInput('pageConfig', pageConfig);
|
|
1113
|
+
}
|
|
1114
|
+
// Notify that component is ready (allows parent to re-fetch actions)
|
|
1115
|
+
this.componentReady.emit(this.componentKey());
|
|
1116
|
+
}
|
|
1117
|
+
catch (error) {
|
|
1118
|
+
console.error(`Failed to load component "${this.componentKey()}":`, error);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1122
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPPageComponentRendererDirective, isStandalone: true, selector: "[axp-page-component-renderer]", inputs: { componentKey: { classPropertyName: "componentKey", publicName: "componentKey", isSignal: true, isRequired: true, transformFunction: null }, rootContext: { classPropertyName: "rootContext", publicName: "rootContext", isSignal: true, isRequired: false, transformFunction: null }, pageConfig: { classPropertyName: "pageConfig", publicName: "pageConfig", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { componentReady: "componentReady" }, ngImport: i0 }); }
|
|
1123
|
+
}
|
|
1124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentRendererDirective, decorators: [{
|
|
1125
|
+
type: Directive,
|
|
1126
|
+
args: [{
|
|
1127
|
+
selector: '[axp-page-component-renderer]',
|
|
1128
|
+
standalone: true,
|
|
1129
|
+
}]
|
|
1130
|
+
}], propDecorators: { componentKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentKey", required: true }] }], rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], componentReady: [{ type: i0.Output, args: ["componentReady"] }] } });
|
|
1131
|
+
|
|
1132
|
+
class AXPLayoutDetailsViewComponent extends AXPPageLayoutBaseComponent {
|
|
1133
|
+
constructor() {
|
|
1134
|
+
super(...arguments);
|
|
1135
|
+
this.adapter = input.required(...(ngDevMode ? [{ debugName: "adapter" }] : /* istanbul ignore next */ []));
|
|
1136
|
+
//
|
|
1137
|
+
this.vm = inject(AXPLayoutDetailsViewViewModel);
|
|
1138
|
+
this.router = inject(Router);
|
|
1139
|
+
this.route = inject(ActivatedRoute);
|
|
1140
|
+
this.eventService = inject(AXPBroadcastEventService);
|
|
1141
|
+
this.deviceService = inject(AXPDeviceService);
|
|
1142
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1143
|
+
this.destroyed$ = new Subject();
|
|
1144
|
+
this.form = viewChild('form', ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
1145
|
+
this.widgetContainer = viewChild(AXPWidgetContainerComponent, ...(ngDevMode ? [{ debugName: "widgetContainer" }] : /* istanbul ignore next */ []));
|
|
1146
|
+
this.footerPrimaryActions = signal([], ...(ngDevMode ? [{ debugName: "footerPrimaryActions" }] : /* istanbul ignore next */ []));
|
|
1147
|
+
this.footerSecondaryActions = signal([], ...(ngDevMode ? [{ debugName: "footerSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
1148
|
+
this.footerActions = computed(() => [...this.footerPrimaryActions(), ...this.footerSecondaryActions()], ...(ngDevMode ? [{ debugName: "footerActions" }] : /* istanbul ignore next */ []));
|
|
1149
|
+
this.hasVisibleFooterPrimaryActions = computed(() => {
|
|
1150
|
+
const primaryFooterActions = this.footerPrimaryActions();
|
|
1151
|
+
return primaryFooterActions.some((action) => action.visible != false);
|
|
1152
|
+
}, ...(ngDevMode ? [{ debugName: "hasVisibleFooterPrimaryActions" }] : /* istanbul ignore next */ []));
|
|
1153
|
+
this.hasVisibleFooterSecondaryActions = computed(() => {
|
|
1154
|
+
const secondaryFooterActions = this.footerSecondaryActions();
|
|
1155
|
+
return secondaryFooterActions.some((action) => action.visible != false);
|
|
1156
|
+
}, ...(ngDevMode ? [{ debugName: "hasVisibleFooterSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
1157
|
+
this.hasFooter = computed(() => {
|
|
1158
|
+
return ((this.hasVisibleFooterPrimaryActions() || this.hasVisibleFooterSecondaryActions()) &&
|
|
1159
|
+
!this.vm.currentPage()?.isReadonly);
|
|
1160
|
+
}, ...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
|
|
1161
|
+
this.#FooterActionsEffect = effect(async () => {
|
|
1162
|
+
this.updateTrigger();
|
|
1163
|
+
const footerPrimaryActions = await this.getFooterPrimaryActions();
|
|
1164
|
+
const footerSecondaryActions = await this.getFooterSecondaryActions();
|
|
1165
|
+
this.footerPrimaryActions.set(footerPrimaryActions);
|
|
1166
|
+
this.footerSecondaryActions.set(footerSecondaryActions);
|
|
1167
|
+
}, ...(ngDevMode ? [{ debugName: "#FooterActionsEffect" }] : /* istanbul ignore next */ []));
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Append timestamp query param to trigger router to re-run guards/resolvers
|
|
1171
|
+
*/
|
|
1172
|
+
async refreshLayout() {
|
|
1173
|
+
const router = this.router;
|
|
1174
|
+
const route = this.route;
|
|
1175
|
+
const now = Date.now();
|
|
1176
|
+
await router.navigate([], {
|
|
1177
|
+
relativeTo: route,
|
|
1178
|
+
queryParams: { _ts: now },
|
|
1179
|
+
queryParamsHandling: 'merge',
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
async ngOnInit() {
|
|
1183
|
+
await super.ngOnInit();
|
|
1184
|
+
//
|
|
1185
|
+
await this.vm.load(this.adapter());
|
|
1186
|
+
this.eventService
|
|
1187
|
+
//TODO: Use the constant from the entity module
|
|
1188
|
+
.listen('entity:refresh-layout')
|
|
1189
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1190
|
+
.subscribe((e) => {
|
|
1191
|
+
if (e.data.name == this.vm.adapter()?.name) {
|
|
1192
|
+
this.refreshLayout();
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
async ngAfterViewInit() {
|
|
1197
|
+
const listWidget = (await this.widgetContainer()?.find('page-list_table'));
|
|
1198
|
+
if (listWidget?.api && typeof listWidget.api === 'function') {
|
|
1199
|
+
const onSelectionChange = listWidget.api()['onSelectionChange'];
|
|
1200
|
+
if (onSelectionChange) {
|
|
1201
|
+
this.onSelectionChangeSubscription = onSelectionChange.subscribe((e) => {
|
|
1202
|
+
this.vm.updatePageSelectedRows(e);
|
|
1203
|
+
this.recompute();
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
ngOnDestroy() {
|
|
1209
|
+
this.onSelectionChangeSubscription?.unsubscribe();
|
|
1210
|
+
this.destroyed$.next();
|
|
1211
|
+
this.destroyed$.complete();
|
|
1212
|
+
}
|
|
1213
|
+
#FooterActionsEffect;
|
|
1214
|
+
handleOnContextChanged(e) {
|
|
1215
|
+
this.vm.updateContext(e.data);
|
|
1216
|
+
this.recompute();
|
|
1217
|
+
}
|
|
1218
|
+
handleSelectPage(page) {
|
|
1219
|
+
this.vm.setCurrentPage(page);
|
|
1220
|
+
}
|
|
1221
|
+
async getAllPrimaryActions() {
|
|
1222
|
+
if (!this.vm.showPages()) {
|
|
1223
|
+
const [primaryActions, pagePrimaryActions] = await Promise.all([
|
|
1224
|
+
this.vm.primaryActions(),
|
|
1225
|
+
this.vm.currentPagePrimaryActions(),
|
|
1226
|
+
]);
|
|
1227
|
+
return [...primaryActions, ...pagePrimaryActions];
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
return [];
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
async getPrimaryMenuItems() {
|
|
1234
|
+
return (await this.getAllPrimaryActions()).filter((a) => {
|
|
1235
|
+
return (a.priority == 'primary' &&
|
|
1236
|
+
((a.scope == AXPEntityCommandScope.Selected && this.vm.currentPageSelectedRows().length) ||
|
|
1237
|
+
((a.scope == AXPEntityCommandScope.TypeLevel || !a.scope) &&
|
|
1238
|
+
a.zone != 'footer' &&
|
|
1239
|
+
!this.vm.currentPageSelectedRows().length)));
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
async getFooterPrimaryActions() {
|
|
1243
|
+
return (await this.getAllPrimaryActions()).filter((item) => item.zone == 'footer');
|
|
1244
|
+
}
|
|
1245
|
+
async getAllSecondaryActions() {
|
|
1246
|
+
if (!this.vm.showPages()) {
|
|
1247
|
+
const [secondaryActions, pageSecondaryActions] = await Promise.all([
|
|
1248
|
+
this.vm.secondaryActions(),
|
|
1249
|
+
this.vm.currentPageSecondaryActions(),
|
|
1250
|
+
]);
|
|
1251
|
+
return [...secondaryActions, ...pageSecondaryActions];
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
return [];
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
async getSecondaryMenuItems() {
|
|
1258
|
+
return (await this.getAllSecondaryActions()).filter((item) => item.zone == 'header');
|
|
1259
|
+
}
|
|
1260
|
+
async getFooterSecondaryActions() {
|
|
1261
|
+
return (await this.getAllSecondaryActions()).filter((item) => item.zone == 'footer');
|
|
1262
|
+
}
|
|
1263
|
+
async getPageBreadcrumbs() {
|
|
1264
|
+
return (await this.vm.breadcrumbs()) ?? [];
|
|
1265
|
+
}
|
|
1266
|
+
async getPageTitle() {
|
|
1267
|
+
if (this.vm.showPages()) {
|
|
1268
|
+
return this.vm.title() || '';
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
return this.vm.currentPageTitle() || '';
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
async getPageDescription() {
|
|
1275
|
+
if (this.vm.showPages()) {
|
|
1276
|
+
return (await this.vm.description()) || '';
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
return await this.vm.currentPageDescription();
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
async getBackButton() {
|
|
1283
|
+
if (this.vm.adapter()?.pages?.length > 1) {
|
|
1284
|
+
return {
|
|
1285
|
+
title: this.vm.backButtonTitle() ?? '',
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
return {
|
|
1290
|
+
title: this.vm.adapter()?.label ?? '',
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
async getPageBadge() {
|
|
1295
|
+
const showPageBadge = await this.settingsService.get(AXPCommonSettings.ShowPageBadge);
|
|
1296
|
+
if (!showPageBadge) {
|
|
1297
|
+
return null;
|
|
1298
|
+
}
|
|
1299
|
+
const adapter = this.vm.adapter();
|
|
1300
|
+
if (!adapter?.getPageBadge) {
|
|
1301
|
+
return null;
|
|
1302
|
+
}
|
|
1303
|
+
return adapter.getPageBadge(this.vm.context(), this.vm.isDirty());
|
|
1304
|
+
}
|
|
1305
|
+
async getPageStatus() {
|
|
1306
|
+
const adapter = this.vm.adapter();
|
|
1307
|
+
if (!adapter?.getPageStatus) {
|
|
1308
|
+
return null;
|
|
1309
|
+
}
|
|
1310
|
+
return adapter.getPageStatus(this.vm.context(), this.vm.currentPage());
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Get entity data for status chip component
|
|
1314
|
+
*/
|
|
1315
|
+
getEntityData() {
|
|
1316
|
+
return this.vm.context() ?? null;
|
|
1317
|
+
}
|
|
1318
|
+
async onBackButtonClick() {
|
|
1319
|
+
// When back button is clicked in small layout, go back to page list
|
|
1320
|
+
if (!this.vm.showPages() && this.vm.adapter()?.pages?.length > 1) {
|
|
1321
|
+
this.vm.setCurrentPage(null);
|
|
1322
|
+
}
|
|
1323
|
+
else {
|
|
1324
|
+
this.vm.goToListPage();
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
//#region ---- Command Execution ----
|
|
1328
|
+
async execute(command) {
|
|
1329
|
+
if (!this.vm.adapter()) {
|
|
1330
|
+
return;
|
|
1331
|
+
}
|
|
1332
|
+
const acceptCommand = this.vm.currentPage()?.settings?.commands?.accept?.command.name;
|
|
1333
|
+
const rejectCommand = this.vm.currentPage()?.settings?.commands?.reject?.command.name;
|
|
1334
|
+
if (command.name == acceptCommand) {
|
|
1335
|
+
await this.vm.save(command, this.form());
|
|
1336
|
+
this.recompute();
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
if (command.name == rejectCommand) {
|
|
1340
|
+
await this.vm.discard();
|
|
1341
|
+
this.recompute();
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
// Handle status update command
|
|
1345
|
+
if (command.name === 'update-status') {
|
|
1346
|
+
const transition = command.options?.['transition'];
|
|
1347
|
+
if (transition?.toStatus?.name) {
|
|
1348
|
+
const status = await this.getPageStatus();
|
|
1349
|
+
if (status?.dataPath) {
|
|
1350
|
+
// Update entity context with new status value
|
|
1351
|
+
const entity = this.vm.context();
|
|
1352
|
+
if (entity) {
|
|
1353
|
+
entity[status.dataPath] = transition.toStatus.name;
|
|
1354
|
+
this.vm.updateContext(entity);
|
|
1355
|
+
this.recompute();
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
return;
|
|
1360
|
+
}
|
|
1361
|
+
// Get all actions
|
|
1362
|
+
const [adapterPrimaryActions, adapterSecondaryActions, pagePrimaryActions, pageSecondaryActions] = await Promise.all([
|
|
1363
|
+
this.vm.primaryActions(),
|
|
1364
|
+
this.vm.secondaryActions(),
|
|
1365
|
+
this.vm.currentPagePrimaryActions(),
|
|
1366
|
+
this.vm.currentPageSecondaryActions(),
|
|
1367
|
+
]);
|
|
1368
|
+
// Combine adapter actions (primary + secondary)
|
|
1369
|
+
const adapterActions = [...adapterPrimaryActions, ...adapterSecondaryActions];
|
|
1370
|
+
// Combine current page actions (primary + secondary)
|
|
1371
|
+
const pageActions = [...pagePrimaryActions, ...pageSecondaryActions];
|
|
1372
|
+
const commandExistsInActions = (actions, commandName) => {
|
|
1373
|
+
const check = (list) => {
|
|
1374
|
+
if (!Array.isArray(list) || list.length === 0)
|
|
1375
|
+
return false;
|
|
1376
|
+
return list.some((action) => action?.command?.name === commandName ||
|
|
1377
|
+
(Array.isArray(action?.items) && check(action.items)));
|
|
1378
|
+
};
|
|
1379
|
+
return check(actions);
|
|
1380
|
+
};
|
|
1381
|
+
// Check if command exists in adapter actions first
|
|
1382
|
+
if (commandExistsInActions(adapterActions, command.name)) {
|
|
1383
|
+
await this.vm.adapter()?.execute?.(command, this.vm.context());
|
|
1384
|
+
}
|
|
1385
|
+
// Check if command exists in current page actions
|
|
1386
|
+
else if (commandExistsInActions(pageActions, command.name)) {
|
|
1387
|
+
console.log('currentPage', this.vm.currentPage());
|
|
1388
|
+
await this.vm
|
|
1389
|
+
.currentPage()
|
|
1390
|
+
?.execute?.(command, this.vm.pageSelectedRows().length ? this.vm.pageSelectedRows() : this.vm.context());
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
async handleKeyboardEvent(event) {
|
|
1394
|
+
if (event.ctrlKey) {
|
|
1395
|
+
switch (event.code) {
|
|
1396
|
+
case 'KeyS':
|
|
1397
|
+
event.preventDefault();
|
|
1398
|
+
event.stopPropagation();
|
|
1399
|
+
await this.execute({ name: this.vm.currentPage()?.settings?.commands?.accept?.command.name || 'save' });
|
|
1400
|
+
break;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutDetailsViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1405
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLayoutDetailsViewComponent, isStandalone: true, selector: "axp-layout-details-view", inputs: { adapter: { classPropertyName: "adapter", publicName: "adapter", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, providers: [
|
|
1406
|
+
{
|
|
1407
|
+
provide: AXPPageLayoutBase,
|
|
1408
|
+
useExisting: AXPLayoutDetailsViewComponent,
|
|
1409
|
+
},
|
|
1410
|
+
AXPLayoutDetailsViewViewModel,
|
|
1411
|
+
], viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true, isSignal: true }, { propertyName: "widgetContainer", first: true, predicate: AXPWidgetContainerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if (vm.adapter()?.pages?.length! > 1 && vm.isLarge()) {\n <axp-layout-start-side>\n <axp-layout-header>\n <axp-layout-title>{{ t(vm.title()) | async }}</axp-layout-title>\n <axp-layout-description>{{ t(vm.description()) | async }}</axp-layout-description>\n </axp-layout-header>\n <axp-layout-content>\n <ax-tabs class=\"axp-vertical-tabs\" [look]=\"'with-line-color'\" [location]=\"'end'\" [fitParent]=\"true\">\n @for (item of vm.adapter()?.pages; track $index) {\n <ax-tab-item\n [text]=\"(formatService.format(item.label, 'string', vm.rootContext()) | translate | async)!\"\n (onClick)=\"handleSelectPage(item)\"\n [active]=\"vm.currentPage()?.id === item.id\"\n >\n <ax-prefix>\n <ax-icon icon=\"far ${{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n }\n </ax-tabs>\n </axp-layout-content>\n </axp-layout-start-side>\n }\n <!-- Content Section -->\n <axp-page-content class=\"ax-flex ax-flex-row ax-gap-4\">\n @if (vm.showPages()) {\n <axp-layout-list class=\"ax-w-full\">\n @for (item of vm.adapter()?.pages; track $index) {\n <axp-layout-list-item (click)=\"handleSelectPage(item)\">\n <axp-layout-prefix>\n <ax-icon icon=\"far ${{ item.icon }}\" class=\"ax-text-gray-500\"></ax-icon>\n </axp-layout-prefix>\n <axp-layout-content>\n <a class=\"ax-font-semibold\">{{\n formatService.format(item.label, 'string', vm.rootContext()) | translate | async\n }}</a>\n </axp-layout-content>\n <axp-layout-suffix>\n <ax-icon icon=\" far fa-chevron-right\" class=\"ax-text-gray-400\"></ax-icon>\n </axp-layout-suffix>\n </axp-layout-list-item>\n }\n </axp-layout-list>\n } @else {\n <ax-form class=\"ax-h-full ax-w-full\" #form>\n <axp-widgets-container\n #widgetsContainerRef\n [context]=\"vm.context()\"\n (onContextChanged)=\"handleOnContextChanged($event)\"\n >\n <div class=\"ax-flex ax-flex-col ax-w-full ax-gap-4 ax-h-full\">\n @for (item of vm.currentPageContent(); track $index) {\n @if ('type' in item && item.type === 'component') {\n <!-- Component-based content -->\n <div\n axp-page-component-renderer\n [componentKey]=\"$any(item).componentKey\"\n [rootContext]=\"vm.rootContext()\"\n [pageConfig]=\"$any(item).pageConfig\"\n [options]=\"$any(item).options\"\n (componentReady)=\"recompute()\"\n ></div>\n } @else {\n <!-- Widget-based content -->\n <ng-container axp-widget-renderer [node]=\"$any(item)\" [mode]=\"$any(item).mode ?? 'view'\"></ng-container>\n }\n }\n @if (vm.currentPage()?.tabs?.length) {\n <div class=\"axp-horizontal-tabs\">\n <ax-tabs [location]=\"'bottom'\" [fitParent]=\"false\" look=\"classic\">\n @for (tab of vm.currentPageTabs(); track $index) {\n <ax-tab-item\n (onClick)=\"vm.setCurrentTab(tab)\"\n [text]=\"(tab.title | translate | async)!\"\n [active]=\"vm.currentTab()?.id === tab.id\"\n >\n <ax-prefix>\n <ax-icon icon=\"far ${{ tab.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n }\n </ax-tabs>\n <div [class]=\"'content'\">\n @for (renderedTab of vm.currentPageRenderedTabs(); track renderedTab.tabId) {\n <div [class]=\"renderedTab.tabId === vm.currentTab()?.id ? '' : 'ax-hidden'\">\n @for (content of vm.getRenderedTabContent(renderedTab.tabId); track $index) {\n <ng-container axp-widget-renderer [node]=\"content\" [mode]=\"content.mode ?? 'view'\">\n </ng-container>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n </ax-form>\n }\n </axp-page-content>\n\n <!-- Footer Section -->\n @if (hasFooter()) {\n <axp-page-footer class=\"--animated\">\n <axp-layout-suffix>\n <!-- secondary footer actions -->\n @if (hasVisibleFooterSecondaryActions()) {\n <ax-button\n [class.ax-sm]=\"deviceService.isSmall()\"\n [iconOnly]=\"deviceService.isSmall()\"\n [text]=\"'@general:terms.interface.actions' | translate | async\"\n [look]=\"deviceService.isSmall() ? 'blank' : 'solid'\"\n [color]=\"'default'\"\n >\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (action of footerSecondaryActions(); track $index) {\n @if (action.visible != false) {\n <ax-button-item\n [text]=\"(t(action.title) | async)!\"\n [color]=\"action.color\"\n [disabled]=\"action.disabled || vm.isSaving()\"\n (onClick)=\"execute(action.command!)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ action.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (action.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n\n @if (hasVisibleFooterPrimaryActions()) {\n @for (action of footerPrimaryActions(); track $index) {\n @if (action.visible != false) {\n <ax-button\n [class.ax-sm]=\"deviceService.isSmall()\"\n [disabled]=\"action.disabled || vm.isSaving()\"\n [text]=\"(t(action.title) | async)!\"\n [look]=\"'solid'\"\n [color]=\"action.color\"\n (onClick)=\"execute(action.command!)\"\n >\n <ax-prefix>\n <i class=\"{{ action.icon }}\"></i>\n </ax-prefix>\n @if (action?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of action?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item\n [text]=\"(t(sub.title) | async)!\"\n [color]=\"sub.color\"\n [disabled]=\"sub.disabled\"\n (onClick)=\"execute(sub.command!)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n </axp-layout-suffix>\n </axp-page-footer>\n }\n</axp-page-layout>\n", styles: ["axp-layout-details-view .axp-vertical-tabs{--ax-comp-tabs-default-border-radius: 0}axp-layout-details-view .axp-vertical-tabs ax-tab-item{margin-top:0!important;margin-bottom:0!important;padding-top:.75rem!important;padding-bottom:.75rem!important;font-weight:600!important}axp-layout-details-view .axp-vertical-tabs ax-tab-item>div{display:flex!important;align-items:center!important}axp-layout-details-view .axp-vertical-tabs ax-tab-item>div .ax-tab-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}axp-layout-details-view .axp-horizontal-tabs{display:flex;width:100%;flex-direction:column}axp-layout-details-view .axp-horizontal-tabs .content{margin-top:1rem;margin-bottom:1rem;display:block;width:100%}axp-layout-details-view axp-layout-section axp-layout-content{display:flex;width:100%;flex-direction:column}axp-layout-details-view axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed;--tw-divide-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-divide-opacity, 1))}axp-layout-details-view axp-layout-section axp-layout-content .--item-container{align-items:center;gap:1rem;padding:1rem}@media(min-width:1024px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:1.5rem;padding-right:1.5rem}}@media(min-width:1280px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:2rem;padding-right:2rem}}@media(min-width:1536px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:2.5rem;padding-right:2.5rem}}axp-layout-details-view axp-layout-section axp-layout-content .--item-container{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}axp-layout-details-view axp-layout-section axp-layout-content .--item-container axp-layout-description{margin-top:.5rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-details-view axp-page-content ax-form form{height:100%}axp-layout-details-view axp-layout-start-side{border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
1412
|
+
// Angular
|
|
1413
|
+
CommonModule }, { kind: "ngmodule", type:
|
|
1414
|
+
// ACoreX
|
|
1415
|
+
AXMenuModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i6.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i6.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i5.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXFileModule }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i5$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i5$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "component", type:
|
|
1416
|
+
//
|
|
1417
|
+
AXPThemeLayoutListComponent, selector: "axp-layout-list" }, { kind: "component", type: AXPThemeLayoutListItemComponent, selector: "axp-layout-list-item" }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i6$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "component", type: AXPThemeLayoutStartSideComponent, selector: "axp-layout-page-start-side, axp-layout-start-side" }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i7.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: AXPPageComponentRendererDirective, selector: "[axp-page-component-renderer]", inputs: ["componentKey", "rootContext", "pageConfig", "options"], outputs: ["componentReady"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1418
|
+
}
|
|
1419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutDetailsViewComponent, decorators: [{
|
|
1420
|
+
type: Component,
|
|
1421
|
+
args: [{ selector: 'axp-layout-details-view', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1422
|
+
// Angular
|
|
1423
|
+
CommonModule,
|
|
1424
|
+
// ACoreX
|
|
1425
|
+
AXMenuModule,
|
|
1426
|
+
AXButtonModule,
|
|
1427
|
+
AXButtonGroupModule,
|
|
1428
|
+
AXDropdownButtonModule,
|
|
1429
|
+
AXDropdownModule,
|
|
1430
|
+
AXTranslationModule,
|
|
1431
|
+
AXDecoratorModule,
|
|
1432
|
+
AXLoadingModule,
|
|
1433
|
+
AXBreadcrumbsModule,
|
|
1434
|
+
AXBadgeModule,
|
|
1435
|
+
AXSearchBoxModule,
|
|
1436
|
+
AXFormatModule,
|
|
1437
|
+
AXFileModule,
|
|
1438
|
+
AXDateTimeModule,
|
|
1439
|
+
AXSearchBoxModule,
|
|
1440
|
+
AXTabsModule,
|
|
1441
|
+
//
|
|
1442
|
+
AXPThemeLayoutListComponent,
|
|
1443
|
+
AXPThemeLayoutListItemComponent,
|
|
1444
|
+
AXPPageLayoutComponent,
|
|
1445
|
+
AXPThemeLayoutBlockComponent,
|
|
1446
|
+
AXPWidgetCoreModule,
|
|
1447
|
+
AXPThemeLayoutStartSideComponent,
|
|
1448
|
+
AXPThemeLayoutHeaderComponent,
|
|
1449
|
+
AXFormModule,
|
|
1450
|
+
AXPPageComponentRendererDirective,
|
|
1451
|
+
], encapsulation: ViewEncapsulation.None, providers: [
|
|
1452
|
+
{
|
|
1453
|
+
provide: AXPPageLayoutBase,
|
|
1454
|
+
useExisting: AXPLayoutDetailsViewComponent,
|
|
1455
|
+
},
|
|
1456
|
+
AXPLayoutDetailsViewViewModel,
|
|
1457
|
+
], template: "<axp-page-layout *translate=\"let t\">\n @if (vm.adapter()?.pages?.length! > 1 && vm.isLarge()) {\n <axp-layout-start-side>\n <axp-layout-header>\n <axp-layout-title>{{ t(vm.title()) | async }}</axp-layout-title>\n <axp-layout-description>{{ t(vm.description()) | async }}</axp-layout-description>\n </axp-layout-header>\n <axp-layout-content>\n <ax-tabs class=\"axp-vertical-tabs\" [look]=\"'with-line-color'\" [location]=\"'end'\" [fitParent]=\"true\">\n @for (item of vm.adapter()?.pages; track $index) {\n <ax-tab-item\n [text]=\"(formatService.format(item.label, 'string', vm.rootContext()) | translate | async)!\"\n (onClick)=\"handleSelectPage(item)\"\n [active]=\"vm.currentPage()?.id === item.id\"\n >\n <ax-prefix>\n <ax-icon icon=\"far ${{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n }\n </ax-tabs>\n </axp-layout-content>\n </axp-layout-start-side>\n }\n <!-- Content Section -->\n <axp-page-content class=\"ax-flex ax-flex-row ax-gap-4\">\n @if (vm.showPages()) {\n <axp-layout-list class=\"ax-w-full\">\n @for (item of vm.adapter()?.pages; track $index) {\n <axp-layout-list-item (click)=\"handleSelectPage(item)\">\n <axp-layout-prefix>\n <ax-icon icon=\"far ${{ item.icon }}\" class=\"ax-text-gray-500\"></ax-icon>\n </axp-layout-prefix>\n <axp-layout-content>\n <a class=\"ax-font-semibold\">{{\n formatService.format(item.label, 'string', vm.rootContext()) | translate | async\n }}</a>\n </axp-layout-content>\n <axp-layout-suffix>\n <ax-icon icon=\" far fa-chevron-right\" class=\"ax-text-gray-400\"></ax-icon>\n </axp-layout-suffix>\n </axp-layout-list-item>\n }\n </axp-layout-list>\n } @else {\n <ax-form class=\"ax-h-full ax-w-full\" #form>\n <axp-widgets-container\n #widgetsContainerRef\n [context]=\"vm.context()\"\n (onContextChanged)=\"handleOnContextChanged($event)\"\n >\n <div class=\"ax-flex ax-flex-col ax-w-full ax-gap-4 ax-h-full\">\n @for (item of vm.currentPageContent(); track $index) {\n @if ('type' in item && item.type === 'component') {\n <!-- Component-based content -->\n <div\n axp-page-component-renderer\n [componentKey]=\"$any(item).componentKey\"\n [rootContext]=\"vm.rootContext()\"\n [pageConfig]=\"$any(item).pageConfig\"\n [options]=\"$any(item).options\"\n (componentReady)=\"recompute()\"\n ></div>\n } @else {\n <!-- Widget-based content -->\n <ng-container axp-widget-renderer [node]=\"$any(item)\" [mode]=\"$any(item).mode ?? 'view'\"></ng-container>\n }\n }\n @if (vm.currentPage()?.tabs?.length) {\n <div class=\"axp-horizontal-tabs\">\n <ax-tabs [location]=\"'bottom'\" [fitParent]=\"false\" look=\"classic\">\n @for (tab of vm.currentPageTabs(); track $index) {\n <ax-tab-item\n (onClick)=\"vm.setCurrentTab(tab)\"\n [text]=\"(tab.title | translate | async)!\"\n [active]=\"vm.currentTab()?.id === tab.id\"\n >\n <ax-prefix>\n <ax-icon icon=\"far ${{ tab.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n }\n </ax-tabs>\n <div [class]=\"'content'\">\n @for (renderedTab of vm.currentPageRenderedTabs(); track renderedTab.tabId) {\n <div [class]=\"renderedTab.tabId === vm.currentTab()?.id ? '' : 'ax-hidden'\">\n @for (content of vm.getRenderedTabContent(renderedTab.tabId); track $index) {\n <ng-container axp-widget-renderer [node]=\"content\" [mode]=\"content.mode ?? 'view'\">\n </ng-container>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n </ax-form>\n }\n </axp-page-content>\n\n <!-- Footer Section -->\n @if (hasFooter()) {\n <axp-page-footer class=\"--animated\">\n <axp-layout-suffix>\n <!-- secondary footer actions -->\n @if (hasVisibleFooterSecondaryActions()) {\n <ax-button\n [class.ax-sm]=\"deviceService.isSmall()\"\n [iconOnly]=\"deviceService.isSmall()\"\n [text]=\"'@general:terms.interface.actions' | translate | async\"\n [look]=\"deviceService.isSmall() ? 'blank' : 'solid'\"\n [color]=\"'default'\"\n >\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (action of footerSecondaryActions(); track $index) {\n @if (action.visible != false) {\n <ax-button-item\n [text]=\"(t(action.title) | async)!\"\n [color]=\"action.color\"\n [disabled]=\"action.disabled || vm.isSaving()\"\n (onClick)=\"execute(action.command!)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ action.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (action.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n\n @if (hasVisibleFooterPrimaryActions()) {\n @for (action of footerPrimaryActions(); track $index) {\n @if (action.visible != false) {\n <ax-button\n [class.ax-sm]=\"deviceService.isSmall()\"\n [disabled]=\"action.disabled || vm.isSaving()\"\n [text]=\"(t(action.title) | async)!\"\n [look]=\"'solid'\"\n [color]=\"action.color\"\n (onClick)=\"execute(action.command!)\"\n >\n <ax-prefix>\n <i class=\"{{ action.icon }}\"></i>\n </ax-prefix>\n @if (action?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of action?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item\n [text]=\"(t(sub.title) | async)!\"\n [color]=\"sub.color\"\n [disabled]=\"sub.disabled\"\n (onClick)=\"execute(sub.command!)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ sub.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <ax-divider></ax-divider>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n </axp-layout-suffix>\n </axp-page-footer>\n }\n</axp-page-layout>\n", styles: ["axp-layout-details-view .axp-vertical-tabs{--ax-comp-tabs-default-border-radius: 0}axp-layout-details-view .axp-vertical-tabs ax-tab-item{margin-top:0!important;margin-bottom:0!important;padding-top:.75rem!important;padding-bottom:.75rem!important;font-weight:600!important}axp-layout-details-view .axp-vertical-tabs ax-tab-item>div{display:flex!important;align-items:center!important}axp-layout-details-view .axp-vertical-tabs ax-tab-item>div .ax-tab-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}axp-layout-details-view .axp-horizontal-tabs{display:flex;width:100%;flex-direction:column}axp-layout-details-view .axp-horizontal-tabs .content{margin-top:1rem;margin-bottom:1rem;display:block;width:100%}axp-layout-details-view axp-layout-section axp-layout-content{display:flex;width:100%;flex-direction:column}axp-layout-details-view axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed;--tw-divide-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-divide-opacity, 1))}axp-layout-details-view axp-layout-section axp-layout-content .--item-container{align-items:center;gap:1rem;padding:1rem}@media(min-width:1024px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:1.5rem;padding-right:1.5rem}}@media(min-width:1280px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:2rem;padding-right:2rem}}@media(min-width:1536px){axp-layout-details-view axp-layout-section axp-layout-content .--item-container{padding-left:2.5rem;padding-right:2.5rem}}axp-layout-details-view axp-layout-section axp-layout-content .--item-container{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}axp-layout-details-view axp-layout-section axp-layout-content .--item-container axp-layout-description{margin-top:.5rem!important;font-size:.75rem!important;line-height:1rem!important}axp-layout-details-view axp-page-content ax-form form{height:100%}axp-layout-details-view axp-layout-start-side{border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}\n"] }]
|
|
1458
|
+
}], propDecorators: { adapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "adapter", required: true }] }], form: [{ type: i0.ViewChild, args: ['form', { isSignal: true }] }], widgetContainer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPWidgetContainerComponent), { isSignal: true }] }], handleKeyboardEvent: [{
|
|
1459
|
+
type: HostListener,
|
|
1460
|
+
args: ['document:keydown', ['$event']]
|
|
1461
|
+
}] } });
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Generated bundle index. Do not edit.
|
|
1465
|
+
*/
|
|
1466
|
+
|
|
1467
|
+
export { AXPLayoutDetailsViewComponent, AXPLayoutDetailsViewViewModel, AXPPageComponentInstanceRegistryService, AXPPageLayoutBase, AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPopupLayoutBase, AXPPopupLayoutBaseComponent, AXPPopupLayoutComponent };
|
|
1468
|
+
//# sourceMappingURL=acorex-platform-layout-views.mjs.map
|