@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
@@ -8,15 +8,16 @@ 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
10
  import { FORM_SECTION_FIELD_HOST } from '../section-indicators/form-section-field-host';
11
- import { ClaimedCollectionErrors, DescribeSectionDirty, DescribeSectionErrors, DescribeSectionWarnings, SectionOwnsValidationSource, SumSectionIndicators, TallyValidationErrors, } from '../section-indicators/form-section-indicators';
11
+ import { FormRecordCommentsCoordinatorService } from '../comments/form-record-comments-coordinator.service';
12
+ import { ClaimedCollectionErrors, DescribeSectionComments, DescribeSectionDirty, DescribeSectionErrors, DescribeSectionWarnings, SectionOwnsValidationSource, SumSectionIndicators, TallyValidationErrors, } from '../section-indicators/form-section-indicators';
12
13
  import * as i0 from "@angular/core";
13
14
  const _c0 = ["panelContent"];
14
15
  const _c1 = ["*"];
15
16
  function MjCollapsiblePanelComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
16
17
  const _r1 = i0.ɵɵgetCurrentView();
17
- i0.ɵɵelementStart(0, "div", 18);
18
+ i0.ɵɵelementStart(0, "div", 20);
18
19
  i0.ɵɵlistener("dragstart", function MjCollapsiblePanelComponent_Conditional_2_Template_div_dragstart_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDragStart($event)); })("dragend", function MjCollapsiblePanelComponent_Conditional_2_Template_div_dragend_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDragEnd()); })("click", function MjCollapsiblePanelComponent_Conditional_2_Template_div_click_0_listener($event) { return $event.stopPropagation(); });
19
- i0.ɵɵelement(1, "i", 19);
20
+ i0.ɵɵelement(1, "i", 21);
20
21
  i0.ɵɵelementEnd();
21
22
  } }
22
23
  function MjCollapsiblePanelComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
@@ -28,7 +29,7 @@ function MjCollapsiblePanelComponent_Conditional_7_Template(rf, ctx) { if (rf &
28
29
  } }
29
30
  function MjCollapsiblePanelComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
30
31
  i0.ɵɵelementStart(0, "span", 9);
31
- i0.ɵɵelement(1, "i", 20);
32
+ i0.ɵɵelement(1, "i", 22);
32
33
  i0.ɵɵtext(2);
33
34
  i0.ɵɵelementEnd();
34
35
  } if (rf & 2) {
@@ -40,7 +41,7 @@ function MjCollapsiblePanelComponent_Conditional_8_Template(rf, ctx) { if (rf &
40
41
  } }
41
42
  function MjCollapsiblePanelComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
42
43
  i0.ɵɵelementStart(0, "span", 10);
43
- i0.ɵɵelement(1, "i", 21);
44
+ i0.ɵɵelement(1, "i", 23);
44
45
  i0.ɵɵtext(2);
45
46
  i0.ɵɵelementEnd();
46
47
  } if (rf & 2) {
@@ -51,7 +52,7 @@ function MjCollapsiblePanelComponent_Conditional_9_Template(rf, ctx) { if (rf &
51
52
  i0.ɵɵtextInterpolate1("", ctx_r1.SectionWarningCount, " ");
52
53
  } }
53
54
  function MjCollapsiblePanelComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
54
- i0.ɵɵelementStart(0, "span", 22);
55
+ i0.ɵɵelementStart(0, "span", 24);
55
56
  i0.ɵɵtext(1);
56
57
  i0.ɵɵelementEnd();
57
58
  } if (rf & 2) {
@@ -62,9 +63,35 @@ function MjCollapsiblePanelComponent_Conditional_10_Template(rf, ctx) { if (rf &
62
63
  } }
63
64
  function MjCollapsiblePanelComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
64
65
  const _r3 = i0.ɵɵgetCurrentView();
65
- i0.ɵɵelementStart(0, "a", 23);
66
- i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Conditional_11_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnInheritedBadgeClick($event)); });
67
- i0.ɵɵelement(1, "i", 24);
66
+ i0.ɵɵelementStart(0, "button", 25);
67
+ i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Conditional_11_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnOpenSectionComments($event)); });
68
+ i0.ɵɵelement(1, "i", 26);
69
+ i0.ɵɵelementStart(2, "span");
70
+ i0.ɵɵtext(3);
71
+ i0.ɵɵelementEnd()();
72
+ } if (rf & 2) {
73
+ const ctx_r1 = i0.ɵɵnextContext();
74
+ i0.ɵɵproperty("title", ctx_r1.SectionCommentTitle);
75
+ i0.ɵɵattribute("aria-label", ctx_r1.SectionCommentTitle);
76
+ i0.ɵɵadvance(3);
77
+ i0.ɵɵtextInterpolate(ctx_r1.SectionCommentCount);
78
+ } }
79
+ function MjCollapsiblePanelComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
80
+ const _r4 = i0.ɵɵgetCurrentView();
81
+ i0.ɵɵelementStart(0, "button", 27);
82
+ i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Conditional_12_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnOpenSectionComments($event)); });
83
+ i0.ɵɵelement(1, "i", 26);
84
+ i0.ɵɵelementEnd();
85
+ } if (rf & 2) {
86
+ const ctx_r1 = i0.ɵɵnextContext();
87
+ i0.ɵɵproperty("title", "Comment on " + (ctx_r1.SectionName || ctx_r1.SectionKey));
88
+ i0.ɵɵattribute("aria-label", "Comment on " + (ctx_r1.SectionName || ctx_r1.SectionKey));
89
+ } }
90
+ function MjCollapsiblePanelComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
91
+ const _r5 = i0.ɵɵgetCurrentView();
92
+ i0.ɵɵelementStart(0, "a", 28);
93
+ i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Conditional_13_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnInheritedBadgeClick($event)); });
94
+ i0.ɵɵelement(1, "i", 29);
68
95
  i0.ɵɵtext(2);
