@declarion/react 0.66.0 → 0.80.0

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 (66) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/api/auth.js +24 -14
  3. package/dist-lib/app.js +28 -23
  4. package/dist-lib/components/chrome/AssociationTabs.js +35 -38
  5. package/dist-lib/components/chrome/HighlightsStrip.js +2 -1
  6. package/dist-lib/components/chrome/RecordHeader.js +33 -38
  7. package/dist-lib/components/detail-layout/AssociatedBlock.js +10 -21
  8. package/dist-lib/components/detail-layout/ChildrenBlock.js +1 -8
  9. package/dist-lib/components/detail-layout/ChildrenCards.js +1 -8
  10. package/dist-lib/components/detail-layout/ChildrenList.js +1 -8
  11. package/dist-lib/components/detail-layout/ChildrenTable.js +1 -8
  12. package/dist-lib/components/detail-layout/ChildrenTimeline.js +1 -8
  13. package/dist-lib/components/detail-layout/DetailAuditStrip.js +33 -29
  14. package/dist-lib/components/detail-layout/DetailHighlights.js +7 -2
  15. package/dist-lib/components/detail-layout/FieldsBlock.js +12 -9
  16. package/dist-lib/components/detail-layout/LayoutRenderer.js +10 -10
  17. package/dist-lib/components/detail-layout/LayoutTabs.js +49 -48
  18. package/dist-lib/components/detail-layout/SectionBlock.js +20 -28
  19. package/dist-lib/components/detail-layout/visibility.js +28 -0
  20. package/dist-lib/components/fields/IntArrayField.js +37 -33
  21. package/dist-lib/components/fields/NumberField.js +28 -55
  22. package/dist-lib/components/fields/RichTextField.js +1 -1
  23. package/dist-lib/components/fields/TimestampField.js +50 -89
  24. package/dist-lib/components/fields/cells/factories/date.js +13 -14
  25. package/dist-lib/components/fields/cells/factories/money.js +1 -1
  26. package/dist-lib/components/fields/cells/factories/number.js +4 -4
  27. package/dist-lib/components/file-widgets/DocumentCard.js +1 -1
  28. package/dist-lib/components/file-widgets/Grid.js +153 -152
  29. package/dist-lib/components/file-widgets/ImageWidget.js +90 -91
  30. package/dist-lib/components/file-widgets/LabeledSlots.js +1 -0
  31. package/dist-lib/components/file-widgets/helpers.js +15 -19
  32. package/dist-lib/components/file-widgets/host.js +33 -32
  33. package/dist-lib/components/file-widgets/upload.js +10 -6
  34. package/dist-lib/components/layout/Layout.js +125 -123
  35. package/dist-lib/components/pages/NoScreensPage.impl.js +14 -0
  36. package/dist-lib/components/pages/NoScreensPage.js +12 -0
  37. package/dist-lib/components/pages/SmartDetailPage.impl.js +451 -451
  38. package/dist-lib/components/pages/auth/AuthShell.js +62 -61
  39. package/dist-lib/components/pages/auth/CodeInput.js +63 -0
  40. package/dist-lib/components/pages/auth/SignIn.js +12 -4
  41. package/dist-lib/components/pages/auth/SignUp.impl.js +80 -103
  42. package/dist-lib/components/pages/auth/SignUpCode.js +122 -0
  43. package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -55
  44. package/dist-lib/components/pages/list/cardProjection.js +135 -122
  45. package/dist-lib/components/pages/list/columns.js +58 -43
  46. package/dist-lib/components/pages/profile/Profile.impl.js +87 -104
  47. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +1 -1
  48. package/dist-lib/components/params/ParamsBlock.js +6 -17
  49. package/dist-lib/components/params/param-editors.js +14 -10
  50. package/dist-lib/components/primitives/Fields.js +314 -236
  51. package/dist-lib/components/shared/MarkdownRenderer.js +44 -43
  52. package/dist-lib/declarion-react.css +1 -1
  53. package/dist-lib/hooks/useActiveTabFollowsRoute.js +49 -0
  54. package/dist-lib/hooks/useAuth.js +44 -37
  55. package/dist-lib/hooks/useDocumentTitle.js +20 -0
  56. package/dist-lib/hooks/useFollowAgentOpen.js +1 -0
  57. package/dist-lib/hooks/useTabTitle.js +1 -1
  58. package/dist-lib/index.d.ts +21 -7
  59. package/dist-lib/lib/date-text.js +57 -0
  60. package/dist-lib/lib/number-text.js +9 -0
  61. package/dist-lib/lib/timestamp.js +29 -29
  62. package/dist-lib/stores/tabs.js +7 -5
  63. package/dist-lib/testing.d.ts +1 -1
  64. package/dist-lib/testing.js +1 -0
  65. package/dist-lib/{useResponsiveMode-DmrpMbZX.d.ts → useResponsiveMode-D3SKz5z4.d.ts} +20 -9
  66. package/package.json +11 -11
