@memberjunction/ng-base-forms 6.2.0-edge.1 → 6.2.0-edge.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +166 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +296 -20
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome.d.ts +78 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome.js +128 -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 +261 -5
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +1180 -371
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts +150 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts.map +1 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js +263 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js.map +1 -0
- package/dist/lib/field/form-field.component.d.ts +22 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +51 -6
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-field-edit.coordinator.d.ts +25 -0
- package/dist/lib/form-field-edit.coordinator.d.ts.map +1 -0
- package/dist/lib/form-field-edit.coordinator.js +27 -0
- package/dist/lib/form-field-edit.coordinator.js.map +1 -0
- 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 +242 -64
- 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 +129 -2
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +974 -307
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-events.d.ts +6 -0
- package/dist/lib/types/form-events.d.ts.map +1 -1
- package/dist/lib/types/form-events.js +6 -0
- package/dist/lib/types/form-events.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +20 -1
- package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
- package/dist/lib/types/form-toolbar-item.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +13 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +16 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +3 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +29 -22
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +50 -8
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +22 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +24 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-form-host.component.js","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts","../../../src/lib/host/entity-form-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EACrD,iBAAiB,EAAE,MAAM,EACxC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAA+B,oBAAoB,EAAE,iBAAiB,EACnF,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;;;;ICZtE,8BAAkC;IAChC,gCAAkD;IACpD,iBAAM;;;IAKN,8BAA6C;IAC3C,uBAAwE;IACxE,6BAAqC;IAAA,YAAgB;IAAA,iBAAK;IAC1D,4BAAqC;IAAA,YAAiB;IACxD,AADwD,iBAAI,EACtD;;;IAFiC,eAAgB;IAAhB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AC;iRApeU,yBAAyB,yBAAzB,yBAAyB;6DAAzB,yBAAyB;mCAKP,gBAAgB;;;;;YC5D/C,2FAAe;YAOf,2FAA8B;YAa9B,2HAAqB;;YApBrB,sCAIC;YAGD,cAMC;YAND,yDAMC;;;iFD0CY,yBAAyB;cANrC,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAS9B,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kBAM5D,KAAK;;kBAUL,KAAK;;kBAkBL,KAAK;;kBASL,KAAK;;kBAUL,KAAK;;kBAIL,KAAK;;kBAKL,KAAK;;kBAKL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFAhGI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef,\n ComponentRef, ChangeDetectorRef, inject, AfterViewInit, OnDestroy, Type\n} from '@angular/core';\nimport {\n CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType\n} from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { Subscription } from 'rxjs';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { BaseFormComponent } from '../base-form-component';\nimport { BaseFormSectionComponent } from '../base-form-section-component';\nimport { InteractiveFormComponent } from '../interactive-form/interactive-form.component';\nimport { FormResolverService } from '../resolver/form-resolver.service';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordSavedEvent, RecordDeletedEvent,\n RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\n\n/**\n * Presentation-agnostic host that renders ANY MemberJunction entity form —\n * generated (`@RegisterClass` / CodeGen), custom (`*Extended`), or interactive\n * (`EntityFormOverride`) — for a given record.\n *\n * This is the shared core extracted from Explorer's `SingleRecordComponent`. It\n * encapsulates the full lifecycle: **resolve** which form to use (via\n * {@link FormResolverService}, honoring variant overrides) → **load** the\n * record (or accept a pre-loaded one) → **create** the form component\n * dynamically → **bind** record / EditMode / Config / variants → **re-emit**\n * the form's events → **tear down** cleanly.\n *\n * It has ZERO routing and ZERO Explorer dependencies — it only emits events.\n * The surrounding surface (a full-page tab in Explorer, a dialog, or a\n * slide-in) decides what to do with `Navigate`, `Notification`, etc.\n *\n * @example Explorer tab (thin wrapper subscribes + maps to NavigationService)\n * ```html\n * <mj-entity-form-host [EntityName]=\"entityName\" [PrimaryKey]=\"pk\"\n * (Navigate)=\"handleNavigation($event)\" (Saved)=\"onSaved($event)\">\n * </mj-entity-form-host>\n * ```\n *\n * @example Bind a pre-loaded record (dialog/slide-in)\n * ```html\n * <mj-entity-form-host [Record]=\"myEntity\" [Config]=\"DIALOG_FORM_CONFIG\"></mj-entity-form-host>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-entity-form-host',\n templateUrl: './entity-form-host.component.html',\n styleUrls: ['./entity-form-host.component.css'],\n})\nexport class MjEntityFormHostComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private formResolver = inject(FormResolverService);\n\n /** Anchor for the dynamically-created form component. Always present in the DOM. */\n @ViewChild('anchor', { read: ViewContainerRef, static: true }) private anchor!: ViewContainerRef;\n\n // ── Inputs ──────────────────────────────────────────────────────────────\n\n private _entityName: string | null = null;\n /** Entity name to load a record for. Ignored when {@link Record} is supplied. */\n @Input()\n set EntityName(value: string | null) {\n const changed = this._entityName !== value;\n this._entityName = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get EntityName(): string | null { return this._entityName; }\n\n private _primaryKey: CompositeKey = new CompositeKey();\n /** Primary key of the record to load. Empty key → new record. */\n @Input()\n set PrimaryKey(value: CompositeKey) {\n const changed = !this.compositeKeysEqual(this._primaryKey, value);\n this._primaryKey = value ?? new CompositeKey();\n if (!changed || !this._viewInitialized) return;\n // Skip reload when the incoming key just reflects the current record's now-saved PK\n // (post new-record save rebind). Genuine external swaps still reload.\n if (this._currentRecord && this.compositeKeysEqual(value, this._currentRecord.PrimaryKey)) return;\n this.reload();\n }\n get PrimaryKey(): CompositeKey { return this._primaryKey; }\n\n private _record: BaseEntity | null = null;\n /**\n * Pre-loaded record to bind directly. When supplied, the host skips the\n * load step entirely and mounts the resolved form against this instance —\n * `EntityName`/`PrimaryKey` are not required.\n */\n @Input()\n set Record(value: BaseEntity | null) {\n const changed = this._record !== value;\n this._record = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get Record(): BaseEntity | null { return this._record; }\n\n /** New-record default values: URL-segment string or a plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n\n /**\n * Render a single registered form **section** (a `BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * When set, the full-form resolver / variant picker / toolbar container are\n * bypassed — the section component renders its own fields and the host saves\n * the record directly. Used for compact, focused editors (e.g. a quick-edit\n * grid row). Leave null for the normal full-form behavior.\n */\n @Input() SectionName: string | null = null;\n\n private _editMode: boolean | null = null;\n /** Force edit mode. When omitted, new records start in edit, existing in read. */\n @Input()\n set EditMode(value: boolean | null) { this._editMode = value; }\n get EditMode(): boolean | null { return this._editMode; }\n\n /** Per-instance form presentation config (toolbar, sections, width, links). */\n @Input() Config: EntityFormConfig | null = null;\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n /** Form navigation request (record link, new record, hierarchy, email, external, dismiss). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** User-facing notification request (success/error/warning/info). */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Emitted after the record is successfully saved (carries the live entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordSaved` (richer payload). */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n /** Re-emitted form `RecordRefreshed`. */\n @Output() RecordRefreshed = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordDeleted`. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted form `RecordSaveFailed`. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted form `ValidationFailed`. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted form `RecordReady` (record fully initialized). */\n @Output() RecordReady = new EventEmitter<BaseEntity>();\n /** Form asked to be dismissed (e.g. Discard on a brand-new record). */\n @Output() Dismissed = new EventEmitter<void>();\n /** Initial load + mount finished (success path). */\n @Output() LoadComplete = new EventEmitter<void>();\n /** Load failed; carries a user-facing title + detail. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, emitted right after it's created (for power-user wiring). */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n\n // ── State ───────────────────────────────────────────────────────────────\n\n public Loading = true;\n\n /** @deprecated Use {@link Loading}. */\n public get loading() {\n return this.Loading;\n }\n /** @deprecated Use {@link Loading}. */\n public set loading(value) {\n this.Loading = value;\n }\n public ErrorTitle: string | null = null;\n\n /** @deprecated Use {@link ErrorTitle}. */\n public get errorTitle(): string | null {\n return this.ErrorTitle;\n }\n /** @deprecated Use {@link ErrorTitle}. */\n public set errorTitle(value: string | null) {\n this.ErrorTitle = value;\n }\n public errorDetail: string | null = null;\n\n private _formComponentRef: ComponentRef<BaseFormComponent> | null = null;\n private _sectionRef: ComponentRef<BaseFormSectionComponent> | null = null;\n private _isSection = false;\n private _currentRecord: BaseEntity | null = null;\n private _saveHandlerSub: Subscription | null = null;\n private _formEventSubs: Subscription[] = [];\n private _viewInitialized = false;\n\n /** The live form component instance, or null before mount / after teardown. */\n get Form(): BaseFormComponent | null {\n return this._formComponentRef?.instance ?? null;\n }\n\n /** Whether the bound record has unsaved changes. */\n get Dirty(): boolean {\n return this._currentRecord?.Dirty ?? false;\n }\n\n // ── Lifecycle ───────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this._viewInitialized = true;\n this.reload();\n }\n\n ngOnDestroy(): void {\n this.teardown();\n }\n\n // ── Public API (driven by dialog/slide-in chrome) ─────────────────────────\n\n /**\n * Save the bound record. In full-form mode this runs the form's save\n * pipeline (validation, pending records, notifications); in section mode the\n * section component has no pipeline, so we save the record directly (the\n * record's own save event still drives the `Saved` output).\n */\n async Save(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord ? this._currentRecord.Save() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.SaveRecord(true);\n }\n\n /** Cancel edits (revert). Full-form mode uses the form's cancel pipeline. */\n Cancel(): void {\n if (this._isSection) {\n if (this._currentRecord?.Dirty) this._currentRecord.Revert();\n return;\n }\n this.Form?.CancelEdit();\n }\n\n /** Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline. */\n async Refresh(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord?.IsSaved ? this._currentRecord.Refresh() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.RefreshRecord();\n }\n\n // ── Core: resolve → load → create → bind → wire ──────────────────────────\n\n private reload(): void {\n this.teardown();\n this.Loading = true;\n this.ErrorTitle = null;\n this.errorDetail = null;\n void this.loadAndMount();\n }\n\n private async loadAndMount(): Promise<void> {\n const md = this.ProviderToUse;\n // When a pre-loaded record is supplied, derive the entity from it.\n const entityName = this._record?.EntityInfo?.Name ?? this._entityName;\n\n if (!entityName || entityName.trim().length === 0) {\n // Nothing to load yet — a caller will re-invoke once an entity is known.\n return;\n }\n\n try {\n const entity = md.EntityByName(entityName);\n if (!entity) {\n this.fail(`Entity not found: \"${entityName}\"`,\n `This MemberJunction instance has no metadata for entity \"${entityName}\".`);\n return;\n }\n const permissions = entity.GetUserPermisions(md.CurrentUser);\n\n // Section mode short-circuits the full-form resolver / container.\n if (this.SectionName) {\n await this.mountSection(entityName, permissions);\n return;\n }\n\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n if (resolution.kind === 'none') {\n this.fail(`No form is registered for \"${entityName}\".`,\n `No EntityFormOverride or class-based form (@RegisterClass(BaseFormComponent, '${entityName}')) was found. Run CodeGen or register a custom form.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName, md);\n if (!record) return; // fail() already called\n\n // Emit Saved on the record's own save event (covers all save paths).\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const componentRef: ComponentRef<BaseFormComponent> = resolution.kind === 'interactive'\n ? this.anchor.createComponent(InteractiveFormComponent)\n : this.anchor.createComponent(resolution.subClass);\n\n if (resolution.kind === 'interactive') {\n (componentRef as ComponentRef<InteractiveFormComponent>).instance.ComponentID = resolution.override.ComponentID;\n }\n\n this._formComponentRef = componentRef;\n this._currentRecord = record;\n\n const instance = componentRef.instance as BaseFormComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.Config = this.effectiveConfigFor(record);\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.applyVariants(instance, resolution, entityName);\n this.subscribeToFormEvents(instance);\n\n this.FormCreated.emit(instance);\n this.ErrorTitle = null;\n this.errorDetail = null;\n this.LoadComplete.emit();\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n this.fail(`Failed to load ${entityName} record.`, `An unexpected error occurred: ${msg}`);\n } finally {\n this.Loading = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * The config to bind for a given record. For brand-new (unsaved) records we hide the\n * `systemMetadata` section by default — its fields (audit timestamps, IDs, etc.) are\n * empty and irrelevant until the record exists. Doesn't mutate the consumer's config,\n * and defers entirely to a consumer that uses an explicit `VisibleSectionKeys` allowlist.\n */\n private effectiveConfigFor(record: BaseEntity): EntityFormConfig | null {\n if (record.IsSaved) return this.Config;\n if (this.Config?.VisibleSectionKeys?.length) return this.Config; // consumer owns visibility\n const SYSTEM_METADATA_KEY = 'systemMetadata';\n const hidden = this.Config?.HiddenSectionKeys ?? [];\n if (hidden.includes(SYSTEM_METADATA_KEY)) return this.Config;\n return { ...(this.Config ?? {}), HiddenSectionKeys: [...hidden, SYSTEM_METADATA_KEY] };\n }\n\n /**\n * Section mode: resolve a `BaseFormSectionComponent` registered as\n * `'<entity>.<section>'`, mount it, and bind the record. No resolver,\n * variants, container, or form-event surface — section components are bare\n * field editors; the host saves the record directly (see {@link Save}).\n */\n private async mountSection(entityName: string, permissions: unknown): Promise<void> {\n const key = `${entityName}.${this.SectionName}`;\n const reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, key);\n if (!reg?.SubClass) {\n this.fail(`No form section \"${this.SectionName}\" is registered for \"${entityName}\".`,\n `Expected a @RegisterClass(BaseFormSectionComponent, '${key}'). Check the section name.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName);\n if (!record) return;\n\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const ref = this.anchor.createComponent(reg.SubClass as Type<BaseFormSectionComponent>);\n this._sectionRef = ref;\n this._currentRecord = record;\n this._isSection = true;\n\n const instance = ref.instance as BaseFormSectionComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.RecordReady.emit(record);\n this.LoadComplete.emit();\n }\n\n /** Resolve the BaseEntity to bind: the supplied instance, or a freshly loaded/new one. */\n private async obtainRecord(entityName: string, md = this.ProviderToUse): Promise<BaseEntity | null> {\n if (this._record) return this._record;\n\n const record = await md.GetEntityObject<BaseEntity>(entityName, md.CurrentUser);\n if (!record) {\n this.fail(`Failed to load ${entityName} record.`, `Unable to instantiate entity \"${entityName}\".`);\n return null;\n }\n\n if (this._primaryKey.HasValue) {\n const loadOk = await record.InnerLoad(this._primaryKey);\n if (!loadOk) {\n this.fail(`Could not load ${entityName} record.`,\n record.LatestResult?.Message\n ? `Server error: ${record.LatestResult.Message}`\n : `InnerLoad returned false for key ${this._primaryKey.ToString()}.`);\n return null;\n }\n } else {\n record.NewRecord();\n this.applyNewRecordValues(record);\n }\n return record;\n }\n\n /** Push variant list + active selection and wire the variant-switch handler. */\n private applyVariants(\n instance: BaseFormComponent,\n resolution: Awaited<ReturnType<FormResolverService['ResolveFormForEntity']>>,\n entityName: string,\n ): void {\n instance.Variants = (resolution.variants ?? [])\n .filter(v => v.Status === 'Active')\n .map(v => ({ ID: v.ID, Label: v.Name ?? `Override ${v.ID.substring(0, 8)}`, Scope: v.Scope, Status: v.Status }));\n instance.CurrentVariantID = resolution.kind === 'interactive' ? resolution.override.ID : null;\n instance.OnVariantChanged = (variantID: string | null) => {\n if (variantID === null) {\n this.formResolver.SetExplicitDefault(entityName);\n } else {\n this.formResolver.SetSelectedVariant(entityName, variantID);\n }\n // Reload via the resolver so tier/priority + the new selection apply.\n this._record = null; // force a fresh load against the new variant\n this.reload();\n };\n }\n\n /** Subscribe to the form's outputs and re-emit them through the host. */\n private subscribeToFormEvents(form: BaseFormComponent): void {\n this.cleanupFormSubs();\n this._formEventSubs.push(\n form.Navigate.subscribe(e => this.Navigate.emit(e)),\n form.Notification.subscribe(e => this.Notification.emit(e)),\n form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)),\n form.RecordRefreshed.subscribe(e => this.RecordRefreshed.emit(e.Record)),\n form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)),\n form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)),\n form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)),\n form.RecordReady.subscribe(e => this.RecordReady.emit(e)),\n );\n // Surface 'dismiss' navigation as a first-class Dismissed event too.\n this._formEventSubs.push(\n form.Navigate.subscribe(e => { if (e.Kind === 'dismiss') this.Dismissed.emit(); }),\n );\n }\n\n // ── New-record value application (URL segment or object) ──────────────────\n\n private applyNewRecordValues(record: BaseEntity): void {\n if (!this.NewRecordValues) return;\n if (typeof this.NewRecordValues === 'string') {\n if (this.NewRecordValues.length === 0) return;\n const fv = new FieldValueCollection();\n fv.SimpleLoadFromURLSegment(this.NewRecordValues);\n fv.KeyValuePairs\n .filter(kvp => kvp.Value !== null && kvp.Value !== undefined)\n .forEach(kvp => this.setTypedField(record, kvp.FieldName, kvp.Value));\n } else {\n const values = this.NewRecordValues as Record<string, unknown>;\n Object.keys(values)\n .filter(key => values[key] !== null && values[key] !== undefined)\n .forEach(key => this.setTypedField(record, key, values[key]));\n }\n }\n\n /** Set a field with TSType-aware coercion (shared by string + object paths). */\n private setTypedField(record: BaseEntity, fieldName: string, value: unknown): void {\n const f = record.Fields.find(x => x.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (!f) return;\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(fieldName, value?.toString() ?? '');\n break;\n case EntityFieldTSType.Number:\n record.Set(fieldName, typeof value === 'number' ? value : parseFloat(value?.toString() ?? '0'));\n break;\n case EntityFieldTSType.Boolean:\n if (typeof value === 'boolean') record.Set(fieldName, value);\n else if (typeof value === 'string') record.Set(fieldName, value !== 'false' && value !== '0' && value.trim().length > 0);\n else record.Set(fieldName, !!value);\n break;\n case EntityFieldTSType.Date:\n record.Set(fieldName, value instanceof Date ? value : new Date(value?.toString() ?? ''));\n break;\n default:\n record.Set(fieldName, value);\n break;\n }\n }\n\n // ── Helpers ───────────────────────────────────────────────────────────────\n\n private fail(title: string, detail: string): void {\n this.ErrorTitle = title;\n this.errorDetail = detail;\n this.Loading = false;\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n this.anchor?.clear();\n this.LoadError.emit({ title, detail });\n this.cdr.detectChanges();\n }\n\n private compositeKeysEqual(a: CompositeKey | null | undefined, b: CompositeKey | null | undefined): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const aKvps = (a.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n const bKvps = (b.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n if (aKvps.length !== bKvps.length) return false;\n for (let i = 0; i < aKvps.length; i++) {\n if (aKvps[i].FieldName !== bKvps[i].FieldName) return false;\n if (String(aKvps[i].Value ?? '') !== String(bKvps[i].Value ?? '')) return false;\n }\n return true;\n }\n\n private cleanupFormSubs(): void {\n for (const sub of this._formEventSubs) sub.unsubscribe();\n this._formEventSubs = [];\n }\n\n private teardown(): void {\n this.cleanupFormSubs();\n if (this._saveHandlerSub) {\n this._saveHandlerSub.unsubscribe();\n this._saveHandlerSub = null;\n }\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n if (this._sectionRef) {\n try { this._sectionRef.destroy(); } catch { /* noop */ }\n this._sectionRef = null;\n }\n this._isSection = false;\n this._currentRecord = null;\n this.anchor?.clear();\n }\n}\n","<!-- Loading state -->\n@if (loading) {\n <div class=\"mj-form-host-loading\">\n <mj-loading text=\"Loading record...\"></mj-loading>\n </div>\n}\n\n<!-- Error state -->\n@if (!loading && errorTitle) {\n <div class=\"mj-form-host-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation mj-form-host-error-icon\"></i>\n <h3 class=\"mj-form-host-error-title\">{{ errorTitle }}</h3>\n <p class=\"mj-form-host-error-detail\">{{ errorDetail }}</p>\n </div>\n}\n\n<!--\n Anchor for the dynamically-created form component. Always present (static)\n so the ViewContainerRef resolves at AfterViewInit. The form's own template\n carries the <mj-record-form-container>, so nothing wraps it here.\n-->\n<ng-template #anchor></ng-template>\n"]}
|
|
1
|
+
{"version":3,"file":"entity-form-host.component.js","sourceRoot":"","sources":["../../../src/lib/host/entity-form-host.component.ts","../../../src/lib/host/entity-form-host.component.html"],"names":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MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAON,MAAM;;kFAvGI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef,\n ComponentRef, ChangeDetectorRef, inject, AfterViewInit, OnDestroy, Type\n} from '@angular/core';\nimport {\n CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType\n} from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { Subscription } from 'rxjs';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { BaseFormComponent } from '../base-form-component';\nimport { BaseFormSectionComponent } from '../base-form-section-component';\nimport { InteractiveFormComponent } from '../interactive-form/interactive-form.component';\nimport { FormResolverService } from '../resolver/form-resolver.service';\nimport { FormVariantChoices } from '../resolver/form-variants';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordSavedEvent, RecordDeletedEvent,\n RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\n\n/**\n * Presentation-agnostic host that renders ANY MemberJunction entity form —\n * generated (`@RegisterClass` / CodeGen), custom (`*Extended`), or interactive\n * (`EntityFormOverride`) — for a given record.\n *\n * This is the shared core extracted from Explorer's `SingleRecordComponent`. It\n * encapsulates the full lifecycle: **resolve** which form to use (via\n * {@link FormResolverService}, honoring variant overrides) → **load** the\n * record (or accept a pre-loaded one) → **create** the form component\n * dynamically → **bind** record / EditMode / Config / variants → **re-emit**\n * the form's events → **tear down** cleanly.\n *\n * It has ZERO routing and ZERO Explorer dependencies — it only emits events.\n * The surrounding surface (a full-page tab in Explorer, a dialog, or a\n * slide-in) decides what to do with `Navigate`, `Notification`, etc.\n *\n * @example Explorer tab (thin wrapper subscribes + maps to NavigationService)\n * ```html\n * <mj-entity-form-host [EntityName]=\"entityName\" [PrimaryKey]=\"pk\"\n * (Navigate)=\"handleNavigation($event)\" (Saved)=\"onSaved($event)\">\n * </mj-entity-form-host>\n * ```\n *\n * @example Bind a pre-loaded record (dialog/slide-in)\n * ```html\n * <mj-entity-form-host [Record]=\"myEntity\" [Config]=\"DIALOG_FORM_CONFIG\"></mj-entity-form-host>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-entity-form-host',\n templateUrl: './entity-form-host.component.html',\n styleUrls: ['./entity-form-host.component.css'],\n})\nexport class MjEntityFormHostComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private formResolver = inject(FormResolverService);\n\n /** Anchor for the dynamically-created form component. Always present in the DOM. */\n @ViewChild('anchor', { read: ViewContainerRef, static: true }) private anchor!: ViewContainerRef;\n\n // ── Inputs ──────────────────────────────────────────────────────────────\n\n private _entityName: string | null = null;\n /** Entity name to load a record for. Ignored when {@link Record} is supplied. */\n @Input()\n set EntityName(value: string | null) {\n const changed = this._entityName !== value;\n this._entityName = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get EntityName(): string | null { return this._entityName; }\n\n private _primaryKey: CompositeKey = new CompositeKey();\n /** Primary key of the record to load. Empty key → new record. */\n @Input()\n set PrimaryKey(value: CompositeKey) {\n const changed = !this.compositeKeysEqual(this._primaryKey, value);\n this._primaryKey = value ?? new CompositeKey();\n if (!changed || !this._viewInitialized) return;\n // Skip reload when the incoming key just reflects the current record's now-saved PK\n // (post new-record save rebind). Genuine external swaps still reload.\n if (this._currentRecord && this.compositeKeysEqual(value, this._currentRecord.PrimaryKey)) return;\n this.reload();\n }\n get PrimaryKey(): CompositeKey { return this._primaryKey; }\n\n private _record: BaseEntity | null = null;\n /**\n * Pre-loaded record to bind directly. When supplied, the host skips the\n * load step entirely and mounts the resolved form against this instance —\n * `EntityName`/`PrimaryKey` are not required.\n */\n @Input()\n set Record(value: BaseEntity | null) {\n const changed = this._record !== value;\n this._record = value;\n if (changed && this._viewInitialized) this.reload();\n }\n get Record(): BaseEntity | null { return this._record; }\n\n /** New-record default values: URL-segment string or a plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n\n /**\n * Render a single registered form **section** (a `BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * When set, the full-form resolver / variant picker / toolbar container are\n * bypassed — the section component renders its own fields and the host saves\n * the record directly. Used for compact, focused editors (e.g. a quick-edit\n * grid row). Leave null for the normal full-form behavior.\n */\n @Input() SectionName: string | null = null;\n\n private _editMode: boolean | null = null;\n /** Force edit mode. When omitted, new records start in edit, existing in read. */\n @Input()\n set EditMode(value: boolean | null) { this._editMode = value; }\n get EditMode(): boolean | null { return this._editMode; }\n\n /** Per-instance form presentation config (toolbar, sections, width, links). */\n @Input() Config: EntityFormConfig | null = null;\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n /** Form navigation request (record link, new record, hierarchy, email, external, dismiss). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** User-facing notification request (success/error/warning/info). */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Emitted after the record is successfully saved (carries the live entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordSaved` (richer payload). */\n @Output() RecordSaved = new EventEmitter<RecordSavedEvent>();\n /** Re-emitted form `RecordRefreshed`. */\n @Output() RecordRefreshed = new EventEmitter<BaseEntity>();\n /** Re-emitted form `RecordDeleted`. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted form `RecordSaveFailed`. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted form `ValidationFailed`. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted form `RecordReady` (record fully initialized). */\n @Output() RecordReady = new EventEmitter<BaseEntity>();\n /** Form asked to be dismissed (e.g. Discard on a brand-new record). */\n @Output() Dismissed = new EventEmitter<void>();\n /** Initial load + mount finished (success path). */\n @Output() LoadComplete = new EventEmitter<void>();\n /** Load failed; carries a user-facing title + detail. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, emitted right after it's created (for power-user wiring). */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n /**\n * Re-emitted form `EditModeChanged` (true = edit started, false = ended),\n * plus one `true` right after mount when the form was created already in\n * edit mode (`StartInEditMode`, or a new record) — StartEditMode never runs\n * in that path, so without this the shell would never hear about it.\n */\n @Output() EditModeChanged = new EventEmitter<boolean>();\n\n // ── State ───────────────────────────────────────────────────────────────\n\n public Loading = true;\n\n /** @deprecated Use {@link Loading}. */\n public get loading() {\n return this.Loading;\n }\n /** @deprecated Use {@link Loading}. */\n public set loading(value) {\n this.Loading = value;\n }\n public ErrorTitle: string | null = null;\n\n /** @deprecated Use {@link ErrorTitle}. */\n public get errorTitle(): string | null {\n return this.ErrorTitle;\n }\n /** @deprecated Use {@link ErrorTitle}. */\n public set errorTitle(value: string | null) {\n this.ErrorTitle = value;\n }\n public errorDetail: string | null = null;\n\n private _formComponentRef: ComponentRef<BaseFormComponent> | null = null;\n private _sectionRef: ComponentRef<BaseFormSectionComponent> | null = null;\n private _isSection = false;\n private _currentRecord: BaseEntity | null = null;\n private _saveHandlerSub: Subscription | null = null;\n private _formEventSubs: Subscription[] = [];\n private _viewInitialized = false;\n\n /** The live form component instance, or null before mount / after teardown. */\n get Form(): BaseFormComponent | null {\n return this._formComponentRef?.instance ?? null;\n }\n\n /** Whether the bound record has unsaved changes. */\n get Dirty(): boolean {\n return this._currentRecord?.Dirty ?? false;\n }\n\n // ── Lifecycle ───────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this._viewInitialized = true;\n this.reload();\n }\n\n ngOnDestroy(): void {\n this.teardown();\n }\n\n // ── Public API (driven by dialog/slide-in chrome) ─────────────────────────\n\n /**\n * Save the bound record. In full-form mode this runs the form's save\n * pipeline (validation, pending records, notifications); in section mode the\n * section component has no pipeline, so we save the record directly (the\n * record's own save event still drives the `Saved` output).\n */\n async Save(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord ? this._currentRecord.Save() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.SaveRecord(true);\n }\n\n /** Cancel edits (revert). Full-form mode uses the form's cancel pipeline. */\n Cancel(): void {\n if (this._isSection) {\n if (this._currentRecord?.Dirty) this._currentRecord.Revert();\n return;\n }\n this.Form?.CancelEdit();\n }\n\n /** Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline. */\n async Refresh(): Promise<boolean> {\n if (this._isSection) {\n return this._currentRecord?.IsSaved ? this._currentRecord.Refresh() : false;\n }\n const f = this.Form;\n if (!f) return false;\n return f.RefreshRecord();\n }\n\n // ── Core: resolve → load → create → bind → wire ──────────────────────────\n\n private reload(): void {\n this.teardown();\n this.Loading = true;\n this.ErrorTitle = null;\n this.errorDetail = null;\n void this.loadAndMount();\n }\n\n private async loadAndMount(): Promise<void> {\n const md = this.ProviderToUse;\n // When a pre-loaded record is supplied, derive the entity from it.\n const entityName = this._record?.EntityInfo?.Name ?? this._entityName;\n\n if (!entityName || entityName.trim().length === 0) {\n // Nothing to load yet — a caller will re-invoke once an entity is known.\n return;\n }\n\n try {\n const entity = md.EntityByName(entityName);\n if (!entity) {\n this.fail(`Entity not found: \"${entityName}\"`,\n `This MemberJunction instance has no metadata for entity \"${entityName}\".`);\n return;\n }\n const permissions = entity.GetUserPermisions(md.CurrentUser);\n\n // Section mode short-circuits the full-form resolver / container.\n if (this.SectionName) {\n await this.mountSection(entityName, permissions);\n return;\n }\n\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n if (resolution.kind === 'none') {\n this.fail(`No form is registered for \"${entityName}\".`,\n `No EntityFormOverride or class-based form (@RegisterClass(BaseFormComponent, '${entityName}')) was found. Run CodeGen or register a custom form.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName, md);\n if (!record) return; // fail() already called\n\n // Emit Saved on the record's own save event (covers all save paths).\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const componentRef: ComponentRef<BaseFormComponent> = resolution.kind === 'interactive'\n ? this.anchor.createComponent(InteractiveFormComponent)\n : this.anchor.createComponent(resolution.subClass);\n\n if (resolution.kind === 'interactive') {\n (componentRef as ComponentRef<InteractiveFormComponent>).instance.ComponentID = resolution.override.ComponentID;\n }\n\n this._formComponentRef = componentRef;\n this._currentRecord = record;\n\n const instance = componentRef.instance as BaseFormComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.Config = this.effectiveConfigFor(record);\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.applyVariants(instance, resolution, entityName);\n this.subscribeToFormEvents(instance);\n this.announceInitialEditMode(instance);\n\n this.FormCreated.emit(instance);\n this.ErrorTitle = null;\n this.errorDetail = null;\n this.LoadComplete.emit();\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n this.fail(`Failed to load ${entityName} record.`, `An unexpected error occurred: ${msg}`);\n } finally {\n this.Loading = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * The config to bind for a given record. For brand-new (unsaved) records we hide the\n * `systemMetadata` section by default — its fields (audit timestamps, IDs, etc.) are\n * empty and irrelevant until the record exists. Doesn't mutate the consumer's config,\n * and defers entirely to a consumer that uses an explicit `VisibleSectionKeys` allowlist.\n */\n private effectiveConfigFor(record: BaseEntity): EntityFormConfig | null {\n if (record.IsSaved) return this.Config;\n if (this.Config?.VisibleSectionKeys?.length) return this.Config; // consumer owns visibility\n const SYSTEM_METADATA_KEY = 'systemMetadata';\n const hidden = this.Config?.HiddenSectionKeys ?? [];\n if (hidden.includes(SYSTEM_METADATA_KEY)) return this.Config;\n return { ...(this.Config ?? {}), HiddenSectionKeys: [...hidden, SYSTEM_METADATA_KEY] };\n }\n\n /**\n * Section mode: resolve a `BaseFormSectionComponent` registered as\n * `'<entity>.<section>'`, mount it, and bind the record. No resolver,\n * variants, container, or form-event surface — section components are bare\n * field editors; the host saves the record directly (see {@link Save}).\n */\n private async mountSection(entityName: string, permissions: unknown): Promise<void> {\n const key = `${entityName}.${this.SectionName}`;\n const reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, key);\n if (!reg?.SubClass) {\n this.fail(`No form section \"${this.SectionName}\" is registered for \"${entityName}\".`,\n `Expected a @RegisterClass(BaseFormSectionComponent, '${key}'). Check the section name.`);\n return;\n }\n\n const record = await this.obtainRecord(entityName);\n if (!record) return;\n\n this._saveHandlerSub = record.RegisterEventHandler((e: BaseEntityEvent) => {\n if (e.type === 'save') this.Saved.emit(record);\n });\n\n this.anchor.clear();\n const ref = this.anchor.createComponent(reg.SubClass as Type<BaseFormSectionComponent>);\n this._sectionRef = ref;\n this._currentRecord = record;\n this._isSection = true;\n\n const instance = ref.instance as BaseFormSectionComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.EditMode = this._editMode ?? this.Config?.StartInEditMode ?? !record.IsSaved;\n\n this.RecordReady.emit(record);\n this.LoadComplete.emit();\n }\n\n /** Resolve the BaseEntity to bind: the supplied instance, or a freshly loaded/new one. */\n private async obtainRecord(entityName: string, md = this.ProviderToUse): Promise<BaseEntity | null> {\n if (this._record) return this._record;\n\n const record = await md.GetEntityObject<BaseEntity>(entityName, md.CurrentUser);\n if (!record) {\n this.fail(`Failed to load ${entityName} record.`, `Unable to instantiate entity \"${entityName}\".`);\n return null;\n }\n\n if (this._primaryKey.HasValue) {\n const loadOk = await record.InnerLoad(this._primaryKey);\n if (!loadOk) {\n this.fail(`Could not load ${entityName} record.`,\n record.LatestResult?.Message\n ? `Server error: ${record.LatestResult.Message}`\n : `InnerLoad returned false for key ${this._primaryKey.ToString()}.`);\n return null;\n }\n } else {\n record.NewRecord();\n this.applyNewRecordValues(record);\n }\n return record;\n }\n\n /** Push variant list + active selection and wire the variant-switch handler. */\n private applyVariants(\n instance: BaseFormComponent,\n resolution: Awaited<ReturnType<FormResolverService['ResolveFormForEntity']>>,\n entityName: string,\n ): void {\n instance.Variants = FormVariantChoices(resolution.variants ?? []);\n instance.CurrentVariantID = resolution.kind === 'interactive' ? resolution.override.ID : null;\n instance.OnVariantChanged = (variantID: string | null) => {\n if (variantID === null) {\n this.formResolver.SetExplicitDefault(entityName);\n } else {\n this.formResolver.SetSelectedVariant(entityName, variantID);\n }\n // Reload via the resolver so tier/priority + the new selection apply.\n this._record = null; // force a fresh load against the new variant\n this.reload();\n };\n }\n\n /** Subscribe to the form's outputs and re-emit them through the host. */\n private subscribeToFormEvents(form: BaseFormComponent): void {\n this.cleanupFormSubs();\n this._formEventSubs.push(\n form.Navigate.subscribe(e => this.Navigate.emit(e)),\n form.Notification.subscribe(e => this.Notification.emit(e)),\n form.RecordSaved.subscribe(e => this.RecordSaved.emit(e)),\n form.RecordRefreshed.subscribe(e => this.RecordRefreshed.emit(e.Record)),\n form.RecordDeleted.subscribe(e => this.RecordDeleted.emit(e)),\n form.RecordSaveFailed.subscribe(e => this.RecordSaveFailed.emit(e)),\n form.ValidationFailed.subscribe(e => this.ValidationFailed.emit(e)),\n form.RecordReady.subscribe(e => this.RecordReady.emit(e)),\n form.EditModeChanged.subscribe(e => this.EditModeChanged.emit(e)),\n );\n // Surface 'dismiss' navigation as a first-class Dismissed event too.\n this._formEventSubs.push(\n form.Navigate.subscribe(e => { if (e.Kind === 'dismiss') this.Dismissed.emit(); }),\n );\n }\n\n /**\n * Announce edit mode that was set by ASSIGNMENT rather than by\n * StartEditMode() — the mount path writes `instance.EditMode` directly, so\n * a form that starts in edit mode would otherwise be editing, unpinned and\n * italic in a records preview tab. Safe to fire alongside ngOnInit's own\n * StartEditMode for a new record: the shell's pin is idempotent.\n */\n private announceInitialEditMode(form: BaseFormComponent): void {\n if (form.EditMode) {\n this.EditModeChanged.emit(true);\n }\n }\n\n // ── New-record value application (URL segment or object) ──────────────────\n\n private applyNewRecordValues(record: BaseEntity): void {\n if (!this.NewRecordValues) return;\n if (typeof this.NewRecordValues === 'string') {\n if (this.NewRecordValues.length === 0) return;\n const fv = new FieldValueCollection();\n fv.SimpleLoadFromURLSegment(this.NewRecordValues);\n fv.KeyValuePairs\n .filter(kvp => kvp.Value !== null && kvp.Value !== undefined)\n .forEach(kvp => this.setTypedField(record, kvp.FieldName, kvp.Value));\n } else {\n const values = this.NewRecordValues as Record<string, unknown>;\n Object.keys(values)\n .filter(key => values[key] !== null && values[key] !== undefined)\n .forEach(key => this.setTypedField(record, key, values[key]));\n }\n }\n\n /** Set a field with TSType-aware coercion (shared by string + object paths). */\n private setTypedField(record: BaseEntity, fieldName: string, value: unknown): void {\n const f = record.Fields.find(x => x.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (!f) return;\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(fieldName, value?.toString() ?? '');\n break;\n case EntityFieldTSType.Number:\n record.Set(fieldName, typeof value === 'number' ? value : parseFloat(value?.toString() ?? '0'));\n break;\n case EntityFieldTSType.Boolean:\n if (typeof value === 'boolean') record.Set(fieldName, value);\n else if (typeof value === 'string') record.Set(fieldName, value !== 'false' && value !== '0' && value.trim().length > 0);\n else record.Set(fieldName, !!value);\n break;\n case EntityFieldTSType.Date:\n record.Set(fieldName, value instanceof Date ? value : new Date(value?.toString() ?? ''));\n break;\n default:\n record.Set(fieldName, value);\n break;\n }\n }\n\n // ── Helpers ───────────────────────────────────────────────────────────────\n\n private fail(title: string, detail: string): void {\n this.ErrorTitle = title;\n this.errorDetail = detail;\n this.Loading = false;\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n this.anchor?.clear();\n this.LoadError.emit({ title, detail });\n this.cdr.detectChanges();\n }\n\n private compositeKeysEqual(a: CompositeKey | null | undefined, b: CompositeKey | null | undefined): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const aKvps = (a.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n const bKvps = (b.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n if (aKvps.length !== bKvps.length) return false;\n for (let i = 0; i < aKvps.length; i++) {\n if (aKvps[i].FieldName !== bKvps[i].FieldName) return false;\n if (String(aKvps[i].Value ?? '') !== String(bKvps[i].Value ?? '')) return false;\n }\n return true;\n }\n\n private cleanupFormSubs(): void {\n for (const sub of this._formEventSubs) sub.unsubscribe();\n this._formEventSubs = [];\n }\n\n private teardown(): void {\n this.cleanupFormSubs();\n if (this._saveHandlerSub) {\n this._saveHandlerSub.unsubscribe();\n this._saveHandlerSub = null;\n }\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n if (this._sectionRef) {\n try { this._sectionRef.destroy(); } catch { /* noop */ }\n this._sectionRef = null;\n }\n this._isSection = false;\n this._currentRecord = null;\n this.anchor?.clear();\n }\n}\n","<!-- Loading state -->\n@if (loading) {\n <div class=\"mj-form-host-loading\">\n <mj-loading text=\"Loading record...\"></mj-loading>\n </div>\n}\n\n<!-- Error state -->\n@if (!loading && errorTitle) {\n <div class=\"mj-form-host-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation mj-form-host-error-icon\"></i>\n <h3 class=\"mj-form-host-error-title\">{{ errorTitle }}</h3>\n <p class=\"mj-form-host-error-detail\">{{ errorDetail }}</p>\n </div>\n}\n\n<!--\n Anchor for the dynamically-created form component. Always present (static)\n so the ViewContainerRef resolves at AfterViewInit. The form's own template\n carries the <mj-record-form-container>, so nothing wraps it here.\n-->\n<ng-template #anchor></ng-template>\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type BaseEntity } from '@memberjunction/core';
|
|
2
|
+
import type { FormPanelHostProps } from '@memberjunction/interactive-component-types/forms';
|
|
3
|
+
import type { BaseFormComponent } from '../base-form-component';
|
|
4
|
+
import type { FormContributionRegistration } from '../panel-slot/form-contribution';
|
|
5
|
+
export interface BuildFormPanelHostPropsInput {
|
|
6
|
+
Record: BaseEntity;
|
|
7
|
+
/**
|
|
8
|
+
* Null when previewing outside a form (artifact viewer). Permissions then read false; a
|
|
9
|
+
* related claim still gets its view params, which come from the record.
|
|
10
|
+
*/
|
|
11
|
+
FormComponent: BaseFormComponent | null;
|
|
12
|
+
Contribution: FormContributionRegistration;
|
|
13
|
+
SectionKey: string;
|
|
14
|
+
Layout: 'accordion' | 'left-nav';
|
|
15
|
+
IsExpanded: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build `FormPanelHostProps` for a metadata contribution. Same record snapshot the
|
|
19
|
+
* whole-form host builds, plus the contribution context and — for related claims —
|
|
20
|
+
* prebuilt view params so the panel never hand-writes an FK filter. The view params come
|
|
21
|
+
* from the record and its relationships, so a preview with no form gets them too.
|
|
22
|
+
*/
|
|
23
|
+
export declare function BuildFormPanelHostProps(input: BuildFormPanelHostPropsInput): FormPanelHostProps;
|
|
24
|
+
//# sourceMappingURL=form-panel-host-props.builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-host-props.builder.d.ts","sourceRoot":"","sources":["../../../src/lib/interactive-form/form-panel-host-props.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,UAAU,EAAuC,MAAM,sBAAsB,CAAC;AAExG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAGpF,MAAM,WAAW,4BAA4B;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACxC,YAAY,EAAE,4BAA4B,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,CAAC;CACvB;AASD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,kBAAkB,CAkC/F"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { EntityInfo } from '@memberjunction/core';
|
|
2
|
+
import { SimpleEntityFieldInfo } from '@memberjunction/interactive-component-types';
|
|
3
|
+
import { StripJoinFieldBrackets } from '../panel-slot/form-contribution';
|
|
4
|
+
function primaryKeyToPlain(pk) {
|
|
5
|
+
if (!pk || !pk.HasValue)
|
|
6
|
+
return null;
|
|
7
|
+
const out = {};
|
|
8
|
+
for (const kvp of pk.KeyValuePairs ?? [])
|
|
9
|
+
out[kvp.FieldName] = kvp.Value;
|
|
10
|
+
return out;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Build `FormPanelHostProps` for a metadata contribution. Same record snapshot the
|
|
14
|
+
* whole-form host builds, plus the contribution context and — for related claims —
|
|
15
|
+
* prebuilt view params so the panel never hand-writes an FK filter. The view params come
|
|
16
|
+
* from the record and its relationships, so a preview with no form gets them too.
|
|
17
|
+
*/
|
|
18
|
+
export function BuildFormPanelHostProps(input) {
|
|
19
|
+
const { Record: record, FormComponent: form, Contribution: contribution } = input;
|
|
20
|
+
const meta = contribution.Metadata;
|
|
21
|
+
const pk = record.PrimaryKey;
|
|
22
|
+
const primaryKey = primaryKeyToPlain(pk);
|
|
23
|
+
const mode = form?.EditMode ? 'edit' : (primaryKey ? 'view' : 'create');
|
|
24
|
+
const props = {
|
|
25
|
+
entityName: record.EntityInfo.Name,
|
|
26
|
+
primaryKey,
|
|
27
|
+
record: record.GetAll(),
|
|
28
|
+
entityMetadata: {
|
|
29
|
+
fields: record.Fields.map((f) => SimpleEntityFieldInfo.FromEntityFieldInfo(f.EntityFieldInfo)),
|
|
30
|
+
displayName: record.EntityInfo.DisplayName ?? record.EntityInfo.Name,
|
|
31
|
+
nameField: record.EntityInfo.NameField?.Name,
|
|
32
|
+
},
|
|
33
|
+
mode,
|
|
34
|
+
canEdit: form?.UserCanEdit ?? false,
|
|
35
|
+
canDelete: form?.UserCanDelete ?? false,
|
|
36
|
+
canCreate: form?.UserCanCreate ?? false,
|
|
37
|
+
contribution: {
|
|
38
|
+
key: input.SectionKey,
|
|
39
|
+
slot: meta.slot,
|
|
40
|
+
title: contribution.Title ?? meta.contributionKey ?? input.SectionKey,
|
|
41
|
+
presentation: contribution.Presentation ?? meta.presentation ?? 'panel',
|
|
42
|
+
configuration: contribution.Configuration ?? {},
|
|
43
|
+
},
|
|
44
|
+
isExpanded: input.IsExpanded,
|
|
45
|
+
layout: input.Layout,
|
|
46
|
+
};
|
|
47
|
+
const related = meta.relatedEntity?.trim();
|
|
48
|
+
if (related)
|
|
49
|
+
props.related = relatedPanelProps(record, related, StripJoinFieldBrackets(meta.relatedJoinField) || undefined);
|
|
50
|
+
return props;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The related-grid props of a claim on `relatedEntity`, from the record alone.
|
|
54
|
+
*
|
|
55
|
+
* The rows are those whose join field holds this record's key: the named join field, or with
|
|
56
|
+
* none named, every relationship to that entity (Bill-To OR Ship-To). New rows get the same
|
|
57
|
+
* fields set to the record's key. A record not saved yet has no key, so its filter matches
|
|
58
|
+
* nothing.
|
|
59
|
+
*/
|
|
60
|
+
function relatedPanelProps(record, relatedEntity, joinField) {
|
|
61
|
+
const target = relatedEntity.toLowerCase();
|
|
62
|
+
const relationships = (record.EntityInfo.RelatedEntities ?? []).filter((r) => r.RelatedEntity.trim().toLowerCase() === target);
|
|
63
|
+
const joinFields = joinField ? [joinField] : relationships.map((r) => r.RelatedEntityJoinField);
|
|
64
|
+
const relationship = joinFields.length === 1
|
|
65
|
+
? relationships.find((r) => r.RelatedEntityJoinField.trim().toLowerCase() === joinFields[0].trim().toLowerCase())
|
|
66
|
+
: undefined;
|
|
67
|
+
const viewParams = EntityInfo.BuildRelationshipViewParamsForJoinFields(record, relatedEntity, joinFields);
|
|
68
|
+
return {
|
|
69
|
+
entityName: relatedEntity,
|
|
70
|
+
joinField,
|
|
71
|
+
viewParams: {
|
|
72
|
+
EntityName: viewParams.EntityName ?? relatedEntity,
|
|
73
|
+
// RunView accepts `string | PlatformSQL`; the panel contract carries plain
|
|
74
|
+
// strings because these cross into React as JSON, so the fragment is flattened.
|
|
75
|
+
ExtraFilter: plainSQL(viewParams.ExtraFilter) ?? '',
|
|
76
|
+
OrderBy: plainSQL(viewParams.OrderBy),
|
|
77
|
+
},
|
|
78
|
+
newRecordValues: relationship
|
|
79
|
+
? EntityInfo.BuildRelationshipNewRecordValues(record, relationship)
|
|
80
|
+
: EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(record, joinFields),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Flatten a `string | PlatformSQL` fragment to the string the panel receives.
|
|
85
|
+
*
|
|
86
|
+
* A plain string passes through. For a `PlatformSQL` value the `sqlserver` variant is taken when
|
|
87
|
+
* present, else `default`: the same choice a browser-side provider makes, since it does not know
|
|
88
|
+
* the server's platform and `ProviderBase.PlatformKey` defaults to SQL Server. On a PostgreSQL
|
|
89
|
+
* server a fragment with a different `postgresql` variant would therefore be the wrong one. The
|
|
90
|
+
* relationship filters built here are plain strings.
|
|
91
|
+
*/
|
|
92
|
+
function plainSQL(value) {
|
|
93
|
+
if (value === undefined || value === null)
|
|
94
|
+
return undefined;
|
|
95
|
+
if (typeof value === 'string')
|
|
96
|
+
return value;
|
|
97
|
+
return value.sqlserver ?? value.default;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=form-panel-host-props.builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-host-props.builder.js","sourceRoot":"","sources":["../../../src/lib/interactive-form/form-panel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,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC;AAC5C,CAAC","sourcesContent":["import { EntityInfo, type BaseEntity, type CompositeKey, type PlatformSQL } from '@memberjunction/core';\nimport { SimpleEntityFieldInfo } from '@memberjunction/interactive-component-types';\nimport type { FormPanelHostProps } from '@memberjunction/interactive-component-types/forms';\nimport type { BaseFormComponent } from '../base-form-component';\nimport type { FormContributionRegistration } from '../panel-slot/form-contribution';\nimport { StripJoinFieldBrackets } from '../panel-slot/form-contribution';\n\nexport interface BuildFormPanelHostPropsInput {\n Record: BaseEntity;\n /**\n * Null when previewing outside a form (artifact viewer). Permissions then read false; a\n * related claim still gets its view params, which come from the record.\n */\n FormComponent: BaseFormComponent | null;\n Contribution: FormContributionRegistration;\n SectionKey: string;\n Layout: 'accordion' | 'left-nav';\n IsExpanded: boolean;\n}\n\nfunction primaryKeyToPlain(pk: CompositeKey | null | undefined): Record<string, unknown> | null {\n if (!pk || !pk.HasValue) return null;\n const out: Record<string, unknown> = {};\n for (const kvp of pk.KeyValuePairs ?? []) out[kvp.FieldName] = kvp.Value;\n return out;\n}\n\n/**\n * Build `FormPanelHostProps` for a metadata contribution. Same record snapshot the\n * whole-form host builds, plus the contribution context and — for related claims —\n * prebuilt view params so the panel never hand-writes an FK filter. The view params come\n * from the record and its relationships, so a preview with no form gets them too.\n */\nexport function BuildFormPanelHostProps(input: BuildFormPanelHostPropsInput): FormPanelHostProps {\n const { Record: record, FormComponent: form, Contribution: contribution } = input;\n const meta = contribution.Metadata;\n const pk = record.PrimaryKey;\n const primaryKey = primaryKeyToPlain(pk);\n const mode: FormPanelHostProps['mode'] = form?.EditMode ? 'edit' : (primaryKey ? 'view' : 'create');\n\n const props: FormPanelHostProps = {\n entityName: record.EntityInfo.Name,\n primaryKey,\n record: record.GetAll(),\n entityMetadata: {\n fields: record.Fields.map((f) => SimpleEntityFieldInfo.FromEntityFieldInfo(f.EntityFieldInfo)),\n displayName: record.EntityInfo.DisplayName ?? record.EntityInfo.Name,\n nameField: record.EntityInfo.NameField?.Name,\n },\n mode,\n canEdit: form?.UserCanEdit ?? false,\n canDelete: form?.UserCanDelete ?? false,\n canCreate: form?.UserCanCreate ?? false,\n contribution: {\n key: input.SectionKey,\n slot: meta.slot,\n title: contribution.Title ?? meta.contributionKey ?? input.SectionKey,\n presentation: contribution.Presentation ?? meta.presentation ?? 'panel',\n configuration: contribution.Configuration ?? {},\n },\n isExpanded: input.IsExpanded,\n layout: input.Layout,\n };\n\n const related = meta.relatedEntity?.trim();\n if (related) props.related = relatedPanelProps(record, related, StripJoinFieldBrackets(meta.relatedJoinField) || undefined);\n return props;\n}\n\n/**\n * The related-grid props of a claim on `relatedEntity`, from the record alone.\n *\n * The rows are those whose join field holds this record's key: the named join field, or with\n * none named, every relationship to that entity (Bill-To OR Ship-To). New rows get the same\n * fields set to the record's key. A record not saved yet has no key, so its filter matches\n * nothing.\n */\nfunction relatedPanelProps(record: BaseEntity, relatedEntity: string, joinField: string | undefined): FormPanelHostProps['related'] {\n const target = relatedEntity.toLowerCase();\n const relationships = (record.EntityInfo.RelatedEntities ?? []).filter((r) => r.RelatedEntity.trim().toLowerCase() === target);\n const joinFields = joinField ? [joinField] : relationships.map((r) => r.RelatedEntityJoinField);\n const relationship = joinFields.length === 1\n ? relationships.find((r) => r.RelatedEntityJoinField.trim().toLowerCase() === joinFields[0].trim().toLowerCase())\n : undefined;\n const viewParams = EntityInfo.BuildRelationshipViewParamsForJoinFields(record, relatedEntity, joinFields);\n return {\n entityName: relatedEntity,\n joinField,\n viewParams: {\n EntityName: viewParams.EntityName ?? relatedEntity,\n // RunView accepts `string | PlatformSQL`; the panel contract carries plain\n // strings because these cross into React as JSON, so the fragment is flattened.\n ExtraFilter: plainSQL(viewParams.ExtraFilter) ?? '',\n OrderBy: plainSQL(viewParams.OrderBy),\n },\n newRecordValues: relationship\n ? EntityInfo.BuildRelationshipNewRecordValues(record, relationship)\n : EntityInfo.BuildRelationshipNewRecordValuesForJoinFields(record, joinFields),\n };\n}\n\n/**\n * Flatten a `string | PlatformSQL` fragment to the string the panel receives.\n *\n * A plain string passes through. For a `PlatformSQL` value the `sqlserver` variant is taken when\n * present, else `default`: the same choice a browser-side provider makes, since it does not know\n * the server's platform and `ProviderBase.PlatformKey` defaults to SQL Server. On a PostgreSQL\n * server a fragment with a different `postgresql` variant would therefore be the wrong one. The\n * relationship filters built here are plain strings.\n */\nfunction plainSQL(value: string | PlatformSQL | undefined): string | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === 'string') return value;\n return value.sqlserver ?? value.default;\n}\n"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { DoCheck, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ValidationResult, type BaseEntity, type CompositeKey } from '@memberjunction/core';
|
|
3
|
+
import type { ComponentSpec } from '@memberjunction/interactive-component-types';
|
|
4
|
+
import { type FormPanelHostProps } from '@memberjunction/interactive-component-types/forms';
|
|
5
|
+
import { MJReactComponent, type ReactComponentEvent } from '@memberjunction/ng-react';
|
|
6
|
+
import { BaseContributionPanel } from '../panel-slot/base-contribution-panel';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Generic host for a metadata form contribution (`MJ: Entity Form Contributions` row →
|
|
10
|
+
* `componentRole: 'form-panel'` React component). Mounted by `<mj-form-panel-slot>` for
|
|
11
|
+
* `Source: 'metadata'` winners exactly where a compiled BaseFormPanel would mount.
|
|
12
|
+
*
|
|
13
|
+
* Layering: the React component never touches BaseEntity. This host owns the
|
|
14
|
+
* `FormPanelHostProps` snapshot and rebuilds it when the parent record's values change,
|
|
15
|
+
* applies `FieldChanged` to the PARENT record (only for the fields the contribution
|
|
16
|
+
* claims, and only in edit mode; the parent form's Save persists it), forwards
|
|
17
|
+
* `RowCountChanged` to the rail badge, and surfaces `Validate` through
|
|
18
|
+
* `BaseFormPanel.Validate()`.
|
|
19
|
+
*/
|
|
20
|
+
export declare class InteractiveFormPanelComponent extends BaseContributionPanel implements OnInit, DoCheck, OnDestroy {
|
|
21
|
+
ReactComponent?: MJReactComponent;
|
|
22
|
+
componentSpec: ComponentSpec | null;
|
|
23
|
+
HostProps: FormPanelHostProps | null;
|
|
24
|
+
/**
|
|
25
|
+
* Load-time failure only: missing ComponentID, component not found, bad Specification
|
|
26
|
+
* JSON, wrong role. Shown in place of the React component.
|
|
27
|
+
*/
|
|
28
|
+
loadError: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* A failure after the React component loaded, shown above it: an `error` event from
|
|
31
|
+
* `<mj-react-component>` (initialization, render timeout, a throw its error boundary
|
|
32
|
+
* caught, or an `error` event the panel raises), or a `Validate` that threw. A throw during
|
|
33
|
+
* render stays inside this panel's subtree, so the rest of the form renders and saves
|
|
34
|
+
* normally.
|
|
35
|
+
*
|
|
36
|
+
* An `error` event stays until the panel is mounted again, and a `Validate` that throws
|
|
37
|
+
* does not replace it. A `Validate` failure clears when a later `Validate` answers.
|
|
38
|
+
*/
|
|
39
|
+
RenderError: string | null;
|
|
40
|
+
/** Where {@link RenderError} came from, or null when it is empty. */
|
|
41
|
+
private renderErrorSource;
|
|
42
|
+
private lastValidation;
|
|
43
|
+
private lastEditMode;
|
|
44
|
+
private lastExpanded;
|
|
45
|
+
/** The record's field values when {@link HostProps} was last built, by field position. */
|
|
46
|
+
private shownValues;
|
|
47
|
+
private readonly cdr;
|
|
48
|
+
private readonly reactBridge;
|
|
49
|
+
/** The form's field-edit broadcast, which starts the entry-time duplicate check on a new record. */
|
|
50
|
+
private readonly fieldEdits;
|
|
51
|
+
/** Section identity — {@link ContributionSectionKey}, the key the rail files this panel by. */
|
|
52
|
+
get SectionKey(): string;
|
|
53
|
+
get Title(): string;
|
|
54
|
+
ngOnInit(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Edit mode, expanded state and the parent record's values are not inputs; detect their
|
|
57
|
+
* changes cheaply. A field the user edits elsewhere on the form reaches the panel this way.
|
|
58
|
+
*/
|
|
59
|
+
ngDoCheck(): void;
|
|
60
|
+
ngOnDestroy(): void;
|
|
61
|
+
RebuildHostProps(): void;
|
|
62
|
+
OnReactComponentEvent(event: ReactComponentEvent): Promise<void>;
|
|
63
|
+
OnOpenEntityRecord(event: {
|
|
64
|
+
entityName: string;
|
|
65
|
+
key: CompositeKey;
|
|
66
|
+
}): void;
|
|
67
|
+
OnRecordRefreshed(record: BaseEntity): void;
|
|
68
|
+
/**
|
|
69
|
+
* Surface the panel's validity to the parent form's save.
|
|
70
|
+
*
|
|
71
|
+
* The React method may be `async` — any validator that checks something
|
|
72
|
+
* server-side will be — and `invokeMethod` returns whatever the method
|
|
73
|
+
* returned. Awaiting is therefore load-bearing: a synchronous `'isValid' in
|
|
74
|
+
* live` test sees a Promise, fails, silently falls back to the last cached
|
|
75
|
+
* `ValidationChanged` payload, and the form saves an invalid record with no
|
|
76
|
+
* error and no log. Resolving a non-Promise is a no-op, so one code path
|
|
77
|
+
* covers both shapes.
|
|
78
|
+
*
|
|
79
|
+
* A validator that throws or rejects does not block the save by itself. It is logged and
|
|
80
|
+
* shown in the panel ({@link RenderError}) unless the panel already shows an `error` event,
|
|
81
|
+
* and the result falls back to the last `ValidationChanged` state, so a failure the panel
|
|
82
|
+
* reported before still blocks.
|
|
83
|
+
*/
|
|
84
|
+
Validate(): Promise<ValidationResult>;
|
|
85
|
+
/** The last state the panel reported through `ValidationChanged`; valid when it has reported none. */
|
|
86
|
+
LastKnownValidation(): ValidationResult;
|
|
87
|
+
private toValidationResult;
|
|
88
|
+
private setRenderError;
|
|
89
|
+
private isExpanded;
|
|
90
|
+
/** True when a field of the record no longer holds the value {@link HostProps} was built from. */
|
|
91
|
+
private recordValuesChanged;
|
|
92
|
+
/**
|
|
93
|
+
* Writes a panel's `FieldChanged` to the parent record: only a field the contribution claims
|
|
94
|
+
* (`replacesFieldNames`), and only while the form is in edit mode. Anything else is ignored
|
|
95
|
+
* and logged, so a panel cannot change a field the user did not hand it or edit a record the
|
|
96
|
+
* user is only viewing.
|
|
97
|
+
*
|
|
98
|
+
* A write the record refuses (a disabled or unreadable field) is logged and dropped. A write
|
|
99
|
+
* that succeeds is reported to {@link FormFieldEditCoordinator}, as an edit in
|
|
100
|
+
* `mj-form-field` is. Field validation and the `ValueChange` output of `mj-form-field` do not
|
|
101
|
+
* apply, because a claimed field is not drawn.
|
|
102
|
+
*/
|
|
103
|
+
private applyFieldChange;
|
|
104
|
+
private invokeIfRegistered;
|
|
105
|
+
private loadSpec;
|
|
106
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InteractiveFormPanelComponent, never>;
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InteractiveFormPanelComponent, "mj-interactive-form-panel", never, {}, {}, never, never, false, never>;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=interactive-form-panel.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-form-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/interactive-form/interactive-form-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAY,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAIH,KAAK,kBAAkB,EAK1B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAsB,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;;AAQ9E;;;;;;;;;;;GAWG;AACH,qBAKa,6BAA8B,SAAQ,qBAAsB,YAAW,MAAM,EAAE,OAAO,E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