69
96
  i0.ɵɵelementEnd();
70
97
  } if (rf & 2) {
@@ -73,8 +100,8 @@ function MjCollapsiblePanelComponent_Conditional_11_Template(rf, ctx) { if (rf &
73
100
  i0.ɵɵadvance(2);
74
101
  i0.ɵɵtextInterpolate1(" Inherited from ", ctx_r1.InheritedFromEntity, " ");
75
102
  } }
76
- function MjCollapsiblePanelComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
77
- i0.ɵɵelementStart(0, "div", 13);
103
+ function MjCollapsiblePanelComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
104
+ i0.ɵɵelementStart(0, "div", 15);
78
105
  i0.ɵɵelement(1, "i");
79
106
  i0.ɵɵelementEnd();
80
107
  } if (rf & 2) {
@@ -82,14 +109,14 @@ function MjCollapsiblePanelComponent_Conditional_12_Template(rf, ctx) { if (rf &
82
109
  i0.ɵɵadvance();
83
110
  i0.ɵɵclassMap(ctx_r1.Expanded ? "fa fa-chevron-up" : "fa fa-chevron-down");
84
111
  } }
85
- function MjCollapsiblePanelComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
86
- i0.ɵɵelement(0, "mj-form-field-panel-slot", 16);
112
+ function MjCollapsiblePanelComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
113
+ i0.ɵɵelement(0, "mj-form-field-panel-slot", 18);
87
114
  } if (rf & 2) {
88
115
  const ctx_r1 = i0.ɵɵnextContext();
89
116
  i0.ɵɵproperty("Entity", ctx_r1.FieldPanelEntity)("FieldNames", ctx_r1.ClaimableFieldNames)("SectionKey", ctx_r1.SectionKey)("Record", ctx_r1.FieldPanelForm.record)("FormComponent", ctx_r1.FieldPanelForm)("FormContext", ctx_r1.FormContext);
90
117
  } }
