@acorex-platform/framework-client 1.0.1 → 1.0.2
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-auth.mjs +113 -45
- package/fesm2022/acorex-platform-framework-client-auth.mjs.map +1 -1
- 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 +445 -191
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +7 -2
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +399 -132
- 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-i9oZEXUR.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-D2kZxLOh.mjs} +616 -196
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-D2kZxLOh.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-DyrvSBEY.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-BManmr01.mjs} +10 -5
- package/fesm2022/acorex-platform-framework-client-layout-entity-attachments-page.component-BManmr01.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-B8s_JEV8.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-B8XsnrnO.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-B8s_JEV8.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-B8XsnrnO.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-C0LgUzzv.mjs → acorex-platform-framework-client-layout-entity-file-list-popup.component-DGZVS11E.mjs} +28 -12
- package/fesm2022/acorex-platform-framework-client-layout-entity-file-list-popup.component-DGZVS11E.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-fATD9Uax.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-Be348QCj.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-fATD9Uax.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-Be348QCj.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +71 -10
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +147 -171
- 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-Drmmu4HQ.mjs → acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-M8SZFPQx.mjs} +342 -60
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-M8SZFPQx.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BiuahYd8.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DsLgZbZA.mjs} +3 -3
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BiuahYd8.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DsLgZbZA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-CU_5b_te.mjs → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-Vpz3itLZ.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-CU_5b_te.mjs.map → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-Vpz3itLZ.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.mjs +40 -20
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared.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/layout/widget-core/README.md +1 -1
- package/layout/widgets/README.md +2 -2
- package/package.json +2 -2
- package/types/acorex-platform-framework-client-auth.d.ts +15 -1
- package/types/acorex-platform-framework-client-common.d.ts +73 -7
- package/types/acorex-platform-framework-client-layout-components.d.ts +38 -7
- package/types/acorex-platform-framework-client-layout-entity.d.ts +86 -34
- package/types/acorex-platform-framework-client-layout-views.d.ts +15 -0
- package/types/acorex-platform-framework-client-layout-widget-core.d.ts +38 -13
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +25 -7
- 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-i9oZEXUR.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity-attachments-page.component-DyrvSBEY.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity-file-list-popup.component-C0LgUzzv.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-Drmmu4HQ.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
|
-
|
|
416
|
+
const routeTabTitle = await Promise.resolve(this.getRouteTabTitle());
|
|
417
|
+
if (!tabKey || this.pageTabKey() !== tabKey || this.tabNavigation.activeKey() !== tabKey) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (typeof routeTabTitle === 'string' && routeTabTitle.trim()) {
|
|
421
|
+
this.tabNavigation.syncTabTitle(tabKey, routeTabTitle.trim());
|
|
419
422
|
}
|
|
420
|
-
if (
|
|
421
|
-
this.tabNavigation.syncTabTitle(tabKey,
|
|
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 = [];
|
|
@@ -1123,6 +1172,14 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
1123
1172
|
const page = router.parseUrl(router.url).queryParams['page'];
|
|
1124
1173
|
return typeof page === 'string' && page.length > 0 ? page : null;
|
|
1125
1174
|
};
|
|
1175
|
+
/** Keep caller history state (for example related-list field hides) across in-page navigations. */
|
|
1176
|
+
const callerNavigationState = () => {
|
|
1177
|
+
if (typeof history === 'undefined' || history.state == null || typeof history.state !== 'object') {
|
|
1178
|
+
return undefined;
|
|
1179
|
+
}
|
|
1180
|
+
const { navigationId: _navigationId, ...rest } = history.state;
|
|
1181
|
+
return Object.keys(rest).length > 0 ? rest : undefined;
|
|
1182
|
+
};
|
|
1126
1183
|
/** Loads page data, context, and evaluated widgets for the target sidebar page. */
|
|
1127
1184
|
const activatePageById = async (pageId, forceRefresh) => {
|
|
1128
1185
|
const activation = pageActivationChain.then(() => runPageActivation(pageId, forceRefresh));
|
|
@@ -1391,6 +1448,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
1391
1448
|
queryParams: { page: resolvedPage.id },
|
|
1392
1449
|
queryParamsHandling: 'merge',
|
|
1393
1450
|
replaceUrl: true,
|
|
1451
|
+
...(callerNavigationState() ? { state: callerNavigationState() } : {}),
|
|
1394
1452
|
});
|
|
1395
1453
|
}
|
|
1396
1454
|
await this.loadPage(pageId, forceRefresh);
|
|
@@ -1531,6 +1589,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
1531
1589
|
queryParams: { page: page.id, filters: null },
|
|
1532
1590
|
queryParamsHandling: 'merge',
|
|
1533
1591
|
replaceUrl: false,
|
|
1592
|
+
...(callerNavigationState() ? { state: callerNavigationState() } : {}),
|
|
1534
1593
|
});
|
|
1535
1594
|
}
|
|
1536
1595
|
void activatePageById(page.id);
|
|
@@ -1549,6 +1608,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
1549
1608
|
queryParamsHandling: 'merge',
|
|
1550
1609
|
// Push history for desktop sidebar switches and mobile page-list picks.
|
|
1551
1610
|
replaceUrl: false,
|
|
1611
|
+
...(callerNavigationState() ? { state: callerNavigationState() } : {}),
|
|
1552
1612
|
});
|
|
1553
1613
|
return;
|
|
1554
1614
|
}
|
|
@@ -1568,6 +1628,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
1568
1628
|
relativeTo: route,
|
|
1569
1629
|
queryParams: currentParams,
|
|
1570
1630
|
replaceUrl: true,
|
|
1631
|
+
...(callerNavigationState() ? { state: callerNavigationState() } : {}),
|
|
1571
1632
|
});
|
|
1572
1633
|
}
|
|
1573
1634
|
}
|