@nivaro/react 0.2.54 → 0.2.56

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 (151) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +367 -2
  4. package/dist/index.js +645 -616
  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/stale-chunk.js +60 -0
  150. package/dist/shared/lib/worker-socket.js +200 -0
  151. package/package.json +1 -1
@@ -1,79 +1,80 @@
1
- import { jsxs as c, Fragment as Y, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as p, Fragment as Y, jsx as t } from "react/jsx-runtime";
2
2
  import { useQuery as E } from "@tanstack/react-query";
3
- import { useState as Z, useEffect as ee, useContext as oe } from "react";
3
+ import { useState as Z, useEffect as ee, useContext as le } from "react";
4
4
  import { useNivaroClient as K } from "../../../context.js";
5
5
  import { get as j } from "../../../lib/commands.js";
6
- import { CascadeWriter as le } from "../ai-rules/CascadeWriter.js";
6
+ import { CascadeWriter as oe } from "../ai-rules/CascadeWriter.js";
7
7
  import { CascadeFiltersEditor as te } from "../editors/cascade-filters.js";
8
8
  import { editorQueryKeys as ie } from "../editors/editor-queries.js";
9
9
  import { useFieldCtx as ne } from "./field-context.js";
10
- import { useGlobalValue as m, GlobalWriterContext as ae, Toggle as g, Setting as _, TextInput as re, Section as $, Choice as x } from "./kit.js";
10
+ import { useGlobalValue as b, GlobalWriterContext as ae, Toggle as g, Setting as m, TextInput as re, Section as $, Choice as x } from "./kit.js";
11
11
  import { asObject as de, asArray as se, relKindOf as ce, describeField as fe, withKey as F } from "./model.js";
