@memberjunction/ng-explorer-core 6.1.4 → 6.2.0-edge.1
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/dist/app-routing.module.d.ts +23 -1
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +73 -17
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +1 -8
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/command-palette/command-palette.component.d.ts +7 -1
- package/dist/lib/command-palette/command-palette.component.d.ts.map +1 -1
- package/dist/lib/command-palette/command-palette.component.js +28 -14
- package/dist/lib/command-palette/command-palette.component.js.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts +103 -13
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.js +219 -67
- package/dist/lib/conversation-feedback/conversation-feedback.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts +64 -10
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +172 -66
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
- package/dist/lib/generic/resource-container-component.d.ts +19 -5
- package/dist/lib/generic/resource-container-component.d.ts.map +1 -1
- package/dist/lib/generic/resource-container-component.js +43 -13
- package/dist/lib/generic/resource-container-component.js.map +1 -1
- package/dist/lib/guards/entities.guard.d.ts +4 -0
- package/dist/lib/guards/entities.guard.d.ts.map +1 -1
- package/dist/lib/guards/entities.guard.js +10 -2
- package/dist/lib/guards/entities.guard.js.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.d.ts +4 -0
- package/dist/lib/identity-claims/claim-redeem.component.d.ts.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.js +10 -2
- package/dist/lib/identity-claims/claim-redeem.component.js.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.d.ts +4 -0
- package/dist/lib/oauth/oauth-callback.component.d.ts.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.js +10 -2
- package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
- package/dist/lib/profile/profile-dialog.component.d.ts.map +1 -1
- package/dist/lib/profile/profile-dialog.component.js +194 -191
- package/dist/lib/profile/profile-dialog.component.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +20 -2
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +33 -9
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +80 -10
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +168 -56
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +186 -23
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +500 -177
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts +2 -0
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js +5 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts +25 -0
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js +24 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js.map +1 -0
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +14 -2
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +32 -8
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +54 -8
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +138 -46
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +223 -30
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +438 -118
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +7 -3
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +23 -15
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +68 -10
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +178 -62
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/services/startup-validation.service.d.ts +4 -0
- package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
- package/dist/lib/services/startup-validation.service.js +10 -2
- package/dist/lib/services/startup-validation.service.js.map +1 -1
- package/dist/lib/services/system-validation.service.d.ts +13 -1
- package/dist/lib/services/system-validation.service.d.ts.map +1 -1
- package/dist/lib/services/system-validation.service.js +29 -5
- package/dist/lib/services/system-validation.service.js.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts +54 -4
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js +130 -40
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts +29 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.js +56 -12
- package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.d.ts +33 -5
- package/dist/lib/shell/components/header/app-switcher.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.js +85 -29
- package/dist/lib/shell/components/header/app-switcher.component.js.map +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.d.ts +7 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.d.ts.map +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js +63 -9
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +30 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js +63 -15
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +99 -9
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +310 -110
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/loading-themes.d.ts +16 -12
- package/dist/lib/shell/loading-themes.d.ts.map +1 -1
- package/dist/lib/shell/loading-themes.js +145 -137
- package/dist/lib/shell/loading-themes.js.map +1 -1
- package/dist/lib/shell/readiness-beacon.d.ts +24 -0
- package/dist/lib/shell/readiness-beacon.d.ts.map +1 -0
- package/dist/lib/shell/readiness-beacon.js +40 -0
- package/dist/lib/shell/readiness-beacon.js.map +1 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/about-dialog.service.js +16 -4
- package/dist/lib/shell/services/about-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/profile-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.js +16 -4
- package/dist/lib/shell/services/profile-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js +15 -3
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +275 -40
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +704 -290
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +64 -8
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +129 -37
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +26 -2
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +48 -10
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +84 -6
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +133 -29
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +173 -23
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +383 -109
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +383 -55
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +962 -326
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/lib/single-query/single-query.component.d.ts +22 -2
- package/dist/lib/single-query/single-query.component.d.ts.map +1 -1
- package/dist/lib/single-query/single-query.component.js +40 -10
- package/dist/lib/single-query/single-query.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +41 -3
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +71 -11
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.d.ts +23 -3
- package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +42 -12
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.d.ts +12 -2
- package/dist/lib/system-validation/system-validation-banner.component.d.ts.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.js +25 -5
- package/dist/lib/system-validation/system-validation-banner.component.js.map +1 -1
- package/dist/lib/user-menu/user-menu.types.d.ts +4 -0
- package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -1
- package/dist/lib/user-menu/user-menu.types.js +10 -2
- package/dist/lib/user-menu/user-menu.types.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +59 -7
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +151 -47
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/lib/user-profile/user-profile.component.d.ts +3 -2
- package/dist/lib/user-profile/user-profile.component.d.ts.map +1 -1
- package/dist/lib/user-profile/user-profile.component.js +5 -4
- package/dist/lib/user-profile/user-profile.component.js.map +1 -1
- package/package.json +52 -52
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Component, Input, inject } from '@angular/core';
|
|
1
|
+
import { Component, Input, inject, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { NavigationService, RecordSourceHasReturnTarget } from '@memberjunction/ng-shared';
|
|
3
|
+
import { CompositeKey, Metadata } from '@memberjunction/core';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
function RecordOriginCrumbComponent_Conditional_0_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
5
6
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -10,7 +11,7 @@ function RecordOriginCrumbComponent_Conditional_0_Conditional_0_Conditional_1_Te
|
|
|
10
11
|
} if (rf & 2) {
|
|
11
12
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
12
13
|
i0.ɵɵadvance();
|
|
13
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.
|
|
14
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.DisplayLabel, " ");
|
|
14
15
|
} }
|
|
15
16
|
function RecordOriginCrumbComponent_Conditional_0_Conditional_0_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
16
17
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -47,7 +48,7 @@ function RecordOriginCrumbComponent_Conditional_0_Conditional_0_Template(rf, ctx
|
|
|
47
48
|
} if (rf & 2) {
|
|
48
49
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
49
50
|
i0.ɵɵadvance();
|
|
50
|
-
i0.ɵɵconditional(ctx_r1.
|
|
51
|
+
i0.ɵɵconditional(ctx_r1.DisplayLabel ? 1 : 2);
|
|
51
52
|
} }
|
|
52
53
|
function RecordOriginCrumbComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
53
54
|
i0.ɵɵdomElementStart(0, "span", 0);
|
|
@@ -56,7 +57,7 @@ function RecordOriginCrumbComponent_Conditional_0_Conditional_1_Template(rf, ctx
|
|
|
56
57
|
} if (rf & 2) {
|
|
57
58
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
58
59
|
i0.ɵɵadvance();
|
|
59
|
-
i0.ɵɵtextInterpolate1("From ", ctx_r1.Origin.sourceLabel);
|
|
60
|
+
i0.ɵɵtextInterpolate1("From ", ctx_r1.DisplayLabel || ctx_r1.Origin.sourceLabel);
|
|
60
61
|
} }
|
|
61
62
|
function RecordOriginCrumbComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
62
63
|
i0.ɵɵconditionalCreate(0, RecordOriginCrumbComponent_Conditional_0_Conditional_0_Template, 3, 1)(1, RecordOriginCrumbComponent_Conditional_0_Conditional_1_Template, 2, 1, "span", 0);
|
|
@@ -77,11 +78,64 @@ function RecordOriginCrumbComponent_Conditional_0_Template(rf, ctx) { if (rf & 1
|
|
|
77
78
|
* (fresh loads, cache reattaches after promote/demote, single-resource).
|
|
78
79
|
*/
|
|
79
80
|
export class RecordOriginCrumbComponent {
|
|
80
|
-
|
|
81
|
+
_origin = null;
|
|
82
|
+
asyncResolvedLabel; // case-violation-ok-legacy-back-compat: an accessor cannot be optional, so a stub would turn this into a required member
|
|
83
|
+
set Origin(value) {
|
|
84
|
+
this._origin = value;
|
|
85
|
+
this.asyncResolvedLabel = undefined;
|
|
86
|
+
this.resolveAsyncLabel();
|
|
87
|
+
}
|
|
88
|
+
get Origin() {
|
|
89
|
+
return this._origin;
|
|
90
|
+
}
|
|
81
91
|
navigationService = inject(NavigationService);
|
|
92
|
+
cdr = inject(ChangeDetectorRef);
|
|
82
93
|
get Clickable() {
|
|
83
94
|
return RecordSourceHasReturnTarget(this.Origin);
|
|
84
95
|
}
|
|
96
|
+
get DisplayLabel() {
|
|
97
|
+
if (this.Origin?.sourceRecordEntity && this.Origin?.sourceRecordId) {
|
|
98
|
+
if (this.asyncResolvedLabel) {
|
|
99
|
+
return this.asyncResolvedLabel;
|
|
100
|
+
}
|
|
101
|
+
const md = Metadata.Provider; // global-provider-ok: shell breadcrumb component displays navigation history using global metadata cache
|
|
102
|
+
const entity = md?.EntityByName(this.Origin.sourceRecordEntity);
|
|
103
|
+
const key = CompositeKey.FromURLSegment(entity, this.Origin.sourceRecordId);
|
|
104
|
+
const cached = md ? md.GetCachedRecordNameOnlyIfCached(this.Origin.sourceRecordEntity, key) : undefined;
|
|
105
|
+
if (cached) {
|
|
106
|
+
return cached;
|
|
107
|
+
}
|
|
108
|
+
const fallbackEntityLabel = entity?.DisplayName || entity?.Name || this.Origin.sourceRecordEntity;
|
|
109
|
+
if (this.Origin.sourceLabel && !this.Origin.sourceLabel.includes(this.Origin.sourceRecordId)) {
|
|
110
|
+
return this.Origin.sourceLabel;
|
|
111
|
+
}
|
|
112
|
+
return fallbackEntityLabel;
|
|
113
|
+
}
|
|
114
|
+
return this.Origin?.sourceLabel;
|
|
115
|
+
}
|
|
116
|
+
resolveAsyncLabel() {
|
|
117
|
+
const md = Metadata.Provider; // global-provider-ok: shell breadcrumb component asynchronously resolves record name using global metadata provider
|
|
118
|
+
if (this.Origin?.sourceRecordEntity && this.Origin?.sourceRecordId && md) {
|
|
119
|
+
const entity = md.EntityByName(this.Origin.sourceRecordEntity);
|
|
120
|
+
const key = CompositeKey.FromURLSegment(entity, this.Origin.sourceRecordId);
|
|
121
|
+
const cached = md.GetCachedRecordNameOnlyIfCached(this.Origin.sourceRecordEntity, key);
|
|
122
|
+
if (cached) {
|
|
123
|
+
this.asyncResolvedLabel = cached;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const entityName = this.Origin.sourceRecordEntity;
|
|
127
|
+
if (typeof md.GetEntityRecordName === 'function') {
|
|
128
|
+
md.GetEntityRecordName(entityName, key).then(name => {
|
|
129
|
+
if (name && this.Origin?.sourceRecordEntity === entityName) {
|
|
130
|
+
this.asyncResolvedLabel = name;
|
|
131
|
+
this.cdr.markForCheck();
|
|
132
|
+
}
|
|
133
|
+
}).catch(() => {
|
|
134
|
+
// Silently ignore async name fetch error, fallback will remain active
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
85
139
|
/** Page segment: full restore — the captured page, section state included */
|
|
86
140
|
async OnPageClick() {
|
|
87
141
|
if (this.Origin) {
|
|
@@ -112,9 +166,9 @@ export class RecordOriginCrumbComponent {
|
|
|
112
166
|
@if (Origin) {
|
|
113
167
|
@if (Clickable) {
|
|
114
168
|
<i class="fa-solid fa-arrow-left crumb-lead" aria-hidden="true"></i>
|
|
115
|
-
@if (
|
|
169
|
+
@if (DisplayLabel) {
|
|
116
170
|
<button type="button" class="crumb-seg" (click)="OnPageClick()" title="Back to where you opened this record">
|
|
117
|
-
{{
|
|
171
|
+
{{ DisplayLabel }}
|
|
118
172
|
</button>
|
|
119
173
|
} @else {
|
|
120
174
|
<button type="button" class="crumb-seg" (click)="OnAppClick()" [title]="'Go to ' + Origin.sourceAppName">
|
|
@@ -129,12 +183,12 @@ export class RecordOriginCrumbComponent {
|
|
|
129
183
|
}
|
|
130
184
|
} @else {
|
|
131
185
|
<!-- Provenance only — no return target (e.g. opened by an agent) -->
|
|
132
|
-
<span class="origin-static">From {{ Origin.sourceLabel }}</span>
|
|
186
|
+
<span class="origin-static">From {{ DisplayLabel || Origin.sourceLabel }}</span>
|
|
133
187
|
}
|
|
134
188
|
}
|
|
135
189
|
`, styles: ["\n :host {\n display: flex;\n align-items: center;\n gap: 2px;\n flex-shrink: 0;\n height: 36px;\n /* Left indent deliberately DEEPER than the first tab's edge (~16px)\n so the crumb reads as a level BENEATH the tab \u2014 hierarchy, not a\n sibling bar. */\n padding: 0 12px 0 24px;\n /* Match the ACTIVE tab's surface so the tab flows into its pane\n (the sunken tone read as a disconnected band between them). */\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n }\n :host:not(:has(*)) { display: none; }\n .crumb-lead {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-right: 6px;\n }\n /* Each breadcrumb level is its OWN link with its own hover */\n .crumb-seg {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 5px 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n font-size: 12px;\n line-height: 1;\n font-family: inherit;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: background 0.15s, color 0.15s;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .crumb-seg:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .crumb-seg:focus-visible {\n outline: 2px solid var(--mj-border-focus);\n outline-offset: -2px;\n }\n .crumb-page { font-weight: 500; }\n .crumb-sep { color: var(--mj-text-muted); font-size: 12px; }\n .origin-static {\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n "] }]
|
|
136
190
|
}], null, { Origin: [{
|
|
137
191
|
type: Input
|
|
138
192
|
}] }); })();
|
|
139
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordOriginCrumbComponent, { className: "RecordOriginCrumbComponent", filePath: "src/lib/shell/components/record-open/record-origin-crumb.component.ts", lineNumber:
|
|
193
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordOriginCrumbComponent, { className: "RecordOriginCrumbComponent", filePath: "src/lib/shell/components/record-open/record-origin-crumb.component.ts", lineNumber: 111 }); })();
|
|
140
194
|
//# sourceMappingURL=record-origin-crumb.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-origin-crumb.component.js","sourceRoot":"","sources":["../../../../../src/lib/shell/components/record-open/record-origin-crumb.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD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C;QACxE,CAAC;IACH,CAAC;oHArBU,0BAA0B;6DAA1B,0BAA0B;YAA1B,6GAAA,wBAAwB,IAAE,wFAA1B,wBAAwB,IAAE;;YAlFnC,kFAAc;;YAAd,qCAsBC;;;iFA4DQ,0BAA0B;cA9FtC,SAAS;2BACE,wBAAwB,cACtB,IAAI,QAKV;oBACJ,aAAa,EAAE,0BAA0B;oBACzC,SAAS,EAAE,0BAA0B;iBACtC,YACS;;;;;;;;;;;;;;;;;;;;;;;;GAwBT;;kBA4DA,KAAK;;kFADK,0BAA0B","sourcesContent":["import { Component, Input, inject } from '@angular/core';\nimport { NavigationService, RecordSourceContext, RecordSourceHasReturnTarget } from '@memberjunction/ng-shared';\n\n/**\n * Pane-level origin crumb — the FIRST element inside a record's golden-layout\n * pane (Matt's placement call, 2026-07-30: no record-chrome refactor; the\n * crumb rides the pane). One instance per record pane, which makes it correct\n * in every layout context the region-level bar could not be:\n * - split views: each pane carries its OWN origin\n * - docked records (main layout, bar or single-resource): provenance intact\n * - edit mode / custom form headers: unaffected — the crumb sits above the\n * form entirely, in shell-owned territory\n * Rendered/positioned by the tab-container wherever record content attaches\n * (fresh loads, cache reattaches after promote/demote, single-resource).\n */\n@Component({\n selector: 'mj-record-origin-crumb',\n standalone: true,\n // The crumb sits INSIDE a GL pane: without these stoppers, clicks bubble\n // to Golden Layout's pane-focus handlers, which re-activate the pane's\n // own tab and STOMP the navigation the click just started (the app\n // segment created the destination tab and then lost the activation race).\n host: {\n '(mousedown)': '$event.stopPropagation()',\n '(click)': '$event.stopPropagation()'\n },\n template: `\n @if (Origin) {\n @if (Clickable) {\n <i class=\"fa-solid fa-arrow-left crumb-lead\" aria-hidden=\"true\"></i>\n @if (Origin.sourceLabel) {\n <button type=\"button\" class=\"crumb-seg\" (click)=\"OnPageClick()\" title=\"Back to where you opened this record\">\n {{ Origin.sourceLabel }}\n </button>\n } @else {\n <button type=\"button\" class=\"crumb-seg\" (click)=\"OnAppClick()\" [title]=\"'Go to ' + Origin.sourceAppName\">\n {{ Origin.sourceAppName }}\n </button>\n @if (Origin.sourceNavLabel) {\n <span class=\"crumb-sep\" aria-hidden=\"true\">›</span>\n <button type=\"button\" class=\"crumb-seg crumb-page\" (click)=\"OnPageClick()\" title=\"Back to where you opened this record\">\n {{ Origin.sourceNavLabel }}\n </button>\n }\n }\n } @else {\n <!-- Provenance only — no return target (e.g. opened by an agent) -->\n <span class=\"origin-static\">From {{ Origin.sourceLabel }}</span>\n }\n }\n `,\n styles: [`\n :host {\n display: flex;\n align-items: center;\n gap: 2px;\n flex-shrink: 0;\n height: 36px;\n /* Left indent deliberately DEEPER than the first tab's edge (~16px)\n so the crumb reads as a level BENEATH the tab — hierarchy, not a\n sibling bar. */\n padding: 0 12px 0 24px;\n /* Match the ACTIVE tab's surface so the tab flows into its pane\n (the sunken tone read as a disconnected band between them). */\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n }\n :host:not(:has(*)) { display: none; }\n .crumb-lead {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-right: 6px;\n }\n /* Each breadcrumb level is its OWN link with its own hover */\n .crumb-seg {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 5px 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n font-size: 12px;\n line-height: 1;\n font-family: inherit;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: background 0.15s, color 0.15s;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .crumb-seg:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .crumb-seg:focus-visible {\n outline: 2px solid var(--mj-border-focus);\n outline-offset: -2px;\n }\n .crumb-page { font-weight: 500; }\n .crumb-sep { color: var(--mj-text-muted); font-size: 12px; }\n .origin-static {\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n `]\n})\nexport class RecordOriginCrumbComponent {\n @Input() Origin: RecordSourceContext | null = null;\n\n private navigationService = inject(NavigationService);\n\n get Clickable(): boolean {\n return RecordSourceHasReturnTarget(this.Origin);\n }\n\n /** Page segment: full restore — the captured page, section state included */\n async OnPageClick(): Promise<void> {\n if (this.Origin) {\n await this.navigationService.ReturnToRecordSource(this.Origin);\n }\n }\n\n /** App segment: the app's LANDING page (breadcrumb level semantics) */\n async OnAppClick(): Promise<void> {\n if (this.Origin?.sourceAppId) {\n await this.navigationService.SwitchToAppHome(this.Origin.sourceAppId);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"record-origin-crumb.component.js","sourceRoot":"","sources":["../../../../../src/lib/shell/components/record-open/record-origin-crumb.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAuB,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;IA8BpD,oCAA6G;IAArE,8NAAS,oBAAa,KAAC;IAC7D,YACF;IAAA,oBAAS;;;IADP,cACF;IADE,oDACF;;;;IAME,kCAA2C;IAAA,sBAAC;IAAA,oBAAO;IACnD,oCAAwH;IAArE,4OAAS,oBAAa,KAAC;IACxE,YACF;IAAA,oBAAS;;;IADP,eACF;IADE,6DACF;;;;IAPF,oCAAyG;IAAjE,8NAAS,mBAAY,KAAC;IAC5D,YACF;IAAA,oBAAS;IACT,4HAA6B;;;IAHkC,iEAAyC;IACtG,cACF;IADE,4DACF;IACA,cAKC;IALD,uDAKC;;;IAdH,0BAAoE;IAKlE,AAJF,2HAAoB,wFAIX;;;IAJT,cAcC;IAdD,6CAcC;;;IAGD,kCAA4B;IAAA,YAA6C;IAAA,oBAAO;;;IAApD,cAA6C;IAA7C,gFAA6C;;;IAFzE,AAjBF,gGAAiB,qFAiBR;;;IAjBT,0CAoBC;;AA7CP;;;;;;;;;;;GAWG;AA+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,CAAC,MAAM,EAAE,kBAAkB,KAAK,UAAU,EAAE,CAAC;wBAC3D,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;wBAC/B,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;oBAC1B,CAAC;gBACH,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;oBACZ,sEAAsE;gBACxE,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,6EAA6E;IAC7E,KAAK,CAAC,WAAW;QACf,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,MAAM,IAAI,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,uEAAuE;IACvE,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC;YAC7B,MAAM,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;oHA9EU,0BAA0B;6DAA1B,0BAA0B;YAA1B,6GAAA,wBAAwB,IAAE,wFAA1B,wBAAwB,IAAE;;YAlFnC,kFAAc;;YAAd,qCAsBC;;;iFA4DQ,0BAA0B;cA9FtC,SAAS;2BACE,wBAAwB,cACtB,IAAI,QAKV;oBACJ,aAAa,EAAE,0BAA0B;oBACzC,SAAS,EAAE,0BAA0B;iBACtC,YACS;;;;;;;;;;;;;;;;;;;;;;;;GAwBT;;kBA+DA,KAAK;;kFAJK,0BAA0B","sourcesContent":["import { Component, Input, inject, ChangeDetectorRef } from '@angular/core';\nimport { NavigationService, RecordSourceContext, RecordSourceHasReturnTarget } from '@memberjunction/ng-shared';\nimport { CompositeKey, Metadata } from '@memberjunction/core';\n\n/**\n * Pane-level origin crumb — the FIRST element inside a record's golden-layout\n * pane (Matt's placement call, 2026-07-30: no record-chrome refactor; the\n * crumb rides the pane). One instance per record pane, which makes it correct\n * in every layout context the region-level bar could not be:\n * - split views: each pane carries its OWN origin\n * - docked records (main layout, bar or single-resource): provenance intact\n * - edit mode / custom form headers: unaffected — the crumb sits above the\n * form entirely, in shell-owned territory\n * Rendered/positioned by the tab-container wherever record content attaches\n * (fresh loads, cache reattaches after promote/demote, single-resource).\n */\n@Component({\n selector: 'mj-record-origin-crumb',\n standalone: true,\n // The crumb sits INSIDE a GL pane: without these stoppers, clicks bubble\n // to Golden Layout's pane-focus handlers, which re-activate the pane's\n // own tab and STOMP the navigation the click just started (the app\n // segment created the destination tab and then lost the activation race).\n host: {\n '(mousedown)': '$event.stopPropagation()',\n '(click)': '$event.stopPropagation()'\n },\n template: `\n @if (Origin) {\n @if (Clickable) {\n <i class=\"fa-solid fa-arrow-left crumb-lead\" aria-hidden=\"true\"></i>\n @if (DisplayLabel) {\n <button type=\"button\" class=\"crumb-seg\" (click)=\"OnPageClick()\" title=\"Back to where you opened this record\">\n {{ DisplayLabel }}\n </button>\n } @else {\n <button type=\"button\" class=\"crumb-seg\" (click)=\"OnAppClick()\" [title]=\"'Go to ' + Origin.sourceAppName\">\n {{ Origin.sourceAppName }}\n </button>\n @if (Origin.sourceNavLabel) {\n <span class=\"crumb-sep\" aria-hidden=\"true\">›</span>\n <button type=\"button\" class=\"crumb-seg crumb-page\" (click)=\"OnPageClick()\" title=\"Back to where you opened this record\">\n {{ Origin.sourceNavLabel }}\n </button>\n }\n }\n } @else {\n <!-- Provenance only — no return target (e.g. opened by an agent) -->\n <span class=\"origin-static\">From {{ DisplayLabel || Origin.sourceLabel }}</span>\n }\n }\n `,\n styles: [`\n :host {\n display: flex;\n align-items: center;\n gap: 2px;\n flex-shrink: 0;\n height: 36px;\n /* Left indent deliberately DEEPER than the first tab's edge (~16px)\n so the crumb reads as a level BENEATH the tab — hierarchy, not a\n sibling bar. */\n padding: 0 12px 0 24px;\n /* Match the ACTIVE tab's surface so the tab flows into its pane\n (the sunken tone read as a disconnected band between them). */\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n }\n :host:not(:has(*)) { display: none; }\n .crumb-lead {\n font-size: 11px;\n color: var(--mj-text-muted);\n margin-right: 6px;\n }\n /* Each breadcrumb level is its OWN link with its own hover */\n .crumb-seg {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n padding: 5px 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n font-size: 12px;\n line-height: 1;\n font-family: inherit;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: background 0.15s, color 0.15s;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .crumb-seg:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .crumb-seg:focus-visible {\n outline: 2px solid var(--mj-border-focus);\n outline-offset: -2px;\n }\n .crumb-page { font-weight: 500; }\n .crumb-sep { color: var(--mj-text-muted); font-size: 12px; }\n .origin-static {\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n `]\n})\nexport class RecordOriginCrumbComponent {\n private _origin: RecordSourceContext | null = null;\n public asyncResolvedLabel?: string; // case-violation-ok-legacy-back-compat: an accessor cannot be optional, so a stub would turn this into a required member\n\n @Input()\n set Origin(value: RecordSourceContext | null) {\n this._origin = value;\n this.asyncResolvedLabel = undefined;\n this.resolveAsyncLabel();\n }\n get Origin(): RecordSourceContext | null {\n return this._origin;\n }\n\n private navigationService = inject(NavigationService);\n private cdr = inject(ChangeDetectorRef);\n\n get Clickable(): boolean {\n return RecordSourceHasReturnTarget(this.Origin);\n }\n\n get DisplayLabel(): string | undefined {\n if (this.Origin?.sourceRecordEntity && this.Origin?.sourceRecordId) {\n if (this.asyncResolvedLabel) {\n return this.asyncResolvedLabel;\n }\n const md = Metadata.Provider; // global-provider-ok: shell breadcrumb component displays navigation history using global metadata cache\n const entity = md?.EntityByName(this.Origin.sourceRecordEntity);\n const key = CompositeKey.FromURLSegment(entity, this.Origin.sourceRecordId);\n const cached = md ? md.GetCachedRecordNameOnlyIfCached(this.Origin.sourceRecordEntity, key) : undefined;\n if (cached) {\n return cached;\n }\n const fallbackEntityLabel = entity?.DisplayName || entity?.Name || this.Origin.sourceRecordEntity;\n if (this.Origin.sourceLabel && !this.Origin.sourceLabel.includes(this.Origin.sourceRecordId)) {\n return this.Origin.sourceLabel;\n }\n return fallbackEntityLabel;\n }\n return this.Origin?.sourceLabel;\n }\n\n private resolveAsyncLabel(): void {\n const md = Metadata.Provider; // global-provider-ok: shell breadcrumb component asynchronously resolves record name using global metadata provider\n if (this.Origin?.sourceRecordEntity && this.Origin?.sourceRecordId && md) {\n const entity = md.EntityByName(this.Origin.sourceRecordEntity);\n const key = CompositeKey.FromURLSegment(entity, this.Origin.sourceRecordId);\n const cached = md.GetCachedRecordNameOnlyIfCached(this.Origin.sourceRecordEntity, key);\n if (cached) {\n this.asyncResolvedLabel = cached;\n return;\n }\n const entityName = this.Origin.sourceRecordEntity;\n if (typeof md.GetEntityRecordName === 'function') {\n md.GetEntityRecordName(entityName, key).then(name => {\n if (name && this.Origin?.sourceRecordEntity === entityName) {\n this.asyncResolvedLabel = name;\n this.cdr.markForCheck();\n }\n }).catch(() => {\n // Silently ignore async name fetch error, fallback will remain active\n });\n }\n }\n }\n\n /** Page segment: full restore — the captured page, section state included */\n async OnPageClick(): Promise<void> {\n if (this.Origin) {\n await this.navigationService.ReturnToRecordSource(this.Origin);\n }\n }\n\n /** App segment: the app's LANDING page (breadcrumb level semantics) */\n async OnAppClick(): Promise<void> {\n if (this.Origin?.sourceAppId) {\n await this.navigationService.SwitchToAppHome(this.Origin.sourceAppId);\n }\n }\n}\n"]}
|
|
@@ -89,19 +89,27 @@ export declare class ComponentCacheManager {
|
|
|
89
89
|
/**
|
|
90
90
|
* Check if a component exists in cache and is available for reuse.
|
|
91
91
|
*/
|
|
92
|
+
HasAvailableComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): boolean;
|
|
93
|
+
/** @deprecated Use {@link HasAvailableComponent}. */
|
|
92
94
|
hasAvailableComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): boolean;
|
|
93
95
|
/**
|
|
94
96
|
* Get a cached component if available (not currently attached).
|
|
95
97
|
* Lookup is by resource identity, not tab ID.
|
|
96
98
|
*/
|
|
99
|
+
GetCachedComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): CachedComponentInfo | null;
|
|
100
|
+
/** @deprecated Use {@link GetCachedComponent}. */
|
|
97
101
|
getCachedComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): CachedComponentInfo | null;
|
|
98
102
|
/**
|
|
99
103
|
* Store a component in the cache and mark as attached.
|
|
100
104
|
*/
|
|
105
|
+
CacheComponent(componentRef: ComponentRef<BaseResourceComponent>, wrapperElement: HTMLElement, resourceData: ResourceData, tabId: string): void;
|
|
106
|
+
/** @deprecated Use {@link CacheComponent}. */
|
|
101
107
|
cacheComponent(componentRef: ComponentRef<BaseResourceComponent>, wrapperElement: HTMLElement, resourceData: ResourceData, tabId: string): void;
|
|
102
108
|
/**
|
|
103
109
|
* Mark a component as attached. Lookup by resource identity.
|
|
104
110
|
*/
|
|
111
|
+
MarkAsAttached(resourceType: string, recordId: string, appId: string, tabId: string, discriminator?: string): void;
|
|
112
|
+
/** @deprecated Use {@link MarkAsAttached}. */
|
|
105
113
|
markAsAttached(resourceType: string, recordId: string, appId: string, tabId: string, discriminator?: string): void;
|
|
106
114
|
/**
|
|
107
115
|
* Mark a component as detached (available for reuse). Lookup by resource identity.
|
|
@@ -109,6 +117,8 @@ export declare class ComponentCacheManager {
|
|
|
109
117
|
* This is the ONLY way to detach a component. Both single-resource mode and
|
|
110
118
|
* Golden Layout mode use this same method to ensure consistent cache behavior.
|
|
111
119
|
*/
|
|
120
|
+
MarkAsDetached(resourceType: string, recordId: string, appId: string, discriminator?: string): CachedComponentInfo | null;
|
|
121
|
+
/** @deprecated Use {@link MarkAsDetached}. */
|
|
112
122
|
markAsDetached(resourceType: string, recordId: string, appId: string, discriminator?: string): CachedComponentInfo | null;
|
|
113
123
|
/**
|
|
114
124
|
* Re-key a cached component when its underlying record identity changes.
|
|
@@ -121,6 +131,8 @@ export declare class ComponentCacheManager {
|
|
|
121
131
|
* Preserves the live component instance — only the cache key + stored identity change.
|
|
122
132
|
* Returns true if a matching entry was found and re-keyed, false otherwise.
|
|
123
133
|
*/
|
|
134
|
+
RekeyComponent(resourceType: string, oldRecordId: string, newRecordId: string, appId: string, oldDiscriminator?: string, newDiscriminator?: string): boolean;
|
|
135
|
+
/** @deprecated Use {@link RekeyComponent}. */
|
|
124
136
|
rekeyComponent(resourceType: string, oldRecordId: string, newRecordId: string, appId: string, oldDiscriminator?: string, newDiscriminator?: string): boolean;
|
|
125
137
|
/**
|
|
126
138
|
* Find a cached component by tab ID and detach it.
|
|
@@ -128,29 +140,39 @@ export declare class ComponentCacheManager {
|
|
|
128
140
|
* (e.g., Golden Layout tab close events). It resolves the tab ID to
|
|
129
141
|
* resource identity, then delegates to the identity-based markAsDetached.
|
|
130
142
|
*/
|
|
143
|
+
FindAndDetachByTabId(tabId: string): CachedComponentInfo | null;
|
|
144
|
+
/** @deprecated Use {@link FindAndDetachByTabId}. */
|
|
131
145
|
findAndDetachByTabId(tabId: string): CachedComponentInfo | null;
|
|
132
146
|
/**
|
|
133
147
|
* Evict least-recently-used detached components when over the limit.
|
|
134
148
|
* Only evicts components that are not currently attached.
|
|
135
149
|
*/
|
|
136
|
-
private
|
|
150
|
+
private evictIfNeeded;
|
|
137
151
|
/**
|
|
138
152
|
* Get component info by tab ID (for finding what's attached to a tab).
|
|
139
153
|
* Uses linear scan since tabId is metadata, not a key.
|
|
140
154
|
*/
|
|
155
|
+
GetComponentByTabId(tabId: string): CachedComponentInfo | null;
|
|
156
|
+
/** @deprecated Use {@link GetComponentByTabId}. */
|
|
141
157
|
getComponentByTabId(tabId: string): CachedComponentInfo | null;
|
|
142
158
|
/**
|
|
143
159
|
* Remove and destroy a specific component from cache by resource identity.
|
|
144
160
|
*/
|
|
161
|
+
DestroyComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): void;
|
|
162
|
+
/** @deprecated Use {@link DestroyComponent}. */
|
|
145
163
|
destroyComponent(resourceType: string, recordId: string, appId: string, discriminator?: string): void;
|
|
146
164
|
/**
|
|
147
165
|
* Remove and destroy component by tab ID (convenience for Golden Layout tab close).
|
|
148
166
|
*/
|
|
167
|
+
DestroyComponentByTabId(tabId: string): void;
|
|
168
|
+
/** @deprecated Use {@link DestroyComponentByTabId}. */
|
|
149
169
|
destroyComponentByTabId(tabId: string): void;
|
|
150
170
|
/**
|
|
151
171
|
* Clear the entire cache, destroying all components.
|
|
152
172
|
* Call this on user logout or app shutdown.
|
|
153
173
|
*/
|
|
174
|
+
ClearCache(): void;
|
|
175
|
+
/** @deprecated Use {@link ClearCache}. */
|
|
154
176
|
clearCache(): void;
|
|
155
177
|
/**
|
|
156
178
|
* Selectively clear cached components matching a predicate.
|
|
@@ -166,6 +188,13 @@ export declare class ComponentCacheManager {
|
|
|
166
188
|
/**
|
|
167
189
|
* Get cache statistics for debugging.
|
|
168
190
|
*/
|
|
191
|
+
GetCacheStats(): {
|
|
192
|
+
total: number;
|
|
193
|
+
attached: number;
|
|
194
|
+
detached: number;
|
|
195
|
+
byResourceType: Map<string, number>;
|
|
196
|
+
};
|
|
197
|
+
/** @deprecated Use {@link GetCacheStats}. */
|
|
169
198
|
getCacheStats(): {
|
|
170
199
|
total: number;
|
|
171
200
|
attached: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-cache-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shell/components/tabs/component-cache-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D;;GAEG;AACH,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AgB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAYrG;;OAEG;IACH,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAY5C;;;OAGG;IACH,UAAU,IAAI,IAAI;IAQlB;;;;;;;;;OASG;IACH,qBAAqB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,GAAG,MAAM;IAoBhF;;OAEG;IACH,aAAa,IAAI;QACf,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACrC;
|
|
1
|
+
{"version":3,"file":"component-cache-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shell/components/tabs/component-cache-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAElC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAGlD,cAAc,EAAE,WAAW,CAAC;IAG5B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IAMtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAG/B,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAGhB,YAAY,EAAE,YAAY,CAAC;IAK3B,gB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;OASG;IACH,qBAAqB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,GAAG,MAAM;IAoBhF;;OAEG;IACH,aAAa,IAAI;QACf,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACrC;IAsBD,6CAA6C;IAC7C,aAAa,IAAI;QACf,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACrC;CAGF"}
|
|
@@ -79,16 +79,20 @@ export class ComponentCacheManager {
|
|
|
79
79
|
/**
|
|
80
80
|
* Check if a component exists in cache and is available for reuse.
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
HasAvailableComponent(resourceType, recordId, appId, discriminator) {
|
|
83
83
|
const key = this.getCacheKey(resourceType, recordId, appId, discriminator);
|
|
84
84
|
const info = this.cache.get(key);
|
|
85
85
|
return info !== undefined && !info.isAttached;
|
|
86
86
|
}
|
|
87
|
+
/** @deprecated Use {@link HasAvailableComponent}. */
|
|
88
|
+
hasAvailableComponent(resourceType, recordId, appId, discriminator) {
|
|
89
|
+
return this.HasAvailableComponent(resourceType, recordId, appId, discriminator);
|
|
90
|
+
}
|
|
87
91
|
/**
|
|
88
92
|
* Get a cached component if available (not currently attached).
|
|
89
93
|
* Lookup is by resource identity, not tab ID.
|
|
90
94
|
*/
|
|
91
|
-
|
|
95
|
+
GetCachedComponent(resourceType, recordId, appId, discriminator) {
|
|
92
96
|
const key = this.getCacheKey(resourceType, recordId, appId, discriminator);
|
|
93
97
|
const info = this.cache.get(key);
|
|
94
98
|
if (!info) {
|
|
@@ -100,10 +104,14 @@ export class ComponentCacheManager {
|
|
|
100
104
|
}
|
|
101
105
|
return info;
|
|
102
106
|
}
|
|
107
|
+
/** @deprecated Use {@link GetCachedComponent}. */
|
|
108
|
+
getCachedComponent(resourceType, recordId, appId, discriminator) {
|
|
109
|
+
return this.GetCachedComponent(resourceType, recordId, appId, discriminator);
|
|
110
|
+
}
|
|
103
111
|
/**
|
|
104
112
|
* Store a component in the cache and mark as attached.
|
|
105
113
|
*/
|
|
106
|
-
|
|
114
|
+
CacheComponent(componentRef, wrapperElement, resourceData, tabId) {
|
|
107
115
|
// Use driverClass (the actual component class name) as the resourceType for the cache key,
|
|
108
116
|
// NOT resourceData.ResourceType (which is often just "Custom" for dashboard resources).
|
|
109
117
|
// This must match the lookup key used in getCachedComponent/markAsAttached/markAsDetached.
|
|
@@ -129,10 +137,14 @@ export class ComponentCacheManager {
|
|
|
129
137
|
};
|
|
130
138
|
this.cache.set(key, info);
|
|
131
139
|
}
|
|
140
|
+
/** @deprecated Use {@link CacheComponent}. */
|
|
141
|
+
cacheComponent(componentRef, wrapperElement, resourceData, tabId) {
|
|
142
|
+
return this.CacheComponent(componentRef, wrapperElement, resourceData, tabId);
|
|
143
|
+
}
|
|
132
144
|
/**
|
|
133
145
|
* Mark a component as attached. Lookup by resource identity.
|
|
134
146
|
*/
|
|
135
|
-
|
|
147
|
+
MarkAsAttached(resourceType, recordId, appId, tabId, discriminator) {
|
|
136
148
|
const key = this.getCacheKey(resourceType, recordId, appId, discriminator);
|
|
137
149
|
const info = this.cache.get(key);
|
|
138
150
|
if (info) {
|
|
@@ -144,13 +156,17 @@ export class ComponentCacheManager {
|
|
|
144
156
|
this.navigationService?.NotifyResourceReattached(info.componentRef.instance);
|
|
145
157
|
}
|
|
146
158
|
}
|
|
159
|
+
/** @deprecated Use {@link MarkAsAttached}. */
|
|
160
|
+
markAsAttached(resourceType, recordId, appId, tabId, discriminator) {
|
|
161
|
+
return this.MarkAsAttached(resourceType, recordId, appId, tabId, discriminator);
|
|
162
|
+
}
|
|
147
163
|
/**
|
|
148
164
|
* Mark a component as detached (available for reuse). Lookup by resource identity.
|
|
149
165
|
*
|
|
150
166
|
* This is the ONLY way to detach a component. Both single-resource mode and
|
|
151
167
|
* Golden Layout mode use this same method to ensure consistent cache behavior.
|
|
152
168
|
*/
|
|
153
|
-
|
|
169
|
+
MarkAsDetached(resourceType, recordId, appId, discriminator) {
|
|
154
170
|
const key = this.getCacheKey(resourceType, recordId, appId, discriminator);
|
|
155
171
|
const info = this.cache.get(key);
|
|
156
172
|
if (!info)
|
|
@@ -161,9 +177,13 @@ export class ComponentCacheManager {
|
|
|
161
177
|
// Clear this surface's agent client tools on detach so the previous app's tools aren't offered to
|
|
162
178
|
// the AI agent on the next surface. NotifyResourceReattached replays them if the user returns.
|
|
163
179
|
this.navigationService?.NotifyResourceDetached(info.componentRef.instance);
|
|
164
|
-
this.
|
|
180
|
+
this.evictIfNeeded();
|
|
165
181
|
return info;
|
|
166
182
|
}
|
|
183
|
+
/** @deprecated Use {@link MarkAsDetached}. */
|
|
184
|
+
markAsDetached(resourceType, recordId, appId, discriminator) {
|
|
185
|
+
return this.MarkAsDetached(resourceType, recordId, appId, discriminator);
|
|
186
|
+
}
|
|
167
187
|
/**
|
|
168
188
|
* Re-key a cached component when its underlying record identity changes.
|
|
169
189
|
*
|
|
@@ -175,7 +195,7 @@ export class ComponentCacheManager {
|
|
|
175
195
|
* Preserves the live component instance — only the cache key + stored identity change.
|
|
176
196
|
* Returns true if a matching entry was found and re-keyed, false otherwise.
|
|
177
197
|
*/
|
|
178
|
-
|
|
198
|
+
RekeyComponent(resourceType, oldRecordId, newRecordId, appId, oldDiscriminator, newDiscriminator) {
|
|
179
199
|
const oldKey = this.getCacheKey(resourceType, oldRecordId, appId, oldDiscriminator);
|
|
180
200
|
const info = this.cache.get(oldKey);
|
|
181
201
|
if (!info) {
|
|
@@ -197,25 +217,33 @@ export class ComponentCacheManager {
|
|
|
197
217
|
this.cache.set(newKey, info);
|
|
198
218
|
return true;
|
|
199
219
|
}
|
|
220
|
+
/** @deprecated Use {@link RekeyComponent}. */
|
|
221
|
+
rekeyComponent(resourceType, oldRecordId, newRecordId, appId, oldDiscriminator, newDiscriminator) {
|
|
222
|
+
return this.RekeyComponent(resourceType, oldRecordId, newRecordId, appId, oldDiscriminator, newDiscriminator);
|
|
223
|
+
}
|
|
200
224
|
/**
|
|
201
225
|
* Find a cached component by tab ID and detach it.
|
|
202
226
|
* This is a convenience wrapper for callers that only know the tab ID
|
|
203
227
|
* (e.g., Golden Layout tab close events). It resolves the tab ID to
|
|
204
228
|
* resource identity, then delegates to the identity-based markAsDetached.
|
|
205
229
|
*/
|
|
206
|
-
|
|
230
|
+
FindAndDetachByTabId(tabId) {
|
|
207
231
|
const entry = Array.from(this.cache.entries())
|
|
208
232
|
.find(([_, info]) => info.attachedToTabId === tabId);
|
|
209
233
|
if (!entry)
|
|
210
234
|
return null;
|
|
211
235
|
const [_, info] = entry;
|
|
212
|
-
return this.
|
|
236
|
+
return this.MarkAsDetached(info.resourceType, info.resourceRecordId, info.applicationId, info.keyDiscriminator);
|
|
237
|
+
}
|
|
238
|
+
/** @deprecated Use {@link FindAndDetachByTabId}. */
|
|
239
|
+
findAndDetachByTabId(tabId) {
|
|
240
|
+
return this.FindAndDetachByTabId(tabId);
|
|
213
241
|
}
|
|
214
242
|
/**
|
|
215
243
|
* Evict least-recently-used detached components when over the limit.
|
|
216
244
|
* Only evicts components that are not currently attached.
|
|
217
245
|
*/
|
|
218
|
-
|
|
246
|
+
evictIfNeeded() {
|
|
219
247
|
if (ComponentCacheManager.MaxDetachedComponents <= 0)
|
|
220
248
|
return;
|
|
221
249
|
const detached = Array.from(this.cache.entries())
|
|
@@ -234,15 +262,19 @@ export class ComponentCacheManager {
|
|
|
234
262
|
* Get component info by tab ID (for finding what's attached to a tab).
|
|
235
263
|
* Uses linear scan since tabId is metadata, not a key.
|
|
236
264
|
*/
|
|
237
|
-
|
|
265
|
+
GetComponentByTabId(tabId) {
|
|
238
266
|
const entry = Array.from(this.cache.entries())
|
|
239
267
|
.find(([_, info]) => info.attachedToTabId === tabId);
|
|
240
268
|
return entry ? entry[1] : null;
|
|
241
269
|
}
|
|
270
|
+
/** @deprecated Use {@link GetComponentByTabId}. */
|
|
271
|
+
getComponentByTabId(tabId) {
|
|
272
|
+
return this.GetComponentByTabId(tabId);
|
|
273
|
+
}
|
|
242
274
|
/**
|
|
243
275
|
* Remove and destroy a specific component from cache by resource identity.
|
|
244
276
|
*/
|
|
245
|
-
|
|
277
|
+
DestroyComponent(resourceType, recordId, appId, discriminator) {
|
|
246
278
|
const key = this.getCacheKey(resourceType, recordId, appId, discriminator);
|
|
247
279
|
const info = this.cache.get(key);
|
|
248
280
|
if (!info)
|
|
@@ -252,10 +284,14 @@ export class ComponentCacheManager {
|
|
|
252
284
|
info.componentRef.destroy();
|
|
253
285
|
this.cache.delete(key);
|
|
254
286
|
}
|
|
287
|
+
/** @deprecated Use {@link DestroyComponent}. */
|
|
288
|
+
destroyComponent(resourceType, recordId, appId, discriminator) {
|
|
289
|
+
return this.DestroyComponent(resourceType, recordId, appId, discriminator);
|
|
290
|
+
}
|
|
255
291
|
/**
|
|
256
292
|
* Remove and destroy component by tab ID (convenience for Golden Layout tab close).
|
|
257
293
|
*/
|
|
258
|
-
|
|
294
|
+
DestroyComponentByTabId(tabId) {
|
|
259
295
|
const entry = Array.from(this.cache.entries())
|
|
260
296
|
.find(([_, info]) => info.attachedToTabId === tabId);
|
|
261
297
|
if (!entry)
|
|
@@ -265,17 +301,25 @@ export class ComponentCacheManager {
|
|
|
265
301
|
info.componentRef.destroy();
|
|
266
302
|
this.cache.delete(key);
|
|
267
303
|
}
|
|
304
|
+
/** @deprecated Use {@link DestroyComponentByTabId}. */
|
|
305
|
+
destroyComponentByTabId(tabId) {
|
|
306
|
+
return this.DestroyComponentByTabId(tabId);
|
|
307
|
+
}
|
|
268
308
|
/**
|
|
269
309
|
* Clear the entire cache, destroying all components.
|
|
270
310
|
* Call this on user logout or app shutdown.
|
|
271
311
|
*/
|
|
272
|
-
|
|
312
|
+
ClearCache() {
|
|
273
313
|
this.cache.forEach(info => {
|
|
274
314
|
this.appRef.detachView(info.componentRef.hostView);
|
|
275
315
|
info.componentRef.destroy();
|
|
276
316
|
});
|
|
277
317
|
this.cache.clear();
|
|
278
318
|
}
|
|
319
|
+
/** @deprecated Use {@link ClearCache}. */
|
|
320
|
+
clearCache() {
|
|
321
|
+
return this.ClearCache();
|
|
322
|
+
}
|
|
279
323
|
/**
|
|
280
324
|
* Selectively clear cached components matching a predicate.
|
|
281
325
|
* Components that match are destroyed; those that don't are kept.
|
|
@@ -305,7 +349,7 @@ export class ComponentCacheManager {
|
|
|
305
349
|
/**
|
|
306
350
|
* Get cache statistics for debugging.
|
|
307
351
|
*/
|
|
308
|
-
|
|
352
|
+
GetCacheStats() {
|
|
309
353
|
const stats = {
|
|
310
354
|
total: this.cache.size,
|
|
311
355
|
attached: 0,
|
|
@@ -324,5 +368,9 @@ export class ComponentCacheManager {
|
|
|
324
368
|
});
|
|
325
369
|
return stats;
|
|
326
370
|
}
|
|
371
|
+
/** @deprecated Use {@link GetCacheStats}. */
|
|
372
|
+
getCacheStats() {
|
|
373
|
+
return this.GetCacheStats();
|
|
374
|
+
}
|
|
327
375
|
}
|
|
328
376
|
//# sourceMappingURL=component-cache-manager.js.map
|