91
- function MjCollapsiblePanelComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
92
- i0.ɵɵelement(0, "mj-form-field-panel-slot", 17);
118
+ function MjCollapsiblePanelComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
119
+ i0.ɵɵelement(0, "mj-form-field-panel-slot", 19);
93
120
  } if (rf & 2) {
94
121
  const ctx_r1 = i0.ɵɵnextContext();
95
122
  i0.ɵɵproperty("Entity", ctx_r1.FieldPanelEntity)("FieldNames", ctx_r1.ClaimableFieldNames)("SectionKey", ctx_r1.SectionKey)("Record", ctx_r1.FieldPanelForm.record)("FormComponent", ctx_r1.FieldPanelForm)("FormContext", ctx_r1.FormContext);
@@ -145,6 +172,7 @@ export class MjCollapsiblePanelComponent {
145
172
  ngZone = inject(NgZone);
146
173
  chrome = inject(FormChromeCoordinator, { optional: true });
147
174
  indicators = inject(FormSectionIndicatorCoordinator, { optional: true });
175
+ commentsCoordinator = inject(FormRecordCommentsCoordinatorService, { optional: true });
148
176
  /** Unique key for state persistence */
149
177
  SectionKey = '';
150
178
  /**
@@ -522,7 +550,8 @@ export class MjCollapsiblePanelComponent {
522
550
  * the coordinator). Pure and cheap: one pass over the field list.
523
551
  */
524
552
  get SectionIndicators() {
525
- return SumSectionIndicators(this.fieldIndicators(), TallyValidationErrors(this.claimedGraphErrors()), this.Indicators);
553
+ const commentCount = this.SectionCommentCount;
554
+ return SumSectionIndicators(this.fieldIndicators(), TallyValidationErrors(this.claimedGraphErrors()), this.Indicators, commentCount > 0 ? { CommentCount: commentCount } : null);
526
555
  }
527
556
  get SectionDirtyCount() {
528
557
  return this.SectionIndicators.DirtyCount;
@@ -533,6 +562,9 @@ export class MjCollapsiblePanelComponent {
533
562
  get SectionWarningCount() {
534
563
  return this.SectionIndicators.WarningCount;
535
564
  }
565
+ get SectionCommentCount() {
566
+ return this.commentsCoordinator?.GetSectionOpenCommentCount(this.SectionKey, this.renderedFieldNames()) ?? 0;
567
+ }
536
568
  get SectionDirtyTitle() {
537
569
  return DescribeSectionDirty(this.SectionDirtyCount);
538
570
  }
@@ -542,6 +574,40 @@ export class MjCollapsiblePanelComponent {
542
574
  get SectionWarningTitle() {
543
575
  return DescribeSectionWarnings(this.SectionWarningCount);
544
576
  }
577
+ get SectionCommentTitle() {
578
+ return DescribeSectionComments(this.SectionCommentCount);
579
+ }
580
+ get CanCommentOnSection() {
581
+ return Boolean(this.commentsCoordinator &&
582
+ this.FieldPanelForm?.record?.IsSaved &&
583
+ this.FieldPanelForm?.record?.EntityInfo?.AllowRecordComments !== false &&
584
+ this.SectionKey);
585
+ }
586
+ OnOpenSectionComments(event) {
587
+ event.stopPropagation();
588
+ event.preventDefault();
589
+ if (!this.commentsCoordinator || !this.SectionKey)
590
+ return;
591
+ const btn = event.currentTarget;
592
+ const rect = btn?.getBoundingClientRect();
593
+ this.commentsCoordinator.OpenPopoverForTarget({
594
+ AnchorType: 'Section',
595
+ AnchorKey: this.SectionKey,
596
+ Label: this.SectionName || this.SectionKey,
597
+ SectionKey: this.SectionKey,
598
+ SectionDisplayName: this.SectionName || this.SectionKey,
599
+ AnchorRect: rect
600
+ ? {
601
+ top: rect.top,
602
+ left: rect.left,
603
+ right: rect.right,
604
+ bottom: rect.bottom,
605
+ width: rect.width,
606
+ height: rect.height
607
+ }
608
+ : undefined
609
+ });
610
+ }
545
611
  /** {@link FormSectionIndicatorSource} — the rail reads this through the coordinator. */
546
612
  GetSectionIndicators() {
547
613
  return this.SectionIndicators;
@@ -623,6 +689,11 @@ export class MjCollapsiblePanelComponent {
623
689
  this.chrome?.Changes.pipe(takeUntil(this.destroy$)).subscribe(() => {
624
690
  this.updateVisibilityAndHighlighting();
625
691
  });
692
+ this.commentsCoordinator?.Changed$.pipe(takeUntil(this.destroy$)).subscribe(() => {
693
+ this.updateVisibilityAndHighlighting();
694
+ this.cdr.markForCheck();
695
+ this.indicators?.NotifyChanged();
696
+ });
626
697
  this.registerIndicatorSource();
627
698
  // A section that mounts after the rail was worked out (a slot panel that draws
628
699
  // itself only once its data has loaded) has to be filed onto the rail, or a
@@ -837,6 +908,8 @@ export class MjCollapsiblePanelComponent {
837
908
  hasRenderableContent() {
838
909
  if (this.Variant === 'related-entity')
839
910
  return true;
911
+ if (this.SectionCommentCount > 0)
912
+ return true;
840
913
  const fields = this.allFields();
841
914
  if (fields.length === 0)
842
915
  return true;
@@ -1030,7 +1103,7 @@ export class MjCollapsiblePanelComponent {
1030
1103
  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);
1031
1104
  i0.ɵɵclassMap(ctx.HostClass);
1032
1105
  i0.ɵɵstyleProp("order", ctx.CssOrder);
1033
- } }, inputs: { SectionKey: "SectionKey", Indicators: "Indicators", ValidationSources: "ValidationSources", SectionName: "SectionName", Icon: "Icon", Form: "Form", FormContext: "FormContext", Variant: "Variant", Order: "Order", 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: 19, vars: 24, 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"], ["Position", "start", 3, "Entity", "FieldNames", "SectionKey", "Record", "FormComponent", "FormContext"], ["Position", "end", 3, "Entity", "FieldNames", "SectionKey", "Record", "FormComponent", "FormContext"], ["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) {
1106
+ } }, inputs: { SectionKey: "SectionKey", Indicators: "Indicators", ValidationSources: "ValidationSources", SectionName: "SectionName", Icon: "Icon", Form: "Form", FormContext: "FormContext", Variant: "Variant", Order: "Order", 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: 21, vars: 26, 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"], ["type", "button", 1, "mj-forms-panel-comment-badge", 3, "title"], ["type", "button", 1, "mj-forms-panel-comment-trigger", 3, "title"], [1, "mj-forms-inherited-badge", 3, "title"], [1, "mj-forms-panel-chevron"], [1, "mj-forms-panel-body"], [1, "mj-forms-panel-content"], ["Position", "start", 3, "Entity", "FieldNames", "SectionKey", "Record", "FormComponent", "FormContext"], ["Position", "end", 3, "Entity", "FieldNames", "SectionKey", "Record", "FormComponent", "FormContext"], ["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"], ["type", "button", 1, "mj-forms-panel-comment-badge", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-regular", "fa-comment-dots"], ["type", "button", 1, "mj-forms-panel-comment-trigger", 3, "click", "title"], [1, "mj-forms-inherited-badge", 3, "click", "title"], [1, "fa-solid", "fa-arrow-up"]], template: function MjCollapsiblePanelComponent_Template(rf, ctx) { if (rf & 1) {
1034
1107
  i0.ɵɵprojectionDef();
1035
1108
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
1036
1109
  i0.ɵɵlistener("click", function MjCollapsiblePanelComponent_Template_div_click_1_listener() { return ctx.Toggle(); });
@@ -1042,14 +1115,16 @@ export class MjCollapsiblePanelComponent {
1042
1115
  i0.ɵɵconditionalCreate(7, MjCollapsiblePanelComponent_Conditional_7_Template, 1, 2, "span", 8);
1043
1116
  i0.ɵɵconditionalCreate(8, MjCollapsiblePanelComponent_Conditional_8_Template, 3, 3, "span", 9)(9, MjCollapsiblePanelComponent_Conditional_9_Template, 3, 3, "span", 10);
1044
1117
  i0.ɵɵconditionalCreate(10, MjCollapsiblePanelComponent_Conditional_10_Template, 2, 3, "span", 11);
1118
+ i0.ɵɵconditionalCreate(11, MjCollapsiblePanelComponent_Conditional_11_Template, 4, 3, "button", 12);
1045
1119
  i0.ɵɵelementEnd()();
1046
- i0.ɵɵconditionalCreate(11, MjCollapsiblePanelComponent_Conditional_11_Template, 3, 2, "a", 12);
1047
- i0.ɵɵconditionalCreate(12, MjCollapsiblePanelComponent_Conditional_12_Template, 2, 2, "div", 13);
1120
+ i0.ɵɵconditionalCreate(12, MjCollapsiblePanelComponent_Conditional_12_Template, 2, 2, "button", 13);
1121
+ i0.ɵɵconditionalCreate(13, MjCollapsiblePanelComponent_Conditional_13_Template, 3, 2, "a", 14);
1122
+ i0.ɵɵconditionalCreate(14, MjCollapsiblePanelComponent_Conditional_14_Template, 2, 2, "div", 15);
1048
1123
  i0.ɵɵelementEnd();
1049
- i0.ɵɵelementStart(13, "div", 14)(14, "div", 15, 0);
1050
- i0.ɵɵconditionalCreate(16, MjCollapsiblePanelComponent_Conditional_16_Template, 1, 6, "mj-form-field-panel-slot", 16);
1051
- i0.ɵɵprojection(17);
1052
- i0.ɵɵconditionalCreate(18, MjCollapsiblePanelComponent_Conditional_18_Template, 1, 6, "mj-form-field-panel-slot", 17);
1124
+ i0.ɵɵelementStart(15, "div", 16)(16, "div", 17, 0);
1125
+ i0.ɵɵconditionalCreate(18, MjCollapsiblePanelComponent_Conditional_18_Template, 1, 6, "mj-form-field-panel-slot", 18);
1126
+ i0.ɵɵprojection(19);
1127
+ i0.ɵɵconditionalCreate(20, MjCollapsiblePanelComponent_Conditional_20_Template, 1, 6, "mj-form-field-panel-slot", 19);
1053
1128
  i0.ɵɵelementEnd()()();
1054
1129
  } if (rf & 2) {
1055
1130
  i0.ɵɵclassProp("mj-forms-panel--related", ctx.Variant === "related-entity")("mj-forms-panel--inherited", ctx.Variant === "inherited");
@@ -1070,22 +1145,26 @@ export class MjCollapsiblePanelComponent {
1070
1145
  i0.ɵɵadvance(2);
1071
1146
  i0.ɵɵconditional(ctx.BadgeCount !== undefined ? 10 : -1);
1072
1147
  i0.ɵɵadvance();
1073
- i0.ɵɵconditional(ctx.Variant === "inherited" && ctx.InheritedFromEntity ? 11 : -1);
1148
+ i0.ɵɵconditional(ctx.SectionCommentCount > 0 ? 11 : -1);
1149
+ i0.ɵɵadvance();
1150
+ i0.ɵɵconditional(ctx.CanCommentOnSection && ctx.SectionCommentCount === 0 ? 12 : -1);
1074
1151
  i0.ɵɵadvance();
1075
- i0.ɵɵconditional(ctx.Collapsible ? 12 : -1);
1152
+ i0.ɵɵconditional(ctx.Variant === "inherited" && ctx.InheritedFromEntity ? 13 : -1);
1153
+ i0.ɵɵadvance();
1154
+ i0.ɵɵconditional(ctx.Collapsible ? 14 : -1);
1076
1155
  i0.ɵɵadvance();
1077
1156
  i0.ɵɵclassProp("mj-forms-panel-body--collapsed", !ctx.Expanded);
1078
1157
  i0.ɵɵadvance();
1079
1158
  i0.ɵɵstyleProp("height", ctx.PanelContentHeight, "px");
1080
1159
  i0.ɵɵadvance(2);
1081
- i0.ɵɵconditional(ctx.HostsFieldPanels ? 16 : -1);
1082
- i0.ɵɵadvance(2);
1083
1160
  i0.ɵɵconditional(ctx.HostsFieldPanels ? 18 : -1);
1084
- } }, 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"], encapsulation: 2, changeDetection: 0 });
1161
+ i0.ɵɵadvance(2);
1162
+ i0.ɵɵconditional(ctx.HostsFieldPanels ? 20 : -1);
1163
+ } }, 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/* When a related grid shows <mj-empty-state> (0 rows or error), never let the\n fixed inline pixel height clip wrapped empty-state titles or messages. */\n.mj-forms-panel--related mj-explorer-entity-data-grid:has(.mj-grid-content > mj-empty-state),\n.mj-forms-panel--related .mj-grid-container:has(> .mj-grid-content > mj-empty-state) {\n height: auto !important;\n min-height: 126px;\n}\n\n.mj-forms-panel--related .mj-grid-content:has(> mj-empty-state) {\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 76px;\n overflow: visible;\n}\n\n@media (max-width: 768px) {\n .mj-forms-panel--related .mj-forms-panel-content {\n resize: none;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar {\n flex-wrap: nowrap;\n padding: 0 8px;\n gap: 8px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-left {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-search {\n flex: 1 1 auto;\n min-width: 0;\n width: 100%;\n margin-top: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .search-input {\n width: 100%;\n min-width: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-center {\n flex: 0 0 auto;\n white-space: nowrap;\n font-size: 12px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-right {\n flex: 0 0 auto;\n gap: 4px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-button {\n padding: 6px 8px;\n }\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\n/* ============================================\n SECTION-LEVEL ANCHORED COMMENTS\n ============================================ */\n.mj-forms-panel-comment-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n margin-left: 8px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n line-height: 1.3;\n transition: background-color 120ms ease, border-color 120ms ease;\n}\n\n.mj-forms-panel-comment-badge:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 22%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel-comment-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: var(--mj-radius-sm, 6px);\n background: transparent;\n color: var(--mj-text-muted);\n font-size: 13px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 150ms ease, background-color 150ms ease, color 150ms ease;\n}\n\n.mj-forms-panel-header:hover .mj-forms-panel-comment-trigger,\n.mj-forms-panel-comment-trigger:focus-visible {\n opacity: 1;\n}\n\n.mj-forms-panel-comment-trigger:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-brand-primary);\n}\n\n"], encapsulation: 2, changeDetection: 0 });
1085
1164
  }
1086
1165
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjCollapsiblePanelComponent, [{
1087
1166
  type: Component,
1088
- 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 <!-- 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", 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"] }]
1167
+ 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 <!-- 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", 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/* When a related grid shows <mj-empty-state> (0 rows or error), never let the\n fixed inline pixel height clip wrapped empty-state titles or messages. */\n.mj-forms-panel--related mj-explorer-entity-data-grid:has(.mj-grid-content > mj-empty-state),\n.mj-forms-panel--related .mj-grid-container:has(> .mj-grid-content > mj-empty-state) {\n height: auto !important;\n min-height: 126px;\n}\n\n.mj-forms-panel--related .mj-grid-content:has(> mj-empty-state) {\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 76px;\n overflow: visible;\n}\n\n@media (max-width: 768px) {\n .mj-forms-panel--related .mj-forms-panel-content {\n resize: none;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar {\n flex-wrap: nowrap;\n padding: 0 8px;\n gap: 8px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-left {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-search {\n flex: 1 1 auto;\n min-width: 0;\n width: 100%;\n margin-top: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .search-input {\n width: 100%;\n min-width: 0;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-center {\n flex: 0 0 auto;\n white-space: nowrap;\n font-size: 12px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-right {\n flex: 0 0 auto;\n gap: 4px;\n }\n\n .mj-forms-panel--related .mj-grid-toolbar .toolbar-button {\n padding: 6px 8px;\n }\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\n/* ============================================\n SECTION-LEVEL ANCHORED COMMENTS\n ============================================ */\n.mj-forms-panel-comment-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n margin-left: 8px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n line-height: 1.3;\n transition: background-color 120ms ease, border-color 120ms ease;\n}\n\n.mj-forms-panel-comment-badge:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 22%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n}\n\n.mj-forms-panel-comment-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: var(--mj-radius-sm, 6px);\n background: transparent;\n color: var(--mj-text-muted);\n font-size: 13px;\n cursor: pointer;\n opacity: 0;\n transition: opacity 150ms ease, background-color 150ms ease, color 150ms ease;\n}\n\n.mj-forms-panel-header:hover .mj-forms-panel-comment-trigger,\n.mj-forms-panel-comment-trigger:focus-visible {\n opacity: 1;\n}\n\n.mj-forms-panel-comment-trigger:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-brand-primary);\n}\n\n"] }]
1089
1168
  }], null, { SectionKey: [{
1090
1169
  type: Input
1091
1170
  }], Indicators: [{
@@ -1174,5 +1253,5 @@ export class MjCollapsiblePanelComponent {
1174
1253
  type: HostListener,
1175
1254
  args: ['drop', ['$event']]
1176
1255
  }] }); })();
1177
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjCollapsiblePanelComponent, { className: "MjCollapsiblePanelComponent", filePath: "src/lib/panel/collapsible-panel.component.ts", lineNumber: 89 }); })();
1256
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjCollapsiblePanelComponent, { className: "MjCollapsiblePanelComponent", filePath: "src/lib/panel/collapsible-panel.component.ts", lineNumber: 91 }); })();
1178
1257
  //# sourceMappingURL=collapsible-panel.component.js.map