@memberjunction/ng-base-forms 6.1.3 → 6.2.0-edge.0

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 (50) hide show
  1. package/dist/lib/base-form-component.d.ts.map +1 -1
  2. package/dist/lib/base-form-component.js +43 -40
  3. package/dist/lib/base-form-component.js.map +1 -1
  4. package/dist/lib/container/record-form-container.component.d.ts +4 -1
  5. package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
  6. package/dist/lib/container/record-form-container.component.js +104 -69
  7. package/dist/lib/container/record-form-container.component.js.map +1 -1
  8. package/dist/lib/explorer-entity-data-grid.component.d.ts +14 -1
  9. package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
  10. package/dist/lib/explorer-entity-data-grid.component.js +16 -3
  11. package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
  12. package/dist/lib/field/default-fk-lookup-strategy.d.ts +60 -0
  13. package/dist/lib/field/default-fk-lookup-strategy.d.ts.map +1 -0
  14. package/dist/lib/field/default-fk-lookup-strategy.js +173 -0
  15. package/dist/lib/field/default-fk-lookup-strategy.js.map +1 -0
  16. package/dist/lib/field/fk-lookup-strategy.d.ts +124 -0
  17. package/dist/lib/field/fk-lookup-strategy.d.ts.map +1 -0
  18. package/dist/lib/field/fk-lookup-strategy.js +97 -0
  19. package/dist/lib/field/fk-lookup-strategy.js.map +1 -0
  20. package/dist/lib/field/fk-search-utils.d.ts +33 -2
  21. package/dist/lib/field/fk-search-utils.d.ts.map +1 -1
  22. package/dist/lib/field/fk-search-utils.js +56 -3
  23. package/dist/lib/field/fk-search-utils.js.map +1 -1
  24. package/dist/lib/field/form-field.component.d.ts +151 -9
  25. package/dist/lib/field/form-field.component.d.ts.map +1 -1
  26. package/dist/lib/field/form-field.component.js +724 -334
  27. package/dist/lib/field/form-field.component.js.map +1 -1
  28. package/dist/lib/field/linked-field-options.d.ts +16 -0
  29. package/dist/lib/field/linked-field-options.d.ts.map +1 -1
  30. package/dist/lib/field/linked-field-options.js +17 -0
  31. package/dist/lib/field/linked-field-options.js.map +1 -1
  32. package/dist/lib/isa-related-panel/isa-related-card.component.d.ts.map +1 -1
  33. package/dist/lib/isa-related-panel/isa-related-card.component.js +6 -2
  34. package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -1
  35. package/dist/lib/isa-related-panel/isa-related-panel.component.d.ts.map +1 -1
  36. package/dist/lib/isa-related-panel/isa-related-panel.component.js +17 -0
  37. package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -1
  38. package/dist/lib/panel/collapsible-panel.component.d.ts +65 -2
  39. package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
  40. package/dist/lib/panel/collapsible-panel.component.js +166 -24
  41. package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
  42. package/dist/lib/section-indicators/form-section-field-host.d.ts +53 -0
  43. package/dist/lib/section-indicators/form-section-field-host.d.ts.map +1 -0
  44. package/dist/lib/section-indicators/form-section-field-host.js +23 -0
  45. package/dist/lib/section-indicators/form-section-field-host.js.map +1 -0
  46. package/dist/public-api.d.ts +3 -0
  47. package/dist/public-api.d.ts.map +1 -1
  48. package/dist/public-api.js +3 -0
  49. package/dist/public-api.js.map +1 -1
  50. package/package.json +18 -18
@@ -1,4 +1,4 @@
1
- import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, ContentChildren, HostBinding, HostListener, ElementRef, ViewChild, NgZone, ViewEncapsulation } from '@angular/core';
1
+ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, forwardRef, signal, ContentChildren, HostBinding, HostListener, ElementRef, ViewChild, NgZone, ViewEncapsulation } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
3
  import { takeUntil } from 'rxjs/operators';
4
4
  import { IsFormSectionHidden } from '../types/entity-form-config';
@@ -7,6 +7,7 @@ import { CompositeKey } from '@memberjunction/core';
7
7
  import { EscapeHTML, HighlightSearchMatches } from '@memberjunction/global';
8
8
  import { FormChromeCoordinator } from '../chrome/form-chrome-coordinator.service';
9
9
  import { FormSectionIndicatorCoordinator } from '../section-indicators/form-section-indicator-coordinator.service';
10
+ import { FORM_SECTION_FIELD_HOST } from '../section-indicators/form-section-field-host';
10
11
  import { ClaimedCollectionErrors, DescribeSectionDirty, DescribeSectionErrors, DescribeSectionWarnings, SectionOwnsValidationSource, SumSectionIndicators, TallyValidationErrors, } from '../section-indicators/form-section-indicators';
11
12
  import * as i0 from "@angular/core";
12
13
  const _c0 = ["panelContent"];
