@acorex/platform 21.0.0-next.76 → 21.0.0-next.79
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-common-common-settings.provider-ChoT4m4k.mjs → acorex-platform-common-common-settings.provider-Ytey9uhY.mjs} +1 -42
- package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +580 -1445
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +1 -1330
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +5 -208
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs} +3 -3
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs.map → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +694 -733
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -372
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +103 -3
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6 -11
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +3 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +52 -643
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +8 -5
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +1056 -337
- package/types/acorex-platform-contracts.d.ts +4 -1679
- package/types/acorex-platform-core.d.ts +181 -92
- package/types/acorex-platform-layout-components.d.ts +1 -2
- package/types/acorex-platform-layout-entity.d.ts +221 -99
- package/types/acorex-platform-layout-views.d.ts +5 -39
- package/types/acorex-platform-layout-widget-core.d.ts +3 -2
- package/types/acorex-platform-layout-widgets.d.ts +4 -11
- package/types/acorex-platform-themes-default.d.ts +57 -120
- package/types/acorex-platform-workflow.d.ts +18 -5
- package/fesm2022/acorex-platform-common-common-settings.provider-ChoT4m4k.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs +0 -513
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +0 -1
|
@@ -27,26 +27,26 @@ import { AXTranslationModule, AXTranslationService, translateSync } from '@acore
|
|
|
27
27
|
import * as i2 from '@acorex/core/utils';
|
|
28
28
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
29
29
|
import { AXPAuthModule, AXPSessionService, AXPSessionStatus } from '@acorex/platform/auth';
|
|
30
|
-
import { AXPRefreshEvent, AXPSettingsService, AXPCommonSettings, axpIsEntityListRoute, axpReplaceEntityListRouteQueryParams, axpIsEntityListPath,
|
|
30
|
+
import { AXPRefreshEvent, AXPSettingsService, AXPCommonSettings, axpIsEntityListRoute, axpReplaceEntityListRouteQueryParams, axpIsEntityListPath, AXP_PLATFORM_CONFIG_TOKEN, AXPMenuService, AXPMenuVisibilityService, AXP_PROTECTED_ROUTE_GUARDS, AXPCommonModule } from '@acorex/platform/common';
|
|
31
31
|
import * as i1$5 from '@acorex/platform/core';
|
|
32
32
|
import { AXPDeviceService, AXHighlightService, AXPGridLayoutDirective, AXPComponentSlotModule, AXPKeyboardShortcutRegistry, AXPKeyboardShortcutPriority, AXPBroadcastEventService, AXPContextStore } from '@acorex/platform/core';
|
|
33
33
|
import { AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, AXPEntityDefinitionRegistryService, AXPCategoryTreeService, AXPEntityListViewColumnViewModel, AXPEntityMasterListCardSelectActionName, applyDataSourcePagingWithoutLoad, getDataSourcePageIndex, restoreEntityListExpandedRows, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
|
34
34
|
import * as i7$1 from '@acorex/platform/layout/widget-core';
|
|
35
35
|
import { AXPWidgetCoreModule, AXPWidgetColumnCellComponent } from '@acorex/platform/layout/widget-core';
|
|
36
36
|
import { AXPWidgetsModule } from '@acorex/platform/layout/widgets';
|
|
37
|
-
import { AXPLayoutThemeService, AXPThemeLayoutSetting,
|
|
37
|
+
import { AXPLayoutThemeService, AXPThemeLayoutSetting, AXPThemesSharedModule } from '@acorex/platform/themes/shared';
|
|
38
38
|
import { AXPWorkflowService, ofType } from '@acorex/platform/workflow';
|
|
39
39
|
import * as i1$1 from '@angular/common';
|
|
40
40
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
41
41
|
import * as i0 from '@angular/core';
|
|
42
|
-
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, input, viewChild, afterNextRender, output, untracked,
|
|
42
|
+
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, input, viewChild, afterNextRender, output, untracked, DestroyRef, NgModule } from '@angular/core';
|
|
43
43
|
import { FormsModule } from '@angular/forms';
|
|
44
44
|
import * as i1$6 from '@angular/router';
|
|
45
45
|
import { RouterModule, Router, ActivatedRoute, NavigationStart, NavigationEnd, RouteReuseStrategy, ROUTES } from '@angular/router';
|
|
46
46
|
import { Subject, takeUntil, filter, firstValueFrom } from 'rxjs';
|
|
47
47
|
import * as i1$4 from '@acorex/core/platform';
|
|
48
48
|
import { AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutToolbarComponent, AXPStateMessageComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPQueryColumnsComponent, AXPThemeLayoutStartSideComponent, AXPTaskBadgeService, AXPMenuBadgeHelper, AXPTaskBadgeDirective, AXPLogoComponent } from '@acorex/platform/layout/components';
|
|
49
|
-
import { DragDropModule
|
|
49
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
50
50
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
51
51
|
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
|
|
52
52
|
import * as i2$2 from '@acorex/components/skeleton';
|
|
@@ -59,12 +59,12 @@ import * as i1$3 from '@acorex/components/data-pager';
|
|
|
59
59
|
import { AXDataPagerModule } from '@acorex/components/data-pager';
|
|
60
60
|
import * as i3$3 from '@acorex/components/check-box';
|
|
61
61
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
62
|
-
import * as i4 from '@acorex/components/menu';
|
|
63
|
-
import { AXContextMenuComponent, AXMenuModule } from '@acorex/components/menu';
|
|
64
62
|
import * as i2$3 from '@acorex/components/side-menu';
|
|
65
63
|
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
|
66
64
|
import { AXAvatarModule } from '@acorex/components/avatar';
|
|
67
65
|
import { AXImageModule } from '@acorex/components/image';
|
|
66
|
+
import * as i4 from '@acorex/components/menu';
|
|
67
|
+
import { AXMenuModule } from '@acorex/components/menu';
|
|
68
68
|
import sortBy$1 from 'lodash-es/sortBy';
|
|
69
69
|
import { AXResizableDirective } from '@acorex/cdk/resizable';
|
|
70
70
|
|
|
@@ -1946,6 +1946,7 @@ class AXPEntityMasterListViewComponent extends AXPPageLayoutBaseComponent {
|
|
|
1946
1946
|
this.platform = platform;
|
|
1947
1947
|
//#region ---- Services & Dependencies ----
|
|
1948
1948
|
this.activeRoute = inject(ActivatedRoute);
|
|
1949
|
+
this.router = inject(Router);
|
|
1949
1950
|
//#endregion
|
|
1950
1951
|
//#region ---- View State ----
|
|
1951
1952
|
this.vm = this.activeRoute.snapshot.data['vm'];
|
|
@@ -2368,433 +2369,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2368
2369
|
], template: "<div class=\"ax-flex ax-items-center ax-justify-start ax-gap-1\">\n <axp-component-slot name=\"root-footer-start\"></axp-component-slot>\n</div>\n<div class=\"ax-flex ax-items-center ax-justify-end ax-gap-1\">\n <axp-component-slot name=\"root-footer-end\"></axp-component-slot>\n</div>\n" }]
|
|
2369
2370
|
}] });
|
|
2370
2371
|
|
|
2371
|
-
//#region ---- Types ----
|
|
2372
|
-
//#endregion
|
|
2373
|
-
//#region ---- Layout ----
|
|
2374
|
-
const DEFAULT_MIN_WIDTH_PX = 88;
|
|
2375
|
-
const DEFAULT_MAX_WIDTH_PX = 192;
|
|
2376
|
-
const DEFAULT_TAB_GAP_PX = 8;
|
|
2377
|
-
/**
|
|
2378
|
-
* Chrome-like tab strip layout: equal flexible widths between min/max; horizontal scroll when needed.
|
|
2379
|
-
*/
|
|
2380
|
-
function computeRouteTabBarLayout(stripWidthPx, tabs, _activeKey, options = {}) {
|
|
2381
|
-
const minWidthPx = options.minWidthPx ?? DEFAULT_MIN_WIDTH_PX;
|
|
2382
|
-
const maxWidthPx = options.maxWidthPx ?? DEFAULT_MAX_WIDTH_PX;
|
|
2383
|
-
const tabGapPx = options.tabGapPx ?? DEFAULT_TAB_GAP_PX;
|
|
2384
|
-
if (stripWidthPx <= 0 || !tabs.length) {
|
|
2385
|
-
return {
|
|
2386
|
-
tabWidthPx: minWidthPx,
|
|
2387
|
-
isScrollable: false,
|
|
2388
|
-
};
|
|
2389
|
-
}
|
|
2390
|
-
const count = tabs.length;
|
|
2391
|
-
const gapsForAll = Math.max(0, count - 1) * tabGapPx;
|
|
2392
|
-
const rawWidth = (stripWidthPx - gapsForAll) / count;
|
|
2393
|
-
const fittedWidth = Math.min(maxWidthPx, Math.max(minWidthPx, rawWidth));
|
|
2394
|
-
const needsScroll = count * fittedWidth + gapsForAll > stripWidthPx;
|
|
2395
|
-
const tabWidthPx = needsScroll ? minWidthPx : Math.floor(fittedWidth);
|
|
2396
|
-
return {
|
|
2397
|
-
tabWidthPx,
|
|
2398
|
-
isScrollable: needsScroll,
|
|
2399
|
-
};
|
|
2400
|
-
}
|
|
2401
|
-
//#endregion
|
|
2402
|
-
|
|
2403
|
-
class AXPRouteTabBarComponent {
|
|
2404
|
-
constructor() {
|
|
2405
|
-
//#region ---- Services & Dependencies ----
|
|
2406
|
-
this.tabNavigation = inject(AXPTabNavigationService);
|
|
2407
|
-
this.tabPreviewService = inject(AXPTabPreviewService);
|
|
2408
|
-
this.translateService = inject(AXTranslationService);
|
|
2409
|
-
this.host = inject((ElementRef));
|
|
2410
|
-
this.tabStrip = viewChild('tabStrip', ...(ngDevMode ? [{ debugName: "tabStrip" }] : /* istanbul ignore next */ []));
|
|
2411
|
-
this.tabsScroll = viewChild('tabsScroll', ...(ngDevMode ? [{ debugName: "tabsScroll" }] : /* istanbul ignore next */ []));
|
|
2412
|
-
this.contextMenu = viewChild('tabContextMenu', ...(ngDevMode ? [{ debugName: "contextMenu" }] : /* istanbul ignore next */ []));
|
|
2413
|
-
this.suppressTabChange = signal(false, ...(ngDevMode ? [{ debugName: "suppressTabChange" }] : /* istanbul ignore next */ []));
|
|
2414
|
-
this.contextTabKey = signal(null, ...(ngDevMode ? [{ debugName: "contextTabKey" }] : /* istanbul ignore next */ []));
|
|
2415
|
-
this.stripWidthPx = signal(0, ...(ngDevMode ? [{ debugName: "stripWidthPx" }] : /* istanbul ignore next */ []));
|
|
2416
|
-
this.isTabDragging = signal(false, ...(ngDevMode ? [{ debugName: "isTabDragging" }] : /* istanbul ignore next */ []));
|
|
2417
|
-
this.inHeader = signal(false, ...(ngDevMode ? [{ debugName: "inHeader" }] : /* istanbul ignore next */ []));
|
|
2418
|
-
//#endregion
|
|
2419
|
-
//#region ---- Layout State ----
|
|
2420
|
-
this.layout = computed(() => computeRouteTabBarLayout(this.stripWidthPx(), this.tabNavigation.tabList(), this.tabNavigation.activeKey()), ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
2421
|
-
this.tabWidthPx = computed(() => this.layout().tabWidthPx, ...(ngDevMode ? [{ debugName: "tabWidthPx" }] : /* istanbul ignore next */ []));
|
|
2422
|
-
this.hasHorizontalOverflow = signal(false, ...(ngDevMode ? [{ debugName: "hasHorizontalOverflow" }] : /* istanbul ignore next */ []));
|
|
2423
|
-
this.canScrollForward = signal(false, ...(ngDevMode ? [{ debugName: "canScrollForward" }] : /* istanbul ignore next */ []));
|
|
2424
|
-
this.canScrollBackward = signal(false, ...(ngDevMode ? [{ debugName: "canScrollBackward" }] : /* istanbul ignore next */ []));
|
|
2425
|
-
this.scrollForwardIcon = computed(() => this.#isTabsRtl() ? 'fa-solid fa-chevron-left' : 'fa-solid fa-chevron-right', ...(ngDevMode ? [{ debugName: "scrollForwardIcon" }] : /* istanbul ignore next */ []));
|
|
2426
|
-
this.scrollBackwardIcon = computed(() => this.#isTabsRtl() ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-left', ...(ngDevMode ? [{ debugName: "scrollBackwardIcon" }] : /* istanbul ignore next */ []));
|
|
2427
|
-
this.isMiddlePanning = signal(false, ...(ngDevMode ? [{ debugName: "isMiddlePanning" }] : /* istanbul ignore next */ []));
|
|
2428
|
-
this.middlePanSession = null;
|
|
2429
|
-
this.middlePanMoved = false;
|
|
2430
|
-
//#endregion
|
|
2431
|
-
//#region ---- Layout Helpers ----
|
|
2432
|
-
this.#onTabsScroll = () => {
|
|
2433
|
-
this.#updateScrollState();
|
|
2434
|
-
};
|
|
2435
|
-
this.#onMiddlePanMove = (event) => {
|
|
2436
|
-
const session = this.middlePanSession;
|
|
2437
|
-
if (!session) {
|
|
2438
|
-
return;
|
|
2439
|
-
}
|
|
2440
|
-
const deltaX = event.clientX - session.lastX;
|
|
2441
|
-
session.lastX = event.clientX;
|
|
2442
|
-
if (Math.abs(event.clientX - session.startX) > 2) {
|
|
2443
|
-
session.moved = true;
|
|
2444
|
-
}
|
|
2445
|
-
session.container.scrollBy({ left: -deltaX });
|
|
2446
|
-
this.#updateScrollState();
|
|
2447
|
-
};
|
|
2448
|
-
this.#onMiddlePanUp = (event) => {
|
|
2449
|
-
if (event.button !== 1 && event.buttons !== 0) {
|
|
2450
|
-
return;
|
|
2451
|
-
}
|
|
2452
|
-
this.#endMiddlePan();
|
|
2453
|
-
};
|
|
2454
|
-
//#endregion
|
|
2455
|
-
//#region ---- Tab Strip Sync ----
|
|
2456
|
-
/** Scrolls the active tab into view when the strip overflows horizontally. */
|
|
2457
|
-
this.#scrollActiveTabIntoView = effect(() => {
|
|
2458
|
-
const activeKey = this.tabNavigation.activeKey();
|
|
2459
|
-
const tabs = this.tabNavigation.tabList();
|
|
2460
|
-
this.tabWidthPx();
|
|
2461
|
-
this.stripWidthPx();
|
|
2462
|
-
if (!activeKey || !tabs.length) {
|
|
2463
|
-
return;
|
|
2464
|
-
}
|
|
2465
|
-
untracked(() => {
|
|
2466
|
-
queueMicrotask(() => {
|
|
2467
|
-
this.#updateScrollState();
|
|
2468
|
-
this.#scrollTabIntoView(activeKey);
|
|
2469
|
-
});
|
|
2470
|
-
});
|
|
2471
|
-
}, ...(ngDevMode ? [{ debugName: "#scrollActiveTabIntoView" }] : /* istanbul ignore next */ []));
|
|
2472
|
-
}
|
|
2473
|
-
//#endregion
|
|
2474
|
-
//#region ---- Lifecycle Methods ----
|
|
2475
|
-
ngAfterViewInit() {
|
|
2476
|
-
this.inHeader.set(this.host.nativeElement.classList.contains('axp-route-tab-bar--in-header'));
|
|
2477
|
-
const strip = this.tabStrip()?.nativeElement;
|
|
2478
|
-
if (!strip) {
|
|
2479
|
-
return;
|
|
2480
|
-
}
|
|
2481
|
-
this.stripWidthPx.set(strip.clientWidth);
|
|
2482
|
-
this.stripResizeObserver = new ResizeObserver(() => {
|
|
2483
|
-
this.stripWidthPx.set(strip.clientWidth);
|
|
2484
|
-
this.#updateScrollState();
|
|
2485
|
-
});
|
|
2486
|
-
this.stripResizeObserver.observe(strip);
|
|
2487
|
-
const scrollElement = this.tabsScroll()?.nativeElement;
|
|
2488
|
-
if (scrollElement) {
|
|
2489
|
-
this.tabsScrollElement = scrollElement;
|
|
2490
|
-
scrollElement.addEventListener('scroll', this.#onTabsScroll, { passive: true });
|
|
2491
|
-
this.tabsScrollObserver = new ResizeObserver(() => {
|
|
2492
|
-
this.#updateScrollState();
|
|
2493
|
-
});
|
|
2494
|
-
this.tabsScrollObserver.observe(scrollElement);
|
|
2495
|
-
const tabList = scrollElement.querySelector('.axp-route-tab-bar__tab-list');
|
|
2496
|
-
if (tabList) {
|
|
2497
|
-
this.tabsScrollObserver.observe(tabList);
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
this.#updateScrollState();
|
|
2501
|
-
}
|
|
2502
|
-
ngOnDestroy() {
|
|
2503
|
-
this.#endMiddlePan();
|
|
2504
|
-
this.tabsScrollElement?.removeEventListener('scroll', this.#onTabsScroll);
|
|
2505
|
-
this.stripResizeObserver?.disconnect();
|
|
2506
|
-
this.tabsScrollObserver?.disconnect();
|
|
2507
|
-
}
|
|
2508
|
-
//#endregion
|
|
2509
|
-
//#region ---- Layout Helpers ----
|
|
2510
|
-
#onTabsScroll;
|
|
2511
|
-
/** Updates overflow and edge scroll affordances from the live tab strip. */
|
|
2512
|
-
#updateScrollState() {
|
|
2513
|
-
const tabsElement = this.#getTabsScrollElement();
|
|
2514
|
-
if (!tabsElement) {
|
|
2515
|
-
this.hasHorizontalOverflow.set(false);
|
|
2516
|
-
this.canScrollForward.set(false);
|
|
2517
|
-
this.canScrollBackward.set(false);
|
|
2518
|
-
return;
|
|
2519
|
-
}
|
|
2520
|
-
const hasOverflow = tabsElement.scrollWidth - tabsElement.clientWidth > 1;
|
|
2521
|
-
this.hasHorizontalOverflow.set(hasOverflow);
|
|
2522
|
-
if (!hasOverflow) {
|
|
2523
|
-
this.canScrollForward.set(false);
|
|
2524
|
-
this.canScrollBackward.set(false);
|
|
2525
|
-
return;
|
|
2526
|
-
}
|
|
2527
|
-
this.canScrollForward.set(!!this.#findScrollTarget(tabsElement, 'forward'));
|
|
2528
|
-
this.canScrollBackward.set(!!this.#findScrollTarget(tabsElement, 'backward'));
|
|
2529
|
-
}
|
|
2530
|
-
#getTabsScrollElement() {
|
|
2531
|
-
return this.tabsScrollElement ?? this.tabsScroll()?.nativeElement ?? null;
|
|
2532
|
-
}
|
|
2533
|
-
#isTabsRtl() {
|
|
2534
|
-
const tabsElement = this.#getTabsScrollElement();
|
|
2535
|
-
if (!tabsElement) {
|
|
2536
|
-
return false;
|
|
2537
|
-
}
|
|
2538
|
-
return getComputedStyle(tabsElement).direction === 'rtl';
|
|
2539
|
-
}
|
|
2540
|
-
#findScrollTarget(container, direction) {
|
|
2541
|
-
const tabs = Array.from(container.querySelectorAll('[data-tab-key]'));
|
|
2542
|
-
if (!tabs.length) {
|
|
2543
|
-
return null;
|
|
2544
|
-
}
|
|
2545
|
-
const bounds = container.getBoundingClientRect();
|
|
2546
|
-
const epsilon = 2;
|
|
2547
|
-
const isRtl = this.#isTabsRtl();
|
|
2548
|
-
if (direction === 'forward') {
|
|
2549
|
-
if (!isRtl) {
|
|
2550
|
-
return tabs.find((tab) => tab.getBoundingClientRect().right > bounds.right + epsilon) ?? null;
|
|
2551
|
-
}
|
|
2552
|
-
return [...tabs].reverse().find((tab) => tab.getBoundingClientRect().left < bounds.left - epsilon) ?? null;
|
|
2553
|
-
}
|
|
2554
|
-
if (!isRtl) {
|
|
2555
|
-
return [...tabs].reverse().find((tab) => tab.getBoundingClientRect().left < bounds.left - epsilon) ?? null;
|
|
2556
|
-
}
|
|
2557
|
-
return tabs.find((tab) => tab.getBoundingClientRect().right > bounds.right + epsilon) ?? null;
|
|
2558
|
-
}
|
|
2559
|
-
/** Scrolls the strip toward hidden tabs on the requested edge. */
|
|
2560
|
-
scrollTabs(direction) {
|
|
2561
|
-
const container = this.#getTabsScrollElement();
|
|
2562
|
-
if (!container) {
|
|
2563
|
-
return;
|
|
2564
|
-
}
|
|
2565
|
-
const target = this.#findScrollTarget(container, direction);
|
|
2566
|
-
target?.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
2567
|
-
}
|
|
2568
|
-
/** Smoothly brings a tab header into view inside the scrollable strip. */
|
|
2569
|
-
#scrollTabIntoView(key) {
|
|
2570
|
-
const scrollElement = this.#getTabsScrollElement();
|
|
2571
|
-
const activeTab = scrollElement?.querySelector(`[data-tab-key="${key}"]`);
|
|
2572
|
-
activeTab?.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
2573
|
-
}
|
|
2574
|
-
/** Starts middle-mouse drag scrolling on the tab strip. */
|
|
2575
|
-
onTabsScrollMouseDown(event) {
|
|
2576
|
-
if (event.button !== 1) {
|
|
2577
|
-
return;
|
|
2578
|
-
}
|
|
2579
|
-
if (event.target.closest('.axp-route-tab-bar__close')) {
|
|
2580
|
-
return;
|
|
2581
|
-
}
|
|
2582
|
-
const container = this.#getTabsScrollElement();
|
|
2583
|
-
if (!container) {
|
|
2584
|
-
return;
|
|
2585
|
-
}
|
|
2586
|
-
event.preventDefault();
|
|
2587
|
-
this.middlePanSession = {
|
|
2588
|
-
container,
|
|
2589
|
-
startX: event.clientX,
|
|
2590
|
-
lastX: event.clientX,
|
|
2591
|
-
moved: false,
|
|
2592
|
-
};
|
|
2593
|
-
this.isMiddlePanning.set(true);
|
|
2594
|
-
document.body.style.cursor = 'grabbing';
|
|
2595
|
-
window.addEventListener('mousemove', this.#onMiddlePanMove);
|
|
2596
|
-
window.addEventListener('mouseup', this.#onMiddlePanUp);
|
|
2597
|
-
}
|
|
2598
|
-
#onMiddlePanMove;
|
|
2599
|
-
#onMiddlePanUp;
|
|
2600
|
-
#endMiddlePan() {
|
|
2601
|
-
window.removeEventListener('mousemove', this.#onMiddlePanMove);
|
|
2602
|
-
window.removeEventListener('mouseup', this.#onMiddlePanUp);
|
|
2603
|
-
document.body.style.cursor = '';
|
|
2604
|
-
this.isMiddlePanning.set(false);
|
|
2605
|
-
this.middlePanMoved = this.middlePanSession?.moved ?? false;
|
|
2606
|
-
this.middlePanSession = null;
|
|
2607
|
-
}
|
|
2608
|
-
//#endregion
|
|
2609
|
-
//#region ---- UI Handlers ----
|
|
2610
|
-
/** Whether a tab can be dragged (home tab stays fixed at the start). */
|
|
2611
|
-
isTabDragDisabled(tab) {
|
|
2612
|
-
return tab.key === AXP_HOME_TAB_KEY;
|
|
2613
|
-
}
|
|
2614
|
-
onTabDragStarted() {
|
|
2615
|
-
this.isTabDragging.set(true);
|
|
2616
|
-
}
|
|
2617
|
-
onTabDragEnded() {
|
|
2618
|
-
queueMicrotask(() => {
|
|
2619
|
-
this.isTabDragging.set(false);
|
|
2620
|
-
});
|
|
2621
|
-
}
|
|
2622
|
-
onTabDropped(event) {
|
|
2623
|
-
this.tabNavigation.reorderTabs(event.previousIndex, event.currentIndex);
|
|
2624
|
-
}
|
|
2625
|
-
async onTabActivate(tab, event) {
|
|
2626
|
-
if (this.isTabDragging() || this.suppressTabChange()) {
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
if (event.defaultPrevented) {
|
|
2630
|
-
return;
|
|
2631
|
-
}
|
|
2632
|
-
this.#scrollTabIntoView(tab.key);
|
|
2633
|
-
if (tab.key === this.tabNavigation.activeKey()) {
|
|
2634
|
-
return;
|
|
2635
|
-
}
|
|
2636
|
-
await this.tabNavigation.activateTabKey(tab.key);
|
|
2637
|
-
}
|
|
2638
|
-
/** Resolves tab metadata for context menu actions. */
|
|
2639
|
-
findTab(key) {
|
|
2640
|
-
return this.tabNavigation.tabList().find((item) => item.key === key);
|
|
2641
|
-
}
|
|
2642
|
-
/** Normalizes menu/page icon classes for `ax-icon`. */
|
|
2643
|
-
resolveTabIcon(tab) {
|
|
2644
|
-
const icon = tab.icon?.trim();
|
|
2645
|
-
if (!icon) {
|
|
2646
|
-
return 'fa-light fa-window';
|
|
2647
|
-
}
|
|
2648
|
-
if (icon.includes(' ')) {
|
|
2649
|
-
return icon;
|
|
2650
|
-
}
|
|
2651
|
-
return `fa-light ${icon}`;
|
|
2652
|
-
}
|
|
2653
|
-
/** Closes a tab when the close button is clicked. */
|
|
2654
|
-
async onTabCloseClick(tab, event) {
|
|
2655
|
-
if (!tab.closable || tab.pinned) {
|
|
2656
|
-
return;
|
|
2657
|
-
}
|
|
2658
|
-
event.preventDefault();
|
|
2659
|
-
event.stopPropagation();
|
|
2660
|
-
this.suppressTabChange.set(true);
|
|
2661
|
-
try {
|
|
2662
|
-
await this.tabNavigation.closeTab(tab.key);
|
|
2663
|
-
}
|
|
2664
|
-
finally {
|
|
2665
|
-
this.suppressTabChange.set(false);
|
|
2666
|
-
}
|
|
2667
|
-
}
|
|
2668
|
-
/** Closes a tab on middle mouse button click (browser-style). */
|
|
2669
|
-
async onTabMiddleClick(tab, event) {
|
|
2670
|
-
if (this.middlePanMoved) {
|
|
2671
|
-
this.middlePanMoved = false;
|
|
2672
|
-
event.preventDefault();
|
|
2673
|
-
event.stopPropagation();
|
|
2674
|
-
return;
|
|
2675
|
-
}
|
|
2676
|
-
if (event.button !== 1 || !tab.closable || tab.pinned) {
|
|
2677
|
-
return;
|
|
2678
|
-
}
|
|
2679
|
-
event.preventDefault();
|
|
2680
|
-
event.stopPropagation();
|
|
2681
|
-
this.suppressTabChange.set(true);
|
|
2682
|
-
try {
|
|
2683
|
-
await this.tabNavigation.closeTab(tab.key);
|
|
2684
|
-
}
|
|
2685
|
-
finally {
|
|
2686
|
-
this.suppressTabChange.set(false);
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
async openTabContextMenu(event, key) {
|
|
2690
|
-
event.preventDefault();
|
|
2691
|
-
event.stopPropagation();
|
|
2692
|
-
this.contextTabKey.set(key);
|
|
2693
|
-
const tab = this.findTab(key);
|
|
2694
|
-
const isHomeTab = key === AXP_HOME_TAB_KEY;
|
|
2695
|
-
const closableTabs = this.tabNavigation.tabList().filter((item) => item.closable && !item.pinned);
|
|
2696
|
-
const otherClosableCount = closableTabs.filter((item) => item.key !== key).length;
|
|
2697
|
-
const canCloseTab = !!tab?.closable && !tab.pinned;
|
|
2698
|
-
const [pinText, unpinText, closeText, closeOthersText, closeAllText] = await Promise.all([
|
|
2699
|
-
this.translateService.translateAsync('@general:actions.pin-tab.title'),
|
|
2700
|
-
this.translateService.translateAsync('@general:actions.unpin-tab.title'),
|
|
2701
|
-
this.translateService.translateAsync('@general:actions.close-tab.title'),
|
|
2702
|
-
this.translateService.translateAsync('@general:actions.close-other-tabs.title'),
|
|
2703
|
-
this.translateService.translateAsync('@general:actions.close-all-tabs.title'),
|
|
2704
|
-
]);
|
|
2705
|
-
const items = [
|
|
2706
|
-
{
|
|
2707
|
-
name: 'toggle-pin',
|
|
2708
|
-
text: tab?.pinned ? unpinText : pinText,
|
|
2709
|
-
icon: tab?.pinned ? 'fa-light fa-thumbtack-slash' : 'fa-light fa-thumbtack',
|
|
2710
|
-
disabled: isHomeTab,
|
|
2711
|
-
},
|
|
2712
|
-
{
|
|
2713
|
-
name: 'close',
|
|
2714
|
-
text: closeText,
|
|
2715
|
-
icon: 'fa-light fa-xmark',
|
|
2716
|
-
disabled: !canCloseTab,
|
|
2717
|
-
break: true,
|
|
2718
|
-
},
|
|
2719
|
-
{
|
|
2720
|
-
name: 'close-others',
|
|
2721
|
-
text: closeOthersText,
|
|
2722
|
-
icon: 'fa-light fa-clone',
|
|
2723
|
-
disabled: otherClosableCount === 0,
|
|
2724
|
-
break: true,
|
|
2725
|
-
},
|
|
2726
|
-
{
|
|
2727
|
-
name: 'close-all',
|
|
2728
|
-
text: closeAllText,
|
|
2729
|
-
icon: 'fa-light fa-table-columns',
|
|
2730
|
-
disabled: closableTabs.length === 0,
|
|
2731
|
-
},
|
|
2732
|
-
];
|
|
2733
|
-
const menu = this.contextMenu();
|
|
2734
|
-
const targetElement = event.currentTarget;
|
|
2735
|
-
if (!menu) {
|
|
2736
|
-
return;
|
|
2737
|
-
}
|
|
2738
|
-
const openingEvent = {
|
|
2739
|
-
sender: menu,
|
|
2740
|
-
canceled: false,
|
|
2741
|
-
targetElement,
|
|
2742
|
-
items,
|
|
2743
|
-
};
|
|
2744
|
-
menu.showAt({ x: event.clientX, y: event.clientY }, targetElement, openingEvent);
|
|
2745
|
-
}
|
|
2746
|
-
async handleTabContextMenuItemClick(event) {
|
|
2747
|
-
const key = this.contextTabKey();
|
|
2748
|
-
if (!key) {
|
|
2749
|
-
return;
|
|
2750
|
-
}
|
|
2751
|
-
const action = event.item.name;
|
|
2752
|
-
this.suppressTabChange.set(true);
|
|
2753
|
-
try {
|
|
2754
|
-
switch (action) {
|
|
2755
|
-
case 'toggle-pin':
|
|
2756
|
-
this.tabNavigation.toggleTabPinned(key);
|
|
2757
|
-
break;
|
|
2758
|
-
case 'close':
|
|
2759
|
-
await this.tabNavigation.closeTab(key);
|
|
2760
|
-
break;
|
|
2761
|
-
case 'close-others':
|
|
2762
|
-
await this.tabNavigation.closeOtherTabs(key);
|
|
2763
|
-
break;
|
|
2764
|
-
case 'close-all':
|
|
2765
|
-
await this.tabNavigation.closeAllTabs();
|
|
2766
|
-
break;
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
finally {
|
|
2770
|
-
this.suppressTabChange.set(false);
|
|
2771
|
-
this.contextTabKey.set(null);
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
//#endregion
|
|
2775
|
-
//#region ---- Tab Strip Sync ----
|
|
2776
|
-
/** Scrolls the active tab into view when the strip overflows horizontally. */
|
|
2777
|
-
#scrollActiveTabIntoView;
|
|
2778
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRouteTabBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2779
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRouteTabBarComponent, isStandalone: true, selector: "axp-route-tab-bar", host: { properties: { "class.axp-route-tab-bar--scrollable": "hasHorizontalOverflow()" }, classAttribute: "axp-route-tab-bar" }, viewQueries: [{ propertyName: "tabStrip", first: true, predicate: ["tabStrip"], descendants: true, isSignal: true }, { propertyName: "tabsScroll", first: true, predicate: ["tabsScroll"], descendants: true, isSignal: true }, { propertyName: "contextMenu", first: true, predicate: ["tabContextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (tabNavigation.isTabBarVisible()) {\n <div class=\"axp-route-tab-bar__strip\" #tabStrip [style.--axp-tab-width.px]=\"tabWidthPx()\">\n <div class=\"axp-route-tab-bar__viewport\">\n @if (canScrollBackward()) {\n <div class=\"axp-route-tab-bar__scroll-rail axp-route-tab-bar__scroll-rail--start\">\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__scroll-btn\"\n [title]=\"'@general:actions.scroll-tabs-back.title' | translate | async\"\n [attr.aria-label]=\"'@general:actions.scroll-tabs-back.title' | translate | async\"\n (click)=\"scrollTabs('backward')\"\n >\n <ax-icon [icon]=\"scrollBackwardIcon()\"></ax-icon>\n </button>\n </div>\n }\n\n <div\n class=\"axp-route-tab-bar__scroll-wrap\"\n [class.axp-route-tab-bar__scroll-wrap--overflow-start]=\"canScrollBackward()\"\n [class.axp-route-tab-bar__scroll-wrap--overflow-end]=\"canScrollForward()\"\n >\n <div\n #tabsScroll\n class=\"axp-route-tab-bar__scroll\"\n [class.axp-route-tab-bar__scroll--panning]=\"isMiddlePanning()\"\n (mousedown)=\"onTabsScrollMouseDown($event)\"\n >\n <div\n class=\"axp-route-tab-bar__tab-list\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListData]=\"tabNavigation.tabList()\"\n (cdkDropListDropped)=\"onTabDropped($event)\"\n >\n @for (tab of tabNavigation.tabList(); track tab.key) {\n @let tabTitle = (tab.title | translate | async) || '';\n <div\n class=\"axp-route-tab-bar__tab\"\n [class.axp-route-tab-bar__tab--active]=\"tabNavigation.activeKey() === tab.key\"\n [class.axp-route-tab-bar__tab--dragging]=\"isTabDragging()\"\n [attr.data-tab-key]=\"tab.key\"\n role=\"tab\"\n [attr.aria-selected]=\"tabNavigation.activeKey() === tab.key\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragData]=\"tab\"\n [cdkDragDisabled]=\"isTabDragDisabled(tab)\"\n (cdkDragStarted)=\"onTabDragStarted()\"\n (cdkDragEnded)=\"onTabDragEnded()\"\n (click)=\"onTabActivate(tab, $event)\"\n >\n <div\n class=\"axp-route-tab-bar__tab-inner\"\n cdkDragHandle\n [title]=\"tabTitle\"\n (contextmenu)=\"openTabContextMenu($event, tab.key)\"\n (auxclick)=\"onTabMiddleClick(tab, $event)\"\n >\n @if (tabPreviewService.previews()[tab.key]?.isDirty) {\n <span\n class=\"axp-route-tab-bar__dirty-badge\"\n [attr.aria-label]=\"'@general:terms.interface.save-status.not-saved.title' | translate | async\"\n ></span>\n }\n\n <span class=\"axp-route-tab-bar__tab-icon\" aria-hidden=\"true\">\n <ax-icon [icon]=\"resolveTabIcon(tab)\"></ax-icon>\n </span>\n\n <span class=\"axp-route-tab-bar__tab-title-fade\" axpRouteTabTitleOverflow>\n <span class=\"axp-route-tab-bar__tab-title\">{{ tabTitle }}</span>\n </span>\n\n @if (tab.pinned) {\n <span class=\"axp-route-tab-bar__pin\" aria-hidden=\"true\">\n <ax-icon icon=\"fa-solid fa-thumbtack\"></ax-icon>\n </span>\n } @else if (tab.closable) {\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__close\"\n [title]=\"'@general:actions.close-tab.title' | translate | async\"\n (click)=\"onTabCloseClick(tab, $event)\"\n >\n <ax-icon icon=\"far fa-xmark\"></ax-icon>\n </button>\n }\n </div>\n\n <ng-template cdkDragPreview>\n <div\n class=\"axp-route-tab-bar__drag-preview\"\n [class.axp-route-tab-bar__drag-preview--in-header]=\"inHeader()\"\n [class.axp-route-tab-bar__drag-preview--active]=\"tabNavigation.activeKey() === tab.key\"\n [style.width.px]=\"tabWidthPx()\"\n >\n <div class=\"axp-route-tab-bar__drag-preview-inner\">\n <span class=\"axp-route-tab-bar__tab-icon\" aria-hidden=\"true\">\n <ax-icon [icon]=\"resolveTabIcon(tab)\"></ax-icon>\n </span>\n <span class=\"axp-route-tab-bar__tab-title\">{{ tabTitle }}</span>\n </div>\n </div>\n </ng-template>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (canScrollForward()) {\n <div class=\"axp-route-tab-bar__scroll-rail axp-route-tab-bar__scroll-rail--end\">\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__scroll-btn\"\n [title]=\"'@general:actions.scroll-tabs-forward.title' | translate | async\"\n [attr.aria-label]=\"'@general:actions.scroll-tabs-forward.title' | translate | async\"\n (click)=\"scrollTabs('forward')\"\n >\n <ax-icon [icon]=\"scrollForwardIcon()\"></ax-icon>\n </button>\n </div>\n }\n </div>\n </div>\n}\n\n<ax-context-menu\n #tabContextMenu\n [closeOn]=\"'click'\"\n [orientation]=\"'vertical'\"\n (onItemClick)=\"handleTabContextMenuItemClick($event)\"\n></ax-context-menu>\n", styles: ["axp-route-tab-bar{display:block;min-width:0;--axp-route-tab-bar-fade: var(--ax-sys-color-lightest-surface);--axp-route-tab-bar-chevron-size: 2rem}axp-route-tab-bar .axp-route-tab-bar__strip{display:flex;align-items:stretch;gap:.5rem;min-width:0}axp-route-tab-bar .axp-route-tab-bar__viewport{display:flex;flex-direction:row;align-items:center;flex:1 1 auto;min-width:0;height:100%;gap:.25rem}axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs,axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs .ax-tabs-scroll-area,axp-route-tab-bar .axp-route-tab-bar__viewport .axp-route-tab-bar__tab-list{overflow:visible!important;scrollbar-width:none!important;-ms-overflow-style:none!important}axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs::-webkit-scrollbar,axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs .ax-tabs-scroll-area::-webkit-scrollbar,axp-route-tab-bar .axp-route-tab-bar__viewport .axp-route-tab-bar__tab-list::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}axp-route-tab-bar .axp-route-tab-bar__scroll-rail{display:flex;flex:0 0 var(--axp-route-tab-bar-chevron-size);align-items:center;justify-content:center;align-self:center;width:var(--axp-route-tab-bar-chevron-size);min-width:var(--axp-route-tab-bar-chevron-size);height:var(--axp-route-tab-bar-tab-row-height, 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap{position:relative;flex:1 1 auto;min-width:0;height:100%;overflow:hidden}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before,axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{content:\"\";position:absolute;inset-block:0;width:1.5rem;z-index:1;pointer-events:none}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before{inset-inline-start:0;background:linear-gradient(to right,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{inset-inline-end:0;background:linear-gradient(to left,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before{background:linear-gradient(to left,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{background:linear-gradient(to right,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll{width:100%;min-width:0;height:100%;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;cursor:default;scrollbar-width:none!important;-ms-overflow-style:none!important}axp-route-tab-bar .axp-route-tab-bar__scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;background:transparent!important}axp-route-tab-bar .axp-route-tab-bar__scroll.axp-route-tab-bar__scroll--panning,axp-route-tab-bar .axp-route-tab-bar__scroll.axp-route-tab-bar__scroll--panning *{cursor:grabbing!important;-webkit-user-select:none;user-select:none}axp-route-tab-bar .axp-route-tab-bar__tabs-host{height:100%;min-width:0;width:max-content}axp-route-tab-bar .axp-route-tab-bar__tab-list{display:flex;flex:none;flex-wrap:nowrap;align-items:stretch;width:max-content;min-width:max-content;height:100%;gap:.5rem}axp-route-tab-bar .axp-route-tab-bar__tab{cursor:pointer;flex:0 0 var(--axp-tab-width, 5.5rem);width:var(--axp-tab-width, 5.5rem);min-width:var(--axp-tab-width, 5.5rem);max-width:var(--axp-tab-width, 5.5rem);height:100%;transform:translateY(0);transition:background-color .15s ease,color .15s ease,border-color .15s ease,transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-disabled{cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-dragging,axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-dragging .axp-route-tab-bar__tab-inner{cursor:grabbing}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-placeholder{opacity:.35}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-animating{transition:transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__tab-list.cdk-drop-list-dragging .axp-route-tab-bar__tab:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__scroll-btn{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin:0;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.88;border-radius:var(--ax-sys-border-radius);transition:opacity .15s ease}axp-route-tab-bar .axp-route-tab-bar__scroll-btn ax-icon{font-size:.75rem}axp-route-tab-bar .axp-route-tab-bar__scroll-btn:hover{opacity:1}axp-route-tab-bar .axp-route-tab-bar__scroll-btn:focus-visible{opacity:1;outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:1px}axp-route-tab-bar .axp-route-tab-bar__tab-inner{position:relative;display:flex;justify-content:space-between;width:100%;align-items:center;gap:.375rem;min-width:0;max-width:100%;height:100%;padding-inline:.625rem;cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__tab-inner.cdk-drag-handle{cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__dirty-badge{position:absolute;top:.25rem;inset-inline-end:.25rem;width:.4375rem;height:.4375rem;border-radius:50%;background:rgb(var(--ax-sys-color-warning-500));border:1px solid rgb(var(--ax-sys-color-lightest-surface));pointer-events:none;z-index:1}axp-route-tab-bar .axp-route-tab-bar__tab-icon{display:inline-flex;flex-shrink:0}axp-route-tab-bar .axp-route-tab-bar__tab-icon ax-icon{font-size:.875rem}axp-route-tab-bar .axp-route-tab-bar__tab-title-fade{position:relative;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden}axp-route-tab-bar .axp-route-tab-bar__tab-title{display:block;width:100%;white-space:nowrap;overflow:hidden;font-size:.875rem;line-height:1.25rem}axp-route-tab-bar .axp-route-tab-bar__tab-title-fade--overflowing .axp-route-tab-bar__tab-title{-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 1.25rem),transparent 100%);mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 1.25rem),transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__tab-title-fade--overflowing .axp-route-tab-bar__tab-title{-webkit-mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 1.25rem),transparent 100%);mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 1.25rem),transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__pin{display:inline-flex;flex-shrink:0;color:inherit}axp-route-tab-bar .axp-route-tab-bar__pin ax-icon{font-size:.6875rem}axp-route-tab-bar .axp-route-tab-bar__close{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:0;height:1.25rem;margin:0;padding:0;overflow:hidden;border:none;background:transparent;color:inherit;border-radius:var(--ax-sys-border-radius);opacity:0;pointer-events:none;cursor:pointer;transition:opacity .15s ease,width .15s ease,background-color .15s ease}axp-route-tab-bar .axp-route-tab-bar__close ax-icon{font-size:.75rem}axp-route-tab-bar .axp-route-tab-bar__tab:hover .axp-route-tab-bar__close,axp-route-tab-bar .axp-route-tab-bar__close:focus-visible{width:1.25rem;opacity:.72;pointer-events:auto}axp-route-tab-bar .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header){border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__strip{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));padding-inline:.5rem}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab:hover:not(.axp-route-tab-bar__tab--active){background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header{align-self:stretch;height:100%;--axp-route-tab-bar-fade: var(--ax-sys-color-primary-surface);--axp-route-tab-bar-tab-row-height: 2.25rem}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__strip{display:flex;align-self:stretch;height:100%;align-items:stretch;background:transparent;color:rgb(var(--ax-sys-color-on-primary-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__viewport{align-items:flex-end}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-rail{align-self:flex-end;margin-bottom:0}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-wrap--overflow-start:before,axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-wrap--overflow-end:after{inset-block-end:0;inset-block-start:auto;height:var(--axp-route-tab-bar-tab-row-height)}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll{cursor:default}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab-list{align-self:stretch;align-items:flex-end;min-height:0;padding-top:1rem}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab{align-self:center;padding:0;border-top-left-radius:.5rem;border-top-right-radius:.5rem;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:rgb(var(--ax-sys-color-primary-dark-surface));color:rgb(var(--ax-sys-color-on-primary-dark-surface));border-color:rgb(var(--ax-sys-color-border-primary-dark-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab ax-icon{color:inherit}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab:hover:not(.axp-route-tab-bar__tab--active){background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-primary-darkest-surface));color:rgb(var(--ax-sys-color-on-primary-darkest-surface));border-color:rgb(var(--ax-sys-color-border-primary-darkest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview{display:flex;align-items:center;box-sizing:border-box;height:var(--axp-route-tab-bar-tab-row-height, 2.25rem);opacity:.96;cursor:grabbing;box-shadow:0 4px 12px rgb(var(--ax-sys-color-dark)/.16),0 1px 3px rgb(var(--ax-sys-color-dark)/.12)}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__drag-preview-inner{display:flex;align-items:center;gap:.5rem;width:100%;min-width:0;height:100%;padding-inline:.625rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-icon{display:inline-flex;flex-shrink:0}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-icon ax-icon{font-size:.875rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header{border-top-left-radius:.5rem;border-top-right-radius:.5rem;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:rgb(var(--ax-sys-color-primary-dark-surface));color:rgb(var(--ax-sys-color-on-primary-dark-surface));border-color:rgb(var(--ax-sys-color-border-primary-dark-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header.axp-route-tab-bar__drag-preview--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header.axp-route-tab-bar__drag-preview--active:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-primary-darkest-surface));color:rgb(var(--ax-sys-color-on-primary-darkest-surface));border-color:rgb(var(--ax-sys-color-border-primary-darkest-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview:not(.axp-route-tab-bar__drag-preview--in-header){border-radius:.375rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview:not(.axp-route-tab-bar__drag-preview--in-header).axp-route-tab-bar__drag-preview--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "closeOnRouteChange", "items", "target"], outputs: ["onItemClick", "onOpening", "onClose"] }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2780
|
-
}
|
|
2781
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRouteTabBarComponent, decorators: [{
|
|
2782
|
-
type: Component,
|
|
2783
|
-
args: [{ selector: 'axp-route-tab-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2784
|
-
class: 'axp-route-tab-bar',
|
|
2785
|
-
'[class.axp-route-tab-bar--scrollable]': 'hasHorizontalOverflow()',
|
|
2786
|
-
}, imports: [
|
|
2787
|
-
CdkDropList,
|
|
2788
|
-
CdkDrag,
|
|
2789
|
-
CdkDragHandle,
|
|
2790
|
-
CdkDragPreview,
|
|
2791
|
-
AXDecoratorModule,
|
|
2792
|
-
AXTranslationModule,
|
|
2793
|
-
AXContextMenuComponent,
|
|
2794
|
-
AsyncPipe,
|
|
2795
|
-
], template: "@if (tabNavigation.isTabBarVisible()) {\n <div class=\"axp-route-tab-bar__strip\" #tabStrip [style.--axp-tab-width.px]=\"tabWidthPx()\">\n <div class=\"axp-route-tab-bar__viewport\">\n @if (canScrollBackward()) {\n <div class=\"axp-route-tab-bar__scroll-rail axp-route-tab-bar__scroll-rail--start\">\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__scroll-btn\"\n [title]=\"'@general:actions.scroll-tabs-back.title' | translate | async\"\n [attr.aria-label]=\"'@general:actions.scroll-tabs-back.title' | translate | async\"\n (click)=\"scrollTabs('backward')\"\n >\n <ax-icon [icon]=\"scrollBackwardIcon()\"></ax-icon>\n </button>\n </div>\n }\n\n <div\n class=\"axp-route-tab-bar__scroll-wrap\"\n [class.axp-route-tab-bar__scroll-wrap--overflow-start]=\"canScrollBackward()\"\n [class.axp-route-tab-bar__scroll-wrap--overflow-end]=\"canScrollForward()\"\n >\n <div\n #tabsScroll\n class=\"axp-route-tab-bar__scroll\"\n [class.axp-route-tab-bar__scroll--panning]=\"isMiddlePanning()\"\n (mousedown)=\"onTabsScrollMouseDown($event)\"\n >\n <div\n class=\"axp-route-tab-bar__tab-list\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListData]=\"tabNavigation.tabList()\"\n (cdkDropListDropped)=\"onTabDropped($event)\"\n >\n @for (tab of tabNavigation.tabList(); track tab.key) {\n @let tabTitle = (tab.title | translate | async) || '';\n <div\n class=\"axp-route-tab-bar__tab\"\n [class.axp-route-tab-bar__tab--active]=\"tabNavigation.activeKey() === tab.key\"\n [class.axp-route-tab-bar__tab--dragging]=\"isTabDragging()\"\n [attr.data-tab-key]=\"tab.key\"\n role=\"tab\"\n [attr.aria-selected]=\"tabNavigation.activeKey() === tab.key\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragData]=\"tab\"\n [cdkDragDisabled]=\"isTabDragDisabled(tab)\"\n (cdkDragStarted)=\"onTabDragStarted()\"\n (cdkDragEnded)=\"onTabDragEnded()\"\n (click)=\"onTabActivate(tab, $event)\"\n >\n <div\n class=\"axp-route-tab-bar__tab-inner\"\n cdkDragHandle\n [title]=\"tabTitle\"\n (contextmenu)=\"openTabContextMenu($event, tab.key)\"\n (auxclick)=\"onTabMiddleClick(tab, $event)\"\n >\n @if (tabPreviewService.previews()[tab.key]?.isDirty) {\n <span\n class=\"axp-route-tab-bar__dirty-badge\"\n [attr.aria-label]=\"'@general:terms.interface.save-status.not-saved.title' | translate | async\"\n ></span>\n }\n\n <span class=\"axp-route-tab-bar__tab-icon\" aria-hidden=\"true\">\n <ax-icon [icon]=\"resolveTabIcon(tab)\"></ax-icon>\n </span>\n\n <span class=\"axp-route-tab-bar__tab-title-fade\" axpRouteTabTitleOverflow>\n <span class=\"axp-route-tab-bar__tab-title\">{{ tabTitle }}</span>\n </span>\n\n @if (tab.pinned) {\n <span class=\"axp-route-tab-bar__pin\" aria-hidden=\"true\">\n <ax-icon icon=\"fa-solid fa-thumbtack\"></ax-icon>\n </span>\n } @else if (tab.closable) {\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__close\"\n [title]=\"'@general:actions.close-tab.title' | translate | async\"\n (click)=\"onTabCloseClick(tab, $event)\"\n >\n <ax-icon icon=\"far fa-xmark\"></ax-icon>\n </button>\n }\n </div>\n\n <ng-template cdkDragPreview>\n <div\n class=\"axp-route-tab-bar__drag-preview\"\n [class.axp-route-tab-bar__drag-preview--in-header]=\"inHeader()\"\n [class.axp-route-tab-bar__drag-preview--active]=\"tabNavigation.activeKey() === tab.key\"\n [style.width.px]=\"tabWidthPx()\"\n >\n <div class=\"axp-route-tab-bar__drag-preview-inner\">\n <span class=\"axp-route-tab-bar__tab-icon\" aria-hidden=\"true\">\n <ax-icon [icon]=\"resolveTabIcon(tab)\"></ax-icon>\n </span>\n <span class=\"axp-route-tab-bar__tab-title\">{{ tabTitle }}</span>\n </div>\n </div>\n </ng-template>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (canScrollForward()) {\n <div class=\"axp-route-tab-bar__scroll-rail axp-route-tab-bar__scroll-rail--end\">\n <button\n type=\"button\"\n class=\"axp-route-tab-bar__scroll-btn\"\n [title]=\"'@general:actions.scroll-tabs-forward.title' | translate | async\"\n [attr.aria-label]=\"'@general:actions.scroll-tabs-forward.title' | translate | async\"\n (click)=\"scrollTabs('forward')\"\n >\n <ax-icon [icon]=\"scrollForwardIcon()\"></ax-icon>\n </button>\n </div>\n }\n </div>\n </div>\n}\n\n<ax-context-menu\n #tabContextMenu\n [closeOn]=\"'click'\"\n [orientation]=\"'vertical'\"\n (onItemClick)=\"handleTabContextMenuItemClick($event)\"\n></ax-context-menu>\n", styles: ["axp-route-tab-bar{display:block;min-width:0;--axp-route-tab-bar-fade: var(--ax-sys-color-lightest-surface);--axp-route-tab-bar-chevron-size: 2rem}axp-route-tab-bar .axp-route-tab-bar__strip{display:flex;align-items:stretch;gap:.5rem;min-width:0}axp-route-tab-bar .axp-route-tab-bar__viewport{display:flex;flex-direction:row;align-items:center;flex:1 1 auto;min-width:0;height:100%;gap:.25rem}axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs,axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs .ax-tabs-scroll-area,axp-route-tab-bar .axp-route-tab-bar__viewport .axp-route-tab-bar__tab-list{overflow:visible!important;scrollbar-width:none!important;-ms-overflow-style:none!important}axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs::-webkit-scrollbar,axp-route-tab-bar .axp-route-tab-bar__viewport ax-tabs .ax-tabs-scroll-area::-webkit-scrollbar,axp-route-tab-bar .axp-route-tab-bar__viewport .axp-route-tab-bar__tab-list::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}axp-route-tab-bar .axp-route-tab-bar__scroll-rail{display:flex;flex:0 0 var(--axp-route-tab-bar-chevron-size);align-items:center;justify-content:center;align-self:center;width:var(--axp-route-tab-bar-chevron-size);min-width:var(--axp-route-tab-bar-chevron-size);height:var(--axp-route-tab-bar-tab-row-height, 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap{position:relative;flex:1 1 auto;min-width:0;height:100%;overflow:hidden}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before,axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{content:\"\";position:absolute;inset-block:0;width:1.5rem;z-index:1;pointer-events:none}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before{inset-inline-start:0;background:linear-gradient(to right,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{inset-inline-end:0;background:linear-gradient(to left,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-start:before{background:linear-gradient(to left,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__scroll-wrap--overflow-end:after{background:linear-gradient(to right,rgb(var(--axp-route-tab-bar-fade)) 0%,rgb(var(--axp-route-tab-bar-fade)/.72) 35%,transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__scroll{width:100%;min-width:0;height:100%;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;cursor:default;scrollbar-width:none!important;-ms-overflow-style:none!important}axp-route-tab-bar .axp-route-tab-bar__scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;background:transparent!important}axp-route-tab-bar .axp-route-tab-bar__scroll.axp-route-tab-bar__scroll--panning,axp-route-tab-bar .axp-route-tab-bar__scroll.axp-route-tab-bar__scroll--panning *{cursor:grabbing!important;-webkit-user-select:none;user-select:none}axp-route-tab-bar .axp-route-tab-bar__tabs-host{height:100%;min-width:0;width:max-content}axp-route-tab-bar .axp-route-tab-bar__tab-list{display:flex;flex:none;flex-wrap:nowrap;align-items:stretch;width:max-content;min-width:max-content;height:100%;gap:.5rem}axp-route-tab-bar .axp-route-tab-bar__tab{cursor:pointer;flex:0 0 var(--axp-tab-width, 5.5rem);width:var(--axp-tab-width, 5.5rem);min-width:var(--axp-tab-width, 5.5rem);max-width:var(--axp-tab-width, 5.5rem);height:100%;transform:translateY(0);transition:background-color .15s ease,color .15s ease,border-color .15s ease,transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-disabled{cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-dragging,axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-dragging .axp-route-tab-bar__tab-inner{cursor:grabbing}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-placeholder{opacity:.35}axp-route-tab-bar .axp-route-tab-bar__tab.cdk-drag-animating{transition:transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__tab-list.cdk-drop-list-dragging .axp-route-tab-bar__tab:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.4,0,.2,1)}axp-route-tab-bar .axp-route-tab-bar__scroll-btn{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin:0;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.88;border-radius:var(--ax-sys-border-radius);transition:opacity .15s ease}axp-route-tab-bar .axp-route-tab-bar__scroll-btn ax-icon{font-size:.75rem}axp-route-tab-bar .axp-route-tab-bar__scroll-btn:hover{opacity:1}axp-route-tab-bar .axp-route-tab-bar__scroll-btn:focus-visible{opacity:1;outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:1px}axp-route-tab-bar .axp-route-tab-bar__tab-inner{position:relative;display:flex;justify-content:space-between;width:100%;align-items:center;gap:.375rem;min-width:0;max-width:100%;height:100%;padding-inline:.625rem;cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__tab-inner.cdk-drag-handle{cursor:pointer}axp-route-tab-bar .axp-route-tab-bar__dirty-badge{position:absolute;top:.25rem;inset-inline-end:.25rem;width:.4375rem;height:.4375rem;border-radius:50%;background:rgb(var(--ax-sys-color-warning-500));border:1px solid rgb(var(--ax-sys-color-lightest-surface));pointer-events:none;z-index:1}axp-route-tab-bar .axp-route-tab-bar__tab-icon{display:inline-flex;flex-shrink:0}axp-route-tab-bar .axp-route-tab-bar__tab-icon ax-icon{font-size:.875rem}axp-route-tab-bar .axp-route-tab-bar__tab-title-fade{position:relative;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden}axp-route-tab-bar .axp-route-tab-bar__tab-title{display:block;width:100%;white-space:nowrap;overflow:hidden;font-size:.875rem;line-height:1.25rem}axp-route-tab-bar .axp-route-tab-bar__tab-title-fade--overflowing .axp-route-tab-bar__tab-title{-webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 1.25rem),transparent 100%);mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 1.25rem),transparent 100%)}[dir=rtl] axp-route-tab-bar .axp-route-tab-bar__tab-title-fade--overflowing .axp-route-tab-bar__tab-title{-webkit-mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 1.25rem),transparent 100%);mask-image:linear-gradient(to left,#000 0,#000 calc(100% - 1.25rem),transparent 100%)}axp-route-tab-bar .axp-route-tab-bar__pin{display:inline-flex;flex-shrink:0;color:inherit}axp-route-tab-bar .axp-route-tab-bar__pin ax-icon{font-size:.6875rem}axp-route-tab-bar .axp-route-tab-bar__close{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:0;height:1.25rem;margin:0;padding:0;overflow:hidden;border:none;background:transparent;color:inherit;border-radius:var(--ax-sys-border-radius);opacity:0;pointer-events:none;cursor:pointer;transition:opacity .15s ease,width .15s ease,background-color .15s ease}axp-route-tab-bar .axp-route-tab-bar__close ax-icon{font-size:.75rem}axp-route-tab-bar .axp-route-tab-bar__tab:hover .axp-route-tab-bar__close,axp-route-tab-bar .axp-route-tab-bar__close:focus-visible{width:1.25rem;opacity:.72;pointer-events:auto}axp-route-tab-bar .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header){border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__strip{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));padding-inline:.5rem}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab:hover:not(.axp-route-tab-bar__tab--active){background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}axp-route-tab-bar:not(.axp-route-tab-bar--in-header) .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header{align-self:stretch;height:100%;--axp-route-tab-bar-fade: var(--ax-sys-color-primary-surface);--axp-route-tab-bar-tab-row-height: 2.25rem}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__strip{display:flex;align-self:stretch;height:100%;align-items:stretch;background:transparent;color:rgb(var(--ax-sys-color-on-primary-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__viewport{align-items:flex-end}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-rail{align-self:flex-end;margin-bottom:0}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-wrap--overflow-start:before,axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll-wrap--overflow-end:after{inset-block-end:0;inset-block-start:auto;height:var(--axp-route-tab-bar-tab-row-height)}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__scroll{cursor:default}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab-list{align-self:stretch;align-items:flex-end;min-height:0;padding-top:1rem}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab{align-self:center;padding:0;border-top-left-radius:.5rem;border-top-right-radius:.5rem;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:rgb(var(--ax-sys-color-primary-dark-surface));color:rgb(var(--ax-sys-color-on-primary-dark-surface));border-color:rgb(var(--ax-sys-color-border-primary-dark-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab ax-icon{color:inherit}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab:hover:not(.axp-route-tab-bar__tab--active){background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-primary-darkest-surface));color:rgb(var(--ax-sys-color-on-primary-darkest-surface));border-color:rgb(var(--ax-sys-color-border-primary-darkest-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}axp-route-tab-bar.axp-route-tab-bar--in-header .axp-route-tab-bar__tab.axp-route-tab-bar__tab--active .axp-route-tab-bar__close:hover{background-color:rgb(var(--ax-sys-color-primary-light-surface));color:rgb(var(--ax-sys-color-on-primary-light-surface));border-color:rgb(var(--ax-sys-color-border-primary-light-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview{display:flex;align-items:center;box-sizing:border-box;height:var(--axp-route-tab-bar-tab-row-height, 2.25rem);opacity:.96;cursor:grabbing;box-shadow:0 4px 12px rgb(var(--ax-sys-color-dark)/.16),0 1px 3px rgb(var(--ax-sys-color-dark)/.12)}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__drag-preview-inner{display:flex;align-items:center;gap:.5rem;width:100%;min-width:0;height:100%;padding-inline:.625rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-icon{display:inline-flex;flex-shrink:0}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-icon ax-icon{font-size:.875rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview .axp-route-tab-bar__tab-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header{border-top-left-radius:.5rem;border-top-right-radius:.5rem;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:rgb(var(--ax-sys-color-primary-dark-surface));color:rgb(var(--ax-sys-color-on-primary-dark-surface));border-color:rgb(var(--ax-sys-color-border-primary-dark-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header.axp-route-tab-bar__drag-preview--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview.axp-route-tab-bar__drag-preview--in-header.axp-route-tab-bar__drag-preview--active:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-primary-darkest-surface));color:rgb(var(--ax-sys-color-on-primary-darkest-surface));border-color:rgb(var(--ax-sys-color-border-primary-darkest-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview:not(.axp-route-tab-bar__drag-preview--in-header){border-radius:.375rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.cdk-drag-preview.axp-route-tab-bar__drag-preview:not(.axp-route-tab-bar__drag-preview--in-header).axp-route-tab-bar__drag-preview--active{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}\n"] }]
|
|
2796
|
-
}], propDecorators: { tabStrip: [{ type: i0.ViewChild, args: ['tabStrip', { isSignal: true }] }], tabsScroll: [{ type: i0.ViewChild, args: ['tabsScroll', { isSignal: true }] }], contextMenu: [{ type: i0.ViewChild, args: ['tabContextMenu', { isSignal: true }] }] } });
|
|
2797
|
-
|
|
2798
2372
|
class AXPRootLayoutHeaderComponent {
|
|
2799
2373
|
//#endregion
|
|
2800
2374
|
//#region ---- Lifecycle Methods ----
|
|
@@ -2805,7 +2379,6 @@ class AXPRootLayoutHeaderComponent {
|
|
|
2805
2379
|
this.destroyRef = inject(DestroyRef);
|
|
2806
2380
|
this.shortcutRegistry = inject(AXPKeyboardShortcutRegistry);
|
|
2807
2381
|
this.store = inject(AXPLayoutThemeService);
|
|
2808
|
-
this.tabNavigation = inject(AXPTabNavigationService);
|
|
2809
2382
|
this.logo = this.config.logo;
|
|
2810
2383
|
this.shortcutRegistry.register({
|
|
2811
2384
|
owner: this.destroyRef,
|
|
@@ -2833,13 +2406,15 @@ class AXPRootLayoutHeaderComponent {
|
|
|
2833
2406
|
this.router.navigate(['/']);
|
|
2834
2407
|
}
|
|
2835
2408
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2836
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutHeaderComponent, isStandalone: true, selector: "axp-dashboard-admin-header", host: { classAttribute: "ax-w-full ax-flex ax-
|
|
2409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutHeaderComponent, isStandalone: true, selector: "axp-dashboard-admin-header", host: { classAttribute: "ax-w-full ax-flex ax-items-center ax-justify-between ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-2 ax-light" }, ngImport: i0, template: "<ax-button id=\"axp-menu-toggle\" (onClick)=\"toggleSideMenu()\" color=\"primary\">\n <ax-icon class=\"rtl:ax-rotate-180\">\n <svg width=\"28\" height=\"28\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n @if (store.isSideMenuOpen()) {\n <defs>\n <clipPath id=\"clip1382_20239\">\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1382_20239)\">\n <rect\n id=\"rect\"\n x=\"17.420410\"\n y=\"12.316406\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(137.159 17.420410 12.316406)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"12.959473\"\n y=\"13.728516\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(40.853 12.959473 13.728516)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.1 25.5L9.9 25.51C9.48 25.51 9.06 25.47 8.65 25.39C8.24 25.3 7.84 25.18 7.45 25.02C7.06 24.86 6.69 24.66 6.34 24.43C5.99 24.19 5.67 23.92 5.37 23.63C5.07 23.33 4.81 23 4.58 22.65C4.34 22.3 4.15 21.93 3.98 21.54C3.82 21.15 3.7 20.75 3.62 20.34C3.54 19.93 3.5 19.51 3.5 19.09L3.5 10.93C3.5 10.51 3.54 10.1 3.62 9.68C3.7 9.27 3.82 8.87 3.98 8.48C4.15 8.09 4.34 7.72 4.58 7.37C4.81 7.02 5.07 6.69 5.37 6.39C5.67 6.1 5.99 5.83 6.34 5.6C6.69 5.36 7.06 5.16 7.45 5C7.84 4.84 8.24 4.72 8.65 4.64C9.06 4.55 9.48 4.51 9.9 4.51L20.1 4.5C20.52 4.5 20.94 4.54 21.35 4.62C21.76 4.7 22.16 4.83 22.55 4.99C22.94 5.15 23.31 5.35 23.66 5.58C24 5.82 24.33 6.08 24.62 6.38C24.92 6.68 25.19 7 25.42 7.35C25.65 7.7 25.85 8.07 26.01 8.46C26.17 8.85 26.3 9.25 26.38 9.67C26.46 10.08 26.5 10.5 26.5 10.92L26.5 19.07C26.5 19.5 26.46 19.91 26.38 20.32C26.3 20.74 26.17 21.14 26.01 21.53C25.85 21.92 25.65 22.29 25.42 22.64C25.19 22.99 24.92 23.31 24.62 23.61C24.33 23.91 24 24.17 23.66 24.41C23.31 24.64 22.94 24.84 22.55 25C22.16 25.16 21.76 25.29 21.35 25.37C20.94 25.45 20.52 25.5 20.1 25.5ZM9.9 6.6C9.61 6.6 9.33 6.63 9.05 6.69C8.78 6.74 8.51 6.82 8.24 6.93C7.98 7.04 7.73 7.18 7.5 7.33C7.26 7.49 7.04 7.67 6.84 7.87C6.64 8.07 6.46 8.29 6.31 8.53C6.15 8.77 6.02 9.01 5.91 9.28C5.8 9.54 5.72 9.81 5.66 10.09C5.61 10.37 5.58 10.65 5.58 10.93L5.58 19.09C5.58 19.37 5.61 19.65 5.66 19.93C5.72 20.21 5.8 20.48 5.91 20.74C6.02 21.01 6.15 21.26 6.31 21.49C6.46 21.73 6.64 21.95 6.84 22.15C7.04 22.35 7.26 22.53 7.5 22.69C7.73 22.85 7.98 22.98 8.24 23.09C8.51 23.2 8.78 23.28 9.05 23.33C9.33 23.39 9.61 23.42 9.9 23.42L20.1 23.41C20.38 23.41 20.67 23.37 20.94 23.32C21.22 23.26 21.49 23.18 21.75 23.07C22.01 22.96 22.26 22.83 22.5 22.67C22.73 22.51 22.95 22.33 23.15 22.13C23.35 21.93 23.53 21.71 23.69 21.48C23.85 21.24 23.98 20.99 24.09 20.73C24.2 20.47 24.28 20.2 24.33 19.92C24.39 19.64 24.42 19.36 24.42 19.07L24.42 10.92C24.42 10.64 24.39 10.35 24.33 10.07C24.28 9.79 24.2 9.52 24.09 9.26C23.98 9 23.85 8.75 23.69 8.51C23.53 8.28 23.35 8.06 23.15 7.86C22.95 7.66 22.73 7.48 22.5 7.32C22.26 7.16 22.01 7.03 21.75 6.92C21.49 6.81 21.22 6.73 20.94 6.67C20.67 6.62 20.38 6.59 20.1 6.59L9.9 6.6Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.5 5.51L10.54 5.51L10.6 24.43L8.55 24.43L8.5 5.51Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n } @else {\n <defs>\n <clipPath id=\"clip1381_20236\">\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1381_20236)\">\n <rect\n id=\"rect\"\n x=\"11.572754\"\n y=\"17.683594\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(-42.841 11.572754 17.683594)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"16.033691\"\n y=\"16.271484\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(-139.147 16.033691 16.271484)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.09 25.48L9.89 25.5C9.47 25.5 9.05 25.45 8.64 25.37C8.23 25.29 7.83 25.17 7.44 25C7.05 24.84 6.68 24.64 6.33 24.41C5.98 24.18 5.66 23.91 5.36 23.61C5.07 23.31 4.8 22.99 4.57 22.64C4.34 22.29 4.14 21.92 3.98 21.53C3.82 21.14 3.69 20.74 3.61 20.32C3.53 19.91 3.49 19.49 3.49 19.07L3.49 10.92C3.49 10.5 3.53 10.08 3.61 9.67C3.69 9.25 3.82 8.85 3.98 8.46C4.14 8.07 4.34 7.7 4.57 7.35C4.8 7 5.07 6.68 5.36 6.38C5.66 6.08 5.98 5.81 6.33 5.58C6.68 5.35 7.05 5.15 7.44 4.99C7.83 4.82 8.23 4.7 8.64 4.62C9.05 4.54 9.47 4.5 9.89 4.5L20.09 4.48C20.51 4.48 20.93 4.52 21.34 4.6C21.75 4.69 22.15 4.81 22.54 4.97C22.93 5.13 23.3 5.33 23.65 5.57C24 5.8 24.32 6.06 24.62 6.36C24.92 6.66 25.18 6.98 25.41 7.33C25.65 7.69 25.84 8.06 26.01 8.45C26.17 8.84 26.29 9.24 26.37 9.65C26.45 10.06 26.49 10.48 26.5 10.91L26.5 19.06C26.49 19.48 26.45 19.89 26.37 20.31C26.29 20.72 26.17 21.12 26.01 21.51C25.84 21.9 25.65 22.27 25.41 22.62C25.18 22.97 24.92 23.3 24.62 23.6C24.32 23.89 24 24.16 23.65 24.39C23.3 24.63 22.93 24.83 22.54 24.99C22.15 25.15 21.75 25.27 21.34 25.35C20.93 25.44 20.51 25.48 20.09 25.48ZM9.89 6.59C9.61 6.59 9.32 6.62 9.05 6.67C8.77 6.73 8.5 6.81 8.24 6.92C7.98 7.03 7.73 7.16 7.49 7.32C7.26 7.48 7.04 7.66 6.84 7.86C6.64 8.06 6.46 8.28 6.3 8.51C6.14 8.75 6.01 9 5.9 9.26C5.79 9.52 5.71 9.8 5.66 10.07C5.6 10.35 5.57 10.63 5.57 10.92L5.57 19.07C5.57 19.36 5.6 19.64 5.66 19.92C5.71 20.19 5.79 20.47 5.9 20.73C6.01 20.99 6.14 21.24 6.3 21.48C6.46 21.71 6.64 21.93 6.84 22.13C7.04 22.33 7.26 22.51 7.49 22.67C7.73 22.83 7.98 22.96 8.24 23.07C8.5 23.18 8.77 23.26 9.05 23.32C9.32 23.37 9.61 23.4 9.89 23.4L20.09 23.39C20.38 23.39 20.66 23.36 20.94 23.3C21.21 23.25 21.48 23.17 21.75 23.06C22.01 22.95 22.26 22.81 22.49 22.66C22.73 22.5 22.95 22.32 23.15 22.12C23.35 21.91 23.52 21.7 23.68 21.46C23.84 21.22 23.97 20.98 24.08 20.71C24.19 20.45 24.27 20.18 24.33 19.9C24.38 19.62 24.41 19.34 24.41 19.06L24.41 10.91C24.41 10.62 24.38 10.34 24.33 10.06C24.27 9.78 24.19 9.51 24.08 9.25C23.97 8.98 23.84 8.74 23.68 8.5C23.52 8.26 23.35 8.04 23.15 7.84C22.95 7.64 22.73 7.46 22.49 7.3C22.26 7.15 22.01 7.01 21.75 6.9C21.48 6.79 21.21 6.71 20.94 6.66C20.66 6.6 20.38 6.57 20.09 6.57L9.89 6.59Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.49 5.5L10.53 5.5L10.59 24.41L8.54 24.41L8.49 5.5Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n }\n </svg>\n </ax-icon>\n</ax-button>\n<div class=\"ax-flex ax-items-center ax-gap-1 ax-justify-between ax-w-full\">\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-start\"></axp-component-slot>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-end\"></axp-component-slot>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i1$5.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2837
2410
|
}
|
|
2838
2411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutHeaderComponent, decorators: [{
|
|
2839
2412
|
type: Component,
|
|
2840
|
-
args: [{ selector: 'axp-dashboard-admin-header', encapsulation: ViewEncapsulation.None, host: {
|
|
2841
|
-
|
|
2842
|
-
|
|
2413
|
+
args: [{ selector: 'axp-dashboard-admin-header', encapsulation: ViewEncapsulation.None, host: { class: 'ax-w-full ax-flex ax-items-center ax-justify-between ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-2 ax-light' }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2414
|
+
AXPComponentSlotModule,
|
|
2415
|
+
AXButtonModule,
|
|
2416
|
+
AXDecoratorModule
|
|
2417
|
+
], template: "<ax-button id=\"axp-menu-toggle\" (onClick)=\"toggleSideMenu()\" color=\"primary\">\n <ax-icon class=\"rtl:ax-rotate-180\">\n <svg width=\"28\" height=\"28\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n @if (store.isSideMenuOpen()) {\n <defs>\n <clipPath id=\"clip1382_20239\">\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1382_20239)\">\n <rect\n id=\"rect\"\n x=\"17.420410\"\n y=\"12.316406\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(137.159 17.420410 12.316406)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"12.959473\"\n y=\"13.728516\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(40.853 12.959473 13.728516)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.1 25.5L9.9 25.51C9.48 25.51 9.06 25.47 8.65 25.39C8.24 25.3 7.84 25.18 7.45 25.02C7.06 24.86 6.69 24.66 6.34 24.43C5.99 24.19 5.67 23.92 5.37 23.63C5.07 23.33 4.81 23 4.58 22.65C4.34 22.3 4.15 21.93 3.98 21.54C3.82 21.15 3.7 20.75 3.62 20.34C3.54 19.93 3.5 19.51 3.5 19.09L3.5 10.93C3.5 10.51 3.54 10.1 3.62 9.68C3.7 9.27 3.82 8.87 3.98 8.48C4.15 8.09 4.34 7.72 4.58 7.37C4.81 7.02 5.07 6.69 5.37 6.39C5.67 6.1 5.99 5.83 6.34 5.6C6.69 5.36 7.06 5.16 7.45 5C7.84 4.84 8.24 4.72 8.65 4.64C9.06 4.55 9.48 4.51 9.9 4.51L20.1 4.5C20.52 4.5 20.94 4.54 21.35 4.62C21.76 4.7 22.16 4.83 22.55 4.99C22.94 5.15 23.31 5.35 23.66 5.58C24 5.82 24.33 6.08 24.62 6.38C24.92 6.68 25.19 7 25.42 7.35C25.65 7.7 25.85 8.07 26.01 8.46C26.17 8.85 26.3 9.25 26.38 9.67C26.46 10.08 26.5 10.5 26.5 10.92L26.5 19.07C26.5 19.5 26.46 19.91 26.38 20.32C26.3 20.74 26.17 21.14 26.01 21.53C25.85 21.92 25.65 22.29 25.42 22.64C25.19 22.99 24.92 23.31 24.62 23.61C24.33 23.91 24 24.17 23.66 24.41C23.31 24.64 22.94 24.84 22.55 25C22.16 25.16 21.76 25.29 21.35 25.37C20.94 25.45 20.52 25.5 20.1 25.5ZM9.9 6.6C9.61 6.6 9.33 6.63 9.05 6.69C8.78 6.74 8.51 6.82 8.24 6.93C7.98 7.04 7.73 7.18 7.5 7.33C7.26 7.49 7.04 7.67 6.84 7.87C6.64 8.07 6.46 8.29 6.31 8.53C6.15 8.77 6.02 9.01 5.91 9.28C5.8 9.54 5.72 9.81 5.66 10.09C5.61 10.37 5.58 10.65 5.58 10.93L5.58 19.09C5.58 19.37 5.61 19.65 5.66 19.93C5.72 20.21 5.8 20.48 5.91 20.74C6.02 21.01 6.15 21.26 6.31 21.49C6.46 21.73 6.64 21.95 6.84 22.15C7.04 22.35 7.26 22.53 7.5 22.69C7.73 22.85 7.98 22.98 8.24 23.09C8.51 23.2 8.78 23.28 9.05 23.33C9.33 23.39 9.61 23.42 9.9 23.42L20.1 23.41C20.38 23.41 20.67 23.37 20.94 23.32C21.22 23.26 21.49 23.18 21.75 23.07C22.01 22.96 22.26 22.83 22.5 22.67C22.73 22.51 22.95 22.33 23.15 22.13C23.35 21.93 23.53 21.71 23.69 21.48C23.85 21.24 23.98 20.99 24.09 20.73C24.2 20.47 24.28 20.2 24.33 19.92C24.39 19.64 24.42 19.36 24.42 19.07L24.42 10.92C24.42 10.64 24.39 10.35 24.33 10.07C24.28 9.79 24.2 9.52 24.09 9.26C23.98 9 23.85 8.75 23.69 8.51C23.53 8.28 23.35 8.06 23.15 7.86C22.95 7.66 22.73 7.48 22.5 7.32C22.26 7.16 22.01 7.03 21.75 6.92C21.49 6.81 21.22 6.73 20.94 6.67C20.67 6.62 20.38 6.59 20.1 6.59L9.9 6.6Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.5 5.51L10.54 5.51L10.6 24.43L8.55 24.43L8.5 5.51Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n } @else {\n <defs>\n <clipPath id=\"clip1381_20236\">\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1381_20236)\">\n <rect\n id=\"rect\"\n x=\"11.572754\"\n y=\"17.683594\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(-42.841 11.572754 17.683594)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"16.033691\"\n y=\"16.271484\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(-139.147 16.033691 16.271484)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.09 25.48L9.89 25.5C9.47 25.5 9.05 25.45 8.64 25.37C8.23 25.29 7.83 25.17 7.44 25C7.05 24.84 6.68 24.64 6.33 24.41C5.98 24.18 5.66 23.91 5.36 23.61C5.07 23.31 4.8 22.99 4.57 22.64C4.34 22.29 4.14 21.92 3.98 21.53C3.82 21.14 3.69 20.74 3.61 20.32C3.53 19.91 3.49 19.49 3.49 19.07L3.49 10.92C3.49 10.5 3.53 10.08 3.61 9.67C3.69 9.25 3.82 8.85 3.98 8.46C4.14 8.07 4.34 7.7 4.57 7.35C4.8 7 5.07 6.68 5.36 6.38C5.66 6.08 5.98 5.81 6.33 5.58C6.68 5.35 7.05 5.15 7.44 4.99C7.83 4.82 8.23 4.7 8.64 4.62C9.05 4.54 9.47 4.5 9.89 4.5L20.09 4.48C20.51 4.48 20.93 4.52 21.34 4.6C21.75 4.69 22.15 4.81 22.54 4.97C22.93 5.13 23.3 5.33 23.65 5.57C24 5.8 24.32 6.06 24.62 6.36C24.92 6.66 25.18 6.98 25.41 7.33C25.65 7.69 25.84 8.06 26.01 8.45C26.17 8.84 26.29 9.24 26.37 9.65C26.45 10.06 26.49 10.48 26.5 10.91L26.5 19.06C26.49 19.48 26.45 19.89 26.37 20.31C26.29 20.72 26.17 21.12 26.01 21.51C25.84 21.9 25.65 22.27 25.41 22.62C25.18 22.97 24.92 23.3 24.62 23.6C24.32 23.89 24 24.16 23.65 24.39C23.3 24.63 22.93 24.83 22.54 24.99C22.15 25.15 21.75 25.27 21.34 25.35C20.93 25.44 20.51 25.48 20.09 25.48ZM9.89 6.59C9.61 6.59 9.32 6.62 9.05 6.67C8.77 6.73 8.5 6.81 8.24 6.92C7.98 7.03 7.73 7.16 7.49 7.32C7.26 7.48 7.04 7.66 6.84 7.86C6.64 8.06 6.46 8.28 6.3 8.51C6.14 8.75 6.01 9 5.9 9.26C5.79 9.52 5.71 9.8 5.66 10.07C5.6 10.35 5.57 10.63 5.57 10.92L5.57 19.07C5.57 19.36 5.6 19.64 5.66 19.92C5.71 20.19 5.79 20.47 5.9 20.73C6.01 20.99 6.14 21.24 6.3 21.48C6.46 21.71 6.64 21.93 6.84 22.13C7.04 22.33 7.26 22.51 7.49 22.67C7.73 22.83 7.98 22.96 8.24 23.07C8.5 23.18 8.77 23.26 9.05 23.32C9.32 23.37 9.61 23.4 9.89 23.4L20.09 23.39C20.38 23.39 20.66 23.36 20.94 23.3C21.21 23.25 21.48 23.17 21.75 23.06C22.01 22.95 22.26 22.81 22.49 22.66C22.73 22.5 22.95 22.32 23.15 22.12C23.35 21.91 23.52 21.7 23.68 21.46C23.84 21.22 23.97 20.98 24.08 20.71C24.19 20.45 24.27 20.18 24.33 19.9C24.38 19.62 24.41 19.34 24.41 19.06L24.41 10.91C24.41 10.62 24.38 10.34 24.33 10.06C24.27 9.78 24.19 9.51 24.08 9.25C23.97 8.98 23.84 8.74 23.68 8.5C23.52 8.26 23.35 8.04 23.15 7.84C22.95 7.64 22.73 7.46 22.49 7.3C22.26 7.15 22.01 7.01 21.75 6.9C21.48 6.79 21.21 6.71 20.94 6.66C20.66 6.6 20.38 6.57 20.09 6.57L9.89 6.59Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.49 5.5L10.53 5.5L10.59 24.41L8.54 24.41L8.49 5.5Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n }\n </svg>\n </ax-icon>\n</ax-button>\n<div class=\"ax-flex ax-items-center ax-gap-1 ax-justify-between ax-w-full\">\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-start\"></axp-component-slot>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-end\"></axp-component-slot>\n </div>\n</div>\n" }]
|
|
2843
2418
|
}], ctorParameters: () => [] });
|
|
2844
2419
|
|
|
2845
2420
|
class AXPRootLayoutMenuComponent {
|
|
@@ -3326,18 +2901,18 @@ class AXPRootLayoutComponent {
|
|
|
3326
2901
|
this.layout = inject(AXPLayoutThemeService);
|
|
3327
2902
|
this.menuStore = inject(AXPMenuService);
|
|
3328
2903
|
this.router = inject(Router);
|
|
3329
|
-
this.settingsService = inject(AXPSettingsService);
|
|
3330
2904
|
this.eventService = inject(AXPBroadcastEventService);
|
|
3331
2905
|
this.sessionService = inject(AXPSessionService);
|
|
3332
2906
|
this.unsubscriber = inject(AXUnsubscriber);
|
|
3333
2907
|
this.contextStore = inject(AXPContextStore);
|
|
3334
2908
|
}
|
|
3335
2909
|
ngOnInit() {
|
|
3336
|
-
|
|
3337
|
-
this.router.
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
2910
|
+
// Select the menu item based on the current route when the page loads
|
|
2911
|
+
this.menuStore.selectMenuItemByRoute(this.router.url);
|
|
2912
|
+
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event) => {
|
|
2913
|
+
// Update the selected menu item whenever the route changes
|
|
2914
|
+
this.menuStore.selectMenuItemByRoute(event.urlAfterRedirects);
|
|
2915
|
+
// Reset the context store
|
|
3341
2916
|
this.contextStore.reset();
|
|
3342
2917
|
});
|
|
3343
2918
|
this.eventService.listen(AXPSessionStatus.SignedOut).subscribe(() => {
|
|
@@ -3359,37 +2934,12 @@ class AXPRootLayoutComponent {
|
|
|
3359
2934
|
}
|
|
3360
2935
|
});
|
|
3361
2936
|
}
|
|
3362
|
-
async #syncMenuSelectionByRoute(url) {
|
|
3363
|
-
if (!(await this.#shouldSelectMenuItemByRoute())) {
|
|
3364
|
-
return;
|
|
3365
|
-
}
|
|
3366
|
-
this.menuStore.selectMenuItemByRoute(url);
|
|
3367
|
-
}
|
|
3368
|
-
async #shouldSelectMenuItemByRoute() {
|
|
3369
|
-
if (this.layout.isMenuHorizontal()) {
|
|
3370
|
-
return true;
|
|
3371
|
-
}
|
|
3372
|
-
const mode = await this.settingsService.get(AXPThemeLayoutSetting.MenuVerticalMode);
|
|
3373
|
-
return this.#resolveMenuVerticalMode(mode) !== AXPMenuVerticalMode.Compact;
|
|
3374
|
-
}
|
|
3375
|
-
#resolveMenuVerticalMode(value) {
|
|
3376
|
-
if (value === AXPMenuVerticalMode.Compact || value === AXPMenuVerticalMode.Full) {
|
|
3377
|
-
return value;
|
|
3378
|
-
}
|
|
3379
|
-
if (typeof value === 'object' && value !== null && 'id' in value) {
|
|
3380
|
-
const id = value.id;
|
|
3381
|
-
if (id === AXPMenuVerticalMode.Compact || id === AXPMenuVerticalMode.Full) {
|
|
3382
|
-
return id;
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
return AXPMenuVerticalMode.Full;
|
|
3386
|
-
}
|
|
3387
2937
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3388
2938
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutComponent, isStandalone: true, selector: "ng-component", providers: [AXUnsubscriber, AXPContextStore], ngImport: i0, template: `
|
|
3389
|
-
@if
|
|
3390
|
-
|
|
3391
|
-
}
|
|
3392
|
-
|
|
2939
|
+
@if(layout.isMenuHorizontal()){
|
|
2940
|
+
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
2941
|
+
}@else{
|
|
2942
|
+
<axp-root-vertical-layout></axp-root-vertical-layout>
|
|
3393
2943
|
}
|
|
3394
2944
|
`, isInline: true, dependencies: [{ kind: "component", type: AXPRootHorizontalLayoutComponent, selector: "axp-root-horizontal-layout" }, { kind: "component", type: AXPRootVerticalLayoutComponent, selector: "axp-root-vertical-layout" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3395
2945
|
}
|
|
@@ -3397,10 +2947,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3397
2947
|
type: Component,
|
|
3398
2948
|
args: [{
|
|
3399
2949
|
template: `
|
|
3400
|
-
@if
|
|
3401
|
-
|
|
3402
|
-
}
|
|
3403
|
-
|
|
2950
|
+
@if(layout.isMenuHorizontal()){
|
|
2951
|
+
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
2952
|
+
}@else{
|
|
2953
|
+
<axp-root-vertical-layout></axp-root-vertical-layout>
|
|
3404
2954
|
}
|
|
3405
2955
|
`,
|
|
3406
2956
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -3416,201 +2966,57 @@ var rootLayout_component = /*#__PURE__*/Object.freeze({
|
|
|
3416
2966
|
AXPRootLayoutComponent: AXPRootLayoutComponent
|
|
3417
2967
|
});
|
|
3418
2968
|
|
|
3419
|
-
/**
|
|
3420
|
-
* Route reuse strategy that powers both same-route reuse (`reuse` route data) and tabular
|
|
3421
|
-
* navigation. In tabular mode it detaches the leaf page component of an open tab when the user
|
|
3422
|
-
* switches away, caches the live component instance, and reattaches it on return so state such as
|
|
3423
|
-
* data-table selection, scroll position, and unsaved form values is preserved — like browser tabs.
|
|
3424
|
-
*/
|
|
3425
2969
|
class AXPEntityReuseStrategy {
|
|
3426
|
-
constructor() {
|
|
3427
|
-
//#region ---- Services & Dependencies ----
|
|
3428
|
-
this.routeCache = inject(AXPTabRouteCacheRegistry);
|
|
3429
|
-
/** Lazy lookup avoids Router ↔ RouteReuseStrategy construction cycle (NG0200). */
|
|
3430
|
-
this.injector = inject(Injector);
|
|
3431
|
-
//#endregion
|
|
3432
|
-
}
|
|
3433
|
-
//#endregion
|
|
3434
|
-
//#region ---- Detach / Attach ----
|
|
3435
2970
|
shouldDetach(route) {
|
|
3436
|
-
|
|
3437
|
-
return false;
|
|
3438
|
-
}
|
|
3439
|
-
const scopedKey = this.scopedTabKeyFor(route);
|
|
3440
|
-
const cacheKey = this.routeCacheKeyFor(route);
|
|
3441
|
-
if (!scopedKey || !cacheKey || !this.routeCache.isOpen(scopedKey)) {
|
|
3442
|
-
return false;
|
|
3443
|
-
}
|
|
3444
|
-
// Keep the live component when navigating within the same scoped tab (e.g. chat → chat/:id).
|
|
3445
|
-
return this.isLeavingScopedTab(route);
|
|
3446
|
-
}
|
|
3447
|
-
store(route, handle) {
|
|
3448
|
-
if (!this.routeCache.isEnabled()) {
|
|
3449
|
-
return;
|
|
3450
|
-
}
|
|
3451
|
-
const key = this.routeCacheKeyFor(route);
|
|
3452
|
-
if (!key) {
|
|
3453
|
-
return;
|
|
3454
|
-
}
|
|
3455
|
-
// A null handle is Angular releasing a just-reattached view; drop it without destroying.
|
|
3456
|
-
if (handle) {
|
|
3457
|
-
this.routeCache.store(key, handle);
|
|
3458
|
-
}
|
|
3459
|
-
else {
|
|
3460
|
-
this.routeCache.release(key);
|
|
3461
|
-
}
|
|
2971
|
+
return false;
|
|
3462
2972
|
}
|
|
2973
|
+
store(route, detachedTree) { }
|
|
3463
2974
|
shouldAttach(route) {
|
|
3464
|
-
|
|
3465
|
-
return false;
|
|
3466
|
-
}
|
|
3467
|
-
const key = this.routeCacheKeyFor(route);
|
|
3468
|
-
return !!key && this.routeCache.has(key);
|
|
2975
|
+
return false;
|
|
3469
2976
|
}
|
|
3470
2977
|
retrieve(route) {
|
|
3471
|
-
|
|
3472
|
-
return null;
|
|
3473
|
-
}
|
|
3474
|
-
const key = this.routeCacheKeyFor(route);
|
|
3475
|
-
return key ? this.routeCache.retrieve(key) : null;
|
|
2978
|
+
return null;
|
|
3476
2979
|
}
|
|
3477
|
-
//#endregion
|
|
3478
|
-
//#region ---- Reuse Decision ----
|
|
3479
2980
|
shouldReuseRoute(future, curr) {
|
|
2981
|
+
// If paths are different, never reuse
|
|
2982
|
+
if (future.routeConfig?.path !== curr.routeConfig?.path) {
|
|
2983
|
+
return false;
|
|
2984
|
+
}
|
|
3480
2985
|
const reuseConfig = future.data?.['reuse'];
|
|
2986
|
+
// If reuse is explicitly false, don't reuse
|
|
3481
2987
|
if (reuseConfig === false) {
|
|
3482
2988
|
return false;
|
|
3483
2989
|
}
|
|
3484
|
-
//
|
|
2990
|
+
// If reuse is explicitly true, always reuse (same path)
|
|
3485
2991
|
if (reuseConfig === true) {
|
|
3486
|
-
|
|
3487
|
-
return true;
|
|
3488
|
-
}
|
|
3489
|
-
if (curr.data?.['reuse'] === true) {
|
|
3490
|
-
return axpResolveTabKeyFromSnapshot(future) === axpResolveTabKeyFromSnapshot(curr);
|
|
3491
|
-
}
|
|
3492
|
-
return false;
|
|
3493
|
-
}
|
|
3494
|
-
if (future.routeConfig?.path !== curr.routeConfig?.path) {
|
|
3495
|
-
return false;
|
|
2992
|
+
return true;
|
|
3496
2993
|
}
|
|
2994
|
+
// Handle string-based reuse strategies
|
|
3497
2995
|
if (typeof reuseConfig === 'string') {
|
|
3498
2996
|
const paramsChanged = this.haveParamsChanged(future, curr);
|
|
3499
2997
|
const queryParamsChanged = this.haveQueryParamsChanged(future, curr);
|
|
3500
2998
|
switch (reuseConfig) {
|
|
3501
2999
|
case 'paramsChange':
|
|
3000
|
+
// Reuse when params change, but destroy if queryParams change
|
|
3502
3001
|
return !queryParamsChanged;
|
|
3503
3002
|
case 'queryParamsChange':
|
|
3003
|
+
// Reuse when queryParams change, but destroy if params change
|
|
3504
3004
|
return !paramsChanged;
|
|
3505
3005
|
case 'paramsOrQueryParamsChange':
|
|
3006
|
+
// Reuse when either params or queryParams change
|
|
3506
3007
|
return true;
|
|
3507
3008
|
default:
|
|
3009
|
+
// Unknown strategy, use default behavior
|
|
3508
3010
|
return true;
|
|
3509
3011
|
}
|
|
3510
3012
|
}
|
|
3013
|
+
// Default behavior: reuse if paths are the same
|
|
3511
3014
|
return true;
|
|
3512
3015
|
}
|
|
3513
|
-
//#
|
|
3514
|
-
//#region ---- Helper Methods ----
|
|
3016
|
+
//#region ---- Helper Methods ----
|
|
3515
3017
|
/**
|
|
3516
|
-
*
|
|
3517
|
-
* (`data.tab = true`) that owns a nested outlet (e.g. settings page).
|
|
3018
|
+
* Check if route params have changed between current and future routes
|
|
3518
3019
|
*/
|
|
3519
|
-
isTabCacheRoute(route) {
|
|
3520
|
-
return this.resolveTabCacheTarget(route) === route;
|
|
3521
|
-
}
|
|
3522
|
-
/**
|
|
3523
|
-
* Under a scoped tab, cache the `reuse: true` page shell (settings page) instead of nested outlet
|
|
3524
|
-
* children (setting-view). Otherwise cache the routable leaf (entity pages, chat).
|
|
3525
|
-
*/
|
|
3526
|
-
resolveTabCacheTarget(route) {
|
|
3527
|
-
const shell = this.findScopedShellRoute(route);
|
|
3528
|
-
if (shell) {
|
|
3529
|
-
return shell;
|
|
3530
|
-
}
|
|
3531
|
-
if (this.isRoutableLeaf(route)) {
|
|
3532
|
-
return route;
|
|
3533
|
-
}
|
|
3534
|
-
return null;
|
|
3535
|
-
}
|
|
3536
|
-
/** Nearest ancestor route that declares `data.tab = true`. */
|
|
3537
|
-
findScopedAncestor(route) {
|
|
3538
|
-
for (let index = route.pathFromRoot.length - 1; index >= 0; index--) {
|
|
3539
|
-
const snapshot = route.pathFromRoot[index];
|
|
3540
|
-
if (axpHasTabScope(snapshot.data)) {
|
|
3541
|
-
return snapshot;
|
|
3542
|
-
}
|
|
3543
|
-
}
|
|
3544
|
-
return null;
|
|
3545
|
-
}
|
|
3546
|
-
/**
|
|
3547
|
-
* The innermost `reuse: true` component route between a scoped ancestor and the active route.
|
|
3548
|
-
* Settings: `setting-page` (not `setting-view`). Chat: the active chat child route.
|
|
3549
|
-
*/
|
|
3550
|
-
findScopedShellRoute(route) {
|
|
3551
|
-
const scope = this.findScopedAncestor(route);
|
|
3552
|
-
if (!scope) {
|
|
3553
|
-
return null;
|
|
3554
|
-
}
|
|
3555
|
-
const chain = route.pathFromRoot;
|
|
3556
|
-
const scopeIndex = chain.indexOf(scope);
|
|
3557
|
-
if (scopeIndex < 0) {
|
|
3558
|
-
return null;
|
|
3559
|
-
}
|
|
3560
|
-
let shell = null;
|
|
3561
|
-
for (let index = scopeIndex + 1; index < chain.length; index++) {
|
|
3562
|
-
const snapshot = chain[index];
|
|
3563
|
-
if (snapshot.data?.['reuse'] === true && this.hasRoutableComponent(snapshot)) {
|
|
3564
|
-
shell = snapshot;
|
|
3565
|
-
}
|
|
3566
|
-
}
|
|
3567
|
-
return shell;
|
|
3568
|
-
}
|
|
3569
|
-
isRoutableLeaf(route) {
|
|
3570
|
-
if (route.firstChild) {
|
|
3571
|
-
return false;
|
|
3572
|
-
}
|
|
3573
|
-
return this.hasRoutableComponent(route);
|
|
3574
|
-
}
|
|
3575
|
-
hasRoutableComponent(route) {
|
|
3576
|
-
const config = route.routeConfig;
|
|
3577
|
-
return !!(route.component || config?.component || config?.loadComponent);
|
|
3578
|
-
}
|
|
3579
|
-
/** Cache key — scoped tab path for shells, full leaf path otherwise. */
|
|
3580
|
-
routeCacheKeyFor(route) {
|
|
3581
|
-
if (!this.isTabCacheRoute(route)) {
|
|
3582
|
-
return null;
|
|
3583
|
-
}
|
|
3584
|
-
const path = this.findScopedShellRoute(route)
|
|
3585
|
-
? axpResolveTabKeyFromSnapshot(route)
|
|
3586
|
-
: axpPathFromSnapshot(route);
|
|
3587
|
-
return axpIsTabEligibleUrl(path) ? path : null;
|
|
3588
|
-
}
|
|
3589
|
-
/** Scoped tab key — matches open tab descriptors (`data.tab = true`). */
|
|
3590
|
-
scopedTabKeyFor(route) {
|
|
3591
|
-
const target = this.resolveTabCacheTarget(route);
|
|
3592
|
-
if (!target) {
|
|
3593
|
-
return null;
|
|
3594
|
-
}
|
|
3595
|
-
const path = axpResolveTabKeyFromSnapshot(target);
|
|
3596
|
-
return axpIsTabEligibleUrl(path) ? path : null;
|
|
3597
|
-
}
|
|
3598
|
-
/** True when the in-flight navigation leaves the scoped tab that owns this route. */
|
|
3599
|
-
isLeavingScopedTab(route) {
|
|
3600
|
-
const currentScoped = axpResolveTabKeyFromSnapshot(route);
|
|
3601
|
-
const router = this.injector.get(Router, null);
|
|
3602
|
-
if (!router) {
|
|
3603
|
-
return true;
|
|
3604
|
-
}
|
|
3605
|
-
const navigation = router.getCurrentNavigation();
|
|
3606
|
-
if (!navigation?.finalUrl) {
|
|
3607
|
-
return true;
|
|
3608
|
-
}
|
|
3609
|
-
const targetPath = router.serializeUrl(navigation.finalUrl).split('?')[0].split('#')[0];
|
|
3610
|
-
const futureScoped = axpResolveTabKeyFromRouteConfig(router.config, targetPath) ??
|
|
3611
|
-
(targetPath.startsWith('/') ? targetPath : `/${targetPath}`);
|
|
3612
|
-
return currentScoped !== futureScoped;
|
|
3613
|
-
}
|
|
3614
3020
|
haveParamsChanged(future, curr) {
|
|
3615
3021
|
const futureParams = future.params;
|
|
3616
3022
|
const currParams = curr.params;
|
|
@@ -3626,6 +3032,9 @@ class AXPEntityReuseStrategy {
|
|
|
3626
3032
|
}
|
|
3627
3033
|
return false;
|
|
3628
3034
|
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Check if query params have changed between current and future routes
|
|
3037
|
+
*/
|
|
3629
3038
|
haveQueryParamsChanged(future, curr) {
|
|
3630
3039
|
const futureQueryParams = future.queryParams;
|
|
3631
3040
|
const currQueryParams = curr.queryParams;
|
|
@@ -3704,7 +3113,7 @@ class AXPDefaultThemeModule {
|
|
|
3704
3113
|
viewers: {
|
|
3705
3114
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
3706
3115
|
master: {
|
|
3707
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
3116
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
3708
3117
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
3709
3118
|
///
|
|
3710
3119
|
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
@@ -3740,7 +3149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3740
3149
|
viewers: {
|
|
3741
3150
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
3742
3151
|
master: {
|
|
3743
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
3152
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
3744
3153
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
3745
3154
|
///
|
|
3746
3155
|
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
@@ -3768,5 +3177,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3768
3177
|
* Generated bundle index. Do not edit.
|
|
3769
3178
|
*/
|
|
3770
3179
|
|
|
3771
|
-
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent, AXPEntityMasterListViewComponent, AXPRootHorizontalLayoutComponent, AXPRootLayoutComponent, AXPRootLayoutFooterComponent, AXPRootLayoutHeaderComponent, AXPRootLayoutMenuComponent, AXPRootVerticalLayoutComponent
|
|
3180
|
+
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent, AXPEntityMasterListViewComponent, AXPRootHorizontalLayoutComponent, AXPRootLayoutComponent, AXPRootLayoutFooterComponent, AXPRootLayoutHeaderComponent, AXPRootLayoutMenuComponent, AXPRootVerticalLayoutComponent };
|
|
3772
3181
|
//# sourceMappingURL=acorex-platform-themes-default.mjs.map
|