@memberjunction/ng-base-forms 6.2.0-edge.4 → 6.2.0-edge.6
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/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-chrome-coordinator.service.d.ts +9 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome-coordinator.service.js +11 -0
- package/dist/lib/chrome/form-chrome-coordinator.service.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 +1500 -316
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +167 -14
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +1374 -470
- 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/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 +249 -0
- package/dist/lib/links/record-links.component.d.ts.map +1 -0
- package/dist/lib/links/record-links.component.js +1523 -0
- package/dist/lib/links/record-links.component.js.map +1 -0
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +5 -0
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- 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 +187 -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 +1060 -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":"form-panel-slot.component.js","sourceRoot":"","sources":["../../../src/lib/panel-slot/form-panel-slot.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,UAAU,EACV,WAAW,EACX,KAAK,EAIL,QAAQ,EAER,SAAS,EACT,gBAAgB,EAChB,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAsC,MAAM,MAAM,CAAC;AAClG,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAKvE,OAAO,EACH,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,GAEjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oCAAoC,EAAE,MAAM,2CAA2C,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;;;;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAYH,MAAM,OAAO,sBAAsB;IA6CU;IA5CzC,oEAAoE;IAC3D,MAAM,CAAU;IACzB,gDAAgD;IACvC,IAAI,CAAiB;IAC9B,yEAAyE;IAChE,MAAM,CAAc;IAC7B,mFAAmF;IAC1E,aAAa,CAAqB;IAC3C,2EAA2E;IAClE,WAAW,CAAe;IAEnC,2FAA2F;IAC3F,IACI,QAAQ;QACR,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3B,CAAC;IAGO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G,EAAE;gBAC1B,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC5B,OAAO,CAAC,SAAS,CAAC,CAAC;YACvB,CAAC,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;YAChD,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACzE,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,CAAC,QAAQ,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,UAAU;QACd,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,aAAa,EAAE,mBAAmB,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxF,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;gHA7TQ,sBAAsB;6DAAtB,sBAAsB;mCAkBF,gBAAgB;;;;;;;YA1BlC,iCAAqC;;;iFAQvC,sBAAsB;cAXlC,SAAS;6BACM,KAAK,YACP,oBAAoB,YACpB,uCAAuC;;sBAqDpC,QAAQ;;kBA3CpB,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAGL,WAAW;mBAAC,qBAAqB;;kBAKjC,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kFAlBpD,sBAAsB","sourcesContent":["import {\n Component,\n ComponentRef,\n ElementRef,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { Subject, filter, skip, take, takeUntil, type Observable, type Subscription } from 'rxjs';\nimport { BaseEntity, LogError } from '@memberjunction/core';\nimport { InteractiveFormsEngine } from '@memberjunction/core-entities';\nimport { BaseFormComponent } from '../base-form-component';\nimport { FormContext } from '../types/form-types';\nimport { BaseFormPanel, FormPanelSlot } from './base-form-panel';\nimport { FormSlotCoordinator } from './form-slot-coordinator.service';\nimport {\n ContributionDrawsInSection,\n FormContributionEntityMatches,\n ResolveFormContributionWinners,\n type FormContributionRegistration,\n} from './form-contribution';\nimport { CollectFormContributionRegistrations } from './collect-form-contribution-registrations';\nimport { MountFormContribution } from './mount-form-contribution';\nimport { PanelHideKey } from './panel-hides';\nimport { FORM_PLACEMENT_PREVIEW } from './placement-preview';\nimport { FormRecordRefreshCoordinator } from '../form-record-refresh.coordinator';\n\n/**\n * `<mj-form-panel-slot>` — dynamic slot host that discovers and mounts every\n * registered `BaseFormPanel` whose metadata matches the slot's `Entity` +\n * `Slot` inputs. Generated entity-form HTML emits one of these at each\n * well-known slot position so consumers can extend the form WITHOUT replacing\n * it via the custom-form override pattern.\n *\n * **Discovery**: uses `ClassFactory.GetAllRegistrationsByMetadata(BaseFormPanel, ...)`\n * to find every panel registered with metadata `{ entity, slot }` matching this\n * slot. Registrations without a metadata bag (or without these required keys)\n * are silently ignored so legacy registrations don't accidentally bind.\n *\n * **Ordering**: registrations are sorted by `metadata.sortKey` descending —\n * higher number renders first within the slot. Use ranges (100/50/10) so future\n * panels can wedge in without renumbering. Ties fall back to the\n * `ClassRegistration.Priority` field (also descending), and finally to\n * registration order.\n *\n * **Fallback chain** (see `FormSlotCoordinator`): each slot host registers\n * with the per-form coordinator and additionally renders panels whose\n * REGISTERED slot is missing in the current form, when this host happens to\n * be the next-existing slot down the chain. The container template guarantees\n * an `after-everything` slot host, so fallback always terminates somewhere.\n * Downstream consumers running an older form template (no CodeGen rerun\n * yet) get every panel rendered at the bottom; consumers on the new template\n * get them in the preferred position.\n *\n * **Re-mount**: any input change OR a coordinator change (another slot\n * registers/deregisters, or the form's panel set changed) triggers a re-render\n * so fallback assignments and hidden panels stay correct.\n */\n@Component({\n standalone: false,\n selector: 'mj-form-panel-slot',\n template: `<ng-container #anchor></ng-container>`,\n // `display: contents` makes the host element disappear from the layout\n // tree so the mounted panels (children) participate directly in the\n // parent's flex/grid layout. Without this, the parent's gap/spacing\n // rules treat all mounted panels as a SINGLE child (the slot host),\n // collapsing the spacing between them.\n styles: [`:host { display: contents; }`],\n})\nexport class FormPanelSlotComponent implements OnInit, OnChanges, OnDestroy {\n /** The entity name (e.g., `\"MJ: Content Sources\"`) being edited. */\n @Input() Entity!: string;\n /** Which slot position this host represents. */\n @Input() Slot!: FormPanelSlot;\n /** The record being edited — threaded through to every mounted panel. */\n @Input() Record!: BaseEntity;\n /** The host form component — used by panels for EditMode + dirty notifications. */\n @Input() FormComponent!: BaseFormComponent;\n /** Optional form context — same shape collapsible-panel chrome expects. */\n @Input() FormContext?: FormContext;\n\n /** The position, on the element, so a form's slot set can be read without its injector. */\n @HostBinding('attr.data-form-slot')\n get HostSlot(): string {\n return this.Slot ?? '';\n }\n\n @ViewChild('anchor', { read: ViewContainerRef, static: true })\n private anchor!: ViewContainerRef;\n\n private mounted: ComponentRef<BaseFormPanel>[] = [];\n private readonly destroy$ = new Subject<void>();\n private registeredSlot: FormPanelSlot | null = null;\n private readonly recordRefresh = inject(FormRecordRefreshCoordinator, { optional: true });\n /** The placement dialog's unsaved panel, when this slot is on the dialog's preview form. */\n private readonly preview = inject(FORM_PLACEMENT_PREVIEW, { optional: true });\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Tracks synchronous re-entry depth into remount() so a future refactor\n * that reintroduces a remount loop surfaces loudly instead of freezing. */\n private remountDepth = 0;\n private readonly warnedLooseEntities = new Set<string>();\n private awaitingContributions = false;\n\n /**\n * Process-wide, not per-instance. The readiness wait is a one-time courtesy so the first\n * paint shows both sources together; once it has resolved — ready OR timed out — no slot\n * host anywhere should pay it again. Per-instance state made a failing engine cost every\n * slot on every form 1.5s apiece, which is far worse than the pop-in it was avoiding.\n */\n private static contributionGateResolved = false;\n\n /** Bounded: a slow or unreachable engine must not leave the form blank. */\n private static readonly READINESS_TIMEOUT_MS = 1500;\n\n constructor(@Optional() private readonly coordinator?: FormSlotCoordinator) {}\n\n ngOnInit(): void {\n if (this.Slot && this.coordinator) {\n this.coordinator.registerSlot(this.Slot);\n this.registeredSlot = this.Slot;\n // Re-mount whenever the coordinator's known-slot set changes —\n // a panel that was previously orphaned to us might now have a\n // better slot available (or vice versa).\n this.coordinator.changes\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n }\n // A hide or show changes which panels win without any slot coming or going.\n this.coordinator?.PanelsChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n this.recordRefresh?.Refreshed$.pipe(takeUntil(this.destroy$)).subscribe((record) => {\n this.notifyMountedPanels(record);\n });\n // Rows can arrive after the first paint (cold engine, a contribution saved in another\n // tab). Without this the slot would keep showing whatever it mounted first. The engine's\n // subject replays the current rows on subscribe, which ngOnChanges has already mounted.\n try {\n InteractiveFormsEngine.Instance.Contributions$\n .pipe(skip(1), takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n } catch {\n // No engine here — compiled registrations are the only source.\n }\n this.preview?.Changed$.pipe(takeUntil(this.destroy$)).subscribe(() => this.remount());\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.Entity || !this.Slot || !this.Record || !this.FormComponent) {\n // Inputs still being wired — wait for the next pass.\n return;\n }\n\n // Only remount when something that affects WHICH panels to mount has\n // changed. FormContext only flows through to mounted panels — pushing\n // it to the existing panels avoids an unmount/remount cycle.\n //\n // Critical for performance: the host form often reconstructs\n // formContext on every CD pass. Treating that as a structural change\n // would loop (remount → detectChanges → another CD → new FormContext\n // → remount again).\n const meaningfulKeys = ['Entity', 'Slot', 'Record', 'FormComponent'];\n const meaningfulChange = meaningfulKeys.some(k => changes[k]?.currentValue !== changes[k]?.previousValue);\n if (!meaningfulChange && changes['FormContext'] && this.mounted.length > 0) {\n for (const ref of this.mounted) {\n ref.instance.FormContext = this.FormContext;\n }\n return;\n }\n if (!meaningfulChange && this.mounted.length > 0) {\n return;\n }\n this.remount();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.coordinator && this.registeredSlot) {\n this.coordinator.deregisterSlot(this.registeredSlot);\n this.registeredSlot = null;\n }\n this.unmountAll();\n }\n\n private notifyMountedPanels(record: BaseEntity): void {\n for (const ref of this.mounted) {\n ref.instance.OnRecordRefreshed(record);\n }\n }\n\n private remount(): void {\n // A form that renders its own body bars every panel. Checked before the readiness\n // gate so a barred slot never waits on the engine.\n if (this.FormComponent?.OwnsEntireFormBody) {\n this.unmountAll();\n return;\n }\n // Compiled panels and rows mount together or not at all. Mounting compiled panels\n // first and adding rows a tick later is visible — and for a `bare` hero that replaces\n // a baked section, the user watches that section render and then vanish.\n if (!this.contributionsReady()) {\n void this.awaitContributionsThenRemount();\n return;\n }\n this.remountDepth++;\n if (this.remountDepth > 5) {\n console.error(`[mj-form-panel-slot] LOOP DETECTED — remount depth ${this.remountDepth} on slot=${this.Slot}. Bailing.`);\n this.remountDepth--;\n return;\n }\n this.unmountAll();\n\n const all = this.winnersForThisSlot();\n if (all.length === 0) {\n this.remountDepth--;\n return;\n }\n\n // Sort: higher sortKey first, then higher Priority, then registration order.\n all.sort((a, b) => {\n const aSort = a.Metadata?.sortKey ?? 0;\n const bSort = b.Metadata?.sortKey ?? 0;\n if (aSort !== bSort) return bSort - aSort;\n return b.Priority - a.Priority;\n });\n\n for (const reg of all) {\n try {\n const ref = MountFormContribution(this.anchor, reg);\n if (!ref) continue;\n ref.instance.Record = this.Record;\n ref.instance.FormComponent = this.FormComponent;\n ref.instance.RegistrationMetadata = reg.Metadata;\n ref.instance.SlotElement = this.element.nativeElement;\n if (this.FormContext) ref.instance.FormContext = this.FormContext;\n // Left-nav leftover height targets mj-collapsible-panel as a\n // flex child of .mj-forms-all-panels. The slot is already\n // display:contents; the mounted host must be too.\n const host = ref.location.nativeElement as HTMLElement | null;\n if (host) {\n host.style.display = 'contents';\n // Lets the drawer tell a panel that drew something from one that self-hid,\n // by reading the DOM the way the form probe does.\n const hideKey = PanelHideKey(reg);\n if (hideKey) host.setAttribute('data-panel-key', hideKey);\n }\n this.FormComponent?.RegisterFormPanel?.(ref.instance);\n // No detectChanges() — Angular's normal CD pass picks the new\n // component up. Calling detectChanges() synchronously inside\n // an ongoing CD cycle (which is when ngOnChanges → remount\n // fires) can re-enter and cause an infinite loop if anything\n // upstream is reconstructing inputs on each CD pass.\n this.mounted.push(ref);\n } catch (e) {\n LogError(`[mj-form-panel-slot] Failed to mount panel for ${this.Entity}:${this.Slot}: ${e instanceof Error ? e.message : String(e)}`);\n }\n }\n this.remountDepth--;\n }\n\n /**\n * The form's winning registrations that this slot mounts.\n *\n * The collapse runs once over every registration on the form (see\n * `ResolveFormContributionWinners`), then this slot keeps the winners it hosts: those\n * registered for this slot, and those whose slot is missing from the form when the\n * coordinator resolves them to this one. A winner drawn inside a section is mounted by that\n * section, not by a slot. A wildcard (`entity: '*'`) panel mounts on every form and is\n * expected to hide itself where it does not apply.\n */\n private winnersForThisSlot(): FormContributionRegistration[] {\n const entity = this.Record?.EntityInfo ?? null;\n const provider = this.FormComponent?.ProviderToUse ?? null;\n const all = CollectFormContributionRegistrations(entity, provider, { Preview: this.preview });\n this.warnOnLooseRegistrations(all);\n return ResolveFormContributionWinners(this.Entity, all).Winners.filter((reg) => {\n if (ContributionDrawsInSection(reg.Metadata)) return false;\n const slot = reg.Metadata.slot;\n if (slot === this.Slot) return true;\n // Without a coordinator (no parent container) a panel binds to its literal slot only.\n return !!slot && !!this.coordinator && this.coordinator.resolveSlot(slot) === this.Slot;\n });\n }\n\n /**\n * Diagnostic for the old prefix-insensitive match. A loosely named registration no\n * longer mounts here — and never hid its baked grid on the container side, which has\n * always matched strictly.\n *\n * This runs on every resolve, not only when nothing matched strictly. Keying it on\n * \"nothing matched\" would miss the likeliest case: a form where some panels are named\n * correctly and one is not, where the broken one would vanish with no warning at all.\n */\n private warnOnLooseRegistrations(all: readonly FormContributionRegistration[]): void {\n if (this.warnedLooseEntities.has(this.Entity)) return;\n const strip = (v: string) => v.replace(/^mj[:_\\s]+/i, '').replace(/[\\s_]+/g, '').toLowerCase();\n const loose = all.filter((reg) => {\n const name = reg.Metadata?.entity;\n return !!name && !FormContributionEntityMatches(name, this.Entity) && strip(name) === strip(this.Entity);\n });\n if (loose.length === 0) return;\n this.warnedLooseEntities.add(this.Entity);\n const names = [...new Set(loose.map((reg) => reg.Metadata.entity))].join(', ');\n console.warn(\n `[mj-form-panel-slot] ${loose.length} BaseFormPanel registration(s) name \"${names}\" but the form entity is ` +\n `\"${this.Entity}\". Entity names must match exactly; these panels will not mount.`,\n );\n }\n\n /**\n * Whether the slot can mount now, or should wait for contribution rows.\n *\n * It waits only while a load is actually in flight. An engine nobody has configured\n * is not \"about to be ready\" — blocking on it would delay every host that does not\n * use metadata contributions at all. Those hosts mount immediately and self-heal:\n * the collector kicks `Config`, and the `Contributions$` subscription below remounts\n * when rows arrive.\n */\n private contributionsReady(): boolean {\n if (FormPanelSlotComponent.contributionGateResolved) return true;\n try {\n const engine = InteractiveFormsEngine.Instance;\n if (engine.ContributionsReady) {\n FormPanelSlotComponent.contributionGateResolved = true;\n return true;\n }\n if (!engine.LoadingSubject.value) {\n // Nothing in flight — mount now rather than waiting on a load that may never start.\n return true;\n }\n return false;\n } catch {\n // No engine in this context (a panel composed outside a form host).\n FormPanelSlotComponent.contributionGateResolved = true;\n return true;\n }\n }\n\n /**\n * Wait for the engine's load to finish, then remount once. Falls through on a timeout so a\n * slow or unreachable engine degrades to compiled panels only rather than leaving the slot\n * empty.\n */\n private async awaitContributionsThenRemount(): Promise<void> {\n if (this.awaitingContributions) return;\n this.awaitingContributions = true;\n try {\n const engine = InteractiveFormsEngine.Instance;\n const outcome = await FormPanelSlotComponent.loadFinishedOrTimeout(engine.LoadingSubject);\n if (!engine.ContributionsReady && !FormPanelSlotComponent.contributionGateResolved) {\n // Once: the first slot to finish waiting closes the gate process-wide below.\n LogError(outcome === 'timeout'\n ? `[mj-form-panel-slot] contribution cache not ready after ${FormPanelSlotComponent.READINESS_TIMEOUT_MS}ms; mounting compiled panels only from here on.`\n : '[mj-form-panel-slot] contribution cache failed to load; mounting compiled panels only from here on.');\n }\n } catch (e) {\n LogError(`[mj-form-panel-slot] waiting on contributions failed: ${e instanceof Error ? e.message : String(e)}`);\n } finally {\n this.awaitingContributions = false;\n // Ready or timed out, the gate is spent process-wide: from here every slot mounts\n // whatever the collector returns rather than waiting again.\n FormPanelSlotComponent.contributionGateResolved = true;\n }\n this.remount();\n }\n\n /** Resolves when `loading` emits false, or after the readiness timeout, whichever is first. */\n private static loadFinishedOrTimeout(loading: Observable<boolean>): Promise<'loaded' | 'timeout'> {\n return new Promise((resolve) => {\n let subscription: Subscription | null = null;\n const timer = setTimeout(() => {\n subscription?.unsubscribe();\n resolve('timeout');\n }, FormPanelSlotComponent.READINESS_TIMEOUT_MS);\n subscription = loading.pipe(filter((busy) => !busy), take(1)).subscribe(() => {\n clearTimeout(timer);\n resolve('loaded');\n });\n });\n }\n\n private unmountAll(): void {\n for (const ref of this.mounted) this.FormComponent?.UnregisterFormPanel?.(ref.instance);\n this.anchor.clear();\n this.mounted = [];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"form-panel-slot.component.js","sourceRoot":"","sources":["../../../src/lib/panel-slot/form-panel-slot.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,UAAU,EACV,WAAW,EACX,KAAK,EAIL,QAAQ,EAER,SAAS,EACT,gBAAgB,EAChB,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAsC,MAAM,MAAM,CAAC;AAClG,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAs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AAC;YAChD,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACzE,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,CAAC,QAAQ,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,UAAU;QACd,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,aAAa,EAAE,mBAAmB,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxF,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;gHAnUQ,sBAAsB;6DAAtB,sBAAsB;mCAkBF,gBAAgB;;;;;;;YA1BlC,iCAAqC;;;iFAQvC,sBAAsB;cAXlC,SAAS;6BACM,KAAK,YACP,oBAAoB,YACpB,uCAAuC;;sBAqDpC,QAAQ;;kBA3CpB,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAGL,WAAW;mBAAC,qBAAqB;;kBAKjC,SAAS;mBAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kFAlBpD,sBAAsB","sourcesContent":["import {\n Component,\n ComponentRef,\n ElementRef,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewChild,\n ViewContainerRef,\n inject,\n} from '@angular/core';\nimport { Subject, filter, skip, take, takeUntil, type Observable, type Subscription } from 'rxjs';\nimport { BaseEntity, LogError } from '@memberjunction/core';\nimport { InteractiveFormsEngine } from '@memberjunction/core-entities';\nimport { BaseFormComponent } from '../base-form-component';\nimport { FormContext } from '../types/form-types';\nimport { BaseFormPanel, FormPanelSlot } from './base-form-panel';\nimport { FormSlotCoordinator } from './form-slot-coordinator.service';\nimport {\n ContributionDrawsInSection,\n FormContributionEntityMatches,\n ResolveFormContributionWinners,\n type FormContributionRegistration,\n} from './form-contribution';\nimport { CollectFormContributionRegistrations } from './collect-form-contribution-registrations';\nimport { MountFormContribution } from './mount-form-contribution';\nimport { PanelHideKey } from './panel-hides';\nimport { FORM_PLACEMENT_PREVIEW } from './placement-preview';\nimport { FormRecordRefreshCoordinator } from '../form-record-refresh.coordinator';\n\n/**\n * `<mj-form-panel-slot>` — dynamic slot host that discovers and mounts every\n * registered `BaseFormPanel` whose metadata matches the slot's `Entity` +\n * `Slot` inputs. Generated entity-form HTML emits one of these at each\n * well-known slot position so consumers can extend the form WITHOUT replacing\n * it via the custom-form override pattern.\n *\n * **Discovery**: uses `ClassFactory.GetAllRegistrationsByMetadata(BaseFormPanel, ...)`\n * to find every panel registered with metadata `{ entity, slot }` matching this\n * slot. Registrations without a metadata bag (or without these required keys)\n * are silently ignored so legacy registrations don't accidentally bind.\n *\n * **Ordering**: registrations are sorted by `metadata.sortKey` descending —\n * higher number renders first within the slot. Use ranges (100/50/10) so future\n * panels can wedge in without renumbering. Ties fall back to the\n * `ClassRegistration.Priority` field (also descending), and finally to\n * registration order.\n *\n * **Fallback chain** (see `FormSlotCoordinator`): each slot host registers\n * with the per-form coordinator and additionally renders panels whose\n * REGISTERED slot is missing in the current form, when this host happens to\n * be the next-existing slot down the chain. The container template guarantees\n * an `after-everything` slot host, so fallback always terminates somewhere.\n * Downstream consumers running an older form template (no CodeGen rerun\n * yet) get every panel rendered at the bottom; consumers on the new template\n * get them in the preferred position.\n *\n * **Re-mount**: any input change OR a coordinator change (another slot\n * registers/deregisters, or the form's panel set changed) triggers a re-render\n * so fallback assignments and hidden panels stay correct.\n */\n@Component({\n standalone: false,\n selector: 'mj-form-panel-slot',\n template: `<ng-container #anchor></ng-container>`,\n // `display: contents` makes the host element disappear from the layout\n // tree so the mounted panels (children) participate directly in the\n // parent's flex/grid layout. Without this, the parent's gap/spacing\n // rules treat all mounted panels as a SINGLE child (the slot host),\n // collapsing the spacing between them.\n styles: [`:host { display: contents; }`],\n})\nexport class FormPanelSlotComponent implements OnInit, OnChanges, OnDestroy {\n /** The entity name (e.g., `\"MJ: Content Sources\"`) being edited. */\n @Input() Entity!: string;\n /** Which slot position this host represents. */\n @Input() Slot!: FormPanelSlot;\n /** The record being edited — threaded through to every mounted panel. */\n @Input() Record!: BaseEntity;\n /** The host form component — used by panels for EditMode + dirty notifications. */\n @Input() FormComponent!: BaseFormComponent;\n /** Optional form context — same shape collapsible-panel chrome expects. */\n @Input() FormContext?: FormContext;\n\n /** The position, on the element, so a form's slot set can be read without its injector. */\n @HostBinding('attr.data-form-slot')\n get HostSlot(): string {\n return this.Slot ?? '';\n }\n\n @ViewChild('anchor', { read: ViewContainerRef, static: true })\n private anchor!: ViewContainerRef;\n\n private mounted: ComponentRef<BaseFormPanel>[] = [];\n private readonly destroy$ = new Subject<void>();\n private registeredSlot: FormPanelSlot | null = null;\n private readonly recordRefresh = inject(FormRecordRefreshCoordinator, { optional: true });\n /** The placement dialog's unsaved panel, when this slot is on the dialog's preview form. */\n private readonly preview = inject(FORM_PLACEMENT_PREVIEW, { optional: true });\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Tracks synchronous re-entry depth into remount() so a future refactor\n * that reintroduces a remount loop surfaces loudly instead of freezing. */\n private remountDepth = 0;\n private readonly warnedLooseEntities = new Set<string>();\n private awaitingContributions = false;\n\n /**\n * Process-wide, not per-instance. The readiness wait is a one-time courtesy so the first\n * paint shows both sources together; once it has resolved — ready OR timed out — no slot\n * host anywhere should pay it again. Per-instance state made a failing engine cost every\n * slot on every form 1.5s apiece, which is far worse than the pop-in it was avoiding.\n */\n private static contributionGateResolved = false;\n\n /** Bounded: a slow or unreachable engine must not leave the form blank. */\n private static readonly READINESS_TIMEOUT_MS = 1500;\n\n constructor(@Optional() private readonly coordinator?: FormSlotCoordinator) {}\n\n ngOnInit(): void {\n if (this.Slot && this.coordinator) {\n this.coordinator.registerSlot(this.Slot);\n this.registeredSlot = this.Slot;\n // Re-mount whenever the coordinator's known-slot set changes —\n // a panel that was previously orphaned to us might now have a\n // better slot available (or vice versa).\n this.coordinator.changes\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n }\n // A hide or show changes which panels win without any slot coming or going.\n this.coordinator?.PanelsChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n this.recordRefresh?.Refreshed$.pipe(takeUntil(this.destroy$)).subscribe((record) => {\n this.notifyMountedPanels(record);\n });\n this.recordRefresh?.VersionPreviewChanged$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n for (const ref of this.mounted) {\n ref.changeDetectorRef.detectChanges();\n }\n });\n // Rows can arrive after the first paint (cold engine, a contribution saved in another\n // tab). Without this the slot would keep showing whatever it mounted first. The engine's\n // subject replays the current rows on subscribe, which ngOnChanges has already mounted.\n try {\n InteractiveFormsEngine.Instance.Contributions$\n .pipe(skip(1), takeUntil(this.destroy$))\n .subscribe(() => this.remount());\n } catch {\n // No engine here — compiled registrations are the only source.\n }\n this.preview?.Changed$.pipe(takeUntil(this.destroy$)).subscribe(() => this.remount());\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.Entity || !this.Slot || !this.Record || !this.FormComponent) {\n // Inputs still being wired — wait for the next pass.\n return;\n }\n\n // Only remount when something that affects WHICH panels to mount has\n // changed. FormContext only flows through to mounted panels — pushing\n // it to the existing panels avoids an unmount/remount cycle.\n //\n // Critical for performance: the host form often reconstructs\n // formContext on every CD pass. Treating that as a structural change\n // would loop (remount → detectChanges → another CD → new FormContext\n // → remount again).\n const meaningfulKeys = ['Entity', 'Slot', 'Record', 'FormComponent'];\n const meaningfulChange = meaningfulKeys.some(k => changes[k]?.currentValue !== changes[k]?.previousValue);\n if (!meaningfulChange && changes['FormContext'] && this.mounted.length > 0) {\n for (const ref of this.mounted) {\n ref.instance.FormContext = this.FormContext;\n }\n return;\n }\n if (!meaningfulChange && this.mounted.length > 0) {\n return;\n }\n this.remount();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.coordinator && this.registeredSlot) {\n this.coordinator.deregisterSlot(this.registeredSlot);\n this.registeredSlot = null;\n }\n this.unmountAll();\n }\n\n private notifyMountedPanels(record: BaseEntity): void {\n for (const ref of this.mounted) {\n ref.instance.OnRecordRefreshed(record);\n ref.changeDetectorRef.detectChanges();\n }\n }\n\n private remount(): void {\n // A form that renders its own body bars every panel. Checked before the readiness\n // gate so a barred slot never waits on the engine.\n if (this.FormComponent?.OwnsEntireFormBody) {\n this.unmountAll();\n return;\n }\n // Compiled panels and rows mount together or not at all. Mounting compiled panels\n // first and adding rows a tick later is visible — and for a `bare` hero that replaces\n // a baked section, the user watches that section render and then vanish.\n if (!this.contributionsReady()) {\n void this.awaitContributionsThenRemount();\n return;\n }\n this.remountDepth++;\n if (this.remountDepth > 5) {\n console.error(`[mj-form-panel-slot] LOOP DETECTED — remount depth ${this.remountDepth} on slot=${this.Slot}. Bailing.`);\n this.remountDepth--;\n return;\n }\n this.unmountAll();\n\n const all = this.winnersForThisSlot();\n if (all.length === 0) {\n this.remountDepth--;\n return;\n }\n\n // Sort: higher sortKey first, then higher Priority, then registration order.\n all.sort((a, b) => {\n const aSort = a.Metadata?.sortKey ?? 0;\n const bSort = b.Metadata?.sortKey ?? 0;\n if (aSort !== bSort) return bSort - aSort;\n return b.Priority - a.Priority;\n });\n\n for (const reg of all) {\n try {\n const ref = MountFormContribution(this.anchor, reg);\n if (!ref) continue;\n ref.instance.Record = this.Record;\n ref.instance.FormComponent = this.FormComponent;\n ref.instance.RegistrationMetadata = reg.Metadata;\n ref.instance.SlotElement = this.element.nativeElement;\n if (this.FormContext) ref.instance.FormContext = this.FormContext;\n // Left-nav leftover height targets mj-collapsible-panel as a\n // flex child of .mj-forms-all-panels. The slot is already\n // display:contents; the mounted host must be too.\n const host = ref.location.nativeElement as HTMLElement | null;\n if (host) {\n host.style.display = 'contents';\n // Lets the drawer tell a panel that drew something from one that self-hid,\n // by reading the DOM the way the form probe does.\n const hideKey = PanelHideKey(reg);\n if (hideKey) host.setAttribute('data-panel-key', hideKey);\n }\n this.FormComponent?.RegisterFormPanel?.(ref.instance);\n // No detectChanges() — Angular's normal CD pass picks the new\n // component up. Calling detectChanges() synchronously inside\n // an ongoing CD cycle (which is when ngOnChanges → remount\n // fires) can re-enter and cause an infinite loop if anything\n // upstream is reconstructing inputs on each CD pass.\n this.mounted.push(ref);\n } catch (e) {\n LogError(`[mj-form-panel-slot] Failed to mount panel for ${this.Entity}:${this.Slot}: ${e instanceof Error ? e.message : String(e)}`);\n }\n }\n this.remountDepth--;\n }\n\n /**\n * The form's winning registrations that this slot mounts.\n *\n * The collapse runs once over every registration on the form (see\n * `ResolveFormContributionWinners`), then this slot keeps the winners it hosts: those\n * registered for this slot, and those whose slot is missing from the form when the\n * coordinator resolves them to this one. A winner drawn inside a section is mounted by that\n * section, not by a slot. A wildcard (`entity: '*'`) panel mounts on every form and is\n * expected to hide itself where it does not apply.\n */\n private winnersForThisSlot(): FormContributionRegistration[] {\n const entity = this.Record?.EntityInfo ?? null;\n const provider = this.FormComponent?.ProviderToUse ?? null;\n const all = CollectFormContributionRegistrations(entity, provider, { Preview: this.preview });\n this.warnOnLooseRegistrations(all);\n return ResolveFormContributionWinners(this.Entity, all).Winners.filter((reg) => {\n if (ContributionDrawsInSection(reg.Metadata)) return false;\n const slot = reg.Metadata.slot;\n if (slot === this.Slot) return true;\n // Without a coordinator (no parent container) a panel binds to its literal slot only.\n return !!slot && !!this.coordinator && this.coordinator.resolveSlot(slot) === this.Slot;\n });\n }\n\n /**\n * Diagnostic for the old prefix-insensitive match. A loosely named registration no\n * longer mounts here — and never hid its baked grid on the container side, which has\n * always matched strictly.\n *\n * This runs on every resolve, not only when nothing matched strictly. Keying it on\n * \"nothing matched\" would miss the likeliest case: a form where some panels are named\n * correctly and one is not, where the broken one would vanish with no warning at all.\n */\n private warnOnLooseRegistrations(all: readonly FormContributionRegistration[]): void {\n if (this.warnedLooseEntities.has(this.Entity)) return;\n const strip = (v: string) => v.replace(/^mj[:_\\s]+/i, '').replace(/[\\s_]+/g, '').toLowerCase();\n const loose = all.filter((reg) => {\n const name = reg.Metadata?.entity;\n return !!name && !FormContributionEntityMatches(name, this.Entity) && strip(name) === strip(this.Entity);\n });\n if (loose.length === 0) return;\n this.warnedLooseEntities.add(this.Entity);\n const names = [...new Set(loose.map((reg) => reg.Metadata.entity))].join(', ');\n console.warn(\n `[mj-form-panel-slot] ${loose.length} BaseFormPanel registration(s) name \"${names}\" but the form entity is ` +\n `\"${this.Entity}\". Entity names must match exactly; these panels will not mount.`,\n );\n }\n\n /**\n * Whether the slot can mount now, or should wait for contribution rows.\n *\n * It waits only while a load is actually in flight. An engine nobody has configured\n * is not \"about to be ready\" — blocking on it would delay every host that does not\n * use metadata contributions at all. Those hosts mount immediately and self-heal:\n * the collector kicks `Config`, and the `Contributions$` subscription below remounts\n * when rows arrive.\n */\n private contributionsReady(): boolean {\n if (FormPanelSlotComponent.contributionGateResolved) return true;\n try {\n const engine = InteractiveFormsEngine.Instance;\n if (engine.ContributionsReady) {\n FormPanelSlotComponent.contributionGateResolved = true;\n return true;\n }\n if (!engine.LoadingSubject.value) {\n // Nothing in flight — mount now rather than waiting on a load that may never start.\n return true;\n }\n return false;\n } catch {\n // No engine in this context (a panel composed outside a form host).\n FormPanelSlotComponent.contributionGateResolved = true;\n return true;\n }\n }\n\n /**\n * Wait for the engine's load to finish, then remount once. Falls through on a timeout so a\n * slow or unreachable engine degrades to compiled panels only rather than leaving the slot\n * empty.\n */\n private async awaitContributionsThenRemount(): Promise<void> {\n if (this.awaitingContributions) return;\n this.awaitingContributions = true;\n try {\n const engine = InteractiveFormsEngine.Instance;\n const outcome = await FormPanelSlotComponent.loadFinishedOrTimeout(engine.LoadingSubject);\n if (!engine.ContributionsReady && !FormPanelSlotComponent.contributionGateResolved) {\n // Once: the first slot to finish waiting closes the gate process-wide below.\n LogError(outcome === 'timeout'\n ? `[mj-form-panel-slot] contribution cache not ready after ${FormPanelSlotComponent.READINESS_TIMEOUT_MS}ms; mounting compiled panels only from here on.`\n : '[mj-form-panel-slot] contribution cache failed to load; mounting compiled panels only from here on.');\n }\n } catch (e) {\n LogError(`[mj-form-panel-slot] waiting on contributions failed: ${e instanceof Error ? e.message : String(e)}`);\n } finally {\n this.awaitingContributions = false;\n // Ready or timed out, the gate is spent process-wide: from here every slot mounts\n // whatever the collector returns rather than waiting again.\n FormPanelSlotComponent.contributionGateResolved = true;\n }\n this.remount();\n }\n\n /** Resolves when `loading` emits false, or after the readiness timeout, whichever is first. */\n private static loadFinishedOrTimeout(loading: Observable<boolean>): Promise<'loaded' | 'timeout'> {\n return new Promise((resolve) => {\n let subscription: Subscription | null = null;\n const timer = setTimeout(() => {\n subscription?.unsubscribe();\n resolve('timeout');\n }, FormPanelSlotComponent.READINESS_TIMEOUT_MS);\n subscription = loading.pipe(filter((busy) => !busy), take(1)).subscribe(() => {\n clearTimeout(timer);\n resolve('loaded');\n });\n });\n }\n\n private unmountAll(): void {\n for (const ref of this.mounted) this.FormComponent?.UnregisterFormPanel?.(ref.instance);\n this.anchor.clear();\n this.mounted = [];\n }\n}\n"]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy, Type } from '@angular/core';
|
|
2
|
+
import { CompositeKey, EntityFieldInfo, EntityInfo } from '@memberjunction/core';
|
|
3
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
|
+
import { CancellableFormEvent } from '../types/form-events';
|
|
5
|
+
import { FormNavigationEvent } from '../types/navigation-events';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Single summary field rendered inside {@link MjRecordPreviewPopoverComponent}.
|
|
9
|
+
*/
|
|
10
|
+
export interface RecordPreviewFieldItem {
|
|
11
|
+
FieldName: string;
|
|
12
|
+
Label: string;
|
|
13
|
+
Value: string;
|
|
14
|
+
RawValue?: unknown;
|
|
15
|
+
IsStatusField: boolean;
|
|
16
|
+
/** When true, spans both columns (`grid-column: 1 / -1`) in the 2-column preview grid. */
|
|
17
|
+
IsWide?: boolean;
|
|
18
|
+
IsEditable?: boolean;
|
|
19
|
+
InputType?: 'text' | 'number' | 'boolean' | 'select';
|
|
20
|
+
PossibleValues?: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Cached summary payload for a target entity record in {@link MjRecordPreviewPopoverComponent}.
|
|
24
|
+
*/
|
|
25
|
+
export interface RecordPreviewSummary {
|
|
26
|
+
EntityName: string;
|
|
27
|
+
EntityDisplayName: string;
|
|
28
|
+
EntityIcon: string;
|
|
29
|
+
RecordID: string;
|
|
30
|
+
PrimaryKey: CompositeKey;
|
|
31
|
+
Title: string;
|
|
32
|
+
StatusValue: string | null;
|
|
33
|
+
Fields: RecordPreviewFieldItem[];
|
|
34
|
+
CanEditRecord?: boolean;
|
|
35
|
+
NameFieldName?: string | null;
|
|
36
|
+
NameFieldEditable?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Event emitted when inline quick-edit saves updated field values on the previewed target record.
|
|
40
|
+
*/
|
|
41
|
+
export interface RecordPreviewUpdatedEvent {
|
|
42
|
+
EntityName: string;
|
|
43
|
+
PrimaryKey: CompositeKey;
|
|
44
|
+
UpdatedFields: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Cancellable event args emitted before inline Quick Edit saves changes to the target entity record.
|
|
48
|
+
* Set `Cancel = true` to prevent the save operation.
|
|
49
|
+
*/
|
|
50
|
+
export declare class BeforeRecordPreviewSaveEventArgs extends CancellableFormEvent {
|
|
51
|
+
readonly EntityName: string;
|
|
52
|
+
readonly PrimaryKey: CompositeKey;
|
|
53
|
+
readonly Summary: RecordPreviewSummary;
|
|
54
|
+
readonly Drafts: Record<string, string | undefined>;
|
|
55
|
+
constructor(entityName: string, primaryKey: CompositeKey, summary: RecordPreviewSummary, drafts: Record<string, string | undefined>);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Anchor rectangle used to position {@link MjRecordPreviewPopoverComponent} in viewport coordinates.
|
|
59
|
+
*/
|
|
60
|
+
export interface RecordPreviewAnchorRect {
|
|
61
|
+
top: number;
|
|
62
|
+
bottom: number;
|
|
63
|
+
left: number;
|
|
64
|
+
right: number;
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Lightweight hover preview card (`<mj-record-preview-popover>`) that displays key metadata
|
|
70
|
+
* and summary fields (`DefaultInView`) for any foreign-key or polymorphic-FK linked record.
|
|
71
|
+
*
|
|
72
|
+
* ### Pluggable via `@RegisterClass` and `MJGlobal.Instance.ClassFactory`
|
|
73
|
+
* Applications and domain packages can subclass `MjRecordPreviewPopoverComponent` and register
|
|
74
|
+
* their custom hover card with `@RegisterClass`:
|
|
75
|
+
* - **Global replacement (all entities)**:
|
|
76
|
+
* `@RegisterClass(MjRecordPreviewPopoverComponent)` or `@RegisterClass(MjRecordPreviewPopoverComponent, '*')`
|
|
77
|
+
* - **Schema or wildcard replacement**:
|
|
78
|
+
* `@RegisterClass(MjRecordPreviewPopoverComponent, 'MJ_BizApps_Common:*')` or
|
|
79
|
+
* `@RegisterClass(MjRecordPreviewPopoverComponent, 'schema:mj_bizapps_common')`
|
|
80
|
+
* - **Entity-specific replacement**:
|
|
81
|
+
* `@RegisterClass(MjRecordPreviewPopoverComponent, 'MJ_BizApps_Common: People')`
|
|
82
|
+
*
|
|
83
|
+
* {@link MjRecordPreviewPopoverService} calls {@link ResolveRecordPreviewPopoverType} at runtime
|
|
84
|
+
* to instantiate the highest-priority matching subclass via Angular's `createComponent()`.
|
|
85
|
+
*/
|
|
86
|
+
export declare class MjRecordPreviewPopoverComponent extends BaseAngularComponent implements OnDestroy {
|
|
87
|
+
protected static readonly CACHE_TTL_MS = 60000;
|
|
88
|
+
protected static readonly summaryCache: Map<string, {
|
|
89
|
+
LoadedAt: number;
|
|
90
|
+
Summary: RecordPreviewSummary;
|
|
91
|
+
}>;
|
|
92
|
+
protected cdr: ChangeDetectorRef;
|
|
93
|
+
protected _destroyed: boolean;
|
|
94
|
+
protected _visible: boolean;
|
|
95
|
+
protected _entityName: string | null;
|
|
96
|
+
protected _recordID: string | null;
|
|
97
|
+
protected _primaryKey: CompositeKey | null;
|
|
98
|
+
protected _displayName: string | null;
|
|
99
|
+
protected _anchorRect: RecordPreviewAnchorRect | null;
|
|
100
|
+
protected _loadSeq: number;
|
|
101
|
+
get EntityName(): string | null;
|
|
102
|
+
set EntityName(value: string | null);
|
|
103
|
+
get RecordID(): string | null;
|
|
104
|
+
set RecordID(value: string | null);
|
|
105
|
+
get PrimaryKey(): CompositeKey | null;
|
|
106
|
+
set PrimaryKey(value: CompositeKey | null);
|
|
107
|
+
get DisplayName(): string | null;
|
|
108
|
+
set DisplayName(value: string | null);
|
|
109
|
+
get AnchorRect(): RecordPreviewAnchorRect | null;
|
|
110
|
+
set AnchorRect(value: RecordPreviewAnchorRect | null);
|
|
111
|
+
get Visible(): boolean;
|
|
112
|
+
set Visible(value: boolean);
|
|
113
|
+
/** Whether inline quick-edit of summary fields is allowed inside the popover. */
|
|
114
|
+
AllowQuickEdit: boolean;
|
|
115
|
+
Navigate: EventEmitter<FormNavigationEvent>;
|
|
116
|
+
MouseEnterCard: EventEmitter<void>;
|
|
117
|
+
MouseLeaveCard: EventEmitter<void>;
|
|
118
|
+
/** Cancellable event emitted before Quick Edit saves field changes to the target entity. */
|
|
119
|
+
BeforeQuickEditSave: EventEmitter<BeforeRecordPreviewSaveEventArgs>;
|
|
120
|
+
/** Emitted after Quick Edit successfully saves field changes to the target entity. */
|
|
121
|
+
AfterQuickEditSaved: EventEmitter<RecordPreviewUpdatedEvent>;
|
|
122
|
+
/** Emitted after Quick Edit saves field changes (alias/companion to `AfterQuickEditSaved`). */
|
|
123
|
+
RecordUpdated: EventEmitter<RecordPreviewUpdatedEvent>;
|
|
124
|
+
IsLoading: boolean;
|
|
125
|
+
Summary: RecordPreviewSummary | null;
|
|
126
|
+
CopiedID: boolean;
|
|
127
|
+
IsEditing: boolean;
|
|
128
|
+
IsSavingEdit: boolean;
|
|
129
|
+
EditErrorMessage: string | null;
|
|
130
|
+
EditDrafts: Record<string, string | undefined>;
|
|
131
|
+
private _copyTimer;
|
|
132
|
+
/** Clear the static summary cache (useful in unit tests). */
|
|
133
|
+
static ClearCache(): void;
|
|
134
|
+
ngOnDestroy(): void;
|
|
135
|
+
protected resetEditState(): void;
|
|
136
|
+
get CompactRecordID(): string;
|
|
137
|
+
OnCopyRecordID(event: MouseEvent): void;
|
|
138
|
+
get PopoverPositionStyle(): Record<string, string>;
|
|
139
|
+
OnCardMouseEnter(): void;
|
|
140
|
+
OnCardMouseLeave(): void;
|
|
141
|
+
OnStartEdit(event: MouseEvent): void;
|
|
142
|
+
OnCancelEdit(event?: MouseEvent): void;
|
|
143
|
+
OnEditDraftInput(fieldName: string, eventOrValue: Event | string): void;
|
|
144
|
+
OnSaveEdit(event?: MouseEvent): Promise<void>;
|
|
145
|
+
protected coerceDraftValue(draft: string, field?: EntityFieldInfo): unknown;
|
|
146
|
+
/**
|
|
147
|
+
* Handles primary click on the record title link in the Option A header.
|
|
148
|
+
* Supports Ctrl/Cmd/Shift-click to open in a new tab.
|
|
149
|
+
*/
|
|
150
|
+
OnTitleClick(event: MouseEvent): void;
|
|
151
|
+
/**
|
|
152
|
+
* Handles middle-click (`auxclick` button 1) on the record title link to open in a new tab.
|
|
153
|
+
*/
|
|
154
|
+
OnTitleAuxClick(event: MouseEvent): void;
|
|
155
|
+
OnOpenRecord(openInNewTab: boolean, event: MouseEvent): void;
|
|
156
|
+
protected resolveCompositeKey(entityInfo?: EntityInfo): CompositeKey | null;
|
|
157
|
+
protected loadSummary(forceRefresh?: boolean): Promise<void>;
|
|
158
|
+
protected selectPreviewFields(entityInfo: EntityInfo): EntityFieldInfo[];
|
|
159
|
+
/**
|
|
160
|
+
* Determines whether a summary field should span the full 2-column width (`grid-column: 1 / -1`)
|
|
161
|
+
* so long values like emails, URLs, titles, or addresses never truncate unnecessarily.
|
|
162
|
+
* Subclasses can override this hook to customize column spanning.
|
|
163
|
+
*/
|
|
164
|
+
protected isFieldWide(field: EntityFieldInfo, formattedValue: string): boolean;
|
|
165
|
+
protected isFieldQuickEditable(field: EntityFieldInfo | null | undefined, canEditEntity: boolean): boolean;
|
|
166
|
+
protected resolveFieldInputType(field: EntityFieldInfo): {
|
|
167
|
+
InputType: 'text' | 'number' | 'boolean' | 'select';
|
|
168
|
+
PossibleValues?: string[];
|
|
169
|
+
};
|
|
170
|
+
protected buildSummaryFromRow(entityInfo: EntityInfo, pk: CompositeKey, recordIdStr: string, candidateFields: EntityFieldInfo[], row: Record<string, unknown> | null): RecordPreviewSummary;
|
|
171
|
+
protected formatPreviewValue(val: unknown, field: EntityFieldInfo): string;
|
|
172
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MjRecordPreviewPopoverComponent, never>;
|
|
173
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjRecordPreviewPopoverComponent, "mj-record-preview-popover", never, { "EntityName": { "alias": "EntityName"; "required": false; }; "RecordID": { "alias": "RecordID"; "required": false; }; "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "DisplayName": { "alias": "DisplayName"; "required": false; }; "AnchorRect": { "alias": "AnchorRect"; "required": false; }; "Visible": { "alias": "Visible"; "required": false; }; "AllowQuickEdit": { "alias": "AllowQuickEdit"; "required": false; }; }, { "Navigate": "Navigate"; "MouseEnterCard": "MouseEnterCard"; "MouseLeaveCard": "MouseLeaveCard"; "BeforeQuickEditSave": "BeforeQuickEditSave"; "AfterQuickEditSaved": "AfterQuickEditSaved"; "RecordUpdated": "RecordUpdated"; }, never, never, false, never>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Resolves the concrete {@link MjRecordPreviewPopoverComponent} class to instantiate for a given
|
|
177
|
+
* entity via `MJGlobal.Instance.ClassFactory`.
|
|
178
|
+
*
|
|
179
|
+
* Resolution precedence:
|
|
180
|
+
* 1. **Exact entity key match** — e.g. `@RegisterClass(MjRecordPreviewPopoverComponent, 'MJ_BizApps_Common: People')`
|
|
181
|
+
* 2. **Wildcard or schema pattern key match** — e.g. `@RegisterClass(MjRecordPreviewPopoverComponent, 'MJ_BizApps_Common:*')`
|
|
182
|
+
* or `@RegisterClass(MjRecordPreviewPopoverComponent, 'schema:mj_bizapps_common')`
|
|
183
|
+
* 3. **Global unkeyed or `'*'` registration** — e.g. `@RegisterClass(MjRecordPreviewPopoverComponent)`
|
|
184
|
+
* 4. **Default built-in component** — {@link MjRecordPreviewPopoverComponent}
|
|
185
|
+
*/
|
|
186
|
+
export declare function ResolveRecordPreviewPopoverType(entityName?: string | null, schemaName?: string | null): Type<MjRecordPreviewPopoverComponent>;
|
|
187
|
+
//# sourceMappingURL=record-preview-popover.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-preview-popover.component.d.ts","sourceRoot":"","sources":["../../../src/lib/preview-popover/record-preview-popover.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EAEjB,YAAY,EAEZ,SAAS,EAET,IAAI,EAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAEH,YAAY,EACZ,eAAe,EAEf,UAAU,EAEb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;;AAEjE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,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