@acorex-platform/framework-client 2.0.0-next.15 → 2.0.0-next.17
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/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs → acorex-platform-framework-client-common-common-settings.provider-Cyr1DaiD.mjs} +19 -2
- package/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs.map → acorex-platform-framework-client-common-common-settings.provider-Cyr1DaiD.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-common.mjs +126 -26
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +221 -98
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-RG1FLjoP.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-o8SLSxU-.mjs} +147 -41
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-o8SLSxU-.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Bh8YRyxV.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-B2v5VFlL.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Bh8YRyxV.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-B2v5VFlL.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-CSfoFx99.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-DiB2ZLpg.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-CSfoFx99.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-DiB2ZLpg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-Z2N8JZ3_.mjs → acorex-platform-framework-client-layout-entity-file-list-popup.component-C9esa6dp.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-Z2N8JZ3_.mjs.map → acorex-platform-framework-client-layout-entity-file-list-popup.component-C9esa6dp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-ZEGLkwzi.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-CKxYno2v.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-ZEGLkwzi.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-CKxYno2v.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +59 -10
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +175 -172
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CzhP4_OE.mjs → acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-DZMgisgf.mjs} +80 -75
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-DZMgisgf.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BIl416zF.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BejeCu5q.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BIl416zF.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BejeCu5q.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-DK8XXQuT.mjs → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-C2XsTtkl.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-DK8XXQuT.mjs.map → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-C2XsTtkl.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs +49 -7
- package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-create-view.component-DwCoz2Du.mjs → acorex-platform-framework-client-themes-default-entity-master-create-view.component-DPU6jTDk.mjs} +8 -2
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DPU6jTDk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BCyFK60f.mjs → acorex-platform-framework-client-themes-default-entity-master-modify-view.component-CLdQJ8e8.mjs} +8 -2
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-CLdQJ8e8.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs +18 -11
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/i18n/en-AU/general.json +16 -4
- package/i18n/en-AU/layout.json +2 -1
- package/i18n/en-US/general.json +16 -4
- package/i18n/en-US/layout.json +2 -1
- package/i18n/fa-IR/general.json +16 -4
- package/i18n/fa-IR/layout.json +2 -1
- package/package.json +2 -2
- package/types/acorex-platform-framework-client-common.d.ts +40 -5
- package/types/acorex-platform-framework-client-layout-components.d.ts +9 -3
- package/types/acorex-platform-framework-client-layout-entity.d.ts +18 -1
- package/types/acorex-platform-framework-client-layout-views.d.ts +15 -0
- package/types/acorex-platform-framework-client-layout-widget-core.d.ts +39 -14
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +12 -0
- package/types/acorex-platform-framework-client-realtime.d.ts +5 -0
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-RG1FLjoP.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CzhP4_OE.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DwCoz2Du.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BCyFK60f.mjs.map +0 -1
|
@@ -14,7 +14,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
|
14
14
|
import * as i6 from '@acorex/components/dropdown';
|
|
15
15
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
16
16
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
17
|
-
import { AXPTabNavigationService, axpSplitCollapsedBreadcrumbs, AXPStickyDirective, AXPCommonSettings, AXPHomePageService, AXPSettingsService, AXPTabPreviewService, AXPUnsavedChangesConfirmService, AXPBrowserTitleService, AXPEntityDetailsNavTrailService, axpJoinTabTitleSegments, normalizeRouterUrl, AXP_HOME_TAB_KEY, axpResolveTabKey, axpIsEntityListPath, axpParseEntityListRoute, axpGetEntityListReturnUrl, axpIsEntityDetailsPath, axpParseEntityDetailsRoute, axpSetEntityDetailsPageQuery, axpIsEntityDetailsViewRoute, AXPNotFoundError, AXP_NOT_FOUND_ROUTE, AXPUnsavedChangesPopstateService, createUnsavedChangesCanDeactivateGuard } from '@acorex-platform/framework-client/common';
|
|
17
|
+
import { AXPTabNavigationService, axpSplitCollapsedBreadcrumbs, AXPStickyDirective, AXPCommonSettings, AXPHomePageService, AXPSettingsService, AXPTabPreviewService, AXPUnsavedChangesConfirmService, AXPBrowserTitleService, AXPEntityDetailsNavTrailService, axpJoinTabTitleSegments, axpGetLeafRouteSnapshot, normalizeRouterUrl, AXP_HOME_TAB_KEY, axpResolveTabKey, axpIsEntityListPath, axpParseEntityListRoute, axpGetEntityListReturnUrl, axpIsEntityDetailsPath, axpParseEntityDetailsRoute, axpSetEntityDetailsPageQuery, axpIsEntityDetailsViewRoute, AXPNotFoundError, AXP_NOT_FOUND_ROUTE, AXPUnsavedChangesPopstateService, createUnsavedChangesCanDeactivateGuard } from '@acorex-platform/framework-client/common';
|
|
18
18
|
import * as i9 from '@acorex-platform/framework-client/core';
|
|
19
19
|
import { AXPDeviceService, AXPComponentSlotModule, AXPDebugService, OVERLAY_DETAILS_VIEW_TRACE_NS, AXPExpressionEvaluatorService, AXPContextEvalFactory, normalizeKeyboardShortcuts, AXPContextStore, AXPEntityBroadcastService, AXPKeyboardShortcutRegistry } from '@acorex-platform/framework-client/core';
|
|
20
20
|
import * as i1 from '@acorex/cdk/drawer';
|
|
@@ -30,7 +30,7 @@ import { AXToastService } from '@acorex/components/toast';
|
|
|
30
30
|
import { AXFormatService, AXFormatModule } from '@acorex/core/format';
|
|
31
31
|
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
32
32
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
33
|
-
import { Router,
|
|
33
|
+
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
|
34
34
|
import { isEmpty, cloneDeep, get } from 'lodash-es';
|
|
35
35
|
import { filter } from 'rxjs/operators';
|
|
36
36
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
@@ -263,6 +263,7 @@ class AXPPageLayoutBaseComponent {
|
|
|
263
263
|
this.unsavedChangesConfirm = inject(AXPUnsavedChangesConfirmService);
|
|
264
264
|
this.browserTitleService = inject(AXPBrowserTitleService);
|
|
265
265
|
this.router = inject(Router);
|
|
266
|
+
this.pageLayoutRoute = inject(ActivatedRoute);
|
|
266
267
|
this.navTrailService = inject(AXPEntityDetailsNavTrailService);
|
|
267
268
|
this.pageLayoutDestroyRef = inject(DestroyRef);
|
|
268
269
|
//#endregion
|
|
@@ -324,7 +325,7 @@ class AXPPageLayoutBaseComponent {
|
|
|
324
325
|
this.title.set(await this.getPageTitle());
|
|
325
326
|
const icon = await this.getPageIcon();
|
|
326
327
|
this.titleIcon.set(icon);
|
|
327
|
-
if (this.tabNavigation.effectiveMode() === 'tabular') {
|
|
328
|
+
if (this.tabNavigation.effectiveMode() === 'tabular' && this.canPublishActiveTabChrome()) {
|
|
328
329
|
const tabKey = this.pageTabKey();
|
|
329
330
|
if (tabKey && icon) {
|
|
330
331
|
this.tabNavigation.syncTabIcon(tabKey, icon);
|
|
@@ -410,15 +411,30 @@ class AXPPageLayoutBaseComponent {
|
|
|
410
411
|
if (isActiveForNavTrail && this.isActivePageForNavTrail()) {
|
|
411
412
|
this.navTrailService.setActiveTrail(breadCrumbs);
|
|
412
413
|
}
|
|
413
|
-
if (this.tabNavigation.effectiveMode() === 'tabular') {
|
|
414
|
+
if (this.tabNavigation.effectiveMode() === 'tabular' && this.canPublishActiveTabChrome()) {
|
|
414
415
|
const tabKey = this.pageTabKey();
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
tabTitle = await this.resolvePageTitleForTab();
|
|
416
|
+
const routeTabTitle = await Promise.resolve(this.getRouteTabTitle());
|
|
417
|
+
if (!tabKey || this.pageTabKey() !== tabKey || this.tabNavigation.activeKey() !== tabKey) {
|
|
418
|
+
return;
|
|
419
419
|
}
|
|
420
|
-
if (
|
|
421
|
-
this.tabNavigation.syncTabTitle(tabKey,
|
|
420
|
+
if (typeof routeTabTitle === 'string' && routeTabTitle.trim()) {
|
|
421
|
+
this.tabNavigation.syncTabTitle(tabKey, routeTabTitle.trim());
|
|
422
|
+
}
|
|
423
|
+
else if (Array.isArray(routeTabTitle) && routeTabTitle.length) {
|
|
424
|
+
this.tabNavigation.syncTabTitle(tabKey, routeTabTitle);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
const tabTitleSegments = await this.resolveBreadcrumbTabTitleSegments(breadCrumbs);
|
|
428
|
+
let tabTitle = tabTitleSegments.length ? axpJoinTabTitleSegments(tabTitleSegments) : null;
|
|
429
|
+
if (!tabTitle) {
|
|
430
|
+
tabTitle = await this.resolvePageTitleForTab();
|
|
431
|
+
}
|
|
432
|
+
if (this.pageTabKey() !== tabKey || this.tabNavigation.activeKey() !== tabKey) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
if (tabTitle) {
|
|
436
|
+
this.tabNavigation.syncTabTitle(tabKey, tabTitleSegments.length ? tabTitleSegments : tabTitle);
|
|
437
|
+
}
|
|
422
438
|
}
|
|
423
439
|
}
|
|
424
440
|
}, /* @ts-ignore */
|
|
@@ -507,9 +523,35 @@ class AXPPageLayoutBaseComponent {
|
|
|
507
523
|
this.router.events
|
|
508
524
|
.pipe(filter((event) => event instanceof NavigationEnd), takeUntilDestroyed(this.pageLayoutDestroyRef))
|
|
509
525
|
.subscribe(() => {
|
|
526
|
+
this.syncOwnedPageTabKey();
|
|
510
527
|
void this.publishBrowserTitleIfActive();
|
|
511
528
|
});
|
|
512
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* Follows the scoped tab when this instance is the active route (settings scope changes).
|
|
532
|
+
* Cached background pages keep the key captured at init.
|
|
533
|
+
*/
|
|
534
|
+
syncOwnedPageTabKey() {
|
|
535
|
+
if (this.tabNavigation.effectiveMode() !== 'tabular' || !this.isOwningActiveRoute()) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const nextKey = this.resolvePageTabKey();
|
|
539
|
+
if (nextKey !== this.pageTabKey()) {
|
|
540
|
+
this.pageTabKey.set(nextKey);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/** True when this page's route snapshot is in the active router tree. */
|
|
544
|
+
isOwningActiveRoute() {
|
|
545
|
+
const own = this.pageLayoutRoute.snapshot;
|
|
546
|
+
const leaf = axpGetLeafRouteSnapshot(this.router.routerState.snapshot.root);
|
|
547
|
+
return leaf.pathFromRoot.includes(own);
|
|
548
|
+
}
|
|
549
|
+
/** True when this page may publish chrome onto its route tab. */
|
|
550
|
+
canPublishActiveTabChrome() {
|
|
551
|
+
const pageKey = this.pageTabKey();
|
|
552
|
+
const activeKey = this.tabNavigation.activeKey();
|
|
553
|
+
return !!pageKey && !!activeKey && pageKey === activeKey;
|
|
554
|
+
}
|
|
513
555
|
/** Maps the home-page route to the pinned home tab key instead of a path-based key. */
|
|
514
556
|
resolvePageTabKey() {
|
|
515
557
|
const homePath = this.homePageService.getCurrent().path;
|
|
@@ -632,6 +674,13 @@ class AXPPageLayoutBaseComponent {
|
|
|
632
674
|
getPageBreadcrumbs() {
|
|
633
675
|
return [];
|
|
634
676
|
}
|
|
677
|
+
/**
|
|
678
|
+
* Route-tab label for this page. Return a scope title when child routes are internal
|
|
679
|
+
* (settings groups). Null keeps the breadcrumb / page-title fallback.
|
|
680
|
+
*/
|
|
681
|
+
getRouteTabTitle() {
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
635
684
|
/** Collects resolved breadcrumb labels (Home excluded upstream) for tab chrome. */
|
|
636
685
|
async resolveBreadcrumbTabTitleSegments(pageBreadcrumbs) {
|
|
637
686
|
const segments = [];
|