@memberjunction/ng-base-forms 6.1.0-edge.2 → 6.1.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/LICENSE +180 -4
- package/README.md +4 -1
- package/dist/lib/base-form-component.d.ts +93 -3
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +240 -9
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/base-form-policy.d.ts +26 -0
- package/dist/lib/chrome/base-form-policy.d.ts.map +1 -0
- package/dist/lib/chrome/base-form-policy.js +9 -0
- package/dist/lib/chrome/base-form-policy.js.map +1 -0
- package/dist/lib/chrome/clipped-title.d.ts +8 -0
- package/dist/lib/chrome/clipped-title.d.ts.map +1 -0
- package/dist/lib/chrome/clipped-title.js +18 -0
- package/dist/lib/chrome/clipped-title.js.map +1 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.d.ts +35 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.d.ts.map +1 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.js +96 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.js.map +1 -0
- package/dist/lib/chrome/form-chrome-rail-pref.d.ts +24 -0
- package/dist/lib/chrome/form-chrome-rail-pref.d.ts.map +1 -0
- package/dist/lib/chrome/form-chrome-rail-pref.js +52 -0
- package/dist/lib/chrome/form-chrome-rail-pref.js.map +1 -0
- package/dist/lib/chrome/form-chrome.d.ts +59 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -0
- package/dist/lib/chrome/form-chrome.js +37 -0
- package/dist/lib/chrome/form-chrome.js.map +1 -0
- package/dist/lib/chrome/load-form-chrome-rules.d.ts +8 -0
- package/dist/lib/chrome/load-form-chrome-rules.d.ts.map +1 -0
- package/dist/lib/chrome/load-form-chrome-rules.js +70 -0
- package/dist/lib/chrome/load-form-chrome-rules.js.map +1 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts +114 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -0
- package/dist/lib/chrome/resolve-form-chrome.js +713 -0
- package/dist/lib/chrome/resolve-form-chrome.js.map +1 -0
- package/dist/lib/container/record-form-container.component.d.ts +170 -6
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +1194 -62
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.d.ts +54 -1
- package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.js +143 -7
- package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
- package/dist/lib/form-record-refresh.coordinator.d.ts +27 -0
- package/dist/lib/form-record-refresh.coordinator.d.ts.map +1 -0
- package/dist/lib/form-record-refresh.coordinator.js +33 -0
- package/dist/lib/form-record-refresh.coordinator.js.map +1 -0
- package/dist/lib/form-state.interface.d.ts +4 -0
- package/dist/lib/form-state.interface.d.ts.map +1 -1
- package/dist/lib/form-state.interface.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +5 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +23 -2
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +5 -1
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +16 -2
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts +6 -2
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.js +15 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +24 -2
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +104 -10
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.d.ts +85 -1
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js +72 -3
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts +8 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts.map +1 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.js +19 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.js.map +1 -0
- package/dist/lib/panel-slot/form-contribution.d.ts +79 -0
- package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-contribution.js +253 -0
- package/dist/lib/panel-slot/form-contribution.js.map +1 -0
- package/dist/lib/panel-slot/form-contributions.component.d.ts +27 -0
- package/dist/lib/panel-slot/form-contributions.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-contributions.component.js +83 -0
- package/dist/lib/panel-slot/form-contributions.component.js.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts +2 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.js +35 -4
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts +22 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js +78 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -0
- package/dist/lib/related-grid-height.d.ts +20 -0
- package/dist/lib/related-grid-height.d.ts.map +1 -0
- package/dist/lib/related-grid-height.js +30 -0
- package/dist/lib/related-grid-height.js.map +1 -0
- package/dist/lib/section-manager/section-manager.component.d.ts +20 -1
- package/dist/lib/section-manager/section-manager.component.d.ts.map +1 -1
- package/dist/lib/section-manager/section-manager.component.js +204 -25
- package/dist/lib/section-manager/section-manager.component.js.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts +55 -4
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +734 -306
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-events.d.ts +35 -0
- package/dist/lib/types/form-events.d.ts.map +1 -1
- package/dist/lib/types/form-events.js +45 -0
- package/dist/lib/types/form-events.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +145 -0
- package/dist/lib/types/form-toolbar-item.d.ts.map +1 -0
- package/dist/lib/types/form-toolbar-item.js +2 -0
- package/dist/lib/types/form-toolbar-item.js.map +1 -0
- package/dist/lib/types/form-types.d.ts +8 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +7 -2
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +6 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +17 -14
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +14 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +13 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +14 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +19 -18
|
@@ -80,6 +80,8 @@ export declare class MjEntityFormHostComponent extends BaseAngularComponent impl
|
|
|
80
80
|
Saved: EventEmitter<BaseEntity<unknown>>;
|
|
81
81
|
/** Re-emitted form `RecordSaved` (richer payload). */
|
|
82
82
|
RecordSaved: EventEmitter<RecordSavedEvent>;
|
|
83
|
+
/** Re-emitted form `RecordRefreshed`. */
|
|
84
|
+
RecordRefreshed: EventEmitter<BaseEntity<unknown>>;
|
|
83
85
|
/** Re-emitted form `RecordDeleted`. */
|
|
84
86
|
RecordDeleted: EventEmitter<RecordDeletedEvent>;
|
|
85
87
|
/** Re-emitted form `RecordSaveFailed`. */
|
|
@@ -124,6 +126,8 @@ export declare class MjEntityFormHostComponent extends BaseAngularComponent impl
|
|
|
124
126
|
Save(): Promise<boolean>;
|
|
125
127
|
/** Cancel edits (revert). Full-form mode uses the form's cancel pipeline. */
|
|
126
128
|
Cancel(): void;
|
|
129
|
+
/** Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline. */
|
|
130
|
+
Refresh(): Promise<boolean>;
|
|
127
131
|
private reload;
|
|
128
132
|
private loadAndMount;
|
|
129
133
|
/**
|
|
@@ -154,6 +158,6 @@ export declare class MjEntityFormHostComponent extends BaseAngularComponent impl
|
|
|
154
158
|
private cleanupFormSubs;
|
|
155
159
|
private teardown;
|
|
156
160
|
static ɵfac: i0.ɵɵFactoryDeclaration<MjEntityFormHostComponent, never>;
|
|
157
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MjEntityFormHostComponent, "mj-entity-form-host", never, { "EntityName": { "alias": "EntityName"; "required": false; }; "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "Record": { "alias": "Record"; "required": false; }; "NewRecordValues": { "alias": "NewRecordValues"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "Config": { "alias": "Config"; "required": false; }; }, { "Navigate": "Navigate"; "Notification": "Notification"; "Saved": "Saved"; "RecordSaved": "RecordSaved"; "RecordDeleted": "RecordDeleted"; "RecordSaveFailed": "RecordSaveFailed"; "ValidationFailed": "ValidationFailed"; "RecordReady": "RecordReady"; "Dismissed": "Dismissed"; "LoadComplete": "LoadComplete"; "LoadError": "LoadError"; "FormCreated": "FormCreated"; }, never, never, false, never>;
|
|
161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjEntityFormHostComponent, "mj-entity-form-host", never, { "EntityName": { "alias": "EntityName"; "required": false; }; "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "Record": { "alias": "Record"; "required": false; }; "NewRecordValues": { "alias": "NewRecordValues"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "Config": { "alias": "Config"; "required": false; }; }, { "Navigate": "Navigate"; "Notification": "Notification"; "Saved": "Saved"; "RecordSaved": "RecordSaved"; "RecordRefreshed": "RecordRefreshed"; "RecordDeleted": "RecordDeleted"; "RecordSaveFailed": "RecordSaveFailed"; "ValidationFailed": "ValidationFailed"; "RecordReady": "RecordReady"; "Dismissed": "Dismissed"; "LoadComplete": "LoadComplete"; "LoadError": "LoadError"; "FormCreated": "FormCreated"; }, never, never, false, never>;
|
|
158
162
|
}
|
|
159
163
|
//# sourceMappingURL=entity-form-host.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-form-host.component.d.ts","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EACG,aAAa,EAAE,SAAS,EAClE,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAAE,UAAU,EACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,qBAAqB,EAAE,gBAAgB,EAAE,kBAAkB,EAC3D,qBAAqB,EAAE,qBAAqB,EAC7C,MAAM,qBAAqB,CAAC;;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAMa,yBAA0B,SAAQ,oBAAqB,YAAW,aAAa,EAAE,SAAS;IACrG,OAAO,CAAC,GAAG,CAA6B;IACxC,OAAO,CAAC,YAAY,CAA+B;IAEnD,oFAAoF;IACrB,OAAO,CAAC,MAAM,CAAoB;IAIjG,OAA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MAAM;OAAM;IAC5E,wFAAwF;IAC9E,WAAW,kCAAyC;IAIvD,OAAO,UAAQ;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzC,OAAO,CAAC,iBAAiB,CAAgD;IACzE,OAAO,CAAC,WAAW,CAAuD;IAC1E,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,gBAAgB,CAAS;IAEjC,+EAA+E;IAC/E,IAAI,IAAI,IAAI,iBAAiB,GAAG,IAAI,CAEnC;IAED,oDAAoD;IACpD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAID,eAAe,IAAI,IAAI;IAKvB,WAAW,IAAI,IAAI;IAMnB;;;;;OAKG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAS9B,6EAA6E;IAC7E,MAAM,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"entity-form-host.component.d.ts","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EACG,aAAa,EAAE,SAAS,EAClE,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAAE,UAAU,EACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,qBAAqB,EAAE,gBAAgB,EAAE,kBAAkB,EAC3D,qBAAqB,EAAE,qBAAqB,EAC7C,MAAM,qBAAqB,CAAC;;AAE7B;;;;;;;;;;;;;;;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C,aAAa;IA0BrB,OAAO,CAAC,IAAI;IAaZ,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,QAAQ;yCAjcL,yBAAyB;2CAAzB,yBAAyB;CAmdrC"}
|
|
@@ -126,6 +126,8 @@ export class MjEntityFormHostComponent extends BaseAngularComponent {
|
|
|
126
126
|
Saved = new EventEmitter();
|
|
127
127
|
/** Re-emitted form `RecordSaved` (richer payload). */
|
|
128
128
|
RecordSaved = new EventEmitter();
|
|
129
|
+
/** Re-emitted form `RecordRefreshed`. */
|
|
130
|
+
RecordRefreshed = new EventEmitter();
|
|
129
131
|
/** Re-emitted form `RecordDeleted`. */
|
|
130
132
|
RecordDeleted = new EventEmitter();
|
|
131
133
|
/** Re-emitted form `RecordSaveFailed`. */
|
|
@@ -194,6 +196,16 @@ export class MjEntityFormHostComponent extends BaseAngularComponent {
|
|
|
194
196
|
}
|
|
195
197
|
this.Form?.CancelEdit();
|
|
196
198
|
}
|
|
199
|
+
/** Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline. */
|
|
200
|
+
async Refresh() {
|
|
201
|
+
if (this._isSection) {
|
|
202
|
+
return this._currentRecord?.IsSaved ? this._currentRecord.Refresh() : false;
|
|
203
|
+
}
|
|
204
|
+
const f = this.Form;
|
|
205
|
+
if (!f)
|
|
206
|
+
return false;
|
|
207
|
+
return f.RefreshRecord();
|
|
208
|
+
}
|
|
197
209
|
// ── Core: resolve → load → create → bind → wire ──────────────────────────
|
|
198
210
|
reload() {
|
|
199
211
|
this.teardown();
|
|
@@ -359,7 +371,7 @@ export class MjEntityFormHostComponent extends BaseAngularComponent {
|
|
|
359
371
|
/** Subscribe to the form's outputs and re-emit them through the host. */
|
|
360
372
|
subscribeToFormEvents(form) {
|
|
361
373
|
this.cleanupFormSubs();
|
|
362
|
-
this._formEventSubs.push(form.Navigate.subscribe(e => this.Navigate.emit(e)), form.Notification.subscribe(e => this.Notification.emit(e)), form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)), form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)), form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)), form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)), form.RecordReady.subscribe(e => this.RecordReady.emit(e)));
|
|
374
|
+
this._formEventSubs.push(form.Navigate.subscribe(e => this.Navigate.emit(e)), form.Notification.subscribe(e => this.Notification.emit(e)), form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)), form.RecordRefreshed.subscribe(e => this.RecordRefreshed.emit(e.Record)), form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)), form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)), form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)), form.RecordReady.subscribe(e => this.RecordReady.emit(e)));
|
|
363
375
|
// Surface 'dismiss' navigation as a first-class Dismissed event too.
|
|
364
376
|
this._formEventSubs.push(form.Navigate.subscribe(e => { if (e.Kind === 'dismiss')
|
|
365
377
|
this.Dismissed.emit(); }));
|
|
@@ -480,7 +492,7 @@ export class MjEntityFormHostComponent extends BaseAngularComponent {
|
|
|
480
492
|
} if (rf & 2) {
|
|
481
493
|
let _t;
|
|
482
494
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.anchor = _t.first);
|
|
483
|
-
} }, inputs: { EntityName: "EntityName", PrimaryKey: "PrimaryKey", Record: "Record", NewRecordValues: "NewRecordValues", SectionName: "SectionName", EditMode: "EditMode", Config: "Config" }, outputs: { Navigate: "Navigate", Notification: "Notification", Saved: "Saved", RecordSaved: "RecordSaved", RecordDeleted: "RecordDeleted", RecordSaveFailed: "RecordSaveFailed", ValidationFailed: "ValidationFailed", RecordReady: "RecordReady", Dismissed: "Dismissed", LoadComplete: "LoadComplete", LoadError: "LoadError", FormCreated: "FormCreated" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 2, consts: [["anchor", ""], [1, "mj-form-host-loading"], ["role", "alert", 1, "mj-form-host-error"], ["text", "Loading record..."], [1, "fa-solid", "fa-triangle-exclamation", "mj-form-host-error-icon"], [1, "mj-form-host-error-title"], [1, "mj-form-host-error-detail"]], template: function MjEntityFormHostComponent_Template(rf, ctx) { if (rf & 1) {
|
|
495
|
+
} }, inputs: { EntityName: "EntityName", PrimaryKey: "PrimaryKey", Record: "Record", NewRecordValues: "NewRecordValues", SectionName: "SectionName", EditMode: "EditMode", Config: "Config" }, outputs: { Navigate: "Navigate", Notification: "Notification", Saved: "Saved", RecordSaved: "RecordSaved", RecordRefreshed: "RecordRefreshed", RecordDeleted: "RecordDeleted", RecordSaveFailed: "RecordSaveFailed", ValidationFailed: "ValidationFailed", RecordReady: "RecordReady", Dismissed: "Dismissed", LoadComplete: "LoadComplete", LoadError: "LoadError", FormCreated: "FormCreated" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 2, consts: [["anchor", ""], [1, "mj-form-host-loading"], ["role", "alert", 1, "mj-form-host-error"], ["text", "Loading record..."], [1, "fa-solid", "fa-triangle-exclamation", "mj-form-host-error-icon"], [1, "mj-form-host-error-title"], [1, "mj-form-host-error-detail"]], template: function MjEntityFormHostComponent_Template(rf, ctx) { if (rf & 1) {
|
|
484
496
|
i0.ɵɵconditionalCreate(0, MjEntityFormHostComponent_Conditional_0_Template, 2, 0, "div", 1);
|
|
485
497
|
i0.ɵɵconditionalCreate(1, MjEntityFormHostComponent_Conditional_1_Template, 6, 2, "div", 2);
|
|
486
498
|
i0.ɵɵtemplate(2, MjEntityFormHostComponent_ng_template_2_Template, 0, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
@@ -518,6 +530,8 @@ export class MjEntityFormHostComponent extends BaseAngularComponent {
|
|
|
518
530
|
type: Output
|
|
519
531
|
}], RecordSaved: [{
|
|
520
532
|
type: Output
|
|
533
|
+
}], RecordRefreshed: [{
|
|
534
|
+
type: Output
|
|
521
535
|
}], RecordDeleted: [{
|
|
522
536
|
type: Output
|
|
523
537
|
}], RecordSaveFailed: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-form-host.component.js","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts","../../../src/lib/host/entity-form-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EACrD,iBAAiB,EAAE,MAAM,EACxC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAA+B,oBAAoB,EAAE,iBAAiB,EACnF,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;;;;ICZtE,8BAAkC;IAChC,gCAAkD;IACpD,iBAAM;;;IAKN,8BAA6C;IAC3C,uBAAwE;IACxE,6BAAqC;IAAA,YAAgB;IAAA,iBAAK;IAC1D,4BAAqC;IAAA,YAAiB;IACxD,AADwD,iBAAI,EACtD;;;IAFiC,eAAgB;IAAhB,uCAAgB;IAChB,eAAiB;IAAjB,wCAAiB;;;ADU1D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAOH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACzD,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAChC,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAEnD,oFAAoF;IACb,MAAM,CAAoB;IAEjG,2EAA2E;IAEnE,WAAW,GAAkB,IAAI,CAAC;IAC1C,iFAAiF;IACjF,IACI,UAAU,CAAC,KAAoB;QACjC,M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mCAKP,gBAAgB;;;;;YC5D/C,2FAAe;YAOf,2FAA8B;YAa9B,2HAAqB;;YApBrB,sCAIC;YAGD,cAMC;YAND,yDAMC;;;iFD0CY,yBAAyB;cANrC,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAS9B,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kBAM5D,KAAK;;kBAUL,KAAK;;kBAkBL,KAAK;;kBASL,KAAK;;kBAUL,KAAK;;kBAIL,KAAK;;kBAKL,KAAK;;kBAKL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFA9FI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef,\n ComponentRef, ChangeDetectorRef, inject, AfterViewInit, OnDestroy, Type\n} from '@angular/core';\nimport {\n CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType\n} from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { Subscription } from 'rxjs';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { BaseFormComponent } from '../base-form-component';\nimport { BaseFormSectionComponent } from '../base-form-section-component';\nimport { InteractiveFormComponent } from '../interactive-form/interactive-form.component';\nimport { FormResolverService } from '../resolver/form-resolver.service';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordSavedEvent, RecordDeletedEvent,\n RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\n\n/**\n * Presentation-agnostic host that renders ANY MemberJunction entity form —\n * generated (`@RegisterClass` / CodeGen), custom (`*Extended`), or interactive\n * (`EntityFormOverride`) — for a given record.\n *\n * This is the shared core extracted from Explorer's `SingleRecordComponent`. It\n * encapsulates the full lifecycle: **resolve** which form to use (via\n * {@link FormResolverService}, honoring variant overrides) → **load** the\n * record (or accept a pre-loaded one) → **create** the form component\n * dynamically → **bind** record / EditMode / Config / variants → **re-emit**\n * the form's events → **tear down** cleanly.\n *\n * It has ZERO routing and ZERO Explorer dependencies — it only emits events.\n * The surrounding surface (a full-page tab in Explorer, a dialog, or a\n * slide-in) decides what to do with `Navigate`, `Notification`, etc.\n *\n * @example Explorer tab (thin wrapper subscribes + maps to NavigationService)\n * ```html\n * <mj-entity-form-host [EntityName]=\"entityName\" [PrimaryKey]=\"pk\"\n * (Navigate)=\"handleNavigation($event)\" (Saved)=\"onSaved($event)\">\n * </mj-entity-form-host>\n * ```\n *\n * @example Bind a pre-loaded record (dialog/slide-in)\n * ```html\n * <mj-entity-form-host [Record]=\"myEntity\" [Config]=\"DIALOG_FORM_CONFIG\"></mj-entity-form-host>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-entity-form-host',\n templateUrl: './entity-form-host.component.html',\n styleUrls: ['./entity-form-host.component.css'],\n})\nexport class MjEntityFormHostComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private formResolver = inject(FormResolverService);\n\n /** Anchor for the dynamically-created form component. Always present in the DOM. */\n @ViewChild('anchor', { read: ViewContainerRef, static: true }) private anchor!: ViewContainerRef;\n\n // ── Inputs ──────────────────────────────────────────────────────────────\n\n private _entityName: string | null = null;\n /** Entity name to load a record for. Ignored when {@link Record} is supplied. */\n @Input()\n set EntityName(value: string | null) {\n const changed = this._entityName !== value;\n this._entityName = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get EntityName(): string | null { return this._entityName; }\n\n private _primaryKey: CompositeKey = new CompositeKey();\n /** Primary key of the record to load. Empty key → new record. */\n @Input()\n set PrimaryKey(value: CompositeKey) {\n const changed = !this.compositeKeysEqual(this._primaryKey, value);\n this._primaryKey = value ?? new CompositeKey();\n if (!changed || !this._viewInitialized) return;\n // Skip reload when the incoming key just reflects the current record's now-saved PK\n // (post new-record save rebind). Genuine external swaps still reload.\n if (this._currentRecord && this.compositeKeysEqual(value, this._currentRecord.PrimaryKey)) return;\n this.reload();\n }\n get PrimaryKey(): CompositeKey { return this._primaryKey; }\n\n private _record: BaseEntity | null = null;\n /**\n * Pre-loaded record to bind directly. When supplied, the host skips the\n * load step entirely and mounts the resolved form against this instance —\n * `EntityName`/`PrimaryKey` are not required.\n */\n @Input()\n set Record(value: BaseEntity | null) {\n const changed = this._record !== value;\n this._record = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get Record(): BaseEntity | null { return this._record; }\n\n /** New-record default values: URL-segment string or a plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n\n /**\n * Render a single registered form **section** (a `BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * When set, the full-form resolver / variant picker / toolbar container are\n * bypassed — the section component renders its own fields and the host saves\n * the record directly. Used for compact, focused editors (e.g. a quick-edit\n * grid row). Leave null for the normal full-form behavior.\n */\n @Input() SectionName: string | null = null;\n\n private _editMode: boolean | null = null;\n /** Force edit mode. When omitted, new records start in edit, existing in read. */\n @Input()\n set EditMode(value: boolean | null) { this._editMode = value; }\n get EditMode(): boolean | null { return this._editMode; }\n\n /** Per-instance form presentation config (toolbar, sections, width, links). */\n @Input() Config: EntityFormConfig | null = null;\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n /** Form navigation request (record link, new record, hierarchy, email, external, dismiss). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** User-facing notification request (success/error/warning/info). */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Emitted after the record is successfully saved (carries the live entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordSaved` (richer payload). */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n /** Re-emitted form `RecordDeleted`. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted form `RecordSaveFailed`. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted form `ValidationFailed`. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted form `RecordReady` (record fully initialized). */\n @Output() RecordReady = new EventEmitter<BaseEntity>();\n /** Form asked to be dismissed (e.g. Discard on a brand-new record). */\n @Output() Dismissed = new EventEmitter<void>();\n /** Initial load + mount finished (success path). */\n @Output() LoadComplete = new EventEmitter<void>();\n /** Load failed; carries a user-facing title + detail. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, emitted right after it's created (for power-user wiring). */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n\n // ── State ───────────────────────────────────────────────────────────────\n\n public loading = true;\n public errorTitle: string | null = null;\n public errorDetail: string | null = null;\n\n private _formComponentRef: ComponentRef<BaseFormComponent> | null = null;\n private _sectionRef: ComponentRef<BaseFormSectionComponent> | null = null;\n private _isSection = false;\n private _currentRecord: BaseEntity | null = null;\n private _saveHandlerSub: Subscription | null = null;\n private _formEventSubs: Subscription[] = [];\n private _viewInitialized = false;\n\n /** The live form component instance, or null before mount / after teardown. */\n get Form(): BaseFormComponent | null {\n return this._formComponentRef?.instance ?? null;\n }\n\n /** Whether the bound record has unsaved changes. */\n get Dirty(): boolean {\n return this._currentRecord?.Dirty ?? false;\n }\n\n // ── Lifecycle ───────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this._viewInitialized = true;\n this.reload();\n }\n\n ngOnDestroy(): void {\n this.teardown();\n }\n\n // ── Public API (driven by dialog/slide-in chrome) ─────────────────────────\n\n /**\n * Save the bound record. In full-form mode this runs the form's save\n * pipeline (validation, pending records, notifications); in section mode the\n * section component has no pipeline, so we save the record directly (the\n * record's own save event still drives the `Saved` output).\n */\n async Save(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord ? this._currentRecord.Save() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.SaveRecord(true);\n }\n\n /** Cancel edits (revert). Full-form mode uses the form's cancel pipeline. */\n Cancel(): void {\n if (this._isSection) {\n if (this._currentRecord?.Dirty) this._currentRecord.Revert();\n return;\n }\n this.Form?.CancelEdit();\n }\n\n // ── Core: resolve → load → create → bind → wire ──────────────────────────\n\n private reload(): void {\n this.teardown();\n this.loading = true;\n this.errorTitle = null;\n this.errorDetail = null;\n void this.loadAndMount();\n }\n\n private async loadAndMount(): Promise<void> {\n const md = this.ProviderToUse;\n // When a pre-loaded record is supplied, derive the entity from it.\n const entityName = this._record?.EntityInfo?.Name ?? this._entityName;\n\n if (!entityName || entityName.trim().length === 0) {\n // Nothing to load yet — a caller will re-invoke once an entity is known.\n return;\n }\n\n try {\n const entity = md.EntityByName(entityName);\n if (!entity) {\n this.fail(`Entity not found: \"${entityName}\"`,\n `This MemberJunction instance has no metadata for entity \"${entityName}\".`);\n return;\n }\n const permissions = entity.GetUserPermisions(md.CurrentUser);\n\n // Section mode short-circuits the full-form resolver / container.\n if (this.SectionName) {\n await this.mountSection(entityName, permissions);\n return;\n }\n\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n if (resolution.kind === 'none') {\n this.fail(`No form is registered for \"${entityName}\".`,\n `No EntityFormOverride or class-based form (@RegisterClass(BaseFormComponent, '${entityName}')) was found. Run CodeGen or register a custom form.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName, md);\n if (!record) return; // fail() already called\n\n // Emit Saved on the record's own save event (covers all save paths).\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const componentRef: ComponentRef<BaseFormComponent> = resolution.kind === 'interactive'\n ? this.anchor.createComponent(InteractiveFormComponent)\n : this.anchor.createComponent(resolution.subClass);\n\n if (resolution.kind === 'interactive') {\n (componentRef as ComponentRef<InteractiveFormComponent>).instance.ComponentID = resolution.override.ComponentID;\n }\n\n this._formComponentRef = componentRef;\n this._currentRecord = record;\n\n const instance = componentRef.instance as BaseFormComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.Config = this.effectiveConfigFor(record);\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.applyVariants(instance, resolution, entityName);\n this.subscribeToFormEvents(instance);\n\n this.FormCreated.emit(instance);\n this.errorTitle = null;\n this.errorDetail = null;\n this.LoadComplete.emit();\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n this.fail(`Failed to load ${entityName} record.`, `An unexpected error occurred: ${msg}`);\n } finally {\n this.loading = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * The config to bind for a given record. For brand-new (unsaved) records we hide the\n * `systemMetadata` section by default — its fields (audit timestamps, IDs, etc.) are\n * empty and irrelevant until the record exists. Doesn't mutate the consumer's config,\n * and defers entirely to a consumer that uses an explicit `VisibleSectionKeys` allowlist.\n */\n private effectiveConfigFor(record: BaseEntity): EntityFormConfig | null {\n if (record.IsSaved) return this.Config;\n if (this.Config?.VisibleSectionKeys?.length) return this.Config; // consumer owns visibility\n const SYSTEM_METADATA_KEY = 'systemMetadata';\n const hidden = this.Config?.HiddenSectionKeys ?? [];\n if (hidden.includes(SYSTEM_METADATA_KEY)) return this.Config;\n return { ...(this.Config ?? {}), HiddenSectionKeys: [...hidden, SYSTEM_METADATA_KEY] };\n }\n\n /**\n * Section mode: resolve a `BaseFormSectionComponent` registered as\n * `'<entity>.<section>'`, mount it, and bind the record. No resolver,\n * variants, container, or form-event surface — section components are bare\n * field editors; the host saves the record directly (see {@link Save}).\n */\n private async mountSection(entityName: string, permissions: unknown): Promise<void> {\n const key = `${entityName}.${this.SectionName}`;\n const reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, key);\n if (!reg?.SubClass) {\n this.fail(`No form section \"${this.SectionName}\" is registered for \"${entityName}\".`,\n `Expected a @RegisterClass(BaseFormSectionComponent, '${key}'). Check the section name.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName);\n if (!record) return;\n\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const ref = this.anchor.createComponent(reg.SubClass as Type<BaseFormSectionComponent>);\n this._sectionRef = ref;\n this._currentRecord = record;\n this._isSection = true;\n\n const instance = ref.instance as BaseFormSectionComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.RecordReady.emit(record);\n this.LoadComplete.emit();\n }\n\n /** Resolve the BaseEntity to bind: the supplied instance, or a freshly loaded/new one. */\n private async obtainRecord(entityName: string, md = this.ProviderToUse): Promise<BaseEntity | null> {\n if (this._record) return this._record;\n\n const record = await md.GetEntityObject<BaseEntity>(entityName, md.CurrentUser);\n if (!record) {\n this.fail(`Failed to load ${entityName} record.`, `Unable to instantiate entity \"${entityName}\".`);\n return null;\n }\n\n if (this._primaryKey.HasValue) {\n const loadOk = await record.InnerLoad(this._primaryKey);\n if (!loadOk) {\n this.fail(`Could not load ${entityName} record.`,\n record.LatestResult?.Message\n ? `Server error: ${record.LatestResult.Message}`\n : `InnerLoad returned false for key ${this._primaryKey.ToString()}.`);\n return null;\n }\n } else {\n record.NewRecord();\n this.applyNewRecordValues(record);\n }\n return record;\n }\n\n /** Push variant list + active selection and wire the variant-switch handler. */\n private applyVariants(\n instance: BaseFormComponent,\n resolution: Awaited<ReturnType<FormResolverService['ResolveFormForEntity']>>,\n entityName: string,\n ): void {\n instance.Variants = (resolution.variants ?? [])\n .filter(v => v.Status === 'Active')\n .map(v => ({ ID: v.ID, Label: v.Name ?? `Override ${v.ID.substring(0, 8)}`, Scope: v.Scope, Status: v.Status }));\n instance.CurrentVariantID = resolution.kind === 'interactive' ? resolution.override.ID : null;\n instance.OnVariantChanged = (variantID: string | null) => {\n if (variantID === null) {\n this.formResolver.SetExplicitDefault(entityName);\n } else {\n this.formResolver.SetSelectedVariant(entityName, variantID);\n }\n // Reload via the resolver so tier/priority + the new selection apply.\n this._record = null; // force a fresh load against the new variant\n this.reload();\n };\n }\n\n /** Subscribe to the form's outputs and re-emit them through the host. */\n private subscribeToFormEvents(form: BaseFormComponent): void {\n this.cleanupFormSubs();\n this._formEventSubs.push(\n form.Navigate.subscribe(e => this.Navigate.emit(e)),\n form.Notification.subscribe(e => this.Notification.emit(e)),\n form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)),\n form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)),\n form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)),\n form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)),\n form.RecordReady.subscribe(e => this.RecordReady.emit(e)),\n );\n // Surface 'dismiss' navigation as a first-class Dismissed event too.\n this._formEventSubs.push(\n form.Navigate.subscribe(e => { if (e.Kind === 'dismiss') this.Dismissed.emit(); }),\n );\n }\n\n // ── New-record value application (URL segment or object) ──────────────────\n\n private applyNewRecordValues(record: BaseEntity): void {\n if (!this.NewRecordValues) return;\n if (typeof this.NewRecordValues === 'string') {\n if (this.NewRecordValues.length === 0) return;\n const fv = new FieldValueCollection();\n fv.SimpleLoadFromURLSegment(this.NewRecordValues);\n fv.KeyValuePairs\n .filter(kvp => kvp.Value !== null && kvp.Value !== undefined)\n .forEach(kvp => this.setTypedField(record, kvp.FieldName, kvp.Value));\n } else {\n const values = this.NewRecordValues as Record<string, unknown>;\n Object.keys(values)\n .filter(key => values[key] !== null && values[key] !== undefined)\n .forEach(key => this.setTypedField(record, key, values[key]));\n }\n }\n\n /** Set a field with TSType-aware coercion (shared by string + object paths). */\n private setTypedField(record: BaseEntity, fieldName: string, value: unknown): void {\n const f = record.Fields.find(x => x.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (!f) return;\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(fieldName, value?.toString() ?? '');\n break;\n case EntityFieldTSType.Number:\n record.Set(fieldName, typeof value === 'number' ? value : parseFloat(value?.toString() ?? '0'));\n break;\n case EntityFieldTSType.Boolean:\n if (typeof value === 'boolean') record.Set(fieldName, value);\n else if (typeof value === 'string') record.Set(fieldName, value !== 'false' && value !== '0' && value.trim().length > 0);\n else record.Set(fieldName, !!value);\n break;\n case EntityFieldTSType.Date:\n record.Set(fieldName, value instanceof Date ? value : new Date(value?.toString() ?? ''));\n break;\n default:\n record.Set(fieldName, value);\n break;\n }\n }\n\n // ── Helpers ───────────────────────────────────────────────────────────────\n\n private fail(title: string, detail: string): void {\n this.errorTitle = title;\n this.errorDetail = detail;\n this.loading = false;\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n this.anchor?.clear();\n this.LoadError.emit({ title, detail });\n this.cdr.detectChanges();\n }\n\n private compositeKeysEqual(a: CompositeKey | null | undefined, b: CompositeKey | null | undefined): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const aKvps = (a.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n const bKvps = (b.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n if (aKvps.length !== bKvps.length) return false;\n for (let i = 0; i < aKvps.length; i++) {\n if (aKvps[i].FieldName !== bKvps[i].FieldName) return false;\n if (String(aKvps[i].Value ?? '') !== String(bKvps[i].Value ?? '')) return false;\n }\n return true;\n }\n\n private cleanupFormSubs(): void {\n for (const sub of this._formEventSubs) sub.unsubscribe();\n this._formEventSubs = [];\n }\n\n private teardown(): void {\n this.cleanupFormSubs();\n if (this._saveHandlerSub) {\n this._saveHandlerSub.unsubscribe();\n this._saveHandlerSub = null;\n }\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n if (this._sectionRef) {\n try { this._sectionRef.destroy(); } catch { /* noop */ }\n this._sectionRef = null;\n }\n this._isSection = false;\n this._currentRecord = null;\n this.anchor?.clear();\n }\n}\n","<!-- Loading state -->\n@if (loading) {\n <div class=\"mj-form-host-loading\">\n <mj-loading text=\"Loading record...\"></mj-loading>\n </div>\n}\n\n<!-- Error state -->\n@if (!loading && errorTitle) {\n <div class=\"mj-form-host-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation mj-form-host-error-icon\"></i>\n <h3 class=\"mj-form-host-error-title\">{{ errorTitle }}</h3>\n <p class=\"mj-form-host-error-detail\">{{ errorDetail }}</p>\n </div>\n}\n\n<!--\n Anchor for the dynamically-created form component. Always present (static)\n so the ViewContainerRef resolves at AfterViewInit. The form's own template\n carries the <mj-record-form-container>, so nothing wraps it here.\n-->\n<ng-template #anchor></ng-template>\n"]}
|
|
1
|
+
{"version":3,"file":"entity-form-host.component.js","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts","../../../src/lib/host/entity-form-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EACrD,iBAAiB,EAAE,MAAM,EACxC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAA+B,oBAAoB,EAAE,iBAAiB,EACnF,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;;;;ICZtE,8BAAkC;IAChC,gCAAkD;IACpD,iBAAM;;;IAKN,8BAA6C;IAC3C,uBAAwE;IACxE,6BAAqC;IAAA,YAAgB;IAA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gB,EAAE,MAAM,EAAE,IAAI,EAAE;;kBAM5D,KAAK;;kBAUL,KAAK;;kBAkBL,KAAK;;kBASL,KAAK;;kBAUL,KAAK;;kBAIL,KAAK;;kBAKL,KAAK;;kBAKL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFAhGI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef,\n ComponentRef, ChangeDetectorRef, inject, AfterViewInit, OnDestroy, Type\n} from '@angular/core';\nimport {\n CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType\n} from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { Subscription } from 'rxjs';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { BaseFormComponent } from '../base-form-component';\nimport { BaseFormSectionComponent } from '../base-form-section-component';\nimport { InteractiveFormComponent } from '../interactive-form/interactive-form.component';\nimport { FormResolverService } from '../resolver/form-resolver.service';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordSavedEvent, RecordDeletedEvent,\n RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\n\n/**\n * Presentation-agnostic host that renders ANY MemberJunction entity form —\n * generated (`@RegisterClass` / CodeGen), custom (`*Extended`), or interactive\n * (`EntityFormOverride`) — for a given record.\n *\n * This is the shared core extracted from Explorer's `SingleRecordComponent`. It\n * encapsulates the full lifecycle: **resolve** which form to use (via\n * {@link FormResolverService}, honoring variant overrides) → **load** the\n * record (or accept a pre-loaded one) → **create** the form component\n * dynamically → **bind** record / EditMode / Config / variants → **re-emit**\n * the form's events → **tear down** cleanly.\n *\n * It has ZERO routing and ZERO Explorer dependencies — it only emits events.\n * The surrounding surface (a full-page tab in Explorer, a dialog, or a\n * slide-in) decides what to do with `Navigate`, `Notification`, etc.\n *\n * @example Explorer tab (thin wrapper subscribes + maps to NavigationService)\n * ```html\n * <mj-entity-form-host [EntityName]=\"entityName\" [PrimaryKey]=\"pk\"\n * (Navigate)=\"handleNavigation($event)\" (Saved)=\"onSaved($event)\">\n * </mj-entity-form-host>\n * ```\n *\n * @example Bind a pre-loaded record (dialog/slide-in)\n * ```html\n * <mj-entity-form-host [Record]=\"myEntity\" [Config]=\"DIALOG_FORM_CONFIG\"></mj-entity-form-host>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-entity-form-host',\n templateUrl: './entity-form-host.component.html',\n styleUrls: ['./entity-form-host.component.css'],\n})\nexport class MjEntityFormHostComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private formResolver = inject(FormResolverService);\n\n /** Anchor for the dynamically-created form component. Always present in the DOM. */\n @ViewChild('anchor', { read: ViewContainerRef, static: true }) private anchor!: ViewContainerRef;\n\n // ── Inputs ──────────────────────────────────────────────────────────────\n\n private _entityName: string | null = null;\n /** Entity name to load a record for. Ignored when {@link Record} is supplied. */\n @Input()\n set EntityName(value: string | null) {\n const changed = this._entityName !== value;\n this._entityName = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get EntityName(): string | null { return this._entityName; }\n\n private _primaryKey: CompositeKey = new CompositeKey();\n /** Primary key of the record to load. Empty key → new record. */\n @Input()\n set PrimaryKey(value: CompositeKey) {\n const changed = !this.compositeKeysEqual(this._primaryKey, value);\n this._primaryKey = value ?? new CompositeKey();\n if (!changed || !this._viewInitialized) return;\n // Skip reload when the incoming key just reflects the current record's now-saved PK\n // (post new-record save rebind). Genuine external swaps still reload.\n if (this._currentRecord && this.compositeKeysEqual(value, this._currentRecord.PrimaryKey)) return;\n this.reload();\n }\n get PrimaryKey(): CompositeKey { return this._primaryKey; }\n\n private _record: BaseEntity | null = null;\n /**\n * Pre-loaded record to bind directly. When supplied, the host skips the\n * load step entirely and mounts the resolved form against this instance —\n * `EntityName`/`PrimaryKey` are not required.\n */\n @Input()\n set Record(value: BaseEntity | null) {\n const changed = this._record !== value;\n this._record = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get Record(): BaseEntity | null { return this._record; }\n\n /** New-record default values: URL-segment string or a plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n\n /**\n * Render a single registered form **section** (a `BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * When set, the full-form resolver / variant picker / toolbar container are\n * bypassed — the section component renders its own fields and the host saves\n * the record directly. Used for compact, focused editors (e.g. a quick-edit\n * grid row). Leave null for the normal full-form behavior.\n */\n @Input() SectionName: string | null = null;\n\n private _editMode: boolean | null = null;\n /** Force edit mode. When omitted, new records start in edit, existing in read. */\n @Input()\n set EditMode(value: boolean | null) { this._editMode = value; }\n get EditMode(): boolean | null { return this._editMode; }\n\n /** Per-instance form presentation config (toolbar, sections, width, links). */\n @Input() Config: EntityFormConfig | null = null;\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n /** Form navigation request (record link, new record, hierarchy, email, external, dismiss). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** User-facing notification request (success/error/warning/info). */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Emitted after the record is successfully saved (carries the live entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordSaved` (richer payload). */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n /** Re-emitted form `RecordRefreshed`. */\n @Output() RecordRefreshed = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordDeleted`. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted form `RecordSaveFailed`. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted form `ValidationFailed`. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted form `RecordReady` (record fully initialized). */\n @Output() RecordReady = new EventEmitter<BaseEntity>();\n /** Form asked to be dismissed (e.g. Discard on a brand-new record). */\n @Output() Dismissed = new EventEmitter<void>();\n /** Initial load + mount finished (success path). */\n @Output() LoadComplete = new EventEmitter<void>();\n /** Load failed; carries a user-facing title + detail. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, emitted right after it's created (for power-user wiring). */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n\n // ── State ───────────────────────────────────────────────────────────────\n\n public loading = true;\n public errorTitle: string | null = null;\n public errorDetail: string | null = null;\n\n private _formComponentRef: ComponentRef<BaseFormComponent> | null = null;\n private _sectionRef: ComponentRef<BaseFormSectionComponent> | null = null;\n private _isSection = false;\n private _currentRecord: BaseEntity | null = null;\n private _saveHandlerSub: Subscription | null = null;\n private _formEventSubs: Subscription[] = [];\n private _viewInitialized = false;\n\n /** The live form component instance, or null before mount / after teardown. */\n get Form(): BaseFormComponent | null {\n return this._formComponentRef?.instance ?? null;\n }\n\n /** Whether the bound record has unsaved changes. */\n get Dirty(): boolean {\n return this._currentRecord?.Dirty ?? false;\n }\n\n // ── Lifecycle ───────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this._viewInitialized = true;\n this.reload();\n }\n\n ngOnDestroy(): void {\n this.teardown();\n }\n\n // ── Public API (driven by dialog/slide-in chrome) ─────────────────────────\n\n /**\n * Save the bound record. In full-form mode this runs the form's save\n * pipeline (validation, pending records, notifications); in section mode the\n * section component has no pipeline, so we save the record directly (the\n * record's own save event still drives the `Saved` output).\n */\n async Save(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord ? this._currentRecord.Save() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.SaveRecord(true);\n }\n\n /** Cancel edits (revert). Full-form mode uses the form's cancel pipeline. */\n Cancel(): void {\n if (this._isSection) {\n if (this._currentRecord?.Dirty) this._currentRecord.Revert();\n return;\n }\n this.Form?.CancelEdit();\n }\n\n /** Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline. */\n async Refresh(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord?.IsSaved ? this._currentRecord.Refresh() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.RefreshRecord();\n }\n\n // ── Core: resolve → load → create → bind → wire ──────────────────────────\n\n private reload(): void {\n this.teardown();\n this.loading = true;\n this.errorTitle = null;\n this.errorDetail = null;\n void this.loadAndMount();\n }\n\n private async loadAndMount(): Promise<void> {\n const md = this.ProviderToUse;\n // When a pre-loaded record is supplied, derive the entity from it.\n const entityName = this._record?.EntityInfo?.Name ?? this._entityName;\n\n if (!entityName || entityName.trim().length === 0) {\n // Nothing to load yet — a caller will re-invoke once an entity is known.\n return;\n }\n\n try {\n const entity = md.EntityByName(entityName);\n if (!entity) {\n this.fail(`Entity not found: \"${entityName}\"`,\n `This MemberJunction instance has no metadata for entity \"${entityName}\".`);\n return;\n }\n const permissions = entity.GetUserPermisions(md.CurrentUser);\n\n // Section mode short-circuits the full-form resolver / container.\n if (this.SectionName) {\n await this.mountSection(entityName, permissions);\n return;\n }\n\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n if (resolution.kind === 'none') {\n this.fail(`No form is registered for \"${entityName}\".`,\n `No EntityFormOverride or class-based form (@RegisterClass(BaseFormComponent, '${entityName}')) was found. Run CodeGen or register a custom form.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName, md);\n if (!record) return; // fail() already called\n\n // Emit Saved on the record's own save event (covers all save paths).\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const componentRef: ComponentRef<BaseFormComponent> = resolution.kind === 'interactive'\n ? this.anchor.createComponent(InteractiveFormComponent)\n : this.anchor.createComponent(resolution.subClass);\n\n if (resolution.kind === 'interactive') {\n (componentRef as ComponentRef<InteractiveFormComponent>).instance.ComponentID = resolution.override.ComponentID;\n }\n\n this._formComponentRef = componentRef;\n this._currentRecord = record;\n\n const instance = componentRef.instance as BaseFormComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.Config = this.effectiveConfigFor(record);\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.applyVariants(instance, resolution, entityName);\n this.subscribeToFormEvents(instance);\n\n this.FormCreated.emit(instance);\n this.errorTitle = null;\n this.errorDetail = null;\n this.LoadComplete.emit();\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n this.fail(`Failed to load ${entityName} record.`, `An unexpected error occurred: ${msg}`);\n } finally {\n this.loading = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * The config to bind for a given record. For brand-new (unsaved) records we hide the\n * `systemMetadata` section by default — its fields (audit timestamps, IDs, etc.) are\n * empty and irrelevant until the record exists. Doesn't mutate the consumer's config,\n * and defers entirely to a consumer that uses an explicit `VisibleSectionKeys` allowlist.\n */\n private effectiveConfigFor(record: BaseEntity): EntityFormConfig | null {\n if (record.IsSaved) return this.Config;\n if (this.Config?.VisibleSectionKeys?.length) return this.Config; // consumer owns visibility\n const SYSTEM_METADATA_KEY = 'systemMetadata';\n const hidden = this.Config?.HiddenSectionKeys ?? [];\n if (hidden.includes(SYSTEM_METADATA_KEY)) return this.Config;\n return { ...(this.Config ?? {}), HiddenSectionKeys: [...hidden, SYSTEM_METADATA_KEY] };\n }\n\n /**\n * Section mode: resolve a `BaseFormSectionComponent` registered as\n * `'<entity>.<section>'`, mount it, and bind the record. No resolver,\n * variants, container, or form-event surface — section components are bare\n * field editors; the host saves the record directly (see {@link Save}).\n */\n private async mountSection(entityName: string, permissions: unknown): Promise<void> {\n const key = `${entityName}.${this.SectionName}`;\n const reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, key);\n if (!reg?.SubClass) {\n this.fail(`No form section \"${this.SectionName}\" is registered for \"${entityName}\".`,\n `Expected a @RegisterClass(BaseFormSectionComponent, '${key}'). Check the section name.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName);\n if (!record) return;\n\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const ref = this.anchor.createComponent(reg.SubClass as Type<BaseFormSectionComponent>);\n this._sectionRef = ref;\n this._currentRecord = record;\n this._isSection = true;\n\n const instance = ref.instance as BaseFormSectionComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.RecordReady.emit(record);\n this.LoadComplete.emit();\n }\n\n /** Resolve the BaseEntity to bind: the supplied instance, or a freshly loaded/new one. */\n private async obtainRecord(entityName: string, md = this.ProviderToUse): Promise<BaseEntity | null> {\n if (this._record) return this._record;\n\n const record = await md.GetEntityObject<BaseEntity>(entityName, md.CurrentUser);\n if (!record) {\n this.fail(`Failed to load ${entityName} record.`, `Unable to instantiate entity \"${entityName}\".`);\n return null;\n }\n\n if (this._primaryKey.HasValue) {\n const loadOk = await record.InnerLoad(this._primaryKey);\n if (!loadOk) {\n this.fail(`Could not load ${entityName} record.`,\n record.LatestResult?.Message\n ? `Server error: ${record.LatestResult.Message}`\n : `InnerLoad returned false for key ${this._primaryKey.ToString()}.`);\n return null;\n }\n } else {\n record.NewRecord();\n this.applyNewRecordValues(record);\n }\n return record;\n }\n\n /** Push variant list + active selection and wire the variant-switch handler. */\n private applyVariants(\n instance: BaseFormComponent,\n resolution: Awaited<ReturnType<FormResolverService['ResolveFormForEntity']>>,\n entityName: string,\n ): void {\n instance.Variants = (resolution.variants ?? [])\n .filter(v => v.Status === 'Active')\n .map(v => ({ ID: v.ID, Label: v.Name ?? `Override ${v.ID.substring(0, 8)}`, Scope: v.Scope, Status: v.Status }));\n instance.CurrentVariantID = resolution.kind === 'interactive' ? resolution.override.ID : null;\n instance.OnVariantChanged = (variantID: string | null) => {\n if (variantID === null) {\n this.formResolver.SetExplicitDefault(entityName);\n } else {\n this.formResolver.SetSelectedVariant(entityName, variantID);\n }\n // Reload via the resolver so tier/priority + the new selection apply.\n this._record = null; // force a fresh load against the new variant\n this.reload();\n };\n }\n\n /** Subscribe to the form's outputs and re-emit them through the host. */\n private subscribeToFormEvents(form: BaseFormComponent): void {\n this.cleanupFormSubs();\n this._formEventSubs.push(\n form.Navigate.subscribe(e => this.Navigate.emit(e)),\n form.Notification.subscribe(e => this.Notification.emit(e)),\n form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)),\n form.RecordRefreshed.subscribe(e => this.RecordRefreshed.emit(e.Record)),\n form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)),\n form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)),\n form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)),\n form.RecordReady.subscribe(e => this.RecordReady.emit(e)),\n );\n // Surface 'dismiss' navigation as a first-class Dismissed event too.\n this._formEventSubs.push(\n form.Navigate.subscribe(e => { if (e.Kind === 'dismiss') this.Dismissed.emit(); }),\n );\n }\n\n // ── New-record value application (URL segment or object) ──────────────────\n\n private applyNewRecordValues(record: BaseEntity): void {\n if (!this.NewRecordValues) return;\n if (typeof this.NewRecordValues === 'string') {\n if (this.NewRecordValues.length === 0) return;\n const fv = new FieldValueCollection();\n fv.SimpleLoadFromURLSegment(this.NewRecordValues);\n fv.KeyValuePairs\n .filter(kvp => kvp.Value !== null && kvp.Value !== undefined)\n .forEach(kvp => this.setTypedField(record, kvp.FieldName, kvp.Value));\n } else {\n const values = this.NewRecordValues as Record<string, unknown>;\n Object.keys(values)\n .filter(key => values[key] !== null && values[key] !== undefined)\n .forEach(key => this.setTypedField(record, key, values[key]));\n }\n }\n\n /** Set a field with TSType-aware coercion (shared by string + object paths). */\n private setTypedField(record: BaseEntity, fieldName: string, value: unknown): void {\n const f = record.Fields.find(x => x.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (!f) return;\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(fieldName, value?.toString() ?? '');\n break;\n case EntityFieldTSType.Number:\n record.Set(fieldName, typeof value === 'number' ? value : parseFloat(value?.toString() ?? '0'));\n break;\n case EntityFieldTSType.Boolean:\n if (typeof value === 'boolean') record.Set(fieldName, value);\n else if (typeof value === 'string') record.Set(fieldName, value !== 'false' && value !== '0' && value.trim().length > 0);\n else record.Set(fieldName, !!value);\n break;\n case EntityFieldTSType.Date:\n record.Set(fieldName, value instanceof Date ? value : new Date(value?.toString() ?? ''));\n break;\n default:\n record.Set(fieldName, value);\n break;\n }\n }\n\n // ── Helpers ───────────────────────────────────────────────────────────────\n\n private fail(title: string, detail: string): void {\n this.errorTitle = title;\n this.errorDetail = detail;\n this.loading = false;\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n this.anchor?.clear();\n this.LoadError.emit({ title, detail });\n this.cdr.detectChanges();\n }\n\n private compositeKeysEqual(a: CompositeKey | null | undefined, b: CompositeKey | null | undefined): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const aKvps = (a.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n const bKvps = (b.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n if (aKvps.length !== bKvps.length) return false;\n for (let i = 0; i < aKvps.length; i++) {\n if (aKvps[i].FieldName !== bKvps[i].FieldName) return false;\n if (String(aKvps[i].Value ?? '') !== String(bKvps[i].Value ?? '')) return false;\n }\n return true;\n }\n\n private cleanupFormSubs(): void {\n for (const sub of this._formEventSubs) sub.unsubscribe();\n this._formEventSubs = [];\n }\n\n private teardown(): void {\n this.cleanupFormSubs();\n if (this._saveHandlerSub) {\n this._saveHandlerSub.unsubscribe();\n this._saveHandlerSub = null;\n }\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n if (this._sectionRef) {\n try { this._sectionRef.destroy(); } catch { /* noop */ }\n this._sectionRef = null;\n }\n this._isSection = false;\n this._currentRecord = null;\n this.anchor?.clear();\n }\n}\n","<!-- Loading state -->\n@if (loading) {\n <div class=\"mj-form-host-loading\">\n <mj-loading text=\"Loading record...\"></mj-loading>\n </div>\n}\n\n<!-- Error state -->\n@if (!loading && errorTitle) {\n <div class=\"mj-form-host-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation mj-form-host-error-icon\"></i>\n <h3 class=\"mj-form-host-error-title\">{{ errorTitle }}</h3>\n <p class=\"mj-form-host-error-detail\">{{ errorDetail }}</p>\n </div>\n}\n\n<!--\n Anchor for the dynamically-created form component. Always present (static)\n so the ViewContainerRef resolves at AfterViewInit. The form's own template\n carries the <mj-record-form-container>, so nothing wraps it here.\n-->\n<ng-template #anchor></ng-template>\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { BaseEntity, CompositeKey } from '@memberjunction/core';
|
|
3
3
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
4
|
import { FormNavigationEvent, EntityHierarchyNavigationEvent } from '../types/navigation-events';
|
|
@@ -27,8 +27,10 @@ import * as i0 from "@angular/core";
|
|
|
27
27
|
* </mj-isa-related-panel>
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export declare class MjIsaRelatedPanelComponent extends BaseAngularComponent implements OnChanges {
|
|
30
|
+
export declare class MjIsaRelatedPanelComponent extends BaseAngularComponent implements OnChanges, OnInit, OnDestroy {
|
|
31
31
|
private cdr;
|
|
32
|
+
private recordRefresh;
|
|
33
|
+
private destroy$;
|
|
32
34
|
/** The entity record currently displayed in the form */
|
|
33
35
|
Record: BaseEntity | null;
|
|
34
36
|
/** Whether the form is in edit mode (panel hides during edit) */
|
|
@@ -45,6 +47,8 @@ export declare class MjIsaRelatedPanelComponent extends BaseAngularComponent imp
|
|
|
45
47
|
get CurrentRecordName(): string;
|
|
46
48
|
/** The shared primary key for all IS-A related records */
|
|
47
49
|
get SharedPrimaryKey(): CompositeKey | null;
|
|
50
|
+
ngOnInit(): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
48
52
|
ngOnChanges(changes: SimpleChanges): void;
|
|
49
53
|
/**
|
|
50
54
|
* Discover IS-A related entities by examining the current record's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isa-related-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"isa-related-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAC5C,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAc,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAA+C,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAGpG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAQa,0BAA2B,SAAQ,oBAAqB,YAAW,SAAS,EAAE,MAAM,EAAE,SAAS;IAC1G,OAAO,CAAC,GAAG,CAA6B;IACxC,OAAO,CAAC,aAAa,CAA4D;IACjF,OAAO,CAAC,QAAQ,CAAuB;IAEvC,wDAAwD;IAC/C,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE1C,iEAAiE;IACxD,QAAQ,UAAS;IAE1B,0EAA0E;IACjE,SAAS,UAAS;IAE3B,iDAAiD;IACvC,QAAQ,oCAA2C;IAE7D,qFAAqF;IACrF,YAAY,EAAE,cAAc,EAAE,CAAM;IAEpC,uDAAuD;IACvD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,oFAAoF;IACpF,IAAI,iBAAiB,IAAI,MAAM,CAI9B;IAED,0DAA0D;IAC1D,IAAI,gBAAgB,IAAI,YAAY,GAAG,IAAI,CAE1C;IAED,QAAQ,IAAI,IAAI;IAMhB,WAAW,IAAI,IAAI;IAKnB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC;;;;OAIG;YACW,oBAAoB;IAqBlC;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;OAGG;YACW,mBAAmB;IAQjC,+CAA+C;IAC/C,cAAc,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI;yCAzHhD,0BAA0B;2CAA1B,0BAA0B;CA4HtC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { takeUntil } from 'rxjs/operators';
|
|
2
4
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
5
|
import { DiscoverISADescendants, BuildDescendantTree } from './isa-hierarchy-utils';
|
|
6
|
+
import { FormRecordRefreshCoordinator } from '../form-record-refresh.coordinator';
|
|
4
7
|
import * as i0 from "@angular/core";
|
|
5
8
|
import * as i1 from "./isa-related-card.component";
|
|
6
9
|
const _forTrack0 = ($index, $item) => $item.EntityName;
|
|
@@ -75,6 +78,8 @@ function MjIsaRelatedPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1
|
|
|
75
78
|
*/
|
|
76
79
|
export class MjIsaRelatedPanelComponent extends BaseAngularComponent {
|
|
77
80
|
cdr = inject(ChangeDetectorRef);
|
|
81
|
+
recordRefresh = inject(FormRecordRefreshCoordinator, { optional: true });
|
|
82
|
+
destroy$ = new Subject();
|
|
78
83
|
/** The entity record currently displayed in the form */
|
|
79
84
|
Record = null;
|
|
80
85
|
/** Whether the form is in edit mode (panel hides during edit) */
|
|
@@ -100,6 +105,15 @@ export class MjIsaRelatedPanelComponent extends BaseAngularComponent {
|
|
|
100
105
|
get SharedPrimaryKey() {
|
|
101
106
|
return this.Record?.PrimaryKey ?? null;
|
|
102
107
|
}
|
|
108
|
+
ngOnInit() {
|
|
109
|
+
this.recordRefresh?.Refreshed$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
110
|
+
void this.DiscoverRelatedItems();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
ngOnDestroy() {
|
|
114
|
+
this.destroy$.next();
|
|
115
|
+
this.destroy$.complete();
|
|
116
|
+
}
|
|
103
117
|
ngOnChanges(changes) {
|
|
104
118
|
if (changes['Record']) {
|
|
105
119
|
this.DiscoverRelatedItems();
|
|
@@ -187,5 +201,5 @@ export class MjIsaRelatedPanelComponent extends BaseAngularComponent {
|
|
|
187
201
|
}], Navigate: [{
|
|
188
202
|
type: Output
|
|
189
203
|
}] }); })();
|
|
190
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjIsaRelatedPanelComponent, { className: "MjIsaRelatedPanelComponent", filePath: "src/lib/isa-related-panel/isa-related-panel.component.ts", lineNumber:
|
|
204
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjIsaRelatedPanelComponent, { className: "MjIsaRelatedPanelComponent", filePath: "src/lib/isa-related-panel/isa-related-panel.component.ts", lineNumber: 45 }); })();
|
|
191
205
|
//# sourceMappingURL=isa-related-panel.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isa-related-panel.component.js","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-panel.component.ts","../../../src/lib/isa-related-panel/isa-related-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EACxB,iBAAiB,EAC5C,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAkB,MAAM,uBAAuB,CAAC;;;;;ICA1F,8BAAoE;IAClE,uBAAgC;IAClC,iBAAM;;;IAFoC,0CAAyB;;;IAFvE,8BAA2C;IACzC,yHAIC;IACH,iBAAM;;;IALJ,cAIC;IAJD,kCAIC;;;;IAMC,8CAOsC;IAApC,4OAAY,6BAAsB,KAAC;IACrC,iBAAsB;;;;IAFpB,AADA,AADA,AADA,AADA,AADA,+CAA8B,uCACC,+CACQ,sCACL,wBACd,8BACM;;;IARhC,8BAAiC;IAC/B,yIAUC;IACH,iBAAM;;;IAXJ,cAUC;IAVD,kCAUC;;;IAxBP,8BAAsE;IAWlE,AARF,0GAAiB,oFAQR;IAgBX,iBAAM;;;IA3BoB,2DAA2C;IAGnE,cAuBC;IAvBD,0CAuBC;;ADlBL;;;;;;;;;;;;;;;;;;;;;;GAsBG;AASH,MAAM,OAAO,0BAA2B,SAAQ,oBAAoB;IAC1D,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAExC,wDAAwD;IAC/C,MAAM,GAAsB,IAAI,CAAC;IAE1C,iEAAiE;IACxD,QAAQ,GAAG,KAAK,CAAC;IAE1B,0EAA0E;IACjE,SAAS,GAAG,KAAK,CAAC;IAE3B,iDAAiD;IACvC,QAAQ,GAAG,IAAI,YAAY,EAAuB,CAAC;IAE7D,qFAAqF;IACrF,YAAY,GAAqB,EAAE,CAAC;IAEpC,uDAAuD;IACvD,IAA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K;;kBAGL,KAAK;;kBAGL,MAAM;;kFAbI,0BAA0B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n OnChanges, SimpleChanges, ViewEncapsulation\n} from '@angular/core';\nimport { BaseEntity, EntityInfo, CompositeKey } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { FormNavigationEvent, EntityHierarchyNavigationEvent } from '../types/navigation-events';\nimport { DiscoverISADescendants, BuildDescendantTree, IsaRelatedItem } from './isa-hierarchy-utils';\n\n/**\n * Container panel that discovers and displays IS-A related entity records\n * (siblings and children) for the current form's record.\n *\n * **Placement**: Sits to the right of the main form panels inside\n * `<mj-record-form-container>`. Hidden when in edit mode or when\n * no related IS-A records exist.\n *\n * **Data flow**:\n * - Receives the current `Record` (BaseEntity) as input\n * - Inspects `EntityInfo.ParentEntityInfo` and `ISAChildren` to discover related records\n * - Builds a tree structure for nested sub-card rendering\n * - Renders an `<mj-isa-related-card>` for each root-level related entity\n * (grandchildren render as nested sub-cards inside their parent card)\n *\n * @example\n * ```html\n * <mj-isa-related-panel\n * [Record]=\"record\"\n * (Navigate)=\"OnNavigate($event)\">\n * </mj-isa-related-panel>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-isa-related-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './isa-related-panel.component.html',\n styleUrls: ['./isa-related-panel.component.css']\n})\nexport class MjIsaRelatedPanelComponent extends BaseAngularComponent implements OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n /** The entity record currently displayed in the form */\n @Input() Record: BaseEntity | null = null;\n\n /** Whether the form is in edit mode (panel hides during edit) */\n @Input() EditMode = false;\n\n /** Whether the panel is collapsed (icon-only strip in full-width mode) */\n @Input() Collapsed = false;\n\n /** Emitted for navigation to a related record */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Root-level related IS-A entities to display cards for (children nested inside) */\n RelatedItems: IsaRelatedItem[] = [];\n\n /** Whether there are any related IS-A items to show */\n get HasItems(): boolean {\n return this.RelatedItems.length > 0;\n }\n\n /** The current record's display name (to suppress in child cards when identical) */\n get CurrentRecordName(): string {\n if (!this.Record) return '';\n const name = this.Record.GetRecordName();\n return name ? String(name) : '';\n }\n\n /** The shared primary key for all IS-A related records */\n get SharedPrimaryKey(): CompositeKey | null {\n return this.Record?.PrimaryKey ?? null;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['Record']) {\n this.DiscoverRelatedItems();\n }\n }\n\n /**\n * Discover IS-A related entities by examining the current record's\n * entity hierarchy. Finds siblings (other children of the same parent)\n * and all descendants (children, grandchildren, etc.) as a tree.\n */\n private async DiscoverRelatedItems(): Promise<void> {\n this.RelatedItems = [];\n\n if (!this.Record) return;\n\n const entityInfo = this.Record.EntityInfo;\n if (!entityInfo) return;\n\n // Case 1: Current entity is a child type — find siblings via parent\n if (entityInfo.IsChildType && entityInfo.ParentEntityInfo) {\n this.DiscoverSiblingsFromParent(entityInfo);\n }\n\n // Case 2: Current entity is a parent type — discover all descendants as tree\n if (entityInfo.IsParentType) {\n await this.DiscoverDescendants();\n }\n\n this.cdr.markForCheck();\n }\n\n /**\n * When viewing a child entity (e.g., Member), find sibling entities\n * (e.g., Speaker) that also have records with the same parent PK.\n * Uses the parent's ISAChildren if the parent uses overlapping subtypes.\n */\n private DiscoverSiblingsFromParent(entityInfo: EntityInfo): void {\n const parent = this.Record?.ISAParent;\n if (!parent) return;\n\n const parentInfo = entityInfo.ParentEntityInfo!;\n\n if (parentInfo.AllowMultipleSubtypes) {\n const children = parent.ISAChildren;\n if (children) {\n for (const child of children) {\n if (child.entityName !== entityInfo.Name) {\n this.RelatedItems.push({\n EntityName: child.entityName,\n Relationship: 'sibling',\n Depth: 0,\n Children: []\n });\n }\n }\n }\n }\n }\n\n /**\n * Recursively discover all IS-A descendants and build a tree structure.\n * Root-level children appear as top-level cards; grandchildren nest inside.\n */\n private async DiscoverDescendants(): Promise<void> {\n if (!this.Record) return;\n\n const descendants = await DiscoverISADescendants(this.Record, this.ProviderToUse);\n const tree = BuildDescendantTree(descendants);\n this.RelatedItems.push(...tree);\n }\n\n /** Relay navigation events from child cards */\n OnCardNavigate(event: EntityHierarchyNavigationEvent): void {\n this.Navigate.emit(event);\n }\n}\n","<!-- ISA Related Panel: side panel container for all related IS-A entity cards -->\n@if (HasItems && !EditMode) {\n <div class=\"mj-isa-panel\" [class.mj-isa-panel--collapsed]=\"Collapsed\">\n\n <!-- Collapsed state: icon-only strip -->\n @if (Collapsed) {\n <div class=\"mj-isa-panel__collapsed-strip\">\n @for (item of RelatedItems; track item.EntityName) {\n <div class=\"mj-isa-panel__collapsed-icon\" [title]=\"item.EntityName\">\n <i class=\"fa-solid fa-link\"></i>\n </div>\n }\n </div>\n } @else {\n <!-- Expanded state: full card list -->\n <div class=\"mj-isa-panel__cards\">\n @for (item of RelatedItems; track item.EntityName) {\n <mj-isa-related-card\n [EntityName]=\"item.EntityName\"\n [PrimaryKey]=\"SharedPrimaryKey\"\n [CurrentRecordName]=\"CurrentRecordName\"\n [Relationship]=\"item.Relationship\"\n [Depth]=\"item.Depth\"\n [Children]=\"item.Children\"\n (Navigate)=\"OnCardNavigate($event)\">\n </mj-isa-related-card>\n }\n </div>\n }\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isa-related-panel.component.js","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-panel.component.ts","../../../src/lib/isa-related-panel/isa-related-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EACL,iBAAiB,EAC/D,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,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AAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;qRA3HU,0BAA0B,yBAA1B,0BAA0B;6DAA1B,0BAA0B;YC3CvC,4FAA6B;;YAA7B,wDA6BC;;;iFDcY,0BAA0B;cARtC,SAAS;6BACI,KAAK,YACP,sBAAsB,mBACf,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;kBAUpC,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,MAAM;;kFAfI,0BAA0B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n OnChanges, OnInit, OnDestroy, SimpleChanges, ViewEncapsulation\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { BaseEntity, EntityInfo, CompositeKey } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { FormNavigationEvent, EntityHierarchyNavigationEvent } from '../types/navigation-events';\nimport { DiscoverISADescendants, BuildDescendantTree, IsaRelatedItem } from './isa-hierarchy-utils';\nimport { FormRecordRefreshCoordinator } from '../form-record-refresh.coordinator';\n\n/**\n * Container panel that discovers and displays IS-A related entity records\n * (siblings and children) for the current form's record.\n *\n * **Placement**: Sits to the right of the main form panels inside\n * `<mj-record-form-container>`. Hidden when in edit mode or when\n * no related IS-A records exist.\n *\n * **Data flow**:\n * - Receives the current `Record` (BaseEntity) as input\n * - Inspects `EntityInfo.ParentEntityInfo` and `ISAChildren` to discover related records\n * - Builds a tree structure for nested sub-card rendering\n * - Renders an `<mj-isa-related-card>` for each root-level related entity\n * (grandchildren render as nested sub-cards inside their parent card)\n *\n * @example\n * ```html\n * <mj-isa-related-panel\n * [Record]=\"record\"\n * (Navigate)=\"OnNavigate($event)\">\n * </mj-isa-related-panel>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-isa-related-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './isa-related-panel.component.html',\n styleUrls: ['./isa-related-panel.component.css']\n})\nexport class MjIsaRelatedPanelComponent extends BaseAngularComponent implements OnChanges, OnInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private recordRefresh = inject(FormRecordRefreshCoordinator, { optional: true });\n private destroy$ = new Subject<void>();\n\n /** The entity record currently displayed in the form */\n @Input() Record: BaseEntity | null = null;\n\n /** Whether the form is in edit mode (panel hides during edit) */\n @Input() EditMode = false;\n\n /** Whether the panel is collapsed (icon-only strip in full-width mode) */\n @Input() Collapsed = false;\n\n /** Emitted for navigation to a related record */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Root-level related IS-A entities to display cards for (children nested inside) */\n RelatedItems: IsaRelatedItem[] = [];\n\n /** Whether there are any related IS-A items to show */\n get HasItems(): boolean {\n return this.RelatedItems.length > 0;\n }\n\n /** The current record's display name (to suppress in child cards when identical) */\n get CurrentRecordName(): string {\n if (!this.Record) return '';\n const name = this.Record.GetRecordName();\n return name ? String(name) : '';\n }\n\n /** The shared primary key for all IS-A related records */\n get SharedPrimaryKey(): CompositeKey | null {\n return this.Record?.PrimaryKey ?? null;\n }\n\n ngOnInit(): void {\n this.recordRefresh?.Refreshed$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n void this.DiscoverRelatedItems();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['Record']) {\n this.DiscoverRelatedItems();\n }\n }\n\n /**\n * Discover IS-A related entities by examining the current record's\n * entity hierarchy. Finds siblings (other children of the same parent)\n * and all descendants (children, grandchildren, etc.) as a tree.\n */\n private async DiscoverRelatedItems(): Promise<void> {\n this.RelatedItems = [];\n\n if (!this.Record) return;\n\n const entityInfo = this.Record.EntityInfo;\n if (!entityInfo) return;\n\n // Case 1: Current entity is a child type — find siblings via parent\n if (entityInfo.IsChildType && entityInfo.ParentEntityInfo) {\n this.DiscoverSiblingsFromParent(entityInfo);\n }\n\n // Case 2: Current entity is a parent type — discover all descendants as tree\n if (entityInfo.IsParentType) {\n await this.DiscoverDescendants();\n }\n\n this.cdr.markForCheck();\n }\n\n /**\n * When viewing a child entity (e.g., Member), find sibling entities\n * (e.g., Speaker) that also have records with the same parent PK.\n * Uses the parent's ISAChildren if the parent uses overlapping subtypes.\n */\n private DiscoverSiblingsFromParent(entityInfo: EntityInfo): void {\n const parent = this.Record?.ISAParent;\n if (!parent) return;\n\n const parentInfo = entityInfo.ParentEntityInfo!;\n\n if (parentInfo.AllowMultipleSubtypes) {\n const children = parent.ISAChildren;\n if (children) {\n for (const child of children) {\n if (child.entityName !== entityInfo.Name) {\n this.RelatedItems.push({\n EntityName: child.entityName,\n Relationship: 'sibling',\n Depth: 0,\n Children: []\n });\n }\n }\n }\n }\n }\n\n /**\n * Recursively discover all IS-A descendants and build a tree structure.\n * Root-level children appear as top-level cards; grandchildren nest inside.\n */\n private async DiscoverDescendants(): Promise<void> {\n if (!this.Record) return;\n\n const descendants = await DiscoverISADescendants(this.Record, this.ProviderToUse);\n const tree = BuildDescendantTree(descendants);\n this.RelatedItems.push(...tree);\n }\n\n /** Relay navigation events from child cards */\n OnCardNavigate(event: EntityHierarchyNavigationEvent): void {\n this.Navigate.emit(event);\n }\n}\n","<!-- ISA Related Panel: side panel container for all related IS-A entity cards -->\n@if (HasItems && !EditMode) {\n <div class=\"mj-isa-panel\" [class.mj-isa-panel--collapsed]=\"Collapsed\">\n\n <!-- Collapsed state: icon-only strip -->\n @if (Collapsed) {\n <div class=\"mj-isa-panel__collapsed-strip\">\n @for (item of RelatedItems; track item.EntityName) {\n <div class=\"mj-isa-panel__collapsed-icon\" [title]=\"item.EntityName\">\n <i class=\"fa-solid fa-link\"></i>\n </div>\n }\n </div>\n } @else {\n <!-- Expanded state: full card list -->\n <div class=\"mj-isa-panel__cards\">\n @for (item of RelatedItems; track item.EntityName) {\n <mj-isa-related-card\n [EntityName]=\"item.EntityName\"\n [PrimaryKey]=\"SharedPrimaryKey\"\n [CurrentRecordName]=\"CurrentRecordName\"\n [Relationship]=\"item.Relationship\"\n [Depth]=\"item.Depth\"\n [Children]=\"item.Children\"\n (Navigate)=\"OnCardNavigate($event)\">\n </mj-isa-related-card>\n }\n </div>\n }\n </div>\n}\n"]}
|
|
@@ -38,6 +38,7 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
38
38
|
private cdr;
|
|
39
39
|
private elementRef;
|
|
40
40
|
private ngZone;
|
|
41
|
+
private chrome;
|
|
41
42
|
/** Unique key for state persistence */
|
|
42
43
|
SectionKey: string;
|
|
43
44
|
/** Display name shown in the panel header */
|
|
@@ -95,22 +96,30 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
95
96
|
DisplayName: string;
|
|
96
97
|
FieldNames: string;
|
|
97
98
|
IsVisible: boolean;
|
|
99
|
+
get HostSectionKey(): string;
|
|
100
|
+
get HostVariant(): string;
|
|
101
|
+
get HostIcon(): string;
|
|
98
102
|
get HostClass(): string;
|
|
99
103
|
get CssOrder(): number;
|
|
100
104
|
IsDragging: boolean;
|
|
101
105
|
IsDragOver: boolean;
|
|
102
106
|
/** Signals re-subscription when ContentChildren change */
|
|
103
107
|
private fieldNavReset$;
|
|
108
|
+
private destroy$;
|
|
104
109
|
private panelContentRef?;
|
|
105
110
|
private resizeObserver?;
|
|
106
111
|
private resizeDebounceTimer?;
|
|
107
112
|
/** ResizeObserver fires once synchronously on observe(); that initial measurement is not a user resize. */
|
|
108
113
|
private resizeObserverPrimed;
|
|
109
114
|
/**
|
|
110
|
-
* Persisted
|
|
111
|
-
*
|
|
115
|
+
* Persisted accordion resize height for related-entity panels.
|
|
116
|
+
* Related grids size themselves from row count (accordion and left-nav),
|
|
117
|
+
* so a pinned pixel height — especially 0 / toolbar-only measured while
|
|
118
|
+
* collapsed — would clip the grid. Only honor a user drag that is at
|
|
119
|
+
* least the CSS min-height.
|
|
112
120
|
*/
|
|
113
121
|
get PanelContentHeight(): number | undefined;
|
|
122
|
+
private hidesAccordionChrome;
|
|
114
123
|
/** Whether drag-to-reorder is allowed (from FormContext) */
|
|
115
124
|
get ReorderAllowed(): boolean;
|
|
116
125
|
/**
|
|
@@ -140,6 +149,19 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
140
149
|
OnDragStart(event: DragEvent): void;
|
|
141
150
|
OnDragEnd(): void;
|
|
142
151
|
private ReorderSections;
|
|
152
|
+
/**
|
|
153
|
+
* Field panels whose only children are empty/hidden (e.g. leftover
|
|
154
|
+
* `Details` with just unused geo columns) should not take space.
|
|
155
|
+
* Custom widgets and related grids have no FieldComponents — keep them.
|
|
156
|
+
*/
|
|
157
|
+
/**
|
|
158
|
+
* Whether this panel matches a section-search term by title or field
|
|
159
|
+
* name. Ignores chrome hide/show — the rail uses this to decide if the
|
|
160
|
+
* *group* matches, even when another section is currently selected.
|
|
161
|
+
*/
|
|
162
|
+
MatchesSearch(term: string): boolean;
|
|
163
|
+
private hasRenderableContent;
|
|
164
|
+
private isHiddenByChrome;
|
|
143
165
|
private UpdateFieldNames;
|
|
144
166
|
/**
|
|
145
167
|
* Subscribes to Navigate events from all child form-field components
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAC3D,SAAS,EAE3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;;
|
|
1
|
+
{"version":3,"file":"collapsible-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAC3D,SAAS,EAE3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAQa,2BAA4B,YAAW,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS;IAC/G,OAAO,CAAC,GAAG,CAA6B;IACxC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,MAAM,CAAqD;IAEnE,uCAAuC;IAC9B,UAAU,SAAM;IAEzB,6CAA6C;IACpC,WAAW,SAAM;IAE1B,mDAAmD;IAC1C,IAAI,SAAkB;IAE/B;;;OAGG;IACM,IAAI,EAAE,OAAO,CAAC;IAEvB,0DAA0D;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC;IAEnC,2BAA2B;IAClB,OAAO,EAAE,YAAY,CAAa;IAE3C,kDAAkD;IACzC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,4DAA4D;IACnD,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;IAE9C;;;OAGG;IACM,mBAAmB,SAAM;IAElC;;;OAGG;IACM,yBAAyB,CAAC,EAAE,YAAY,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