@memberjunction/ng-base-forms 6.2.0-edge.5 → 6.2.0-edge.7
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/README.md +195 -2
- package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -1
- package/dist/lib/apply/form-placement-preview.component.js +1 -0
- package/dist/lib/apply/form-placement-preview.component.js.map +1 -1
- package/dist/lib/base-form-component.d.ts +23 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +54 -10
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-composition-snapshot.d.ts +52 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -1
- package/dist/lib/chrome/form-composition-snapshot.js +4 -0
- package/dist/lib/chrome/form-composition-snapshot.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +107 -1
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +1495 -316
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +159 -14
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +1360 -469
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-record-refresh.coordinator.d.ts +124 -0
- package/dist/lib/form-record-refresh.coordinator.d.ts.map +1 -1
- package/dist/lib/form-record-refresh.coordinator.js +93 -13
- package/dist/lib/form-record-refresh.coordinator.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +104 -2
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +272 -34
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +1 -0
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.js +7 -4
- package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-panel.component.js +1 -2
- package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -1
- package/dist/lib/links/record-link-utils.d.ts +83 -0
- package/dist/lib/links/record-link-utils.d.ts.map +1 -0
- package/dist/lib/links/record-link-utils.js +232 -0
- package/dist/lib/links/record-link-utils.js.map +1 -0
- package/dist/lib/links/record-link.component.d.ts +50 -0
- package/dist/lib/links/record-link.component.d.ts.map +1 -0
- package/dist/lib/links/record-link.component.js +319 -0
- package/dist/lib/links/record-link.component.js.map +1 -0
- package/dist/lib/links/record-link.directive.d.ts +94 -0
- package/dist/lib/links/record-link.directive.d.ts.map +1 -0
- package/dist/lib/links/record-link.directive.js +277 -0
- package/dist/lib/links/record-link.directive.js.map +1 -0
- package/dist/lib/links/record-links-drawer.component.d.ts +21 -0
- package/dist/lib/links/record-links-drawer.component.d.ts.map +1 -0
- package/dist/lib/links/record-links-drawer.component.js +61 -0
- package/dist/lib/links/record-links-drawer.component.js.map +1 -0
- package/dist/lib/links/record-links.component.d.ts +255 -0
- package/dist/lib/links/record-links.component.d.ts.map +1 -0
- package/dist/lib/links/record-links.component.js +1546 -0
- package/dist/lib/links/record-links.component.js.map +1 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-field-panel-slot.component.js +3 -1
- package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.js +6 -0
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
- package/dist/lib/preview-popover/record-preview-popover.component.d.ts +194 -0
- package/dist/lib/preview-popover/record-preview-popover.component.d.ts.map +1 -0
- package/dist/lib/preview-popover/record-preview-popover.component.js +1084 -0
- package/dist/lib/preview-popover/record-preview-popover.component.js.map +1 -0
- package/dist/lib/preview-popover/record-preview-popover.service.d.ts +105 -0
- package/dist/lib/preview-popover/record-preview-popover.service.d.ts.map +1 -0
- package/dist/lib/preview-popover/record-preview-popover.service.js +278 -0
- package/dist/lib/preview-popover/record-preview-popover.service.js.map +1 -0
- package/dist/lib/resolver/form-resolver.service.d.ts +44 -1
- package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
- package/dist/lib/resolver/form-resolver.service.js +51 -3
- package/dist/lib/resolver/form-resolver.service.js.map +1 -1
- package/dist/lib/toolbar/actions/record-links-toolbar-action.d.ts +21 -0
- package/dist/lib/toolbar/actions/record-links-toolbar-action.d.ts.map +1 -0
- package/dist/lib/toolbar/actions/record-links-toolbar-action.js +90 -0
- package/dist/lib/toolbar/actions/record-links-toolbar-action.js.map +1 -0
- package/dist/lib/toolbar/base-form-toolbar-action.d.ts +189 -0
- package/dist/lib/toolbar/base-form-toolbar-action.d.ts.map +1 -0
- package/dist/lib/toolbar/base-form-toolbar-action.js +274 -0
- package/dist/lib/toolbar/base-form-toolbar-action.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +21 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +295 -195
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +1 -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/toolbar-config.d.ts +4 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +6 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +19 -14
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +39 -6
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +9 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -20
|
@@ -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;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;;;;;ICb7D,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,uCAAgB;IAChB,eAAiB;IAAjB,wCAAiB;;;ADW1D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAOH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACzD,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAChC,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAEnD,oFAAoF;IACb,MAAM,CAAoB;IAEjG,2EAA2E;IAEnE,WAAW,GAAkB,IAAI,CAAC;IAC1C,iFAAiF;IACjF,IACI,U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I,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;;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"]}
|
|
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,EAAE,QAAQ,EAC7F,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,EAC2B,mBAAmB,EACnD,0BAA0B,IAAI,0BAA0B,EACzD,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;;;;;;;IChB7D,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,uCAAgB;IAChB,eAAiB;IAAjB,wCAAiB;;;;IASxD,8BAAqC;IACnC,uBAAmJ;IACnJ,gCAAwD;IACtD,YACF;IAAA,iBAAO;IACP,qCAEgC;IAA9B,6LAAS,0BAAmB,KAAC;IAC7B,YACF;IACF,AADE,iBAAS,EACL;;;IATgB,cAAuD;IAAC,AAAxD,uEAAuD,iDAAgD;IAEzH,eACF;IADE,mMACF;IAIE,eACF;IADE,8GACF;;;ADJJ;;;;;;;;;;;;;;;;;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AE,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;YACxD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;iRAvrBU,yBAAyB,yBAAzB,yBAAyB;6DAAzB,yBAAyB;mCAKP,gBAAgB;;;;;;YCzE/C,2FAAe;YAOf,2FAA8B;YAY9B,2FAAoE;YAmBpE,2HAAqB;;YAtCrB,sCAIC;YAGD,cAMC;YAND,yDAMC;YAMD,cAYC;YAZD,mGAYC;;;iFDqCY,yBAAyB;cANrC,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAS9B,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kBAE5D,SAAS;mBAAC,YAAY;;kBAMtB,KAAK;;kBAUL,KAAK;;kBAkBL,KAAK;;kBASL,KAAK;;kBAUL,KAAK;;kBAIL,KAAK;;kBAKL,KAAK;;kBASL,KAAK;;kBAUL,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;;kBAEN,MAAM;;kBAON,MAAM;;kBAEN,MAAM;;kFAhII,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef,\n ComponentRef, ChangeDetectorRef, inject, AfterViewInit, OnDestroy, Type\n} from '@angular/core';\nimport {\n CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType, LogError\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 {\n EntityFormMode, FormResolution, FormResolverService,\n HasStandardFormAlternative as hasStandardFormAlternative\n} 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 * **Standard-form switch.** When a custom form (a higher-priority class form or\n * an interactive override) hides the CodeGen-generated form, the host renders a\n * one-line strip above it offering \"Open standard form\" — every field, same\n * permissions — and back. It lives here rather than in `<mj-form-toolbar>`\n * because a fully custom form may not render the toolbar at all, which would\n * leave the generated form unreachable. Surfaces drive/persist the choice via\n * {@link FormMode} / {@link FormModeChange}; hosts that must not offer it set\n * {@link ShowFormModeSwitch} to false.\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 /** The strip's switch button — present only while the strip renders. */\n @ViewChild('modeSwitch') private modeSwitchButton?: ElementRef<HTMLButtonElement>;\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 private _formMode: EntityFormMode = 'default';\n /**\n * Which form to mount: `'default'` = the resolver's normal pick; `'standard'`\n * = the CodeGen-generated form, even when a custom form outranks it. Falls\n * back to the default (and logs) when the entity has no standard form.\n * A change after the view initializes reloads the form.\n */\n @Input()\n set FormMode(value: EntityFormMode) {\n const next = value ?? 'default';\n const changed = this._formMode !== next;\n this._formMode = next;\n if (changed && this._viewInitialized) this.reload();\n }\n get FormMode(): EntityFormMode { return this._formMode; }\n\n /** Offer the standard-form strip when a custom form hides the generated one. Set false to suppress it. */\n @Input() ShowFormModeSwitch = true;\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 /** The user switched between the custom and the standard form (so the surface can persist it, e.g. in the URL). */\n @Output() FormModeChange = new EventEmitter<EntityFormMode>();\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 /** Emitted when the user clicks the \"Ask AI\" button on the form toolbar. */\n @Output() AskAIRequested = new EventEmitter<void>();\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 /**\n * True when a custom form is hiding the standard (CodeGen) form — so the\n * switch strip has somewhere to go. Stays true while the standard form is\n * the one mounted, so the strip can offer the way back.\n */\n public HasStandardFormAlternative = false;\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 * An unsaved new record carried across a form switch. A brand-new record is\n * always `Dirty` (never saved), so the dirty guard can't protect it; instead\n * the switch re-binds the same live instance rather than creating a fresh one,\n * so whatever the user typed survives. Consumed by the next {@link obtainRecord}.\n */\n private _carryNewRecord: BaseEntity | null = null;\n /**\n * Set when the strip's own button started a switch. The reload unmounts the\n * strip (and the focused button with it), so focus is handed to the new\n * button once the mount completes instead of falling to `<body>`.\n */\n private _refocusModeSwitch = false;\n /**\n * Bumped by every {@link teardown} (so by every reload and by destroy). A\n * load captures it on entry and gives up after any `await` once it has\n * moved: a superseded load must not mount, emit, register a save handler,\n * or report a failure over the load that replaced it.\n */\n private _loadGeneration = 0;\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 /**\n * Switch between the custom (`'default'`) and the standard form. Refuses —\n * returning false and emitting a `warning` Notification — when remounting\n * would silently discard unsaved work (see {@link hasUnsavedWorkToLose}).\n * A brand-new record is carried across instead (see {@link _carryNewRecord}).\n * With a form mounted but no standard alternative (the generated form is\n * the only one), both modes mount the same form: the mode is recorded and\n * emitted, with no reload and so nothing for the unsaved-work guard to\n * protect. The error state is excluded: `fail()` also clears\n * `HasStandardFormAlternative` and `Loading`, and there the switch must\n * still reload — it is the retry of the failed load.\n */\n public SwitchFormMode(mode: EntityFormMode): boolean {\n if (mode === this._formMode) return true;\n if (!this.HasStandardFormAlternative && !this.Loading && !this.ErrorTitle) {\n this._formMode = mode;\n this.FormModeChange.emit(mode);\n return true;\n }\n if (this.hasUnsavedWorkToLose()) {\n this.Notification.emit({ Message: 'Save or discard your changes before switching forms.', Type: 'warning', Duration: 4000 });\n return false;\n }\n const record = this._currentRecord;\n // A bound Record input is reused by every reload anyway; only a host-created new record needs carrying.\n if (record && !record.IsSaved && !this._record) this._carryNewRecord = record;\n this._formMode = mode;\n this.FormModeChange.emit(mode);\n this.reload();\n return true;\n }\n\n /** Template handler for the strip's button: switch, and keep keyboard focus on the button. */\n public OnModeSwitchClick(): void {\n this._refocusModeSwitch = true;\n const next: EntityFormMode = this._formMode === 'standard' ? 'default' : 'standard';\n if (!this.SwitchFormMode(next)) this._refocusModeSwitch = false; // refused: the button never left\n }\n\n /**\n * Whether tearing the mounted form down would lose unsaved work. A saved\n * record's field edits count; a brand-new record's don't, because its live\n * instance is carried across the switch. Work the form holds outside the\n * record (pending related records, designer/canvas state) always counts —\n * it lives in the form component, which the switch destroys.\n */\n private hasUnsavedWorkToLose(): boolean {\n const record = this._currentRecord;\n if (record?.IsSaved && record.Dirty) return true;\n return this.Form?.HasUnsavedChangesBeyondRecord ?? false;\n }\n\n // ── Core: resolve → load → create → bind → wire ──────────────────────────\n\n private reload(): void {\n this.teardown();\n this.Loading = true;\n this.HasStandardFormAlternative = false;\n this.ErrorTitle = null;\n this.errorDetail = null;\n void this.loadAndMount();\n }\n\n private async loadAndMount(): Promise<void> {\n const generation = this._loadGeneration;\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, generation);\n return;\n }\n\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n if (this.isSuperseded(generation)) return;\n this.HasStandardFormAlternative = hasStandardFormAlternative(resolution);\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, generation, md);\n if (!record || this.isSuperseded(generation)) return; // a failure already called fail()\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 const standardForm = this.standardFormToMount(resolution, entityName);\n\n this.anchor.clear();\n let componentRef: ComponentRef<BaseFormComponent>;\n if (standardForm) {\n componentRef = this.anchor.createComponent(standardForm);\n } else if (resolution.kind === 'interactive') {\n const interactiveRef = this.anchor.createComponent(InteractiveFormComponent);\n interactiveRef.instance.ComponentID = resolution.override.ComponentID;\n componentRef = interactiveRef;\n } else {\n componentRef = this.anchor.createComponent(resolution.subClass);\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 // The picker's \"current\" row describes the resolver's pick; the standard form is none of them.\n if (standardForm) instance.CurrentVariantID = null;\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 if (this.isSuperseded(generation)) {\n LogError(`MjEntityFormHost: a superseded load of \"${entityName}\" failed: ${msg}`);\n return;\n }\n this.fail(`Failed to load ${entityName} record.`, `An unexpected error occurred: ${msg}`);\n } finally {\n // The load that replaced this one owns Loading, change detection and focus.\n if (!this.isSuperseded(generation)) this.settleLoad();\n }\n }\n\n /** Whether a newer load (or destroy) has replaced the load that captured `generation`. */\n private isSuperseded(generation: number): boolean {\n return generation !== this._loadGeneration;\n }\n\n /** End the current load: clear the loading state, render, and restore the switch's focus. */\n private settleLoad(): void {\n this.Loading = false;\n this.cdr.detectChanges();\n this.restoreModeSwitchFocus();\n }\n\n /** After a strip-initiated switch, hand focus to the re-rendered switch button (if the strip is back). */\n private restoreModeSwitchFocus(): void {\n if (!this._refocusModeSwitch) return;\n this._refocusModeSwitch = false;\n this.modeSwitchButton?.nativeElement.focus();\n }\n\n /**\n * The standard form class to mount instead of the resolver's pick, or null\n * to mount the pick. Only non-null in `'standard'` mode when a custom form is\n * actually hiding the standard one; when the pick already IS the standard\n * form there is nothing to swap. A `'standard'` request for an entity with\n * no standard form falls back to the pick and logs, so a stale deep link\n * can't break the record.\n */\n private standardFormToMount(resolution: FormResolution, entityName: string): Type<BaseFormComponent> | null {\n if (this._formMode !== 'standard') return null;\n if (!resolution.standard) {\n this.logMissingStandardFormOnce(entityName);\n return null;\n }\n return hasStandardFormAlternative(resolution) ? resolution.standard : null;\n }\n\n /** Entities this host has already logged a missing standard form for (lowercased names). */\n private readonly _missingStandardLogged = new Set<string>();\n\n /**\n * Log the \"standard requested, none registered\" fallback once per entity per\n * host. A stale `?form=standard` would otherwise log on every reload (each\n * variant pick, switch or input change).\n */\n private logMissingStandardFormOnce(entityName: string): void {\n const key = entityName.trim().toLowerCase();\n if (this._missingStandardLogged.has(key)) return;\n this._missingStandardLogged.add(key);\n LogError(`MjEntityFormHost: standard form requested for \"${entityName}\" but none is registered; showing the default form`);\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, generation: number): 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, generation);\n if (!record || this.isSuperseded(generation)) 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 /**\n * Resolve the BaseEntity to bind: the supplied instance, or a freshly loaded/new one.\n * Returns null on failure; reports it through {@link fail} only while `generation` is still current.\n */\n private async obtainRecord(entityName: string, generation: number, md = this.ProviderToUse): Promise<BaseEntity | null> {\n if (this._record) return this._record;\n const carried = this._carryNewRecord;\n this._carryNewRecord = null;\n // Only honor the carry for the same new record — an input swap since the switch loads normally.\n if (carried && carried.EntityInfo.Name === entityName && !this._primaryKey.HasValue) return carried;\n\n const record = await md.GetEntityObject<BaseEntity>(entityName, md.CurrentUser);\n if (!record) {\n if (this.isSuperseded(generation)) return null;\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 if (this.isSuperseded(generation)) return null;\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: FormResolution,\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 // Picking a variant means \"show me that one\" — leave the standard form.\n if (this._formMode === 'standard') {\n this._formMode = 'default';\n this.FormModeChange.emit('default');\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 if (form.AskAIRequested) {\n this._formEventSubs.push(\n form.AskAIRequested.subscribe(() => this.AskAIRequested?.emit()),\n );\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 this.HasStandardFormAlternative = false; // no form mounted → nothing to switch between\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._loadGeneration++;\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 Standard-form switch: only when a custom form hides the CodeGen form. Placed\n above the anchor so the dynamically-created form renders below it.\n-->\n@if (!Loading && ShowFormModeSwitch && HasStandardFormAlternative) {\n <div class=\"mj-form-host-mode-strip\">\n <i class=\"fa-solid\" [class.fa-wand-magic-sparkles]=\"FormMode === 'default'\" [class.fa-table-list]=\"FormMode === 'standard'\" aria-hidden=\"true\"></i>\n <span class=\"mj-form-host-mode-text\" aria-live=\"polite\">\n {{ FormMode === 'standard' ? 'Standard form — all form fields, same permissions.' : 'Custom view. Some fields may only be editable in the standard form.' }}\n </span>\n <button #modeSwitch mjButton Variant=\"outline\" Size=\"sm\" type=\"button\"\n class=\"mj-form-host-mode-switch\"\n (click)=\"OnModeSwitchClick()\">\n {{ FormMode === 'standard' ? 'Back to custom view' : 'Open standard form' }}\n </button>\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-form.component.d.ts","sourceRoot":"","sources":["../../../src/lib/interactive-form/interactive-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAS,SAAS,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,YAAY,EAAqB,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EACH,aAAa,EAOhB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAsB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;;AAE3D;;;;;;;;;;;;;;GAcG;AACH,qBAKa,wBA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G,SAAS,EAE5D;IAED;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAA6C;IAExE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;IAC5D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA8B;IAEpC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B/C;;;OAGG;IACU,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7E;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI;IAIjF;;;;;;;;OAQG;YACW,gBAAgB;IA4D9B,OAAO,CAAC,kBAAkB;YAOZ,kBAAkB;IAahC,OAAO,CAAC,6BAA6B;IAWrC;;;;;OAKG;IACa,aAAa,IAAI,IAAI;IAKrB,WAAW,IAAI,IAAI;IAKnC;;;;;;;;;;;;;OAaG;IACmB,UAAU,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAqBlF;;;;;;;;OAQG;IACa,UAAU,IAAI,IAAI;IAiBlC;;;;;;;;;;;OAWG;YACW,iBAAiB;
|
|
1
|
+
{"version":3,"file":"interactive-form.component.d.ts","sourceRoot":"","sources":["../../../src/lib/interactive-form/interactive-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAS,SAAS,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,YAAY,EAAqB,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EACH,aAAa,EAOhB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAsB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;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9C,IAAW,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,EAE5D;IAED;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAA6C;IAExE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;IAC5D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA8B;IAEpC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B/C;;;OAGG;IACU,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7E;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI;IAIjF;;;;;;;;OAQG;YACW,gBAAgB;IA4D9B,OAAO,CAAC,kBAAkB;YAOZ,kBAAkB;IAahC,OAAO,CAAC,6BAA6B;IAWrC;;;;;OAKG;IACa,aAAa,IAAI,IAAI;IAKrB,WAAW,IAAI,IAAI;IAKnC;;;;;;;;;;;;;OAaG;IACmB,UAAU,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAqBlF;;;;;;;;OAQG;IACa,UAAU,IAAI,IAAI;IAiBlC;;;;;;;;;;;OAWG;YACW,iBAAiB;IAqE/B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA6B5B,OAAO,CAAC,iBAAiB;yCAvehB,wBAAwB;2CAAxB,wBAAwB;CA8epC;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAMnD"}
|
|
@@ -487,6 +487,7 @@ export class InteractiveFormComponent extends BaseFormComponent {
|
|
|
487
487
|
Fields: ['ID', 'Name', 'Specification'],
|
|
488
488
|
ExtraFilter: `ID='${this.ComponentID}'`,
|
|
489
489
|
MaxRows: 1,
|
|
490
|
+
SkipTotalRowCount: true,
|
|
490
491
|
ResultType: 'simple',
|
|
491
492
|
BypassCache: true,
|
|
492
493
|
}, user);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-form.component.js","sourceRoot":"","sources":["../../../src/lib/interactive-form/interactive-form.component.ts","../../../src/lib/interactive-form/interactive-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChI,OAAO,EAA4B,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAEH,cAAc,EACd,eAAe,EAIf,UAAU,GACb,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAoB,kBAAkB,EAAuB,MAAM,0BAA0B,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;;;;ICVnD,mCAA0B;IAAA,YAAe;IAAA,iBAAW;;;IAA1B,cAAe;IAAf,sCAAe;;;;IAEzC,gDAKoD;IAAhD,AADA,6PAAkB,oCAA6B,KAAC,oPAC5B,iCAA0B,KAAC;IACnD,iBAAqB;;;IAHjB,AADA,gDAA2B,wCACK;;;IAKpC,8BAA8B;IAC1B,uBAA2C;IAC3C,4BAAM;IAAA,kCAAa;IACvB,AADuB,iBAAO,EACxB;;;IAJR,AARA,AAFF,2HAAiB,+GAE4B,gGAQpC;;;IAVT,6FAeC;;;IAeG,mCAA0B;IAAA,YAAe;IAAA,iBAAW;;;IAA1B,cAAe;IAAf,sCAAe;;;;IAEzC,gDAKoD;IAAhD,AADA,6PAAkB,oCAA6B,KAAC,oPAC5B,iCAA0B,KAAC;IACnD,iBAAqB;;;IAHjB,AADA,gDAA2B,wCACK;;;IAKpC,8BAA8B;IAC1B,uBAA2C;IAC3C,4BAAM;IAAA,kCAAa;IACvB,AADuB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Aa,IAAI,EAAE,EAAE,CAAC;YACvC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;QACnC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;6QA5eQ,wBAAwB,yBAAxB,wBAAwB;6DAAxB,wBAAwB;;;;;;YCrCrC,gFAAc;;YAAd,qCAoDC;;;iFDfY,wBAAwB;cALpC,SAAS;6BACM,KAAK,YACP,qBAAqB;;kBAkB9B,KAAK;;kBAiBL,KAAK;;kBAaL,KAAK;;kBAcL,KAAK;;kBAGL,KAAK;;kBAuCL,MAAM;;kBAaN,SAAS;mBAAC,gBAAgB;;kFAlHlB,wBAAwB;AA+erC;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IACxC,0CAA0C;IAC1C,IAAI,KAAgB,EAAE,CAAC;QACnB,6DAA6D;QAC7D,MAAM,CAAC,GAAY,wBAAwB,CAAC;IAChD,CAAC;AACL,CAAC","sourcesContent":["import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, inject } from '@angular/core';\nimport { BaseEntity, CompositeKey, LogError, RunView } from '@memberjunction/core';\nimport { InteractiveFormsEngine } from '@memberjunction/core-entities';\nimport { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport {\n FormHostProps,\n FormEventNames,\n FormMethodNames,\n FormBeforeSaveArgs,\n FormBeforeDeleteArgs,\n FormEditModeChangeRequestedArgs,\n isFormRole,\n} from '@memberjunction/interactive-component-types/forms';\nimport { SimpleEntityFieldInfo } from '@memberjunction/interactive-component-types';\nimport { MJReactComponent, ReactBridgeService, ReactComponentEvent } from '@memberjunction/ng-react';\nimport { BaseFormComponent } from '../base-form-component';\n\n/**\n * Wraps a Component (the IC kind — declared `componentRole: 'form'`) so it can\n * stand in for an Angular form on any entity.\n *\n * **Layering invariant:** the React component never touches BaseEntity. This\n * wrapper owns the entity lifecycle (`record.Save`, `record.Delete`, mode\n * transitions). The React component sees only the snapshot in\n * {@link FormHostProps} and communicates back via `BeforeSave` /\n * `BeforeDelete` / `EditModeChangeRequested` events plus its dirty-field diff.\n *\n * Instantiated by `SingleRecordComponent.LoadForm` when the resolver finds an\n * `EntityFormOverride` matching the user's scope. Behaves exactly like the\n * generated Angular form from the host's perspective: same `record` setter,\n * same `EditMode` toggle, same outputs.\n */\n@Component({\n standalone: false,\n selector: 'mj-interactive-form',\n templateUrl: './interactive-form.component.html',\n})\nexport class InteractiveFormComponent extends BaseFormComponent implements OnInit, OnDestroy {\n\n /**\n * The bound record. Backed by a setter so swapping records *after*\n * the component has mounted (e.g. Form Builder cockpit preview record\n * picker) triggers a fresh `originalSnapshot` capture + a\n * `formHostProps` rebuild — without this, the React form keeps\n * rendering the original record's values even after the input\n * changes. Guarded on `_recordInitialized` so the post-mount path\n * doesn't fire during the first input assignment (handled by\n * `ngOnInit`, which sets both `originalSnapshot` and `formHostProps`).\n */\n private _record!: BaseEntity;\n private _recordInitialized = false;\n\n @Input()\n public override set record(value: BaseEntity) {\n if (this._record === value) return;\n this._record = value;\n if (this._recordInitialized && value) {\n this.originalSnapshot = value.GetAll();\n this.rebuildFormHostProps();\n this.cdr.markForCheck();\n }\n }\n public override get record(): BaseEntity { return this._record; }\n\n /**\n * The Component row ID resolved for this (entity, user, roles) tuple. Set\n * by `SingleRecordComponent.LoadForm` after the resolver returns an\n * override.\n */\n @Input() public ComponentID: string | null = null;\n\n /**\n * Loaded ComponentSpec, parsed from the Component row's `Specification` JSON.\n *\n * Two ways to populate this:\n * 1. **Via `ComponentID`** (the standard path): set the input, ngOnInit\n * fetches the row from `MJ: Components` and assigns the parsed spec.\n * 2. **Direct assignment** (the artifact-viewer path): the caller already\n * has the spec in hand (parsed from an artifact JSON blob) and sets\n * `componentSpec` directly. In that case `ComponentID` should be left\n * null and the DB fetch is skipped.\n */\n @Input() public componentSpec: ComponentSpec | null = null;\n\n /**\n * When true, render the React component **without** the\n * `<mj-record-form-container>` wrapper — i.e. no toolbar (no Save /\n * Cancel / Edit / Delete / History / Tags / Lists).\n *\n * Used by the Form Builder cockpit's Preview tab where the toolbar's\n * actions don't apply (Save would save the *record*, but the cockpit's\n * own Save button saves the *spec*; History/Tags assume a real\n * persistent record, but the preview record can be a synthetic\n * NewRecord). Keeping just the form body produces a clean \"this is\n * what the form looks like\" view.\n */\n @Input() public PreviewMode = false;\n\n /** @deprecated Use {@link PreviewMode}. */\n @Input() public set previewMode(value: InteractiveFormComponent['PreviewMode']) {\n this.PreviewMode = value;\n }\n /** @deprecated Use {@link PreviewMode}. */\n public get previewMode(): InteractiveFormComponent['PreviewMode'] {\n return this.PreviewMode;\n }\n\n /** A full custom entity form replaces the whole form body. */\n public override get OwnsEntireFormBody(): boolean { return true; }\n\n /** FormHostProps passed to the React component. Recomputed when record or mode changes. */\n public FormHostProps: FormHostProps | null = null;\n\n /** @deprecated Use {@link FormHostProps}. */\n public get formHostProps(): FormHostProps | null {\n return this.FormHostProps;\n }\n /** @deprecated Use {@link FormHostProps}. */\n public set formHostProps(value: FormHostProps | null) {\n this.FormHostProps = value;\n }\n\n /** Loaded-spec error (component row missing, JSON parse failure, etc.). */\n private _loadError: string | null = null;\n\n /**\n * Loaded-spec error (component row missing, JSON parse failure,\n * React-runtime bootstrap failure, etc.). Setter auto-emits\n * `LoadErrorChanged` so host surfaces (e.g. Form Builder cockpit\n * Preview tab) can show their own error state — retrospective fix #10.\n */\n public get loadError(): string | null { return this._loadError; }\n public set loadError(v: string | null) {\n if (v === this._loadError) return;\n this._loadError = v;\n this.LoadErrorChanged.emit(v);\n }\n\n @Output() public LoadErrorChanged = new EventEmitter<string | null>();\n\n /** Tracks last-known field snapshot for computing the dirty-field diff on save. */\n private originalSnapshot: Record<string, unknown> = {};\n\n /**\n * Reference to the mounted React component. Used by the SaveRecord /\n * CancelEdit overrides below to invoke the component's registered\n * `RequestSave` / `RequestCancel` methods when the host toolbar fires\n * Save/Cancel — so the single user-visible Save lives on the toolbar\n * (consistent with every other entity form in MJ) and not duplicated\n * inside the form body.\n */\n @ViewChild('reactComponent') public ReactComponent?: MJReactComponent;\n\n /** @deprecated Use {@link ReactComponent}. */\n public get reactComponent(): MJReactComponent | undefined {\n return this.ReactComponent;\n }\n /** @deprecated Use {@link ReactComponent}. */\n public set reactComponent(value: MJReactComponent | undefined) {\n this.ReactComponent = value;\n }\n\n /**\n * Promise resolver populated when `SaveRecord` invokes `RequestSave`\n * on the React component. `handleBeforeSave` resolves it after the\n * BeforeSave-driven entity save completes, so SaveRecord can return\n * a meaningful success boolean and honor `StopEditModeAfterSave`.\n */\n private pendingSaveResolver: ((success: boolean) => void) | null = null;\n\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly reactBridge = inject(ReactBridgeService);\n\n public override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n // Force the React bridge to be initialized BEFORE we let our template\n // mount the `<mj-react-component>` child. Without this, the child's\n // ngAfterViewInit can race the adapter bootstrap and throw \"React\n // runtime not initialized\" — which then prevents the form from\n // rendering and silently breaks the save flow.\n try {\n await this.reactBridge.getReactContext();\n } catch (err) {\n LogError(`InteractiveFormComponent: React bridge bootstrap failed: ${err instanceof Error ? err.message : String(err)}`);\n this.loadError ='React runtime failed to load. Try a hard refresh.';\n return;\n }\n if (this.record) {\n this.originalSnapshot = this.record.GetAll();\n this.rebuildFormHostProps();\n }\n // Mark init complete so the `record` setter rebuilds on subsequent\n // input changes (post-mount record swaps from the Form Builder\n // cockpit preview picker, etc.). Before this flag flips, the setter\n // intentionally does nothing because ngOnInit already handles the\n // initial assignment.\n this._recordInitialized = true;\n // Direct-spec path (artifact viewer) takes precedence; DB fetch only\n // when no spec was supplied and we have an ID to look up.\n if (!this.componentSpec && this.ComponentID) {\n await this.loadComponentSpec();\n }\n }\n\n /**\n * Called by the React component via `mj-react-component`'s `componentEvent`\n * @Output. Maps the form-role event names to BaseEntity operations.\n */\n public async OnReactComponentEvent(event: ReactComponentEvent): Promise<void> {\n switch (event.type) {\n case FormEventNames.BeforeSave:\n await this.handleBeforeSave(event.payload as FormBeforeSaveArgs);\n break;\n case FormEventNames.BeforeDelete:\n await this.handleBeforeDelete(event.payload as FormBeforeDeleteArgs);\n break;\n case FormEventNames.EditModeChangeRequested:\n this.handleEditModeChangeRequested(event.payload as FormEditModeChangeRequestedArgs);\n break;\n // FieldChanged / DirtyStateChanged / ValidationChanged are read-only signals;\n // the wrapper doesn't need to react beyond what the component does internally.\n }\n }\n\n /**\n * Called when the form-role component drills into a related record via\n * `callbacks.OpenEntityRecord(...)`. Relays it upward as a `Navigate` event\n * (the same path normal FK links use) so the host opens the target record.\n */\n public OnOpenEntityRecord(event: { entityName: string; key: CompositeKey }): void {\n this.Navigate.emit({ Kind: 'record', EntityName: event.entityName, PrimaryKey: event.key });\n }\n\n /**\n * Apply the React component's dirty-field diff to the BaseEntity, save,\n * and refresh the snapshot. Errors surface via `LatestResult.CompleteMessage`\n * per the BaseEntity Save contract.\n *\n * Resolves `pendingSaveResolver` if {@link SaveRecord} initiated this\n * flow via the toolbar — so the toolbar can return a meaningful boolean\n * and honor `StopEditModeAfterSave`.\n */\n private async handleBeforeSave(args: FormBeforeSaveArgs): Promise<void> {\n if (args.cancel) {\n this.resolvePendingSave(false);\n return;\n }\n if (!this.record) {\n LogError('InteractiveFormComponent.handleBeforeSave: no record loaded');\n this.resolvePendingSave(false);\n return;\n }\n\n const dirtyEntries = Object.entries(args.dirtyFields ?? {});\n if (dirtyEntries.length === 0 && this.record.IsSaved) {\n // No dirty fields on an already-persisted record — a genuine no-op.\n // Most likely the user clicked Save without changing anything, or the\n // React draft didn't reach the host before RequestSave fired. Surface\n // it so the user sees why their edits didn't land.\n console.warn(\n '[InteractiveFormComponent] BeforeSave fired with no dirtyFields. ' +\n 'Either the user clicked Save without changing anything, or the ' +\n 'React draft did not propagate before save fired.'\n );\n // Skip Save() + rebuildFormHostProps(): re-rendering the React form\n // would re-fire BeforeSave on a form that emits it on mount/render —\n // an infinite re-mount loop that starves the form's async data load\n // (it unmounts before setState commits). Treat it as a no-op.\n //\n // Guard on IsSaved so this only short-circuits existing records. A\n // NEW record with no dirty fields must still fall through to Save()\n // so the insert is attempted (and any validation failure surfaced)\n // rather than masked as a reported success with no row inserted.\n this.resolvePendingSave(true);\n return;\n }\n for (const [fieldName, value] of dirtyEntries) {\n const field = this.record.Fields.find(f =>\n f.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (field) {\n // Use the canonical field name from the lookup so case\n // mismatches between the React draft and the entity schema\n // don't silently drop the value.\n this.record.Set(field.Name, value);\n } else {\n console.warn(\n `[InteractiveFormComponent] Unknown field \"${fieldName}\" in dirtyFields ` +\n `for entity ${this.record.EntityInfo.Name}. Value not applied.`\n );\n }\n }\n\n const saved = await this.record.Save();\n if (saved) {\n this.originalSnapshot = this.record.GetAll();\n this.rebuildFormHostProps();\n } else {\n LogError(`InteractiveFormComponent: save failed for ${this.record.EntityInfo.Name}: ${this.record.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n this.resolvePendingSave(saved);\n }\n\n private resolvePendingSave(success: boolean): void {\n if (this.pendingSaveResolver) {\n this.pendingSaveResolver(success);\n this.pendingSaveResolver = null;\n }\n }\n\n private async handleBeforeDelete(args: FormBeforeDeleteArgs): Promise<void> {\n if (args.cancel) {\n return;\n }\n if (!this.record) {\n return;\n }\n const deleted = await this.record.Delete();\n if (!deleted) {\n LogError(`InteractiveFormComponent: delete failed for ${this.record.EntityInfo.Name}: ${this.record.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n }\n\n private handleEditModeChangeRequested(args: FormEditModeChangeRequestedArgs): void {\n if (args.cancel) {\n return;\n }\n if (args.requestedMode === 'edit') {\n this.StartEditMode();\n } else {\n this.EndEditMode();\n }\n }\n\n /**\n * Propagate Angular-toolbar-driven mode changes into the React component's\n * `FormHostProps.mode`. Without these overrides, clicking Edit on the\n * `<mj-record-form-container>` toolbar flips `this.EditMode` but the React\n * side still sees `mode: 'view'`.\n */\n public override StartEditMode(): void {\n super.StartEditMode();\n this.rebuildFormHostProps();\n }\n\n public override EndEditMode(): void {\n super.EndEditMode();\n this.rebuildFormHostProps();\n }\n\n /**\n * Toolbar **Save** override. Routes the click through the React\n * component's registered `RequestSave` method so the React layer can\n * (a) run its own validation, (b) flush its draft state, (c) emit\n * `BeforeSave` with the dirty-field diff — exactly the flow the\n * in-form Save button would trigger. The wrapper then awaits the\n * BeforeSave handler via `pendingSaveResolver`, gets a real\n * success/failure boolean, and honors `StopEditModeAfterSave`.\n *\n * Falls back to the base implementation for components that haven't\n * registered `RequestSave` — preserves correctness for forms that\n * keep their own in-form Save button (older sample, hand-authored\n * forms that pre-date this contract).\n */\n public override async SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean> {\n if (!this.ReactComponent?.hasMethod?.(FormMethodNames.RequestSave)) {\n return super.SaveRecord(StopEditModeAfterSave);\n }\n const completion = new Promise<boolean>(resolve => {\n this.pendingSaveResolver = resolve;\n });\n try {\n this.ReactComponent.invokeMethod(FormMethodNames.RequestSave);\n } catch (err) {\n this.pendingSaveResolver = null;\n LogError(`InteractiveFormComponent.SaveRecord: RequestSave threw: ${err instanceof Error ? err.message : String(err)}`);\n return false;\n }\n const success = await completion;\n if (success && StopEditModeAfterSave) {\n this.EndEditMode();\n }\n return success;\n }\n\n /**\n * Toolbar **Cancel** override. Asks the React component to discard\n * its draft via `RequestCancel`, then flips out of edit mode the\n * same way the base implementation would. The React component is\n * expected to (a) clear its local draft state and (b) emit\n * `EditModeChangeRequested({ requestedMode: 'view' })` — though we\n * call `EndEditMode` here directly anyway, so even a no-op handler\n * leaves the form in a coherent state.\n */\n public override CancelEdit(): void {\n if (this.ReactComponent?.hasMethod?.(FormMethodNames.RequestCancel)) {\n try {\n this.ReactComponent.invokeMethod(FormMethodNames.RequestCancel);\n } catch (err) {\n LogError(`InteractiveFormComponent.CancelEdit: RequestCancel threw: ${err instanceof Error ? err.message : String(err)}`);\n }\n // Don't call super.CancelEdit() — base reverts the BaseEntity,\n // but for interactive forms the BaseEntity never received the\n // React draft in the first place, so there's nothing to revert.\n // Just flip mode.\n this.EndEditMode();\n return;\n }\n super.CancelEdit();\n }\n\n /**\n * Resolve the Component row, parse its `Specification`, and surface either\n * the spec or an error. Backed by `InteractiveFormsEngine` (in-memory\n * cache, BaseEntity event-driven invalidation) so this is a sub-ms JS\n * lookup once the engine has loaded — the engine handles freshness\n * via remote-invalidate events, replacing the prior RunView's\n * `BypassCache: true` escape hatch. Falls through to a one-shot\n * RunView only on engine-cache miss (defensive — the engine should\n * always have a Type='Form' Component, but if a brand-new Component\n * was just created on the server and the invalidation event hasn't\n * propagated yet, we still want to render rather than blank-screen).\n */\n private async loadComponentSpec(): Promise<void> {\n if (!this.ComponentID) {\n this.loadError ='No ComponentID provided to InteractiveFormComponent.';\n return;\n }\n try {\n const provider = this.ProviderToUse;\n const user = provider.CurrentUser;\n // Lazy-load the form-metadata cache. No-op when already loaded.\n try {\n await InteractiveFormsEngine.Instance.Config(false, user, provider);\n } catch (err) {\n LogError(`InteractiveFormComponent: InteractiveFormsEngine.Config failed: ${err instanceof Error ? err.message : String(err)}`);\n // Fall through to RunView path below — engine miss isn't fatal.\n }\n\n let specJson: string | null = null;\n let nameForError: string | undefined;\n\n const cached = InteractiveFormsEngine.Instance.FindFormByID(this.ComponentID);\n if (cached) {\n specJson = cached.Specification;\n nameForError = cached.Name;\n } else {\n // Engine miss — one-shot RunView fallback. This covers the\n // narrow window where a freshly-created Component hasn't\n // propagated to the engine yet (cross-process remote-invalidate\n // is debounced ~1.5s). After the propagation lands subsequent\n // form opens hit the cache.\n const rv = RunView.FromMetadataProvider(provider);\n const result = await rv.RunView<{ ID: string; Specification: string; Name: string }>({\n EntityName: 'MJ: Components',\n Fields: ['ID', 'Name', 'Specification'],\n ExtraFilter: `ID='${this.ComponentID}'`,\n MaxRows: 1,\n ResultType: 'simple',\n BypassCache: true,\n }, user);\n if (!result.Success || !result.Results?.length) {\n this.loadError =`Component ${this.ComponentID} not found.`;\n return;\n }\n specJson = result.Results[0].Specification;\n nameForError = result.Results[0].Name;\n }\n\n try {\n this.componentSpec = JSON.parse(specJson ?? 'null') as ComponentSpec;\n } catch (err) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} has invalid Specification JSON: ${err instanceof Error ? err.message : String(err)}`;\n return;\n }\n if (!this.componentSpec) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} has an empty Specification.`;\n return;\n }\n // Validate the spec commits to the form-role contract. We use the\n // helper (whose signature is structural via Pick<>) so this stays\n // robust across ComponentSpec field additions.\n if (!isFormRole(this.componentSpec)) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} does not declare componentRole='form'.`;\n return;\n }\n } finally {\n this.changeDetector.markForCheck();\n }\n }\n\n /**\n * Build `FormHostProps` from the current record + permissions + edit mode.\n * Called whenever the record loads, mode changes, or save completes.\n */\n private rebuildFormHostProps(): void {\n if (!this.record) {\n this.FormHostProps = null;\n return;\n }\n const fields: SimpleEntityFieldInfo[] = this.record.Fields.map(f =>\n SimpleEntityFieldInfo.FromEntityFieldInfo(f.EntityFieldInfo));\n\n const pk = this.record.PrimaryKey;\n const primaryKey: Record<string, unknown> | null = (pk && pk.HasValue)\n ? this.primaryKeyToPlain(pk)\n : null;\n\n this.FormHostProps = {\n entityName: this.record.EntityInfo.Name,\n primaryKey,\n record: this.record.GetAll(),\n entityMetadata: {\n fields,\n displayName: this.record.EntityInfo.DisplayName ?? this.record.EntityInfo.Name,\n nameField: this.record.EntityInfo.NameField?.Name,\n },\n mode: this.EditMode ? 'edit' : (pk && pk.HasValue ? 'view' : 'create'),\n canEdit: this.UserCanEdit,\n canDelete: this.UserCanDelete,\n canCreate: this.UserCanCreate,\n };\n }\n\n private primaryKeyToPlain(pk: CompositeKey): Record<string, unknown> {\n const obj: Record<string, unknown> = {};\n for (const kvp of pk.KeyValuePairs ?? []) {\n obj[kvp.FieldName] = kvp.Value;\n }\n return obj;\n }\n}\n\n/**\n * Tree-shaking guard. Imported and called from public-api.ts so bundlers don't\n * drop the component when no consumer references it by name.\n */\nexport function LoadInteractiveFormComponent(): void {\n // Force the class reference to stay live.\n if (false as boolean) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: unknown = InteractiveFormComponent;\n }\n}\n","@if (record) {\n@if (previewMode) {\n <!-- Preview mode — no toolbar wrap. Just the form body for clean\n \"what the form looks like\" previews (Form Builder cockpit). -->\n @if (loadError) {\n <mj-alert Variant=\"error\">{{ loadError }}</mj-alert>\n } @else if (componentSpec && formHostProps) {\n <mj-react-component\n #reactComponent\n [component]=\"componentSpec\"\n [componentProps]=\"formHostProps\"\n (componentEvent)=\"OnReactComponentEvent($event)\"\n (openEntityRecord)=\"OnOpenEntityRecord($event)\">\n </mj-react-component>\n } @else {\n <div class=\"mj-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading form…</span>\n </div>\n }\n} @else {\n<mj-record-form-container\n [Record]=\"record\"\n [FormComponent]=\"this\"\n (Navigate)=\"OnFormNavigate($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (ListManagementRequested)=\"OnListManagementRequested()\">\n\n <!-- No panel slots: a full custom entity form owns its whole body, so the container\n supplies the toolbar only — no panels and no stock related grids. -->\n\n @if (loadError) {\n <mj-alert Variant=\"error\">{{ loadError }}</mj-alert>\n } @else if (componentSpec && formHostProps) {\n <mj-react-component\n #reactComponent\n [component]=\"componentSpec\"\n [componentProps]=\"formHostProps\"\n (componentEvent)=\"OnReactComponentEvent($event)\"\n (openEntityRecord)=\"OnOpenEntityRecord($event)\">\n </mj-react-component>\n } @else {\n <div class=\"mj-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading form…</span>\n </div>\n }\n\n</mj-record-form-container>\n}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-form.component.js","sourceRoot":"","sources":["../../../src/lib/interactive-form/interactive-form.component.ts","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G,CAAC,KAAK,CAAC;QACnC,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;6QA7eQ,wBAAwB,yBAAxB,wBAAwB;6DAAxB,wBAAwB;;;;;;YCrCrC,gFAAc;;YAAd,qCAoDC;;;iFDfY,wBAAwB;cALpC,SAAS;6BACM,KAAK,YACP,qBAAqB;;kBAkB9B,KAAK;;kBAiBL,KAAK;;kBAaL,KAAK;;kBAcL,KAAK;;kBAGL,KAAK;;kBAuCL,MAAM;;kBAaN,SAAS;mBAAC,gBAAgB;;kFAlHlB,wBAAwB;AAgfrC;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IACxC,0CAA0C;IAC1C,IAAI,KAAgB,EAAE,CAAC;QACnB,6DAA6D;QAC7D,MAAM,CAAC,GAAY,wBAAwB,CAAC;IAChD,CAAC;AACL,CAAC","sourcesContent":["import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, inject } from '@angular/core';\nimport { BaseEntity, CompositeKey, LogError, RunView } from '@memberjunction/core';\nimport { InteractiveFormsEngine } from '@memberjunction/core-entities';\nimport { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport {\n FormHostProps,\n FormEventNames,\n FormMethodNames,\n FormBeforeSaveArgs,\n FormBeforeDeleteArgs,\n FormEditModeChangeRequestedArgs,\n isFormRole,\n} from '@memberjunction/interactive-component-types/forms';\nimport { SimpleEntityFieldInfo } from '@memberjunction/interactive-component-types';\nimport { MJReactComponent, ReactBridgeService, ReactComponentEvent } from '@memberjunction/ng-react';\nimport { BaseFormComponent } from '../base-form-component';\n\n/**\n * Wraps a Component (the IC kind — declared `componentRole: 'form'`) so it can\n * stand in for an Angular form on any entity.\n *\n * **Layering invariant:** the React component never touches BaseEntity. This\n * wrapper owns the entity lifecycle (`record.Save`, `record.Delete`, mode\n * transitions). The React component sees only the snapshot in\n * {@link FormHostProps} and communicates back via `BeforeSave` /\n * `BeforeDelete` / `EditModeChangeRequested` events plus its dirty-field diff.\n *\n * Instantiated by `SingleRecordComponent.LoadForm` when the resolver finds an\n * `EntityFormOverride` matching the user's scope. Behaves exactly like the\n * generated Angular form from the host's perspective: same `record` setter,\n * same `EditMode` toggle, same outputs.\n */\n@Component({\n standalone: false,\n selector: 'mj-interactive-form',\n templateUrl: './interactive-form.component.html',\n})\nexport class InteractiveFormComponent extends BaseFormComponent implements OnInit, OnDestroy {\n\n /**\n * The bound record. Backed by a setter so swapping records *after*\n * the component has mounted (e.g. Form Builder cockpit preview record\n * picker) triggers a fresh `originalSnapshot` capture + a\n * `formHostProps` rebuild — without this, the React form keeps\n * rendering the original record's values even after the input\n * changes. Guarded on `_recordInitialized` so the post-mount path\n * doesn't fire during the first input assignment (handled by\n * `ngOnInit`, which sets both `originalSnapshot` and `formHostProps`).\n */\n private _record!: BaseEntity;\n private _recordInitialized = false;\n\n @Input()\n public override set record(value: BaseEntity) {\n if (this._record === value) return;\n this._record = value;\n if (this._recordInitialized && value) {\n this.originalSnapshot = value.GetAll();\n this.rebuildFormHostProps();\n this.cdr.markForCheck();\n }\n }\n public override get record(): BaseEntity { return this._record; }\n\n /**\n * The Component row ID resolved for this (entity, user, roles) tuple. Set\n * by `SingleRecordComponent.LoadForm` after the resolver returns an\n * override.\n */\n @Input() public ComponentID: string | null = null;\n\n /**\n * Loaded ComponentSpec, parsed from the Component row's `Specification` JSON.\n *\n * Two ways to populate this:\n * 1. **Via `ComponentID`** (the standard path): set the input, ngOnInit\n * fetches the row from `MJ: Components` and assigns the parsed spec.\n * 2. **Direct assignment** (the artifact-viewer path): the caller already\n * has the spec in hand (parsed from an artifact JSON blob) and sets\n * `componentSpec` directly. In that case `ComponentID` should be left\n * null and the DB fetch is skipped.\n */\n @Input() public componentSpec: ComponentSpec | null = null;\n\n /**\n * When true, render the React component **without** the\n * `<mj-record-form-container>` wrapper — i.e. no toolbar (no Save /\n * Cancel / Edit / Delete / History / Tags / Lists).\n *\n * Used by the Form Builder cockpit's Preview tab where the toolbar's\n * actions don't apply (Save would save the *record*, but the cockpit's\n * own Save button saves the *spec*; History/Tags assume a real\n * persistent record, but the preview record can be a synthetic\n * NewRecord). Keeping just the form body produces a clean \"this is\n * what the form looks like\" view.\n */\n @Input() public PreviewMode = false;\n\n /** @deprecated Use {@link PreviewMode}. */\n @Input() public set previewMode(value: InteractiveFormComponent['PreviewMode']) {\n this.PreviewMode = value;\n }\n /** @deprecated Use {@link PreviewMode}. */\n public get previewMode(): InteractiveFormComponent['PreviewMode'] {\n return this.PreviewMode;\n }\n\n /** A full custom entity form replaces the whole form body. */\n public override get OwnsEntireFormBody(): boolean { return true; }\n\n /** FormHostProps passed to the React component. Recomputed when record or mode changes. */\n public FormHostProps: FormHostProps | null = null;\n\n /** @deprecated Use {@link FormHostProps}. */\n public get formHostProps(): FormHostProps | null {\n return this.FormHostProps;\n }\n /** @deprecated Use {@link FormHostProps}. */\n public set formHostProps(value: FormHostProps | null) {\n this.FormHostProps = value;\n }\n\n /** Loaded-spec error (component row missing, JSON parse failure, etc.). */\n private _loadError: string | null = null;\n\n /**\n * Loaded-spec error (component row missing, JSON parse failure,\n * React-runtime bootstrap failure, etc.). Setter auto-emits\n * `LoadErrorChanged` so host surfaces (e.g. Form Builder cockpit\n * Preview tab) can show their own error state — retrospective fix #10.\n */\n public get loadError(): string | null { return this._loadError; }\n public set loadError(v: string | null) {\n if (v === this._loadError) return;\n this._loadError = v;\n this.LoadErrorChanged.emit(v);\n }\n\n @Output() public LoadErrorChanged = new EventEmitter<string | null>();\n\n /** Tracks last-known field snapshot for computing the dirty-field diff on save. */\n private originalSnapshot: Record<string, unknown> = {};\n\n /**\n * Reference to the mounted React component. Used by the SaveRecord /\n * CancelEdit overrides below to invoke the component's registered\n * `RequestSave` / `RequestCancel` methods when the host toolbar fires\n * Save/Cancel — so the single user-visible Save lives on the toolbar\n * (consistent with every other entity form in MJ) and not duplicated\n * inside the form body.\n */\n @ViewChild('reactComponent') public ReactComponent?: MJReactComponent;\n\n /** @deprecated Use {@link ReactComponent}. */\n public get reactComponent(): MJReactComponent | undefined {\n return this.ReactComponent;\n }\n /** @deprecated Use {@link ReactComponent}. */\n public set reactComponent(value: MJReactComponent | undefined) {\n this.ReactComponent = value;\n }\n\n /**\n * Promise resolver populated when `SaveRecord` invokes `RequestSave`\n * on the React component. `handleBeforeSave` resolves it after the\n * BeforeSave-driven entity save completes, so SaveRecord can return\n * a meaningful success boolean and honor `StopEditModeAfterSave`.\n */\n private pendingSaveResolver: ((success: boolean) => void) | null = null;\n\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly reactBridge = inject(ReactBridgeService);\n\n public override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n // Force the React bridge to be initialized BEFORE we let our template\n // mount the `<mj-react-component>` child. Without this, the child's\n // ngAfterViewInit can race the adapter bootstrap and throw \"React\n // runtime not initialized\" — which then prevents the form from\n // rendering and silently breaks the save flow.\n try {\n await this.reactBridge.getReactContext();\n } catch (err) {\n LogError(`InteractiveFormComponent: React bridge bootstrap failed: ${err instanceof Error ? err.message : String(err)}`);\n this.loadError ='React runtime failed to load. Try a hard refresh.';\n return;\n }\n if (this.record) {\n this.originalSnapshot = this.record.GetAll();\n this.rebuildFormHostProps();\n }\n // Mark init complete so the `record` setter rebuilds on subsequent\n // input changes (post-mount record swaps from the Form Builder\n // cockpit preview picker, etc.). Before this flag flips, the setter\n // intentionally does nothing because ngOnInit already handles the\n // initial assignment.\n this._recordInitialized = true;\n // Direct-spec path (artifact viewer) takes precedence; DB fetch only\n // when no spec was supplied and we have an ID to look up.\n if (!this.componentSpec && this.ComponentID) {\n await this.loadComponentSpec();\n }\n }\n\n /**\n * Called by the React component via `mj-react-component`'s `componentEvent`\n * @Output. Maps the form-role event names to BaseEntity operations.\n */\n public async OnReactComponentEvent(event: ReactComponentEvent): Promise<void> {\n switch (event.type) {\n case FormEventNames.BeforeSave:\n await this.handleBeforeSave(event.payload as FormBeforeSaveArgs);\n break;\n case FormEventNames.BeforeDelete:\n await this.handleBeforeDelete(event.payload as FormBeforeDeleteArgs);\n break;\n case FormEventNames.EditModeChangeRequested:\n this.handleEditModeChangeRequested(event.payload as FormEditModeChangeRequestedArgs);\n break;\n // FieldChanged / DirtyStateChanged / ValidationChanged are read-only signals;\n // the wrapper doesn't need to react beyond what the component does internally.\n }\n }\n\n /**\n * Called when the form-role component drills into a related record via\n * `callbacks.OpenEntityRecord(...)`. Relays it upward as a `Navigate` event\n * (the same path normal FK links use) so the host opens the target record.\n */\n public OnOpenEntityRecord(event: { entityName: string; key: CompositeKey }): void {\n this.Navigate.emit({ Kind: 'record', EntityName: event.entityName, PrimaryKey: event.key });\n }\n\n /**\n * Apply the React component's dirty-field diff to the BaseEntity, save,\n * and refresh the snapshot. Errors surface via `LatestResult.CompleteMessage`\n * per the BaseEntity Save contract.\n *\n * Resolves `pendingSaveResolver` if {@link SaveRecord} initiated this\n * flow via the toolbar — so the toolbar can return a meaningful boolean\n * and honor `StopEditModeAfterSave`.\n */\n private async handleBeforeSave(args: FormBeforeSaveArgs): Promise<void> {\n if (args.cancel) {\n this.resolvePendingSave(false);\n return;\n }\n if (!this.record) {\n LogError('InteractiveFormComponent.handleBeforeSave: no record loaded');\n this.resolvePendingSave(false);\n return;\n }\n\n const dirtyEntries = Object.entries(args.dirtyFields ?? {});\n if (dirtyEntries.length === 0 && this.record.IsSaved) {\n // No dirty fields on an already-persisted record — a genuine no-op.\n // Most likely the user clicked Save without changing anything, or the\n // React draft didn't reach the host before RequestSave fired. Surface\n // it so the user sees why their edits didn't land.\n console.warn(\n '[InteractiveFormComponent] BeforeSave fired with no dirtyFields. ' +\n 'Either the user clicked Save without changing anything, or the ' +\n 'React draft did not propagate before save fired.'\n );\n // Skip Save() + rebuildFormHostProps(): re-rendering the React form\n // would re-fire BeforeSave on a form that emits it on mount/render —\n // an infinite re-mount loop that starves the form's async data load\n // (it unmounts before setState commits). Treat it as a no-op.\n //\n // Guard on IsSaved so this only short-circuits existing records. A\n // NEW record with no dirty fields must still fall through to Save()\n // so the insert is attempted (and any validation failure surfaced)\n // rather than masked as a reported success with no row inserted.\n this.resolvePendingSave(true);\n return;\n }\n for (const [fieldName, value] of dirtyEntries) {\n const field = this.record.Fields.find(f =>\n f.Name.trim().toLowerCase() === fieldName.trim().toLowerCase());\n if (field) {\n // Use the canonical field name from the lookup so case\n // mismatches between the React draft and the entity schema\n // don't silently drop the value.\n this.record.Set(field.Name, value);\n } else {\n console.warn(\n `[InteractiveFormComponent] Unknown field \"${fieldName}\" in dirtyFields ` +\n `for entity ${this.record.EntityInfo.Name}. Value not applied.`\n );\n }\n }\n\n const saved = await this.record.Save();\n if (saved) {\n this.originalSnapshot = this.record.GetAll();\n this.rebuildFormHostProps();\n } else {\n LogError(`InteractiveFormComponent: save failed for ${this.record.EntityInfo.Name}: ${this.record.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n this.resolvePendingSave(saved);\n }\n\n private resolvePendingSave(success: boolean): void {\n if (this.pendingSaveResolver) {\n this.pendingSaveResolver(success);\n this.pendingSaveResolver = null;\n }\n }\n\n private async handleBeforeDelete(args: FormBeforeDeleteArgs): Promise<void> {\n if (args.cancel) {\n return;\n }\n if (!this.record) {\n return;\n }\n const deleted = await this.record.Delete();\n if (!deleted) {\n LogError(`InteractiveFormComponent: delete failed for ${this.record.EntityInfo.Name}: ${this.record.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n }\n\n private handleEditModeChangeRequested(args: FormEditModeChangeRequestedArgs): void {\n if (args.cancel) {\n return;\n }\n if (args.requestedMode === 'edit') {\n this.StartEditMode();\n } else {\n this.EndEditMode();\n }\n }\n\n /**\n * Propagate Angular-toolbar-driven mode changes into the React component's\n * `FormHostProps.mode`. Without these overrides, clicking Edit on the\n * `<mj-record-form-container>` toolbar flips `this.EditMode` but the React\n * side still sees `mode: 'view'`.\n */\n public override StartEditMode(): void {\n super.StartEditMode();\n this.rebuildFormHostProps();\n }\n\n public override EndEditMode(): void {\n super.EndEditMode();\n this.rebuildFormHostProps();\n }\n\n /**\n * Toolbar **Save** override. Routes the click through the React\n * component's registered `RequestSave` method so the React layer can\n * (a) run its own validation, (b) flush its draft state, (c) emit\n * `BeforeSave` with the dirty-field diff — exactly the flow the\n * in-form Save button would trigger. The wrapper then awaits the\n * BeforeSave handler via `pendingSaveResolver`, gets a real\n * success/failure boolean, and honors `StopEditModeAfterSave`.\n *\n * Falls back to the base implementation for components that haven't\n * registered `RequestSave` — preserves correctness for forms that\n * keep their own in-form Save button (older sample, hand-authored\n * forms that pre-date this contract).\n */\n public override async SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean> {\n if (!this.ReactComponent?.hasMethod?.(FormMethodNames.RequestSave)) {\n return super.SaveRecord(StopEditModeAfterSave);\n }\n const completion = new Promise<boolean>(resolve => {\n this.pendingSaveResolver = resolve;\n });\n try {\n this.ReactComponent.invokeMethod(FormMethodNames.RequestSave);\n } catch (err) {\n this.pendingSaveResolver = null;\n LogError(`InteractiveFormComponent.SaveRecord: RequestSave threw: ${err instanceof Error ? err.message : String(err)}`);\n return false;\n }\n const success = await completion;\n if (success && StopEditModeAfterSave) {\n this.EndEditMode();\n }\n return success;\n }\n\n /**\n * Toolbar **Cancel** override. Asks the React component to discard\n * its draft via `RequestCancel`, then flips out of edit mode the\n * same way the base implementation would. The React component is\n * expected to (a) clear its local draft state and (b) emit\n * `EditModeChangeRequested({ requestedMode: 'view' })` — though we\n * call `EndEditMode` here directly anyway, so even a no-op handler\n * leaves the form in a coherent state.\n */\n public override CancelEdit(): void {\n if (this.ReactComponent?.hasMethod?.(FormMethodNames.RequestCancel)) {\n try {\n this.ReactComponent.invokeMethod(FormMethodNames.RequestCancel);\n } catch (err) {\n LogError(`InteractiveFormComponent.CancelEdit: RequestCancel threw: ${err instanceof Error ? err.message : String(err)}`);\n }\n // Don't call super.CancelEdit() — base reverts the BaseEntity,\n // but for interactive forms the BaseEntity never received the\n // React draft in the first place, so there's nothing to revert.\n // Just flip mode.\n this.EndEditMode();\n return;\n }\n super.CancelEdit();\n }\n\n /**\n * Resolve the Component row, parse its `Specification`, and surface either\n * the spec or an error. Backed by `InteractiveFormsEngine` (in-memory\n * cache, BaseEntity event-driven invalidation) so this is a sub-ms JS\n * lookup once the engine has loaded — the engine handles freshness\n * via remote-invalidate events, replacing the prior RunView's\n * `BypassCache: true` escape hatch. Falls through to a one-shot\n * RunView only on engine-cache miss (defensive — the engine should\n * always have a Type='Form' Component, but if a brand-new Component\n * was just created on the server and the invalidation event hasn't\n * propagated yet, we still want to render rather than blank-screen).\n */\n private async loadComponentSpec(): Promise<void> {\n if (!this.ComponentID) {\n this.loadError ='No ComponentID provided to InteractiveFormComponent.';\n return;\n }\n try {\n const provider = this.ProviderToUse;\n const user = provider.CurrentUser;\n // Lazy-load the form-metadata cache. No-op when already loaded.\n try {\n await InteractiveFormsEngine.Instance.Config(false, user, provider);\n } catch (err) {\n LogError(`InteractiveFormComponent: InteractiveFormsEngine.Config failed: ${err instanceof Error ? err.message : String(err)}`);\n // Fall through to RunView path below — engine miss isn't fatal.\n }\n\n let specJson: string | null = null;\n let nameForError: string | undefined;\n\n const cached = InteractiveFormsEngine.Instance.FindFormByID(this.ComponentID);\n if (cached) {\n specJson = cached.Specification;\n nameForError = cached.Name;\n } else {\n // Engine miss — one-shot RunView fallback. This covers the\n // narrow window where a freshly-created Component hasn't\n // propagated to the engine yet (cross-process remote-invalidate\n // is debounced ~1.5s). After the propagation lands subsequent\n // form opens hit the cache.\n const rv = RunView.FromMetadataProvider(provider);\n const result = await rv.RunView<{ ID: string; Specification: string; Name: string }>({\n EntityName: 'MJ: Components',\n Fields: ['ID', 'Name', 'Specification'],\n ExtraFilter: `ID='${this.ComponentID}'`,\n MaxRows: 1,\n SkipTotalRowCount: true,\n ResultType: 'simple',\n BypassCache: true,\n }, user);\n if (!result.Success || !result.Results?.length) {\n this.loadError =`Component ${this.ComponentID} not found.`;\n return;\n }\n specJson = result.Results[0].Specification;\n nameForError = result.Results[0].Name;\n }\n\n try {\n this.componentSpec = JSON.parse(specJson ?? 'null') as ComponentSpec;\n } catch (err) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} has invalid Specification JSON: ${err instanceof Error ? err.message : String(err)}`;\n return;\n }\n if (!this.componentSpec) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} has an empty Specification.`;\n return;\n }\n // Validate the spec commits to the form-role contract. We use the\n // helper (whose signature is structural via Pick<>) so this stays\n // robust across ComponentSpec field additions.\n if (!isFormRole(this.componentSpec)) {\n this.loadError =`Component ${nameForError ?? this.ComponentID} does not declare componentRole='form'.`;\n return;\n }\n } finally {\n this.changeDetector.markForCheck();\n }\n }\n\n /**\n * Build `FormHostProps` from the current record + permissions + edit mode.\n * Called whenever the record loads, mode changes, or save completes.\n */\n private rebuildFormHostProps(): void {\n if (!this.record) {\n this.FormHostProps = null;\n return;\n }\n const fields: SimpleEntityFieldInfo[] = this.record.Fields.map(f =>\n SimpleEntityFieldInfo.FromEntityFieldInfo(f.EntityFieldInfo));\n\n const pk = this.record.PrimaryKey;\n const primaryKey: Record<string, unknown> | null = (pk && pk.HasValue)\n ? this.primaryKeyToPlain(pk)\n : null;\n\n this.FormHostProps = {\n entityName: this.record.EntityInfo.Name,\n primaryKey,\n record: this.record.GetAll(),\n entityMetadata: {\n fields,\n displayName: this.record.EntityInfo.DisplayName ?? this.record.EntityInfo.Name,\n nameField: this.record.EntityInfo.NameField?.Name,\n },\n mode: this.EditMode ? 'edit' : (pk && pk.HasValue ? 'view' : 'create'),\n canEdit: this.UserCanEdit,\n canDelete: this.UserCanDelete,\n canCreate: this.UserCanCreate,\n };\n }\n\n private primaryKeyToPlain(pk: CompositeKey): Record<string, unknown> {\n const obj: Record<string, unknown> = {};\n for (const kvp of pk.KeyValuePairs ?? []) {\n obj[kvp.FieldName] = kvp.Value;\n }\n return obj;\n }\n}\n\n/**\n * Tree-shaking guard. Imported and called from public-api.ts so bundlers don't\n * drop the component when no consumer references it by name.\n */\nexport function LoadInteractiveFormComponent(): void {\n // Force the class reference to stay live.\n if (false as boolean) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: unknown = InteractiveFormComponent;\n }\n}\n","@if (record) {\n@if (previewMode) {\n <!-- Preview mode — no toolbar wrap. Just the form body for clean\n \"what the form looks like\" previews (Form Builder cockpit). -->\n @if (loadError) {\n <mj-alert Variant=\"error\">{{ loadError }}</mj-alert>\n } @else if (componentSpec && formHostProps) {\n <mj-react-component\n #reactComponent\n [component]=\"componentSpec\"\n [componentProps]=\"formHostProps\"\n (componentEvent)=\"OnReactComponentEvent($event)\"\n (openEntityRecord)=\"OnOpenEntityRecord($event)\">\n </mj-react-component>\n } @else {\n <div class=\"mj-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading form…</span>\n </div>\n }\n} @else {\n<mj-record-form-container\n [Record]=\"record\"\n [FormComponent]=\"this\"\n (Navigate)=\"OnFormNavigate($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (ListManagementRequested)=\"OnListManagementRequested()\">\n\n <!-- No panel slots: a full custom entity form owns its whole body, so the container\n supplies the toolbar only — no panels and no stock related grids. -->\n\n @if (loadError) {\n <mj-alert Variant=\"error\">{{ loadError }}</mj-alert>\n } @else if (componentSpec && formHostProps) {\n <mj-react-component\n #reactComponent\n [component]=\"componentSpec\"\n [componentProps]=\"formHostProps\"\n (componentEvent)=\"OnReactComponentEvent($event)\"\n (openEntityRecord)=\"OnOpenEntityRecord($event)\">\n </mj-react-component>\n } @else {\n <div class=\"mj-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading form…</span>\n </div>\n }\n\n</mj-record-form-container>\n}\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, Change
|
|
|
2
2
|
import { IsDateOnlySQLType, FormatDateOnly } from '@memberjunction/core';
|
|
3
3
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../links/record-link.directive";
|
|
5
6
|
const _forTrack0 = ($index, $item) => $item.Label;
|
|
6
7
|
const _forTrack1 = ($index, $item) => $item.EntityName;
|
|
7
8
|
function MjIsaRelatedCardComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -300,7 +301,7 @@ export class MjIsaRelatedCardComponent extends BaseAngularComponent {
|
|
|
300
301
|
});
|
|
301
302
|
}
|
|
302
303
|
static ɵfac = /*@__PURE__*/ (() => { let ɵMjIsaRelatedCardComponent_BaseFactory; return function MjIsaRelatedCardComponent_Factory(__ngFactoryType__) { return (ɵMjIsaRelatedCardComponent_BaseFactory || (ɵMjIsaRelatedCardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MjIsaRelatedCardComponent)))(__ngFactoryType__ || MjIsaRelatedCardComponent); }; })();
|
|
303
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjIsaRelatedCardComponent, selectors: [["mj-isa-related-card"]], inputs: { EntityName: "EntityName", PrimaryKey: "PrimaryKey", CurrentRecordName: "CurrentRecordName", Relationship: "Relationship", Depth: "Depth", Children: "Children" }, outputs: { Navigate: "Navigate" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 13, vars:
|
|
304
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjIsaRelatedCardComponent, selectors: [["mj-isa-related-card"]], inputs: { EntityName: "EntityName", PrimaryKey: "PrimaryKey", CurrentRecordName: "CurrentRecordName", Relationship: "Relationship", Depth: "Depth", Children: "Children" }, outputs: { Navigate: "Navigate" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 13, vars: 18, consts: [[1, "mj-isa-card"], [1, "mj-isa-card__header"], [1, "mj-isa-card__header-left"], [1, "mj-isa-card__icon"], [1, "mj-isa-card__entity-name"], [1, "mj-isa-card__record-name"], ["href", "#", "mjRecordLink", "", 1, "mj-isa-card__open-link", 3, "click", "EntityName", "PrimaryKey", "DisplayName", "HandleClick"], [1, "mj-isa-card__body", "mj-isa-card__body--loading"], [1, "mj-isa-card__body", "mj-isa-card__body--error"], [1, "mj-isa-card__children"], [1, "mj-isa-card__loading-bar"], [1, "mj-isa-card__loading-bar", "mj-isa-card__loading-bar--short"], [1, "mj-isa-card__error-text"], [1, "mj-isa-card__body"], [1, "mj-isa-card__field"], [1, "mj-isa-card__field-label"], [1, "mj-isa-card__field-value"], [1, "mj-isa-card__expand-row"], [1, "mj-isa-card__expand-btn", 3, "click"], [1, "mj-isa-card__extra-fields"], [1, "fa-solid", "fa-chevron-down", "mj-isa-card__expand-chevron"], [1, "fa-solid", "fa-chevron-up", "mj-isa-card__expand-chevron"], [3, "EntityName", "PrimaryKey", "CurrentRecordName", "Relationship", "Depth", "Children"], [3, "Navigate", "EntityName", "PrimaryKey", "CurrentRecordName", "Relationship", "Depth", "Children"]], template: function MjIsaRelatedCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
304
305
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
305
306
|
i0.ɵɵelement(3, "i", 3);
|
|
306
307
|
i0.ɵɵelementStart(4, "span", 4);
|
|
@@ -325,7 +326,9 @@ export class MjIsaRelatedCardComponent extends BaseAngularComponent {
|
|
|
325
326
|
i0.ɵɵtextInterpolate(ctx.DisplayName);
|
|
326
327
|
i0.ɵɵadvance();
|
|
327
328
|
i0.ɵɵconditional(ctx.RecordName ? 6 : -1);
|
|
328
|
-
i0.ɵɵadvance(
|
|
329
|
+
i0.ɵɵadvance();
|
|
330
|
+
i0.ɵɵproperty("EntityName", ctx.EntityName)("PrimaryKey", ctx.PrimaryKey)("DisplayName", ctx.RecordName || ctx.DisplayName)("HandleClick", false);
|
|
331
|
+
i0.ɵɵadvance(2);
|
|
329
332
|
i0.ɵɵconditional(ctx.IsLoading ? 9 : -1);
|
|
330
333
|
i0.ɵɵadvance();
|
|
331
334
|
i0.ɵɵconditional(ctx.LoadError && !ctx.IsLoading ? 10 : -1);
|
|
@@ -333,11 +336,11 @@ export class MjIsaRelatedCardComponent extends BaseAngularComponent {
|
|
|
333
336
|
i0.ɵɵconditional(!ctx.IsLoading && !ctx.LoadError && ctx.RelatedRecord ? 11 : -1);
|
|
334
337
|
i0.ɵɵadvance();
|
|
335
338
|
i0.ɵɵconditional(ctx.Children.length > 0 && !ctx.IsLoading ? 12 : -1);
|
|
336
|
-
} }, dependencies: [MjIsaRelatedCardComponent], styles: ["/* ============================================\n ISA RELATED CARD\n Compact summary card for one sibling/child entity\n ============================================ */\n\n.mj-isa-card {\n background: var(--mj-bg-surface-card);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n/* ---- Header ---- */\n.mj-isa-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--mj-bg-surface-elevated);\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card__header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.mj-isa-card__icon {\n font-size: 14px;\n color: var(--mj-brand-primary);\n flex-shrink: 0;\n}\n\n.mj-isa-card__entity-name {\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary);\n white-space: nowrap;\n}\n\n.mj-isa-card__record-name {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-isa-card__open-link {\n font-size: 11px;\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: 600;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.mj-isa-card__open-link:hover {\n text-decoration: underline;\n}\n\n/* ---- Body / Fields ---- */\n.mj-isa-card__body {\n padding: 8px 14px 10px;\n}\n\n.mj-isa-card__field {\n display: flex;\n align-items: baseline;\n padding: 3px 0;\n gap: 8px;\n}\n\n.mj-isa-card__field-label {\n font-size: 11px;\n color: var(--mj-text-muted);\n width: 110px;\n flex-shrink: 0;\n}\n\n.mj-isa-card__field-value {\n font-size: 12px;\n color: var(--mj-text-primary);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mj-isa-card__field-value--bool-yes {\n color: var(--mj-status-success);\n}\n\n.mj-isa-card__field-value--bool-no {\n color: var(--mj-status-error);\n}\n\n/* ---- Expand/Collapse ---- */\n.mj-isa-card__expand-row {\n padding: 0 14px 8px;\n}\n\n.mj-isa-card__expand-btn {\n font-size: 11px;\n color: var(--mj-brand-primary);\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n padding: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-isa-card__expand-btn:hover {\n text-decoration: underline;\n}\n\n.mj-isa-card__expand-chevron {\n font-size: 9px;\n}\n\n.mj-isa-card__extra-fields {\n padding: 0 14px 10px;\n border-top: 1px dashed var(--mj-border-default);\n margin-top: 4px;\n padding-top: 8px;\n}\n\n/* ---- Loading State ---- */\n.mj-isa-card__body--loading {\n padding: 12px 14px;\n}\n\n.mj-isa-card__loading-bar {\n height: 10px;\n background: linear-gradient(90deg,\n var(--mj-bg-surface-sunken) 25%,\n var(--mj-border-default) 50%,\n var(--mj-bg-surface-sunken) 75%);\n background-size: 200% 100%;\n animation: mj-isa-shimmer 1.5s infinite;\n border-radius: 4px;\n margin-bottom: 8px;\n width: 80%;\n}\n\n.mj-isa-card__loading-bar--short {\n width: 50%;\n}\n\n@keyframes mj-isa-shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n}\n\n/* ---- Nested Sub-Cards (grandchild+ rendered inside parent card) ---- */\n.mj-isa-card__children {\n padding: 6px 10px 8px;\n border-top: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card--nested {\n box-shadow: none;\n border: 1px solid var(--mj-border-default);\n border-left: 2px solid color-mix(in srgb, var(--mj-brand-primary) 60%, var(--mj-border-strong));\n border-radius: var(--mj-radius-md);\n}\n\n.mj-isa-card--nested .mj-isa-card__header {\n padding: 6px 10px;\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-border-default);\n}\n\n.mj-isa-card--nested .mj-isa-card__entity-name {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__icon {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__body {\n padding: 6px 10px 8px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-label {\n width: 95px;\n font-size: 10px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-value {\n font-size: 11px;\n}\n\n/* ---- Error State ---- */\n.mj-isa-card__body--error {\n padding: 10px 14px;\n}\n\n.mj-isa-card__error-text {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-style: italic;\n}\n"], encapsulation: 2, changeDetection: 0 });
|
|
339
|
+
} }, dependencies: [MjIsaRelatedCardComponent, i1.MjRecordLinkDirective], styles: ["/* ============================================\n ISA RELATED CARD\n Compact summary card for one sibling/child entity\n ============================================ */\n\n.mj-isa-card {\n background: var(--mj-bg-surface-card);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n/* ---- Header ---- */\n.mj-isa-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--mj-bg-surface-elevated);\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card__header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.mj-isa-card__icon {\n font-size: 14px;\n color: var(--mj-brand-primary);\n flex-shrink: 0;\n}\n\n.mj-isa-card__entity-name {\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary);\n white-space: nowrap;\n}\n\n.mj-isa-card__record-name {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-isa-card__open-link {\n font-size: 11px;\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: 600;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.mj-isa-card__open-link:hover {\n text-decoration: underline;\n}\n\n/* ---- Body / Fields ---- */\n.mj-isa-card__body {\n padding: 8px 14px 10px;\n}\n\n.mj-isa-card__field {\n display: flex;\n align-items: baseline;\n padding: 3px 0;\n gap: 8px;\n}\n\n.mj-isa-card__field-label {\n font-size: 11px;\n color: var(--mj-text-muted);\n width: 110px;\n flex-shrink: 0;\n}\n\n.mj-isa-card__field-value {\n font-size: 12px;\n color: var(--mj-text-primary);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mj-isa-card__field-value--bool-yes {\n color: var(--mj-status-success);\n}\n\n.mj-isa-card__field-value--bool-no {\n color: var(--mj-status-error);\n}\n\n/* ---- Expand/Collapse ---- */\n.mj-isa-card__expand-row {\n padding: 0 14px 8px;\n}\n\n.mj-isa-card__expand-btn {\n font-size: 11px;\n color: var(--mj-brand-primary);\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n padding: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-isa-card__expand-btn:hover {\n text-decoration: underline;\n}\n\n.mj-isa-card__expand-chevron {\n font-size: 9px;\n}\n\n.mj-isa-card__extra-fields {\n padding: 0 14px 10px;\n border-top: 1px dashed var(--mj-border-default);\n margin-top: 4px;\n padding-top: 8px;\n}\n\n/* ---- Loading State ---- */\n.mj-isa-card__body--loading {\n padding: 12px 14px;\n}\n\n.mj-isa-card__loading-bar {\n height: 10px;\n background: linear-gradient(90deg,\n var(--mj-bg-surface-sunken) 25%,\n var(--mj-border-default) 50%,\n var(--mj-bg-surface-sunken) 75%);\n background-size: 200% 100%;\n animation: mj-isa-shimmer 1.5s infinite;\n border-radius: 4px;\n margin-bottom: 8px;\n width: 80%;\n}\n\n.mj-isa-card__loading-bar--short {\n width: 50%;\n}\n\n@keyframes mj-isa-shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n}\n\n/* ---- Nested Sub-Cards (grandchild+ rendered inside parent card) ---- */\n.mj-isa-card__children {\n padding: 6px 10px 8px;\n border-top: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card--nested {\n box-shadow: none;\n border: 1px solid var(--mj-border-default);\n border-left: 2px solid color-mix(in srgb, var(--mj-brand-primary) 60%, var(--mj-border-strong));\n border-radius: var(--mj-radius-md);\n}\n\n.mj-isa-card--nested .mj-isa-card__header {\n padding: 6px 10px;\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-border-default);\n}\n\n.mj-isa-card--nested .mj-isa-card__entity-name {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__icon {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__body {\n padding: 6px 10px 8px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-label {\n width: 95px;\n font-size: 10px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-value {\n font-size: 11px;\n}\n\n/* ---- Error State ---- */\n.mj-isa-card__body--error {\n padding: 10px 14px;\n}\n\n.mj-isa-card__error-text {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-style: italic;\n}\n"], encapsulation: 2, changeDetection: 0 });
|
|
337
340
|
}
|
|
338
341
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjIsaRelatedCardComponent, [{
|
|
339
342
|
type: Component,
|
|
340
|
-
args: [{ standalone: false, selector: 'mj-isa-related-card', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- ISA Related Card: compact summary of one sibling/child entity record -->\n<div class=\"mj-isa-card\"\n [class.mj-isa-card--loading]=\"IsLoading\"\n [class.mj-isa-card--error]=\"LoadError\"\n [class.mj-isa-card--nested]=\"Depth > 0\">\n\n <!-- Card Header -->\n <div class=\"mj-isa-card__header\">\n <div class=\"mj-isa-card__header-left\">\n <i [class]=\"IconClass\" class=\"mj-isa-card__icon\"></i>\n <span class=\"mj-isa-card__entity-name\">{{ DisplayName }}</span>\n @if (RecordName) {\n <span class=\"mj-isa-card__record-name\">{{ RecordName }}</span>\n }\n </div>\n <a href=\"#\"
|
|
343
|
+
args: [{ standalone: false, selector: 'mj-isa-related-card', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- ISA Related Card: compact summary of one sibling/child entity record -->\n<div class=\"mj-isa-card\"\n [class.mj-isa-card--loading]=\"IsLoading\"\n [class.mj-isa-card--error]=\"LoadError\"\n [class.mj-isa-card--nested]=\"Depth > 0\">\n\n <!-- Card Header -->\n <div class=\"mj-isa-card__header\">\n <div class=\"mj-isa-card__header-left\">\n <i [class]=\"IconClass\" class=\"mj-isa-card__icon\"></i>\n <span class=\"mj-isa-card__entity-name\">{{ DisplayName }}</span>\n @if (RecordName) {\n <span class=\"mj-isa-card__record-name\">{{ RecordName }}</span>\n }\n </div>\n <a href=\"#\"\n class=\"mj-isa-card__open-link\"\n mjRecordLink\n [EntityName]=\"EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [DisplayName]=\"RecordName || DisplayName\"\n [HandleClick]=\"false\"\n (click)=\"OnOpenClick($event)\">Open →</a>\n </div>\n\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--loading\">\n <div class=\"mj-isa-card__loading-bar\"></div>\n <div class=\"mj-isa-card__loading-bar mj-isa-card__loading-bar--short\"></div>\n </div>\n }\n\n <!-- Error State -->\n @if (LoadError && !IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--error\">\n <span class=\"mj-isa-card__error-text\">Unable to load record</span>\n </div>\n }\n\n <!-- Field Values -->\n @if (!IsLoading && !LoadError && RelatedRecord) {\n <div class=\"mj-isa-card__body\">\n @for (field of DefaultFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n\n <!-- Expand/Collapse for extra fields -->\n @if (ExtraFields.length > 0) {\n <div class=\"mj-isa-card__expand-row\">\n <button class=\"mj-isa-card__expand-btn\" (click)=\"ToggleExpand()\">\n @if (!Expanded) {\n Show {{ ExtraFields.length }} more field{{ ExtraFields.length > 1 ? 's' : '' }}\n <i class=\"fa-solid fa-chevron-down mj-isa-card__expand-chevron\"></i>\n } @else {\n Show fewer fields\n <i class=\"fa-solid fa-chevron-up mj-isa-card__expand-chevron\"></i>\n }\n </button>\n </div>\n\n @if (Expanded) {\n <div class=\"mj-isa-card__extra-fields\">\n @for (field of ExtraFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n }\n }\n }\n\n <!-- Nested sub-cards for IS-A children (e.g., Gold Members inside Members) -->\n @if (Children.length > 0 && !IsLoading) {\n <div class=\"mj-isa-card__children\">\n @for (child of Children; track child.EntityName) {\n <mj-isa-related-card\n [EntityName]=\"child.EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [CurrentRecordName]=\"CurrentRecordName\"\n [Relationship]=\"'child'\"\n [Depth]=\"Depth + 1\"\n [Children]=\"child.Children\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-isa-related-card>\n }\n </div>\n }\n</div>\n", styles: ["/* ============================================\n ISA RELATED CARD\n Compact summary card for one sibling/child entity\n ============================================ */\n\n.mj-isa-card {\n background: var(--mj-bg-surface-card);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n/* ---- Header ---- */\n.mj-isa-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--mj-bg-surface-elevated);\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card__header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.mj-isa-card__icon {\n font-size: 14px;\n color: var(--mj-brand-primary);\n flex-shrink: 0;\n}\n\n.mj-isa-card__entity-name {\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary);\n white-space: nowrap;\n}\n\n.mj-isa-card__record-name {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-isa-card__open-link {\n font-size: 11px;\n color: var(--mj-brand-primary);\n text-decoration: none;\n font-weight: 600;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.mj-isa-card__open-link:hover {\n text-decoration: underline;\n}\n\n/* ---- Body / Fields ---- */\n.mj-isa-card__body {\n padding: 8px 14px 10px;\n}\n\n.mj-isa-card__field {\n display: flex;\n align-items: baseline;\n padding: 3px 0;\n gap: 8px;\n}\n\n.mj-isa-card__field-label {\n font-size: 11px;\n color: var(--mj-text-muted);\n width: 110px;\n flex-shrink: 0;\n}\n\n.mj-isa-card__field-value {\n font-size: 12px;\n color: var(--mj-text-primary);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mj-isa-card__field-value--bool-yes {\n color: var(--mj-status-success);\n}\n\n.mj-isa-card__field-value--bool-no {\n color: var(--mj-status-error);\n}\n\n/* ---- Expand/Collapse ---- */\n.mj-isa-card__expand-row {\n padding: 0 14px 8px;\n}\n\n.mj-isa-card__expand-btn {\n font-size: 11px;\n color: var(--mj-brand-primary);\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n padding: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-isa-card__expand-btn:hover {\n text-decoration: underline;\n}\n\n.mj-isa-card__expand-chevron {\n font-size: 9px;\n}\n\n.mj-isa-card__extra-fields {\n padding: 0 14px 10px;\n border-top: 1px dashed var(--mj-border-default);\n margin-top: 4px;\n padding-top: 8px;\n}\n\n/* ---- Loading State ---- */\n.mj-isa-card__body--loading {\n padding: 12px 14px;\n}\n\n.mj-isa-card__loading-bar {\n height: 10px;\n background: linear-gradient(90deg,\n var(--mj-bg-surface-sunken) 25%,\n var(--mj-border-default) 50%,\n var(--mj-bg-surface-sunken) 75%);\n background-size: 200% 100%;\n animation: mj-isa-shimmer 1.5s infinite;\n border-radius: 4px;\n margin-bottom: 8px;\n width: 80%;\n}\n\n.mj-isa-card__loading-bar--short {\n width: 50%;\n}\n\n@keyframes mj-isa-shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n}\n\n/* ---- Nested Sub-Cards (grandchild+ rendered inside parent card) ---- */\n.mj-isa-card__children {\n padding: 6px 10px 8px;\n border-top: 1px solid var(--mj-border-default);\n}\n\n.mj-isa-card--nested {\n box-shadow: none;\n border: 1px solid var(--mj-border-default);\n border-left: 2px solid color-mix(in srgb, var(--mj-brand-primary) 60%, var(--mj-border-strong));\n border-radius: var(--mj-radius-md);\n}\n\n.mj-isa-card--nested .mj-isa-card__header {\n padding: 6px 10px;\n background: var(--mj-bg-surface-sunken);\n border-bottom-color: var(--mj-border-default);\n}\n\n.mj-isa-card--nested .mj-isa-card__entity-name {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__icon {\n font-size: 12px;\n}\n\n.mj-isa-card--nested .mj-isa-card__body {\n padding: 6px 10px 8px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-label {\n width: 95px;\n font-size: 10px;\n}\n\n.mj-isa-card--nested .mj-isa-card__field-value {\n font-size: 11px;\n}\n\n/* ---- Error State ---- */\n.mj-isa-card__body--error {\n padding: 10px 14px;\n}\n\n.mj-isa-card__error-text {\n font-size: 11px;\n color: var(--mj-text-muted);\n font-style: italic;\n}\n"] }]
|
|
341
344
|
}], null, { EntityName: [{
|
|
342
345
|
type: Input
|
|
343
346
|
}], PrimaryKey: [{
|