@memberjunction/ng-base-forms 6.2.0-edge.2 → 6.2.0-edge.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/lib/apply/form-placement-dialog.component.d.ts +266 -0
  2. package/dist/lib/apply/form-placement-dialog.component.d.ts.map +1 -0
  3. package/dist/lib/apply/form-placement-dialog.component.js +1522 -0
  4. package/dist/lib/apply/form-placement-dialog.component.js.map +1 -0
  5. package/dist/lib/apply/form-placement-order.d.ts +37 -0
  6. package/dist/lib/apply/form-placement-order.d.ts.map +1 -0
  7. package/dist/lib/apply/form-placement-order.js +111 -0
  8. package/dist/lib/apply/form-placement-order.js.map +1 -0
  9. package/dist/lib/apply/form-placement-preview.component.d.ts +112 -0
  10. package/dist/lib/apply/form-placement-preview.component.d.ts.map +1 -0
  11. package/dist/lib/apply/form-placement-preview.component.js +346 -0
  12. package/dist/lib/apply/form-placement-preview.component.js.map +1 -0
  13. package/dist/lib/apply/form-placement-text.d.ts +61 -0
  14. package/dist/lib/apply/form-placement-text.d.ts.map +1 -0
  15. package/dist/lib/apply/form-placement-text.js +279 -0
  16. package/dist/lib/apply/form-placement-text.js.map +1 -0
  17. package/dist/lib/apply/form-placement.d.ts +320 -0
  18. package/dist/lib/apply/form-placement.d.ts.map +1 -0
  19. package/dist/lib/apply/form-placement.js +432 -0
  20. package/dist/lib/apply/form-placement.js.map +1 -0
  21. package/dist/lib/apply/form-slot-probe.service.d.ts +121 -0
  22. package/dist/lib/apply/form-slot-probe.service.d.ts.map +1 -0
  23. package/dist/lib/apply/form-slot-probe.service.js +264 -0
  24. package/dist/lib/apply/form-slot-probe.service.js.map +1 -0
  25. package/dist/lib/base-form-component-internals.d.ts +11 -0
  26. package/dist/lib/base-form-component-internals.d.ts.map +1 -0
  27. package/dist/lib/base-form-component-internals.js +33 -0
  28. package/dist/lib/base-form-component-internals.js.map +1 -0
  29. package/dist/lib/base-form-component.d.ts +132 -1
  30. package/dist/lib/base-form-component.d.ts.map +1 -1
  31. package/dist/lib/base-form-component.js +228 -19
  32. package/dist/lib/base-form-component.js.map +1 -1
  33. package/dist/lib/chrome/form-chrome.d.ts +78 -0
  34. package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
  35. package/dist/lib/chrome/form-chrome.js +128 -2
  36. package/dist/lib/chrome/form-chrome.js.map +1 -1
  37. package/dist/lib/chrome/form-composition-registry.d.ts +34 -0
  38. package/dist/lib/chrome/form-composition-registry.d.ts.map +1 -0
  39. package/dist/lib/chrome/form-composition-registry.js +56 -0
  40. package/dist/lib/chrome/form-composition-registry.js.map +1 -0
  41. package/dist/lib/chrome/form-composition-snapshot.d.ts +151 -0
  42. package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -0
  43. package/dist/lib/chrome/form-composition-snapshot.js +137 -0
  44. package/dist/lib/chrome/form-composition-snapshot.js.map +1 -0
  45. package/dist/lib/chrome/resolve-form-chrome.d.ts +15 -0
  46. package/dist/lib/chrome/resolve-form-chrome.d.ts.map +1 -1
  47. package/dist/lib/chrome/resolve-form-chrome.js +31 -2
  48. package/dist/lib/chrome/resolve-form-chrome.js.map +1 -1
  49. package/dist/lib/container/record-form-container.component.d.ts +240 -5
  50. package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
  51. package/dist/lib/container/record-form-container.component.js +976 -249
  52. package/dist/lib/container/record-form-container.component.js.map +1 -1
  53. package/dist/lib/field/form-field.component.d.ts +17 -0
  54. package/dist/lib/field/form-field.component.d.ts.map +1 -1
  55. package/dist/lib/field/form-field.component.js +41 -5
  56. package/dist/lib/field/form-field.component.js.map +1 -1
  57. package/dist/lib/form-state.service.d.ts +5 -0
  58. package/dist/lib/form-state.service.d.ts.map +1 -1
  59. package/dist/lib/form-state.service.js +6 -1
  60. package/dist/lib/form-state.service.js.map +1 -1
  61. package/dist/lib/host/entity-form-host.component.d.ts +16 -1
  62. package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
  63. package/dist/lib/host/entity-form-host.component.js +27 -6
  64. package/dist/lib/host/entity-form-host.component.js.map +1 -1
  65. package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts +24 -0
  66. package/dist/lib/interactive-form/form-panel-host-props.builder.d.ts.map +1 -0
  67. package/dist/lib/interactive-form/form-panel-host-props.builder.js +99 -0
  68. package/dist/lib/interactive-form/form-panel-host-props.builder.js.map +1 -0
  69. package/dist/lib/interactive-form/interactive-form-panel.component.d.ts +109 -0
  70. package/dist/lib/interactive-form/interactive-form-panel.component.d.ts.map +1 -0
  71. package/dist/lib/interactive-form/interactive-form-panel.component.js +424 -0
  72. package/dist/lib/interactive-form/interactive-form-panel.component.js.map +1 -0
  73. package/dist/lib/interactive-form/interactive-form.component.d.ts +2 -0
  74. package/dist/lib/interactive-form/interactive-form.component.d.ts.map +1 -1
  75. package/dist/lib/interactive-form/interactive-form.component.js +4 -5
  76. package/dist/lib/interactive-form/interactive-form.component.js.map +1 -1
  77. package/dist/lib/panel/collapsible-panel.component.d.ts +69 -1
  78. package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
  79. package/dist/lib/panel/collapsible-panel.component.js +148 -12
  80. package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
  81. package/dist/lib/panel-manager/form-audience.d.ts +46 -0
  82. package/dist/lib/panel-manager/form-audience.d.ts.map +1 -0
  83. package/dist/lib/panel-manager/form-audience.js +34 -0
  84. package/dist/lib/panel-manager/form-audience.js.map +1 -0
  85. package/dist/lib/panel-manager/form-panel-admin.service.d.ts +150 -0
  86. package/dist/lib/panel-manager/form-panel-admin.service.d.ts.map +1 -0
  87. package/dist/lib/panel-manager/form-panel-admin.service.js +433 -0
  88. package/dist/lib/panel-manager/form-panel-admin.service.js.map +1 -0
  89. package/dist/lib/panel-manager/form-panel-inventory.d.ts +255 -0
  90. package/dist/lib/panel-manager/form-panel-inventory.d.ts.map +1 -0
  91. package/dist/lib/panel-manager/form-panel-inventory.js +293 -0
  92. package/dist/lib/panel-manager/form-panel-inventory.js.map +1 -0
  93. package/dist/lib/panel-manager/panel-manager.component.d.ts +232 -0
  94. package/dist/lib/panel-manager/panel-manager.component.d.ts.map +1 -0
  95. package/dist/lib/panel-manager/panel-manager.component.js +1112 -0
  96. package/dist/lib/panel-manager/panel-manager.component.js.map +1 -0
  97. package/dist/lib/panel-slot/base-contribution-panel.d.ts +40 -0
  98. package/dist/lib/panel-slot/base-contribution-panel.d.ts.map +1 -0
  99. package/dist/lib/panel-slot/base-contribution-panel.js +55 -0
  100. package/dist/lib/panel-slot/base-contribution-panel.js.map +1 -0
  101. package/dist/lib/panel-slot/base-form-panel.d.ts +116 -8
  102. package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
  103. package/dist/lib/panel-slot/base-form-panel.js +76 -5
  104. package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
  105. package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts +29 -0
  106. package/dist/lib/panel-slot/collect-form-contribution-registrations.d.ts.map +1 -0
  107. package/dist/lib/panel-slot/collect-form-contribution-registrations.js +214 -0
  108. package/dist/lib/panel-slot/collect-form-contribution-registrations.js.map +1 -0
  109. package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts +6 -3
  110. package/dist/lib/panel-slot/collect-form-panel-registrations.d.ts.map +1 -1
  111. package/dist/lib/panel-slot/collect-form-panel-registrations.js +8 -14
  112. package/dist/lib/panel-slot/collect-form-panel-registrations.js.map +1 -1
  113. package/dist/lib/panel-slot/form-contribution.d.ts +170 -7
  114. package/dist/lib/panel-slot/form-contribution.d.ts.map +1 -1
  115. package/dist/lib/panel-slot/form-contribution.js +242 -64
  116. package/dist/lib/panel-slot/form-contribution.js.map +1 -1
  117. package/dist/lib/panel-slot/form-contributions.component.d.ts +16 -5
  118. package/dist/lib/panel-slot/form-contributions.component.d.ts.map +1 -1
  119. package/dist/lib/panel-slot/form-contributions.component.js +43 -7
  120. package/dist/lib/panel-slot/form-contributions.component.js.map +1 -1
  121. package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts +66 -0
  122. package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -0
  123. package/dist/lib/panel-slot/form-field-panel-slot.component.js +190 -0
  124. package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -0
  125. package/dist/lib/panel-slot/form-panel-slot.component.d.ts +52 -16
  126. package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
  127. package/dist/lib/panel-slot/form-panel-slot.component.js +190 -66
  128. package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
  129. package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts +11 -0
  130. package/dist/lib/panel-slot/form-slot-coordinator.service.d.ts.map +1 -1
  131. package/dist/lib/panel-slot/form-slot-coordinator.service.js +17 -0
  132. package/dist/lib/panel-slot/form-slot-coordinator.service.js.map +1 -1
  133. package/dist/lib/panel-slot/merge-panel-validation.d.ts +7 -0
  134. package/dist/lib/panel-slot/merge-panel-validation.d.ts.map +1 -0
  135. package/dist/lib/panel-slot/merge-panel-validation.js +16 -0
  136. package/dist/lib/panel-slot/merge-panel-validation.js.map +1 -0
  137. package/dist/lib/panel-slot/mount-form-contribution.d.ts +15 -0
  138. package/dist/lib/panel-slot/mount-form-contribution.d.ts.map +1 -0
  139. package/dist/lib/panel-slot/mount-form-contribution.js +37 -0
  140. package/dist/lib/panel-slot/mount-form-contribution.js.map +1 -0
  141. package/dist/lib/panel-slot/panel-hides.d.ts +35 -0
  142. package/dist/lib/panel-slot/panel-hides.d.ts.map +1 -0
  143. package/dist/lib/panel-slot/panel-hides.js +111 -0
  144. package/dist/lib/panel-slot/panel-hides.js.map +1 -0
  145. package/dist/lib/panel-slot/placement-preview-panel.component.d.ts +16 -0
  146. package/dist/lib/panel-slot/placement-preview-panel.component.d.ts.map +1 -0
  147. package/dist/lib/panel-slot/placement-preview-panel.component.js +112 -0
  148. package/dist/lib/panel-slot/placement-preview-panel.component.js.map +1 -0
  149. package/dist/lib/panel-slot/placement-preview.d.ts +57 -0
  150. package/dist/lib/panel-slot/placement-preview.d.ts.map +1 -0
  151. package/dist/lib/panel-slot/placement-preview.js +86 -0
  152. package/dist/lib/panel-slot/placement-preview.js.map +1 -0
  153. package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts +2 -0
  154. package/dist/lib/panel-slot/related-entity-grid-panel.component.d.ts.map +1 -1
  155. package/dist/lib/panel-slot/related-entity-grid-panel.component.js +10 -3
  156. package/dist/lib/panel-slot/related-entity-grid-panel.component.js.map +1 -1
  157. package/dist/lib/panel-slot/slot-order.d.ts +19 -0
  158. package/dist/lib/panel-slot/slot-order.d.ts.map +1 -0
  159. package/dist/lib/panel-slot/slot-order.js +53 -0
  160. package/dist/lib/panel-slot/slot-order.js.map +1 -0
  161. package/dist/lib/resolver/form-resolver.service.d.ts +4 -2
  162. package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
  163. package/dist/lib/resolver/form-resolver.service.js +18 -8
  164. package/dist/lib/resolver/form-resolver.service.js.map +1 -1
  165. package/dist/lib/resolver/form-variants.d.ts +28 -0
  166. package/dist/lib/resolver/form-variants.d.ts.map +1 -0
  167. package/dist/lib/resolver/form-variants.js +40 -0
  168. package/dist/lib/resolver/form-variants.js.map +1 -0
  169. package/dist/lib/section-counts/form-section-counts.d.ts +99 -0
  170. package/dist/lib/section-counts/form-section-counts.d.ts.map +1 -0
  171. package/dist/lib/section-counts/form-section-counts.js +223 -0
  172. package/dist/lib/section-counts/form-section-counts.js.map +1 -0
  173. package/dist/lib/toolbar/form-toolbar.component.d.ts +7 -0
  174. package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
  175. package/dist/lib/toolbar/form-toolbar.component.js +194 -128
  176. package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
  177. package/dist/lib/types/form-types.d.ts +8 -0
  178. package/dist/lib/types/form-types.d.ts.map +1 -1
  179. package/dist/lib/types/form-types.js.map +1 -1
  180. package/dist/module.d.ts +29 -23
  181. package/dist/module.d.ts.map +1 -1
  182. package/dist/module.js +43 -5
  183. package/dist/module.js.map +1 -1
  184. package/dist/public-api.d.ts +20 -0
  185. package/dist/public-api.d.ts.map +1 -1
  186. package/dist/public-api.js +21 -0
  187. package/dist/public-api.js.map +1 -1
  188. package/package.json +20 -20
