@acorex/platform 20.6.0-next.10 → 20.6.0-next.11
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/common/index.d.ts +3 -0
- package/core/index.d.ts +102 -32
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +44 -22
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +49 -4
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +873 -140
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs → acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs} +37 -6
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +528 -118
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +7 -7
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2 -8
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +761 -336
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +79 -3
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs → acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +112 -11
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +3 -3
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +277 -38
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/components/index.d.ts +248 -11
- package/layout/entity/index.d.ts +57 -9
- package/layout/widget-core/index.d.ts +4 -5
- package/layout/widgets/index.d.ts +57 -23
- package/package.json +1 -1
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +25 -2
- package/workflow/index.d.ts +38 -37
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +0 -1
|
@@ -235,10 +235,10 @@ class AXPRootLayoutMenuComponent {
|
|
|
235
235
|
this.settingService = inject(AXPSettingService);
|
|
236
236
|
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : []));
|
|
237
237
|
// Debug: Track menu items changes
|
|
238
|
-
effect(() => {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
});
|
|
238
|
+
// effect(() => {
|
|
239
|
+
// const items = this.menuStore.items();
|
|
240
|
+
// console.log('🎯 Sidebar menu items updated:', items.map(i => ({ name: i.name, priority: i.priority })));
|
|
241
|
+
// });
|
|
242
242
|
}
|
|
243
243
|
async ngOnInit() {
|
|
244
244
|
this.badgeVisible.set(await this.settingService.scope(AXPPlatformScope.User).get(AXPThemeLayoutSetting.MenuBadgeVisible));
|
|
@@ -249,10 +249,11 @@ class AXPRootLayoutMenuComponent {
|
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
onMenuItemClick(item) {
|
|
253
|
-
if (
|
|
254
|
-
|
|
252
|
+
onMenuItemClick(item, hasRouterLink) {
|
|
253
|
+
if (hasRouterLink || item.children?.length) {
|
|
254
|
+
return;
|
|
255
255
|
}
|
|
256
|
+
this.menuStore.executeCommand(item);
|
|
256
257
|
}
|
|
257
258
|
sort(items) {
|
|
258
259
|
return sortBy(items, [(c) => c.priority ?? 0, (c) => c.text]);
|
|
@@ -260,8 +261,108 @@ class AXPRootLayoutMenuComponent {
|
|
|
260
261
|
getMenuBadge(item) {
|
|
261
262
|
return AXPMenuBadgeHelper.getTotalCount(item, this.badgeService);
|
|
262
263
|
}
|
|
264
|
+
//#region ---- Menu Navigation Helpers ----
|
|
265
|
+
/**
|
|
266
|
+
* Builds a UrlTree that can be consumed by the routerLink directive when the menu item targets
|
|
267
|
+
* an internal route. When the item does not represent an internal route, null is returned so the
|
|
268
|
+
* command execution pipeline remains responsible for navigation.
|
|
269
|
+
*/
|
|
270
|
+
getRouterLink(item) {
|
|
271
|
+
const navigation = this.extractRouterNavigation(item);
|
|
272
|
+
if (!navigation) {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
if (!this.isRouterLinkCompatible(navigation)) {
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
const normalizedPath = this.normalizeRouterPath(navigation.path);
|
|
279
|
+
try {
|
|
280
|
+
return this.router.parseUrl(normalizedPath);
|
|
281
|
+
}
|
|
282
|
+
catch (error) {
|
|
283
|
+
console.warn('Failed to create router link for menu item.', { item, error });
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Extracts internal navigation data regardless of whether it is provided via the legacy `path`
|
|
289
|
+
* property, a direct navigate command, or the execution command wrapper.
|
|
290
|
+
*/
|
|
291
|
+
extractRouterNavigation(item) {
|
|
292
|
+
if (item.path) {
|
|
293
|
+
return { path: item.path };
|
|
294
|
+
}
|
|
295
|
+
const command = item.command;
|
|
296
|
+
if (!command) {
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
const navigateCommand = command;
|
|
300
|
+
if (navigateCommand?.type === 'router' && typeof navigateCommand.options?.path === 'string') {
|
|
301
|
+
return {
|
|
302
|
+
path: navigateCommand.options.path,
|
|
303
|
+
extras: navigateCommand.options.extras,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
const executeCommand = command;
|
|
307
|
+
if (executeCommand?.options && typeof executeCommand.options === 'object') {
|
|
308
|
+
const commandOptions = executeCommand.options;
|
|
309
|
+
if (commandOptions?.type === 'router') {
|
|
310
|
+
const routerOptions = commandOptions.options ?? commandOptions;
|
|
311
|
+
if (typeof routerOptions?.path === 'string') {
|
|
312
|
+
return {
|
|
313
|
+
path: routerOptions.path,
|
|
314
|
+
extras: routerOptions.extras,
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
if (typeof commandOptions?.path === 'string') {
|
|
319
|
+
return { path: commandOptions.path };
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Determines whether routerLink can safely be used based on the target path and navigation
|
|
326
|
+
* extras. If the navigation requires additional runtime behaviour (e.g., opening in a new tab),
|
|
327
|
+
* we fallback to the imperative command pipeline.
|
|
328
|
+
*/
|
|
329
|
+
isRouterLinkCompatible(navigation) {
|
|
330
|
+
if (!navigation.path) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
if (this.isExternalNavigation(navigation.path)) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
const extras = navigation.extras;
|
|
337
|
+
if (!extras) {
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
if (extras.target === 'blank') {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
const unsupportedKeys = ['skipLocationChange', 'replaceUrl', 'state'];
|
|
344
|
+
return !unsupportedKeys.some((key) => extras[key] !== undefined);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Ensures router links include a leading slash while preserving any query parameters or
|
|
348
|
+
* fragments present in the original path.
|
|
349
|
+
*/
|
|
350
|
+
normalizeRouterPath(path) {
|
|
351
|
+
const trimmed = path.trim();
|
|
352
|
+
if (!trimmed.length) {
|
|
353
|
+
return trimmed;
|
|
354
|
+
}
|
|
355
|
+
if (trimmed.startsWith('/') || trimmed.startsWith('?') || trimmed.startsWith('#')) {
|
|
356
|
+
return trimmed;
|
|
357
|
+
}
|
|
358
|
+
return `/${trimmed}`;
|
|
359
|
+
}
|
|
360
|
+
isExternalNavigation(path) {
|
|
361
|
+
const lowerPath = path.trim().toLowerCase();
|
|
362
|
+
return lowerPath.startsWith('http://') || lowerPath.startsWith('https://');
|
|
363
|
+
}
|
|
263
364
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPRootLayoutMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
264
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPRootLayoutMenuComponent, isStandalone: true, selector: "axp-side-menu", ngImport: i0, template: "<ax-side-menu look=\"pills\">\n @for (item of sort(menuStore.items()); track item) {\n
|
|
365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPRootLayoutMenuComponent, isStandalone: true, selector: "axp-side-menu", ngImport: i0, template: "<ax-side-menu look=\"pills\">\n @for (item of sort(menuStore.items()); track item) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: item }\"> </ng-container>\n }\n</ax-side-menu>\n<ng-template #recursiveMenu let-item=\"item\">\n @if (item.type == 'group') {\n <ax-title *permission=\"item.data?.requiredPermission\">{{ item.text | translate | async }}</ax-title>\n } @else if (item.type == 'break') {\n <ax-divider></ax-divider>\n } @else {\n @let routerLinkValue = getRouterLink(item);\n @if (routerLinkValue) {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" *permission=\"item.data?.requiredPermission\"\n (onClick)=\"onMenuItemClick(item, true)\" [routerLink]=\"routerLinkValue\"\n [active]=\"item === menuStore.selectedMenuItem().item\" [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @for (child of sort(item.children); track $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n } @else {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" *permission=\"item.data?.requiredPermission\"\n (onClick)=\"onMenuItemClick(item)\" [active]=\"item === menuStore.selectedMenuItem().item\"\n [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @for (child of sort(item.children); track $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n }\n }\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i2$2.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "component", type: i2$2.AXSideMenuItemComponent, selector: "ax-side-menu-item", inputs: ["disabled", "text", "active", "isLoading", "isCollapsed", "toggleOnClick", "href", "routerLink", "routerLinkActive", "routerLinkActiveOptions", "target"], outputs: ["textChange", "activeChange", "isLoadingChange", "isCollapsedChange", "onClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.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: AXTranslationModule }, { kind: "directive", type: AXPTaskBadgeDirective, selector: "[axp-task-badge]", inputs: ["badgeKey", "axp-task-badge"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "directive", type: i5$1.AXPPermissionDirective, selector: "[permission]", inputs: ["permission", "permissionElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
265
366
|
}
|
|
266
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPRootLayoutMenuComponent, decorators: [{
|
|
267
368
|
type: Component,
|
|
@@ -273,7 +374,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
273
374
|
AXPTaskBadgeDirective,
|
|
274
375
|
AXBadgeModule,
|
|
275
376
|
AXPAuthModule,
|
|
276
|
-
], template: "<ax-side-menu look=\"pills\">\n @for (item of sort(menuStore.items()); track item) {\n
|
|
377
|
+
], template: "<ax-side-menu look=\"pills\">\n @for (item of sort(menuStore.items()); track item) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: item }\"> </ng-container>\n }\n</ax-side-menu>\n<ng-template #recursiveMenu let-item=\"item\">\n @if (item.type == 'group') {\n <ax-title *permission=\"item.data?.requiredPermission\">{{ item.text | translate | async }}</ax-title>\n } @else if (item.type == 'break') {\n <ax-divider></ax-divider>\n } @else {\n @let routerLinkValue = getRouterLink(item);\n @if (routerLinkValue) {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" *permission=\"item.data?.requiredPermission\"\n (onClick)=\"onMenuItemClick(item, true)\" [routerLink]=\"routerLinkValue\"\n [active]=\"item === menuStore.selectedMenuItem().item\" [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @for (child of sort(item.children); track $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n } @else {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" *permission=\"item.data?.requiredPermission\"\n (onClick)=\"onMenuItemClick(item)\" [active]=\"item === menuStore.selectedMenuItem().item\"\n [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @for (child of sort(item.children); track $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n }\n }\n</ng-template>" }]
|
|
277
378
|
}], ctorParameters: () => [] });
|
|
278
379
|
|
|
279
380
|
class AXPHorizontalMenuComponent {
|
|
@@ -638,7 +739,7 @@ class AXPDefaultThemeModule {
|
|
|
638
739
|
///
|
|
639
740
|
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
640
741
|
//
|
|
641
|
-
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-
|
|
742
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
642
743
|
},
|
|
643
744
|
},
|
|
644
745
|
};
|
|
@@ -674,7 +775,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
674
775
|
///
|
|
675
776
|
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
676
777
|
//
|
|
677
|
-
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-
|
|
778
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
678
779
|
},
|
|
679
780
|
},
|
|
680
781
|
};
|