@nivaro/react 0.2.54 → 0.2.56
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 +367 -2
- package/dist/index.js +645 -616
- 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/stale-chunk.js +60 -0
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
import { jsxs as r, jsx as t, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as U, useEffect as ae } from "react";
|
|
3
|
+
import { readGroupStructure as ne } from "../../../lib/form-structure.js";
|
|
4
|
+
import { lazySectionsOf as oe, lazySectionPatch as ie } from "../../../lib/layout-resolve.js";
|
|
5
|
+
import { titleCase as W } from "../../../lib/utils.js";
|
|
6
|
+
import { RuleWriter as se } from "../ai-rules/RuleWriter.js";
|
|
7
|
+
import { RoleConditionRow as q } from "../editors/lock-conditions.js";
|
|
8
|
+
import { O2MAggFieldCombobox as re } from "../editors/o2m-agg-field.js";
|
|
9
|
+
import { SwapConfigEditor as de } from "../editors/swap-config.js";
|
|
10
|
+
import { IconPicker as ce } from "../pickers/icon-picker.js";
|
|
11
|
+
import { SectionReuseActions as he } from "../reuse/SectionReuseActions.js";
|
|
12
|
+
import { emptyTextOp as pe, stickyPlan as fe, rowUpdatePlan as X } from "../section-structure.js";
|
|
13
|
+
import { useCollectionMeta as ue } from "./field-context.js";
|
|
14
|
+
import { useInspectorEnv as me, Setting as d, TextInput as S, Choice as F, Segmented as y, Toggle as g, TextArea as Y, Section as $, FieldMultiPicker as be, ConditionBuilder as ye } from "./kit.js";
|
|
15
|
+
import { groupFields as ge, asArray as k, describeField as Z, relKindOf as ke, relatedCollectionOf as _e } from "./model.js";
|
|
16
|
+
import { GroupTranslations as ve } from "./Translations.js";
|
|
17
|
+
const T = {
|
|
15
18
|
section: "Section",
|
|
16
19
|
tab: "Tab or step",
|
|
17
20
|
metadata: "Record info (read-only)",
|
|
18
21
|
container: "Tabs or steps holder",
|
|
19
22
|
content: "Text block"
|
|
20
23
|
};
|
|
21
|
-
function
|
|
24
|
+
function we(l) {
|
|
22
25
|
return typeof l == "string" ? { field: l } : l && typeof l == "object" && typeof l.field == "string" ? l : null;
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
const { field:
|
|
26
|
-
return !
|
|
27
|
-
field:
|
|
28
|
-
...
|
|
29
|
-
...
|
|
27
|
+
function xe(l) {
|
|
28
|
+
const { field: u, label: o, agg: p, agg_field: m, field_options: f } = l;
|
|
29
|
+
return !o && !p ? u : {
|
|
30
|
+
field: u,
|
|
31
|
+
...o ? { label: o } : {},
|
|
32
|
+
...p ? { agg: p, agg_field: m, ...f ? { field_options: f } : {} } : {}
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
const _ = (l) => l.length ? JSON.stringify(l) : null;
|
|
33
|
-
function
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(e) => JSON.stringify(e.filter((
|
|
36
|
+
function je({ group: l, readOnly: u }) {
|
|
37
|
+
var B, H;
|
|
38
|
+
const o = me(), { data: p } = ue(o.collection), m = (p == null ? void 0 : p.fields) ?? [], f = (p == null ? void 0 : p.relations) ?? [], n = l.label || W(l.key), i = l.type, s = (e, a, c) => o.apply([{ op: "group_update", key: l.key, patch: e }], { label: a, text: c }), L = o.bundle.groups.filter((e) => e.parent_key === l.key), Q = o.bundle.groups.filter((e) => e.type === "container" && e.key !== l.key), P = o.bundle.placements.some((e) => e.group_key === l.key), V = (l.parent_key ? ["tab"] : Object.keys(T)).filter((e) => e === i || !(P && (e === "container" || e === "content"))).map((e) => ({ value: e, label: T[e] })), v = i === "section" || i === "metadata" || i === "tab", R = oe(o.bundle.layout.conditions).includes(l.key), M = !!o.bundle.layout.accordion_mode, w = ne(l.swap_config), D = m.filter((e) => !e.field.startsWith("__") && e.type !== "alias").map((e) => ({ value: e.field, label: e.label || W(e.field) })).sort((e, a) => e.label.localeCompare(a.label)), j = ge(o.bundle, l.key), x = k(l.summary_fields).map(we).filter((e) => !!e), G = (e, a, c) => s({ summary_fields: _(e.map(xe)) }, a, c), J = k(l.visible_when), C = JSON.stringify(J), [ee, K] = U(J);
|
|
39
|
+
ae(() => {
|
|
40
|
+
K(
|
|
41
|
+
(e) => JSON.stringify(e.filter((a) => a.field)) === C ? e : JSON.parse(C)
|
|
39
42
|
);
|
|
40
|
-
}, [
|
|
41
|
-
const [
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
}, [C]);
|
|
44
|
+
const [te, z] = U(!1);
|
|
45
|
+
return /* @__PURE__ */ r("fieldset", { disabled: u, className: "min-w-0 space-y-5", children: [
|
|
43
46
|
/* @__PURE__ */ t(d, { k: "group.label", label: "Name", effect: "The heading people see.", children: /* @__PURE__ */ t(
|
|
44
|
-
|
|
47
|
+
S,
|
|
45
48
|
{
|
|
46
49
|
ariaLabel: "Name",
|
|
47
50
|
value: l.label,
|
|
48
|
-
onChange: (e) =>
|
|
51
|
+
onChange: (e) => s({ label: e }, `Rename ${n}`, !0)
|
|
49
52
|
}
|
|
50
53
|
) }),
|
|
51
54
|
/* @__PURE__ */ t(d, { k: "group.icon", label: "Icon", effect: "Shown before the section title.", children: /* @__PURE__ */ t(
|
|
52
|
-
|
|
55
|
+
ce,
|
|
53
56
|
{
|
|
54
57
|
className: "h-8 rounded-md border-slate-200 bg-white px-2.5 text-[13px] hover:bg-white dark:border-border dark:bg-background dark:hover:bg-background",
|
|
55
58
|
value: l.icon ?? "",
|
|
56
|
-
onChange: (e) =>
|
|
59
|
+
onChange: (e) => s({ icon: e || null }, `Change the icon of ${n}`)
|
|
57
60
|
}
|
|
58
61
|
) }),
|
|
59
62
|
/* @__PURE__ */ t(
|
|
@@ -61,60 +64,60 @@ function Te({ group: l, readOnly: p }) {
|
|
|
61
64
|
{
|
|
62
65
|
k: "group.type",
|
|
63
66
|
label: "Kind",
|
|
64
|
-
effect:
|
|
67
|
+
effect: i === "container" && L.length ? "Move its tabs out before changing what this is." : P && !l.parent_key ? "What this part of the form is. To make it a tabs holder or a text block, move its fields out first." : "What this part of the form is.",
|
|
65
68
|
children: /* @__PURE__ */ t(
|
|
66
|
-
|
|
69
|
+
F,
|
|
67
70
|
{
|
|
68
71
|
ariaLabel: "Kind",
|
|
69
|
-
disabled:
|
|
70
|
-
value:
|
|
71
|
-
options:
|
|
72
|
+
disabled: i === "container" && L.length > 0,
|
|
73
|
+
value: i,
|
|
74
|
+
options: V,
|
|
72
75
|
onChange: (e) => {
|
|
73
|
-
var
|
|
74
|
-
return
|
|
76
|
+
var a;
|
|
77
|
+
return s(
|
|
75
78
|
e === "container" ? { type: e, tab_mode: l.tab_mode ?? "tabs" } : { type: e },
|
|
76
|
-
`Make ${
|
|
79
|
+
`Make ${n} a ${(a = T[e]) == null ? void 0 : a.toLowerCase()}`
|
|
77
80
|
);
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
)
|
|
81
84
|
}
|
|
82
85
|
),
|
|
83
|
-
|
|
86
|
+
i === "container" && /* @__PURE__ */ t(
|
|
84
87
|
d,
|
|
85
88
|
{
|
|
86
89
|
k: "group.tab_mode",
|
|
87
90
|
label: "Show its tabs as",
|
|
88
91
|
effect: "Steps walk people through in order.",
|
|
89
92
|
children: /* @__PURE__ */ t(
|
|
90
|
-
|
|
93
|
+
y,
|
|
91
94
|
{
|
|
92
95
|
value: l.tab_mode === "steps" ? "steps" : "tabs",
|
|
93
96
|
options: [
|
|
94
97
|
{ value: "tabs", label: "Tabs" },
|
|
95
98
|
{ value: "steps", label: "Steps" }
|
|
96
99
|
],
|
|
97
|
-
onChange: (e) =>
|
|
100
|
+
onChange: (e) => s({ tab_mode: e }, `Show ${n} as ${e}`)
|
|
98
101
|
}
|
|
99
102
|
)
|
|
100
103
|
}
|
|
101
104
|
),
|
|
102
|
-
|
|
105
|
+
i === "tab" && /* @__PURE__ */ t(
|
|
103
106
|
d,
|
|
104
107
|
{
|
|
105
108
|
k: "group.container_id",
|
|
106
109
|
label: "Sits in",
|
|
107
110
|
effect: "Tabs show inside a tabs or steps holder.",
|
|
108
111
|
children: /* @__PURE__ */ t(
|
|
109
|
-
|
|
112
|
+
F,
|
|
110
113
|
{
|
|
111
114
|
ariaLabel: "Sits in",
|
|
112
115
|
value: l.parent_key ?? "",
|
|
113
116
|
options: [
|
|
114
117
|
{ value: "", label: "The form itself" },
|
|
115
|
-
...
|
|
118
|
+
...Q.map((e) => ({ value: e.key, label: e.label || W(e.key) }))
|
|
116
119
|
],
|
|
117
|
-
onChange: (e) =>
|
|
120
|
+
onChange: (e) => o.apply(
|
|
118
121
|
[
|
|
119
122
|
{
|
|
120
123
|
op: "group_move",
|
|
@@ -123,23 +126,42 @@ function Te({ group: l, readOnly: p }) {
|
|
|
123
126
|
index: Number.MAX_SAFE_INTEGER
|
|
124
127
|
}
|
|
125
128
|
],
|
|
126
|
-
{ label: e ? `Move ${
|
|
129
|
+
{ label: e ? `Move ${n} into a holder` : `Move ${n} out of its holder` }
|
|
127
130
|
)
|
|
128
131
|
}
|
|
129
132
|
)
|
|
130
133
|
}
|
|
131
134
|
),
|
|
132
|
-
(
|
|
133
|
-
|
|
135
|
+
(i === "section" || i === "metadata") && /* @__PURE__ */ t(
|
|
136
|
+
g,
|
|
134
137
|
{
|
|
135
138
|
k: "group.is_collapsed",
|
|
136
139
|
label: "Starts collapsed",
|
|
137
140
|
effect: "The section opens folded; people unfold it.",
|
|
138
141
|
checked: l.is_collapsed,
|
|
139
|
-
onChange: (e) =>
|
|
142
|
+
onChange: (e) => s({ is_collapsed: e }, e ? `Collapse ${n}` : `Expand ${n}`)
|
|
140
143
|
}
|
|
141
144
|
),
|
|
142
|
-
|
|
145
|
+
(i === "section" || i === "metadata") && /* @__PURE__ */ t(
|
|
146
|
+
g,
|
|
147
|
+
{
|
|
148
|
+
k: "group.load_on_open",
|
|
149
|
+
label: "Load when opened",
|
|
150
|
+
effect: l.is_collapsed || M ? "Its pickers, grids and widgets load only once someone opens it; a lighter open for every record." : "Turn on Starts collapsed first: an open section loads straight away.",
|
|
151
|
+
checked: R,
|
|
152
|
+
disabled: !R && !l.is_collapsed && !M,
|
|
153
|
+
onChange: (e) => o.apply(
|
|
154
|
+
[
|
|
155
|
+
{
|
|
156
|
+
op: "layout_update",
|
|
157
|
+
patch: ie(o.bundle.layout.conditions, l.key, e)
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
{ label: e ? `Load ${n} when opened` : `Load ${n} with the form` }
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
i === "content" && /* @__PURE__ */ r(I, { children: [
|
|
143
165
|
/* @__PURE__ */ t(
|
|
144
166
|
d,
|
|
145
167
|
{
|
|
@@ -147,7 +169,7 @@ function Te({ group: l, readOnly: p }) {
|
|
|
147
169
|
label: "Style",
|
|
148
170
|
effect: "Note and Warning are coloured boxes; Divider is a line with the text.",
|
|
149
171
|
children: /* @__PURE__ */ t(
|
|
150
|
-
|
|
172
|
+
y,
|
|
151
173
|
{
|
|
152
174
|
value: l.content_tone ?? "info",
|
|
153
175
|
options: [
|
|
@@ -155,21 +177,21 @@ function Te({ group: l, readOnly: p }) {
|
|
|
155
177
|
{ value: "warn", label: "Warning" },
|
|
156
178
|
{ value: "divider", label: "Divider" }
|
|
157
179
|
],
|
|
158
|
-
onChange: (e) =>
|
|
180
|
+
onChange: (e) => s({ content_tone: e }, `Change the style of ${n}`)
|
|
159
181
|
}
|
|
160
182
|
)
|
|
161
183
|
}
|
|
162
184
|
),
|
|
163
185
|
/* @__PURE__ */ t(d, { k: "group.content", label: "Text", effect: "The words this block shows on the form.", children: /* @__PURE__ */ t(
|
|
164
|
-
|
|
186
|
+
Y,
|
|
165
187
|
{
|
|
166
188
|
ariaLabel: "Text",
|
|
167
189
|
value: l.content ?? "",
|
|
168
|
-
onChange: (e) =>
|
|
190
|
+
onChange: (e) => s({ content: e || null }, `Edit the text of ${n}`, !0)
|
|
169
191
|
}
|
|
170
192
|
) })
|
|
171
193
|
] }),
|
|
172
|
-
(
|
|
194
|
+
(i === "section" || i === "tab") && /* @__PURE__ */ r(I, { children: [
|
|
173
195
|
/* @__PURE__ */ t(
|
|
174
196
|
d,
|
|
175
197
|
{
|
|
@@ -177,36 +199,36 @@ function Te({ group: l, readOnly: p }) {
|
|
|
177
199
|
label: "Intro",
|
|
178
200
|
effect: "A short note at the top: what to fill in here and why. Empty shows none.",
|
|
179
201
|
children: /* @__PURE__ */ t(
|
|
180
|
-
|
|
202
|
+
Y,
|
|
181
203
|
{
|
|
182
204
|
ariaLabel: "Intro",
|
|
183
205
|
value: l.content ?? "",
|
|
184
|
-
onChange: (e) =>
|
|
206
|
+
onChange: (e) => s({ content: e || null }, `Edit the intro of ${n}`, !0)
|
|
185
207
|
}
|
|
186
208
|
)
|
|
187
209
|
}
|
|
188
210
|
),
|
|
189
|
-
!!((
|
|
211
|
+
!!((B = l.content) != null && B.trim()) && /* @__PURE__ */ t(
|
|
190
212
|
d,
|
|
191
213
|
{
|
|
192
214
|
k: "group.content_tone",
|
|
193
215
|
label: "Intro style",
|
|
194
216
|
effect: "Note is a quiet box; Warning is amber.",
|
|
195
217
|
children: /* @__PURE__ */ t(
|
|
196
|
-
|
|
218
|
+
y,
|
|
197
219
|
{
|
|
198
220
|
value: l.content_tone === "warn" ? "warn" : "info",
|
|
199
221
|
options: [
|
|
200
222
|
{ value: "info", label: "Note" },
|
|
201
223
|
{ value: "warn", label: "Warning" }
|
|
202
224
|
],
|
|
203
|
-
onChange: (e) =>
|
|
225
|
+
onChange: (e) => s({ content_tone: e }, `Change the intro style of ${n}`)
|
|
204
226
|
}
|
|
205
227
|
)
|
|
206
228
|
}
|
|
207
229
|
)
|
|
208
230
|
] }),
|
|
209
|
-
|
|
231
|
+
v && /* @__PURE__ */ r(I, { children: [
|
|
210
232
|
/* @__PURE__ */ t(
|
|
211
233
|
d,
|
|
212
234
|
{
|
|
@@ -214,7 +236,7 @@ function Te({ group: l, readOnly: p }) {
|
|
|
214
236
|
label: "Show",
|
|
215
237
|
effect: "On new records, existing ones or both.",
|
|
216
238
|
children: /* @__PURE__ */ t(
|
|
217
|
-
|
|
239
|
+
y,
|
|
218
240
|
{
|
|
219
241
|
value: l.visibility_mode ?? "always",
|
|
220
242
|
options: [
|
|
@@ -222,19 +244,19 @@ function Te({ group: l, readOnly: p }) {
|
|
|
222
244
|
{ value: "new_only", label: "New records" },
|
|
223
245
|
{ value: "existing_only", label: "Existing" }
|
|
224
246
|
],
|
|
225
|
-
onChange: (e) =>
|
|
247
|
+
onChange: (e) => s({ visibility_mode: e }, `Change when ${n} shows`)
|
|
226
248
|
}
|
|
227
249
|
)
|
|
228
250
|
}
|
|
229
251
|
),
|
|
230
252
|
/* @__PURE__ */ t(
|
|
231
|
-
|
|
253
|
+
g,
|
|
232
254
|
{
|
|
233
255
|
k: "group.hide_when_empty",
|
|
234
256
|
label: "Hide when all its fields are empty",
|
|
235
257
|
effect: "The section disappears while none of its fields has a value.",
|
|
236
258
|
checked: l.hide_when_empty,
|
|
237
|
-
onChange: (e) =>
|
|
259
|
+
onChange: (e) => s({ hide_when_empty: e }, `Change when ${n} hides`)
|
|
238
260
|
}
|
|
239
261
|
),
|
|
240
262
|
/* @__PURE__ */ t(
|
|
@@ -244,7 +266,7 @@ function Te({ group: l, readOnly: p }) {
|
|
|
244
266
|
label: "Width when reading",
|
|
245
267
|
effect: "On the read view, summary and detail panels. Automatic: half for a short list, full for grids.",
|
|
246
268
|
children: /* @__PURE__ */ t(
|
|
247
|
-
|
|
269
|
+
y,
|
|
248
270
|
{
|
|
249
271
|
value: l.read_width ?? "",
|
|
250
272
|
options: [
|
|
@@ -253,13 +275,87 @@ function Te({ group: l, readOnly: p }) {
|
|
|
253
275
|
{ value: "half", label: "½" },
|
|
254
276
|
{ value: "third", label: "⅓" }
|
|
255
277
|
],
|
|
256
|
-
onChange: (e) =>
|
|
278
|
+
onChange: (e) => s({ read_width: e || null }, `Change the read width of ${n}`)
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ t(
|
|
284
|
+
d,
|
|
285
|
+
{
|
|
286
|
+
k: "group.empty_text",
|
|
287
|
+
label: "When nothing is filled",
|
|
288
|
+
effect: "Shown in the read view and the PDF instead of empty values, such as “No shipping details yet”. Empty: the values show as dashes.",
|
|
289
|
+
children: /* @__PURE__ */ t(
|
|
290
|
+
S,
|
|
291
|
+
{
|
|
292
|
+
ariaLabel: "When nothing is filled",
|
|
293
|
+
value: w.emptyText ?? "",
|
|
294
|
+
placeholder: "No details yet",
|
|
295
|
+
onChange: (e) => o.apply([pe(l, e)], {
|
|
296
|
+
label: `Change the empty text of ${n}`,
|
|
297
|
+
text: !0
|
|
298
|
+
})
|
|
257
299
|
}
|
|
258
300
|
)
|
|
259
301
|
}
|
|
302
|
+
),
|
|
303
|
+
i === "section" && !l.parent_key && /* @__PURE__ */ t(
|
|
304
|
+
g,
|
|
305
|
+
{
|
|
306
|
+
k: "group.sticky",
|
|
307
|
+
label: "Stick to the top",
|
|
308
|
+
effect: "Stays at the top of the form while people scroll the rest, for totals or status. One section per form; not on phones.",
|
|
309
|
+
checked: w.sticky,
|
|
310
|
+
onChange: (e) => {
|
|
311
|
+
const a = fe(o.bundle, l.key, e);
|
|
312
|
+
a.ok && o.apply(a.ops, { label: a.label });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
260
315
|
)
|
|
261
316
|
] }),
|
|
262
|
-
|
|
317
|
+
(i === "section" || i === "tab") && /* @__PURE__ */ t($, { title: "Side by side", children: /* @__PURE__ */ t(
|
|
318
|
+
d,
|
|
319
|
+
{
|
|
320
|
+
k: "group.row_groups",
|
|
321
|
+
label: "Rows of fields",
|
|
322
|
+
effect: "Short fields that share one row under one label, like Street / City / Zip. To add one, select the fields on the form, right-click and pick Put side by side.",
|
|
323
|
+
children: w.rows.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "No rows yet." }) : /* @__PURE__ */ t("div", { className: "space-y-2", children: w.rows.map((e) => /* @__PURE__ */ r("div", { className: "space-y-1", "data-row-group-setting": e.key, children: [
|
|
324
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
|
|
325
|
+
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ t(
|
|
326
|
+
S,
|
|
327
|
+
{
|
|
328
|
+
ariaLabel: `Label of the row ${e.label}`,
|
|
329
|
+
value: e.label,
|
|
330
|
+
onChange: (a) => {
|
|
331
|
+
const c = X(o.bundle, l.key, e.key, { label: a });
|
|
332
|
+
c.ok && o.apply(c.ops, { label: c.label, text: !0 });
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
) }),
|
|
336
|
+
/* @__PURE__ */ t(
|
|
337
|
+
"button",
|
|
338
|
+
{
|
|
339
|
+
type: "button",
|
|
340
|
+
onClick: () => {
|
|
341
|
+
const a = X(o.bundle, l.key, e.key, null);
|
|
342
|
+
a.ok && o.apply(a.ops, { label: a.label });
|
|
343
|
+
},
|
|
344
|
+
className: "shrink-0 rounded-md px-2 py-1 text-[12px] text-slate-600 hover:bg-muted hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",
|
|
345
|
+
children: "Take apart"
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ t("p", { className: "truncate text-[12px] text-slate-500 dark:text-muted-foreground", children: e.fields.map((a) => {
|
|
350
|
+
const c = o.bundle.placements.find(
|
|
351
|
+
(N) => N.field === a && N.group_key === l.key
|
|
352
|
+
) ?? null;
|
|
353
|
+
return Z(a, m, f, c).label;
|
|
354
|
+
}).join(" · ") })
|
|
355
|
+
] }, e.key)) })
|
|
356
|
+
}
|
|
357
|
+
) }),
|
|
358
|
+
i === "tab" && /* @__PURE__ */ r($, { title: "As a step", children: [
|
|
263
359
|
/* @__PURE__ */ t(
|
|
264
360
|
d,
|
|
265
361
|
{
|
|
@@ -267,17 +363,17 @@ function Te({ group: l, readOnly: p }) {
|
|
|
267
363
|
label: "Skip as the first step when filled",
|
|
268
364
|
effect: "Opens on a later step when these fields already have values.",
|
|
269
365
|
children: /* @__PURE__ */ t(
|
|
270
|
-
|
|
366
|
+
be,
|
|
271
367
|
{
|
|
272
368
|
ariaLabel: "Skip as the first step when filled",
|
|
273
|
-
value:
|
|
274
|
-
options:
|
|
275
|
-
onChange: (e) =>
|
|
369
|
+
value: k(l.skip_if_filled),
|
|
370
|
+
options: D,
|
|
371
|
+
onChange: (e) => s({ skip_if_filled: _(e) }, `Change when ${n} is skipped`)
|
|
276
372
|
}
|
|
277
373
|
)
|
|
278
374
|
}
|
|
279
375
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ r(
|
|
281
377
|
d,
|
|
282
378
|
{
|
|
283
379
|
k: "group.visible_when",
|
|
@@ -285,32 +381,32 @@ function Te({ group: l, readOnly: p }) {
|
|
|
285
381
|
effect: "The step shows only while every condition holds. No conditions: always.",
|
|
286
382
|
children: [
|
|
287
383
|
/* @__PURE__ */ t(
|
|
288
|
-
|
|
384
|
+
ye,
|
|
289
385
|
{
|
|
290
|
-
value:
|
|
291
|
-
fields:
|
|
386
|
+
value: ee,
|
|
387
|
+
fields: D,
|
|
292
388
|
onChange: (e) => {
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
JSON.stringify(
|
|
389
|
+
K(e);
|
|
390
|
+
const a = e.filter((c) => c.field);
|
|
391
|
+
JSON.stringify(a) !== C && s({ visible_when: _(a) }, `Change when ${n} shows`, !0);
|
|
296
392
|
}
|
|
297
393
|
}
|
|
298
394
|
),
|
|
299
395
|
/* @__PURE__ */ t(
|
|
300
|
-
|
|
396
|
+
se,
|
|
301
397
|
{
|
|
302
|
-
layoutId: Number(
|
|
398
|
+
layoutId: Number(o.bundle.layout.id),
|
|
303
399
|
target: { kind: "step", group: l.key },
|
|
304
|
-
bundle:
|
|
305
|
-
apply: (e,
|
|
306
|
-
disabled:
|
|
400
|
+
bundle: o.bundle,
|
|
401
|
+
apply: (e, a) => o.apply(e, a),
|
|
402
|
+
disabled: u
|
|
307
403
|
}
|
|
308
404
|
)
|
|
309
405
|
]
|
|
310
406
|
}
|
|
311
407
|
)
|
|
312
408
|
] }),
|
|
313
|
-
|
|
409
|
+
v && /* @__PURE__ */ r($, { title: "Who", children: [
|
|
314
410
|
/* @__PURE__ */ t(
|
|
315
411
|
d,
|
|
316
412
|
{
|
|
@@ -318,10 +414,10 @@ function Te({ group: l, readOnly: p }) {
|
|
|
318
414
|
label: "Hidden for",
|
|
319
415
|
effect: "People in these roles do not see it. Admins always do.",
|
|
320
416
|
children: /* @__PURE__ */ t(
|
|
321
|
-
|
|
417
|
+
q,
|
|
322
418
|
{
|
|
323
|
-
roleIds:
|
|
324
|
-
onRoleIdsChange: (e) =>
|
|
419
|
+
roleIds: k(l.hidden_for_roles),
|
|
420
|
+
onRoleIdsChange: (e) => s({ hidden_for_roles: _(e) }, `Change who sees ${n}`)
|
|
325
421
|
}
|
|
326
422
|
)
|
|
327
423
|
}
|
|
@@ -333,69 +429,69 @@ function Te({ group: l, readOnly: p }) {
|
|
|
333
429
|
label: "Read-only for",
|
|
334
430
|
effect: "People in these roles cannot change it; the server drops their writes. Admins are exempt.",
|
|
335
431
|
children: /* @__PURE__ */ t(
|
|
336
|
-
|
|
432
|
+
q,
|
|
337
433
|
{
|
|
338
|
-
roleIds:
|
|
339
|
-
onRoleIdsChange: (e) =>
|
|
434
|
+
roleIds: k(l.locked_for_roles),
|
|
435
|
+
onRoleIdsChange: (e) => s({ locked_for_roles: _(e) }, `Change who can edit ${n}`)
|
|
340
436
|
}
|
|
341
437
|
)
|
|
342
438
|
}
|
|
343
439
|
)
|
|
344
440
|
] }),
|
|
345
|
-
|
|
441
|
+
v && /* @__PURE__ */ r($, { title: "When collapsed", children: [
|
|
346
442
|
/* @__PURE__ */ t(
|
|
347
443
|
d,
|
|
348
444
|
{
|
|
349
445
|
k: "group.summary_fields",
|
|
350
446
|
label: "Show these values in the heading",
|
|
351
447
|
effect: "A short summary while the section is closed.",
|
|
352
|
-
children:
|
|
448
|
+
children: j.length === 0 ? /* @__PURE__ */ r("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: [
|
|
353
449
|
"Place fields in ",
|
|
354
|
-
|
|
450
|
+
n,
|
|
355
451
|
" first."
|
|
356
|
-
] }) : /* @__PURE__ */ t("div", { className: "space-y-1.5", children:
|
|
357
|
-
const
|
|
358
|
-
|
|
452
|
+
] }) : /* @__PURE__ */ t("div", { className: "space-y-1.5", children: j.map((e) => {
|
|
453
|
+
const a = x.find((h) => h.field === e), c = ke(e, f) === "O2M", N = o.bundle.placements.find((h) => h.field === e) ?? null, O = Z(e, m, f, N).label, E = (h, b, le) => G(
|
|
454
|
+
x.map((A) => A.field === e ? { ...A, ...h } : A),
|
|
359
455
|
b,
|
|
360
|
-
|
|
456
|
+
le
|
|
361
457
|
);
|
|
362
|
-
return /* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
459
|
+
/* @__PURE__ */ r("label", { className: "flex items-center gap-2 text-[12px]", children: [
|
|
364
460
|
/* @__PURE__ */ t(
|
|
365
461
|
"input",
|
|
366
462
|
{
|
|
367
463
|
type: "checkbox",
|
|
368
|
-
checked: !!
|
|
369
|
-
onChange: (
|
|
370
|
-
|
|
371
|
-
`Change the summary of ${
|
|
464
|
+
checked: !!a,
|
|
465
|
+
onChange: (h) => G(
|
|
466
|
+
h.target.checked ? [...x, c ? { field: e, agg: "count" } : { field: e }] : x.filter((b) => b.field !== e),
|
|
467
|
+
`Change the summary of ${n}`
|
|
372
468
|
),
|
|
373
469
|
className: "h-3.5 w-3.5 accent-nvr-cyan"
|
|
374
470
|
}
|
|
375
471
|
),
|
|
376
|
-
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children:
|
|
377
|
-
|
|
472
|
+
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children: O }),
|
|
473
|
+
c && /* @__PURE__ */ t("span", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "list" })
|
|
378
474
|
] }),
|
|
379
|
-
|
|
475
|
+
a && /* @__PURE__ */ r("div", { className: "space-y-1 pl-5", children: [
|
|
380
476
|
/* @__PURE__ */ t("div", { "data-setting": "group.summary_fields.label", children: /* @__PURE__ */ t(
|
|
381
|
-
|
|
477
|
+
S,
|
|
382
478
|
{
|
|
383
|
-
ariaLabel: `Label for ${
|
|
384
|
-
value:
|
|
385
|
-
placeholder: `Label (${
|
|
386
|
-
onChange: (
|
|
387
|
-
{ label:
|
|
388
|
-
`Change the summary of ${
|
|
479
|
+
ariaLabel: `Label for ${O}`,
|
|
480
|
+
value: a.label ?? "",
|
|
481
|
+
placeholder: `Label (${O})`,
|
|
482
|
+
onChange: (h) => E(
|
|
483
|
+
{ label: h || null },
|
|
484
|
+
`Change the summary of ${n}`,
|
|
389
485
|
!0
|
|
390
486
|
)
|
|
391
487
|
}
|
|
392
488
|
) }),
|
|
393
|
-
|
|
489
|
+
c && /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
|
|
394
490
|
/* @__PURE__ */ t("div", { className: "flex-1", "data-setting": "group.summary_fields.agg", children: /* @__PURE__ */ t(
|
|
395
|
-
|
|
491
|
+
F,
|
|
396
492
|
{
|
|
397
493
|
ariaLabel: "Show",
|
|
398
|
-
value:
|
|
494
|
+
value: a.agg ?? "count",
|
|
399
495
|
options: [
|
|
400
496
|
{ value: "count", label: "Count" },
|
|
401
497
|
{ value: "sum", label: "Sum" },
|
|
@@ -403,25 +499,25 @@ function Te({ group: l, readOnly: p }) {
|
|
|
403
499
|
{ value: "min", label: "Smallest" },
|
|
404
500
|
{ value: "max", label: "Largest" }
|
|
405
501
|
],
|
|
406
|
-
onChange: (
|
|
407
|
-
|
|
408
|
-
`Change the summary of ${
|
|
502
|
+
onChange: (h) => E(
|
|
503
|
+
h === "count" ? { agg: h, agg_field: void 0, field_options: void 0 } : { agg: h },
|
|
504
|
+
`Change the summary of ${n}`
|
|
409
505
|
)
|
|
410
506
|
}
|
|
411
507
|
) }),
|
|
412
|
-
(
|
|
508
|
+
(a.agg ?? "count") !== "count" && /* @__PURE__ */ t(
|
|
413
509
|
"div",
|
|
414
510
|
{
|
|
415
511
|
className: "flex-1",
|
|
416
512
|
"data-setting": "group.summary_fields.agg_field",
|
|
417
513
|
children: /* @__PURE__ */ t(
|
|
418
|
-
|
|
514
|
+
re,
|
|
419
515
|
{
|
|
420
|
-
relatedCollection:
|
|
421
|
-
value:
|
|
422
|
-
onChange: (
|
|
423
|
-
{ agg_field:
|
|
424
|
-
`Change the summary of ${
|
|
516
|
+
relatedCollection: _e(e, f),
|
|
517
|
+
value: a.agg_field ?? "",
|
|
518
|
+
onChange: (h, b) => E(
|
|
519
|
+
{ agg_field: h, field_options: b },
|
|
520
|
+
`Change the summary of ${n}`
|
|
425
521
|
)
|
|
426
522
|
}
|
|
427
523
|
)
|
|
@@ -434,46 +530,46 @@ function Te({ group: l, readOnly: p }) {
|
|
|
434
530
|
}
|
|
435
531
|
),
|
|
436
532
|
/* @__PURE__ */ t(
|
|
437
|
-
|
|
533
|
+
g,
|
|
438
534
|
{
|
|
439
535
|
k: "group.summary_hide_empty",
|
|
440
536
|
label: "Leave out empty values",
|
|
441
537
|
effect: "Fields without a value are left out of the summary line.",
|
|
442
538
|
checked: l.summary_hide_empty,
|
|
443
|
-
onChange: (e) =>
|
|
539
|
+
onChange: (e) => s({ summary_hide_empty: e }, `Change the summary of ${n}`)
|
|
444
540
|
}
|
|
445
541
|
)
|
|
446
542
|
] }),
|
|
447
|
-
|
|
448
|
-
|
|
543
|
+
v && /* @__PURE__ */ t(
|
|
544
|
+
de,
|
|
449
545
|
{
|
|
450
546
|
group: { id: l.id ?? 0, swap_config: l.swap_config },
|
|
451
|
-
allFields:
|
|
452
|
-
onGroupSettings: (e,
|
|
547
|
+
allFields: m.map((e) => ({ field: e.field, type: e.type ?? void 0 })),
|
|
548
|
+
onGroupSettings: (e, a) => s(a, `Change the field swap of ${n}`)
|
|
453
549
|
}
|
|
454
550
|
),
|
|
455
|
-
!
|
|
456
|
-
/* @__PURE__ */ t(
|
|
551
|
+
!u && /* @__PURE__ */ t(he, { bundle: o.bundle, collection: o.collection, group: l }),
|
|
552
|
+
/* @__PURE__ */ t(ve, { group: l }),
|
|
457
553
|
/* @__PURE__ */ t(
|
|
458
554
|
"div",
|
|
459
555
|
{
|
|
460
556
|
"data-setting": "group.delete",
|
|
461
557
|
className: "border-t border-slate-200 pt-3 dark:border-border",
|
|
462
|
-
children:
|
|
463
|
-
/* @__PURE__ */
|
|
558
|
+
children: te ? /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md border border-red-200 bg-red-50 p-2.5 text-[12px] text-red-900 dark:border-red-800/60 dark:bg-red-950/30 dark:text-red-100", children: [
|
|
559
|
+
/* @__PURE__ */ r("p", { children: [
|
|
464
560
|
"Delete ",
|
|
465
|
-
|
|
561
|
+
n,
|
|
466
562
|
"? Its fields move to the top of the form",
|
|
467
|
-
|
|
563
|
+
L.length ? " and its tabs move out" : "",
|
|
468
564
|
". Undo brings it back."
|
|
469
565
|
] }),
|
|
470
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
471
567
|
/* @__PURE__ */ t(
|
|
472
568
|
"button",
|
|
473
569
|
{
|
|
474
570
|
type: "button",
|
|
475
|
-
onClick: () =>
|
|
476
|
-
label: `Delete ${
|
|
571
|
+
onClick: () => o.apply([{ op: "group_remove", key: l.key, placements: "ungroup" }], {
|
|
572
|
+
label: `Delete ${n}`
|
|
477
573
|
}),
|
|
478
574
|
className: "rounded-md bg-red-600 px-2.5 py-1 text-[12px] font-medium text-white hover:bg-red-700",
|
|
479
575
|
children: "Delete"
|
|
@@ -483,21 +579,21 @@ function Te({ group: l, readOnly: p }) {
|
|
|
483
579
|
"button",
|
|
484
580
|
{
|
|
485
581
|
type: "button",
|
|
486
|
-
onClick: () =>
|
|
582
|
+
onClick: () => z(!1),
|
|
487
583
|
className: "rounded-md px-2.5 py-1 text-[12px] hover:bg-red-100 dark:hover:bg-red-900/40",
|
|
488
584
|
children: "Keep"
|
|
489
585
|
}
|
|
490
586
|
)
|
|
491
587
|
] })
|
|
492
|
-
] }) : /* @__PURE__ */
|
|
588
|
+
] }) : /* @__PURE__ */ r(
|
|
493
589
|
"button",
|
|
494
590
|
{
|
|
495
591
|
type: "button",
|
|
496
|
-
onClick: () =>
|
|
592
|
+
onClick: () => z(!0),
|
|
497
593
|
className: "text-[12px] text-red-600 hover:underline dark:text-red-400",
|
|
498
594
|
children: [
|
|
499
595
|
"Delete ",
|
|
500
|
-
((
|
|
596
|
+
((H = T[i]) == null ? void 0 : H.toLowerCase()) ?? "section"
|
|
501
597
|
]
|
|
502
598
|
}
|
|
503
599
|
)
|
|
@@ -506,5 +602,5 @@ function Te({ group: l, readOnly: p }) {
|
|
|
506
602
|
] });
|
|
507
603
|
}
|
|
508
604
|
export {
|
|
509
|
-
|
|
605
|
+
je as GroupInspector
|
|
510
606
|
};
|