@memberjunction/ng-base-forms 6.2.0-edge.2 → 6.2.0-edge.4
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/apply/form-placement-dialog.component.d.ts +266 -0
- package/dist/lib/apply/form-placement-dialog.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-dialog.component.js +1522 -0
- package/dist/lib/apply/form-placement-dialog.component.js.map +1 -0
- package/dist/lib/apply/form-placement-order.d.ts +37 -0
- package/dist/lib/apply/form-placement-order.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-order.js +111 -0
- package/dist/lib/apply/form-placement-order.js.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts +112 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.js +346 -0
- package/dist/lib/apply/form-placement-preview.component.js.map +1 -0
- package/dist/lib/apply/form-placement-text.d.ts +61 -0
- package/dist/lib/apply/form-placement-text.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-text.js +279 -0
- package/dist/lib/apply/form-placement-text.js.map +1 -0
- package/dist/lib/apply/form-placement.d.ts +320 -0
- package/dist/lib/apply/form-placement.d.ts.map +1 -0
- package/dist/lib/apply/form-placement.js +432 -0
- package/dist/lib/apply/form-placement.js.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts +121 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.js +264 -0
- package/dist/lib/apply/form-slot-probe.service.js.map +1 -0
- package/dist/lib/base-form-component-internals.d.ts +11 -0
- package/dist/lib/base-form-component-internals.d.ts.map +1 -0
- package/dist/lib/base-form-component-internals.js +33 -0
- package/dist/lib/base-form-component-internals.js.map +1 -0
- package/dist/lib/base-form-component.d.ts +132 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +228 -19
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome.d.ts +90 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome.js +142 -2
- package/dist/lib/chrome/form-chrome.js.map +1 -1
- package/dist/lib/chrome/form-composition-registry.d.ts +34 -0
- package/dist/lib/chrome/form-composition-registry.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-registry.js +56 -0
- package/dist/lib/chrome/form-composition-registry.js.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts +151 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.js +137 -0
- package/dist/lib/chrome/form-composition-snapshot.js.map +1 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts +15 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/resolve-form-chrome.js +31 -2
- package/dist/lib/chrome/resolve-form-chrome.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +241 -5
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +977 -249
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +17 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +41 -5
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +5 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +6 -1
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +16 -1
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +27 -6
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts +24 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts.map +1 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js +99 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts +109 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js +424 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts +2 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +4 -5
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +69 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +148 -12
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-manager/form-audience.d.ts +46 -0
- package/dist/lib/panel-manager/form-audience.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-audience.js +34 -0
- package/dist/lib/panel-manager/form-audience.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts +150 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js +433 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts +255 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.js +293 -0
- package/dist/lib/panel-manager/form-panel-inventory.js.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts +232 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.js +1112 -0
- package/dist/lib/panel-manager/panel-manager.component.js.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts +40 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.js +55 -0
- package/dist/lib/panel-slot/base-contribution-panel.js.map +1 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts +116 -8
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js +76 -5
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts +29 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts.map +1 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js +214 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js.map +1 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts +6 -3
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts.map +1 -1
- package/dist/lib/panel-slot/collect-form-panel-registrations.js +8 -14
- package/dist/lib/panel-slot/collect-form-panel-registrations.js.map +1 -1
- package/dist/lib/panel-slot/form-contribution.d.ts +170 -7
- package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contribution.js +245 -71
- package/dist/lib/panel-slot/form-contribution.js.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.d.ts +16 -5
- package/dist/lib/panel-slot/form-contributions.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.js +43 -7
- package/dist/lib/panel-slot/form-contributions.component.js.map +1 -1
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts +66 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js +190 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts +52 -16
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.js +190 -66
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +11 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.js +17 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -1
- package/dist/lib/panel-slot/merge-panel-validation.d.ts +7 -0
- package/dist/lib/panel-slot/merge-panel-validation.d.ts.map +1 -0
- package/dist/lib/panel-slot/merge-panel-validation.js +16 -0
- package/dist/lib/panel-slot/merge-panel-validation.js.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts +15 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.js +37 -0
- package/dist/lib/panel-slot/mount-form-contribution.js.map +1 -0
- package/dist/lib/panel-slot/panel-hides.d.ts +35 -0
- package/dist/lib/panel-slot/panel-hides.d.ts.map +1 -0
- package/dist/lib/panel-slot/panel-hides.js +111 -0
- package/dist/lib/panel-slot/panel-hides.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts +16 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js +112 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview.d.ts +57 -0
- package/dist/lib/panel-slot/placement-preview.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview.js +86 -0
- package/dist/lib/panel-slot/placement-preview.js.map +1 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts +2 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js +10 -3
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/slot-order.d.ts +19 -0
- package/dist/lib/panel-slot/slot-order.d.ts.map +1 -0
- package/dist/lib/panel-slot/slot-order.js +53 -0
- package/dist/lib/panel-slot/slot-order.js.map +1 -0
- package/dist/lib/resolver/form-resolver.service.d.ts +4 -2
- package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
- package/dist/lib/resolver/form-resolver.service.js +18 -8
- package/dist/lib/resolver/form-resolver.service.js.map +1 -1
- package/dist/lib/resolver/form-variants.d.ts +28 -0
- package/dist/lib/resolver/form-variants.d.ts.map +1 -0
- package/dist/lib/resolver/form-variants.js +40 -0
- package/dist/lib/resolver/form-variants.js.map +1 -0
- package/dist/lib/section-counts/form-section-counts.d.ts +99 -0
- package/dist/lib/section-counts/form-section-counts.d.ts.map +1 -0
- package/dist/lib/section-counts/form-section-counts.js +223 -0
- package/dist/lib/section-counts/form-section-counts.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +7 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +194 -128
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +8 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/module.d.ts +29 -23
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +43 -5
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +20 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +21 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -20
|
@@ -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,MA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BAON,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 { DeserializeValidationErrors, MJEventType, MJGlobal, ValidationErrorInfo } from '@memberjunction/global';\nimport { FormEditingCompleteEvent, PendingRecordItem, BaseFormComponentEventCodes } from '@memberjunction/ng-base-types';\nimport { MJListEntity } from '@memberjunction/core-entities';\nimport { GraphQLAIClient, GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport type { DuplicateEntryCandidate, DuplicateEntryCheckResult } from '@memberjunction/graphql-dataprovider';\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 RecordRefreshedEvent,\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';\nimport { FormToolbarItemConfig, FormToolbarItemKey, FormToolbarItemClickEventArgs } from './types/form-toolbar-item';\nimport { CollectFormPanelRegistrations } from './panel-slot/collect-form-panel-registrations';\nimport { ContributionHiddenSectionKeys } from './panel-slot/form-contribution';\nimport { DuplicateEntryCheckController, type DuplicateEntryCheckValue } from './duplicate-entry-check/duplicate-entry-check';\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 IsRefreshing: 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 private _registeredToolbarItems = new Map<string, FormToolbarItemConfig>();\n private _toolbarItemOverrides = new Map<string, Partial<FormToolbarItemConfig>>();\n\n /**\n * Registers a dynamic toolbar action item / button.\n * Can be called during ngOnInit or at runtime.\n */\n public RegisterToolbarItem(item: FormToolbarItemConfig): void {\n this._registeredToolbarItems.set(item.Key, { ...item });\n this.cdr?.markForCheck();\n }\n\n /**\n * Unregisters a previously registered dynamic toolbar item by key.\n */\n public UnregisterToolbarItem(key: string): void {\n if (this._registeredToolbarItems.delete(key)) {\n this.cdr?.markForCheck();\n }\n }\n\n /**\n * Configures overrides for any toolbar item (standard built-in items like 'edit',\n * 'delete', 'favorite', 'history', etc., or custom items).\n * Allows dynamically changing visibility, disabled state, tooltips, order, icon, etc.\n */\n public ConfigureToolbarItem(key: FormToolbarItemKey, overrides: Partial<FormToolbarItemConfig>): void {\n const existing = this._toolbarItemOverrides.get(key) || {};\n this._toolbarItemOverrides.set(key, { ...existing, ...overrides });\n this.cdr?.markForCheck();\n }\n\n /**\n * Dynamically hides a toolbar item by key.\n */\n public HideToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Visible: false });\n }\n\n /**\n * Dynamically shows a toolbar item by key.\n */\n public ShowToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Visible: true });\n }\n\n /**\n * Dynamically disables a toolbar item by key, with an optional reason string for the tooltip.\n */\n public DisableToolbarItem(key: FormToolbarItemKey, reason?: string): void {\n this.ConfigureToolbarItem(key, { Disabled: reason ?? true });\n }\n\n /**\n * Dynamically enables a toolbar item by key.\n */\n public EnableToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Disabled: false });\n }\n\n /**\n * Sets the numeric display order for a toolbar item (lower numbers appear earlier).\n */\n public SetToolbarItemOrder(key: FormToolbarItemKey, order: number): void {\n this.ConfigureToolbarItem(key, { Order: order });\n }\n\n /**\n * Returns all dynamically registered toolbar items.\n */\n public get RegisteredToolbarItems(): FormToolbarItemConfig[] {\n return Array.from(this._registeredToolbarItems.values());\n }\n\n /**\n * Returns the map of toolbar item overrides.\n */\n public get ToolbarItemOverrides(): ReadonlyMap<string, Partial<FormToolbarItemConfig>> {\n return this._toolbarItemOverrides;\n }\n\n /**\n * Hook invoked when a custom or dynamic toolbar item is clicked.\n * Subclasses can override this method to handle custom button clicks.\n */\n public OnCustomToolbarButtonClick(event: FormToolbarItemClickEventArgs): void {\n // Subclasses can override\n }\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 refreshed from the database successfully */\n @Output() RecordRefreshed = new EventEmitter<RecordRefreshedEvent>();\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)\n 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 this._duplicateEntryCheck?.Dispose();\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 // The only failure this method cannot show the user: with no record there is nothing to\n // validate, toast about or paint. Every other refusal below is already reported through\n // the toast and the fields, so it is NOT logged again here — a second, generic line\n // (\"Record not found\") on a create that failed validation sent readers hunting for an\n // ID or routing fault that did not exist.\n LogError('Could not save record: the form has no record bound to it');\n return false;\n }\n\n this.PopulatePendingRecords();\n const valResults = this.Validate();\n if (!valResults.Success) {\n this.publishValidationFailure(valResults.Errors);\n return false;\n }\n\n const result = await this.InternalSaveRecord();\n if (result) {\n this._pendingRecords = [];\n this.clearValidationState();\n this._duplicateEntryCheck?.RecordSaved();\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 }\n\n const serverMsg = this.record.LatestResult?.Message || '';\n const errorMsg = serverMsg ? `Save failed: ${serverMsg}` : 'Error saving record';\n // A server-side Validate()/ValidateAsync() refusal comes back with its field-named\n // reasons in LatestResult.Errors (rehydrated by the provider). When any of them names a\n // field on this record, publish them through the SAME path the local Validate() branch\n // uses above, so the field paints red with its message instead of the user getting a\n // toast and a form with nothing marked. Errors with no field source stay toast-only.\n const serverErrors = this.fieldSourcedServerErrors();\n if (serverErrors.length > 0) {\n this.publishValidationFailure(serverErrors);\n } else {\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n }\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\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 /**\n * Re-fetches the current record from the database, updating field values\n * in-place and resetting dirty flags. No-op in edit mode or on an unsaved\n * record. Related-entity grids are notified via the form container's\n * {@link FormRecordRefreshCoordinator} after this emits {@link RecordRefreshed}.\n *\n * @returns true if the record was reloaded from the database.\n */\n public async RefreshRecord(): Promise<boolean> {\n if (!this.canRefreshRecord()) {\n return false;\n }\n\n this.IsRefreshing = true;\n this.cdr.markForCheck();\n\n try {\n return await this.executeRecordRefresh();\n } finally {\n this.IsRefreshing = false;\n this.cdr.markForCheck();\n }\n }\n\n private canRefreshRecord(): boolean {\n return !!this.record && this.record.IsSaved && !this.EditMode;\n }\n\n private async executeRecordRefresh(): Promise<boolean> {\n const record = this.record;\n if (!record) {\n return false;\n }\n\n try {\n const ok = await record.Refresh();\n if (!ok) {\n this.Notification.emit({\n Message: 'Failed to refresh record from database',\n Type: 'error',\n Duration: 5000,\n });\n return false;\n }\n\n await this.reloadFavoriteStatusAfterRefresh(record);\n this.Notification.emit({\n Message: 'Record refreshed from database',\n Type: 'info',\n Duration: 2000,\n });\n this.RecordRefreshed.emit({\n EntityName: record.EntityInfo.Name,\n Record: record,\n });\n return true;\n } catch (e) {\n const detail = e instanceof Error ? e.message : String(e);\n this.Notification.emit({\n Message: 'Error refreshing record: ' + detail,\n Type: 'error',\n Duration: 5000,\n });\n return false;\n }\n }\n\n private async reloadFavoriteStatusAfterRefresh(record: BaseEntity): Promise<void> {\n const md = this.ProviderToUse;\n try {\n this._isFavorite = await md.GetRecordFavoriteStatus(\n md.CurrentUser.ID,\n record.EntityInfo.Name,\n record.PrimaryKey,\n );\n } catch {\n // Non-critical — favorite status remains as is\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 Duplicate Entry Check\n\n private _duplicateEntryCheck: DuplicateEntryCheckController | null = null;\n\n /**\n * The entry-time duplicate check. While a person enters a new record it asks the server, after\n * each pause in editing, whether the values duplicate existing records, and holds the ones to\n * flag. It only flags: saving is never blocked and nothing is merged. `mj-record-form-container`\n * shows the notice.\n */\n public get DuplicateEntryCheck(): DuplicateEntryCheckController {\n if (!this._duplicateEntryCheck) {\n this._duplicateEntryCheck = new DuplicateEntryCheckController(\n (entityName, values) => this.CheckDuplicateEntry(entityName, values)\n );\n }\n return this._duplicateEntryCheck;\n }\n\n /** Whether the possible-duplicate notice shows: a new record with flagged candidates not dismissed. */\n public get ShowDuplicateEntryNotice(): boolean {\n return !!this.record && !this.record.IsSaved && (this._duplicateEntryCheck?.IsNoticeVisible ?? false);\n }\n\n /**\n * A person edited a field on this form. For a new record this restarts the entry-time duplicate\n * check. `mj-record-form-container` calls it for every `mj-form-field` edit; a custom editor that\n * changes the record some other way can call it too.\n *\n * A user who cannot read the entity (one who may only create its records) never starts a check:\n * the server would refuse it, and a flagged record is one they could not open anyway.\n */\n public OnFieldEdited(): void {\n if (this.record && !this.record.IsSaved && this.UserCanRead) {\n this.DuplicateEntryCheck.RecordEdited(this.record);\n }\n }\n\n /**\n * Opens a flagged candidate the way the form opens any record: a `Navigate` event the host\n * handles, never a router call. It asks for a new tab, so the record being entered is kept.\n */\n public OpenDuplicateCandidate(candidate: DuplicateEntryCandidate): void {\n const entityInfo = this.record?.EntityInfo;\n if (!entityInfo) return;\n this.Navigate.emit({\n Kind: 'record',\n EntityName: entityInfo.Name,\n PrimaryKey: CompositeKey.FromURLSegment(entityInfo, candidate.RecordID),\n OpenInNewTab: true\n });\n }\n\n /** The person dismissed the possible-duplicate notice. */\n public DismissDuplicateNotice(): void {\n this._duplicateEntryCheck?.Dismiss();\n }\n\n /**\n * Asks the server whether the values being entered duplicate existing records. A form on a\n * provider that is not a `GraphQLDataProvider` has no server to ask, so the check reports\n * `NotConfigured` and stops for the entity. Override to send the check elsewhere.\n */\n protected async CheckDuplicateEntry(entityName: string, values: Record<string, DuplicateEntryCheckValue>): Promise<DuplicateEntryCheckResult> {\n const provider = this.ProviderToUse;\n if (!(provider instanceof GraphQLDataProvider)) {\n return { Status: 'NotConfigured', Candidates: [] };\n }\n return new GraphQLAIClient(provider).CheckDuplicateEntry({ EntityName: entityName, Values: values });\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 /**\n * One grid over several FKs to the same related entity (Bill-To OR Ship-To).\n */\n public BuildRelationshipViewParamsForJoinFields(relatedEntityName: string, joinFields: readonly string[]): RunViewParams {\n if (!this.record) return {};\n return EntityInfo.BuildRelationshipViewParamsForJoinFields(this.record, relatedEntityName, joinFields);\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 /**\n * Default values for a new related-entity record so it links back here.\n * Pass `relatedEntityJoinField` when more than one relationship targets the\n * same entity (Bill-To vs Ship-To). When omitted and several matches exist,\n * every matching FK is set — same fields the related grid is filtering on.\n */\n public NewRecordValues(relatedEntityName: string, relatedEntityJoinField?: string): Record<string, unknown> {\n if (!this.record) return {};\n if (relatedEntityJoinField) {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName, relatedEntityJoinField);\n if (eri) return this.NewRecordValuesByEntityRelationship(eri);\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(this.record, [relatedEntityJoinField]);\n }\n const matches = this.record.EntityInfo.RelatedEntities.filter(\n (x) => x.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase(),\n );\n if (matches.length === 0) return {};\n if (matches.length === 1) return this.NewRecordValuesByEntityRelationship(matches[0]);\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(\n this.record,\n matches.map((m) => m.RelatedEntityJoinField),\n );\n }\n\n /**\n * Default values for a new related record, setting every listed join field\n * to this record's key. Pair with {@link BuildRelationshipViewParamsForJoinFields}.\n */\n public NewRecordValuesForJoinFields(relatedEntityName: string, joinFields: readonly string[]): Record<string, unknown> {\n if (!this.record || !relatedEntityName) return {};\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(this.record, joinFields);\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 validationRevision: this._validationRevision,\n collapsibleSections: this.Config?.CollapsibleSections,\n enableRecordLinks: this.Config?.EnableRecordLinks,\n showRelatedEntities: this.Config?.ShowRelatedEntities,\n hiddenSectionKeys: this.resolveHiddenSectionKeys(),\n visibleSectionKeys: this.Config?.VisibleSectionKeys,\n allowSectionReorder: this.resolveAllowSectionReorder()\n };\n }\n\n /**\n * Config HiddenSectionKeys plus section keys winning contributions asked\n * to hide (related-entity claims and `replacesSectionKey` field panels).\n */\n private resolveHiddenSectionKeys(): string[] | undefined {\n const claimed = this.contributionHiddenSectionKeys();\n const configured = this.Config?.HiddenSectionKeys;\n if (claimed.length === 0) return configured;\n return [...(configured ?? []), ...claimed];\n }\n\n private contributionHiddenSectionKeys(): string[] {\n const entity = this.record?.EntityInfo;\n if (!entity) return [];\n return ContributionHiddenSectionKeys(\n entity.Name,\n entity.RelatedEntities,\n entity.ChildEntities.map((child) => child.ID),\n CollectFormPanelRegistrations(),\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 /**\n * Bumped on every {@link publishValidationFailure}; published as `FormContext.validationRevision`\n * so a field can tell an edit made before the failure from one made after it.\n */\n private _validationRevision = 0;\n\n /**\n * The ONE way validation errors reach the fields and the user — used by both the local\n * `Validate()` refusal and a server-side refusal that came back on `LatestResult.Errors`, so the\n * two cannot drift: broadcast through `FormContext` (fields match `Source === FieldName`), bump\n * the revision, toast the messages, and raise `ValidationFailed`.\n */\n private publishValidationFailure(errors: ValidationErrorInfo[]): void {\n this._showValidation = true;\n this._validationErrors = errors;\n this._validationRevision++;\n this.cdr.markForCheck();\n\n const errorMessages = 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 * The structured errors of the last failed save, when at least one names a field on this record.\n *\n * `LatestResult.Errors` is untyped and may hold anything a provider put there, so it is normalised\n * through `DeserializeValidationErrors` first. Returns `[]` unless some entry's `Source` is one of\n * this record's field names — a refusal that is purely record-level (\"the database timed out\",\n * \"not authorised\") has nothing to paint and keeps the plain error toast. When there IS a\n * field-sourced entry, the WHOLE set is returned: field-agnostic entries paint nothing (no field\n * matches an empty Source) but still belong in the toast.\n */\n private fieldSourcedServerErrors(): ValidationErrorInfo[] {\n const errors = DeserializeValidationErrors(this.record?.LatestResult?.Errors);\n if (errors.length === 0) return [];\n const fieldNames = new Set(this.record.EntityInfo.Fields.map(f => f.Name));\n return errors.some(e => e.Source.length > 0 && fieldNames.has(e.Source)) ? errors : [];\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 let section = this.sectionMap.get(sectionKey);\n if (!section) {\n // Contribution panels use their own SectionKey (e.g. 'orders') which\n // is never seeded by generated initSections(). Upsert so the left-nav\n // rail badge can read the count the same way baked grids do.\n section = new BaseFormSectionInfo(sectionKey, sectionKey, false, rowCount);\n this.sections.push(section);\n this.sectionMap.set(sectionKey, section);\n } else {\n section.rowCount = rowCount;\n }\n this.cdr.markForCheck();\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 getMoreSectionKeys(): string[] {\n const entityName = this.getEntityName();\n if (!entityName) return [];\n return this.formStateService.getMoreSectionKeys(entityName) ?? [];\n }\n\n public getFirstClassSectionKeys(): string[] {\n const entityName = this.getEntityName();\n if (!entityName) return [];\n return this.formStateService.getFirstClassSectionKeys(entityName) ?? [];\n }\n\n public setChromeMembership(moreSectionKeys: string[], firstClassSectionKeys: string[]): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setChromeMembership(entityName, moreSectionKeys, firstClassSectionKeys);\n }\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,EACE,YAAY,EAAE,OAAO,EACzD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,QAAQ,EAAuB,MAAM,wBAAwB,CAAC;AACjH,OAAO,EAAE,wBAAwB,EAAqB,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEzH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAYlF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,oCAAoC,EAAE,MAAM,sDAAsD,CAAC;AAE5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAA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AAQ,EAAE,CAAC,CAAC;YACpG,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,QAAQ,GAAG,yBAAyB,GAAG,CAAC,CAAC;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;iPA5lDmB,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;2BA6QvB,2BAA2B;;;;;;iFA7QrB,iBAAiB;cADtC,SAAS;;kBAmLP,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAON,MAAM;;kBAUN,MAAM;;kBA2BN,MAAM;;kBAmBN,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 { DeserializeValidationErrors, MJEventType, MJGlobal, ValidationErrorInfo } from '@memberjunction/global';\nimport { FormEditingCompleteEvent, PendingRecordItem, BaseFormComponentEventCodes } from '@memberjunction/ng-base-types';\nimport { MJListEntity } from '@memberjunction/core-entities';\nimport { GraphQLAIClient, GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport type { DuplicateEntryCandidate, DuplicateEntryCheckResult } from '@memberjunction/graphql-dataprovider';\n\nimport { BaseRecordComponent } from './base-record-component';\nimport type { BaseFormPanel } from './panel-slot/base-form-panel';\nimport { MergePanelValidation } from './panel-slot/merge-panel-validation';\nimport type { FormCompositionSnapshot } from './chrome/form-composition-snapshot';\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 RecordRefreshedEvent,\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';\nimport { FormToolbarItemConfig, FormToolbarItemKey, FormToolbarItemClickEventArgs } from './types/form-toolbar-item';\nimport { CollectFormContributionRegistrations } from './panel-slot/collect-form-contribution-registrations';\nimport type { FormContributionRegistration } from './panel-slot/form-contribution';\nimport { FORM_PLACEMENT_PREVIEW } from './panel-slot/placement-preview';\nimport { FormContextsEqual } from './base-form-component-internals';\nimport { ContributionClaimedFieldNames, ContributionHiddenSectionKeys } from './panel-slot/form-contribution';\nimport { DuplicateEntryCheckController, type DuplicateEntryCheckValue } from './duplicate-entry-check/duplicate-entry-check';\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 IsRefreshing: 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 private _registeredToolbarItems = new Map<string, FormToolbarItemConfig>();\n private _toolbarItemOverrides = new Map<string, Partial<FormToolbarItemConfig>>();\n\n /**\n * Registers a dynamic toolbar action item / button.\n * Can be called during ngOnInit or at runtime.\n */\n public RegisterToolbarItem(item: FormToolbarItemConfig): void {\n this._registeredToolbarItems.set(item.Key, { ...item });\n this.cdr?.markForCheck();\n }\n\n /**\n * Unregisters a previously registered dynamic toolbar item by key.\n */\n public UnregisterToolbarItem(key: string): void {\n if (this._registeredToolbarItems.delete(key)) {\n this.cdr?.markForCheck();\n }\n }\n\n /**\n * Configures overrides for any toolbar item (standard built-in items like 'edit',\n * 'delete', 'favorite', 'history', etc., or custom items).\n * Allows dynamically changing visibility, disabled state, tooltips, order, icon, etc.\n */\n public ConfigureToolbarItem(key: FormToolbarItemKey, overrides: Partial<FormToolbarItemConfig>): void {\n const existing = this._toolbarItemOverrides.get(key) || {};\n this._toolbarItemOverrides.set(key, { ...existing, ...overrides });\n this.cdr?.markForCheck();\n }\n\n /**\n * Dynamically hides a toolbar item by key.\n */\n public HideToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Visible: false });\n }\n\n /**\n * Dynamically shows a toolbar item by key.\n */\n public ShowToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Visible: true });\n }\n\n /**\n * Dynamically disables a toolbar item by key, with an optional reason string for the tooltip.\n */\n public DisableToolbarItem(key: FormToolbarItemKey, reason?: string): void {\n this.ConfigureToolbarItem(key, { Disabled: reason ?? true });\n }\n\n /**\n * Dynamically enables a toolbar item by key.\n */\n public EnableToolbarItem(key: FormToolbarItemKey): void {\n this.ConfigureToolbarItem(key, { Disabled: false });\n }\n\n /**\n * Sets the numeric display order for a toolbar item (lower numbers appear earlier).\n */\n public SetToolbarItemOrder(key: FormToolbarItemKey, order: number): void {\n this.ConfigureToolbarItem(key, { Order: order });\n }\n\n /**\n * Returns all dynamically registered toolbar items.\n */\n public get RegisteredToolbarItems(): FormToolbarItemConfig[] {\n return Array.from(this._registeredToolbarItems.values());\n }\n\n /**\n * Returns the map of toolbar item overrides.\n */\n public get ToolbarItemOverrides(): ReadonlyMap<string, Partial<FormToolbarItemConfig>> {\n return this._toolbarItemOverrides;\n }\n\n /**\n * Hook invoked when a custom or dynamic toolbar item is clicked.\n * Subclasses can override this method to handle custom button clicks.\n */\n public OnCustomToolbarButtonClick(event: FormToolbarItemClickEventArgs): void {\n // Subclasses can override\n }\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 /** The placement dialog's unsaved panel, when this form is the dialog's preview. */\n protected placementPreview = inject(FORM_PLACEMENT_PREVIEW, { optional: true });\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 refreshed from the database successfully */\n @Output() RecordRefreshed = new EventEmitter<RecordRefreshedEvent>();\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 /**\n * Emitted whenever edit mode starts (`true`) or ends (`false`). The Explorer\n * shell uses the `true` edge to PROMOTE a records preview tab — pin it — the\n * moment the user starts editing (VS Code's promote-on-modify), so a record\n * being edited is neither replaceable by the next plain open nor italic.\n * Fires on every call, not only on transitions: a new record's ngOnInit\n * re-asserts edit mode and the shell's pin is idempotent.\n */\n @Output() EditModeChanged = new EventEmitter<boolean>();\n\n /** Layout the container resolved for this form. Set by `<mj-record-form-container>`; read by panel hosts. */\n public ChromeLayout: 'accordion' | 'left-nav' = 'accordion';\n\n /**\n * Whether this form renders its own body in full.\n *\n * A form that returns true accepts nothing the container would otherwise compose into\n * it: no `BaseFormPanel` mounts, no contribution claims a section, and no stock grid is\n * filled in for a `DisplayInForm` relationship. The composition snapshot reports none of\n * them either. Container chrome that belongs to the *record* rather than to the body —\n * the toolbar, Save/Delete, History, Record Changes — is unaffected.\n *\n * The fill-in reads an unbaked relationship as stale CodeGen and supplies the missing\n * grid. A form that replaced the body bakes nothing by design, so without this flag\n * every relationship reads as missing and the container composes a form the author\n * never asked for.\n */\n public get OwnsEntireFormBody(): boolean { return false; }\n\n /**\n * Last composition snapshot the container published — what is actually on this form:\n * sections, related grids, contributions and slots. Consumers: agent context (so Skip\n * can target a real slot and section key) and Form Studio.\n */\n public CompositionSnapshot: FormCompositionSnapshot | null = null;\n @Output() CompositionChanged = new EventEmitter<FormCompositionSnapshot>();\n\n private readonly _formPanels = new Set<BaseFormPanel>();\n\n /** Slot hosts register every mounted panel so validation can include panel-owned checks. */\n public RegisterFormPanel(panel: BaseFormPanel): void {\n this._formPanels.add(panel);\n }\n\n public UnregisterFormPanel(panel: BaseFormPanel): void {\n this._formPanels.delete(panel);\n }\n\n /**\n * Fires when a section's known row count changes — from the container's batched\n * count prefetch, a related grid load (including a manual grid refresh), or a\n * contribution reporting its own count. The container re-resolves empty-section\n * chrome (`whenEmpty`) when a count crosses zero.\n */\n @Output() SectionRowCountChanged = new EventEmitter<{ SectionKey: string; RowCount: number; Previous: number | undefined }>();\n\n // #endregion\n\n /** Subscription to form state changes */\n private formStateSubscription?: Subscription;\n\n @ViewChildren(MjCollapsiblePanelComponent)\n 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 this._duplicateEntryCheck?.Dispose();\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 this.EditModeChanged.emit(true);\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 this.EditModeChanged.emit(false);\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 /**\n * Record + pending-record validation, merged with whatever panel validity is\n * already known.\n *\n * Synchronous, and therefore blind to a panel validator that has not reported yet —\n * any path that gates a save must use {@link ValidateAsync}. The signature stays\n * synchronous because this is published API with external callers.\n */\n public Validate(): ValidationResult {\n const valResults = this.validateRecordAndPending();\n if (this._omitLastKnownPanelValidation) {\n return valResults;\n }\n return MergePanelValidation(valResults, [...this._formPanels].map((panel) => panel.LastKnownValidation()));\n }\n\n /** True only while {@link ValidateAsync} calls {@link Validate}: the awaited panel results take the place of the last-known ones. */\n private _omitLastKnownPanelValidation = false;\n\n /**\n * {@link Validate}, merged with every mounted panel's validator, awaited. This is what\n * `SaveRecord()` calls.\n *\n * It starts from `Validate()`, so a subclass that overrides `Validate()` still gates the\n * save; the panels' last-known state is left out of that call, because their awaited\n * results replace it.\n *\n * A panel's `Validate()` may be async — anything checking server state will be — and\n * reading such a result synchronously yields a Promise, which tests as \"no opinion\"\n * and lets an invalid record save with no error and no log.\n */\n public async ValidateAsync(): Promise<ValidationResult> {\n let base: ValidationResult;\n this._omitLastKnownPanelValidation = true;\n try {\n base = this.Validate();\n } finally {\n this._omitLastKnownPanelValidation = false;\n }\n const panelResults = await Promise.all([...this._formPanels].map((panel) => panel.Validate()));\n return MergePanelValidation(base, panelResults);\n }\n\n private validateRecordAndPending(): 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 // The only failure this method cannot show the user: with no record there is nothing to\n // validate, toast about or paint. Every other refusal below is already reported through\n // the toast and the fields, so it is NOT logged again here — a second, generic line\n // (\"Record not found\") on a create that failed validation sent readers hunting for an\n // ID or routing fault that did not exist.\n LogError('Could not save record: the form has no record bound to it');\n return false;\n }\n\n this.PopulatePendingRecords();\n const valResults = await this.ValidateAsync();\n if (!valResults.Success) {\n this.publishValidationFailure(valResults.Errors);\n return false;\n }\n\n const result = await this.InternalSaveRecord();\n if (result) {\n this._pendingRecords = [];\n this.clearValidationState();\n this._duplicateEntryCheck?.RecordSaved();\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 }\n\n const serverMsg = this.record.LatestResult?.Message || '';\n const errorMsg = serverMsg ? `Save failed: ${serverMsg}` : 'Error saving record';\n // A server-side Validate()/ValidateAsync() refusal comes back with its field-named\n // reasons in LatestResult.Errors (rehydrated by the provider). When any of them names a\n // field on this record, publish them through the SAME path the local Validate() branch\n // uses above, so the field paints red with its message instead of the user getting a\n // toast and a form with nothing marked. Errors with no field source stay toast-only.\n const serverErrors = this.fieldSourcedServerErrors();\n if (serverErrors.length > 0) {\n this.publishValidationFailure(serverErrors);\n } else {\n this.Notification.emit({ Message: errorMsg, Type: 'error', Duration: 5000 });\n }\n this.RecordSaveFailed.emit({ EntityName: this.record.EntityInfo.Name, ErrorMessage: errorMsg });\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 /**\n * Re-fetches the current record from the database, updating field values\n * in-place and resetting dirty flags. No-op in edit mode or on an unsaved\n * record. Related-entity grids are notified via the form container's\n * {@link FormRecordRefreshCoordinator} after this emits {@link RecordRefreshed}.\n *\n * @returns true if the record was reloaded from the database.\n */\n public async RefreshRecord(): Promise<boolean> {\n if (!this.canRefreshRecord()) {\n return false;\n }\n\n this.IsRefreshing = true;\n this.cdr.markForCheck();\n\n try {\n return await this.executeRecordRefresh();\n } finally {\n this.IsRefreshing = false;\n this.cdr.markForCheck();\n }\n }\n\n private canRefreshRecord(): boolean {\n return !!this.record && this.record.IsSaved && !this.EditMode;\n }\n\n private async executeRecordRefresh(): Promise<boolean> {\n const record = this.record;\n if (!record) {\n return false;\n }\n\n try {\n const ok = await record.Refresh();\n if (!ok) {\n this.Notification.emit({\n Message: 'Failed to refresh record from database',\n Type: 'error',\n Duration: 5000,\n });\n return false;\n }\n\n await this.reloadFavoriteStatusAfterRefresh(record);\n this.Notification.emit({\n Message: 'Record refreshed from database',\n Type: 'info',\n Duration: 2000,\n });\n this.RecordRefreshed.emit({\n EntityName: record.EntityInfo.Name,\n Record: record,\n });\n return true;\n } catch (e) {\n const detail = e instanceof Error ? e.message : String(e);\n this.Notification.emit({\n Message: 'Error refreshing record: ' + detail,\n Type: 'error',\n Duration: 5000,\n });\n return false;\n }\n }\n\n private async reloadFavoriteStatusAfterRefresh(record: BaseEntity): Promise<void> {\n const md = this.ProviderToUse;\n try {\n this._isFavorite = await md.GetRecordFavoriteStatus(\n md.CurrentUser.ID,\n record.EntityInfo.Name,\n record.PrimaryKey,\n );\n } catch {\n // Non-critical — favorite status remains as is\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 Duplicate Entry Check\n\n private _duplicateEntryCheck: DuplicateEntryCheckController | null = null;\n\n /**\n * The entry-time duplicate check. While a person enters a new record it asks the server, after\n * each pause in editing, whether the values duplicate existing records, and holds the ones to\n * flag. It only flags: saving is never blocked and nothing is merged. `mj-record-form-container`\n * shows the notice.\n */\n public get DuplicateEntryCheck(): DuplicateEntryCheckController {\n if (!this._duplicateEntryCheck) {\n this._duplicateEntryCheck = new DuplicateEntryCheckController(\n (entityName, values) => this.CheckDuplicateEntry(entityName, values)\n );\n }\n return this._duplicateEntryCheck;\n }\n\n /** Whether the possible-duplicate notice shows: a new record with flagged candidates not dismissed. */\n public get ShowDuplicateEntryNotice(): boolean {\n return !!this.record && !this.record.IsSaved && (this._duplicateEntryCheck?.IsNoticeVisible ?? false);\n }\n\n /**\n * A person edited a field on this form. For a new record this restarts the entry-time duplicate\n * check. `mj-record-form-container` calls it for every `mj-form-field` edit; a custom editor that\n * changes the record some other way can call it too.\n *\n * A user who cannot read the entity (one who may only create its records) never starts a check:\n * the server would refuse it, and a flagged record is one they could not open anyway.\n */\n public OnFieldEdited(): void {\n if (this.record && !this.record.IsSaved && this.UserCanRead) {\n this.DuplicateEntryCheck.RecordEdited(this.record);\n }\n }\n\n /**\n * Opens a flagged candidate the way the form opens any record: a `Navigate` event the host\n * handles, never a router call. It asks for a new tab, so the record being entered is kept.\n */\n public OpenDuplicateCandidate(candidate: DuplicateEntryCandidate): void {\n const entityInfo = this.record?.EntityInfo;\n if (!entityInfo) return;\n this.Navigate.emit({\n Kind: 'record',\n EntityName: entityInfo.Name,\n PrimaryKey: CompositeKey.FromURLSegment(entityInfo, candidate.RecordID),\n OpenInNewTab: true\n });\n }\n\n /** The person dismissed the possible-duplicate notice. */\n public DismissDuplicateNotice(): void {\n this._duplicateEntryCheck?.Dismiss();\n }\n\n /**\n * Asks the server whether the values being entered duplicate existing records. A form on a\n * provider that is not a `GraphQLDataProvider` has no server to ask, so the check reports\n * `NotConfigured` and stops for the entity. Override to send the check elsewhere.\n */\n protected async CheckDuplicateEntry(entityName: string, values: Record<string, DuplicateEntryCheckValue>): Promise<DuplicateEntryCheckResult> {\n const provider = this.ProviderToUse;\n if (!(provider instanceof GraphQLDataProvider)) {\n return { Status: 'NotConfigured', Candidates: [] };\n }\n return new GraphQLAIClient(provider).CheckDuplicateEntry({ EntityName: entityName, Values: values });\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 /**\n * One grid over several FKs to the same related entity (Bill-To OR Ship-To).\n */\n public BuildRelationshipViewParamsForJoinFields(relatedEntityName: string, joinFields: readonly string[]): RunViewParams {\n if (!this.record) return {};\n return EntityInfo.BuildRelationshipViewParamsForJoinFields(this.record, relatedEntityName, joinFields);\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 /**\n * Default values for a new related-entity record so it links back here.\n * Pass `relatedEntityJoinField` when more than one relationship targets the\n * same entity (Bill-To vs Ship-To). When omitted and several matches exist,\n * every matching FK is set — same fields the related grid is filtering on.\n */\n public NewRecordValues(relatedEntityName: string, relatedEntityJoinField?: string): Record<string, unknown> {\n if (!this.record) return {};\n if (relatedEntityJoinField) {\n const eri = this.GetEntityRelationshipByRelatedEntityName(relatedEntityName, relatedEntityJoinField);\n if (eri) return this.NewRecordValuesByEntityRelationship(eri);\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(this.record, [relatedEntityJoinField]);\n }\n const matches = this.record.EntityInfo.RelatedEntities.filter(\n (x) => x.RelatedEntity.trim().toLowerCase() === relatedEntityName.trim().toLowerCase(),\n );\n if (matches.length === 0) return {};\n if (matches.length === 1) return this.NewRecordValuesByEntityRelationship(matches[0]);\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(\n this.record,\n matches.map((m) => m.RelatedEntityJoinField),\n );\n }\n\n /**\n * Default values for a new related record, setting every listed join field\n * to this record's key. Pair with {@link BuildRelationshipViewParamsForJoinFields}.\n */\n public NewRecordValuesForJoinFields(relatedEntityName: string, joinFields: readonly string[]): Record<string, unknown> {\n if (!this.record || !relatedEntityName) return {};\n return EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(this.record, joinFields);\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 private _formContextMemo: FormContext | null = null;\n\n /**\n * Context handed to every field, panel and slot in the form.\n *\n * Returns the SAME object while nothing in it has changed. Templates bind this getter in\n * dozens of places per form, and Angular evaluates each binding on every change-detection\n * pass — so allocating a fresh object per access handed every child a new reference each\n * pass, defeating input-identity checks and cascading re-renders through the whole form.\n * Building the candidate is cheap (the expensive part, hidden section keys, is memoized);\n * the identity comparison below is what stops the cascade.\n */\n public get formContext(): FormContext {\n // One collector read per access; both contribution-derived values come from it.\n const entity = this.record?.EntityInfo;\n const regs = entity\n ? CollectFormContributionRegistrations(entity, this.ProviderToUse, { Preview: this.placementPreview })\n : null;\n const next: FormContext = {\n sectionFilter: this.searchFilter,\n showEmptyFields: this.showEmptyFields,\n showValidation: this._showValidation,\n validationErrors: this._validationErrors,\n validationRevision: this._validationRevision,\n collapsibleSections: this.Config?.CollapsibleSections,\n enableRecordLinks: this.Config?.EnableRecordLinks,\n showRelatedEntities: this.Config?.ShowRelatedEntities,\n hiddenSectionKeys: this.resolveHiddenSectionKeys(entity, regs),\n claimedFieldNames: this.contributionClaimedFieldNames(entity, regs),\n visibleSectionKeys: this.Config?.VisibleSectionKeys,\n allowSectionReorder: this.resolveAllowSectionReorder()\n };\n const prev = this._formContextMemo;\n if (prev && FormContextsEqual(prev, next)) return prev;\n this._formContextMemo = next;\n return next;\n }\n\n /** Memo for {@link resolveHiddenSectionKeys}. */\n private _resolvedHiddenKeysMemo: { claimed: string[]; configured: string[] | undefined; merged: string[] } | null = null;\n\n /**\n * Config HiddenSectionKeys plus section keys winning contributions asked\n * to hide (related-entity claims and `replacesSectionKey` field panels).\n */\n private resolveHiddenSectionKeys(\n entity: EntityInfo | undefined,\n regs: readonly FormContributionRegistration[] | null,\n ): string[] | undefined {\n const claimed = this.contributionHiddenSectionKeys(entity, regs);\n const configured = this.Config?.HiddenSectionKeys;\n if (claimed.length === 0) return configured;\n // Memoized on the identity of both inputs: without it this concatenation returns a new\n // array per access, which alone would make every formContext look changed.\n const memo = this._resolvedHiddenKeysMemo;\n if (memo && memo.claimed === claimed && memo.configured === configured) return memo.merged;\n const merged = [...(configured ?? []), ...claimed];\n this._resolvedHiddenKeysMemo = { claimed, configured, merged };\n return merged;\n }\n\n /** Memo for {@link contributionClaimedFieldNames} — same reasoning as the hidden-keys memo. */\n private _claimedFieldsMemo: { entity: EntityInfo; regs: readonly FormContributionRegistration[]; names: string[] } | null = null;\n\n /**\n * Field names a winning contribution stands in for, so no section draws them.\n *\n * Empty stays `undefined` rather than `[]`: `formContext` is compared by value on every\n * change-detection pass, and a fresh empty array per pass would make every context look\n * different from the last one.\n */\n private contributionClaimedFieldNames(\n entity: EntityInfo | undefined,\n regs: readonly FormContributionRegistration[] | null,\n ): string[] | undefined {\n if (!entity || !regs) return undefined;\n const memo = this._claimedFieldsMemo;\n if (!(memo && memo.entity === entity && memo.regs === regs)) {\n const names = ContributionClaimedFieldNames(\n entity.Name,\n entity.RelatedEntities,\n entity.ChildEntities.map((child) => child.ID),\n regs,\n );\n this._claimedFieldsMemo = { entity, regs, names };\n }\n const names = this._claimedFieldsMemo!.names;\n return names.length > 0 ? names : undefined;\n }\n\n /** Memo for {@link contributionHiddenSectionKeys} — see the comment there. */\n private _hiddenKeysMemo: { entity: EntityInfo; regs: readonly FormContributionRegistration[]; keys: string[] } | null = null;\n\n /**\n * Section keys hidden because a contribution claimed them.\n *\n * Memoized on the identity of the merged registration list, which the collector returns as\n * a stable reference until something actually changes. That matters because this sits under\n * the `formContext` getter, which is bound in dozens of places per form and re-evaluated on\n * every change-detection pass — and `ContributionHiddenSectionKeys` runs the WHOLE composer\n * (collapse, relationship walk, section-key construction) on each call. Running that per\n * binding per pass is what made forms lag.\n */\n private contributionHiddenSectionKeys(\n entity: EntityInfo | undefined,\n regs: readonly FormContributionRegistration[] | null,\n ): string[] {\n // `regs` is merged: compiled registrations plus the rows that apply to this user.\n if (!entity || !regs) return [];\n const memo = this._hiddenKeysMemo;\n if (memo && memo.entity === entity && memo.regs === regs) return memo.keys;\n const keys = ContributionHiddenSectionKeys(\n entity.Name,\n entity.RelatedEntities,\n entity.ChildEntities.map((child) => child.ID),\n regs,\n );\n this._hiddenKeysMemo = { entity, regs, keys };\n return keys;\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 /**\n * Bumped on every {@link publishValidationFailure}; published as `FormContext.validationRevision`\n * so a field can tell an edit made before the failure from one made after it.\n */\n private _validationRevision = 0;\n\n /**\n * The ONE way validation errors reach the fields and the user — used by both the local\n * `Validate()` refusal and a server-side refusal that came back on `LatestResult.Errors`, so the\n * two cannot drift: broadcast through `FormContext` (fields match `Source === FieldName`), bump\n * the revision, toast the messages, and raise `ValidationFailed`.\n */\n private publishValidationFailure(errors: ValidationErrorInfo[]): void {\n this._showValidation = true;\n this._validationErrors = errors;\n this._validationRevision++;\n this.cdr.markForCheck();\n\n const errorMessages = 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 * The structured errors of the last failed save, when at least one names a field on this record.\n *\n * `LatestResult.Errors` is untyped and may hold anything a provider put there, so it is normalised\n * through `DeserializeValidationErrors` first. Returns `[]` unless some entry's `Source` is one of\n * this record's field names — a refusal that is purely record-level (\"the database timed out\",\n * \"not authorised\") has nothing to paint and keeps the plain error toast. When there IS a\n * field-sourced entry, the WHOLE set is returned: field-agnostic entries paint nothing (no field\n * matches an empty Source) but still belong in the toast.\n */\n private fieldSourcedServerErrors(): ValidationErrorInfo[] {\n const errors = DeserializeValidationErrors(this.record?.LatestResult?.Errors);\n if (errors.length === 0) return [];\n const fieldNames = new Set(this.record.EntityInfo.Fields.map(f => f.Name));\n return errors.some(e => e.Source.length > 0 && fieldNames.has(e.Source)) ? errors : [];\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 /**\n * The row count shown as a section's badge. `undefined` until known, and always\n * `undefined` for a section whose badge is turned off (`showCount: false`) — use\n * {@link PeekSectionRowCount} for the underlying number.\n */\n public GetSectionRowCount(sectionKey: string): number | undefined {\n if (this.suppressedBadgeSectionKeys.has(sectionKey)) return undefined;\n return this.PeekSectionRowCount(sectionKey);\n }\n\n /** The last known row count for a section, regardless of whether its badge shows. */\n public PeekSectionRowCount(sectionKey: string): number | undefined {\n return this.sectionMap.get(sectionKey)?.rowCount;\n }\n\n private suppressedBadgeSectionKeys = new Set<string>();\n\n /** Show or hide a section's row-count badge (metadata `showCount`). The count itself is still tracked. */\n public SetSectionBadgeVisible(sectionKey: string, visible: boolean): void {\n const changed = visible ? this.suppressedBadgeSectionKeys.delete(sectionKey) : !this.suppressedBadgeSectionKeys.has(sectionKey);\n if (!visible) this.suppressedBadgeSectionKeys.add(sectionKey);\n if (changed) this.cdr.markForCheck();\n }\n\n public SetSectionRowCount(sectionKey: string, rowCount: number): void {\n const previous = this.PeekSectionRowCount(sectionKey);\n this.applySectionRowCount(sectionKey, rowCount);\n if (previous !== rowCount) {\n this.SectionRowCountChanged.emit({ SectionKey: sectionKey, RowCount: rowCount, Previous: previous });\n }\n }\n\n private applySectionRowCount(sectionKey: string, rowCount: number): void {\n let section = this.sectionMap.get(sectionKey);\n if (!section) {\n // Contribution panels use their own SectionKey (e.g. 'orders') which\n // is never seeded by generated initSections(). Kept in the map only, so the\n // left-nav rail badge reads the count the same way baked grids do. It stays out\n // of `sections`: that list is the form's declared order, and a key in it is drawn\n // at its index instead of at the slot the panel was placed in.\n section = new BaseFormSectionInfo(sectionKey, sectionKey, false, rowCount);\n this.sectionMap.set(sectionKey, section);\n } else {\n section.rowCount = rowCount;\n }\n this.cdr.markForCheck();\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 getMoreSectionKeys(): string[] {\n const entityName = this.getEntityName();\n if (!entityName) return [];\n return this.formStateService.getMoreSectionKeys(entityName) ?? [];\n }\n\n public getFirstClassSectionKeys(): string[] {\n const entityName = this.getEntityName();\n if (!entityName) return [];\n return this.formStateService.getFirstClassSectionKeys(entityName) ?? [];\n }\n\n public setChromeMembership(moreSectionKeys: string[], firstClassSectionKeys: string[]): void {\n const entityName = this.getEntityName();\n if (entityName) {\n this.formStateService.setChromeMembership(entityName, moreSectionKeys, firstClassSectionKeys);\n }\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 /**\n * Where this key sits in the section order, or null when it is not in it at all.\n *\n * {@link getSectionDisplayOrder} cannot answer that: it returns the section count for\n * an unknown key, which is indistinguishable from a real last position. A contribution\n * panel is not in the form's declared sections, so a caller has to be able to tell\n * \"the user placed this here\" from \"nobody has said where this goes\".\n */\n public getSectionOrderIndex(sectionKey: string): number | null {\n const index = this.getSectionOrder().indexOf(sectionKey);\n return index >= 0 ? index : null;\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"]}
|
|
@@ -8,6 +8,8 @@ import type { FormRole } from '@memberjunction/core';
|
|
|
8
8
|
export declare const MORE_SECTION_KEY = "__mj_form_more";
|
|
9
9
|
/** Field panels (default / inherited) collapse into this one left-nav item. */
|
|
10
10
|
export declare const DETAILS_SECTION_KEY = "__mj_form_details";
|
|
11
|
+
/** The title of the left-nav item {@link DETAILS_SECTION_KEY} names. */
|
|
12
|
+
export declare const DETAILS_SECTION_TITLE = "Details";
|
|
11
13
|
export declare const SYSTEM_METADATA_SECTION_KEY = "systemMetadata";
|
|
12
14
|
/**
|
|
13
15
|
* Expand-all / collapse-all only apply to stacked accordion panels.
|
|
@@ -17,6 +19,85 @@ export declare const SYSTEM_METADATA_SECTION_KEY = "systemMetadata";
|
|
|
17
19
|
export declare function IsAccordionFormChrome(layout: string | null | undefined): boolean;
|
|
18
20
|
/** Audit / timestamp leftover sections always fold into More. */
|
|
19
21
|
export declare function IsAlwaysMoreSection(sectionKey: string, sectionName?: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The section keys filed under one rail item, worked out from the panels alone.
|
|
24
|
+
*
|
|
25
|
+
* The rail's own membership is not usable here: it is computed from the set of panels a
|
|
26
|
+
* contribution has hidden, so asking it which panels a contribution should hide would be
|
|
27
|
+
* circular. This applies the same classification the rail applies — audit leftovers to
|
|
28
|
+
* More, related grids and contributions to an item of their own merged by title,
|
|
29
|
+
* everything else to Details — over the unfiltered panels.
|
|
30
|
+
*
|
|
31
|
+
* `groupKey` is any rail item's key, so nothing here privileges Details.
|
|
32
|
+
*/
|
|
33
|
+
export declare function RailGroupSectionKeys(panels: readonly FormChromePanelSnapshot[], contributionSectionKeys: readonly string[], groupKey: string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* The panels a contribution can replace one of: what the Details rail item is made of,
|
|
36
|
+
* in document order.
|
|
37
|
+
*
|
|
38
|
+
* Not "every panel that is not a related grid". That set also holds the contributions
|
|
39
|
+
* already installed — replaced by naming the panel, not a section — and the leftover
|
|
40
|
+
* audit sections, which the rail files under More. Offering either as a field group
|
|
41
|
+
* inside Details tells the user the tab contains things it does not. With no Details
|
|
42
|
+
* item the form has no such tab, and every non-grid panel stands on its own.
|
|
43
|
+
*/
|
|
44
|
+
export declare function FieldGroupsInDetails(panels: readonly FormChromePanelSnapshot[], groups: readonly FormChromeGroup[]): Array<{
|
|
45
|
+
Key: string;
|
|
46
|
+
Title: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* The section drawing any of these fields, which is where a field claim renders.
|
|
50
|
+
*
|
|
51
|
+
* Any, not all: a claim naming a field the form has stopped drawing still renders where
|
|
52
|
+
* its remaining fields are. The first match wins, and the claim is meant to name fields of
|
|
53
|
+
* one section, so there is normally only one.
|
|
54
|
+
*/
|
|
55
|
+
export declare function SectionDrawingAnyField(panels: readonly FormChromePanelSnapshot[], fieldNames: readonly string[]): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The rail item a contribution belongs to by virtue of the slot it mounts at.
|
|
58
|
+
*
|
|
59
|
+
* A slot says where a panel sits in the form body, and the rail groups that body — so the
|
|
60
|
+
* slot decides the group unless something more specific does. `before-fields` and
|
|
61
|
+
* `after-fields` are positions among the field sections, and the field sections are the
|
|
62
|
+
* Details tab, so a panel at either belongs in Details. The rest are positions relative
|
|
63
|
+
* to things that are tabs in their own right, so a panel there is its own tab too.
|
|
64
|
+
*
|
|
65
|
+
* Without this the slot has no visible effect on a rail form at all: every contribution
|
|
66
|
+
* that claims nothing becomes its own tab, and a user who asked for "before the fields"
|
|
67
|
+
* gets a tab at the bottom of the rail instead.
|
|
68
|
+
*/
|
|
69
|
+
export declare function SlotChromeGroup(slot: string | null | undefined): 'details' | null;
|
|
70
|
+
/**
|
|
71
|
+
* The rail item a contribution falls into when it claims no section: the slot's group, unless
|
|
72
|
+
* the contribution declared an L1 `inclusion` of its own.
|
|
73
|
+
*
|
|
74
|
+
* The slot is a default — "nothing more specific says" — and a declared inclusion is more
|
|
75
|
+
* specific. `'Primary'` asks for a first-class rail item in the lead band before Details, `'More'`
|
|
76
|
+
* for the overflow folder, `'None'` for nothing at all; each is honoured downstream from the
|
|
77
|
+
* inclusion map. Filing such a contribution into Details here would pin it there, and a pin
|
|
78
|
+
* outranks the inclusion, so an Overview declared `Primary` at `before-fields` would vanish into
|
|
79
|
+
* the tab it was meant to lead.
|
|
80
|
+
*/
|
|
81
|
+
export declare function DefaultContributionChromeGroup(slot: string | null | undefined, declaresInclusion: boolean): 'details' | null;
|
|
82
|
+
/** Enough of a rendered section to decide which rail item it belongs to. */
|
|
83
|
+
export interface ChromeSectionShape {
|
|
84
|
+
Variant?: string;
|
|
85
|
+
SectionName?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The rail item a contribution joins when it replaces `sectionKey`.
|
|
89
|
+
*
|
|
90
|
+
* Replacing something means standing where it stood. A panel put in place of a field
|
|
91
|
+
* section belongs in the Details tab that section was part of; one put in place of the
|
|
92
|
+
* whole Details group belongs in that group; one put in place of a leftover audit section
|
|
93
|
+
* belongs in More. Null means the contribution keeps a rail item of its own: it replaces
|
|
94
|
+
* nothing, the section is not on the form, or it takes over a related grid — that last one
|
|
95
|
+
* already inherits the grid's rail item through the relationship claim.
|
|
96
|
+
*
|
|
97
|
+
* Without this a replacing panel is lifted to a first-class rail item beside the tab it
|
|
98
|
+
* emptied, so the form loses a section and gains a tab.
|
|
99
|
+
*/
|
|
100
|
+
export declare function ReplacedSectionChromeGroup(sectionKey: string | null | undefined, section: ChromeSectionShape | null | undefined): 'details' | 'more' | null;
|
|
20
101
|
/**
|
|
21
102
|
* Drop a schema entity-name prefix (`MJ_BizApps_Common: Contact Methods` →
|
|
22
103
|
* `Contact Methods`). DisplayName is the long-term source of truth; this keeps
|
|
@@ -73,6 +154,15 @@ export interface FormChromePanelSnapshot {
|
|
|
73
154
|
SectionName: string;
|
|
74
155
|
Variant: string;
|
|
75
156
|
Icon?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The inputs this panel draws, when it draws any. Present so the composition snapshot
|
|
159
|
+
* can name a field a contribution could stand in for; the chrome rules themselves do
|
|
160
|
+
* not read it.
|
|
161
|
+
*/
|
|
162
|
+
Fields?: ReadonlyArray<{
|
|
163
|
+
Name: string;
|
|
164
|
+
Label: string;
|
|
165
|
+
}>;
|
|
76
166
|
}
|
|
77
167
|
export declare const DEFAULT_FORM_CHROME_SPEC: FormChromeSpec;
|
|
78
168
|
//# sourceMappingURL=form-chrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-chrome.d.ts","sourceRoot":"","sources":["../../../src/lib/chrome/form-chrome.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,mBAAmB,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhF;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CA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