@nivaro/react 0.3.33 → 0.3.35

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 (32) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +79 -5
  4. package/dist/index.js +338 -329
  5. package/dist/shared/components/ItemEditForm.js +5274 -5069
  6. package/dist/shared/components/ProfileView.js +46 -44
  7. package/dist/shared/components/ReportView.js +208 -205
  8. package/dist/shared/components/SearchHighlight.js +30 -0
  9. package/dist/shared/components/TipLayer.js +39 -37
  10. package/dist/shared/components/item-edit/CatalogPickerField.js +1484 -1232
  11. package/dist/shared/components/item-edit/FieldAffordances.js +424 -213
  12. package/dist/shared/components/item-edit/FieldRow.js +475 -427
  13. package/dist/shared/components/item-edit/PersonalDefaultControl.js +211 -0
  14. package/dist/shared/components/item-edit/PersonalDefaultPill.js +20 -0
  15. package/dist/shared/components/item-edit/RecordLiveSync.js +115 -110
  16. package/dist/shared/components/item-edit/RelationCombobox.js +42 -41
  17. package/dist/shared/components/item-edit/catalog-search.js +34 -0
  18. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +43 -43
  19. package/dist/shared/components/item-edit/live-record-marks.js +13 -0
  20. package/dist/shared/components/item-edit/personal-default-checks.js +134 -0
  21. package/dist/shared/components/item-edit/usePersonalDefaults.js +442 -0
  22. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +130 -111
  23. package/dist/shared/components/layout-editor/inspector/RulesTab.js +76 -75
  24. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  25. package/dist/shared/components/profile/MyDefaultsCard.js +667 -0
  26. package/dist/shared/components/profile/PersonProfile.js +42 -40
  27. package/dist/shared/components/profile/my-defaults-labels.js +76 -0
  28. package/dist/shared/components/profile/primitives.js +72 -67
  29. package/dist/shared/lib/personal-defaults.js +76 -0
  30. package/dist/shared/lib/request-gate.js +78 -76
  31. package/dist/shared/lib/search-text.js +111 -0
  32. package/package.json +1 -1
@@ -1,48 +1,49 @@
1
1
  import { jsxs as h, jsx as a, Fragment as C } from "react/jsx-runtime";
2
- import { X as $ } from "lucide-react";
2
+ import { X as S } from "lucide-react";
3
3
  import { useMemo as N } from "react";
4
4
  import { validateExpression as R } from "../../../lib/expression.js";
5
- import { displayFormulaOf as T, textRulesOf as O, counterOf as L, confirmChangeOf as F } from "../../../lib/placement-behaviour.js";
6
- import { cn as A } from "../../../lib/utils.js";
7
- import { RoleConditionRow as M, PipelineStateConditionRow as w } from "../editors/lock-conditions.js";
8
- import { useColumnFacts as I, columnOf as W } from "../inspect/inspect-api.js";
9
- import { effectText as D, tintCard as P } from "../panel-style.js";
5
+ import { displayFormulaOf as T, textRulesOf as O, counterOf as L, confirmChangeOf as M } from "../../../lib/placement-behaviour.js";
6
+ import { cn as F } from "../../../lib/utils.js";
7
+ import { RoleConditionRow as A, PipelineStateConditionRow as $ } from "../editors/lock-conditions.js";
8
+ import { useColumnFacts as P, columnOf as D } from "../inspect/inspect-api.js";
9
+ import { effectText as I, tintCard as W } from "../panel-style.js";
10
10
  import { isRelational as j } from "./applies.js";
11
11
  import { useFieldCtx as b } from "./field-context.js";
12
- import { useInspectorEnv as q, Setting as p, TextInput as v, TextArea as K, Segmented as k, DraftInput as E, AddButton as H, Toggle as _ } from "./kit.js";
12
+ import { useInspectorEnv as q, Setting as p, TextInput as _, TextArea as K, Segmented as k, DraftInput as E, AddButton as H, Toggle as v } from "./kit.js";
13
13
  const U = "rounded p-0.5 text-slate-400 transition-colors hover:bg-muted hover:text-slate-700 dark:hover:text-foreground";
