@nivaro/react 0.3.140 → 0.3.142

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 (24) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +8 -1
  4. package/dist/shared/components/CollectionBrowserView.js +842 -830
  5. package/dist/shared/components/ItemEditForm.js +825 -819
  6. package/dist/shared/components/RowPresence.js +83 -76
  7. package/dist/shared/components/UnseenDot.js +183 -22
  8. package/dist/shared/components/delivery-analytics/drill.js +32 -32
  9. package/dist/shared/components/imports/CollectionImportPanel.js +839 -601
  10. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  11. package/dist/shared/components/imports/match-fields.js +41 -0
  12. package/dist/shared/components/item-edit/InlineTableField.js +338 -338
  13. package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
  14. package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
  15. package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
  16. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  17. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
  18. package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
  19. package/dist/shared/components/layout-editor/settings/controls.js +98 -90
  20. package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
  21. package/dist/shared/components/queue/QueueWorklist.js +556 -545
  22. package/dist/shared/components/support/RequestList.js +2 -2
  23. package/dist/shared/lib/layout-resolve.js +64 -48
  24. package/package.json +1 -1
@@ -329,7 +329,7 @@ function St({
329
329
  }
330
330
  ),
331
331
  /* @__PURE__ */ e("th", { className: "px-3 py-2 font-medium", children: "Request" }),
332
- i && /* @__PURE__ */ e("th", { className: "hidden w-[15%] px-3 py-2 font-medium lg:table-cell", children: "Requester" }),
332
+ i && /* @__PURE__ */ e("th", { className: "w-[15%] px-3 py-2 font-medium max-lg:hidden", children: "Requester" }),
333
333
  /* @__PURE__ */ e("th", { className: "w-[17%] px-3 py-2 font-medium", children: i ? "Assignee" : "With" }),
334
334
  /* @__PURE__ */ e("th", { className: "w-28 px-3 py-2 font-medium", children: "Status" }),
335
335
  /* @__PURE__ */ e(
@@ -552,7 +552,7 @@ function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onO
552
552
  ]
553
553
  }
554
554
  ) }),
555
- s && /* @__PURE__ */ e("td", { className: "hidden truncate px-3 py-2 text-slate-700 lg:table-cell dark:text-slate-200", children: a.requester_name ?? "—" }),
555
+ s && /* @__PURE__ */ e("td", { className: "truncate px-3 py-2 text-slate-700 max-lg:hidden dark:text-slate-200", children: a.requester_name ?? "—" }),
556
556
  /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(fe, { t: a }) }),
557
557
  /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(he, { status: a.status, label: a.status_label }) }),
558
558
  /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(be, { p: a.priority }) }),
