@memberjunction/ng-base-forms 6.2.0-edge.7 → 6.2.0-edge.8

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.
Files changed (84) hide show
  1. package/README.md +10 -0
  2. package/dist/lib/base-form-component.d.ts +15 -2
  3. package/dist/lib/base-form-component.d.ts.map +1 -1
  4. package/dist/lib/base-form-component.js +18 -8
  5. package/dist/lib/base-form-component.js.map +1 -1
  6. package/dist/lib/chrome/form-chrome-coordinator.service.d.ts.map +1 -1
  7. package/dist/lib/chrome/form-chrome-coordinator.service.js +4 -1
  8. package/dist/lib/chrome/form-chrome-coordinator.service.js.map +1 -1
  9. package/dist/lib/chrome/phone-viewport.d.ts +15 -0
  10. package/dist/lib/chrome/phone-viewport.d.ts.map +1 -0
  11. package/dist/lib/chrome/phone-viewport.js +28 -0
  12. package/dist/lib/chrome/phone-viewport.js.map +1 -0
  13. package/dist/lib/comments/form-record-comments-coordinator.service.d.ts +159 -0
  14. package/dist/lib/comments/form-record-comments-coordinator.service.d.ts.map +1 -0
  15. package/dist/lib/comments/form-record-comments-coordinator.service.js +421 -0
  16. package/dist/lib/comments/form-record-comments-coordinator.service.js.map +1 -0
  17. package/dist/lib/comments/record-comments.component.d.ts +205 -0
  18. package/dist/lib/comments/record-comments.component.d.ts.map +1 -0
  19. package/dist/lib/comments/record-comments.component.js +2019 -0
  20. package/dist/lib/comments/record-comments.component.js.map +1 -0
  21. package/dist/lib/container/record-form-container.component.d.ts +47 -1
  22. package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
  23. package/dist/lib/container/record-form-container.component.js +876 -316
  24. package/dist/lib/container/record-form-container.component.js.map +1 -1
  25. package/dist/lib/field/default-fk-lookup-strategy.d.ts.map +1 -1
  26. package/dist/lib/field/default-fk-lookup-strategy.js +14 -6
  27. package/dist/lib/field/default-fk-lookup-strategy.js.map +1 -1
  28. package/dist/lib/field/fk-lookup-strategy.d.ts +11 -0
  29. package/dist/lib/field/fk-lookup-strategy.d.ts.map +1 -1
  30. package/dist/lib/field/fk-lookup-strategy.js +10 -0
  31. package/dist/lib/field/fk-lookup-strategy.js.map +1 -1
  32. package/dist/lib/field/fk-search-utils.d.ts +17 -0
  33. package/dist/lib/field/fk-search-utils.d.ts.map +1 -1
  34. package/dist/lib/field/fk-search-utils.js +29 -0
  35. package/dist/lib/field/fk-search-utils.js.map +1 -1
  36. package/dist/lib/field/form-field.component.d.ts +35 -1
  37. package/dist/lib/field/form-field.component.d.ts.map +1 -1
  38. package/dist/lib/field/form-field.component.js +631 -446
  39. package/dist/lib/field/form-field.component.js.map +1 -1
  40. package/dist/lib/host/entity-form-host.component.d.ts +6 -0
  41. package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
  42. package/dist/lib/host/entity-form-host.component.js +17 -3
  43. package/dist/lib/host/entity-form-host.component.js.map +1 -1
  44. package/dist/lib/panel/collapsible-panel.component.d.ts +5 -0
  45. package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
  46. package/dist/lib/panel/collapsible-panel.component.js +109 -30
  47. package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
  48. package/dist/lib/related-grid-height.d.ts +2 -2
  49. package/dist/lib/related-grid-height.d.ts.map +1 -1
  50. package/dist/lib/related-grid-height.js +2 -2
  51. package/dist/lib/related-grid-height.js.map +1 -1
  52. package/dist/lib/section-indicators/form-section-indicators.d.ts +4 -0
  53. package/dist/lib/section-indicators/form-section-indicators.d.ts.map +1 -1
  54. package/dist/lib/section-indicators/form-section-indicators.js +15 -1
  55. package/dist/lib/section-indicators/form-section-indicators.js.map +1 -1
  56. package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts +17 -0
  57. package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts.map +1 -0
  58. package/dist/lib/toolbar/actions/record-comments-toolbar-action.js +52 -0
  59. package/dist/lib/toolbar/actions/record-comments-toolbar-action.js.map +1 -0
  60. package/dist/lib/toolbar/base-form-toolbar-action.d.ts +9 -0
  61. package/dist/lib/toolbar/base-form-toolbar-action.d.ts.map +1 -1
  62. package/dist/lib/toolbar/base-form-toolbar-action.js.map +1 -1
  63. package/dist/lib/toolbar/form-toolbar.component.d.ts +107 -2
  64. package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
  65. package/dist/lib/toolbar/form-toolbar.component.js +927 -415
  66. package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
  67. package/dist/lib/types/form-toolbar-item.d.ts +1 -1
  68. package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
  69. package/dist/lib/types/form-toolbar-item.js.map +1 -1
  70. package/dist/lib/types/form-types.d.ts +8 -0
  71. package/dist/lib/types/form-types.d.ts.map +1 -1
  72. package/dist/lib/types/form-types.js.map +1 -1
  73. package/dist/lib/types/toolbar-config.d.ts +2 -0
  74. package/dist/lib/types/toolbar-config.d.ts.map +1 -1
  75. package/dist/lib/types/toolbar-config.js.map +1 -1
  76. package/dist/module.d.ts +15 -14
  77. package/dist/module.d.ts.map +1 -1
  78. package/dist/module.js +15 -5
  79. package/dist/module.js.map +1 -1
  80. package/dist/public-api.d.ts +3 -0
  81. package/dist/public-api.d.ts.map +1 -1
  82. package/dist/public-api.js +3 -0
  83. package/dist/public-api.js.map +1 -1
  84. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible-panel.component.js","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts","../../../src/lib/panel/collapsible-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAEtE,eAAe,EAAa,WAAW,EAAE,YAAY,EAAE,UAAU,EACjE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAC;AAC7C,OAAO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AAC,QAAQ,CAAC;;kBAUnC,YAAY;mBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;;kBAOpC,YAAY;mBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;;kFA9oBrB,2BAA2B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject, forwardRef, signal,\n OnChanges, SimpleChanges, OnInit, AfterContentInit, AfterViewInit, OnDestroy,\n ContentChildren, QueryList, HostBinding, HostListener, ElementRef,\n ViewChild, NgZone, ViewEncapsulation\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FormContext, PanelVariant, PanelDragStartEvent, PanelDropEvent } from '../types/form-types';\nimport { IsFormSectionHidden } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { MjFormFieldComponent } from '../field/form-field.component';\nimport type { BaseFormComponent } from '../base-form-component';\nimport { CompositeKey } from '@memberjunction/core';\nimport { EscapeHTML, HighlightSearchMatches, type ValidationErrorInfo } from '@memberjunction/global';\nimport { FormChromeCoordinator } from '../chrome/form-chrome-coordinator.service';\nimport { FormSectionIndicatorCoordinator, type FormSectionIndicatorSource } from '../section-indicators/form-section-indicator-coordinator.service';\nimport { FORM_SECTION_FIELD_HOST, type FormSectionFieldHost } from '../section-indicators/form-section-field-host';\nimport {\n ClaimedCollectionErrors,\n DescribeSectionDirty,\n DescribeSectionErrors,\n DescribeSectionWarnings,\n SectionOwnsValidationSource,\n SumSectionIndicators,\n TallyValidationErrors,\n type FormSectionIndicators,\n type ParsedValidationSource,\n type SectionValidationScope,\n} from '../section-indicators/form-section-indicators';\n\n/**\n * Reusable collapsible panel for form sections.\n *\n * Supports three visual variants:\n * - **default**: White card with accent border (standard field sections)\n * - **related-entity**: Blue-accented card with row count badge (related entity grids)\n * - **inherited**: Purple-accented card with \"Inherited from X\" badge (IS-A parent field sections)\n *\n * Features:\n * - Expand/collapse with smooth animation\n * - Search filtering (hides non-matching panels, highlights matched names)\n * - Drag-to-reorder sections\n * - Inheritable \"Inherited from X\" badge with navigation event\n * - Row count badge for related entity sections\n * - Section indicators: an unsaved-changes dot and an invalid-field count derived\n * live from the section's `mj-form-field`s (plus anything a custom section\n * supplies through `[Indicators]`), published to the form's chrome rail\n * through {@link FormSectionIndicatorCoordinator}\n *\n * **Which fields belong to the section.** Two sources, unioned: the `@ContentChildren`\n * query over projected content, and fields that registered themselves through\n * {@link FORM_SECTION_FIELD_HOST}, which this panel provides. The content query\n * cannot see a field declared inside a child component's own template (a widget\n * projected into the panel), and a section that saw none of its fields reported no\n * required-and-empty count, claimed none of the failed save's field errors, and so\n * never badged on the rail. The injector follows the element tree across view\n * boundaries, so the registered set covers exactly those fields. A registered field\n * counts only while its element is physically inside this panel, which keeps a field\n * created in an overlay that happened to inherit this injector from being counted.\n *\n * @example\n * ```html\n * <mj-collapsible-panel\n * SectionKey=\"productDetails\"\n * SectionName=\"Product Details\"\n * Icon=\"fa fa-box\"\n * Variant=\"inherited\"\n * InheritedFromEntity=\"Products\"\n * [Form]=\"formComponent\"\n * [FormContext]=\"formContext\"\n * (Navigate)=\"onNavigate($event)\">\n * <mj-form-field ...></mj-form-field>\n * </mj-collapsible-panel>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-collapsible-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None, // Required to style projected content (grids, etc.)\n templateUrl: './collapsible-panel.component.html',\n styleUrls: ['./collapsible-panel.component.css'],\n // `providers`, not `viewProviders`: the fields that need to reach this panel sit in its\n // projected CONTENT (and in component views nested inside that content).\n providers: [{ provide: FORM_SECTION_FIELD_HOST, useExisting: forwardRef(() => MjCollapsiblePanelComponent) }],\n})\nexport class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, FormSectionIndicatorSource, FormSectionFieldHost {\n private cdr = inject(ChangeDetectorRef);\n private elementRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n private chrome = inject(FormChromeCoordinator, { optional: true });\n private indicators = inject(FormSectionIndicatorCoordinator, { optional: true });\n\n /** Unique key for state persistence */\n @Input() SectionKey = '';\n\n /**\n * Indicator counts a custom section supplies for content that is NOT rendered by\n * `mj-form-field` — a designer, an inline grid, a hand-built editor. Added to the\n * counts this panel derives from its own fields, so a section that mixes both\n * reports the union. Omit for ordinary field panels: their state is derived.\n *\n * ```html\n * <mj-collapsible-panel SectionKey=\"lines\" [Indicators]=\"{ DirtyCount: LineEditor.EditedRows, ErrorCount: LineEditor.InvalidRows }\">\n * ```\n */\n @Input() Indicators?: Partial<FormSectionIndicators> | null;\n\n /**\n * Graph-path collection names whose validation failures belong to THIS panel —\n * `ValidationSources=\"Modifications\"` claims `Modifications[2].ProvisionID`.\n *\n * Only needed when a panel hosts a child collection whose path name differs from\n * its `SectionKey`: plain field failures are joined automatically from the panel's\n * `mj-form-field` children, and a graph path whose leading segment already matches\n * the `SectionKey` is claimed without any declaration. Declared HERE, on the panel\n * that owns the collection, rather than in an app-side `fieldName -> sectionKey`\n * map that duplicates a fact the panel owns and drifts silently when a\n * `SectionKey` is renamed. Accepts a single name or a list.\n */\n @Input() ValidationSources?: string | readonly string[] | null;\n\n /** Display name shown in the panel header */\n @Input() SectionName = '';\n\n /** Font Awesome icon class for the panel header */\n @Input() Icon = 'fa fa-folder';\n\n /**\n * Reference to the parent form component for state delegation.\n * Expected to have IsSectionExpanded, SetSectionExpanded, getSectionDisplayOrder methods.\n */\n @Input() Form: unknown;\n\n /** Form-level context (search filter, showEmptyFields) */\n @Input() FormContext?: FormContext;\n\n /** Panel visual variant */\n @Input() Variant: PanelVariant = 'default';\n\n /**\n * Flex order, for a panel the form's section order does not know about.\n *\n * `getSectionDisplayOrder` answers with the section count for an unknown key, which is\n * the highest order on the form — so a contribution panel rendered anywhere lands last\n * regardless of the slot it mounted in. A slot-derived order is passed here instead.\n */\n @Input() Order: number | null = null;\n\n /** Row count badge for related entity sections */\n @Input() BadgeCount: number | undefined;\n\n /** Default expanded state when no persisted state exists */\n @Input() DefaultExpanded: boolean | undefined;\n\n /**\n * For 'inherited' variant: the parent entity name this section's fields come from.\n * Displayed as \"Inherited from X\" badge and used for navigation.\n */\n @Input() InheritedFromEntity = '';\n\n /**\n * For 'inherited' variant: the primary key to navigate to when clicking the badge.\n * (Shared PK in IS-A relationships.)\n */\n @Input() InheritedRecordPrimaryKey?: CompositeKey;\n\n /**\n * Container-driven hard hide. When true the panel is removed from view\n * regardless of search state — used by the record-form container to honor\n * `EntityFormConfig.showRelatedEntities` / `hiddenSectionKeys` /\n * `visibleSectionKeys`. Composes with (overrides) search visibility so all\n * existing `IsVisible`-based section counts stay correct.\n */\n @Input()\n set Hidden(value: boolean) {\n if (value !== this._hidden) {\n this._hidden = value;\n // Recompute visibility if content has initialized (FieldComponents present).\n if (this.FieldComponents) {\n this.updateVisibilityAndHighlighting();\n }\n }\n }\n get Hidden(): boolean {\n return this._hidden;\n }\n private _hidden = false;\n\n // ---- Deprecated camelCase aliases (backward compat) ----\n\n /** @deprecated Use [SectionKey] instead */\n @Input('sectionKey') set _deprecatedSectionKey(value: string) { this.SectionKey = value; }\n\n /** @deprecated Use [SectionName] instead */\n @Input('sectionName') set _deprecatedSectionName(value: string) { this.SectionName = value; }\n\n /** @deprecated Use [Icon] instead */\n @Input('icon') set _deprecatedIcon(value: string) { this.Icon = value; }\n\n /** @deprecated Use [Form] instead */\n @Input('form') set _deprecatedForm(value: unknown) { this.Form = value; }\n\n /** @deprecated Use [FormContext] instead */\n @Input('formContext') set _deprecatedFormContext(value: FormContext | undefined) { this.FormContext = value; }\n\n // ---- Outputs ----\n\n @Output() DragStarted = new EventEmitter<PanelDragStartEvent>();\n @Output() DragEnded = new EventEmitter<void>();\n @Output() PanelDrop = new EventEmitter<PanelDropEvent>();\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n // ---- Content Children ----\n\n @ContentChildren(MjFormFieldComponent, { descendants: true }) FieldComponents!: QueryList<MjFormFieldComponent>;\n\n /**\n * Fields that found this panel through {@link FORM_SECTION_FIELD_HOST} — those the content\n * query cannot see because a component view sits between them and the panel. Keyed by\n * instance; the value is the edit subscription that keeps the rail live for that field.\n */\n private readonly hostedFields = new Map<MjFormFieldComponent, Subscription>();\n\n /**\n * Bumped whenever the hosted set changes or a hosted field reports an input change. Every\n * reader of the field set touches it, so the views that read this section (its own host\n * bindings, the rail) become dependents Angular re-runs before its no-changes check when a\n * hosted field — refreshed AFTER those views in the same pass — changes underneath them. See\n * {@link FormSectionFieldHost.NotifyFieldChanged}.\n */\n private readonly hostedFieldsVersion = signal(0);\n\n /**\n * Memo behind {@link allFields}. Every real `mj-form-field` reaches this panel through the\n * injector — projected ones included — so the hosted set is the section's whole field list, and\n * the union is read several times per change-detection pass (three host bindings, the header,\n * hide-when-empty, the rail). Recomputed only when the hosted set or a hosted field's inputs\n * change (the signal) or the content query is replaced or resized.\n */\n private fieldsMemo: { version: number; content: QueryList<MjFormFieldComponent> | undefined; contentLength: number; fields: MjFormFieldComponent[] } | null = null;\n\n // ---- State ----\n\n DisplayName = '';\n FieldNames = '';\n IsVisible = true;\n\n /**\n * The fields this panel draws, for the contributions that stand in for one and for the\n * composition snapshot the placement dialog reads.\n *\n * Held as fields rather than derived in getters: the field-panel slot treats a new array\n * as a structural change, and a getter would hand it one on every change-detection pass.\n * Recomputed only when the projected fields change.\n */\n public ClaimableFields: Array<{ Name: string; Label: string }> = [];\n\n /** Just the names, for the field-panel slot. Same lifetime as {@link ClaimableFields}. */\n public ClaimableFieldNames: string[] = [];\n\n @HostBinding('attr.data-section-key')\n get HostSectionKey(): string {\n return this.SectionKey;\n }\n\n @HostBinding('attr.data-variant')\n get HostVariant(): string {\n return this.Variant;\n }\n\n @HostBinding('attr.data-icon')\n get HostIcon(): string {\n return this.Icon;\n }\n\n /**\n * Indicator counts mirrored onto the host element, so CSS and any DOM sweep can\n * read a section's state without a component reference.\n */\n @HostBinding('attr.data-dirty-count')\n get HostDirtyCount(): number {\n return this.SectionIndicators.DirtyCount;\n }\n\n @HostBinding('attr.data-error-count')\n get HostErrorCount(): number {\n return this.SectionIndicators.ErrorCount;\n }\n\n @HostBinding('class')\n get HostClass(): string {\n const classes = [`mj-panel--${this.Variant}`];\n if (!this.IsVisible) classes.push('mj-search-hidden');\n if (this.IsDragging) classes.push('mj-dragging');\n if (this.IsDragOver) classes.push('mj-drag-over');\n const indicators = this.SectionIndicators;\n if (indicators.DirtyCount > 0) classes.push('mj-panel-dirty');\n if (indicators.ErrorCount > 0) classes.push('mj-panel-has-errors');\n else if (indicators.WarningCount > 0) classes.push('mj-panel-has-warnings');\n if (this.chrome?.Spec.RelatedRoles.get(this.SectionKey) === 'Detail') {\n classes.push('mj-form-role-detail');\n }\n if (this.chrome?.HidesAccordionChrome(this.SectionKey)) {\n classes.push('mj-chrome-plain');\n }\n if (!this.hasRenderableContent()) {\n classes.push('mj-panel-empty');\n }\n return classes.join(' ');\n }\n\n /**\n * The host form, when this panel sits in one.\n *\n * `Form` stays `unknown` because the panel is reused outside a form host; this narrows\n * it for the one place that needs the record and the provider. The import is type-only,\n * so nothing about the runtime dependency direction changes.\n */\n public get FieldPanelForm(): BaseFormComponent | null {\n return (this.Form as BaseFormComponent | undefined) ?? null;\n }\n\n /** The entity this panel's fields belong to, or '' outside a form. */\n public get FieldPanelEntity(): string {\n return this.FieldPanelForm?.record?.EntityInfo?.Name ?? '';\n }\n\n /** True when a contribution could claim one of this panel's fields. */\n public get HostsFieldPanels(): boolean {\n return this.ClaimableFieldNames.length > 0 && !!this.FieldPanelForm?.record;\n }\n\n /**\n * Flex order, in precedence: where the user put this panel, then where its host said\n * to put it, then the form's section order.\n *\n * The user's placement comes first so a dragged panel draws where it was dropped. `Order`\n * is a fixed number a host supplies (a contribution panel derives one from its slot); it\n * applies only while the user has not placed the panel.\n */\n @HostBinding('style.order')\n get CssOrder(): number {\n const formRef = this.Form as {\n getSectionDisplayOrder?: (key: string) => number;\n getSectionOrderIndex?: (key: string) => number | null;\n };\n const placed = formRef?.getSectionOrderIndex?.(this.SectionKey);\n if (placed != null) return placed;\n if (this.Order != null) return this.Order;\n return formRef?.getSectionDisplayOrder ? formRef.getSectionDisplayOrder(this.SectionKey) : 0;\n }\n\n IsDragging = false;\n IsDragOver = false;\n\n // ---- Event relay ----\n\n /** Signals re-subscription when ContentChildren change */\n private fieldNavReset$ = new Subject<void>();\n private destroy$ = new Subject<void>();\n\n // ---- Panel content resize ----\n\n @ViewChild('panelContent') private panelContentRef?: ElementRef<HTMLElement>;\n private resizeObserver?: ResizeObserver;\n private resizeDebounceTimer?: ReturnType<typeof setTimeout>;\n /** ResizeObserver fires once synchronously on observe(); that initial measurement is not a user resize. */\n private resizeObserverPrimed = false;\n\n /**\n * Persisted accordion resize height for related-entity panels.\n * Related grids size themselves from row count (accordion and left-nav),\n * so a pinned pixel height — especially 0 / toolbar-only measured while\n * collapsed — would clip the grid. Only honor a user drag that is at\n * least the CSS min-height.\n */\n get PanelContentHeight(): number | undefined {\n if (this.Variant !== 'related-entity') return undefined;\n if (this.hidesAccordionChrome()) return undefined;\n const formRef = this.Form as { GetSectionPanelHeight?: (key: string) => number | undefined };\n const persisted = formRef?.GetSectionPanelHeight?.(this.SectionKey);\n if (persisted == null || persisted < 120) return undefined;\n return persisted;\n }\n\n private hidesAccordionChrome(): boolean {\n if (this.chrome?.HidesAccordionChrome(this.SectionKey)) return true;\n const el = this.elementRef.nativeElement as HTMLElement | undefined;\n return !!el?.classList.contains('mj-chrome-show');\n }\n\n /** Whether drag-to-reorder is allowed (from FormContext) */\n get ReorderAllowed(): boolean {\n return this.FormContext?.allowSectionReorder !== false;\n }\n\n /**\n * Whether this panel's header may collapse/expand. Driven by\n * `FormContext.collapsibleSections`; when false the panel renders\n * always-expanded with no toggle chevron (used by dialog/slide-in surfaces\n * that lock sections open). Undefined / true means collapsible.\n */\n get Collapsible(): boolean {\n // Selected left-nav item has no accordion chrome. More keeps collapse/expand.\n if (this.hidesAccordionChrome()) return false;\n return this.FormContext?.collapsibleSections !== false;\n }\n\n /** Whether the panel is expanded (delegates to form state; always true when not collapsible) */\n get Expanded(): boolean {\n if (!this.Collapsible) return true;\n const formRef = this.Form as { IsSectionExpanded?: (key: string, defaultExpanded?: boolean) => boolean };\n return formRef?.IsSectionExpanded ? formRef.IsSectionExpanded(this.SectionKey, this.DefaultExpanded) : true;\n }\n\n // ---- Fields (content query ∪ injector-registered) ----\n\n /** {@link FormSectionFieldHost} — a field rendered inside this section, at any view depth. */\n public RegisterField(field: MjFormFieldComponent): void {\n if (this.hostedFields.has(field)) return;\n // Same contract as a projected field: an edit refreshes the section's counts (and the\n // rail reading them) on the same tick as the keystroke.\n const edits = field.ValueChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n });\n this.hostedFields.set(field, edits);\n this.onFieldSetChanged();\n }\n\n /** {@link FormSectionFieldHost} */\n public UnregisterField(field: MjFormFieldComponent): void {\n const edits = this.hostedFields.get(field);\n if (!edits) return;\n edits.unsubscribe();\n this.hostedFields.delete(field);\n this.onFieldSetChanged();\n }\n\n /** {@link FormSectionFieldHost} */\n public NotifyFieldChanged(field: MjFormFieldComponent): void {\n if (!this.hostedFields.has(field)) return;\n this.onFieldSetChanged();\n }\n\n private onFieldSetChanged(): void {\n this.hostedFieldsVersion.update((v) => v + 1);\n // Visibility is latched, not derived: hide-when-empty and the all-denied check are computed\n // into IsVisible when the field set changes, so they have to be recomputed here too — a\n // hosted field binds its inputs after content init, and a section evaluated before that\n // would otherwise stay hidden (or visible) on the pre-binding answer.\n if (this.FieldComponents) {\n this.updateVisibilityAndHighlighting();\n }\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n }\n\n /**\n * Searchable display names of every field, read live rather than from the {@link FieldNames}\n * cache — only needed once a hosted field exists, because its name lands after registration\n * (see {@link refreshFieldNames}).\n */\n private liveFieldNames(): string {\n if (this.hostedFields.size === 0) return '';\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.DisplayName) names.push(field.DisplayName.toLowerCase());\n }\n return names.join(' ');\n }\n\n /**\n * Every `mj-form-field` this section fronts: the projected ones the content query found, plus\n * the injector-registered ones that have bound their inputs and whose element is inside this\n * panel. Unbound fields are left out because a field with no inputs reports itself hidden and\n * not required-and-empty, which is not information about the section. The containment check\n * is what stops a field created in an overlay, with this panel's injector as its ancestor, from\n * counting against a section it is not displayed in. Memoized — see {@link fieldsMemo}.\n */\n private allFields(): MjFormFieldComponent[] {\n const version = this.hostedFieldsVersion(); // dependency, see the field's doc\n const content = this.FieldComponents;\n const contentLength = content?.length ?? 0;\n const memo = this.fieldsMemo;\n if (memo && memo.version === version && memo.content === content && memo.contentLength === contentLength) {\n return memo.fields;\n }\n const fields: MjFormFieldComponent[] = content ? content.toArray() : [];\n if (this.hostedFields.size > 0) {\n const host = this.elementRef.nativeElement as HTMLElement | undefined;\n const seen = new Set(fields);\n for (const field of this.hostedFields.keys()) {\n if (seen.has(field)) continue;\n if (!field.InputsBound) continue;\n if (host && !host.contains(field.HostElement)) continue;\n fields.push(field);\n }\n }\n this.fieldsMemo = { version, content, contentLength, fields };\n return fields;\n }\n\n // ---- Section indicators (unsaved-changes dot + invalid-field count) ----\n\n /**\n * Live state of this section: fields edited since the last save, fields that are\n * invalid or required-and-empty, and fields carrying warnings. Derived from the\n * projected `mj-form-field`s on every read — the same state those fields use for\n * their own amber dot and red underline, so the section can never disagree with\n * its fields — plus graph-path validation failures this section claims, plus\n * whatever a custom section supplies through `[Indicators]`.\n *\n * Read during change detection (host bindings, the header template, the rail via\n * the coordinator). Pure and cheap: one pass over the field list.\n */\n public get SectionIndicators(): FormSectionIndicators {\n return SumSectionIndicators(\n this.fieldIndicators(),\n TallyValidationErrors(this.claimedGraphErrors()),\n this.Indicators,\n );\n }\n\n public get SectionDirtyCount(): number {\n return this.SectionIndicators.DirtyCount;\n }\n\n public get SectionErrorCount(): number {\n return this.SectionIndicators.ErrorCount;\n }\n\n public get SectionWarningCount(): number {\n return this.SectionIndicators.WarningCount;\n }\n\n public get SectionDirtyTitle(): string {\n return DescribeSectionDirty(this.SectionDirtyCount);\n }\n\n public get SectionErrorTitle(): string {\n return DescribeSectionErrors(this.SectionErrorCount);\n }\n\n public get SectionWarningTitle(): string {\n return DescribeSectionWarnings(this.SectionWarningCount);\n }\n\n /** {@link FormSectionIndicatorSource} — the rail reads this through the coordinator. */\n public GetSectionIndicators(): FormSectionIndicators {\n return this.SectionIndicators;\n }\n\n /** {@link FormSectionIndicatorSource} — whether a form-level error belongs to this section. */\n public OwnsValidationSource(source: ParsedValidationSource): boolean {\n return SectionOwnsValidationSource(source, this.SectionKey, this.validationScope());\n }\n\n /** Normalized {@link ValidationSources}. */\n public get ValidationCollectionNames(): string[] {\n const raw = this.ValidationSources;\n if (!raw) return [];\n return (typeof raw === 'string' ? [raw] : [...raw]).map((n) => n.trim()).filter((n) => n.length > 0);\n }\n\n /** Field names this panel renders — the join between a plain-field error and this section. */\n private renderedFieldNames(): string[] {\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.FieldName) names.push(field.FieldName);\n }\n return names;\n }\n\n private validationScope(): SectionValidationScope {\n return { FieldNames: this.renderedFieldNames(), CollectionNames: this.ValidationCollectionNames };\n }\n\n /**\n * Counts of FIELDS (not messages) in each state. A field is invalid when it shows a\n * failure OR is required and empty in edit mode — exactly the two conditions that\n * paint its underline red. Warnings count only on fields with no failure, mirroring\n * `MjFormFieldComponent.ShowWarnings`.\n */\n private fieldIndicators(): FormSectionIndicators {\n let DirtyCount = 0;\n let ErrorCount = 0;\n let WarningCount = 0;\n for (const field of this.allFields()) {\n if (field.IsDirty) DirtyCount++;\n // Only a field that renders an EDITOR can be invalid: a read-only field renders its\n // value as text and never paints an underline, so it is skipped even when\n // `IsRequiredEmpty` would say otherwise (a NOT NULL `__mj_CreatedAt` on a new record\n // is empty and read-only — the user cannot fix it, and it fills itself on save).\n if (!field.EditMode || field.IsFieldReadOnly) continue;\n if (field.ShowErrors || field.IsRequiredEmpty) ErrorCount++;\n // The field paints its amber underline on EITHER of these — a stored date the input\n // cannot parse warns on its own, outside the validation pipeline.\n else if (field.ShowWarnings || field.StoredDateIsUnreadable) WarningCount++;\n }\n return { DirtyCount, ErrorCount, WarningCount };\n }\n\n /**\n * Graph-path failures (`Lines[2].Amount`) this section owns, once the form has asked\n * for validation to show. Plain field-name failures are NOT counted here — the field\n * that renders them already reports through {@link fieldIndicators}.\n */\n private claimedGraphErrors(): ValidationErrorInfo[] {\n const ctx = this.FormContext;\n if (!ctx?.showValidation || !ctx.validationErrors?.length) return [];\n return ClaimedCollectionErrors(ctx.validationErrors, this.SectionKey, this.validationScope());\n }\n\n /** (Re)declare this section with the container-scoped registry the rail reads. */\n private registerIndicatorSource(previousKey?: string): void {\n if (!this.indicators) return;\n if (previousKey && previousKey !== this.SectionKey) {\n this.indicators.Unregister(this, previousKey);\n }\n this.indicators.Register(this);\n }\n\n // ---- Lifecycle ----\n\n ngOnInit(): void {\n this.DisplayName = this.SectionName;\n this.chrome?.Changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.updateVisibilityAndHighlighting();\n });\n this.registerIndicatorSource();\n // A section that mounts after the rail was worked out (a slot panel that draws\n // itself only once its data has loaded) has to be filed onto the rail, or a\n // left-nav form never shows it.\n this.chrome?.NotifySectionsChanged();\n }\n\n ngAfterContentInit(): void {\n this.updateFieldNames();\n this.subscribeToFieldNavigateEvents();\n this.FieldComponents.changes.subscribe(() => {\n // Drop the field memo before anything below reads it: a replaced QueryList with the same\n // length would otherwise be served from the previous result.\n this.hostedFieldsVersion.update((v) => v + 1);\n this.updateFieldNames();\n this.subscribeToFieldNavigateEvents();\n // The set of fields changed, so the section's counts (and which errors it\n // claims) may have too — let the rail re-read.\n this.indicators?.NotifyChanged();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['SectionName']) {\n this.DisplayName = this.SectionName;\n }\n if (changes['SectionKey'] && !changes['SectionKey'].firstChange) {\n this.registerIndicatorSource(changes['SectionKey'].previousValue as string | undefined);\n }\n if (changes['SectionName'] || changes['FormContext']) {\n this.updateVisibilityAndHighlighting();\n }\n if (changes['FormContext'] && this.FieldComponents) {\n this.FieldComponents.forEach(field => {\n field.FormContext = this.FormContext;\n });\n }\n }\n\n ngAfterViewInit(): void {\n this.setupResizeObserver();\n }\n\n ngOnDestroy(): void {\n this.indicators?.Unregister(this);\n this.chrome?.NotifySectionsChanged();\n for (const edits of this.hostedFields.values()) edits.unsubscribe();\n this.hostedFields.clear();\n this.fieldNavReset$.next();\n this.fieldNavReset$.complete();\n this.destroy$.next();\n this.destroy$.complete();\n this.resizeObserver?.disconnect();\n if (this.resizeDebounceTimer) {\n clearTimeout(this.resizeDebounceTimer);\n }\n }\n\n // ---- Actions ----\n\n Toggle(): void {\n if (!this.Collapsible) return;\n const formRef = this.Form as { SetSectionExpanded?: (key: string, expanded: boolean) => void };\n if (formRef?.SetSectionExpanded) {\n formRef.SetSectionExpanded(this.SectionKey, !this.Expanded);\n this.cdr.markForCheck();\n }\n }\n\n /**\n * Navigate to the parent entity when clicking the \"Inherited from X\" badge.\n * Derives the PrimaryKey from the Form's record when InheritedRecordPrimaryKey\n * is not explicitly provided (which is the common case in generated templates).\n */\n OnInheritedBadgeClick(event: MouseEvent): void {\n event.stopPropagation();\n if (!this.InheritedFromEntity) return;\n\n const primaryKey = this.InheritedRecordPrimaryKey\n ?? (this.Form as { record?: { PrimaryKey: CompositeKey } })?.record?.PrimaryKey\n ?? new CompositeKey([]);\n\n this.Navigate.emit({\n Kind: 'entity-hierarchy',\n EntityName: this.InheritedFromEntity,\n PrimaryKey: primaryKey,\n Direction: 'parent'\n });\n }\n\n // ---- Drag and Drop ----\n\n @HostListener('dragover', ['$event'])\n OnDragOver(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n event.stopPropagation();\n if (event.dataTransfer?.types.includes('text/plain')) {\n this.IsDragOver = true;\n }\n }\n\n @HostListener('dragleave', ['$event'])\n OnDragLeave(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n this.IsDragOver = false;\n }\n\n @HostListener('drop', ['$event'])\n OnDrop(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n event.stopPropagation();\n this.IsDragOver = false;\n\n const sourceSectionKey = event.dataTransfer?.getData('text/plain');\n if (sourceSectionKey && sourceSectionKey !== this.SectionKey) {\n this.PanelDrop.emit({\n SourceSectionKey: sourceSectionKey,\n TargetSectionKey: this.SectionKey\n });\n this.reorderSections(sourceSectionKey, this.SectionKey);\n }\n }\n\n OnDragStart(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n this.IsDragging = true;\n event.dataTransfer?.setData('text/plain', this.SectionKey);\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = 'move';\n }\n this.DragStarted.emit({ SectionKey: this.SectionKey, Event: event });\n }\n\n OnDragEnd(): void {\n this.IsDragging = false;\n this.DragEnded.emit();\n }\n\n // ---- Private Methods ----\n\n /**\n * Move one panel to another's position and store the result.\n *\n * The list this works on is every panel currently on the form in the order they are\n * drawn, not the form's declared sections. A contribution panel is in no declared\n * section list, so working from that list meant a drag involving one matched no index\n * and returned without doing anything — the handle moved and the form did not.\n */\n private reorderSections(sourceSectionKey: string, targetSectionKey: string): void {\n const formRef = this.Form as {\n getSectionOrder?: () => string[];\n setSectionOrder?: (order: string[]) => void;\n };\n if (!formRef?.getSectionOrder || !formRef?.setSectionOrder) return;\n\n const currentOrder = this.visualPanelOrder(formRef.getSectionOrder());\n const sourceIndex = currentOrder.indexOf(sourceSectionKey);\n const targetIndex = currentOrder.indexOf(targetSectionKey);\n if (sourceIndex === -1 || targetIndex === -1) return;\n\n const newOrder = [...currentOrder];\n newOrder.splice(sourceIndex, 1);\n newOrder.splice(targetIndex, 0, sourceSectionKey);\n formRef.setSectionOrder(newOrder);\n this.cdr.markForCheck();\n }\n\n /**\n * Every panel on the form, in the order it is drawn.\n *\n * Ordered by each panel's own `style.order`, which is what CSS lays them out by, so a\n * panel positioned by its slot rather than by the section list still lands in the right\n * place here. Falls back to the declared order when the DOM cannot be read.\n *\n * Searched over descendants of the panels column, not over siblings: a contribution\n * panel is wrapped in its slot host, so it is not a sibling of the baked panels even\n * though it renders among them.\n */\n private visualPanelOrder(declared: readonly string[]): string[] {\n const host = this.elementRef?.nativeElement as HTMLElement | undefined;\n const column = host?.closest?.('.mj-forms-all-panels') ?? host?.parentElement;\n if (!column) return [...declared];\n\n const seen = new Set<string>();\n const found: Array<{ key: string; order: number; index: number }> = [];\n Array.from(column.querySelectorAll('[data-section-key]')).forEach((node, index) => {\n const key = node.getAttribute('data-section-key')?.trim();\n if (!key || seen.has(key)) return;\n seen.add(key);\n const raw = Number((node as HTMLElement).style?.order);\n found.push({ key, order: Number.isFinite(raw) ? raw : 0, index });\n });\n if (found.length === 0) return [...declared];\n\n const ordered = found\n .sort((a, b) => (a.order - b.order) || (a.index - b.index))\n .map((entry) => entry.key);\n // A declared section the DOM did not show — hidden, filtered — keeps its place in\n // the stored order rather than being dropped from it.\n for (const key of declared) {\n if (!seen.has(key)) ordered.push(key);\n }\n return ordered;\n }\n\n /**\n * Field panels whose only children are empty/hidden (e.g. leftover\n * `Details` with just unused geo columns) should not take space.\n * Custom widgets and related grids have no FieldComponents — keep them.\n */\n /**\n * Whether this panel matches a section-search term by title or field\n * name. Ignores chrome hide/show — the rail uses this to decide if the\n * *group* matches, even when another section is currently selected.\n */\n public MatchesSearch(term: string): boolean {\n const filter = (term || '').toLowerCase().trim();\n if (!filter) return true;\n if (this.SectionName.toLowerCase().includes(filter)) return true;\n if (this.SectionKey.toLowerCase().includes(filter)) return true;\n return this.FieldNames.includes(filter) || this.liveFieldNames().includes(filter);\n }\n\n private hasRenderableContent(): boolean {\n if (this.Variant === 'related-entity') return true;\n const fields = this.allFields();\n if (fields.length === 0) return true;\n return fields.some((field) => !field.ShouldHideField);\n }\n\n private isHiddenByChrome(): boolean {\n if (!this.chrome) return false;\n if (this.Variant === 'related-entity') {\n return !this.chrome.IsRelatedSectionVisible(this.SectionKey);\n }\n return !this.chrome.IsFirstClassSectionVisible(this.SectionKey);\n }\n\n /**\n * Refresh {@link ClaimableFieldNames}, keeping the previous array when the set is\n * unchanged so the field-panel slot does not read a new reference as a new set.\n */\n private updateClaimableFieldNames(): void {\n const next: Array<{ Name: string; Label: string }> = [];\n for (const field of this.allFields()) {\n if (field.FieldName) next.push({ Name: field.FieldName, Label: field.HostFieldLabel });\n }\n const prev = this.ClaimableFields;\n const same = prev.length === next.length\n && prev.every((f, i) => f.Name === next[i].Name && f.Label === next[i].Label);\n if (same) return;\n this.ClaimableFields = next;\n this.ClaimableFieldNames = next.map((f) => f.Name);\n }\n\n private updateFieldNames(): void {\n if (this.FieldComponents) {\n this.refreshFieldNames();\n this.updateClaimableFieldNames();\n this.updateVisibilityAndHighlighting();\n }\n }\n\n /**\n * Rebuild the searchable field-name string from the current field set. Rebuilt on structural\n * changes only; a hosted field's DisplayName is bound after it registers (its inputs land on its\n * own view's first pass), so search also reads names live through {@link liveFieldNames}\n * rather than relying on this cache alone.\n */\n private refreshFieldNames(): void {\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.DisplayName) {\n names.push(field.DisplayName.toLowerCase());\n }\n }\n this.FieldNames = names.join(' ');\n }\n\n /**\n * Subscribes to Navigate events from all child form-field components\n * and relays them through this panel's Navigate output. Also listens for\n * value edits so the section indicators (and the rail reading them) refresh\n * on the same tick as the keystroke rather than on the container's next poll.\n */\n private subscribeToFieldNavigateEvents(): void {\n this.fieldNavReset$.next(); // tear down previous subscriptions\n this.FieldComponents.forEach(field => {\n field.Navigate.pipe(takeUntil(this.fieldNavReset$)).subscribe((event: FormNavigationEvent) => {\n this.Navigate.emit(event);\n });\n // A real projected field also reached this panel through the injector and already has\n // this subscription from RegisterField; a second one would notify the rail twice per edit.\n if (this.hostedFields.has(field)) return;\n field.ValueChange.pipe(takeUntil(this.fieldNavReset$)).subscribe(() => {\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n });\n });\n }\n\n /**\n * Sets up a ResizeObserver on the panel content div for related-entity panels.\n * When the user drags the CSS resize handle, we persist the new height.\n */\n private setupResizeObserver(): void {\n if (this.Variant !== 'related-entity' || !this.panelContentRef) return;\n\n const el = this.panelContentRef.nativeElement;\n // Run outside Angular zone to avoid triggering change detection on every resize frame\n this.ngZone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Skip the synchronous initial fire emitted when observe() is called — it's the\n // panel's own first measurement on load, not a user-initiated resize. Persisting\n // it would write a spurious panelHeight for every panel on form open.\n if (!this.resizeObserverPrimed) {\n this.resizeObserverPrimed = true;\n return;\n }\n // Only a height change while the panel is expanded reflects a genuine user drag of\n // the resize handle. Ignore reflows while collapsed (e.g. content settling on load).\n if (!this.Expanded) return;\n // Left-nav sizes the grid from the leftover column. Persisting that\n // computed height would write ~0 (or the toolbar) and then pin it.\n if (this.hidesAccordionChrome()) return;\n const entry = entries[0];\n if (!entry) return;\n const newHeight = Math.round(entry.contentRect.height);\n if (newHeight < 120) return;\n this.debouncePersistHeight(newHeight);\n });\n this.resizeObserver.observe(el);\n });\n }\n\n /**\n * Debounces height persistence so we don't write to DB on every resize frame.\n */\n private debouncePersistHeight(height: number): void {\n if (this.resizeDebounceTimer) {\n clearTimeout(this.resizeDebounceTimer);\n }\n this.resizeDebounceTimer = setTimeout(() => {\n const formRef = this.Form as { SetSectionPanelHeight?: (key: string, height: number) => void };\n formRef?.SetSectionPanelHeight?.(this.SectionKey, height);\n }, 500);\n }\n\n /**\n * True when this panel projects form fields and field-level security denies the user EVERY one\n * of them.\n *\n * Deliberately false when the panel projects no `mj-form-field` at all — related-entity grids,\n * IS-A cards and slot-injected panels all legitimately have none, and hiding those would remove\n * sections field security has nothing to say about. \"No fields\" and \"no readable fields\" are\n * different states and only the second one should hide the section.\n */\n private get allProjectedFieldsDenied(): boolean {\n const fields = this.allFields();\n if (fields.length === 0) {\n return false;\n }\n return fields.every(f => !f.IsFieldReadableByUser);\n }\n\n private updateVisibilityAndHighlighting(): void {\n // Hard hide takes precedence over search state. Driven by an explicit\n // `Hidden` input OR the form config's section-visibility rules carried on\n // FormContext (which also reach slot-injected BaseFormPanels, since every\n // panel receives FormContext).\n if (this._hidden || IsFormSectionHidden(this.FormContext, this.SectionKey, this.Variant) || this.isHiddenByChrome()) {\n this.IsVisible = false;\n this.DisplayName = EscapeHTML(this.SectionName);\n this.cdr.markForCheck();\n return;\n }\n\n // A section whose every field is denied by field-level security renders as a heading over\n // nothing — the fields hide themselves individually, leaving an empty card that reads like a\n // broken screen rather than a permissions boundary. Hide the section instead.\n if (this.allProjectedFieldsDenied) {\n this.IsVisible = false;\n this.DisplayName = EscapeHTML(this.SectionName);\n this.cdr.markForCheck();\n return;\n }\n\n const searchTerm = (this.FormContext?.sectionFilter || '').toLowerCase().trim();\n\n if (!searchTerm) {\n this.IsVisible = this.hasRenderableContent();\n this.DisplayName = this.SectionName;\n this.cdr.markForCheck();\n return;\n }\n\n const sectionMatches = this.SectionName.toLowerCase().includes(searchTerm);\n this.IsVisible = this.MatchesSearch(searchTerm);\n\n // DisplayName is bound to `[innerHTML]` in the template — must always be HTML-safe.\n this.DisplayName =\n this.IsVisible && sectionMatches\n ? HighlightSearchMatches(this.SectionName, searchTerm, 'mj-forms-search-highlight')\n : EscapeHTML(this.SectionName);\n\n this.cdr.markForCheck();\n }\n}\n","<div class=\"mj-forms-panel\"\n [class.mj-forms-panel--related]=\"Variant === 'related-entity'\"\n [class.mj-forms-panel--inherited]=\"Variant === 'inherited'\"\n [attr.data-section-key]=\"SectionKey\">\n\n <!-- Panel Header -->\n <div class=\"mj-forms-panel-header\"\n [class.mj-forms-panel-header--static]=\"!Collapsible\"\n [attr.role]=\"Collapsible ? 'button' : null\"\n [attr.tabindex]=\"Collapsible ? 0 : null\"\n (click)=\"Toggle()\">\n <!-- Drag Handle (hidden when reorder disabled) -->\n @if (ReorderAllowed) {\n <div class=\"mj-forms-drag-handle\"\n title=\"Drag to reorder sections\"\n draggable=\"true\"\n (dragstart)=\"OnDragStart($event)\"\n (dragend)=\"OnDragEnd()\"\n (click)=\"$event.stopPropagation()\">\n <i class=\"fa-solid fa-grip-vertical\"></i>\n </div>\n }\n\n <!-- Icon + Title -->\n <div class=\"mj-forms-panel-title-group\">\n <i [class]=\"Icon\" class=\"mj-forms-panel-icon\"></i>\n <h3 class=\"mj-forms-panel-title\">\n <span [innerHTML]=\"DisplayName\"></span>\n <!-- Section indicators: unsaved-changes dot (same idiom as an edited field's\n label dot) and invalid-field count (same colour as the field's red underline).\n Derived from the projected fields — see SectionIndicators. -->\n @if (SectionDirtyCount > 0) {\n <span class=\"mj-forms-panel-dirty\"\n role=\"img\"\n [title]=\"SectionDirtyTitle\"\n [attr.aria-label]=\"SectionDirtyTitle\"></span>\n }\n @if (SectionErrorCount > 0) {\n <span class=\"mj-forms-panel-error-badge\"\n role=\"img\"\n [title]=\"SectionErrorTitle\"\n [attr.aria-label]=\"SectionErrorTitle\">\n <i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i>{{ SectionErrorCount }}\n </span>\n } @else if (SectionWarningCount > 0) {\n <span class=\"mj-forms-panel-warning-badge\"\n role=\"img\"\n [title]=\"SectionWarningTitle\"\n [attr.aria-label]=\"SectionWarningTitle\">\n <i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i>{{ SectionWarningCount }}\n </span>\n }\n <!-- Row count badge for related entities -->\n @if (BadgeCount !== undefined) {\n <span class=\"mj-forms-row-count-badge\" [class.mj-forms-row-count-badge--zero]=\"BadgeCount === 0\">\n {{ BadgeCount }}\n </span>\n }\n </h3>\n </div>\n\n <!-- Inherited From badge (IS-A) -->\n @if (Variant === 'inherited' && InheritedFromEntity) {\n <a class=\"mj-forms-inherited-badge\" (click)=\"OnInheritedBadgeClick($event)\"\n [title]=\"'View parent record: ' + InheritedFromEntity\">\n <i class=\"fa-solid fa-arrow-up\"></i>\n Inherited from {{ InheritedFromEntity }}\n </a>\n }\n\n <!-- Chevron (hidden when sections are locked open) -->\n @if (Collapsible) {\n <div class=\"mj-forms-panel-chevron\">\n <i [class]=\"Expanded ? 'fa fa-chevron-up' : 'fa fa-chevron-down'\"></i>\n </div>\n }\n </div>\n\n <!-- Panel Body -->\n <div class=\"mj-forms-panel-body\" [class.mj-forms-panel-body--collapsed]=\"!Expanded\">\n <div class=\"mj-forms-panel-content\"\n #panelContent\n [style.height.px]=\"PanelContentHeight\">\n <!-- Contributions drawn inside this section: one host above the fields, one below. A\n panel standing in for fields draws in their place; one placed in the section by its\n key replaces nothing. -->\n @if (HostsFieldPanels) {\n <mj-form-field-panel-slot\n [Entity]=\"FieldPanelEntity\"\n [FieldNames]=\"ClaimableFieldNames\"\n [SectionKey]=\"SectionKey\"\n Position=\"start\"\n [Record]=\"FieldPanelForm!.record\"\n [FormComponent]=\"FieldPanelForm!\"\n [FormContext]=\"FormContext\">\n </mj-form-field-panel-slot>\n }\n <ng-content></ng-content>\n @if (HostsFieldPanels) {\n <mj-form-field-panel-slot\n [Entity]=\"FieldPanelEntity\"\n [FieldNames]=\"ClaimableFieldNames\"\n [SectionKey]=\"SectionKey\"\n Position=\"end\"\n [Record]=\"FieldPanelForm!.record\"\n [FormComponent]=\"FieldPanelForm!\"\n [FormContext]=\"FormContext\">\n </mj-form-field-panel-slot>\n }\n </div>\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"collapsible-panel.component.js","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts","../../../src/lib/panel/collapsible-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAEtE,eAAe,EAAa,WAAW,EAAE,YAAY,EAAE,UAAU,EACjE,SAAS,EAAE,MAAM,EAAE,iBA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QAAQ,CAAC;;kBAUnC,YAAY;mBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;;kBAOpC,YAAY;mBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;;kFAjsBrB,2BAA2B","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject, forwardRef, signal,\n OnChanges, SimpleChanges, OnInit, AfterContentInit, AfterViewInit, OnDestroy,\n ContentChildren, QueryList, HostBinding, HostListener, ElementRef,\n ViewChild, NgZone, ViewEncapsulation\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FormContext, PanelVariant, PanelDragStartEvent, PanelDropEvent } from '../types/form-types';\nimport { IsFormSectionHidden } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { MjFormFieldComponent } from '../field/form-field.component';\nimport type { BaseFormComponent } from '../base-form-component';\nimport { CompositeKey } from '@memberjunction/core';\nimport { EscapeHTML, HighlightSearchMatches, type ValidationErrorInfo } from '@memberjunction/global';\nimport { FormChromeCoordinator } from '../chrome/form-chrome-coordinator.service';\nimport { FormSectionIndicatorCoordinator, type FormSectionIndicatorSource } from '../section-indicators/form-section-indicator-coordinator.service';\nimport { FORM_SECTION_FIELD_HOST, type FormSectionFieldHost } from '../section-indicators/form-section-field-host';\nimport { FormRecordCommentsCoordinatorService } from '../comments/form-record-comments-coordinator.service';\nimport {\n ClaimedCollectionErrors,\n DescribeSectionComments,\n DescribeSectionDirty,\n DescribeSectionErrors,\n DescribeSectionWarnings,\n SectionOwnsValidationSource,\n SumSectionIndicators,\n TallyValidationErrors,\n type FormSectionIndicators,\n type ParsedValidationSource,\n type SectionValidationScope,\n} from '../section-indicators/form-section-indicators';\n\n/**\n * Reusable collapsible panel for form sections.\n *\n * Supports three visual variants:\n * - **default**: White card with accent border (standard field sections)\n * - **related-entity**: Blue-accented card with row count badge (related entity grids)\n * - **inherited**: Purple-accented card with \"Inherited from X\" badge (IS-A parent field sections)\n *\n * Features:\n * - Expand/collapse with smooth animation\n * - Search filtering (hides non-matching panels, highlights matched names)\n * - Drag-to-reorder sections\n * - Inheritable \"Inherited from X\" badge with navigation event\n * - Row count badge for related entity sections\n * - Section indicators: an unsaved-changes dot and an invalid-field count derived\n * live from the section's `mj-form-field`s (plus anything a custom section\n * supplies through `[Indicators]`), published to the form's chrome rail\n * through {@link FormSectionIndicatorCoordinator}\n *\n * **Which fields belong to the section.** Two sources, unioned: the `@ContentChildren`\n * query over projected content, and fields that registered themselves through\n * {@link FORM_SECTION_FIELD_HOST}, which this panel provides. The content query\n * cannot see a field declared inside a child component's own template (a widget\n * projected into the panel), and a section that saw none of its fields reported no\n * required-and-empty count, claimed none of the failed save's field errors, and so\n * never badged on the rail. The injector follows the element tree across view\n * boundaries, so the registered set covers exactly those fields. A registered field\n * counts only while its element is physically inside this panel, which keeps a field\n * created in an overlay that happened to inherit this injector from being counted.\n *\n * @example\n * ```html\n * <mj-collapsible-panel\n * SectionKey=\"productDetails\"\n * SectionName=\"Product Details\"\n * Icon=\"fa fa-box\"\n * Variant=\"inherited\"\n * InheritedFromEntity=\"Products\"\n * [Form]=\"formComponent\"\n * [FormContext]=\"formContext\"\n * (Navigate)=\"onNavigate($event)\">\n * <mj-form-field ...></mj-form-field>\n * </mj-collapsible-panel>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-collapsible-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None, // Required to style projected content (grids, etc.)\n templateUrl: './collapsible-panel.component.html',\n styleUrls: ['./collapsible-panel.component.css'],\n // `providers`, not `viewProviders`: the fields that need to reach this panel sit in its\n // projected CONTENT (and in component views nested inside that content).\n providers: [{ provide: FORM_SECTION_FIELD_HOST, useExisting: forwardRef(() => MjCollapsiblePanelComponent) }],\n})\nexport class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, FormSectionIndicatorSource, FormSectionFieldHost {\n private cdr = inject(ChangeDetectorRef);\n private elementRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n private chrome = inject(FormChromeCoordinator, { optional: true });\n private indicators = inject(FormSectionIndicatorCoordinator, { optional: true });\n private commentsCoordinator = inject(FormRecordCommentsCoordinatorService, { optional: true });\n\n /** Unique key for state persistence */\n @Input() SectionKey = '';\n\n /**\n * Indicator counts a custom section supplies for content that is NOT rendered by\n * `mj-form-field` — a designer, an inline grid, a hand-built editor. Added to the\n * counts this panel derives from its own fields, so a section that mixes both\n * reports the union. Omit for ordinary field panels: their state is derived.\n *\n * ```html\n * <mj-collapsible-panel SectionKey=\"lines\" [Indicators]=\"{ DirtyCount: LineEditor.EditedRows, ErrorCount: LineEditor.InvalidRows }\">\n * ```\n */\n @Input() Indicators?: Partial<FormSectionIndicators> | null;\n\n /**\n * Graph-path collection names whose validation failures belong to THIS panel —\n * `ValidationSources=\"Modifications\"` claims `Modifications[2].ProvisionID`.\n *\n * Only needed when a panel hosts a child collection whose path name differs from\n * its `SectionKey`: plain field failures are joined automatically from the panel's\n * `mj-form-field` children, and a graph path whose leading segment already matches\n * the `SectionKey` is claimed without any declaration. Declared HERE, on the panel\n * that owns the collection, rather than in an app-side `fieldName -> sectionKey`\n * map that duplicates a fact the panel owns and drifts silently when a\n * `SectionKey` is renamed. Accepts a single name or a list.\n */\n @Input() ValidationSources?: string | readonly string[] | null;\n\n /** Display name shown in the panel header */\n @Input() SectionName = '';\n\n /** Font Awesome icon class for the panel header */\n @Input() Icon = 'fa fa-folder';\n\n /**\n * Reference to the parent form component for state delegation.\n * Expected to have IsSectionExpanded, SetSectionExpanded, getSectionDisplayOrder methods.\n */\n @Input() Form: unknown;\n\n /** Form-level context (search filter, showEmptyFields) */\n @Input() FormContext?: FormContext;\n\n /** Panel visual variant */\n @Input() Variant: PanelVariant = 'default';\n\n /**\n * Flex order, for a panel the form's section order does not know about.\n *\n * `getSectionDisplayOrder` answers with the section count for an unknown key, which is\n * the highest order on the form — so a contribution panel rendered anywhere lands last\n * regardless of the slot it mounted in. A slot-derived order is passed here instead.\n */\n @Input() Order: number | null = null;\n\n /** Row count badge for related entity sections */\n @Input() BadgeCount: number | undefined;\n\n /** Default expanded state when no persisted state exists */\n @Input() DefaultExpanded: boolean | undefined;\n\n /**\n * For 'inherited' variant: the parent entity name this section's fields come from.\n * Displayed as \"Inherited from X\" badge and used for navigation.\n */\n @Input() InheritedFromEntity = '';\n\n /**\n * For 'inherited' variant: the primary key to navigate to when clicking the badge.\n * (Shared PK in IS-A relationships.)\n */\n @Input() InheritedRecordPrimaryKey?: CompositeKey;\n\n /**\n * Container-driven hard hide. When true the panel is removed from view\n * regardless of search state — used by the record-form container to honor\n * `EntityFormConfig.showRelatedEntities` / `hiddenSectionKeys` /\n * `visibleSectionKeys`. Composes with (overrides) search visibility so all\n * existing `IsVisible`-based section counts stay correct.\n */\n @Input()\n set Hidden(value: boolean) {\n if (value !== this._hidden) {\n this._hidden = value;\n // Recompute visibility if content has initialized (FieldComponents present).\n if (this.FieldComponents) {\n this.updateVisibilityAndHighlighting();\n }\n }\n }\n get Hidden(): boolean {\n return this._hidden;\n }\n private _hidden = false;\n\n // ---- Deprecated camelCase aliases (backward compat) ----\n\n /** @deprecated Use [SectionKey] instead */\n @Input('sectionKey') set _deprecatedSectionKey(value: string) { this.SectionKey = value; }\n\n /** @deprecated Use [SectionName] instead */\n @Input('sectionName') set _deprecatedSectionName(value: string) { this.SectionName = value; }\n\n /** @deprecated Use [Icon] instead */\n @Input('icon') set _deprecatedIcon(value: string) { this.Icon = value; }\n\n /** @deprecated Use [Form] instead */\n @Input('form') set _deprecatedForm(value: unknown) { this.Form = value; }\n\n /** @deprecated Use [FormContext] instead */\n @Input('formContext') set _deprecatedFormContext(value: FormContext | undefined) { this.FormContext = value; }\n\n // ---- Outputs ----\n\n @Output() DragStarted = new EventEmitter<PanelDragStartEvent>();\n @Output() DragEnded = new EventEmitter<void>();\n @Output() PanelDrop = new EventEmitter<PanelDropEvent>();\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n\n // ---- Content Children ----\n\n @ContentChildren(MjFormFieldComponent, { descendants: true }) FieldComponents!: QueryList<MjFormFieldComponent>;\n\n /**\n * Fields that found this panel through {@link FORM_SECTION_FIELD_HOST} — those the content\n * query cannot see because a component view sits between them and the panel. Keyed by\n * instance; the value is the edit subscription that keeps the rail live for that field.\n */\n private readonly hostedFields = new Map<MjFormFieldComponent, Subscription>();\n\n /**\n * Bumped whenever the hosted set changes or a hosted field reports an input change. Every\n * reader of the field set touches it, so the views that read this section (its own host\n * bindings, the rail) become dependents Angular re-runs before its no-changes check when a\n * hosted field — refreshed AFTER those views in the same pass — changes underneath them. See\n * {@link FormSectionFieldHost.NotifyFieldChanged}.\n */\n private readonly hostedFieldsVersion = signal(0);\n\n /**\n * Memo behind {@link allFields}. Every real `mj-form-field` reaches this panel through the\n * injector — projected ones included — so the hosted set is the section's whole field list, and\n * the union is read several times per change-detection pass (three host bindings, the header,\n * hide-when-empty, the rail). Recomputed only when the hosted set or a hosted field's inputs\n * change (the signal) or the content query is replaced or resized.\n */\n private fieldsMemo: { version: number; content: QueryList<MjFormFieldComponent> | undefined; contentLength: number; fields: MjFormFieldComponent[] } | null = null;\n\n // ---- State ----\n\n DisplayName = '';\n FieldNames = '';\n IsVisible = true;\n\n /**\n * The fields this panel draws, for the contributions that stand in for one and for the\n * composition snapshot the placement dialog reads.\n *\n * Held as fields rather than derived in getters: the field-panel slot treats a new array\n * as a structural change, and a getter would hand it one on every change-detection pass.\n * Recomputed only when the projected fields change.\n */\n public ClaimableFields: Array<{ Name: string; Label: string }> = [];\n\n /** Just the names, for the field-panel slot. Same lifetime as {@link ClaimableFields}. */\n public ClaimableFieldNames: string[] = [];\n\n @HostBinding('attr.data-section-key')\n get HostSectionKey(): string {\n return this.SectionKey;\n }\n\n @HostBinding('attr.data-variant')\n get HostVariant(): string {\n return this.Variant;\n }\n\n @HostBinding('attr.data-icon')\n get HostIcon(): string {\n return this.Icon;\n }\n\n /**\n * Indicator counts mirrored onto the host element, so CSS and any DOM sweep can\n * read a section's state without a component reference.\n */\n @HostBinding('attr.data-dirty-count')\n get HostDirtyCount(): number {\n return this.SectionIndicators.DirtyCount;\n }\n\n @HostBinding('attr.data-error-count')\n get HostErrorCount(): number {\n return this.SectionIndicators.ErrorCount;\n }\n\n @HostBinding('class')\n get HostClass(): string {\n const classes = [`mj-panel--${this.Variant}`];\n if (!this.IsVisible) classes.push('mj-search-hidden');\n if (this.IsDragging) classes.push('mj-dragging');\n if (this.IsDragOver) classes.push('mj-drag-over');\n const indicators = this.SectionIndicators;\n if (indicators.DirtyCount > 0) classes.push('mj-panel-dirty');\n if (indicators.ErrorCount > 0) classes.push('mj-panel-has-errors');\n else if (indicators.WarningCount > 0) classes.push('mj-panel-has-warnings');\n if (this.chrome?.Spec.RelatedRoles.get(this.SectionKey) === 'Detail') {\n classes.push('mj-form-role-detail');\n }\n if (this.chrome?.HidesAccordionChrome(this.SectionKey)) {\n classes.push('mj-chrome-plain');\n }\n if (!this.hasRenderableContent()) {\n classes.push('mj-panel-empty');\n }\n return classes.join(' ');\n }\n\n /**\n * The host form, when this panel sits in one.\n *\n * `Form` stays `unknown` because the panel is reused outside a form host; this narrows\n * it for the one place that needs the record and the provider. The import is type-only,\n * so nothing about the runtime dependency direction changes.\n */\n public get FieldPanelForm(): BaseFormComponent | null {\n return (this.Form as BaseFormComponent | undefined) ?? null;\n }\n\n /** The entity this panel's fields belong to, or '' outside a form. */\n public get FieldPanelEntity(): string {\n return this.FieldPanelForm?.record?.EntityInfo?.Name ?? '';\n }\n\n /** True when a contribution could claim one of this panel's fields. */\n public get HostsFieldPanels(): boolean {\n return this.ClaimableFieldNames.length > 0 && !!this.FieldPanelForm?.record;\n }\n\n /**\n * Flex order, in precedence: where the user put this panel, then where its host said\n * to put it, then the form's section order.\n *\n * The user's placement comes first so a dragged panel draws where it was dropped. `Order`\n * is a fixed number a host supplies (a contribution panel derives one from its slot); it\n * applies only while the user has not placed the panel.\n */\n @HostBinding('style.order')\n get CssOrder(): number {\n const formRef = this.Form as {\n getSectionDisplayOrder?: (key: string) => number;\n getSectionOrderIndex?: (key: string) => number | null;\n };\n const placed = formRef?.getSectionOrderIndex?.(this.SectionKey);\n if (placed != null) return placed;\n if (this.Order != null) return this.Order;\n return formRef?.getSectionDisplayOrder ? formRef.getSectionDisplayOrder(this.SectionKey) : 0;\n }\n\n IsDragging = false;\n IsDragOver = false;\n\n // ---- Event relay ----\n\n /** Signals re-subscription when ContentChildren change */\n private fieldNavReset$ = new Subject<void>();\n private destroy$ = new Subject<void>();\n\n // ---- Panel content resize ----\n\n @ViewChild('panelContent') private panelContentRef?: ElementRef<HTMLElement>;\n private resizeObserver?: ResizeObserver;\n private resizeDebounceTimer?: ReturnType<typeof setTimeout>;\n /** ResizeObserver fires once synchronously on observe(); that initial measurement is not a user resize. */\n private resizeObserverPrimed = false;\n\n /**\n * Persisted accordion resize height for related-entity panels.\n * Related grids size themselves from row count (accordion and left-nav),\n * so a pinned pixel height — especially 0 / toolbar-only measured while\n * collapsed — would clip the grid. Only honor a user drag that is at\n * least the CSS min-height.\n */\n get PanelContentHeight(): number | undefined {\n if (this.Variant !== 'related-entity') return undefined;\n if (this.hidesAccordionChrome()) return undefined;\n const formRef = this.Form as { GetSectionPanelHeight?: (key: string) => number | undefined };\n const persisted = formRef?.GetSectionPanelHeight?.(this.SectionKey);\n if (persisted == null || persisted < 120) return undefined;\n return persisted;\n }\n\n private hidesAccordionChrome(): boolean {\n if (this.chrome?.HidesAccordionChrome(this.SectionKey)) return true;\n const el = this.elementRef.nativeElement as HTMLElement | undefined;\n return !!el?.classList.contains('mj-chrome-show');\n }\n\n /** Whether drag-to-reorder is allowed (from FormContext) */\n get ReorderAllowed(): boolean {\n return this.FormContext?.allowSectionReorder !== false;\n }\n\n /**\n * Whether this panel's header may collapse/expand. Driven by\n * `FormContext.collapsibleSections`; when false the panel renders\n * always-expanded with no toggle chevron (used by dialog/slide-in surfaces\n * that lock sections open). Undefined / true means collapsible.\n */\n get Collapsible(): boolean {\n // Selected left-nav item has no accordion chrome. More keeps collapse/expand.\n if (this.hidesAccordionChrome()) return false;\n return this.FormContext?.collapsibleSections !== false;\n }\n\n /** Whether the panel is expanded (delegates to form state; always true when not collapsible) */\n get Expanded(): boolean {\n if (!this.Collapsible) return true;\n const formRef = this.Form as { IsSectionExpanded?: (key: string, defaultExpanded?: boolean) => boolean };\n return formRef?.IsSectionExpanded ? formRef.IsSectionExpanded(this.SectionKey, this.DefaultExpanded) : true;\n }\n\n // ---- Fields (content query ∪ injector-registered) ----\n\n /** {@link FormSectionFieldHost} — a field rendered inside this section, at any view depth. */\n public RegisterField(field: MjFormFieldComponent): void {\n if (this.hostedFields.has(field)) return;\n // Same contract as a projected field: an edit refreshes the section's counts (and the\n // rail reading them) on the same tick as the keystroke.\n const edits = field.ValueChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n });\n this.hostedFields.set(field, edits);\n this.onFieldSetChanged();\n }\n\n /** {@link FormSectionFieldHost} */\n public UnregisterField(field: MjFormFieldComponent): void {\n const edits = this.hostedFields.get(field);\n if (!edits) return;\n edits.unsubscribe();\n this.hostedFields.delete(field);\n this.onFieldSetChanged();\n }\n\n /** {@link FormSectionFieldHost} */\n public NotifyFieldChanged(field: MjFormFieldComponent): void {\n if (!this.hostedFields.has(field)) return;\n this.onFieldSetChanged();\n }\n\n private onFieldSetChanged(): void {\n this.hostedFieldsVersion.update((v) => v + 1);\n // Visibility is latched, not derived: hide-when-empty and the all-denied check are computed\n // into IsVisible when the field set changes, so they have to be recomputed here too — a\n // hosted field binds its inputs after content init, and a section evaluated before that\n // would otherwise stay hidden (or visible) on the pre-binding answer.\n if (this.FieldComponents) {\n this.updateVisibilityAndHighlighting();\n }\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n }\n\n /**\n * Searchable display names of every field, read live rather than from the {@link FieldNames}\n * cache — only needed once a hosted field exists, because its name lands after registration\n * (see {@link refreshFieldNames}).\n */\n private liveFieldNames(): string {\n if (this.hostedFields.size === 0) return '';\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.DisplayName) names.push(field.DisplayName.toLowerCase());\n }\n return names.join(' ');\n }\n\n /**\n * Every `mj-form-field` this section fronts: the projected ones the content query found, plus\n * the injector-registered ones that have bound their inputs and whose element is inside this\n * panel. Unbound fields are left out because a field with no inputs reports itself hidden and\n * not required-and-empty, which is not information about the section. The containment check\n * is what stops a field created in an overlay, with this panel's injector as its ancestor, from\n * counting against a section it is not displayed in. Memoized — see {@link fieldsMemo}.\n */\n private allFields(): MjFormFieldComponent[] {\n const version = this.hostedFieldsVersion(); // dependency, see the field's doc\n const content = this.FieldComponents;\n const contentLength = content?.length ?? 0;\n const memo = this.fieldsMemo;\n if (memo && memo.version === version && memo.content === content && memo.contentLength === contentLength) {\n return memo.fields;\n }\n const fields: MjFormFieldComponent[] = content ? content.toArray() : [];\n if (this.hostedFields.size > 0) {\n const host = this.elementRef.nativeElement as HTMLElement | undefined;\n const seen = new Set(fields);\n for (const field of this.hostedFields.keys()) {\n if (seen.has(field)) continue;\n if (!field.InputsBound) continue;\n if (host && !host.contains(field.HostElement)) continue;\n fields.push(field);\n }\n }\n this.fieldsMemo = { version, content, contentLength, fields };\n return fields;\n }\n\n // ---- Section indicators (unsaved-changes dot + invalid-field count) ----\n\n /**\n * Live state of this section: fields edited since the last save, fields that are\n * invalid or required-and-empty, and fields carrying warnings. Derived from the\n * projected `mj-form-field`s on every read — the same state those fields use for\n * their own amber dot and red underline, so the section can never disagree with\n * its fields — plus graph-path validation failures this section claims, plus\n * whatever a custom section supplies through `[Indicators]`.\n *\n * Read during change detection (host bindings, the header template, the rail via\n * the coordinator). Pure and cheap: one pass over the field list.\n */\n public get SectionIndicators(): FormSectionIndicators {\n const commentCount = this.SectionCommentCount;\n return SumSectionIndicators(\n this.fieldIndicators(),\n TallyValidationErrors(this.claimedGraphErrors()),\n this.Indicators,\n commentCount > 0 ? { CommentCount: commentCount } : null,\n );\n }\n\n public get SectionDirtyCount(): number {\n return this.SectionIndicators.DirtyCount;\n }\n\n public get SectionErrorCount(): number {\n return this.SectionIndicators.ErrorCount;\n }\n\n public get SectionWarningCount(): number {\n return this.SectionIndicators.WarningCount;\n }\n\n public get SectionCommentCount(): number {\n return this.commentsCoordinator?.GetSectionOpenCommentCount(this.SectionKey, this.renderedFieldNames()) ?? 0;\n }\n\n public get SectionDirtyTitle(): string {\n return DescribeSectionDirty(this.SectionDirtyCount);\n }\n\n public get SectionErrorTitle(): string {\n return DescribeSectionErrors(this.SectionErrorCount);\n }\n\n public get SectionWarningTitle(): string {\n return DescribeSectionWarnings(this.SectionWarningCount);\n }\n\n public get SectionCommentTitle(): string {\n return DescribeSectionComments(this.SectionCommentCount);\n }\n\n public get CanCommentOnSection(): boolean {\n return Boolean(\n this.commentsCoordinator &&\n this.FieldPanelForm?.record?.IsSaved &&\n this.FieldPanelForm?.record?.EntityInfo?.AllowRecordComments !== false &&\n this.SectionKey\n );\n }\n\n public OnOpenSectionComments(event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n if (!this.commentsCoordinator || !this.SectionKey) return;\n\n const btn = event.currentTarget as HTMLElement | null;\n const rect = btn?.getBoundingClientRect();\n this.commentsCoordinator.OpenPopoverForTarget({\n AnchorType: 'Section',\n AnchorKey: this.SectionKey,\n Label: this.SectionName || this.SectionKey,\n SectionKey: this.SectionKey,\n SectionDisplayName: this.SectionName || this.SectionKey,\n AnchorRect: rect\n ? {\n top: rect.top,\n left: rect.left,\n right: rect.right,\n bottom: rect.bottom,\n width: rect.width,\n height: rect.height\n }\n : undefined\n });\n }\n\n /** {@link FormSectionIndicatorSource} — the rail reads this through the coordinator. */\n public GetSectionIndicators(): FormSectionIndicators {\n return this.SectionIndicators;\n }\n\n /** {@link FormSectionIndicatorSource} — whether a form-level error belongs to this section. */\n public OwnsValidationSource(source: ParsedValidationSource): boolean {\n return SectionOwnsValidationSource(source, this.SectionKey, this.validationScope());\n }\n\n /** Normalized {@link ValidationSources}. */\n public get ValidationCollectionNames(): string[] {\n const raw = this.ValidationSources;\n if (!raw) return [];\n return (typeof raw === 'string' ? [raw] : [...raw]).map((n) => n.trim()).filter((n) => n.length > 0);\n }\n\n /** Field names this panel renders — the join between a plain-field error and this section. */\n private renderedFieldNames(): string[] {\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.FieldName) names.push(field.FieldName);\n }\n return names;\n }\n\n private validationScope(): SectionValidationScope {\n return { FieldNames: this.renderedFieldNames(), CollectionNames: this.ValidationCollectionNames };\n }\n\n /**\n * Counts of FIELDS (not messages) in each state. A field is invalid when it shows a\n * failure OR is required and empty in edit mode — exactly the two conditions that\n * paint its underline red. Warnings count only on fields with no failure, mirroring\n * `MjFormFieldComponent.ShowWarnings`.\n */\n private fieldIndicators(): FormSectionIndicators {\n let DirtyCount = 0;\n let ErrorCount = 0;\n let WarningCount = 0;\n for (const field of this.allFields()) {\n if (field.IsDirty) DirtyCount++;\n // Only a field that renders an EDITOR can be invalid: a read-only field renders its\n // value as text and never paints an underline, so it is skipped even when\n // `IsRequiredEmpty` would say otherwise (a NOT NULL `__mj_CreatedAt` on a new record\n // is empty and read-only — the user cannot fix it, and it fills itself on save).\n if (!field.EditMode || field.IsFieldReadOnly) continue;\n if (field.ShowErrors || field.IsRequiredEmpty) ErrorCount++;\n // The field paints its amber underline on EITHER of these — a stored date the input\n // cannot parse warns on its own, outside the validation pipeline.\n else if (field.ShowWarnings || field.StoredDateIsUnreadable) WarningCount++;\n }\n return { DirtyCount, ErrorCount, WarningCount };\n }\n\n /**\n * Graph-path failures (`Lines[2].Amount`) this section owns, once the form has asked\n * for validation to show. Plain field-name failures are NOT counted here — the field\n * that renders them already reports through {@link fieldIndicators}.\n */\n private claimedGraphErrors(): ValidationErrorInfo[] {\n const ctx = this.FormContext;\n if (!ctx?.showValidation || !ctx.validationErrors?.length) return [];\n return ClaimedCollectionErrors(ctx.validationErrors, this.SectionKey, this.validationScope());\n }\n\n /** (Re)declare this section with the container-scoped registry the rail reads. */\n private registerIndicatorSource(previousKey?: string): void {\n if (!this.indicators) return;\n if (previousKey && previousKey !== this.SectionKey) {\n this.indicators.Unregister(this, previousKey);\n }\n this.indicators.Register(this);\n }\n\n // ---- Lifecycle ----\n\n ngOnInit(): void {\n this.DisplayName = this.SectionName;\n this.chrome?.Changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.updateVisibilityAndHighlighting();\n });\n this.commentsCoordinator?.Changed$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.updateVisibilityAndHighlighting();\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n });\n this.registerIndicatorSource();\n // A section that mounts after the rail was worked out (a slot panel that draws\n // itself only once its data has loaded) has to be filed onto the rail, or a\n // left-nav form never shows it.\n this.chrome?.NotifySectionsChanged();\n }\n\n ngAfterContentInit(): void {\n this.updateFieldNames();\n this.subscribeToFieldNavigateEvents();\n this.FieldComponents.changes.subscribe(() => {\n // Drop the field memo before anything below reads it: a replaced QueryList with the same\n // length would otherwise be served from the previous result.\n this.hostedFieldsVersion.update((v) => v + 1);\n this.updateFieldNames();\n this.subscribeToFieldNavigateEvents();\n // The set of fields changed, so the section's counts (and which errors it\n // claims) may have too — let the rail re-read.\n this.indicators?.NotifyChanged();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['SectionName']) {\n this.DisplayName = this.SectionName;\n }\n if (changes['SectionKey'] && !changes['SectionKey'].firstChange) {\n this.registerIndicatorSource(changes['SectionKey'].previousValue as string | undefined);\n }\n if (changes['SectionName'] || changes['FormContext']) {\n this.updateVisibilityAndHighlighting();\n }\n if (changes['FormContext'] && this.FieldComponents) {\n this.FieldComponents.forEach(field => {\n field.FormContext = this.FormContext;\n });\n }\n }\n\n ngAfterViewInit(): void {\n this.setupResizeObserver();\n }\n\n ngOnDestroy(): void {\n this.indicators?.Unregister(this);\n this.chrome?.NotifySectionsChanged();\n for (const edits of this.hostedFields.values()) edits.unsubscribe();\n this.hostedFields.clear();\n this.fieldNavReset$.next();\n this.fieldNavReset$.complete();\n this.destroy$.next();\n this.destroy$.complete();\n this.resizeObserver?.disconnect();\n if (this.resizeDebounceTimer) {\n clearTimeout(this.resizeDebounceTimer);\n }\n }\n\n // ---- Actions ----\n\n Toggle(): void {\n if (!this.Collapsible) return;\n const formRef = this.Form as { SetSectionExpanded?: (key: string, expanded: boolean) => void };\n if (formRef?.SetSectionExpanded) {\n formRef.SetSectionExpanded(this.SectionKey, !this.Expanded);\n this.cdr.markForCheck();\n }\n }\n\n /**\n * Navigate to the parent entity when clicking the \"Inherited from X\" badge.\n * Derives the PrimaryKey from the Form's record when InheritedRecordPrimaryKey\n * is not explicitly provided (which is the common case in generated templates).\n */\n OnInheritedBadgeClick(event: MouseEvent): void {\n event.stopPropagation();\n if (!this.InheritedFromEntity) return;\n\n const primaryKey = this.InheritedRecordPrimaryKey\n ?? (this.Form as { record?: { PrimaryKey: CompositeKey } })?.record?.PrimaryKey\n ?? new CompositeKey([]);\n\n this.Navigate.emit({\n Kind: 'entity-hierarchy',\n EntityName: this.InheritedFromEntity,\n PrimaryKey: primaryKey,\n Direction: 'parent'\n });\n }\n\n // ---- Drag and Drop ----\n\n @HostListener('dragover', ['$event'])\n OnDragOver(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n event.stopPropagation();\n if (event.dataTransfer?.types.includes('text/plain')) {\n this.IsDragOver = true;\n }\n }\n\n @HostListener('dragleave', ['$event'])\n OnDragLeave(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n this.IsDragOver = false;\n }\n\n @HostListener('drop', ['$event'])\n OnDrop(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n event.preventDefault();\n event.stopPropagation();\n this.IsDragOver = false;\n\n const sourceSectionKey = event.dataTransfer?.getData('text/plain');\n if (sourceSectionKey && sourceSectionKey !== this.SectionKey) {\n this.PanelDrop.emit({\n SourceSectionKey: sourceSectionKey,\n TargetSectionKey: this.SectionKey\n });\n this.reorderSections(sourceSectionKey, this.SectionKey);\n }\n }\n\n OnDragStart(event: DragEvent): void {\n if (!this.ReorderAllowed) return;\n this.IsDragging = true;\n event.dataTransfer?.setData('text/plain', this.SectionKey);\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = 'move';\n }\n this.DragStarted.emit({ SectionKey: this.SectionKey, Event: event });\n }\n\n OnDragEnd(): void {\n this.IsDragging = false;\n this.DragEnded.emit();\n }\n\n // ---- Private Methods ----\n\n /**\n * Move one panel to another's position and store the result.\n *\n * The list this works on is every panel currently on the form in the order they are\n * drawn, not the form's declared sections. A contribution panel is in no declared\n * section list, so working from that list meant a drag involving one matched no index\n * and returned without doing anything — the handle moved and the form did not.\n */\n private reorderSections(sourceSectionKey: string, targetSectionKey: string): void {\n const formRef = this.Form as {\n getSectionOrder?: () => string[];\n setSectionOrder?: (order: string[]) => void;\n };\n if (!formRef?.getSectionOrder || !formRef?.setSectionOrder) return;\n\n const currentOrder = this.visualPanelOrder(formRef.getSectionOrder());\n const sourceIndex = currentOrder.indexOf(sourceSectionKey);\n const targetIndex = currentOrder.indexOf(targetSectionKey);\n if (sourceIndex === -1 || targetIndex === -1) return;\n\n const newOrder = [...currentOrder];\n newOrder.splice(sourceIndex, 1);\n newOrder.splice(targetIndex, 0, sourceSectionKey);\n formRef.setSectionOrder(newOrder);\n this.cdr.markForCheck();\n }\n\n /**\n * Every panel on the form, in the order it is drawn.\n *\n * Ordered by each panel's own `style.order`, which is what CSS lays them out by, so a\n * panel positioned by its slot rather than by the section list still lands in the right\n * place here. Falls back to the declared order when the DOM cannot be read.\n *\n * Searched over descendants of the panels column, not over siblings: a contribution\n * panel is wrapped in its slot host, so it is not a sibling of the baked panels even\n * though it renders among them.\n */\n private visualPanelOrder(declared: readonly string[]): string[] {\n const host = this.elementRef?.nativeElement as HTMLElement | undefined;\n const column = host?.closest?.('.mj-forms-all-panels') ?? host?.parentElement;\n if (!column) return [...declared];\n\n const seen = new Set<string>();\n const found: Array<{ key: string; order: number; index: number }> = [];\n Array.from(column.querySelectorAll('[data-section-key]')).forEach((node, index) => {\n const key = node.getAttribute('data-section-key')?.trim();\n if (!key || seen.has(key)) return;\n seen.add(key);\n const raw = Number((node as HTMLElement).style?.order);\n found.push({ key, order: Number.isFinite(raw) ? raw : 0, index });\n });\n if (found.length === 0) return [...declared];\n\n const ordered = found\n .sort((a, b) => (a.order - b.order) || (a.index - b.index))\n .map((entry) => entry.key);\n // A declared section the DOM did not show — hidden, filtered — keeps its place in\n // the stored order rather than being dropped from it.\n for (const key of declared) {\n if (!seen.has(key)) ordered.push(key);\n }\n return ordered;\n }\n\n /**\n * Field panels whose only children are empty/hidden (e.g. leftover\n * `Details` with just unused geo columns) should not take space.\n * Custom widgets and related grids have no FieldComponents — keep them.\n */\n /**\n * Whether this panel matches a section-search term by title or field\n * name. Ignores chrome hide/show — the rail uses this to decide if the\n * *group* matches, even when another section is currently selected.\n */\n public MatchesSearch(term: string): boolean {\n const filter = (term || '').toLowerCase().trim();\n if (!filter) return true;\n if (this.SectionName.toLowerCase().includes(filter)) return true;\n if (this.SectionKey.toLowerCase().includes(filter)) return true;\n return this.FieldNames.includes(filter) || this.liveFieldNames().includes(filter);\n }\n\n private hasRenderableContent(): boolean {\n if (this.Variant === 'related-entity') return true;\n if (this.SectionCommentCount > 0) return true;\n const fields = this.allFields();\n if (fields.length === 0) return true;\n return fields.some((field) => !field.ShouldHideField);\n }\n\n private isHiddenByChrome(): boolean {\n if (!this.chrome) return false;\n if (this.Variant === 'related-entity') {\n return !this.chrome.IsRelatedSectionVisible(this.SectionKey);\n }\n return !this.chrome.IsFirstClassSectionVisible(this.SectionKey);\n }\n\n /**\n * Refresh {@link ClaimableFieldNames}, keeping the previous array when the set is\n * unchanged so the field-panel slot does not read a new reference as a new set.\n */\n private updateClaimableFieldNames(): void {\n const next: Array<{ Name: string; Label: string }> = [];\n for (const field of this.allFields()) {\n if (field.FieldName) next.push({ Name: field.FieldName, Label: field.HostFieldLabel });\n }\n const prev = this.ClaimableFields;\n const same = prev.length === next.length\n && prev.every((f, i) => f.Name === next[i].Name && f.Label === next[i].Label);\n if (same) return;\n this.ClaimableFields = next;\n this.ClaimableFieldNames = next.map((f) => f.Name);\n }\n\n private updateFieldNames(): void {\n if (this.FieldComponents) {\n this.refreshFieldNames();\n this.updateClaimableFieldNames();\n this.updateVisibilityAndHighlighting();\n }\n }\n\n /**\n * Rebuild the searchable field-name string from the current field set. Rebuilt on structural\n * changes only; a hosted field's DisplayName is bound after it registers (its inputs land on its\n * own view's first pass), so search also reads names live through {@link liveFieldNames}\n * rather than relying on this cache alone.\n */\n private refreshFieldNames(): void {\n const names: string[] = [];\n for (const field of this.allFields()) {\n if (field.DisplayName) {\n names.push(field.DisplayName.toLowerCase());\n }\n }\n this.FieldNames = names.join(' ');\n }\n\n /**\n * Subscribes to Navigate events from all child form-field components\n * and relays them through this panel's Navigate output. Also listens for\n * value edits so the section indicators (and the rail reading them) refresh\n * on the same tick as the keystroke rather than on the container's next poll.\n */\n private subscribeToFieldNavigateEvents(): void {\n this.fieldNavReset$.next(); // tear down previous subscriptions\n this.FieldComponents.forEach(field => {\n field.Navigate.pipe(takeUntil(this.fieldNavReset$)).subscribe((event: FormNavigationEvent) => {\n this.Navigate.emit(event);\n });\n // A real projected field also reached this panel through the injector and already has\n // this subscription from RegisterField; a second one would notify the rail twice per edit.\n if (this.hostedFields.has(field)) return;\n field.ValueChange.pipe(takeUntil(this.fieldNavReset$)).subscribe(() => {\n this.cdr.markForCheck();\n this.indicators?.NotifyChanged();\n });\n });\n }\n\n /**\n * Sets up a ResizeObserver on the panel content div for related-entity panels.\n * When the user drags the CSS resize handle, we persist the new height.\n */\n private setupResizeObserver(): void {\n if (this.Variant !== 'related-entity' || !this.panelContentRef) return;\n\n const el = this.panelContentRef.nativeElement;\n // Run outside Angular zone to avoid triggering change detection on every resize frame\n this.ngZone.runOutsideAngular(() => {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Skip the synchronous initial fire emitted when observe() is called — it's the\n // panel's own first measurement on load, not a user-initiated resize. Persisting\n // it would write a spurious panelHeight for every panel on form open.\n if (!this.resizeObserverPrimed) {\n this.resizeObserverPrimed = true;\n return;\n }\n // Only a height change while the panel is expanded reflects a genuine user drag of\n // the resize handle. Ignore reflows while collapsed (e.g. content settling on load).\n if (!this.Expanded) return;\n // Left-nav sizes the grid from the leftover column. Persisting that\n // computed height would write ~0 (or the toolbar) and then pin it.\n if (this.hidesAccordionChrome()) return;\n const entry = entries[0];\n if (!entry) return;\n const newHeight = Math.round(entry.contentRect.height);\n if (newHeight < 120) return;\n this.debouncePersistHeight(newHeight);\n });\n this.resizeObserver.observe(el);\n });\n }\n\n /**\n * Debounces height persistence so we don't write to DB on every resize frame.\n */\n private debouncePersistHeight(height: number): void {\n if (this.resizeDebounceTimer) {\n clearTimeout(this.resizeDebounceTimer);\n }\n this.resizeDebounceTimer = setTimeout(() => {\n const formRef = this.Form as { SetSectionPanelHeight?: (key: string, height: number) => void };\n formRef?.SetSectionPanelHeight?.(this.SectionKey, height);\n }, 500);\n }\n\n /**\n * True when this panel projects form fields and field-level security denies the user EVERY one\n * of them.\n *\n * Deliberately false when the panel projects no `mj-form-field` at all — related-entity grids,\n * IS-A cards and slot-injected panels all legitimately have none, and hiding those would remove\n * sections field security has nothing to say about. \"No fields\" and \"no readable fields\" are\n * different states and only the second one should hide the section.\n */\n private get allProjectedFieldsDenied(): boolean {\n const fields = this.allFields();\n if (fields.length === 0) {\n return false;\n }\n return fields.every(f => !f.IsFieldReadableByUser);\n }\n\n private updateVisibilityAndHighlighting(): void {\n // Hard hide takes precedence over search state. Driven by an explicit\n // `Hidden` input OR the form config's section-visibility rules carried on\n // FormContext (which also reach slot-injected BaseFormPanels, since every\n // panel receives FormContext).\n if (this._hidden || IsFormSectionHidden(this.FormContext, this.SectionKey, this.Variant) || this.isHiddenByChrome()) {\n this.IsVisible = false;\n this.DisplayName = EscapeHTML(this.SectionName);\n this.cdr.markForCheck();\n return;\n }\n\n // A section whose every field is denied by field-level security renders as a heading over\n // nothing — the fields hide themselves individually, leaving an empty card that reads like a\n // broken screen rather than a permissions boundary. Hide the section instead.\n if (this.allProjectedFieldsDenied) {\n this.IsVisible = false;\n this.DisplayName = EscapeHTML(this.SectionName);\n this.cdr.markForCheck();\n return;\n }\n\n const searchTerm = (this.FormContext?.sectionFilter || '').toLowerCase().trim();\n\n if (!searchTerm) {\n this.IsVisible = this.hasRenderableContent();\n this.DisplayName = this.SectionName;\n this.cdr.markForCheck();\n return;\n }\n\n const sectionMatches = this.SectionName.toLowerCase().includes(searchTerm);\n this.IsVisible = this.MatchesSearch(searchTerm);\n\n // DisplayName is bound to `[innerHTML]` in the template — must always be HTML-safe.\n this.DisplayName =\n this.IsVisible && sectionMatches\n ? HighlightSearchMatches(this.SectionName, searchTerm, 'mj-forms-search-highlight')\n : EscapeHTML(this.SectionName);\n\n this.cdr.markForCheck();\n }\n}\n","<div class=\"mj-forms-panel\"\n [class.mj-forms-panel--related]=\"Variant === 'related-entity'\"\n [class.mj-forms-panel--inherited]=\"Variant === 'inherited'\"\n [attr.data-section-key]=\"SectionKey\">\n\n <!-- Panel Header -->\n <div class=\"mj-forms-panel-header\"\n [class.mj-forms-panel-header--static]=\"!Collapsible\"\n [attr.role]=\"Collapsible ? 'button' : null\"\n [attr.tabindex]=\"Collapsible ? 0 : null\"\n (click)=\"Toggle()\">\n <!-- Drag Handle (hidden when reorder disabled) -->\n @if (ReorderAllowed) {\n <div class=\"mj-forms-drag-handle\"\n title=\"Drag to reorder sections\"\n draggable=\"true\"\n (dragstart)=\"OnDragStart($event)\"\n (dragend)=\"OnDragEnd()\"\n (click)=\"$event.stopPropagation()\">\n <i class=\"fa-solid fa-grip-vertical\"></i>\n </div>\n }\n\n <!-- Icon + Title -->\n <div class=\"mj-forms-panel-title-group\">\n <i [class]=\"Icon\" class=\"mj-forms-panel-icon\"></i>\n <h3 class=\"mj-forms-panel-title\">\n <span [innerHTML]=\"DisplayName\"></span>\n <!-- Section indicators: unsaved-changes dot (same idiom as an edited field's\n label dot) and invalid-field count (same colour as the field's red underline).\n Derived from the projected fields — see SectionIndicators. -->\n @if (SectionDirtyCount > 0) {\n <span class=\"mj-forms-panel-dirty\"\n role=\"img\"\n [title]=\"SectionDirtyTitle\"\n [attr.aria-label]=\"SectionDirtyTitle\"></span>\n }\n @if (SectionErrorCount > 0) {\n <span class=\"mj-forms-panel-error-badge\"\n role=\"img\"\n [title]=\"SectionErrorTitle\"\n [attr.aria-label]=\"SectionErrorTitle\">\n <i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i>{{ SectionErrorCount }}\n </span>\n } @else if (SectionWarningCount > 0) {\n <span class=\"mj-forms-panel-warning-badge\"\n role=\"img\"\n [title]=\"SectionWarningTitle\"\n [attr.aria-label]=\"SectionWarningTitle\">\n <i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i>{{ SectionWarningCount }}\n </span>\n }\n <!-- Row count badge for related entities -->\n @if (BadgeCount !== undefined) {\n <span class=\"mj-forms-row-count-badge\" [class.mj-forms-row-count-badge--zero]=\"BadgeCount === 0\">\n {{ BadgeCount }}\n </span>\n }\n <!-- Open anchored comments badge for this section + its fields -->\n @if (SectionCommentCount > 0) {\n <button\n type=\"button\"\n class=\"mj-forms-panel-comment-badge\"\n [title]=\"SectionCommentTitle\"\n [attr.aria-label]=\"SectionCommentTitle\"\n (click)=\"OnOpenSectionComments($event)\">\n <i class=\"fa-regular fa-comment-dots\" aria-hidden=\"true\"></i>\n <span>{{ SectionCommentCount }}</span>\n </button>\n }\n </h3>\n </div>\n\n <!-- Section comment hover trigger (when 0 open comments) -->\n @if (CanCommentOnSection && SectionCommentCount === 0) {\n <button\n type=\"button\"\n class=\"mj-forms-panel-comment-trigger\"\n [title]=\"'Comment on ' + (SectionName || SectionKey)\"\n [attr.aria-label]=\"'Comment on ' + (SectionName || SectionKey)\"\n (click)=\"OnOpenSectionComments($event)\">\n <i class=\"fa-regular fa-comment-dots\" aria-hidden=\"true\"></i>\n </button>\n }\n\n <!-- Inherited From badge (IS-A) -->\n @if (Variant === 'inherited' && InheritedFromEntity) {\n <a class=\"mj-forms-inherited-badge\" (click)=\"OnInheritedBadgeClick($event)\"\n [title]=\"'View parent record: ' + InheritedFromEntity\">\n <i class=\"fa-solid fa-arrow-up\"></i>\n Inherited from {{ InheritedFromEntity }}\n </a>\n }\n\n <!-- Chevron (hidden when sections are locked open) -->\n @if (Collapsible) {\n <div class=\"mj-forms-panel-chevron\">\n <i [class]=\"Expanded ? 'fa fa-chevron-up' : 'fa fa-chevron-down'\"></i>\n </div>\n }\n </div>\n\n <!-- Panel Body -->\n <div class=\"mj-forms-panel-body\" [class.mj-forms-panel-body--collapsed]=\"!Expanded\">\n <div class=\"mj-forms-panel-content\"\n #panelContent\n [style.height.px]=\"PanelContentHeight\">\n <!-- Contributions drawn inside this section: one host above the fields, one below. A\n panel standing in for fields draws in their place; one placed in the section by its\n key replaces nothing. -->\n @if (HostsFieldPanels) {\n <mj-form-field-panel-slot\n [Entity]=\"FieldPanelEntity\"\n [FieldNames]=\"ClaimableFieldNames\"\n [SectionKey]=\"SectionKey\"\n Position=\"start\"\n [Record]=\"FieldPanelForm!.record\"\n [FormComponent]=\"FieldPanelForm!\"\n [FormContext]=\"FormContext\">\n </mj-form-field-panel-slot>\n }\n <ng-content></ng-content>\n @if (HostsFieldPanels) {\n <mj-form-field-panel-slot\n [Entity]=\"FieldPanelEntity\"\n [FieldNames]=\"ClaimableFieldNames\"\n [SectionKey]=\"SectionKey\"\n Position=\"end\"\n [Record]=\"FieldPanelForm!.record\"\n [FormComponent]=\"FieldPanelForm!\"\n [FormContext]=\"FormContext\">\n </mj-form-field-panel-slot>\n }\n </div>\n </div>\n</div>\n"]}
@@ -31,8 +31,8 @@ export declare const RELATED_GRID_BOTTOM_PAD_PX = 2;
31
31
  * shown — with zero rows there is no row to clip.
32
32
  */
33
33
  export declare const RELATED_GRID_HSCROLLBAR_PX = 17;
34
- /** Empty-state body when there are no rows (inline icon + title, no 200px floor). */
35
- export declare const RELATED_GRID_EMPTY_BODY_PX = 56;
34
+ /** Empty-state body when there are no rows (inline icon + 1–2 line title, no 200px floor). */
35
+ export declare const RELATED_GRID_EMPTY_BODY_PX = 76;
36
36
  /** Default cap for nav-related grids. `null` on the input means unbounded. */
37
37
  export declare const RELATED_GRID_DEFAULT_MAX_PX = 560;
38
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"related-grid-height.d.ts","sourceRoot":"","sources":["../../src/lib/related-grid-height.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,oBAAoB;AACpB,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,8EAA8E;AAC9E,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAc7G"}
1
+ {"version":3,"file":"related-grid-height.d.ts","sourceRoot":"","sources":["../../src/lib/related-grid-height.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,oBAAoB;AACpB,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,8FAA8F;AAC9F,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,8EAA8E;AAC9E,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAc7G"}
@@ -31,8 +31,8 @@ export const RELATED_GRID_BOTTOM_PAD_PX = 2;
31
31
  * shown — with zero rows there is no row to clip.
32
32
  */
33
33
  export const RELATED_GRID_HSCROLLBAR_PX = 17;
34
- /** Empty-state body when there are no rows (inline icon + title, no 200px floor). */
35
- export const RELATED_GRID_EMPTY_BODY_PX = 56;
34
+ /** Empty-state body when there are no rows (inline icon + 1–2 line title, no 200px floor). */
35
+ export const RELATED_GRID_EMPTY_BODY_PX = 76;
36
36
  /** Default cap for nav-related grids. `null` on the input means unbounded. */
37
37
  export const RELATED_GRID_DEFAULT_MAX_PX = 560;
38
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"related-grid-height.js","sourceRoot":"","sources":["../../src/lib/related-grid-height.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,oBAAoB;AACpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC;;;;;GAKG;AACH,MAAM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AAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/** Toolbar row: 48px content + its 1px bottom border (measured live). */\nexport const RELATED_GRID_TOOLBAR_PX = 49;\n/**\n * Column header row as AG Grid's theme renders it: `--ag-header-height` (48px in v35's\n * default theme) + its 1px bottom border (measured live). This was 40px, which left every\n * related grid 9px short and clipped the last row's bottom border even with no horizontal\n * overflow.\n */\nexport const RELATED_GRID_HEADER_PX = 49;\n/** One data row. */\nexport const RELATED_GRID_ROW_PX = 40;\n/**\n * Wrapper chrome the grid body never gets: the component wrapper's top+bottom\n * border (2px) plus ag-root-wrapper's top+bottom border (2px). Unbudgeted,\n * these four pixels squeeze the body viewport below the row total and AG Grid\n * answers with a needless vertical scrollbar.\n */\nexport const RELATED_GRID_BORDERS_PX = 4;\n/** Small slack so the last row's bottom border is never clipped by the grid edge. */\nexport const RELATED_GRID_BOTTOM_PAD_PX = 2;\n/**\n * AG Grid's horizontal scrollbar. It renders INSIDE the grid viewport, so when\n * columns overflow (the norm for wide related entities inside a form panel) an\n * unbudgeted bar eats the last row's height and clips it mid-glyph. Classic\n * scrollbars are 15–17px; overlay scrollbars cost the reserve as a little slack.\n *\n * This is the FALLBACK reserve, used only by callers that do not measure the bar.\n * `<mj-explorer-entity-data-grid>` measures it from the DOM after layout and passes\n * the real height (0 when the columns fit, or on overlay-scrollbar platforms) as\n * `scrollbarPx`, which replaces this reserve entirely. Reserved only when rows are\n * shown — with zero rows there is no row to clip.\n */\nexport const RELATED_GRID_HSCROLLBAR_PX = 17;\n/** Empty-state body when there are no rows (inline icon + title, no 200px floor). */\nexport const RELATED_GRID_EMPTY_BODY_PX = 56;\n/** Default cap for nav-related grids. `null` on the input means unbounded. */\nexport const RELATED_GRID_DEFAULT_MAX_PX = 560;\n\n/**\n * Pixel height for a related-entity grid: toolbar + header + rows + border\n * chrome + a horizontal-scrollbar allowance + a small bottom pad. No minimum\n * floor. When `maxHeight` is a positive number and the content is taller, the\n * returned height is that cap and AG Grid scrolls inside. Omit / null\n * `maxHeight` to grow with the rows.\n *\n * `scrollbarPx` is the MEASURED height of AG Grid's horizontal scrollbar. AG Grid\n * lays that scrollbar out INSIDE the box it is given, so when the columns overflow\n * the container it eats into the last row unless it is budgeted here. A caller that\n * has measured it passes the number — 0 when there is no horizontal overflow, or\n * when the platform draws overlay scrollbars that take no layout space — and that\n * measurement replaces the fixed reserve. A caller that has not measured it omits\n * the argument and gets `RELATED_GRID_HSCROLLBAR_PX` whenever rows are shown, so\n * an unmeasured grid never clips a row on a classic-scrollbar platform. A negative\n * or non-finite value is not a measurement and falls back the same way. The\n * allowance never pushes the result past `maxHeight`.\n */\nexport function RelatedGridHeightPx(rowCount: number, maxHeight?: number | null, scrollbarPx?: number): number {\n const rows = Number.isFinite(rowCount) ? Math.max(0, Math.floor(rowCount)) : 0;\n const measured = typeof scrollbarPx === 'number' && Number.isFinite(scrollbarPx) && scrollbarPx >= 0;\n const scrollbar = measured\n ? Math.round(scrollbarPx)\n : (rows === 0 ? 0 : RELATED_GRID_HSCROLLBAR_PX);\n const body = rows === 0\n ? RELATED_GRID_EMPTY_BODY_PX\n : RELATED_GRID_HEADER_PX + rows * RELATED_GRID_ROW_PX;\n const raw = RELATED_GRID_TOOLBAR_PX + body + RELATED_GRID_BORDERS_PX + RELATED_GRID_BOTTOM_PAD_PX + scrollbar;\n if (typeof maxHeight === 'number' && maxHeight > 0) {\n return Math.min(maxHeight, raw);\n }\n return raw;\n}\n"]}
1
+ {"version":3,"file":"related-grid-height.js","sourceRoot":"","sources":["../../src/lib/related-grid-height.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,oBAAoB;AACpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE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AC,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/** Toolbar row: 48px content + its 1px bottom border (measured live). */\nexport const RELATED_GRID_TOOLBAR_PX = 49;\n/**\n * Column header row as AG Grid's theme renders it: `--ag-header-height` (48px in v35's\n * default theme) + its 1px bottom border (measured live). This was 40px, which left every\n * related grid 9px short and clipped the last row's bottom border even with no horizontal\n * overflow.\n */\nexport const RELATED_GRID_HEADER_PX = 49;\n/** One data row. */\nexport const RELATED_GRID_ROW_PX = 40;\n/**\n * Wrapper chrome the grid body never gets: the component wrapper's top+bottom\n * border (2px) plus ag-root-wrapper's top+bottom border (2px). Unbudgeted,\n * these four pixels squeeze the body viewport below the row total and AG Grid\n * answers with a needless vertical scrollbar.\n */\nexport const RELATED_GRID_BORDERS_PX = 4;\n/** Small slack so the last row's bottom border is never clipped by the grid edge. */\nexport const RELATED_GRID_BOTTOM_PAD_PX = 2;\n/**\n * AG Grid's horizontal scrollbar. It renders INSIDE the grid viewport, so when\n * columns overflow (the norm for wide related entities inside a form panel) an\n * unbudgeted bar eats the last row's height and clips it mid-glyph. Classic\n * scrollbars are 15–17px; overlay scrollbars cost the reserve as a little slack.\n *\n * This is the FALLBACK reserve, used only by callers that do not measure the bar.\n * `<mj-explorer-entity-data-grid>` measures it from the DOM after layout and passes\n * the real height (0 when the columns fit, or on overlay-scrollbar platforms) as\n * `scrollbarPx`, which replaces this reserve entirely. Reserved only when rows are\n * shown — with zero rows there is no row to clip.\n */\nexport const RELATED_GRID_HSCROLLBAR_PX = 17;\n/** Empty-state body when there are no rows (inline icon + 1–2 line title, no 200px floor). */\nexport const RELATED_GRID_EMPTY_BODY_PX = 76;\n/** Default cap for nav-related grids. `null` on the input means unbounded. */\nexport const RELATED_GRID_DEFAULT_MAX_PX = 560;\n\n/**\n * Pixel height for a related-entity grid: toolbar + header + rows + border\n * chrome + a horizontal-scrollbar allowance + a small bottom pad. No minimum\n * floor. When `maxHeight` is a positive number and the content is taller, the\n * returned height is that cap and AG Grid scrolls inside. Omit / null\n * `maxHeight` to grow with the rows.\n *\n * `scrollbarPx` is the MEASURED height of AG Grid's horizontal scrollbar. AG Grid\n * lays that scrollbar out INSIDE the box it is given, so when the columns overflow\n * the container it eats into the last row unless it is budgeted here. A caller that\n * has measured it passes the number — 0 when there is no horizontal overflow, or\n * when the platform draws overlay scrollbars that take no layout space — and that\n * measurement replaces the fixed reserve. A caller that has not measured it omits\n * the argument and gets `RELATED_GRID_HSCROLLBAR_PX` whenever rows are shown, so\n * an unmeasured grid never clips a row on a classic-scrollbar platform. A negative\n * or non-finite value is not a measurement and falls back the same way. The\n * allowance never pushes the result past `maxHeight`.\n */\nexport function RelatedGridHeightPx(rowCount: number, maxHeight?: number | null, scrollbarPx?: number): number {\n const rows = Number.isFinite(rowCount) ? Math.max(0, Math.floor(rowCount)) : 0;\n const measured = typeof scrollbarPx === 'number' && Number.isFinite(scrollbarPx) && scrollbarPx >= 0;\n const scrollbar = measured\n ? Math.round(scrollbarPx)\n : (rows === 0 ? 0 : RELATED_GRID_HSCROLLBAR_PX);\n const body = rows === 0\n ? RELATED_GRID_EMPTY_BODY_PX\n : RELATED_GRID_HEADER_PX + rows * RELATED_GRID_ROW_PX;\n const raw = RELATED_GRID_TOOLBAR_PX + body + RELATED_GRID_BORDERS_PX + RELATED_GRID_BOTTOM_PAD_PX + scrollbar;\n if (typeof maxHeight === 'number' && maxHeight > 0) {\n return Math.min(maxHeight, raw);\n }\n return raw;\n}\n"]}
@@ -17,6 +17,8 @@ export interface FormSectionIndicators {
17
17
  ErrorCount: number;
18
18
  /** Fields carrying a warning-level validation result and no failure. */
19
19
  WarningCount: number;
20
+ /** Open anchored comment threads inside this section or its fields (when > 0). */
21
+ CommentCount?: number;
20
22
  }
21
23
  export declare const EMPTY_SECTION_INDICATORS: Readonly<FormSectionIndicators>;
22
24
  /** Add any number of indicator sets. Missing / non-finite counts read as 0. */
@@ -94,4 +96,6 @@ export declare function DescribeSectionErrors(count: number, where?: string): st
94
96
  export declare function DescribeSectionWarnings(count: number, where?: string): string;
95
97
  /** Tooltip / screen-reader text for the unsaved-changes dot. */
96
98
  export declare function DescribeSectionDirty(count: number, where?: string): string;
99
+ /** Tooltip / screen-reader text for an open-comments badge on a section or rail group. */
100
+ export declare function DescribeSectionComments(count: number, where?: string): string;
97
101
  //# sourceMappingURL=form-section-indicators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-section-indicators.d.ts","sourceRoot":"","sources":["../../../src/lib/section-indicators/form-section-indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,wBAAwB,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,qBAAqB,CAInE,CAAC;AAEH,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAClC,GAAG,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GACxE,qBAAqB,CAWvB;AAED,iDAAiD;AACjD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGzG;AAMD;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,sBAAsB,CAkB/F;AAED,2FAA2F;AAC3F,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,sBAAsB,EAC9B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,GAAG,SAAS,EACzD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,GAC5B,mBAAmB,EAAE,CAMvB;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,cAAc,CAAC,CAQxI;AAED,uDAAuD;AACvD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGnF;AAED,wDAAwD;AACxD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGrF;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGlF"}
1
+ {"version":3,"file":"form-section-indicators.d.ts","sourceRoot":"","sources":["../../../src/lib/section-indicators/form-section-indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,wBAAwB,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,W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AAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,GAAG,SAAS,EACzD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,GAC5B,mBAAmB,EAAE,CAMvB;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,cAAc,CAAC,CAQxI;AAED,uDAAuD;AACvD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGnF;AAED,wDAAwD;AACxD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGrF;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGlF;AAED,0FAA0F;AAC1F,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAGrF"}
@@ -9,12 +9,17 @@ export function SumSectionIndicators(...sets) {
9
9
  let DirtyCount = 0;
10
10
  let ErrorCount = 0;
11
11
  let WarningCount = 0;
12
+ let CommentCount = 0;
12
13
  for (const set of sets) {
13
14
  if (!set)
14
15
  continue;
15
16
  DirtyCount += CountOrZero(set.DirtyCount);
16
17
  ErrorCount += CountOrZero(set.ErrorCount);
17
18
  WarningCount += CountOrZero(set.WarningCount);
19
+ CommentCount += CountOrZero(set.CommentCount);
20
+ }
21
+ if (CommentCount > 0) {
22
+ return { DirtyCount, ErrorCount, WarningCount, CommentCount };
18
23
  }
19
24
  return { DirtyCount, ErrorCount, WarningCount };
20
25
  }
@@ -22,7 +27,10 @@ export function SumSectionIndicators(...sets) {
22
27
  export function SectionIndicatorsAreEmpty(set) {
23
28
  if (!set)
24
29
  return true;
25
- return CountOrZero(set.DirtyCount) === 0 && CountOrZero(set.ErrorCount) === 0 && CountOrZero(set.WarningCount) === 0;
30
+ return (CountOrZero(set.DirtyCount) === 0 &&
31
+ CountOrZero(set.ErrorCount) === 0 &&
32
+ CountOrZero(set.WarningCount) === 0 &&
33
+ CountOrZero(set.CommentCount) === 0);
26
34
  }
27
35
  function CountOrZero(value) {
28
36
  return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;
@@ -129,4 +137,10 @@ export function DescribeSectionDirty(count, where = 'this section') {
129
137
  return '';
130
138
  return count === 1 ? `1 unsaved change in ${where}` : `${count} unsaved changes in ${where}`;
131
139
  }
140
+ /** Tooltip / screen-reader text for an open-comments badge on a section or rail group. */
141
+ export function DescribeSectionComments(count, where = 'this section') {
142
+ if (count <= 0)
143
+ return '';
144
+ return count === 1 ? `1 open comment in ${where}` : `${count} open comments in ${where}`;
145
+ }
132
146
  //# sourceMappingURL=form-section-indicators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-section-indicators.js","sourceRoot":"","sources":["../../../src/lib/section-indicators/form-section-indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAsBlF,MAAM,CAAC,MAAM,wBAAwB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACrF,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB,CAClC,GAAG,IAAsE;IAEzE,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,UAAU,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC1C,UAAU,IAAI,WAAW,CAAC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,cAAc,KAAK,kBAAkB,CAAC,CAAC,CAAC,GAAG,KAAK,cAAc,KAAK,iBAAiB,CAAC;AAC5G,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,uBAAuB,CAAC,KAAa,EAAE,KAAK,GAAG,cAAc;IAC3E,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,cAAc,KAAK,gBAAgB,CAAC;AACzG,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAAE,KAAK,GAAG,cAAc;IACxE,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,uBAAuB,KAAK,EAAE,CAAC;AAC/F,CAAC","sourcesContent":["import { ValidationErrorInfo, ValidationErrorType } from '@memberjunction/global';\n\n/**\n * Per-section state a form's chrome can surface — the left-nav rail, an accordion\n * header, the collapsed rail spine — so a user editing a multi-section record can see\n * WHICH section holds unsaved edits or invalid input without opening each one.\n *\n * Counts are of **fields**, not messages: a section with one required field left blank\n * and one field failing two rules reports `ErrorCount: 2`.\n */\nexport interface FormSectionIndicators {\n /** Fields modified since the last save. Mirrors the amber dot on an edited field. */\n DirtyCount: number;\n /**\n * Fields that cannot be saved as they stand — a failing validation rule, or a\n * required field that is empty. Mirrors the red underline on the field itself.\n */\n ErrorCount: number;\n /** Fields carrying a warning-level validation result and no failure. */\n WarningCount: number;\n}\n\nexport const EMPTY_SECTION_INDICATORS: Readonly<FormSectionIndicators> = Object.freeze({\n DirtyCount: 0,\n ErrorCount: 0,\n WarningCount: 0,\n});\n\n/** Add any number of indicator sets. Missing / non-finite counts read as 0. */\nexport function SumSectionIndicators(\n ...sets: ReadonlyArray<Partial<FormSectionIndicators> | null | undefined>\n): FormSectionIndicators {\n let DirtyCount = 0;\n let ErrorCount = 0;\n let WarningCount = 0;\n for (const set of sets) {\n if (!set) continue;\n DirtyCount += CountOrZero(set.DirtyCount);\n ErrorCount += CountOrZero(set.ErrorCount);\n WarningCount += CountOrZero(set.WarningCount);\n }\n return { DirtyCount, ErrorCount, WarningCount };\n}\n\n/** True when nothing in the set would render. */\nexport function SectionIndicatorsAreEmpty(set: Partial<FormSectionIndicators> | null | undefined): boolean {\n if (!set) return true;\n return CountOrZero(set.DirtyCount) === 0 && CountOrZero(set.ErrorCount) === 0 && CountOrZero(set.WarningCount) === 0;\n}\n\nfunction CountOrZero(value: number | undefined): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;\n}\n\n/**\n * A `ValidationErrorInfo.Source` broken into the parts a section needs in order to\n * decide whether the failure belongs to it.\n *\n * MJ's own `BaseEntity.Validate()` emits a bare field name (`\"Code\"`). Callers that\n * validate a whole object graph emit a path instead — `\"Modifications[2].ProvisionID\"`\n * — and those failures belong to the section that hosts the collection, not to a\n * section that happens to render a field of the same trailing name.\n */\nexport interface ParsedValidationSource {\n /** The original, trimmed `Source` string. */\n Source: string;\n /**\n * Leading collection segment of a graph path (`Modifications[2].ProvisionID` →\n * `Modifications`). `undefined` for a plain field-name source.\n */\n Collection?: string;\n /** Positional index within {@link Collection} when the path carried one. */\n Index?: number;\n /**\n * Trailing field name — the last dotted segment with any `[i]` subscript removed.\n * Equals {@link Source} for a plain field-name source.\n */\n Field: string;\n}\n\n/** `Foo[3]` → `{ name: 'Foo', index: 3 }`; `Foo` → `{ name: 'Foo' }`. */\nfunction SplitSubscript(segment: string): { name: string; index?: number } {\n const match = segment.match(/^(.*?)\\[(\\d+)\\]$/);\n if (!match) return { name: segment };\n return { name: match[1], index: Number(match[2]) };\n}\n\n/**\n * Parse a `ValidationErrorInfo.Source` into {@link ParsedValidationSource}.\n *\n * A source with no dot and no subscript is a plain field name and parses to\n * `{ Field: source }` with no `Collection` — which is what keeps ordinary\n * single-record validation routing on the field name.\n */\nexport function ParseValidationSource(source: string | null | undefined): ParsedValidationSource {\n const raw = (source ?? '').trim();\n if (!raw) return { Source: '', Field: '' };\n\n const segments = raw.split('.');\n const first = SplitSubscript(segments[0]);\n const last = SplitSubscript(segments[segments.length - 1]);\n\n if (segments.length === 1 && first.index === undefined) {\n return { Source: raw, Field: first.name };\n }\n\n return {\n Source: raw,\n Collection: first.name || undefined,\n Index: first.index,\n Field: last.name || first.name,\n };\n}\n\n/** What a form section owns, for the purpose of attributing a validation failure to it. */\nexport interface SectionValidationScope {\n /** Field names the section renders — normally its `mj-form-field` children. */\n FieldNames?: readonly string[];\n /**\n * Graph-path collection names the section owns (`\"Modifications\"`), so positional\n * child failures land on the section that hosts that collection.\n */\n CollectionNames?: readonly string[];\n}\n\nfunction Normalize(value: string | null | undefined): string {\n return (value ?? '').trim().toLowerCase();\n}\n\n/**\n * Whether `parsed` belongs to a section with the given key + scope.\n *\n * Precedence, and it is deliberate:\n * 1. **plain field source** matches a declared field name;\n * 2. **graph source** whose leading collection matches a declared `CollectionNames` entry;\n * 3. **graph source** whose leading collection matches the section key itself (the\n * zero-configuration case — a panel keyed `modifications` hosting `Modifications[i]`).\n *\n * A graph source is deliberately NOT matched on its trailing field name. Doing so is\n * what sends every child failure to whichever section renders a parent field of the\n * same name — usually the header section, the one place the user cannot fix it.\n */\nexport function SectionOwnsValidationSource(\n parsed: ParsedValidationSource,\n sectionKey: string,\n scope: SectionValidationScope,\n): boolean {\n if (!parsed.Source) return false;\n\n if (parsed.Collection === undefined) {\n const field = Normalize(parsed.Field);\n return (scope.FieldNames ?? []).some((name) => Normalize(name) === field);\n }\n\n const collection = Normalize(parsed.Collection);\n if ((scope.CollectionNames ?? []).some((name) => Normalize(name) === collection)) return true;\n return Normalize(sectionKey) === collection;\n}\n\n/**\n * The graph-path errors (`Lines[2].Amount`) a section owns. Plain field-name errors are\n * excluded on purpose: those already surface through the field that renders them, and a\n * section counts that field once, through the field, rather than once per message.\n */\nexport function ClaimedCollectionErrors(\n errors: readonly ValidationErrorInfo[] | null | undefined,\n sectionKey: string,\n scope: SectionValidationScope,\n): ValidationErrorInfo[] {\n if (!errors?.length) return [];\n return errors.filter((error) => {\n const parsed = ParseValidationSource(error.Source);\n return parsed.Collection !== undefined && SectionOwnsValidationSource(parsed, sectionKey, scope);\n });\n}\n\n/** Tally failures vs warnings over an already-selected set of errors. */\nexport function TallyValidationErrors(errors: readonly ValidationErrorInfo[]): Pick<FormSectionIndicators, 'ErrorCount' | 'WarningCount'> {\n let ErrorCount = 0;\n let WarningCount = 0;\n for (const error of errors) {\n if (error.Type === ValidationErrorType.Warning) WarningCount++;\n else ErrorCount++;\n }\n return { ErrorCount, WarningCount };\n}\n\n/** Tooltip / screen-reader text for an error badge. */\nexport function DescribeSectionErrors(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 field in ${where} needs attention` : `${count} fields in ${where} need attention`;\n}\n\n/** Tooltip / screen-reader text for a warning badge. */\nexport function DescribeSectionWarnings(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 field in ${where} has a warning` : `${count} fields in ${where} have warnings`;\n}\n\n/** Tooltip / screen-reader text for the unsaved-changes dot. */\nexport function DescribeSectionDirty(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 unsaved change in ${where}` : `${count} unsaved changes in ${where}`;\n}\n"]}
1
+ {"version":3,"file":"form-section-indicators.js","sourceRoot":"","sources":["../../../src/lib/section-indicators/form-section-indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAwBlF,MAAM,CAAC,MAAM,wBAAwB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACrF,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC;AAEH,+E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AE,CAAC;AAC/F,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,uBAAuB,CAAC,KAAa,EAAE,KAAK,GAAG,cAAc;IAC3E,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAqB,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,qBAAqB,KAAK,EAAE,CAAC;AAC3F,CAAC","sourcesContent":["import { ValidationErrorInfo, ValidationErrorType } from '@memberjunction/global';\n\n/**\n * Per-section state a form's chrome can surface — the left-nav rail, an accordion\n * header, the collapsed rail spine — so a user editing a multi-section record can see\n * WHICH section holds unsaved edits or invalid input without opening each one.\n *\n * Counts are of **fields**, not messages: a section with one required field left blank\n * and one field failing two rules reports `ErrorCount: 2`.\n */\nexport interface FormSectionIndicators {\n /** Fields modified since the last save. Mirrors the amber dot on an edited field. */\n DirtyCount: number;\n /**\n * Fields that cannot be saved as they stand — a failing validation rule, or a\n * required field that is empty. Mirrors the red underline on the field itself.\n */\n ErrorCount: number;\n /** Fields carrying a warning-level validation result and no failure. */\n WarningCount: number;\n /** Open anchored comment threads inside this section or its fields (when > 0). */\n CommentCount?: number;\n}\n\nexport const EMPTY_SECTION_INDICATORS: Readonly<FormSectionIndicators> = Object.freeze({\n DirtyCount: 0,\n ErrorCount: 0,\n WarningCount: 0,\n});\n\n/** Add any number of indicator sets. Missing / non-finite counts read as 0. */\nexport function SumSectionIndicators(\n ...sets: ReadonlyArray<Partial<FormSectionIndicators> | null | undefined>\n): FormSectionIndicators {\n let DirtyCount = 0;\n let ErrorCount = 0;\n let WarningCount = 0;\n let CommentCount = 0;\n for (const set of sets) {\n if (!set) continue;\n DirtyCount += CountOrZero(set.DirtyCount);\n ErrorCount += CountOrZero(set.ErrorCount);\n WarningCount += CountOrZero(set.WarningCount);\n CommentCount += CountOrZero(set.CommentCount);\n }\n if (CommentCount > 0) {\n return { DirtyCount, ErrorCount, WarningCount, CommentCount };\n }\n return { DirtyCount, ErrorCount, WarningCount };\n}\n\n/** True when nothing in the set would render. */\nexport function SectionIndicatorsAreEmpty(set: Partial<FormSectionIndicators> | null | undefined): boolean {\n if (!set) return true;\n return (\n CountOrZero(set.DirtyCount) === 0 &&\n CountOrZero(set.ErrorCount) === 0 &&\n CountOrZero(set.WarningCount) === 0 &&\n CountOrZero(set.CommentCount) === 0\n );\n}\n\nfunction CountOrZero(value: number | undefined): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;\n}\n\n/**\n * A `ValidationErrorInfo.Source` broken into the parts a section needs in order to\n * decide whether the failure belongs to it.\n *\n * MJ's own `BaseEntity.Validate()` emits a bare field name (`\"Code\"`). Callers that\n * validate a whole object graph emit a path instead — `\"Modifications[2].ProvisionID\"`\n * — and those failures belong to the section that hosts the collection, not to a\n * section that happens to render a field of the same trailing name.\n */\nexport interface ParsedValidationSource {\n /** The original, trimmed `Source` string. */\n Source: string;\n /**\n * Leading collection segment of a graph path (`Modifications[2].ProvisionID` →\n * `Modifications`). `undefined` for a plain field-name source.\n */\n Collection?: string;\n /** Positional index within {@link Collection} when the path carried one. */\n Index?: number;\n /**\n * Trailing field name — the last dotted segment with any `[i]` subscript removed.\n * Equals {@link Source} for a plain field-name source.\n */\n Field: string;\n}\n\n/** `Foo[3]` → `{ name: 'Foo', index: 3 }`; `Foo` → `{ name: 'Foo' }`. */\nfunction SplitSubscript(segment: string): { name: string; index?: number } {\n const match = segment.match(/^(.*?)\\[(\\d+)\\]$/);\n if (!match) return { name: segment };\n return { name: match[1], index: Number(match[2]) };\n}\n\n/**\n * Parse a `ValidationErrorInfo.Source` into {@link ParsedValidationSource}.\n *\n * A source with no dot and no subscript is a plain field name and parses to\n * `{ Field: source }` with no `Collection` — which is what keeps ordinary\n * single-record validation routing on the field name.\n */\nexport function ParseValidationSource(source: string | null | undefined): ParsedValidationSource {\n const raw = (source ?? '').trim();\n if (!raw) return { Source: '', Field: '' };\n\n const segments = raw.split('.');\n const first = SplitSubscript(segments[0]);\n const last = SplitSubscript(segments[segments.length - 1]);\n\n if (segments.length === 1 && first.index === undefined) {\n return { Source: raw, Field: first.name };\n }\n\n return {\n Source: raw,\n Collection: first.name || undefined,\n Index: first.index,\n Field: last.name || first.name,\n };\n}\n\n/** What a form section owns, for the purpose of attributing a validation failure to it. */\nexport interface SectionValidationScope {\n /** Field names the section renders — normally its `mj-form-field` children. */\n FieldNames?: readonly string[];\n /**\n * Graph-path collection names the section owns (`\"Modifications\"`), so positional\n * child failures land on the section that hosts that collection.\n */\n CollectionNames?: readonly string[];\n}\n\nfunction Normalize(value: string | null | undefined): string {\n return (value ?? '').trim().toLowerCase();\n}\n\n/**\n * Whether `parsed` belongs to a section with the given key + scope.\n *\n * Precedence, and it is deliberate:\n * 1. **plain field source** matches a declared field name;\n * 2. **graph source** whose leading collection matches a declared `CollectionNames` entry;\n * 3. **graph source** whose leading collection matches the section key itself (the\n * zero-configuration case — a panel keyed `modifications` hosting `Modifications[i]`).\n *\n * A graph source is deliberately NOT matched on its trailing field name. Doing so is\n * what sends every child failure to whichever section renders a parent field of the\n * same name — usually the header section, the one place the user cannot fix it.\n */\nexport function SectionOwnsValidationSource(\n parsed: ParsedValidationSource,\n sectionKey: string,\n scope: SectionValidationScope,\n): boolean {\n if (!parsed.Source) return false;\n\n if (parsed.Collection === undefined) {\n const field = Normalize(parsed.Field);\n return (scope.FieldNames ?? []).some((name) => Normalize(name) === field);\n }\n\n const collection = Normalize(parsed.Collection);\n if ((scope.CollectionNames ?? []).some((name) => Normalize(name) === collection)) return true;\n return Normalize(sectionKey) === collection;\n}\n\n/**\n * The graph-path errors (`Lines[2].Amount`) a section owns. Plain field-name errors are\n * excluded on purpose: those already surface through the field that renders them, and a\n * section counts that field once, through the field, rather than once per message.\n */\nexport function ClaimedCollectionErrors(\n errors: readonly ValidationErrorInfo[] | null | undefined,\n sectionKey: string,\n scope: SectionValidationScope,\n): ValidationErrorInfo[] {\n if (!errors?.length) return [];\n return errors.filter((error) => {\n const parsed = ParseValidationSource(error.Source);\n return parsed.Collection !== undefined && SectionOwnsValidationSource(parsed, sectionKey, scope);\n });\n}\n\n/** Tally failures vs warnings over an already-selected set of errors. */\nexport function TallyValidationErrors(errors: readonly ValidationErrorInfo[]): Pick<FormSectionIndicators, 'ErrorCount' | 'WarningCount'> {\n let ErrorCount = 0;\n let WarningCount = 0;\n for (const error of errors) {\n if (error.Type === ValidationErrorType.Warning) WarningCount++;\n else ErrorCount++;\n }\n return { ErrorCount, WarningCount };\n}\n\n/** Tooltip / screen-reader text for an error badge. */\nexport function DescribeSectionErrors(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 field in ${where} needs attention` : `${count} fields in ${where} need attention`;\n}\n\n/** Tooltip / screen-reader text for a warning badge. */\nexport function DescribeSectionWarnings(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 field in ${where} has a warning` : `${count} fields in ${where} have warnings`;\n}\n\n/** Tooltip / screen-reader text for the unsaved-changes dot. */\nexport function DescribeSectionDirty(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 unsaved change in ${where}` : `${count} unsaved changes in ${where}`;\n}\n\n/** Tooltip / screen-reader text for an open-comments badge on a section or rail group. */\nexport function DescribeSectionComments(count: number, where = 'this section'): string {\n if (count <= 0) return '';\n return count === 1 ? `1 open comment in ${where}` : `${count} open comments in ${where}`;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { BaseFormToolbarAction, FormToolbarActionLifecycleContext } from '../base-form-toolbar-action';
2
+ /**
3
+ * Built-in pluggable toolbar action for the Anchored Record Comments drawer (`Key: 'comments'`).
4
+ *
5
+ * - Registered globally (`EntityScope: '*'`) and pinnable (`Pinnable: true`).
6
+ * - Available in both `'read'` and `'edit'` modes (`Mode: 'both'`) so collaborators can read
7
+ * and reply to field/section comments while editing a record.
8
+ * - Badge count reflects the number of open (unresolved) anchored comment threads on the record,
9
+ * pre-warmed by {@link FormRecordCommentsCoordinatorService}.
10
+ */
11
+ export declare class RecordCommentsToolbarAction extends BaseFormToolbarAction {
12
+ IsApplicable(ctx: FormToolbarActionLifecycleContext): boolean;
13
+ OnPrewarm(ctx: FormToolbarActionLifecycleContext): void;
14
+ OnRecordRefreshed(ctx: FormToolbarActionLifecycleContext): void;
15
+ OnExecute(ctx: FormToolbarActionLifecycleContext): void;
16
+ }
17
+ //# sourceMappingURL=record-comments-toolbar-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-comments-toolbar-action.d.ts","sourceRoot":"","sources":["../../../../src/lib/toolbar/actions/record-comments-toolbar-action.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,qBAAqB,EACrB,iCAAiC,EAEpC,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,qBAWa,2BAA4B,SAAQ,qBAAqB;IAClD,YAAY,CAAC,GAAG,EAAE,iCAAiC,GAAG,OAAO;IAQ7D,SAAS,CAAC,GAAG,EAAE,iCAAiC,GAAG,IAAI;IAMvD,iBAAiB,CAAC,GAAG,EAAE,iCAAiC,GAAG,IAAI;IAI/D,SAAS,CAAC,GAAG,EAAE,iCAAiC,GAAG,IAAI;CAM1E"}