@acorex-platform/module-app-builder-client 0.0.20

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.
@@ -0,0 +1,90 @@
1
+ /** Registry key for the landing page designer custom entity page. */
2
+ const LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY = 'landing-page-designer-page';
3
+
4
+ const AXMAppBuilderMenuKeys = {
5
+ Root: 'app-builder:menu',
6
+ LandingPages: 'app-builder:menu:landing-pages',
7
+ LandingPageCategories: 'app-builder:menu:landing-page-categories',
8
+ };
9
+
10
+ /**
11
+ * Applications & Platform capabilities used by this module.
12
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
13
+ */
14
+ const AXPApplicationsPlatformPermissionKeys = {
15
+ Access: 'ApplicationsPlatform:Permission:Access',
16
+ MaintainApplications: 'ApplicationsPlatform:Permission:MaintainApplications',
17
+ MaintainTenants: 'ApplicationsPlatform:Permission:MaintainTenants',
18
+ MaintainPlatformShell: 'ApplicationsPlatform:Permission:MaintainPlatformShell',
19
+ MaintainLandingPages: 'ApplicationsPlatform:Permission:MaintainLandingPages',
20
+ MaintainIdentifiers: 'ApplicationsPlatform:Permission:MaintainIdentifiers',
21
+ MaintainTenantSettings: 'ApplicationsPlatform:Permission:MaintainTenantSettings',
22
+ MaintainPlatformSettings: 'ApplicationsPlatform:Permission:MaintainPlatformSettings',
23
+ MaintainLocales: 'ApplicationsPlatform:Permission:MaintainLocales',
24
+ UseDevTools: 'ApplicationsPlatform:Permission:UseDevTools',
25
+ };
26
+ /**
27
+ * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.
28
+ * Legacy nested shape kept so existing imports compile during migration.
29
+ */
30
+ const AXMPermissionsKeys = {
31
+ AppBuilder: {
32
+ Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
33
+ LandingPage: {
34
+ Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
35
+ View: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
36
+ Edit: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
37
+ Delete: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
38
+ Create: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
39
+ },
40
+ LandingPageCategory: {
41
+ Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
42
+ View: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
43
+ Edit: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
44
+ Delete: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
45
+ Create: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,
46
+ },
47
+ },
48
+ };
49
+
50
+ const config = {
51
+ i18n: 'app-builder',
52
+ module: 'AppBuilder',
53
+ };
54
+ const RootConfig = {
55
+ config,
56
+ module: {
57
+ module: 'app-builder',
58
+ name: config.module,
59
+ title: `@${config.i18n}:module.title`,
60
+ icon: 'fa-light fa-browser',
61
+ },
62
+ entities: {
63
+ landingPage: {
64
+ name: 'LandingPage',
65
+ source: `${config.module}.LandingPage`,
66
+ title: `@${config.i18n}:pages.entities.landing-page.title`,
67
+ titlePlural: `@${config.i18n}:pages.entities.landing-page.plural`,
68
+ icon: 'fa-light fa-file-lines',
69
+ },
70
+ landingPageCategory: {
71
+ name: 'LandingPageCategory',
72
+ source: `${config.module}.LandingPageCategory`,
73
+ title: `@${config.i18n}:categories.entities.landing-page-category.title`,
74
+ titlePlural: `@${config.i18n}:categories.entities.landing-page-category.plural`,
75
+ icon: 'fa-light fa-folder-tree',
76
+ },
77
+ },
78
+ };
79
+
80
+ const AXMLandingPageStatuses = {
81
+ Draft: { id: 'draft', title: 'Draft' },
82
+ Published: { id: 'published', title: 'Published' },
83
+ };
84
+
85
+ /**
86
+ * Generated bundle index. Do not edit.
87
+ */
88
+
89
+ export { AXMAppBuilderMenuKeys, AXMLandingPageStatuses, AXMPermissionsKeys, AXPApplicationsPlatformPermissionKeys, LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY, RootConfig };
90
+ //# sourceMappingURL=acorex-platform-module-app-builder-client-contracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-app-builder-client-contracts.mjs","sources":["../../../../libs/modules/app-builder/contracts/src/LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY.ts","../../../../libs/modules/app-builder/contracts/src/menu.keys.ts","../../../../libs/modules/app-builder/contracts/src/permission.keys.ts","../../../../libs/modules/app-builder/contracts/src/root-config.ts","../../../../libs/modules/app-builder/contracts/src/entities/landing-page/landing-page.types.ts","../../../../libs/modules/app-builder/contracts/src/acorex-platform-module-app-builder-client-contracts.ts"],"sourcesContent":["/** Registry key for the landing page designer custom entity page. */\nexport const LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY = 'landing-page-designer-page';\n","export const AXMAppBuilderMenuKeys = {\n Root: 'app-builder:menu',\n LandingPages: 'app-builder:menu:landing-pages',\n LandingPageCategories: 'app-builder:menu:landing-page-categories',\n} as const;\n","/**\n * Applications & Platform capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPApplicationsPlatformPermissionKeys = {\n Access: 'ApplicationsPlatform:Permission:Access',\n MaintainApplications: 'ApplicationsPlatform:Permission:MaintainApplications',\n MaintainTenants: 'ApplicationsPlatform:Permission:MaintainTenants',\n MaintainPlatformShell: 'ApplicationsPlatform:Permission:MaintainPlatformShell',\n MaintainLandingPages: 'ApplicationsPlatform:Permission:MaintainLandingPages',\n MaintainIdentifiers: 'ApplicationsPlatform:Permission:MaintainIdentifiers',\n MaintainTenantSettings: 'ApplicationsPlatform:Permission:MaintainTenantSettings',\n MaintainPlatformSettings: 'ApplicationsPlatform:Permission:MaintainPlatformSettings',\n MaintainLocales: 'ApplicationsPlatform:Permission:MaintainLocales',\n UseDevTools: 'ApplicationsPlatform:Permission:UseDevTools',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n AppBuilder: {\n Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n LandingPage: {\n Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n View: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Edit: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Delete: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Create: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n },\n LandingPageCategory: {\n Management: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n View: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Edit: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Delete: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n Create: AXPApplicationsPlatformPermissionKeys.MaintainLandingPages,\n },\n },\n} as const;\n","const config = {\n i18n: 'app-builder',\n module: 'AppBuilder',\n} as const;\n\nexport const RootConfig = {\n config,\n module: {\n module: 'app-builder',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-browser',\n },\n entities: {\n landingPage: {\n name: 'LandingPage',\n source: `${config.module}.LandingPage`,\n title: `@${config.i18n}:pages.entities.landing-page.title`,\n titlePlural: `@${config.i18n}:pages.entities.landing-page.plural`,\n icon: 'fa-light fa-file-lines',\n },\n landingPageCategory: {\n name: 'LandingPageCategory',\n source: `${config.module}.LandingPageCategory`,\n title: `@${config.i18n}:categories.entities.landing-page-category.title`,\n titlePlural: `@${config.i18n}:categories.entities.landing-page-category.plural`,\n icon: 'fa-light fa-folder-tree',\n },\n },\n} as const;\n","import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\nexport const AXMLandingPageStatuses = {\n Draft: { id: 'draft', title: 'Draft' },\n Published: { id: 'published', title: 'Published' },\n} as const;\n\nexport type AXMLandingPageStatusId =\n (typeof AXMLandingPageStatuses)[keyof typeof AXMLandingPageStatuses]['id'];\n\nexport interface AXMLandingPageEntityModel extends AXPEntityModel<string> {\n title?: string;\n slug?: string;\n status?: AXMLandingPageStatusId;\n content?: string | null;\n isHome?: boolean;\n categoryId?: string | null;\n category?: { id: string; title?: string; slug?: string } | null;\n description?: string | null;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AACO,MAAM,wCAAwC,GAAG;;ACDjD,MAAM,qBAAqB,GAAG;AACnC,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,YAAY,EAAE,gCAAgC;AAC9C,IAAA,qBAAqB,EAAE,0CAA0C;;;ACHnE;;;AAGG;AACI,MAAM,qCAAqC,GAAG;AACnD,IAAA,MAAM,EAAE,wCAAwC;AAChD,IAAA,oBAAoB,EAAE,sDAAsD;AAC5E,IAAA,eAAe,EAAE,iDAAiD;AAClE,IAAA,qBAAqB,EAAE,uDAAuD;AAC9E,IAAA,oBAAoB,EAAE,sDAAsD;AAC5E,IAAA,mBAAmB,EAAE,qDAAqD;AAC1E,IAAA,sBAAsB,EAAE,wDAAwD;AAChF,IAAA,wBAAwB,EAAE,0DAA0D;AACpF,IAAA,eAAe,EAAE,iDAAiD;AAClE,IAAA,WAAW,EAAE,6CAA6C;;AAG5D;;;AAGG;AACI,MAAM,kBAAkB,GAAG;AAChC,IAAA,UAAU,EAAE;QACV,UAAU,EAAE,qCAAqC,CAAC,oBAAoB;AACtE,QAAA,WAAW,EAAE;YACX,UAAU,EAAE,qCAAqC,CAAC,oBAAoB;YACtE,IAAI,EAAE,qCAAqC,CAAC,oBAAoB;YAChE,IAAI,EAAE,qCAAqC,CAAC,oBAAoB;YAChE,MAAM,EAAE,qCAAqC,CAAC,oBAAoB;YAClE,MAAM,EAAE,qCAAqC,CAAC,oBAAoB;AACnE,SAAA;AACD,QAAA,mBAAmB,EAAE;YACnB,UAAU,EAAE,qCAAqC,CAAC,oB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ACF,KAAA;;;AC1BI,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACtC,SAAS,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;;;ACJpD;;AAEG;;;;"}
@@ -0,0 +1,540 @@
1
+ import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';
2
+ import { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';
3
+ import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
4
+ import { AXP_PAGE_COMPONENT_PROVIDER } from '@acorex-platform/framework-client/layout/components';
5
+ import * as i1 from '@acorex-platform/framework-client/layout/widget-core';
6
+ import { AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';
7
+ import { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';
8
+ import * as i0 from '@angular/core';
9
+ import { inject, Injectable, NgModule, input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, signal } from '@angular/core';
10
+ import { ROUTES, ActivatedRoute, RouterLink } from '@angular/router';
11
+ import { RootConfig, AXMAppBuilderMenuKeys, AXPApplicationsPlatformPermissionKeys, AXMLandingPageStatuses, LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY } from '@acorex-platform/module-app-builder-client/contracts';
12
+ import { AXPCommonMenuKeys, AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';
13
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
14
+ import { AXPDesignerConnector, AXPLayoutDesignerComponent } from '@acorex-platform/framework-client/layout/designer';
15
+ import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
16
+ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
17
+ import { CommonModule } from '@angular/common';
18
+
19
+ const AppBuilderManifest = {
20
+ name: RootConfig.module.name,
21
+ version: '1.0.0',
22
+ title: RootConfig.module.title,
23
+ icon: RootConfig.module.icon,
24
+ i18n: RootConfig.config.i18n,
25
+ type: 'platform',
26
+ domain: 'platform',
27
+ };
28
+
29
+ class AXMMenuProvider {
30
+ constructor() {
31
+ this.entityService = inject(AXPEntityService);
32
+ }
33
+ async provide(context) {
34
+ const module = RootConfig.module;
35
+ const contentMenu = context.find(AXPCommonMenuKeys.Content);
36
+ if (!contentMenu.exists) {
37
+ context.find(AXPCommonMenuKeys.Administration).addItems([
38
+ {
39
+ name: AXPCommonMenuKeys.Content,
40
+ priority: 10,
41
+ text: '@general:menus.content.title',
42
+ icon: 'fa-light fa-paint-brush',
43
+ type: 'menu',
44
+ children: [],
45
+ },
46
+ ]);
47
+ }
48
+ context.find(AXPCommonMenuKeys.Content).addItems([
49
+ {
50
+ name: AXMAppBuilderMenuKeys.LandingPages,
51
+ text: RootConfig.entities.landingPage.titlePlural,
52
+ path: this.entityService.createPath(module.name, RootConfig.entities.landingPage.name),
53
+ icon: RootConfig.entities.landingPage.icon,
54
+ priority: 20,
55
+ policy: {
56
+ features: [module.name],
57
+ },
58
+ },
59
+ {
60
+ name: AXMAppBuilderMenuKeys.LandingPageCategories,
61
+ text: RootConfig.entities.landingPageCategory.titlePlural,
62
+ path: this.entityService.createPath(module.name, RootConfig.entities.landingPageCategory.name),
63
+ icon: RootConfig.entities.landingPageCategory.icon,
64
+ priority: 21,
65
+ policy: {
66
+ features: [module.name],
67
+ },
68
+ },
69
+ ]);
70
+ }
71
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMenuProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
72
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMenuProvider }); }
73
+ }
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMenuProvider, decorators: [{
75
+ type: Injectable
76
+ }] });
77
+
78
+ //#endregion
79
+ //#region ---- Permission Definition Provider ----
80
+ /**
81
+ * Registers MaintainLandingPages under Applications & Platform.
82
+ */
83
+ class AXMPermissionDefinitionProvider {
84
+ async define(context) {
85
+ const keys = AXPApplicationsPlatformPermissionKeys;
86
+ const groups = AXPCommonPermissionGroupKeys;
87
+ const P = '@common:applications-platform.permissions';
88
+ const G = '@common:permission-groups';
89
+ context.addGroup(groups.ApplicationsPlatform.Root, `${G}.applications-platform.title`, `${G}.applications-platform.description`, { order: 110 });
90
+ context
91
+ .addGroup(groups.ApplicationsPlatform.Applications, `${G}.applications-platform-applications.title`, `${G}.applications-platform-applications.description`, { parent: groups.ApplicationsPlatform.Root, order: 10 })
92
+ .addPermission(keys.MaintainLandingPages, `${P}.maintain-landing-pages.title`, `${P}.maintain-landing-pages.description`, { modules: ['AppBuilder'], requiredFeatures: ['AppBuilder'] })
93
+ .endPermission()
94
+ .endGroup();
95
+ }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
97
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider }); }
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider, decorators: [{
100
+ type: Injectable
101
+ }] });
102
+
103
+ function routesFactory() {
104
+ return [
105
+ {
106
+ path: 'landing',
107
+ children: [
108
+ {
109
+ path: '',
110
+ loadComponent: () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMLandingViewerPage),
111
+ },
112
+ {
113
+ path: ':slug',
114
+ loadComponent: () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMLandingViewerPage),
115
+ },
116
+ {
117
+ path: ':categorySlug/:slug',
118
+ loadComponent: () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMLandingViewerPage),
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ path: 'app-builder',
124
+ children: [
125
+ {
126
+ path: 'designer',
127
+ loadComponent: () => Promise.resolve().then(function () { return index$1; }).then((m) => m.AXMLandingPageDesignerRoutePage),
128
+ },
129
+ ],
130
+ },
131
+ ];
132
+ }
133
+ class AXMAppBuilderModule {
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMAppBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
135
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMAppBuilderModule, imports: [AXPWidgetsModule, AXPWidgetCoreModule] }); }
136
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMAppBuilderModule, providers: [
137
+ {
138
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
139
+ useValue: AppBuilderManifest,
140
+ multi: true,
141
+ },
142
+ {
143
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
144
+ useClass: AXMPermissionDefinitionProvider,
145
+ multi: true,
146
+ },
147
+ {
148
+ provide: AXP_MENU_PROVIDER,
149
+ useClass: AXMMenuProvider,
150
+ multi: true,
151
+ },
152
+ {
153
+ provide: ROUTES,
154
+ multi: true,
155
+ useFactory: routesFactory,
156
+ },
157
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return index$1; }).then((m) => m.AXMLandingPageDesignerPageComponentProvider)),
158
+ ], imports: [AXPWidgetsModule, AXPWidgetCoreModule] }); }
159
+ }
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMAppBuilderModule, decorators: [{
161
+ type: NgModule,
162
+ args: [{
163
+ imports: [AXPWidgetsModule, AXPWidgetCoreModule],
164
+ providers: [
165
+ {
166
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
167
+ useValue: AppBuilderManifest,
168
+ multi: true,
169
+ },
170
+ {
171
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
172
+ useClass: AXMPermissionDefinitionProvider,
173
+ multi: true,
174
+ },
175
+ {
176
+ provide: AXP_MENU_PROVIDER,
177
+ useClass: AXMMenuProvider,
178
+ multi: true,
179
+ },
180
+ {
181
+ provide: ROUTES,
182
+ multi: true,
183
+ useFactory: routesFactory,
184
+ },
185
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return index$1; }).then((m) => m.AXMLandingPageDesignerPageComponentProvider)),
186
+ ],
187
+ }]
188
+ }] });
189
+
190
+ class AXMLandingPageDesignerConnector extends AXPDesignerConnector {
191
+ constructor() {
192
+ super(...arguments);
193
+ this.commandService = inject(AXPCommandService);
194
+ this.entityService = inject(AXPEntityService);
195
+ this.pageEntity = this.entityService
196
+ .withEntity(RootConfig.module.name, RootConfig.entities.landingPage.name)
197
+ .data();
198
+ }
199
+ async save(id, content) {
200
+ const item = await this.pageEntity.byKey(id);
201
+ if (!item) {
202
+ throw new Error('Invalid landing page id');
203
+ }
204
+ await this.pageEntity.update(id, { content: content.json });
205
+ return true;
206
+ }
207
+ async saveAs(content) {
208
+ const entityKey = `${RootConfig.module.name}.${RootConfig.entities.landingPage.name}`;
209
+ const slug = `page-${Date.now().toString(36)}`;
210
+ const result = await this.commandService.execute('Entity:Create', {
211
+ entity: entityKey,
212
+ entityInfo: {
213
+ name: RootConfig.entities.landingPage.name,
214
+ module: RootConfig.module.name,
215
+ title: RootConfig.entities.landingPage.title,
216
+ },
217
+ data: {
218
+ title: slug,
219
+ slug,
220
+ status: AXMLandingPageStatuses.Draft.id,
221
+ content: content.json,
222
+ isHome: false,
223
+ },
224
+ options: {
225
+ process: {
226
+ redirect: false,
227
+ },
228
+ },
229
+ });
230
+ return !!result?.success;
231
+ }
232
+ async load(id) {
233
+ const item = await this.pageEntity.byKey(id);
234
+ if (!item) {
235
+ throw new Error('Invalid landing page id');
236
+ }
237
+ return item.content ?? null;
238
+ }
239
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerConnector, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
240
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerConnector }); }
241
+ }
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerConnector, decorators: [{
243
+ type: Injectable
244
+ }] });
245
+
246
+ class AXMLandingPageDesignerPageComponent {
247
+ constructor() {
248
+ this.rootContext = input(/* @ts-ignore */
249
+ ...(ngDevMode ? [undefined, { debugName: "rootContext" }] : /* istanbul ignore next */ []));
250
+ this.pageConfig = input(/* @ts-ignore */
251
+ ...(ngDevMode ? [undefined, { debugName: "pageConfig" }] : /* istanbul ignore next */ []));
252
+ this.pageId = computed(() => {
253
+ const id = this.rootContext()?.['id'];
254
+ return id != null && String(id).length > 0 ? String(id) : null;
255
+ }, /* @ts-ignore */
256
+ ...(ngDevMode ? [{ debugName: "pageId" }] : /* istanbul ignore next */ []));
257
+ }
258
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMLandingPageDesignerPageComponent, isStandalone: true, selector: "axm-landing-page-designer-page", inputs: { rootContext: { classPropertyName: "rootContext", publicName: "rootContext", isSignal: true, isRequired: false, transformFunction: null }, pageConfig: { classPropertyName: "pageConfig", publicName: "pageConfig", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }], ngImport: i0, template: `
260
+ @if (pageId()) {
261
+ <axp-layout-designer [id]="pageId()" [strategy]="'Connector'" />
262
+ }
263
+ `, isInline: true, styles: [":host{display:block;height:100%;min-height:70vh}:host axp-layout-designer{display:block;height:100%;min-height:70vh}\n"], dependencies: [{ kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id", "strategy"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "ngmodule", type: AXPWidgetsModule }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None }); }
264
+ }
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerPageComponent, decorators: [{
266
+ type: Component,
267
+ args: [{ selector: 'axm-landing-page-designer-page', template: `
268
+ @if (pageId()) {
269
+ <axp-layout-designer [id]="pageId()" [strategy]="'Connector'" />
270
+ }
271
+ `, encapsulation: ViewEncapsulation.None, imports: [AXPLayoutDesignerComponent, AXPWidgetCoreModule, AXPWidgetsModule], changeDetection: ChangeDetectionStrategy.Eager, providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }], styles: [":host{display:block;height:100%;min-height:70vh}:host axp-layout-designer{display:block;height:100%;min-height:70vh}\n"] }]
272
+ }], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
273
+
274
+ var landingPageDesignerPage_component = /*#__PURE__*/Object.freeze({
275
+ __proto__: null,
276
+ AXMLandingPageDesignerPageComponent: AXMLandingPageDesignerPageComponent
277
+ });
278
+
279
+ class AXMLandingPageDesignerPageComponentProvider {
280
+ async components() {
281
+ return [
282
+ {
283
+ key: LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY,
284
+ loader: () => Promise.resolve().then(function () { return landingPageDesignerPage_component; }).then((m) => m.AXMLandingPageDesignerPageComponent),
285
+ },
286
+ ];
287
+ }
288
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerPageComponentProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
289
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerPageComponentProvider }); }
290
+ }
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerPageComponentProvider, decorators: [{
292
+ type: Injectable
293
+ }] });
294
+
295
+ class AXMLandingPageDesignerRoutePage {
296
+ constructor() {
297
+ this.route = inject(ActivatedRoute);
298
+ this.pageId = signal(this.route.snapshot.queryParams['id'] ?? null, /* @ts-ignore */
299
+ ...(ngDevMode ? [{ debugName: "pageId" }] : /* istanbul ignore next */ []));
300
+ this.strategy = signal(this.route.snapshot.queryParams['strategy'] ?? 'Connector', /* @ts-ignore */
301
+ ...(ngDevMode ? [{ debugName: "strategy" }] : /* istanbul ignore next */ []));
302
+ }
303
+ ngAfterViewInit() {
304
+ document.querySelector('html')?.classList.remove('ax-dark');
305
+ }
306
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerRoutePage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXMLandingPageDesignerRoutePage, isStandalone: true, selector: "ng-component", providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }], ngImport: i0, template: `<axp-layout-designer [id]="pageId()" [strategy]="strategy()" />`, isInline: true, dependencies: [{ kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id", "strategy"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "ngmodule", type: AXPWidgetsModule }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
308
+ }
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageDesignerRoutePage, decorators: [{
310
+ type: Component,
311
+ args: [{
312
+ template: `<axp-layout-designer [id]="pageId()" [strategy]="strategy()" />`,
313
+ imports: [AXPLayoutDesignerComponent, AXPWidgetCoreModule, AXPWidgetsModule],
314
+ changeDetection: ChangeDetectionStrategy.Eager,
315
+ providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }],
316
+ }]
317
+ }] });
318
+
319
+ var index$1 = /*#__PURE__*/Object.freeze({
320
+ __proto__: null,
321
+ AXMLandingPageDesignerConnector: AXMLandingPageDesignerConnector,
322
+ AXMLandingPageDesignerPageComponent: AXMLandingPageDesignerPageComponent,
323
+ AXMLandingPageDesignerPageComponentProvider: AXMLandingPageDesignerPageComponentProvider,
324
+ AXMLandingPageDesignerRoutePage: AXMLandingPageDesignerRoutePage
325
+ });
326
+
327
+ class AXMLandingPageResolveService {
328
+ constructor() {
329
+ this.pageEntity = inject(AXPEntityService)
330
+ .withEntity(RootConfig.module.name, RootConfig.entities.landingPage.name)
331
+ .data();
332
+ }
333
+ async bySlug(slug) {
334
+ const result = await this.pageEntity.query({
335
+ skip: 0,
336
+ take: 1,
337
+ filter: {
338
+ logic: 'and',
339
+ filters: [
340
+ { field: 'slug', operator: { type: 'equal' }, value: slug },
341
+ { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },
342
+ ],
343
+ },
344
+ });
345
+ return result?.items?.[0] ?? null;
346
+ }
347
+ async byCategoryAndSlug(categorySlug, pageSlug) {
348
+ const result = await this.pageEntity.query({
349
+ skip: 0,
350
+ take: 1,
351
+ filter: {
352
+ logic: 'and',
353
+ filters: [
354
+ { field: 'slug', operator: { type: 'equal' }, value: pageSlug },
355
+ { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },
356
+ { field: 'category.slug', operator: { type: 'equal' }, value: categorySlug },
357
+ ],
358
+ },
359
+ });
360
+ return result?.items?.[0] ?? null;
361
+ }
362
+ async homePage() {
363
+ const result = await this.pageEntity.query({
364
+ skip: 0,
365
+ take: 1,
366
+ filter: {
367
+ logic: 'and',
368
+ filters: [
369
+ { field: 'isHome', operator: { type: 'equal' }, value: true },
370
+ { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },
371
+ ],
372
+ },
373
+ });
374
+ return result?.items?.[0] ?? null;
375
+ }
376
+ async listPublished() {
377
+ const result = await this.pageEntity.query({
378
+ skip: 0,
379
+ take: 100,
380
+ filter: {
381
+ logic: 'and',
382
+ filters: [{ field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id }],
383
+ },
384
+ sort: [{ name: 'title', dir: 'asc' }],
385
+ });
386
+ return result?.items ?? [];
387
+ }
388
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageResolveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
389
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageResolveService, providedIn: 'root' }); }
390
+ }
391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingPageResolveService, decorators: [{
392
+ type: Injectable,
393
+ args: [{ providedIn: 'root' }]
394
+ }] });
395
+
396
+ class AXMLandingViewerPage {
397
+ constructor() {
398
+ this.route = inject(ActivatedRoute);
399
+ this.resolveService = inject(AXMLandingPageResolveService);
400
+ this.loading = signal(true, /* @ts-ignore */
401
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
402
+ this.notFound = signal(false, /* @ts-ignore */
403
+ ...(ngDevMode ? [{ debugName: "notFound" }] : /* istanbul ignore next */ []));
404
+ this.indexMode = signal(false, /* @ts-ignore */
405
+ ...(ngDevMode ? [{ debugName: "indexMode" }] : /* istanbul ignore next */ []));
406
+ this.indexPages = signal([], /* @ts-ignore */
407
+ ...(ngDevMode ? [{ debugName: "indexPages" }] : /* istanbul ignore next */ []));
408
+ this.page = signal(null, /* @ts-ignore */
409
+ ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
410
+ this.document = signal({ type: AXPWidgetsCatalog.document }, /* @ts-ignore */
411
+ ...(ngDevMode ? [{ debugName: "document" }] : /* istanbul ignore next */ []));
412
+ this.currentPage = computed(() => {
413
+ return (this.document().children?.[0] ?? { type: AXPWidgetsCatalog.pageLayout });
414
+ }, /* @ts-ignore */
415
+ ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
416
+ }
417
+ async ngOnInit() {
418
+ document.querySelector('html')?.classList.remove('ax-dark');
419
+ const categorySlug = this.route.snapshot.paramMap.get('categorySlug');
420
+ const slug = this.route.snapshot.paramMap.get('slug');
421
+ try {
422
+ if (!slug && !categorySlug) {
423
+ const home = await this.resolveService.homePage();
424
+ if (home) {
425
+ this.applyPage(home);
426
+ return;
427
+ }
428
+ const pages = await this.resolveService.listPublished();
429
+ this.indexPages.set(pages);
430
+ this.indexMode.set(true);
431
+ return;
432
+ }
433
+ let resolved = null;
434
+ if (categorySlug && slug) {
435
+ resolved = await this.resolveService.byCategoryAndSlug(categorySlug, slug);
436
+ }
437
+ else if (slug) {
438
+ resolved = await this.resolveService.bySlug(slug);
439
+ }
440
+ if (!resolved) {
441
+ this.notFound.set(true);
442
+ return;
443
+ }
444
+ this.applyPage(resolved);
445
+ }
446
+ catch {
447
+ this.notFound.set(true);
448
+ }
449
+ finally {
450
+ this.loading.set(false);
451
+ }
452
+ }
453
+ pageLink(page) {
454
+ if (page.category?.slug) {
455
+ return ['/landing', page.category.slug, page.slug];
456
+ }
457
+ return ['/landing', page.slug];
458
+ }
459
+ applyPage(page) {
460
+ this.page.set(page);
461
+ if (page.content) {
462
+ try {
463
+ const parsed = JSON.parse(page.content);
464
+ this.document.set(parsed);
465
+ }
466
+ catch {
467
+ this.document.set({ type: AXPWidgetsCatalog.document });
468
+ }
469
+ }
470
+ }
471
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingViewerPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
472
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMLandingViewerPage, isStandalone: true, selector: "axm-landing-viewer-page", ngImport: i0, template: `
473
+ @if (loading()) {
474
+ <div class="axm-landing-viewer__state">Loading…</div>
475
+ } @else if (notFound()) {
476
+ <div class="axm-landing-viewer__state">
477
+ <h1>Page not found</h1>
478
+ <p>This landing page is unavailable or not published.</p>
479
+ <a routerLink="/landing">Back to landing</a>
480
+ </div>
481
+ } @else if (indexMode()) {
482
+ <div class="axm-landing-viewer__index">
483
+ <h1>Landing pages</h1>
484
+ <ul>
485
+ @for (page of indexPages(); track page.id) {
486
+ <li>
487
+ <a [routerLink]="pageLink(page)">{{ page.title }}</a>
488
+ </li>
489
+ }
490
+ </ul>
491
+ </div>
492
+ } @else {
493
+ <axp-widgets-container>
494
+ <ng-container axp-widget-renderer [node]="currentPage()" [mode]="'view'"></ng-container>
495
+ </axp-widgets-container>
496
+ }
497
+ `, isInline: true, styles: [":host{display:block;min-height:100vh}.axm-landing-viewer__state,.axm-landing-viewer__index{max-width:48rem;margin:3rem auto;padding:1.5rem;font-family:system-ui,sans-serif}.axm-landing-viewer__index ul{list-style:none;padding:0}.axm-landing-viewer__index li{margin:.75rem 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
498
+ }
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMLandingViewerPage, decorators: [{
500
+ type: Component,
501
+ args: [{ selector: 'axm-landing-viewer-page', imports: [CommonModule, AXPWidgetCoreModule, RouterLink], template: `
502
+ @if (loading()) {
503
+ <div class="axm-landing-viewer__state">Loading…</div>
504
+ } @else if (notFound()) {
505
+ <div class="axm-landing-viewer__state">
506
+ <h1>Page not found</h1>
507
+ <p>This landing page is unavailable or not published.</p>
508
+ <a routerLink="/landing">Back to landing</a>
509
+ </div>
510
+ } @else if (indexMode()) {
511
+ <div class="axm-landing-viewer__index">
512
+ <h1>Landing pages</h1>
513
+ <ul>
514
+ @for (page of indexPages(); track page.id) {
515
+ <li>
516
+ <a [routerLink]="pageLink(page)">{{ page.title }}</a>
517
+ </li>
518
+ }
519
+ </ul>
520
+ </div>
521
+ } @else {
522
+ <axp-widgets-container>
523
+ <ng-container axp-widget-renderer [node]="currentPage()" [mode]="'view'"></ng-container>
524
+ </axp-widgets-container>
525
+ }
526
+ `, changeDetection: ChangeDetectionStrategy.Eager, styles: [":host{display:block;min-height:100vh}.axm-landing-viewer__state,.axm-landing-viewer__index{max-width:48rem;margin:3rem auto;padding:1.5rem;font-family:system-ui,sans-serif}.axm-landing-viewer__index ul{list-style:none;padding:0}.axm-landing-viewer__index li{margin:.75rem 0}\n"] }]
527
+ }] });
528
+
529
+ var index = /*#__PURE__*/Object.freeze({
530
+ __proto__: null,
531
+ AXMLandingPageResolveService: AXMLandingPageResolveService,
532
+ AXMLandingViewerPage: AXMLandingViewerPage
533
+ });
534
+
535
+ /**
536
+ * Generated bundle index. Do not edit.
537
+ */
538
+
539
+ export { AXMAppBuilderModule, AXMLandingPageDesignerConnector, AXMLandingPageDesignerPageComponent, AXMLandingPageDesignerPageComponentProvider, AXMLandingPageDesignerRoutePage, AXMLandingPageResolveService, AXMLandingViewerPage, AXMMenuProvider, AXMPermissionDefinitionProvider, AppBuilderManifest };
540
+ //# sourceMappingURL=acorex-platform-module-app-builder-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-app-builder-client.mjs","sources":["../../../../libs/modules/app-builder/client/src/lib/manifest.ts","../../../../libs/modules/app-builder/client/src/lib/menu.provider.ts","../../../../libs/modules/app-builder/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/app-builder/client/src/lib/app-builder.module.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-page-designer/landing-page-designer-connector.service.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-page-designer/landing-page-designer-page.component.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-page-designer/landing-page-designer-page-component.provider.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-page-designer/landing-page-designer-route.page.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-viewer/landing-page-resolve.service.ts","../../../../libs/modules/app-builder/client/src/lib/features/landing-viewer/landing-viewer.page.ts","../../../../libs/modules/app-builder/client/src/acorex-platform-module-app-builder-client.ts"],"sourcesContent":["import { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-app-builder-client/contracts';\n\nexport const AppBuilderManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n};\n","import { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AXMAppBuilderMenuKeys,\n RootConfig,\n} from '@acorex-platform/module-app-builder-client/contracts';\n\n@Injectable()\nexport class AXMMenuProvider implements AXPMenuProvider {\n private entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n\n const contentMenu = context.find(AXPCommonMenuKeys.Content);\n if (!contentMenu.exists) {\n context.find(AXPCommonMenuKeys.Administration).addItems([\n {\n name: AXPCommonMenuKeys.Content,\n priority: 10,\n text: '@general:menus.content.title',\n icon: 'fa-light fa-paint-brush',\n type: 'menu',\n children: [],\n },\n ]);\n }\n\n context.find(AXPCommonMenuKeys.Content).addItems([\n {\n name: AXMAppBuilderMenuKeys.LandingPages,\n text: RootConfig.entities.landingPage.titlePlural,\n path: this.entityService.createPath(module.name, RootConfig.entities.landingPage.name),\n icon: RootConfig.entities.landingPage.icon,\n priority: 20,\n policy: {\n features: [module.name],\n },\n },\n {\n name: AXMAppBuilderMenuKeys.LandingPageCategories,\n text: RootConfig.entities.landingPageCategory.titlePlural,\n path: this.entityService.createPath(module.name, RootConfig.entities.landingPageCategory.name),\n icon: RootConfig.entities.landingPageCategory.icon,\n priority: 21,\n policy: {\n features: [module.name],\n },\n },\n ]);\n }\n}\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPApplicationsPlatformPermissionKeys\n} from '@acorex-platform/module-app-builder-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers MaintainLandingPages under Applications & Platform.\n */\n@Injectable()\nexport class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPApplicationsPlatformPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:applications-platform.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.ApplicationsPlatform.Root, `${G}.applications-platform.title`, `${G}.applications-platform.description`, { order: 110 });\n\n context\n .addGroup(\n groups.ApplicationsPlatform.Applications,\n `${G}.applications-platform-applications.title`,\n `${G}.applications-platform-applications.description`,\n { parent: groups.ApplicationsPlatform.Root, order: 10 },\n )\n .addPermission(\n keys.MaintainLandingPages,\n `${P}.maintain-landing-pages.title`,\n `${P}.maintain-landing-pages.description`,\n { modules: ['AppBuilder'], requiredFeatures: ['AppBuilder'] },\n )\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { AXP_PAGE_COMPONENT_PROVIDER } from '@acorex-platform/framework-client/layout/components';\nimport { AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';\nimport { NgModule } from '@angular/core';\nimport { ROUTES, Routes } from '@angular/router';\nimport { AppBuilderManifest } from './manifest';\n\nimport { AXMMenuProvider } from './menu.provider';\nimport { AXMPermissionDefinitionProvider } from './permission-definition.provider';\n\nfunction routesFactory(): Routes {\n return [\n {\n path: 'landing',\n children: [\n {\n path: '',\n loadComponent: () =>\n import('./features/landing-viewer').then((m) => m.AXMLandingViewerPage),\n },\n {\n path: ':slug',\n loadComponent: () =>\n import('./features/landing-viewer').then((m) => m.AXMLandingViewerPage),\n },\n {\n path: ':categorySlug/:slug',\n loadComponent: () =>\n import('./features/landing-viewer').then((m) => m.AXMLandingViewerPage),\n },\n ],\n },\n {\n path: 'app-builder',\n children: [\n {\n path: 'designer',\n loadComponent: () =>\n import('./features/landing-page-designer').then((m) => m.AXMLandingPageDesignerRoutePage),\n },\n ],\n },\n ];\n}\n\n@NgModule({\n imports: [AXPWidgetsModule, AXPWidgetCoreModule],\n providers: [\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: AppBuilderManifest,\n multi: true,\n },\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMPermissionDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMMenuProvider,\n multi: true,\n },\n \n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFactory,\n },\n provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () =>\n import('./features/landing-page-designer').then(\n (m) => m.AXMLandingPageDesignerPageComponentProvider,\n ),\n ),\n ],\n})\nexport class AXMAppBuilderModule {}\n","import {\n AXPDesignerConnector,\n AXPDesignerContent,\n} from '@acorex-platform/framework-client/layout/designer';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-app-builder-client/contracts';\nimport { AXMLandingPageStatuses } from '@acorex-platform/module-app-builder-client/contracts';\n\n@Injectable()\nexport class AXMLandingPageDesignerConnector extends AXPDesignerConnector {\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly pageEntity = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.landingPage.name)\n .data<any, any>();\n\n public override async save(id: string, content: AXPDesignerContent): Promise<boolean> {\n const item = await this.pageEntity.byKey(id);\n if (!item) {\n throw new Error('Invalid landing page id');\n }\n await this.pageEntity.update(id, { content: content.json });\n return true;\n }\n\n public override async saveAs(content: AXPDesignerContent): Promise<boolean> {\n const entityKey = `${RootConfig.module.name}.${RootConfig.entities.landingPage.name}`;\n const slug = `page-${Date.now().toString(36)}`;\n const result = await this.commandService.execute('Entity:Create', {\n entity: entityKey,\n entityInfo: {\n name: RootConfig.entities.landingPage.name,\n module: RootConfig.module.name,\n title: RootConfig.entities.landingPage.title,\n },\n data: {\n title: slug,\n slug,\n status: AXMLandingPageStatuses.Draft.id,\n content: content.json,\n isHome: false,\n },\n options: {\n process: {\n redirect: false,\n },\n },\n \n });\n return !!result?.success;\n }\n\n public override async load(id: string): Promise<string | null> {\n const item = await this.pageEntity.byKey(id);\n if (!item) {\n throw new Error('Invalid landing page id');\n }\n return item.content ?? null;\n }\n}\n","import { AXPDesignerConnector, AXPLayoutDesignerComponent } from '@acorex-platform/framework-client/layout/designer';\nimport { AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';\nimport { Component, computed, input, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\nimport { AXMLandingPageDesignerConnector } from './landing-page-designer-connector.service';\n\n@Component({\n selector: 'axm-landing-page-designer-page',\n template: `\n @if (pageId()) {\n <axp-layout-designer [id]=\"pageId()\" [strategy]=\"'Connector'\" />\n }\n `,\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n min-height: 70vh;\n }\n :host axp-layout-designer {\n display: block;\n height: 100%;\n min-height: 70vh;\n }\n `,\n ],\n imports: [AXPLayoutDesignerComponent, AXPWidgetCoreModule, AXPWidgetsModule],\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }],\n})\nexport class AXMLandingPageDesignerPageComponent {\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n protected pageId = computed(() => {\n const id = this.rootContext()?.['id'];\n return id != null && String(id).length > 0 ? String(id) : null;\n });\n}\n","import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY } from '@acorex-platform/module-app-builder-client/contracts';\n\n@Injectable()\nexport class AXMLandingPageDesignerPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./landing-page-designer-page.component').then((m) => m.AXMLandingPageDesignerPageComponent),\n },\n ];\n }\n}\n","import { AXPDesignerConnector, AXPLayoutDesignerComponent } from '@acorex-platform/framework-client/layout/designer';\nimport { AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';\nimport { Component, inject, signal, ChangeDetectionStrategy } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { AXMLandingPageDesignerConnector } from './landing-page-designer-connector.service';\n\n@Component({\n template: `<axp-layout-designer [id]=\"pageId()\" [strategy]=\"strategy()\" />`,\n imports: [AXPLayoutDesignerComponent, AXPWidgetCoreModule, AXPWidgetsModule],\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [{ provide: AXPDesignerConnector, useClass: AXMLandingPageDesignerConnector }],\n})\nexport class AXMLandingPageDesignerRoutePage {\n private readonly route = inject(ActivatedRoute);\n protected pageId = signal<string | null>(this.route.snapshot.queryParams['id'] ?? null);\n protected strategy = signal<string | null>(this.route.snapshot.queryParams['strategy'] ?? 'Connector');\n\n ngAfterViewInit(): void {\n document.querySelector('html')?.classList.remove('ax-dark');\n }\n}\n","import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject, Injectable } from '@angular/core';\nimport {\n AXMLandingPageEntityModel,\n AXMLandingPageStatuses,\n RootConfig,\n} from '@acorex-platform/module-app-builder-client/contracts';\n\n@Injectable({ providedIn: 'root' })\nexport class AXMLandingPageResolveService {\n private readonly pageEntity = inject(AXPEntityService)\n .withEntity(RootConfig.module.name, RootConfig.entities.landingPage.name)\n .data<any, any>();\n\n async bySlug(slug: string): Promise<AXMLandingPageEntityModel | null> {\n const result = await this.pageEntity.query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: 'slug', operator: { type: 'equal' }, value: slug },\n { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },\n ],\n },\n } as any);\n return (result?.items?.[0] as AXMLandingPageEntityModel) ?? null;\n }\n\n async byCategoryAndSlug(\n categorySlug: string,\n pageSlug: string,\n ): Promise<AXMLandingPageEntityModel | null> {\n const result = await this.pageEntity.query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: 'slug', operator: { type: 'equal' }, value: pageSlug },\n { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },\n { field: 'category.slug', operator: { type: 'equal' }, value: categorySlug },\n ],\n },\n } as any);\n return (result?.items?.[0] as AXMLandingPageEntityModel) ?? null;\n }\n\n async homePage(): Promise<AXMLandingPageEntityModel | null> {\n const result = await this.pageEntity.query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: 'isHome', operator: { type: 'equal' }, value: true },\n { field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id },\n ],\n },\n } as any);\n return (result?.items?.[0] as AXMLandingPageEntityModel) ?? null;\n }\n\n async listPublished(): Promise<AXMLandingPageEntityModel[]> {\n const result = await this.pageEntity.query({\n skip: 0,\n take: 100,\n filter: {\n logic: 'and',\n filters: [{ field: 'status', operator: { type: 'equal' }, value: AXMLandingPageStatuses.Published.id }],\n },\n sort: [{ name: 'title', dir: 'asc' }],\n } as any);\n return (result?.items as AXMLandingPageEntityModel[]) ?? [];\n }\n}\n","import type { AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport { AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, inject, OnInit, signal, ChangeDetectionStrategy } from '@angular/core';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { AXMLandingPageEntityModel } from '@acorex-platform/module-app-builder-client/contracts';\nimport { AXMLandingPageResolveService } from './landing-page-resolve.service';\n\n@Component({\n selector: 'axm-landing-viewer-page',\n imports: [CommonModule, AXPWidgetCoreModule, RouterLink],\n template: `\n @if (loading()) {\n <div class=\"axm-landing-viewer__state\">Loading…</div>\n } @else if (notFound()) {\n <div class=\"axm-landing-viewer__state\">\n <h1>Page not found</h1>\n <p>This landing page is unavailable or not published.</p>\n <a routerLink=\"/landing\">Back to landing</a>\n </div>\n } @else if (indexMode()) {\n <div class=\"axm-landing-viewer__index\">\n <h1>Landing pages</h1>\n <ul>\n @for (page of indexPages(); track page.id) {\n <li>\n <a [routerLink]=\"pageLink(page)\">{{ page.title }}</a>\n </li>\n }\n </ul>\n </div>\n } @else {\n <axp-widgets-container>\n <ng-container axp-widget-renderer [node]=\"currentPage()\" [mode]=\"'view'\"></ng-container>\n </axp-widgets-container>\n }\n `,\n changeDetection: ChangeDetectionStrategy.Eager,\n styles: [\n `\n :host {\n display: block;\n min-height: 100vh;\n }\n .axm-landing-viewer__state,\n .axm-landing-viewer__index {\n max-width: 48rem;\n margin: 3rem auto;\n padding: 1.5rem;\n font-family: system-ui, sans-serif;\n }\n .axm-landing-viewer__index ul {\n list-style: none;\n padding: 0;\n }\n .axm-landing-viewer__index li {\n margin: 0.75rem 0;\n }\n `,\n ],\n})\nexport class AXMLandingViewerPage implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly resolveService = inject(AXMLandingPageResolveService);\n\n protected loading = signal(true);\n protected notFound = signal(false);\n protected indexMode = signal(false);\n protected indexPages = signal<AXMLandingPageEntityModel[]>([]);\n protected page = signal<AXMLandingPageEntityModel | null>(null);\n\n private readonly document = signal<AXPWidgetNode>({ type: AXPWidgetsCatalog.document } as AXPWidgetNode);\n\n protected readonly currentPage = computed(() => {\n return (\n this.document().children?.[0] ?? ({ type: AXPWidgetsCatalog.pageLayout } as AXPWidgetNode)\n );\n });\n\n async ngOnInit(): Promise<void> {\n document.querySelector('html')?.classList.remove('ax-dark');\n const categorySlug = this.route.snapshot.paramMap.get('categorySlug');\n const slug = this.route.snapshot.paramMap.get('slug');\n\n try {\n if (!slug && !categorySlug) {\n const home = await this.resolveService.homePage();\n if (home) {\n this.applyPage(home);\n return;\n }\n const pages = await this.resolveService.listPublished();\n this.indexPages.set(pages);\n this.indexMode.set(true);\n return;\n }\n\n let resolved: AXMLandingPageEntityModel | null = null;\n if (categorySlug && slug) {\n resolved = await this.resolveService.byCategoryAndSlug(categorySlug, slug);\n } else if (slug) {\n resolved = await this.resolveService.bySlug(slug);\n }\n\n if (!resolved) {\n this.notFound.set(true);\n return;\n }\n this.applyPage(resolved);\n } catch {\n this.notFound.set(true);\n } finally {\n this.loading.set(false);\n }\n }\n\n protected pageLink(page: AXMLandingPageEntityModel): string[] {\n if (page.category?.slug) {\n return ['/landing', page.category.slug, page.slug!];\n }\n return ['/landing', page.slug!];\n }\n\n private applyPage(page: AXMLandingPageEntityModel): void {\n this.page.set(page);\n if (page.content) {\n try {\n const parsed = JSON.parse(page.content) as AXPWidgetNode;\n this.document.set(parsed);\n } catch {\n this.document.set({ type: AXPWidgetsCatalog.document } as AXPWidgetNode);\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAM,kBAAkB,GAAsB;AACnD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CA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,uBAAuB,CAAC,KAAK,EAAA,MAAA,EAAA,CAAA,sRAAA,CAAA,EAAA;;;;;;;;;ACtChD;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/module-app-builder-client",
3
+ "version": "0.0.20",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-module-app-builder-client.mjs",
13
+ "typings": "types/acorex-platform-module-app-builder-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-module-app-builder-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-module-app-builder-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-module-app-builder-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-module-app-builder-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }
@@ -0,0 +1,114 @@
1
+ import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
2
+
3
+ /** Registry key for the landing page designer custom entity page. */
4
+ declare const LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY = "landing-page-designer-page";
5
+
6
+ declare const AXMAppBuilderMenuKeys: {
7
+ readonly Root: "app-builder:menu";
8
+ readonly LandingPages: "app-builder:menu:landing-pages";
9
+ readonly LandingPageCategories: "app-builder:menu:landing-page-categories";
10
+ };
11
+
12
+ /**
13
+ * Applications & Platform capabilities used by this module.
14
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
15
+ */
16
+ declare const AXPApplicationsPlatformPermissionKeys: {
17
+ readonly Access: "ApplicationsPlatform:Permission:Access";
18
+ readonly MaintainApplications: "ApplicationsPlatform:Permission:MaintainApplications";
19
+ readonly MaintainTenants: "ApplicationsPlatform:Permission:MaintainTenants";
20
+ readonly MaintainPlatformShell: "ApplicationsPlatform:Permission:MaintainPlatformShell";
21
+ readonly MaintainLandingPages: "ApplicationsPlatform:Permission:MaintainLandingPages";
22
+ readonly MaintainIdentifiers: "ApplicationsPlatform:Permission:MaintainIdentifiers";
23
+ readonly MaintainTenantSettings: "ApplicationsPlatform:Permission:MaintainTenantSettings";
24
+ readonly MaintainPlatformSettings: "ApplicationsPlatform:Permission:MaintainPlatformSettings";
25
+ readonly MaintainLocales: "ApplicationsPlatform:Permission:MaintainLocales";
26
+ readonly UseDevTools: "ApplicationsPlatform:Permission:UseDevTools";
27
+ };
28
+ /**
29
+ * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.
30
+ * Legacy nested shape kept so existing imports compile during migration.
31
+ */
32
+ declare const AXMPermissionsKeys: {
33
+ readonly AppBuilder: {
34
+ readonly Management: "ApplicationsPlatform:Permission:MaintainLandingPages";
35
+ readonly LandingPage: {
36
+ readonly Management: "ApplicationsPlatform:Permission:MaintainLandingPages";
37
+ readonly View: "ApplicationsPlatform:Permission:MaintainLandingPages";
38
+ readonly Edit: "ApplicationsPlatform:Permission:MaintainLandingPages";
39
+ readonly Delete: "ApplicationsPlatform:Permission:MaintainLandingPages";
40
+ readonly Create: "ApplicationsPlatform:Permission:MaintainLandingPages";
41
+ };
42
+ readonly LandingPageCategory: {
43
+ readonly Management: "ApplicationsPlatform:Permission:MaintainLandingPages";
44
+ readonly View: "ApplicationsPlatform:Permission:MaintainLandingPages";
45
+ readonly Edit: "ApplicationsPlatform:Permission:MaintainLandingPages";
46
+ readonly Delete: "ApplicationsPlatform:Permission:MaintainLandingPages";
47
+ readonly Create: "ApplicationsPlatform:Permission:MaintainLandingPages";
48
+ };
49
+ };
50
+ };
51
+
52
+ declare const RootConfig: {
53
+ readonly config: {
54
+ readonly i18n: "app-builder";
55
+ readonly module: "AppBuilder";
56
+ };
57
+ readonly module: {
58
+ readonly module: "app-builder";
59
+ readonly name: "AppBuilder";
60
+ readonly title: "@app-builder:module.title";
61
+ readonly icon: "fa-light fa-browser";
62
+ };
63
+ readonly entities: {
64
+ readonly landingPage: {
65
+ readonly name: "LandingPage";
66
+ readonly source: "AppBuilder.LandingPage";
67
+ readonly title: "@app-builder:pages.entities.landing-page.title";
68
+ readonly titlePlural: "@app-builder:pages.entities.landing-page.plural";
69
+ readonly icon: "fa-light fa-file-lines";
70
+ };
71
+ readonly landingPageCategory: {
72
+ readonly name: "LandingPageCategory";
73
+ readonly source: "AppBuilder.LandingPageCategory";
74
+ readonly title: "@app-builder:categories.entities.landing-page-category.title";
75
+ readonly titlePlural: "@app-builder:categories.entities.landing-page-category.plural";
76
+ readonly icon: "fa-light fa-folder-tree";
77
+ };
78
+ };
79
+ };
80
+
81
+ declare const AXMLandingPageStatuses: {
82
+ readonly Draft: {
83
+ readonly id: "draft";
84
+ readonly title: "Draft";
85
+ };
86
+ readonly Published: {
87
+ readonly id: "published";
88
+ readonly title: "Published";
89
+ };
90
+ };
91
+ type AXMLandingPageStatusId = (typeof AXMLandingPageStatuses)[keyof typeof AXMLandingPageStatuses]['id'];
92
+ interface AXMLandingPageEntityModel extends AXPEntityModel<string> {
93
+ title?: string;
94
+ slug?: string;
95
+ status?: AXMLandingPageStatusId;
96
+ content?: string | null;
97
+ isHome?: boolean;
98
+ categoryId?: string | null;
99
+ category?: {
100
+ id: string;
101
+ title?: string;
102
+ slug?: string;
103
+ } | null;
104
+ description?: string | null;
105
+ }
106
+
107
+ interface AXMLandingPageCategoryEntityModel extends AXPEntityModel<string> {
108
+ title?: string;
109
+ slug?: string;
110
+ description?: string | null;
111
+ }
112
+
113
+ export { AXMAppBuilderMenuKeys, AXMLandingPageStatuses, AXMPermissionsKeys, AXPApplicationsPlatformPermissionKeys, LANDING_PAGE_DESIGNER_PAGE_COMPONENT_KEY, RootConfig };
114
+ export type { AXMLandingPageCategoryEntityModel, AXMLandingPageEntityModel, AXMLandingPageStatusId };
@@ -0,0 +1,98 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit } from '@angular/core';
3
+ import * as i1 from '@acorex-platform/framework-client/layout/widgets';
4
+ import * as i2 from '@acorex-platform/framework-client/layout/widget-core';
5
+ import { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';
6
+ import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';
7
+ import { AXPModuleManifest } from '@acorex-platform/framework-client/core';
8
+ import { AXPDesignerConnector, AXPDesignerContent } from '@acorex-platform/framework-client/layout/designer';
9
+ import { AXPPageComponentProvider, AXPPageComponentDefinition } from '@acorex-platform/framework-client/layout/components';
10
+ import { AXMLandingPageEntityModel } from '@acorex-platform/module-app-builder-client/contracts';
11
+ import { AXPWidgetNode } from '@acorex-platform/framework-shared/core';
12
+
13
+ declare class AXMAppBuilderModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMAppBuilderModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXMAppBuilderModule, never, [typeof i1.AXPWidgetsModule, typeof i2.AXPWidgetCoreModule], never>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXMAppBuilderModule>;
17
+ }
18
+
19
+ declare class AXMMenuProvider implements AXPMenuProvider {
20
+ private entityService;
21
+ provide(context: AXPMenuProviderContext): Promise<void>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMMenuProvider, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMMenuProvider>;
24
+ }
25
+
26
+ /**
27
+ * Registers MaintainLandingPages under Applications & Platform.
28
+ */
29
+ declare class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
30
+ define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMPermissionDefinitionProvider, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMPermissionDefinitionProvider>;
33
+ }
34
+
35
+ declare const AppBuilderManifest: AXPModuleManifest;
36
+
37
+ declare class AXMLandingPageDesignerConnector extends AXPDesignerConnector {
38
+ private readonly commandService;
39
+ private readonly entityService;
40
+ private readonly pageEntity;
41
+ save(id: string, content: AXPDesignerContent): Promise<boolean>;
42
+ saveAs(content: AXPDesignerContent): Promise<boolean>;
43
+ load(id: string): Promise<string | null>;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingPageDesignerConnector, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMLandingPageDesignerConnector>;
46
+ }
47
+
48
+ declare class AXMLandingPageDesignerPageComponent {
49
+ rootContext: i0.InputSignal<Record<string, unknown> | undefined>;
50
+ pageConfig: i0.InputSignal<Record<string, unknown> | undefined>;
51
+ protected pageId: i0.Signal<string | null>;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingPageDesignerPageComponent, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXMLandingPageDesignerPageComponent, "axm-landing-page-designer-page", never, { "rootContext": { "alias": "rootContext"; "required": false; "isSignal": true; }; "pageConfig": { "alias": "pageConfig"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
54
+ }
55
+
56
+ declare class AXMLandingPageDesignerPageComponentProvider implements AXPPageComponentProvider {
57
+ components(): Promise<AXPPageComponentDefinition[]>;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingPageDesignerPageComponentProvider, never>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMLandingPageDesignerPageComponentProvider>;
60
+ }
61
+
62
+ declare class AXMLandingPageDesignerRoutePage {
63
+ private readonly route;
64
+ protected pageId: i0.WritableSignal<string | null>;
65
+ protected strategy: i0.WritableSignal<string | null>;
66
+ ngAfterViewInit(): void;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingPageDesignerRoutePage, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXMLandingPageDesignerRoutePage, "ng-component", never, {}, {}, never, never, true, never>;
69
+ }
70
+
71
+ declare class AXMLandingPageResolveService {
72
+ private readonly pageEntity;
73
+ bySlug(slug: string): Promise<AXMLandingPageEntityModel | null>;
74
+ byCategoryAndSlug(categorySlug: string, pageSlug: string): Promise<AXMLandingPageEntityModel | null>;
75
+ homePage(): Promise<AXMLandingPageEntityModel | null>;
76
+ listPublished(): Promise<AXMLandingPageEntityModel[]>;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingPageResolveService, never>;
78
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMLandingPageResolveService>;
79
+ }
80
+
81
+ declare class AXMLandingViewerPage implements OnInit {
82
+ private readonly route;
83
+ private readonly resolveService;
84
+ protected loading: i0.WritableSignal<boolean>;
85
+ protected notFound: i0.WritableSignal<boolean>;
86
+ protected indexMode: i0.WritableSignal<boolean>;
87
+ protected indexPages: i0.WritableSignal<AXMLandingPageEntityModel[]>;
88
+ protected page: i0.WritableSignal<AXMLandingPageEntityModel | null>;
89
+ private readonly document;
90
+ protected readonly currentPage: i0.Signal<AXPWidgetNode>;
91
+ ngOnInit(): Promise<void>;
92
+ protected pageLink(page: AXMLandingPageEntityModel): string[];
93
+ private applyPage;
94
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLandingViewerPage, never>;
95
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXMLandingViewerPage, "axm-landing-viewer-page", never, {}, {}, never, never, true, never>;
96
+ }
97
+
98
+ export { AXMAppBuilderModule, AXMLandingPageDesignerConnector, AXMLandingPageDesignerPageComponent, AXMLandingPageDesignerPageComponentProvider, AXMLandingPageDesignerRoutePage, AXMLandingPageResolveService, AXMLandingViewerPage, AXMMenuProvider, AXMPermissionDefinitionProvider, AppBuilderManifest };