@nivaro/react 0.2.54 → 0.2.55

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 (150) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +339 -2
  4. package/dist/index.js +644 -618
  5. package/dist/layout-editor.d.ts +4 -0
  6. package/dist/shared/components/BackgroundRunOffer.js +117 -0
  7. package/dist/shared/components/BroadcastView.js +214 -213
  8. package/dist/shared/components/CollectionBrowserView.js +2592 -2695
  9. package/dist/shared/components/ItemEditForm.js +4066 -3832
  10. package/dist/shared/components/JobsTray.js +100 -55
  11. package/dist/shared/components/MyWorkView.js +91 -89
  12. package/dist/shared/components/NotificationBell.js +80 -79
  13. package/dist/shared/components/ProfileView.js +568 -520
  14. package/dist/shared/components/RecordCompare.js +254 -0
  15. package/dist/shared/components/RecordReadView.js +599 -552
  16. package/dist/shared/components/ReportView.js +578 -543
  17. package/dist/shared/components/RowPresence.js +91 -0
  18. package/dist/shared/components/WidgetSlot.js +474 -458
  19. package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
  20. package/dist/shared/components/ai/AskPanel.js +139 -119
  21. package/dist/shared/components/ai/FirstWeekCard.js +126 -0
  22. package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
  23. package/dist/shared/components/bulk/bulk-field-options.js +45 -0
  24. package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
  25. package/dist/shared/components/chat/ChannelArchive.js +326 -0
  26. package/dist/shared/components/chat/ChannelExtras.js +141 -121
  27. package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
  28. package/dist/shared/components/chat/ChatPanel.js +1695 -1733
  29. package/dist/shared/components/chat/Composer.js +357 -303
  30. package/dist/shared/components/chat/MessageActions.js +92 -0
  31. package/dist/shared/components/chat/MessageFormat.js +290 -264
  32. package/dist/shared/components/chat/OutboxBubbles.js +146 -0
  33. package/dist/shared/components/chat/RequestIdCard.js +135 -0
  34. package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
  35. package/dist/shared/components/chat/RoomParts.js +213 -274
  36. package/dist/shared/components/chat/ScreenClip.js +184 -0
  37. package/dist/shared/components/chat/chat-core.js +402 -483
  38. package/dist/shared/components/chat/chat-drafts.js +59 -0
  39. package/dist/shared/components/chat/chat-emoji.js +348 -0
  40. package/dist/shared/components/chat/chat-local-time.js +41 -0
  41. package/dist/shared/components/chat/chat-outbox.js +303 -0
  42. package/dist/shared/components/chat/chat-window.js +163 -0
  43. package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
  44. package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
  45. package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
  46. package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
  47. package/dist/shared/components/help-videos/api.js +76 -73
  48. package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
  49. package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
  50. package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
  51. package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
  52. package/dist/shared/components/item-edit/FieldRow.js +292 -279
  53. package/dist/shared/components/item-edit/GroupSection.js +698 -574
  54. package/dist/shared/components/item-edit/InlineTableField.js +3 -1
  55. package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
  56. package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
  57. package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
  58. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
  59. package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
  60. package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
  61. package/dist/shared/components/item-edit/lazy-sections.js +36 -0
  62. package/dist/shared/components/item-edit/lock-why.js +39 -32
  63. package/dist/shared/components/item-edit/picker-miss.js +26 -0
  64. package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
  65. package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
  66. package/dist/shared/components/layout-editor/AddPanel.js +134 -117
  67. package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
  68. package/dist/shared/components/layout-editor/CollabParts.js +80 -75
  69. package/dist/shared/components/layout-editor/DesignNode.js +126 -120
  70. package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
  71. package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
  72. package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
  73. package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
  74. package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
  75. package/dist/shared/components/layout-editor/StagedChip.js +22 -0
  76. package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
  77. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
  78. package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
  79. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
  80. package/dist/shared/components/layout-editor/dnd/node.js +69 -57
  81. package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
  82. package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
  83. package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
  84. package/dist/shared/components/layout-editor/entry/presets.js +71 -0
  85. package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
  86. package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
  87. package/dist/shared/components/layout-editor/grid-guides.js +142 -0
  88. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
  89. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
  90. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
  91. package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
  92. package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
  93. package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
  94. package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
  95. package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
  96. package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
  97. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
  98. package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
  99. package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
  100. package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
  101. package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
  102. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  103. package/dist/shared/components/layout-editor/restore-piece.js +192 -0
  104. package/dist/shared/components/layout-editor/section-structure.js +241 -0
  105. package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
  106. package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
  107. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
  108. package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
  109. package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
  110. package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
  111. package/dist/shared/components/layout-editor/staged-api.js +64 -0
  112. package/dist/shared/components/layout-editor/structure-ops.js +81 -77
  113. package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
  114. package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
  115. package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
  116. package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
  117. package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
  118. package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
  119. package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
  120. package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
  121. package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
  122. package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
  123. package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
  124. package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
  125. package/dist/shared/components/profile/AgentsPanel.js +479 -0
  126. package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
  127. package/dist/shared/components/support/SupportAnalytics.js +171 -0
  128. package/dist/shared/components/support/SupportView.js +75 -73
  129. package/dist/shared/lib/background-runs.js +150 -0
  130. package/dist/shared/lib/delivery-ack.js +9 -0
  131. package/dist/shared/lib/entry-badge-style.js +13 -0
  132. package/dist/shared/lib/entry-config.js +71 -0
  133. package/dist/shared/lib/form-sections.js +64 -0
  134. package/dist/shared/lib/form-structure.js +99 -0
  135. package/dist/shared/lib/form-usage-beacon.js +101 -52
  136. package/dist/shared/lib/jobs-tray.js +25 -23
  137. package/dist/shared/lib/keyset-pager.js +37 -0
  138. package/dist/shared/lib/layout-ops.js +84 -82
  139. package/dist/shared/lib/layout-resolve.js +113 -0
  140. package/dist/shared/lib/placement-behaviour.js +144 -0
  141. package/dist/shared/lib/prefetch.js +149 -0
  142. package/dist/shared/lib/presence-hooks.js +199 -0
  143. package/dist/shared/lib/record-outbox.js +82 -81
  144. package/dist/shared/lib/replay-socket.js +93 -0
  145. package/dist/shared/lib/request-gate.js +51 -50
  146. package/dist/shared/lib/room-gaps.js +96 -0
  147. package/dist/shared/lib/search-log.js +27 -0
  148. package/dist/shared/lib/socket-realtime.js +101 -80
  149. package/dist/shared/lib/worker-socket.js +200 -0
  150. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useQuery as j } from "@tanstack/react-query";