@@ -1,5 +1,5 @@
1
- const a = /^\d{4}-\d{2}-\d{2}$/, f = (t) => typeof t == "string" && a.test(t);
2
- function o(t) {
1
+ const s = /^\d{4}-\d{2}-\d{2}$/, f = (t) => typeof t == "string" && s.test(t);
2
+ function i(t) {
3
3
  let n = t;
4
4
  if (typeof n == "string")
5
5
  try {
@@ -9,17 +9,17 @@ function o(t) {
9
9
  }
10
10
  return n && typeof n == "object" && !Array.isArray(n) ? n : null;
11
11
  }
12
- function u(t, n, e) {
13
- const r = { ...o(t) ?? {} };
12
+ function c(t, n, e) {
13
+ const r = { ...i(t) ?? {} };
14
14
  return e == null ? delete r[n] : r[n] = e, Object.keys(r).length > 0 ? r : null;
15
15
  }
16
- function s(t = /* @__PURE__ */ new Date()) {
16
+ function a(t = /* @__PURE__ */ new Date()) {
17
17
  const n = (e) => String(e).padStart(2, "0");
18
18
  return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
19
19
  }
20
20
  function w(t) {
21
- var i;
22
- const n = o((i = o(t)) == null ? void 0 : i.active_window);
21
+ var o;
22
+ const n = i((o = i(t)) == null ? void 0 : o.active_window);
23
23
  if (!n) return null;
24
24
  const e = f(n.from) ? n.from : null, r = f(n.until) ? n.until : null;
25
25
  return e || r ? { from: e, until: r } : null;
@@ -27,7 +27,7 @@ function w(t) {
27
27
  function _(t, n) {
28
28
  return t ? t.from && n < t.from ? "before" : t.until && n > t.until ? "after" : "open" : null;
29
29
  }
30
- function c(t) {
30
+ function l(t) {
31
31
  return (/* @__PURE__ */ new Date(`${t}T00:00:00Z`)).toLocaleDateString(void 0, {
32
32
  day: "numeric",
33
33
  month: "short",
@@ -36,12 +36,12 @@ function c(t) {
36
36
  });
37
37
  }
38
38
  function O(t) {
39
- return t.from && t.until ? `${c(t.from)} – ${c(t.until)}` : t.from ? `from ${c(t.from)}` : `until ${c(t.until)}`;
39
+ return t.from && t.until ? `${l(t.from)} – ${l(t.until)}` : t.from ? `from ${l(t.from)}` : `until ${l(t.until)}`;
40
40
  }
41
41
  function x(t, n) {
42
42
  const e = n.from || null, r = n.until || null;
43
43
  return {
44
- conditions: u(
44
+ conditions: c(
45
45
  t,
46
46
  "active_window",
47
47
  e || r ? { ...e ? { from: e } : {}, ...r ? { until: r } : {} } : null
@@ -50,26 +50,40 @@ function x(t, n) {
50
50
  }
51
51
  function d(t) {
52
52
  var e;
53
- const n = Number((e = o(t)) == null ? void 0 : e.phone_of);
53
+ const n = Number((e = i(t)) == null ? void 0 : e.phone_of);
54
54
  return Number.isInteger(n) && n > 0 ? n : null;
55
55
  }
56
- function S(t, n) {
57
- return { conditions: u(t, "phone_of", n) };
56
+ function v(t, n) {
57
+ return { conditions: c(t, "phone_of", n) };
58
58
  }
59
- function h(t) {
59
+ function m(t) {
60
60
  var e;
61
- const n = Number((e = o(t)) == null ? void 0 : e.tablet_of);
61
+ const n = Number((e = i(t)) == null ? void 0 : e.tablet_of);
62
62
  return Number.isInteger(n) && n > 0 ? n : null;
63
63
  }
64
- function v(t, n) {
65
- return { conditions: u(t, "tablet_of", n) };
64
+ function S(t, n) {
65
+ return { conditions: c(t, "tablet_of", n) };
66
+ }
67
+ function A(t) {
68
+ var r;
69
+ const n = (r = i(t)) == null ? void 0 : r.summary_for;
70
+ if (!Array.isArray(n)) return [];
71
+ const e = [];
72
+ for (const o of n) {
73
+ const u = Number(o);
74
+ Number.isInteger(u) && u > 0 && !e.includes(u) && e.push(u);
75
+ }
76
+ return e;
66
77
  }
67
- function z(t) {
68
- return d(t) ?? h(t);
78
+ function z(t, n) {
79
+ return { conditions: c(t, "summary_for", n.length ? n : null) };
69
80
  }
70
- function m(t) {
81
+ function $(t) {
82
+ return d(t) ?? m(t);
83
+ }
84
+ function y(t) {
71
85
  var e;
72
- const n = o((e = o(t)) == null ? void 0 : e.freeze);
86
+ const n = i((e = i(t)) == null ? void 0 : e.freeze);
73
87
  return !n || !f(n.until) ? null : {
74
88
  until: n.until,
75
89
  reason: typeof n.reason == "string" ? n.reason : "",
@@ -78,35 +92,35 @@ function m(t) {
78
92
  at: typeof n.at == "string" ? n.at : null
79
93
  };
80
94
  }
81
- function $(t, n = s()) {
82
- const e = m(t);
95
+ function N(t, n = a()) {
96
+ const e = y(t);
83
97
  return e && n < e.until ? e : null;
84
98
  }
85
- function A(t, n) {
86
- return { conditions: u(t, "freeze", n) };
99
+ function P(t, n) {
100
+ return { conditions: c(t, "freeze", n) };
87
101
  }
88
- function y(t) {
102
+ function h(t) {
89
103
  var e;
90
- const n = (e = o(t)) == null ? void 0 : e.lazy_sections;
104
+ const n = (e = i(t)) == null ? void 0 : e.lazy_sections;
91
105
  return Array.isArray(n) ? [...new Set(n.filter((r) => typeof r == "string"))] : [];
92
106
  }
93
107
  function D(t, n, e) {
94
- const r = y(t).filter((l) => l !== n), i = e ? [...r, n] : r;
95
- return { conditions: u(t, "lazy_sections", i.length ? i : null) };
108
+ const r = h(t).filter((u) => u !== n), o = e ? [...r, n] : r;
109
+ return { conditions: c(t, "lazy_sections", o.length ? o : null) };
96
110
  }
97
111
  function p(t) {
98
112
  var e;
99
- const n = (e = o(t)) == null ? void 0 : e.quiet_hidden_sections;
113
+ const n = (e = i(t)) == null ? void 0 : e.quiet_hidden_sections;
100
114
  return Array.isArray(n) ? [...new Set(n.filter((r) => typeof r == "string"))] : [];
101
115
  }
102
- function P(t, n, e) {
103
- const r = p(t).filter((l) => l !== n), i = e ? r : [...r, n];
116
+ function W(t, n, e) {
117
+ const r = p(t).filter((u) => u !== n), o = e ? r : [...r, n];
104
118
  return {
105
- conditions: u(t, "quiet_hidden_sections", i.length ? i : null)
119
+ conditions: c(t, "quiet_hidden_sections", o.length ? o : null)
106
120
  };
107
121
  }
108
122
  const b = "(max-width: 639px)", g = "(min-width: 640px) and (max-width: 1023px), (min-width: 640px) and (max-width: 1366px) and (hover: none) and (pointer: coarse)";
109
- function N() {
123
+ function q() {
110
124
  try {
111
125
  return typeof window > "u" || !window.matchMedia ? null : window.matchMedia(b).matches ? "phone" : window.matchMedia(g).matches ? "tablet" : null;
112
126
  } catch {
@@ -116,25 +130,27 @@ function N() {
116
130
  export {
117
131
  b as PHONE_QUERY,
118
132
  g as TABLET_QUERY,
119
- $ as activeFreeze,
133
+ N as activeFreeze,
120
134
  w as activeWindowOf,
121
135
  x as activeWindowPatch,
122
- o as conditionsObject,
123
- u as conditionsWithKey,
124
- N as currentViewport,
125
- c as dayWords,
126
- m as freezeOf,
127
- A as freezePatch,
136
+ i as conditionsObject,
137
+ c as conditionsWithKey,
138
+ q as currentViewport,
139
+ l as dayWords,
140
+ y as freezeOf,
141
+ P as freezePatch,
128
142
  D as lazySectionPatch,
129
- y as lazySectionsOf,
130
- s as localDay,
143
+ h as lazySectionsOf,
144
+ a as localDay,
131
145
  d as phoneOf,
132
- S as phoneOfPatch,
133
- P as quietHiddenSectionPatch,
146
+ v as phoneOfPatch,
147
+ W as quietHiddenSectionPatch,
134
148
  p as quietHiddenSectionsOf,
135
- z as screenVersionOf,
136
- h as tabletOf,
137
- v as tabletOfPatch,
149
+ $ as screenVersionOf,
150
+ A as summaryForOf,
151
+ z as summaryForPatch,
152
+ m as tabletOf,
153
+ S as tabletOfPatch,
138
154
  _ as windowState,
139
155
  O as windowWords
140
156
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.3.140",
3
+ "version": "0.3.142",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",