@nivaro/react 0.3.103 → 0.3.105
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 +15 -3
- package/dist/shared/components/CollectionBrowserView.js +1694 -1639
- package/dist/shared/components/ItemEditForm.js +2867 -2845
- package/dist/shared/components/imports/CollectionImportPanel.js +483 -459
- package/dist/shared/components/integrations/IntegrationStatusLines.js +71 -68
- package/dist/shared/components/item-edit/InlineTableField.js +88 -88
- package/dist/shared/components/item-edit/UserChip.js +38 -38
- package/dist/shared/components/layout-editor/DesignNode.js +16 -14
- package/dist/shared/components/layout-editor/LayoutEditor.js +445 -441
- package/dist/shared/components/layout-editor/inspector/Inspector.js +18 -18
- package/dist/shared/components/layout-editor/inspector/SlotInspector.js +80 -52
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ButtonsSection.js +54 -26
- package/dist/shared/components/layout-editor/settings/settings-registry.js +23 -15
- package/dist/shared/components/layout-editor/useLayoutDraft.js +211 -196
- package/dist/shared/components/panels/ExternalRequestsChip.js +141 -122
- package/dist/shared/components/quick-filters/QuickFilterBarEditor.js +334 -0
- package/dist/shared/components/quick-filters/QuickFilterFieldPicker.js +151 -0
- package/dist/shared/components/quick-filters/QuickFilterForm.js +371 -0
- package/dist/shared/components/quick-filters/config.js +63 -0
- package/dist/shared/components/quick-filters/facets.js +55 -0
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +95 -0
- package/dist/shared/lib/entry-config.js +7 -7
- package/dist/shared/lib/integration-chip.js +10 -6
- package/dist/shared/lib/owners-header-tile.js +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { applyLayoutOps as _, HEADER_GROUP_KEY as o, newPlacement as m } from "./layout-ops.js";
|
|
2
|
+
const i = "__owners__", l = -1, u = (e) => !(e.is_visible === 0 || e.is_visible === !1), n = (e) => e.field === i && e.group_key === o;
|
|
3
|
+
function a(e) {
|
|
4
|
+
return e.some(n) ? !1 : e.some(
|
|
5
|
+
(t) => (t.field === "__pipeline__" || t.field === i) && t.group_key !== o && u(t)
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
function g(e) {
|
|
9
|
+
const t = e.assignments.find(n);
|
|
10
|
+
if (t)
|
|
11
|
+
return { show: u(t) && (e.design || e.ownersConfigured !== !1), auto: !1 };
|
|
12
|
+
const r = e.showPipeline && !e.isNew && a(e.assignments) && (e.design || e.ownersConfigured === !0);
|
|
13
|
+
return { show: r, auto: r };
|
|
14
|
+
}
|
|
15
|
+
const p = (e) => {
|
|
16
|
+
const t = e.layout.layout_type;
|
|
17
|
+
return t == null || t === "grouped";
|
|
18
|
+
}, f = (e) => e.placements.filter((t) => t.group_key === o).sort((t, r) => t.sort - r.sort);
|
|
19
|
+
function y(e) {
|
|
20
|
+
var s;
|
|
21
|
+
if (!p(e) || !a(e.placements)) return e;
|
|
22
|
+
const t = ((s = f(e)[0]) == null ? void 0 : s.sort) ?? 0, r = {
|
|
23
|
+
...m(i, o),
|
|
24
|
+
id: l,
|
|
25
|
+
sort: t - 1
|
|
26
|
+
};
|
|
27
|
+
return _({ ...e, placements: [...e.placements, r] }, [
|
|
28
|
+
{ op: "layout_update", patch: {} }
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
const d = (e) => {
|
|
32
|
+
const t = (r) => !!r && (r.group_key === o || r.field === i);
|
|
33
|
+
switch (e.op) {
|
|
34
|
+
case "place":
|
|
35
|
+
return e.group_key === o;
|
|
36
|
+
case "move":
|
|
37
|
+
return t(e.from) || e.to_group_key === o;
|
|
38
|
+
case "update_placement":
|
|
39
|
+
case "remove":
|
|
40
|
+
return t(e.at);
|
|
41
|
+
default:
|
|
42
|
+
return !1;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
function h(e, t) {
|
|
46
|
+
const s = f(e).findIndex((c) => n(c) && c.id === l);
|
|
47
|
+
return s < 0 || !t.some(d) ? t : [{ op: "place", field: i, group_key: o, index: s }, ...t];
|
|
48
|
+
}
|
|
49
|
+
function v(e, t) {
|
|
50
|
+
const r = e.placements.filter((s) => !n(s));
|
|
51
|
+
return !t.some((s) => s.op === "remove" && n(s.at)) || !a(r) ? t : t.map(
|
|
52
|
+
(s) => s.op === "remove" && n(s.at) ? { op: "update_placement", at: s.at, patch: { is_visible: !1 } } : s
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
i as OWNERS_FIELD,
|
|
57
|
+
l as VIRTUAL_OWNERS_ID,
|
|
58
|
+
h as materializeOwnersOps,
|
|
59
|
+
a as ownersAutoQualifies,
|
|
60
|
+
g as ownersHeaderTile,
|
|
61
|
+
v as rewriteOwnersRemove,
|
|
62
|
+
y as withAutoOwnersTile
|
|
63
|
+
};
|