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

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 +90 -0
  34. package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
  35. package/dist/lib/chrome/form-chrome.js +142 -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 +241 -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 +977 -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 +245 -71
  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,99 @@
1
+ /**
2
+ * Form section counts — one round trip for every badge on a record form.
3
+ *
4
+ * When a saved record opens, the container asks for the row count of every
5
+ * related section (baked grids, stock fill-in grids, contributions) plus the
6
+ * toolbar's tag / attachment / version badges in ONE `RunViews` call of
7
+ * `count_only` views. The database provider runs an all-`count_only` batch as a
8
+ * single `UNION ALL` statement, and every view keeps the normal RunView security
9
+ * path (CanRead, row-level security, saved-view filters).
10
+ *
11
+ * The counts drive two things:
12
+ * - badges (`showCount`, default on), and
13
+ * - empty-section chrome (`whenEmpty`: `'show'` default | `'hide'` | `'more'`).
14
+ *
15
+ * Everything here is pure (no Angular, no I/O) so it can be unit tested; the
16
+ * container owns the call and the state.
17
+ */
18
+ import { BaseEntity, EntityInfo, FormWhenEmpty, RunViewParams, RunViewResult } from '@memberjunction/core';
19
+ import { FormPanelRegistrationMetadata } from '../panel-slot/base-form-panel';
20
+ /** One form section (related grid or contribution) whose rows are counted. */
21
+ export interface FormSectionCountTarget {
22
+ SectionKey: string;
23
+ WhenEmpty: FormWhenEmpty;
24
+ ShowCount: boolean;
25
+ /**
26
+ * The count query, or `null` when the section has no count source the form
27
+ * can build (a contribution that reports its own count after it mounts).
28
+ */
29
+ Params: RunViewParams | null;
30
+ }
31
+ /** Toolbar badges counted in the same round trip. */
32
+ export type FormSystemCountKey = 'tags' | 'attachments' | 'versions';
33
+ export interface FormSystemCountTarget {
34
+ Key: FormSystemCountKey;
35
+ Params: RunViewParams;
36
+ }
37
+ export interface FormCountPlan {
38
+ Sections: FormSectionCountTarget[];
39
+ System: FormSystemCountTarget[];
40
+ /**
41
+ * Section keys whose badge is turned off (`showCount: false`), including
42
+ * ones not fetched at all because they are also `whenEmpty: 'show'`. A grid
43
+ * load still records their count; the form just does not badge it.
44
+ */
45
+ SuppressedBadgeKeys: string[];
46
+ }
47
+ /** A winning contribution registration, keyed by its rail / section key. */
48
+ export interface FormCountContribution {
49
+ SectionKey: string;
50
+ Metadata: FormPanelRegistrationMetadata;
51
+ }
52
+ export interface BuildFormCountPlanInput {
53
+ Record: BaseEntity;
54
+ Entity: EntityInfo;
55
+ /** IS-A child entity IDs (their relationships are not related sections). */
56
+ IsaChildEntityIDs: readonly string[];
57
+ /** Section keys already hidden by a claim / replacement / chrome — never counted as grids. */
58
+ HiddenSectionKeys: ReadonlySet<string>;
59
+ /** Winning contribution registrations for this entity (header excluded). */
60
+ Contributions: readonly FormCountContribution[];
61
+ /** Include the attachment badge (entity allows attachments). */
62
+ IncludeAttachments: boolean;
63
+ }
64
+ /** Counts that came back; a section / badge whose query failed is absent. */
65
+ export interface FormCountResults {
66
+ Sections: Map<string, number>;
67
+ System: Map<FormSystemCountKey, number>;
68
+ }
69
+ /**
70
+ * Build the list of counts a saved record's form needs. Returns an empty plan
71
+ * for an unsaved record (nothing to count).
72
+ */
73
+ export declare function BuildFormCountPlan(input: BuildFormCountPlanInput): FormCountPlan;
74
+ /** The `RunViews` params for a plan, in a fixed order {@link ApplyFormCountResults} understands. */
75
+ export declare function FormCountPlanParams(plan: FormCountPlan): RunViewParams[];
76
+ /** Map `RunViews` results (same order as {@link FormCountPlanParams}) back to keys. */
77
+ export declare function ApplyFormCountResults(plan: FormCountPlan, results: readonly (RunViewResult | null | undefined)[]): FormCountResults;
78
+ /** Where a form is in its count lifecycle for the current record. */
79
+ export type FormCountPhase = 'none' | 'loading' | 'loaded' | 'failed';
80
+ export interface ResolveEmptySectionBehaviorInput {
81
+ Targets: readonly FormSectionCountTarget[];
82
+ /** Latest known count per section key (prefetch or a grid load). */
83
+ CountOf: (sectionKey: string) => number | undefined;
84
+ Phase: FormCountPhase;
85
+ /** The toolbar's "show empty fields" toggle — reveals everything. */
86
+ ShowEmptyFields: boolean;
87
+ /** Sections that must not be hidden or moved (had rows this session, or are open). */
88
+ StickyKeys: ReadonlySet<string>;
89
+ }
90
+ /**
91
+ * Which sections the chrome should hide or move to More right now.
92
+ *
93
+ * - Only a section known to have 0 rows is affected.
94
+ * - While the prefetch is in flight, a `'hide'` section with a count query is
95
+ * held back so it does not appear and then vanish.
96
+ * - Fail open: no counts (unsaved, failed call, failed item) → nothing hidden.
97
+ */
98
+ export declare function ResolveEmptySectionBehavior(input: ResolveEmptySectionBehaviorInput): Map<string, 'hide' | 'more'>;
99
+ //# sourceMappingURL=form-section-counts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-section-counts.d.ts","sourceRoot":"","sources":["../../../src/lib/section-counts/form-section-counts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACH,UAAU,EACV,UAAU,EAEV,aAAa,EAOb,aAAa,EACb,aAAa,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAO9E,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAChC;AAED,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC;AAErE,MAAM,WAAW,qBAAqB;IAClC,GAAG,EAAE,kBAAkB,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;CACjC;AAED,4EAA4E;AAC5E,MAAM,W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C;IACzB,sFAAsF;IACtF,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAajH"}
@@ -0,0 +1,223 @@
1
+ /**
2
+ * Form section counts — one round trip for every badge on a record form.
3
+ *
4
+ * When a saved record opens, the container asks for the row count of every
5
+ * related section (baked grids, stock fill-in grids, contributions) plus the
6
+ * toolbar's tag / attachment / version badges in ONE `RunViews` call of
7
+ * `count_only` views. The database provider runs an all-`count_only` batch as a
8
+ * single `UNION ALL` statement, and every view keeps the normal RunView security
9
+ * path (CanRead, row-level security, saved-view filters).
10
+ *
11
+ * The counts drive two things:
12
+ * - badges (`showCount`, default on), and
13
+ * - empty-section chrome (`whenEmpty`: `'show'` default | `'hide'` | `'more'`).
14
+ *
15
+ * Everything here is pure (no Angular, no I/O) so it can be unit tested; the
16
+ * container owns the call and the state.
17
+ */
18
+ import { EntityInfo, ReadRelationshipInclusion, ReadRelationshipJoinFields, ReadRelationshipShowCount, ReadRelationshipWhenEmpty, ResolveContributionShowCount, ResolveContributionWhenEmpty, } from '@memberjunction/core';
19
+ import { EscapeSQLString, NormalizeUUID } from '@memberjunction/global';
20
+ import { CreateRelatedEntitySectionKeyResolver, StripJoinFieldBrackets, VisibleFormRelationships, } from '../panel-slot/form-contribution';
21
+ const TAGGED_ITEMS_ENTITY = 'MJ: Tagged Items';
22
+ const FILE_LINKS_ENTITY = 'MJ: File Entity Record Links';
23
+ const RECORD_CHANGES_ENTITY = 'MJ: Record Changes';
24
+ /**
25
+ * Build the list of counts a saved record's form needs. Returns an empty plan
26
+ * for an unsaved record (nothing to count).
27
+ */
28
+ export function BuildFormCountPlan(input) {
29
+ const { Record: record, Entity: entity } = input;
30
+ if (!record?.IsSaved)
31
+ return { Sections: [], System: [], SuppressedBadgeKeys: [] };
32
+ // Relationship joins assume a single-column parent key — skip sections
33
+ // (fail open: shown, no badge) for composite-key parents.
34
+ const singleKey = record.PrimaryKeys.length === 1;
35
+ const suppressed = new Set();
36
+ const sections = singleKey
37
+ ? [...buildRelationshipTargets(input, suppressed), ...buildContributionTargets(input, suppressed)]
38
+ : [];
39
+ return { Sections: dedupeByKey(sections), System: buildSystemTargets(input), SuppressedBadgeKeys: [...suppressed] };
40
+ }
41
+ /** The `RunViews` params for a plan, in a fixed order {@link ApplyFormCountResults} understands. */
42
+ export function FormCountPlanParams(plan) {
43
+ const sectionParams = plan.Sections.filter((s) => s.Params !== null).map((s) => s.Params);
44
+ return [...sectionParams, ...plan.System.map((s) => s.Params)];
45
+ }
46
+ /** Map `RunViews` results (same order as {@link FormCountPlanParams}) back to keys. */
47
+ export function ApplyFormCountResults(plan, results) {
48
+ const out = { Sections: new Map(), System: new Map() };
49
+ let index = 0;
50
+ for (const section of plan.Sections) {
51
+ if (section.Params === null)
52
+ continue;
53
+ const count = readCount(results[index++]);
54
+ if (count !== null)
55
+ out.Sections.set(section.SectionKey, count);
56
+ }
57
+ for (const system of plan.System) {
58
+ const count = readCount(results[index++]);
59
+ if (count !== null)
60
+ out.System.set(system.Key, count);
61
+ }
62
+ return out;
63
+ }
64
+ /**
65
+ * Which sections the chrome should hide or move to More right now.
66
+ *
67
+ * - Only a section known to have 0 rows is affected.
68
+ * - While the prefetch is in flight, a `'hide'` section with a count query is
69
+ * held back so it does not appear and then vanish.
70
+ * - Fail open: no counts (unsaved, failed call, failed item) → nothing hidden.
71
+ */
72
+ export function ResolveEmptySectionBehavior(input) {
73
+ const out = new Map();
74
+ if (input.ShowEmptyFields || input.Phase === 'none' || input.Phase === 'failed')
75
+ return out;
76
+ for (const target of input.Targets) {
77
+ if (target.WhenEmpty === 'show' || input.StickyKeys.has(target.SectionKey))
78
+ continue;
79
+ const count = input.CountOf(target.SectionKey);
80
+ if (count === 0) {
81
+ out.set(target.SectionKey, target.WhenEmpty);
82
+ }
83
+ else if (count === undefined && input.Phase === 'loading' && target.WhenEmpty === 'hide' && target.Params !== null) {
84
+ out.set(target.SectionKey, 'hide');
85
+ }
86
+ }
87
+ return out;
88
+ }
89
+ // ---- relationships ---------------------------------------------------------
90
+ function buildRelationshipTargets(input, suppressed) {
91
+ const { Record: record, Entity: entity } = input;
92
+ const peers = VisibleFormRelationships(entity.RelatedEntities ?? [], input.IsaChildEntityIDs);
93
+ const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);
94
+ const targets = [];
95
+ for (const rel of peers) {
96
+ const sectionKey = sectionKeyOf(rel);
97
+ if (input.HiddenSectionKeys.has(sectionKey))
98
+ continue;
99
+ if (ReadRelationshipInclusion(rel.Configuration) === 'None')
100
+ continue;
101
+ if (isImpliedJoinSibling(rel, peers))
102
+ continue;
103
+ const whenEmpty = ReadRelationshipWhenEmpty(rel.Configuration, entity.Configuration);
104
+ const showCount = ReadRelationshipShowCount(rel.Configuration, entity.Configuration);
105
+ if (!showCount)
106
+ suppressed.add(sectionKey);
107
+ if (!showCount && whenEmpty === 'show')
108
+ continue;
109
+ targets.push({
110
+ SectionKey: sectionKey,
111
+ WhenEmpty: whenEmpty,
112
+ ShowCount: showCount,
113
+ Params: countOnly(EntityInfo.BuildRelationshipViewParams(record, rel)),
114
+ });
115
+ }
116
+ return targets;
117
+ }
118
+ /**
119
+ * A sibling FK folded into another relationship's `join.fields` OR (Bill-To +
120
+ * Ship-To on one section) is not its own section — mirrors the chrome ranker.
121
+ */
122
+ function isImpliedJoinSibling(rel, peers) {
123
+ if (ReadRelationshipInclusion(rel.Configuration) !== null)
124
+ return false;
125
+ if (ReadRelationshipJoinFields(rel.Configuration))
126
+ return false;
127
+ const target = NormalizeUUID(rel.RelatedEntityID);
128
+ const joinField = StripJoinFieldBrackets(rel.RelatedEntityJoinField)?.toLowerCase();
129
+ return peers.some((peer) => {
130
+ if (peer === rel || NormalizeUUID(peer.RelatedEntityID) !== target)
131
+ return false;
132
+ const fields = ReadRelationshipJoinFields(peer.Configuration);
133
+ return !!fields && fields.some((f) => f.toLowerCase() === joinField);
134
+ });
135
+ }
136
+ // ---- contributions ---------------------------------------------------------
137
+ function buildContributionTargets(input, suppressed) {
138
+ const targets = [];
139
+ for (const contribution of input.Contributions) {
140
+ const meta = contribution.Metadata;
141
+ const whenEmpty = ResolveContributionWhenEmpty(meta.whenEmpty, input.Entity.Configuration);
142
+ const showCount = ResolveContributionShowCount(meta.showCount, input.Entity.Configuration);
143
+ if (!showCount)
144
+ suppressed.add(contribution.SectionKey);
145
+ if (!showCount && whenEmpty === 'show')
146
+ continue;
147
+ const params = contributionCountParams(meta, input.Record, input.Entity);
148
+ targets.push({
149
+ SectionKey: contribution.SectionKey,
150
+ WhenEmpty: whenEmpty,
151
+ ShowCount: showCount,
152
+ Params: params ? countOnly(params) : null,
153
+ });
154
+ }
155
+ return targets;
156
+ }
157
+ function contributionCountParams(meta, record, entity) {
158
+ if (meta.count === false)
159
+ return null;
160
+ const countEntity = meta.count ? meta.count.entity : meta.relatedEntity;
161
+ if (!countEntity?.trim())
162
+ return null;
163
+ const explicitFields = meta.count
164
+ ? (meta.count.joinFields ?? []).map((f) => StripJoinFieldBrackets(f)).filter((f) => !!f)
165
+ : [StripJoinFieldBrackets(meta.relatedJoinField)].filter((f) => !!f);
166
+ const matches = relationshipsTo(entity, countEntity);
167
+ if (explicitFields.length === 1) {
168
+ const rel = matches.find((m) => StripJoinFieldBrackets(m.RelatedEntityJoinField)?.toLowerCase() === explicitFields[0].toLowerCase());
169
+ if (rel)
170
+ return EntityInfo.BuildRelationshipViewParams(record, rel);
171
+ }
172
+ if (explicitFields.length > 0) {
173
+ return EntityInfo.BuildRelationshipViewParamsForJoinFields(record, countEntity, explicitFields);
174
+ }
175
+ if (matches.length === 1)
176
+ return EntityInfo.BuildRelationshipViewParams(record, matches[0]);
177
+ if (matches.length > 1) {
178
+ // A claim without a join field covers every FK to that entity.
179
+ return EntityInfo.BuildRelationshipViewParamsForJoinFields(record, countEntity, matches.map((m) => m.RelatedEntityJoinField));
180
+ }
181
+ return null;
182
+ }
183
+ function relationshipsTo(entity, relatedEntityName) {
184
+ const wanted = relatedEntityName.trim().toLowerCase();
185
+ return (entity.RelatedEntities ?? []).filter((r) => r.RelatedEntity.trim().toLowerCase() === wanted);
186
+ }
187
+ // ---- system badges ---------------------------------------------------------
188
+ function buildSystemTargets(input) {
189
+ const { Record: record, Entity: entity } = input;
190
+ const entityID = EscapeSQLString(entity.ID);
191
+ const recordValues = EscapeSQLString(record.PrimaryKey.Values());
192
+ const targets = [
193
+ { Key: 'tags', Params: countOnly({ EntityName: TAGGED_ITEMS_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordValues}'` }) },
194
+ ];
195
+ if (input.IncludeAttachments) {
196
+ targets.push({ Key: 'attachments', Params: countOnly({ EntityName: FILE_LINKS_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordValues}'` }) });
197
+ }
198
+ if (entity.TrackRecordChanges) {
199
+ const recordKey = EscapeSQLString(record.PrimaryKey.ToConcatenatedString());
200
+ targets.push({ Key: 'versions', Params: countOnly({ EntityName: RECORD_CHANGES_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordKey}'` }) });
201
+ }
202
+ return targets;
203
+ }
204
+ // ---- helpers ---------------------------------------------------------------
205
+ function countOnly(params) {
206
+ return { ...params, ResultType: 'count_only', MaxRows: undefined };
207
+ }
208
+ function readCount(result) {
209
+ if (!result?.Success)
210
+ return null;
211
+ const count = Number(result.TotalRowCount ?? result.RowCount);
212
+ return Number.isFinite(count) && count >= 0 ? count : null;
213
+ }
214
+ function dedupeByKey(targets) {
215
+ const seen = new Map();
216
+ for (const target of targets) {
217
+ // A contribution registered under the same key as a grid wins (it is
218
+ // what renders there).
219
+ seen.set(target.SectionKey, target);
220
+ }
221
+ return [...seen.values()];
222
+ }
223
+ //# sourceMappingURL=form-section-counts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-section-counts.js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,CAAC;IAC9D,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC;AAED,SAAS,WAAW,CAAC,OAAiC;IAClD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkC,CAAC;IACvD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC3B,qEAAqE;QACrE,uBAAuB;QACvB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * Form section counts — one round trip for every badge on a record form.\n *\n * When a saved record opens, the container asks for the row count of every\n * related section (baked grids, stock fill-in grids, contributions) plus the\n * toolbar's tag / attachment / version badges in ONE `RunViews` call of\n * `count_only` views. The database provider runs an all-`count_only` batch as a\n * single `UNION ALL` statement, and every view keeps the normal RunView security\n * path (CanRead, row-level security, saved-view filters).\n *\n * The counts drive two things:\n * - badges (`showCount`, default on), and\n * - empty-section chrome (`whenEmpty`: `'show'` default | `'hide'` | `'more'`).\n *\n * Everything here is pure (no Angular, no I/O) so it can be unit tested; the\n * container owns the call and the state.\n */\nimport {\n BaseEntity,\n EntityInfo,\n EntityRelationshipInfo,\n FormWhenEmpty,\n ReadRelationshipInclusion,\n ReadRelationshipJoinFields,\n ReadRelationshipShowCount,\n ReadRelationshipWhenEmpty,\n ResolveContributionShowCount,\n ResolveContributionWhenEmpty,\n RunViewParams,\n RunViewResult,\n} from '@memberjunction/core';\nimport { EscapeSQLString, NormalizeUUID } from '@memberjunction/global';\nimport { FormPanelRegistrationMetadata } from '../panel-slot/base-form-panel';\nimport {\n CreateRelatedEntitySectionKeyResolver,\n StripJoinFieldBrackets,\n VisibleFormRelationships,\n} from '../panel-slot/form-contribution';\n\n/** One form section (related grid or contribution) whose rows are counted. */\nexport interface FormSectionCountTarget {\n SectionKey: string;\n WhenEmpty: FormWhenEmpty;\n ShowCount: boolean;\n /**\n * The count query, or `null` when the section has no count source the form\n * can build (a contribution that reports its own count after it mounts).\n */\n Params: RunViewParams | null;\n}\n\n/** Toolbar badges counted in the same round trip. */\nexport type FormSystemCountKey = 'tags' | 'attachments' | 'versions';\n\nexport interface FormSystemCountTarget {\n Key: FormSystemCountKey;\n Params: RunViewParams;\n}\n\nexport interface FormCountPlan {\n Sections: FormSectionCountTarget[];\n System: FormSystemCountTarget[];\n /**\n * Section keys whose badge is turned off (`showCount: false`), including\n * ones not fetched at all because they are also `whenEmpty: 'show'`. A grid\n * load still records their count; the form just does not badge it.\n */\n SuppressedBadgeKeys: string[];\n}\n\n/** A winning contribution registration, keyed by its rail / section key. */\nexport interface FormCountContribution {\n SectionKey: string;\n Metadata: FormPanelRegistrationMetadata;\n}\n\nexport interface BuildFormCountPlanInput {\n Record: BaseEntity;\n Entity: EntityInfo;\n /** IS-A child entity IDs (their relationships are not related sections). */\n IsaChildEntityIDs: readonly string[];\n /** Section keys already hidden by a claim / replacement / chrome — never counted as grids. */\n HiddenSectionKeys: ReadonlySet<string>;\n /** Winning contribution registrations for this entity (header excluded). */\n Contributions: readonly FormCountContribution[];\n /** Include the attachment badge (entity allows attachments). */\n IncludeAttachments: boolean;\n}\n\n/** Counts that came back; a section / badge whose query failed is absent. */\nexport interface FormCountResults {\n Sections: Map<string, number>;\n System: Map<FormSystemCountKey, number>;\n}\n\nconst TAGGED_ITEMS_ENTITY = 'MJ: Tagged Items';\nconst FILE_LINKS_ENTITY = 'MJ: File Entity Record Links';\nconst RECORD_CHANGES_ENTITY = 'MJ: Record Changes';\n\n/**\n * Build the list of counts a saved record's form needs. Returns an empty plan\n * for an unsaved record (nothing to count).\n */\nexport function BuildFormCountPlan(input: BuildFormCountPlanInput): FormCountPlan {\n const { Record: record, Entity: entity } = input;\n if (!record?.IsSaved) return { Sections: [], System: [], SuppressedBadgeKeys: [] };\n\n // Relationship joins assume a single-column parent key — skip sections\n // (fail open: shown, no badge) for composite-key parents.\n const singleKey = record.PrimaryKeys.length === 1;\n const suppressed = new Set<string>();\n const sections = singleKey\n ? [...buildRelationshipTargets(input, suppressed), ...buildContributionTargets(input, suppressed)]\n : [];\n return { Sections: dedupeByKey(sections), System: buildSystemTargets(input), SuppressedBadgeKeys: [...suppressed] };\n}\n\n/** The `RunViews` params for a plan, in a fixed order {@link ApplyFormCountResults} understands. */\nexport function FormCountPlanParams(plan: FormCountPlan): RunViewParams[] {\n const sectionParams = plan.Sections.filter((s) => s.Params !== null).map((s) => s.Params as RunViewParams);\n return [...sectionParams, ...plan.System.map((s) => s.Params)];\n}\n\n/** Map `RunViews` results (same order as {@link FormCountPlanParams}) back to keys. */\nexport function ApplyFormCountResults(plan: FormCountPlan, results: readonly (RunViewResult | null | undefined)[]): FormCountResults {\n const out: FormCountResults = { Sections: new Map(), System: new Map() };\n let index = 0;\n for (const section of plan.Sections) {\n if (section.Params === null) continue;\n const count = readCount(results[index++]);\n if (count !== null) out.Sections.set(section.SectionKey, count);\n }\n for (const system of plan.System) {\n const count = readCount(results[index++]);\n if (count !== null) out.System.set(system.Key, count);\n }\n return out;\n}\n\n/** Where a form is in its count lifecycle for the current record. */\nexport type FormCountPhase = 'none' | 'loading' | 'loaded' | 'failed';\n\nexport interface ResolveEmptySectionBehaviorInput {\n Targets: readonly FormSectionCountTarget[];\n /** Latest known count per section key (prefetch or a grid load). */\n CountOf: (sectionKey: string) => number | undefined;\n Phase: FormCountPhase;\n /** The toolbar's \"show empty fields\" toggle — reveals everything. */\n ShowEmptyFields: boolean;\n /** Sections that must not be hidden or moved (had rows this session, or are open). */\n StickyKeys: ReadonlySet<string>;\n}\n\n/**\n * Which sections the chrome should hide or move to More right now.\n *\n * - Only a section known to have 0 rows is affected.\n * - While the prefetch is in flight, a `'hide'` section with a count query is\n * held back so it does not appear and then vanish.\n * - Fail open: no counts (unsaved, failed call, failed item) → nothing hidden.\n */\nexport function ResolveEmptySectionBehavior(input: ResolveEmptySectionBehaviorInput): Map<string, 'hide' | 'more'> {\n const out = new Map<string, 'hide' | 'more'>();\n if (input.ShowEmptyFields || input.Phase === 'none' || input.Phase === 'failed') return out;\n for (const target of input.Targets) {\n if (target.WhenEmpty === 'show' || input.StickyKeys.has(target.SectionKey)) continue;\n const count = input.CountOf(target.SectionKey);\n if (count === 0) {\n out.set(target.SectionKey, target.WhenEmpty);\n } else if (count === undefined && input.Phase === 'loading' && target.WhenEmpty === 'hide' && target.Params !== null) {\n out.set(target.SectionKey, 'hide');\n }\n }\n return out;\n}\n\n// ---- relationships ---------------------------------------------------------\n\nfunction buildRelationshipTargets(input: BuildFormCountPlanInput, suppressed: Set<string>): FormSectionCountTarget[] {\n const { Record: record, Entity: entity } = input;\n const peers = VisibleFormRelationships(entity.RelatedEntities ?? [], input.IsaChildEntityIDs);\n const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);\n const targets: FormSectionCountTarget[] = [];\n for (const rel of peers) {\n const sectionKey = sectionKeyOf(rel);\n if (input.HiddenSectionKeys.has(sectionKey)) continue;\n if (ReadRelationshipInclusion(rel.Configuration) === 'None') continue;\n if (isImpliedJoinSibling(rel, peers)) continue;\n const whenEmpty = ReadRelationshipWhenEmpty(rel.Configuration, entity.Configuration);\n const showCount = ReadRelationshipShowCount(rel.Configuration, entity.Configuration);\n if (!showCount) suppressed.add(sectionKey);\n if (!showCount && whenEmpty === 'show') continue;\n targets.push({\n SectionKey: sectionKey,\n WhenEmpty: whenEmpty,\n ShowCount: showCount,\n Params: countOnly(EntityInfo.BuildRelationshipViewParams(record, rel)),\n });\n }\n return targets;\n}\n\n/**\n * A sibling FK folded into another relationship's `join.fields` OR (Bill-To +\n * Ship-To on one section) is not its own section — mirrors the chrome ranker.\n */\nfunction isImpliedJoinSibling(rel: EntityRelationshipInfo, peers: readonly EntityRelationshipInfo[]): boolean {\n if (ReadRelationshipInclusion(rel.Configuration) !== null) return false;\n if (ReadRelationshipJoinFields(rel.Configuration)) return false;\n const target = NormalizeUUID(rel.RelatedEntityID);\n const joinField = StripJoinFieldBrackets(rel.RelatedEntityJoinField)?.toLowerCase();\n return peers.some((peer) => {\n if (peer === rel || NormalizeUUID(peer.RelatedEntityID) !== target) return false;\n const fields = ReadRelationshipJoinFields(peer.Configuration);\n return !!fields && fields.some((f) => f.toLowerCase() === joinField);\n });\n}\n\n// ---- contributions ---------------------------------------------------------\n\nfunction buildContributionTargets(input: BuildFormCountPlanInput, suppressed: Set<string>): FormSectionCountTarget[] {\n const targets: FormSectionCountTarget[] = [];\n for (const contribution of input.Contributions) {\n const meta = contribution.Metadata;\n const whenEmpty = ResolveContributionWhenEmpty(meta.whenEmpty, input.Entity.Configuration);\n const showCount = ResolveContributionShowCount(meta.showCount, input.Entity.Configuration);\n if (!showCount) suppressed.add(contribution.SectionKey);\n if (!showCount && whenEmpty === 'show') continue;\n const params = contributionCountParams(meta, input.Record, input.Entity);\n targets.push({\n SectionKey: contribution.SectionKey,\n WhenEmpty: whenEmpty,\n ShowCount: showCount,\n Params: params ? countOnly(params) : null,\n });\n }\n return targets;\n}\n\nfunction contributionCountParams(meta: FormPanelRegistrationMetadata, record: BaseEntity, entity: EntityInfo): RunViewParams | null {\n if (meta.count === false) return null;\n const countEntity = meta.count ? meta.count.entity : meta.relatedEntity;\n if (!countEntity?.trim()) return null;\n const explicitFields = meta.count\n ? (meta.count.joinFields ?? []).map((f) => StripJoinFieldBrackets(f)).filter((f): f is string => !!f)\n : [StripJoinFieldBrackets(meta.relatedJoinField)].filter((f): f is string => !!f);\n const matches = relationshipsTo(entity, countEntity);\n if (explicitFields.length === 1) {\n const rel = matches.find((m) => StripJoinFieldBrackets(m.RelatedEntityJoinField)?.toLowerCase() === explicitFields[0].toLowerCase());\n if (rel) return EntityInfo.BuildRelationshipViewParams(record, rel);\n }\n if (explicitFields.length > 0) {\n return EntityInfo.BuildRelationshipViewParamsForJoinFields(record, countEntity, explicitFields);\n }\n if (matches.length === 1) return EntityInfo.BuildRelationshipViewParams(record, matches[0]);\n if (matches.length > 1) {\n // A claim without a join field covers every FK to that entity.\n return EntityInfo.BuildRelationshipViewParamsForJoinFields(record, countEntity, matches.map((m) => m.RelatedEntityJoinField));\n }\n return null;\n}\n\nfunction relationshipsTo(entity: EntityInfo, relatedEntityName: string): EntityRelationshipInfo[] {\n const wanted = relatedEntityName.trim().toLowerCase();\n return (entity.RelatedEntities ?? []).filter((r) => r.RelatedEntity.trim().toLowerCase() === wanted);\n}\n\n// ---- system badges ---------------------------------------------------------\n\nfunction buildSystemTargets(input: BuildFormCountPlanInput): FormSystemCountTarget[] {\n const { Record: record, Entity: entity } = input;\n const entityID = EscapeSQLString(entity.ID);\n const recordValues = EscapeSQLString(record.PrimaryKey.Values());\n const targets: FormSystemCountTarget[] = [\n { Key: 'tags', Params: countOnly({ EntityName: TAGGED_ITEMS_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordValues}'` }) },\n ];\n if (input.IncludeAttachments) {\n targets.push({ Key: 'attachments', Params: countOnly({ EntityName: FILE_LINKS_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordValues}'` }) });\n }\n if (entity.TrackRecordChanges) {\n const recordKey = EscapeSQLString(record.PrimaryKey.ToConcatenatedString());\n targets.push({ Key: 'versions', Params: countOnly({ EntityName: RECORD_CHANGES_ENTITY, ExtraFilter: `EntityID='${entityID}' AND RecordID='${recordKey}'` }) });\n }\n return targets;\n}\n\n// ---- helpers ---------------------------------------------------------------\n\nfunction countOnly(params: RunViewParams): RunViewParams {\n return { ...params, ResultType: 'count_only', MaxRows: undefined };\n}\n\nfunction readCount(result: RunViewResult | null | undefined): number | null {\n if (!result?.Success) return null;\n const count = Number(result.TotalRowCount ?? result.RowCount);\n return Number.isFinite(count) && count >= 0 ? count : null;\n}\n\nfunction dedupeByKey(targets: FormSectionCountTarget[]): FormSectionCountTarget[] {\n const seen = new Map<string, FormSectionCountTarget>();\n for (const target of targets) {\n // A contribution registered under the same key as a grid wins (it is\n // what renders there).\n seen.set(target.SectionKey, target);\n }\n return [...seen.values()];\n}\n"]}
@@ -296,6 +296,13 @@ export declare class MjFormToolbarComponent extends BaseAngularComponent impleme
296
296
  get ResolvedActionItems(): ResolvedToolbarItem[];
297
297
  get ResolvedEditBeforeSaveItems(): ResolvedToolbarItem[];
298
298
  get ResolvedEditAfterSaveItems(): ResolvedToolbarItem[];
299
+ /**
300
+ * Items drawn on the right, beside the View menu.
301
+ *
302
+ * `overflow` is folded in: the placement is part of the public type but the More menu
303
+ * lists only `actions` items, so without this an item registered for `overflow` would
304
+ * render nowhere and the caller would have no way to tell.
305
+ */
299
306
  get ResolvedRightItems(): ResolvedToolbarItem[];
300
307
  /** Whether the More menu is open. */
301
308
  MoreMenuOpen: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"form-toolbar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/toolbar/form-toolbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAA2B,WAAW,EAA6B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAyB,MAAM,eAAe,CAAC;AAG3L,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,UAAU,EAA0B,MAAM,sBAAsB,CAAC;AAGtF,OAAO,EAAsB,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC1H,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAsB,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE3I,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAA+C,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACvH,OAAO,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AAE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