12
- import { PickerPreview as pe } from "./PickerPreview.js";
13
- function ue(o) {
14
- const l = K();
12
+ import { PickerMisses as pe } from "./PickerMisses.js";
13
+ import { PickerPreview as ue } from "./PickerPreview.js";
14
+ function he(l) {
15
+ const o = K();
15
16
  return E({
16
- queryKey: ie.relationsFor(o),
17
- queryFn: () => l.request(j(`/data-model/relations/for/${o}`)).then((d) => Array.isArray(d.data) ? d.data : []),
18
- enabled: !!o,
17
+ queryKey: ie.relationsFor(l),
18
+ queryFn: () => o.request(j(`/data-model/relations/for/${l}`)).then((d) => Array.isArray(d.data) ? d.data : []),
19
+ enabled: !!l,
19
20
  staleTime: 5 * 6e4
20
21
  });
21
22
  }
22
- function he(o) {
23
- const l = K();
23
+ function ge(l) {
24
+ const o = K();
24
25
  return E({
25
- queryKey: ["layout-editor", "layouts-of", o],
26
- queryFn: () => l.request(
27
- j("/collection-layouts", { collection: o })
26
+ queryKey: ["layout-editor", "layouts-of", l],
27
+ queryFn: () => o.request(
28
+ j("/collection-layouts", { collection: l })
28
29
  ).then((d) => Array.isArray(d.data) ? d.data : []),
29
- enabled: !!o,
30
+ enabled: !!l,
30
31
  staleTime: 6e4
31
32
  });
32
33
  }
33
- function S(o) {
34
- const l = o.trim();
35
- if (!l) return null;
36
- const d = /^(\d{1,3})%$/.exec(l);
34
+ function S(l) {
35
+ const o = l.trim();
36
+ if (!o) return null;
37
+ const d = /^(\d{1,3})%$/.exec(o);
37
38
  if (d) {
38
39
  const a = Number(d[1]);
39
40
  return a >= 10 && a <= 96 ? `${a}%` : "invalid";
40
41
  }
41
- if (/^\d+$/.test(l)) {
42
- const a = Number(l);
42
+ if (/^\d+$/.test(o)) {
43
+ const a = Number(o);
43
44
  return a >= 320 && a <= 2e3 ? a : "invalid";
44
45
  }
45
46
  return "invalid";
46
47
  }
47
- function Fe() {
48
+ function Ne() {
48
49
  var L;
49
- const o = ne(), { info: l, ov: d, opts: a, env: p, globalOptions: r, globalDependency: q } = o, n = l.label, f = l.relKind === "M2O", u = l.relKind === "M2M", b = l.iface === "relation-path" || l.isPath, G = l.iface === "file-image" || l.iface === "files-m2m", P = l.iface === "relation-grouped", h = de(d.drilldown), y = h.enabled ?? b, W = l.relatedCollection ?? (typeof r.path_target_collection == "string" ? r.path_target_collection : null), { data: D = [] } = he(f || u || b ? W : null), R = D.filter((e) => e.layout_type === "detail"), w = h.width == null ? "" : String(h.width), [A, N] = Z(w);
50
+ const l = ne(), { info: o, ov: d, opts: a, env: s, globalOptions: r, globalDependency: q } = l, n = o.label, c = o.relKind === "M2O", u = o.relKind === "M2M", _ = o.iface === "relation-path" || o.isPath, N = o.iface === "file-image" || o.iface === "files-m2m", P = o.iface === "relation-grouped", h = de(d.drilldown), y = h.enabled ?? _, W = o.relatedCollection ?? (typeof r.path_target_collection == "string" ? r.path_target_collection : null), { data: D = [] } = ge(c || u || _ ? W : null), I = D.filter((e) => e.layout_type === "detail"), w = h.width == null ? "" : String(h.width), [G, T] = Z(w);
50
51
  ee(() => {
51
- N((e) => {
52
+ T((e) => {
52
53
  const i = S(e);
53
54
  return (i === null ? "" : String(i)) === w ? e : w;
54
55
  });
55
56
  }, [w]);
56
- const I = S(A), k = (e, i, s) => o.setOverride("drilldown", { ...h, enabled: y, ...e }, i, s), { data: Q = [] } = ue(P ? l.relatedCollection : null), T = Q.filter(
57
- (e) => e.many_collection === l.relatedCollection && e.many_field && !e.junction_field
58
- ).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B = m(
57
+ const R = S(G), k = (e, i, f) => l.setOverride("drilldown", { ...h, enabled: y, ...e }, i, f), { data: Q = [] } = he(P ? o.relatedCollection : null), A = Q.filter(
58
+ (e) => e.many_collection === o.relatedCollection && e.many_field && !e.junction_field
59
+ ).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B = b(
59
60
  "field.group_field",
60
61
  typeof r.group_field == "string" ? r.group_field : ""
61
- ), U = m(
62
+ ), U = b(
62
63
  "field.option_field",
63
64
  typeof r.option_field == "string" ? r.option_field : ""
64
- ), V = (L = oe(ae)) == null ? void 0 : L.draft.dependency_config, v = se((V ?? q).cascade_filters), C = new Set(o.globals.map((e) => e.field));
65
- for (const e of o.relations)
66
- e.one_field && e.one_field !== "id" && e.one_collection === p.collection && C.add(e.one_field), e.many_field && e.many_collection === p.collection && C.add(e.many_field);
67
- const M = [...C].filter((e) => e !== l.field).map((e) => ({ f: e, kind: ce(e, o.relations) })).filter((e) => e.kind === "M2O" || e.kind === "M2M").map(({ f: e, kind: i }) => {
68
- const s = p.bundle.placements.find((X) => X.field === e) ?? null;
65
+ ), V = (L = le(ae)) == null ? void 0 : L.draft.dependency_config, v = se((V ?? q).cascade_filters), C = new Set(l.globals.map((e) => e.field));
66
+ for (const e of l.relations)
67
+ e.one_field && e.one_field !== "id" && e.one_collection === s.collection && C.add(e.one_field), e.many_field && e.many_collection === s.collection && C.add(e.many_field);
68
+ const M = [...C].filter((e) => e !== o.field).map((e) => ({ f: e, kind: ce(e, l.relations) })).filter((e) => e.kind === "M2O" || e.kind === "M2M").map(({ f: e, kind: i }) => {
69
+ const f = s.bundle.placements.find((X) => X.field === e) ?? null;
69
70
  return {
70
71
  field: e,
71
- label: fe(e, o.globals, o.relations, s).label,
72
+ label: fe(e, l.globals, l.relations, f).label,
72
73
  kind: i
73
74
  };
74
- }).sort((e, i) => e.label.localeCompare(i.label)), O = (e, i) => typeof r[e] == "boolean" ? r[e] : i, z = m("field.allow_upload", O("allow_upload", !0)), H = m("field.allow_pick", O("allow_pick", !0)), J = m("field.pending_save", O("pending_save", !1));
75
- return /* @__PURE__ */ c("div", { className: "space-y-5", children: [
76
- (f || u) && /* @__PURE__ */ c(Y, { children: [
75
+ }).sort((e, i) => e.label.localeCompare(i.label)), O = (e, i) => typeof r[e] == "boolean" ? r[e] : i, z = b("field.allow_upload", O("allow_upload", !0)), H = b("field.allow_pick", O("allow_pick", !0)), J = b("field.pending_save", O("pending_save", !1));
76
+ return /* @__PURE__ */ p("div", { className: "space-y-5", children: [
77
+ (c || u) && /* @__PURE__ */ p(Y, { children: [
77
78
  /* @__PURE__ */ t(
78
79
  g,
79
80
  {
@@ -81,7 +82,7 @@ function Fe() {
81
82
  label: "Edit the related record here",
82
83
  effect: "Shows the picked record’s fields inline so people can change them without leaving.",
83
84
  checked: a.inline_relation === !0,
84
- onChange: (e) => o.setOption(
85
+ onChange: (e) => l.setOption(
85
86
  "inline_relation",
86
87
  e ? !0 : void 0,
87
88
  e ? `Edit ${n} inline` : `Stop editing ${n} inline`
@@ -89,7 +90,7 @@ function Fe() {
89
90
  }
90
91
  ),
91
92
  /* @__PURE__ */ t(
92
- _,
93
+ m,
93
94
  {
94
95
  k: "field.option_sort",
95
96
  label: "Order of the options",
@@ -101,7 +102,7 @@ function Fe() {
101
102
  mono: !0,
102
103
  value: typeof a.option_sort == "string" ? a.option_sort : "",
103
104
  placeholder: "-year, name",
104
- onChange: (e) => o.setOption(
105
+ onChange: (e) => l.setOption(
105
106
  "option_sort",
106
107
  e.trim() ? e : void 0,
107
108
  `Change the order of ${n} options`,
@@ -112,7 +113,7 @@ function Fe() {
112
113
  }
113
114
  )
114
115
  ] }),
115
- f && /* @__PURE__ */ t(
116
+ c && /* @__PURE__ */ t(
116
117
  g,
117
118
  {
118
119
  k: "field.enforce_picker_rules",
@@ -120,15 +121,16 @@ function Fe() {
120
121
  effect: "The server rejects a value outside the cascade filters and option filters, from any writer.",
121
122
  enforced: !0,
122
123
  checked: a.enforce_picker_rules === !0,
123
- onChange: (e) => o.setOption(
124
+ onChange: (e) => l.setOption(
124
125
  "enforce_picker_rules",
125
126
  e ? !0 : void 0,
126
127
  e ? `Enforce the picker rules of ${n}` : `Stop enforcing the picker rules of ${n}`
127
128
  )
128
129
  }
129
130
  ),
130
- (f || u) && l.iface !== "files-m2m" && /* @__PURE__ */ t(pe, { rules: v }),
131
- (f || u || b) && /* @__PURE__ */ c($, { title: "Detail panel", children: [
131
+ (c || u) && o.iface !== "files-m2m" && /* @__PURE__ */ t(ue, { rules: v }),
132
+ c && s.layoutType === "grouped" && Number(s.bundle.layout.id) > 0 && /* @__PURE__ */ t(pe, { layoutId: Number(s.bundle.layout.id), field: o.field }),
133
+ (c || u || _) && /* @__PURE__ */ p($, { title: "Detail panel", children: [
132
134
  /* @__PURE__ */ t(
133
135
  g,
134
136
  {
@@ -143,7 +145,7 @@ function Fe() {
143
145
  }
144
146
  ),
145
147
  /* @__PURE__ */ t(
146
- _,
148
+ m,
147
149
  {
148
150
  k: "field.drilldown.layout_id",
149
151
  label: "Panel layout",
@@ -156,15 +158,15 @@ function Fe() {
156
158
  value: h.layout_id == null ? "" : String(h.layout_id),
157
159
  options: [
158
160
  { value: "", label: "The default detail view" },
159
- ...R.map((e) => ({ value: String(e.id), label: e.name }))
161
+ ...I.map((e) => ({ value: String(e.id), label: e.name }))
160
162
  ],
161
163
  onChange: (e) => k({ layout_id: e ? Number(e) : null }, `Change the panel layout of ${n}`)
162
164
  }
163
165
  )
164
166
  }
165
167
  ),
166
- /* @__PURE__ */ c(
167
- _,
168
+ /* @__PURE__ */ p(
169
+ m,
168
170
  {
169
171
  k: "field.drilldown.width",
170
172
  label: "Panel width",
@@ -175,25 +177,25 @@ function Fe() {
175
177
  {
176
178
  "aria-label": "Panel width",
177
179
  disabled: !y,
178
- value: A,
180
+ value: G,
179
181
  placeholder: "60%",
180
182
  onChange: (e) => {
181
- N(e.target.value);
183
+ T(e.target.value);
182
184
  const i = S(e.target.value);
183
185
  i !== "invalid" && k({ width: i }, `Change the panel width of ${n}`, !0);
184
186
  },
185
- onBlur: () => p.flush(),
187
+ onBlur: () => s.flush(),
186
188
  className: "h-7 w-full rounded-md border border-slate-200 bg-white px-2 font-mono text-[12px] focus:border-nvr-cyan focus:outline-none disabled:opacity-40 dark:border-border dark:bg-card"
187
189
  }
188
190
  ),
189
- I === "invalid" && /* @__PURE__ */ t("p", { className: "text-[11px] text-red-600 dark:text-red-400", children: "Not a width — nothing saved" })
191
+ R === "invalid" && /* @__PURE__ */ t("p", { className: "text-[11px] text-red-600 dark:text-red-400", children: "Not a width — nothing saved" })
190
192
  ]
191
193
  }
192
194
  )
193
195
  ] }),
194
- P && /* @__PURE__ */ c($, { title: "Grouped list", children: [
196
+ P && /* @__PURE__ */ p($, { title: "Grouped list", children: [
195
197
  /* @__PURE__ */ t(
196
- _,
198
+ m,
197
199
  {
198
200
  k: "field.group_field",
199
201
  label: "Group options by",
@@ -204,8 +206,8 @@ function Fe() {
204
206
  {
205
207
  ariaLabel: "Group options by",
206
208
  value: B,
207
- options: [{ value: "", label: "Not grouped" }, ...T],
208
- onChange: (e) => o.proposeGlobalOption(
209
+ options: [{ value: "", label: "Not grouped" }, ...A],
210
+ onChange: (e) => l.proposeGlobalOption(
209
211
  "field.group_field",
210
212
  "group_field",
211
213
  e || void 0,
@@ -217,7 +219,7 @@ function Fe() {
217
219
  }
218
220
  ),
219
221
  /* @__PURE__ */ t(
220
- _,
222
+ m,
221
223
  {
222
224
  k: "field.option_field",
223
225
  label: "Option field",
@@ -228,8 +230,8 @@ function Fe() {
228
230
  {
229
231
  ariaLabel: "Option field",
230
232
  value: U,
231
- options: [{ value: "", label: "The related record itself" }, ...T],
232
- onChange: (e) => o.proposeGlobalOption(
233
+ options: [{ value: "", label: "The related record itself" }, ...A],
234
+ onChange: (e) => l.proposeGlobalOption(
233
235
  "field.option_field",
234
236
  "option_field",
235
237
  e || void 0,
@@ -241,8 +243,8 @@ function Fe() {
241
243
  }
242
244
  )
243
245
  ] }),
244
- (f || u) && /* @__PURE__ */ c(
245
- _,
246
+ (c || u) && /* @__PURE__ */ p(
247
+ m,
246
248
  {
247
249
  k: "field.cascade_filters",
248
250
  label: "Narrow the options by another field",
@@ -254,8 +256,8 @@ function Fe() {
254
256
  {
255
257
  rules: v,
256
258
  m2oFields: M,
257
- relatedCollection: l.relatedCollection,
258
- onChange: (e) => o.proposeGlobal(
259
+ relatedCollection: o.relatedCollection,
260
+ onChange: (e) => l.proposeGlobal(
259
261
  "field.cascade_filters",
260
262
  e,
261
263
  `Change how ${n} options are narrowed`,
@@ -271,30 +273,30 @@ function Fe() {
271
273
  }
272
274
  ),
273
275
  /* @__PURE__ */ t(
274
- le,
276
+ oe,
275
277
  {
276
- layoutId: Number(p.bundle.layout.id),
277
- collection: p.collection,
278
- field: l.field,
278
+ layoutId: Number(s.bundle.layout.id),
279
+ collection: s.collection,
280
+ field: o.field,
279
281
  rules: v,
280
282
  currentOptionFilter: r.option_filter && typeof r.option_filter == "object" && !Array.isArray(r.option_filter) ? r.option_filter : null,
281
283
  parentFields: M.filter((e) => e.kind === "M2O").map((e) => e.field),
282
- disabled: o.readOnly,
283
- onApply: (e, i) => o.proposeGlobal("field.cascade_filters", e.rules, i, (s) => ({
284
- ...s,
284
+ disabled: l.readOnly,
285
+ onApply: (e, i) => l.proposeGlobal("field.cascade_filters", e.rules, i, (f) => ({
286
+ ...f,
285
287
  dependency_config: F(
286
- s.dependency_config,
288
+ f.dependency_config,
287
289
  "cascade_filters",
288
290
  e.rules.length ? e.rules : void 0
289
291
  ) ?? {},
290
- options: F(s.options, "option_filter", e.optionFilter ?? void 0) ?? {}
292
+ options: F(f.options, "option_filter", e.optionFilter ?? void 0) ?? {}
291
293
  }))
292
294
  }
293
295
  )
294
296
  ]
295
297
  }
296
298
  ),
297
- G && /* @__PURE__ */ c($, { title: "Files", children: [
299
+ N && /* @__PURE__ */ p($, { title: "Files", children: [
298
300
  /* @__PURE__ */ t(
299
301
  g,
300
302
  {
@@ -303,7 +305,7 @@ function Fe() {
303
305
  effect: "People can upload new files into this field.",
304
306
  scope: "field",
305
307
  checked: z,
306
- onChange: (e) => o.proposeGlobalOption(
308
+ onChange: (e) => l.proposeGlobalOption(
307
309
  "field.allow_upload",
308
310
  "allow_upload",
309
311
  e,
@@ -319,7 +321,7 @@ function Fe() {
319
321
  effect: "People can attach files that are already stored.",
320
322
  scope: "field",
321
323
  checked: H,
322
- onChange: (e) => o.proposeGlobalOption(
324
+ onChange: (e) => l.proposeGlobalOption(
323
325
  "field.allow_pick",
324
326
  "allow_pick",
325
327
  e,
@@ -327,7 +329,7 @@ function Fe() {
327
329
  )
328
330
  }
329
331
  ),
330
- l.iface === "files-m2m" && /* @__PURE__ */ t(
332
+ o.iface === "files-m2m" && /* @__PURE__ */ t(
331
333
  g,
332
334
  {
333
335
  k: "field.pending_save",
@@ -335,7 +337,7 @@ function Fe() {
335
337
  scope: "field",
336
338
  effect: "Links wait for the record’s Save instead of saving at once.",
337
339
  checked: J,
338
- onChange: (e) => o.proposeGlobalOption(
340
+ onChange: (e) => l.proposeGlobalOption(
339
341
  "field.pending_save",
340
342
  "pending_save",
341
343
  e || void 0,
@@ -345,15 +347,15 @@ function Fe() {
345
347
  }
346
348
  )
347
349
  ] }),
348
- !(f || u || b || G) && /* @__PURE__ */ c("p", { className: "text-[12px] text-muted-foreground", children: [
350
+ !(c || u || _ || N) && /* @__PURE__ */ p("p", { className: "text-[12px] text-muted-foreground", children: [
349
351
  n,
350
352
  " is not a picker. Nothing to set here."
351
353
  ] })
352
354
  ] });
353
355
  }
354
356
  export {
355
- Fe as PickerTab,
357
+ Ne as PickerTab,
356
358
  S as parsePanelWidth,
357
- he as useLayoutsOf,
358
- ue as useRelationsFor
359
+ ge as useLayoutsOf,
360
+ he as useRelationsFor
359
361
  };