3
3
  import { X as B } from "lucide-react";
4
4
  import { useNivaroClient as E } from "../../../context.js";
@@ -11,9 +11,10 @@ import { FieldDefaultValueControl as z } from "../editors/field-default-value.js
11
11
  import { RoleConditionRow as J, PipelineStateConditionRow as U } from "../editors/lock-conditions.js";
12
12
  import { useLayoutEditorHost as Y } from "../host.js";
13
13
  import { tintCard as Z } from "../panel-style.js";
14
- import { useFieldCtx as ee } from "./field-context.js";
15
- import { Toggle as v, Setting as f, Segmented as le, AddButton as te, Section as R, TextInput as S, Choice as T } from "./kit.js";
16
- import { lockConditionsOf as ie, layoutGrids as oe, asObject as ae, defaultValuesOf as ne, withDefaultValue as re, lockConditionsColumn as de } from "./model.js";
14
+ import { RecommendedToggle as ee, ConfirmChangeSetting as te, RepeatLastToggle as le } from "./BehaviourSettings.js";
15
+ import { useFieldCtx as ie } from "./field-context.js";
16
+ import { Toggle as g, Setting as f, Segmented as oe, AddButton as ae, Section as R, TextInput as S, Choice as T } from "./kit.js";
17
+ import { lockConditionsOf as ne, layoutGrids as re, asObject as de, defaultValuesOf as se, withDefaultValue as ce, lockConditionsColumn as ue } from "./model.js";
17
18
  const L = /* @__PURE__ */ new Set([
18
19
  "inline-table",
19
20
  "inline-grid",
@@ -24,7 +25,7 @@ const L = /* @__PURE__ */ new Set([
24
25
  "o2m",
25
26
  "relation-path"
26
27
  ]);
27
- function se(a, i) {
28
+ function pe(a, i) {
28
29
  const u = E();
29
30
  return j({
30
31
  queryKey: ["layout-editor", "field-rows", a, i ?? null],
@@ -35,16 +36,16 @@ function se(a, i) {
35
36
  staleTime: 6e4
36
37
  });
37
38
  }
38
- function Me() {
39
- const a = ee(), { info: i, ov: u, opts: m, env: s, row: p } = a, o = i.label, y = s.bundle.layout, g = p.field.startsWith("__") || i.isPath, b = ie(p), _ = (e, t) => a.setPlacement({ lock_conditions: de(e) }, t), w = (e, t, n) => _(
40
- b.map((d, h) => h === e ? { ...d, ...t } : d),
39
+ function Se() {
40
+ const a = ie(), { info: i, ov: u, opts: m, env: s, row: p } = a, o = i.label, y = s.bundle.layout, v = p.field.startsWith("__") || i.isPath, b = ne(p), _ = (e, l) => a.setPlacement({ lock_conditions: ue(e) }, l), w = (e, l, n) => _(
41
+ b.map((d, h) => h === e ? { ...d, ...l } : d),
41
42
  n
42
- ), x = oe(s.bundle, a.globals, a.relations), M = !g && i.relKind !== "M2M" && i.relKind !== "O2M" && !L.has(i.iface ?? "") && x.length > 0, r = ae(u.apply_to_lines), $ = x.find((e) => e.field === r.grid) ?? null, { data: K = [] } = se(M ? $ == null ? void 0 : $.childCollection : null), P = K.filter(
43
+ ), x = re(s.bundle, a.globals, a.relations), M = !v && i.relKind !== "M2M" && i.relKind !== "O2M" && !L.has(i.iface ?? "") && x.length > 0, r = de(u.apply_to_lines), $ = x.find((e) => e.field === r.grid) ?? null, { data: K = [] } = pe(M ? $ == null ? void 0 : $.childCollection : null), P = K.filter(
43
44
  (e) => e.field !== "id" && !e.field.startsWith("__") && !e.field.includes(".") && !["alias", "o2m", "m2m"].includes(e.type ?? "")
44
- ), N = (e, t) => a.setOverride("apply_to_lines", e ?? void 0, t), I = Y().isAdmin && !g && !i.relKind && !L.has(i.iface ?? "") && i.type !== "alias" && i.computedType !== "virtual", q = ne(y), A = typeof m.max_values == "number" ? m.max_values : null;
45
+ ), N = (e, l) => a.setOverride("apply_to_lines", e ?? void 0, l), I = Y().isAdmin && !v && !i.relKind && !L.has(i.iface ?? "") && i.type !== "alias" && i.computedType !== "virtual", q = se(y), A = typeof m.max_values == "number" ? m.max_values : null;
45
46
  return /* @__PURE__ */ c("div", { className: "space-y-5", children: [
46
- /* @__PURE__ */ l(
47
- v,
47
+ /* @__PURE__ */ t(
48
+ g,
48
49
  {
49
50
  k: "field.required",
50
51
  label: "Required",
@@ -57,8 +58,9 @@ function Me() {
57
58
  )
58
59
  }
59
60
  ),
60
- /* @__PURE__ */ l(
61
- v,
61
+ /* @__PURE__ */ t(ee, {}),
62
+ /* @__PURE__ */ t(
63
+ g,
62
64
  {
63
65
  k: "field.readonly",
64
66
  label: "Read-only",
@@ -71,8 +73,10 @@ function Me() {
71
73
  )
72
74
  }
73
75
  ),
74
- (i.computedType === "rollup" || i.computedType === "write") && /* @__PURE__ */ l(
75
- v,
76
+ /* @__PURE__ */ t(te, {}),
77
+ /* @__PURE__ */ t(le, {}),
78
+ (i.computedType === "rollup" || i.computedType === "write") && /* @__PURE__ */ t(
79
+ g,
76
80
  {
77
81
  k: "field.editable_computed",
78
82
  label: "Allow manual entry",
@@ -85,21 +89,21 @@ function Me() {
85
89
  )
86
90
  }
87
91
  ),
88
- /* @__PURE__ */ l(
92
+ /* @__PURE__ */ t(
89
93
  f,
90
94
  {
91
95
  k: "field.lock_conditions",
92
96
  label: "Read-only when",
93
97
  effect: "Locks the field while any of these holds. No conditions: always editable.",
94
98
  children: /* @__PURE__ */ c("div", { className: "space-y-2", children: [
95
- b.map((e, t) => /* @__PURE__ */ c(
99
+ b.map((e, l) => /* @__PURE__ */ c(
96
100
  "div",
97
101
  {
98
102
  className: D(Z, "space-y-3 p-3"),
99
103
  children: [
100
104
  /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
101
- /* @__PURE__ */ l("div", { className: "flex-1", "data-setting": "field.lock_conditions.type", children: /* @__PURE__ */ l(
102
- le,
105
+ /* @__PURE__ */ t("div", { className: "flex-1", "data-setting": "field.lock_conditions.type", children: /* @__PURE__ */ t(
106
+ oe,
103
107
  {
104
108
  value: e.type,
105
109
  options: [
@@ -108,54 +112,54 @@ function Me() {
108
112
  ],
109
113
  onChange: (n) => _(
110
114
  b.map(
111
- (d, h) => h === t ? n === "role" ? { type: "role", role_ids: [] } : { type: "pipeline_state", state_keys: [] } : d
115
+ (d, h) => h === l ? n === "role" ? { type: "role", role_ids: [] } : { type: "pipeline_state", state_keys: [] } : d
112
116
  ),
113
117
  `Change a lock condition of ${o}`
114
118
  )
115
119
  }
116
120
  ) }),
117
- /* @__PURE__ */ l(
121
+ /* @__PURE__ */ t(
118
122
  "button",
119
123
  {
120
124
  type: "button",
121
125
  "aria-label": "Remove condition",
122
126
  onClick: () => _(
123
- b.filter((n, d) => d !== t),
127
+ b.filter((n, d) => d !== l),
124
128
  `Remove a lock condition from ${o}`
125
129
  ),
126
130
  "data-tip": "Remove condition",
127
131
  className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded text-slate-500 transition-colors hover:bg-slate-100 hover:text-red-600 dark:hover:bg-muted dark:hover:text-red-400",
128
- children: /* @__PURE__ */ l(B, { className: "h-3.5 w-3.5" })
132
+ children: /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" })
129
133
  }
130
134
  )
131
135
  ] }),
132
- e.type === "role" ? /* @__PURE__ */ l("div", { "data-setting": "field.lock_conditions.role_ids", children: /* @__PURE__ */ l(
136
+ e.type === "role" ? /* @__PURE__ */ t("div", { "data-setting": "field.lock_conditions.role_ids", children: /* @__PURE__ */ t(
133
137
  J,
134
138
  {
135
139
  roleIds: e.role_ids ?? [],
136
- onRoleIdsChange: (n) => w(t, { role_ids: n }, `Change the roles that lock ${o}`)
140
+ onRoleIdsChange: (n) => w(l, { role_ids: n }, `Change the roles that lock ${o}`)
137
141
  }
138
- ) }) : /* @__PURE__ */ l(
142
+ ) }) : /* @__PURE__ */ t(
139
143
  U,
140
144
  {
141
145
  collection: s.collection,
142
146
  pipelineId: e.pipeline_id,
143
147
  stateKeys: e.state_keys ?? [],
144
148
  onPipelineChange: (n) => w(
145
- t,
149
+ l,
146
150
  { pipeline_id: n, state_keys: [] },
147
151
  `Change the pipeline that locks ${o}`
148
152
  ),
149
- onStateKeysChange: (n) => w(t, { state_keys: n }, `Change the states that lock ${o}`)
153
+ onStateKeysChange: (n) => w(l, { state_keys: n }, `Change the states that lock ${o}`)
150
154
  }
151
155
  )
152
156
  ]
153
157
  },
154
- t
158
+ l
155
159
  )),
156
160
  /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-1.5", children: [
157
- /* @__PURE__ */ l(
158
- te,
161
+ /* @__PURE__ */ t(
162
+ ae,
159
163
  {
160
164
  onClick: () => _(
161
165
  [...b, { type: "pipeline_state", state_keys: [] }],
@@ -164,13 +168,13 @@ function Me() {
164
168
  children: "+ Add condition"
165
169
  }
166
170
  ),
167
- !g && /* @__PURE__ */ l(
171
+ !v && /* @__PURE__ */ t(
168
172
  H,
169
173
  {
170
174
  layoutId: Number(y.id),
171
175
  target: { kind: "lock", field: p.field },
172
176
  bundle: s.bundle,
173
- apply: (e, t) => s.apply(e, t),
177
+ apply: (e, l) => s.apply(e, l),
174
178
  disabled: a.readOnly
175
179
  }
176
180
  )
@@ -178,25 +182,25 @@ function Me() {
178
182
  ] })
179
183
  }
180
184
  ),
181
- !g && i.relKind !== "O2M" && /* @__PURE__ */ c(
185
+ !v && i.relKind !== "O2M" && /* @__PURE__ */ c(
182
186
  f,
183
187
  {
184
188
  k: "field.default_value",
185
189
  label: "Default for new records",
186
190
  effect: "Filled in when someone creates a record on this form.",
187
191
  children: [
188
- /* @__PURE__ */ l("div", { onBlurCapture: () => s.flush(), children: /* @__PURE__ */ l(
192
+ /* @__PURE__ */ t("div", { onBlurCapture: () => s.flush(), children: /* @__PURE__ */ t(
189
193
  z,
190
194
  {
191
195
  value: q[p.field],
192
- onChange: (e, t) => s.apply(
196
+ onChange: (e, l) => s.apply(
193
197
  [
194
198
  {
195
199
  op: "layout_update",
196
- patch: { default_values: re(y, p.field, e) }
200
+ patch: { default_values: ce(y, p.field, e) }
197
201
  }
198
202
  ],
199
- { label: `Change the default of ${o}`, text: t }
203
+ { label: `Change the default of ${o}`, text: l }
200
204
  ),
201
205
  isM2O: i.relKind === "M2O",
202
206
  isM2M: i.relKind === "M2M",
@@ -205,7 +209,7 @@ function Me() {
205
209
  abstractType: i.type
206
210
  }
207
211
  ) }),
208
- /* @__PURE__ */ l("div", { className: "pt-1", children: /* @__PURE__ */ l(
212
+ /* @__PURE__ */ t("div", { className: "pt-1", children: /* @__PURE__ */ t(
209
213
  Q,
210
214
  {
211
215
  layoutId: Number(y.id),
@@ -216,21 +220,21 @@ function Me() {
216
220
  ]
217
221
  }
218
222
  ),
219
- I && /* @__PURE__ */ l(
223
+ I && /* @__PURE__ */ t(
220
224
  f,
221
225
  {
222
226
  k: "field.validation_rules",
223
227
  label: "Checks",
224
228
  scope: "field",
225
229
  effect: "Learned from the values stored today, each with how many existing values it would refuse.",
226
- children: /* @__PURE__ */ l(
230
+ children: /* @__PURE__ */ t(
227
231
  X,
228
232
  {
229
233
  layoutId: Number(y.id),
230
234
  field: p.field,
231
235
  disabled: a.readOnly,
232
- onApply: (e, t, n) => a.proposeGlobal("field.validation_rules", e.length, n, (d) => {
233
- const h = d.columns.validation_rules, O = Array.isArray(h) ? h : t, F = (k, C) => k.type === C.type && String(k.value ?? "") === String(C.value ?? ""), V = e.filter((k) => !O.some((C) => F(C, k)));
236
+ onApply: (e, l, n) => a.proposeGlobal("field.validation_rules", e.length, n, (d) => {
237
+ const h = d.columns.validation_rules, O = Array.isArray(h) ? h : l, F = (k, C) => k.type === C.type && String(k.value ?? "") === String(C.value ?? ""), V = e.filter((k) => !O.some((C) => F(C, k)));
234
238
  return { ...d, columns: { ...d.columns, validation_rules: [...O, ...V] } };
235
239
  })
236
240
  }
@@ -238,13 +242,13 @@ function Me() {
238
242
  }
239
243
  ),
240
244
  i.relKind === "M2M" && /* @__PURE__ */ c(R, { title: "How many", children: [
241
- /* @__PURE__ */ l(
245
+ /* @__PURE__ */ t(
242
246
  f,
243
247
  {
244
248
  k: "field.max_values",
245
249
  label: "Most values",
246
250
  effect: "Empty: no limit. 1 makes it a single pick.",
247
- children: /* @__PURE__ */ l(
251
+ children: /* @__PURE__ */ t(
248
252
  S,
249
253
  {
250
254
  type: "number",
@@ -252,15 +256,15 @@ function Me() {
252
256
  value: A == null ? "" : String(A),
253
257
  placeholder: "No limit",
254
258
  onChange: (e) => {
255
- const t = e === "" ? void 0 : Math.max(1, Math.round(Number(e)));
256
- t !== void 0 && Number.isNaN(t) || a.setOption("max_values", t, `Limit how many ${o} can be picked`, !0);
259
+ const l = e === "" ? void 0 : Math.max(1, Math.round(Number(e)));
260
+ l !== void 0 && Number.isNaN(l) || a.setOption("max_values", l, `Limit how many ${o} can be picked`, !0);
257
261
  }
258
262
  }
259
263
  )
260
264
  }
261
265
  ),
262
- A != null && /* @__PURE__ */ l(
263
- v,
266
+ A != null && /* @__PURE__ */ t(
267
+ g,
264
268
  {
265
269
  k: "field.max_values_enforce_on_write",
266
270
  label: "Refuse more on the server too",
@@ -276,14 +280,14 @@ function Me() {
276
280
  )
277
281
  ] }),
278
282
  M && /* @__PURE__ */ c(R, { title: "Apply to lines", children: [
279
- /* @__PURE__ */ l("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "A button beside the field copies its value into one column of every line of a grid." }),
280
- /* @__PURE__ */ l(
283
+ /* @__PURE__ */ t("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "A button beside the field copies its value into one column of every line of a grid." }),
284
+ /* @__PURE__ */ t(
281
285
  f,
282
286
  {
283
287
  k: "field.apply_to_lines.grid",
284
288
  label: "Grid",
285
289
  effect: "The grid whose lines get the value.",
286
- children: /* @__PURE__ */ l(
290
+ children: /* @__PURE__ */ t(
287
291
  T,
288
292
  {
289
293
  ariaLabel: "Grid",
@@ -300,13 +304,13 @@ function Me() {
300
304
  )
301
305
  }
302
306
  ),
303
- /* @__PURE__ */ l(
307
+ /* @__PURE__ */ t(
304
308
  f,
305
309
  {
306
310
  k: "field.apply_to_lines.target",
307
311
  label: "Column",
308
312
  effect: "The column of each line that receives the value.",
309
- children: /* @__PURE__ */ l(
313
+ children: /* @__PURE__ */ t(
310
314
  T,
311
315
  {
312
316
  ariaLabel: "Column",
@@ -321,13 +325,13 @@ function Me() {
321
325
  )
322
326
  }
323
327
  ),
324
- /* @__PURE__ */ l(
328
+ /* @__PURE__ */ t(
325
329
  f,
326
330
  {
327
331
  k: "field.apply_to_lines.label",
328
332
  label: "Button label",
329
333
  effect: "The words on the button.",
330
- children: /* @__PURE__ */ l(
334
+ children: /* @__PURE__ */ t(
331
335
  S,
332
336
  {
333
337
  ariaLabel: "Button label",
@@ -335,7 +339,7 @@ function Me() {
335
339
  value: r.label ?? "",
336
340
  placeholder: "Apply to lines",
337
341
  onChange: (e) => {
338
- const { label: t, ...n } = r;
342
+ const { label: l, ...n } = r;
339
343
  a.setOverride(
340
344
  "apply_to_lines",
341
345
  e ? { ...n, label: e } : n,
@@ -348,8 +352,8 @@ function Me() {
348
352
  }
349
353
  )
350
354
  ] }),
351
- s.layoutType === "addendum" && /* @__PURE__ */ l(
352
- v,
355
+ s.layoutType === "addendum" && /* @__PURE__ */ t(
356
+ g,
353
357
  {
354
358
  k: "field.prefill_from_parent",
355
359
  label: "Prefill from the record",
@@ -365,6 +369,6 @@ function Me() {
365
369
  ] });
366
370
  }
367
371
  export {
368
- Me as RulesTab,
369
- se as useFieldRows
372
+ Se as RulesTab,
373
+ pe as useFieldRows
370
374
  };