@memberjunction/ng-base-forms 5.23.0 → 5.24.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/__tests__/tag-count-badge.test.d.ts +2 -0
- package/dist/__tests__/tag-count-badge.test.d.ts.map +1 -0
- package/dist/__tests__/tag-count-badge.test.js +70 -0
- package/dist/__tests__/tag-count-badge.test.js.map +1 -0
- package/dist/lib/base-form-component.d.ts +11 -2
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +18 -1
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +43 -0
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +196 -24
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts +10 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +208 -147
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +2 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +2 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +2 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -3
- package/dist/module.js.map +1 -1
- package/package.json +10 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-count-badge.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/tag-count-badge.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for badge count loading logic in MjRecordFormContainerComponent.
|
|
3
|
+
*
|
|
4
|
+
* We test the pure data logic without Angular TestBed by extracting
|
|
5
|
+
* the badge count update patterns used in the container component.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, it, expect } from 'vitest';
|
|
8
|
+
/**
|
|
9
|
+
* Simulates the TagCount update pattern from LoadTagCount.
|
|
10
|
+
* The real method queries RunView; here we test the state update logic.
|
|
11
|
+
*/
|
|
12
|
+
function updateTagCount(currentCount, queryResults) {
|
|
13
|
+
return queryResults.length;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Simulates the VersionCount update pattern from LoadVersionCount.
|
|
17
|
+
* The real method queries RunView; here we test the state update logic.
|
|
18
|
+
*/
|
|
19
|
+
function updateVersionCount(trackRecordChanges, queryResults) {
|
|
20
|
+
if (!trackRecordChanges)
|
|
21
|
+
return 0;
|
|
22
|
+
return queryResults.length;
|
|
23
|
+
}
|
|
24
|
+
describe('TagCount badge', () => {
|
|
25
|
+
it('should set TagCount from query result length', () => {
|
|
26
|
+
const results = [{ ID: 'a' }, { ID: 'b' }, { ID: 'c' }];
|
|
27
|
+
expect(updateTagCount(0, results)).toBe(3);
|
|
28
|
+
});
|
|
29
|
+
it('should set TagCount to 0 when no tags exist', () => {
|
|
30
|
+
expect(updateTagCount(5, [])).toBe(0);
|
|
31
|
+
});
|
|
32
|
+
it('should update TagCount when tags change', () => {
|
|
33
|
+
// Initially 2 tags
|
|
34
|
+
let count = updateTagCount(0, [{ ID: 'a' }, { ID: 'b' }]);
|
|
35
|
+
expect(count).toBe(2);
|
|
36
|
+
// After adding a tag
|
|
37
|
+
count = updateTagCount(count, [{ ID: 'a' }, { ID: 'b' }, { ID: 'c' }]);
|
|
38
|
+
expect(count).toBe(3);
|
|
39
|
+
// After removing all tags
|
|
40
|
+
count = updateTagCount(count, []);
|
|
41
|
+
expect(count).toBe(0);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
describe('VersionCount badge', () => {
|
|
45
|
+
it('should set VersionCount from query result length', () => {
|
|
46
|
+
const results = [{ ID: 'v1' }, { ID: 'v2' }];
|
|
47
|
+
expect(updateVersionCount(true, results)).toBe(2);
|
|
48
|
+
});
|
|
49
|
+
it('should return 0 when trackRecordChanges is false', () => {
|
|
50
|
+
const results = [{ ID: 'v1' }, { ID: 'v2' }];
|
|
51
|
+
expect(updateVersionCount(false, results)).toBe(0);
|
|
52
|
+
});
|
|
53
|
+
it('should set VersionCount to 0 when no changes exist', () => {
|
|
54
|
+
expect(updateVersionCount(true, [])).toBe(0);
|
|
55
|
+
});
|
|
56
|
+
it('should reflect new versions after save', () => {
|
|
57
|
+
// Initial: 3 versions
|
|
58
|
+
let count = updateVersionCount(true, [{ ID: 'v1' }, { ID: 'v2' }, { ID: 'v3' }]);
|
|
59
|
+
expect(count).toBe(3);
|
|
60
|
+
// After a save creates a new version
|
|
61
|
+
count = updateVersionCount(true, [
|
|
62
|
+
{ ID: 'v1' },
|
|
63
|
+
{ ID: 'v2' },
|
|
64
|
+
{ ID: 'v3' },
|
|
65
|
+
{ ID: 'v4' },
|
|
66
|
+
]);
|
|
67
|
+
expect(count).toBe(4);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=tag-count-badge.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-count-badge.test.js","sourceRoot":"","sources":["../../src/__tests__/tag-count-badge.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C;;;GAGG;AACH,SAAS,cAAc,CAAC,YAAoB,EAAE,YAA8B;IAC1E,OAAO,YAAY,CAAC,MAAM,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CACzB,kBAA2B,EAC3B,YAA8B;IAE9B,IAAI,CAAC,kBAAkB;QAAE,OAAO,CAAC,CAAC;IAClC,OAAO,YAAY,CAAC,MAAM,CAAC;AAC7B,CAAC;AAED,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAA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AAC,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for badge count loading logic in MjRecordFormContainerComponent.\n *\n * We test the pure data logic without Angular TestBed by extracting\n * the badge count update patterns used in the container component.\n */\nimport { describe, it, expect } from 'vitest';\n\n/**\n * Simulates the TagCount update pattern from LoadTagCount.\n * The real method queries RunView; here we test the state update logic.\n */\nfunction updateTagCount(currentCount: number, queryResults: { ID: string }[]): number {\n return queryResults.length;\n}\n\n/**\n * Simulates the VersionCount update pattern from LoadVersionCount.\n * The real method queries RunView; here we test the state update logic.\n */\nfunction updateVersionCount(\n trackRecordChanges: boolean,\n queryResults: { ID: string }[]\n): number {\n if (!trackRecordChanges) return 0;\n return queryResults.length;\n}\n\ndescribe('TagCount badge', () => {\n it('should set TagCount from query result length', () => {\n const results = [{ ID: 'a' }, { ID: 'b' }, { ID: 'c' }];\n expect(updateTagCount(0, results)).toBe(3);\n });\n\n it('should set TagCount to 0 when no tags exist', () => {\n expect(updateTagCount(5, [])).toBe(0);\n });\n\n it('should update TagCount when tags change', () => {\n // Initially 2 tags\n let count = updateTagCount(0, [{ ID: 'a' }, { ID: 'b' }]);\n expect(count).toBe(2);\n\n // After adding a tag\n count = updateTagCount(count, [{ ID: 'a' }, { ID: 'b' }, { ID: 'c' }]);\n expect(count).toBe(3);\n\n // After removing all tags\n count = updateTagCount(count, []);\n expect(count).toBe(0);\n });\n});\n\ndescribe('VersionCount badge', () => {\n it('should set VersionCount from query result length', () => {\n const results = [{ ID: 'v1' }, { ID: 'v2' }];\n expect(updateVersionCount(true, results)).toBe(2);\n });\n\n it('should return 0 when trackRecordChanges is false', () => {\n const results = [{ ID: 'v1' }, { ID: 'v2' }];\n expect(updateVersionCount(false, results)).toBe(0);\n });\n\n it('should set VersionCount to 0 when no changes exist', () => {\n expect(updateVersionCount(true, [])).toBe(0);\n });\n\n it('should reflect new versions after save', () => {\n // Initial: 3 versions\n let count = updateVersionCount(true, [{ ID: 'v1' }, { ID: 'v2' }, { ID: 'v3' }]);\n expect(count).toBe(3);\n\n // After a save creates a new version\n count = updateVersionCount(true, [\n { ID: 'v1' },\n { ID: 'v2' },\n { ID: 'v3' },\n { ID: 'v4' },\n ]);\n expect(count).toBe(4);\n });\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, OnInit, OnDestroy, QueryList, ElementRef, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
|
-
import { EntityInfo, ValidationResult, EntityPermissionType, EntityRelationshipInfo, EntityOrganicKeyInfo, EntityOrganicKeyRelatedEntityInfo, RunViewParams, RecordDependency } from '@memberjunction/core';
|
|
2
|
+
import { EntityInfo, ValidationResult, BaseEntity, EntityPermissionType, EntityRelationshipInfo, EntityOrganicKeyInfo, EntityOrganicKeyRelatedEntityInfo, RunViewParams, RecordDependency } from '@memberjunction/core';
|
|
3
3
|
import { FormEditingCompleteEvent, PendingRecordItem, BaseFormComponentEventCodes } from '@memberjunction/ng-base-types';
|
|
4
4
|
import { MJListEntity } from '@memberjunction/core-entities';
|
|
5
5
|
import { BaseRecordComponent } from './base-record-component';
|
|
@@ -29,6 +29,8 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
29
29
|
EditMode: boolean;
|
|
30
30
|
FavoriteInitDone: boolean;
|
|
31
31
|
isHistoryDialogOpen: boolean;
|
|
32
|
+
IsTagsPanelOpen: boolean;
|
|
33
|
+
TagCount: number;
|
|
32
34
|
showDeleteDialog: boolean;
|
|
33
35
|
showCreateDialog: boolean;
|
|
34
36
|
/**
|
|
@@ -69,6 +71,12 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
69
71
|
RecordDeleteFailed: EventEmitter<RecordDeleteFailedEvent>;
|
|
70
72
|
/** Emitted when validation fails before save */
|
|
71
73
|
ValidationFailed: EventEmitter<ValidationFailedEvent>;
|
|
74
|
+
/**
|
|
75
|
+
* Emitted once after ngOnInit completes and the record is fully initialized
|
|
76
|
+
* (favorites loaded, form state initialized). This is the safe point for
|
|
77
|
+
* the container to start loading badge counts and other record-dependent data.
|
|
78
|
+
*/
|
|
79
|
+
RecordReady: EventEmitter<BaseEntity<unknown>>;
|
|
72
80
|
/** Subscription to form state changes */
|
|
73
81
|
private formStateSubscription?;
|
|
74
82
|
collapsiblePanels: QueryList<MjCollapsiblePanelComponent>;
|
|
@@ -82,6 +90,7 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
82
90
|
StartEditMode(): void;
|
|
83
91
|
EndEditMode(): void;
|
|
84
92
|
handleHistoryDialog(): void;
|
|
93
|
+
HandleTagsPanel(): void;
|
|
85
94
|
Validate(): ValidationResult;
|
|
86
95
|
protected RaiseEvent(eventCode: BaseFormComponentEventCodes): FormEditingCompleteEvent;
|
|
87
96
|
SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean>;
|
|
@@ -211,6 +220,6 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
211
220
|
*/
|
|
212
221
|
OnListManagementRequested(): void;
|
|
213
222
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormComponent, never>;
|
|
214
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormComponent, never, never, {}, { "Navigate": "Navigate"; "Notification": "Notification"; "RecordSaved": "RecordSaved"; "RecordDeleted": "RecordDeleted"; "RecordSaveFailed": "RecordSaveFailed"; "RecordDeleteFailed": "RecordDeleteFailed"; "ValidationFailed": "ValidationFailed"; }, never, never, true, never>;
|
|
223
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormComponent, never, never, {}, { "Navigate": "Navigate"; "Notification": "Notification"; "RecordSaved": "RecordSaved"; "RecordDeleted": "RecordDeleted"; "RecordSaveFailed": "RecordSaveFailed"; "RecordDeleteFailed": "RecordDeleteFailed"; "ValidationFailed": "ValidationFailed"; "RecordReady": "RecordReady"; }, never, never, true, never>;
|
|
215
224
|
}
|
|
216
225
|
//# sourceMappingURL=base-form-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-form-component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,MAAM,EAAE,SAAS,EAClB,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAC9C,YAAY,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,UAAU,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"base-form-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-form-component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,MAAM,EAAE,SAAS,EAClB,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAC9C,YAAY,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,oBAAoB,EAC9D,sBAAsB,EAAE,oBAAoB,EAAE,iCAAiC,EACrE,aAAa,EACvB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAExD;;;;;;;;;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OzB,qBAAqB,IAAI,OAAO;IAQhC,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAUzD;;;;OAIG;IACI,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAIvD;;;;OAIG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB/C;;;OAGG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C;;;OAGG;IACI,kBAAkB,IAAI,IAAI;IAIjC;;;OAGG;IACI,yBAAyB,IAAI,IAAI;yCAr4BpB,iBAAiB;2CAAjB,iBAAiB;CA24BtC"}
|
|
@@ -28,6 +28,8 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
28
28
|
EditMode = false;
|
|
29
29
|
FavoriteInitDone = false;
|
|
30
30
|
isHistoryDialogOpen = false;
|
|
31
|
+
IsTagsPanelOpen = false;
|
|
32
|
+
TagCount = 0;
|
|
31
33
|
showDeleteDialog = false;
|
|
32
34
|
showCreateDialog = false;
|
|
33
35
|
/**
|
|
@@ -73,6 +75,12 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
73
75
|
RecordDeleteFailed = new EventEmitter();
|
|
74
76
|
/** Emitted when validation fails before save */
|
|
75
77
|
ValidationFailed = new EventEmitter();
|
|
78
|
+
/**
|
|
79
|
+
* Emitted once after ngOnInit completes and the record is fully initialized
|
|
80
|
+
* (favorites loaded, form state initialized). This is the safe point for
|
|
81
|
+
* the container to start loading badge counts and other record-dependent data.
|
|
82
|
+
*/
|
|
83
|
+
RecordReady = new EventEmitter();
|
|
76
84
|
// #endregion
|
|
77
85
|
/** Subscription to form state changes */
|
|
78
86
|
formStateSubscription;
|
|
@@ -95,6 +103,10 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
95
103
|
});
|
|
96
104
|
}
|
|
97
105
|
}
|
|
106
|
+
// Signal that the record is fully initialized and ready for dependent operations
|
|
107
|
+
if (this.record) {
|
|
108
|
+
this.RecordReady.emit(this.record);
|
|
109
|
+
}
|
|
98
110
|
// Set up debounced filter subscription
|
|
99
111
|
this.filterSubscription = this.filterSubject
|
|
100
112
|
.pipe(debounceTime(100))
|
|
@@ -172,6 +184,9 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
172
184
|
handleHistoryDialog() {
|
|
173
185
|
this.isHistoryDialogOpen = !this.isHistoryDialogOpen;
|
|
174
186
|
}
|
|
187
|
+
HandleTagsPanel() {
|
|
188
|
+
this.IsTagsPanelOpen = !this.IsTagsPanelOpen;
|
|
189
|
+
}
|
|
175
190
|
// #endregion
|
|
176
191
|
// #region Core Form Operations
|
|
177
192
|
Validate() {
|
|
@@ -790,7 +805,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
790
805
|
} if (rf & 2) {
|
|
791
806
|
let _t;
|
|
792
807
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.collapsiblePanels = _t);
|
|
793
|
-
} }, outputs: { Navigate: "Navigate", Notification: "Notification", RecordSaved: "RecordSaved", RecordDeleted: "RecordDeleted", RecordSaveFailed: "RecordSaveFailed", RecordDeleteFailed: "RecordDeleteFailed", ValidationFailed: "ValidationFailed" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
808
|
+
} }, outputs: { Navigate: "Navigate", Notification: "Notification", RecordSaved: "RecordSaved", RecordDeleted: "RecordDeleted", RecordSaveFailed: "RecordSaveFailed", RecordDeleteFailed: "RecordDeleteFailed", ValidationFailed: "ValidationFailed", RecordReady: "RecordReady" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
794
809
|
}
|
|
795
810
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseFormComponent, [{
|
|
796
811
|
type: Directive
|
|
@@ -808,6 +823,8 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
808
823
|
type: Output
|
|
809
824
|
}], ValidationFailed: [{
|
|
810
825
|
type: Output
|
|
826
|
+
}], RecordReady: [{
|
|
827
|
+
type: Output
|
|
811
828
|
}], collapsiblePanels: [{
|
|
812
829
|
type: ViewChildren,
|
|
813
830
|
args: [MjCollapsiblePanelComponent]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-component.js","sourceRoot":"","sources":["../../src/lib/base-form-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAC6B,SAAS,EAC3C,YAAY,EAAa,UAAU,EAAE,iBAAiB,EACtD,MAAM,EAAE,YAAY,EAAE,MAAM,EAC7B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAgB,YAAY,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EACL,UAAU,EAAgC,oBAAoB,EAE9D,QAAQ,EAAiB,QAAQ,EACgB,OAAO,EACzD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAuB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAqB,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGzH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAWlF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAExD;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAgB,iBAAkB,SAAQ,mBAAmB;IAC1D,QAAQ,GAAY,KAAK,CAAC;IAC1B,gBAAgB,GAAY,KAAK,CAAC;IAClC,mBAAmB,GAAY,KAAK,CAAC;IACrC,gBAAgB,GAAY,KAAK,CAAC;IAClC,gBAAgB,GAAY,KAAK,CAAC;IAEzC;;;OAGG;IACI,aAAa,GAAW,OAAO,CAAC;IAEvC;;;OAGG;IACI,WAAW,GAAW,EAAE,CAAC;IAEhC;;;OAGG;IACI,cAAc,GAAW,EAAE,CAAC;IAE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CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,iBAAiB;QAC5B,MAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,kBAAkB;QACvB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,yBAAyB;QAC9B,4DAA4D;QAC5D,mEAAmE;IACrE,CAAC;iPAt3BmB,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;2BAuEvB,2BAA2B;;;;;;iFAvErB,iBAAiB;cADtC,SAAS;;kBA+CP,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAON,YAAY;mBAAC,2BAA2B","sourcesContent":["import {\n AfterViewInit, OnInit, OnDestroy, Directive,\n ViewChildren, QueryList, ElementRef, ChangeDetectorRef,\n Output, EventEmitter, inject\n} from '@angular/core';\n\nimport { Subject, Subscription, debounceTime } from 'rxjs';\nimport {\n EntityInfo, ValidationResult, BaseEntity, EntityPermissionType,\n EntityRelationshipInfo, EntityOrganicKeyInfo, EntityOrganicKeyRelatedEntityInfo,\n Metadata, RunViewParams, LogError,\n RecordDependency, BaseEntityEvent, CompositeKey, RunView, RunViewResult\n} from '@memberjunction/core';\nimport { MJEventType, MJGlobal, ValidationErrorInfo } from '@memberjunction/global';\nimport { FormEditingCompleteEvent, PendingRecordItem, BaseFormComponentEventCodes } from '@memberjunction/ng-base-types';\nimport { MJListEntity } from '@memberjunction/core-entities';\n\nimport { BaseRecordComponent } from './base-record-component';\nimport { BaseFormSectionInfo } from './base-form-section-info';\nimport { MjCollapsiblePanelComponent } from './panel/collapsible-panel.component';\nimport { FormNavigationEvent } from './types/navigation-events';\nimport {\n FormContext,\n FormNotificationEvent,\n RecordSavedEvent,\n RecordDeletedEvent,\n RecordSaveFailedEvent,\n RecordDeleteFailedEvent,\n ValidationFailedEvent\n} from './types/form-types';\nimport { FormStateService } from './form-state.service';\n\n/**\n * Abstract base class for all entity record forms in MemberJunction.\n *\n * Generated forms (via CodeGen) and custom forms extend this class.\n * It provides core form logic — section management, validation, pending records,\n * permissions, favorites, related entity helpers — with ZERO Explorer dependencies.\n *\n * Instead of calling Explorer services directly, events are emitted via @Output:\n * - **Navigate**: Form navigation requests (record links, new records, external links)\n * - **Notification**: User-facing notifications (save success, validation errors, etc.)\n * - **RecordSaved**: Emitted after a successful save\n * - **RecordDeleted**: Emitted after a successful delete\n *\n * The host application (e.g. SingleRecordComponent in Explorer) subscribes to\n * these events and maps them to its own services (NavigationService, SharedService, etc.).\n */\n@Directive()\nexport abstract class BaseFormComponent extends BaseRecordComponent implements AfterViewInit, OnInit, OnDestroy {\n public EditMode: boolean = false;\n public FavoriteInitDone: boolean = false;\n public isHistoryDialogOpen: boolean = false;\n public showDeleteDialog: boolean = false;\n public showCreateDialog: boolean = false;\n\n /**\n * Height of the top area when a splitter layout is used.\n * Referenced by CodeGen-generated templates for entities with \"top area\" sections.\n */\n public TopAreaHeight: string = '300px';\n\n /**\n * Size of the top area as a percentage (0-100) for angular-split.\n * Used by CodeGen-generated templates with as-split.\n */\n public TopAreaSize: number = 40;\n\n /**\n * Size of the bottom area as a percentage (0-100) for angular-split.\n * Used by CodeGen-generated templates with as-split.\n */\n public BottomAreaSize: number = 60;\n\n /**\n * Called when the splitter layout changes (for entities with \"top area\" sections).\n * No-op in the generic version; override in host application if splitter resizing is needed.\n */\n public splitterLayoutChange(): void {\n // No-op — host application can override\n }\n\n private _pendingRecords: PendingRecordItem[] = [];\n\n // #region Injected Dependencies (no constructor params)\n\n protected elementRef = inject(ElementRef);\n public cdr = inject(ChangeDetectorRef);\n protected formStateService = inject(FormStateService);\n\n // #endregion\n\n // #region @Output Events\n\n /** Emitted when navigation is requested (record link, external link, email, new record, etc.) */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Emitted when a user-facing notification should be shown */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n\n /** Emitted after a record is saved successfully */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n\n /** Emitted after a record is deleted successfully */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n\n /** Emitted when a record save fails */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n\n /** Emitted when a record delete fails */\n @Output() RecordDeleteFailed = new EventEmitter<RecordDeleteFailedEvent>();\n\n /** Emitted when validation fails before save */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n\n // #endregion\n\n /** Subscription to form state changes */\n private formStateSubscription?: Subscription;\n\n @ViewChildren(MjCollapsiblePanelComponent) collapsiblePanels!: QueryList<MjCollapsiblePanelComponent>;\n\n async ngOnInit() {\n if (this.record) {\n if (!this.record.IsSaved) {\n this.StartEditMode();\n }\n const md = new Metadata();\n this._isFavorite = await md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey);\n this.FavoriteInitDone = true;\n\n // Initialize form state from User Settings\n const entityName = this.getEntityName();\n if (entityName) {\n await this.formStateService.initializeState(entityName);\n this.formStateSubscription = this.formStateService.getState$(entityName).subscribe(state => {\n this.showEmptyFields = state.showEmptyFields;\n this.cdr.markForCheck();\n });\n }\n }\n\n // Set up debounced filter subscription\n this.filterSubscription = this.filterSubject\n .pipe(debounceTime(100))\n .subscribe(searchTerm => {\n this.searchFilter = searchTerm;\n // After change detection propagates FormContext to panels and they update\n // their IsVisible state, expand any visible (matching) sections that are collapsed\n if (searchTerm) {\n Promise.resolve().then(() => this.expandMatchingSections());\n }\n });\n }\n\n ngAfterViewInit(): void {\n // Subclasses can override for post-view-init logic\n }\n\n ngOnDestroy(): void {\n if (this.filterSubscription) {\n this.filterSubscription.unsubscribe();\n }\n if (this.formStateSubscription) {\n this.formStateSubscription.unsubscribe();\n }\n }\n\n // #region Pending Records\n\n protected get PendingRecords(): PendingRecordItem[] {\n return this._pendingRecords;\n }\n\n protected PendingRecordsDirty(): boolean {\n this.PopulatePendingRecords();\n const pendingRecords = this.PendingRecords;\n if (pendingRecords && pendingRecords.length > 0) {\n for (const p of pendingRecords) {\n if (p.action === 'delete')\n return true;\n else if (p.entityObject.Dirty)\n return true;\n }\n }\n return false;\n }\n\n protected PopulatePendingRecords() {\n this._pendingRecords = [];\n this.RaiseEvent(BaseFormComponentEventCodes.EDITING_COMPLETE);\n const result = this.RaiseEvent(BaseFormComponentEventCodes.POPULATE_PENDING_RECORDS);\n if (result && result.pendingChanges) {\n for (const p of result.pendingChanges)\n this.PendingRecords.push(p);\n }\n }\n\n protected ValidatePendingRecords(): ValidationResult[] {\n const results: ValidationResult[] = [];\n for (let i = 0; i < this._pendingRecords.length; i++) {\n const pendingRecord = this._pendingRecords[i];\n results.push(pendingRecord.entityObject.Validate());\n }\n return results;\n }\n\n // #endregion\n\n // #region Edit Mode\n\n public StartEditMode(): void {\n this.EditMode = true;\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setEditMode(entityName, true);\n }\n }\n\n public EndEditMode(): void {\n this.EditMode = false;\n this.clearValidationState();\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setEditMode(entityName, false);\n }\n }\n\n public handleHistoryDialog(): void {\n this.isHistoryDialogOpen = !this.isHistoryDialogOpen;\n }\n\n // #endregion\n\n // #region Core Form Operations\n\n public Validate(): ValidationResult {\n const valResults = (<BaseEntity>this.record).Validate();\n const pendingValResults = this.ValidatePendingRecords();\n for (let i = 0; i < pendingValResults.length; i++) {\n const pendingValResult = pendingValResults[i];\n if (!pendingValResult.Success) {\n valResults.Success = false;\n valResults.Errors.push(...pendingValResult.Errors);\n }\n }\n return valResults;\n }\n\n protected RaiseEvent(eventCode: BaseFormComponentEventCodes) {\n const event = new FormEditingCompleteEvent();\n event.elementRef = this.elementRef;\n event.subEventCode = eventCode;\n\n MJGlobal.Instance.RaiseEvent({\n event: MJEventType.ComponentEvent,\n component: this,\n eventCode: BaseFormComponentEventCodes.BASE_CODE,\n args: event\n });\n\n return event;\n }\n\n public async SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean> {\n try {\n try {\n (document.activeElement as HTMLElement).blur();\n this.RaiseEvent(BaseFormComponentEventCodes.EDITING_COMPLETE);\n } catch (_e) {\n // ignore blur errors\n }\n\n if (this.record) {\n this.PopulatePendingRecords();\n const valResults = this.Validate();\n if (valResults.Success) {\n const result = await this.InternalSaveRecord();\n if (result) {\n this._pendingRecords = [];\n this.clearValidationState();\n if (StopEditModeAfterSave)\n this.EndEditMode();\n\n this.Notification.emit({ Message: 'Record saved successfully', Type: 'success', Duration: 2500 });\n this.RecordSaved.emit({\n EntityName: this.record.EntityInfo.Name,\n RecordId: this.record.PrimaryKey.ToString(),\n Result: { Success: true }\n });\n return true;\n } else {\n const serverMsg = this.record.LatestResult?.Message || '';\n const errorMsg = serverMsg ? `Save failed: ${serverMsg}` : 'Error saving record';\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n } else {\n // Broadcast validation errors to all fields via FormContext\n this._showValidation = true;\n this._validationErrors = valResults.Errors;\n this.cdr.markForCheck();\n\n const errorMessages = valResults.Errors.map(x => x.Message);\n this.Notification.emit({\n Message: 'Validation Errors\\n' + errorMessages.join('\\n'),\n Type: 'warning',\n Duration: 5000\n });\n this.ValidationFailed.emit({ EntityName: this.record.EntityInfo.Name, Errors: errorMessages });\n }\n }\n\n LogError(\"Could not save record: Record not found\");\n return false;\n } catch (e) {\n const errorMsg = 'Error saving record: ' + e;\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n if (this.record) {\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n return false;\n }\n }\n\n public CancelEdit() {\n if (this.record) {\n const r = <BaseEntity>this.record;\n if (r.Dirty || this.PendingRecordsDirty()) {\n // Revert is safe here — the toolbar's discard dialog already confirmed with the user\n r.Revert();\n\n const pendingRecords = this.PendingRecords;\n if (pendingRecords && pendingRecords.length > 0) {\n pendingRecords.forEach(p => {\n if (p.action === 'save')\n p.entityObject.Revert();\n });\n }\n this.RaiseEvent(BaseFormComponentEventCodes.REVERT_PENDING_CHANGES);\n }\n this.EndEditMode();\n }\n }\n\n protected async InternalSaveRecord(): Promise<boolean> {\n if (this.record) {\n if (this._pendingRecords.length > 0) {\n const md = new Metadata();\n const tg = await md.CreateTransactionGroup();\n this.record.TransactionGroup = tg;\n await this.record.Save();\n\n for (const x of this._pendingRecords) {\n x.entityObject.TransactionGroup = tg;\n if (x.action === 'save') {\n await x.entityObject.Save();\n } else {\n await x.entityObject.Delete();\n }\n }\n return await tg.Submit();\n } else {\n return await this.record.Save();\n }\n } else {\n return false;\n }\n }\n\n public async Wait(duration: number): Promise<void> {\n return new Promise<void>(resolve => setTimeout(resolve, duration));\n }\n\n // #endregion\n\n // #region Permissions\n\n private _userPermissions: { permission: EntityPermissionType; canDo: boolean }[] = [];\n\n public CheckUserPermission(type: EntityPermissionType): boolean {\n try {\n if (this.record) {\n const perm = this._userPermissions.find(x => x.permission === type);\n if (perm)\n return perm.canDo;\n else {\n const result = this.record.CheckPermissions(type, false);\n this._userPermissions.push({ permission: type, canDo: result });\n return result;\n }\n } else {\n return false;\n }\n } catch (e) {\n LogError(e);\n return false;\n }\n }\n\n public get UserCanEdit(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Update);\n }\n\n public get UserCanRead(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Read);\n }\n\n public get UserCanCreate(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Create);\n }\n\n public get UserCanDelete(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Delete);\n }\n\n // #endregion\n\n // #region Grid Edit Mode\n\n public GridEditMode(): \"None\" | \"Save\" | \"Queue\" {\n return this.EditMode ? \"Queue\" : \"None\";\n }\n\n // #endregion\n\n // #region Favorites\n\n private _isFavorite: boolean = false;\n\n public get IsFavorite(): boolean {\n return this._isFavorite;\n }\n\n public async RemoveFavorite(): Promise<void> {\n return this.SetFavoriteStatus(false);\n }\n\n public async MakeFavorite(): Promise<void> {\n return this.SetFavoriteStatus(true);\n }\n\n public async SetFavoriteStatus(isFavorite: boolean) {\n const md = new Metadata();\n await md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey, isFavorite);\n this._isFavorite = isFavorite;\n }\n\n // #endregion\n\n // #region Related Entity Helpers\n\n public BuildRelationshipViewParams(item: EntityRelationshipInfo): RunViewParams {\n return EntityInfo.BuildRelationshipViewParams(this.record, item);\n }\n\n public BuildRelationshipViewParamsByEntityName(relatedEntityName: string, relatedEntityJoinField?: string): RunViewParams {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName, relatedEntityJoinField);\n if (eri)\n return this.BuildRelationshipViewParams(eri);\n else\n return {};\n }\n\n public GetEntityRelationshipByRelatedEntityName(relatedEntityName: string, relatedEntityJoinField?: string): EntityRelationshipInfo | undefined {\n if (this.record) {\n const r = <BaseEntity>this.record;\n const ret = r.EntityInfo.RelatedEntities.filter(x => x.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase());\n if (ret.length > 1 && relatedEntityJoinField) {\n const ret2 = ret.find(x => x.RelatedEntityJoinField.trim().toLowerCase() === relatedEntityJoinField.trim().toLowerCase());\n if (ret2)\n return ret2;\n } else if (ret.length === 1) {\n return ret[0];\n } else {\n return undefined;\n }\n }\n return undefined;\n }\n\n public NewRecordValues(relatedEntityName: string): Record<string, unknown> {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName);\n if (eri)\n return this.NewRecordValuesByEntityRelationship(eri);\n else\n return {};\n }\n\n public NewRecordValuesByEntityRelationship(item: EntityRelationshipInfo): Record<string, unknown> {\n return EntityInfo.BuildRelationshipNewRecordValues(this.record, item);\n }\n\n public GetRelatedEntityTabDisplayName(relatedEntityName: string): string {\n if (this.record) {\n const eri = (<BaseEntity>this.record).EntityInfo.RelatedEntities.find(x => x.RelatedEntity === relatedEntityName);\n if (eri)\n return eri.DisplayName;\n }\n return relatedEntityName;\n }\n\n public get HasRelatedEntities(): boolean {\n if (this.record) {\n const relatedEntities = (<BaseEntity>this.record).EntityInfo.RelatedEntities;\n return relatedEntities && relatedEntities.length > 0;\n }\n return false;\n }\n\n // #endregion\n\n // #region Organic Key Helpers\n\n /**\n * Returns all active organic keys for the current entity, or an empty array if none.\n */\n public get OrganicKeys(): EntityOrganicKeyInfo[] {\n if (this.record) {\n return (<BaseEntity>this.record).EntityInfo.OrganicKeys || [];\n }\n return [];\n }\n\n /**\n * Whether the current entity has any active organic keys with related entities configured.\n */\n public get HasOrganicKeys(): boolean {\n return this.OrganicKeys.some(ok => ok.RelatedEntities.length > 0);\n }\n\n /**\n * Returns all organic key related entities across all organic keys, flattened and sorted.\n */\n public get AllOrganicKeyRelatedEntities(): { OrganicKey: EntityOrganicKeyInfo; RelatedEntity: EntityOrganicKeyRelatedEntityInfo }[] {\n const result: { OrganicKey: EntityOrganicKeyInfo; RelatedEntity: EntityOrganicKeyRelatedEntityInfo }[] = [];\n for (const ok of this.OrganicKeys) {\n for (const re of ok.RelatedEntities) {\n result.push({ OrganicKey: ok, RelatedEntity: re });\n }\n }\n return result;\n }\n\n /**\n * Builds RunViewParams for a specific organic key related entity.\n */\n public BuildOrganicKeyViewParams(\n organicKeyRelatedEntity: EntityOrganicKeyRelatedEntityInfo,\n organicKey: EntityOrganicKeyInfo\n ): RunViewParams {\n if (this.record) {\n return EntityInfo.BuildOrganicKeyViewParams(this.record, organicKeyRelatedEntity, organicKey);\n }\n return {};\n }\n\n /**\n * Convenience method to build organic key view params by organic key name and related entity name.\n */\n public BuildOrganicKeyViewParamsByNames(organicKeyName: string, relatedEntityName: string): RunViewParams {\n const ok = this.OrganicKeys.find(k => k.Name.trim().toLowerCase() === organicKeyName.trim().toLowerCase());\n if (ok) {\n const re = ok.RelatedEntities.find(r => r.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase());\n if (re) {\n return this.BuildOrganicKeyViewParams(re, ok);\n }\n }\n return {};\n }\n\n // #endregion\n\n // #region Entity Info & Dependencies\n\n public get EntityInfo(): EntityInfo | undefined {\n try {\n const r = <BaseEntity>this.record;\n if (r)\n return r.EntityInfo;\n else\n return undefined;\n } catch (e) {\n LogError(e);\n return undefined;\n }\n }\n\n public async ShowDependencies() {\n const md = new Metadata();\n const dep = await md.GetRecordDependencies(this.record.EntityInfo.Name, this.record.PrimaryKey);\n console.log('Dependencies for: ' + this.record.EntityInfo.Name + ' ' + this.record.PrimaryKey.ToString());\n console.log(dep);\n }\n\n public ShowChanges(): void {\n if (this.record) {\n const changes = this.record.GetAll(false, true);\n const oldValues = this.record.GetAll(true, true);\n const message =\n 'Changes for: ' + this.record.EntityInfo.Name + ' ' + this.record.PrimaryKey.ToString() +\n '\\n\\n' + JSON.stringify(changes, null, 2) +\n '\\n\\nOld Values\\n\\n' + JSON.stringify(oldValues, null, 2);\n console.log(message);\n this.Notification.emit({ Message: message, Type: 'info', Duration: 30000 });\n }\n }\n\n public async GetListsCanAddTo(): Promise<MJListEntity[]> {\n if (!this.record) {\n LogError('Unable to fetch List records: Record not found');\n return [];\n }\n\n const rv = new RunView();\n const md = new Metadata();\n\n const rvResult: RunViewResult<MJListEntity> = await rv.RunView({\n EntityName: 'MJ: Lists',\n ExtraFilter: `UserID = '${md.CurrentUser.ID}' AND EntityID = '${this.record.EntityInfo.ID}'`,\n ResultType: 'entity_object'\n });\n\n if (!rvResult.Success) {\n LogError('Error running view to fetch lists', undefined, rvResult.ErrorMessage);\n return [];\n }\n\n return rvResult.Results;\n }\n\n public async GetRecordDependencies(): Promise<RecordDependency[]> {\n const md = new Metadata();\n const dependencies: RecordDependency[] = await md.GetRecordDependencies(this.record.EntityInfo.Name, this.record.PrimaryKey);\n return dependencies;\n }\n\n // #endregion\n\n // #region Collapsible Section Management\n\n protected sections: BaseFormSectionInfo[] = [];\n private sectionMap: Map<string, BaseFormSectionInfo> = new Map();\n\n public searchFilter: string = '';\n public showEmptyFields: boolean = false;\n\n /** Whether to show all validation errors on fields (set after save failure) */\n private _showValidation = false;\n /** Validation errors from the most recent failed save attempt */\n private _validationErrors: ValidationErrorInfo[] = [];\n\n public get formContext(): FormContext {\n return {\n sectionFilter: this.searchFilter,\n showEmptyFields: this.showEmptyFields,\n showValidation: this._showValidation,\n validationErrors: this._validationErrors\n };\n }\n\n /** Clears all validation display state (called on save success, cancel, end edit) */\n private clearValidationState(): void {\n this._showValidation = false;\n this._validationErrors = [];\n }\n\n private filterSubject = new Subject<string>();\n private filterSubscription?: Subscription;\n\n protected initSections(sections: (BaseFormSectionInfo | { sectionKey: string; sectionName: string; isExpanded: boolean; rowCount?: number; metadata?: unknown })[]): void {\n this.sections = sections.map(s =>\n s instanceof BaseFormSectionInfo\n ? s\n : new BaseFormSectionInfo(s.sectionKey, s.sectionName, s.isExpanded, s.rowCount, s.metadata)\n );\n this.sectionMap.clear();\n this.sections.forEach(section => {\n this.sectionMap.set(section.sectionKey, section);\n });\n }\n\n protected getSection(sectionKey: string): BaseFormSectionInfo | undefined {\n return this.sectionMap.get(sectionKey);\n }\n\n public IsSectionExpanded(sectionKey: string, defaultExpanded?: boolean): boolean {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.isSectionExpanded(entityName, sectionKey, defaultExpanded);\n }\n const section = this.sectionMap.get(sectionKey);\n return section ? section.isExpanded : (defaultExpanded !== undefined ? defaultExpanded : true);\n }\n\n public SetSectionExpanded(sectionKey: string, isExpanded: boolean): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionExpanded(entityName, sectionKey, isExpanded);\n }\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.isExpanded = isExpanded;\n }\n }\n\n public GetSectionRowCount(sectionKey: string): number | undefined {\n const section = this.sectionMap.get(sectionKey);\n return section?.rowCount;\n }\n\n public SetSectionRowCount(sectionKey: string, rowCount: number): void {\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.rowCount = rowCount;\n }\n }\n\n public GetSectionPanelHeight(sectionKey: string): number | undefined {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.getSectionPanelHeight(entityName, sectionKey);\n }\n return undefined;\n }\n\n public SetSectionPanelHeight(sectionKey: string, height: number): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionPanelHeight(entityName, sectionKey, height);\n }\n }\n\n public toggleSection(sectionKey: string): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.toggleSection(entityName, sectionKey);\n }\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.isExpanded = !section.isExpanded;\n }\n }\n\n /**\n * Expand any sections that are visible (match the current filter) but currently collapsed.\n * Called after filter changes so the user can immediately see matching content.\n */\n private expandMatchingSections(): void {\n if (!this.collapsiblePanels) return;\n this.collapsiblePanels.forEach(panel => {\n if (panel.IsVisible && !panel.Expanded) {\n this.SetSectionExpanded(panel.SectionKey, true);\n }\n });\n }\n\n public expandAllSections(): void {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n this.formStateService.expandAllSections(entityName, sectionKeys);\n }\n this.sections.forEach(section => {\n section.isExpanded = true;\n });\n }\n\n public collapseAllSections(): void {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n this.formStateService.collapseAllSections(entityName, sectionKeys);\n }\n this.sections.forEach(section => {\n section.isExpanded = false;\n });\n }\n\n public getExpandedCount(): number {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n return this.formStateService.getExpandedCount(entityName, sectionKeys);\n }\n return this.sections.filter(section => section.isExpanded).length;\n }\n\n public getVisibleSectionCount(): number {\n if (!this.collapsiblePanels || this.collapsiblePanels.length === 0) {\n return this.sections.length;\n }\n return this.collapsiblePanels.filter(panel => panel.IsVisible).length;\n }\n\n public getTotalSectionCount(): number {\n return this.sections.length;\n }\n\n public onFilterChange(searchTerm: string): void {\n this.filterSubject.next(searchTerm);\n }\n\n public getEntityName(): string {\n return this.record?.EntityInfo?.Name || '';\n }\n\n public getFormWidthMode(): 'centered' | 'full-width' {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.getWidthMode(entityName);\n }\n return 'centered';\n }\n\n public setFormWidthMode(widthMode: 'centered' | 'full-width'): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setWidthMode(entityName, widthMode);\n }\n }\n\n public toggleFormWidthMode(): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.toggleWidthMode(entityName);\n }\n }\n\n // #endregion\n\n // #region Section Ordering\n\n public getSectionOrder(): string[] {\n const entityName = this.getEntityName();\n if (entityName) {\n const customOrder = this.formStateService.getSectionOrder(entityName);\n if (customOrder && customOrder.length > 0) {\n return customOrder;\n }\n }\n return this.sections.map(s => s.sectionKey);\n }\n\n public setSectionOrder(sectionOrder: string[]): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionOrder(entityName, sectionOrder);\n }\n }\n\n public resetSectionOrder(): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.resetSectionOrder(entityName);\n }\n }\n\n public hasCustomSectionOrder(): boolean {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.hasCustomSectionOrder(entityName);\n }\n return false;\n }\n\n public getSectionDisplayOrder(sectionKey: string): number {\n const order = this.getSectionOrder();\n const index = order.indexOf(sectionKey);\n return index >= 0 ? index : this.sections.length;\n }\n\n // #endregion\n\n // #region Form Container Event Handlers\n\n /**\n * Handles navigation events from the form container and related entity grids.\n * Relays the event upward via the Navigate @Output for the host application to handle.\n * Generated form templates bind this as: (Navigate)=\"OnFormNavigate($event)\"\n */\n public OnFormNavigate(event: FormNavigationEvent): void {\n this.Navigate.emit(event);\n }\n\n /**\n * Handles delete requests from the form container.\n * Emits RecordDeleted on success, RecordDeleteFailed on failure.\n * Generated form templates bind this as: (DeleteRequested)=\"OnDeleteRequested()\"\n */\n public async OnDeleteRequested(): Promise<void> {\n if (!this.record || !this.record.IsSaved) return;\n try {\n const result = await this.record.Delete();\n if (result) {\n this.Notification.emit({ Message: 'Record deleted successfully', Type: 'success', Duration: 2500 });\n this.RecordDeleted.emit({\n EntityName: this.record.EntityInfo.Name,\n RecordId: this.record.PrimaryKey.ToString()\n });\n } else {\n const errorMsg = 'Error deleting record';\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordDeleteFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n } catch (e) {\n const errorMsg = 'Error deleting record: ' + e;\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordDeleteFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n }\n\n /**\n * Handles favorite toggle from the form container.\n * Generated form templates bind this as: (FavoriteToggled)=\"OnFavoriteToggled()\"\n */\n public async OnFavoriteToggled(): Promise<void> {\n await this.SetFavoriteStatus(!this.IsFavorite);\n }\n\n /**\n * Handles history view requests from the form container.\n * Generated form templates bind this as: (HistoryRequested)=\"OnHistoryRequested()\"\n */\n public OnHistoryRequested(): void {\n this.handleHistoryDialog();\n }\n\n /**\n * Handles list management requests from the form container.\n * Generated form templates bind this as: (ListManagementRequested)=\"OnListManagementRequested()\"\n */\n public OnListManagementRequested(): void {\n // List management dialog is handled by the host application\n // Subclasses can override this to implement custom list management\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-form-component.js","sourceRoot":"","sources":["../../src/lib/base-form-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAC6B,SAAS,EAC3C,YAAY,EAAa,UAAU,EAAE,iBAAiB,EACtD,MA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EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpG,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,iBAAiB;QAC5B,MAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,kBAAkB;QACvB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,yBAAyB;QAC9B,4DAA4D;QAC5D,mEAAmE;IACrE,CAAC;iPAx4BmB,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;2BAgFvB,2BAA2B;;;;;;iFAhFrB,iBAAiB;cADtC,SAAS;;kBAiDP,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAON,MAAM;;kBAON,YAAY;mBAAC,2BAA2B","sourcesContent":["import {\n AfterViewInit, OnInit, OnDestroy, Directive,\n ViewChildren, QueryList, ElementRef, ChangeDetectorRef,\n Output, EventEmitter, inject\n} from '@angular/core';\n\nimport { Subject, Subscription, debounceTime } from 'rxjs';\nimport {\n EntityInfo, ValidationResult, BaseEntity, EntityPermissionType,\n EntityRelationshipInfo, EntityOrganicKeyInfo, EntityOrganicKeyRelatedEntityInfo,\n Metadata, RunViewParams, LogError,\n RecordDependency, BaseEntityEvent, CompositeKey, RunView, RunViewResult\n} from '@memberjunction/core';\nimport { MJEventType, MJGlobal, ValidationErrorInfo } from '@memberjunction/global';\nimport { FormEditingCompleteEvent, PendingRecordItem, BaseFormComponentEventCodes } from '@memberjunction/ng-base-types';\nimport { MJListEntity } from '@memberjunction/core-entities';\n\nimport { BaseRecordComponent } from './base-record-component';\nimport { BaseFormSectionInfo } from './base-form-section-info';\nimport { MjCollapsiblePanelComponent } from './panel/collapsible-panel.component';\nimport { FormNavigationEvent } from './types/navigation-events';\nimport {\n FormContext,\n FormNotificationEvent,\n RecordSavedEvent,\n RecordDeletedEvent,\n RecordSaveFailedEvent,\n RecordDeleteFailedEvent,\n ValidationFailedEvent\n} from './types/form-types';\nimport { FormStateService } from './form-state.service';\n\n/**\n * Abstract base class for all entity record forms in MemberJunction.\n *\n * Generated forms (via CodeGen) and custom forms extend this class.\n * It provides core form logic — section management, validation, pending records,\n * permissions, favorites, related entity helpers — with ZERO Explorer dependencies.\n *\n * Instead of calling Explorer services directly, events are emitted via @Output:\n * - **Navigate**: Form navigation requests (record links, new records, external links)\n * - **Notification**: User-facing notifications (save success, validation errors, etc.)\n * - **RecordSaved**: Emitted after a successful save\n * - **RecordDeleted**: Emitted after a successful delete\n *\n * The host application (e.g. SingleRecordComponent in Explorer) subscribes to\n * these events and maps them to its own services (NavigationService, SharedService, etc.).\n */\n@Directive()\nexport abstract class BaseFormComponent extends BaseRecordComponent implements AfterViewInit, OnInit, OnDestroy {\n public EditMode: boolean = false;\n public FavoriteInitDone: boolean = false;\n public isHistoryDialogOpen: boolean = false;\n public IsTagsPanelOpen: boolean = false;\n public TagCount: number = 0;\n public showDeleteDialog: boolean = false;\n public showCreateDialog: boolean = false;\n\n /**\n * Height of the top area when a splitter layout is used.\n * Referenced by CodeGen-generated templates for entities with \"top area\" sections.\n */\n public TopAreaHeight: string = '300px';\n\n /**\n * Size of the top area as a percentage (0-100) for angular-split.\n * Used by CodeGen-generated templates with as-split.\n */\n public TopAreaSize: number = 40;\n\n /**\n * Size of the bottom area as a percentage (0-100) for angular-split.\n * Used by CodeGen-generated templates with as-split.\n */\n public BottomAreaSize: number = 60;\n\n /**\n * Called when the splitter layout changes (for entities with \"top area\" sections).\n * No-op in the generic version; override in host application if splitter resizing is needed.\n */\n public splitterLayoutChange(): void {\n // No-op — host application can override\n }\n\n private _pendingRecords: PendingRecordItem[] = [];\n\n // #region Injected Dependencies (no constructor params)\n\n protected elementRef = inject(ElementRef);\n public cdr = inject(ChangeDetectorRef);\n protected formStateService = inject(FormStateService);\n\n // #endregion\n\n // #region @Output Events\n\n /** Emitted when navigation is requested (record link, external link, email, new record, etc.) */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Emitted when a user-facing notification should be shown */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n\n /** Emitted after a record is saved successfully */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n\n /** Emitted after a record is deleted successfully */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n\n /** Emitted when a record save fails */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n\n /** Emitted when a record delete fails */\n @Output() RecordDeleteFailed = new EventEmitter<RecordDeleteFailedEvent>();\n\n /** Emitted when validation fails before save */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n\n /**\n * Emitted once after ngOnInit completes and the record is fully initialized\n * (favorites loaded, form state initialized). This is the safe point for\n * the container to start loading badge counts and other record-dependent data.\n */\n @Output() RecordReady = new EventEmitter<BaseEntity>();\n\n // #endregion\n\n /** Subscription to form state changes */\n private formStateSubscription?: Subscription;\n\n @ViewChildren(MjCollapsiblePanelComponent) collapsiblePanels!: QueryList<MjCollapsiblePanelComponent>;\n\n async ngOnInit() {\n if (this.record) {\n if (!this.record.IsSaved) {\n this.StartEditMode();\n }\n const md = new Metadata();\n this._isFavorite = await md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey);\n this.FavoriteInitDone = true;\n\n // Initialize form state from User Settings\n const entityName = this.getEntityName();\n if (entityName) {\n await this.formStateService.initializeState(entityName);\n this.formStateSubscription = this.formStateService.getState$(entityName).subscribe(state => {\n this.showEmptyFields = state.showEmptyFields;\n this.cdr.markForCheck();\n });\n }\n }\n\n // Signal that the record is fully initialized and ready for dependent operations\n if (this.record) {\n this.RecordReady.emit(this.record);\n }\n\n // Set up debounced filter subscription\n this.filterSubscription = this.filterSubject\n .pipe(debounceTime(100))\n .subscribe(searchTerm => {\n this.searchFilter = searchTerm;\n // After change detection propagates FormContext to panels and they update\n // their IsVisible state, expand any visible (matching) sections that are collapsed\n if (searchTerm) {\n Promise.resolve().then(() => this.expandMatchingSections());\n }\n });\n }\n\n ngAfterViewInit(): void {\n // Subclasses can override for post-view-init logic\n }\n\n ngOnDestroy(): void {\n if (this.filterSubscription) {\n this.filterSubscription.unsubscribe();\n }\n if (this.formStateSubscription) {\n this.formStateSubscription.unsubscribe();\n }\n }\n\n // #region Pending Records\n\n protected get PendingRecords(): PendingRecordItem[] {\n return this._pendingRecords;\n }\n\n protected PendingRecordsDirty(): boolean {\n this.PopulatePendingRecords();\n const pendingRecords = this.PendingRecords;\n if (pendingRecords && pendingRecords.length > 0) {\n for (const p of pendingRecords) {\n if (p.action === 'delete')\n return true;\n else if (p.entityObject.Dirty)\n return true;\n }\n }\n return false;\n }\n\n protected PopulatePendingRecords() {\n this._pendingRecords = [];\n this.RaiseEvent(BaseFormComponentEventCodes.EDITING_COMPLETE);\n const result = this.RaiseEvent(BaseFormComponentEventCodes.POPULATE_PENDING_RECORDS);\n if (result && result.pendingChanges) {\n for (const p of result.pendingChanges)\n this.PendingRecords.push(p);\n }\n }\n\n protected ValidatePendingRecords(): ValidationResult[] {\n const results: ValidationResult[] = [];\n for (let i = 0; i < this._pendingRecords.length; i++) {\n const pendingRecord = this._pendingRecords[i];\n results.push(pendingRecord.entityObject.Validate());\n }\n return results;\n }\n\n // #endregion\n\n // #region Edit Mode\n\n public StartEditMode(): void {\n this.EditMode = true;\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setEditMode(entityName, true);\n }\n }\n\n public EndEditMode(): void {\n this.EditMode = false;\n this.clearValidationState();\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setEditMode(entityName, false);\n }\n }\n\n public handleHistoryDialog(): void {\n this.isHistoryDialogOpen = !this.isHistoryDialogOpen;\n }\n\n public HandleTagsPanel(): void {\n this.IsTagsPanelOpen = !this.IsTagsPanelOpen;\n }\n\n // #endregion\n\n // #region Core Form Operations\n\n public Validate(): ValidationResult {\n const valResults = (<BaseEntity>this.record).Validate();\n const pendingValResults = this.ValidatePendingRecords();\n for (let i = 0; i < pendingValResults.length; i++) {\n const pendingValResult = pendingValResults[i];\n if (!pendingValResult.Success) {\n valResults.Success = false;\n valResults.Errors.push(...pendingValResult.Errors);\n }\n }\n return valResults;\n }\n\n protected RaiseEvent(eventCode: BaseFormComponentEventCodes) {\n const event = new FormEditingCompleteEvent();\n event.elementRef = this.elementRef;\n event.subEventCode = eventCode;\n\n MJGlobal.Instance.RaiseEvent({\n event: MJEventType.ComponentEvent,\n component: this,\n eventCode: BaseFormComponentEventCodes.BASE_CODE,\n args: event\n });\n\n return event;\n }\n\n public async SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean> {\n try {\n try {\n (document.activeElement as HTMLElement).blur();\n this.RaiseEvent(BaseFormComponentEventCodes.EDITING_COMPLETE);\n } catch (_e) {\n // ignore blur errors\n }\n\n if (this.record) {\n this.PopulatePendingRecords();\n const valResults = this.Validate();\n if (valResults.Success) {\n const result = await this.InternalSaveRecord();\n if (result) {\n this._pendingRecords = [];\n this.clearValidationState();\n if (StopEditModeAfterSave)\n this.EndEditMode();\n\n this.Notification.emit({ Message: 'Record saved successfully', Type: 'success', Duration: 2500 });\n this.RecordSaved.emit({\n EntityName: this.record.EntityInfo.Name,\n RecordId: this.record.PrimaryKey.ToString(),\n Result: { Success: true }\n });\n return true;\n } else {\n const serverMsg = this.record.LatestResult?.Message || '';\n const errorMsg = serverMsg ? `Save failed: ${serverMsg}` : 'Error saving record';\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n } else {\n // Broadcast validation errors to all fields via FormContext\n this._showValidation = true;\n this._validationErrors = valResults.Errors;\n this.cdr.markForCheck();\n\n const errorMessages = valResults.Errors.map(x => x.Message);\n this.Notification.emit({\n Message: 'Validation Errors\\n' + errorMessages.join('\\n'),\n Type: 'warning',\n Duration: 5000\n });\n this.ValidationFailed.emit({ EntityName: this.record.EntityInfo.Name, Errors: errorMessages });\n }\n }\n\n LogError(\"Could not save record: Record not found\");\n return false;\n } catch (e) {\n const errorMsg = 'Error saving record: ' + e;\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n if (this.record) {\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n return false;\n }\n }\n\n public CancelEdit() {\n if (this.record) {\n const r = <BaseEntity>this.record;\n if (r.Dirty || this.PendingRecordsDirty()) {\n // Revert is safe here — the toolbar's discard dialog already confirmed with the user\n r.Revert();\n\n const pendingRecords = this.PendingRecords;\n if (pendingRecords && pendingRecords.length > 0) {\n pendingRecords.forEach(p => {\n if (p.action === 'save')\n p.entityObject.Revert();\n });\n }\n this.RaiseEvent(BaseFormComponentEventCodes.REVERT_PENDING_CHANGES);\n }\n this.EndEditMode();\n }\n }\n\n protected async InternalSaveRecord(): Promise<boolean> {\n if (this.record) {\n if (this._pendingRecords.length > 0) {\n const md = new Metadata();\n const tg = await md.CreateTransactionGroup();\n this.record.TransactionGroup = tg;\n await this.record.Save();\n\n for (const x of this._pendingRecords) {\n x.entityObject.TransactionGroup = tg;\n if (x.action === 'save') {\n await x.entityObject.Save();\n } else {\n await x.entityObject.Delete();\n }\n }\n return await tg.Submit();\n } else {\n return await this.record.Save();\n }\n } else {\n return false;\n }\n }\n\n public async Wait(duration: number): Promise<void> {\n return new Promise<void>(resolve => setTimeout(resolve, duration));\n }\n\n // #endregion\n\n // #region Permissions\n\n private _userPermissions: { permission: EntityPermissionType; canDo: boolean }[] = [];\n\n public CheckUserPermission(type: EntityPermissionType): boolean {\n try {\n if (this.record) {\n const perm = this._userPermissions.find(x => x.permission === type);\n if (perm)\n return perm.canDo;\n else {\n const result = this.record.CheckPermissions(type, false);\n this._userPermissions.push({ permission: type, canDo: result });\n return result;\n }\n } else {\n return false;\n }\n } catch (e) {\n LogError(e);\n return false;\n }\n }\n\n public get UserCanEdit(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Update);\n }\n\n public get UserCanRead(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Read);\n }\n\n public get UserCanCreate(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Create);\n }\n\n public get UserCanDelete(): boolean {\n return this.CheckUserPermission(EntityPermissionType.Delete);\n }\n\n // #endregion\n\n // #region Grid Edit Mode\n\n public GridEditMode(): \"None\" | \"Save\" | \"Queue\" {\n return this.EditMode ? \"Queue\" : \"None\";\n }\n\n // #endregion\n\n // #region Favorites\n\n private _isFavorite: boolean = false;\n\n public get IsFavorite(): boolean {\n return this._isFavorite;\n }\n\n public async RemoveFavorite(): Promise<void> {\n return this.SetFavoriteStatus(false);\n }\n\n public async MakeFavorite(): Promise<void> {\n return this.SetFavoriteStatus(true);\n }\n\n public async SetFavoriteStatus(isFavorite: boolean) {\n const md = new Metadata();\n await md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey, isFavorite);\n this._isFavorite = isFavorite;\n }\n\n // #endregion\n\n // #region Related Entity Helpers\n\n public BuildRelationshipViewParams(item: EntityRelationshipInfo): RunViewParams {\n return EntityInfo.BuildRelationshipViewParams(this.record, item);\n }\n\n public BuildRelationshipViewParamsByEntityName(relatedEntityName: string, relatedEntityJoinField?: string): RunViewParams {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName, relatedEntityJoinField);\n if (eri)\n return this.BuildRelationshipViewParams(eri);\n else\n return {};\n }\n\n public GetEntityRelationshipByRelatedEntityName(relatedEntityName: string, relatedEntityJoinField?: string): EntityRelationshipInfo | undefined {\n if (this.record) {\n const r = <BaseEntity>this.record;\n const ret = r.EntityInfo.RelatedEntities.filter(x => x.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase());\n if (ret.length > 1 && relatedEntityJoinField) {\n const ret2 = ret.find(x => x.RelatedEntityJoinField.trim().toLowerCase() === relatedEntityJoinField.trim().toLowerCase());\n if (ret2)\n return ret2;\n } else if (ret.length === 1) {\n return ret[0];\n } else {\n return undefined;\n }\n }\n return undefined;\n }\n\n public NewRecordValues(relatedEntityName: string): Record<string, unknown> {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName);\n if (eri)\n return this.NewRecordValuesByEntityRelationship(eri);\n else\n return {};\n }\n\n public NewRecordValuesByEntityRelationship(item: EntityRelationshipInfo): Record<string, unknown> {\n return EntityInfo.BuildRelationshipNewRecordValues(this.record, item);\n }\n\n public GetRelatedEntityTabDisplayName(relatedEntityName: string): string {\n if (this.record) {\n const eri = (<BaseEntity>this.record).EntityInfo.RelatedEntities.find(x => x.RelatedEntity === relatedEntityName);\n if (eri)\n return eri.DisplayName;\n }\n return relatedEntityName;\n }\n\n public get HasRelatedEntities(): boolean {\n if (this.record) {\n const relatedEntities = (<BaseEntity>this.record).EntityInfo.RelatedEntities;\n return relatedEntities && relatedEntities.length > 0;\n }\n return false;\n }\n\n // #endregion\n\n // #region Organic Key Helpers\n\n /**\n * Returns all active organic keys for the current entity, or an empty array if none.\n */\n public get OrganicKeys(): EntityOrganicKeyInfo[] {\n if (this.record) {\n return (<BaseEntity>this.record).EntityInfo.OrganicKeys || [];\n }\n return [];\n }\n\n /**\n * Whether the current entity has any active organic keys with related entities configured.\n */\n public get HasOrganicKeys(): boolean {\n return this.OrganicKeys.some(ok => ok.RelatedEntities.length > 0);\n }\n\n /**\n * Returns all organic key related entities across all organic keys, flattened and sorted.\n */\n public get AllOrganicKeyRelatedEntities(): { OrganicKey: EntityOrganicKeyInfo; RelatedEntity: EntityOrganicKeyRelatedEntityInfo }[] {\n const result: { OrganicKey: EntityOrganicKeyInfo; RelatedEntity: EntityOrganicKeyRelatedEntityInfo }[] = [];\n for (const ok of this.OrganicKeys) {\n for (const re of ok.RelatedEntities) {\n result.push({ OrganicKey: ok, RelatedEntity: re });\n }\n }\n return result;\n }\n\n /**\n * Builds RunViewParams for a specific organic key related entity.\n */\n public BuildOrganicKeyViewParams(\n organicKeyRelatedEntity: EntityOrganicKeyRelatedEntityInfo,\n organicKey: EntityOrganicKeyInfo\n ): RunViewParams {\n if (this.record) {\n return EntityInfo.BuildOrganicKeyViewParams(this.record, organicKeyRelatedEntity, organicKey);\n }\n return {};\n }\n\n /**\n * Convenience method to build organic key view params by organic key name and related entity name.\n */\n public BuildOrganicKeyViewParamsByNames(organicKeyName: string, relatedEntityName: string): RunViewParams {\n const ok = this.OrganicKeys.find(k => k.Name.trim().toLowerCase() === organicKeyName.trim().toLowerCase());\n if (ok) {\n const re = ok.RelatedEntities.find(r => r.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase());\n if (re) {\n return this.BuildOrganicKeyViewParams(re, ok);\n }\n }\n return {};\n }\n\n // #endregion\n\n // #region Entity Info & Dependencies\n\n public get EntityInfo(): EntityInfo | undefined {\n try {\n const r = <BaseEntity>this.record;\n if (r)\n return r.EntityInfo;\n else\n return undefined;\n } catch (e) {\n LogError(e);\n return undefined;\n }\n }\n\n public async ShowDependencies() {\n const md = new Metadata();\n const dep = await md.GetRecordDependencies(this.record.EntityInfo.Name, this.record.PrimaryKey);\n console.log('Dependencies for: ' + this.record.EntityInfo.Name + ' ' + this.record.PrimaryKey.ToString());\n console.log(dep);\n }\n\n public ShowChanges(): void {\n if (this.record) {\n const changes = this.record.GetAll(false, true);\n const oldValues = this.record.GetAll(true, true);\n const message =\n 'Changes for: ' + this.record.EntityInfo.Name + ' ' + this.record.PrimaryKey.ToString() +\n '\\n\\n' + JSON.stringify(changes, null, 2) +\n '\\n\\nOld Values\\n\\n' + JSON.stringify(oldValues, null, 2);\n console.log(message);\n this.Notification.emit({ Message: message, Type: 'info', Duration: 30000 });\n }\n }\n\n public async GetListsCanAddTo(): Promise<MJListEntity[]> {\n if (!this.record) {\n LogError('Unable to fetch List records: Record not found');\n return [];\n }\n\n const rv = new RunView();\n const md = new Metadata();\n\n const rvResult: RunViewResult<MJListEntity> = await rv.RunView({\n EntityName: 'MJ: Lists',\n ExtraFilter: `UserID = '${md.CurrentUser.ID}' AND EntityID = '${this.record.EntityInfo.ID}'`,\n ResultType: 'entity_object'\n });\n\n if (!rvResult.Success) {\n LogError('Error running view to fetch lists', undefined, rvResult.ErrorMessage);\n return [];\n }\n\n return rvResult.Results;\n }\n\n public async GetRecordDependencies(): Promise<RecordDependency[]> {\n const md = new Metadata();\n const dependencies: RecordDependency[] = await md.GetRecordDependencies(this.record.EntityInfo.Name, this.record.PrimaryKey);\n return dependencies;\n }\n\n // #endregion\n\n // #region Collapsible Section Management\n\n protected sections: BaseFormSectionInfo[] = [];\n private sectionMap: Map<string, BaseFormSectionInfo> = new Map();\n\n public searchFilter: string = '';\n public showEmptyFields: boolean = false;\n\n /** Whether to show all validation errors on fields (set after save failure) */\n private _showValidation = false;\n /** Validation errors from the most recent failed save attempt */\n private _validationErrors: ValidationErrorInfo[] = [];\n\n public get formContext(): FormContext {\n return {\n sectionFilter: this.searchFilter,\n showEmptyFields: this.showEmptyFields,\n showValidation: this._showValidation,\n validationErrors: this._validationErrors\n };\n }\n\n /** Clears all validation display state (called on save success, cancel, end edit) */\n private clearValidationState(): void {\n this._showValidation = false;\n this._validationErrors = [];\n }\n\n private filterSubject = new Subject<string>();\n private filterSubscription?: Subscription;\n\n protected initSections(sections: (BaseFormSectionInfo | { sectionKey: string; sectionName: string; isExpanded: boolean; rowCount?: number; metadata?: unknown })[]): void {\n this.sections = sections.map(s =>\n s instanceof BaseFormSectionInfo\n ? s\n : new BaseFormSectionInfo(s.sectionKey, s.sectionName, s.isExpanded, s.rowCount, s.metadata)\n );\n this.sectionMap.clear();\n this.sections.forEach(section => {\n this.sectionMap.set(section.sectionKey, section);\n });\n }\n\n protected getSection(sectionKey: string): BaseFormSectionInfo | undefined {\n return this.sectionMap.get(sectionKey);\n }\n\n public IsSectionExpanded(sectionKey: string, defaultExpanded?: boolean): boolean {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.isSectionExpanded(entityName, sectionKey, defaultExpanded);\n }\n const section = this.sectionMap.get(sectionKey);\n return section ? section.isExpanded : (defaultExpanded !== undefined ? defaultExpanded : true);\n }\n\n public SetSectionExpanded(sectionKey: string, isExpanded: boolean): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionExpanded(entityName, sectionKey, isExpanded);\n }\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.isExpanded = isExpanded;\n }\n }\n\n public GetSectionRowCount(sectionKey: string): number | undefined {\n const section = this.sectionMap.get(sectionKey);\n return section?.rowCount;\n }\n\n public SetSectionRowCount(sectionKey: string, rowCount: number): void {\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.rowCount = rowCount;\n }\n }\n\n public GetSectionPanelHeight(sectionKey: string): number | undefined {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.getSectionPanelHeight(entityName, sectionKey);\n }\n return undefined;\n }\n\n public SetSectionPanelHeight(sectionKey: string, height: number): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionPanelHeight(entityName, sectionKey, height);\n }\n }\n\n public toggleSection(sectionKey: string): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.toggleSection(entityName, sectionKey);\n }\n const section = this.sectionMap.get(sectionKey);\n if (section) {\n section.isExpanded = !section.isExpanded;\n }\n }\n\n /**\n * Expand any sections that are visible (match the current filter) but currently collapsed.\n * Called after filter changes so the user can immediately see matching content.\n */\n private expandMatchingSections(): void {\n if (!this.collapsiblePanels) return;\n this.collapsiblePanels.forEach(panel => {\n if (panel.IsVisible && !panel.Expanded) {\n this.SetSectionExpanded(panel.SectionKey, true);\n }\n });\n }\n\n public expandAllSections(): void {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n this.formStateService.expandAllSections(entityName, sectionKeys);\n }\n this.sections.forEach(section => {\n section.isExpanded = true;\n });\n }\n\n public collapseAllSections(): void {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n this.formStateService.collapseAllSections(entityName, sectionKeys);\n }\n this.sections.forEach(section => {\n section.isExpanded = false;\n });\n }\n\n public getExpandedCount(): number {\n const entityName = this.getEntityName();\n const sectionKeys = this.sections.map(s => s.sectionKey);\n if (entityName && sectionKeys.length > 0) {\n return this.formStateService.getExpandedCount(entityName, sectionKeys);\n }\n return this.sections.filter(section => section.isExpanded).length;\n }\n\n public getVisibleSectionCount(): number {\n if (!this.collapsiblePanels || this.collapsiblePanels.length === 0) {\n return this.sections.length;\n }\n return this.collapsiblePanels.filter(panel => panel.IsVisible).length;\n }\n\n public getTotalSectionCount(): number {\n return this.sections.length;\n }\n\n public onFilterChange(searchTerm: string): void {\n this.filterSubject.next(searchTerm);\n }\n\n public getEntityName(): string {\n return this.record?.EntityInfo?.Name || '';\n }\n\n public getFormWidthMode(): 'centered' | 'full-width' {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.getWidthMode(entityName);\n }\n return 'centered';\n }\n\n public setFormWidthMode(widthMode: 'centered' | 'full-width'): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setWidthMode(entityName, widthMode);\n }\n }\n\n public toggleFormWidthMode(): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.toggleWidthMode(entityName);\n }\n }\n\n // #endregion\n\n // #region Section Ordering\n\n public getSectionOrder(): string[] {\n const entityName = this.getEntityName();\n if (entityName) {\n const customOrder = this.formStateService.getSectionOrder(entityName);\n if (customOrder && customOrder.length > 0) {\n return customOrder;\n }\n }\n return this.sections.map(s => s.sectionKey);\n }\n\n public setSectionOrder(sectionOrder: string[]): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setSectionOrder(entityName, sectionOrder);\n }\n }\n\n public resetSectionOrder(): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.resetSectionOrder(entityName);\n }\n }\n\n public hasCustomSectionOrder(): boolean {\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.hasCustomSectionOrder(entityName);\n }\n return false;\n }\n\n public getSectionDisplayOrder(sectionKey: string): number {\n const order = this.getSectionOrder();\n const index = order.indexOf(sectionKey);\n return index >= 0 ? index : this.sections.length;\n }\n\n // #endregion\n\n // #region Form Container Event Handlers\n\n /**\n * Handles navigation events from the form container and related entity grids.\n * Relays the event upward via the Navigate @Output for the host application to handle.\n * Generated form templates bind this as: (Navigate)=\"OnFormNavigate($event)\"\n */\n public OnFormNavigate(event: FormNavigationEvent): void {\n this.Navigate.emit(event);\n }\n\n /**\n * Handles delete requests from the form container.\n * Emits RecordDeleted on success, RecordDeleteFailed on failure.\n * Generated form templates bind this as: (DeleteRequested)=\"OnDeleteRequested()\"\n */\n public async OnDeleteRequested(): Promise<void> {\n if (!this.record || !this.record.IsSaved) return;\n try {\n const result = await this.record.Delete();\n if (result) {\n this.Notification.emit({ Message: 'Record deleted successfully', Type: 'success', Duration: 2500 });\n this.RecordDeleted.emit({\n EntityName: this.record.EntityInfo.Name,\n RecordId: this.record.PrimaryKey.ToString()\n });\n } else {\n const errorMsg = 'Error deleting record';\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordDeleteFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n } catch (e) {\n const errorMsg = 'Error deleting record: ' + e;\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n this.RecordDeleteFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\n }\n }\n\n /**\n * Handles favorite toggle from the form container.\n * Generated form templates bind this as: (FavoriteToggled)=\"OnFavoriteToggled()\"\n */\n public async OnFavoriteToggled(): Promise<void> {\n await this.SetFavoriteStatus(!this.IsFavorite);\n }\n\n /**\n * Handles history view requests from the form container.\n * Generated form templates bind this as: (HistoryRequested)=\"OnHistoryRequested()\"\n */\n public OnHistoryRequested(): void {\n this.handleHistoryDialog();\n }\n\n /**\n * Handles list management requests from the form container.\n * Generated form templates bind this as: (ListManagementRequested)=\"OnListManagementRequested()\"\n */\n public OnListManagementRequested(): void {\n // List management dialog is handled by the host application\n // Subclasses can override this to implement custom list management\n }\n\n // #endregion\n}\n"]}
|
|
@@ -7,6 +7,7 @@ import { MjCollapsiblePanelComponent } from '../panel/collapsible-panel.componen
|
|
|
7
7
|
import { SectionManagerItem } from '../section-manager/section-manager.component';
|
|
8
8
|
import { BeforeSaveEventArgs, BeforeDeleteEventArgs, BeforeCancelEventArgs, BeforeHistoryViewEventArgs, BeforeListManagementEventArgs, CustomToolbarButtonClickEventArgs } from '../types/form-events';
|
|
9
9
|
import { BaseFormComponent } from '../base-form-component';
|
|
10
|
+
import { RestoreVersionEvent } from '@memberjunction/ng-record-changes';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* Top-level container that composes the toolbar, content slots, and sticky behavior.
|
|
@@ -41,10 +42,20 @@ import * as i0 from "@angular/core";
|
|
|
41
42
|
export declare class MjRecordFormContainerComponent implements AfterContentInit, OnDestroy {
|
|
42
43
|
private cdr;
|
|
43
44
|
private ngZone;
|
|
45
|
+
private notificationService;
|
|
44
46
|
private destroy$;
|
|
45
47
|
private panelNavReset$;
|
|
46
48
|
/** Controls visibility of record changes drawer */
|
|
47
49
|
ShowRecordChanges: boolean;
|
|
50
|
+
/** Controls visibility of tags panel */
|
|
51
|
+
ShowTagsPanel: boolean;
|
|
52
|
+
/** Persisted tags panel width */
|
|
53
|
+
TagsPanelWidth: number;
|
|
54
|
+
private static readonly TAGS_WIDTH_KEY;
|
|
55
|
+
/** Number of tags on this record */
|
|
56
|
+
TagCount: number;
|
|
57
|
+
/** Number of tracked record change versions for this record */
|
|
58
|
+
VersionCount: number;
|
|
48
59
|
/** Controls visibility of list management dialog */
|
|
49
60
|
ShowListManagement: boolean;
|
|
50
61
|
/** Controls visibility of section manager drawer */
|
|
@@ -137,6 +148,22 @@ export declare class MjRecordFormContainerComponent implements AfterContentInit,
|
|
|
137
148
|
* This ensures the edit banner updates when fields are modified.
|
|
138
149
|
*/
|
|
139
150
|
private watchRecordChanges;
|
|
151
|
+
/**
|
|
152
|
+
* Loads tag count and record change version count for toolbar badges.
|
|
153
|
+
* Both queries run in parallel for performance.
|
|
154
|
+
*/
|
|
155
|
+
private badgeCountsLoaded;
|
|
156
|
+
private LoadBadgeCounts;
|
|
157
|
+
/**
|
|
158
|
+
* Queries the count of tagged items for the current entity + record
|
|
159
|
+
* and updates the TagCount badge on the toolbar.
|
|
160
|
+
*/
|
|
161
|
+
private LoadTagCount;
|
|
162
|
+
/**
|
|
163
|
+
* Queries the count of record change entries for the current entity + record
|
|
164
|
+
* and updates the VersionCount badge on the toolbar.
|
|
165
|
+
*/
|
|
166
|
+
private LoadVersionCount;
|
|
140
167
|
/**
|
|
141
168
|
* Navigation events are always re-emitted for the host app to handle.
|
|
142
169
|
*/
|
|
@@ -160,7 +187,23 @@ export declare class MjRecordFormContainerComponent implements AfterContentInit,
|
|
|
160
187
|
OnFavoriteToggled(): void;
|
|
161
188
|
OnHistoryRequested(): void;
|
|
162
189
|
OnListManagementRequested(): void;
|
|
190
|
+
OnTagsPanelToggled(): void;
|
|
191
|
+
OnTagsPanelClosed(): void;
|
|
192
|
+
/**
|
|
193
|
+
* Handles live tag count updates from the tags panel component.
|
|
194
|
+
*/
|
|
195
|
+
OnTagCountChanged(count: number): void;
|
|
196
|
+
OnTagsPanelWidthChanged(width: number): void;
|
|
197
|
+
OnTagsRecordNavigate(event: {
|
|
198
|
+
EntityName: string;
|
|
199
|
+
RecordID: string;
|
|
200
|
+
}): void;
|
|
163
201
|
OnRecordChangesClosed(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Handles a restore request from the record-changes panel.
|
|
204
|
+
* Applies the old field values to the current record, saves, then refreshes version count.
|
|
205
|
+
*/
|
|
206
|
+
OnRestoreRequested(event: RestoreVersionEvent): Promise<void>;
|
|
164
207
|
OnListManagementClosed(): void;
|
|
165
208
|
OnShowChangesRequested(): void;
|
|
166
209
|
OnFilterChange(filter: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form-container.component.d.ts","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAErB,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAExD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"record-form-container.component.d.ts","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAErB,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAExD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAgB,UAAU,EAAqB,MAAM,sBAAsB,CAAC;AAI/F,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;AAGxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAQa,8BAA+B,YAAW,gBAAgB,EAAE,SAAS;IAChF,OAAO,CAAC,GAAG,CAA6B;IACxC,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