@@ -96,10 +97,21 @@ function MjCollapsiblePanelComponent_Conditional_12_Template(rf, ctx) { if (rf &
96
97
  * - Inheritable "Inherited from X" badge with navigation event
97
98
  * - Row count badge for related entity sections
98
99
  * - Section indicators: an unsaved-changes dot and an invalid-field count derived
99
- * live from the projected `mj-form-field`s (plus anything a custom section
100
+ * live from the section's `mj-form-field`s (plus anything a custom section
100
101
  * supplies through `[Indicators]`), published to the form's chrome rail
101
102
  * through {@link FormSectionIndicatorCoordinator}
102
103
  *
104
+ * **Which fields belong to the section.** Two sources, unioned: the `@ContentChildren`
105
+ * query over projected content, and fields that registered themselves through
106
+ * {@link FORM_SECTION_FIELD_HOST}, which this panel provides. The content query
107
+ * cannot see a field declared inside a child component's own template (a widget
108
+ * projected into the panel), and a section that saw none of its fields reported no
109
+ * required-and-empty count, claimed none of the failed save's field errors, and so
110
+ * never badged on the rail. The injector follows the element tree across view
111
+ * boundaries, so the registered set covers exactly those fields. A registered field
112
+ * counts only while its element is physically inside this panel, which keeps a field
113
+ * created in an overlay that happened to inherit this injector from being counted.
114
+ *
103
115
  * @example
104
116
  * ```html
105
117
  * <mj-collapsible-panel
@@ -212,6 +224,28 @@ export class MjCollapsiblePanelComponent {
212
224
  Navigate = new EventEmitter();
213
225
  // ---- Content Children ----
214
226
  FieldComponents;
227
+ /**
228
+ * Fields that found this panel through {@link FORM_SECTION_FIELD_HOST} — those the content
229
+ * query cannot see because a component view sits between them and the panel. Keyed by
230
+ * instance; the value is the edit subscription that keeps the rail live for that field.
231
+ */
232
+ hostedFields = new Map();
233
+ /**
234
+ * Bumped whenever the hosted set changes or a hosted field reports an input change. Every
235
+ * reader of the field set touches it, so the views that read this section (its own host
236
+ * bindings, the rail) become dependents Angular re-runs before its no-changes check when a
237
+ * hosted field — refreshed AFTER those views in the same pass — changes underneath them. See
238
+ * {@link FormSectionFieldHost.NotifyFieldChanged}.
239
+ */
240
+ hostedFieldsVersion = signal(0, ...(ngDevMode ? [{ debugName: "hostedFieldsVersion" }] : /* istanbul ignore next */ []));
241
+ /**
242
+ * Memo behind {@link allFields}. Every real `mj-form-field` reaches this panel through the
243
+ * injector — projected ones included — so the hosted set is the section's whole field list, and
244
+ * the union is read several times per change-detection pass (three host bindings, the header,
245
+ * hide-when-empty, the rail). Recomputed only when the hosted set or a hosted field's inputs
246
+ * change (the signal) or the content query is replaced or resized.
247
+ */
248
+ fieldsMemo = null;
215
249
  // ---- State ----
216
250
  DisplayName = '';
217
251
  FieldNames = '';
@@ -324,6 +358,95 @@ export class MjCollapsiblePanelComponent {
324
358
  const formRef = this.Form;
325
359
  return formRef?.IsSectionExpanded ? formRef.IsSectionExpanded(this.SectionKey, this.DefaultExpanded) : true;
326
360
  }
361
+ // ---- Fields (content query ∪ injector-registered) ----
362
+ /** {@link FormSectionFieldHost} — a field rendered inside this section, at any view depth. */
363
+ RegisterField(field) {
364
+ if (this.hostedFields.has(field))
365
+ return;
366
+ // Same contract as a projected field: an edit refreshes the section's counts (and the
367
+ // rail reading them) on the same tick as the keystroke.
368
+ const edits = field.ValueChange.pipe(takeUntil(this.destroy$)).subscribe(() => {
369
+ this.cdr.markForCheck();
370
+ this.indicators?.NotifyChanged();
371
+ });
372
+ this.hostedFields.set(field, edits);
373
+ this.onFieldSetChanged();
374
+ }
375
+ /** {@link FormSectionFieldHost} */
376
+ UnregisterField(field) {
377
+ const edits = this.hostedFields.get(field);
378
+ if (!edits)
379
+ return;
380
+ edits.unsubscribe();
381
+ this.hostedFields.delete(field);
382
+ this.onFieldSetChanged();
383
+ }
384
+ /** {@link FormSectionFieldHost} */
385
+ NotifyFieldChanged(field) {
386
+ if (!this.hostedFields.has(field))
387
+ return;
388
+ this.onFieldSetChanged();
389
+ }
390
+ onFieldSetChanged() {
391
+ this.hostedFieldsVersion.update((v) => v + 1);
392
+ // Visibility is latched, not derived: hide-when-empty and the all-denied check are computed
393
+ // into IsVisible when the field set changes, so they have to be recomputed here too — a
394
+ // hosted field binds its inputs after content init, and a section evaluated before that
395
+ // would otherwise stay hidden (or visible) on the pre-binding answer.
396
+ if (this.FieldComponents) {
397
+ this.UpdateVisibilityAndHighlighting();
398
+ }
399
+ this.cdr.markForCheck();
400
+ this.indicators?.NotifyChanged();
401
+ }
402
+ /**
403
+ * Searchable display names of every field, read live rather than from the {@link FieldNames}
404
+ * cache — only needed once a hosted field exists, because its name lands after registration
405
+ * (see {@link RefreshFieldNames}).
406
+ */
407
+ liveFieldNames() {
408
+ if (this.hostedFields.size === 0)
409
+ return '';
410
+ const names = [];
411
+ for (const field of this.allFields()) {
412
+ if (field.DisplayName)
413
+ names.push(field.DisplayName.toLowerCase());
414
+ }
415
+ return names.join(' ');
416
+ }
417
+ /**
418
+ * Every `mj-form-field` this section fronts: the projected ones the content query found, plus
419
+ * the injector-registered ones that have bound their inputs and whose element is inside this
420
+ * panel. Unbound fields are left out because a field with no inputs reports itself hidden and
421
+ * not required-and-empty, which is not information about the section. The containment check
422
+ * is what stops a field created in an overlay, with this panel's injector as its ancestor, from
423
+ * counting against a section it is not displayed in. Memoized — see {@link fieldsMemo}.
424
+ */
425
+ allFields() {
426
+ const version = this.hostedFieldsVersion(); // dependency, see the field's doc
427
+ const content = this.FieldComponents;
428
+ const contentLength = content?.length ?? 0;
429
+ const memo = this.fieldsMemo;
430
+ if (memo && memo.version === version && memo.content === content && memo.contentLength === contentLength) {
431
+ return memo.fields;
432
+ }
433
+ const fields = content ? content.toArray() : [];
434
+ if (this.hostedFields.size > 0) {
435
+ const host = this.elementRef.nativeElement;
436
+ const seen = new Set(fields);
437
+ for (const field of this.hostedFields.keys()) {
438
+ if (seen.has(field))
439
+ continue;
440
+ if (!field.InputsBound)
441
+ continue;
442
+ if (host && !host.contains(field.HostElement))
443
+ continue;
444
+ fields.push(field);
445
+ }
446
+ }
447
+ this.fieldsMemo = { version, content, contentLength, fields };
448
+ return fields;
449
+ }
327
450
  // ---- Section indicators (unsaved-changes dot + invalid-field count) ----
328
451
  /**
329
452
  * Live state of this section: fields edited since the last save, fields that are
@@ -375,10 +498,10 @@ export class MjCollapsiblePanelComponent {
375
498
  /** Field names this panel renders — the join between a plain-field error and this section. */
376
499
  renderedFieldNames() {
377
500
  const names = [];
378
- this.FieldComponents?.forEach((field) => {
501
+ for (const field of this.allFields()) {
379
502
  if (field.FieldName)
380
503
  names.push(field.FieldName);
381
- });
504
+ }
382
505
  return names;
383
506
  }
384
507
  validationScope() {
@@ -394,7 +517,7 @@ export class MjCollapsiblePanelComponent {
394
517
  let DirtyCount = 0;
395
518
  let ErrorCount = 0;
396
519
  let WarningCount = 0;
397
- this.FieldComponents?.forEach((field) => {
520
+ for (const field of this.allFields()) {
398
521
  if (field.IsDirty)
399
522
  DirtyCount++;
400
523
  // Only a field that renders an EDITOR can be invalid: a read-only field renders its
@@ -402,14 +525,14 @@ export class MjCollapsiblePanelComponent {
402
525
  // `IsRequiredEmpty` would say otherwise (a NOT NULL `__mj_CreatedAt` on a new record
403
526
  // is empty and read-only — the user cannot fix it, and it fills itself on save).
404
527
  if (!field.EditMode || field.IsFieldReadOnly)
405
- return;
528
+ continue;
406
529
  if (field.ShowErrors || field.IsRequiredEmpty)
407
530
  ErrorCount++;
408
531
  // The field paints its amber underline on EITHER of these — a stored date the input
409
532
  // cannot parse warns on its own, outside the validation pipeline.
410
533
  else if (field.ShowWarnings || field.StoredDateIsUnreadable)
411
534
  WarningCount++;
412
- });
535
+ }
413
536
  return { DirtyCount, ErrorCount, WarningCount };
414
537
  }
415
538
  /**
@@ -444,6 +567,9 @@ export class MjCollapsiblePanelComponent {
444
567
  this.UpdateFieldNames();
445
568
  this.SubscribeToFieldNavigateEvents();
446
569
  this.FieldComponents.changes.subscribe(() => {
570
+ // Drop the field memo before anything below reads it: a replaced QueryList with the same
571
+ // length would otherwise be served from the previous result.
572
+ this.hostedFieldsVersion.update((v) => v + 1);
447
573
  this.UpdateFieldNames();
448
574
  this.SubscribeToFieldNavigateEvents();
449
575
  // The set of fields changed, so the section's counts (and which errors it
@@ -472,6 +598,9 @@ export class MjCollapsiblePanelComponent {
472
598
  }
473
599
  ngOnDestroy() {
474
600
  this.indicators?.Unregister(this);
601
+ for (const edits of this.hostedFields.values())
602
+ edits.unsubscribe();
603
+ this.hostedFields.clear();
475
604
  this.fieldNavReset$.next();
476
605
  this.fieldNavReset$.complete();
477
606
  this.destroy$.next();
@@ -589,14 +718,15 @@ export class MjCollapsiblePanelComponent {
589
718
  return true;
590
719
  if (this.SectionKey.toLowerCase().includes(filter))
591
720
  return true;
592
- return this.FieldNames.includes(filter);
721
+ return this.FieldNames.includes(filter) || this.liveFieldNames().includes(filter);
593
722
  }
594
723
  hasRenderableContent() {
595
724
  if (this.Variant === 'related-entity')
596
725
  return true;
597
- if (!this.FieldComponents || this.FieldComponents.length === 0)
726
+ const fields = this.allFields();
727
+ if (fields.length === 0)
598
728
  return true;
599
- return this.FieldComponents.some((field) => !field.ShouldHideField);
729
+ return fields.some((field) => !field.ShouldHideField);
600
730
  }
601
731
  isHiddenByChrome() {
602
732
  if (!this.chrome)
@@ -608,16 +738,25 @@ export class MjCollapsiblePanelComponent {
608
738
  }
609
739
  UpdateFieldNames() {
610
740
  if (this.FieldComponents) {
611
- const names = [];
612
- this.FieldComponents.forEach(field => {
613
- if (field.DisplayName) {
614
- names.push(field.DisplayName.toLowerCase());
615
- }
616
- });
617
- this.FieldNames = names.join(' ');
741
+ this.RefreshFieldNames();
618
742
  this.UpdateVisibilityAndHighlighting();
619
743
  }
620
744
  }
745
+ /**
746
+ * Rebuild the searchable field-name string from the current field set. Rebuilt on structural
747
+ * changes only; a hosted field's DisplayName is bound after it registers (its inputs land on its
748
+ * own view's first pass), so search also reads names live through {@link liveFieldNames}
749
+ * rather than relying on this cache alone.
750
+ */
751
+ RefreshFieldNames() {
752
+ const names = [];
753
+ for (const field of this.allFields()) {
754
+ if (field.DisplayName) {
755
+ names.push(field.DisplayName.toLowerCase());
756
+ }
757
+ }
758
+ this.FieldNames = names.join(' ');
759
+ }
621
760
  /**
622
761
  * Subscribes to Navigate events from all child form-field components
623
762
  * and relays them through this panel's Navigate output. Also listens for
@@ -630,6 +769,10 @@ export class MjCollapsiblePanelComponent {
630
769
  field.Navigate.pipe(takeUntil(this.fieldNavReset$)).subscribe((event) => {
631
770
  this.Navigate.emit(event);
632
771
  });
772
+ // A real projected field also reached this panel through the injector and already has
773
+ // this subscription from RegisterField; a second one would notify the rail twice per edit.
774
+ if (this.hostedFields.has(field))
775
+ return;
633
776
  field.ValueChange.pipe(takeUntil(this.fieldNavReset$)).subscribe(() => {
634
777
  this.cdr.markForCheck();
635
778
  this.indicators?.NotifyChanged();
@@ -695,11 +838,11 @@ export class MjCollapsiblePanelComponent {
695
838
  * different states and only the second one should hide the section.
696
839
  */
697
840
  get AllProjectedFieldsDenied() {
698
- const fields = this.FieldComponents;
699
- if (!fields || fields.length === 0) {
841
+ const fields = this.allFields();
842
+ if (fields.length === 0) {
700
843
  return false;
701
844
  }
702
- return fields.toArray().every(f => !f.IsFieldReadableByUser);
845
+ return fields.every(f => !f.IsFieldReadableByUser);
703
846
  }
704
847
  UpdateVisibilityAndHighlighting() {
705
848
  // Hard hide takes precedence over search state. Driven by an explicit
@@ -729,7 +872,6 @@ export class MjCollapsiblePanelComponent {
729
872
  return;
730
873
  }
731
874
  const sectionMatches = this.SectionName.toLowerCase().includes(searchTerm);
732
- const fieldsMatch = this.FieldNames.includes(searchTerm);
733
875
  this.IsVisible = this.MatchesSearch(searchTerm);
734
876
  // DisplayName is bound to `[innerHTML]` in the template — must always be HTML-safe.
735
877
  this.DisplayName =
@@ -755,7 +897,7 @@ export class MjCollapsiblePanelComponent {
755
897
  i0.ɵɵattribute("data-section-key", ctx.HostSectionKey)("data-variant", ctx.HostVariant)("data-icon", ctx.HostIcon)("data-dirty-count", ctx.HostDirtyCount)("data-error-count", ctx.HostErrorCount);
756
898
  i0.ɵɵclassMap(ctx.HostClass);
757
899
  i0.ɵɵstyleProp("order", ctx.CssOrder);
758
- } }, inputs: { SectionKey: "SectionKey", Indicators: "Indicators", ValidationSources: "ValidationSources", SectionName: "SectionName", Icon: "Icon", Form: "Form", FormContext: "FormContext", Variant: "Variant", BadgeCount: "BadgeCount", DefaultExpanded: "DefaultExpanded", InheritedFromEntity: "InheritedFromEntity", InheritedRecordPrimaryKey: "InheritedRecordPrimaryKey", Hidden: "Hidden", _deprecatedSectionKey: [0, "sectionKey", "_deprecatedSectionKey"], _deprecatedSectionName: [0, "sectionName", "_deprecatedSectionName"], _deprecatedIcon: [0, "icon", "_deprecatedIcon"], _deprecatedForm: [0, "form", "_deprecatedForm"], _deprecatedFormContext: [0, "formContext", "_deprecatedFormContext"] }, outputs: { DragStarted: "DragStarted", DragEnded: "DragEnded", PanelDrop: "PanelDrop", Navigate: "Navigate" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1, decls: 17, vars: 22, consts: [["panelContent", ""], [1, "mj-forms-panel"], [1, "mj-forms-panel-header", 3, "click"], ["title", "Drag to reorder sections", "draggable", "true", 1, "mj-forms-drag-handle"], [1, "mj-forms-panel-title-group"], [1, "mj-forms-panel-icon"], [1, "mj-forms-panel-title"], [3, "innerHTML"], ["role", "img", 1, "mj-forms-panel-dirty", 3, "title"], ["role", "img", 1, "mj-forms-panel-error-badge", 3, "title"], ["role", "img", 1, "mj-forms-panel-warning-badge", 3, "title"], [1, "mj-forms-row-count-badge", 3, "mj-forms-row-count-badge--zero"], [1, "mj-forms-inherited-badge", 3, "title"], [1, "mj-forms-panel-chevron"], [1, "mj-forms-panel-body"], [1, "mj-forms-panel-content"], ["title", "Drag to reorder sections", "draggable", "true", 1, "mj-forms-drag-handle", 3, "dragstart", "dragend", "click"], [1, "fa-solid", "fa-grip-vertical"], ["aria-hidden", "true", 1, "fa-solid", "fa-circle-exclamation"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"], [1, "mj-forms-row-count-badge"], [1, "mj-forms-inherited-badge", 3, "click", "title"], [1, "fa-solid", "fa-arrow-up"]], template: function MjCollapsiblePanelComponent_Template(rf, ctx) { if (rf & 1) {
900
+ } }, inputs: { SectionKey: "SectionKey", Indicators: "Indicators", ValidationSources: "ValidationSources", SectionName: "SectionName", Icon: "Icon", Form: "Form", FormContext: "FormContext", Variant: "Variant", BadgeCount: "BadgeCount", DefaultExpanded: "DefaultExpanded", InheritedFromEntity: "InheritedFromEntity", InheritedRecordPrimaryKey: "InheritedRecordPrimaryKey", Hidden: "Hidden", _deprecatedSectionKey: [0, "sectionKey", "_deprecatedSectionKey"], _deprecatedSectionName: [0, "sectionName", "_deprecatedSectionName"], _deprecatedIcon: [0, "icon", "_deprecatedIcon"], _deprecatedForm: [0, "form", "_deprecatedForm"], _deprecatedFormContext: [0, "formContext", "_deprecatedFormContext"] }, outputs: { DragStarted: "DragStarted", DragEnded: "DragEnded", PanelDrop: "PanelDrop", Navigate: "Navigate" }, standalone: false, features: [i0.ɵɵProvidersFeature([{ provide: FORM_SECTION_FIELD_HOST, useExisting: forwardRef(() => MjCollapsiblePanelComponent) }]), i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1, decls: 17, vars: 22, consts: [["panelContent", ""], [1, "mj-forms-panel"], [1, "mj-forms-panel-header", 3, "click"], ["title", "Drag to reorder sections", "draggable", "true", 1, "mj-forms-drag-handle"], [1, "mj-forms-panel-title-group"], [1, "mj-forms-panel-icon"], [1, "mj-forms-panel-title"], [3, "innerHTML"], ["role", "img", 1, "mj-forms-panel-dirty", 3, "title"], ["role", "img", 1, "mj-forms-panel-error-badge", 3, "title"], ["role", "img", 1, "mj-forms-panel-warning-badge", 3, "title"], [1, "mj-forms-row-count-badge", 3, "mj-forms-row-count-badge--zero"], [1, "mj-forms-inherited-badge", 3, "title"], [1, "mj-forms-panel-chevron"], [1, "mj-forms-panel-body"], [1, "mj-forms-panel-content"], ["title", "Drag to reorder sections", "draggable", "true", 1, "mj-forms-drag-handle", 3, "dragstart", "dragend", "click"], [1, "fa-solid", "fa-grip-vertical"], ["aria-hidden", "true", 1, "fa-solid", "fa-circle-exclamation"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"], [1, "mj-forms-row-count-badge"], [1, "mj-forms-inherited-badge", 3, "click", "title"], [1, "fa-solid", "fa-arrow-up"]], template: function MjCollapsiblePanelComponent_Template(rf, ctx) { if (rf & 1) {
759
901
  i0.ɵɵprojectionDef();
760
902
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
761
903
  i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Template_div_click_1_listener() { return ctx.Toggle(); });
@@ -804,7 +946,7 @@ export class MjCollapsiblePanelComponent {
804
946
  }
805
947
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjCollapsiblePanelComponent, [{
806
948
  type: Component,
807
- args: [{ standalone: false, selector: 'mj-collapsible-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<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 \u2014 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 <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["mj-collapsible-panel {\n display: block;\n}\n\nmj-collapsible-panel.mj-search-hidden {\n display: none;\n}\n\nmj-collapsible-panel.mj-drag-over {\n border: 2px dashed var(--mj-brand-primary);\n border-radius: var(--mj-radius-md);\n}\n\n/* ============================================\n PANEL CARD\n ============================================ */\n.mj-forms-panel {\n background: var(--mj-bg-surface-card);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n border: 1px solid var(--mj-border-default);\n overflow: hidden;\n transition: all 0.3s ease;\n}\n\n/* ============================================\n HEADER\n ============================================ */\n.mj-forms-panel-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n background: var(--mj-bg-surface-elevated);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.mj-forms-panel-header:hover {\n background: var(--mj-bg-surface-hover);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n/* Static header \u2014 sections locked open (Config.collapsibleSections === false) */\n.mj-forms-panel-header--static {\n cursor: default;\n}\n\n.mj-forms-panel-header--static:hover {\n background: var(--mj-bg-surface-elevated);\n border-bottom-color: var(--mj-border-default);\n}\n\n/* Drag handle */\n.mj-forms-drag-handle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 0;\n height: 24px;\n color: var(--mj-text-muted);\n cursor: grab;\n opacity: 0;\n overflow: hidden;\n transition: width var(--mj-transition-base) ease, opacity var(--mj-transition-base) ease;\n flex-shrink: 0;\n}\n\n.mj-forms-panel-header:hover .mj-forms-drag-handle {\n width: 24px;\n opacity: 1;\n}\n\n.mj-forms-drag-handle:hover {\n color: var(--mj-brand-primary);\n}\n\n.mj-forms-drag-handle:active {\n cursor: grabbing;\n}\n\nmj-collapsible-panel.mj-dragging .mj-forms-drag-handle {\n width: 24px;\n opacity: 1;\n color: var(--mj-brand-primary);\n}\n\n/* Title group */\n.mj-forms-panel-title-group {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.mj-forms-panel-icon {\n font-size: 18px;\n color: var(--mj-brand-primary);\n width: 24px;\n text-align: center;\n}\n\n.mj-forms-panel-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.mj-forms-panel-chevron {\n color: var(--mj-text-secondary);\n font-size: 14px;\n transition: transform 0.3s ease;\n padding: 4px;\n}\n\n/* Row count badge */\n.mj-forms-row-count-badge {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: var(--mj-radius-full);\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n line-height: 1;\n}\n\n.mj-forms-row-count-badge--zero {\n background: var(--mj-text-muted);\n}\n\n/* ============================================\n SECTION INDICATORS\n Unsaved-changes dot + invalid-field count, derived from the section's own\n fields so a collapsed accordion header (or the left-nav rail, which reads\n the same counts) says WHERE the edited / failing field is.\n ============================================ */\n\n/* Same 6px amber dot an edited field shows after its label. */\n.mj-forms-panel-dirty {\n display: inline-block;\n width: var(--mj-space-1-5);\n height: var(--mj-space-1-5);\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n margin-left: var(--mj-space-2);\n vertical-align: middle;\n}\n\n.mj-forms-panel-error-badge,\n.mj-forms-panel-warning-badge {\n padding: var(--mj-space-0-5) var(--mj-space-2);\n border-radius: var(--mj-radius-full);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n margin-left: var(--mj-space-2);\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n justify-content: center;\n min-width: var(--mj-space-6);\n line-height: 1;\n vertical-align: middle;\n}\n\n/* Same colour as the failing field's underline. */\n.mj-forms-panel-error-badge {\n background: var(--mj-status-error);\n color: var(--mj-text-inverse);\n}\n\n.mj-forms-panel-warning-badge {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border: 1px solid var(--mj-status-warning-border);\n}\n\n.mj-forms-panel-error-badge i,\n.mj-forms-panel-warning-badge i {\n font-size: var(--mj-text-xs);\n}\n\n/* Card edge + header tint while the section holds an invalid field \u2014 the same\n left-edge treatment the related / inherited variants use. Not applied to the\n selected left-nav section (`.mj-chrome-show`): there the rail is the header\n and the card chrome is stripped. */\nmj-collapsible-panel.mj-panel-has-errors:not(.mj-chrome-show) > .mj-forms-panel {\n border-left: 3px solid var(--mj-status-error);\n}\n\nmj-collapsible-panel.mj-panel-has-errors:not(.mj-chrome-show) > .mj-forms-panel > .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface-elevated));\n}\n\nmj-collapsible-panel.mj-panel-has-warnings:not(.mj-chrome-show) > .mj-forms-panel {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n/* ============================================\n INHERITED VARIANT (IS-A parent fields)\n ============================================ */\n.mj-forms-panel--inherited {\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-elevated));\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-header:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface-elevated));\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-icon {\n color: var(--mj-brand-primary);\n}\n\n.mj-forms-inherited-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n cursor: pointer;\n transition: all var(--mj-transition-base) ease;\n text-decoration: none;\n}\n\n.mj-forms-inherited-badge:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 20%, transparent);\n}\n\n.mj-forms-inherited-badge i {\n font-size: 10px;\n}\n\n/* ============================================\n RELATED ENTITY VARIANT\n ============================================ */\n.mj-forms-panel--related {\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.mj-forms-panel--related .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-elevated));\n}\n\n.mj-forms-panel--related .mj-forms-panel-header:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface-elevated));\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel--related .mj-forms-panel-icon {\n color: var(--mj-brand-primary);\n}\n\n/* Related entity content hugs the grid (toolbar + header + rows).\n A fixed 400px box left a hollow slab when AG Grid's viewport was 0,\n and a persisted 0/toolbar height clipped the rows after expand. */\n.mj-forms-panel--related .mj-forms-panel-content {\n height: auto;\n padding: 0;\n overflow: hidden;\n resize: vertical;\n min-height: 0;\n max-height: 800px;\n}\n\n/* AG Grid must fill the 400px / leftover box. Do not stretch every\n descendant \u2014 custom widgets (relationship list) put their section\n header as the first child, and height:100% on it parks the title\n mid-column and hides the list below the fold. */\n.mj-forms-panel--related .mj-forms-panel-content > mj-explorer-entity-data-grid,\n.mj-forms-panel--related .mj-forms-panel-content > .ng-star-inserted > mj-explorer-entity-data-grid {\n height: 100%;\n}\n\n/* Related entity panels need the body to not clip the resize handle */\n.mj-forms-panel--related .mj-forms-panel-body {\n overflow: visible;\n}\n\n/* ============================================\n BODY (collapsible)\n ============================================ */\n.mj-forms-panel-body {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.mj-forms-panel-body--collapsed {\n max-height: 0 !important;\n padding: 0 !important;\n opacity: 0 !important;\n overflow: hidden !important;\n pointer-events: none;\n}\n\n.mj-forms-panel-body--collapsed .mj-forms-panel-content {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n max-height: 0 !important;\n overflow: hidden !important;\n}\n\n.mj-forms-panel-content {\n padding: 20px;\n overflow: auto;\n max-height: 600px;\n}\n\n/* ============================================\n SEARCH HIGHLIGHTING\n ============================================ */\n.mj-forms-panel-title ::ng-deep .mj-forms-search-highlight {\n /* Muted, theme-aware highlight (semantic token) \u2014 consistent with the field\n label + FK dropdown highlights. Replaces the old bright-yellow primitive. */\n background-color: var(--mj-search-highlight-bg);\n color: var(--mj-search-highlight-text);\n border-radius: 2px;\n padding: 0 1px;\n font-weight: 600;\n}\n"] }]
949
+ args: [{ standalone: false, selector: 'mj-collapsible-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: FORM_SECTION_FIELD_HOST, useExisting: forwardRef(() => MjCollapsiblePanelComponent) }], template: "<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 \u2014 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 <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["mj-collapsible-panel {\n display: block;\n}\n\nmj-collapsible-panel.mj-search-hidden {\n display: none;\n}\n\nmj-collapsible-panel.mj-drag-over {\n border: 2px dashed var(--mj-brand-primary);\n border-radius: var(--mj-radius-md);\n}\n\n/* ============================================\n PANEL CARD\n ============================================ */\n.mj-forms-panel {\n background: var(--mj-bg-surface-card);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n border: 1px solid var(--mj-border-default);\n overflow: hidden;\n transition: all 0.3s ease;\n}\n\n/* ============================================\n HEADER\n ============================================ */\n.mj-forms-panel-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n background: var(--mj-bg-surface-elevated);\n border-bottom: 2px solid var(--mj-border-default);\n cursor: pointer;\n user-select: none;\n transition: all 0.3s ease;\n}\n\n.mj-forms-panel-header:hover {\n background: var(--mj-bg-surface-hover);\n border-bottom-color: var(--mj-brand-primary);\n}\n\n/* Static header \u2014 sections locked open (Config.collapsibleSections === false) */\n.mj-forms-panel-header--static {\n cursor: default;\n}\n\n.mj-forms-panel-header--static:hover {\n background: var(--mj-bg-surface-elevated);\n border-bottom-color: var(--mj-border-default);\n}\n\n/* Drag handle */\n.mj-forms-drag-handle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 0;\n height: 24px;\n color: var(--mj-text-muted);\n cursor: grab;\n opacity: 0;\n overflow: hidden;\n transition: width var(--mj-transition-base) ease, opacity var(--mj-transition-base) ease;\n flex-shrink: 0;\n}\n\n.mj-forms-panel-header:hover .mj-forms-drag-handle {\n width: 24px;\n opacity: 1;\n}\n\n.mj-forms-drag-handle:hover {\n color: var(--mj-brand-primary);\n}\n\n.mj-forms-drag-handle:active {\n cursor: grabbing;\n}\n\nmj-collapsible-panel.mj-dragging .mj-forms-drag-handle {\n width: 24px;\n opacity: 1;\n color: var(--mj-brand-primary);\n}\n\n/* Title group */\n.mj-forms-panel-title-group {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.mj-forms-panel-icon {\n font-size: 18px;\n color: var(--mj-brand-primary);\n width: 24px;\n text-align: center;\n}\n\n.mj-forms-panel-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.mj-forms-panel-chevron {\n color: var(--mj-text-secondary);\n font-size: 14px;\n transition: transform 0.3s ease;\n padding: 4px;\n}\n\n/* Row count badge */\n.mj-forms-row-count-badge {\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n padding: 2px 8px;\n border-radius: var(--mj-radius-full);\n font-size: 12px;\n font-weight: 600;\n margin-left: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n line-height: 1;\n}\n\n.mj-forms-row-count-badge--zero {\n background: var(--mj-text-muted);\n}\n\n/* ============================================\n SECTION INDICATORS\n Unsaved-changes dot + invalid-field count, derived from the section's own\n fields so a collapsed accordion header (or the left-nav rail, which reads\n the same counts) says WHERE the edited / failing field is.\n ============================================ */\n\n/* Same 6px amber dot an edited field shows after its label. */\n.mj-forms-panel-dirty {\n display: inline-block;\n width: var(--mj-space-1-5);\n height: var(--mj-space-1-5);\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n margin-left: var(--mj-space-2);\n vertical-align: middle;\n}\n\n.mj-forms-panel-error-badge,\n.mj-forms-panel-warning-badge {\n padding: var(--mj-space-0-5) var(--mj-space-2);\n border-radius: var(--mj-radius-full);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n margin-left: var(--mj-space-2);\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n justify-content: center;\n min-width: var(--mj-space-6);\n line-height: 1;\n vertical-align: middle;\n}\n\n/* Same colour as the failing field's underline. */\n.mj-forms-panel-error-badge {\n background: var(--mj-status-error);\n color: var(--mj-text-inverse);\n}\n\n.mj-forms-panel-warning-badge {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border: 1px solid var(--mj-status-warning-border);\n}\n\n.mj-forms-panel-error-badge i,\n.mj-forms-panel-warning-badge i {\n font-size: var(--mj-text-xs);\n}\n\n/* Card edge + header tint while the section holds an invalid field \u2014 the same\n left-edge treatment the related / inherited variants use. Not applied to the\n selected left-nav section (`.mj-chrome-show`): there the rail is the header\n and the card chrome is stripped. */\nmj-collapsible-panel.mj-panel-has-errors:not(.mj-chrome-show) > .mj-forms-panel {\n border-left: 3px solid var(--mj-status-error);\n}\n\nmj-collapsible-panel.mj-panel-has-errors:not(.mj-chrome-show) > .mj-forms-panel > .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface-elevated));\n}\n\nmj-collapsible-panel.mj-panel-has-warnings:not(.mj-chrome-show) > .mj-forms-panel {\n border-left: 3px solid var(--mj-status-warning);\n}\n\n/* ============================================\n INHERITED VARIANT (IS-A parent fields)\n ============================================ */\n.mj-forms-panel--inherited {\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-elevated));\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-header:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface-elevated));\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel--inherited .mj-forms-panel-icon {\n color: var(--mj-brand-primary);\n}\n\n.mj-forms-inherited-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n cursor: pointer;\n transition: all var(--mj-transition-base) ease;\n text-decoration: none;\n}\n\n.mj-forms-inherited-badge:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--mj-brand-primary) 20%, transparent);\n}\n\n.mj-forms-inherited-badge i {\n font-size: 10px;\n}\n\n/* ============================================\n RELATED ENTITY VARIANT\n ============================================ */\n.mj-forms-panel--related {\n border-left: 3px solid var(--mj-brand-primary);\n}\n\n.mj-forms-panel--related .mj-forms-panel-header {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-elevated));\n}\n\n.mj-forms-panel--related .mj-forms-panel-header:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface-elevated));\n border-bottom-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel--related .mj-forms-panel-icon {\n color: var(--mj-brand-primary);\n}\n\n/* Related entity content hugs the grid (toolbar + header + rows).\n A fixed 400px box left a hollow slab when AG Grid's viewport was 0,\n and a persisted 0/toolbar height clipped the rows after expand. */\n.mj-forms-panel--related .mj-forms-panel-content {\n height: auto;\n padding: 0;\n overflow: hidden;\n resize: vertical;\n min-height: 0;\n max-height: 800px;\n}\n\n/* AG Grid must fill the 400px / leftover box. Do not stretch every\n descendant \u2014 custom widgets (relationship list) put their section\n header as the first child, and height:100% on it parks the title\n mid-column and hides the list below the fold. */\n.mj-forms-panel--related .mj-forms-panel-content > mj-explorer-entity-data-grid,\n.mj-forms-panel--related .mj-forms-panel-content > .ng-star-inserted > mj-explorer-entity-data-grid {\n height: 100%;\n}\n\n/* Related entity panels need the body to not clip the resize handle */\n.mj-forms-panel--related .mj-forms-panel-body {\n overflow: visible;\n}\n\n/* ============================================\n BODY (collapsible)\n ============================================ */\n.mj-forms-panel-body {\n max-height: 2000px;\n overflow: hidden;\n transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;\n opacity: 1;\n}\n\n.mj-forms-panel-body--collapsed {\n max-height: 0 !important;\n padding: 0 !important;\n opacity: 0 !important;\n overflow: hidden !important;\n pointer-events: none;\n}\n\n.mj-forms-panel-body--collapsed .mj-forms-panel-content {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n max-height: 0 !important;\n overflow: hidden !important;\n}\n\n.mj-forms-panel-content {\n padding: 20px;\n overflow: auto;\n max-height: 600px;\n}\n\n/* ============================================\n SEARCH HIGHLIGHTING\n ============================================ */\n.mj-forms-panel-title ::ng-deep .mj-forms-search-highlight {\n /* Muted, theme-aware highlight (semantic token) \u2014 consistent with the field\n label + FK dropdown highlights. Replaces the old bright-yellow primitive. */\n background-color: var(--mj-search-highlight-bg);\n color: var(--mj-search-highlight-text);\n border-radius: 2px;\n padding: 0 1px;\n font-weight: 600;\n}\n"] }]
808
950
  }], null, { SectionKey: [{
809
951
  type: Input
810
952
  }], Indicators: [{
@@ -891,5 +1033,5 @@ export class MjCollapsiblePanelComponent {
891
1033
  type: HostListener,
892
1034
  args: ['drop', ['$event']]
893
1035
  }] }); })();
894
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjCollapsiblePanelComponent, { className: "MjCollapsiblePanelComponent", filePath: "src/lib/panel/collapsible-panel.component.ts", lineNumber: 73 }); })();
1036
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjCollapsiblePanelComponent, { className: "MjCollapsiblePanelComponent", filePath: "src/lib/panel/collapsible-panel.component.ts", lineNumber: 88 }); })();
895
1037
  //# sourceMappingURL=collapsible-panel.component.js.map