@nivaro/react 0.3.65 → 0.3.66
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +13 -4
- package/dist/shared/components/CollectionBrowserView.js +2509 -2668
- package/dist/shared/components/ItemEditForm.js +3910 -3771
- package/dist/shared/components/MyWorkView.js +124 -113
- package/dist/shared/components/ProfileView.js +483 -472
- package/dist/shared/components/ReportView.js +1100 -1094
- package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
- package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +240 -238
- package/dist/shared/components/item-edit/GroupSection.js +555 -538
- package/dist/shared/components/item-edit/M2MCombobox.js +414 -349
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +211 -187
- package/dist/shared/components/item-edit/RelationCombobox.js +327 -311
- package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
- package/dist/shared/components/item-edit/UserChip.js +264 -229
- package/dist/shared/components/item-edit/cascade-clear-notice.js +23 -19
- package/dist/shared/components/item-edit/header-path-preview.js +52 -0
- package/dist/shared/components/item-edit/line-merge.js +73 -47
- package/dist/shared/components/item-edit/picker-search.js +25 -21
- package/dist/shared/components/queue/QueueWorklist.js +799 -772
- package/dist/shared/lib/obligation-reason-text.js +1 -1
- package/dist/shared/lib/quick-filter-cascade.js +29 -19
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const i = /* @__PURE__ */ new Set(["id", "po", "req", "url", "sku", "uom", "erp", "api", "ids"]);
|
|
1
|
+
const i = /* @__PURE__ */ new Set(["id", "po", "req", "url", "sku", "uom", "erp", "api", "ids", "mwf"]);
|
|
2
2
|
function r(n) {
|
|
3
3
|
const t = n.trim().replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[_\s.-]+/).filter(Boolean).map((e) => e.toLowerCase());
|
|
4
4
|
return t.length === 0 ? n : t.map((e, s) => i.has(e) ? e === "ids" ? "IDs" : e.toUpperCase() : s === 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" ");
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
import { get as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
for (const
|
|
5
|
-
if (
|
|
6
|
-
const
|
|
7
|
-
(
|
|
1
|
+
import { get as a } from "./commands.js";
|
|
2
|
+
function r(o, t, c) {
|
|
3
|
+
const e = [];
|
|
4
|
+
for (const n of c) {
|
|
5
|
+
if (n.values.length === 0 || n.collection === o) continue;
|
|
6
|
+
const l = t.find(
|
|
7
|
+
(i) => i.many_collection === o && i.one_collection === n.collection && !i.junction_field && !!i.many_field
|
|
8
8
|
);
|
|
9
|
-
if (!
|
|
10
|
-
const
|
|
11
|
-
(
|
|
9
|
+
if (!l) continue;
|
|
10
|
+
const f = t.find(
|
|
11
|
+
(i) => i.many_collection === n.collection && i.one_collection === o && !i.junction_field
|
|
12
12
|
);
|
|
13
|
-
|
|
14
|
-
[
|
|
13
|
+
f && f.one_field && !l.one_field || e.push({
|
|
14
|
+
[l.many_field]: n.field === "id" ? { _in: n.values } : { [n.field]: { _in: n.values } }
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return e.length === 0 ? null : e.length === 1 ? e[0] : { _and: e };
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
queryKey: ["cascade-relations",
|
|
22
|
-
queryFn: () =>
|
|
19
|
+
function s(o, t, c) {
|
|
20
|
+
return t.fetchQuery({
|
|
21
|
+
queryKey: ["cascade-relations", c],
|
|
22
|
+
queryFn: () => o.request(a(`/data-model/relations/for/${c}`)).then((e) => e.data ?? []).catch(() => []),
|
|
23
23
|
staleTime: 10 * 6e4
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
+
function d(o, t) {
|
|
27
|
+
if (!t) return [];
|
|
28
|
+
const c = [];
|
|
29
|
+
for (const e of t.dimensions) {
|
|
30
|
+
const n = t.restricted[e.name] ?? [];
|
|
31
|
+
n.length === 0 || e.target_collection === o || c.push({ collection: e.target_collection, field: "id", values: n });
|
|
32
|
+
}
|
|
33
|
+
return c;
|
|
34
|
+
}
|
|
26
35
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
r as cascadeFilter,
|
|
37
|
+
s as fetchCascadeRelations,
|
|
38
|
+
d as restrictedScopeSelections
|
|
29
39
|
};
|