@nivaro/react 0.3.48 → 0.3.50
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.
- package/dist/components/InlineGridField.js +166 -105
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +25 -1
- package/dist/shared/components/CellCopyLayer.js +81 -44
- package/dist/shared/components/CollectionBrowserView.js +306 -297
- package/dist/shared/components/DataTable.js +3 -3
- package/dist/shared/components/FulfilmentPill.js +98 -78
- package/dist/shared/components/ItemEditForm.js +4682 -4570
- package/dist/shared/components/NotificationSourcesCard.js +151 -147
- package/dist/shared/components/ProfileView.js +72 -70
- package/dist/shared/components/QueryTable.js +462 -333
- package/dist/shared/components/imports/ImportConsole.js +4 -4
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +58 -50
- package/dist/shared/components/item-edit/CatalogPickerField.js +1144 -1127
- package/dist/shared/components/item-edit/CloneDialog.js +192 -142
- package/dist/shared/components/item-edit/FieldRenderer.js +127 -126
- package/dist/shared/components/item-edit/FieldRow.js +236 -226
- package/dist/shared/components/item-edit/HeaderTools.js +118 -113
- package/dist/shared/components/item-edit/InlineGridField.js +92 -90
- package/dist/shared/components/item-edit/InlineTableField.js +3091 -2942
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +175 -0
- package/dist/shared/components/item-edit/PlanGrid.js +162 -162
- package/dist/shared/components/item-edit/PolishFields.js +169 -162
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -181
- package/dist/shared/components/item-edit/SummaryPanel.js +148 -135
- package/dist/shared/components/item-edit/ValidationSummary.js +64 -47
- package/dist/shared/components/item-edit/helpers.js +181 -155
- package/dist/shared/components/item-edit/line-midair.js +201 -0
- package/dist/shared/components/item-edit/soft-rules.js +27 -0
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +65 -65
- package/dist/shared/components/layout-editor/settings/settings-registry.js +4 -4
- package/dist/shared/components/notifications/DeliveryChips.js +9 -9
- package/dist/shared/components/panels/ItemLockBanner.js +414 -358
- package/dist/shared/components/panels/PipelinePanel.js +1171 -975
- package/dist/shared/components/panels/RecordIntegrityBanner.js +1 -1
- package/dist/shared/components/panels/SlaBreachBanner.js +2 -2
- package/dist/shared/components/panels/TransitionRequirementsDialog.js +384 -380
- package/dist/shared/components/profile/PersonProfile.js +23 -21
- package/dist/shared/components/profile/SignedInDevices.js +126 -0
- package/dist/shared/components/queue/QueueItemSheet.js +38 -37
- package/dist/shared/components/queue/QueueWorklist.js +870 -827
- package/dist/shared/components/queue/column-chooser.js +21 -0
- package/dist/shared/components/queue/live-state-aspect.js +6 -0
- package/dist/shared/components/support/SupportView.js +1 -1
- package/dist/shared/components/ui/number-draft-input.js +93 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +191 -166
- package/dist/shared/lib/edit-lock-fields.js +7 -0
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/reimport-visibility.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function i(r, f, c) {
|
|
2
|
+
const a = (e) => e.trim().replace(/\s+/g, " ").toLowerCase(), n = /* @__PURE__ */ new Map();
|
|
3
|
+
for (const e of r) {
|
|
4
|
+
const o = a(f(e)), t = n.get(o);
|
|
5
|
+
t ? t.push(e) : n.set(o, [e]);
|
|
6
|
+
}
|
|
7
|
+
const s = /* @__PURE__ */ new Set();
|
|
8
|
+
for (const e of n.values()) {
|
|
9
|
+
if (e.length === 1) {
|
|
10
|
+
s.add(e[0]);
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const o = e.filter((t) => c.has(t));
|
|
14
|
+
if (o.length > 0) for (const t of o) s.add(t);
|
|
15
|
+
else s.add(e.find((t) => !t.startsWith("extra.")) ?? e[0]);
|
|
16
|
+
}
|
|
17
|
+
return r.filter((e) => s.has(e));
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
i as dedupeChooserKeys
|
|
21
|
+
};
|
|
@@ -172,7 +172,7 @@ function Ne({
|
|
|
172
172
|
) }, e.id)) }) : /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-2 px-6 py-12 text-center", children: [
|
|
173
173
|
/* @__PURE__ */ t(W, { className: "h-6 w-6 text-slate-300" }),
|
|
174
174
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: s === "desk" ? y === "unassigned" ? "Every request has been picked up." : "Nothing here." : N === "open" ? "You have no open requests." : "No closed requests yet." }),
|
|
175
|
-
s === "mine" && /* @__PURE__ */ t("p", { className: "max-w-sm text-[12px] text-slate-500 dark:text-muted-foreground", children: "Use Get help for anything general, or Request
|
|
175
|
+
s === "mine" && /* @__PURE__ */ t("p", { className: "max-w-sm text-[12px] text-slate-500 dark:text-muted-foreground", children: "Use Get help for anything general, or Request help on a record (beside Save) to ask for a change to that record." })
|
|
176
176
|
] }) }),
|
|
177
177
|
u && u.total > u.data.length && /* @__PURE__ */ n("p", { className: "mt-2 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
178
178
|
"Showing ",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { Input as y } from "./input.js";
|
|
4
|
+
const A = /^-?\d*\.?\d*$/;
|
|
5
|
+
function R(t) {
|
|
6
|
+
if (t == null || t === "") return null;
|
|
7
|
+
const r = typeof t == "number" ? t : Number(t);
|
|
8
|
+
return Number.isFinite(r) ? r : null;
|
|
9
|
+
}
|
|
10
|
+
function v(t) {
|
|
11
|
+
return t == null ? "" : String(t);
|
|
12
|
+
}
|
|
13
|
+
function F(t) {
|
|
14
|
+
const r = t.trim();
|
|
15
|
+
if (r === "") return null;
|
|
16
|
+
const e = Number(r);
|
|
17
|
+
return Number.isFinite(e) ? e : void 0;
|
|
18
|
+
}
|
|
19
|
+
function E(t) {
|
|
20
|
+
return t.replace(/[,\s$]/g, "");
|
|
21
|
+
}
|
|
22
|
+
function M(t, r) {
|
|
23
|
+
return t === r || t !== null && r !== null && Object.is(t, r);
|
|
24
|
+
}
|
|
25
|
+
function O({
|
|
26
|
+
value: t,
|
|
27
|
+
onValue: r,
|
|
28
|
+
allowNegative: e = !0,
|
|
29
|
+
type: N = "number",
|
|
30
|
+
onChange: n,
|
|
31
|
+
onBlur: m
|
|
32
|
+
}) {
|
|
33
|
+
const [i, c] = p.useState(null), l = p.useRef(R(t)), o = R(t);
|
|
34
|
+
p.useEffect(() => {
|
|
35
|
+
l.current = o;
|
|
36
|
+
}, [o]);
|
|
37
|
+
const f = (u) => {
|
|
38
|
+
u !== null && u < 0 && !e || M(u, l.current) || (l.current = u, r(u));
|
|
39
|
+
}, d = (u) => {
|
|
40
|
+
var x;
|
|
41
|
+
const s = u.target;
|
|
42
|
+
if (N === "number") {
|
|
43
|
+
if (s.value === "" && ((x = s.validity) != null && x.badInput)) {
|
|
44
|
+
c(""), n == null || n(u);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (!e && s.value.includes("-")) {
|
|
48
|
+
c(i ?? v(t));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
c(s.value);
|
|
52
|
+
const D = F(s.value);
|
|
53
|
+
D !== void 0 && f(D), n == null || n(u);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const b = E(s.value);
|
|
57
|
+
if (!A.test(b) || !e && b.includes("-")) return;
|
|
58
|
+
c(b);
|
|
59
|
+
const a = F(b);
|
|
60
|
+
a !== void 0 && f(a), n == null || n(u);
|
|
61
|
+
}, j = (u) => {
|
|
62
|
+
i !== null && c(null), m == null || m(u);
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
value: i ?? v(t),
|
|
66
|
+
onChange: d,
|
|
67
|
+
onBlur: j,
|
|
68
|
+
typing: i !== null
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const S = p.forwardRef(
|
|
72
|
+
({ value: t, onValue: r, onChange: e, onBlur: N, allowNegative: n, bare: m, type: i = "number", inputMode: c, ...l }, o) => {
|
|
73
|
+
const f = O({ value: t, onValue: r, allowNegative: n, type: i, onChange: e, onBlur: N }), d = {
|
|
74
|
+
...l,
|
|
75
|
+
ref: o,
|
|
76
|
+
type: i,
|
|
77
|
+
inputMode: c ?? (i === "number" ? void 0 : "decimal"),
|
|
78
|
+
value: f.value,
|
|
79
|
+
onChange: f.onChange,
|
|
80
|
+
onBlur: f.onBlur
|
|
81
|
+
};
|
|
82
|
+
return m ? /* @__PURE__ */ I("input", { ...d }) : /* @__PURE__ */ I(y, { ...d });
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
S.displayName = "NumberDraftInput";
|
|
86
|
+
export {
|
|
87
|
+
S as NumberDraftInput,
|
|
88
|
+
E as cleanNumberText,
|
|
89
|
+
v as formatNumberValue,
|
|
90
|
+
F as numberFromDraft,
|
|
91
|
+
R as numberOrNull,
|
|
92
|
+
O as useNumberDraft
|
|
93
|
+
};
|