14
14
  function z(o) {
15
15
  if (j(o)) return !1;
16
16
  const s = o.iface ?? "";
17
17
  return ["string", "text", "richtext", "rich_text", "markdown", "wysiwyg"].includes(o.type) || /textarea|rich|wysiwyg|markdown/i.test(s);
18
18
  }
19
- function S(o, s) {
20
- return !s.startsWith("__") && !o.isPath && o.type !== "alias" && o.relKind !== "M2M" && o.relKind !== "O2M" && o.computedType !== "virtual" && o.computedType !== "read";
19
+ function w(o, s, r = {}) {
20
+ const u = r.allowM2M === !0 && o.relKind === "M2M";
21
+ return !s.startsWith("__") && !o.isPath && (u || o.type !== "alias" && o.relKind !== "M2M") && o.relKind !== "O2M" && o.computedType !== "virtual" && o.computedType !== "read";
21
22
  }
22
- function re() {
23
- const o = b(), { ov: s, info: d, env: f, row: l } = o, i = d.label, c = O(s), u = (r, n, e) => o.setOverride("text_rules", r.length ? r : void 0, n, e), t = (r, n, e, m) => u(
24
- c.map((g, y) => y === r ? { ...g, ...n } : g),
23
+ function le() {
24
+ const o = b(), { ov: s, info: r, env: u, row: i } = o, c = r.label, d = O(s), f = (l, n, e) => o.setOverride("text_rules", l.length ? l : void 0, n, e), t = (l, n, e, m) => f(
25
+ d.map((g, y) => y === l ? { ...g, ...n } : g),
25
26
  e,
26
27
  m
27
28
  );
28
- return l.field.startsWith("__") ? null : /* @__PURE__ */ h(
29
+ return i.field.startsWith("__") ? null : /* @__PURE__ */ h(
29
30
  p,
30
31
  {
31
32
  k: "field.text_rules",
32
33
  label: "Label and help by state or role",
33
34
  effect: "Different words in a workflow state or for a role: “Requested date” becomes “Delivered date” once Completed. The first rule that matches wins; the record page, read view and PDF follow it.",
34
35
  children: [
35
- c.map((r, n) => /* @__PURE__ */ h(
36
+ d.map((l, n) => /* @__PURE__ */ h(
36
37
  "div",
37
38
  {
38
39
  "data-text-rule": n,
39
- className: A(P, "space-y-2 px-2.5 py-2"),
40
+ className: F(W, "space-y-2 px-2.5 py-2"),
40
41
  children: [
41
42
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
42
43
  /* @__PURE__ */ a("div", { className: "flex-1", children: /* @__PURE__ */ a(
43
44
  k,
44
45
  {
45
- value: r.type,
46
+ value: l.type,
46
47
  options: [
47
48
  { value: "pipeline_state", label: "In a state" },
48
49
  { value: "role", label: "For a role" }
@@ -55,7 +56,7 @@ function re() {
55
56
  state_keys: void 0,
56
57
  pipeline_id: void 0
57
58
  } : { type: "pipeline_state", state_keys: [], role_ids: void 0 },
58
- `Change when ${i} reads differently`
59
+ `Change when ${c} reads differently`
59
60
  )
60
61
  }
61
62
  ) }),
@@ -66,46 +67,46 @@ function re() {
66
67
  "aria-label": "Remove this rule",
67
68
  "data-tip": "Remove this rule",
68
69
  className: U,
69
- onClick: () => u(
70
- c.filter((e, m) => m !== n),
71
- `Remove a label rule from ${i}`
70
+ onClick: () => f(
71
+ d.filter((e, m) => m !== n),
72
+ `Remove a label rule from ${c}`
72
73
  ),
73
- children: /* @__PURE__ */ a($, { className: "h-3.5 w-3.5" })
74
+ children: /* @__PURE__ */ a(S, { className: "h-3.5 w-3.5" })
74
75
  }
75
76
  )
76
77
  ] }),
77
- r.type === "role" ? /* @__PURE__ */ a(
78
- M,
78
+ l.type === "role" ? /* @__PURE__ */ a(
79
+ A,
79
80
  {
80
- roleIds: r.role_ids ?? [],
81
- onRoleIdsChange: (e) => t(n, { role_ids: e }, `Change the roles for ${i}`)
81
+ roleIds: l.role_ids ?? [],
82
+ onRoleIdsChange: (e) => t(n, { role_ids: e }, `Change the roles for ${c}`)
82
83
  }
83
84
  ) : /* @__PURE__ */ a(
84
- w,
85
+ $,
85
86
  {
86
- collection: f.collection,
87
- pipelineId: r.pipeline_id,
88
- stateKeys: r.state_keys ?? [],
89
- onPipelineChange: (e) => t(n, { pipeline_id: e, state_keys: [] }, `Change the pipeline for ${i}`),
90
- onStateKeysChange: (e) => t(n, { state_keys: e }, `Change the states for ${i}`)
87
+ collection: u.collection,
88
+ pipelineId: l.pipeline_id,
89
+ stateKeys: l.state_keys ?? [],
90
+ onPipelineChange: (e) => t(n, { pipeline_id: e, state_keys: [] }, `Change the pipeline for ${c}`),
91
+ onStateKeysChange: (e) => t(n, { state_keys: e }, `Change the states for ${c}`)
91
92
  }
92
93
  ),
93
94
  /* @__PURE__ */ a(
94
- v,
95
+ _,
95
96
  {
96
97
  ariaLabel: "Label in this case",
97
- value: r.label ?? "",
98
- placeholder: `Label (${i})`,
99
- onChange: (e) => t(n, { label: e || void 0 }, `Change a label rule of ${i}`, !0)
98
+ value: l.label ?? "",
99
+ placeholder: `Label (${c})`,
100
+ onChange: (e) => t(n, { label: e || void 0 }, `Change a label rule of ${c}`, !0)
100
101
  }
101
102
  ),
102
103
  /* @__PURE__ */ a(
103
- v,
104
+ _,
104
105
  {
105
106
  ariaLabel: "Help text in this case",
106
- value: r.note ?? "",
107
+ value: l.note ?? "",
107
108
  placeholder: "Help text (unchanged when empty)",
108
- onChange: (e) => t(n, { note: e || void 0 }, `Change a help rule of ${i}`, !0)
109
+ onChange: (e) => t(n, { note: e || void 0 }, `Change a help rule of ${c}`, !0)
109
110
  }
110
111
  )
111
112
  ]
@@ -115,9 +116,9 @@ function re() {
115
116
  /* @__PURE__ */ a(
116
117
  H,
117
118
  {
118
- onClick: () => u(
119
- [...c, { type: "pipeline_state", state_keys: [] }],
120
- `Add a label rule to ${i}`
119
+ onClick: () => f(
120
+ [...d, { type: "pipeline_state", state_keys: [] }],
121
+ `Add a label rule to ${c}`
121
122
  ),
122
123
  children: "+ Add a rule"
123
124
  }
@@ -126,21 +127,21 @@ function re() {
126
127
  }
127
128
  );
128
129
  }
129
- function le() {
130
- const o = b(), { ov: s, info: d, env: f, row: l } = o, { data: i } = I(f.collection), c = W(i, l.field);
131
- if (!z(d) || l.field.startsWith("__")) return null;
132
- const u = d.label, t = L(s), r = (c == null ? void 0 : c.max_length) != null && c.max_length > 0 ? c.max_length : null, n = (e, m, g) => o.setOverride("counter", e, m, g);
130
+ function re() {
131
+ const o = b(), { ov: s, info: r, env: u, row: i } = o, { data: c } = P(u.collection), d = D(c, i.field);
132
+ if (!z(r) || i.field.startsWith("__")) return null;
133
+ const f = r.label, t = L(s), l = (d == null ? void 0 : d.max_length) != null && d.max_length > 0 ? d.max_length : null, n = (e, m, g) => o.setOverride("counter", e, m, g);
133
134
  return /* @__PURE__ */ h("div", { "data-setting": "field.counter", className: "space-y-3", children: [
134
135
  /* @__PURE__ */ a(
135
- _,
136
+ v,
136
137
  {
137
138
  k: "field.counter.on",
138
139
  label: "Counter and limit",
139
- effect: r ? `Counts as people type. The limit starts at the column size (${r.toLocaleString()} characters); past it the form will not save.` : "Counts as people type; past a limit the form will not save.",
140
+ effect: l ? `Counts as people type. The limit starts at the column size (${l.toLocaleString()} characters); past it the form will not save.` : "Counts as people type; past a limit the form will not save.",
140
141
  checked: !!t,
141
142
  onChange: (e) => n(
142
- e ? { unit: "characters", ...r ? { limit: r } : {} } : void 0,
143
- e ? `Count the characters of ${u}` : `Stop counting ${u}`
143
+ e ? { unit: "characters", ...l ? { limit: l } : {} } : void 0,
144
+ e ? `Count the characters of ${f}` : `Stop counting ${f}`
144
145
  )
145
146
  }
146
147
  ),
@@ -156,9 +157,9 @@ function le() {
156
157
  onChange: (e) => n(
157
158
  {
158
159
  unit: e,
159
- ...e === "words" ? {} : t.limit != null ? { limit: t.limit } : r ? { limit: r } : {}
160
+ ...e === "words" ? {} : t.limit != null ? { limit: t.limit } : l ? { limit: l } : {}
160
161
  },
161
- `Count the ${e} of ${u}`
162
+ `Count the ${e} of ${f}`
162
163
  )
163
164
  }
164
165
  ) }),
@@ -167,19 +168,19 @@ function le() {
167
168
  {
168
169
  k: "field.counter.limit",
169
170
  label: "Limit",
170
- effect: t.unit === "words" ? "Most words allowed. Empty counts without a limit." : `Most characters allowed. Empty counts without a limit${r ? `; the column holds ${r.toLocaleString()}` : ""}.`,
171
+ effect: t.unit === "words" ? "Most words allowed. Empty counts without a limit." : `Most characters allowed. Empty counts without a limit${l ? `; the column holds ${l.toLocaleString()}` : ""}.`,
171
172
  children: /* @__PURE__ */ a(
172
- v,
173
+ _,
173
174
  {
174
175
  type: "number",
175
176
  ariaLabel: "Limit",
176
177
  value: t.limit == null ? "" : String(t.limit),
177
- placeholder: t.unit === "characters" && r ? String(r) : "No limit",
178
+ placeholder: t.unit === "characters" && l ? String(l) : "No limit",
178
179
  onChange: (e) => {
179
180
  const m = e === "" ? void 0 : Math.max(1, Math.floor(Number(e)));
180
181
  m !== void 0 && !Number.isFinite(m) || n(
181
182
  { unit: t.unit, ...m ? { limit: m } : {} },
182
- `Set the limit of ${u}`,
183
+ `Set the limit of ${f}`,
183
184
  !0
184
185
  );
185
186
  }
@@ -191,63 +192,63 @@ function le() {
191
192
  ] });
192
193
  }
193
194
  function ie() {
194
- var i;
195
- const o = b(), { ov: s, info: d, row: f } = o;
196
- if (f.field.startsWith("__")) return null;
197
- const l = s.required === !0 || s.required === void 0 && !!((i = d.global) != null && i.required);
195
+ var c;
196
+ const o = b(), { ov: s, info: r, row: u } = o;
197
+ if (u.field.startsWith("__")) return null;
198
+ const i = s.required === !0 || s.required === void 0 && !!((c = r.global) != null && c.required);
198
199
  return /* @__PURE__ */ a(
199
- _,
200
+ v,
200
201
  {
201
202
  k: "field.recommended",
202
203
  label: "Recommended",
203
- effect: l ? "Required already wins; switch Required off to make this a recommendation." : "An amber marker and a reminder on save listing what is still empty. Saving is never blocked.",
204
- checked: s.recommended === !0 && !l,
205
- disabled: l,
206
- onChange: (c) => o.setOverride(
204
+ effect: i ? "Required already wins; switch Required off to make this a recommendation." : "An amber marker and a reminder on save listing what is still empty. Saving is never blocked.",
205
+ checked: s.recommended === !0 && !i,
206
+ disabled: i,
207
+ onChange: (d) => o.setOverride(
207
208
  "recommended",
208
- c ? !0 : void 0,
209
- c ? `Recommend ${d.label}` : `Stop recommending ${d.label}`
209
+ d ? !0 : void 0,
210
+ d ? `Recommend ${r.label}` : `Stop recommending ${r.label}`
210
211
  )
211
212
  }
212
213
  );
213
214
  }
214
215
  function se() {
215
- const o = b(), { ov: s, info: d, env: f, row: l } = o;
216
- if (!S(d, l.field)) return null;
217
- const i = d.label, c = F(s), u = s.confirm_change && typeof s.confirm_change == "object" ? s.confirm_change : {}, t = typeof u.pipeline_id == "string" ? u.pipeline_id : void 0, r = (n, e) => o.setOverride("confirm_change", n, e);
216
+ const o = b(), { ov: s, info: r, env: u, row: i } = o;
217
+ if (!w(r, i.field)) return null;
218
+ const c = r.label, d = M(s), f = s.confirm_change && typeof s.confirm_change == "object" ? s.confirm_change : {}, t = typeof f.pipeline_id == "string" ? f.pipeline_id : void 0, l = (n, e) => o.setOverride("confirm_change", n, e);
218
219
  return /* @__PURE__ */ h("div", { "data-setting": "field.confirm_change", className: "space-y-3", children: [
219
220
  /* @__PURE__ */ a(
220
- _,
221
+ v,
221
222
  {
222
223
  k: "field.confirm_change.on",
223
224
  label: "Confirm changes on saved records",
224
225
  effect: "Changing it on an existing record asks “Are you sure?” and a short reason, kept with the change in the history. New records are not asked.",
225
- checked: !!c,
226
- onChange: (n) => r(
226
+ checked: !!d,
227
+ onChange: (n) => l(
227
228
  n ? { state_keys: [] } : void 0,
228
- n ? `Confirm changes to ${i}` : `Stop confirming changes to ${i}`
229
+ n ? `Confirm changes to ${c}` : `Stop confirming changes to ${c}`
229
230
  )
230
231
  }
231
232
  ),
232
- c && /* @__PURE__ */ a(
233
+ d && /* @__PURE__ */ a(
233
234
  p,
234
235
  {
235
236
  k: "field.confirm_change.states",
236
237
  label: "Only in these states",
237
- effect: c.state_keys.length ? "Asked only while the record is in a ticked state." : "No state ticked: asked in every state.",
238
+ effect: d.state_keys.length ? "Asked only while the record is in a ticked state." : "No state ticked: asked in every state.",
238
239
  children: /* @__PURE__ */ a(
239
- w,
240
+ $,
240
241
  {
241
- collection: f.collection,
242
+ collection: u.collection,
242
243
  pipelineId: t,
243
- stateKeys: c.state_keys,
244
- onPipelineChange: (n) => r(
244
+ stateKeys: d.state_keys,
245
+ onPipelineChange: (n) => l(
245
246
  { ...n ? { pipeline_id: n } : {}, state_keys: [] },
246
- `Change the pipeline that confirms ${i}`
247
+ `Change the pipeline that confirms ${c}`
247
248
  ),
248
- onStateKeysChange: (n) => r(
249
+ onStateKeysChange: (n) => l(
249
250
  { ...t ? { pipeline_id: t } : {}, state_keys: n },
250
- `Change the states that confirm ${i}`
251
+ `Change the states that confirm ${c}`
251
252
  )
252
253
  }
253
254
  )
@@ -256,18 +257,35 @@ function se() {
256
257
  ] });
257
258
  }
258
259
  function ce() {
259
- const o = b(), { ov: s, info: d, row: f } = o;
260
- return !S(d, f.field) || d.computedType ? null : /* @__PURE__ */ a(
261
- _,
260
+ const o = b(), { ov: s, info: r, row: u } = o;
261
+ return !w(r, u.field) || r.computedType ? null : /* @__PURE__ */ a(
262
+ v,
262
263
  {
263
264
  k: "field.repeat_last",
264
265
  label: "Repeat last value",
265
266
  effect: "A “Repeat last” button beside the label fills in what this person entered on their previous record here.",
266
267
  checked: s.repeat_last === !0,
267
- onChange: (l) => o.setOverride(
268
+ onChange: (i) => o.setOverride(
268
269
  "repeat_last",
269
- l ? !0 : void 0,
270
- l ? `Offer to repeat the last ${d.label}` : `Stop offering to repeat ${d.label}`
270
+ i ? !0 : void 0,
271
+ i ? `Offer to repeat the last ${r.label}` : `Stop offering to repeat ${r.label}`
272
+ )
273
+ }
274
+ );
275
+ }
276
+ function de() {
277
+ const o = b(), { ov: s, info: r, row: u } = o;
278
+ return !w(r, u.field, { allowM2M: !0 }) || r.computedType ? null : /* @__PURE__ */ a(
279
+ v,
280
+ {
281
+ k: "field.personal_default",
282
+ label: "Personal default",
283
+ effect: "On this form, people can save their own starting value for this field, and new records start with it.",
284
+ checked: s.personal_default === !0,
285
+ onChange: (i) => o.setOverride(
286
+ "personal_default",
287
+ i ? !0 : void 0,
288
+ i ? `Allow personal defaults for ${r.label}` : `Stop personal defaults for ${r.label}`
271
289
  )
272
290
  }
273
291
  );
@@ -279,11 +297,11 @@ const B = [
279
297
  { value: "currency", label: "Money" },
280
298
  { value: "percent", label: "Percent" }
281
299
  ];
282
- function de({
300
+ function ue({
283
301
  row: o,
284
302
  fields: s
285
303
  }) {
286
- const d = q(), f = N(() => {
304
+ const r = q(), u = N(() => {
287
305
  const e = o.overrides;
288
306
  if (typeof e == "string")
289
307
  try {
@@ -292,24 +310,24 @@ function de({
292
310
  return {};
293
311
  }
294
312
  return e && typeof e == "object" ? e : {};
295
- }, [o.overrides]), l = T(f) ?? { expr: "", format: "", currency: null }, i = typeof f.label == "string" ? f.label : "", c = { field: o.field, group_key: o.group_key }, u = (e, m, g) => {
296
- const y = { ...f, ...e };
313
+ }, [o.overrides]), i = T(u) ?? { expr: "", format: "", currency: null }, c = typeof u.label == "string" ? u.label : "", d = { field: o.field, group_key: o.group_key }, f = (e, m, g) => {
314
+ const y = { ...u, ...e };
297
315
  for (const x of Object.keys(y)) y[x] === void 0 && delete y[x];
298
- d.apply([{ op: "update_placement", at: c, patch: { overrides: y } }], {
316
+ r.apply([{ op: "update_placement", at: d, patch: { overrides: y } }], {
299
317
  label: m,
300
318
  text: g
301
319
  });
302
- }, t = l.expr.trim() ? R(l.expr, s) : null, r = new Set(
303
- d.bundle.placements.filter((e) => !e.field.startsWith("__")).map((e) => e.field)
304
- ), n = t != null && t.ok ? t.tokens.filter((e) => !r.has(e.split(".")[0])) : [];
320
+ }, t = i.expr.trim() ? R(i.expr, s) : null, l = new Set(
321
+ r.bundle.placements.filter((e) => !e.field.startsWith("__")).map((e) => e.field)
322
+ ), n = t != null && t.ok ? t.tokens.filter((e) => !l.has(e.split(".")[0])) : [];
305
323
  return /* @__PURE__ */ h("div", { className: "space-y-5", children: [
306
324
  /* @__PURE__ */ a(p, { k: "display_formula.label", label: "Label", effect: "What the form calls the value.", children: /* @__PURE__ */ a(
307
- v,
325
+ _,
308
326
  {
309
327
  ariaLabel: "Label",
310
- value: i,
328
+ value: c,
311
329
  placeholder: "Remaining",
312
- onChange: (e) => u({ label: e || void 0 }, "Rename the formula", !0)
330
+ onChange: (e) => f({ label: e || void 0 }, "Rename the formula", !0)
313
331
  }
314
332
  ) }),
315
333
  /* @__PURE__ */ h(
@@ -330,8 +348,8 @@ function de({
330
348
  ariaLabel: "Formula",
331
349
  rows: 3,
332
350
  mono: !0,
333
- value: l.expr,
334
- onChange: (e) => u({ display_formula: { ...l, expr: e } }, "Change the formula", !0)
351
+ value: i.expr,
352
+ onChange: (e) => f({ display_formula: { ...i, expr: e } }, "Change the formula", !0)
335
353
  }
336
354
  ),
337
355
  t && !t.ok && /* @__PURE__ */ a(
@@ -348,7 +366,7 @@ function de({
348
366
  " ",
349
367
  /* @__PURE__ */ a("span", { className: "font-mono", children: t.unknownTokens.join(", ") })
350
368
  ] }),
351
- (t == null ? void 0 : t.ok) && !t.unknownTokens.length && n.length > 0 && /* @__PURE__ */ h("p", { "data-formula-offform": "", className: D, children: [
369
+ (t == null ? void 0 : t.ok) && !t.unknownTokens.length && n.length > 0 && /* @__PURE__ */ h("p", { "data-formula-offform": "", className: I, children: [
352
370
  "Not on this form, so they read as empty here:",
353
371
  " ",
354
372
  /* @__PURE__ */ a("span", { className: "font-mono", children: n.join(", ") })
@@ -359,12 +377,12 @@ function de({
359
377
  /* @__PURE__ */ a(p, { k: "display_formula.format", label: "Show as", effect: "How the number is written.", children: /* @__PURE__ */ a(
360
378
  k,
361
379
  {
362
- value: l.format,
380
+ value: i.format,
363
381
  options: B,
364
- onChange: (e) => u({ display_formula: { ...l, format: e } }, "Change how the formula shows")
382
+ onChange: (e) => f({ display_formula: { ...i, format: e } }, "Change how the formula shows")
365
383
  }
366
384
  ) }),
367
- l.format === "currency" && /* @__PURE__ */ a(
385
+ i.format === "currency" && /* @__PURE__ */ a(
368
386
  p,
369
387
  {
370
388
  k: "display_formula.currency",
@@ -374,13 +392,13 @@ function de({
374
392
  E,
375
393
  {
376
394
  ariaLabel: "Currency",
377
- value: l.currency ?? "",
395
+ value: i.currency ?? "",
378
396
  mono: !0,
379
397
  placeholder: "USD",
380
398
  onCommit: (e) => {
381
399
  const m = e.trim().toUpperCase();
382
- m && !/^[A-Z]{3}$/.test(m) || u(
383
- { display_formula: { ...l, currency: m || null } },
400
+ m && !/^[A-Z]{3}$/.test(m) || f(
401
+ { display_formula: { ...i, currency: m || null } },
384
402
  "Change the currency of the formula",
385
403
  !0
386
404
  );
@@ -393,10 +411,11 @@ function de({
393
411
  }
394
412
  export {
395
413
  se as ConfirmChangeSetting,
396
- le as CounterSetting,
397
- de as DisplayFormulaSettings,
414
+ re as CounterSetting,
415
+ ue as DisplayFormulaSettings,
416
+ de as PersonalDefaultToggle,
398
417
  ie as RecommendedToggle,
399
418
  ce as RepeatLastToggle,
400
- re as TextRulesSetting,
419
+ le as TextRulesSetting,
401
420
  z as takesText
402
421
  };