@memberjunction/ng-base-forms 6.2.0-edge.1 → 6.2.0-edge.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/apply/form-placement-dialog.component.d.ts +266 -0
- package/dist/lib/apply/form-placement-dialog.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-dialog.component.js +1522 -0
- package/dist/lib/apply/form-placement-dialog.component.js.map +1 -0
- package/dist/lib/apply/form-placement-order.d.ts +37 -0
- package/dist/lib/apply/form-placement-order.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-order.js +111 -0
- package/dist/lib/apply/form-placement-order.js.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts +112 -0
- package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-preview.component.js +346 -0
- package/dist/lib/apply/form-placement-preview.component.js.map +1 -0
- package/dist/lib/apply/form-placement-text.d.ts +61 -0
- package/dist/lib/apply/form-placement-text.d.ts.map +1 -0
- package/dist/lib/apply/form-placement-text.js +279 -0
- package/dist/lib/apply/form-placement-text.js.map +1 -0
- package/dist/lib/apply/form-placement.d.ts +320 -0
- package/dist/lib/apply/form-placement.d.ts.map +1 -0
- package/dist/lib/apply/form-placement.js +432 -0
- package/dist/lib/apply/form-placement.js.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts +121 -0
- package/dist/lib/apply/form-slot-probe.service.d.ts.map +1 -0
- package/dist/lib/apply/form-slot-probe.service.js +264 -0
- package/dist/lib/apply/form-slot-probe.service.js.map +1 -0
- package/dist/lib/base-form-component-internals.d.ts +11 -0
- package/dist/lib/base-form-component-internals.d.ts.map +1 -0
- package/dist/lib/base-form-component-internals.js +33 -0
- package/dist/lib/base-form-component-internals.js.map +1 -0
- package/dist/lib/base-form-component.d.ts +166 -1
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +296 -20
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome.d.ts +78 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome.js +128 -2
- package/dist/lib/chrome/form-chrome.js.map +1 -1
- package/dist/lib/chrome/form-composition-registry.d.ts +34 -0
- package/dist/lib/chrome/form-composition-registry.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-registry.js +56 -0
- package/dist/lib/chrome/form-composition-registry.js.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts +151 -0
- package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -0
- package/dist/lib/chrome/form-composition-snapshot.js +137 -0
- package/dist/lib/chrome/form-composition-snapshot.js.map +1 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts +15 -0
- package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/resolve-form-chrome.js +31 -2
- package/dist/lib/chrome/resolve-form-chrome.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +261 -5
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +1180 -371
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts +150 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.d.ts.map +1 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js +263 -0
- package/dist/lib/duplicate-entry-check/duplicate-entry-check.js.map +1 -0
- package/dist/lib/field/form-field.component.d.ts +22 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +51 -6
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/form-field-edit.coordinator.d.ts +25 -0
- package/dist/lib/form-field-edit.coordinator.d.ts.map +1 -0
- package/dist/lib/form-field-edit.coordinator.js +27 -0
- package/dist/lib/form-field-edit.coordinator.js.map +1 -0
- package/dist/lib/form-state.service.d.ts +5 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +6 -1
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/host/entity-form-host.component.d.ts +16 -1
- package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
- package/dist/lib/host/entity-form-host.component.js +27 -6
- package/dist/lib/host/entity-form-host.component.js.map +1 -1
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts +24 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts.map +1 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js +99 -0
- package/dist/lib/interactive-form/form-panel-host-props.builder.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts +109 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.d.ts.map +1 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js +424 -0
- package/dist/lib/interactive-form/interactive-form-panel.component.js.map +1 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts +2 -0
- package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
- package/dist/lib/interactive-form/interactive-form.component.js +4 -5
- package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +69 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +148 -12
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-manager/form-audience.d.ts +46 -0
- package/dist/lib/panel-manager/form-audience.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-audience.js +34 -0
- package/dist/lib/panel-manager/form-audience.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts +150 -0
- package/dist/lib/panel-manager/form-panel-admin.service.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js +433 -0
- package/dist/lib/panel-manager/form-panel-admin.service.js.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts +255 -0
- package/dist/lib/panel-manager/form-panel-inventory.d.ts.map +1 -0
- package/dist/lib/panel-manager/form-panel-inventory.js +293 -0
- package/dist/lib/panel-manager/form-panel-inventory.js.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts +232 -0
- package/dist/lib/panel-manager/panel-manager.component.d.ts.map +1 -0
- package/dist/lib/panel-manager/panel-manager.component.js +1112 -0
- package/dist/lib/panel-manager/panel-manager.component.js.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts +40 -0
- package/dist/lib/panel-slot/base-contribution-panel.d.ts.map +1 -0
- package/dist/lib/panel-slot/base-contribution-panel.js +55 -0
- package/dist/lib/panel-slot/base-contribution-panel.js.map +1 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts +116 -8
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js +76 -5
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts +29 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts.map +1 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js +214 -0
- package/dist/lib/panel-slot/collect-form-contribution-registrations.js.map +1 -0
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts +6 -3
- package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts.map +1 -1
- package/dist/lib/panel-slot/collect-form-panel-registrations.js +8 -14
- package/dist/lib/panel-slot/collect-form-panel-registrations.js.map +1 -1
- package/dist/lib/panel-slot/form-contribution.d.ts +170 -7
- package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contribution.js +242 -64
- package/dist/lib/panel-slot/form-contribution.js.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.d.ts +16 -5
- package/dist/lib/panel-slot/form-contributions.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-contributions.component.js +43 -7
- package/dist/lib/panel-slot/form-contributions.component.js.map +1 -1
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts +66 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js +190 -0
- package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -0
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts +52 -16
- package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-panel-slot.component.js +190 -66
- package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +11 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts.map +1 -1
- package/dist/lib/panel-slot/form-slot-coordinator.service.js +17 -0
- package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -1
- package/dist/lib/panel-slot/merge-panel-validation.d.ts +7 -0
- package/dist/lib/panel-slot/merge-panel-validation.d.ts.map +1 -0
- package/dist/lib/panel-slot/merge-panel-validation.js +16 -0
- package/dist/lib/panel-slot/merge-panel-validation.js.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts +15 -0
- package/dist/lib/panel-slot/mount-form-contribution.d.ts.map +1 -0
- package/dist/lib/panel-slot/mount-form-contribution.js +37 -0
- package/dist/lib/panel-slot/mount-form-contribution.js.map +1 -0
- package/dist/lib/panel-slot/panel-hides.d.ts +35 -0
- package/dist/lib/panel-slot/panel-hides.d.ts.map +1 -0
- package/dist/lib/panel-slot/panel-hides.js +111 -0
- package/dist/lib/panel-slot/panel-hides.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts +16 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js +112 -0
- package/dist/lib/panel-slot/placement-preview-panel.component.js.map +1 -0
- package/dist/lib/panel-slot/placement-preview.d.ts +57 -0
- package/dist/lib/panel-slot/placement-preview.d.ts.map +1 -0
- package/dist/lib/panel-slot/placement-preview.js +86 -0
- package/dist/lib/panel-slot/placement-preview.js.map +1 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts +2 -0
- package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts.map +1 -1
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js +10 -3
- package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/slot-order.d.ts +19 -0
- package/dist/lib/panel-slot/slot-order.d.ts.map +1 -0
- package/dist/lib/panel-slot/slot-order.js +53 -0
- package/dist/lib/panel-slot/slot-order.js.map +1 -0
- package/dist/lib/resolver/form-resolver.service.d.ts +4 -2
- package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
- package/dist/lib/resolver/form-resolver.service.js +18 -8
- package/dist/lib/resolver/form-resolver.service.js.map +1 -1
- package/dist/lib/resolver/form-variants.d.ts +28 -0
- package/dist/lib/resolver/form-variants.d.ts.map +1 -0
- package/dist/lib/resolver/form-variants.js +40 -0
- package/dist/lib/resolver/form-variants.js.map +1 -0
- package/dist/lib/section-counts/form-section-counts.d.ts +99 -0
- package/dist/lib/section-counts/form-section-counts.d.ts.map +1 -0
- package/dist/lib/section-counts/form-section-counts.js +223 -0
- package/dist/lib/section-counts/form-section-counts.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +129 -2
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +974 -307
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-events.d.ts +6 -0
- package/dist/lib/types/form-events.d.ts.map +1 -1
- package/dist/lib/types/form-events.js +6 -0
- package/dist/lib/types/form-events.js.map +1 -1
- package/dist/lib/types/form-toolbar-item.d.ts +20 -1
- package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
- package/dist/lib/types/form-toolbar-item.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +13 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/lib/types/toolbar-config.d.ts +16 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -1
- package/dist/lib/types/toolbar-config.js +3 -0
- package/dist/lib/types/toolbar-config.js.map +1 -1
- package/dist/module.d.ts +29 -22
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +50 -8
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +22 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +24 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-manager.component.js","sourceRoot":"","sources":["../../../src/lib/panel-manager/panel-manager.component.ts","../../../src/lib/panel-manager/panel-manager.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAChE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,GAEnD,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAA8D,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,8BAA8B,EAC9B,kBAAkB,GAOnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,8BAA8B,GAK/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;;;;;mBC8GpD,MA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E,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IACpE,MAAM,aAAa,GAAG,8BAA8B,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACxE,IAAI,aAAa;QAAE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACtD,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,2EAA2E;AAC3E,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;AAC3E,CAAC","sourcesContent":["import {\n Component, Input, Output, EventEmitter, ElementRef, HostListener,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n OnChanges, SimpleChanges,\n} from '@angular/core';\nimport type { MjButtonVariant } from '@memberjunction/ng-ui-components';\nimport { Metadata, type CompositeKey, type EntityInfo, type IMetadataProvider } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport type { FormLifecycleStatus, FormScope } from '@memberjunction/core-entities';\nimport { FormPanelAdminService } from './form-panel-admin.service';\nimport { FormSlotProbeService } from '../apply/form-slot-probe.service';\nimport { HiddenPanelKeys } from '../panel-slot/panel-hides';\nimport type { FormAudience } from './form-audience';\nimport type { FormContributionSpec } from '@memberjunction/interactive-component-types/forms';\nimport {\n BuildFormItems,\n BuildPanelInventory,\n DescribeAudience,\n GroupPanelInventory,\n ParseContributionConfiguration,\n SummarizeInventory,\n type FormPanelFormItem,\n type FormPanelCompiledRow,\n type FormPanelContributionRow,\n type FormPanelInventoryGroup,\n type FormPanelInventoryItem,\n type FormPanelStockGridRow,\n} from './form-panel-inventory';\nimport {\n KeepEditedRowKey,\n PlacementStateFromContribution,\n type FormPlacementContext,\n type FormPlacementDecision,\n type FormPlacementRelated,\n type FormPlacementState,\n} from '../apply/form-placement';\nimport { DescribeVisibleTo } from '../apply/form-placement-text';\n\n/**\n * \"Manage this form\" — the one place to manage what is on an entity's form.\n *\n * Lists the full custom forms available to the user and the panels on the form, grouped by who\n * each belongs to, because that decides what the user may do: anything to their own, hide what\n * is shared with them, nothing to a grid a relationship draws. Holders of the Manage Form\n * Defaults authorization also get Publish and Audience, which change what other people see.\n *\n * Every write goes through the admin service to the server, where the entity subclasses enforce\n * the same rule this drawer uses to decide what to draw.\n */\n@Component({\n standalone: false,\n selector: 'mj-panel-manager',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './panel-manager.component.html',\n styleUrls: ['./panel-manager.component.css'],\n})\nexport class MjPanelManagerComponent implements OnChanges {\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly admin = inject(FormPanelAdminService);\n private readonly probe = inject(FormSlotProbeService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** What held focus before the drawer opened, and gets it back when the drawer closes. */\n private drawerOpener: HTMLElement | null = null;\n /** What held focus before the placement dialog or the audience chooser opened over the list. */\n private layerOpener: HTMLElement | null = null;\n /** True while the drawer is open and holds the keyboard. Off before focus goes back out on close. */\n private trapping = false;\n\n @Input() Visible = false;\n\n /** The entity whose form is being managed. */\n @Input() Entity: EntityInfo | null = null;\n\n /** Compiled `BaseFormPanel` registrations on this entity, for the inventory. */\n @Input() Compiled: readonly FormPanelCompiledRow[] = [];\n\n /** Relationships the container fills a grid in for. */\n @Input() StockGrids: readonly FormPanelStockGridRow[] = [];\n\n /** Whether a full custom form owns this body, which holds everything else back. */\n @Input() FullCustomForm = false;\n\n /** Section and rail titles by key, so a claim reads as a name. */\n @Input() TitleByKey: ReadonlyMap<string, string> = new Map();\n\n /** Related grids on this form, so editing can still offer to take one over. */\n @Input() Related: readonly FormPlacementRelated[] = [];\n\n @Input() Provider: IMetadataProvider | null = null;\n\n /** The full custom forms the toolbar picker offers, in its order. */\n @Input() Variants: ReadonlyArray<{ ID: string; Label: string }> = [];\n\n /** The form this user sees now; null when it is the generated form. */\n @Input() CurrentFormID: string | null = null;\n\n /** The record the form is showing, for the placement dialog's preview. Null for a new record. */\n @Input() RecordKey: CompositeKey | null = null;\n\n /** A row was switched or removed, so the form has to resolve again. */\n @Output() Changed = new EventEmitter<void>();\n\n /** The user chose a different full custom form, or the generated form (null). */\n @Output() FormChosen = new EventEmitter<string | null>();\n\n @Output() Closed = new EventEmitter<void>();\n\n public Items: FormPanelInventoryItem[] = [];\n\n /** The full custom forms and the generated form, for the Form group. */\n public Forms: FormPanelFormItem[] = [];\n\n /** Whether this user may publish to a role or to everyone. */\n public CanPublish = false;\n\n /** The item whose audience is being chosen, or null. */\n public Publishing: {\n Kind: 'panel' | 'form';\n ID: string;\n Title: string;\n /** What the item is now. Publishing turns it on, which the chooser says first. */\n Status: string;\n Scope: FormScope;\n RoleID: string | null;\n } | null = null;\n\n /** The list, under headings. */\n public Groups: FormPanelInventoryGroup[] = [];\n\n /** The row being re-placed, or null. */\n public Editing: FormPanelInventoryItem | null = null;\n\n /** What the placement dialog opens on while editing. */\n public EditContext: FormPlacementContext | null = null;\n /** The component the panel being edited renders, for the placement preview. */\n public EditComponentID: string | null = null;\n public EditProposal: FormContributionSpec | null = null;\n /** Who sees the panel being edited, for the placement dialog to state. */\n public EditVisibleTo = DescribeVisibleTo('User');\n /** What the panel being edited is now: on, a draft, or off. */\n public EditStatus: FormLifecycleStatus = 'Active';\n\n /** ID of the row a write is running on, so only its buttons go quiet. */\n public Busy: string | null = null;\n\n /** ID of the row awaiting a second press to confirm removal. */\n public Confirming: string | null = null;\n\n public Error = '';\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['Visible'] && this.Visible) {\n this.drawerOpener = this.focusedElement();\n this.trapping = true;\n this.Refresh();\n this.focusLater('.mj-pm-close');\n } else if (changes['Visible'] && !changes['Visible'].firstChange) {\n this.trapping = false;\n this.restoreFocus('drawer');\n } else if (changes['Entity'] || changes['Compiled'] || changes['StockGrids'] || changes['FullCustomForm']\n || changes['Variants'] || changes['CurrentFormID']) {\n this.Refresh();\n }\n }\n\n public get Summary(): string {\n return SummarizeInventory(this.Items);\n }\n\n public get EntityName(): string {\n return this.Entity?.Name ?? '';\n }\n\n public get IsEmpty(): boolean {\n return this.Items.length === 0;\n }\n\n /** Whether there is more than the generated form to choose from. */\n public get HasCustomForms(): boolean {\n return this.Forms.length > 1;\n }\n\n /** Rebuild the list from the engine's current rows. */\n public Refresh(): void {\n const provider = this.provider;\n const user = provider?.CurrentUser;\n this.CanPublish = this.admin.CanPublish(provider);\n this.rows = this.admin.RowsForEntity(this.Entity);\n this.Items = BuildPanelInventory({\n Contributions: this.rows,\n Compiled: this.Compiled,\n StockGrids: this.StockGrids,\n FullCustomForm: this.FullCustomForm,\n TitleByKey: this.TitleByKey,\n CallerID: user?.ID ?? '',\n CallerRoleIDs: (user?.UserRoles ?? []).map((r) => r.RoleID).filter((id): id is string => !!id),\n CanPublish: this.CanPublish,\n HiddenKeys: this.EntityName ? HiddenPanelKeys(this.EntityName) : [],\n Rendering: this.admin.RenderingFor(this.Entity, provider),\n });\n this.Groups = GroupPanelInventory(this.Items);\n this.Forms = BuildFormItems({\n Variants: this.Variants,\n Overrides: this.admin.OverridesForEntity(this.Entity),\n CurrentFormID: this.CurrentFormID,\n CanPublish: this.CanPublish,\n });\n this.cdr.markForCheck();\n }\n\n private get provider(): IMetadataProvider | null {\n return this.Provider ?? Metadata.Provider ?? null;\n }\n\n /** The rows behind the list, so an edit can read the placement back. */\n private rows: FormPanelContributionRow[] = [];\n\n /**\n * Open the placement dialog on a row that is already on the form.\n *\n * Editing in place is what \"remove it and add it again\" was standing in for. The\n * dialog probes the form for itself, so the only context assembled here is what a\n * probe cannot know: the related grids and the other panels already installed.\n */\n public OnEdit(item: FormPanelInventoryItem): void {\n if (!item.CanEdit) return;\n const row = this.rows.find((candidate) => UUIDsEqual(candidate.ID, item.ID));\n if (!row) return;\n\n const spec = proposalFromRow(row);\n const context: FormPlacementContext = {\n EntityName: this.Entity?.Name ?? '',\n Sections: [],\n Related: this.Related,\n // A panel cannot be asked to stand in for itself.\n // Keyed by contribution key, which is what replacing one writes and what the form draws.\n Existing: this.Items\n .filter((other) => other.Origin === 'contribution' && other.ID !== item.ID)\n .map((other) => this.existingFrom(other.ID, other.Slot, other.Title))\n .filter((other) => other.Key.length > 0),\n SlotsPresent: [],\n SlotsVerified: false,\n Layout: 'accordion',\n Rail: [],\n FullCustomForm: this.FullCustomForm,\n TargetsVerified: false,\n };\n\n this.Editing = item;\n this.EditProposal = spec;\n this.EditContext = context;\n this.EditComponentID = row.ComponentID || null;\n this.EditVisibleTo = DescribeVisibleTo(row.Scope, row.Role);\n this.EditStatus = lifecycleStatus(row.Status);\n this.Error = '';\n this.layerOpener = this.focusedElement();\n this.cdr.markForCheck();\n this.focusLater('.mj-pm-edit');\n }\n\n /**\n * Seed the dialog with the row's own placement rather than a blank one.\n *\n * Recomputed against the dialog's context each time it asks, not replayed: the dialog\n * probes the form after it opens, so the first seed runs against a context with no\n * sections, slots or rail in it and a stored claim would not match anything yet.\n */\n public SeedEdit = (dialog: { State: FormPlacementState; Context: FormPlacementContext }): void => {\n if (!this.EditProposal || !this.Editing) return;\n dialog.State = PlacementStateFromContribution(\n this.EditProposal, dialog.Context, this.EditStatus === 'Active', this.EditStatus === 'Inactive');\n };\n\n public async OnEditApplied(decision: FormPlacementDecision): Promise<void> {\n const item = this.Editing;\n const existing = this.EditContext?.Existing ?? [];\n this.CloseEdit();\n if (!item) return;\n const row = this.rows.find((candidate) => UUIDsEqual(candidate.ID, item.ID));\n const contribution = row ? KeepEditedRowKey(decision.Contribution, row, existing) : decision.Contribution;\n const status: FormLifecycleStatus = decision.ActivateNow ? 'Active' : decision.KeepOff ? 'Inactive' : 'Pending';\n await this.run(item.ID, () => this.admin.SetPlacement(item.ID, contribution, status, this.Provider));\n }\n\n /** Clicking the backdrop closes the dialog; clicking the dialog itself does not. */\n public OnEditScrimClick(event: MouseEvent): void {\n if (event.target === event.currentTarget) this.CloseEdit();\n }\n\n /** A contribution row as the placement dialog lists it: its key, position and order. */\n private existingFrom(rowID: string, slot: string, title: string): FormPlacementContext['Existing'][number] {\n const row = this.rows.find((candidate) => UUIDsEqual(candidate.ID, rowID));\n return {\n Key: this.contributionKeyOf(rowID),\n Slot: slot,\n Title: title,\n SortKey: row?.SortKey ?? 0,\n InSectionKey: row?.InSectionKey ?? null,\n SectionPosition: row?.SectionPosition ?? null,\n FieldNames: row?.ReplacesFieldNames ?? [],\n SectionKeys: row ? (row.ReplacesSectionKeys.length > 0 ? row.ReplacesSectionKeys : [row.ReplacesSectionKey ?? ''].filter(Boolean)) : [],\n ReplacesPlace: !!(row?.ReplacesSectionKey || row?.ReplacesSectionKeys.length || row?.RelatedEntity),\n };\n }\n\n /** A contribution row's key, or empty when the row has none. */\n private contributionKeyOf(rowID: string): string {\n return (this.rows.find((row) => UUIDsEqual(row.ID, rowID))?.ContributionKey ?? '').trim();\n }\n\n public CloseEdit(): void {\n const wasOpen = this.Editing !== null;\n this.Editing = null;\n this.EditContext = null;\n this.EditProposal = null;\n this.EditComponentID = null;\n this.cdr.markForCheck();\n if (wasOpen) this.restoreFocus('layer');\n }\n\n public async OnToggle(item: FormPanelInventoryItem): Promise<void> {\n if (this.Busy || (!item.CanTurnOn && !item.CanTurnOff)) return;\n await this.run(item.ID, () => this.admin.SetActive(item.ID, item.CanTurnOn, this.Provider));\n }\n\n /**\n * Removal takes two presses on the same button rather than a second dialog. The drawer\n * is already over the form, and a confirm dialog over a drawer over a form leaves the\n * user two layers from the thing they are changing.\n */\n public async OnRemove(item: FormPanelInventoryItem): Promise<void> {\n if (this.Busy || !item.CanRemove) return;\n if (!UUIDsEqual(this.Confirming, item.ID)) {\n this.Confirming = item.ID;\n this.cdr.markForCheck();\n return;\n }\n this.Confirming = null;\n await this.run(item.ID, () => this.admin.Remove(item.ID, this.Provider));\n }\n\n /** Quiet until the first press; solid red while it waits for the second. */\n public RemoveVariant(item: FormPanelInventoryItem): MjButtonVariant {\n return UUIDsEqual(this.Confirming, item.ID) ? 'danger' : 'flat';\n }\n\n public RemoveLabel(item: FormPanelInventoryItem): string {\n if (!UUIDsEqual(this.Confirming, item.ID)) return 'Remove';\n return item.Audience === 'yours' ? 'Really remove?' : 'Remove for everyone?';\n }\n\n public ToggleLabel(item: FormPanelInventoryItem): string {\n return item.CanTurnOn ? 'Turn on' : 'Turn off';\n }\n\n /** Hide a panel for this user. Nobody else is affected. */\n public OnHide(item: FormPanelInventoryItem): void {\n if (!item.CanHide || !item.HideKey || !this.EntityName) return;\n this.admin.Hide(this.EntityName, item.HideKey);\n this.afterChange();\n }\n\n /** Bring back a panel this user hid. */\n public OnShow(item: FormPanelInventoryItem): void {\n if (!item.CanShow || !item.HideKey || !this.EntityName) return;\n this.admin.Show(this.EntityName, item.HideKey);\n this.afterChange();\n }\n\n /** Switch to another full custom form, or back to the generated form. */\n public OnUseForm(form: FormPanelFormItem): void {\n if (form.IsCurrent) return;\n this.FormChosen.emit(form.ID);\n }\n\n /** Open the audience chooser on a panel. */\n public OnPublishPanel(item: FormPanelInventoryItem): void {\n if (!item.CanPublish && !item.CanChangeAudience) return;\n const row = this.rows.find((r) => UUIDsEqual(r.ID, item.ID));\n if (!row) return;\n this.openAudience({ Kind: 'panel', ID: item.ID, Title: item.Title, Status: row.Status, Scope: row.Scope as FormScope, RoleID: row.RoleID });\n }\n\n /** Open the audience chooser on a full custom form. */\n public OnPublishForm(form: FormPanelFormItem): void {\n if (!form.ID || (!form.CanPublish && !form.CanChangeAudience)) return;\n const row = this.admin.OverridesForEntity(this.Entity).find((r) => UUIDsEqual(r.ID, form.ID));\n this.openAudience({\n Kind: 'form', ID: form.ID, Title: form.Title, Status: row?.Status ?? 'Active',\n Scope: (row?.Scope ?? 'User') as FormScope, RoleID: row?.RoleID ?? null,\n });\n }\n\n private openAudience(target: NonNullable<MjPanelManagerComponent['Publishing']>): void {\n this.Publishing = target;\n this.Error = '';\n this.layerOpener = this.focusedElement();\n this.cdr.markForCheck();\n this.focusLater('.mj-pm-audience');\n }\n\n /** The roles a holder may publish to. */\n public get RoleOptions(): ReadonlyArray<{ ID: string; Name: string }> {\n return (this.provider?.Roles ?? [])\n .map((role) => ({ ID: role.ID, Name: role.Name }))\n .sort((a, b) => a.Name.localeCompare(b.Name));\n }\n\n /**\n * What publishing will do, stated before it is done.\n *\n * Changing what other people see should never be a surprise, so the consequence is spelled\n * out in the terms the publisher chose — which people, and on which records. Publishing turns\n * the item on, so a draft or an item that is off says it will go live.\n */\n public get AudienceConsequence(): string {\n const target = this.Publishing;\n if (!target) return '';\n const role = this.RoleOptions.find((r) => UUIDsEqual(r.ID, target.RoleID))?.Name;\n if (target.Scope === 'Role' && !role) return 'Choose a role.';\n const what = target.Kind === 'form' ? 'this form' : 'this panel';\n const records = `every ${this.EntityName} record`;\n const forWhom = target.Scope === 'User' ? 'you only' : target.Scope === 'Global' ? 'everyone' : `everyone in ${role}`;\n if (target.Status === 'Pending') return `This draft will go live for ${forWhom}, on ${records}.`;\n if (target.Status === 'Inactive') {\n const state = target.Kind === 'form' ? 'This form is set aside' : 'This panel is off';\n return `${state}. It will go live for ${forWhom}, on ${records}.`;\n }\n if (target.Scope === 'User') return `Only you will see ${what}, on ${records}.`;\n if (target.Scope === 'Global') return `Everyone will see ${what} on ${records}.`;\n return `Everyone in ${role} will see ${what} on ${records}.`;\n }\n\n /** Whether the chosen audience is complete enough to publish. */\n public get CanConfirmAudience(): boolean {\n return !!this.Publishing && (this.Publishing.Scope !== 'Role' || !!this.Publishing.RoleID);\n }\n\n /**\n * Publishes with the chosen audience. The Publish button that opened the chooser is disabled\n * while the write runs, so focus waits on the drawer and goes back to the button afterwards,\n * when it is still there and enabled.\n */\n public async ConfirmAudience(): Promise<void> {\n const target = this.Publishing;\n if (!target || !this.CanConfirmAudience) return;\n this.Publishing = null;\n const opener = this.layerOpener;\n this.layerOpener = null;\n this.drawerElement()?.focus();\n const audience: FormAudience = { Scope: target.Scope, RoleID: target.RoleID };\n await this.run(target.ID, () => target.Kind === 'form'\n ? this.admin.PublishOverride(target.ID, audience, this.Provider)\n : this.admin.PublishContribution(target.ID, audience, this.Provider), opener);\n }\n\n public CancelAudience(): void {\n this.Publishing = null;\n this.cdr.markForCheck();\n this.restoreFocus('layer');\n }\n\n /** The audience label for a scope, as the chooser's options read it. */\n public AudienceOption(scope: FormScope): string {\n return scope === 'Role' ? 'A role' : DescribeAudience(scope);\n }\n\n public OnClose(): void {\n this.Confirming = null;\n this.Publishing = null;\n this.Error = '';\n this.CloseEdit();\n this.layerOpener = null;\n this.trapping = false;\n this.restoreFocus('drawer');\n this.Closed.emit();\n }\n\n public OnOverlayClick(event: MouseEvent): void {\n if (event.target === event.currentTarget) this.OnClose();\n }\n\n /**\n * Keys pressed anywhere while the drawer is open, so they still reach it when the focused\n * button was removed or disabled and focus fell to the page. Escape closes the top layer: the\n * placement dialog, then the audience chooser, then the drawer. Tab and Shift+Tab wrap at the\n * ends of that layer and bring focus back into it. Keys pressed in another overlay or modal,\n * such as the icon picker's grid, are left to it.\n */\n @HostListener('document:keydown', ['$event'])\n public OnKeydown(event: KeyboardEvent): void {\n if (!this.trapping || event.defaultPrevented || !this.drawerShown() || this.belongsElsewhere(event.target)) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n if (this.Editing) this.CloseEdit();\n else if (this.Publishing) this.CancelAudience();\n else this.OnClose();\n return;\n }\n if (event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey) this.keepFocusInside(event);\n }\n\n /** Focus that moves to the page behind the drawer is brought back into it. */\n @HostListener('document:focusin', ['$event'])\n public OnFocusIn(event: FocusEvent): void {\n if (!this.trapping || !this.drawerShown() || this.belongsElsewhere(event.target)) return;\n if (event.target instanceof Node && this.host.nativeElement.contains(event.target)) return;\n this.focusTopLayer();\n }\n\n /**\n * True for an element outside the drawer that another overlay or modal owns: a CDK overlay\n * (the icon picker's grid) or a dialog marked `aria-modal`. Those handle their own keys and focus.\n */\n private belongsElsewhere(target: EventTarget | null): boolean {\n if (!(target instanceof Element) || this.host.nativeElement.contains(target)) return false;\n return !!target.closest('.cdk-overlay-container, [aria-modal=\"true\"]');\n }\n\n /** Wraps Tab at the first and last stop of the top layer, and brings focus back into it. */\n private keepFocusInside(event: KeyboardEvent): void {\n const layer = this.topLayer();\n if (!layer) return;\n const stops = tabStops(layer);\n const active = this.focusedElement();\n if (stops.length === 0) {\n event.preventDefault();\n layer.focus();\n return;\n }\n const first = stops[0];\n const last = stops[stops.length - 1];\n const current = active ? stopOf(active, stops) : null;\n if (!active || !layer.contains(active)) {\n event.preventDefault();\n (event.shiftKey ? last : first).focus();\n } else if (event.shiftKey && (current === first || active === layer)) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && current === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n /**\n * Puts focus back inside the drawer when it is not there: on the drawer itself, or on the first\n * stop of the placement dialog or audience chooser when one is open.\n */\n private focusTopLayer(): void {\n const layer = this.topLayer();\n if (!layer) return;\n const target = layer.hasAttribute('tabindex') ? layer : tabStops(layer)[0] ?? null;\n target?.focus();\n }\n\n /**\n * After the list redraws, keeps focus in the drawer. A write or a hide can remove or disable\n * the focused button, which drops focus to the page. `preferred` gets focus back when it is\n * still there and enabled.\n */\n private refocusAfterRender(preferred: HTMLElement | null = null): void {\n setTimeout(() => {\n if (!this.trapping) return;\n if (preferred?.isConnected && !isDisabled(preferred)) {\n preferred.focus();\n return;\n }\n const active = this.focusedElement();\n if (active && this.host.nativeElement.contains(active) && !isDisabled(active)) return;\n if (this.belongsElsewhere(active)) return;\n this.focusTopLayer();\n }, 0);\n }\n\n private drawerElement(): HTMLElement | null {\n return this.host.nativeElement.querySelector<HTMLElement>('.mj-pm-drawer');\n }\n\n /**\n * Whether the drawer is on screen. A drawer left open on a tab that is now in the background\n * is still in the page, hidden, and must not take keys or focus from the tab in front.\n */\n private drawerShown(): boolean {\n const drawer = this.drawerElement();\n if (!drawer) return false;\n return typeof drawer.checkVisibility === 'function' ? drawer.checkVisibility() : true;\n }\n\n /** The layer that holds focus: the placement dialog, else the audience chooser, else the drawer. */\n private topLayer(): HTMLElement | null {\n const root = this.host.nativeElement;\n return root.querySelector<HTMLElement>('.mj-pm-edit')\n ?? root.querySelector<HTMLElement>('.mj-pm-audience')\n ?? root.querySelector<HTMLElement>('.mj-pm-drawer');\n }\n\n /** Moves focus to the first stop inside `selector` once the view has drawn it. */\n private focusLater(selector: string): void {\n setTimeout(() => {\n const target = this.host.nativeElement.querySelector<HTMLElement>(selector);\n if (!target) return;\n const stop = target.matches(TAB_STOPS) ? target : tabStops(target)[0];\n (stop ?? target).focus();\n }, 0);\n }\n\n /** Gives focus back to what held it before the drawer, or one of its layers, opened. */\n private restoreFocus(which: 'drawer' | 'layer'): void {\n const opener = which === 'drawer' ? this.drawerOpener : this.layerOpener;\n if (which === 'drawer') this.drawerOpener = null;\n else this.layerOpener = null;\n if (opener?.isConnected) opener.focus();\n }\n\n private focusedElement(): HTMLElement | null {\n const active = this.host.nativeElement.ownerDocument?.activeElement;\n return active instanceof HTMLElement ? active : null;\n }\n\n /**\n * Runs one write on a row, with only that row's buttons quiet meanwhile, then keeps focus in\n * the drawer, on `focusAfter` when it is still there and enabled.\n */\n private async run(\n id: string,\n act: () => Promise<{ Success: boolean; Message?: string }>,\n focusAfter: HTMLElement | null = null,\n ): Promise<void> {\n this.Busy = id;\n this.Error = '';\n this.cdr.markForCheck();\n try {\n const result = await act();\n if (!result.Success) {\n this.Error = result.Message ?? 'That did not work.';\n } else {\n this.afterChange();\n }\n } finally {\n this.Busy = null;\n this.cdr.markForCheck();\n this.refocusAfterRender(focusAfter);\n }\n }\n\n /**\n * After a change to what is on the form: drop the placement dialog's reading of it, rebuild\n * the list, tell the form to resolve again, and keep focus in the drawer.\n */\n private afterChange(): void {\n if (this.EntityName) this.probe.Forget(this.EntityName);\n this.Refresh();\n this.Changed.emit();\n this.refocusAfterRender();\n }\n}\n\n/** Elements Tab stops on inside the drawer. */\nconst TAB_STOPS = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), '\n + 'textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * The elements Tab stops on inside `root`, in document order. Leaves out anything inside an\n * `inert` or `hidden` subtree, such as the placement dialog's read-only form preview, which\n * cannot take focus. A named radio group is one stop: its checked radio, else its first.\n */\nfunction tabStops(root: HTMLElement): HTMLElement[] {\n const candidates = Array.from(root.querySelectorAll<HTMLElement>(TAB_STOPS)).filter((el) => !el.closest('[inert], [hidden]'));\n const groupStops = new Map<string, HTMLInputElement>();\n for (const el of candidates) {\n if (!isNamedRadio(el)) continue;\n const kept = groupStops.get(el.name);\n if (!kept || (!kept.checked && el.checked)) groupStops.set(el.name, el);\n }\n return candidates.filter((el) => !isNamedRadio(el) || groupStops.get(el.name) === el);\n}\n\n/** The stop that stands for `el`: the group's stop for a radio in a named group, else `el`. */\nfunction stopOf(el: HTMLElement, stops: readonly HTMLElement[]): HTMLElement {\n if (!isNamedRadio(el)) return el;\n return stops.find((stop) => isNamedRadio(stop) && stop.name === el.name) ?? el;\n}\n\nfunction isNamedRadio(el: Element): el is HTMLInputElement {\n return el instanceof HTMLInputElement && el.type === 'radio' && el.name.length > 0;\n}\n\nfunction isDisabled(el: Element): boolean {\n return (el instanceof HTMLButtonElement || el instanceof HTMLInputElement\n || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement) && el.disabled;\n}\n\n/** The row's placement, claims and configuration as the proposal the edit dialog opens on. */\nfunction proposalFromRow(row: FormPanelContributionRow): FormContributionSpec {\n const spec: FormContributionSpec = {\n slot: row.Slot as FormContributionSpec['slot'],\n presentation: row.Presentation === 'bare' ? 'bare' : 'panel',\n title: (row.Title ?? row.Name ?? '').trim(),\n };\n if (row.Icon) spec.icon = row.Icon;\n if (row.ReplacesSectionKey) spec.replacesSectionKey = row.ReplacesSectionKey;\n if (row.ReplacesSectionKeys.length > 0) spec.replacesSectionKeys = [...row.ReplacesSectionKeys];\n if (row.ReplacesFieldNames.length > 0) spec.replacesFieldNames = [...row.ReplacesFieldNames];\n if (row.InSectionKey) spec.inSectionKey = row.InSectionKey;\n if (row.SectionPosition) spec.sectionPosition = row.SectionPosition;\n if (row.RelatedEntity) spec.relatedEntity = row.RelatedEntity;\n if (row.RelatedEntity && row.RelatedJoinField) spec.relatedJoinField = row.RelatedJoinField;\n if (row.ContributionKey) spec.contributionKey = row.ContributionKey;\n const configuration = ParseContributionConfiguration(row.Configuration);\n if (configuration) spec.configuration = configuration;\n spec.sortKey = row.SortKey;\n return spec;\n}\n\n/** A row's status as a lifecycle status. Anything unknown reads as off. */\nfunction lifecycleStatus(status: string): FormLifecycleStatus {\n return status === 'Active' || status === 'Pending' ? status : 'Inactive';\n}\n","@if (Visible) {\n <div class=\"mj-pm-overlay\" (click)=\"OnOverlayClick($event)\">\n <div class=\"mj-pm-drawer\" (click)=\"$event.stopPropagation()\" role=\"dialog\" aria-modal=\"true\"\n aria-label=\"Manage this form\" tabindex=\"-1\">\n\n <div class=\"mj-pm-header\">\n <div class=\"mj-pm-heading\">\n <div class=\"mj-pm-eyebrow\">Manage this form</div>\n <h3 class=\"mj-pm-title\">{{ EntityName }}</h3>\n </div>\n <button type=\"button\" mjButton Variant=\"icon\" class=\"mj-pm-close\" (click)=\"OnClose()\" aria-label=\"Close\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n @if (FullCustomForm) {\n <p class=\"mj-pm-banner\">\n A full custom form is drawing this entity. It owns the whole body, so everything\n below is held back until that form is turned off.\n </p>\n }\n\n @if (Error) {\n <p class=\"mj-pm-error\" role=\"alert\">{{ Error }}</p>\n }\n\n <div class=\"mj-pm-list\">\n @if (HasCustomForms) {\n <section class=\"mj-pm-group\">\n <div class=\"mj-pm-group-head\">\n <span class=\"mj-pm-group-title\">Form</span>\n </div>\n <p class=\"mj-pm-group-note\">Which form you see for this entity. Switching changes only your view.</p>\n <div class=\"mj-pm-stack\" role=\"radiogroup\" aria-label=\"Form\">\n @for (form of Forms; track form.ID ?? 'generated') {\n <div class=\"mj-pm-form\" [class.is-current]=\"form.IsCurrent\">\n <label class=\"mj-pm-form-pick\">\n <input type=\"radio\" name=\"mj-pm-form\"\n [checked]=\"form.IsCurrent\"\n (change)=\"OnUseForm(form)\">\n <span class=\"mj-pm-form-text\">\n <span class=\"mj-pm-row-name\">{{ form.Title }}</span>\n <span class=\"mj-pm-row-sub\">\n {{ form.AudienceLabel }}@if (form.IsCurrent) { · <span class=\"mj-pm-on\">what you see</span> }\n </span>\n </span>\n </label>\n @if (form.CanPublish || form.CanChangeAudience) {\n <button type=\"button\" mjButton Variant=\"flat\" Size=\"sm\" class=\"mj-pm-action\"\n [disabled]=\"Busy === form.ID\"\n (click)=\"OnPublishForm(form)\">{{ form.CanPublish ? 'Publish…' : 'Audience…' }}</button>\n }\n </div>\n }\n </div>\n </section>\n }\n\n @if (IsEmpty) {\n <div class=\"mj-pm-empty\">\n <i class=\"fa-solid fa-layer-group\" aria-hidden=\"true\"></i>\n <p class=\"mj-pm-empty-title\">Nothing is registered on this form yet</p>\n <p class=\"mj-pm-empty-note\">Panels you add from a conversation show up here.</p>\n </div>\n }\n\n @for (group of Groups; track group.Key) {\n <section class=\"mj-pm-group\">\n <div class=\"mj-pm-group-head\">\n <span class=\"mj-pm-group-title\">{{ group.Title }}</span>\n <span class=\"mj-pm-group-count\">{{ group.Items.length }}</span>\n </div>\n @if (group.Note) {\n <p class=\"mj-pm-group-note\">{{ group.Note }}</p>\n }\n\n <div class=\"mj-pm-stack\">\n @for (item of group.Items; track item.ID) {\n <div class=\"mj-pm-row\" [class.is-quiet]=\"!item.CanEdit\">\n <i [class]=\"item.Icon\" class=\"mj-pm-row-icon\" aria-hidden=\"true\"></i>\n\n <div class=\"mj-pm-row-main\">\n <span class=\"mj-pm-row-name\">{{ item.Title }}</span>\n <span class=\"mj-pm-row-sub\">{{ item.Subtitle }}</span>\n <span class=\"mj-pm-row-where\">\n @if (item.Slot) {\n <span class=\"mj-pm-chip mj-pm-mono\">{{ item.Slot }}</span>\n }\n @if (item.Replaces) {\n <span class=\"mj-pm-chip\">stands in for {{ item.Replaces }}</span>\n }\n <span class=\"mj-pm-chip\">{{ item.AudienceLabel }}</span>\n <span class=\"mj-pm-chip\" [class.mj-pm-chip--on]=\"item.State === 'active'\">{{ item.StateLabel }}</span>\n </span>\n </div>\n\n @if (item.CanEdit || item.CanTurnOn || item.CanTurnOff || item.CanRemove\n || item.CanHide || item.CanShow || item.CanPublish || item.CanChangeAudience) {\n <div class=\"mj-pm-row-actions\">\n @if (item.CanShow) {\n <button type=\"button\" mjButton Variant=\"outline\" Size=\"sm\" class=\"mj-pm-action\"\n (click)=\"OnShow(item)\">Show again</button>\n }\n @if (item.CanEdit) {\n <button type=\"button\" mjButton Variant=\"outline\" Size=\"sm\" class=\"mj-pm-action\"\n [disabled]=\"Busy === item.ID\"\n (click)=\"OnEdit(item)\">Change where it goes</button>\n }\n @if (item.CanTurnOn || item.CanTurnOff) {\n <button type=\"button\" mjButton Variant=\"flat\" Size=\"sm\" class=\"mj-pm-action\"\n [disabled]=\"Busy === item.ID\"\n (click)=\"OnToggle(item)\">{{ ToggleLabel(item) }}</button>\n }\n @if (item.CanPublish || item.CanChangeAudience) {\n <button type=\"button\" mjButton Variant=\"flat\" Size=\"sm\" class=\"mj-pm-action\"\n [disabled]=\"Busy === item.ID\"\n (click)=\"OnPublishPanel(item)\">{{ item.CanPublish ? 'Publish…' : 'Audience…' }}</button>\n }\n @if (item.CanHide) {\n <button type=\"button\" mjButton Variant=\"flat\" Size=\"sm\" class=\"mj-pm-action\"\n (click)=\"OnHide(item)\">Hide for me</button>\n }\n @if (item.CanRemove) {\n <button type=\"button\" mjButton Size=\"sm\" class=\"mj-pm-action\"\n [Variant]=\"RemoveVariant(item)\"\n [disabled]=\"Busy === item.ID\"\n (click)=\"OnRemove(item)\">{{ RemoveLabel(item) }}</button>\n }\n </div>\n }\n </div>\n }\n </div>\n </section>\n }\n </div>\n\n <div class=\"mj-pm-foot\">\n <span class=\"mj-pm-summary\">{{ Summary }}</span>\n </div>\n\n @if (Publishing; as target) {\n <div class=\"mj-pm-audience\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Who sees this\">\n <div class=\"mj-pm-eyebrow\">Who sees it</div>\n <p class=\"mj-pm-audience-title\">{{ target.Title }}</p>\n <div class=\"mj-pm-stack\" role=\"radiogroup\" aria-label=\"Audience\">\n @for (scope of ['User', 'Role', 'Global']; track scope) {\n <label class=\"mj-pm-choice\" [class.is-on]=\"target.Scope === scope\">\n <input type=\"radio\" name=\"mj-pm-audience\"\n [checked]=\"target.Scope === scope\"\n (change)=\"target.Scope = $any(scope)\">\n <span>{{ AudienceOption($any(scope)) }}</span>\n </label>\n }\n </div>\n @if (target.Scope === 'Role') {\n <select class=\"mj-pm-audience-role\" aria-label=\"Which role\"\n [value]=\"target.RoleID ?? ''\"\n (change)=\"target.RoleID = $any($event.target).value || null\">\n <option value=\"\">Choose a role…</option>\n @for (role of RoleOptions; track role.ID) {\n <option [value]=\"role.ID\">{{ role.Name }}</option>\n }\n </select>\n }\n <p class=\"mj-pm-audience-consequence\">{{ AudienceConsequence }}</p>\n <div class=\"mj-pm-audience-actions\">\n <button type=\"button\" mjButton Variant=\"primary\" Size=\"sm\"\n [disabled]=\"!CanConfirmAudience\"\n (click)=\"ConfirmAudience()\">Save audience</button>\n <button type=\"button\" mjButton Variant=\"secondary\" Size=\"sm\" (click)=\"CancelAudience()\">Cancel</button>\n </div>\n </div>\n }\n\n @if (Editing && EditContext) {\n <div class=\"mj-pm-edit\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Change where this panel goes\"\n (click)=\"OnEditScrimClick($event)\">\n <mj-form-placement-dialog\n [Provider]=\"Provider\"\n [Context]=\"EditContext\"\n [Proposal]=\"EditProposal\"\n [ComponentName]=\"Editing.Title\"\n [SeedState]=\"SeedEdit\"\n [RecordKey]=\"RecordKey\"\n [ReplacesRowID]=\"Editing.ID\"\n [PanelComponentID]=\"EditComponentID\"\n [VisibleTo]=\"EditVisibleTo\"\n [OfferKeepOff]=\"EditStatus === 'Inactive'\"\n (Applied)=\"OnEditApplied($event)\"\n (Cancelled)=\"CloseEdit()\">\n </mj-form-placement-dialog>\n </div>\n }\n\n </div>\n </div>\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseFormPanel, type FormPanelRegistrationMetadata } from './base-form-panel';
|
|
2
|
+
import { type FormContributionRegistration } from './form-contribution';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* A panel that draws one form contribution: a collapsible panel with its title and icon, or a
|
|
6
|
+
* bare strip. Holds what that chrome reads from the contribution. The host for a saved row and
|
|
7
|
+
* the placement preview's stand-in both extend it; each supplies its own section key and title.
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class BaseContributionPanel extends BaseFormPanel {
|
|
10
|
+
Contribution: FormContributionRegistration;
|
|
11
|
+
/** The key the rail files this panel by. */
|
|
12
|
+
abstract get SectionKey(): string;
|
|
13
|
+
/** The panel's header and rail label. */
|
|
14
|
+
abstract get Title(): string;
|
|
15
|
+
/**
|
|
16
|
+
* The panel's icon, completed if it was stored without a style.
|
|
17
|
+
*
|
|
18
|
+
* Font Awesome needs a style class beside the name: `fa-chart-column` alone matches a
|
|
19
|
+
* rule that sets a glyph but no font family, so nothing draws. Rows written before the
|
|
20
|
+
* picker existed carry bare names, and normalizing on the way out makes them render
|
|
21
|
+
* rather than requiring each one to be edited.
|
|
22
|
+
*/
|
|
23
|
+
get Icon(): string;
|
|
24
|
+
/**
|
|
25
|
+
* The key a bare strip is filed under in the rail, when it replaces blocks and so belongs to
|
|
26
|
+
* their tab. Null for a strip that replaces nothing, which sits above every tab.
|
|
27
|
+
*/
|
|
28
|
+
get BareTabKey(): string | null;
|
|
29
|
+
get IsBare(): boolean;
|
|
30
|
+
get IsRelatedClaim(): boolean;
|
|
31
|
+
get Variant(): 'default' | 'related-entity';
|
|
32
|
+
/**
|
|
33
|
+
* The registration this panel renders, which it holds as a whole contribution rather
|
|
34
|
+
* than as the bare bag the slot host assigns. Answers `DisplayOrder` on the base.
|
|
35
|
+
*/
|
|
36
|
+
protected get PanelMetadata(): FormPanelRegistrationMetadata | undefined;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseContributionPanel, never>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseContributionPanel, never, never, { "Contribution": { "alias": "Contribution"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=base-contribution-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-contribution-panel.d.ts","sourceRoot":"","sources":["../../../src/lib/panel-slot/base-contribution-panel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAuB,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;;AAE7F;;;;GAIG;AACH,8BACsB,qBAAsB,SAAQ,aAAa;IACpD,YAAY,EAAG,4BAA4B,CAAC;IAErD,4CAA4C;IAC5C,aAAoB,UAAU,IAAI,MAAM,CAAC;IAEzC,yCAAyC;IACzC,aAAoB,KAAK,IAAI,MAAM,CAAC;IAEpC;;;;;;;OAOG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;OAGG;IACH,IAAW,UAAU,IAAI,MAAM,GAAG,IAAI,CAErC;IAED,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,IAAW,cAAc,IAAI,OAAO,CAEnC;IAED,IAAW,OAAO,IAAI,SAAS,GAAG,gBAAgB,CAEjD;IAED;;;OAGG;IACH,cAAuB,aAAa,IAAI,6BAA6B,GAAG,SAAS,CAEhF;yCA/CiB,qBAAqB;2CAArB,qBAAqB;CAgD1C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
|
+
import { NormalizeIconClass } from '@memberjunction/ng-ui-components';
|
|
3
|
+
import { BaseFormPanel } from './base-form-panel';
|
|
4
|
+
import { ReplacedSectionKeys } from './form-contribution';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* A panel that draws one form contribution: a collapsible panel with its title and icon, or a
|
|
8
|
+
* bare strip. Holds what that chrome reads from the contribution. The host for a saved row and
|
|
9
|
+
* the placement preview's stand-in both extend it; each supplies its own section key and title.
|
|
10
|
+
*/
|
|
11
|
+
export class BaseContributionPanel extends BaseFormPanel {
|
|
12
|
+
Contribution;
|
|
13
|
+
/**
|
|
14
|
+
* The panel's icon, completed if it was stored without a style.
|
|
15
|
+
*
|
|
16
|
+
* Font Awesome needs a style class beside the name: `fa-chart-column` alone matches a
|
|
17
|
+
* rule that sets a glyph but no font family, so nothing draws. Rows written before the
|
|
18
|
+
* picker existed carry bare names, and normalizing on the way out makes them render
|
|
19
|
+
* rather than requiring each one to be edited.
|
|
20
|
+
*/
|
|
21
|
+
get Icon() {
|
|
22
|
+
return NormalizeIconClass(this.Contribution.Icon) || 'fa-solid fa-puzzle-piece';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The key a bare strip is filed under in the rail, when it replaces blocks and so belongs to
|
|
26
|
+
* their tab. Null for a strip that replaces nothing, which sits above every tab.
|
|
27
|
+
*/
|
|
28
|
+
get BareTabKey() {
|
|
29
|
+
return ReplacedSectionKeys(this.Contribution.Metadata).length > 0 ? this.SectionKey : null;
|
|
30
|
+
}
|
|
31
|
+
get IsBare() {
|
|
32
|
+
return (this.Contribution.Presentation ?? this.Contribution.Metadata.presentation) === 'bare';
|
|
33
|
+
}
|
|
34
|
+
get IsRelatedClaim() {
|
|
35
|
+
return !!this.Contribution.Metadata.relatedEntity?.trim();
|
|
36
|
+
}
|
|
37
|
+
get Variant() {
|
|
38
|
+
return this.IsRelatedClaim ? 'related-entity' : 'default';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The registration this panel renders, which it holds as a whole contribution rather
|
|
42
|
+
* than as the bare bag the slot host assigns. Answers `DisplayOrder` on the base.
|
|
43
|
+
*/
|
|
44
|
+
get PanelMetadata() {
|
|
45
|
+
return this.Contribution?.Metadata ?? super.PanelMetadata;
|
|
46
|
+
}
|
|
47
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵBaseContributionPanel_BaseFactory; return function BaseContributionPanel_Factory(__ngFactoryType__) { return (ɵBaseContributionPanel_BaseFactory || (ɵBaseContributionPanel_BaseFactory = i0.ɵɵgetInheritedFactory(BaseContributionPanel)))(__ngFactoryType__ || BaseContributionPanel); }; })();
|
|
48
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: BaseContributionPanel, inputs: { Contribution: "Contribution" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
49
|
+
}
|
|
50
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseContributionPanel, [{
|
|
51
|
+
type: Directive
|
|
52
|
+
}], null, { Contribution: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}] }); })();
|
|
55
|
+
//# sourceMappingURL=base-contribution-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-contribution-panel.js","sourceRoot":"","sources":["../../../src/lib/panel-slot/base-contribution-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAsC,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAqC,MAAM,qBAAqB,CAAC;;AAE7F;;;;GAIG;AAEH,MAAM,OAAgB,qBAAsB,SAAQ,aAAa;IACpD,YAAY,CAAgC;IAQrD;;;;;;;OAOG;IACH,IAAW,IAAI;QACX,OAAO,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,0BAA0B,CAAC;IACpF,CAAC;IAED;;;OAGG;IACH,IAAW,UAAU;QACjB,OAAO,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/F,CAAC;IAED,IAAW,MAAM;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,MAAM,CAAC;IAClG,CAAC;IAED,IAAW,cAAc;QACrB,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9D,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACH,IAAuB,aAAa;QAChC,OAAO,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,KAAK,CAAC,aAAa,CAAC;IAC9D,CAAC;iQA/CiB,qBAAqB,yBAArB,qBAAqB;6DAArB,qBAAqB;;iFAArB,qBAAqB;cAD1C,SAAS;;kBAEL,KAAK","sourcesContent":["import { Directive, Input } from '@angular/core';\nimport { NormalizeIconClass } from '@memberjunction/ng-ui-components';\nimport { BaseFormPanel, type FormPanelRegistrationMetadata } from './base-form-panel';\nimport { ReplacedSectionKeys, type FormContributionRegistration } from './form-contribution';\n\n/**\n * A panel that draws one form contribution: a collapsible panel with its title and icon, or a\n * bare strip. Holds what that chrome reads from the contribution. The host for a saved row and\n * the placement preview's stand-in both extend it; each supplies its own section key and title.\n */\n@Directive()\nexport abstract class BaseContributionPanel extends BaseFormPanel {\n @Input() Contribution!: FormContributionRegistration;\n\n /** The key the rail files this panel by. */\n public abstract get SectionKey(): string;\n\n /** The panel's header and rail label. */\n public abstract get Title(): string;\n\n /**\n * The panel's icon, completed if it was stored without a style.\n *\n * Font Awesome needs a style class beside the name: `fa-chart-column` alone matches a\n * rule that sets a glyph but no font family, so nothing draws. Rows written before the\n * picker existed carry bare names, and normalizing on the way out makes them render\n * rather than requiring each one to be edited.\n */\n public get Icon(): string {\n return NormalizeIconClass(this.Contribution.Icon) || 'fa-solid fa-puzzle-piece';\n }\n\n /**\n * The key a bare strip is filed under in the rail, when it replaces blocks and so belongs to\n * their tab. Null for a strip that replaces nothing, which sits above every tab.\n */\n public get BareTabKey(): string | null {\n return ReplacedSectionKeys(this.Contribution.Metadata).length > 0 ? this.SectionKey : null;\n }\n\n public get IsBare(): boolean {\n return (this.Contribution.Presentation ?? this.Contribution.Metadata.presentation) === 'bare';\n }\n\n public get IsRelatedClaim(): boolean {\n return !!this.Contribution.Metadata.relatedEntity?.trim();\n }\n\n public get Variant(): 'default' | 'related-entity' {\n return this.IsRelatedClaim ? 'related-entity' : 'default';\n }\n\n /**\n * The registration this panel renders, which it holds as a whole contribution rather\n * than as the bare bag the slot host assigns. Answers `DisplayOrder` on the base.\n */\n protected override get PanelMetadata(): FormPanelRegistrationMetadata | undefined {\n return this.Contribution?.Metadata ?? super.PanelMetadata;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEntity, ValidationResult, type FormInclusion } from '@memberjunction/core';
|
|
1
|
+
import { BaseEntity, ValidationResult, type FormInclusion, type FormWhenEmpty } from '@memberjunction/core';
|
|
2
2
|
import { BaseFormComponent } from '../base-form-component';
|
|
3
3
|
import { FormContext } from '../types/form-types';
|
|
4
4
|
import { FormToolbarItemConfig, FormToolbarItemKey } from '../types/form-toolbar-item';
|
|
@@ -79,6 +79,21 @@ export interface FormPanelRegistrationMetadata extends Record<string, unknown> {
|
|
|
79
79
|
* is not a collapsible panel. Must name a concrete `entity` (not `'*'`).
|
|
80
80
|
*/
|
|
81
81
|
replacesSectionKey?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Fields this contribution stands in for, all within one section. The panel renders at
|
|
84
|
+
* the top of that section and the named fields are not drawn. Use instead of
|
|
85
|
+
* `replacesSectionKey` when the panel replaces some inputs rather than a whole group.
|
|
86
|
+
*/
|
|
87
|
+
replacesFieldNames?: readonly string[];
|
|
88
|
+
/**
|
|
89
|
+
* Sections this contribution stands in for, all within one tab. It draws in the place of the
|
|
90
|
+
* first of them in the form's order, and the others are not drawn.
|
|
91
|
+
*/
|
|
92
|
+
replacesSectionKeys?: readonly string[];
|
|
93
|
+
/** A section this contribution draws inside, replacing nothing. */
|
|
94
|
+
inSectionKey?: string;
|
|
95
|
+
/** Where inside its section it draws, for `inSectionKey` and field claims. Absent means the start. */
|
|
96
|
+
sectionPosition?: 'start' | 'end';
|
|
82
97
|
/**
|
|
83
98
|
* Pin this contribution to a chrome bucket instead of its own rail item.
|
|
84
99
|
* `'details'` — leftover own-fields group. `'more'` — overflow folder.
|
|
@@ -91,6 +106,15 @@ export interface FormPanelRegistrationMetadata extends Record<string, unknown> {
|
|
|
91
106
|
* L3 `MJ: Form Chrome Rules` still wins. `chromeGroup` still merges.
|
|
92
107
|
*/
|
|
93
108
|
inclusion?: FormInclusion;
|
|
109
|
+
/**
|
|
110
|
+
* `'bare'` = a hero strip that draws no collapsible chrome and is never a rail item.
|
|
111
|
+
* `'panel'` (default) = a normal collapsible section.
|
|
112
|
+
*
|
|
113
|
+
* This is how a compiled panel declares hero-ness, and it is the same field a
|
|
114
|
+
* `MJ: Entity Form Contributions` row carries, so the container treats both sources
|
|
115
|
+
* identically instead of guessing from a contribution key.
|
|
116
|
+
*/
|
|
117
|
+
presentation?: 'panel' | 'bare';
|
|
94
118
|
/**
|
|
95
119
|
* Open a NEW (unsaved) record on this contribution instead of the first first-class group.
|
|
96
120
|
*
|
|
@@ -103,6 +127,44 @@ export interface FormPanelRegistrationMetadata extends Record<string, unknown> {
|
|
|
103
127
|
* how every other conflict between registrations is settled.
|
|
104
128
|
*/
|
|
105
129
|
leadsWhenUnsaved?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* What the form does with this contribution's section when it has 0 rows.
|
|
132
|
+
* `'show'` (default) | `'hide'` | `'more'` (moved into the More folder while
|
|
133
|
+
* empty). Same verbs as `EntityRelationship.Configuration.UI.whenEmpty`; omit to
|
|
134
|
+
* inherit the parent entity's `UI.Form.RelatedWhenEmpty`.
|
|
135
|
+
*/
|
|
136
|
+
whenEmpty?: FormWhenEmpty;
|
|
137
|
+
/**
|
|
138
|
+
* The `SectionKey` of the `<mj-collapsible-panel>` this contribution renders,
|
|
139
|
+
* when it differs from {@link contributionKey} (e.g. `contributionKey: 'links'`
|
|
140
|
+
* rendering `SectionKey="activityParticipants"`). Counts, badges and `whenEmpty`
|
|
141
|
+
* are keyed by the section the user sees. Omit when they are the same.
|
|
142
|
+
*/
|
|
143
|
+
sectionKey?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Prefetch this contribution's row count when the record loads and show it as
|
|
146
|
+
* a badge. Omit to inherit the parent entity's `UI.Form.ShowRelatedCounts`
|
|
147
|
+
* (default `true`).
|
|
148
|
+
*/
|
|
149
|
+
showCount?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* What to count for this contribution. Omit to derive it from
|
|
152
|
+
* {@link relatedEntity} / {@link relatedJoinField}. `false` disables the
|
|
153
|
+
* prefetch. A contribution with no count source can still report its own
|
|
154
|
+
* count after it mounts via `FormComponent.SetSectionRowCount(key, n)`.
|
|
155
|
+
*/
|
|
156
|
+
count?: FormContributionCountSpec | false;
|
|
157
|
+
}
|
|
158
|
+
/** The related rows a contribution's badge / empty check counts. */
|
|
159
|
+
export interface FormContributionCountSpec {
|
|
160
|
+
/** Entity to count (e.g. `'MJ_BizApps_Orders: Order Headers'`). */
|
|
161
|
+
entity: string;
|
|
162
|
+
/**
|
|
163
|
+
* FK field(s) on {@link entity} that point at the parent record. Several
|
|
164
|
+
* fields are ORed (Bill-To OR Ship-To). Omit when the entity has exactly one
|
|
165
|
+
* relationship to the parent.
|
|
166
|
+
*/
|
|
167
|
+
joinFields?: string[];
|
|
106
168
|
}
|
|
107
169
|
/**
|
|
108
170
|
* Abstract base for every dynamically-injectable form panel.
|
|
@@ -117,9 +179,9 @@ export interface FormPanelRegistrationMetadata extends Record<string, unknown> {
|
|
|
117
179
|
* Lifecycle hooks: standard Angular `ngOnInit` / `ngOnDestroy` work as usual.
|
|
118
180
|
* `Record` is guaranteed to be set before the first change-detection pass.
|
|
119
181
|
*
|
|
120
|
-
* Optional `
|
|
121
|
-
* `BaseFormComponent.
|
|
122
|
-
*
|
|
182
|
+
* Optional `Validate()` returns a validation result, or a Promise of one.
|
|
183
|
+
* `BaseFormComponent.SaveRecord()` awaits every mounted panel's result and refuses the
|
|
184
|
+
* save when one fails. Panels that don't validate anything beyond what the
|
|
123
185
|
* record itself does can leave this method off.
|
|
124
186
|
*/
|
|
125
187
|
export declare abstract class BaseFormPanel<TRecord extends BaseEntity = BaseEntity> {
|
|
@@ -135,6 +197,39 @@ export declare abstract class BaseFormPanel<TRecord extends BaseEntity = BaseEnt
|
|
|
135
197
|
FormComponent: BaseFormComponent;
|
|
136
198
|
/** Optional form context — same shape the collapsible-panel chrome expects. Set by the slot host. */
|
|
137
199
|
FormContext?: FormContext;
|
|
200
|
+
/**
|
|
201
|
+
* The registration this panel was mounted from. Set by the slot host.
|
|
202
|
+
*
|
|
203
|
+
* A panel reads its own slot from here, which is the only way it can know where in the
|
|
204
|
+
* form it was asked to sit: the class registration is looked up by the host, not by the
|
|
205
|
+
* panel, so nothing else on the instance carries it.
|
|
206
|
+
*/
|
|
207
|
+
RegistrationMetadata?: FormPanelRegistrationMetadata;
|
|
208
|
+
/**
|
|
209
|
+
* The slot element the panel was mounted in, set by the slot host. It is where the panel is
|
|
210
|
+
* on the page, which {@link DisplayOrder} reads its neighbours from.
|
|
211
|
+
*/
|
|
212
|
+
SlotElement: HTMLElement | null;
|
|
213
|
+
/**
|
|
214
|
+
* The registration a subclass answers from. Overridden where the panel holds its
|
|
215
|
+
* registration somewhere other than {@link RegistrationMetadata}.
|
|
216
|
+
*/
|
|
217
|
+
protected get PanelMetadata(): FormPanelRegistrationMetadata | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* Flex order for the panel's own `mj-collapsible-panel`, to pass as `[Order]`.
|
|
220
|
+
*
|
|
221
|
+
* A panel's section key is not in the form's section order, so without this the form
|
|
222
|
+
* falls back to the section count and draws every panel at the bottom whatever slot it
|
|
223
|
+
* asked for. A panel standing in for a section takes that section's place instead, so
|
|
224
|
+
* replacing something does not also move it.
|
|
225
|
+
*
|
|
226
|
+
* A slot between the form's blocks takes the order of the section beside it on the page,
|
|
227
|
+
* so the panel draws where the slot is (see {@link SlotAnchorSectionKey}). The very top and
|
|
228
|
+
* the very bottom keep fixed bands: the bottom has to stay below the More folder.
|
|
229
|
+
*/
|
|
230
|
+
get DisplayOrder(): number;
|
|
231
|
+
/** The order of the section beside the slot this panel is in, or null when there is none to read. */
|
|
232
|
+
private anchoredOrder;
|
|
138
233
|
/**
|
|
139
234
|
* Convenience getter for read-only / edit-mode rendering. Falls back to
|
|
140
235
|
* `false` when the panel is shown outside a `BaseFormComponent` host (e.g.,
|
|
@@ -144,14 +239,27 @@ export declare abstract class BaseFormPanel<TRecord extends BaseEntity = BaseEnt
|
|
|
144
239
|
get EditMode(): boolean;
|
|
145
240
|
/**
|
|
146
241
|
* Override to add per-panel validation that should block the parent form's
|
|
147
|
-
*
|
|
242
|
+
* `SaveRecord()`. Return `{ Success: true, Errors: [] }` when valid, or include
|
|
148
243
|
* `ValidationErrorInfo` entries to surface field-level errors. The default
|
|
149
244
|
* implementation reports valid (panels that don't need extra validation
|
|
150
245
|
* can leave this method off).
|
|
246
|
+
*
|
|
247
|
+
* May return a Promise: a panel that validates against the server has no
|
|
248
|
+
* synchronous answer. `BaseFormComponent.ValidateAsync()` awaits it, which is
|
|
249
|
+
* what `SaveRecord()` calls.
|
|
151
250
|
*/
|
|
152
|
-
Validate(): ValidationResult
|
|
251
|
+
Validate(): ValidationResult | Promise<ValidationResult>;
|
|
153
252
|
/** @deprecated Use {@link Validate}. */
|
|
154
|
-
validate(): ValidationResult
|
|
253
|
+
validate(): ValidationResult | Promise<ValidationResult>;
|
|
254
|
+
/**
|
|
255
|
+
* The panel's validity as already known, with no awaiting and no work.
|
|
256
|
+
*
|
|
257
|
+
* Synchronous callers (`BaseFormComponent.Validate()`) use this; it reports valid
|
|
258
|
+
* unless the panel has cached a failing result from an earlier validation. A panel
|
|
259
|
+
* whose `Validate()` is asynchronous should override this to return its last
|
|
260
|
+
* reported state so synchronous callers are not simply blind to it.
|
|
261
|
+
*/
|
|
262
|
+
LastKnownValidation(): ValidationResult;
|
|
155
263
|
/**
|
|
156
264
|
* Called after the parent form reloads the current record from the database.
|
|
157
265
|
* Default is a no-op. Override to refresh panel-owned data that is not a
|
|
@@ -193,6 +301,6 @@ export declare abstract class BaseFormPanel<TRecord extends BaseEntity = BaseEnt
|
|
|
193
301
|
*/
|
|
194
302
|
SetToolbarItemOrder(key: FormToolbarItemKey, order: number): void;
|
|
195
303
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormPanel<any>, never>;
|
|
196
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormPanel<any>, never, never, { "Record": { "alias": "Record"; "required": false; }; "FormComponent": { "alias": "FormComponent"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; }, {}, never, never, true, never>;
|
|
304
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormPanel<any>, never, never, { "Record": { "alias": "Record"; "required": false; }; "FormComponent": { "alias": "FormComponent"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "RegistrationMetadata": { "alias": "RegistrationMetadata"; "required": false; }; }, {}, never, never, true, never>;
|
|
197
305
|
}
|
|
198
306
|
//# sourceMappingURL=base-form-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-panel.d.ts","sourceRoot":"","sources":["../../../src/lib/panel-slot/base-form-panel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"base-form-panel.d.ts","sourceRoot":"","sources":["../../../src/lib/panel-slot/base-form-panel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;;AAIvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,aAAa,GACnB,UAAU,GACV,eAAe,GACf,cAAc,GACd,eAAe,GACf,kBAAkB,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,6BAA8B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAA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;;;;;;;OAWG;IACH,IAAW,YAAY,IAAI,MAAM,CAQhC;IAED,qGAAqG;IACrG,OAAO,CAAC,aAAa;IAOrB;;;;;OAKG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;;;;;;;;;;OAUG;IACI,QAAQ,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQ/D,wCAAwC;IACjC,QAAQ,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI/D;;;;;;;OAOG;IACI,mBAAmB,IAAI,gBAAgB;IAM9C;;;;;OAKG;IACI,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIhD;;OAEG;IACI,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAI7D;;OAEG;IACI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI/C;;;OAGG;IACI,oBAAoB,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI;IAIrG;;OAEG;IACI,eAAe,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAIrD;;OAEG;IACI,eAAe,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAIrD;;OAEG;IACI,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIzE;;OAEG;IACI,iBAAiB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAIvD;;OAEG;IACI,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;yCApLtD,aAAa;2CAAb,aAAa;CAuLlC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Directive, HostBinding, Input } from '@angular/core';
|
|
2
2
|
import { ValidationResult } from '@memberjunction/core';
|
|
3
|
+
import { ANCHORED_SLOTS, SlotAnchorSectionKey, SlotDisplayOrder } from './slot-order';
|
|
4
|
+
import { ReplacedSectionKeys } from './form-contribution';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
/**
|
|
5
7
|
* Abstract base for every dynamically-injectable form panel.
|
|
@@ -14,9 +16,9 @@ import * as i0 from "@angular/core";
|
|
|
14
16
|
* Lifecycle hooks: standard Angular `ngOnInit` / `ngOnDestroy` work as usual.
|
|
15
17
|
* `Record` is guaranteed to be set before the first change-detection pass.
|
|
16
18
|
*
|
|
17
|
-
* Optional `
|
|
18
|
-
* `BaseFormComponent.
|
|
19
|
-
*
|
|
19
|
+
* Optional `Validate()` returns a validation result, or a Promise of one.
|
|
20
|
+
* `BaseFormComponent.SaveRecord()` awaits every mounted panel's result and refuses the
|
|
21
|
+
* save when one fails. Panels that don't validate anything beyond what the
|
|
20
22
|
* record itself does can leave this method off.
|
|
21
23
|
*/
|
|
22
24
|
export class BaseFormPanel {
|
|
@@ -32,6 +34,56 @@ export class BaseFormPanel {
|
|
|
32
34
|
FormComponent;
|
|
33
35
|
/** Optional form context — same shape the collapsible-panel chrome expects. Set by the slot host. */
|
|
34
36
|
FormContext;
|
|
37
|
+
/**
|
|
38
|
+
* The registration this panel was mounted from. Set by the slot host.
|
|
39
|
+
*
|
|
40
|
+
* A panel reads its own slot from here, which is the only way it can know where in the
|
|
41
|
+
* form it was asked to sit: the class registration is looked up by the host, not by the
|
|
42
|
+
* panel, so nothing else on the instance carries it.
|
|
43
|
+
*/
|
|
44
|
+
RegistrationMetadata;
|
|
45
|
+
/**
|
|
46
|
+
* The slot element the panel was mounted in, set by the slot host. It is where the panel is
|
|
47
|
+
* on the page, which {@link DisplayOrder} reads its neighbours from.
|
|
48
|
+
*/
|
|
49
|
+
SlotElement = null;
|
|
50
|
+
/**
|
|
51
|
+
* The registration a subclass answers from. Overridden where the panel holds its
|
|
52
|
+
* registration somewhere other than {@link RegistrationMetadata}.
|
|
53
|
+
*/
|
|
54
|
+
get PanelMetadata() {
|
|
55
|
+
return this.RegistrationMetadata;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Flex order for the panel's own `mj-collapsible-panel`, to pass as `[Order]`.
|
|
59
|
+
*
|
|
60
|
+
* A panel's section key is not in the form's section order, so without this the form
|
|
61
|
+
* falls back to the section count and draws every panel at the bottom whatever slot it
|
|
62
|
+
* asked for. A panel standing in for a section takes that section's place instead, so
|
|
63
|
+
* replacing something does not also move it.
|
|
64
|
+
*
|
|
65
|
+
* A slot between the form's blocks takes the order of the section beside it on the page,
|
|
66
|
+
* so the panel draws where the slot is (see {@link SlotAnchorSectionKey}). The very top and
|
|
67
|
+
* the very bottom keep fixed bands: the bottom has to stay below the More folder.
|
|
68
|
+
*/
|
|
69
|
+
get DisplayOrder() {
|
|
70
|
+
const metadata = this.PanelMetadata;
|
|
71
|
+
// Standing in for several sections, it takes the place of whichever comes first.
|
|
72
|
+
const places = ReplacedSectionKeys(metadata)
|
|
73
|
+
.map((key) => this.FormComponent?.getSectionOrderIndex?.(key))
|
|
74
|
+
.filter((index) => index != null);
|
|
75
|
+
if (places.length > 0)
|
|
76
|
+
return Math.min(...places);
|
|
77
|
+
return this.anchoredOrder() ?? SlotDisplayOrder(metadata?.slot ?? 'after-everything', metadata?.sortKey ?? 0);
|
|
78
|
+
}
|
|
79
|
+
/** The order of the section beside the slot this panel is in, or null when there is none to read. */
|
|
80
|
+
anchoredOrder() {
|
|
81
|
+
const slot = this.SlotElement?.getAttribute('data-form-slot');
|
|
82
|
+
if (!slot || !ANCHORED_SLOTS.has(slot) || !this.FormComponent?.getSectionDisplayOrder)
|
|
83
|
+
return null;
|
|
84
|
+
const anchor = SlotAnchorSectionKey(this.SlotElement);
|
|
85
|
+
return anchor ? this.FormComponent.getSectionDisplayOrder(anchor.Key) : null;
|
|
86
|
+
}
|
|
35
87
|
/**
|
|
36
88
|
* Convenience getter for read-only / edit-mode rendering. Falls back to
|
|
37
89
|
* `false` when the panel is shown outside a `BaseFormComponent` host (e.g.,
|
|
@@ -43,10 +95,14 @@ export class BaseFormPanel {
|
|
|
43
95
|
}
|
|
44
96
|
/**
|
|
45
97
|
* Override to add per-panel validation that should block the parent form's
|
|
46
|
-
*
|
|
98
|
+
* `SaveRecord()`. Return `{ Success: true, Errors: [] }` when valid, or include
|
|
47
99
|
* `ValidationErrorInfo` entries to surface field-level errors. The default
|
|
48
100
|
* implementation reports valid (panels that don't need extra validation
|
|
49
101
|
* can leave this method off).
|
|
102
|
+
*
|
|
103
|
+
* May return a Promise: a panel that validates against the server has no
|
|
104
|
+
* synchronous answer. `BaseFormComponent.ValidateAsync()` awaits it, which is
|
|
105
|
+
* what `SaveRecord()` calls.
|
|
50
106
|
*/
|
|
51
107
|
Validate() {
|
|
52
108
|
// Inline construction — ValidationResult is a class in @memberjunction/core,
|
|
@@ -59,6 +115,19 @@ export class BaseFormPanel {
|
|
|
59
115
|
validate() {
|
|
60
116
|
return this.Validate();
|
|
61
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* The panel's validity as already known, with no awaiting and no work.
|
|
120
|
+
*
|
|
121
|
+
* Synchronous callers (`BaseFormComponent.Validate()`) use this; it reports valid
|
|
122
|
+
* unless the panel has cached a failing result from an earlier validation. A panel
|
|
123
|
+
* whose `Validate()` is asynchronous should override this to return its last
|
|
124
|
+
* reported state so synchronous callers are not simply blind to it.
|
|
125
|
+
*/
|
|
126
|
+
LastKnownValidation() {
|
|
127
|
+
const result = new ValidationResult();
|
|
128
|
+
result.Success = true;
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
62
131
|
/**
|
|
63
132
|
* Called after the parent form reloads the current record from the database.
|
|
64
133
|
* Default is a no-op. Override to refresh panel-owned data that is not a
|
|
@@ -120,7 +189,7 @@ export class BaseFormPanel {
|
|
|
120
189
|
static ɵfac = function BaseFormPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseFormPanel)(); };
|
|
121
190
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: BaseFormPanel, hostVars: 2, hostBindings: function BaseFormPanel_HostBindings(rf, ctx) { if (rf & 2) {
|
|
122
191
|
i0.ɵɵstyleProp("display", ctx.HostDisplay);
|
|
123
|
-
} }, inputs: { Record: "Record", FormComponent: "FormComponent", FormContext: "FormContext" } });
|
|
192
|
+
} }, inputs: { Record: "Record", FormComponent: "FormComponent", FormContext: "FormContext", RegistrationMetadata: "RegistrationMetadata" } });
|
|
124
193
|
}
|
|
125
194
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseFormPanel, [{
|
|
126
195
|
type: Directive
|
|
@@ -133,5 +202,7 @@ export class BaseFormPanel {
|
|
|
133
202
|
type: Input
|
|
134
203
|
}], FormContext: [{
|
|
135
204
|
type: Input
|
|
205
|
+
}], RegistrationMetadata: [{
|
|
206
|
+
type: Input
|
|
136
207
|
}] }); })();
|
|
137
208
|
//# sourceMappingURL=base-form-panel.js.map
|