@memberjunction/ng-base-forms 4.3.1 → 5.0.0
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/lib/__tests__/base-forms.test.js +52 -52
- package/dist/lib/__tests__/base-forms.test.js.map +1 -1
- package/dist/lib/base-form-component.d.ts +2 -2
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +1 -1
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +2 -0
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +57 -29
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-hierarchy-utils.d.ts +62 -0
- package/dist/lib/isa-related-panel/isa-hierarchy-utils.d.ts.map +1 -0
- package/dist/lib/isa-related-panel/isa-hierarchy-utils.js +135 -0
- package/dist/lib/isa-related-panel/isa-hierarchy-utils.js.map +1 -0
- package/dist/lib/isa-related-panel/isa-related-card.component.d.ts +69 -0
- package/dist/lib/isa-related-panel/isa-related-card.component.d.ts.map +1 -0
- package/dist/lib/isa-related-panel/isa-related-card.component.js +347 -0
- package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -0
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts +70 -0
- package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts.map +1 -0
- package/dist/lib/isa-related-panel/isa-related-panel.component.js +190 -0
- package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +38 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +249 -100
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/module.d.ts +8 -6
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +14 -4
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { DiscoverISADescendants, BuildDescendantTree } from './isa-hierarchy-utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./isa-related-card.component";
|
|
5
|
+
const _forTrack0 = ($index, $item) => $item.EntityName;
|
|
6
|
+
function MjIsaRelatedPanelComponent_Conditional_0_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
8
|
+
i0.ɵɵelement(1, "i", 5);
|
|
9
|
+
i0.ɵɵelementEnd();
|
|
10
|
+
} if (rf & 2) {
|
|
11
|
+
const item_r1 = ctx.$implicit;
|
|
12
|
+
i0.ɵɵproperty("title", item_r1.EntityName);
|
|
13
|
+
} }
|
|
14
|
+
function MjIsaRelatedPanelComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
16
|
+
i0.ɵɵrepeaterCreate(1, MjIsaRelatedPanelComponent_Conditional_0_Conditional_1_For_2_Template, 2, 1, "div", 4, _forTrack0);
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
} if (rf & 2) {
|
|
19
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
20
|
+
i0.ɵɵadvance();
|
|
21
|
+
i0.ɵɵrepeater(ctx_r1.RelatedItems);
|
|
22
|
+
} }
|
|
23
|
+
function MjIsaRelatedPanelComponent_Conditional_0_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
25
|
+
i0.ɵɵelementStart(0, "mj-isa-related-card", 7);
|
|
26
|
+
i0.ɵɵlistener("Navigate", function MjIsaRelatedPanelComponent_Conditional_0_Conditional_2_For_2_Template_mj_isa_related_card_Navigate_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnCardNavigate($event)); });
|
|
27
|
+
i0.ɵɵelementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const item_r4 = ctx.$implicit;
|
|
30
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
31
|
+
i0.ɵɵproperty("EntityName", item_r4.EntityName)("PrimaryKey", ctx_r1.SharedPrimaryKey)("CurrentRecordName", ctx_r1.CurrentRecordName)("Relationship", item_r4.Relationship)("Depth", item_r4.Depth)("Children", item_r4.Children);
|
|
32
|
+
} }
|
|
33
|
+
function MjIsaRelatedPanelComponent_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
35
|
+
i0.ɵɵrepeaterCreate(1, MjIsaRelatedPanelComponent_Conditional_0_Conditional_2_For_2_Template, 1, 6, "mj-isa-related-card", 6, _forTrack0);
|
|
36
|
+
i0.ɵɵelementEnd();
|
|
37
|
+
} if (rf & 2) {
|
|
38
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
39
|
+
i0.ɵɵadvance();
|
|
40
|
+
i0.ɵɵrepeater(ctx_r1.RelatedItems);
|
|
41
|
+
} }
|
|
42
|
+
function MjIsaRelatedPanelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
44
|
+
i0.ɵɵconditionalCreate(1, MjIsaRelatedPanelComponent_Conditional_0_Conditional_1_Template, 3, 0, "div", 2)(2, MjIsaRelatedPanelComponent_Conditional_0_Conditional_2_Template, 3, 0, "div", 3);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
48
|
+
i0.ɵɵclassProp("mj-isa-panel--collapsed", ctx_r1.Collapsed);
|
|
49
|
+
i0.ɵɵadvance();
|
|
50
|
+
i0.ɵɵconditional(ctx_r1.Collapsed ? 1 : 2);
|
|
51
|
+
} }
|
|
52
|
+
/**
|
|
53
|
+
* Container panel that discovers and displays IS-A related entity records
|
|
54
|
+
* (siblings and children) for the current form's record.
|
|
55
|
+
*
|
|
56
|
+
* **Placement**: Sits to the right of the main form panels inside
|
|
57
|
+
* `<mj-record-form-container>`. Hidden when in edit mode or when
|
|
58
|
+
* no related IS-A records exist.
|
|
59
|
+
*
|
|
60
|
+
* **Data flow**:
|
|
61
|
+
* - Receives the current `Record` (BaseEntity) as input
|
|
62
|
+
* - Inspects `EntityInfo.ParentEntityInfo` and `ISAChildren` to discover related records
|
|
63
|
+
* - Builds a tree structure for nested sub-card rendering
|
|
64
|
+
* - Renders an `<mj-isa-related-card>` for each root-level related entity
|
|
65
|
+
* (grandchildren render as nested sub-cards inside their parent card)
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```html
|
|
69
|
+
* <mj-isa-related-panel
|
|
70
|
+
* [Record]="record"
|
|
71
|
+
* (Navigate)="OnNavigate($event)">
|
|
72
|
+
* </mj-isa-related-panel>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export class MjIsaRelatedPanelComponent {
|
|
76
|
+
cdr = inject(ChangeDetectorRef);
|
|
77
|
+
/** The entity record currently displayed in the form */
|
|
78
|
+
Record = null;
|
|
79
|
+
/** Whether the form is in edit mode (panel hides during edit) */
|
|
80
|
+
EditMode = false;
|
|
81
|
+
/** Whether the panel is collapsed (icon-only strip in full-width mode) */
|
|
82
|
+
Collapsed = false;
|
|
83
|
+
/** Emitted for navigation to a related record */
|
|
84
|
+
Navigate = new EventEmitter();
|
|
85
|
+
/** Root-level related IS-A entities to display cards for (children nested inside) */
|
|
86
|
+
RelatedItems = [];
|
|
87
|
+
/** Whether there are any related IS-A items to show */
|
|
88
|
+
get HasItems() {
|
|
89
|
+
return this.RelatedItems.length > 0;
|
|
90
|
+
}
|
|
91
|
+
/** The current record's display name (to suppress in child cards when identical) */
|
|
92
|
+
get CurrentRecordName() {
|
|
93
|
+
if (!this.Record)
|
|
94
|
+
return '';
|
|
95
|
+
const name = this.Record.GetRecordName();
|
|
96
|
+
return name ? String(name) : '';
|
|
97
|
+
}
|
|
98
|
+
/** The shared primary key for all IS-A related records */
|
|
99
|
+
get SharedPrimaryKey() {
|
|
100
|
+
return this.Record?.PrimaryKey ?? null;
|
|
101
|
+
}
|
|
102
|
+
ngOnChanges(changes) {
|
|
103
|
+
if (changes['Record']) {
|
|
104
|
+
this.DiscoverRelatedItems();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Discover IS-A related entities by examining the current record's
|
|
109
|
+
* entity hierarchy. Finds siblings (other children of the same parent)
|
|
110
|
+
* and all descendants (children, grandchildren, etc.) as a tree.
|
|
111
|
+
*/
|
|
112
|
+
async DiscoverRelatedItems() {
|
|
113
|
+
this.RelatedItems = [];
|
|
114
|
+
if (!this.Record)
|
|
115
|
+
return;
|
|
116
|
+
const entityInfo = this.Record.EntityInfo;
|
|
117
|
+
if (!entityInfo)
|
|
118
|
+
return;
|
|
119
|
+
// Case 1: Current entity is a child type — find siblings via parent
|
|
120
|
+
if (entityInfo.IsChildType && entityInfo.ParentEntityInfo) {
|
|
121
|
+
this.DiscoverSiblingsFromParent(entityInfo);
|
|
122
|
+
}
|
|
123
|
+
// Case 2: Current entity is a parent type — discover all descendants as tree
|
|
124
|
+
if (entityInfo.IsParentType) {
|
|
125
|
+
await this.DiscoverDescendants();
|
|
126
|
+
}
|
|
127
|
+
this.cdr.markForCheck();
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* When viewing a child entity (e.g., Member), find sibling entities
|
|
131
|
+
* (e.g., Speaker) that also have records with the same parent PK.
|
|
132
|
+
* Uses the parent's ISAChildren if the parent uses overlapping subtypes.
|
|
133
|
+
*/
|
|
134
|
+
DiscoverSiblingsFromParent(entityInfo) {
|
|
135
|
+
const parent = this.Record?.ISAParent;
|
|
136
|
+
if (!parent)
|
|
137
|
+
return;
|
|
138
|
+
const parentInfo = entityInfo.ParentEntityInfo;
|
|
139
|
+
if (parentInfo.AllowMultipleSubtypes) {
|
|
140
|
+
const children = parent.ISAChildren;
|
|
141
|
+
if (children) {
|
|
142
|
+
for (const child of children) {
|
|
143
|
+
if (child.entityName !== entityInfo.Name) {
|
|
144
|
+
this.RelatedItems.push({
|
|
145
|
+
EntityName: child.entityName,
|
|
146
|
+
Relationship: 'sibling',
|
|
147
|
+
Depth: 0,
|
|
148
|
+
Children: []
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Recursively discover all IS-A descendants and build a tree structure.
|
|
157
|
+
* Root-level children appear as top-level cards; grandchildren nest inside.
|
|
158
|
+
*/
|
|
159
|
+
async DiscoverDescendants() {
|
|
160
|
+
if (!this.Record)
|
|
161
|
+
return;
|
|
162
|
+
const descendants = await DiscoverISADescendants(this.Record);
|
|
163
|
+
const tree = BuildDescendantTree(descendants);
|
|
164
|
+
this.RelatedItems.push(...tree);
|
|
165
|
+
}
|
|
166
|
+
/** Relay navigation events from child cards */
|
|
167
|
+
OnCardNavigate(event) {
|
|
168
|
+
this.Navigate.emit(event);
|
|
169
|
+
}
|
|
170
|
+
static ɵfac = function MjIsaRelatedPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MjIsaRelatedPanelComponent)(); };
|
|
171
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjIsaRelatedPanelComponent, selectors: [["mj-isa-related-panel"]], inputs: { Record: "Record", EditMode: "EditMode", Collapsed: "Collapsed" }, outputs: { Navigate: "Navigate" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[1, "mj-isa-panel", 3, "mj-isa-panel--collapsed"], [1, "mj-isa-panel"], [1, "mj-isa-panel__collapsed-strip"], [1, "mj-isa-panel__cards"], [1, "mj-isa-panel__collapsed-icon", 3, "title"], [1, "fa-solid", "fa-link"], [3, "EntityName", "PrimaryKey", "CurrentRecordName", "Relationship", "Depth", "Children"], [3, "Navigate", "EntityName", "PrimaryKey", "CurrentRecordName", "Relationship", "Depth", "Children"]], template: function MjIsaRelatedPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
172
|
+
i0.ɵɵconditionalCreate(0, MjIsaRelatedPanelComponent_Conditional_0_Template, 3, 3, "div", 0);
|
|
173
|
+
} if (rf & 2) {
|
|
174
|
+
i0.ɵɵconditional(ctx.HasItems && !ctx.EditMode ? 0 : -1);
|
|
175
|
+
} }, dependencies: [i1.MjIsaRelatedCardComponent], styles: ["/* ============================================\n ISA RELATED PANEL\n Container for IS-A related entity cards\n ============================================ */\n\n.mj-isa-panel {\n width: 280px;\n flex-shrink: 0;\n position: sticky;\n top: 24px;\n align-self: flex-start;\n}\n\n/* Cards container \u2014 no gap between cards per design */\n.mj-isa-panel__cards {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n/* Override card border-radius to butt up against each other */\n.mj-isa-panel__cards mj-isa-related-card:not(:first-child) .mj-isa-card {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n.mj-isa-panel__cards mj-isa-related-card:not(:last-child) .mj-isa-card {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: 1px solid #f0f0f0;\n box-shadow: none;\n}\n\n/* ---- Collapsed Strip ---- */\n.mj-isa-panel--collapsed {\n width: 40px;\n}\n\n.mj-isa-panel__collapsed-strip {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 8px 0;\n background: #fff;\n border-radius: 10px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n}\n\n.mj-isa-panel__collapsed-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: #f5f6fa;\n color: #667eea;\n font-size: 12px;\n cursor: default;\n}\n\n/* ---- Responsive ---- */\n@media (max-width: 1024px) {\n .mj-isa-panel {\n display: none;\n }\n}\n"], encapsulation: 2, changeDetection: 0 });
|
|
176
|
+
}
|
|
177
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjIsaRelatedPanelComponent, [{
|
|
178
|
+
type: Component,
|
|
179
|
+
args: [{ standalone: false, selector: 'mj-isa-related-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- 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", styles: ["/* ============================================\n ISA RELATED PANEL\n Container for IS-A related entity cards\n ============================================ */\n\n.mj-isa-panel {\n width: 280px;\n flex-shrink: 0;\n position: sticky;\n top: 24px;\n align-self: flex-start;\n}\n\n/* Cards container \u2014 no gap between cards per design */\n.mj-isa-panel__cards {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n/* Override card border-radius to butt up against each other */\n.mj-isa-panel__cards mj-isa-related-card:not(:first-child) .mj-isa-card {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n.mj-isa-panel__cards mj-isa-related-card:not(:last-child) .mj-isa-card {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: 1px solid #f0f0f0;\n box-shadow: none;\n}\n\n/* ---- Collapsed Strip ---- */\n.mj-isa-panel--collapsed {\n width: 40px;\n}\n\n.mj-isa-panel__collapsed-strip {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 8px 0;\n background: #fff;\n border-radius: 10px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n}\n\n.mj-isa-panel__collapsed-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: #f5f6fa;\n color: #667eea;\n font-size: 12px;\n cursor: default;\n}\n\n/* ---- Responsive ---- */\n@media (max-width: 1024px) {\n .mj-isa-panel {\n display: none;\n }\n}\n"] }]
|
|
180
|
+
}], null, { Record: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}], EditMode: [{
|
|
183
|
+
type: Input
|
|
184
|
+
}], Collapsed: [{
|
|
185
|
+
type: Input
|
|
186
|
+
}], Navigate: [{
|
|
187
|
+
type: Output
|
|
188
|
+
}] }); })();
|
|
189
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjIsaRelatedPanelComponent, { className: "MjIsaRelatedPanelComponent", filePath: "src/lib/isa-related-panel/isa-related-panel.component.ts", lineNumber: 41 }); })();
|
|
190
|
+
//# sourceMappingURL=isa-related-panel.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isa-related-panel.component.js","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-panel.component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
3
|
import { FormToolbarConfig } from '../types/toolbar-config';
|
|
4
4
|
import { FormNavigationEvent } from '../types/navigation-events';
|
|
5
|
+
import { IsaRelatedItem } from '../isa-related-panel/isa-hierarchy-utils';
|
|
5
6
|
import { FormWidthMode } from '../types/form-types';
|
|
6
7
|
import { BeforeSaveEventArgs, BeforeDeleteEventArgs, BeforeCancelEventArgs, BeforeHistoryViewEventArgs, BeforeListManagementEventArgs, CustomToolbarButtonClickEventArgs, CustomToolbarButton } from '../types/form-events';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
@@ -111,6 +112,10 @@ export declare class MjFormToolbarComponent implements DoCheck {
|
|
|
111
112
|
ManageSectionsRequested: EventEmitter<void>;
|
|
112
113
|
ShowDeleteDialog: boolean;
|
|
113
114
|
ShowDiscardDialog: boolean;
|
|
115
|
+
/** Computed descendant tree for breadcrumb display */
|
|
116
|
+
DescendantTree: IsaRelatedItem[];
|
|
117
|
+
private _lastRecordForChains;
|
|
118
|
+
private _chainsLoading;
|
|
114
119
|
ngDoCheck(): void;
|
|
115
120
|
/**
|
|
116
121
|
* Sync toolbar state from the legacy form reference.
|
|
@@ -132,16 +137,43 @@ export declare class MjFormToolbarComponent implements DoCheck {
|
|
|
132
137
|
* Walks Record.ISAChild → ISAChild.ISAChild → ... collecting each child entity.
|
|
133
138
|
* This differs from ChildEntities (metadata) because it represents the SPECIFIC
|
|
134
139
|
* child type that exists for THIS record, not all possible subtypes.
|
|
140
|
+
*
|
|
141
|
+
* For overlapping subtype parents, this is empty (ISAChild returns null) —
|
|
142
|
+
* use OverlappingChildren instead.
|
|
135
143
|
*/
|
|
136
144
|
get ChildChain(): BaseEntity[];
|
|
137
145
|
/** Whether this record has a loaded IS-A child entity */
|
|
138
146
|
get HasLoadedChild(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* For overlapping subtype parents (AllowMultipleSubtypes = true), returns the
|
|
149
|
+
* list of child entity type names that have records for this PK.
|
|
150
|
+
* Populated by InitializeChildEntity() during record load.
|
|
151
|
+
*/
|
|
152
|
+
get OverlappingChildren(): {
|
|
153
|
+
entityName: string;
|
|
154
|
+
}[];
|
|
155
|
+
/** Whether the current record has overlapping child types discovered */
|
|
156
|
+
get HasOverlappingChildren(): boolean;
|
|
139
157
|
/** Whether this entity is part of any IS-A hierarchy (parent or child side) */
|
|
140
158
|
get IsInHierarchy(): boolean;
|
|
141
159
|
/** Display-friendly names of dirty fields for the edit banner */
|
|
142
160
|
get DirtyFieldDisplayNames(): string[];
|
|
143
161
|
/** Display name for the edit banner */
|
|
144
162
|
get RecordDisplayName(): string;
|
|
163
|
+
/**
|
|
164
|
+
* Check if descendant chains need recomputation (called from DoCheck).
|
|
165
|
+
* Only triggers async computation when the record identity changes.
|
|
166
|
+
*/
|
|
167
|
+
private CheckDescendantChains;
|
|
168
|
+
/**
|
|
169
|
+
* Asynchronously discover all IS-A descendants and convert to chains
|
|
170
|
+
* for breadcrumb display. Each chain is a root-to-leaf path of entity names.
|
|
171
|
+
*/
|
|
172
|
+
private ComputeDescendantChains;
|
|
173
|
+
/**
|
|
174
|
+
* Navigate to a descendant entity record in the IS-A hierarchy.
|
|
175
|
+
*/
|
|
176
|
+
OnDescendantBadgeClick(entityName: string, event: MouseEvent): void;
|
|
145
177
|
OnEdit(): void;
|
|
146
178
|
OnSave(): void;
|
|
147
179
|
OnCancel(): void;
|
|
@@ -174,6 +206,12 @@ export declare class MjFormToolbarComponent implements DoCheck {
|
|
|
174
206
|
* The child shares the same primary key as the parent (IS-A inheritance).
|
|
175
207
|
*/
|
|
176
208
|
OnChildBadgeClick(childEntity: BaseEntity, event: MouseEvent): void;
|
|
209
|
+
/**
|
|
210
|
+
* Navigate to an overlapping child entity record.
|
|
211
|
+
* Used when the parent has AllowMultipleSubtypes = true and multiple child
|
|
212
|
+
* types coexist for the same PK.
|
|
213
|
+
*/
|
|
214
|
+
OnOverlappingChildClick(childEntityName: string, event: MouseEvent): void;
|
|
177
215
|
OnFilterInput(event: Event): void;
|
|
178
216
|
OnClearFilter(): void;
|
|
179
217
|
OnExpandAll(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-toolbar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/toolbar/form-toolbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAA2B,WAAW,EAA6B,OAAO,EAAE,MAAM,eAAe,CAAC;AACjJ,OAAO,EAAE,UAAU,EAAE,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAOa,sBAAuB,YAAW,OAAO;IACpD,OAAO,CAAC,GAAG,CAA6B;IAIxC,OAAO,CAAC,QAAQ,CAAU;IAE1B;;;;OAIG;IACH,IAAa,IAAI,CAAC,KAAK,EAAE,OAAO,EAA4B;IAC5D,IAAI,IAAI,IAAI,OAAO,CAA0B;IAE7C,0DAA0D;IAC1D,IAAmB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAwB;IAIzE,+CAA+C;IACtC,MAAM,EAAG,UAAU,CAAC;IAE7B,uCAAuC;IAC9B,QAAQ,UAAS;IAE1B,mDAAmD;IAC1C,WAAW,UAAS;IAE7B,qDAAqD;IAC5C,aAAa,UAAS;IAE/B,iDAAiD;IACxC,UAAU,UAAS;IAE5B,yEAAyE;IAChE,gBAAgB,UAAS;IAElC,6CAA6C;IACpC,OAAO,UAAS;IAEzB,oDAAoD;IAC3C,eAAe,EAAE,MAAM,EAAE,CAAM;IAExC,4CAA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