@@ -2,82 +2,86 @@ import { Icon as e } from "../primitives/Icons.js";
2
2
  import { Btn as t } from "../primitives/Btn.js";
3
3
  import { Chip as n } from "../primitives/Chip.js";
4
4
  import { TextInput as r } from "../primitives/Fields.js";
5
- import { useState as i } from "react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import { isNumberDraft as i } from "../../lib/number-text.js";
6
+ import { useState as a } from "react";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
8
  //#region src/components/fields/IntArrayField.tsx
8
- function s(e) {
9
+ function c(e) {
9
10
  return Array.isArray(e) ? e.filter((e) => e != null).map(Number).filter((e) => !isNaN(e)) : [];
10
11
  }
11
- function c({ field: c, fieldName: l, value: u, mode: d, onChange: f, fieldId: p, t: m }) {
12
- let h = s(u), [g, _] = i("");
13
- if (d === "display") return h.length === 0 ? /* @__PURE__ */ a("span", {
12
+ function l({ field: l, fieldName: u, value: d, mode: f, onChange: p, fieldId: m, t: h }) {
13
+ let g = c(d), [_, v] = a("");
14
+ if (f === "display") return g.length === 0 ? /* @__PURE__ */ o("span", {
14
15
  style: {
15
16
  fontSize: 12.5,
16
17
  color: "var(--text-4)"
17
18
  },
18
19
  children: "—"
19
- }) : /* @__PURE__ */ a("div", {
20
+ }) : /* @__PURE__ */ o("div", {
20
21
  style: {
21
22
  display: "flex",
22
23
  flexWrap: "wrap",
23
24
  gap: 4
24
25
  },
25
- children: h.map((e, t) => /* @__PURE__ */ a(n, {
26
+ children: g.map((e, t) => /* @__PURE__ */ o(n, {
26
27
  tone: "slate",
27
28
  children: e
28
29
  }, t))
29
30
  });
30
- let v = () => {
31
- let e = g.trim();
31
+ let y = () => {
32
+ let e = _.trim();
32
33
  if (!e) return;
33
34
  let t = Number(e);
34
- !isNaN(t) && Number.isInteger(t) && (f?.([...h, t]), _(""));
35
- }, y = (e) => {
36
- f?.(h.filter((t, n) => n !== e));
35
+ !isNaN(t) && Number.isInteger(t) && (p?.([...g, t]), v(""));
36
+ }, b = (e) => {
37
+ p?.(g.filter((t, n) => n !== e));
37
38
  };
38
- return /* @__PURE__ */ o("div", {
39
+ return /* @__PURE__ */ s("div", {
39
40
  style: {
40
41
  display: "flex",
41
42
  flexDirection: "column",
42
43
  gap: 6
43
44
  },
44
- children: [h.length > 0 && /* @__PURE__ */ a("div", {
45
+ children: [g.length > 0 && /* @__PURE__ */ o("div", {
45
46
  style: {
46
47
  display: "flex",
47
48
  flexWrap: "wrap",
48
49
  gap: 4
49
50
  },
50
- children: h.map((e, t) => /* @__PURE__ */ a(n, {
51
+ children: g.map((e, t) => /* @__PURE__ */ o(n, {
51
52
  tone: "slate",
52
- onRemove: () => y(t),
53
+ onRemove: () => b(t),
53
54
  children: e
54
55
  }, t))
55
- }), /* @__PURE__ */ o("div", {
56
+ }), /* @__PURE__ */ s("div", {
56
57
  style: {
57
58
  display: "flex",
58
59
  gap: 4
59
60
  },
60
- children: [/* @__PURE__ */ a("div", {
61
+ children: [/* @__PURE__ */ o("div", {
61
62
  style: { flex: 1 },
62
- children: /* @__PURE__ */ a(r, {
63
- id: p,
64
- name: l,
65
- "aria-required": c.required || void 0,
66
- type: "number",
67
- value: g,
68
- onChange: _,
63
+ children: /* @__PURE__ */ o(r, {
64
+ id: m,
65
+ name: u,
66
+ "aria-required": l.required || void 0,
67
+ type: "text",
68
+ inputMode: "numeric",
69
+ value: _,
70
+ onChange: (e) => {
71
+ i(e, !0) && v(e);
72
+ },
69
73
  onKeyDown: (e) => {
70
- e.key === "Enter" && (e.preventDefault(), v());
74
+ e.key === "Enter" && (e.preventDefault(), y());
71
75
  },
72
- placeholder: m("field.array.add_number", "Add number…")
76
+ placeholder: h("field.array.add_number", "Add number…")
73
77
  })
74
- }), /* @__PURE__ */ a(t, {
75
- icon: /* @__PURE__ */ a(e.plus, { size: 13 }),
76
- onClick: v,
77
- children: m("field.array.add", "Add")
78
+ }), /* @__PURE__ */ o(t, {
79
+ icon: /* @__PURE__ */ o(e.plus, { size: 13 }),
80
+ onClick: y,
81
+ children: h("field.array.add", "Add")
78
82
  })]
79
83
  })]
80
84
  });
81
85
  }
82
86
  //#endregion
83
- export { c as IntArrayField };
87
+ export { l as IntArrayField };
@@ -1,64 +1,37 @@
1
1
  import { coerceDisplayString as e } from "../../lib/display-value.js";
2
2
  import { TextInput as t } from "../primitives/Fields.js";
3
- import { formatDecimalText as n } from "../../lib/decimal-text.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import { isNumberDraft as n, numberTextValue as r } from "../../lib/number-text.js";
4
+ import { useState as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
5
6
  //#region src/components/fields/NumberField.tsx
6
- function a({ field: a, fieldName: o, value: s, mode: c, onChange: l, record: u, fieldId: d, t: f }) {
7
- let p = a.display?.widget === "money", m = a.type === "decimal" || p, h = u?.$units?.[o], g = !h && a.unit ? a.unit.display || a.unit.storage : void 0, _ = h || (g && !g.startsWith("$") ? g : void 0);
8
- if (c === "display") {
9
- if (s == null) return /* @__PURE__ */ r("span", {
10
- style: {
11
- fontSize: 12.5,
12
- color: "var(--text-4)"
13
- },
14
- children: "—"
15
- });
16
- let e;
17
- if (m && typeof s == "string") e = n(s, new Intl.NumberFormat(f.language));
18
- else {
19
- let t = Number(s);
20
- e = isNaN(t) ? null : new Intl.NumberFormat(f.language).format(t);
21
- }
22
- return e == null ? /* @__PURE__ */ r("span", {
23
- style: { fontSize: 12.5 },
24
- children: "—"
25
- }) : /* @__PURE__ */ i("span", {
26
- className: "num",
27
- style: {
28
- fontSize: 12.5,
29
- fontVariantNumeric: "tabular-nums"
30
- },
31
- children: [e, _ && /* @__PURE__ */ r("span", {
32
- style: {
33
- color: "var(--text-3)",
34
- marginLeft: 4
35
- },
36
- children: _
37
- })]
38
- });
39
- }
40
- return m ? /* @__PURE__ */ r(t, {
41
- id: d,
42
- name: o,
43
- "aria-required": a.required || void 0,
7
+ function o({ field: o, fieldName: l, value: u, onChange: d, fieldId: f }) {
8
+ let p = o.type === "int", m = u == null ? "" : e(u), [h, g] = i(m), [_, v] = i(m);
9
+ return m !== _ && (v(m), c(o, r(h), r(m)) || g(m)), /* @__PURE__ */ a(t, {
10
+ id: f,
11
+ name: l,
12
+ "aria-required": o.required || void 0,
44
13
  type: "text",
45
- inputMode: "decimal",
46
- pattern: "-?\\d*\\.?\\d*",
47
- value: s == null ? "" : e(s),
48
- onChange: (e) => {
49
- e === "" ? l?.(null) : l?.(e);
50
- }
51
- }) : /* @__PURE__ */ r(t, {
52
- id: d,
53
- name: o,
54
- "aria-required": a.required || void 0,
55
- type: "number",
56
- step: a.type === "float" ? "0.01" : "1",
57
- value: s == null ? "" : e(s),
14
+ inputMode: p ? "numeric" : "decimal",
15
+ value: h,
58
16
  onChange: (e) => {
59
- e === "" ? l?.(null) : l?.(a.type === "int" ? parseInt(e, 10) : parseFloat(e));
17
+ if (!n(e, p)) return;
18
+ g(e);
19
+ let t = r(e);
20
+ d?.(t == null ? null : s(o, t));
21
+ },
22
+ onBlur: () => {
23
+ let e = r(h) ?? "";
24
+ e !== h && g(e);
60
25
  }
61
26
  });
62
27
  }
28
+ function s(e, t) {
29
+ if (e.type === "decimal") return t;
30
+ let n = Number(t);
31
+ return e.type === "int" && !Number.isSafeInteger(n) ? t : n;
32
+ }
33
+ function c(e, t, n) {
34
+ return t == null || n == null || e.type === "decimal" ? t === n : Number(t) === Number(n);
35
+ }
63
36
  //#endregion
64
- export { a as NumberField };
37
+ export { o as NumberField };
@@ -218,7 +218,7 @@ function w(e, t) {
218
218
  width: e.width,
219
219
  height: e.height,
220
220
  metadata: e.metadata,
221
- url: t
221
+ url: t ?? e.url
222
222
  };
223
223
  }
224
224
  //#endregion
@@ -1,110 +1,71 @@
1
1
  import { coerceDisplayString as e } from "../../lib/display-value.js";
2
- import { civilDateAsLocal as t, formatInOffsetZone as n, formatWireDateTime as r } from "../../lib/timestamp.js";
3
- import { specialValueMarker as i, specialValueMarkerCode as a } from "../../types/schema.js";
4
- import { Btn as o } from "../primitives/Btn.js";
5
- import { TextInput as s } from "../primitives/Fields.js";
2
+ import { civilDateAsLocal as t, formatWireDateTime as n } from "../../lib/timestamp.js";
3
+ import { specialValueMarker as r, specialValueMarkerCode as i } from "../../types/schema.js";
4
+ import { Btn as a } from "../primitives/Btn.js";
5
+ import { DateInput as o, TextInput as s } from "../primitives/Fields.js";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  //#region src/components/fields/TimestampField.tsx
8
- var d = {
9
- year: "numeric",
10
- month: "short",
11
- day: "numeric"
12
- }, f = {
13
- ...d,
14
- hour: "2-digit",
15
- minute: "2-digit"
16
- };
17
- function p(e, n) {
18
- let r = t(e);
19
- return r ? new Intl.DateTimeFormat(n, d).format(r) : e;
20
- }
21
- function m(e, t, r) {
22
- return t ? p(e, r) : n(e, f, r);
23
- }
24
- function h(e, t, n) {
25
- if (t) return p(e, n);
26
- let r = new Date(e);
27
- return isNaN(r.getTime()) ? e : new Intl.DateTimeFormat(n, f).format(r);
28
- }
29
- function g(e) {
30
- if (e.endsWith("Z")) return "UTC";
31
- let t = e.match(/([+-]\d{2}:\d{2})$/);
32
- if (!t) return null;
33
- let n = t[1].charAt(0), r = parseInt(t[1].substring(1, 3), 10), i = parseInt(t[1].substring(4, 6), 10);
34
- return r === 0 && i === 0 ? "UTC" : `UTC${n}${r}${i > 0 ? `:${String(i).padStart(2, "0")}` : ""}`;
35
- }
36
- function _(e) {
37
- let t = e.match(/([+-]\d{2}:\d{2})$/), n = e.endsWith("Z"), r = new Date(e);
38
- if (isNaN(r.getTime())) return "";
39
- if (n) return `${r.getUTCFullYear()}-${String(r.getUTCMonth() + 1).padStart(2, "0")}-${String(r.getUTCDate()).padStart(2, "0")}T${String(r.getUTCHours()).padStart(2, "0")}:${String(r.getUTCMinutes()).padStart(2, "0")}`;
8
+ var d = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
9
+ function f(e) {
10
+ if (!d.test(e)) return "";
11
+ let t = e.match(/([+-]\d{2}:\d{2})$/), n = new Date(e);
12
+ if (isNaN(n.getTime())) return "";
13
+ if (!t && !e.endsWith("Z")) return e.slice(0, 16).replace(" ", "T");
14
+ let r = 0;
40
15
  if (t) {
41
- let e = t[1].charAt(0) === "+" ? 1 : -1, n = parseInt(t[1].substring(1, 3), 10), i = parseInt(t[1].substring(4, 6), 10), a = e * (n * 60 + i) * 60 * 1e3, o = new Date(r.getTime() + a);
42
- return `${o.getUTCFullYear()}-${String(o.getUTCMonth() + 1).padStart(2, "0")}-${String(o.getUTCDate()).padStart(2, "0")}T${String(o.getUTCHours()).padStart(2, "0")}:${String(o.getUTCMinutes()).padStart(2, "0")}`;
16
+ let e = t[1].charAt(0) === "+" ? 1 : -1, n = parseInt(t[1].substring(1, 3), 10), i = parseInt(t[1].substring(4, 6), 10);
17
+ r = e * (n * 60 + i) * 60 * 1e3;
43
18
  }
44
- return e.slice(0, 16);
19
+ return new Date(n.getTime() + r).toISOString().slice(0, 16);
45
20
  }
46
- function v(e) {
21
+ function p(e) {
22
+ if (!d.test(e)) return "";
47
23
  let t = new Date(e);
48
- return isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}T${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
24
+ if (isNaN(t.getTime())) return "";
25
+ let n = (e) => String(e).padStart(2, "0");
26
+ return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`;
49
27
  }
50
- function y({ field: n, fieldName: d, value: f, mode: p, onChange: y, fieldId: b, t: x }) {
51
- let S = n.type === "date", C = !!n.timezone, w = a(f), T = n.special_values ?? [];
52
- if (p === "display") {
53
- if (!f) return /* @__PURE__ */ l("span", {
54
- style: {
55
- fontSize: 12.5,
56
- color: "var(--text-4)"
57
- },
58
- children: "—"
59
- });
60
- let t = e(f), n = C ? m(t, S, x.language) : h(t, S, x.language), r = C && !S ? g(t) : null;
61
- return /* @__PURE__ */ u("span", {
62
- style: { fontSize: 12.5 },
63
- children: [n, r && /* @__PURE__ */ l("span", {
64
- style: {
65
- marginLeft: 4,
66
- color: "var(--text-3)"
67
- },
68
- children: r
69
- })]
70
- });
71
- }
72
- let E = f && w === null ? e(f) : "", D = E ? S ? t(E) ? E : "" : C ? _(E) : v(E) : "";
73
- return /* @__PURE__ */ u(c, { children: [T.length > 0 && /* @__PURE__ */ l("div", {
28
+ function m(e) {
29
+ let t = /^(\d{2}:\d{2})(?::(\d{2}))?/.exec(e);
30
+ return t ? t[2] && t[2] !== "00" ? `${t[1]}:${t[2]}` : t[1] : "";
31
+ }
32
+ function h({ field: d, fieldName: h, value: g, onChange: _, fieldId: v, t: y }) {
33
+ let b = !!d.timezone, x = i(g), S = d.special_values ?? [], C = g && x === null ? e(g) : "", w = S.length > 0 && /* @__PURE__ */ l("div", {
74
34
  role: "group",
75
- "aria-label": d,
35
+ "aria-label": h,
76
36
  style: {
77
37
  display: "flex",
78
38
  flexWrap: "wrap",
79
39
  gap: 6,
80
40
  marginBottom: 6
81
41
  },
82
- children: T.map((e) => /* @__PURE__ */ l(o, {
42
+ children: S.map((e) => /* @__PURE__ */ l(a, {
83
43
  size: "xs",
84
- active: w === e.code,
85
- "aria-pressed": w === e.code,
86
- onClick: () => y?.(w === e.code ? null : i(e.code)),
87
- children: x(e.label) || e.code
44
+ active: x === e.code,
45
+ "aria-pressed": x === e.code,
46
+ onClick: () => _?.(x === e.code ? null : r(e.code)),
47
+ children: y(e.label) || e.code
88
48
  }, e.code))
89
- }), /* @__PURE__ */ l(s, {
90
- id: b,
91
- name: d,
92
- "aria-required": n.required || void 0,
93
- type: S ? "date" : "datetime-local",
94
- value: D,
95
- onChange: (e) => {
96
- if (!e) {
97
- y?.(null);
98
- return;
99
- }
100
- if (C || S) {
101
- y?.(e);
102
- return;
103
- }
104
- let t = new Date(e);
105
- isNaN(t.getTime()) ? y?.(e) : y?.(r(t));
49
+ });
50
+ if (d.type === "time") return /* @__PURE__ */ u(c, { children: [w, /* @__PURE__ */ l(s, {
51
+ id: v,
52
+ name: h,
53
+ "aria-required": d.required || void 0,
54
+ type: "time",
55
+ value: C ? m(C) : "",
56
+ onChange: (e) => _?.(e || null)
57
+ })] });
58
+ let T = d.type === "date" ? "date" : "datetime", E = C ? T === "date" ? t(C) ? C : "" : b ? f(C) : p(C) : null;
59
+ return /* @__PURE__ */ u(c, { children: [w, /* @__PURE__ */ l(o, {
60
+ kind: T,
61
+ id: v,
62
+ name: h,
63
+ ariaRequired: d.required,
64
+ value: E,
65
+ onChange: (e, t) => {
66
+ e === null ? _?.(t.trim() === "" ? null : t) : _?.(T === "date" || b ? e : n(new Date(e)));
106
67
  }
107
68
  })] });
108
69
  }
109
70
  //#endregion
110
- export { y as TimestampField };
71
+ export { h as TimestampField };
@@ -1,30 +1,29 @@
1
1
  import { coerceDisplayString as e } from "../../../../lib/display-value.js";
2
- import { EMPTY_CELL as t } from "./emptyCell.js";
2
+ import { formatCivilDateText as t } from "../../../../lib/date-text.js";
3
+ import { EMPTY_CELL as n } from "./emptyCell.js";
3
4
  //#region src/components/fields/cells/factories/date.ts
4
- var n = () => (t) => {
5
- if (t == null || t === "") return "—";
6
- let n = typeof t == "string" ? t : e(t), r = /^(\d{4})-(\d{2})-(\d{2})$/.exec(n);
7
- if (!r) return n;
8
- let [, i, a, o] = r;
9
- return `${o}-${a}-${i}`;
10
- }, r = ({ t: n }) => {
11
- let r = new Intl.DateTimeFormat(n.language, {
5
+ var r = () => (n) => {
6
+ if (n == null || n === "") return "—";
7
+ let r = typeof n == "string" ? n : e(n);
8
+ return t(r) ?? r;
9
+ }, i = ({ t }) => {
10
+ let r = new Intl.DateTimeFormat(t.language, {
12
11
  hour: "numeric",
13
12
  minute: "2-digit",
14
13
  timeZone: "UTC"
15
- }), i = new Intl.DateTimeFormat(n.language, {
14
+ }), i = new Intl.DateTimeFormat(t.language, {
16
15
  hour: "numeric",
17
16
  minute: "2-digit",
18
17
  second: "2-digit",
19
18
  timeZone: "UTC"
20
19
  });
21
- return (n) => {
22
- if (n == null || n === "") return t;
23
- let a = typeof n == "string" ? n : e(n), o = /^(\d{2}):(\d{2})(?::(\d{2}))?/.exec(a);
20
+ return (t) => {
21
+ if (t == null || t === "") return n;
22
+ let a = typeof t == "string" ? t : e(t), o = /^(\d{2}):(\d{2})(?::(\d{2}))?/.exec(a);
24
23
  if (!o) return a;
25
24
  let [, s, c, l = "00"] = o, u = new Date(Date.UTC(2e3, 0, 1, Number(s), Number(c), Number(l)));
26
25
  return (l === "00" ? r : i).format(u);
27
26
  };
28
27
  };
29
28
  //#endregion
30
- export { n as dateFactory, r as timeFactory };
29
+ export { r as dateFactory, i as timeFactory };
@@ -27,7 +27,7 @@ function r(e) {
27
27
  case "code":
28
28
  case "name":
29
29
  case "symbol": return e;
30
- default: return "symbol";
30
+ default: return "code";
31
31
  }
32
32
  }
33
33
  function i(e, t, n) {
@@ -1,5 +1,5 @@
1
- import { formatDecimalText as e } from "../../../../lib/decimal-text.js";
2
- import { EMPTY_CELL as t } from "./emptyCell.js";
1
+ import { EMPTY_CELL as e } from "./emptyCell.js";
2
+ import { formatDecimalText as t } from "../../../../lib/decimal-text.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/components/fields/cells/factories/number.tsx
5
5
  var i = {
@@ -15,12 +15,12 @@ var i = {
15
15
  maximumFractionDigits: Math.min(c.scale ?? 2, 6)
16
16
  }), p = c.type === "decimal", m = c.unit ? c.unit.display || c.unit.storage : void 0;
17
17
  return (s, c) => {
18
- if (s == null) return t;
18
+ if (s == null) return e;
19
19
  let u = c.$units?.[l] || (m && !m.startsWith("$") ? m : void 0), h;
20
20
  if (f) {
21
21
  let e = Number(s);
22
22
  h = Number.isFinite(e) ? f.format(e) : null;
23
- } else if (p && typeof s == "string") h = e(s, d);
23
+ } else if (p && typeof s == "string") h = t(s, d);
24
24
  else {
25
25
  let e = typeof s == "number" ? s : Number(s);
26
26
  h = Number.isFinite(e) ? d.format(e) : null;
@@ -123,7 +123,7 @@ function v(v) {
123
123
  ]), $ = C === "display";
124
124
  return !D && O !== "uploading" ? /* @__PURE__ */ g("div", {
125
125
  "data-testid": `file-widget-${b}`,
126
- className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
126
+ className: $ ? "flex items-center gap-3" : "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
127
127
  children: [
128
128
  /* @__PURE__ */ h(_, {}),
129
129
  /* @__PURE__ */ g("div", {