@@ -0,0 +1,1522 @@
1
+ import { ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewContainerRef, inject } from '@angular/core';
2
+ import { FORM_PLACEMENT_SLOTS, DefaultSlotFor, HasDetailsTab, TargetRailItem, ReplaceableRailTabs, DefaultRailKeyFor, ChosenFieldNames, DefaultFieldSectionKey, FieldsInSection, ReplacedPreviewKeys, SectionsWithFields, ShowsRail, SlotIsOnForm, InitialPlacementState, ChosenSectionKeys, ResolvePlacementDecision, } from './form-placement';
3
+ import { DescribeChosenFields, DescribePlacementLine, DescribeVisibleTo, SectionOptionLabel, SummarizePlacement, } from './form-placement-text';
4
+ import { MovedSortKey, PanelsInPosition } from './form-placement-order';
5
+ import { FormSlotProbeService } from './form-slot-probe.service';
6
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/common";
9
+ import * as i2 from "@angular/forms";
10
+ import * as i3 from "@memberjunction/ng-ui-components";
11
+ import * as i4 from "./form-placement-preview.component";
12
+ const _c0 = a0 => ({ $implicit: a0 });
13
+ const _forTrack0 = ($index, $item) => $item.Slot;
14
+ const _forTrack1 = ($index, $item) => $item.Key;
15
+ const _forTrack2 = ($index, $item) => $item.Entity + $item.JoinField;
16
+ const _forTrack3 = ($index, $item) => $item.Name;
17
+ function MjFormPlacementDialogComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelementStart(0, "div", 8);
19
+ i0.ɵɵelement(1, "i", 17);
20
+ i0.ɵɵelementStart(2, "span");
21
+ i0.ɵɵtext(3);
22
+ i0.ɵɵelementEnd()();
23
+ } if (rf & 2) {
24
+ const ctx_r0 = i0.ɵɵnextContext();
25
+ i0.ɵɵadvance(3);
26
+ i0.ɵɵtextInterpolate1("Suggested as a ", ctx_r0.Proposal.presentation === "bare" ? "bare strip" : "panel", ". Where it goes is yours to choose \u2014 nothing is saved until you apply.");
27
+ } }
28
+ function MjFormPlacementDialogComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
29
+ i0.ɵɵelementStart(0, "mj-alert", 9);
30
+ i0.ɵɵtext(1);
31
+ i0.ɵɵelementEnd();
32
+ } if (rf & 2) {
33
+ const ctx_r0 = i0.ɵɵnextContext();
34
+ i0.ɵɵadvance();
35
+ i0.ɵɵtextInterpolate1(" A full custom form is rendering ", ctx_r0.Context.EntityName, ". It draws its own body, so a panel saved here will not appear until that form is turned off. ");
36
+ } }
37
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_12_Template(rf, ctx) { if (rf & 1) {
38
+ const _r3 = i0.ɵɵgetCurrentView();
39
+ i0.ɵɵelementStart(0, "button", 31);
40
+ i0.ɵɵlistener("click", function MjFormPlacementDialogComponent_Conditional_9_Conditional_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ClearReplacement()); });
41
+ i0.ɵɵtext(1, "Replace nothing");
42
+ i0.ɵɵelementEnd();
43
+ } }
44
+ function MjFormPlacementDialogComponent_Conditional_9_For_16_Template(rf, ctx) { if (rf & 1) {
45
+ i0.ɵɵelementStart(0, "option", 28);
46
+ i0.ɵɵtext(1);
47
+ i0.ɵɵelementEnd();
48
+ } if (rf & 2) {
49
+ const choice_r4 = ctx.$implicit;
50
+ i0.ɵɵproperty("value", choice_r4.Slot);
51
+ i0.ɵɵadvance();
52
+ i0.ɵɵtextInterpolate(choice_r4.Name);
53
+ } }
54
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_17_For_2_Template(rf, ctx) { if (rf & 1) {
55
+ i0.ɵɵelementStart(0, "option", 28);
56
+ i0.ɵɵtext(1);
57
+ i0.ɵɵelementEnd();
58
+ i0.ɵɵelementStart(2, "option", 28);
59
+ i0.ɵɵtext(3);
60
+ i0.ɵɵelementEnd();
61
+ } if (rf & 2) {
62
+ const section_r5 = ctx.$implicit;
63
+ i0.ɵɵproperty("value", "in:" + section_r5.Key + ":start");
64
+ i0.ɵɵadvance();
65
+ i0.ɵɵtextInterpolate1("Top of ", section_r5.Title);
66
+ i0.ɵɵadvance();
67
+ i0.ɵɵproperty("value", "in:" + section_r5.Key + ":end");
68
+ i0.ɵɵadvance();
69
+ i0.ɵɵtextInterpolate1("Bottom of ", section_r5.Title);
70
+ } }
71
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_17_Template(rf, ctx) { if (rf & 1) {
72
+ i0.ɵɵelementStart(0, "optgroup", 29);
73
+ i0.ɵɵrepeaterCreate(1, MjFormPlacementDialogComponent_Conditional_9_Conditional_17_For_2_Template, 4, 4, null, null, _forTrack1);
74
+ i0.ɵɵelementEnd();
75
+ } if (rf & 2) {
76
+ const ctx_r0 = i0.ɵɵnextContext(2);
77
+ i0.ɵɵadvance();
78
+ i0.ɵɵrepeater(ctx_r0.PlaceableSections);
79
+ } }
80
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_18_Template(rf, ctx) { if (rf & 1) {
81
+ i0.ɵɵelementStart(0, "p", 19);
82
+ i0.ɵɵtext(1, "The position is used only when the panel replaces nothing.");
83
+ i0.ɵɵelementEnd();
84
+ } }
85
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
86
+ const _r6 = i0.ɵɵgetCurrentView();
87
+ i0.ɵɵelementStart(0, "span", 37)(1, "button", 38);
88
+ i0.ɵɵlistener("click", function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Conditional_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.MoveInPosition("up")); });
89
+ i0.ɵɵelement(2, "i", 39);
90
+ i0.ɵɵelementEnd();
91
+ i0.ɵɵelementStart(3, "button", 40);
92
+ i0.ɵɵlistener("click", function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Conditional_3_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.MoveInPosition("down")); });
93
+ i0.ɵɵelement(4, "i", 41);
94
+ i0.ɵɵelementEnd()();
95
+ } if (rf & 2) {
96
+ const ctx_r0 = i0.ɵɵnextContext(4);
97
+ i0.ɵɵadvance();
98
+ i0.ɵɵproperty("disabled", !ctx_r0.CanMoveUp);
99
+ i0.ɵɵadvance(2);
100
+ i0.ɵɵproperty("disabled", !ctx_r0.CanMoveDown);
101
+ } }
102
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Template(rf, ctx) { if (rf & 1) {
103
+ i0.ɵɵelementStart(0, "li", 35)(1, "span", 36);
104
+ i0.ɵɵtext(2);
105
+ i0.ɵɵelementEnd();
106
+ i0.ɵɵconditionalCreate(3, MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Conditional_3_Template, 5, 2, "span", 37);
107
+ i0.ɵɵelementEnd();
108
+ } if (rf & 2) {
109
+ const item_r7 = ctx.$implicit;
110
+ i0.ɵɵclassProp("is-this", item_r7.IsThis);
111
+ i0.ɵɵadvance(2);
112
+ i0.ɵɵtextInterpolate(item_r7.Title);
113
+ i0.ɵɵadvance();
114
+ i0.ɵɵconditional(item_r7.IsThis ? 3 : -1);
115
+ } }
116
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_Conditional_5_Template(rf, ctx) { if (rf & 1) {
117
+ i0.ɵɵelementStart(0, "p", 19);
118
+ i0.ɵɵtext(1, " Two neighbouring panels share an order number, so this one cannot go between them. Move one of them first. ");
119
+ i0.ɵɵelementEnd();
120
+ } }
121
+ function MjFormPlacementDialogComponent_Conditional_9_Conditional_19_Template(rf, ctx) { if (rf & 1) {
122
+ i0.ɵɵelementStart(0, "div", 32);
123
+ i0.ɵɵtext(1, "Order in this position");
124
+ i0.ɵɵelementEnd();
125
+ i0.ɵɵelementStart(2, "ol", 33);
126
+ i0.ɵɵrepeaterCreate(3, MjFormPlacementDialogComponent_Conditional_9_Conditional_19_For_4_Template, 4, 4, "li", 34, _forTrack1);
127
+ i0.ɵɵelementEnd();
128
+ i0.ɵɵconditionalCreate(5, MjFormPlacementDialogComponent_Conditional_9_Conditional_19_Conditional_5_Template, 2, 0, "p", 19);
129
+ } if (rf & 2) {
130
+ const ctx_r0 = i0.ɵɵnextContext(2);
131
+ i0.ɵɵadvance(3);
132
+ i0.ɵɵrepeater(ctx_r0.OrderItems);
133
+ i0.ɵɵadvance(2);
134
+ i0.ɵɵconditional(ctx_r0.MoveIsBlocked ? 5 : -1);
135
+ } }
136
+ function MjFormPlacementDialogComponent_Conditional_9_ng_container_20_Template(rf, ctx) { if (rf & 1) {
137
+ i0.ɵɵelementContainer(0);
138
+ } }
139
+ function MjFormPlacementDialogComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
140
+ const _r2 = i0.ɵɵgetCurrentView();
141
+ i0.ɵɵelementStart(0, "div", 10)(1, "div", 18)(2, "p", 19);
142
+ i0.ɵɵtext(3, " The form as it will look, with your panel on it. Make your choices on the right. ");
143
+ i0.ɵɵelementEnd();
144
+ i0.ɵɵelementStart(4, "mj-form-placement-preview", 20);
145
+ i0.ɵɵlistener("Failed", function MjFormPlacementDialogComponent_Conditional_9_Template_mj_form_placement_preview_Failed_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnPreviewFailed()); });
146
+ i0.ɵɵelementEnd()();
147
+ i0.ɵɵelementStart(5, "div", 21)(6, "section")(7, "div", 22);
148
+ i0.ɵɵtext(8, "Where it goes");
149
+ i0.ɵɵelementEnd();
150
+ i0.ɵɵelementStart(9, "div", 23)(10, "span", 24);
151
+ i0.ɵɵtext(11);
152
+ i0.ɵɵelementEnd();
153
+ i0.ɵɵconditionalCreate(12, MjFormPlacementDialogComponent_Conditional_9_Conditional_12_Template, 2, 0, "button", 25);
154
+ i0.ɵɵelementEnd();
155
+ i0.ɵɵelementStart(13, "select", 26);
156
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_Conditional_9_Template_select_ngModelChange_13_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.PositionValue, $event) || (ctx_r0.PositionValue = $event); return i0.ɵɵresetView($event); });
157
+ i0.ɵɵelementStart(14, "optgroup", 27);
158
+ i0.ɵɵrepeaterCreate(15, MjFormPlacementDialogComponent_Conditional_9_For_16_Template, 2, 2, "option", 28, _forTrack0);
159
+ i0.ɵɵelementEnd();
160
+ i0.ɵɵconditionalCreate(17, MjFormPlacementDialogComponent_Conditional_9_Conditional_17_Template, 3, 0, "optgroup", 29);
161
+ i0.ɵɵelementEnd();
162
+ i0.ɵɵconditionalCreate(18, MjFormPlacementDialogComponent_Conditional_9_Conditional_18_Template, 2, 0, "p", 19);
163
+ i0.ɵɵconditionalCreate(19, MjFormPlacementDialogComponent_Conditional_9_Conditional_19_Template, 6, 1);
164
+ i0.ɵɵelementEnd();
165
+ i0.ɵɵtemplate(20, MjFormPlacementDialogComponent_Conditional_9_ng_container_20_Template, 1, 0, "ng-container", 30);
166
+ i0.ɵɵelementEnd()();
167
+ } if (rf & 2) {
168
+ const ctx_r0 = i0.ɵɵnextContext();
169
+ const settings_r8 = i0.ɵɵreference(24);
170
+ i0.ɵɵadvance(4);
171
+ i0.ɵɵproperty("Provider", ctx_r0.Provider)("EntityName", ctx_r0.Context.EntityName)("RecordKey", ctx_r0.RecordKey)("Spec", ctx_r0.PreviewSpec)("ReplacesRowID", ctx_r0.ReplacesRowID)("PanelComponentSpec", ctx_r0.PanelComponentSpec)("PanelComponentID", ctx_r0.PanelComponentID);
172
+ i0.ɵɵadvance(7);
173
+ i0.ɵɵtextInterpolate(ctx_r0.PlacementLine);
174
+ i0.ɵɵadvance();
175
+ i0.ɵɵconditional(ctx_r0.IsReplacing ? 12 : -1);
176
+ i0.ɵɵadvance();
177
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.PositionValue);
178
+ i0.ɵɵadvance(2);
179
+ i0.ɵɵrepeater(ctx_r0.Slots);
180
+ i0.ɵɵadvance(2);
181
+ i0.ɵɵconditional(ctx_r0.PlaceableSections.length > 0 ? 17 : -1);
182
+ i0.ɵɵadvance();
183
+ i0.ɵɵconditional(ctx_r0.IsReplacing ? 18 : -1);
184
+ i0.ɵɵadvance();
185
+ i0.ɵɵconditional(ctx_r0.OrderItems.length > 0 ? 19 : -1);
186
+ i0.ɵɵadvance();
187
+ i0.ɵɵproperty("ngTemplateOutlet", settings_r8);
188
+ } }
189
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_9_Template(rf, ctx) { if (rf & 1) {
190
+ i0.ɵɵelementStart(0, "p", 19);
191
+ i0.ɵɵtext(1, "Reading the positions this form offers\u2026");
192
+ i0.ɵɵelementEnd();
193
+ } }
194
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_10_Template(rf, ctx) { if (rf & 1) {
195
+ i0.ɵɵelementStart(0, "p", 19);
196
+ i0.ɵɵtext(1, " Positions shown are the ones generated forms offer. This form could not be read, so a hand-written custom template may differ. ");
197
+ i0.ɵɵelementEnd();
198
+ } }
199
+ function MjFormPlacementDialogComponent_Conditional_10_For_12_ng_container_0_Template(rf, ctx) { if (rf & 1) {
200
+ i0.ɵɵelementContainer(0);
201
+ } }
202
+ function MjFormPlacementDialogComponent_Conditional_10_For_12_Template(rf, ctx) { if (rf & 1) {
203
+ i0.ɵɵtemplate(0, MjFormPlacementDialogComponent_Conditional_10_For_12_ng_container_0_Template, 1, 0, "ng-container", 47);
204
+ } if (rf & 2) {
205
+ const choice_r9 = ctx.$implicit;
206
+ i0.ɵɵnextContext(2);
207
+ const slotRow_r10 = i0.ɵɵreference(20);
208
+ i0.ɵɵproperty("ngTemplateOutlet", slotRow_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, choice_r9));
209
+ } }
210
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Conditional_5_ng_container_0_Template(rf, ctx) { if (rf & 1) {
211
+ i0.ɵɵelementContainer(0);
212
+ } }
213
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Conditional_5_Template(rf, ctx) { if (rf & 1) {
214
+ i0.ɵɵtemplate(0, MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Conditional_5_ng_container_0_Template, 1, 0, "ng-container", 30);
215
+ } if (rf & 2) {
216
+ i0.ɵɵnextContext(4);
217
+ const fieldPanelCard_r11 = i0.ɵɵreference(22);
218
+ i0.ɵɵproperty("ngTemplateOutlet", fieldPanelCard_r11);
219
+ } }
220
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Template(rf, ctx) { if (rf & 1) {
221
+ i0.ɵɵelementStart(0, "div", 53)(1, "span", 54);
222
+ i0.ɵɵtext(2);
223
+ i0.ɵɵelementEnd();
224
+ i0.ɵɵelementStart(3, "span", 55);
225
+ i0.ɵɵtext(4);
226
+ i0.ɵɵelementEnd()();
227
+ i0.ɵɵconditionalCreate(5, MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Conditional_5_Template, 1, 1, "ng-container");
228
+ } if (rf & 2) {
229
+ const section_r12 = ctx.$implicit;
230
+ const ctx_r0 = i0.ɵɵnextContext(3);
231
+ i0.ɵɵclassProp("is-replaced", ctx_r0.IsReplaced(section_r12.Key));
232
+ i0.ɵɵadvance(2);
233
+ i0.ɵɵtextInterpolate(section_r12.Title);
234
+ i0.ɵɵadvance(2);
235
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.IsReplaced(section_r12.Key) ? "replaced" : "field group", " ");
236
+ i0.ɵɵadvance();
237
+ i0.ɵɵconditional(ctx_r0.HostsFieldPanel(section_r12.Key) ? 5 : -1);
238
+ } }
239
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_13_Template(rf, ctx) { if (rf & 1) {
240
+ i0.ɵɵelementStart(0, "div", 48)(1, "div", 49);
241
+ i0.ɵɵelement(2, "i", 50);
242
+ i0.ɵɵelementStart(3, "span", 51);
243
+ i0.ɵɵtext(4, "Details");
244
+ i0.ɵɵelementEnd();
245
+ i0.ɵɵelementStart(5, "span", 52);
246
+ i0.ɵɵtext(6);
247
+ i0.ɵɵelementEnd()();
248
+ i0.ɵɵrepeaterCreate(7, MjFormPlacementDialogComponent_Conditional_10_Conditional_13_For_8_Template, 6, 5, null, null, _forTrack1);
249
+ i0.ɵɵelementEnd();
250
+ } if (rf & 2) {
251
+ const ctx_r0 = i0.ɵɵnextContext(2);
252
+ i0.ɵɵclassProp("is-replaced", ctx_r0.IsWholeDetailsTabReplaced);
253
+ i0.ɵɵadvance(6);
254
+ i0.ɵɵtextInterpolate1("one rail tab \u00B7 ", ctx_r0.DetailsTabSectionCount, " field groups");
255
+ i0.ɵɵadvance();
256
+ i0.ɵɵrepeater(ctx_r0.Context.Sections);
257
+ } }
258
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Conditional_5_ng_container_0_Template(rf, ctx) { if (rf & 1) {
259
+ i0.ɵɵelementContainer(0);
260
+ } }
261
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
262
+ i0.ɵɵtemplate(0, MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Conditional_5_ng_container_0_Template, 1, 0, "ng-container", 30);
263
+ } if (rf & 2) {
264
+ i0.ɵɵnextContext(4);
265
+ const fieldPanelCard_r11 = i0.ɵɵreference(22);
266
+ i0.ɵɵproperty("ngTemplateOutlet", fieldPanelCard_r11);
267
+ } }
268
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Template(rf, ctx) { if (rf & 1) {
269
+ i0.ɵɵelementStart(0, "div", 56)(1, "span", 54);
270
+ i0.ɵɵtext(2);
271
+ i0.ɵɵelementEnd();
272
+ i0.ɵɵelementStart(3, "span", 55);
273
+ i0.ɵɵtext(4);
274
+ i0.ɵɵelementEnd()();
275
+ i0.ɵɵconditionalCreate(5, MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Conditional_5_Template, 1, 1, "ng-container");
276
+ } if (rf & 2) {
277
+ const section_r13 = ctx.$implicit;
278
+ const ctx_r0 = i0.ɵɵnextContext(3);
279
+ i0.ɵɵclassProp("is-replaced", ctx_r0.IsReplaced(section_r13.Key));
280
+ i0.ɵɵadvance(2);
281
+ i0.ɵɵtextInterpolate(section_r13.Title);
282
+ i0.ɵɵadvance(2);
283
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.IsReplaced(section_r13.Key) ? "replaced" : "field group", " ");
284
+ i0.ɵɵadvance();
285
+ i0.ɵɵconditional(ctx_r0.HostsFieldPanel(section_r13.Key) ? 5 : -1);
286
+ } }
287
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_14_Template(rf, ctx) { if (rf & 1) {
288
+ i0.ɵɵrepeaterCreate(0, MjFormPlacementDialogComponent_Conditional_10_Conditional_14_For_1_Template, 6, 5, null, null, _forTrack1);
289
+ } if (rf & 2) {
290
+ const ctx_r0 = i0.ɵɵnextContext(2);
291
+ i0.ɵɵrepeater(ctx_r0.Context.Sections);
292
+ } }
293
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_15_ng_container_0_Template(rf, ctx) { if (rf & 1) {
294
+ i0.ɵɵelementContainer(0);
295
+ } }
296
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_15_Template(rf, ctx) { if (rf & 1) {
297
+ i0.ɵɵtemplate(0, MjFormPlacementDialogComponent_Conditional_10_Conditional_15_ng_container_0_Template, 1, 0, "ng-container", 47);
298
+ } if (rf & 2) {
299
+ const ctx_r0 = i0.ɵɵnextContext(2);
300
+ const slotRow_r10 = i0.ɵɵreference(20);
301
+ i0.ɵɵproperty("ngTemplateOutlet", slotRow_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, ctx_r0.SlotAfterFields));
302
+ } }
303
+ function MjFormPlacementDialogComponent_Conditional_10_For_17_Template(rf, ctx) { if (rf & 1) {
304
+ i0.ɵɵelementStart(0, "div", 56)(1, "span", 54);
305
+ i0.ɵɵtext(2);
306
+ i0.ɵɵelementEnd();
307
+ i0.ɵɵelementStart(3, "span", 55);
308
+ i0.ɵɵtext(4);
309
+ i0.ɵɵelementEnd()();
310
+ } if (rf & 2) {
311
+ const related_r14 = ctx.$implicit;
312
+ const ɵ$index_179_r15 = ctx.$index;
313
+ const ctx_r0 = i0.ɵɵnextContext(2);
314
+ i0.ɵɵclassProp("is-replaced", ctx_r0.IsRelatedReplaced(ɵ$index_179_r15));
315
+ i0.ɵɵadvance(2);
316
+ i0.ɵɵtextInterpolate(related_r14.DisplayName);
317
+ i0.ɵɵadvance(2);
318
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.IsRelatedReplaced(ɵ$index_179_r15) ? "replaced" : "auto grid", " ");
319
+ } }
320
+ function MjFormPlacementDialogComponent_Conditional_10_For_19_ng_container_0_Template(rf, ctx) { if (rf & 1) {
321
+ i0.ɵɵelementContainer(0);
322
+ } }
323
+ function MjFormPlacementDialogComponent_Conditional_10_For_19_Template(rf, ctx) { if (rf & 1) {
324
+ i0.ɵɵtemplate(0, MjFormPlacementDialogComponent_Conditional_10_For_19_ng_container_0_Template, 1, 0, "ng-container", 47);
325
+ } if (rf & 2) {
326
+ const choice_r16 = ctx.$implicit;
327
+ i0.ɵɵnextContext(2);
328
+ const slotRow_r10 = i0.ɵɵreference(20);
329
+ i0.ɵɵproperty("ngTemplateOutlet", slotRow_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, choice_r16));
330
+ } }
331
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_1_Template(rf, ctx) { if (rf & 1) {
332
+ i0.ɵɵtext(0, " Your panel gets a rail item of its own. ");
333
+ } }
334
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_2_Template(rf, ctx) { if (rf & 1) {
335
+ i0.ɵɵtext(0, " Your panel appears under ");
336
+ i0.ɵɵelementStart(1, "strong");
337
+ i0.ɵɵtext(2);
338
+ i0.ɵɵelementEnd();
339
+ i0.ɵɵtext(3, " in the rail. ");
340
+ } if (rf & 2) {
341
+ const ctx_r0 = i0.ɵɵnextContext(3);
342
+ i0.ɵɵadvance(2);
343
+ i0.ɵɵtextInterpolate(ctx_r0.TargetRail.Title);
344
+ } }
345
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_3_Template(rf, ctx) { if (rf & 1) {
346
+ i0.ɵɵtext(0, " A bare strip has no rail item. It sits above every section. ");
347
+ } }
348
+ function MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Template(rf, ctx) { if (rf & 1) {
349
+ i0.ɵɵelementStart(0, "p", 45);
350
+ i0.ɵɵconditionalCreate(1, MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_1_Template, 1, 0)(2, MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_2_Template, 4, 1)(3, MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Conditional_3_Template, 1, 0);
351
+ i0.ɵɵelementEnd();
352
+ } if (rf & 2) {
353
+ const ctx_r0 = i0.ɵɵnextContext(2);
354
+ i0.ɵɵadvance();
355
+ i0.ɵɵconditional(ctx_r0.AddsRailItem ? 1 : ctx_r0.TargetRail ? 2 : 3);
356
+ } }
357
+ function MjFormPlacementDialogComponent_Conditional_10_ng_container_22_Template(rf, ctx) { if (rf & 1) {
358
+ i0.ɵɵelementContainer(0);
359
+ } }
360
+ function MjFormPlacementDialogComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
361
+ i0.ɵɵelementStart(0, "div", 11)(1, "div", 42)(2, "div", 22);
362
+ i0.ɵɵtext(3, "Where it goes");
363
+ i0.ɵɵelementEnd();
364
+ i0.ɵɵelementStart(4, "p", 19);
365
+ i0.ɵɵtext(5, " The ");
366
+ i0.ɵɵelementStart(6, "strong");
367
+ i0.ɵɵtext(7);
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵtext(8, " form as it will look. Pick one of the positions between the blocks that are already there. ");
370
+ i0.ɵɵelementEnd();
371
+ i0.ɵɵconditionalCreate(9, MjFormPlacementDialogComponent_Conditional_10_Conditional_9_Template, 2, 0, "p", 19)(10, MjFormPlacementDialogComponent_Conditional_10_Conditional_10_Template, 2, 0, "p", 19);
372
+ i0.ɵɵrepeaterCreate(11, MjFormPlacementDialogComponent_Conditional_10_For_12_Template, 1, 4, "ng-container", null, _forTrack0);
373
+ i0.ɵɵconditionalCreate(13, MjFormPlacementDialogComponent_Conditional_10_Conditional_13_Template, 9, 3, "div", 43)(14, MjFormPlacementDialogComponent_Conditional_10_Conditional_14_Template, 2, 0);
374
+ i0.ɵɵconditionalCreate(15, MjFormPlacementDialogComponent_Conditional_10_Conditional_15_Template, 1, 4, "ng-container");
375
+ i0.ɵɵrepeaterCreate(16, MjFormPlacementDialogComponent_Conditional_10_For_17_Template, 5, 4, "div", 44, _forTrack2);
376
+ i0.ɵɵrepeaterCreate(18, MjFormPlacementDialogComponent_Conditional_10_For_19_Template, 1, 4, "ng-container", null, _forTrack0);
377
+ i0.ɵɵconditionalCreate(20, MjFormPlacementDialogComponent_Conditional_10_Conditional_20_Template, 4, 1, "p", 45);
378
+ i0.ɵɵelementEnd();
379
+ i0.ɵɵelementStart(21, "div", 46);
380
+ i0.ɵɵtemplate(22, MjFormPlacementDialogComponent_Conditional_10_ng_container_22_Template, 1, 0, "ng-container", 30);
381
+ i0.ɵɵelementEnd()();
382
+ } if (rf & 2) {
383
+ const ctx_r0 = i0.ɵɵnextContext();
384
+ const settings_r8 = i0.ɵɵreference(24);
385
+ i0.ɵɵadvance(7);
386
+ i0.ɵɵtextInterpolate(ctx_r0.Context.EntityName);
387
+ i0.ɵɵadvance(2);
388
+ i0.ɵɵconditional(ctx_r0.Probing ? 9 : ctx_r0.SlotsAreAssumed ? 10 : -1);
389
+ i0.ɵɵadvance(2);
390
+ i0.ɵɵrepeater(ctx_r0.SlotsAbove);
391
+ i0.ɵɵadvance(2);
392
+ i0.ɵɵconditional(ctx_r0.SectionsAreInDetailsTab ? 13 : 14);
393
+ i0.ɵɵadvance(2);
394
+ i0.ɵɵconditional(ctx_r0.SlotAfterFields ? 15 : -1);
395
+ i0.ɵɵadvance();
396
+ i0.ɵɵrepeater(ctx_r0.Context.Related);
397
+ i0.ɵɵadvance(2);
398
+ i0.ɵɵrepeater(ctx_r0.SlotsBelow);
399
+ i0.ɵɵadvance(2);
400
+ i0.ɵɵconditional(ctx_r0.HasRail ? 20 : -1);
401
+ i0.ɵɵadvance(2);
402
+ i0.ɵɵproperty("ngTemplateOutlet", settings_r8);
403
+ } }
404
+ function MjFormPlacementDialogComponent_ng_template_19_Conditional_10_Template(rf, ctx) { if (rf & 1) {
405
+ i0.ɵɵelementStart(0, "div", 64)(1, "span", 65);
406
+ i0.ɵɵtext(2);
407
+ i0.ɵɵelementEnd();
408
+ i0.ɵɵelementStart(3, "span", 66);
409
+ i0.ɵɵtext(4, "Your panel lands here");
410
+ i0.ɵɵelementEnd()();
411
+ } if (rf & 2) {
412
+ const ctx_r0 = i0.ɵɵnextContext(2);
413
+ i0.ɵɵadvance(2);
414
+ i0.ɵɵtextInterpolate(ctx_r0.State.Title || ctx_r0.ComponentName || "Your panel");
415
+ } }
416
+ function MjFormPlacementDialogComponent_ng_template_19_Template(rf, ctx) { if (rf & 1) {
417
+ const _r17 = i0.ɵɵgetCurrentView();
418
+ i0.ɵɵelementStart(0, "div", 57)(1, "label", 58)(2, "input", 59);
419
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_19_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.Slot, $event) || (ctx_r0.State.Slot = $event); return i0.ɵɵresetView($event); });
420
+ i0.ɵɵelementEnd();
421
+ i0.ɵɵelement(3, "span", 60);
422
+ i0.ɵɵelementStart(4, "span", 61)(5, "span", 62);
423
+ i0.ɵɵtext(6);
424
+ i0.ɵɵelementEnd();
425
+ i0.ɵɵelementStart(7, "span", 63);
426
+ i0.ɵɵtext(8);
427
+ i0.ɵɵelementEnd()();
428
+ i0.ɵɵelement(9, "span", 60);
429
+ i0.ɵɵelementEnd();
430
+ i0.ɵɵconditionalCreate(10, MjFormPlacementDialogComponent_ng_template_19_Conditional_10_Template, 5, 1, "div", 64);
431
+ i0.ɵɵelementEnd();
432
+ } if (rf & 2) {
433
+ const choice_r18 = ctx.$implicit;
434
+ const ctx_r0 = i0.ɵɵnextContext();
435
+ i0.ɵɵclassProp("is-on", ctx_r0.State.Slot === choice_r18.Slot);
436
+ i0.ɵɵadvance(2);
437
+ i0.ɵɵproperty("value", choice_r18.Slot);
438
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.Slot);
439
+ i0.ɵɵadvance(4);
440
+ i0.ɵɵtextInterpolate(choice_r18.Name);
441
+ i0.ɵɵadvance(2);
442
+ i0.ɵɵtextInterpolate(choice_r18.Label);
443
+ i0.ɵɵadvance(2);
444
+ i0.ɵɵconditional(ctx_r0.State.Slot === choice_r18.Slot ? 10 : -1);
445
+ } }
446
+ function MjFormPlacementDialogComponent_ng_template_21_Template(rf, ctx) { if (rf & 1) {
447
+ i0.ɵɵelementStart(0, "div", 67)(1, "span", 65);
448
+ i0.ɵɵtext(2);
449
+ i0.ɵɵelementEnd();
450
+ i0.ɵɵelementStart(3, "span", 66);
451
+ i0.ɵɵtext(4);
452
+ i0.ɵɵelementEnd()();
453
+ } if (rf & 2) {
454
+ const ctx_r0 = i0.ɵɵnextContext();
455
+ i0.ɵɵadvance(2);
456
+ i0.ɵɵtextInterpolate(ctx_r0.State.Title || ctx_r0.ComponentName || "Your panel");
457
+ i0.ɵɵadvance(2);
458
+ i0.ɵɵtextInterpolate1(" at the top of this section, in place of ", ctx_r0.ChosenFieldSummary, " ");
459
+ } }
460
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Conditional_9_Template(rf, ctx) { if (rf & 1) {
461
+ i0.ɵɵelementStart(0, "p", 75);
462
+ i0.ɵɵtext(1, "A panel with no label shows an empty header and an unnamed rail item.");
463
+ i0.ɵɵelementEnd();
464
+ } }
465
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Template(rf, ctx) { if (rf & 1) {
466
+ const _r20 = i0.ɵɵgetCurrentView();
467
+ i0.ɵɵelementStart(0, "div", 94)(1, "div", 95)(2, "label", 96);
468
+ i0.ɵɵtext(3, "Header and rail label");
469
+ i0.ɵɵelementEnd();
470
+ i0.ɵɵelementStart(4, "input", 97);
471
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.Title, $event) || (ctx_r0.State.Title = $event); return i0.ɵɵresetView($event); });
472
+ i0.ɵɵelementEnd()();
473
+ i0.ɵɵelementStart(5, "div", 98)(6, "label", 99);
474
+ i0.ɵɵtext(7, "Icon");
475
+ i0.ɵɵelementEnd();
476
+ i0.ɵɵelementStart(8, "mj-icon-picker", 100);
477
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Template_mj_icon_picker_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.Icon, $event) || (ctx_r0.State.Icon = $event); return i0.ɵɵresetView($event); });
478
+ i0.ɵɵelementEnd()()();
479
+ i0.ɵɵconditionalCreate(9, MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Conditional_9_Template, 2, 0, "p", 75);
480
+ } if (rf & 2) {
481
+ const ctx_r0 = i0.ɵɵnextContext(2);
482
+ i0.ɵɵadvance(4);
483
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.Title);
484
+ i0.ɵɵadvance(4);
485
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.Icon);
486
+ i0.ɵɵadvance();
487
+ i0.ɵɵconditional(!ctx_r0.HasTitle ? 9 : -1);
488
+ } }
489
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_27_Template(rf, ctx) { if (rf & 1) {
490
+ i0.ɵɵelementStart(0, "p", 75);
491
+ i0.ɵɵtext(1, "A bare strip has no rail item. On a form with a side rail it stays above every section rather than belonging to one.");
492
+ i0.ɵɵelementEnd();
493
+ } }
494
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_28_Template(rf, ctx) { if (rf & 1) {
495
+ i0.ɵɵelementStart(0, "p", 19);
496
+ i0.ɵɵtext(1, "A bare strip that replaces blocks takes their place, in their tab.");
497
+ i0.ɵɵelementEnd();
498
+ } }
499
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_37_For_10_Template(rf, ctx) { if (rf & 1) {
500
+ i0.ɵɵelementStart(0, "option", 28);
501
+ i0.ɵɵtext(1);
502
+ i0.ɵɵelementEnd();
503
+ } if (rf & 2) {
504
+ const tab_r22 = ctx.$implicit;
505
+ i0.ɵɵproperty("value", tab_r22.Key);
506
+ i0.ɵɵadvance();
507
+ i0.ɵɵtextInterpolate(tab_r22.Title);
508
+ } }
509
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_37_Template(rf, ctx) { if (rf & 1) {
510
+ const _r21 = i0.ɵɵgetCurrentView();
511
+ i0.ɵɵelementStart(0, "label", 77)(1, "input", 101);
512
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_37_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
513
+ i0.ɵɵelementEnd();
514
+ i0.ɵɵelementStart(2, "span", 79);
515
+ i0.ɵɵtext(3, " Replace a ");
516
+ i0.ɵɵelementStart(4, "strong");
517
+ i0.ɵɵtext(5, "whole tab");
518
+ i0.ɵɵelementEnd();
519
+ i0.ɵɵelementStart(6, "span", 85);
520
+ i0.ɵɵtext(7);
521
+ i0.ɵɵelementEnd()();
522
+ i0.ɵɵelementStart(8, "select", 102);
523
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_37_Template_select_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceRailKey, $event) || (ctx_r0.State.ReplaceRailKey = $event); return i0.ɵɵresetView($event); });
524
+ i0.ɵɵrepeaterCreate(9, MjFormPlacementDialogComponent_ng_template_23_Conditional_37_For_10_Template, 2, 2, "option", 28, _forTrack1);
525
+ i0.ɵɵelementEnd()();
526
+ } if (rf & 2) {
527
+ const ctx_r0 = i0.ɵɵnextContext(2);
528
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "rail-tab");
529
+ i0.ɵɵadvance();
530
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
531
+ i0.ɵɵadvance(6);
532
+ i0.ɵɵtextInterpolate1("all ", ctx_r0.ChosenRailTabSize, " blocks in it go and your panel becomes the tab");
533
+ i0.ɵɵadvance();
534
+ i0.ɵɵproperty("disabled", ctx_r0.State.ReplaceMode !== "rail-tab");
535
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceRailKey);
536
+ i0.ɵɵadvance();
537
+ i0.ɵɵrepeater(ctx_r0.RailTabs);
538
+ } }
539
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_41_Template(rf, ctx) { if (rf & 1) {
540
+ i0.ɵɵtext(0, " Replace ");
541
+ i0.ɵɵelementStart(1, "strong");
542
+ i0.ɵɵtext(2, "blocks");
543
+ i0.ɵɵelementEnd();
544
+ i0.ɵɵtext(3, " inside the Details tab ");
545
+ i0.ɵɵelementStart(4, "span", 85);
546
+ i0.ɵɵtext(5, "the tab and the blocks you leave stay");
547
+ i0.ɵɵelementEnd();
548
+ } }
549
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_42_Template(rf, ctx) { if (rf & 1) {
550
+ i0.ɵɵtext(0, " Replace ");
551
+ i0.ɵɵelementStart(1, "strong");
552
+ i0.ɵɵtext(2, "field groups");
553
+ i0.ɵɵelementEnd();
554
+ } }
555
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_43_Template(rf, ctx) { if (rf & 1) {
556
+ i0.ɵɵelementStart(0, "span", 82);
557
+ i0.ɵɵtext(1, "from entity metadata \u2014 may not match this form");
558
+ i0.ɵɵelementEnd();
559
+ } }
560
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_44_For_5_Template(rf, ctx) { if (rf & 1) {
561
+ const _r23 = i0.ɵɵgetCurrentView();
562
+ i0.ɵɵelementStart(0, "label", 106)(1, "input", 107);
563
+ i0.ɵɵlistener("change", function MjFormPlacementDialogComponent_ng_template_23_Conditional_44_For_5_Template_input_change_1_listener($event) { const section_r24 = i0.ɵɵrestoreView(_r23).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ToggleSection(section_r24.Key, $event.target.checked)); });
564
+ i0.ɵɵelementEnd();
565
+ i0.ɵɵelementStart(2, "span", 108);
566
+ i0.ɵɵtext(3);
567
+ i0.ɵɵelementEnd()();
568
+ } if (rf & 2) {
569
+ const section_r24 = ctx.$implicit;
570
+ const ctx_r0 = i0.ɵɵnextContext(3);
571
+ i0.ɵɵclassProp("is-on", ctx_r0.IsSectionChosen(section_r24.Key));
572
+ i0.ɵɵadvance();
573
+ i0.ɵɵproperty("checked", ctx_r0.IsSectionChosen(section_r24.Key));
574
+ i0.ɵɵadvance(2);
575
+ i0.ɵɵtextInterpolate(ctx_r0.SectionLabel(section_r24));
576
+ } }
577
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_44_Conditional_6_Template(rf, ctx) { if (rf & 1) {
578
+ i0.ɵɵelementStart(0, "p", 75);
579
+ i0.ɵɵtext(1, "Pick at least one block, or this panel stands in for nothing.");
580
+ i0.ɵɵelementEnd();
581
+ } }
582
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_44_Template(rf, ctx) { if (rf & 1) {
583
+ i0.ɵɵelementStart(0, "fieldset", 83)(1, "legend", 103);
584
+ i0.ɵɵtext(2, "Blocks your panel takes the place of");
585
+ i0.ɵɵelementEnd();
586
+ i0.ɵɵelementStart(3, "div", 104);
587
+ i0.ɵɵrepeaterCreate(4, MjFormPlacementDialogComponent_ng_template_23_Conditional_44_For_5_Template, 4, 4, "label", 105, _forTrack1);
588
+ i0.ɵɵelementEnd();
589
+ i0.ɵɵconditionalCreate(6, MjFormPlacementDialogComponent_ng_template_23_Conditional_44_Conditional_6_Template, 2, 0, "p", 75);
590
+ i0.ɵɵelementEnd();
591
+ } if (rf & 2) {
592
+ const ctx_r0 = i0.ɵɵnextContext(2);
593
+ i0.ɵɵadvance(4);
594
+ i0.ɵɵrepeater(ctx_r0.Context.Sections);
595
+ i0.ɵɵadvance(2);
596
+ i0.ɵɵconditional(ctx_r0.SectionClaimIsEmpty ? 6 : -1);
597
+ } }
598
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_54_Template(rf, ctx) { if (rf & 1) {
599
+ i0.ɵɵelementStart(0, "span", 82);
600
+ i0.ɵɵtext(1, "this form's fields could not be read");
601
+ i0.ɵɵelementEnd();
602
+ } }
603
+ function MjFormPlacementDialogComponent_ng_template_23_For_57_Template(rf, ctx) { if (rf & 1) {
604
+ i0.ɵɵelementStart(0, "option", 28);
605
+ i0.ɵɵtext(1);
606
+ i0.ɵɵelementEnd();
607
+ } if (rf & 2) {
608
+ const section_r25 = ctx.$implicit;
609
+ i0.ɵɵproperty("value", section_r25.Key);
610
+ i0.ɵɵadvance();
611
+ i0.ɵɵtextInterpolate(section_r25.Title);
612
+ } }
613
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_For_5_Template(rf, ctx) { if (rf & 1) {
614
+ const _r27 = i0.ɵɵgetCurrentView();
615
+ i0.ɵɵelementStart(0, "label", 106)(1, "input", 112);
616
+ i0.ɵɵlistener("change", function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_For_5_Template_input_change_1_listener($event) { const field_r28 = i0.ɵɵrestoreView(_r27).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ToggleField(field_r28.Name, $event.target.checked)); });
617
+ i0.ɵɵelementEnd();
618
+ i0.ɵɵelementStart(2, "span", 108);
619
+ i0.ɵɵtext(3);
620
+ i0.ɵɵelementEnd()();
621
+ } if (rf & 2) {
622
+ const field_r28 = ctx.$implicit;
623
+ const ctx_r0 = i0.ɵɵnextContext(3);
624
+ i0.ɵɵclassProp("is-on", ctx_r0.IsFieldChosen(field_r28.Name));
625
+ i0.ɵɵadvance();
626
+ i0.ɵɵproperty("checked", ctx_r0.IsFieldChosen(field_r28.Name));
627
+ i0.ɵɵadvance(2);
628
+ i0.ɵɵtextInterpolate(field_r28.Label);
629
+ } }
630
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Conditional_6_Template(rf, ctx) { if (rf & 1) {
631
+ i0.ɵɵelementStart(0, "p", 75);
632
+ i0.ɵɵtext(1, "Pick at least one field, or this panel stands in for nothing.");
633
+ i0.ɵɵelementEnd();
634
+ } }
635
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Template(rf, ctx) { if (rf & 1) {
636
+ const _r26 = i0.ɵɵgetCurrentView();
637
+ i0.ɵɵelementStart(0, "fieldset", 83)(1, "legend", 103);
638
+ i0.ɵɵtext(2, "Fields your panel takes the place of");
639
+ i0.ɵɵelementEnd();
640
+ i0.ɵɵelementStart(3, "div", 104);
641
+ i0.ɵɵrepeaterCreate(4, MjFormPlacementDialogComponent_ng_template_23_Conditional_58_For_5_Template, 4, 4, "label", 105, _forTrack3);
642
+ i0.ɵɵelementEnd();
643
+ i0.ɵɵconditionalCreate(6, MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Conditional_6_Template, 2, 0, "p", 75);
644
+ i0.ɵɵelementStart(7, "div", 109)(8, "label")(9, "input", 110);
645
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.SectionPosition, $event) || (ctx_r0.State.SectionPosition = $event); return i0.ɵɵresetView($event); });
646
+ i0.ɵɵelementEnd();
647
+ i0.ɵɵtext(10, " At the top of the group ");
648
+ i0.ɵɵelementEnd();
649
+ i0.ɵɵelementStart(11, "label")(12, "input", 111);
650
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.State.SectionPosition, $event) || (ctx_r0.State.SectionPosition = $event); return i0.ɵɵresetView($event); });
651
+ i0.ɵɵelementEnd();
652
+ i0.ɵɵtext(13, " At the bottom ");
653
+ i0.ɵɵelementEnd()()();
654
+ } if (rf & 2) {
655
+ const ctx_r0 = i0.ɵɵnextContext(2);
656
+ i0.ɵɵadvance(4);
657
+ i0.ɵɵrepeater(ctx_r0.FieldChoices);
658
+ i0.ɵɵadvance(2);
659
+ i0.ɵɵconditional(ctx_r0.FieldClaimIsEmpty ? 6 : -1);
660
+ i0.ɵɵadvance(3);
661
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.SectionPosition);
662
+ i0.ɵɵadvance(3);
663
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.SectionPosition);
664
+ } }
665
+ function MjFormPlacementDialogComponent_ng_template_23_For_67_Template(rf, ctx) { if (rf & 1) {
666
+ i0.ɵɵelementStart(0, "option", 89);
667
+ i0.ɵɵtext(1);
668
+ i0.ɵɵelementEnd();
669
+ } if (rf & 2) {
670
+ const related_r29 = ctx.$implicit;
671
+ const ɵ$index_485_r30 = ctx.$index;
672
+ i0.ɵɵproperty("ngValue", ɵ$index_485_r30);
673
+ i0.ɵɵadvance();
674
+ i0.ɵɵtextInterpolate2("", related_r29.DisplayName, " via ", related_r29.JoinField);
675
+ } }
676
+ function MjFormPlacementDialogComponent_ng_template_23_For_76_Template(rf, ctx) { if (rf & 1) {
677
+ i0.ɵɵelementStart(0, "option", 89);
678
+ i0.ɵɵtext(1);
679
+ i0.ɵɵelementEnd();
680
+ } if (rf & 2) {
681
+ const item_r31 = ctx.$implicit;
682
+ const ɵ$index_501_r32 = ctx.$index;
683
+ i0.ɵɵproperty("ngValue", ɵ$index_501_r32);
684
+ i0.ɵɵadvance();
685
+ i0.ɵɵtextInterpolate(item_r31.Title);
686
+ } }
687
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_89_Template(rf, ctx) { if (rf & 1) {
688
+ const _r33 = i0.ɵɵgetCurrentView();
689
+ i0.ɵɵelementStart(0, "label", 77)(1, "input", 113);
690
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Conditional_89_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.StartChoice, $event) || (ctx_r0.StartChoice = $event); return i0.ɵɵresetView($event); });
691
+ i0.ɵɵelementEnd();
692
+ i0.ɵɵelementStart(2, "span", 79);
693
+ i0.ɵɵtext(3, "Keep it off");
694
+ i0.ɵɵelementEnd()();
695
+ } if (rf & 2) {
696
+ const ctx_r0 = i0.ɵɵnextContext(2);
697
+ i0.ɵɵclassProp("is-on", ctx_r0.StartChoice === "off");
698
+ i0.ɵɵadvance();
699
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.StartChoice);
700
+ } }
701
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_92_For_5_Template(rf, ctx) { if (rf & 1) {
702
+ i0.ɵɵelementStart(0, "div", 114)(1, "span", 54);
703
+ i0.ɵɵtext(2);
704
+ i0.ɵɵelementEnd();
705
+ i0.ɵɵelementStart(3, "span", 115);
706
+ i0.ɵɵtext(4);
707
+ i0.ɵɵelementEnd()();
708
+ } if (rf & 2) {
709
+ const item_r34 = ctx.$implicit;
710
+ i0.ɵɵadvance(2);
711
+ i0.ɵɵtextInterpolate(item_r34.Title);
712
+ i0.ɵɵadvance(2);
713
+ i0.ɵɵtextInterpolate(item_r34.Slot);
714
+ } }
715
+ function MjFormPlacementDialogComponent_ng_template_23_Conditional_92_Template(rf, ctx) { if (rf & 1) {
716
+ i0.ɵɵelementStart(0, "section")(1, "div", 22);
717
+ i0.ɵɵtext(2, "Already on this form");
718
+ i0.ɵɵelementEnd();
719
+ i0.ɵɵelementStart(3, "div", 76);
720
+ i0.ɵɵrepeaterCreate(4, MjFormPlacementDialogComponent_ng_template_23_Conditional_92_For_5_Template, 5, 2, "div", 114, _forTrack1);
721
+ i0.ɵɵelementEnd()();
722
+ } if (rf & 2) {
723
+ const ctx_r0 = i0.ɵɵnextContext(2);
724
+ i0.ɵɵadvance(4);
725
+ i0.ɵɵrepeater(ctx_r0.Context.Existing);
726
+ } }
727
+ function MjFormPlacementDialogComponent_ng_template_23_Template(rf, ctx) { if (rf & 1) {
728
+ const _r19 = i0.ɵɵgetCurrentView();
729
+ i0.ɵɵelementStart(0, "section")(1, "div", 22);
730
+ i0.ɵɵtext(2, "Applies to");
731
+ i0.ɵɵelementEnd();
732
+ i0.ɵɵelementStart(3, "div", 68)(4, "strong");
733
+ i0.ɵɵtext(5);
734
+ i0.ɵɵelementEnd();
735
+ i0.ɵɵelementStart(6, "span");
736
+ i0.ɵɵtext(7);
737
+ i0.ɵɵelementEnd()()();
738
+ i0.ɵɵelementStart(8, "section")(9, "div", 22);
739
+ i0.ɵɵtext(10, "How it looks");
740
+ i0.ɵɵelementEnd();
741
+ i0.ɵɵelementStart(11, "div", 69)(12, "label", 70)(13, "input", 71);
742
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_13_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.Presentation, $event) || (ctx_r0.State.Presentation = $event); return i0.ɵɵresetView($event); });
743
+ i0.ɵɵelementEnd();
744
+ i0.ɵɵelementStart(14, "span")(15, "span", 72);
745
+ i0.ɵɵtext(16, "Panel");
746
+ i0.ɵɵelementEnd();
747
+ i0.ɵɵelementStart(17, "span", 73);
748
+ i0.ɵɵtext(18, "Collapsible section with a header, and its own item in the side rail.");
749
+ i0.ɵɵelementEnd()()();
750
+ i0.ɵɵelementStart(19, "label", 70)(20, "input", 74);
751
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_20_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.Presentation, $event) || (ctx_r0.State.Presentation = $event); return i0.ɵɵresetView($event); });
752
+ i0.ɵɵelementEnd();
753
+ i0.ɵɵelementStart(21, "span")(22, "span", 72);
754
+ i0.ɵɵtext(23, "Bare");
755
+ i0.ɵɵelementEnd();
756
+ i0.ɵɵelementStart(24, "span", 73);
757
+ i0.ɵɵtext(25, "A strip with no chrome. No header, no rail item.");
758
+ i0.ɵɵelementEnd()()()();
759
+ i0.ɵɵconditionalCreate(26, MjFormPlacementDialogComponent_ng_template_23_Conditional_26_Template, 10, 3);
760
+ i0.ɵɵconditionalCreate(27, MjFormPlacementDialogComponent_ng_template_23_Conditional_27_Template, 2, 0, "p", 75)(28, MjFormPlacementDialogComponent_ng_template_23_Conditional_28_Template, 2, 0, "p", 19);
761
+ i0.ɵɵelementEnd();
762
+ i0.ɵɵelementStart(29, "section")(30, "div", 22);
763
+ i0.ɵɵtext(31, "Does it replace anything?");
764
+ i0.ɵɵelementEnd();
765
+ i0.ɵɵelementStart(32, "div", 76)(33, "label", 77)(34, "input", 78);
766
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_34_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
767
+ i0.ɵɵelementEnd();
768
+ i0.ɵɵelementStart(35, "span", 79);
769
+ i0.ɵɵtext(36, "No \u2014 add it alongside what is already there");
770
+ i0.ɵɵelementEnd()();
771
+ i0.ɵɵconditionalCreate(37, MjFormPlacementDialogComponent_ng_template_23_Conditional_37_Template, 11, 6, "label", 80);
772
+ i0.ɵɵelementStart(38, "label", 77)(39, "input", 81);
773
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_39_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
774
+ i0.ɵɵelementEnd();
775
+ i0.ɵɵelementStart(40, "span", 79);
776
+ i0.ɵɵconditionalCreate(41, MjFormPlacementDialogComponent_ng_template_23_Conditional_41_Template, 6, 0)(42, MjFormPlacementDialogComponent_ng_template_23_Conditional_42_Template, 3, 0);
777
+ i0.ɵɵconditionalCreate(43, MjFormPlacementDialogComponent_ng_template_23_Conditional_43_Template, 2, 0, "span", 82);
778
+ i0.ɵɵelementEnd()();
779
+ i0.ɵɵconditionalCreate(44, MjFormPlacementDialogComponent_ng_template_23_Conditional_44_Template, 7, 1, "fieldset", 83);
780
+ i0.ɵɵelementStart(45, "label", 77)(46, "input", 84);
781
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_46_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
782
+ i0.ɵɵelementEnd();
783
+ i0.ɵɵelementStart(47, "span", 79);
784
+ i0.ɵɵtext(48, " Replace ");
785
+ i0.ɵɵelementStart(49, "strong");
786
+ i0.ɵɵtext(50, "fields");
787
+ i0.ɵɵelementEnd();
788
+ i0.ɵɵtext(51, " inside one group ");
789
+ i0.ɵɵelementStart(52, "span", 85);
790
+ i0.ɵɵtext(53, "your panel draws inside that group, in their place");
791
+ i0.ɵɵelementEnd();
792
+ i0.ɵɵconditionalCreate(54, MjFormPlacementDialogComponent_ng_template_23_Conditional_54_Template, 2, 0, "span", 82);
793
+ i0.ɵɵelementEnd();
794
+ i0.ɵɵelementStart(55, "select", 86);
795
+ i0.ɵɵlistener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_select_ngModelChange_55_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SetFieldSection($event)); });
796
+ i0.ɵɵrepeaterCreate(56, MjFormPlacementDialogComponent_ng_template_23_For_57_Template, 2, 2, "option", 28, _forTrack1);
797
+ i0.ɵɵelementEnd()();
798
+ i0.ɵɵconditionalCreate(58, MjFormPlacementDialogComponent_ng_template_23_Conditional_58_Template, 14, 3, "fieldset", 83);
799
+ i0.ɵɵelementStart(59, "label", 77)(60, "input", 87);
800
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_60_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
801
+ i0.ɵɵelementEnd();
802
+ i0.ɵɵelementStart(61, "span", 79);
803
+ i0.ɵɵtext(62, "Replace a ");
804
+ i0.ɵɵelementStart(63, "strong");
805
+ i0.ɵɵtext(64, "related grid");
806
+ i0.ɵɵelementEnd()();
807
+ i0.ɵɵelementStart(65, "select", 88);
808
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_select_ngModelChange_65_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceRelatedIndex, $event) || (ctx_r0.State.ReplaceRelatedIndex = $event); return i0.ɵɵresetView($event); });
809
+ i0.ɵɵrepeaterCreate(66, MjFormPlacementDialogComponent_ng_template_23_For_67_Template, 2, 3, "option", 89, _forTrack2);
810
+ i0.ɵɵelementEnd()();
811
+ i0.ɵɵelementStart(68, "label", 77)(69, "input", 90);
812
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_69_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceMode, $event) || (ctx_r0.State.ReplaceMode = $event); return i0.ɵɵresetView($event); });
813
+ i0.ɵɵelementEnd();
814
+ i0.ɵɵelementStart(70, "span", 79);
815
+ i0.ɵɵtext(71, "Replace a ");
816
+ i0.ɵɵelementStart(72, "strong");
817
+ i0.ɵɵtext(73, "panel already here");
818
+ i0.ɵɵelementEnd()();
819
+ i0.ɵɵelementStart(74, "select", 91);
820
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_select_ngModelChange_74_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.State.ReplaceContributionIndex, $event) || (ctx_r0.State.ReplaceContributionIndex = $event); return i0.ɵɵresetView($event); });
821
+ i0.ɵɵrepeaterCreate(75, MjFormPlacementDialogComponent_ng_template_23_For_76_Template, 2, 2, "option", 89, _forTrack1);
822
+ i0.ɵɵelementEnd()()()();
823
+ i0.ɵɵelementStart(77, "section")(78, "div", 22);
824
+ i0.ɵɵtext(79, "When it starts");
825
+ i0.ɵɵelementEnd();
826
+ i0.ɵɵelementStart(80, "div", 76)(81, "label", 77)(82, "input", 92);
827
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_82_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.StartChoice, $event) || (ctx_r0.StartChoice = $event); return i0.ɵɵresetView($event); });
828
+ i0.ɵɵelementEnd();
829
+ i0.ɵɵelementStart(83, "span", 79);
830
+ i0.ɵɵtext(84, "Right away");
831
+ i0.ɵɵelementEnd()();
832
+ i0.ɵɵelementStart(85, "label", 77)(86, "input", 93);
833
+ i0.ɵɵtwoWayListener("ngModelChange", function MjFormPlacementDialogComponent_ng_template_23_Template_input_ngModelChange_86_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.StartChoice, $event) || (ctx_r0.StartChoice = $event); return i0.ɵɵresetView($event); });
834
+ i0.ɵɵelementEnd();
835
+ i0.ɵɵelementStart(87, "span", 79);
836
+ i0.ɵɵtext(88, "Save as a draft");
837
+ i0.ɵɵelementEnd()();
838
+ i0.ɵɵconditionalCreate(89, MjFormPlacementDialogComponent_ng_template_23_Conditional_89_Template, 4, 3, "label", 80);
839
+ i0.ɵɵelementEnd();
840
+ i0.ɵɵelementStart(90, "p", 19);
841
+ i0.ɵɵtext(91, "A draft is stored but rendered for nobody until you turn it on.");
842
+ i0.ɵɵelementEnd()();
843
+ i0.ɵɵconditionalCreate(92, MjFormPlacementDialogComponent_ng_template_23_Conditional_92_Template, 6, 0, "section");
844
+ } if (rf & 2) {
845
+ const ctx_r0 = i0.ɵɵnextContext();
846
+ i0.ɵɵadvance(5);
847
+ i0.ɵɵtextInterpolate(ctx_r0.Context.EntityName);
848
+ i0.ɵɵadvance(2);
849
+ i0.ɵɵtextInterpolate1("\u00B7 every record of this entity, visible to ", ctx_r0.VisibleTo);
850
+ i0.ɵɵadvance(5);
851
+ i0.ɵɵclassProp("is-on", ctx_r0.State.Presentation === "panel");
852
+ i0.ɵɵadvance();
853
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.Presentation);
854
+ i0.ɵɵadvance(6);
855
+ i0.ɵɵclassProp("is-on", ctx_r0.State.Presentation === "bare");
856
+ i0.ɵɵadvance();
857
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.Presentation);
858
+ i0.ɵɵadvance(6);
859
+ i0.ɵɵconditional(ctx_r0.State.Presentation === "panel" ? 26 : -1);
860
+ i0.ɵɵadvance();
861
+ i0.ɵɵconditional(ctx_r0.IsPersistentHero ? 27 : ctx_r0.BareJoinsReplacedTab && ctx_r0.HasRail ? 28 : -1);
862
+ i0.ɵɵadvance(6);
863
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "none");
864
+ i0.ɵɵadvance();
865
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
866
+ i0.ɵɵadvance(3);
867
+ i0.ɵɵconditional(ctx_r0.CanReplaceRailTab ? 37 : -1);
868
+ i0.ɵɵadvance();
869
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "section")("is-off", !ctx_r0.CanReplaceSection);
870
+ i0.ɵɵadvance();
871
+ i0.ɵɵproperty("disabled", !ctx_r0.CanReplaceSection);
872
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
873
+ i0.ɵɵadvance(2);
874
+ i0.ɵɵconditional(ctx_r0.SectionsAreInDetailsTab ? 41 : 42);
875
+ i0.ɵɵadvance(2);
876
+ i0.ɵɵconditional(ctx_r0.SectionTargetsAreDerived ? 43 : -1);
877
+ i0.ɵɵadvance();
878
+ i0.ɵɵconditional(ctx_r0.State.ReplaceMode === "section" ? 44 : -1);
879
+ i0.ɵɵadvance();
880
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "field")("is-off", !ctx_r0.CanReplaceField);
881
+ i0.ɵɵadvance();
882
+ i0.ɵɵproperty("disabled", !ctx_r0.CanReplaceField);
883
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
884
+ i0.ɵɵadvance(8);
885
+ i0.ɵɵconditional(!ctx_r0.CanReplaceField ? 54 : -1);
886
+ i0.ɵɵadvance();
887
+ i0.ɵɵproperty("disabled", ctx_r0.State.ReplaceMode !== "field")("ngModel", ctx_r0.State.ReplaceFieldSectionKey);
888
+ i0.ɵɵadvance();
889
+ i0.ɵɵrepeater(ctx_r0.FieldSections);
890
+ i0.ɵɵadvance(2);
891
+ i0.ɵɵconditional(ctx_r0.State.ReplaceMode === "field" ? 58 : -1);
892
+ i0.ɵɵadvance();
893
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "related")("is-off", !ctx_r0.CanReplaceRelated);
894
+ i0.ɵɵadvance();
895
+ i0.ɵɵproperty("disabled", !ctx_r0.CanReplaceRelated);
896
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
897
+ i0.ɵɵadvance(5);
898
+ i0.ɵɵproperty("disabled", ctx_r0.State.ReplaceMode !== "related");
899
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceRelatedIndex);
900
+ i0.ɵɵadvance();
901
+ i0.ɵɵrepeater(ctx_r0.Context.Related);
902
+ i0.ɵɵadvance(2);
903
+ i0.ɵɵclassProp("is-on", ctx_r0.State.ReplaceMode === "contribution")("is-off", !ctx_r0.CanReplaceContribution);
904
+ i0.ɵɵadvance();
905
+ i0.ɵɵproperty("disabled", !ctx_r0.CanReplaceContribution);
906
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceMode);
907
+ i0.ɵɵadvance(5);
908
+ i0.ɵɵproperty("disabled", ctx_r0.State.ReplaceMode !== "contribution");
909
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.State.ReplaceContributionIndex);
910
+ i0.ɵɵadvance();
911
+ i0.ɵɵrepeater(ctx_r0.Context.Existing);
912
+ i0.ɵɵadvance(6);
913
+ i0.ɵɵclassProp("is-on", ctx_r0.StartChoice === "now");
914
+ i0.ɵɵadvance();
915
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.StartChoice);
916
+ i0.ɵɵadvance(3);
917
+ i0.ɵɵclassProp("is-on", ctx_r0.StartChoice === "draft");
918
+ i0.ɵɵadvance();
919
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.StartChoice);
920
+ i0.ɵɵadvance(3);
921
+ i0.ɵɵconditional(ctx_r0.OfferKeepOff ? 89 : -1);
922
+ i0.ɵɵadvance(3);
923
+ i0.ɵɵconditional(ctx_r0.Context.Existing.length > 0 ? 92 : -1);
924
+ } }
925
+ /**
926
+ * Asks where a generated panel should go before anything is written.
927
+ *
928
+ * Presentational by design: it takes the form's composition and the component's own
929
+ * proposal, and emits the answers. It reads nothing and saves nothing, so the host owns
930
+ * both the fetch and the write, and this stays testable without a provider.
931
+ *
932
+ * Scope is not a control here. The create path clamps every contribution to the calling
933
+ * user, deliberately — an agent must not be able to change another person's form — so the
934
+ * dialog states the audience rather than offering a choice it cannot honour. An edit from the
935
+ * Manage drawer keeps the panel's own audience, which the host states through {@link VisibleTo}.
936
+ */
937
+ export class MjFormPlacementDialogComponent extends BaseAngularComponent {
938
+ /** What the form contains. Setting it resets the answers. */
939
+ set Context(value) {
940
+ this._context = value;
941
+ this.hasContext = true;
942
+ this.resetState();
943
+ void this.probeSlots();
944
+ }
945
+ get Context() { return this._context; }
946
+ /**
947
+ * A hook to overwrite the starting answers.
948
+ *
949
+ * Without it the dialog starts from a fixed default. The caller seeds what only it knows:
950
+ * a saved row's placement when editing one, or a generated panel's proposed claims when
951
+ * applying one. It runs once the context, the proposal and the hook are all set, in
952
+ * whatever order they arrive.
953
+ */
954
+ set SeedState(value) {
955
+ this._seedState = value;
956
+ this.resetState();
957
+ }
958
+ get SeedState() { return this._seedState; }
959
+ /**
960
+ * The component's own registration intent. Identity fields are read from it directly; its
961
+ * claims reach the answers only through `SeedState`.
962
+ */
963
+ set Proposal(value) {
964
+ this._proposal = value;
965
+ this.resetState();
966
+ }
967
+ get Proposal() { return this._proposal; }
968
+ /** Name of the component being placed, for the dialog heading. */
969
+ ComponentName = '';
970
+ /**
971
+ * Whether to read the entity's form to find out which positions it offers.
972
+ *
973
+ * On by default: without it the list is the shape CodeGen produces, which is right for
974
+ * a generated form and can be wrong for a hand-written one. A host that already knows
975
+ * the slots, or one with no Angular form to render, turns it off.
976
+ */
977
+ ProbeForm = true;
978
+ /**
979
+ * The record the scaled form preview shows. Null shows a new, unsaved record, which is
980
+ * what a dialog opened from a conversation has.
981
+ */
982
+ RecordKey = null;
983
+ /** The saved row being edited, which the preview leaves off so it shows only the edit. */
984
+ ReplacesRowID = null;
985
+ /** The component being placed, so the preview draws it rather than a placeholder. */
986
+ PanelComponentSpec = null;
987
+ /** The saved component of the panel being edited, for the same reason. */
988
+ PanelComponentID = null;
989
+ /** Who sees the panel, as the end of "visible to …". The caller alone unless the host says otherwise. */
990
+ VisibleTo = DescribeVisibleTo('User');
991
+ /** Offers keeping the panel off, for an edit of a panel that is off now. */
992
+ OfferKeepOff = false;
993
+ /** The user pressed Apply. */
994
+ Applied = new EventEmitter();
995
+ /** The user backed out. */
996
+ Cancelled = new EventEmitter();
997
+ _context = {
998
+ EntityName: '',
999
+ Sections: [],
1000
+ Related: [],
1001
+ Existing: [],
1002
+ SlotsPresent: [],
1003
+ SlotsVerified: false,
1004
+ Layout: 'accordion',
1005
+ Rail: [],
1006
+ FullCustomForm: false,
1007
+ TargetsVerified: false,
1008
+ };
1009
+ _proposal = null;
1010
+ _seedState = null;
1011
+ hasContext = false;
1012
+ /** The answers as the seed left them, or null when no seed has run. */
1013
+ seededAnswers = null;
1014
+ /** The fields the seeded answers stand in for. Empty when the seed made no field claim. */
1015
+ seededFieldNames = [];
1016
+ State = InitialPlacementState(null, this._context);
1017
+ /**
1018
+ * A proposal's claim the caller's seed dropped because this form could not confirm it, for
1019
+ * the summary to report while the answers do not make that claim. Null when the seed dropped
1020
+ * none. The seed sets it; resetting the answers clears it, and so does reading the form's
1021
+ * sections, before the seed runs again against them.
1022
+ */
1023
+ DroppedProposalClaim = null;
1024
+ /** Starts the answers from the default, then from the caller's seed when it can run. */
1025
+ resetState() {
1026
+ this.State = InitialPlacementState(this._proposal, this._context);
1027
+ this.seededAnswers = null;
1028
+ this.seededFieldNames = [];
1029
+ this.DroppedProposalClaim = null;
1030
+ this.applySeed();
1031
+ }
1032
+ /** Runs the caller's seed once the context, the proposal and the seed are all set. */
1033
+ applySeed() {
1034
+ if (!this.hasContext || !this._proposal || !this._seedState)
1035
+ return;
1036
+ this._seedState(this);
1037
+ this.seededAnswers = JSON.stringify(this.State);
1038
+ this.seededFieldNames = this.State.ReplaceMode === 'field' ? [...this.State.ReplaceFieldNames] : [];
1039
+ }
1040
+ /** True while the answers are still the ones the seed produced. */
1041
+ get unchangedSinceSeed() {
1042
+ return this.seededAnswers !== null && JSON.stringify(this.State) === this.seededAnswers;
1043
+ }
1044
+ /**
1045
+ * The positions to offer. Once the form's own set is known, a slot it does not emit is
1046
+ * not shown: choosing it would silently resolve to the bottom of the form, so it is not
1047
+ * a position the user can meaningfully pick.
1048
+ */
1049
+ get Slots() {
1050
+ return FORM_PLACEMENT_SLOTS.filter((s) => SlotIsOnForm(this._context, s.Slot));
1051
+ }
1052
+ /** Slots that sit above the field sections, so the preview renders in form order. */
1053
+ get SlotsAbove() {
1054
+ return this.Slots.filter((s) => s.Slot === 'top-area' || s.Slot === 'before-fields');
1055
+ }
1056
+ /** The slot between the fields and the related grids. */
1057
+ get SlotAfterFields() {
1058
+ return this.Slots.find((s) => s.Slot === 'after-fields');
1059
+ }
1060
+ /** Slots that sit below the related grids. */
1061
+ get SlotsBelow() {
1062
+ return this.Slots.filter((s) => s.Slot === 'after-related' || s.Slot === 'after-everything');
1063
+ }
1064
+ get Summary() {
1065
+ return SummarizePlacement(this.answers, this._context, this.VisibleTo, {
1066
+ FieldsStoodInFor: this.seededFieldNames,
1067
+ DroppedClaim: this.DroppedProposalClaim,
1068
+ });
1069
+ }
1070
+ /** The answers as they are applied: keeping a panel off counts only where it is offered. */
1071
+ get answers() {
1072
+ return this.State.KeepOff && !this.OfferKeepOff ? { ...this.State, KeepOff: false } : this.State;
1073
+ }
1074
+ /** When the panel starts: right away, as a draft, or, for a panel that is off, still off. */
1075
+ get StartChoice() {
1076
+ if (this.State.ActivateNow)
1077
+ return 'now';
1078
+ return this.State.KeepOff && this.OfferKeepOff ? 'off' : 'draft';
1079
+ }
1080
+ set StartChoice(value) {
1081
+ this.State.ActivateNow = value === 'now';
1082
+ this.State.KeepOff = value === 'off';
1083
+ }
1084
+ /** Whether this form draws a side rail, so tabs are a thing the user can see. */
1085
+ get HasRail() {
1086
+ return ShowsRail(this._context);
1087
+ }
1088
+ /** The rail item the panel will appear under, or null when it gets one of its own. */
1089
+ get TargetRail() {
1090
+ return TargetRailItem(this.State, this._context);
1091
+ }
1092
+ /** True when the panel will add a rail item rather than join one. */
1093
+ get AddsRailItem() {
1094
+ return this.State.Presentation === 'panel' && this.TargetRail === null;
1095
+ }
1096
+ /** True when the panel would carry no header of its own and none from the host. */
1097
+ get HasTitle() {
1098
+ return this.State.Title.trim().length > 0;
1099
+ }
1100
+ /** A form with no field sections has nothing for a panel to hide. */
1101
+ get CanReplaceSection() {
1102
+ return this._context.Sections.length > 0;
1103
+ }
1104
+ /** Sections whose fields a panel could stand in for. */
1105
+ get FieldSections() {
1106
+ return SectionsWithFields(this._context);
1107
+ }
1108
+ /** The fields of the section the user is choosing from. */
1109
+ get FieldChoices() {
1110
+ return FieldsInSection(this._context, this.State.ReplaceFieldSectionKey);
1111
+ }
1112
+ /**
1113
+ * Whether standing in for fields is offered.
1114
+ *
1115
+ * Only when the fields were read off a real form. Derived targets name the entity's
1116
+ * fields rather than the ones this form draws, and a claim on a field the form does
1117
+ * not draw hides nothing while still reading as applied.
1118
+ */
1119
+ get CanReplaceField() {
1120
+ return this.FieldSections.length > 0;
1121
+ }
1122
+ /** The names the claim will carry, kept to fields the chosen section really draws. */
1123
+ get ChosenFields() {
1124
+ return ChosenFieldNames(this.State, this._context);
1125
+ }
1126
+ /** Whether this field is in the claim. */
1127
+ IsFieldChosen(fieldName) {
1128
+ return this.State.ReplaceFieldNames.includes(fieldName);
1129
+ }
1130
+ /** Add or remove one field from the claim. */
1131
+ ToggleField(fieldName, chosen) {
1132
+ const without = this.State.ReplaceFieldNames.filter((n) => n !== fieldName);
1133
+ this.State.ReplaceFieldNames = chosen ? [...without, fieldName] : without;
1134
+ }
1135
+ /**
1136
+ * Switch which section the claim draws from, dropping the fields chosen in the old one.
1137
+ *
1138
+ * A claim renders at the top of ONE section, so fields from two of them describe a
1139
+ * panel with two places to be. Clearing on switch makes that impossible to express
1140
+ * rather than something the dialog has to refuse later.
1141
+ */
1142
+ SetFieldSection(sectionKey) {
1143
+ this.State.ReplaceFieldSectionKey = sectionKey;
1144
+ this.State.ReplaceFieldNames = [];
1145
+ }
1146
+ /** Whether this preview block is the one a field claim lands inside. */
1147
+ HostsFieldPanel(sectionKey) {
1148
+ return this.State.ReplaceMode === 'field'
1149
+ && !!sectionKey
1150
+ && this.State.ReplaceFieldSectionKey === sectionKey;
1151
+ }
1152
+ /** The chosen fields named in a line, for the note beside the choice. */
1153
+ get ChosenFieldSummary() {
1154
+ return DescribeChosenFields(this.State, this._context);
1155
+ }
1156
+ /** A field claim that names no field claims nothing, so Apply would be a lie. */
1157
+ get FieldClaimIsEmpty() {
1158
+ return this.State.ReplaceMode === 'field' && this.ChosenFields.length === 0;
1159
+ }
1160
+ /**
1161
+ * True when the form bundles its field sections into a single Details tab, so the
1162
+ * section names on offer are the parts of that tab rather than anything the user can
1163
+ * point at on screen.
1164
+ */
1165
+ get SectionsAreInDetailsTab() {
1166
+ return HasDetailsTab(this._context);
1167
+ }
1168
+ /** How many sections the Details tab is made of, for the option that replaces all of them. */
1169
+ get DetailsTabSectionCount() {
1170
+ return this._context.Sections.length;
1171
+ }
1172
+ /** The tabs a panel may stand in for. Empty means the form shows no rail. */
1173
+ get RailTabs() {
1174
+ return ReplaceableRailTabs(this._context);
1175
+ }
1176
+ /** Whether standing in for a whole tab is offered at all. */
1177
+ get CanReplaceRailTab() {
1178
+ return this.RailTabs.length > 0;
1179
+ }
1180
+ /** How many panels the chosen tab holds, for the note beside the choice. */
1181
+ get ChosenRailTabSize() {
1182
+ return this.RailTabs.find((t) => t.Key === this.State.ReplaceRailKey)?.SectionKeys.length ?? 0;
1183
+ }
1184
+ /** Whether this preview block will be taken off the form by the current choice. */
1185
+ IsReplaced(sectionKey) {
1186
+ return ReplacedPreviewKeys(this.State, this._context).has(sectionKey);
1187
+ }
1188
+ /** Whether the related grid at this position will be taken over. */
1189
+ IsRelatedReplaced(index) {
1190
+ return this.State.ReplaceMode === 'related' && this.State.ReplaceRelatedIndex === index;
1191
+ }
1192
+ /** Whether every field group in the Details tab is going, so the tab itself is marked. */
1193
+ get IsWholeDetailsTabReplaced() {
1194
+ if (this._context.Sections.length === 0)
1195
+ return false;
1196
+ const going = ReplacedPreviewKeys(this.State, this._context);
1197
+ return this._context.Sections.every((section) => going.has(section.Key));
1198
+ }
1199
+ /** One section's label, told apart from the Details tab when they share a name. */
1200
+ SectionLabel(section) {
1201
+ return SectionOptionLabel(section, this._context);
1202
+ }
1203
+ /** Whether hiding a section is a guess, because the targets were not read from the form. */
1204
+ get SectionTargetsAreDerived() {
1205
+ return this.CanReplaceSection && !this._context.TargetsVerified;
1206
+ }
1207
+ /**
1208
+ * A bare panel carries no chrome and no rail item, so a left-nav form has nowhere to
1209
+ * file it and shows it above every section. Worth saying before it is applied.
1210
+ */
1211
+ get IsPersistentHero() {
1212
+ return this.State.Presentation === 'bare' && !this.BareJoinsReplacedTab;
1213
+ }
1214
+ /** A bare strip that replaces blocks takes their place in their tab, rather than above every tab. */
1215
+ get BareJoinsReplacedTab() {
1216
+ return this.State.Presentation === 'bare'
1217
+ && (this.State.ReplaceMode === 'section' || this.State.ReplaceMode === 'rail-tab');
1218
+ }
1219
+ /** A form with no related grids has nothing for a panel to take over. */
1220
+ get CanReplaceRelated() {
1221
+ return this._context.Related.length > 0;
1222
+ }
1223
+ /** A form with no panels on it yet has nothing for this one to stand in for. */
1224
+ get CanReplaceContribution() {
1225
+ return this._context.Existing.length > 0;
1226
+ }
1227
+ /** True while the form is being read to find out which positions it offers. */
1228
+ Probing = false;
1229
+ /**
1230
+ * True when the list is the shape CodeGen produces rather than this form's own, because
1231
+ * reading the form did not answer. A hand-written custom template can differ.
1232
+ */
1233
+ get SlotsAreAssumed() {
1234
+ return !this.Probing && !this._context.SlotsVerified && this._context.SlotsPresent.length > 0;
1235
+ }
1236
+ SelectSlot(slot) {
1237
+ this.State.Slot = slot;
1238
+ }
1239
+ /** Refuses a claim the form cannot honour, so the state can never describe a missing target. */
1240
+ SetReplaceMode(mode) {
1241
+ if (mode === 'section' && !this.CanReplaceSection)
1242
+ return;
1243
+ if (mode === 'field' && !this.CanReplaceField)
1244
+ return;
1245
+ if (mode === 'related' && !this.CanReplaceRelated)
1246
+ return;
1247
+ if (mode === 'contribution' && !this.CanReplaceContribution)
1248
+ return;
1249
+ if (mode === 'rail-tab' && !this.CanReplaceRailTab)
1250
+ return;
1251
+ this.State.ReplaceMode = mode;
1252
+ }
1253
+ OnApply() {
1254
+ this.Applied.emit(ResolvePlacementDecision(this.answers, this._context, this._proposal));
1255
+ }
1256
+ OnCancel() {
1257
+ this.Cancelled.emit();
1258
+ }
1259
+ /**
1260
+ * Replace the assumed positions and section keys with the form's own.
1261
+ *
1262
+ * The probe renders the entity's form offscreen, so it costs one hidden form per entity
1263
+ * per session and answers for hand-written templates too. A caller that already had the
1264
+ * form open has nothing to learn, and a failed probe leaves the assumptions in place.
1265
+ */
1266
+ async probeSlots() {
1267
+ const entity = this._context.EntityName;
1268
+ if (!this.ProbeForm || !entity || this._context.SlotsVerified || this._context.FullCustomForm)
1269
+ return;
1270
+ this.Probing = true;
1271
+ try {
1272
+ const shape = await this.probe.Probe(this.viewContainer, entity, this.ProviderToUse);
1273
+ if (shape.Slots.length === 0 || this._context.EntityName !== entity)
1274
+ return;
1275
+ const reseed = this.unchangedSinceSeed;
1276
+ this._context = {
1277
+ ...this._context,
1278
+ SlotsPresent: shape.Slots,
1279
+ SlotsVerified: true,
1280
+ // Sections read off the form replace ones derived from field metadata, which
1281
+ // a template generated earlier may not draw.
1282
+ Sections: shape.Sections.length > 0 ? shape.Sections : this._context.Sections,
1283
+ TargetsVerified: shape.Sections.length > 0 ? true : this._context.TargetsVerified,
1284
+ // Resolved through the form's own chrome resolver, so the rail drawn here
1285
+ // is the rail the saved record shows.
1286
+ Rail: shape.Groups.map((g) => ({
1287
+ Key: g.Key, Title: g.Title, Icon: g.Icon,
1288
+ SectionKeys: g.SectionKeys, IsMore: g.IsMore === true,
1289
+ })),
1290
+ Layout: shape.Layout,
1291
+ };
1292
+ // The rail was not known before the probe, so the default tab was not either.
1293
+ if (!this._context.Rail.some((item) => item.Key === this.State.ReplaceRailKey)) {
1294
+ this.State = { ...this.State, ReplaceRailKey: DefaultRailKeyFor(this._context) };
1295
+ }
1296
+ // Once the form's own sections are read, a claim the seed dropped before the read is
1297
+ // no longer reported. A reseed below runs the caller's seed against the read form,
1298
+ // which may set it again.
1299
+ if (shape.Sections.length > 0)
1300
+ this.DroppedProposalClaim = null;
1301
+ // The seed ran against a context with no sections or slots in it, so it runs again
1302
+ // against the form's own — unless the user has changed an answer since.
1303
+ if (reseed)
1304
+ this.applySeed();
1305
+ if (!SlotIsOnForm(this._context, this.State.Slot)) {
1306
+ this.State = { ...this.State, Slot: DefaultSlotFor(this._context) };
1307
+ }
1308
+ // The fields were unknown before the probe, so the chosen section was not either.
1309
+ const fieldSections = SectionsWithFields(this._context);
1310
+ if (!fieldSections.some((section) => section.Key === this.State.ReplaceFieldSectionKey)) {
1311
+ this.State = {
1312
+ ...this.State,
1313
+ ReplaceFieldSectionKey: DefaultFieldSectionKey(this._context),
1314
+ ReplaceFieldNames: [],
1315
+ ReplaceMode: fieldSections.length === 0 && this.State.ReplaceMode === 'field'
1316
+ ? 'none' : this.State.ReplaceMode,
1317
+ };
1318
+ }
1319
+ // Chosen sections, and the section a panel is placed in, must be ones the form draws.
1320
+ const drawn = new Set(this._context.Sections.map((s) => s.Key));
1321
+ this.State = {
1322
+ ...this.State,
1323
+ ReplaceSectionKeys: this.State.ReplaceSectionKeys.filter((k) => drawn.has(k)),
1324
+ InSectionKey: drawn.has(this.State.InSectionKey) ? this.State.InSectionKey : '',
1325
+ };
1326
+ // The previously selected section may not be one the form draws. Only a section claim
1327
+ // depends on it; a grid, panel or tab claim stands as it is.
1328
+ if (!this._context.Sections.some((s) => s.Key === this.State.ReplaceSectionKey)) {
1329
+ const dropsSectionClaim = this.State.ReplaceMode === 'section' && this._context.Sections.length === 0;
1330
+ this.State = {
1331
+ ...this.State,
1332
+ ReplaceSectionKey: this._context.Sections[0]?.Key ?? '',
1333
+ ReplaceMode: dropsSectionClaim ? 'none' : this.State.ReplaceMode,
1334
+ };
1335
+ }
1336
+ }
1337
+ finally {
1338
+ this.Probing = false;
1339
+ this.cdr.markForCheck();
1340
+ }
1341
+ }
1342
+ /** True when the scaled form could not be drawn, so the list stands in for it. */
1343
+ PreviewFailed = false;
1344
+ /**
1345
+ * Whether the real form is shown, scaled, in place of the list.
1346
+ *
1347
+ * Not for a full custom form, which draws its own body and has no positions to show, and
1348
+ * not when the form is not being read at all.
1349
+ */
1350
+ get ShowFormPreview() {
1351
+ return this.ProbeForm && !this.PreviewFailed && !this._context.FullCustomForm && !!this._context.EntityName;
1352
+ }
1353
+ OnPreviewFailed() {
1354
+ this.PreviewFailed = true;
1355
+ this.cdr.markForCheck();
1356
+ }
1357
+ previewSpec = null;
1358
+ /**
1359
+ * The panel as it would be saved, for the preview to draw.
1360
+ *
1361
+ * The same object comes back until an answer changes. The preview redraws the form each
1362
+ * time this changes identity, and change detection reads it on every pass.
1363
+ */
1364
+ get PreviewSpec() {
1365
+ const spec = ResolvePlacementDecision(this.State, this._context, this._proposal).Contribution;
1366
+ const signature = JSON.stringify(spec);
1367
+ if (this.previewSpec?.Signature !== signature)
1368
+ this.previewSpec = { Signature: signature, Spec: spec };
1369
+ return this.previewSpec.Spec;
1370
+ }
1371
+ /** Stop replacing anything; the panel goes back to its chosen position. */
1372
+ ClearReplacement() {
1373
+ this.State = { ...this.State, ReplaceMode: 'none', ReplaceFieldNames: [] };
1374
+ }
1375
+ /** One line saying where the panel goes and what it replaces. */
1376
+ get PlacementLine() {
1377
+ return DescribePlacementLine(this.State, this._context);
1378
+ }
1379
+ /**
1380
+ * The panels in the chosen position, top to bottom, this one among them. Only worth showing
1381
+ * when there is another panel to order against.
1382
+ */
1383
+ get OrderItems() {
1384
+ const items = PanelsInPosition(this.State, this._context, this.State.Title.trim() || this.ComponentName || 'This panel');
1385
+ return items.length > 1 ? items : [];
1386
+ }
1387
+ get CanMoveUp() {
1388
+ return MovedSortKey(this.OrderItems, 'up') != null;
1389
+ }
1390
+ get CanMoveDown() {
1391
+ return MovedSortKey(this.OrderItems, 'down') != null;
1392
+ }
1393
+ /** Whether a neighbour is there but the move has no order number to land on. */
1394
+ get MoveIsBlocked() {
1395
+ const items = this.OrderItems;
1396
+ const at = items.findIndex((item) => item.IsThis);
1397
+ const blockedUp = at > 0 && !this.CanMoveUp;
1398
+ const blockedDown = at >= 0 && at < items.length - 1 && !this.CanMoveDown;
1399
+ return blockedUp || blockedDown;
1400
+ }
1401
+ /** Move this panel one place up or down among the panels in its position. */
1402
+ MoveInPosition(direction) {
1403
+ const sortKey = MovedSortKey(this.OrderItems, direction);
1404
+ if (sortKey == null)
1405
+ return;
1406
+ this.State = { ...this.State, SortKey: sortKey };
1407
+ }
1408
+ /**
1409
+ * The position control's value: a slot name, or `in:<section key>:start|end` for a place
1410
+ * inside a section. One control, because "above the fields" and "at the bottom of Details"
1411
+ * are answers to the same question.
1412
+ */
1413
+ get PositionValue() {
1414
+ const key = this.State.InSectionKey.trim();
1415
+ return key ? `in:${key}:${this.State.SectionPosition}` : this.State.Slot;
1416
+ }
1417
+ set PositionValue(value) {
1418
+ const match = /^in:(.+):(start|end)$/.exec(value);
1419
+ this.State = match
1420
+ ? { ...this.State, InSectionKey: match[1], SectionPosition: match[2] }
1421
+ : { ...this.State, InSectionKey: '', Slot: value };
1422
+ }
1423
+ /** Sections a panel can be placed inside, for the position control. */
1424
+ get PlaceableSections() {
1425
+ return this._context.Sections;
1426
+ }
1427
+ /** Whether a section is among those the `section` mode stands in for. */
1428
+ IsSectionChosen(key) {
1429
+ return ChosenSectionKeys(this.State, this._context).includes(key);
1430
+ }
1431
+ /**
1432
+ * Add or remove one section from those the panel stands in for. The single key follows the
1433
+ * first chosen section, so a one-section claim reads the same as it always has.
1434
+ */
1435
+ ToggleSection(key, chosen) {
1436
+ const current = ChosenSectionKeys(this.State, this._context);
1437
+ const next = chosen ? [...current.filter((k) => k !== key), key] : current.filter((k) => k !== key);
1438
+ const ordered = this._context.Sections.map((s) => s.Key).filter((k) => next.includes(k));
1439
+ this.State = { ...this.State, ReplaceSectionKeys: ordered, ReplaceSectionKey: ordered[0] ?? '' };
1440
+ }
1441
+ /** A section claim that names no section stands in for nothing, so Apply would be a lie. */
1442
+ get SectionClaimIsEmpty() {
1443
+ return this.State.ReplaceMode === 'section' && ChosenSectionKeys(this.State, this._context).length === 0;
1444
+ }
1445
+ /** Whether the panel replaces something, so the line offers a way back. */
1446
+ get IsReplacing() {
1447
+ return this.State.ReplaceMode !== 'none';
1448
+ }
1449
+ probe = inject(FormSlotProbeService);
1450
+ viewContainer = inject(ViewContainerRef);
1451
+ cdr = inject(ChangeDetectorRef);
1452
+ static ɵfac = /*@__PURE__*/ (() => { let ɵMjFormPlacementDialogComponent_BaseFactory; return function MjFormPlacementDialogComponent_Factory(__ngFactoryType__) { return (ɵMjFormPlacementDialogComponent_BaseFactory || (ɵMjFormPlacementDialogComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MjFormPlacementDialogComponent)))(__ngFactoryType__ || MjFormPlacementDialogComponent); }; })();
1453
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjFormPlacementDialogComponent, selectors: [["mj-form-placement-dialog"]], inputs: { Context: "Context", SeedState: "SeedState", Proposal: "Proposal", ComponentName: "ComponentName", ProbeForm: "ProbeForm", RecordKey: "RecordKey", ReplacesRowID: "ReplacesRowID", PanelComponentSpec: "PanelComponentSpec", PanelComponentID: "PanelComponentID", VisibleTo: "VisibleTo", OfferKeepOff: "OfferKeepOff" }, outputs: { Applied: "Applied", Cancelled: "Cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 25, vars: 6, consts: [["slotRow", ""], ["fieldPanelCard", ""], ["settings", ""], [1, "mj-placement"], [1, "mj-placement-head"], [1, "mj-placement-head-text"], [1, "mj-placement-eyebrow"], [1, "mj-placement-title"], [1, "mj-placement-proposal"], ["Variant", "warning", 1, "mj-placement-alert"], [1, "mj-placement-body", "mj-placement-body--preview"], [1, "mj-placement-body"], [1, "mj-placement-foot"], ["type", "button", "mjButton", "", "variant", "primary", 3, "click", "disabled"], ["type", "button", "mjButton", "", 3, "click"], [1, "mj-placement-spacer"], [1, "mj-placement-summary"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "mj-placement-canvas"], [1, "mj-placement-hint"], [3, "Failed", "Provider", "EntityName", "RecordKey", "Spec", "ReplacesRowID", "PanelComponentSpec", "PanelComponentID"], [1, "mj-placement-settings", "mj-placement-settings--side"], [1, "mj-placement-label"], [1, "mj-placement-where"], [1, "mj-placement-where-text"], ["type", "button", 1, "mj-placement-link"], ["aria-label", "Position on the form", "name", "mj-slot-select", 1, "mj-placement-select", "mj-placement-select--block", 3, "ngModelChange", "ngModel"], ["label", "Between blocks"], [3, "value"], ["label", "Inside a section"], [4, "ngTemplateOutlet"], ["type", "button", 1, "mj-placement-link", 3, "click"], [1, "mj-placement-sublabel"], ["aria-label", "Order in this position", 1, "mj-placement-order"], [1, "mj-placement-order-item", 3, "is-this"], [1, "mj-placement-order-item"], [1, "mj-placement-order-name"], [1, "mj-placement-order-moves"], ["type", "button", "aria-label", "Move up", 1, "mj-placement-order-move", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-up"], ["type", "button", "aria-label", "Move down", 1, "mj-placement-order-move", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-down"], [1, "mj-placement-preview"], [1, "mj-placement-tab", 3, "is-replaced"], [1, "mj-placement-existing", 3, "is-replaced"], [1, "mj-placement-hint", "mj-placement-rail-note"], [1, "mj-placement-settings"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "mj-placement-tab"], [1, "mj-placement-tab-head"], ["aria-hidden", "true", 1, "fa-solid", "fa-id-card"], [1, "mj-placement-tab-name"], [1, "mj-placement-tab-kind"], [1, "mj-placement-existing", "mj-placement-existing--nested"], [1, "mj-placement-existing-name"], [1, "mj-placement-existing-kind"], [1, "mj-placement-existing"], [1, "mj-placement-gap"], [1, "mj-placement-gap-pick"], ["type", "radio", "name", "mj-slot", 3, "ngModelChange", "value", "ngModel"], ["aria-hidden", "true", 1, "mj-placement-gap-rule"], [1, "mj-placement-gap-text"], [1, "mj-placement-gap-name"], [1, "mj-placement-mono", "mj-placement-gap-slot"], [1, "mj-placement-slot-card"], [1, "mj-placement-slot-card-name"], [1, "mj-placement-slot-card-hint"], [1, "mj-placement-slot-card", "mj-placement-slot-card--in-section"], [1, "mj-placement-entity"], [1, "mj-placement-grid-2"], [1, "mj-placement-choice"], ["type", "radio", "name", "mj-presentation", "value", "panel", 3, "ngModelChange", "ngModel"], [1, "mj-placement-choice-name"], [1, "mj-placement-choice-hint"], ["type", "radio", "name", "mj-presentation", "value", "bare", 3, "ngModelChange", "ngModel"], [1, "mj-placement-warn"], [1, "mj-placement-stack"], [1, "mj-placement-row"], ["type", "radio", "name", "mj-replace", "value", "none", 3, "ngModelChange", "ngModel"], [1, "mj-placement-row-text"], [1, "mj-placement-row", 3, "is-on"], ["type", "radio", "name", "mj-replace", "value", "section", 3, "ngModelChange", "disabled", "ngModel"], [1, "mj-placement-row-note"], [1, "mj-placement-fieldpick"], ["type", "radio", "name", "mj-replace", "value", "field", 3, "ngModelChange", "disabled", "ngModel"], [1, "mj-placement-row-note--quiet"], ["aria-label", "Which group to take fields from", "name", "mj-field-section", 1, "mj-placement-select", 3, "ngModelChange", "disabled", "ngModel"], ["type", "radio", "name", "mj-replace", "value", "related", 3, "ngModelChange", "disabled", "ngModel"], ["aria-label", "Which related grid to take over", "name", "mj-related", 1, "mj-placement-select", 3, "ngModelChange", "disabled", "ngModel"], [3, "ngValue"], ["type", "radio", "name", "mj-replace", "value", "contribution", 3, "ngModelChange", "disabled", "ngModel"], ["aria-label", "Which panel to replace", "name", "mj-existing", 1, "mj-placement-select", 3, "ngModelChange", "disabled", "ngModel"], ["type", "radio", "name", "mj-status", "value", "now", 3, "ngModelChange", "ngModel"], ["type", "radio", "name", "mj-status", "value", "draft", 3, "ngModelChange", "ngModel"], [1, "mj-placement-fields"], [1, "mj-placement-field"], ["for", "mj-placement-title"], ["id", "mj-placement-title", "type", "text", "name", "mj-title", 1, "mj-input", 3, "ngModelChange", "ngModel"], [1, "mj-placement-field", "mj-placement-field--icon"], ["for", "mj-placement-icon"], ["id", "mj-placement-icon", "AriaLabel", "Panel icon", "name", "mj-icon", 3, "ngModelChange", "ngModel"], ["type", "radio", "name", "mj-replace", "value", "rail-tab", 3, "ngModelChange", "ngModel"], ["aria-label", "Which tab to stand in for", "name", "mj-rail", 1, "mj-placement-select", 3, "ngModelChange", "disabled", "ngModel"], [1, "mj-placement-fieldpick-legend"], [1, "mj-placement-fieldpick-grid"], [1, "mj-placement-fieldpick-item", 3, "is-on"], [1, "mj-placement-fieldpick-item"], ["type", "checkbox", "name", "mj-section-pick", 3, "change", "checked"], [1, "mj-placement-fieldpick-name"], ["role", "radiogroup", "aria-label", "Where in the group", 1, "mj-placement-fieldpick-where"], ["type", "radio", "name", "mj-field-position", "value", "start", 3, "ngModelChange", "ngModel"], ["type", "radio", "name", "mj-field-position", "value", "end", 3, "ngModelChange", "ngModel"], ["type", "checkbox", 3, "change", "checked"], ["type", "radio", "name", "mj-status", "value", "off", 3, "ngModelChange", "ngModel"], [1, "mj-placement-existing", "mj-placement-existing--compact"], [1, "mj-placement-mono", "mj-placement-existing-kind"]], template: function MjFormPlacementDialogComponent_Template(rf, ctx) { if (rf & 1) {
1454
+ i0.ɵɵelementStart(0, "div", 3)(1, "div", 4)(2, "div", 5)(3, "div", 6);
1455
+ i0.ɵɵtext(4, "Add to a form");
1456
+ i0.ɵɵelementEnd();
1457
+ i0.ɵɵelementStart(5, "h2", 7);
1458
+ i0.ɵɵtext(6);
1459
+ i0.ɵɵelementEnd()()();
1460
+ i0.ɵɵconditionalCreate(7, MjFormPlacementDialogComponent_Conditional_7_Template, 4, 1, "div", 8);
1461
+ i0.ɵɵconditionalCreate(8, MjFormPlacementDialogComponent_Conditional_8_Template, 2, 1, "mj-alert", 9);
1462
+ i0.ɵɵconditionalCreate(9, MjFormPlacementDialogComponent_Conditional_9_Template, 21, 14, "div", 10)(10, MjFormPlacementDialogComponent_Conditional_10_Template, 23, 6, "div", 11);
1463
+ i0.ɵɵelementStart(11, "div", 12)(12, "button", 13);
1464
+ i0.ɵɵlistener("click", function MjFormPlacementDialogComponent_Template_button_click_12_listener() { return ctx.OnApply(); });
1465
+ i0.ɵɵtext(13, "Add to the form");
1466
+ i0.ɵɵelementEnd();
1467
+ i0.ɵɵelementStart(14, "button", 14);
1468
+ i0.ɵɵlistener("click", function MjFormPlacementDialogComponent_Template_button_click_14_listener() { return ctx.OnCancel(); });
1469
+ i0.ɵɵtext(15, "Cancel");
1470
+ i0.ɵɵelementEnd();
1471
+ i0.ɵɵelement(16, "span", 15);
1472
+ i0.ɵɵelementStart(17, "span", 16);
1473
+ i0.ɵɵtext(18);
1474
+ i0.ɵɵelementEnd()()();
1475
+ i0.ɵɵtemplate(19, MjFormPlacementDialogComponent_ng_template_19_Template, 11, 7, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(21, MjFormPlacementDialogComponent_ng_template_21_Template, 5, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(23, MjFormPlacementDialogComponent_ng_template_23_Template, 93, 57, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
1476
+ } if (rf & 2) {
1477
+ i0.ɵɵadvance(6);
1478
+ i0.ɵɵtextInterpolate(ctx.ComponentName || ctx.State.Title || "Panel");
1479
+ i0.ɵɵadvance();
1480
+ i0.ɵɵconditional(ctx.Proposal ? 7 : -1);
1481
+ i0.ɵɵadvance();
1482
+ i0.ɵɵconditional(ctx.Context.FullCustomForm ? 8 : -1);
1483
+ i0.ɵɵadvance();
1484
+ i0.ɵɵconditional(ctx.ShowFormPreview ? 9 : 10);
1485
+ i0.ɵɵadvance(3);
1486
+ i0.ɵɵproperty("disabled", ctx.FieldClaimIsEmpty || ctx.SectionClaimIsEmpty);
1487
+ i0.ɵɵadvance(6);
1488
+ i0.ɵɵtextInterpolate(ctx.Summary);
1489
+ } }, dependencies: [i1.NgTemplateOutlet, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.SelectControlValueAccessor, i2.RadioControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.MJAlertComponent, i3.MJButtonDirective, i3.MjIconPickerComponent, i4.MjFormPlacementPreviewComponent], styles: ["\n\n\n\n\n\n[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n}\n\n.mj-placement[_ngcontent-%COMP%] {\n \n\n\n container: mj-placement / inline-size;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n max-height: 100%;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-head[_ngcontent-%COMP%] {\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-4);\n padding: var(--mj-space-5) var(--mj-space-6) var(--mj-space-4);\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.mj-placement-head-text[_ngcontent-%COMP%] { flex-grow: 1; min-width: 0; }\n\n.mj-placement-eyebrow[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n letter-spacing: 0.09em;\n text-transform: uppercase;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-title[_ngcontent-%COMP%] {\n margin: var(--mj-space-1) 0 0;\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n line-height: 1.2;\n}\n\n.mj-placement-proposal[_ngcontent-%COMP%] {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3) var(--mj-space-6);\n background: var(--mj-status-info-bg);\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-proposal[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n\n.mj-placement-alert[_ngcontent-%COMP%] { flex-shrink: 0; display: block; margin: var(--mj-space-4) var(--mj-space-6) 0; }\n\n\n.mj-placement-body[_ngcontent-%COMP%] { flex: 1 1 auto; display: flex; min-height: 0; }\n\n\n\n.mj-placement-preview[_ngcontent-%COMP%] {\n width: 380px;\n flex-shrink: 0;\n box-sizing: border-box;\n padding: var(--mj-space-5);\n border-right: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n overflow-y: auto;\n}\n\n.mj-placement-label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n letter-spacing: 0.09em;\n text-transform: uppercase;\n color: var(--mj-text-secondary);\n margin-bottom: var(--mj-space-2);\n}\n\n.mj-placement-hint[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-sm);\n line-height: 1.45;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-warn[_ngcontent-%COMP%] {\n margin: var(--mj-space-2) 0 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-status-warning-text);\n}\n\n\n\n.mj-placement-rail-note[_ngcontent-%COMP%] { margin-top: var(--mj-space-2); }\n\n\n\n.mj-placement-gap[_ngcontent-%COMP%] {\n border-radius: var(--mj-radius-md);\n padding: 0 var(--mj-space-2);\n}\n\n.mj-placement-gap.is-on[_ngcontent-%COMP%] {\n background: var(--mj-status-info-bg);\n padding-bottom: var(--mj-space-3);\n}\n\n.mj-placement-gap-pick[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n min-width: 0;\n min-height: 40px;\n cursor: pointer;\n}\n\n.mj-placement-gap-pick[_ngcontent-%COMP%] > input[_ngcontent-%COMP%] { flex-shrink: 0; }\n\n.mj-placement-gap-rule[_ngcontent-%COMP%] {\n flex: 1 1 0;\n min-width: var(--mj-space-2);\n height: 1px;\n background: var(--mj-border-subtle);\n}\n\n.mj-placement-gap.is-on[_ngcontent-%COMP%] .mj-placement-gap-rule[_ngcontent-%COMP%] { background: var(--mj-brand-primary); }\n\n.mj-placement-gap-text[_ngcontent-%COMP%] {\n display: flex;\n align-items: baseline;\n gap: var(--mj-space-2);\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.mj-placement-gap-name[_ngcontent-%COMP%] {\n flex-shrink: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-gap.is-on[_ngcontent-%COMP%] .mj-placement-gap-name[_ngcontent-%COMP%] {\n font-weight: var(--mj-font-semibold);\n color: var(--mj-brand-primary);\n}\n\n.mj-placement-gap-slot[_ngcontent-%COMP%] {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n\n\n\n.mj-placement-tab[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: var(--mj-space-1);\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mj-placement-tab-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: baseline;\n gap: var(--mj-space-2);\n padding: 0 var(--mj-space-1) var(--mj-space-1);\n}\n\n.mj-placement-tab-name[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-tab-kind[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-slot-card[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-brand-primary);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n}\n\n.mj-placement-slot-card-name[_ngcontent-%COMP%] { font-size: var(--mj-text-sm); font-weight: var(--mj-font-semibold); }\n.mj-placement-slot-card-hint[_ngcontent-%COMP%] { font-size: var(--mj-text-sm); color: var(--mj-text-secondary); }\n\n.mj-placement-existing[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n min-width: 0;\n min-height: 46px;\n box-sizing: border-box;\n padding: 0 var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-sunken);\n}\n\n\n\n.mj-placement-existing.is-replaced[_ngcontent-%COMP%] {\n border-color: var(--mj-status-error-text);\n background: var(--mj-status-error-bg);\n}\n\n.mj-placement-existing.is-replaced[_ngcontent-%COMP%] .mj-placement-existing-name[_ngcontent-%COMP%] {\n text-decoration: line-through;\n color: var(--mj-text-muted);\n}\n\n.mj-placement-existing.is-replaced[_ngcontent-%COMP%] .mj-placement-existing-kind[_ngcontent-%COMP%] {\n color: var(--mj-status-error-text);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-placement-tab.is-replaced[_ngcontent-%COMP%] {\n border-color: var(--mj-status-error-text);\n border-style: dashed;\n}\n\n.mj-placement-existing--compact[_ngcontent-%COMP%] { min-height: 40px; background: var(--mj-bg-surface-card); }\n.mj-placement-existing--nested[_ngcontent-%COMP%] { min-height: 38px; }\n.mj-placement-existing-name[_ngcontent-%COMP%] {\n flex-grow: 1;\n min-width: 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-placement-existing-kind[_ngcontent-%COMP%] {\n flex-shrink: 0;\n white-space: nowrap;\n font-size: var(--mj-text-xs);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n\n\n.mj-placement-settings[_ngcontent-%COMP%] {\n flex-grow: 1;\n min-width: 0;\n box-sizing: border-box;\n padding: var(--mj-space-5) var(--mj-space-6);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-5);\n overflow-y: auto;\n}\n\n.mj-placement-entity[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-entity[_ngcontent-%COMP%] span[_ngcontent-%COMP%] { color: var(--mj-text-secondary); }\n\n.mj-placement-grid-2[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mj-space-3); }\n.mj-placement-stack[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: var(--mj-space-2); }\n\n.mj-placement-choice[_ngcontent-%COMP%], \n.mj-placement-row[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n cursor: pointer;\n}\n\n.mj-placement-choice[_ngcontent-%COMP%] { align-items: flex-start; }\n.mj-placement-row[_ngcontent-%COMP%] { align-items: center; min-height: 44px; box-sizing: border-box; }\n\n.mj-placement-choice.is-on[_ngcontent-%COMP%], \n.mj-placement-row.is-on[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: var(--mj-status-info-bg);\n}\n\n.mj-placement-row.is-off[_ngcontent-%COMP%] { opacity: 0.55; cursor: not-allowed; }\n\n.mj-placement-choice-name[_ngcontent-%COMP%] { display: block; font-size: var(--mj-text-sm); font-weight: var(--mj-font-semibold); }\n\n.mj-placement-choice-hint[_ngcontent-%COMP%] {\n display: block;\n margin-top: 3px;\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-row-text[_ngcontent-%COMP%] { flex-grow: 1; min-width: 0; font-size: var(--mj-text-sm); }\n\n.mj-placement-select[_ngcontent-%COMP%] {\n height: 34px;\n padding: 0 var(--mj-space-2);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font: inherit;\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-fields[_ngcontent-%COMP%] { display: flex; gap: var(--mj-space-3); margin-top: var(--mj-space-3); }\n.mj-placement-field[_ngcontent-%COMP%] { flex-grow: 1; min-width: 0; }\n.mj-placement-field--icon[_ngcontent-%COMP%] { flex-grow: 0; width: 170px; }\n\n.mj-placement-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-field[_ngcontent-%COMP%] .mj-input[_ngcontent-%COMP%] { width: 100%; box-sizing: border-box; height: 44px; }\n\n.mj-placement-mono[_ngcontent-%COMP%] { font-family: var(--mj-font-family-mono); font-size: var(--mj-text-sm); }\n\n\n\n.mj-placement-foot[_ngcontent-%COMP%] {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n padding: var(--mj-space-4) var(--mj-space-6);\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n}\n\n.mj-placement-spacer[_ngcontent-%COMP%] { flex-grow: 1; }\n\n.mj-placement-summary[_ngcontent-%COMP%] {\n max-width: 520px;\n text-align: right;\n font-size: var(--mj-text-sm);\n line-height: 1.45;\n color: var(--mj-text-secondary);\n}\n\n@container mj-placement (max-width: 900px) {\n \n\n .mj-placement-body[_ngcontent-%COMP%] { flex-direction: column; overflow-y: auto; }\n .mj-placement-preview[_ngcontent-%COMP%], \n .mj-placement-settings[_ngcontent-%COMP%] { overflow: visible; }\n .mj-placement-preview[_ngcontent-%COMP%] { width: auto; border-right: 0; border-bottom: 1px solid var(--mj-border-subtle); }\n .mj-placement-grid-2[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); }\n .mj-placement-fields[_ngcontent-%COMP%] { flex-direction: column; }\n .mj-placement-field--icon[_ngcontent-%COMP%] { width: auto; }\n .mj-placement-summary[_ngcontent-%COMP%] { text-align: left; max-width: none; }\n}\n\n.mj-placement-row-note[_ngcontent-%COMP%] {\n display: block;\n margin-top: 2px;\n font-size: var(--mj-text-xs);\n color: var(--mj-status-warning-text);\n}\n\n.mj-placement-row-note--quiet[_ngcontent-%COMP%] {\n display: block;\n margin-top: 2px;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n}\n\n\n\n.mj-placement-slot-card--in-section[_ngcontent-%COMP%] {\n margin-left: var(--mj-space-4);\n margin-top: calc(var(--mj-space-1) * -1);\n}\n\n\n.mj-placement-fieldpick[_ngcontent-%COMP%] {\n margin: 0 0 0 var(--mj-space-6);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-sunken);\n}\n\n.mj-placement-fieldpick-legend[_ngcontent-%COMP%] {\n padding: 0 var(--mj-space-2);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-secondary);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.mj-placement-fieldpick-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: var(--mj-space-1) var(--mj-space-3);\n}\n\n.mj-placement-fieldpick-item[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-2);\n align-items: center;\n min-width: 0;\n padding: var(--mj-space-1) var(--mj-space-2);\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n}\n\n.mj-placement-fieldpick-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.mj-placement-fieldpick-item.is-on[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-active);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-fieldpick-name[_ngcontent-%COMP%] {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n\n\n.mj-placement-canvas[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n box-sizing: border-box;\n padding: var(--mj-space-4) var(--mj-space-5);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n border-right: 1px solid var(--mj-border-subtle);\n}\n\n\n\n\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] {\n flex: 0 0 400px;\n padding: var(--mj-space-2) var(--mj-space-5) var(--mj-space-5);\n gap: 0;\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] section[_ngcontent-%COMP%] {\n padding: var(--mj-space-4) 0;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] section[_ngcontent-%COMP%]:first-of-type { border-top: 0; }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-label[_ngcontent-%COMP%] { margin-bottom: var(--mj-space-2); }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-hint[_ngcontent-%COMP%], \n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-warn[_ngcontent-%COMP%] {\n margin-top: var(--mj-space-2);\n font-size: var(--mj-text-xs);\n}\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-entity[_ngcontent-%COMP%] {\n display: block;\n padding: 0;\n border: 0;\n line-height: 1.5;\n}\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-grid-2[_ngcontent-%COMP%] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mj-space-2); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-choice[_ngcontent-%COMP%] { align-items: center; gap: var(--mj-space-2); padding: var(--mj-space-2) var(--mj-space-3); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-choice-hint[_ngcontent-%COMP%] { display: none; }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fields[_ngcontent-%COMP%] { flex-direction: column; gap: var(--mj-space-3); margin-top: var(--mj-space-3); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-field--icon[_ngcontent-%COMP%] { width: auto; }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] { font-size: var(--mj-text-xs); }\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-stack[_ngcontent-%COMP%] {\n gap: 0;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-stack[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%] { border-top: 1px solid var(--mj-border-subtle); }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--mj-space-2) var(--mj-space-3);\n min-height: 0;\n padding: var(--mj-space-2) var(--mj-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row.is-on[_ngcontent-%COMP%] { background: var(--mj-status-info-bg); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%] > input[_ngcontent-%COMP%] { margin-top: 3px; }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row-text[_ngcontent-%COMP%] { flex: 1 1 0; min-width: 0; line-height: 1.45; }\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%]:not(.is-on) .mj-placement-row-note--quiet[_ngcontent-%COMP%], \n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%]:not(.is-on) > .mj-placement-select[_ngcontent-%COMP%] { display: none; }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%] > .mj-placement-select[_ngcontent-%COMP%] {\n flex: 0 0 calc(100% - 16px - var(--mj-space-3));\n min-width: 0;\n margin-left: calc(16px + var(--mj-space-3));\n text-overflow: ellipsis;\n}\n\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick[_ngcontent-%COMP%] {\n margin: 0;\n padding: 0 var(--mj-space-3) var(--mj-space-3) calc(16px + var(--mj-space-3) * 2);\n border: 0;\n border-radius: 0;\n background: var(--mj-status-info-bg);\n}\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-legend[_ngcontent-%COMP%] {\n float: left;\n width: 100%;\n margin: 0 0 var(--mj-space-1);\n padding: 0;\n letter-spacing: 0.06em;\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-grid[_ngcontent-%COMP%] {\n clear: both;\n grid-template-columns: minmax(0, 1fr);\n gap: 0;\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-item[_ngcontent-%COMP%] {\n padding: var(--mj-space-1) 0;\n border-radius: 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-item[_ngcontent-%COMP%]:hover { background: transparent; color: var(--mj-text-primary); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-item.is-on[_ngcontent-%COMP%] { background: transparent; color: var(--mj-text-primary); }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-item[_ngcontent-%COMP%] > input[_ngcontent-%COMP%] { margin: 0; flex-shrink: 0; }\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-name[_ngcontent-%COMP%] { white-space: normal; overflow: visible; }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick[_ngcontent-%COMP%] .mj-placement-warn[_ngcontent-%COMP%] { margin-top: var(--mj-space-1); }\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-fieldpick-where[_ngcontent-%COMP%] {\n margin-top: var(--mj-space-2);\n padding-top: var(--mj-space-2);\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-row[_ngcontent-%COMP%] > .mj-placement-select[_ngcontent-%COMP%] {\n border-color: var(--mj-border-default);\n}\n\n.mj-placement-settings--side[_ngcontent-%COMP%] .mj-placement-existing--compact[_ngcontent-%COMP%] {\n min-height: 0;\n padding: var(--mj-space-2) var(--mj-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n}\n\n.mj-placement-select--block[_ngcontent-%COMP%] { display: block; width: 100%; margin-top: var(--mj-space-2); }\n\n.mj-placement-where[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--mj-space-1) var(--mj-space-2);\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-where-text[_ngcontent-%COMP%] { font-weight: var(--mj-font-semibold); }\n\n.mj-placement-link[_ngcontent-%COMP%] {\n padding: 0;\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font: inherit;\n font-size: var(--mj-text-sm);\n cursor: pointer;\n}\n\n.mj-placement-link[_ngcontent-%COMP%]:hover { text-decoration: underline; }\n\n@container mj-placement (max-width: 900px) {\n .mj-placement-canvas[_ngcontent-%COMP%] { overflow: visible; border-right: 0; border-bottom: 1px solid var(--mj-border-subtle); }\n .mj-placement-settings--side[_ngcontent-%COMP%] { flex-basis: auto; }\n}\n\n\n\n.mj-placement-sublabel[_ngcontent-%COMP%] {\n margin: var(--mj-space-3) 0 var(--mj-space-2);\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-order[_ngcontent-%COMP%] {\n margin: 0;\n padding: 0;\n list-style: none;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n counter-reset: mj-placement-order;\n}\n\n.mj-placement-order-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n min-height: 36px;\n padding: var(--mj-space-1) var(--mj-space-2) var(--mj-space-1) var(--mj-space-3);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n counter-increment: mj-placement-order;\n}\n\n.mj-placement-order-item[_ngcontent-%COMP%]::before {\n content: counter(mj-placement-order);\n flex: 0 0 auto;\n min-width: 14px;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-order-item[_ngcontent-%COMP%] + .mj-placement-order-item[_ngcontent-%COMP%] { border-top: 1px solid var(--mj-border-subtle); }\n\n.mj-placement-order-item.is-this[_ngcontent-%COMP%] {\n background: var(--mj-status-info-bg);\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-placement-order-name[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-placement-order-moves[_ngcontent-%COMP%] { display: inline-flex; gap: var(--mj-space-1); }\n\n.mj-placement-order-move[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n padding: 0;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-placement-order-move[_ngcontent-%COMP%]:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n\n.mj-placement-order-move[_ngcontent-%COMP%]:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n}\n\n.mj-placement-order-move[_ngcontent-%COMP%]:disabled { opacity: 0.4; cursor: not-allowed; }\n\n\n.mj-placement-fieldpick-where[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-2) var(--mj-space-4);\n margin-top: var(--mj-space-2);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-fieldpick-where[_ngcontent-%COMP%] > label[_ngcontent-%COMP%] { display: inline-flex; align-items: center; gap: var(--mj-space-1); cursor: pointer; }"] });
1490
+ }
1491
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjFormPlacementDialogComponent, [{
1492
+ type: Component,
1493
+ args: [{ standalone: false, selector: 'mj-form-placement-dialog', template: "<div class=\"mj-placement\">\n\n <div class=\"mj-placement-head\">\n <div class=\"mj-placement-head-text\">\n <div class=\"mj-placement-eyebrow\">Add to a form</div>\n <h2 class=\"mj-placement-title\">{{ ComponentName || State.Title || 'Panel' }}</h2>\n </div>\n </div>\n\n @if (Proposal) {\n <div class=\"mj-placement-proposal\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i>\n <span>Suggested as a {{ Proposal.presentation === 'bare' ? 'bare strip' : 'panel' }}. Where it goes is yours to choose &mdash; nothing is saved until you apply.</span>\n </div>\n }\n\n @if (Context.FullCustomForm) {\n <mj-alert Variant=\"warning\" class=\"mj-placement-alert\">\n A full custom form is rendering {{ Context.EntityName }}. It draws its own body, so a panel\n saved here will not appear until that form is turned off.\n </mj-alert>\n }\n\n @if (ShowFormPreview) {\n <div class=\"mj-placement-body mj-placement-body--preview\">\n\n <!-- Left: the real form, scaled, with the panel drawn where it will go -->\n <div class=\"mj-placement-canvas\">\n <p class=\"mj-placement-hint\">\n The form as it will look, with your panel on it. Make your choices on the right.\n </p>\n <mj-form-placement-preview\n [Provider]=\"Provider\"\n [EntityName]=\"Context.EntityName\"\n [RecordKey]=\"RecordKey\"\n [Spec]=\"PreviewSpec\"\n [ReplacesRowID]=\"ReplacesRowID\"\n [PanelComponentSpec]=\"PanelComponentSpec\"\n [PanelComponentID]=\"PanelComponentID\"\n (Failed)=\"OnPreviewFailed()\">\n </mj-form-placement-preview>\n </div>\n\n <!-- Right: every answer, including the ones the preview sets by clicking -->\n <div class=\"mj-placement-settings mj-placement-settings--side\">\n\n <section>\n <div class=\"mj-placement-label\">Where it goes</div>\n <div class=\"mj-placement-where\">\n <span class=\"mj-placement-where-text\">{{ PlacementLine }}</span>\n @if (IsReplacing) {\n <button type=\"button\" class=\"mj-placement-link\" (click)=\"ClearReplacement()\">Replace nothing</button>\n }\n </div>\n <select class=\"mj-placement-select mj-placement-select--block\" aria-label=\"Position on the form\"\n [(ngModel)]=\"PositionValue\" name=\"mj-slot-select\">\n <optgroup label=\"Between blocks\">\n @for (choice of Slots; track choice.Slot) {\n <option [value]=\"choice.Slot\">{{ choice.Name }}</option>\n }\n </optgroup>\n @if (PlaceableSections.length > 0) {\n <optgroup label=\"Inside a section\">\n @for (section of PlaceableSections; track section.Key) {\n <option [value]=\"'in:' + section.Key + ':start'\">Top of {{ section.Title }}</option>\n <option [value]=\"'in:' + section.Key + ':end'\">Bottom of {{ section.Title }}</option>\n }\n </optgroup>\n }\n </select>\n @if (IsReplacing) {\n <p class=\"mj-placement-hint\">The position is used only when the panel replaces nothing.</p>\n }\n\n @if (OrderItems.length > 0) {\n <div class=\"mj-placement-sublabel\">Order in this position</div>\n <ol class=\"mj-placement-order\" aria-label=\"Order in this position\">\n @for (item of OrderItems; track item.Key) {\n <li class=\"mj-placement-order-item\" [class.is-this]=\"item.IsThis\">\n <span class=\"mj-placement-order-name\">{{ item.Title }}</span>\n @if (item.IsThis) {\n <span class=\"mj-placement-order-moves\">\n <button type=\"button\" class=\"mj-placement-order-move\" aria-label=\"Move up\"\n [disabled]=\"!CanMoveUp\" (click)=\"MoveInPosition('up')\">\n <i class=\"fa-solid fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"mj-placement-order-move\" aria-label=\"Move down\"\n [disabled]=\"!CanMoveDown\" (click)=\"MoveInPosition('down')\">\n <i class=\"fa-solid fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </span>\n }\n </li>\n }\n </ol>\n @if (MoveIsBlocked) {\n <p class=\"mj-placement-hint\">\n Two neighbouring panels share an order number, so this one cannot go between them.\n Move one of them first.\n </p>\n }\n }\n </section>\n\n <ng-container *ngTemplateOutlet=\"settings\"></ng-container>\n\n </div>\n </div>\n } @else {\n <div class=\"mj-placement-body\">\n\n <!-- Left: the form, with each slot as a target -->\n <div class=\"mj-placement-preview\">\n <div class=\"mj-placement-label\">Where it goes</div>\n <p class=\"mj-placement-hint\">\n The <strong>{{ Context.EntityName }}</strong> form as it will look. Pick one of the positions\n between the blocks that are already there.\n </p>\n @if (Probing) {\n <p class=\"mj-placement-hint\">Reading the positions this form offers&hellip;</p>\n } @else if (SlotsAreAssumed) {\n <p class=\"mj-placement-hint\">\n Positions shown are the ones generated forms offer. This form could not be read, so a\n hand-written custom template may differ.\n </p>\n }\n\n @for (choice of SlotsAbove; track choice.Slot) {\n <ng-container *ngTemplateOutlet=\"slotRow; context: { $implicit: choice }\"></ng-container>\n }\n\n @if (SectionsAreInDetailsTab) {\n <div class=\"mj-placement-tab\" [class.is-replaced]=\"IsWholeDetailsTabReplaced\">\n <div class=\"mj-placement-tab-head\">\n <i class=\"fa-solid fa-id-card\" aria-hidden=\"true\"></i>\n <span class=\"mj-placement-tab-name\">Details</span>\n <span class=\"mj-placement-tab-kind\">one rail tab &middot; {{ DetailsTabSectionCount }} field groups</span>\n </div>\n @for (section of Context.Sections; track section.Key) {\n <div class=\"mj-placement-existing mj-placement-existing--nested\"\n [class.is-replaced]=\"IsReplaced(section.Key)\">\n <span class=\"mj-placement-existing-name\">{{ section.Title }}</span>\n <span class=\"mj-placement-existing-kind\">\n {{ IsReplaced(section.Key) ? 'replaced' : 'field group' }}\n </span>\n </div>\n @if (HostsFieldPanel(section.Key)) {\n <ng-container *ngTemplateOutlet=\"fieldPanelCard\"></ng-container>\n }\n }\n </div>\n } @else {\n @for (section of Context.Sections; track section.Key) {\n <div class=\"mj-placement-existing\" [class.is-replaced]=\"IsReplaced(section.Key)\">\n <span class=\"mj-placement-existing-name\">{{ section.Title }}</span>\n <span class=\"mj-placement-existing-kind\">\n {{ IsReplaced(section.Key) ? 'replaced' : 'field group' }}\n </span>\n </div>\n @if (HostsFieldPanel(section.Key)) {\n <ng-container *ngTemplateOutlet=\"fieldPanelCard\"></ng-container>\n }\n }\n }\n\n @if (SlotAfterFields) {\n <ng-container *ngTemplateOutlet=\"slotRow; context: { $implicit: SlotAfterFields }\"></ng-container>\n }\n\n @for (related of Context.Related; track related.Entity + related.JoinField; let i = $index) {\n <div class=\"mj-placement-existing\" [class.is-replaced]=\"IsRelatedReplaced(i)\">\n <span class=\"mj-placement-existing-name\">{{ related.DisplayName }}</span>\n <span class=\"mj-placement-existing-kind\">\n {{ IsRelatedReplaced(i) ? 'replaced' : 'auto grid' }}\n </span>\n </div>\n }\n\n @for (choice of SlotsBelow; track choice.Slot) {\n <ng-container *ngTemplateOutlet=\"slotRow; context: { $implicit: choice }\"></ng-container>\n }\n\n @if (HasRail) {\n <p class=\"mj-placement-hint mj-placement-rail-note\">\n @if (AddsRailItem) {\n Your panel gets a rail item of its own.\n } @else if (TargetRail) {\n Your panel appears under <strong>{{ TargetRail.Title }}</strong> in the rail.\n } @else {\n A bare strip has no rail item. It sits above every section.\n }\n </p>\n }\n </div>\n\n <!-- Right: the answers -->\n <div class=\"mj-placement-settings\">\n <ng-container *ngTemplateOutlet=\"settings\"></ng-container>\n </div>\n </div>\n }\n\n <div class=\"mj-placement-foot\">\n <button type=\"button\" mjButton variant=\"primary\" [disabled]=\"FieldClaimIsEmpty || SectionClaimIsEmpty\" (click)=\"OnApply()\">Add to the form</button>\n <button type=\"button\" mjButton (click)=\"OnCancel()\">Cancel</button>\n <span class=\"mj-placement-spacer\"></span>\n <span class=\"mj-placement-summary\">{{ Summary }}</span>\n </div>\n\n</div>\n\n<!--\n One position. Drawn as a gap between the blocks rather than as a block of its own: a\n slot is a place to insert something, not another thing on the form, and boxing it like\n the content made the two read as peers. Selected, the gap opens and holds the panel.\n-->\n<ng-template #slotRow let-choice>\n <div class=\"mj-placement-gap\" [class.is-on]=\"State.Slot === choice.Slot\">\n <label class=\"mj-placement-gap-pick\">\n <input type=\"radio\" name=\"mj-slot\" [value]=\"choice.Slot\" [(ngModel)]=\"State.Slot\">\n <span class=\"mj-placement-gap-rule\" aria-hidden=\"true\"></span>\n <span class=\"mj-placement-gap-text\">\n <span class=\"mj-placement-gap-name\">{{ choice.Name }}</span>\n <span class=\"mj-placement-mono mj-placement-gap-slot\">{{ choice.Label }}</span>\n </span>\n <span class=\"mj-placement-gap-rule\" aria-hidden=\"true\"></span>\n </label>\n @if (State.Slot === choice.Slot) {\n <div class=\"mj-placement-slot-card\">\n <span class=\"mj-placement-slot-card-name\">{{ State.Title || ComponentName || 'Your panel' }}</span>\n <span class=\"mj-placement-slot-card-hint\">Your panel lands here</span>\n </div>\n }\n </div>\n</ng-template>\n\n<!--\n A panel standing in for a field belongs inside that field's section, at the top. Drawn\n under the section block rather than as a slot gap, because the slot choice does not\n apply to this claim.\n-->\n<ng-template #fieldPanelCard>\n <div class=\"mj-placement-slot-card mj-placement-slot-card--in-section\">\n <span class=\"mj-placement-slot-card-name\">{{ State.Title || ComponentName || 'Your panel' }}</span>\n <span class=\"mj-placement-slot-card-hint\">\n at the top of this section, in place of {{ ChosenFieldSummary }}\n </span>\n </div>\n</ng-template>\n\n<!--\n The answers, shared by both layouts. With the form preview on, clicks on the form and these\n controls edit the same state, so either one can be used and each shows what the other chose.\n-->\n<ng-template #settings>\n\n <section>\n <div class=\"mj-placement-label\">Applies to</div>\n <div class=\"mj-placement-entity\">\n <strong>{{ Context.EntityName }}</strong>\n <span>&middot; every record of this entity, visible to {{ VisibleTo }}</span>\n </div>\n </section>\n\n <section>\n <div class=\"mj-placement-label\">How it looks</div>\n <div class=\"mj-placement-grid-2\">\n <label class=\"mj-placement-choice\" [class.is-on]=\"State.Presentation === 'panel'\">\n <input type=\"radio\" name=\"mj-presentation\" value=\"panel\" [(ngModel)]=\"State.Presentation\">\n <span>\n <span class=\"mj-placement-choice-name\">Panel</span>\n <span class=\"mj-placement-choice-hint\">Collapsible section with a header, and its own item in the side rail.</span>\n </span>\n </label>\n <label class=\"mj-placement-choice\" [class.is-on]=\"State.Presentation === 'bare'\">\n <input type=\"radio\" name=\"mj-presentation\" value=\"bare\" [(ngModel)]=\"State.Presentation\">\n <span>\n <span class=\"mj-placement-choice-name\">Bare</span>\n <span class=\"mj-placement-choice-hint\">A strip with no chrome. No header, no rail item.</span>\n </span>\n </label>\n </div>\n\n @if (State.Presentation === 'panel') {\n <div class=\"mj-placement-fields\">\n <div class=\"mj-placement-field\">\n <label for=\"mj-placement-title\">Header and rail label</label>\n <input id=\"mj-placement-title\" type=\"text\" class=\"mj-input\" [(ngModel)]=\"State.Title\" name=\"mj-title\">\n </div>\n <div class=\"mj-placement-field mj-placement-field--icon\">\n <label for=\"mj-placement-icon\">Icon</label>\n <mj-icon-picker id=\"mj-placement-icon\" AriaLabel=\"Panel icon\"\n [(ngModel)]=\"State.Icon\" name=\"mj-icon\"></mj-icon-picker>\n </div>\n </div>\n @if (!HasTitle) {\n <p class=\"mj-placement-warn\">A panel with no label shows an empty header and an unnamed rail item.</p>\n }\n }\n @if (IsPersistentHero) {\n <p class=\"mj-placement-warn\">A bare strip has no rail item. On a form with a side rail it stays above every section rather than belonging to one.</p>\n } @else if (BareJoinsReplacedTab && HasRail) {\n <p class=\"mj-placement-hint\">A bare strip that replaces blocks takes their place, in their tab.</p>\n }\n </section>\n\n <section>\n <div class=\"mj-placement-label\">Does it replace anything?</div>\n <div class=\"mj-placement-stack\">\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'none'\">\n <input type=\"radio\" name=\"mj-replace\" value=\"none\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">No &mdash; add it alongside what is already there</span>\n </label>\n\n @if (CanReplaceRailTab) {\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'rail-tab'\">\n <input type=\"radio\" name=\"mj-replace\" value=\"rail-tab\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">\n Replace a <strong>whole tab</strong>\n <span class=\"mj-placement-row-note--quiet\">all {{ ChosenRailTabSize }} blocks in it go and your panel becomes the tab</span>\n </span>\n <select class=\"mj-placement-select\" aria-label=\"Which tab to stand in for\"\n [disabled]=\"State.ReplaceMode !== 'rail-tab'\" [(ngModel)]=\"State.ReplaceRailKey\" name=\"mj-rail\">\n @for (tab of RailTabs; track tab.Key) {\n <option [value]=\"tab.Key\">{{ tab.Title }}</option>\n }\n </select>\n </label>\n }\n\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'section'\"\n [class.is-off]=\"!CanReplaceSection\">\n <input type=\"radio\" name=\"mj-replace\" value=\"section\"\n [disabled]=\"!CanReplaceSection\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">\n @if (SectionsAreInDetailsTab) {\n Replace <strong>blocks</strong> inside the Details tab\n <span class=\"mj-placement-row-note--quiet\">the tab and the blocks you leave stay</span>\n } @else {\n Replace <strong>field groups</strong>\n }\n @if (SectionTargetsAreDerived) {\n <span class=\"mj-placement-row-note\">from entity metadata &mdash; may not match this form</span>\n }\n </span>\n </label>\n\n @if (State.ReplaceMode === 'section') {\n <!-- Several blocks, all in one tab: the panel takes the place of the first. -->\n <fieldset class=\"mj-placement-fieldpick\">\n <legend class=\"mj-placement-fieldpick-legend\">Blocks your panel takes the place of</legend>\n <div class=\"mj-placement-fieldpick-grid\">\n @for (section of Context.Sections; track section.Key) {\n <label class=\"mj-placement-fieldpick-item\" [class.is-on]=\"IsSectionChosen(section.Key)\">\n <input type=\"checkbox\" name=\"mj-section-pick\"\n [checked]=\"IsSectionChosen(section.Key)\"\n (change)=\"ToggleSection(section.Key, $any($event.target).checked)\">\n <span class=\"mj-placement-fieldpick-name\">{{ SectionLabel(section) }}</span>\n </label>\n }\n </div>\n @if (SectionClaimIsEmpty) {\n <p class=\"mj-placement-warn\">Pick at least one block, or this panel stands in for nothing.</p>\n }\n </fieldset>\n }\n\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'field'\"\n [class.is-off]=\"!CanReplaceField\">\n <input type=\"radio\" name=\"mj-replace\" value=\"field\"\n [disabled]=\"!CanReplaceField\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">\n Replace <strong>fields</strong> inside one group\n <span class=\"mj-placement-row-note--quiet\">your panel draws inside that group, in their place</span>\n @if (!CanReplaceField) {\n <span class=\"mj-placement-row-note\">this form's fields could not be read</span>\n }\n </span>\n <select class=\"mj-placement-select\" aria-label=\"Which group to take fields from\"\n [disabled]=\"State.ReplaceMode !== 'field'\"\n [ngModel]=\"State.ReplaceFieldSectionKey\" (ngModelChange)=\"SetFieldSection($event)\"\n name=\"mj-field-section\">\n @for (section of FieldSections; track section.Key) {\n <option [value]=\"section.Key\">{{ section.Title }}</option>\n }\n </select>\n </label>\n\n @if (State.ReplaceMode === 'field') {\n <!-- One group at a time: the panel renders at the top of a single section, so\n fields from two of them would describe a panel with two places to be. -->\n <fieldset class=\"mj-placement-fieldpick\">\n <legend class=\"mj-placement-fieldpick-legend\">Fields your panel takes the place of</legend>\n <div class=\"mj-placement-fieldpick-grid\">\n @for (field of FieldChoices; track field.Name) {\n <label class=\"mj-placement-fieldpick-item\" [class.is-on]=\"IsFieldChosen(field.Name)\">\n <input type=\"checkbox\"\n [checked]=\"IsFieldChosen(field.Name)\"\n (change)=\"ToggleField(field.Name, $any($event.target).checked)\">\n <span class=\"mj-placement-fieldpick-name\">{{ field.Label }}</span>\n </label>\n }\n </div>\n @if (FieldClaimIsEmpty) {\n <p class=\"mj-placement-warn\">Pick at least one field, or this panel stands in for nothing.</p>\n }\n <div class=\"mj-placement-fieldpick-where\" role=\"radiogroup\" aria-label=\"Where in the group\">\n <label>\n <input type=\"radio\" name=\"mj-field-position\" value=\"start\" [(ngModel)]=\"State.SectionPosition\">\n At the top of the group\n </label>\n <label>\n <input type=\"radio\" name=\"mj-field-position\" value=\"end\" [(ngModel)]=\"State.SectionPosition\">\n At the bottom\n </label>\n </div>\n </fieldset>\n }\n\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'related'\"\n [class.is-off]=\"!CanReplaceRelated\">\n <input type=\"radio\" name=\"mj-replace\" value=\"related\"\n [disabled]=\"!CanReplaceRelated\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">Replace a <strong>related grid</strong></span>\n <select class=\"mj-placement-select\" aria-label=\"Which related grid to take over\"\n [disabled]=\"State.ReplaceMode !== 'related'\" [(ngModel)]=\"State.ReplaceRelatedIndex\" name=\"mj-related\">\n @for (related of Context.Related; track related.Entity + related.JoinField; let i = $index) {\n <option [ngValue]=\"i\">{{ related.DisplayName }} via {{ related.JoinField }}</option>\n }\n </select>\n </label>\n\n <label class=\"mj-placement-row\" [class.is-on]=\"State.ReplaceMode === 'contribution'\"\n [class.is-off]=\"!CanReplaceContribution\">\n <input type=\"radio\" name=\"mj-replace\" value=\"contribution\"\n [disabled]=\"!CanReplaceContribution\" [(ngModel)]=\"State.ReplaceMode\">\n <span class=\"mj-placement-row-text\">Replace a <strong>panel already here</strong></span>\n <select class=\"mj-placement-select\" aria-label=\"Which panel to replace\"\n [disabled]=\"State.ReplaceMode !== 'contribution'\" [(ngModel)]=\"State.ReplaceContributionIndex\" name=\"mj-existing\">\n @for (item of Context.Existing; track item.Key; let i = $index) {\n <option [ngValue]=\"i\">{{ item.Title }}</option>\n }\n </select>\n </label>\n </div>\n </section>\n\n <section>\n <div class=\"mj-placement-label\">When it starts</div>\n <div class=\"mj-placement-stack\">\n <label class=\"mj-placement-row\" [class.is-on]=\"StartChoice === 'now'\">\n <input type=\"radio\" name=\"mj-status\" value=\"now\" [(ngModel)]=\"StartChoice\">\n <span class=\"mj-placement-row-text\">Right away</span>\n </label>\n <label class=\"mj-placement-row\" [class.is-on]=\"StartChoice === 'draft'\">\n <input type=\"radio\" name=\"mj-status\" value=\"draft\" [(ngModel)]=\"StartChoice\">\n <span class=\"mj-placement-row-text\">Save as a draft</span>\n </label>\n @if (OfferKeepOff) {\n <label class=\"mj-placement-row\" [class.is-on]=\"StartChoice === 'off'\">\n <input type=\"radio\" name=\"mj-status\" value=\"off\" [(ngModel)]=\"StartChoice\">\n <span class=\"mj-placement-row-text\">Keep it off</span>\n </label>\n }\n </div>\n <p class=\"mj-placement-hint\">A draft is stored but rendered for nobody until you turn it on.</p>\n </section>\n\n @if (Context.Existing.length > 0) {\n <section>\n <div class=\"mj-placement-label\">Already on this form</div>\n <div class=\"mj-placement-stack\">\n @for (item of Context.Existing; track item.Key) {\n <div class=\"mj-placement-existing mj-placement-existing--compact\">\n <span class=\"mj-placement-existing-name\">{{ item.Title }}</span>\n <span class=\"mj-placement-mono mj-placement-existing-kind\">{{ item.Slot }}</span>\n </div>\n }\n </div>\n </section>\n }\n</ng-template>\n", styles: ["/*\n * The dialog host is a bounded flex column that clips (max-height 90vh, overflow hidden),\n * so this component must shrink inside it and hand the leftover height to the two scrolling\n * columns. Without `min-height: 0` on every link in that chain, each box keeps its content\n * height, the columns never overflow, and the surplus is clipped with no way to reach it.\n */\n:host {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n}\n\n.mj-placement {\n /* Sized by its own width, not the window's. This dialog is opened both as a wide modal\n and inside a drawer, and a viewport media query cannot tell those apart: on a desktop\n it stays two-column at any container width and the columns crush each other. */\n container: mj-placement / inline-size;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n max-height: 100%;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-head {\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-4);\n padding: var(--mj-space-5) var(--mj-space-6) var(--mj-space-4);\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.mj-placement-head-text { flex-grow: 1; min-width: 0; }\n\n.mj-placement-eyebrow {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n letter-spacing: 0.09em;\n text-transform: uppercase;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-title {\n margin: var(--mj-space-1) 0 0;\n font-size: var(--mj-text-xl);\n font-weight: var(--mj-font-semibold);\n line-height: 1.2;\n}\n\n.mj-placement-proposal {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3) var(--mj-space-6);\n background: var(--mj-status-info-bg);\n border-bottom: 1px solid var(--mj-border-subtle);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-proposal i { color: var(--mj-brand-primary); }\n\n.mj-placement-alert { flex-shrink: 0; display: block; margin: var(--mj-space-4) var(--mj-space-6) 0; }\n\n/* The only box that grows: everything else keeps its height, this one takes the rest. */\n.mj-placement-body { flex: 1 1 auto; display: flex; min-height: 0; }\n\n/* ---- left: the form preview ---- */\n\n.mj-placement-preview {\n width: 380px;\n flex-shrink: 0;\n box-sizing: border-box;\n padding: var(--mj-space-5);\n border-right: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n overflow-y: auto;\n}\n\n.mj-placement-label {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n letter-spacing: 0.09em;\n text-transform: uppercase;\n color: var(--mj-text-secondary);\n margin-bottom: var(--mj-space-2);\n}\n\n.mj-placement-hint {\n margin: 0;\n font-size: var(--mj-text-sm);\n line-height: 1.45;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-warn {\n margin: var(--mj-space-2) 0 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-status-warning-text);\n}\n\n/* The rail item the panel will join, stated in a line rather than drawn as a list. A\n miniature of the rail beside the body left too little width for either to be legible. */\n.mj-placement-rail-note { margin-top: var(--mj-space-2); }\n\n/* A position is a gap between the blocks, not a block. No border box, no fill: it must\n not read as a second kind of content sitting beside Contact Information. */\n.mj-placement-gap {\n border-radius: var(--mj-radius-md);\n padding: 0 var(--mj-space-2);\n}\n\n.mj-placement-gap.is-on {\n background: var(--mj-status-info-bg);\n padding-bottom: var(--mj-space-3);\n}\n\n.mj-placement-gap-pick {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n min-width: 0;\n min-height: 40px;\n cursor: pointer;\n}\n\n.mj-placement-gap-pick > input { flex-shrink: 0; }\n\n.mj-placement-gap-rule {\n flex: 1 1 0;\n min-width: var(--mj-space-2);\n height: 1px;\n background: var(--mj-border-subtle);\n}\n\n.mj-placement-gap.is-on .mj-placement-gap-rule { background: var(--mj-brand-primary); }\n\n.mj-placement-gap-text {\n display: flex;\n align-items: baseline;\n gap: var(--mj-space-2);\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.mj-placement-gap-name {\n flex-shrink: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-gap.is-on .mj-placement-gap-name {\n font-weight: var(--mj-font-semibold);\n color: var(--mj-brand-primary);\n}\n\n.mj-placement-gap-slot {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n/* The field groups the side rail folds into one tab, drawn as the one tab they are. A\n generated group titled \"Details\" inside a tab also titled \"Details\" is otherwise two\n things of the same name at the same level. */\n.mj-placement-tab {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: var(--mj-space-1);\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mj-placement-tab-head {\n display: flex;\n align-items: baseline;\n gap: var(--mj-space-2);\n padding: 0 var(--mj-space-1) var(--mj-space-1);\n}\n\n.mj-placement-tab-name {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-tab-kind {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-slot-card {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-brand-primary);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n}\n\n.mj-placement-slot-card-name { font-size: var(--mj-text-sm); font-weight: var(--mj-font-semibold); }\n.mj-placement-slot-card-hint { font-size: var(--mj-text-sm); color: var(--mj-text-secondary); }\n\n.mj-placement-existing {\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n min-width: 0;\n min-height: 46px;\n box-sizing: border-box;\n padding: 0 var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-sunken);\n}\n\n/* A block this choice takes off the form. Struck rather than hidden: the point is to\n show how much the choice covers, which needs the blocks still in place to count. */\n.mj-placement-existing.is-replaced {\n border-color: var(--mj-status-error-text);\n background: var(--mj-status-error-bg);\n}\n\n.mj-placement-existing.is-replaced .mj-placement-existing-name {\n text-decoration: line-through;\n color: var(--mj-text-muted);\n}\n\n.mj-placement-existing.is-replaced .mj-placement-existing-kind {\n color: var(--mj-status-error-text);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-placement-tab.is-replaced {\n border-color: var(--mj-status-error-text);\n border-style: dashed;\n}\n\n.mj-placement-existing--compact { min-height: 40px; background: var(--mj-bg-surface-card); }\n.mj-placement-existing--nested { min-height: 38px; }\n.mj-placement-existing-name {\n flex-grow: 1;\n min-width: 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-placement-existing-kind {\n flex-shrink: 0;\n white-space: nowrap;\n font-size: var(--mj-text-xs);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n/* ---- right: the answers ---- */\n\n.mj-placement-settings {\n flex-grow: 1;\n min-width: 0;\n box-sizing: border-box;\n padding: var(--mj-space-5) var(--mj-space-6);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-5);\n overflow-y: auto;\n}\n\n.mj-placement-entity {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-entity span { color: var(--mj-text-secondary); }\n\n.mj-placement-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mj-space-3); }\n.mj-placement-stack { display: flex; flex-direction: column; gap: var(--mj-space-2); }\n\n.mj-placement-choice,\n.mj-placement-row {\n display: flex;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n cursor: pointer;\n}\n\n.mj-placement-choice { align-items: flex-start; }\n.mj-placement-row { align-items: center; min-height: 44px; box-sizing: border-box; }\n\n.mj-placement-choice.is-on,\n.mj-placement-row.is-on {\n border-color: var(--mj-brand-primary);\n background: var(--mj-status-info-bg);\n}\n\n.mj-placement-row.is-off { opacity: 0.55; cursor: not-allowed; }\n\n.mj-placement-choice-name { display: block; font-size: var(--mj-text-sm); font-weight: var(--mj-font-semibold); }\n\n.mj-placement-choice-hint {\n display: block;\n margin-top: 3px;\n font-size: var(--mj-text-sm);\n line-height: 1.4;\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-row-text { flex-grow: 1; min-width: 0; font-size: var(--mj-text-sm); }\n\n.mj-placement-select {\n height: 34px;\n padding: 0 var(--mj-space-2);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font: inherit;\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-fields { display: flex; gap: var(--mj-space-3); margin-top: var(--mj-space-3); }\n.mj-placement-field { flex-grow: 1; min-width: 0; }\n.mj-placement-field--icon { flex-grow: 0; width: 170px; }\n\n.mj-placement-field label {\n display: block;\n margin-bottom: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-field .mj-input { width: 100%; box-sizing: border-box; height: 44px; }\n\n.mj-placement-mono { font-family: var(--mj-font-family-mono); font-size: var(--mj-text-sm); }\n\n/* ---- footer ---- */\n\n.mj-placement-foot {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-3);\n padding: var(--mj-space-4) var(--mj-space-6);\n border-top: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n}\n\n.mj-placement-spacer { flex-grow: 1; }\n\n.mj-placement-summary {\n max-width: 520px;\n text-align: right;\n font-size: var(--mj-text-sm);\n line-height: 1.45;\n color: var(--mj-text-secondary);\n}\n\n@container mj-placement (max-width: 900px) {\n /* Stacked, two independent scrollers in a narrow space are worse than one: the body\n scrolls as a whole and the columns size to their content. */\n .mj-placement-body { flex-direction: column; overflow-y: auto; }\n .mj-placement-preview,\n .mj-placement-settings { overflow: visible; }\n .mj-placement-preview { width: auto; border-right: 0; border-bottom: 1px solid var(--mj-border-subtle); }\n .mj-placement-grid-2 { grid-template-columns: minmax(0, 1fr); }\n .mj-placement-fields { flex-direction: column; }\n .mj-placement-field--icon { width: auto; }\n .mj-placement-summary { text-align: left; max-width: none; }\n}\n\n.mj-placement-row-note {\n display: block;\n margin-top: 2px;\n font-size: var(--mj-text-xs);\n color: var(--mj-status-warning-text);\n}\n\n.mj-placement-row-note--quiet {\n display: block;\n margin-top: 2px;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n}\n\n/* A panel standing in for a field draws inside the section, so it is indented to the\n same depth as the blocks around it rather than spanning the preview. */\n.mj-placement-slot-card--in-section {\n margin-left: var(--mj-space-4);\n margin-top: calc(var(--mj-space-1) * -1);\n}\n\n/* The field picker sits under its radio row, indented to read as part of that choice. */\n.mj-placement-fieldpick {\n margin: 0 0 0 var(--mj-space-6);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-sunken);\n}\n\n.mj-placement-fieldpick-legend {\n padding: 0 var(--mj-space-2);\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-secondary);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.mj-placement-fieldpick-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: var(--mj-space-1) var(--mj-space-3);\n}\n\n.mj-placement-fieldpick-item {\n display: flex;\n gap: var(--mj-space-2);\n align-items: center;\n min-width: 0;\n padding: var(--mj-space-1) var(--mj-space-2);\n border-radius: var(--mj-radius-sm);\n cursor: pointer;\n}\n\n.mj-placement-fieldpick-item:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.mj-placement-fieldpick-item.is-on {\n background: var(--mj-bg-surface-active);\n color: var(--mj-text-primary);\n}\n\n.mj-placement-fieldpick-name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* ---- preview layout: the real form, scaled, beside a narrow column of answers ---- */\n\n.mj-placement-canvas {\n flex: 1 1 auto;\n min-width: 0;\n box-sizing: border-box;\n padding: var(--mj-space-4) var(--mj-space-5);\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n border-right: 1px solid var(--mj-border-subtle);\n}\n\n/* ---- the column beside the preview ----\n One quiet column: sections split by hairlines instead of boxes, every choice list drawn as a\n single bordered list, and only the chosen row's extras (its dropdown and note) shown. The\n controls are the ones the list layout has; only their arrangement differs. */\n\n.mj-placement-settings--side {\n flex: 0 0 400px;\n padding: var(--mj-space-2) var(--mj-space-5) var(--mj-space-5);\n gap: 0;\n}\n\n.mj-placement-settings--side section {\n padding: var(--mj-space-4) 0;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.mj-placement-settings--side section:first-of-type { border-top: 0; }\n\n.mj-placement-settings--side .mj-placement-label { margin-bottom: var(--mj-space-2); }\n\n.mj-placement-settings--side .mj-placement-hint,\n.mj-placement-settings--side .mj-placement-warn {\n margin-top: var(--mj-space-2);\n font-size: var(--mj-text-xs);\n}\n\n/* Applies to: a line of text, not a card. */\n.mj-placement-settings--side .mj-placement-entity {\n display: block;\n padding: 0;\n border: 0;\n line-height: 1.5;\n}\n\n/* How it looks: two compact options side by side; the summary line says what each does. */\n.mj-placement-settings--side .mj-placement-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mj-space-2); }\n.mj-placement-settings--side .mj-placement-choice { align-items: center; gap: var(--mj-space-2); padding: var(--mj-space-2) var(--mj-space-3); }\n.mj-placement-settings--side .mj-placement-choice-hint { display: none; }\n\n.mj-placement-settings--side .mj-placement-fields { flex-direction: column; gap: var(--mj-space-3); margin-top: var(--mj-space-3); }\n.mj-placement-settings--side .mj-placement-field--icon { width: auto; }\n.mj-placement-settings--side .mj-placement-field label { font-size: var(--mj-text-xs); }\n\n/* Choice lists: one bordered list, rows split by hairlines. */\n.mj-placement-settings--side .mj-placement-stack {\n gap: 0;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-placement-settings--side .mj-placement-stack > * + * { border-top: 1px solid var(--mj-border-subtle); }\n\n.mj-placement-settings--side .mj-placement-row {\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--mj-space-2) var(--mj-space-3);\n min-height: 0;\n padding: var(--mj-space-2) var(--mj-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n}\n\n.mj-placement-settings--side .mj-placement-row.is-on { background: var(--mj-status-info-bg); }\n.mj-placement-settings--side .mj-placement-row > input { margin-top: 3px; }\n.mj-placement-settings--side .mj-placement-row-text { flex: 1 1 0; min-width: 0; line-height: 1.45; }\n\n/* Only the chosen row shows its note and its dropdown; the others are one line each. */\n.mj-placement-settings--side .mj-placement-row:not(.is-on) .mj-placement-row-note--quiet,\n.mj-placement-settings--side .mj-placement-row:not(.is-on) > .mj-placement-select { display: none; }\n\n.mj-placement-settings--side .mj-placement-row > .mj-placement-select {\n flex: 0 0 calc(100% - 16px - var(--mj-space-3));\n min-width: 0;\n margin-left: calc(16px + var(--mj-space-3));\n text-overflow: ellipsis;\n}\n\n/* The block and field pickers open inside the list, under their row, lined up with the row's\n text. One column, so a name is never cut short; the checkbox shows what is chosen. */\n.mj-placement-settings--side .mj-placement-fieldpick {\n margin: 0;\n padding: 0 var(--mj-space-3) var(--mj-space-3) calc(16px + var(--mj-space-3) * 2);\n border: 0;\n border-radius: 0;\n background: var(--mj-status-info-bg);\n}\n\n/* A legend sits on the fieldset's border by default; floated, it is ordinary content. */\n.mj-placement-settings--side .mj-placement-fieldpick-legend {\n float: left;\n width: 100%;\n margin: 0 0 var(--mj-space-1);\n padding: 0;\n letter-spacing: 0.06em;\n}\n\n.mj-placement-settings--side .mj-placement-fieldpick-grid {\n clear: both;\n grid-template-columns: minmax(0, 1fr);\n gap: 0;\n}\n\n.mj-placement-settings--side .mj-placement-fieldpick-item {\n padding: var(--mj-space-1) 0;\n border-radius: 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-settings--side .mj-placement-fieldpick-item:hover { background: transparent; color: var(--mj-text-primary); }\n.mj-placement-settings--side .mj-placement-fieldpick-item.is-on { background: transparent; color: var(--mj-text-primary); }\n.mj-placement-settings--side .mj-placement-fieldpick-item > input { margin: 0; flex-shrink: 0; }\n.mj-placement-settings--side .mj-placement-fieldpick-name { white-space: normal; overflow: visible; }\n\n.mj-placement-settings--side .mj-placement-fieldpick .mj-placement-warn { margin-top: var(--mj-space-1); }\n\n.mj-placement-settings--side .mj-placement-fieldpick-where {\n margin-top: var(--mj-space-2);\n padding-top: var(--mj-space-2);\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n/* The group picker for a field claim sits in its row; drawn as a field, not a white slab. */\n.mj-placement-settings--side .mj-placement-row > .mj-placement-select {\n border-color: var(--mj-border-default);\n}\n\n.mj-placement-settings--side .mj-placement-existing--compact {\n min-height: 0;\n padding: var(--mj-space-2) var(--mj-space-3);\n border: 0;\n border-radius: 0;\n background: transparent;\n}\n\n.mj-placement-select--block { display: block; width: 100%; margin-top: var(--mj-space-2); }\n\n.mj-placement-where {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--mj-space-1) var(--mj-space-2);\n font-size: var(--mj-text-sm);\n}\n\n.mj-placement-where-text { font-weight: var(--mj-font-semibold); }\n\n.mj-placement-link {\n padding: 0;\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font: inherit;\n font-size: var(--mj-text-sm);\n cursor: pointer;\n}\n\n.mj-placement-link:hover { text-decoration: underline; }\n\n@container mj-placement (max-width: 900px) {\n .mj-placement-canvas { overflow: visible; border-right: 0; border-bottom: 1px solid var(--mj-border-subtle); }\n .mj-placement-settings--side { flex-basis: auto; }\n}\n\n/* ---- order among the panels in one position ---- */\n\n.mj-placement-sublabel {\n margin: var(--mj-space-3) 0 var(--mj-space-2);\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-order {\n margin: 0;\n padding: 0;\n list-style: none;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n counter-reset: mj-placement-order;\n}\n\n.mj-placement-order-item {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n min-height: 36px;\n padding: var(--mj-space-1) var(--mj-space-2) var(--mj-space-1) var(--mj-space-3);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n counter-increment: mj-placement-order;\n}\n\n.mj-placement-order-item::before {\n content: counter(mj-placement-order);\n flex: 0 0 auto;\n min-width: 14px;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-placement-order-item + .mj-placement-order-item { border-top: 1px solid var(--mj-border-subtle); }\n\n.mj-placement-order-item.is-this {\n background: var(--mj-status-info-bg);\n color: var(--mj-text-primary);\n font-weight: var(--mj-font-semibold);\n}\n\n.mj-placement-order-name {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mj-placement-order-moves { display: inline-flex; gap: var(--mj-space-1); }\n\n.mj-placement-order-move {\n width: 28px;\n height: 28px;\n padding: 0;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-placement-order-move:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n\n.mj-placement-order-move:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n}\n\n.mj-placement-order-move:disabled { opacity: 0.4; cursor: not-allowed; }\n\n/* Where a field claim draws inside its group. */\n.mj-placement-fieldpick-where {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-2) var(--mj-space-4);\n margin-top: var(--mj-space-2);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n}\n\n.mj-placement-fieldpick-where > label { display: inline-flex; align-items: center; gap: var(--mj-space-1); cursor: pointer; }\n"] }]
1494
+ }], null, { Context: [{
1495
+ type: Input
1496
+ }], SeedState: [{
1497
+ type: Input
1498
+ }], Proposal: [{
1499
+ type: Input
1500
+ }], ComponentName: [{
1501
+ type: Input
1502
+ }], ProbeForm: [{
1503
+ type: Input
1504
+ }], RecordKey: [{
1505
+ type: Input
1506
+ }], ReplacesRowID: [{
1507
+ type: Input
1508
+ }], PanelComponentSpec: [{
1509
+ type: Input
1510
+ }], PanelComponentID: [{
1511
+ type: Input
1512
+ }], VisibleTo: [{
1513
+ type: Input
1514
+ }], OfferKeepOff: [{
1515
+ type: Input
1516
+ }], Applied: [{
1517
+ type: Output
1518
+ }], Cancelled: [{
1519
+ type: Output
1520
+ }] }); })();
1521
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjFormPlacementDialogComponent, { className: "MjFormPlacementDialogComponent", filePath: "src/lib/apply/form-placement-dialog.component.ts", lineNumber: 61 }); })();
1522
+ //# sourceMappingURL=form-placement-dialog.component.js.map