@memberjunction/ng-base-forms 6.1.0-edge.1 → 6.1.0-edge.2
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/base-form-component.d.ts +12 -0
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +14 -0
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/base-form-section-component.d.ts +33 -1
- package/dist/lib/base-form-section-component.d.ts.map +1 -1
- package/dist/lib/base-form-section-component.js +40 -0
- package/dist/lib/base-form-section-component.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +4 -1
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/package.json +17 -17
|
@@ -123,6 +123,18 @@ export declare abstract class BaseFormComponent extends BaseRecordComponent impl
|
|
|
123
123
|
ngAfterViewInit(): void;
|
|
124
124
|
ngOnDestroy(): void;
|
|
125
125
|
protected get PendingRecords(): PendingRecordItem[];
|
|
126
|
+
/**
|
|
127
|
+
* Unsaved changes a form holds OUTSIDE its record's fields and pending records.
|
|
128
|
+
*
|
|
129
|
+
* A form whose sections own editors — a flow canvas, a designer, a grid — accumulates edits that
|
|
130
|
+
* neither `record.Dirty` nor `PendingRecordsDirty()` can see, because nothing on the entity
|
|
131
|
+
* changed. Without this the toolbar reports "no changes" while the user is looking at their own
|
|
132
|
+
* work, and the navigate-away guard lets them lose it silently.
|
|
133
|
+
*
|
|
134
|
+
* Default `false`, so no existing form changes behaviour. Override to consult whatever holds the
|
|
135
|
+
* extra state.
|
|
136
|
+
*/
|
|
137
|
+
get HasAdditionalUnsavedChanges(): boolean;
|
|
126
138
|
protected PendingRecordsDirty(): boolean;
|
|
127
139
|
protected PopulatePendingRecords(): void;
|
|
128
140
|
protected ValidatePendingRecords(): ValidationResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-component.d.ts","sourceRoot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I/C;;;OAGG;IACI,kBAAkB,IAAI,IAAI;IAIjC;;;OAGG;IACI,yBAAyB,IAAI,IAAI;yCAz/BpB,iBAAiB;2CAAjB,iBAAiB;CA+/BtC"}
|
|
@@ -171,6 +171,20 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
171
171
|
get PendingRecords() {
|
|
172
172
|
return this._pendingRecords;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Unsaved changes a form holds OUTSIDE its record's fields and pending records.
|
|
176
|
+
*
|
|
177
|
+
* A form whose sections own editors — a flow canvas, a designer, a grid — accumulates edits that
|
|
178
|
+
* neither `record.Dirty` nor `PendingRecordsDirty()` can see, because nothing on the entity
|
|
179
|
+
* changed. Without this the toolbar reports "no changes" while the user is looking at their own
|
|
180
|
+
* work, and the navigate-away guard lets them lose it silently.
|
|
181
|
+
*
|
|
182
|
+
* Default `false`, so no existing form changes behaviour. Override to consult whatever holds the
|
|
183
|
+
* extra state.
|
|
184
|
+
*/
|
|
185
|
+
get HasAdditionalUnsavedChanges() {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
174
188
|
PendingRecordsDirty() {
|
|
175
189
|
this.PopulatePendingRecords();
|
|
176
190
|
const pendingRecords = this.PendingRecords;
|
|
@@ -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,EAErC,QAAQ,EACgB,OAAO,EACzD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAuB,MAAM,wBAAwB,CAAC;AACpF,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AAC;YAC/C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,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;iPA7+BmB,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;2BAuHvB,2BAA2B;;;;;;iFAvHrB,iBAAiB;cADtC,SAAS;;kBAwFP,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';\nimport { EntityFormConfig } from './types/entity-form-config';\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\n /**\n * Per-instance presentation config (toolbar visibility, related-entity\n * sections, collapsibility, width, in-form navigation). Set by the form host\n * (`MjEntityFormHostComponent`) or any consumer that instantiates the form\n * directly. Read back by `MjRecordFormContainerComponent` and the collapsible\n * panels through the `FormComponent` reference, so it takes effect WITHOUT\n * regenerating the CodeGen-produced template. Null means \"use the container's\n * own defaults\" (the classic full-page tab behavior).\n */\n public Config: EntityFormConfig | null = null;\n\n /**\n * Variants applicable to the current (entity, user) tuple, supplied by the\n * Explorer-level form resolver. When more than one entry is present, the\n * record-form-container shows a picker that lets the user switch between\n * variants. Empty / single-entry arrays hide the picker.\n *\n * The container reads this via its `EffectiveVariants` accessor — generated\n * form templates do NOT need to bind it explicitly.\n */\n public Variants: { ID: string; Label: string; Scope: 'User' | 'Role' | 'Global'; Status: 'Active' | 'Pending' | 'Inactive' }[] = [];\n\n /**\n * ID of the currently-rendered variant (null when no override is active and\n * the form is the CodeGen / @RegisterClass default).\n */\n public CurrentVariantID: string | null = null;\n\n /**\n * Hook called when the user picks a different variant from the picker.\n * Default is a no-op; the Explorer-level single-record component replaces\n * this on the form instance to wire `FormResolverService.SetSelectedVariant`\n * and reload the record. Kept as a method (not an EventEmitter) so the host\n * doesn't need to subscribe — assignment is enough.\n */\n public OnVariantChanged: (variantID: string | null) => void = (_id) => {\n // host installs the real handler post-construction\n };\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 = this.ProviderToUse;\n // Bind FormStateService to the same provider this form is using.\n this.formStateService.Provider = md;\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 // Capture BEFORE any mutation — Revert() can clear the \"new\" flag on some\n // entities. We need to know whether this record was ever persisted so we\n // can tell the host to dismiss the form (there's nothing to view).\n const wasNeverSaved = !r.IsSaved;\n\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 // For never-saved records, ask the host to dismiss the form — leaving it\n // in view mode shows an empty record (there IS no record) and any\n // subsequent \"Create New\" click for the same entity would silently\n // reuse this abandoned form. Hosts that don't have a meaningful close\n // semantic can ignore this event.\n if (wasNeverSaved) {\n this.Navigate.emit({ Kind: 'dismiss', Reason: 'new-record-discarded' });\n }\n }\n }\n\n protected async InternalSaveRecord(): Promise<boolean> {\n if (this.record) {\n if (this._pendingRecords.length > 0) {\n const md = this.ProviderToUse;\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 = this.ProviderToUse;\n await md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey, isFavorite, md.CurrentUser);\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 = this.ProviderToUse;\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 = RunView.FromMetadataProvider(this.ProviderToUse);\n const md = this.ProviderToUse;\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 = this.ProviderToUse;\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 collapsibleSections: this.Config?.CollapsibleSections,\n enableRecordLinks: this.Config?.EnableRecordLinks,\n showRelatedEntities: this.Config?.ShowRelatedEntities,\n hiddenSectionKeys: this.Config?.HiddenSectionKeys,\n visibleSectionKeys: this.Config?.VisibleSectionKeys,\n allowSectionReorder: this.resolveAllowSectionReorder()\n };\n }\n\n /**\n * Resolves whether section drag-reorder is allowed for the current Config.\n * When no toolbar is rendered (dialog/slide-in, `Config.Toolbar === null`)\n * reorder is disabled; otherwise we honor the toolbar config's flag, defaulting\n * to allowed when unspecified (classic tab behavior).\n */\n private resolveAllowSectionReorder(): boolean {\n if (!this.Config) return true;\n if (this.Config.Toolbar === null) return false;\n return this.Config.Toolbar?.AllowSectionReorder ?? true;\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 section = this.sectionMap.get(sectionKey);\n // When the caller doesn't pass an explicit default, fall back to the value seeded by\n // initSections() — related-entity and System Metadata panels are seeded collapsed there.\n // Without this, FormStateService falls back to its global DEFAULT_SECTION_STATE (isExpanded=true),\n // which reports a never-before-visited related-entity panel as expanded and causes its data grid\n // (bound [AllowLoad]=\"IsSectionExpanded(key)\") to fetch on form open even while the panel is collapsed.\n // When the caller passes no explicit default, fall back to the value seeded by initSections().\n // If the section isn't in sectionMap yet — which happens during the window before the form's\n // async ngOnInit calls initSections(), e.g. when a record is opened already-loaded via an\n // in-app double-click so the grids render in the first change-detection pass — coalesce to\n // FALSE rather than letting FormStateService fall through to its global expanded default. A\n // missing section must NOT report as expanded, or its data grid (bound [AllowLoad]=\"IsSectionExpanded(key)\")\n // fires a RunView on open before the seeded collapsed default is applied.\n const resolvedDefault = defaultExpanded !== undefined ? defaultExpanded : (section?.isExpanded ?? false);\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.isSectionExpanded(entityName, sectionKey, resolvedDefault);\n }\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 /**\n * Component-level default width mode, used when the user has NOT\n * explicitly chosen a width for this entity yet (first visit, nothing\n * persisted in User Settings). Subclasses can override this — for\n * example, custom forms with full-bleed layouts should return\n * `'full-width'` here and the container will respect it on first open.\n *\n * Once the user toggles the width via the toolbar, their choice\n * persists via `setFormWidthMode()` and takes priority over this\n * default on subsequent opens.\n */\n public getDefaultFormWidthMode(): 'centered' | 'full-width' {\n return this.Config?.WidthMode ?? 'centered';\n }\n\n public getFormWidthMode(): 'centered' | 'full-width' {\n const entityName = this.getEntityName();\n if (entityName && this.formStateService.hasExplicitWidthMode(entityName)) {\n return this.formStateService.getWidthMode(entityName);\n }\n return this.getDefaultFormWidthMode();\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,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,EAErC,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,OA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AAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,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;iPA5/BmB,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;2BAuHvB,2BAA2B;;;;;;iFAvHrB,iBAAiB;cADtC,SAAS;;kBAwFP,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';\nimport { EntityFormConfig } from './types/entity-form-config';\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\n /**\n * Per-instance presentation config (toolbar visibility, related-entity\n * sections, collapsibility, width, in-form navigation). Set by the form host\n * (`MjEntityFormHostComponent`) or any consumer that instantiates the form\n * directly. Read back by `MjRecordFormContainerComponent` and the collapsible\n * panels through the `FormComponent` reference, so it takes effect WITHOUT\n * regenerating the CodeGen-produced template. Null means \"use the container's\n * own defaults\" (the classic full-page tab behavior).\n */\n public Config: EntityFormConfig | null = null;\n\n /**\n * Variants applicable to the current (entity, user) tuple, supplied by the\n * Explorer-level form resolver. When more than one entry is present, the\n * record-form-container shows a picker that lets the user switch between\n * variants. Empty / single-entry arrays hide the picker.\n *\n * The container reads this via its `EffectiveVariants` accessor — generated\n * form templates do NOT need to bind it explicitly.\n */\n public Variants: { ID: string; Label: string; Scope: 'User' | 'Role' | 'Global'; Status: 'Active' | 'Pending' | 'Inactive' }[] = [];\n\n /**\n * ID of the currently-rendered variant (null when no override is active and\n * the form is the CodeGen / @RegisterClass default).\n */\n public CurrentVariantID: string | null = null;\n\n /**\n * Hook called when the user picks a different variant from the picker.\n * Default is a no-op; the Explorer-level single-record component replaces\n * this on the form instance to wire `FormResolverService.SetSelectedVariant`\n * and reload the record. Kept as a method (not an EventEmitter) so the host\n * doesn't need to subscribe — assignment is enough.\n */\n public OnVariantChanged: (variantID: string | null) => void = (_id) => {\n // host installs the real handler post-construction\n };\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 = this.ProviderToUse;\n // Bind FormStateService to the same provider this form is using.\n this.formStateService.Provider = md;\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 /**\n * Unsaved changes a form holds OUTSIDE its record's fields and pending records.\n *\n * A form whose sections own editors — a flow canvas, a designer, a grid — accumulates edits that\n * neither `record.Dirty` nor `PendingRecordsDirty()` can see, because nothing on the entity\n * changed. Without this the toolbar reports \"no changes\" while the user is looking at their own\n * work, and the navigate-away guard lets them lose it silently.\n *\n * Default `false`, so no existing form changes behaviour. Override to consult whatever holds the\n * extra state.\n */\n public get HasAdditionalUnsavedChanges(): boolean {\n return false;\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 // Capture BEFORE any mutation — Revert() can clear the \"new\" flag on some\n // entities. We need to know whether this record was ever persisted so we\n // can tell the host to dismiss the form (there's nothing to view).\n const wasNeverSaved = !r.IsSaved;\n\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 // For never-saved records, ask the host to dismiss the form — leaving it\n // in view mode shows an empty record (there IS no record) and any\n // subsequent \"Create New\" click for the same entity would silently\n // reuse this abandoned form. Hosts that don't have a meaningful close\n // semantic can ignore this event.\n if (wasNeverSaved) {\n this.Navigate.emit({ Kind: 'dismiss', Reason: 'new-record-discarded' });\n }\n }\n }\n\n protected async InternalSaveRecord(): Promise<boolean> {\n if (this.record) {\n if (this._pendingRecords.length > 0) {\n const md = this.ProviderToUse;\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 = this.ProviderToUse;\n await md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKey, isFavorite, md.CurrentUser);\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 = this.ProviderToUse;\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 = RunView.FromMetadataProvider(this.ProviderToUse);\n const md = this.ProviderToUse;\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 = this.ProviderToUse;\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 collapsibleSections: this.Config?.CollapsibleSections,\n enableRecordLinks: this.Config?.EnableRecordLinks,\n showRelatedEntities: this.Config?.ShowRelatedEntities,\n hiddenSectionKeys: this.Config?.HiddenSectionKeys,\n visibleSectionKeys: this.Config?.VisibleSectionKeys,\n allowSectionReorder: this.resolveAllowSectionReorder()\n };\n }\n\n /**\n * Resolves whether section drag-reorder is allowed for the current Config.\n * When no toolbar is rendered (dialog/slide-in, `Config.Toolbar === null`)\n * reorder is disabled; otherwise we honor the toolbar config's flag, defaulting\n * to allowed when unspecified (classic tab behavior).\n */\n private resolveAllowSectionReorder(): boolean {\n if (!this.Config) return true;\n if (this.Config.Toolbar === null) return false;\n return this.Config.Toolbar?.AllowSectionReorder ?? true;\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 section = this.sectionMap.get(sectionKey);\n // When the caller doesn't pass an explicit default, fall back to the value seeded by\n // initSections() — related-entity and System Metadata panels are seeded collapsed there.\n // Without this, FormStateService falls back to its global DEFAULT_SECTION_STATE (isExpanded=true),\n // which reports a never-before-visited related-entity panel as expanded and causes its data grid\n // (bound [AllowLoad]=\"IsSectionExpanded(key)\") to fetch on form open even while the panel is collapsed.\n // When the caller passes no explicit default, fall back to the value seeded by initSections().\n // If the section isn't in sectionMap yet — which happens during the window before the form's\n // async ngOnInit calls initSections(), e.g. when a record is opened already-loaded via an\n // in-app double-click so the grids render in the first change-detection pass — coalesce to\n // FALSE rather than letting FormStateService fall through to its global expanded default. A\n // missing section must NOT report as expanded, or its data grid (bound [AllowLoad]=\"IsSectionExpanded(key)\")\n // fires a RunView on open before the seeded collapsed default is applied.\n const resolvedDefault = defaultExpanded !== undefined ? defaultExpanded : (section?.isExpanded ?? false);\n const entityName = this.getEntityName();\n if (entityName) {\n return this.formStateService.isSectionExpanded(entityName, sectionKey, resolvedDefault);\n }\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 /**\n * Component-level default width mode, used when the user has NOT\n * explicitly chosen a width for this entity yet (first visit, nothing\n * persisted in User Settings). Subclasses can override this — for\n * example, custom forms with full-bleed layouts should return\n * `'full-width'` here and the container will respect it on first open.\n *\n * Once the user toggles the width via the toolbar, their choice\n * persists via `setFormWidthMode()` and takes priority over this\n * default on subsequent opens.\n */\n public getDefaultFormWidthMode(): 'centered' | 'full-width' {\n return this.Config?.WidthMode ?? 'centered';\n }\n\n public getFormWidthMode(): 'centered' | 'full-width' {\n const entityName = this.getEntityName();\n if (entityName && this.formStateService.hasExplicitWidthMode(entityName)) {\n return this.formStateService.getWidthMode(entityName);\n }\n return this.getDefaultFormWidthMode();\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,7 +1,39 @@
|
|
|
1
|
-
import { BaseEntity } from "@memberjunction/core";
|
|
1
|
+
import { BaseEntity, TransactionGroupBase } from "@memberjunction/core";
|
|
2
2
|
import { BaseRecordComponent } from "./base-record-component";
|
|
3
3
|
export declare class BaseFormSectionComponent extends BaseRecordComponent {
|
|
4
4
|
record: BaseEntity;
|
|
5
5
|
EditMode: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether this section is holding edits the host form's Save still has to persist.
|
|
8
|
+
*
|
|
9
|
+
* A section that owns its own editor — a canvas, a grid, a designer — accumulates changes the
|
|
10
|
+
* host knows nothing about, so without this the form's dirty indicator says "no changes" while
|
|
11
|
+
* the user is looking at edits they have made. Default `false`: a section that only renders
|
|
12
|
+
* fields has nothing of its own to report.
|
|
13
|
+
*/
|
|
14
|
+
get HasPendingChanges(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Joins this section's writes to the host form's save.
|
|
17
|
+
*
|
|
18
|
+
* **Why a transaction group rather than "save yourself".** A section that saves independently
|
|
19
|
+
* gives the record two save buttons and two failure modes: the form can succeed while the
|
|
20
|
+
* section fails, leaving the user with a record that looks saved and edits that are gone.
|
|
21
|
+
* Queuing into the host's group makes the whole record atomic — everything lands or nothing does.
|
|
22
|
+
*
|
|
23
|
+
* Implementations should **queue** work on the group and return; the host submits. Return `false`
|
|
24
|
+
* to abort the save (the host will not submit). Default is a no-op that succeeds, so every
|
|
25
|
+
* existing section is unaffected.
|
|
26
|
+
*
|
|
27
|
+
* @param transactionGroup the host form's open group — do not submit it
|
|
28
|
+
*/
|
|
29
|
+
ContributeToSave(transactionGroup: TransactionGroupBase): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Called after the host form's save succeeded, so the section can clear its own dirty state.
|
|
32
|
+
*
|
|
33
|
+
* Separate from {@link ContributeToSave} because the section cannot know whether the group
|
|
34
|
+
* actually committed — clearing dirty inside the contribution would mark edits saved that a
|
|
35
|
+
* failed submit then discarded.
|
|
36
|
+
*/
|
|
37
|
+
OnHostSaveCompleted(): void;
|
|
6
38
|
}
|
|
7
39
|
//# sourceMappingURL=base-form-section-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-section-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-form-section-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"base-form-section-component.d.ts","sourceRoot":"","sources":["../../src/lib/base-form-section-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC7D,MAAM,EAAG,UAAU,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAS;IAE1B;;;;;;;OAOG;IACH,IAAW,iBAAiB,IAAI,OAAO,CAEtC;IAED;;;;;;;;;;;;;OAaG;IACU,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAMvF;;;;;;OAMG;IACI,mBAAmB,IAAI,IAAI;CAGrC"}
|
|
@@ -4,5 +4,45 @@ import { BaseRecordComponent } from "./base-record-component";
|
|
|
4
4
|
export class BaseFormSectionComponent extends BaseRecordComponent {
|
|
5
5
|
record;
|
|
6
6
|
EditMode = false;
|
|
7
|
+
/**
|
|
8
|
+
* Whether this section is holding edits the host form's Save still has to persist.
|
|
9
|
+
*
|
|
10
|
+
* A section that owns its own editor — a canvas, a grid, a designer — accumulates changes the
|
|
11
|
+
* host knows nothing about, so without this the form's dirty indicator says "no changes" while
|
|
12
|
+
* the user is looking at edits they have made. Default `false`: a section that only renders
|
|
13
|
+
* fields has nothing of its own to report.
|
|
14
|
+
*/
|
|
15
|
+
get HasPendingChanges() {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Joins this section's writes to the host form's save.
|
|
20
|
+
*
|
|
21
|
+
* **Why a transaction group rather than "save yourself".** A section that saves independently
|
|
22
|
+
* gives the record two save buttons and two failure modes: the form can succeed while the
|
|
23
|
+
* section fails, leaving the user with a record that looks saved and edits that are gone.
|
|
24
|
+
* Queuing into the host's group makes the whole record atomic — everything lands or nothing does.
|
|
25
|
+
*
|
|
26
|
+
* Implementations should **queue** work on the group and return; the host submits. Return `false`
|
|
27
|
+
* to abort the save (the host will not submit). Default is a no-op that succeeds, so every
|
|
28
|
+
* existing section is unaffected.
|
|
29
|
+
*
|
|
30
|
+
* @param transactionGroup the host form's open group — do not submit it
|
|
31
|
+
*/
|
|
32
|
+
async ContributeToSave(transactionGroup) {
|
|
33
|
+
// Referenced so the parameter is part of the contract rather than an unused formality.
|
|
34
|
+
void transactionGroup;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Called after the host form's save succeeded, so the section can clear its own dirty state.
|
|
39
|
+
*
|
|
40
|
+
* Separate from {@link ContributeToSave} because the section cannot know whether the group
|
|
41
|
+
* actually committed — clearing dirty inside the contribution would mark edits saved that a
|
|
42
|
+
* failed submit then discarded.
|
|
43
|
+
*/
|
|
44
|
+
OnHostSaveCompleted() {
|
|
45
|
+
// Nothing to do for a section with no state of its own.
|
|
46
|
+
}
|
|
7
47
|
}
|
|
8
48
|
//# sourceMappingURL=base-form-section-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-section-component.js","sourceRoot":"","sources":["../../src/lib/base-form-section-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,2GAA2G;AAC3G,kIAAkI;AAClI,MAAM,OAAO,wBAAyB,SAAQ,mBAAmB;IAC7D,MAAM,CAAc;IACpB,QAAQ,GAAY,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"base-form-section-component.js","sourceRoot":"","sources":["../../src/lib/base-form-section-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,2GAA2G;AAC3G,kIAAkI;AAClI,MAAM,OAAO,wBAAyB,SAAQ,mBAAmB;IAC7D,MAAM,CAAc;IACpB,QAAQ,GAAY,KAAK,CAAC;IAE1B;;;;;;;OAOG;IACH,IAAW,iBAAiB;QACxB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,KAAK,CAAC,gBAAgB,CAAC,gBAAsC;QAChE,uFAAuF;QACvF,KAAK,gBAAgB,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,mBAAmB;QACtB,wDAAwD;IAC5D,CAAC;CACJ","sourcesContent":["import { BaseEntity, TransactionGroupBase } from \"@memberjunction/core\";\nimport { BaseRecordComponent } from \"./base-record-component\";\n\n// This is a base class for form sections, it is used to have a clear hiearchy for all sections to subclass\n// which is primarily needed for the Class Factory and registration process to differentiate between sections and other components\nexport class BaseFormSectionComponent extends BaseRecordComponent {\n record!: BaseEntity;\n EditMode: boolean = false;\n\n /**\n * Whether this section is holding edits the host form's Save still has to persist.\n *\n * A section that owns its own editor — a canvas, a grid, a designer — accumulates changes the\n * host knows nothing about, so without this the form's dirty indicator says \"no changes\" while\n * the user is looking at edits they have made. Default `false`: a section that only renders\n * fields has nothing of its own to report.\n */\n public get HasPendingChanges(): boolean {\n return false;\n }\n\n /**\n * Joins this section's writes to the host form's save.\n *\n * **Why a transaction group rather than \"save yourself\".** A section that saves independently\n * gives the record two save buttons and two failure modes: the form can succeed while the\n * section fails, leaving the user with a record that looks saved and edits that are gone.\n * Queuing into the host's group makes the whole record atomic — everything lands or nothing does.\n *\n * Implementations should **queue** work on the group and return; the host submits. Return `false`\n * to abort the save (the host will not submit). Default is a no-op that succeeds, so every\n * existing section is unaffected.\n *\n * @param transactionGroup the host form's open group — do not submit it\n */\n public async ContributeToSave(transactionGroup: TransactionGroupBase): Promise<boolean> {\n // Referenced so the parameter is part of the contract rather than an unused formality.\n void transactionGroup;\n return true;\n }\n\n /**\n * Called after the host form's save succeeded, so the section can clear its own dirty state.\n *\n * Separate from {@link ContributeToSave} because the section cannot know whether the group\n * actually committed — clearing dirty inside the contribution would mark edits saved that a\n * failed submit then discarded.\n */\n public OnHostSaveCompleted(): void {\n // Nothing to do for a section with no state of its own.\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form-container.component.d.ts","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts"],"names":[],"mappings":"AA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AAoF;IAC1E,iBAAiB,2CAAkD;IAE7E,6CAA6C;IACnC,gBAAgB,qBAA4B;IAEtD,uFAAuF;IAC7E,oBAAoB,8CAAqD;IAEnF,gDAAgD;IACtC,uBAAuB,qBAA4B;IAE7D,6CAA6C;IACnC,oBAAoB,qBAA4B;IAE1D,sDAAsD;IAC5C,iBAAiB,kDAAyD;IAEpF;;;;;;OAMG;IACO,aAAa,8BAAqC;IAK5D,MAAM,EAAG,SAAS,CAAC,2BAA2B,CAAC,CAAC;IAIhD,sDAAsD;IACtD,OAAO,KAAK,EAAE,GAEb;IAID,IAAI,eAAe,IAAI,UAAU,CAEhC;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,oBAAoB,IAAI,OAAO,CAElC;IAED,IAAI,sBAAsB,IAAI,OAAO,CAEpC;IAED,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,IAAI,yBAAyB,IAAI,OAAO,CAEvC;IAED,IAAI,mBAAmB,IAAI,UAAU,GAAG,IAAI,CAE3C;IAED,IAAI,gBAAgB,IAAI,OAAO,
|
|
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;AAE/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AAEpF,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,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/B;IAED,4EAA4E;IAC5E,IAAI,mBAAmB,IAAI,MAAM,CAGhC;IAED,8DAA8D;IAC9D,eAAe,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM;IAI7C;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAW/C,gBAAgB,IAAI,IAAI;IAKxB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAO9C,qBAAqB,IAAI,IAAI;IAI7B,sBAAsB,IAAI,IAAI;yCA5zBnB,8BAA8B;2CAA9B,8BAA8B;CAg0B1C"}
|
|
@@ -240,7 +240,10 @@ export class MjRecordFormContainerComponent extends BaseAngularComponent {
|
|
|
240
240
|
}
|
|
241
241
|
get EffectiveIsDirty() {
|
|
242
242
|
if (this.fc) {
|
|
243
|
-
|
|
243
|
+
// OR'd with the form's own extra state: a section that owns an editor (a flow canvas, a
|
|
244
|
+
// designer) holds edits no entity field reflects, and reporting the record clean would let
|
|
245
|
+
// the navigate-away guard discard them without asking.
|
|
246
|
+
return (this.fc.record?.Dirty ?? false) || this.fc.HasAdditionalUnsavedChanges;
|
|
244
247
|
}
|
|
245
248
|
return this.IsDirty;
|
|
246
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-form-container.component.js","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts","../../../src/lib/container/record-form-container.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAC1D,eAAe,EACf,SAAS,EAAE,iBAAiB,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,YAAY,EAAwB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,M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AAS;mBAAC,sBAAsB;;kBA2BhC,KAAK;;kBAOL,KAAK;;kBAIL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAYL,KAAK;;kBAQL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBASN,MAAM;;kBAIN,eAAe;mBAAC,2BAA2B,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;kFA3IxD,8BAA8B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject, NgZone,\n ContentChildren, QueryList, AfterContentInit, OnDestroy,\n ViewChild, ViewEncapsulation\n} from '@angular/core';\nimport { BaseEntity, CompositeKey, EntityInfo, Metadata, RunView } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FormToolbarConfig, DEFAULT_TOOLBAR_CONFIG } from '../types/toolbar-config';\nimport { ResolveFormShowToolbar, ResolveFormToolbarConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { FormWidthMode } from '../types/form-types';\nimport { MjCollapsiblePanelComponent } from '../panel/collapsible-panel.component';\nimport { SectionManagerItem } from '../section-manager/section-manager.component';\nimport {\n BeforeSaveEventArgs,\n BeforeDeleteEventArgs,\n BeforeCancelEventArgs,\n BeforeHistoryViewEventArgs,\n BeforeListManagementEventArgs,\n CustomToolbarButtonClickEventArgs\n} from '../types/form-events';\nimport { BaseFormComponent } from '../base-form-component';\nimport { RestoreVersionEvent, RecordChangesComponent } from '@memberjunction/ng-record-changes';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { ListManagementResult } from '@memberjunction/ng-list-management';\nimport { FormSlotCoordinator } from '../panel-slot/form-slot-coordinator.service';\n\n/**\n * Display shape for the variant picker. Kept minimal so the Generic\n * container doesn't pull in resolver types; the Explorer-level component\n * that owns the resolver shapes its rows into this.\n */\nexport interface VariantPickerItem {\n ID: string;\n Label: string;\n Scope: 'User' | 'Role' | 'Global';\n Status: 'Active' | 'Pending' | 'Inactive';\n}\n\n/**\n * Top-level container that composes the toolbar, content slots, and sticky behavior.\n *\n * **Two usage modes:**\n *\n * 1. **With FormComponent** (generated forms): Pass `[FormComponent]=\"this\"` and the\n * container derives all state from the BaseFormComponent instance. Save/Cancel/Edit\n * are handled internally by calling FormComponent methods.\n *\n * 2. **Standalone**: Pass individual @Input properties and handle all @Output events.\n *\n * @example Generated form usage:\n * ```html\n * <mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n * (Navigate)=\"OnFormNavigate($event)\"\n * (DeleteRequested)=\"OnDeleteRequested()\"\n * (FavoriteToggled)=\"OnFavoriteToggled()\"\n * (HistoryRequested)=\"OnHistoryRequested()\"\n * (ListManagementRequested)=\"OnListManagementRequested()\">\n *\n * <mj-collapsible-panel SectionKey=\"details\" ...>\n * <mj-form-field ...></mj-form-field>\n * </mj-collapsible-panel>\n *\n * <mj-collapsible-panel SectionKey=\"relatedOrders\" Variant=\"related-entity\" ...>\n * <!-- related entity grid -->\n * </mj-collapsible-panel>\n * </mj-record-form-container>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-record-form-container',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './record-form-container.component.html',\n styleUrls: ['./record-form-container.component.css'],\n // FormSlotCoordinator scoped per-container so each form has its own\n // slot-presence map for fallback resolution. See FormPanelSlotComponent.\n providers: [FormSlotCoordinator],\n})\nexport class MjRecordFormContainerComponent extends BaseAngularComponent implements AfterContentInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n private notificationService = inject(MJNotificationService);\n private destroy$ = new Subject<void>();\n private panelNavReset$ = new Subject<void>();\n\n // ---- Internal State ----\n\n /** Reference to the record changes drawer (when visible) for triggering refresh after save */\n @ViewChild(RecordChangesComponent) private recordChangesDrawer?: RecordChangesComponent;\n\n /** Controls visibility of record changes drawer */\n ShowRecordChanges = false;\n\n /** Controls visibility of tags panel */\n ShowTagsPanel = false;\n\n /** Persisted tags panel width */\n TagsPanelWidth = 0;\n private static readonly TAGS_WIDTH_KEY = 'MJ_TagsPanel_Width';\n\n /** Number of tags on this record */\n TagCount = 0;\n\n /** Number of tracked record change versions for this record */\n VersionCount = 0;\n\n /** Controls visibility of list management dialog */\n ShowListManagement = false;\n\n /** Controls visibility of section manager drawer */\n ShowSectionManager = false;\n\n // ---- Primary Inputs ----\n\n /** The entity record being displayed/edited */\n @Input() Record!: BaseEntity;\n\n /**\n * Reference to the parent form component (e.g. BaseFormComponent subclass).\n * When provided, the container derives toolbar state from this reference and\n * handles Save/Cancel/Edit internally by calling its methods.\n */\n @Input() FormComponent: BaseFormComponent | null = null;\n\n // ---- Fallback Inputs (used when FormComponent is NOT provided) ----\n\n @Input() EntityInfo: EntityInfo | null = null;\n @Input() EditMode = false;\n @Input() UserCanEdit = false;\n @Input() UserCanDelete = false;\n @Input() IsFavorite = false;\n @Input() FavoriteInitDone = false;\n @Input() IsDirty = false;\n @Input() DirtyFieldNames: string[] = [];\n @Input() ListCount = 0;\n @Input() IsSaving = false;\n @Input() ToolbarConfig: FormToolbarConfig = DEFAULT_TOOLBAR_CONFIG;\n @Input() WidthMode: FormWidthMode = 'centered';\n\n /**\n * Variants available for this entity record. When more than one variant is\n * provided, a compact picker appears between the toolbar and the form body\n * letting the user switch which form is rendered. Empty / single-variant\n * lists hide the picker entirely.\n *\n * Each item is a plain object — we don't take a hard dep on the resolver's\n * row type from here (this is a Generic component; the Explorer-level\n * single-record component shapes the resolver row into this minimal form).\n */\n @Input() Variants: VariantPickerItem[] = [];\n\n /**\n * Override ID currently rendered. The picker highlights this entry. May be\n * null when the active form is a class-based @RegisterClass form (no\n * override is currently active) — in that case the picker still appears\n * with \"Default form\" as the leading row.\n */\n @Input() CurrentVariantID: string | null = null;\n\n // ---- Outputs ----\n\n /** Emitted for all navigation actions (the host app maps these to its routing) */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Emitted when edit mode changes (only in standalone mode; FormComponent mode handled internally) */\n @Output() EditModeChange = new EventEmitter<boolean>();\n\n /** Emitted BEFORE save - can be cancelled by setting event.Cancel = true */\n @Output() BeforeSave = new EventEmitter<BeforeSaveEventArgs>();\n\n /** Emitted when save is requested (only in standalone mode) */\n @Output() SaveRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE cancel - can be cancelled by setting event.Cancel = true */\n @Output() BeforeCancel = new EventEmitter<BeforeCancelEventArgs>();\n\n /** Emitted when cancel is requested (only in standalone mode) */\n @Output() CancelRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE delete - can be cancelled by setting event.Cancel = true */\n @Output() BeforeDelete = new EventEmitter<BeforeDeleteEventArgs>();\n\n /** Emitted when delete is confirmed (host app handles actual deletion) */\n @Output() DeleteRequested = new EventEmitter<void>();\n\n /** Emitted when favorite toggle is requested */\n @Output() FavoriteToggled = new EventEmitter<void>();\n\n /** Emitted BEFORE history view - can be cancelled by setting event.Cancel = true */\n @Output() BeforeHistoryView = new EventEmitter<BeforeHistoryViewEventArgs>();\n\n /** Emitted when history view is requested */\n @Output() HistoryRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE list management - can be cancelled by setting event.Cancel = true */\n @Output() BeforeListManagement = new EventEmitter<BeforeListManagementEventArgs>();\n\n /** Emitted when list management is requested */\n @Output() ListManagementRequested = new EventEmitter<void>();\n\n /** Emitted when show-changes is requested */\n @Output() ShowChangesRequested = new EventEmitter<void>();\n\n /** Emitted when a custom toolbar button is clicked */\n @Output() CustomButtonClick = new EventEmitter<CustomToolbarButtonClickEventArgs>();\n\n /**\n * Emitted when the user chooses a different form variant from the picker.\n * Carries the selected variant's override ID, or null when the user picks\n * the \"Default form\" row. The host is responsible for persisting the choice\n * (via FormResolverService.SetSelectedVariant) and reloading the record so\n * the new form mounts.\n */\n @Output() VariantChange = new EventEmitter<string | null>();\n\n // ---- Content Children ----\n\n @ContentChildren(MjCollapsiblePanelComponent, { descendants: true })\n Panels!: QueryList<MjCollapsiblePanelComponent>;\n\n // ---- FormComponent accessor ----\n\n /** Typed accessor for the form component reference */\n private get fc(): BaseFormComponent | null {\n return this.FormComponent;\n }\n\n // ---- Effective state (bridges FormComponent → toolbar inputs) ----\n\n get EffectiveRecord(): BaseEntity {\n return this.fc?.record ?? this.Record;\n }\n\n get EffectiveEditMode(): boolean {\n return this.fc?.EditMode ?? this.EditMode;\n }\n\n get EffectiveUserCanEdit(): boolean {\n return this.fc?.UserCanEdit ?? this.UserCanEdit;\n }\n\n get EffectiveUserCanDelete(): boolean {\n return this.fc?.UserCanDelete ?? this.UserCanDelete;\n }\n\n get EffectiveIsFavorite(): boolean {\n return this.fc?.IsFavorite ?? this.IsFavorite;\n }\n\n get EffectiveFavoriteInitDone(): boolean {\n return this.fc?.FavoriteInitDone ?? this.FavoriteInitDone;\n }\n\n get EffectiveEntityInfo(): EntityInfo | null {\n return (this.fc?.EntityInfo as EntityInfo) ?? this.EntityInfo;\n }\n\n get EffectiveIsDirty(): boolean {\n if (this.fc) {\n return this.fc.record?.Dirty ?? false;\n }\n return this.IsDirty;\n }\n\n get EffectiveDirtyFieldNames(): string[] {\n if (this.fc?.record?.Fields) {\n return this.fc.record.Fields.filter(f => f.Dirty).map(f => f.Name);\n }\n return this.DirtyFieldNames;\n }\n\n get EffectiveIsSaving(): boolean {\n return this.IsSaving;\n }\n\n get EffectiveWidthMode(): FormWidthMode {\n if (this.fc?.getFormWidthMode) {\n return this.fc.getFormWidthMode();\n }\n return this.WidthMode;\n }\n\n /**\n * Whether the in-form toolbar renders at all. Driven by the form's\n * `Config.Toolbar`: an explicit `null` (the dialog/slide-in default) hides\n * the entire toolbar so the surrounding chrome can own Save/Cancel/title.\n * Any other value (undefined or a partial config) keeps the toolbar.\n */\n get EffectiveShowToolbar(): boolean {\n return ResolveFormShowToolbar(this.fc?.Config);\n }\n\n /**\n * Effective toolbar config: the bound `ToolbarConfig` (or the default)\n * with the form's `Config.Toolbar` partial merged on top. This is the\n * no-regeneration bridge — generated templates never bind `[Config]`,\n * yet per-instance toolbar tweaks still take effect through `fc.Config`.\n */\n get EffectiveToolbarConfig(): FormToolbarConfig {\n return ResolveFormToolbarConfig(this.ToolbarConfig ?? DEFAULT_TOOLBAR_CONFIG, this.fc?.Config);\n }\n\n get EffectiveSearchFilter(): string {\n return this.fc?.searchFilter ?? '';\n }\n\n get EffectiveShowEmptyFields(): boolean {\n return this.fc?.showEmptyFields ?? false;\n }\n\n get EffectiveHasCustomSectionOrder(): boolean {\n if (this.fc?.hasCustomSectionOrder) {\n return this.fc.hasCustomSectionOrder();\n }\n return false;\n }\n\n // ---- Section counts ----\n\n get TotalSectionCount(): number {\n if (this.fc?.getTotalSectionCount) {\n return this.fc.getTotalSectionCount();\n }\n return this.Panels?.length ?? 0;\n }\n\n get VisibleSectionCount(): number {\n if (this.fc?.getVisibleSectionCount) {\n return this.fc.getVisibleSectionCount();\n }\n if (!this.Panels) return 0;\n return this.Panels.filter(p => p.IsVisible).length;\n }\n\n get ExpandedSectionCount(): number {\n if (this.fc?.getExpandedCount) {\n return this.fc.getExpandedCount();\n }\n if (!this.Panels) return 0;\n return this.Panels.filter(p => p.Expanded && p.IsVisible).length;\n }\n\n // ---- IS-A Related Panel ----\n\n /** Whether the current record has IS-A related items to display in the side panel */\n get HasIsaRelatedItems(): boolean {\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo) return false;\n\n const entityInfo = record.EntityInfo;\n\n // Child entity with overlapping parent — may have siblings\n if (entityInfo.IsChildType && entityInfo.ParentEntityInfo?.AllowMultipleSubtypes) {\n const parent = record.ISAParent;\n if (parent?.ISAChildren && parent.ISAChildren.length > 1) return true;\n }\n\n // Parent entity with children\n if (entityInfo.IsParentType) {\n if (entityInfo.AllowMultipleSubtypes && record.ISAChildren && record.ISAChildren.length > 0) return true;\n if (!entityInfo.AllowMultipleSubtypes && record.ISAChild) return true;\n }\n\n return false;\n }\n\n // ---- Section Manager ----\n\n /** Builds section info array from projected panels for the section manager drawer */\n get SectionManagerItems(): SectionManagerItem[] {\n if (!this.Panels) return [];\n return this.Panels.map(p => ({\n SectionKey: p.SectionKey,\n SectionName: p.SectionName,\n Variant: p.Variant,\n Icon: p.Icon\n }));\n }\n\n /** Current section order from the form component */\n get SectionManagerOrder(): string[] {\n if (this.fc?.getSectionOrder) {\n return this.fc.getSectionOrder();\n }\n return [];\n }\n\n // ---- Lifecycle ----\n\n ngAfterContentInit(): void {\n // Load saved tags panel width\n const savedWidth = UserInfoEngine.Instance.GetSetting(MjRecordFormContainerComponent.TAGS_WIDTH_KEY);\n if (savedWidth) this.TagsPanelWidth = parseInt(savedWidth, 10) || 0;\n\n // Subscribe to panel Navigate events and relay them\n this.SubscribeToPanelNavigateEvents();\n\n // Watch for panel changes to update counts and re-subscribe\n this.Panels.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.SubscribeToPanelNavigateEvents();\n this.cdr.markForCheck();\n });\n\n // Watch for changes to record dirty state\n this.watchRecordChanges();\n\n // Badge counts are loaded when the form emits RecordReady (see SubscribeToPanelNavigateEvents)\n }\n\n ngOnDestroy(): void {\n this.panelNavReset$.next();\n this.panelNavReset$.complete();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Subscribes to Navigate events from all child collapsible panels\n * and relays them through this container's Navigate output.\n */\n private SubscribeToPanelNavigateEvents(): void {\n this.panelNavReset$.next(); // tear down previous subscriptions\n // Subscribe to RecordReady on the form component — fires once after record is fully initialized\n if (this.fc) {\n this.fc.RecordReady.pipe(takeUntil(this.panelNavReset$)).subscribe(() => {\n this.LoadBadgeCounts();\n });\n }\n\n this.Panels.forEach(panel => {\n panel.Navigate.pipe(takeUntil(this.panelNavReset$)).subscribe((event: FormNavigationEvent) => {\n this.Navigate.emit(event);\n });\n });\n }\n\n /**\n * Monitor record dirty state changes and trigger change detection.\n * This ensures the edit banner updates when fields are modified.\n */\n private watchRecordChanges(): void {\n // Poll for dirty state changes (BaseEntity doesn't expose observables)\n const checkInterval = setInterval(() => {\n if (this.EffectiveRecord?.Dirty !== undefined) {\n this.cdr.markForCheck();\n }\n }, 200);\n\n // Cleanup on destroy\n this.destroy$.subscribe(() => clearInterval(checkInterval));\n }\n\n // ---- Badge Count Loading ----\n\n /**\n * Loads tag count and record change version count for toolbar badges.\n * Both queries run in parallel for performance.\n */\n private badgeCountsLoaded = false;\n\n private LoadBadgeCounts(): void {\n if (this.badgeCountsLoaded) return;\n\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo) return;\n\n this.badgeCountsLoaded = true;\n\n // Fire both queries in parallel — no await needed, they update state async\n this.LoadTagCount(record);\n this.LoadVersionCount(record);\n }\n\n /**\n * Queries the count of tagged items for the current entity + record\n * and updates the TagCount badge on the toolbar.\n */\n private async LoadTagCount(record: BaseEntity): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n // Don't narrow Fields — the server caches RunView results by entity+filter (ignoring Fields),\n // so a narrow query here would poison the cache for the subsequent full-field load in the Tags panel.\n const result = await rv.RunView({\n EntityName: 'MJ: Tagged Items',\n ExtraFilter: `EntityID='${record.EntityInfo.ID}' AND RecordID='${record.PrimaryKey.Values()}'`,\n ResultType: 'simple'\n });\n if (result.Success) {\n this.TagCount = result.Results.length;\n this.cdr.detectChanges();\n }\n } catch {\n // Non-critical — badge just stays at 0\n }\n }\n\n /**\n * Queries the count of record change entries for the current entity + record\n * and updates the VersionCount badge on the toolbar.\n */\n private async LoadVersionCount(record: BaseEntity): Promise<void> {\n if (!record.EntityInfo.TrackRecordChanges) return;\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ID: string }>({\n EntityName: 'MJ: Record Changes',\n Fields: ['ID'],\n ExtraFilter: `EntityID='${record.EntityInfo.ID}' AND RecordID='${record.PrimaryKey.ToConcatenatedString()}'`,\n ResultType: 'simple'\n });\n if (result.Success) {\n this.VersionCount = result.Results.length;\n this.cdr.detectChanges();\n }\n } catch {\n // Non-critical — badge just stays at 0\n }\n }\n\n // ---- Toolbar Event Handlers ----\n\n /**\n * Navigation events are always re-emitted for the host app to handle.\n */\n OnNavigate(event: FormNavigationEvent): void {\n this.Navigate.emit(event);\n }\n\n /**\n * Edit mode change: delegate to FormComponent if available, otherwise re-emit.\n */\n OnEditModeChange(editMode: boolean): void {\n if (this.fc) {\n if (editMode) {\n this.fc.StartEditMode();\n } else {\n this.fc.EndEditMode();\n }\n this.cdr.markForCheck();\n } else {\n this.EditModeChange.emit(editMode);\n }\n }\n\n /**\n * Save: delegate to FormComponent if available, otherwise re-emit.\n */\n async OnSaveRequested(): Promise<void> {\n if (this.fc?.SaveRecord) {\n // Mark as saving to prevent double-click\n this.IsSaving = true;\n this.cdr.markForCheck();\n\n try {\n await this.fc.SaveRecord(true);\n\n // After successful save, refresh version count badge and record changes drawer\n this.RefreshAfterSave();\n } finally {\n // Use microtask timing to avoid ExpressionChangedAfterItHasBeenCheckedError\n await Promise.resolve();\n this.ngZone.run(() => {\n this.IsSaving = false;\n this.cdr.markForCheck();\n });\n }\n } else {\n this.SaveRequested.emit();\n }\n }\n\n /**\n * Refreshes the version count badge and record changes drawer after a save.\n * The save operation creates a new RecordChange entry server-side, so we need\n * to update the UI to reflect the new version.\n */\n private RefreshAfterSave(): void {\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo?.TrackRecordChanges) return;\n\n // Refresh version count badge\n this.LoadVersionCount(record);\n\n // If the record changes drawer is open, refresh it too\n if (this.ShowRecordChanges && this.recordChangesDrawer) {\n this.recordChangesDrawer.Refresh();\n }\n }\n\n /**\n * Cancel: delegate to FormComponent if available, otherwise re-emit.\n */\n OnCancelRequested(): void {\n if (this.fc?.CancelEdit) {\n this.fc.CancelEdit();\n this.cdr.markForCheck();\n } else {\n this.CancelRequested.emit();\n }\n }\n\n /**\n * Delete, Favorite, History, Lists, ShowChanges: always re-emit for host app.\n */\n OnDeleteRequested(): void {\n this.DeleteRequested.emit();\n }\n\n OnFavoriteToggled(): void {\n this.FavoriteToggled.emit();\n }\n\n OnHistoryRequested(): void {\n // Check if event should be cancelled\n const beforeEvent = new BeforeHistoryViewEventArgs();\n this.BeforeHistoryView.emit(beforeEvent);\n if (beforeEvent.Cancel) return;\n\n // If not cancelled, show built-in record changes drawer\n this.ShowRecordChanges = true;\n this.cdr.markForCheck();\n\n // Also emit for backward compatibility\n this.HistoryRequested.emit();\n }\n\n OnListManagementRequested(): void {\n // Check if event should be cancelled\n const beforeEvent = new BeforeListManagementEventArgs();\n this.BeforeListManagement.emit(beforeEvent);\n if (beforeEvent.Cancel) return;\n\n // If not cancelled, show built-in list management dialog\n this.ShowListManagement = true;\n this.cdr.markForCheck();\n\n // Also emit for backward compatibility\n this.ListManagementRequested.emit();\n }\n\n OnTagsPanelToggled(): void {\n this.ShowTagsPanel = !this.ShowTagsPanel;\n this.cdr.detectChanges();\n }\n\n OnTagsPanelClosed(): void {\n this.ShowTagsPanel = false;\n this.cdr.detectChanges();\n\n // Refresh tag count — tags may have been added/removed while panel was open\n const record = this.EffectiveRecord;\n if (record?.EntityInfo) {\n this.LoadTagCount(record);\n }\n }\n\n /**\n * Handles live tag count updates from the tags panel component.\n */\n OnTagCountChanged(count: number): void {\n this.TagCount = count;\n this.cdr.markForCheck();\n }\n\n OnTagsPanelWidthChanged(width: number): void {\n this.TagsPanelWidth = width;\n UserInfoEngine.Instance.SetSettingDebounced(MjRecordFormContainerComponent.TAGS_WIDTH_KEY, String(width));\n }\n\n OnTagsRecordNavigate(event: { EntityName: string; RecordID: string }): void {\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(e => e.Name === event.EntityName);\n const pkey = new CompositeKey();\n if (entityInfo) {\n pkey.LoadFromURLSegment(entityInfo, event.RecordID);\n } else {\n pkey.KeyValuePairs = [{ FieldName: 'ID', Value: event.RecordID }];\n }\n this.Navigate.emit({ Kind: 'record', EntityName: event.EntityName, PrimaryKey: pkey });\n }\n\n OnRecordChangesClosed(): void {\n this.ShowRecordChanges = false;\n this.cdr.markForCheck();\n\n // Refresh version count — new changes may have occurred\n const record = this.EffectiveRecord;\n if (record?.EntityInfo) {\n this.LoadVersionCount(record);\n }\n }\n\n /**\n * Handles a restore request from the record-changes panel.\n *\n * The event payload now carries the FULL snapshot the user opted to apply\n * (the panel computes current-vs-snapshot diffs using the source change's\n * FullRecordJSON, and the user can deselect individual fields). Setting\n * the restore context before Save() causes the data provider to write the\n * resulting RecordChange row with `Source='Restore'`, `RestoredFromID`,\n * and `RestoreReason` populated — building the auditable lineage chain.\n */\n async OnRestoreRequested(event: RestoreVersionEvent): Promise<void> {\n const record = this.EffectiveRecord;\n if (!record) return;\n\n try {\n // Apply each selected snapshot field\n for (const fv of event.FieldValues) {\n record.Set(fv.FieldName, fv.Value);\n }\n\n // Mark the next save as a restore so the provider populates the\n // lineage columns. ClearRestoreContext is called in finally{} below\n // so it doesn't leak into subsequent saves on this entity instance.\n record.SetRestoreContext(event.SourceChangeID, event.Reason);\n\n try {\n const saved = await record.Save();\n if (saved) {\n const fieldCount = event.FieldValues.length;\n const reasonSuffix = event.Reason ? ` — \"${event.Reason}\"` : '';\n this.notificationService.CreateSimpleNotification(\n `Restored ${fieldCount} field${fieldCount === 1 ? '' : 's'} from version dated ${new Date(event.ChangedAt).toLocaleDateString()}${reasonSuffix}`,\n 'info', 3500,\n );\n\n // Refresh version count — the save just produced a new restore-tagged change.\n this.LoadVersionCount(record);\n this.cdr.markForCheck();\n } else {\n const errMsg = record.LatestResult?.CompleteMessage ?? 'unknown error';\n this.notificationService.CreateSimpleNotification(\n `Failed to save restored values: ${errMsg}`,\n 'error', 4500,\n );\n }\n } finally {\n record.ClearRestoreContext();\n }\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Unknown error';\n this.notificationService.CreateSimpleNotification(\n `Restore failed: ${message}`,\n 'error', 4000,\n );\n }\n }\n\n OnListManagementClosed(): void {\n this.ShowListManagement = false;\n this.cdr.markForCheck();\n }\n\n /**\n * Fired when the list-management dialog applies changes. Surfaces the\n * outcome — especially silently-skipped duplicates and failures, which\n * users otherwise misread as \"everything was added\".\n */\n OnListManagementComplete(result: ListManagementResult): void {\n const s = result.summary;\n if (s && (s.added > 0 || s.removed > 0 || s.skipped > 0 || s.failed > 0)) {\n const parts: string[] = [];\n if (s.added > 0) parts.push(`added to ${result.added.length} list${result.added.length === 1 ? '' : 's'}`);\n if (s.removed > 0) parts.push(`removed from ${result.removed.length} list${result.removed.length === 1 ? '' : 's'}`);\n if (s.skipped > 0) parts.push(`${s.skipped} duplicate${s.skipped === 1 ? '' : 's'} skipped`);\n if (s.failed > 0) parts.push(`${s.failed} failed`);\n this.notificationService.CreateSimpleNotification(\n `List changes applied: ${parts.join(', ')}`,\n s.failed > 0 ? 'warning' : 'success',\n s.failed > 0 ? 5000 : 3500,\n );\n }\n this.OnListManagementClosed();\n }\n\n OnShowChangesRequested(): void {\n if (this.fc?.ShowChanges) {\n this.fc.ShowChanges();\n } else {\n this.ShowChangesRequested.emit();\n }\n }\n\n // ---- Section Control Handlers ----\n\n OnFilterChange(filter: string): void {\n if (this.fc?.onFilterChange) {\n this.fc.onFilterChange(filter);\n this.cdr.markForCheck();\n }\n }\n\n OnExpandAll(): void {\n if (this.fc?.expandAllSections) {\n this.fc.expandAllSections();\n this.cdr.markForCheck();\n }\n }\n\n OnCollapseAll(): void {\n if (this.fc?.collapseAllSections) {\n this.fc.collapseAllSections();\n this.cdr.markForCheck();\n }\n }\n\n OnShowEmptyFieldsChange(show: boolean): void {\n if (this.fc) {\n this.fc.showEmptyFields = show;\n this.cdr.markForCheck();\n }\n }\n\n OnWidthModeChange(mode: FormWidthMode): void {\n if (this.fc?.setFormWidthMode) {\n this.fc.setFormWidthMode(mode);\n this.cdr.markForCheck();\n } else {\n this.WidthMode = mode;\n this.cdr.markForCheck();\n }\n }\n\n OnResetSectionOrder(): void {\n if (this.fc?.resetSectionOrder) {\n this.fc.resetSectionOrder();\n this.cdr.markForCheck();\n }\n }\n\n // ---- Variant picker ----\n\n /** Whether the variant dropdown menu is currently open. Toggled by the\n * control's click handler; closed on blur or after a row is picked. */\n _variantMenuOpen = false;\n\n /**\n * Effective variants — prefer the form component's list (set by the host\n * resolver) when present, fall back to the directly-bound @Input. This\n * means generated form templates don't need to bind [Variants] explicitly;\n * the host populates `instance.Variants` post-construction and the\n * container reads it through this accessor.\n */\n get EffectiveVariants(): VariantPickerItem[] {\n return (this.fc?.Variants as VariantPickerItem[] | undefined)\n ?? this.Variants\n ?? [];\n }\n\n get EffectiveCurrentVariantID(): string | null {\n return this.fc?.CurrentVariantID ?? this.CurrentVariantID;\n }\n\n /** Whether to show the variant picker at all. Hidden when the entity has\n * zero or one applicable variant — there's nothing to switch between. */\n get ShowVariantPicker(): boolean {\n return (this.EffectiveVariants?.length ?? 0) > 1;\n }\n\n /** Label for the currently-selected variant (or \"Default form\" if none). */\n get CurrentVariantLabel(): string {\n const v = this.EffectiveVariants?.find(x => UUIDsEqual(x.ID, this.EffectiveCurrentVariantID));\n return v?.Label ?? 'Default form';\n }\n\n /** Compact subtitle: scope + status, e.g. \"User · Active\". */\n variantSubtitle(v: VariantPickerItem): string {\n return `${v.Scope} · ${v.Status}`;\n }\n\n /**\n * User picked an item from the variant menu. If the host installed a\n * handler via `instance.OnVariantChanged`, call it; otherwise emit the\n * VariantChange event for standalone consumers.\n */\n OnVariantPicked(variantID: string | null): void {\n if (variantID === this.EffectiveCurrentVariantID) return;\n if (this.fc && typeof this.fc.OnVariantChanged === 'function') {\n this.fc.OnVariantChanged(variantID);\n } else {\n this.VariantChange.emit(variantID);\n }\n }\n\n // ---- Section Manager Handlers ----\n\n OnManageSections(): void {\n this.ShowSectionManager = true;\n this.cdr.markForCheck();\n }\n\n OnSectionOrderChange(newOrder: string[]): void {\n if (this.fc?.setSectionOrder) {\n this.fc.setSectionOrder(newOrder);\n this.cdr.markForCheck();\n }\n }\n\n OnSectionManagerReset(): void {\n this.OnResetSectionOrder();\n }\n\n OnSectionManagerClosed(): void {\n this.ShowSectionManager = false;\n this.cdr.markForCheck();\n }\n}\n","<!-- ============================================\n BEFORE-TOOLBAR SLOT\n ============================================ -->\n<ng-content select=\"[before-toolbar]\"></ng-content>\n\n<!-- ============================================\n TOOLBAR (bridges FormComponent state → toolbar inputs)\n Hidden entirely when Config.Toolbar === null (dialog/slide-in surfaces).\n ============================================ -->\n@if (EffectiveShowToolbar) {\n<mj-form-toolbar\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [UserCanEdit]=\"EffectiveUserCanEdit\"\n [UserCanDelete]=\"EffectiveUserCanDelete\"\n [IsFavorite]=\"EffectiveIsFavorite\"\n [FavoriteInitDone]=\"EffectiveFavoriteInitDone\"\n [IsDirty]=\"EffectiveIsDirty\"\n [DirtyFieldNames]=\"EffectiveDirtyFieldNames\"\n [ListCount]=\"ListCount\"\n [TagCount]=\"TagCount\"\n [VersionCount]=\"VersionCount\"\n [EntityInfo]=\"EffectiveEntityInfo\"\n [Config]=\"EffectiveToolbarConfig\"\n [IsSaving]=\"EffectiveIsSaving\"\n [VisibleSectionCount]=\"VisibleSectionCount\"\n [TotalSectionCount]=\"TotalSectionCount\"\n [ExpandedSectionCount]=\"ExpandedSectionCount\"\n [SearchFilter]=\"EffectiveSearchFilter\"\n [ShowEmptyFields]=\"EffectiveShowEmptyFields\"\n [WidthMode]=\"EffectiveWidthMode\"\n [HasCustomSectionOrder]=\"EffectiveHasCustomSectionOrder\"\n [Variants]=\"EffectiveVariants\"\n [CurrentVariantID]=\"EffectiveCurrentVariantID\"\n (Navigate)=\"OnNavigate($event)\"\n (EditModeChange)=\"OnEditModeChange($event)\"\n (BeforeSave)=\"BeforeSave.emit($event)\"\n (SaveRequested)=\"OnSaveRequested()\"\n (BeforeCancel)=\"BeforeCancel.emit($event)\"\n (CancelRequested)=\"OnCancelRequested()\"\n (BeforeDelete)=\"BeforeDelete.emit($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (BeforeHistoryView)=\"BeforeHistoryView.emit($event)\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (BeforeListManagement)=\"BeforeListManagement.emit($event)\"\n (ListManagementRequested)=\"OnListManagementRequested()\"\n (ShowChangesRequested)=\"OnShowChangesRequested()\"\n (CustomButtonClick)=\"CustomButtonClick.emit($event)\"\n (FilterChange)=\"OnFilterChange($event)\"\n (ExpandAllRequested)=\"OnExpandAll()\"\n (CollapseAllRequested)=\"OnCollapseAll()\"\n (ShowEmptyFieldsChange)=\"OnShowEmptyFieldsChange($event)\"\n (WidthModeChange)=\"OnWidthModeChange($event)\"\n (ResetSectionOrderRequested)=\"OnResetSectionOrder()\"\n (ManageSectionsRequested)=\"OnManageSections()\"\n (TagsPanelToggled)=\"OnTagsPanelToggled()\"\n (VariantPicked)=\"OnVariantPicked($event)\">\n</mj-form-toolbar>\n}\n\n<!-- ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n Variant picker is now embedded in <mj-form-toolbar> as a right-side\n button — see the [Variants]/[CurrentVariantID] inputs + (VariantPicked)\n output on the toolbar above. Inline strip was removed.\n ============================================ -->\n<div class=\"mj-forms-scroll-area\">\n <div class=\"mj-forms-panels-container\"\n [class.mj-forms-panels--full-width]=\"EffectiveWidthMode === 'full-width'\"\n [class.mj-forms-panels--edit-mode]=\"EffectiveEditMode\"\n [class.mj-forms-panels--has-isa-panel]=\"HasIsaRelatedItems\">\n <!-- Flex row: form panels on left, ISA side panel on right -->\n <div class=\"mj-forms-layout-row\">\n <!-- All panels in a single flex container — CSS order drives sequencing -->\n <div class=\"mj-forms-all-panels\">\n <ng-content></ng-content>\n\n <!--\n Container-provided fallback slot. ALWAYS present — last in document\n order — so any panel whose registered slot isn't found in the current\n form falls through here via FormSlotCoordinator's chain. Downstream\n consumers that haven't rerun CodeGen against the slot-emitting\n template still see every panel; they just render at the bottom\n instead of at their preferred position.\n -->\n @if (Record && FormComponent) {\n <mj-form-panel-slot\n [Entity]=\"Record.EntityInfo.Name\"\n Slot=\"after-everything\"\n [Record]=\"Record\"\n [FormComponent]=\"FormComponent\">\n </mj-form-panel-slot>\n }\n\n <!-- Empty state when no sections match search -->\n @if (EffectiveSearchFilter && VisibleSectionCount === 0) {\n <mj-empty-state class=\"mj-forms-empty-search-state\"\n Variant=\"no-results\"\n Title=\"No sections found\"\n [Message]=\"'No sections match "' + EffectiveSearchFilter + '". Try a different search term.'\"\n ActionText=\"Clear search\"\n ActionIcon=\"fa-solid fa-rotate-left\"\n ActionVariant=\"flat\"\n (Action)=\"OnFilterChange('')\" />\n }\n </div>\n\n <!-- IS-A Related Records Side Panel -->\n <mj-isa-related-panel\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [Collapsed]=\"EffectiveWidthMode === 'full-width'\"\n (Navigate)=\"OnNavigate($event)\">\n </mj-isa-related-panel>\n </div>\n </div>\n</div>\n\n<!-- ============================================\n RECORD CHANGES DRAWER (shown when history button clicked)\n ============================================ -->\n@if (ShowRecordChanges && EffectiveRecord) {\n <mj-record-changes\n [record]=\"EffectiveRecord\"\n [AllowRestore]=\"EffectiveUserCanEdit\"\n (RestoreRequested)=\"OnRestoreRequested($event)\"\n (dialogClosed)=\"OnRecordChangesClosed()\">\n </mj-record-changes>\n}\n\n<!-- ============================================\n TAGS PANEL (shown when tags button clicked)\n ============================================ -->\n@if (ShowTagsPanel && EffectiveRecord) {\n <mj-record-tags\n [Record]=\"EffectiveRecord\"\n [WidthPx]=\"TagsPanelWidth\"\n (PanelClosed)=\"OnTagsPanelClosed()\"\n (TagCountChanged)=\"OnTagCountChanged($event)\"\n (RecordNavigate)=\"OnTagsRecordNavigate($event)\"\n (WidthChanged)=\"OnTagsPanelWidthChanged($event)\">\n </mj-record-tags>\n}\n\n<!-- ============================================\n LIST MANAGEMENT DIALOG (shown when lists button clicked)\n ============================================ -->\n@if (ShowListManagement && EffectiveRecord) {\n <mj-list-management-dialog\n [visible]=\"ShowListManagement\"\n [config]=\"{\n mode: 'manage',\n entityId: EffectiveRecord.EntityInfo.ID,\n entityName: EffectiveRecord.EntityInfo.Name,\n recordIds: [EffectiveRecord.PrimaryKey.Values()[0]],\n allowCreate: true\n }\"\n (complete)=\"OnListManagementComplete($event)\"\n (cancel)=\"OnListManagementClosed()\">\n </mj-list-management-dialog>\n}\n\n<!-- ============================================\n SECTION MANAGER DRAWER (shown when manage-sections button clicked)\n ============================================ -->\n<mj-section-manager\n [Sections]=\"SectionManagerItems\"\n [SectionOrder]=\"SectionManagerOrder\"\n [Visible]=\"ShowSectionManager\"\n (SectionOrderChange)=\"OnSectionOrderChange($event)\"\n (ResetRequested)=\"OnSectionManagerReset()\"\n (Closed)=\"OnSectionManagerClosed()\">\n</mj-section-manager>\n"]}
|
|
1
|
+
{"version":3,"file":"record-form-container.component.js","sourceRoot":"","sources":["../../../src/lib/container/record-form-container.component.ts","../../../src/lib/container/record-form-container.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAC1D,eAAe,EACf,SAAS,EAAE,iBAAiB,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,YAAY,EAAwB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,UAAU,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N;;;iFDpFnB,8BAA8B;cAX1C,SAAS;6BACI,KAAK,YACP,0BAA0B,mBACnB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,aAK1B,CAAC,mBAAmB,CAAC;;kBAY/B,SAAS;mBAAC,sBAAsB;;kBA2BhC,KAAK;;kBAOL,KAAK;;kBAIL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAYL,KAAK;;kBAQL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBASN,MAAM;;kBAIN,eAAe;mBAAC,2BAA2B,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;kFA3IxD,8BAA8B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject, NgZone,\n ContentChildren, QueryList, AfterContentInit, OnDestroy,\n ViewChild, ViewEncapsulation\n} from '@angular/core';\nimport { BaseEntity, CompositeKey, EntityInfo, Metadata, RunView } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FormToolbarConfig, DEFAULT_TOOLBAR_CONFIG } from '../types/toolbar-config';\nimport { ResolveFormShowToolbar, ResolveFormToolbarConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { FormWidthMode } from '../types/form-types';\nimport { MjCollapsiblePanelComponent } from '../panel/collapsible-panel.component';\nimport { SectionManagerItem } from '../section-manager/section-manager.component';\nimport {\n BeforeSaveEventArgs,\n BeforeDeleteEventArgs,\n BeforeCancelEventArgs,\n BeforeHistoryViewEventArgs,\n BeforeListManagementEventArgs,\n CustomToolbarButtonClickEventArgs\n} from '../types/form-events';\nimport { BaseFormComponent } from '../base-form-component';\nimport { RestoreVersionEvent, RecordChangesComponent } from '@memberjunction/ng-record-changes';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { ListManagementResult } from '@memberjunction/ng-list-management';\nimport { FormSlotCoordinator } from '../panel-slot/form-slot-coordinator.service';\n\n/**\n * Display shape for the variant picker. Kept minimal so the Generic\n * container doesn't pull in resolver types; the Explorer-level component\n * that owns the resolver shapes its rows into this.\n */\nexport interface VariantPickerItem {\n ID: string;\n Label: string;\n Scope: 'User' | 'Role' | 'Global';\n Status: 'Active' | 'Pending' | 'Inactive';\n}\n\n/**\n * Top-level container that composes the toolbar, content slots, and sticky behavior.\n *\n * **Two usage modes:**\n *\n * 1. **With FormComponent** (generated forms): Pass `[FormComponent]=\"this\"` and the\n * container derives all state from the BaseFormComponent instance. Save/Cancel/Edit\n * are handled internally by calling FormComponent methods.\n *\n * 2. **Standalone**: Pass individual @Input properties and handle all @Output events.\n *\n * @example Generated form usage:\n * ```html\n * <mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n * (Navigate)=\"OnFormNavigate($event)\"\n * (DeleteRequested)=\"OnDeleteRequested()\"\n * (FavoriteToggled)=\"OnFavoriteToggled()\"\n * (HistoryRequested)=\"OnHistoryRequested()\"\n * (ListManagementRequested)=\"OnListManagementRequested()\">\n *\n * <mj-collapsible-panel SectionKey=\"details\" ...>\n * <mj-form-field ...></mj-form-field>\n * </mj-collapsible-panel>\n *\n * <mj-collapsible-panel SectionKey=\"relatedOrders\" Variant=\"related-entity\" ...>\n * <!-- related entity grid -->\n * </mj-collapsible-panel>\n * </mj-record-form-container>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-record-form-container',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './record-form-container.component.html',\n styleUrls: ['./record-form-container.component.css'],\n // FormSlotCoordinator scoped per-container so each form has its own\n // slot-presence map for fallback resolution. See FormPanelSlotComponent.\n providers: [FormSlotCoordinator],\n})\nexport class MjRecordFormContainerComponent extends BaseAngularComponent implements AfterContentInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n private notificationService = inject(MJNotificationService);\n private destroy$ = new Subject<void>();\n private panelNavReset$ = new Subject<void>();\n\n // ---- Internal State ----\n\n /** Reference to the record changes drawer (when visible) for triggering refresh after save */\n @ViewChild(RecordChangesComponent) private recordChangesDrawer?: RecordChangesComponent;\n\n /** Controls visibility of record changes drawer */\n ShowRecordChanges = false;\n\n /** Controls visibility of tags panel */\n ShowTagsPanel = false;\n\n /** Persisted tags panel width */\n TagsPanelWidth = 0;\n private static readonly TAGS_WIDTH_KEY = 'MJ_TagsPanel_Width';\n\n /** Number of tags on this record */\n TagCount = 0;\n\n /** Number of tracked record change versions for this record */\n VersionCount = 0;\n\n /** Controls visibility of list management dialog */\n ShowListManagement = false;\n\n /** Controls visibility of section manager drawer */\n ShowSectionManager = false;\n\n // ---- Primary Inputs ----\n\n /** The entity record being displayed/edited */\n @Input() Record!: BaseEntity;\n\n /**\n * Reference to the parent form component (e.g. BaseFormComponent subclass).\n * When provided, the container derives toolbar state from this reference and\n * handles Save/Cancel/Edit internally by calling its methods.\n */\n @Input() FormComponent: BaseFormComponent | null = null;\n\n // ---- Fallback Inputs (used when FormComponent is NOT provided) ----\n\n @Input() EntityInfo: EntityInfo | null = null;\n @Input() EditMode = false;\n @Input() UserCanEdit = false;\n @Input() UserCanDelete = false;\n @Input() IsFavorite = false;\n @Input() FavoriteInitDone = false;\n @Input() IsDirty = false;\n @Input() DirtyFieldNames: string[] = [];\n @Input() ListCount = 0;\n @Input() IsSaving = false;\n @Input() ToolbarConfig: FormToolbarConfig = DEFAULT_TOOLBAR_CONFIG;\n @Input() WidthMode: FormWidthMode = 'centered';\n\n /**\n * Variants available for this entity record. When more than one variant is\n * provided, a compact picker appears between the toolbar and the form body\n * letting the user switch which form is rendered. Empty / single-variant\n * lists hide the picker entirely.\n *\n * Each item is a plain object — we don't take a hard dep on the resolver's\n * row type from here (this is a Generic component; the Explorer-level\n * single-record component shapes the resolver row into this minimal form).\n */\n @Input() Variants: VariantPickerItem[] = [];\n\n /**\n * Override ID currently rendered. The picker highlights this entry. May be\n * null when the active form is a class-based @RegisterClass form (no\n * override is currently active) — in that case the picker still appears\n * with \"Default form\" as the leading row.\n */\n @Input() CurrentVariantID: string | null = null;\n\n // ---- Outputs ----\n\n /** Emitted for all navigation actions (the host app maps these to its routing) */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Emitted when edit mode changes (only in standalone mode; FormComponent mode handled internally) */\n @Output() EditModeChange = new EventEmitter<boolean>();\n\n /** Emitted BEFORE save - can be cancelled by setting event.Cancel = true */\n @Output() BeforeSave = new EventEmitter<BeforeSaveEventArgs>();\n\n /** Emitted when save is requested (only in standalone mode) */\n @Output() SaveRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE cancel - can be cancelled by setting event.Cancel = true */\n @Output() BeforeCancel = new EventEmitter<BeforeCancelEventArgs>();\n\n /** Emitted when cancel is requested (only in standalone mode) */\n @Output() CancelRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE delete - can be cancelled by setting event.Cancel = true */\n @Output() BeforeDelete = new EventEmitter<BeforeDeleteEventArgs>();\n\n /** Emitted when delete is confirmed (host app handles actual deletion) */\n @Output() DeleteRequested = new EventEmitter<void>();\n\n /** Emitted when favorite toggle is requested */\n @Output() FavoriteToggled = new EventEmitter<void>();\n\n /** Emitted BEFORE history view - can be cancelled by setting event.Cancel = true */\n @Output() BeforeHistoryView = new EventEmitter<BeforeHistoryViewEventArgs>();\n\n /** Emitted when history view is requested */\n @Output() HistoryRequested = new EventEmitter<void>();\n\n /** Emitted BEFORE list management - can be cancelled by setting event.Cancel = true */\n @Output() BeforeListManagement = new EventEmitter<BeforeListManagementEventArgs>();\n\n /** Emitted when list management is requested */\n @Output() ListManagementRequested = new EventEmitter<void>();\n\n /** Emitted when show-changes is requested */\n @Output() ShowChangesRequested = new EventEmitter<void>();\n\n /** Emitted when a custom toolbar button is clicked */\n @Output() CustomButtonClick = new EventEmitter<CustomToolbarButtonClickEventArgs>();\n\n /**\n * Emitted when the user chooses a different form variant from the picker.\n * Carries the selected variant's override ID, or null when the user picks\n * the \"Default form\" row. The host is responsible for persisting the choice\n * (via FormResolverService.SetSelectedVariant) and reloading the record so\n * the new form mounts.\n */\n @Output() VariantChange = new EventEmitter<string | null>();\n\n // ---- Content Children ----\n\n @ContentChildren(MjCollapsiblePanelComponent, { descendants: true })\n Panels!: QueryList<MjCollapsiblePanelComponent>;\n\n // ---- FormComponent accessor ----\n\n /** Typed accessor for the form component reference */\n private get fc(): BaseFormComponent | null {\n return this.FormComponent;\n }\n\n // ---- Effective state (bridges FormComponent → toolbar inputs) ----\n\n get EffectiveRecord(): BaseEntity {\n return this.fc?.record ?? this.Record;\n }\n\n get EffectiveEditMode(): boolean {\n return this.fc?.EditMode ?? this.EditMode;\n }\n\n get EffectiveUserCanEdit(): boolean {\n return this.fc?.UserCanEdit ?? this.UserCanEdit;\n }\n\n get EffectiveUserCanDelete(): boolean {\n return this.fc?.UserCanDelete ?? this.UserCanDelete;\n }\n\n get EffectiveIsFavorite(): boolean {\n return this.fc?.IsFavorite ?? this.IsFavorite;\n }\n\n get EffectiveFavoriteInitDone(): boolean {\n return this.fc?.FavoriteInitDone ?? this.FavoriteInitDone;\n }\n\n get EffectiveEntityInfo(): EntityInfo | null {\n return (this.fc?.EntityInfo as EntityInfo) ?? this.EntityInfo;\n }\n\n get EffectiveIsDirty(): boolean {\n if (this.fc) {\n // OR'd with the form's own extra state: a section that owns an editor (a flow canvas, a\n // designer) holds edits no entity field reflects, and reporting the record clean would let\n // the navigate-away guard discard them without asking.\n return (this.fc.record?.Dirty ?? false) || this.fc.HasAdditionalUnsavedChanges;\n }\n return this.IsDirty;\n }\n\n get EffectiveDirtyFieldNames(): string[] {\n if (this.fc?.record?.Fields) {\n return this.fc.record.Fields.filter(f => f.Dirty).map(f => f.Name);\n }\n return this.DirtyFieldNames;\n }\n\n get EffectiveIsSaving(): boolean {\n return this.IsSaving;\n }\n\n get EffectiveWidthMode(): FormWidthMode {\n if (this.fc?.getFormWidthMode) {\n return this.fc.getFormWidthMode();\n }\n return this.WidthMode;\n }\n\n /**\n * Whether the in-form toolbar renders at all. Driven by the form's\n * `Config.Toolbar`: an explicit `null` (the dialog/slide-in default) hides\n * the entire toolbar so the surrounding chrome can own Save/Cancel/title.\n * Any other value (undefined or a partial config) keeps the toolbar.\n */\n get EffectiveShowToolbar(): boolean {\n return ResolveFormShowToolbar(this.fc?.Config);\n }\n\n /**\n * Effective toolbar config: the bound `ToolbarConfig` (or the default)\n * with the form's `Config.Toolbar` partial merged on top. This is the\n * no-regeneration bridge — generated templates never bind `[Config]`,\n * yet per-instance toolbar tweaks still take effect through `fc.Config`.\n */\n get EffectiveToolbarConfig(): FormToolbarConfig {\n return ResolveFormToolbarConfig(this.ToolbarConfig ?? DEFAULT_TOOLBAR_CONFIG, this.fc?.Config);\n }\n\n get EffectiveSearchFilter(): string {\n return this.fc?.searchFilter ?? '';\n }\n\n get EffectiveShowEmptyFields(): boolean {\n return this.fc?.showEmptyFields ?? false;\n }\n\n get EffectiveHasCustomSectionOrder(): boolean {\n if (this.fc?.hasCustomSectionOrder) {\n return this.fc.hasCustomSectionOrder();\n }\n return false;\n }\n\n // ---- Section counts ----\n\n get TotalSectionCount(): number {\n if (this.fc?.getTotalSectionCount) {\n return this.fc.getTotalSectionCount();\n }\n return this.Panels?.length ?? 0;\n }\n\n get VisibleSectionCount(): number {\n if (this.fc?.getVisibleSectionCount) {\n return this.fc.getVisibleSectionCount();\n }\n if (!this.Panels) return 0;\n return this.Panels.filter(p => p.IsVisible).length;\n }\n\n get ExpandedSectionCount(): number {\n if (this.fc?.getExpandedCount) {\n return this.fc.getExpandedCount();\n }\n if (!this.Panels) return 0;\n return this.Panels.filter(p => p.Expanded && p.IsVisible).length;\n }\n\n // ---- IS-A Related Panel ----\n\n /** Whether the current record has IS-A related items to display in the side panel */\n get HasIsaRelatedItems(): boolean {\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo) return false;\n\n const entityInfo = record.EntityInfo;\n\n // Child entity with overlapping parent — may have siblings\n if (entityInfo.IsChildType && entityInfo.ParentEntityInfo?.AllowMultipleSubtypes) {\n const parent = record.ISAParent;\n if (parent?.ISAChildren && parent.ISAChildren.length > 1) return true;\n }\n\n // Parent entity with children\n if (entityInfo.IsParentType) {\n if (entityInfo.AllowMultipleSubtypes && record.ISAChildren && record.ISAChildren.length > 0) return true;\n if (!entityInfo.AllowMultipleSubtypes && record.ISAChild) return true;\n }\n\n return false;\n }\n\n // ---- Section Manager ----\n\n /** Builds section info array from projected panels for the section manager drawer */\n get SectionManagerItems(): SectionManagerItem[] {\n if (!this.Panels) return [];\n return this.Panels.map(p => ({\n SectionKey: p.SectionKey,\n SectionName: p.SectionName,\n Variant: p.Variant,\n Icon: p.Icon\n }));\n }\n\n /** Current section order from the form component */\n get SectionManagerOrder(): string[] {\n if (this.fc?.getSectionOrder) {\n return this.fc.getSectionOrder();\n }\n return [];\n }\n\n // ---- Lifecycle ----\n\n ngAfterContentInit(): void {\n // Load saved tags panel width\n const savedWidth = UserInfoEngine.Instance.GetSetting(MjRecordFormContainerComponent.TAGS_WIDTH_KEY);\n if (savedWidth) this.TagsPanelWidth = parseInt(savedWidth, 10) || 0;\n\n // Subscribe to panel Navigate events and relay them\n this.SubscribeToPanelNavigateEvents();\n\n // Watch for panel changes to update counts and re-subscribe\n this.Panels.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.SubscribeToPanelNavigateEvents();\n this.cdr.markForCheck();\n });\n\n // Watch for changes to record dirty state\n this.watchRecordChanges();\n\n // Badge counts are loaded when the form emits RecordReady (see SubscribeToPanelNavigateEvents)\n }\n\n ngOnDestroy(): void {\n this.panelNavReset$.next();\n this.panelNavReset$.complete();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Subscribes to Navigate events from all child collapsible panels\n * and relays them through this container's Navigate output.\n */\n private SubscribeToPanelNavigateEvents(): void {\n this.panelNavReset$.next(); // tear down previous subscriptions\n // Subscribe to RecordReady on the form component — fires once after record is fully initialized\n if (this.fc) {\n this.fc.RecordReady.pipe(takeUntil(this.panelNavReset$)).subscribe(() => {\n this.LoadBadgeCounts();\n });\n }\n\n this.Panels.forEach(panel => {\n panel.Navigate.pipe(takeUntil(this.panelNavReset$)).subscribe((event: FormNavigationEvent) => {\n this.Navigate.emit(event);\n });\n });\n }\n\n /**\n * Monitor record dirty state changes and trigger change detection.\n * This ensures the edit banner updates when fields are modified.\n */\n private watchRecordChanges(): void {\n // Poll for dirty state changes (BaseEntity doesn't expose observables)\n const checkInterval = setInterval(() => {\n if (this.EffectiveRecord?.Dirty !== undefined) {\n this.cdr.markForCheck();\n }\n }, 200);\n\n // Cleanup on destroy\n this.destroy$.subscribe(() => clearInterval(checkInterval));\n }\n\n // ---- Badge Count Loading ----\n\n /**\n * Loads tag count and record change version count for toolbar badges.\n * Both queries run in parallel for performance.\n */\n private badgeCountsLoaded = false;\n\n private LoadBadgeCounts(): void {\n if (this.badgeCountsLoaded) return;\n\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo) return;\n\n this.badgeCountsLoaded = true;\n\n // Fire both queries in parallel — no await needed, they update state async\n this.LoadTagCount(record);\n this.LoadVersionCount(record);\n }\n\n /**\n * Queries the count of tagged items for the current entity + record\n * and updates the TagCount badge on the toolbar.\n */\n private async LoadTagCount(record: BaseEntity): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n // Don't narrow Fields — the server caches RunView results by entity+filter (ignoring Fields),\n // so a narrow query here would poison the cache for the subsequent full-field load in the Tags panel.\n const result = await rv.RunView({\n EntityName: 'MJ: Tagged Items',\n ExtraFilter: `EntityID='${record.EntityInfo.ID}' AND RecordID='${record.PrimaryKey.Values()}'`,\n ResultType: 'simple'\n });\n if (result.Success) {\n this.TagCount = result.Results.length;\n this.cdr.detectChanges();\n }\n } catch {\n // Non-critical — badge just stays at 0\n }\n }\n\n /**\n * Queries the count of record change entries for the current entity + record\n * and updates the VersionCount badge on the toolbar.\n */\n private async LoadVersionCount(record: BaseEntity): Promise<void> {\n if (!record.EntityInfo.TrackRecordChanges) return;\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ID: string }>({\n EntityName: 'MJ: Record Changes',\n Fields: ['ID'],\n ExtraFilter: `EntityID='${record.EntityInfo.ID}' AND RecordID='${record.PrimaryKey.ToConcatenatedString()}'`,\n ResultType: 'simple'\n });\n if (result.Success) {\n this.VersionCount = result.Results.length;\n this.cdr.detectChanges();\n }\n } catch {\n // Non-critical — badge just stays at 0\n }\n }\n\n // ---- Toolbar Event Handlers ----\n\n /**\n * Navigation events are always re-emitted for the host app to handle.\n */\n OnNavigate(event: FormNavigationEvent): void {\n this.Navigate.emit(event);\n }\n\n /**\n * Edit mode change: delegate to FormComponent if available, otherwise re-emit.\n */\n OnEditModeChange(editMode: boolean): void {\n if (this.fc) {\n if (editMode) {\n this.fc.StartEditMode();\n } else {\n this.fc.EndEditMode();\n }\n this.cdr.markForCheck();\n } else {\n this.EditModeChange.emit(editMode);\n }\n }\n\n /**\n * Save: delegate to FormComponent if available, otherwise re-emit.\n */\n async OnSaveRequested(): Promise<void> {\n if (this.fc?.SaveRecord) {\n // Mark as saving to prevent double-click\n this.IsSaving = true;\n this.cdr.markForCheck();\n\n try {\n await this.fc.SaveRecord(true);\n\n // After successful save, refresh version count badge and record changes drawer\n this.RefreshAfterSave();\n } finally {\n // Use microtask timing to avoid ExpressionChangedAfterItHasBeenCheckedError\n await Promise.resolve();\n this.ngZone.run(() => {\n this.IsSaving = false;\n this.cdr.markForCheck();\n });\n }\n } else {\n this.SaveRequested.emit();\n }\n }\n\n /**\n * Refreshes the version count badge and record changes drawer after a save.\n * The save operation creates a new RecordChange entry server-side, so we need\n * to update the UI to reflect the new version.\n */\n private RefreshAfterSave(): void {\n const record = this.EffectiveRecord;\n if (!record?.EntityInfo?.TrackRecordChanges) return;\n\n // Refresh version count badge\n this.LoadVersionCount(record);\n\n // If the record changes drawer is open, refresh it too\n if (this.ShowRecordChanges && this.recordChangesDrawer) {\n this.recordChangesDrawer.Refresh();\n }\n }\n\n /**\n * Cancel: delegate to FormComponent if available, otherwise re-emit.\n */\n OnCancelRequested(): void {\n if (this.fc?.CancelEdit) {\n this.fc.CancelEdit();\n this.cdr.markForCheck();\n } else {\n this.CancelRequested.emit();\n }\n }\n\n /**\n * Delete, Favorite, History, Lists, ShowChanges: always re-emit for host app.\n */\n OnDeleteRequested(): void {\n this.DeleteRequested.emit();\n }\n\n OnFavoriteToggled(): void {\n this.FavoriteToggled.emit();\n }\n\n OnHistoryRequested(): void {\n // Check if event should be cancelled\n const beforeEvent = new BeforeHistoryViewEventArgs();\n this.BeforeHistoryView.emit(beforeEvent);\n if (beforeEvent.Cancel) return;\n\n // If not cancelled, show built-in record changes drawer\n this.ShowRecordChanges = true;\n this.cdr.markForCheck();\n\n // Also emit for backward compatibility\n this.HistoryRequested.emit();\n }\n\n OnListManagementRequested(): void {\n // Check if event should be cancelled\n const beforeEvent = new BeforeListManagementEventArgs();\n this.BeforeListManagement.emit(beforeEvent);\n if (beforeEvent.Cancel) return;\n\n // If not cancelled, show built-in list management dialog\n this.ShowListManagement = true;\n this.cdr.markForCheck();\n\n // Also emit for backward compatibility\n this.ListManagementRequested.emit();\n }\n\n OnTagsPanelToggled(): void {\n this.ShowTagsPanel = !this.ShowTagsPanel;\n this.cdr.detectChanges();\n }\n\n OnTagsPanelClosed(): void {\n this.ShowTagsPanel = false;\n this.cdr.detectChanges();\n\n // Refresh tag count — tags may have been added/removed while panel was open\n const record = this.EffectiveRecord;\n if (record?.EntityInfo) {\n this.LoadTagCount(record);\n }\n }\n\n /**\n * Handles live tag count updates from the tags panel component.\n */\n OnTagCountChanged(count: number): void {\n this.TagCount = count;\n this.cdr.markForCheck();\n }\n\n OnTagsPanelWidthChanged(width: number): void {\n this.TagsPanelWidth = width;\n UserInfoEngine.Instance.SetSettingDebounced(MjRecordFormContainerComponent.TAGS_WIDTH_KEY, String(width));\n }\n\n OnTagsRecordNavigate(event: { EntityName: string; RecordID: string }): void {\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(e => e.Name === event.EntityName);\n const pkey = new CompositeKey();\n if (entityInfo) {\n pkey.LoadFromURLSegment(entityInfo, event.RecordID);\n } else {\n pkey.KeyValuePairs = [{ FieldName: 'ID', Value: event.RecordID }];\n }\n this.Navigate.emit({ Kind: 'record', EntityName: event.EntityName, PrimaryKey: pkey });\n }\n\n OnRecordChangesClosed(): void {\n this.ShowRecordChanges = false;\n this.cdr.markForCheck();\n\n // Refresh version count — new changes may have occurred\n const record = this.EffectiveRecord;\n if (record?.EntityInfo) {\n this.LoadVersionCount(record);\n }\n }\n\n /**\n * Handles a restore request from the record-changes panel.\n *\n * The event payload now carries the FULL snapshot the user opted to apply\n * (the panel computes current-vs-snapshot diffs using the source change's\n * FullRecordJSON, and the user can deselect individual fields). Setting\n * the restore context before Save() causes the data provider to write the\n * resulting RecordChange row with `Source='Restore'`, `RestoredFromID`,\n * and `RestoreReason` populated — building the auditable lineage chain.\n */\n async OnRestoreRequested(event: RestoreVersionEvent): Promise<void> {\n const record = this.EffectiveRecord;\n if (!record) return;\n\n try {\n // Apply each selected snapshot field\n for (const fv of event.FieldValues) {\n record.Set(fv.FieldName, fv.Value);\n }\n\n // Mark the next save as a restore so the provider populates the\n // lineage columns. ClearRestoreContext is called in finally{} below\n // so it doesn't leak into subsequent saves on this entity instance.\n record.SetRestoreContext(event.SourceChangeID, event.Reason);\n\n try {\n const saved = await record.Save();\n if (saved) {\n const fieldCount = event.FieldValues.length;\n const reasonSuffix = event.Reason ? ` — \"${event.Reason}\"` : '';\n this.notificationService.CreateSimpleNotification(\n `Restored ${fieldCount} field${fieldCount === 1 ? '' : 's'} from version dated ${new Date(event.ChangedAt).toLocaleDateString()}${reasonSuffix}`,\n 'info', 3500,\n );\n\n // Refresh version count — the save just produced a new restore-tagged change.\n this.LoadVersionCount(record);\n this.cdr.markForCheck();\n } else {\n const errMsg = record.LatestResult?.CompleteMessage ?? 'unknown error';\n this.notificationService.CreateSimpleNotification(\n `Failed to save restored values: ${errMsg}`,\n 'error', 4500,\n );\n }\n } finally {\n record.ClearRestoreContext();\n }\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Unknown error';\n this.notificationService.CreateSimpleNotification(\n `Restore failed: ${message}`,\n 'error', 4000,\n );\n }\n }\n\n OnListManagementClosed(): void {\n this.ShowListManagement = false;\n this.cdr.markForCheck();\n }\n\n /**\n * Fired when the list-management dialog applies changes. Surfaces the\n * outcome — especially silently-skipped duplicates and failures, which\n * users otherwise misread as \"everything was added\".\n */\n OnListManagementComplete(result: ListManagementResult): void {\n const s = result.summary;\n if (s && (s.added > 0 || s.removed > 0 || s.skipped > 0 || s.failed > 0)) {\n const parts: string[] = [];\n if (s.added > 0) parts.push(`added to ${result.added.length} list${result.added.length === 1 ? '' : 's'}`);\n if (s.removed > 0) parts.push(`removed from ${result.removed.length} list${result.removed.length === 1 ? '' : 's'}`);\n if (s.skipped > 0) parts.push(`${s.skipped} duplicate${s.skipped === 1 ? '' : 's'} skipped`);\n if (s.failed > 0) parts.push(`${s.failed} failed`);\n this.notificationService.CreateSimpleNotification(\n `List changes applied: ${parts.join(', ')}`,\n s.failed > 0 ? 'warning' : 'success',\n s.failed > 0 ? 5000 : 3500,\n );\n }\n this.OnListManagementClosed();\n }\n\n OnShowChangesRequested(): void {\n if (this.fc?.ShowChanges) {\n this.fc.ShowChanges();\n } else {\n this.ShowChangesRequested.emit();\n }\n }\n\n // ---- Section Control Handlers ----\n\n OnFilterChange(filter: string): void {\n if (this.fc?.onFilterChange) {\n this.fc.onFilterChange(filter);\n this.cdr.markForCheck();\n }\n }\n\n OnExpandAll(): void {\n if (this.fc?.expandAllSections) {\n this.fc.expandAllSections();\n this.cdr.markForCheck();\n }\n }\n\n OnCollapseAll(): void {\n if (this.fc?.collapseAllSections) {\n this.fc.collapseAllSections();\n this.cdr.markForCheck();\n }\n }\n\n OnShowEmptyFieldsChange(show: boolean): void {\n if (this.fc) {\n this.fc.showEmptyFields = show;\n this.cdr.markForCheck();\n }\n }\n\n OnWidthModeChange(mode: FormWidthMode): void {\n if (this.fc?.setFormWidthMode) {\n this.fc.setFormWidthMode(mode);\n this.cdr.markForCheck();\n } else {\n this.WidthMode = mode;\n this.cdr.markForCheck();\n }\n }\n\n OnResetSectionOrder(): void {\n if (this.fc?.resetSectionOrder) {\n this.fc.resetSectionOrder();\n this.cdr.markForCheck();\n }\n }\n\n // ---- Variant picker ----\n\n /** Whether the variant dropdown menu is currently open. Toggled by the\n * control's click handler; closed on blur or after a row is picked. */\n _variantMenuOpen = false;\n\n /**\n * Effective variants — prefer the form component's list (set by the host\n * resolver) when present, fall back to the directly-bound @Input. This\n * means generated form templates don't need to bind [Variants] explicitly;\n * the host populates `instance.Variants` post-construction and the\n * container reads it through this accessor.\n */\n get EffectiveVariants(): VariantPickerItem[] {\n return (this.fc?.Variants as VariantPickerItem[] | undefined)\n ?? this.Variants\n ?? [];\n }\n\n get EffectiveCurrentVariantID(): string | null {\n return this.fc?.CurrentVariantID ?? this.CurrentVariantID;\n }\n\n /** Whether to show the variant picker at all. Hidden when the entity has\n * zero or one applicable variant — there's nothing to switch between. */\n get ShowVariantPicker(): boolean {\n return (this.EffectiveVariants?.length ?? 0) > 1;\n }\n\n /** Label for the currently-selected variant (or \"Default form\" if none). */\n get CurrentVariantLabel(): string {\n const v = this.EffectiveVariants?.find(x => UUIDsEqual(x.ID, this.EffectiveCurrentVariantID));\n return v?.Label ?? 'Default form';\n }\n\n /** Compact subtitle: scope + status, e.g. \"User · Active\". */\n variantSubtitle(v: VariantPickerItem): string {\n return `${v.Scope} · ${v.Status}`;\n }\n\n /**\n * User picked an item from the variant menu. If the host installed a\n * handler via `instance.OnVariantChanged`, call it; otherwise emit the\n * VariantChange event for standalone consumers.\n */\n OnVariantPicked(variantID: string | null): void {\n if (variantID === this.EffectiveCurrentVariantID) return;\n if (this.fc && typeof this.fc.OnVariantChanged === 'function') {\n this.fc.OnVariantChanged(variantID);\n } else {\n this.VariantChange.emit(variantID);\n }\n }\n\n // ---- Section Manager Handlers ----\n\n OnManageSections(): void {\n this.ShowSectionManager = true;\n this.cdr.markForCheck();\n }\n\n OnSectionOrderChange(newOrder: string[]): void {\n if (this.fc?.setSectionOrder) {\n this.fc.setSectionOrder(newOrder);\n this.cdr.markForCheck();\n }\n }\n\n OnSectionManagerReset(): void {\n this.OnResetSectionOrder();\n }\n\n OnSectionManagerClosed(): void {\n this.ShowSectionManager = false;\n this.cdr.markForCheck();\n }\n}\n","<!-- ============================================\n BEFORE-TOOLBAR SLOT\n ============================================ -->\n<ng-content select=\"[before-toolbar]\"></ng-content>\n\n<!-- ============================================\n TOOLBAR (bridges FormComponent state → toolbar inputs)\n Hidden entirely when Config.Toolbar === null (dialog/slide-in surfaces).\n ============================================ -->\n@if (EffectiveShowToolbar) {\n<mj-form-toolbar\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [UserCanEdit]=\"EffectiveUserCanEdit\"\n [UserCanDelete]=\"EffectiveUserCanDelete\"\n [IsFavorite]=\"EffectiveIsFavorite\"\n [FavoriteInitDone]=\"EffectiveFavoriteInitDone\"\n [IsDirty]=\"EffectiveIsDirty\"\n [DirtyFieldNames]=\"EffectiveDirtyFieldNames\"\n [ListCount]=\"ListCount\"\n [TagCount]=\"TagCount\"\n [VersionCount]=\"VersionCount\"\n [EntityInfo]=\"EffectiveEntityInfo\"\n [Config]=\"EffectiveToolbarConfig\"\n [IsSaving]=\"EffectiveIsSaving\"\n [VisibleSectionCount]=\"VisibleSectionCount\"\n [TotalSectionCount]=\"TotalSectionCount\"\n [ExpandedSectionCount]=\"ExpandedSectionCount\"\n [SearchFilter]=\"EffectiveSearchFilter\"\n [ShowEmptyFields]=\"EffectiveShowEmptyFields\"\n [WidthMode]=\"EffectiveWidthMode\"\n [HasCustomSectionOrder]=\"EffectiveHasCustomSectionOrder\"\n [Variants]=\"EffectiveVariants\"\n [CurrentVariantID]=\"EffectiveCurrentVariantID\"\n (Navigate)=\"OnNavigate($event)\"\n (EditModeChange)=\"OnEditModeChange($event)\"\n (BeforeSave)=\"BeforeSave.emit($event)\"\n (SaveRequested)=\"OnSaveRequested()\"\n (BeforeCancel)=\"BeforeCancel.emit($event)\"\n (CancelRequested)=\"OnCancelRequested()\"\n (BeforeDelete)=\"BeforeDelete.emit($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (BeforeHistoryView)=\"BeforeHistoryView.emit($event)\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (BeforeListManagement)=\"BeforeListManagement.emit($event)\"\n (ListManagementRequested)=\"OnListManagementRequested()\"\n (ShowChangesRequested)=\"OnShowChangesRequested()\"\n (CustomButtonClick)=\"CustomButtonClick.emit($event)\"\n (FilterChange)=\"OnFilterChange($event)\"\n (ExpandAllRequested)=\"OnExpandAll()\"\n (CollapseAllRequested)=\"OnCollapseAll()\"\n (ShowEmptyFieldsChange)=\"OnShowEmptyFieldsChange($event)\"\n (WidthModeChange)=\"OnWidthModeChange($event)\"\n (ResetSectionOrderRequested)=\"OnResetSectionOrder()\"\n (ManageSectionsRequested)=\"OnManageSections()\"\n (TagsPanelToggled)=\"OnTagsPanelToggled()\"\n (VariantPicked)=\"OnVariantPicked($event)\">\n</mj-form-toolbar>\n}\n\n<!-- ============================================\n SCROLL AREA (full-width so mouse wheel works anywhere)\n Variant picker is now embedded in <mj-form-toolbar> as a right-side\n button — see the [Variants]/[CurrentVariantID] inputs + (VariantPicked)\n output on the toolbar above. Inline strip was removed.\n ============================================ -->\n<div class=\"mj-forms-scroll-area\">\n <div class=\"mj-forms-panels-container\"\n [class.mj-forms-panels--full-width]=\"EffectiveWidthMode === 'full-width'\"\n [class.mj-forms-panels--edit-mode]=\"EffectiveEditMode\"\n [class.mj-forms-panels--has-isa-panel]=\"HasIsaRelatedItems\">\n <!-- Flex row: form panels on left, ISA side panel on right -->\n <div class=\"mj-forms-layout-row\">\n <!-- All panels in a single flex container — CSS order drives sequencing -->\n <div class=\"mj-forms-all-panels\">\n <ng-content></ng-content>\n\n <!--\n Container-provided fallback slot. ALWAYS present — last in document\n order — so any panel whose registered slot isn't found in the current\n form falls through here via FormSlotCoordinator's chain. Downstream\n consumers that haven't rerun CodeGen against the slot-emitting\n template still see every panel; they just render at the bottom\n instead of at their preferred position.\n -->\n @if (Record && FormComponent) {\n <mj-form-panel-slot\n [Entity]=\"Record.EntityInfo.Name\"\n Slot=\"after-everything\"\n [Record]=\"Record\"\n [FormComponent]=\"FormComponent\">\n </mj-form-panel-slot>\n }\n\n <!-- Empty state when no sections match search -->\n @if (EffectiveSearchFilter && VisibleSectionCount === 0) {\n <mj-empty-state class=\"mj-forms-empty-search-state\"\n Variant=\"no-results\"\n Title=\"No sections found\"\n [Message]=\"'No sections match "' + EffectiveSearchFilter + '". Try a different search term.'\"\n ActionText=\"Clear search\"\n ActionIcon=\"fa-solid fa-rotate-left\"\n ActionVariant=\"flat\"\n (Action)=\"OnFilterChange('')\" />\n }\n </div>\n\n <!-- IS-A Related Records Side Panel -->\n <mj-isa-related-panel\n [Record]=\"EffectiveRecord\"\n [EditMode]=\"EffectiveEditMode\"\n [Collapsed]=\"EffectiveWidthMode === 'full-width'\"\n (Navigate)=\"OnNavigate($event)\">\n </mj-isa-related-panel>\n </div>\n </div>\n</div>\n\n<!-- ============================================\n RECORD CHANGES DRAWER (shown when history button clicked)\n ============================================ -->\n@if (ShowRecordChanges && EffectiveRecord) {\n <mj-record-changes\n [record]=\"EffectiveRecord\"\n [AllowRestore]=\"EffectiveUserCanEdit\"\n (RestoreRequested)=\"OnRestoreRequested($event)\"\n (dialogClosed)=\"OnRecordChangesClosed()\">\n </mj-record-changes>\n}\n\n<!-- ============================================\n TAGS PANEL (shown when tags button clicked)\n ============================================ -->\n@if (ShowTagsPanel && EffectiveRecord) {\n <mj-record-tags\n [Record]=\"EffectiveRecord\"\n [WidthPx]=\"TagsPanelWidth\"\n (PanelClosed)=\"OnTagsPanelClosed()\"\n (TagCountChanged)=\"OnTagCountChanged($event)\"\n (RecordNavigate)=\"OnTagsRecordNavigate($event)\"\n (WidthChanged)=\"OnTagsPanelWidthChanged($event)\">\n </mj-record-tags>\n}\n\n<!-- ============================================\n LIST MANAGEMENT DIALOG (shown when lists button clicked)\n ============================================ -->\n@if (ShowListManagement && EffectiveRecord) {\n <mj-list-management-dialog\n [visible]=\"ShowListManagement\"\n [config]=\"{\n mode: 'manage',\n entityId: EffectiveRecord.EntityInfo.ID,\n entityName: EffectiveRecord.EntityInfo.Name,\n recordIds: [EffectiveRecord.PrimaryKey.Values()[0]],\n allowCreate: true\n }\"\n (complete)=\"OnListManagementComplete($event)\"\n (cancel)=\"OnListManagementClosed()\">\n </mj-list-management-dialog>\n}\n\n<!-- ============================================\n SECTION MANAGER DRAWER (shown when manage-sections button clicked)\n ============================================ -->\n<mj-section-manager\n [Sections]=\"SectionManagerItems\"\n [SectionOrder]=\"SectionManagerOrder\"\n [Visible]=\"ShowSectionManager\"\n (SectionOrderChange)=\"OnSectionOrderChange($event)\"\n (ResetRequested)=\"OnSectionManagerReset()\"\n (Closed)=\"OnSectionManagerClosed()\">\n</mj-section-manager>\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-base-forms",
|
|
3
|
-
"version": "6.1.0-edge.
|
|
3
|
+
"version": "6.1.0-edge.2",
|
|
4
4
|
"description": "MemberJunction: Generic Angular form components for rendering and editing entity records. Provides configurable toolbar, modern form fields (PrimeNG unstyled), collapsible panels with IS-A inheritance support, and event-driven navigation. Zero Explorer dependencies - usable in any Angular application.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@angular/compiler": "21.1.3",
|
|
23
23
|
"@angular/compiler-cli": "21.1.3",
|
|
24
|
-
"@memberjunction/ng-test-utils": "6.1.0-edge.
|
|
24
|
+
"@memberjunction/ng-test-utils": "6.1.0-edge.2",
|
|
25
25
|
"vitest": "^4.0.18"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
"primeng": "21.1.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@memberjunction/core": "6.1.0-edge.
|
|
36
|
-
"@memberjunction/core-entities": "6.1.0-edge.
|
|
37
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
38
|
-
"@memberjunction/interactive-component-types": "6.1.0-edge.
|
|
39
|
-
"@memberjunction/ng-base-types": "6.1.0-edge.
|
|
40
|
-
"@memberjunction/ng-code-editor": "6.1.0-edge.
|
|
41
|
-
"@memberjunction/ng-entity-viewer": "6.1.0-edge.
|
|
42
|
-
"@memberjunction/ng-list-management": "6.1.0-edge.
|
|
43
|
-
"@memberjunction/ng-markdown": "6.1.0-edge.
|
|
44
|
-
"@memberjunction/ng-notifications": "6.1.0-edge.
|
|
45
|
-
"@memberjunction/ng-react": "6.1.0-edge.
|
|
46
|
-
"@memberjunction/ng-record-changes": "6.1.0-edge.
|
|
47
|
-
"@memberjunction/ng-record-tags": "6.1.0-edge.
|
|
48
|
-
"@memberjunction/ng-shared-generic": "6.1.0-edge.
|
|
49
|
-
"@memberjunction/ng-ui-components": "6.1.0-edge.
|
|
35
|
+
"@memberjunction/core": "6.1.0-edge.2",
|
|
36
|
+
"@memberjunction/core-entities": "6.1.0-edge.2",
|
|
37
|
+
"@memberjunction/global": "6.1.0-edge.2",
|
|
38
|
+
"@memberjunction/interactive-component-types": "6.1.0-edge.2",
|
|
39
|
+
"@memberjunction/ng-base-types": "6.1.0-edge.2",
|
|
40
|
+
"@memberjunction/ng-code-editor": "6.1.0-edge.2",
|
|
41
|
+
"@memberjunction/ng-entity-viewer": "6.1.0-edge.2",
|
|
42
|
+
"@memberjunction/ng-list-management": "6.1.0-edge.2",
|
|
43
|
+
"@memberjunction/ng-markdown": "6.1.0-edge.2",
|
|
44
|
+
"@memberjunction/ng-notifications": "6.1.0-edge.2",
|
|
45
|
+
"@memberjunction/ng-react": "6.1.0-edge.2",
|
|
46
|
+
"@memberjunction/ng-record-changes": "6.1.0-edge.2",
|
|
47
|
+
"@memberjunction/ng-record-tags": "6.1.0-edge.2",
|
|
48
|
+
"@memberjunction/ng-shared-generic": "6.1.0-edge.2",
|
|
49
|
+
"@memberjunction/ng-ui-components": "6.1.0-edge.2",
|
|
50
50
|
"rxjs": "^7.8.2",
|
|
51
51
|
"tslib": "^2.8.1"
|
|
52
52
|
},
|