@acorex-platform/framework-client 2.0.0-next.2 → 2.0.0-next.21

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.
Files changed (61) hide show
  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
  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
  3. package/fesm2022/acorex-platform-framework-client-common.mjs +416 -191
  4. package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-framework-client-core.mjs +7 -2
  6. package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +20 -0
  8. package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-framework-client-layout-components.mjs +520 -142
  10. package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
  11. package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CA19c8sx.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-B3NLw_X8.mjs} +801 -207
  12. package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-B3NLw_X8.mjs.map +1 -0
  13. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Dxp4kGsa.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-CCOi5IsF.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Dxp4kGsa.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-CCOi5IsF.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-fnICGK0s.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-D8g9PkkI.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-fnICGK0s.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-D8g9PkkI.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-BxTbTlUr.mjs → acorex-platform-framework-client-layout-entity-file-list-popup.component-B2aSSN0A.mjs} +4 -4
  18. package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-BxTbTlUr.mjs.map → acorex-platform-framework-client-layout-entity-file-list-popup.component-B2aSSN0A.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-D0WZheYu.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-D6r3VvFN.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-D0WZheYu.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-D6r3VvFN.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
  22. package/fesm2022/acorex-platform-framework-client-layout-views.mjs +71 -10
  23. package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +285 -184
  25. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
  26. package/fesm2022/{acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-1UJh0Qj4.mjs → acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-ByihbDgl.mjs} +228 -113
  27. package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-ByihbDgl.mjs.map +1 -0
  28. package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-SHCgo4UC.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BFB3Jo5r.mjs} +3 -3
  29. package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-SHCgo4UC.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-BFB3Jo5r.mjs.map} +1 -1
  30. package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BYsrp8LT.mjs → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-HBONm-TI.mjs} +2 -2
  31. package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BYsrp8LT.mjs.map → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-HBONm-TI.mjs.map} +1 -1
  32. package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +1 -1
  33. package/fesm2022/acorex-platform-framework-client-realtime.mjs +49 -7
  34. package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -1
  35. 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
  36. package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DPU6jTDk.mjs.map +1 -0
  37. 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
  38. package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-CLdQJ8e8.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-framework-client-themes-default.mjs +124 -43
  40. package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
  41. package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +1 -1
  42. package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
  43. package/i18n/en-AU/general.json +16 -4
  44. package/i18n/en-AU/layout.json +2 -1
  45. package/i18n/en-US/general.json +16 -4
  46. package/i18n/en-US/layout.json +2 -1
  47. package/i18n/fa-IR/general.json +16 -4
  48. package/i18n/fa-IR/layout.json +2 -1
  49. package/package.json +6 -6
  50. package/types/acorex-platform-framework-client-common.d.ts +67 -7
  51. package/types/acorex-platform-framework-client-layout-components.d.ts +47 -6
  52. package/types/acorex-platform-framework-client-layout-entity.d.ts +117 -34
  53. package/types/acorex-platform-framework-client-layout-views.d.ts +15 -0
  54. package/types/acorex-platform-framework-client-layout-widget-core.d.ts +64 -14
  55. package/types/acorex-platform-framework-client-layout-widgets.d.ts +30 -1
  56. package/types/acorex-platform-framework-client-realtime.d.ts +5 -0
  57. package/types/acorex-platform-framework-client-themes-default.d.ts +12 -0
  58. package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CA19c8sx.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-1UJh0Qj4.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DwCoz2Du.mjs.map +0 -1
  61. 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, NavigationEnd, ActivatedRoute } from '@angular/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 tabTitleSegments = await this.resolveBreadcrumbTabTitleSegments(breadCrumbs);
416
- let tabTitle = tabTitleSegments.length ? axpJoinTabTitleSegments(tabTitleSegments) : null;
417
- if (!tabTitle) {
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
+ }
420
+ if (typeof routeTabTitle === 'string' && routeTabTitle.trim()) {
421
+ this.tabNavigation.syncTabTitle(tabKey, routeTabTitle.trim());
419
422
  }
420
- if (tabKey && tabTitle) {
421
- this.tabNavigation.syncTabTitle(tabKey, tabTitleSegments.length ? tabTitleSegments : tabTitle);
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
  }