@nivaro/react 0.2.54 → 0.2.55
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 +99 -98
- package/dist/index.d.ts +339 -2
- package/dist/index.js +644 -618
- package/dist/layout-editor.d.ts +4 -0
- package/dist/shared/components/BackgroundRunOffer.js +117 -0
- package/dist/shared/components/BroadcastView.js +214 -213
- package/dist/shared/components/CollectionBrowserView.js +2592 -2695
- package/dist/shared/components/ItemEditForm.js +4066 -3832
- package/dist/shared/components/JobsTray.js +100 -55
- package/dist/shared/components/MyWorkView.js +91 -89
- package/dist/shared/components/NotificationBell.js +80 -79
- package/dist/shared/components/ProfileView.js +568 -520
- package/dist/shared/components/RecordCompare.js +254 -0
- package/dist/shared/components/RecordReadView.js +599 -552
- package/dist/shared/components/ReportView.js +578 -543
- package/dist/shared/components/RowPresence.js +91 -0
- package/dist/shared/components/WidgetSlot.js +474 -458
- package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
- package/dist/shared/components/ai/AskPanel.js +139 -119
- package/dist/shared/components/ai/FirstWeekCard.js +126 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
- package/dist/shared/components/bulk/bulk-field-options.js +45 -0
- package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
- package/dist/shared/components/chat/ChannelArchive.js +326 -0
- package/dist/shared/components/chat/ChannelExtras.js +141 -121
- package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
- package/dist/shared/components/chat/ChatPanel.js +1695 -1733
- package/dist/shared/components/chat/Composer.js +357 -303
- package/dist/shared/components/chat/MessageActions.js +92 -0
- package/dist/shared/components/chat/MessageFormat.js +290 -264
- package/dist/shared/components/chat/OutboxBubbles.js +146 -0
- package/dist/shared/components/chat/RequestIdCard.js +135 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
- package/dist/shared/components/chat/RoomParts.js +213 -274
- package/dist/shared/components/chat/ScreenClip.js +184 -0
- package/dist/shared/components/chat/chat-core.js +402 -483
- package/dist/shared/components/chat/chat-drafts.js +59 -0
- package/dist/shared/components/chat/chat-emoji.js +348 -0
- package/dist/shared/components/chat/chat-local-time.js +41 -0
- package/dist/shared/components/chat/chat-outbox.js +303 -0
- package/dist/shared/components/chat/chat-window.js +163 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
- package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
- package/dist/shared/components/help-videos/api.js +76 -73
- package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
- package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
- package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
- package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
- package/dist/shared/components/item-edit/FieldRow.js +292 -279
- package/dist/shared/components/item-edit/GroupSection.js +698 -574
- package/dist/shared/components/item-edit/InlineTableField.js +3 -1
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
- package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
- package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
- package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
- package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
- package/dist/shared/components/item-edit/lazy-sections.js +36 -0
- package/dist/shared/components/item-edit/lock-why.js +39 -32
- package/dist/shared/components/item-edit/picker-miss.js +26 -0
- package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
- package/dist/shared/components/layout-editor/AddPanel.js +134 -117
- package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
- package/dist/shared/components/layout-editor/CollabParts.js +80 -75
- package/dist/shared/components/layout-editor/DesignNode.js +126 -120
- package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
- package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
- package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
- package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
- package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
- package/dist/shared/components/layout-editor/StagedChip.js +22 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
- package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
- package/dist/shared/components/layout-editor/dnd/node.js +69 -57
- package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
- package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
- package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
- package/dist/shared/components/layout-editor/entry/presets.js +71 -0
- package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
- package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
- package/dist/shared/components/layout-editor/grid-guides.js +142 -0
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
- package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
- package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
- package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
- package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
- package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
- package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/restore-piece.js +192 -0
- package/dist/shared/components/layout-editor/section-structure.js +241 -0
- package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
- package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
- package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
- package/dist/shared/components/layout-editor/staged-api.js +64 -0
- package/dist/shared/components/layout-editor/structure-ops.js +81 -77
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
- package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
- package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
- package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
- package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
- package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
- package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
- package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
- package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
- package/dist/shared/components/profile/AgentsPanel.js +479 -0
- package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
- package/dist/shared/components/support/SupportAnalytics.js +171 -0
- package/dist/shared/components/support/SupportView.js +75 -73
- package/dist/shared/lib/background-runs.js +150 -0
- package/dist/shared/lib/delivery-ack.js +9 -0
- package/dist/shared/lib/entry-badge-style.js +13 -0
- package/dist/shared/lib/entry-config.js +71 -0
- package/dist/shared/lib/form-sections.js +64 -0
- package/dist/shared/lib/form-structure.js +99 -0
- package/dist/shared/lib/form-usage-beacon.js +101 -52
- package/dist/shared/lib/jobs-tray.js +25 -23
- package/dist/shared/lib/keyset-pager.js +37 -0
- package/dist/shared/lib/layout-ops.js +84 -82
- package/dist/shared/lib/layout-resolve.js +113 -0
- package/dist/shared/lib/placement-behaviour.js +144 -0
- package/dist/shared/lib/prefetch.js +149 -0
- package/dist/shared/lib/presence-hooks.js +199 -0
- package/dist/shared/lib/record-outbox.js +82 -81
- package/dist/shared/lib/replay-socket.js +93 -0
- package/dist/shared/lib/request-gate.js +51 -50
- package/dist/shared/lib/room-gaps.js +96 -0
- package/dist/shared/lib/search-log.js +27 -0
- package/dist/shared/lib/socket-realtime.js +101 -80
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, Fragment as Y, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as E } from "@tanstack/react-query";
|
|
3
|
-
import { useState as Z, useEffect as ee, useContext as
|
|
3
|
+
import { useState as Z, useEffect as ee, useContext as le } from "react";
|
|
4
4
|
import { useNivaroClient as K } from "../../../context.js";
|
|
5
5
|
import { get as j } from "../../../lib/commands.js";
|
|
6
|
-
import { CascadeWriter as
|
|
6
|
+
import { CascadeWriter as oe } from "../ai-rules/CascadeWriter.js";
|
|
7
7
|
import { CascadeFiltersEditor as te } from "../editors/cascade-filters.js";
|
|
8
8
|
import { editorQueryKeys as ie } from "../editors/editor-queries.js";
|
|
9
9
|
import { useFieldCtx as ne } from "./field-context.js";
|
|
10
|
-
import { useGlobalValue as
|
|
10
|
+
import { useGlobalValue as b, GlobalWriterContext as ae, Toggle as g, Setting as m, TextInput as re, Section as $, Choice as x } from "./kit.js";
|
|
11
11
|
import { asObject as de, asArray as se, relKindOf as ce, describeField as fe, withKey as F } from "./model.js";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
import { PickerMisses as pe } from "./PickerMisses.js";
|
|
13
|
+
import { PickerPreview as ue } from "./PickerPreview.js";
|
|
14
|
+
function he(l) {
|
|
15
|
+
const o = K();
|
|
15
16
|
return E({
|
|
16
|
-
queryKey: ie.relationsFor(
|
|
17
|
-
queryFn: () =>
|
|
18
|
-
enabled: !!
|
|
17
|
+
queryKey: ie.relationsFor(l),
|
|
18
|
+
queryFn: () => o.request(j(`/data-model/relations/for/${l}`)).then((d) => Array.isArray(d.data) ? d.data : []),
|
|
19
|
+
enabled: !!l,
|
|
19
20
|
staleTime: 5 * 6e4
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
23
|
+
function ge(l) {
|
|
24
|
+
const o = K();
|
|
24
25
|
return E({
|
|
25
|
-
queryKey: ["layout-editor", "layouts-of",
|
|
26
|
-
queryFn: () =>
|
|
27
|
-
j("/collection-layouts", { collection:
|
|
26
|
+
queryKey: ["layout-editor", "layouts-of", l],
|
|
27
|
+
queryFn: () => o.request(
|
|
28
|
+
j("/collection-layouts", { collection: l })
|
|
28
29
|
).then((d) => Array.isArray(d.data) ? d.data : []),
|
|
29
|
-
enabled: !!
|
|
30
|
+
enabled: !!l,
|
|
30
31
|
staleTime: 6e4
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
function S(
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
const d = /^(\d{1,3})%$/.exec(
|
|
34
|
+
function S(l) {
|
|
35
|
+
const o = l.trim();
|
|
36
|
+
if (!o) return null;
|
|
37
|
+
const d = /^(\d{1,3})%$/.exec(o);
|
|
37
38
|
if (d) {
|
|
38
39
|
const a = Number(d[1]);
|
|
39
40
|
return a >= 10 && a <= 96 ? `${a}%` : "invalid";
|
|
40
41
|
}
|
|
41
|
-
if (/^\d+$/.test(
|
|
42
|
-
const a = Number(
|
|
42
|
+
if (/^\d+$/.test(o)) {
|
|
43
|
+
const a = Number(o);
|
|
43
44
|
return a >= 320 && a <= 2e3 ? a : "invalid";
|
|
44
45
|
}
|
|
45
46
|
return "invalid";
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function Ne() {
|
|
48
49
|
var L;
|
|
49
|
-
const
|
|
50
|
+
const l = ne(), { info: o, ov: d, opts: a, env: s, globalOptions: r, globalDependency: q } = l, n = o.label, c = o.relKind === "M2O", u = o.relKind === "M2M", _ = o.iface === "relation-path" || o.isPath, N = o.iface === "file-image" || o.iface === "files-m2m", P = o.iface === "relation-grouped", h = de(d.drilldown), y = h.enabled ?? _, W = o.relatedCollection ?? (typeof r.path_target_collection == "string" ? r.path_target_collection : null), { data: D = [] } = ge(c || u || _ ? W : null), I = D.filter((e) => e.layout_type === "detail"), w = h.width == null ? "" : String(h.width), [G, T] = Z(w);
|
|
50
51
|
ee(() => {
|
|
51
|
-
|
|
52
|
+
T((e) => {
|
|
52
53
|
const i = S(e);
|
|
53
54
|
return (i === null ? "" : String(i)) === w ? e : w;
|
|
54
55
|
});
|
|
55
56
|
}, [w]);
|
|
56
|
-
const
|
|
57
|
-
(e) => e.many_collection ===
|
|
58
|
-
).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B =
|
|
57
|
+
const R = S(G), k = (e, i, f) => l.setOverride("drilldown", { ...h, enabled: y, ...e }, i, f), { data: Q = [] } = he(P ? o.relatedCollection : null), A = Q.filter(
|
|
58
|
+
(e) => e.many_collection === o.relatedCollection && e.many_field && !e.junction_field
|
|
59
|
+
).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B = b(
|
|
59
60
|
"field.group_field",
|
|
60
61
|
typeof r.group_field == "string" ? r.group_field : ""
|
|
61
|
-
), U =
|
|
62
|
+
), U = b(
|
|
62
63
|
"field.option_field",
|
|
63
64
|
typeof r.option_field == "string" ? r.option_field : ""
|
|
64
|
-
), V = (L =
|
|
65
|
-
for (const e of
|
|
66
|
-
e.one_field && e.one_field !== "id" && e.one_collection ===
|
|
67
|
-
const M = [...C].filter((e) => e !==
|
|
68
|
-
const
|
|
65
|
+
), V = (L = le(ae)) == null ? void 0 : L.draft.dependency_config, v = se((V ?? q).cascade_filters), C = new Set(l.globals.map((e) => e.field));
|
|
66
|
+
for (const e of l.relations)
|
|
67
|
+
e.one_field && e.one_field !== "id" && e.one_collection === s.collection && C.add(e.one_field), e.many_field && e.many_collection === s.collection && C.add(e.many_field);
|
|
68
|
+
const M = [...C].filter((e) => e !== o.field).map((e) => ({ f: e, kind: ce(e, l.relations) })).filter((e) => e.kind === "M2O" || e.kind === "M2M").map(({ f: e, kind: i }) => {
|
|
69
|
+
const f = s.bundle.placements.find((X) => X.field === e) ?? null;
|
|
69
70
|
return {
|
|
70
71
|
field: e,
|
|
71
|
-
label: fe(e,
|
|
72
|
+
label: fe(e, l.globals, l.relations, f).label,
|
|
72
73
|
kind: i
|
|
73
74
|
};
|
|
74
|
-
}).sort((e, i) => e.label.localeCompare(i.label)), O = (e, i) => typeof r[e] == "boolean" ? r[e] : i, z =
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
(
|
|
75
|
+
}).sort((e, i) => e.label.localeCompare(i.label)), O = (e, i) => typeof r[e] == "boolean" ? r[e] : i, z = b("field.allow_upload", O("allow_upload", !0)), H = b("field.allow_pick", O("allow_pick", !0)), J = b("field.pending_save", O("pending_save", !1));
|
|
76
|
+
return /* @__PURE__ */ p("div", { className: "space-y-5", children: [
|
|
77
|
+
(c || u) && /* @__PURE__ */ p(Y, { children: [
|
|
77
78
|
/* @__PURE__ */ t(
|
|
78
79
|
g,
|
|
79
80
|
{
|
|
@@ -81,7 +82,7 @@ function Fe() {
|
|
|
81
82
|
label: "Edit the related record here",
|
|
82
83
|
effect: "Shows the picked record’s fields inline so people can change them without leaving.",
|
|
83
84
|
checked: a.inline_relation === !0,
|
|
84
|
-
onChange: (e) =>
|
|
85
|
+
onChange: (e) => l.setOption(
|
|
85
86
|
"inline_relation",
|
|
86
87
|
e ? !0 : void 0,
|
|
87
88
|
e ? `Edit ${n} inline` : `Stop editing ${n} inline`
|
|
@@ -89,7 +90,7 @@ function Fe() {
|
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
92
|
/* @__PURE__ */ t(
|
|
92
|
-
|
|
93
|
+
m,
|
|
93
94
|
{
|
|
94
95
|
k: "field.option_sort",
|
|
95
96
|
label: "Order of the options",
|
|
@@ -101,7 +102,7 @@ function Fe() {
|
|
|
101
102
|
mono: !0,
|
|
102
103
|
value: typeof a.option_sort == "string" ? a.option_sort : "",
|
|
103
104
|
placeholder: "-year, name",
|
|
104
|
-
onChange: (e) =>
|
|
105
|
+
onChange: (e) => l.setOption(
|
|
105
106
|
"option_sort",
|
|
106
107
|
e.trim() ? e : void 0,
|
|
107
108
|
`Change the order of ${n} options`,
|
|
@@ -112,7 +113,7 @@ function Fe() {
|
|
|
112
113
|
}
|
|
113
114
|
)
|
|
114
115
|
] }),
|
|
115
|
-
|
|
116
|
+
c && /* @__PURE__ */ t(
|
|
116
117
|
g,
|
|
117
118
|
{
|
|
118
119
|
k: "field.enforce_picker_rules",
|
|
@@ -120,15 +121,16 @@ function Fe() {
|
|
|
120
121
|
effect: "The server rejects a value outside the cascade filters and option filters, from any writer.",
|
|
121
122
|
enforced: !0,
|
|
122
123
|
checked: a.enforce_picker_rules === !0,
|
|
123
|
-
onChange: (e) =>
|
|
124
|
+
onChange: (e) => l.setOption(
|
|
124
125
|
"enforce_picker_rules",
|
|
125
126
|
e ? !0 : void 0,
|
|
126
127
|
e ? `Enforce the picker rules of ${n}` : `Stop enforcing the picker rules of ${n}`
|
|
127
128
|
)
|
|
128
129
|
}
|
|
129
130
|
),
|
|
130
|
-
(
|
|
131
|
-
|
|
131
|
+
(c || u) && o.iface !== "files-m2m" && /* @__PURE__ */ t(ue, { rules: v }),
|
|
132
|
+
c && s.layoutType === "grouped" && Number(s.bundle.layout.id) > 0 && /* @__PURE__ */ t(pe, { layoutId: Number(s.bundle.layout.id), field: o.field }),
|
|
133
|
+
(c || u || _) && /* @__PURE__ */ p($, { title: "Detail panel", children: [
|
|
132
134
|
/* @__PURE__ */ t(
|
|
133
135
|
g,
|
|
134
136
|
{
|
|
@@ -143,7 +145,7 @@ function Fe() {
|
|
|
143
145
|
}
|
|
144
146
|
),
|
|
145
147
|
/* @__PURE__ */ t(
|
|
146
|
-
|
|
148
|
+
m,
|
|
147
149
|
{
|
|
148
150
|
k: "field.drilldown.layout_id",
|
|
149
151
|
label: "Panel layout",
|
|
@@ -156,15 +158,15 @@ function Fe() {
|
|
|
156
158
|
value: h.layout_id == null ? "" : String(h.layout_id),
|
|
157
159
|
options: [
|
|
158
160
|
{ value: "", label: "The default detail view" },
|
|
159
|
-
...
|
|
161
|
+
...I.map((e) => ({ value: String(e.id), label: e.name }))
|
|
160
162
|
],
|
|
161
163
|
onChange: (e) => k({ layout_id: e ? Number(e) : null }, `Change the panel layout of ${n}`)
|
|
162
164
|
}
|
|
163
165
|
)
|
|
164
166
|
}
|
|
165
167
|
),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
168
|
+
/* @__PURE__ */ p(
|
|
169
|
+
m,
|
|
168
170
|
{
|
|
169
171
|
k: "field.drilldown.width",
|
|
170
172
|
label: "Panel width",
|
|
@@ -175,25 +177,25 @@ function Fe() {
|
|
|
175
177
|
{
|
|
176
178
|
"aria-label": "Panel width",
|
|
177
179
|
disabled: !y,
|
|
178
|
-
value:
|
|
180
|
+
value: G,
|
|
179
181
|
placeholder: "60%",
|
|
180
182
|
onChange: (e) => {
|
|
181
|
-
|
|
183
|
+
T(e.target.value);
|
|
182
184
|
const i = S(e.target.value);
|
|
183
185
|
i !== "invalid" && k({ width: i }, `Change the panel width of ${n}`, !0);
|
|
184
186
|
},
|
|
185
|
-
onBlur: () =>
|
|
187
|
+
onBlur: () => s.flush(),
|
|
186
188
|
className: "h-7 w-full rounded-md border border-slate-200 bg-white px-2 font-mono text-[12px] focus:border-nvr-cyan focus:outline-none disabled:opacity-40 dark:border-border dark:bg-card"
|
|
187
189
|
}
|
|
188
190
|
),
|
|
189
|
-
|
|
191
|
+
R === "invalid" && /* @__PURE__ */ t("p", { className: "text-[11px] text-red-600 dark:text-red-400", children: "Not a width — nothing saved" })
|
|
190
192
|
]
|
|
191
193
|
}
|
|
192
194
|
)
|
|
193
195
|
] }),
|
|
194
|
-
P && /* @__PURE__ */
|
|
196
|
+
P && /* @__PURE__ */ p($, { title: "Grouped list", children: [
|
|
195
197
|
/* @__PURE__ */ t(
|
|
196
|
-
|
|
198
|
+
m,
|
|
197
199
|
{
|
|
198
200
|
k: "field.group_field",
|
|
199
201
|
label: "Group options by",
|
|
@@ -204,8 +206,8 @@ function Fe() {
|
|
|
204
206
|
{
|
|
205
207
|
ariaLabel: "Group options by",
|
|
206
208
|
value: B,
|
|
207
|
-
options: [{ value: "", label: "Not grouped" }, ...
|
|
208
|
-
onChange: (e) =>
|
|
209
|
+
options: [{ value: "", label: "Not grouped" }, ...A],
|
|
210
|
+
onChange: (e) => l.proposeGlobalOption(
|
|
209
211
|
"field.group_field",
|
|
210
212
|
"group_field",
|
|
211
213
|
e || void 0,
|
|
@@ -217,7 +219,7 @@ function Fe() {
|
|
|
217
219
|
}
|
|
218
220
|
),
|
|
219
221
|
/* @__PURE__ */ t(
|
|
220
|
-
|
|
222
|
+
m,
|
|
221
223
|
{
|
|
222
224
|
k: "field.option_field",
|
|
223
225
|
label: "Option field",
|
|
@@ -228,8 +230,8 @@ function Fe() {
|
|
|
228
230
|
{
|
|
229
231
|
ariaLabel: "Option field",
|
|
230
232
|
value: U,
|
|
231
|
-
options: [{ value: "", label: "The related record itself" }, ...
|
|
232
|
-
onChange: (e) =>
|
|
233
|
+
options: [{ value: "", label: "The related record itself" }, ...A],
|
|
234
|
+
onChange: (e) => l.proposeGlobalOption(
|
|
233
235
|
"field.option_field",
|
|
234
236
|
"option_field",
|
|
235
237
|
e || void 0,
|
|
@@ -241,8 +243,8 @@ function Fe() {
|
|
|
241
243
|
}
|
|
242
244
|
)
|
|
243
245
|
] }),
|
|
244
|
-
(
|
|
245
|
-
|
|
246
|
+
(c || u) && /* @__PURE__ */ p(
|
|
247
|
+
m,
|
|
246
248
|
{
|
|
247
249
|
k: "field.cascade_filters",
|
|
248
250
|
label: "Narrow the options by another field",
|
|
@@ -254,8 +256,8 @@ function Fe() {
|
|
|
254
256
|
{
|
|
255
257
|
rules: v,
|
|
256
258
|
m2oFields: M,
|
|
257
|
-
relatedCollection:
|
|
258
|
-
onChange: (e) =>
|
|
259
|
+
relatedCollection: o.relatedCollection,
|
|
260
|
+
onChange: (e) => l.proposeGlobal(
|
|
259
261
|
"field.cascade_filters",
|
|
260
262
|
e,
|
|
261
263
|
`Change how ${n} options are narrowed`,
|
|
@@ -271,30 +273,30 @@ function Fe() {
|
|
|
271
273
|
}
|
|
272
274
|
),
|
|
273
275
|
/* @__PURE__ */ t(
|
|
274
|
-
|
|
276
|
+
oe,
|
|
275
277
|
{
|
|
276
|
-
layoutId: Number(
|
|
277
|
-
collection:
|
|
278
|
-
field:
|
|
278
|
+
layoutId: Number(s.bundle.layout.id),
|
|
279
|
+
collection: s.collection,
|
|
280
|
+
field: o.field,
|
|
279
281
|
rules: v,
|
|
280
282
|
currentOptionFilter: r.option_filter && typeof r.option_filter == "object" && !Array.isArray(r.option_filter) ? r.option_filter : null,
|
|
281
283
|
parentFields: M.filter((e) => e.kind === "M2O").map((e) => e.field),
|
|
282
|
-
disabled:
|
|
283
|
-
onApply: (e, i) =>
|
|
284
|
-
...
|
|
284
|
+
disabled: l.readOnly,
|
|
285
|
+
onApply: (e, i) => l.proposeGlobal("field.cascade_filters", e.rules, i, (f) => ({
|
|
286
|
+
...f,
|
|
285
287
|
dependency_config: F(
|
|
286
|
-
|
|
288
|
+
f.dependency_config,
|
|
287
289
|
"cascade_filters",
|
|
288
290
|
e.rules.length ? e.rules : void 0
|
|
289
291
|
) ?? {},
|
|
290
|
-
options: F(
|
|
292
|
+
options: F(f.options, "option_filter", e.optionFilter ?? void 0) ?? {}
|
|
291
293
|
}))
|
|
292
294
|
}
|
|
293
295
|
)
|
|
294
296
|
]
|
|
295
297
|
}
|
|
296
298
|
),
|
|
297
|
-
|
|
299
|
+
N && /* @__PURE__ */ p($, { title: "Files", children: [
|
|
298
300
|
/* @__PURE__ */ t(
|
|
299
301
|
g,
|
|
300
302
|
{
|
|
@@ -303,7 +305,7 @@ function Fe() {
|
|
|
303
305
|
effect: "People can upload new files into this field.",
|
|
304
306
|
scope: "field",
|
|
305
307
|
checked: z,
|
|
306
|
-
onChange: (e) =>
|
|
308
|
+
onChange: (e) => l.proposeGlobalOption(
|
|
307
309
|
"field.allow_upload",
|
|
308
310
|
"allow_upload",
|
|
309
311
|
e,
|
|
@@ -319,7 +321,7 @@ function Fe() {
|
|
|
319
321
|
effect: "People can attach files that are already stored.",
|
|
320
322
|
scope: "field",
|
|
321
323
|
checked: H,
|
|
322
|
-
onChange: (e) =>
|
|
324
|
+
onChange: (e) => l.proposeGlobalOption(
|
|
323
325
|
"field.allow_pick",
|
|
324
326
|
"allow_pick",
|
|
325
327
|
e,
|
|
@@ -327,7 +329,7 @@ function Fe() {
|
|
|
327
329
|
)
|
|
328
330
|
}
|
|
329
331
|
),
|
|
330
|
-
|
|
332
|
+
o.iface === "files-m2m" && /* @__PURE__ */ t(
|
|
331
333
|
g,
|
|
332
334
|
{
|
|
333
335
|
k: "field.pending_save",
|
|
@@ -335,7 +337,7 @@ function Fe() {
|
|
|
335
337
|
scope: "field",
|
|
336
338
|
effect: "Links wait for the record’s Save instead of saving at once.",
|
|
337
339
|
checked: J,
|
|
338
|
-
onChange: (e) =>
|
|
340
|
+
onChange: (e) => l.proposeGlobalOption(
|
|
339
341
|
"field.pending_save",
|
|
340
342
|
"pending_save",
|
|
341
343
|
e || void 0,
|
|
@@ -345,15 +347,15 @@ function Fe() {
|
|
|
345
347
|
}
|
|
346
348
|
)
|
|
347
349
|
] }),
|
|
348
|
-
!(
|
|
350
|
+
!(c || u || _ || N) && /* @__PURE__ */ p("p", { className: "text-[12px] text-muted-foreground", children: [
|
|
349
351
|
n,
|
|
350
352
|
" is not a picker. Nothing to set here."
|
|
351
353
|
] })
|
|
352
354
|
] });
|
|
353
355
|
}
|
|
354
356
|
export {
|
|
355
|
-
|
|
357
|
+
Ne as PickerTab,
|
|
356
358
|
S as parsePanelWidth,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
+
ge as useLayoutsOf,
|
|
360
|
+
he as useRelationsFor
|
|
359
361
|
};
|