@memberjunction/ng-explorer-core 6.2.0-edge.1 → 6.2.0-edge.3
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/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 +22 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +7 -3
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +10 -5
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +13 -2
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +35 -6
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/compose-email-fallback.d.ts +46 -0
- package/dist/lib/resource-wrappers/compose-email-fallback.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/compose-email-fallback.js +62 -0
- package/dist/lib/resource-wrappers/compose-email-fallback.js.map +1 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.d.ts +32 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.js +114 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.js.map +1 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +13 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +210 -132
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/meetings-resource.component.d.ts +42 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.js +225 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.js.map +1 -0
- package/dist/lib/resource-wrappers/record-resource.component.d.ts +27 -2
- package/dist/lib/resource-wrappers/record-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +58 -6
- package/dist/lib/resource-wrappers/record-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +6 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +37 -7
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/services/server-connectivity.service.d.ts +9 -4
- package/dist/lib/services/server-connectivity.service.d.ts.map +1 -1
- package/dist/lib/services/server-connectivity.service.js +56 -12
- package/dist/lib/services/server-connectivity.service.js.map +1 -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.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +31 -0
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +57 -2
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +2 -0
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +19 -9
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +29 -3
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +44 -4
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +13 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +67 -0
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/module.d.ts +36 -33
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +25 -4
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +53 -52
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CompositeKey, BaseEntity } from '@memberjunction/core';
|
|
3
3
|
import { FormNavigationEvent, FormNotificationEvent } from '@memberjunction/ng-base-forms';
|
|
4
|
+
import type { BaseFormComponent, FormCompositionSnapshot } from '@memberjunction/ng-base-forms';
|
|
4
5
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
@@ -17,7 +18,7 @@ import * as i0 from "@angular/core";
|
|
|
17
18
|
* record loads → {@link RecentAccessService} — none of which belong in a Generic
|
|
18
19
|
* component.
|
|
19
20
|
*/
|
|
20
|
-
export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
21
|
+
export declare class SingleRecordComponent extends BaseAngularComponent implements OnDestroy {
|
|
21
22
|
PrimaryKey: CompositeKey;
|
|
22
23
|
entityName: string | null;
|
|
23
24
|
NewRecordValues: string | Record<string, unknown> | null;
|
|
@@ -53,6 +54,20 @@ export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
|
53
54
|
* initialise in order, and the other way round this captures undefined.
|
|
54
55
|
*/
|
|
55
56
|
recordDismissed: EventEmitter<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Edit mode of the hosted form started (true) or ended (false). Relayed from
|
|
59
|
+
* `<mj-entity-form-host>` so the resource wrapper can tell the shell to
|
|
60
|
+
* promote this tab. {@link IsEditing} remains as the synchronous fallback.
|
|
61
|
+
*/
|
|
62
|
+
EditModeChanged: EventEmitter<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* The live form's composition — sections, related grids, contributions, and the slots
|
|
65
|
+
* the form actually emits. Re-emitted on every chrome resolve.
|
|
66
|
+
*
|
|
67
|
+
* The form is created dynamically inside `<mj-entity-form-host>`, so this relay is the
|
|
68
|
+
* only route the snapshot has out to Explorer.
|
|
69
|
+
*/
|
|
70
|
+
CompositionChanged: EventEmitter<FormCompositionSnapshot>;
|
|
56
71
|
private formHost?;
|
|
57
72
|
/**
|
|
58
73
|
* True while the hosted form is in edit mode. The host already exposes the
|
|
@@ -71,6 +86,16 @@ export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
|
71
86
|
OnLoadComplete(): void;
|
|
72
87
|
/** @deprecated Use {@link OnLoadComplete}. */
|
|
73
88
|
onLoadComplete(): void;
|
|
89
|
+
private compositionSub;
|
|
90
|
+
/**
|
|
91
|
+
* Bind to the newly created form's composition stream.
|
|
92
|
+
*
|
|
93
|
+
* The previous subscription is dropped first: the host re-creates the form when the
|
|
94
|
+
* user switches variants, and a retained subscription would let the replaced form
|
|
95
|
+
* keep publishing over the live one.
|
|
96
|
+
*/
|
|
97
|
+
onFormCreated(form: BaseFormComponent): void;
|
|
98
|
+
ngOnDestroy(): void;
|
|
74
99
|
/** Log access for existing records once the form's record is ready. */
|
|
75
100
|
OnRecordReady(record: BaseEntity): void;
|
|
76
101
|
/** @deprecated Use {@link OnRecordReady}. */
|
|
@@ -78,6 +103,7 @@ export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
|
78
103
|
OnSaved(record: BaseEntity): void;
|
|
79
104
|
/** @deprecated Use {@link OnSaved}. */
|
|
80
105
|
onSaved(record: BaseEntity): void;
|
|
106
|
+
OnEditModeChanged(editing: boolean): void;
|
|
81
107
|
OnNotification(event: FormNotificationEvent): void;
|
|
82
108
|
/** @deprecated Use {@link OnNotification}. */
|
|
83
109
|
onNotification(event: FormNotificationEvent): void;
|
|
@@ -86,6 +112,6 @@ export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
|
86
112
|
/** @deprecated Use {@link HandleNavigation}. */
|
|
87
113
|
handleNavigation(event: FormNavigationEvent): void;
|
|
88
114
|
static ɵfac: i0.ɵɵFactoryDeclaration<SingleRecordComponent, never>;
|
|
89
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SingleRecordComponent, "mj-single-record", never, { "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "NewRecordValues": { "alias": "NewRecordValues"; "required": false; }; "newRecordValues": { "alias": "newRecordValues"; "required": false; }; }, { "LoadComplete": "LoadComplete"; "loadComplete": "loadComplete"; "RecordSaved": "RecordSaved"; "recordSaved": "recordSaved"; "RecordDismissed": "RecordDismissed"; "recordDismissed": "recordDismissed"; }, never, never, false, never>;
|
|
115
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleRecordComponent, "mj-single-record", never, { "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "NewRecordValues": { "alias": "NewRecordValues"; "required": false; }; "newRecordValues": { "alias": "newRecordValues"; "required": false; }; }, { "LoadComplete": "LoadComplete"; "loadComplete": "loadComplete"; "RecordSaved": "RecordSaved"; "recordSaved": "recordSaved"; "RecordDismissed": "RecordDismissed"; "recordDismissed": "recordDismissed"; "EditModeChanged": "EditModeChanged"; "CompositionChanged": "CompositionChanged"; }, never, never, false, never>;
|
|
90
116
|
}
|
|
91
117
|
//# sourceMappingURL=single-record.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,
|
|
1
|
+
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,SAAS,EAAqB,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE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AA6B;IACtD,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,mBAAmB,CAA6B;IAExD,uEAAuE;IACvE,cAAc,IAAI,IAAI;IAItB,8CAA8C;IAC9C,cAAc,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc,CAA6B;IAEnD;;;;;;OAMG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAU5C,WAAW,IAAI,IAAI;IAKnB,uEAAuE;IACvE,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAMvC,6CAA6C;IAC7C,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIvC,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIjC,uCAAuC;IACvC,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIjC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIzC,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI;IAIlD,8CAA8C;IAC9C,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI;IAIlD,4EAA4E;IAC5E,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAyClD,gDAAgD;IAChD,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;yCAhMvC,qBAAqB;2CAArB,qBAAqB;CAmMjC"}
|
|
@@ -59,6 +59,20 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
59
59
|
* initialise in order, and the other way round this captures undefined.
|
|
60
60
|
*/
|
|
61
61
|
recordDismissed = this.RecordDismissed;
|
|
62
|
+
/**
|
|
63
|
+
* Edit mode of the hosted form started (true) or ended (false). Relayed from
|
|
64
|
+
* `<mj-entity-form-host>` so the resource wrapper can tell the shell to
|
|
65
|
+
* promote this tab. {@link IsEditing} remains as the synchronous fallback.
|
|
66
|
+
*/
|
|
67
|
+
EditModeChanged = new EventEmitter();
|
|
68
|
+
/**
|
|
69
|
+
* The live form's composition — sections, related grids, contributions, and the slots
|
|
70
|
+
* the form actually emits. Re-emitted on every chrome resolve.
|
|
71
|
+
*
|
|
72
|
+
* The form is created dynamically inside `<mj-entity-form-host>`, so this relay is the
|
|
73
|
+
* only route the snapshot has out to Explorer.
|
|
74
|
+
*/
|
|
75
|
+
CompositionChanged = new EventEmitter();
|
|
62
76
|
formHost;
|
|
63
77
|
/**
|
|
64
78
|
* True while the hosted form is in edit mode. The host already exposes the
|
|
@@ -83,6 +97,25 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
83
97
|
onLoadComplete() {
|
|
84
98
|
return this.OnLoadComplete();
|
|
85
99
|
}
|
|
100
|
+
compositionSub = null;
|
|
101
|
+
/**
|
|
102
|
+
* Bind to the newly created form's composition stream.
|
|
103
|
+
*
|
|
104
|
+
* The previous subscription is dropped first: the host re-creates the form when the
|
|
105
|
+
* user switches variants, and a retained subscription would let the replaced form
|
|
106
|
+
* keep publishing over the live one.
|
|
107
|
+
*/
|
|
108
|
+
onFormCreated(form) {
|
|
109
|
+
this.compositionSub?.unsubscribe();
|
|
110
|
+
this.compositionSub = form.CompositionChanged.subscribe((snapshot) => this.CompositionChanged.emit(snapshot));
|
|
111
|
+
if (form.CompositionSnapshot) {
|
|
112
|
+
this.CompositionChanged.emit(form.CompositionSnapshot);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
ngOnDestroy() {
|
|
116
|
+
this.compositionSub?.unsubscribe();
|
|
117
|
+
this.compositionSub = null;
|
|
118
|
+
}
|
|
86
119
|
/** Log access for existing records once the form's record is ready. */
|
|
87
120
|
OnRecordReady(record) {
|
|
88
121
|
if (record?.IsSaved) {
|
|
@@ -100,6 +133,9 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
100
133
|
onSaved(record) {
|
|
101
134
|
return this.OnSaved(record);
|
|
102
135
|
}
|
|
136
|
+
OnEditModeChanged(editing) {
|
|
137
|
+
this.EditModeChanged.emit(editing);
|
|
138
|
+
}
|
|
103
139
|
OnNotification(event) {
|
|
104
140
|
this.sharedService.CreateSimpleNotification(event.Message, event.Type, event.Duration);
|
|
105
141
|
}
|
|
@@ -158,9 +194,9 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
158
194
|
} if (rf & 2) {
|
|
159
195
|
let _t;
|
|
160
196
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formHost = _t.first);
|
|
161
|
-
} }, inputs: { PrimaryKey: "PrimaryKey", entityName: "entityName", NewRecordValues: "NewRecordValues", newRecordValues: "newRecordValues" }, outputs: { LoadComplete: "LoadComplete", loadComplete: "loadComplete", RecordSaved: "RecordSaved", recordSaved: "recordSaved", RecordDismissed: "RecordDismissed", recordDismissed: "recordDismissed" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 4, consts: [[3, "LoadComplete", "LoadError", "RecordReady", "Saved", "Navigate", "Notification", "Dismissed", "EntityName", "PrimaryKey", "NewRecordValues", "Provider"]], template: function SingleRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
197
|
+
} }, inputs: { PrimaryKey: "PrimaryKey", entityName: "entityName", NewRecordValues: "NewRecordValues", newRecordValues: "newRecordValues" }, outputs: { LoadComplete: "LoadComplete", loadComplete: "loadComplete", RecordSaved: "RecordSaved", recordSaved: "recordSaved", RecordDismissed: "RecordDismissed", recordDismissed: "recordDismissed", EditModeChanged: "EditModeChanged", CompositionChanged: "CompositionChanged" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 4, consts: [[3, "LoadComplete", "LoadError", "RecordReady", "Saved", "Navigate", "Notification", "EditModeChanged", "Dismissed", "FormCreated", "EntityName", "PrimaryKey", "NewRecordValues", "Provider"]], template: function SingleRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
162
198
|
i0.ɵɵelementStart(0, "mj-entity-form-host", 0);
|
|
163
|
-
i0.ɵɵlistener("LoadComplete", function SingleRecordComponent_Template_mj_entity_form_host_LoadComplete_0_listener() { return ctx.onLoadComplete(); })("LoadError", function SingleRecordComponent_Template_mj_entity_form_host_LoadError_0_listener() { return ctx.onLoadComplete(); })("RecordReady", function SingleRecordComponent_Template_mj_entity_form_host_RecordReady_0_listener($event) { return ctx.onRecordReady($event); })("Saved", function SingleRecordComponent_Template_mj_entity_form_host_Saved_0_listener($event) { return ctx.onSaved($event); })("Navigate", function SingleRecordComponent_Template_mj_entity_form_host_Navigate_0_listener($event) { return ctx.handleNavigation($event); })("Notification", function SingleRecordComponent_Template_mj_entity_form_host_Notification_0_listener($event) { return ctx.onNotification($event); })("Dismissed", function SingleRecordComponent_Template_mj_entity_form_host_Dismissed_0_listener() { return ctx.recordDismissed.emit(); });
|
|
199
|
+
i0.ɵɵlistener("LoadComplete", function SingleRecordComponent_Template_mj_entity_form_host_LoadComplete_0_listener() { return ctx.onLoadComplete(); })("LoadError", function SingleRecordComponent_Template_mj_entity_form_host_LoadError_0_listener() { return ctx.onLoadComplete(); })("RecordReady", function SingleRecordComponent_Template_mj_entity_form_host_RecordReady_0_listener($event) { return ctx.onRecordReady($event); })("Saved", function SingleRecordComponent_Template_mj_entity_form_host_Saved_0_listener($event) { return ctx.onSaved($event); })("Navigate", function SingleRecordComponent_Template_mj_entity_form_host_Navigate_0_listener($event) { return ctx.handleNavigation($event); })("Notification", function SingleRecordComponent_Template_mj_entity_form_host_Notification_0_listener($event) { return ctx.onNotification($event); })("EditModeChanged", function SingleRecordComponent_Template_mj_entity_form_host_EditModeChanged_0_listener($event) { return ctx.OnEditModeChanged($event); })("Dismissed", function SingleRecordComponent_Template_mj_entity_form_host_Dismissed_0_listener() { return ctx.recordDismissed.emit(); })("FormCreated", function SingleRecordComponent_Template_mj_entity_form_host_FormCreated_0_listener($event) { return ctx.onFormCreated($event); });
|
|
164
200
|
i0.ɵɵelementEnd();
|
|
165
201
|
} if (rf & 2) {
|
|
166
202
|
i0.ɵɵproperty("EntityName", ctx.entityName)("PrimaryKey", ctx.PrimaryKey)("NewRecordValues", ctx.newRecordValues)("Provider", ctx.Provider);
|
|
@@ -168,7 +204,7 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
168
204
|
}
|
|
169
205
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleRecordComponent, [{
|
|
170
206
|
type: Component,
|
|
171
|
-
args: [{ standalone: false, selector: 'mj-single-record', template: "<mj-entity-form-host\n [EntityName]=\"entityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [NewRecordValues]=\"newRecordValues\"\n [Provider]=\"Provider\"\n (LoadComplete)=\"onLoadComplete()\"\n (LoadError)=\"onLoadComplete()\"\n (RecordReady)=\"onRecordReady($event)\"\n (Saved)=\"onSaved($event)\"\n (Navigate)=\"handleNavigation($event)\"\n (Notification)=\"onNotification($event)\"\n (Dismissed)=\"recordDismissed.emit()\">\n</mj-entity-form-host>\n", styles: [":host {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n.single-record-error {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 48px 32px;\n max-width: 720px;\n margin: 64px auto;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-status-error-border);\n border-radius: 8px;\n color: var(--mj-text-primary);\n}\n\n.single-record-error__icon {\n font-size: 36px;\n color: var(--mj-status-error);\n margin-bottom: 16px;\n}\n\n.single-record-error__title {\n font-size: 18px;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: var(--mj-status-error-text);\n}\n\n.single-record-error__detail {\n font-size: 14px;\n line-height: 1.5;\n color: var(--mj-text-secondary);\n margin: 0 0 16px 0;\n white-space: pre-wrap;\n}\n\n.single-record-error__hint {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin: 0;\n font-style: italic;\n}\n"] }]
|
|
207
|
+
args: [{ standalone: false, selector: 'mj-single-record', template: "<mj-entity-form-host\n [EntityName]=\"entityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [NewRecordValues]=\"newRecordValues\"\n [Provider]=\"Provider\"\n (LoadComplete)=\"onLoadComplete()\"\n (LoadError)=\"onLoadComplete()\"\n (RecordReady)=\"onRecordReady($event)\"\n (Saved)=\"onSaved($event)\"\n (Navigate)=\"handleNavigation($event)\"\n (Notification)=\"onNotification($event)\"\n (EditModeChanged)=\"OnEditModeChanged($event)\"\n (Dismissed)=\"recordDismissed.emit()\"\n (FormCreated)=\"onFormCreated($event)\">\n</mj-entity-form-host>\n", styles: [":host {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n.single-record-error {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 48px 32px;\n max-width: 720px;\n margin: 64px auto;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-status-error-border);\n border-radius: 8px;\n color: var(--mj-text-primary);\n}\n\n.single-record-error__icon {\n font-size: 36px;\n color: var(--mj-status-error);\n margin-bottom: 16px;\n}\n\n.single-record-error__title {\n font-size: 18px;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: var(--mj-status-error-text);\n}\n\n.single-record-error__detail {\n font-size: 14px;\n line-height: 1.5;\n color: var(--mj-text-secondary);\n margin: 0 0 16px 0;\n white-space: pre-wrap;\n}\n\n.single-record-error__hint {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin: 0;\n font-style: italic;\n}\n"] }]
|
|
172
208
|
}], null, { PrimaryKey: [{
|
|
173
209
|
type: Input
|
|
174
210
|
}], entityName: [{
|
|
@@ -189,9 +225,13 @@ export class SingleRecordComponent extends BaseAngularComponent {
|
|
|
189
225
|
type: Output
|
|
190
226
|
}], recordDismissed: [{
|
|
191
227
|
type: Output
|
|
228
|
+
}], EditModeChanged: [{
|
|
229
|
+
type: Output
|
|
230
|
+
}], CompositionChanged: [{
|
|
231
|
+
type: Output
|
|
192
232
|
}], formHost: [{
|
|
193
233
|
type: ViewChild,
|
|
194
234
|
args: [MjEntityFormHostComponent]
|
|
195
235
|
}] }); })();
|
|
196
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRecordComponent, { className: "SingleRecordComponent", filePath: "src/lib/single-record/single-record.component.ts", lineNumber:
|
|
236
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRecordComponent, { className: "SingleRecordComponent", filePath: "src/lib/single-record/single-record.component.ts", lineNumber: 29 }); })();
|
|
197
237
|
//# sourceMappingURL=single-record.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-record.component.js","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts","../../../src/lib/single-record/single-record.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAA8C,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC9I,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAErE;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IAC7C,UAAU,GAAiB,IAAI,YAAY,EAAE,CAAC;IAC9C,UAAU,GAAkB,EAAE,CAAC;IAC/B,eAAe,GAA4C,EAAE,CAAC;IAE9E,+CAA+C;IAC/C,IAAoB,eAAe,CAAC,KAA8C;QAChF,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC/B,CAAC;IACD,+CAA+C;IAC/C,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEgB,YAAY,GAAuB,IAAI,YAAY,EAAQ,CAA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,qBAAqB","sourcesContent":["import { Component, EventEmitter, inject, Input, Output, ViewChild } from '@angular/core';\nimport { CompositeKey, BaseEntity } from '@memberjunction/core';\nimport { FormNavigationEvent, FormNotificationEvent, MJFormPresenterService, MjEntityFormHostComponent } from '@memberjunction/ng-base-forms';\nimport { NavigationService, RecentAccessService, SharedService } from '@memberjunction/ng-shared';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\n/**\n * Explorer-side host for a single entity record in the main tab area.\n *\n * This is now a **thin wrapper** around the Generic `<mj-entity-form-host>`\n * (in `@memberjunction/ng-base-forms`), which owns all the mechanics: resolving\n * the form (class / custom / interactive override + variants), loading the\n * record, dynamically creating the form, binding it, and tearing it down.\n *\n * SingleRecordComponent's only remaining job is the **Explorer mapping**:\n * translating the host's framework-agnostic events into Explorer services —\n * `Navigate` → {@link NavigationService}, `Notification` → {@link SharedService},\n * record loads → {@link RecentAccessService} — none of which belong in a Generic\n * component.\n */\n@Component({\n standalone: false,\n selector: 'mj-single-record',\n templateUrl: './single-record.component.html',\n styleUrls: ['./single-record.component.css']\n})\nexport class SingleRecordComponent extends BaseAngularComponent {\n @Input() public PrimaryKey: CompositeKey = new CompositeKey();\n @Input() public entityName: string | null = '';\n @Input() public NewRecordValues: string | Record<string, unknown> | null = '';\n\n /** @deprecated Use {@link NewRecordValues}. */\n @Input() public set newRecordValues(value: string | Record<string, unknown> | null) {\n this.NewRecordValues = value;\n }\n /** @deprecated Use {@link NewRecordValues}. */\n public get newRecordValues(): string | Record<string, unknown> | null {\n return this.NewRecordValues;\n }\n\n @Output() public LoadComplete: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link LoadComplete}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (loadComplete) keeps working. Must stay AFTER LoadComplete: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public loadComplete = this.LoadComplete;\n @Output() public RecordSaved: EventEmitter<BaseEntity> = new EventEmitter<BaseEntity>();\n\n /**\n * @deprecated Use {@link RecordSaved}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (recordSaved) keeps working. Must stay AFTER RecordSaved: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public recordSaved = this.RecordSaved;\n /** Emitted when the hosted form asks to be dismissed (e.g. Discard on a new record). */\n @Output() public RecordDismissed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link RecordDismissed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (recordDismissed) keeps working. Must stay AFTER RecordDismissed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public recordDismissed = this.RecordDismissed;\n\n @ViewChild(MjEntityFormHostComponent) private formHost?: MjEntityFormHostComponent;\n\n /**\n * True while the hosted form is in edit mode. The host already exposes the\n * live form instance, so this is a read, not a new event pipeline.\n *\n * MJ forms are read-only until the user explicitly clicks Edit, so edit mode\n * is a deliberate gesture and a sound proxy for \"there is work in here worth\n * protecting\" — which is all the preview-tab replacement guard needs.\n */\n public IsEditing(): boolean {\n return this.formHost?.Form?.EditMode === true;\n }\n\n private navigationService = inject(NavigationService);\n private sharedService = inject(SharedService);\n private formPresenter = inject(MJFormPresenterService);\n private recentAccessService = new RecentAccessService();\n\n /** Unblock the shell's first-resource-load gate (success or error). */\n OnLoadComplete(): void {\n this.LoadComplete.emit();\n }\n\n /** @deprecated Use {@link OnLoadComplete}. */\n onLoadComplete(): void {\n return this.OnLoadComplete();\n }\n\n /** Log access for existing records once the form's record is ready. */\n OnRecordReady(record: BaseEntity): void {\n if (record?.IsSaved) {\n this.recentAccessService.logAccess(record.EntityInfo.Name, record.PrimaryKey, 'record');\n }\n }\n\n /** @deprecated Use {@link OnRecordReady}. */\n onRecordReady(record: BaseEntity): void {\n return this.OnRecordReady(record);\n }\n\n OnSaved(record: BaseEntity): void {\n this.RecordSaved.emit(record);\n }\n\n /** @deprecated Use {@link OnSaved}. */\n onSaved(record: BaseEntity): void {\n return this.OnSaved(record);\n }\n\n OnNotification(event: FormNotificationEvent): void {\n this.sharedService.CreateSimpleNotification(event.Message, event.Type, event.Duration);\n }\n\n /** @deprecated Use {@link OnNotification}. */\n onNotification(event: FormNotificationEvent): void {\n return this.OnNotification(event);\n }\n\n /** Map the form's navigation requests onto Explorer's NavigationService. */\n HandleNavigation(event: FormNavigationEvent): void {\n switch (event.Kind) {\n case 'record':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey, { forceNewTab: event.OpenInNewTab });\n break;\n case 'new-record':\n // Creating a related record from inside an open form: force a new tab so the\n // parent record stays intact in single-resource mode.\n this.navigationService.OpenNewEntityRecord(event.EntityName, {\n newRecordValues: event.DefaultValues,\n forceNewTab: true,\n });\n break;\n case 'entity-hierarchy':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey);\n break;\n case 'external-link':\n window.open(event.Url, '_blank');\n break;\n case 'email':\n window.open(`mailto:${event.EmailAddress}`, '_self');\n break;\n case 'dismiss':\n this.RecordDismissed.emit();\n break;\n case 'create-related': {\n // A FK field wants a new related record created. Open the related entity's form\n // as a dialog/slide-in (prefilled), then hand the saved record back so the field\n // can select it.\n const ref = this.formPresenter.Open({\n EntityName: event.EntityName,\n Presentation: event.Presentation ?? 'dialog',\n NewRecordValues: event.NewRecordValues,\n Provider: event.Provider,\n });\n ref.AfterSaved().then(created => event.Complete(created));\n break;\n }\n }\n }\n\n /** @deprecated Use {@link HandleNavigation}. */\n handleNavigation(event: FormNavigationEvent): void {\n return this.HandleNavigation(event);\n }\n}\n","<mj-entity-form-host\n [EntityName]=\"entityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [NewRecordValues]=\"newRecordValues\"\n [Provider]=\"Provider\"\n (LoadComplete)=\"onLoadComplete()\"\n (LoadError)=\"onLoadComplete()\"\n (RecordReady)=\"onRecordReady($event)\"\n (Saved)=\"onSaved($event)\"\n (Navigate)=\"handleNavigation($event)\"\n (Notification)=\"onNotification($event)\"\n (Dismissed)=\"recordDismissed.emit()\">\n</mj-entity-form-host>\n"]}
|
|
1
|
+
{"version":3,"file":"single-record.component.js","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts","../../../src/lib/single-record/single-record.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAa,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAA8C,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG9I,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAErE;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IAC7C,UAAU,GAAiB,IAAI,YAAY,EAAE,CAAC;IAC9C,UAAU,GAAkB,EAAE,CAAC;IAC/B,eAAe,GAA4C,EAAE,CAAC;IAE9E,+CAA+C;IAC/C,IAAoB,eAAe,CAAC,KAA8C;QAChF,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC/B,CAAC;IACD,+CAA+C;IAC/C,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEgB,YAAY,GAAuB,IAAI,YAAY,EAAQ,CAAC;IAE7E;;;;;;OAMG;IACc,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACjC,WAAW,GAA6B,IAAI,YAAY,EAAc,CAAC;IAExF;;;;;;OAMG;IACc,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAChD,wFAAwF;IACvE,eAAe,GAAuB,IAAI,YAAY,EAAQ,CAAC;IAEhF;;;;;;OAMG;IACc,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IAExD;;;;OAIG;IACc,eAAe,GAA0B,IAAI,YAAY,EAAW,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,oBAAgB,IAAC,0GACpB,oBAAgB,IAAC,oHACf,yBAAqB,IAAC,wGAC5B,mBAAe,IAAC,8GACb,4BAAwB,IAAC,sHACrB,0BAAsB,IAAC,4HACpB,6BAAyB,IAAC,0GAChC,0BAAsB,IAAC,oHACrB,yBAAqB,IAAC;YACvC,iBAAsB;;YAVpB,AADA,AADA,AADA,2CAAyB,8BACA,wCACU,0BACd;;;iFDwBV,qBAAqB;cANjC,SAAS;6BACI,KAAK,YACP,kBAAkB;;kBAK3B,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAON,MAAM;;kBASN,MAAM;;kBAEN,SAAS;mBAAC,yBAAyB;;kFA9DzB,qBAAqB","sourcesContent":["import { Component, EventEmitter, inject, Input, OnDestroy, Output, ViewChild } from '@angular/core';\nimport { CompositeKey, BaseEntity } from '@memberjunction/core';\nimport { FormNavigationEvent, FormNotificationEvent, MJFormPresenterService, MjEntityFormHostComponent } from '@memberjunction/ng-base-forms';\nimport type { BaseFormComponent, FormCompositionSnapshot } from '@memberjunction/ng-base-forms';\nimport { Subscription } from 'rxjs';\nimport { NavigationService, RecentAccessService, SharedService } from '@memberjunction/ng-shared';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\n/**\n * Explorer-side host for a single entity record in the main tab area.\n *\n * This is now a **thin wrapper** around the Generic `<mj-entity-form-host>`\n * (in `@memberjunction/ng-base-forms`), which owns all the mechanics: resolving\n * the form (class / custom / interactive override + variants), loading the\n * record, dynamically creating the form, binding it, and tearing it down.\n *\n * SingleRecordComponent's only remaining job is the **Explorer mapping**:\n * translating the host's framework-agnostic events into Explorer services —\n * `Navigate` → {@link NavigationService}, `Notification` → {@link SharedService},\n * record loads → {@link RecentAccessService} — none of which belong in a Generic\n * component.\n */\n@Component({\n standalone: false,\n selector: 'mj-single-record',\n templateUrl: './single-record.component.html',\n styleUrls: ['./single-record.component.css']\n})\nexport class SingleRecordComponent extends BaseAngularComponent implements OnDestroy {\n @Input() public PrimaryKey: CompositeKey = new CompositeKey();\n @Input() public entityName: string | null = '';\n @Input() public NewRecordValues: string | Record<string, unknown> | null = '';\n\n /** @deprecated Use {@link NewRecordValues}. */\n @Input() public set newRecordValues(value: string | Record<string, unknown> | null) {\n this.NewRecordValues = value;\n }\n /** @deprecated Use {@link NewRecordValues}. */\n public get newRecordValues(): string | Record<string, unknown> | null {\n return this.NewRecordValues;\n }\n\n @Output() public LoadComplete: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link LoadComplete}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (loadComplete) keeps working. Must stay AFTER LoadComplete: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public loadComplete = this.LoadComplete;\n @Output() public RecordSaved: EventEmitter<BaseEntity> = new EventEmitter<BaseEntity>();\n\n /**\n * @deprecated Use {@link RecordSaved}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (recordSaved) keeps working. Must stay AFTER RecordSaved: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public recordSaved = this.RecordSaved;\n /** Emitted when the hosted form asks to be dismissed (e.g. Discard on a new record). */\n @Output() public RecordDismissed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link RecordDismissed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (recordDismissed) keeps working. Must stay AFTER RecordDismissed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() public recordDismissed = this.RecordDismissed;\n\n /**\n * Edit mode of the hosted form started (true) or ended (false). Relayed from\n * `<mj-entity-form-host>` so the resource wrapper can tell the shell to\n * promote this tab. {@link IsEditing} remains as the synchronous fallback.\n */\n @Output() public EditModeChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * The live form's composition — sections, related grids, contributions, and the slots\n * the form actually emits. Re-emitted on every chrome resolve.\n *\n * The form is created dynamically inside `<mj-entity-form-host>`, so this relay is the\n * only route the snapshot has out to Explorer.\n */\n @Output() public CompositionChanged: EventEmitter<FormCompositionSnapshot> = new EventEmitter<FormCompositionSnapshot>();\n\n @ViewChild(MjEntityFormHostComponent) private formHost?: MjEntityFormHostComponent;\n\n /**\n * True while the hosted form is in edit mode. The host already exposes the\n * live form instance, so this is a read, not a new event pipeline.\n *\n * MJ forms are read-only until the user explicitly clicks Edit, so edit mode\n * is a deliberate gesture and a sound proxy for \"there is work in here worth\n * protecting\" — which is all the preview-tab replacement guard needs.\n */\n public IsEditing(): boolean {\n return this.formHost?.Form?.EditMode === true;\n }\n\n private navigationService = inject(NavigationService);\n private sharedService = inject(SharedService);\n private formPresenter = inject(MJFormPresenterService);\n private recentAccessService = new RecentAccessService();\n\n /** Unblock the shell's first-resource-load gate (success or error). */\n OnLoadComplete(): void {\n this.LoadComplete.emit();\n }\n\n /** @deprecated Use {@link OnLoadComplete}. */\n onLoadComplete(): void {\n return this.OnLoadComplete();\n }\n\n private compositionSub: Subscription | null = null;\n\n /**\n * Bind to the newly created form's composition stream.\n *\n * The previous subscription is dropped first: the host re-creates the form when the\n * user switches variants, and a retained subscription would let the replaced form\n * keep publishing over the live one.\n */\n onFormCreated(form: BaseFormComponent): void {\n this.compositionSub?.unsubscribe();\n this.compositionSub = form.CompositionChanged.subscribe((snapshot: FormCompositionSnapshot) =>\n this.CompositionChanged.emit(snapshot),\n );\n if (form.CompositionSnapshot) {\n this.CompositionChanged.emit(form.CompositionSnapshot);\n }\n }\n\n ngOnDestroy(): void {\n this.compositionSub?.unsubscribe();\n this.compositionSub = null;\n }\n\n /** Log access for existing records once the form's record is ready. */\n OnRecordReady(record: BaseEntity): void {\n if (record?.IsSaved) {\n this.recentAccessService.logAccess(record.EntityInfo.Name, record.PrimaryKey, 'record');\n }\n }\n\n /** @deprecated Use {@link OnRecordReady}. */\n onRecordReady(record: BaseEntity): void {\n return this.OnRecordReady(record);\n }\n\n OnSaved(record: BaseEntity): void {\n this.RecordSaved.emit(record);\n }\n\n /** @deprecated Use {@link OnSaved}. */\n onSaved(record: BaseEntity): void {\n return this.OnSaved(record);\n }\n\n OnEditModeChanged(editing: boolean): void {\n this.EditModeChanged.emit(editing);\n }\n\n OnNotification(event: FormNotificationEvent): void {\n this.sharedService.CreateSimpleNotification(event.Message, event.Type, event.Duration);\n }\n\n /** @deprecated Use {@link OnNotification}. */\n onNotification(event: FormNotificationEvent): void {\n return this.OnNotification(event);\n }\n\n /** Map the form's navigation requests onto Explorer's NavigationService. */\n HandleNavigation(event: FormNavigationEvent): void {\n switch (event.Kind) {\n case 'record':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey, { forceNewTab: event.OpenInNewTab });\n break;\n case 'new-record':\n // Creating a related record from inside an open form: force a new tab so the\n // parent record stays intact in single-resource mode.\n this.navigationService.OpenNewEntityRecord(event.EntityName, {\n newRecordValues: event.DefaultValues,\n forceNewTab: true,\n });\n break;\n case 'entity-hierarchy':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey);\n break;\n case 'external-link':\n window.open(event.Url, '_blank');\n break;\n case 'email':\n window.open(`mailto:${event.EmailAddress}`, '_self');\n break;\n case 'dismiss':\n this.RecordDismissed.emit();\n break;\n case 'create-related': {\n // A FK field wants a new related record created. Open the related entity's form\n // as a dialog/slide-in (prefilled), then hand the saved record back so the field\n // can select it.\n const ref = this.formPresenter.Open({\n EntityName: event.EntityName,\n Presentation: event.Presentation ?? 'dialog',\n NewRecordValues: event.NewRecordValues,\n Provider: event.Provider,\n });\n ref.AfterSaved().then(created => event.Complete(created));\n break;\n }\n }\n }\n\n /** @deprecated Use {@link HandleNavigation}. */\n handleNavigation(event: FormNavigationEvent): void {\n return this.HandleNavigation(event);\n }\n}\n","<mj-entity-form-host\n [EntityName]=\"entityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [NewRecordValues]=\"newRecordValues\"\n [Provider]=\"Provider\"\n (LoadComplete)=\"onLoadComplete()\"\n (LoadError)=\"onLoadComplete()\"\n (RecordReady)=\"onRecordReady($event)\"\n (Saved)=\"onSaved($event)\"\n (Navigate)=\"handleNavigation($event)\"\n (Notification)=\"onNotification($event)\"\n (EditModeChanged)=\"OnEditModeChanged($event)\"\n (Dismissed)=\"recordDismissed.emit()\"\n (FormCreated)=\"onFormCreated($event)\">\n</mj-entity-form-host>\n"]}
|
|
@@ -153,6 +153,19 @@ export declare class UserNotificationsComponent extends BaseAngularComponent imp
|
|
|
153
153
|
* Returns `false` (not handled) when the config isn't a meet-room invite or the Meet app is absent.
|
|
154
154
|
*/
|
|
155
155
|
private navigateToMeetRoom;
|
|
156
|
+
/**
|
|
157
|
+
* Opens the Conversation Console for a `handoff-offer` notification (the `{ type:'handoff-offer', offerId, room }`
|
|
158
|
+
* ResourceConfiguration the server sends when an AI agent offers a conversation to this person). The nav item is built here
|
|
159
|
+
* rather than looked up, so it works without an application metadata row; it lands in the Meet app when present, otherwise
|
|
160
|
+
* in whichever app the person is in. Returns `false` (not handled) for any other notification or when there is no app to host it.
|
|
161
|
+
*/
|
|
162
|
+
private navigateToHandoffConsole;
|
|
163
|
+
/**
|
|
164
|
+
* Opens the Meet app's Meetings resource for a `meeting` or `meeting-invitation` notification (the
|
|
165
|
+
* `{ type:'meeting', meetingId }` ResourceConfiguration), or when NotificationType is 'Meeting Invitation'.
|
|
166
|
+
* Returns `false` (not handled) when the config isn't a meeting invite or the Meet app is absent.
|
|
167
|
+
*/
|
|
168
|
+
private navigateToMeeting;
|
|
156
169
|
/**
|
|
157
170
|
* Navigate to a resource-based notification using NavigationService methods.
|
|
158
171
|
* Routes to the correct resource based on the notification's ResourceType.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAkB,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAgB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAkB,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAgB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAW,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AAErE;;GAEG;AACH,KAAK,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAElD,uDAAuD;AACvD,KAAK,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhD;;;;;;GAMG;AACH,UAAU,cAAc;IACtB,CAAC,EAAE,wBAAwB,CAAC;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,8GAA8G;IAC9G,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,mEAAmE;AACnE,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK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AI,GAAG,4BAA4B,GAAG,IAAI;IAI/E,WAAW,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAKlE,2CAA2C;IACpC,WAAW,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAI3D,YAAY,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAKnE,4CAA4C;IACrC,YAAY,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAI5D,WAAW,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAKlE,2CAA2C;IACpC,WAAW,CAAC,YAAY,EAAE,wBAAwB,GAAG,MAAM;IAI3D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAItD,kDAAkD;IAC3C,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;yCAhwB3C,0BAA0B;2CAA1B,0BAA0B;CAmwBtC"}
|
|
@@ -824,6 +824,12 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
824
824
|
if (this.navigateToMeetRoom(notification)) {
|
|
825
825
|
return;
|
|
826
826
|
}
|
|
827
|
+
if (this.navigateToHandoffConsole(notification)) {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
if (this.navigateToMeeting(notification)) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
827
833
|
this.navigateToResource(notification);
|
|
828
834
|
}
|
|
829
835
|
}
|
|
@@ -855,6 +861,67 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
855
861
|
this.navigationService.OpenNavItemByName('Live Room', navConfig, meetApp.ID);
|
|
856
862
|
return true;
|
|
857
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Opens the Conversation Console for a `handoff-offer` notification (the `{ type:'handoff-offer', offerId, room }`
|
|
866
|
+
* ResourceConfiguration the server sends when an AI agent offers a conversation to this person). The nav item is built here
|
|
867
|
+
* rather than looked up, so it works without an application metadata row; it lands in the Meet app when present, otherwise
|
|
868
|
+
* in whichever app the person is in. Returns `false` (not handled) for any other notification or when there is no app to host it.
|
|
869
|
+
*/
|
|
870
|
+
navigateToHandoffConsole(notification) {
|
|
871
|
+
if (!notification.ResourceConfiguration || notification.ResourceConfiguration.trim().length === 0) {
|
|
872
|
+
return false;
|
|
873
|
+
}
|
|
874
|
+
const config = SafeJSONParse(notification.ResourceConfiguration);
|
|
875
|
+
if (!config || config.type?.trim().toLowerCase() !== 'handoff-offer') {
|
|
876
|
+
return false;
|
|
877
|
+
}
|
|
878
|
+
const app = this.appManager.GetAppByName('Meet') ?? this.appManager.GetActiveApp();
|
|
879
|
+
if (!app) {
|
|
880
|
+
return false;
|
|
881
|
+
}
|
|
882
|
+
const consoleItem = {
|
|
883
|
+
Label: 'Conversation Console',
|
|
884
|
+
Icon: 'fa-solid fa-headset',
|
|
885
|
+
ResourceType: 'Custom',
|
|
886
|
+
DriverClass: 'HumanHandoffConsoleResource',
|
|
887
|
+
Configuration: config.offerId ? { offer: config.offerId } : {},
|
|
888
|
+
};
|
|
889
|
+
this.navigationService.OpenNavItem(app.ID, consoleItem, app.GetColor());
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Opens the Meet app's Meetings resource for a `meeting` or `meeting-invitation` notification (the
|
|
894
|
+
* `{ type:'meeting', meetingId }` ResourceConfiguration), or when NotificationType is 'Meeting Invitation'.
|
|
895
|
+
* Returns `false` (not handled) when the config isn't a meeting invite or the Meet app is absent.
|
|
896
|
+
*/
|
|
897
|
+
navigateToMeeting(notification) {
|
|
898
|
+
let meetingId;
|
|
899
|
+
if (notification.ResourceConfiguration && notification.ResourceConfiguration.trim().length > 0) {
|
|
900
|
+
const config = SafeJSONParse(notification.ResourceConfiguration);
|
|
901
|
+
if (config &&
|
|
902
|
+
(config.type?.trim().toLowerCase() === 'meeting' ||
|
|
903
|
+
config.type?.trim().toLowerCase() === 'meeting-invitation')) {
|
|
904
|
+
meetingId = config.meetingId;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
const typeName = notification.NotificationType?.trim();
|
|
908
|
+
if (!meetingId && typeName !== 'Meeting Invitation') {
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
const app = this.appManager.GetAppByName('Meet') ?? this.appManager.GetActiveApp();
|
|
912
|
+
if (!app) {
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
const meetingItem = {
|
|
916
|
+
Label: 'Meetings',
|
|
917
|
+
Icon: 'fa-solid fa-users',
|
|
918
|
+
ResourceType: 'Custom',
|
|
919
|
+
DriverClass: 'MeetingsResource',
|
|
920
|
+
Configuration: meetingId ? { meeting: meetingId } : {},
|
|
921
|
+
};
|
|
922
|
+
this.navigationService.OpenNavItem(app.ID, meetingItem, app.GetColor());
|
|
923
|
+
return true;
|
|
924
|
+
}
|
|
858
925
|
/**
|
|
859
926
|
* Navigate to a resource-based notification using NavigationService methods.
|
|
860
927
|
* Routes to the correct resource based on the notification's ResourceType.
|