@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,98 +1,99 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ChevronLeft as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useNivaroClient as
|
|
5
|
-
import { useDebounced as
|
|
6
|
-
import { useRelationOptions as
|
|
7
|
-
import { cn as h } from "../../lib/utils.js";
|
|
8
|
-
import { useOverflowTip as
|
|
9
|
-
import { Popover as
|
|
10
|
-
import { SimpleSelect as
|
|
11
|
-
import { AiChangeCheck as
|
|
12
|
-
import { ShareButton as
|
|
13
|
-
import { HistoryPanel as
|
|
14
|
-
import { useRuleChoiceLabels as
|
|
15
|
-
import { rowPill as
|
|
16
|
-
import { ScheduleChange as
|
|
17
|
-
import { barIconBtn as
|
|
18
|
-
import { unsavedText as
|
|
19
|
-
const
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as de, Undo2 as ie, Redo2 as ce, Wrench as me, Sparkles as he, History as pe, MoreHorizontal as ue, Save as _, GitCompare as be, ChevronDown as q, Eye as G, X as xe } from "lucide-react";
|
|
3
|
+
import { useState as I, useMemo as ve, useCallback as ge } from "react";
|
|
4
|
+
import { useNivaroClient as we } from "../../context.js";
|
|
5
|
+
import { useDebounced as fe } from "../../hooks/useDebounced.js";
|
|
6
|
+
import { useRelationOptions as ke } from "../../hooks/useRelationOptions.js";
|
|
7
|
+
import { titleCase as Ne, cn as h } from "../../lib/utils.js";
|
|
8
|
+
import { useOverflowTip as ye } from "../TipLayer.js";
|
|
9
|
+
import { Popover as K, PopoverTrigger as Q, PopoverContent as V } from "../ui/popover.js";
|
|
10
|
+
import { SimpleSelect as Ce } from "../ui/SimpleSelect.js";
|
|
11
|
+
import { AiChangeCheck as Se } from "./ai/ChangeCheck.js";
|
|
12
|
+
import { ShareButton as Oe, WatchButton as Re } from "./collab/FormFollowShare.js";
|
|
13
|
+
import { HistoryPanel as Ae } from "./HistoryPanel.js";
|
|
14
|
+
import { useRuleChoiceLabels as Pe, useDisplayTemplate as Te, useRoleNames as Be } from "./overview/overview-api.js";
|
|
15
|
+
import { rowPill as Le, purposeSegments as Ue, TYPE_USE as J, Pill as Me, Sentence as $e } from "./overview/purpose.js";
|
|
16
|
+
import { ScheduleChange as je } from "./ScheduleChange.js";
|
|
17
|
+
import { barIconBtn as E, BarMenu as A, barIconOn as Ee, MenuSeparator as H, ToolButton as X, barBtnOn as He, barBtn as De } from "./toolbar-kit.js";
|
|
18
|
+
import { unsavedText as W } from "./UnsavedConfirm.js";
|
|
19
|
+
const Ie = "h-8 w-full rounded-md border border-slate-200 bg-white px-2.5 text-[12.5px] text-slate-800 outline-none placeholder:text-slate-400 focus:border-nvr-cyan dark:border-border dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground", Y = "mb-1 block text-[11.5px] font-semibold text-slate-600 dark:text-muted-foreground", We = `
|
|
20
20
|
[data-editor-topbar]{container-type:inline-size;container-name:letb}
|
|
21
21
|
@container letb (max-width: 1499px){[data-editor-topbar] [data-tb-sentence]{display:none}}
|
|
22
22
|
@container letb (max-width: 1399px){[data-editor-topbar] [data-tb-xwide]{display:none}}
|
|
23
23
|
@container letb (max-width: 1099px){[data-editor-topbar] [data-tb-wide],[data-editor-topbar] [data-tb-menu-label]{display:none}}
|
|
24
24
|
@container letb (min-width: 1100px){[data-editor-topbar] [data-tb-name]{min-width:140px}}
|
|
25
25
|
`;
|
|
26
|
-
function
|
|
26
|
+
function Ze({
|
|
27
27
|
draft: i,
|
|
28
|
-
onOpen: a
|
|
28
|
+
onOpen: a,
|
|
29
|
+
pendingTip: c
|
|
29
30
|
}) {
|
|
30
|
-
const { status:
|
|
31
|
+
const { status: n, error: s } = i, l = i.unsavedCount ?? 0, t = l > 0 && (n === "idle" || n === "saved"), m = n === "saving" ? "Saving…" : n === "error" ? s ?? "Not saved" : n === "conflict" ? l > 0 ? "Not saved — someone else saved" : "Reloaded — someone else saved" : t ? W(l) : "Saved", u = /* @__PURE__ */ r(
|
|
31
32
|
"span",
|
|
32
33
|
{
|
|
33
34
|
role: "status",
|
|
34
|
-
"data-save-status":
|
|
35
|
-
"data-unsaved":
|
|
36
|
-
"data-tip": (
|
|
35
|
+
"data-save-status": n,
|
|
36
|
+
"data-unsaved": l,
|
|
37
|
+
"data-tip": (n === "error" || n === "conflict") && s ? s : t ? c ?? "Only you see these changes until you save (⌘S)" : void 0,
|
|
37
38
|
className: h(
|
|
38
39
|
"inline-flex max-w-[180px] shrink-0 items-center gap-1 whitespace-nowrap rounded-full px-2 py-px text-[11px] font-semibold",
|
|
39
|
-
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
n === "saving" && "bg-slate-100 text-slate-600 dark:bg-muted dark:text-muted-foreground",
|
|
41
|
+
(n === "saved" || n === "idle") && !t && "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
|
|
42
|
+
t && "bg-nvr-cyan/10 text-slate-700 dark:text-foreground",
|
|
43
|
+
n === "error" && "bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300",
|
|
44
|
+
n === "conflict" && "bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300"
|
|
44
45
|
),
|
|
45
46
|
children: [
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children:
|
|
47
|
+
t && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan" }),
|
|
48
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: m })
|
|
48
49
|
]
|
|
49
50
|
}
|
|
50
51
|
);
|
|
51
|
-
return !
|
|
52
|
+
return !t || !a ? u : /* @__PURE__ */ e(
|
|
52
53
|
"button",
|
|
53
54
|
{
|
|
54
55
|
type: "button",
|
|
55
56
|
"data-unsaved-list-open": "",
|
|
56
|
-
"aria-label": `${
|
|
57
|
+
"aria-label": `${W(l)} — list them`,
|
|
57
58
|
onClick: (b) => a(b.currentTarget),
|
|
58
59
|
className: "inline-flex rounded-full transition-opacity hover:opacity-80",
|
|
59
|
-
children:
|
|
60
|
+
children: u
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function Fe({
|
|
64
65
|
icon: i,
|
|
65
66
|
label: a,
|
|
66
|
-
hint:
|
|
67
|
-
on:
|
|
67
|
+
hint: c,
|
|
68
|
+
on: n,
|
|
68
69
|
onChange: s,
|
|
69
|
-
data:
|
|
70
|
+
data: l
|
|
70
71
|
}) {
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ r("div", { className: "flex items-start gap-2 text-[12.5px] text-slate-700 dark:text-foreground", children: [
|
|
72
73
|
/* @__PURE__ */ e("span", { className: "mt-0.5 text-slate-500 dark:text-muted-foreground", children: i }),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ r("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
74
75
|
/* @__PURE__ */ e("span", { className: "font-medium", children: a }),
|
|
75
|
-
/* @__PURE__ */ e("span", { className: "text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children:
|
|
76
|
+
/* @__PURE__ */ e("span", { className: "text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: c })
|
|
76
77
|
] }),
|
|
77
78
|
/* @__PURE__ */ e(
|
|
78
79
|
"button",
|
|
79
80
|
{
|
|
80
81
|
type: "button",
|
|
81
82
|
role: "switch",
|
|
82
|
-
"aria-checked":
|
|
83
|
+
"aria-checked": n,
|
|
83
84
|
"aria-label": a,
|
|
84
|
-
onClick: () => s(!
|
|
85
|
-
...
|
|
85
|
+
onClick: () => s(!n),
|
|
86
|
+
...l,
|
|
86
87
|
className: h(
|
|
87
88
|
"relative mt-0.5 h-4 w-7 shrink-0 rounded-full transition-colors",
|
|
88
|
-
|
|
89
|
+
n ? "bg-nvr-cyan" : "bg-slate-300 dark:bg-white/35"
|
|
89
90
|
),
|
|
90
91
|
children: /* @__PURE__ */ e(
|
|
91
92
|
"span",
|
|
92
93
|
{
|
|
93
94
|
className: h(
|
|
94
95
|
"absolute left-0 top-0.5 h-3 w-3 rounded-full bg-white shadow-sm transition-transform",
|
|
95
|
-
|
|
96
|
+
n ? "translate-x-3.5" : "translate-x-0.5"
|
|
96
97
|
)
|
|
97
98
|
}
|
|
98
99
|
)
|
|
@@ -100,48 +101,48 @@ function Ee({
|
|
|
100
101
|
)
|
|
101
102
|
] });
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function ze({
|
|
104
105
|
collection: i,
|
|
105
106
|
value: a,
|
|
106
|
-
onChange:
|
|
107
|
-
showHidden:
|
|
107
|
+
onChange: c,
|
|
108
|
+
showHidden: n,
|
|
108
109
|
onShowHidden: s,
|
|
109
|
-
extra:
|
|
110
|
+
extra: l
|
|
110
111
|
}) {
|
|
111
|
-
var y, C, S,
|
|
112
|
-
const t =
|
|
113
|
-
search:
|
|
112
|
+
var y, C, S, O;
|
|
113
|
+
const t = we(), [m, u] = I(!1), [b, P] = I(""), T = fe(b, 250), { data: g } = Te(i, m), { data: x = [] } = Be(!0), { options: k, loading: B } = ke(m ? t : null, i, {
|
|
114
|
+
search: T,
|
|
114
115
|
limit: 8,
|
|
115
|
-
displayTemplate:
|
|
116
|
-
enabled:
|
|
117
|
-
}),
|
|
116
|
+
displayTemplate: g ?? null,
|
|
117
|
+
enabled: m && g !== void 0
|
|
118
|
+
}), w = ((y = x.find((o) => o.id === a.roleId)) == null ? void 0 : y.name) ?? null, N = ((C = x.find((o) => o.id === a.compareRoleId)) == null ? void 0 : C.name) ?? null, L = [
|
|
118
119
|
(S = a.record) == null ? void 0 : S.label,
|
|
119
|
-
N &&
|
|
120
|
-
(
|
|
120
|
+
N && w ? `${w} | ${N}` : w,
|
|
121
|
+
(O = a.state) == null ? void 0 : O.label,
|
|
121
122
|
a.values && Object.keys(a.values).length > 0 ? "What if" : null,
|
|
122
123
|
a.device && a.device !== "desktop" ? a.device === "phone" ? "Phone" : "Tablet" : null,
|
|
123
124
|
a.who ? "Who sees" : null
|
|
124
125
|
].filter(Boolean).join(" · ") || "No record";
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */ e(
|
|
126
|
+
return /* @__PURE__ */ r(K, { open: m, onOpenChange: u, children: [
|
|
127
|
+
/* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ r(
|
|
127
128
|
"button",
|
|
128
129
|
{
|
|
129
130
|
type: "button",
|
|
130
|
-
className: h(
|
|
131
|
+
className: h(De, "min-w-[110px] max-w-[260px] shrink", m && He),
|
|
131
132
|
"aria-label": "Preview as",
|
|
132
133
|
"data-preview-as": "",
|
|
133
134
|
"data-tip": "Show the form with a real record’s values, as a role sees it",
|
|
134
135
|
children: [
|
|
135
|
-
/* @__PURE__ */ e(
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ e(G, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
137
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: [
|
|
137
138
|
"Preview",
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ r("span", { "data-tb-wide": "", children: [
|
|
139
140
|
":",
|
|
140
141
|
" ",
|
|
141
|
-
/* @__PURE__ */ e("span", { "data-preview-summary": "", className: "text-slate-500 dark:text-muted-foreground", children:
|
|
142
|
+
/* @__PURE__ */ e("span", { "data-preview-summary": "", className: "text-slate-500 dark:text-muted-foreground", children: L })
|
|
142
143
|
] })
|
|
143
144
|
] }),
|
|
144
|
-
|
|
145
|
+
n && /* @__PURE__ */ e(
|
|
145
146
|
"span",
|
|
146
147
|
{
|
|
147
148
|
"data-preview-hidden-on": "",
|
|
@@ -149,175 +150,182 @@ function He({
|
|
|
149
150
|
className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan"
|
|
150
151
|
}
|
|
151
152
|
),
|
|
152
|
-
/* @__PURE__ */ e(
|
|
153
|
+
/* @__PURE__ */ e(q, { className: "h-3 w-3 shrink-0 text-slate-500 dark:text-muted-foreground" })
|
|
153
154
|
]
|
|
154
155
|
}
|
|
155
156
|
) }),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
157
|
+
/* @__PURE__ */ r(
|
|
158
|
+
V,
|
|
158
159
|
{
|
|
159
160
|
align: "end",
|
|
160
161
|
className: "max-h-[min(80vh,640px)] w-[320px] overflow-y-auto overscroll-contain p-3",
|
|
161
162
|
children: [
|
|
162
|
-
/* @__PURE__ */ e("p", { className:
|
|
163
|
-
a.record ? /* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ e("p", { className: Y, children: "Record" }),
|
|
164
|
+
a.record ? /* @__PURE__ */ r("span", { className: "inline-flex max-w-full items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-slate-800 dark:text-foreground", children: [
|
|
164
165
|
/* @__PURE__ */ e("span", { className: "truncate", children: a.record.label }),
|
|
165
166
|
/* @__PURE__ */ e(
|
|
166
167
|
"button",
|
|
167
168
|
{
|
|
168
169
|
type: "button",
|
|
169
170
|
"aria-label": "Preview without a record",
|
|
170
|
-
onClick: () =>
|
|
171
|
+
onClick: () => c({ ...a, record: null }),
|
|
171
172
|
className: "text-slate-500 hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
|
|
172
|
-
children: /* @__PURE__ */ e(
|
|
173
|
+
children: /* @__PURE__ */ e(xe, { className: "h-3 w-3" })
|
|
173
174
|
}
|
|
174
175
|
)
|
|
175
|
-
] }) : /* @__PURE__ */
|
|
176
|
+
] }) : /* @__PURE__ */ r(D, { children: [
|
|
176
177
|
/* @__PURE__ */ e(
|
|
177
178
|
"input",
|
|
178
179
|
{
|
|
179
|
-
value:
|
|
180
|
+
value: b,
|
|
180
181
|
onChange: (o) => P(o.target.value),
|
|
181
182
|
placeholder: "Search records…",
|
|
182
183
|
"aria-label": "Search records",
|
|
183
|
-
className:
|
|
184
|
+
className: Ie
|
|
184
185
|
}
|
|
185
186
|
),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ r("div", { className: "mt-1 max-h-[220px] overflow-y-auto overscroll-contain", children: [
|
|
187
188
|
k.map((o) => /* @__PURE__ */ e(
|
|
188
189
|
"button",
|
|
189
190
|
{
|
|
190
191
|
type: "button",
|
|
191
|
-
onClick: () =>
|
|
192
|
+
onClick: () => c({ ...a, record: { id: String(o.id), label: o.label } }),
|
|
192
193
|
className: "block w-full truncate rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-foreground",
|
|
193
194
|
children: o.label
|
|
194
195
|
},
|
|
195
196
|
String(o.id)
|
|
196
197
|
)),
|
|
197
|
-
!
|
|
198
|
+
!B && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: "No records match." })
|
|
198
199
|
] })
|
|
199
200
|
] }),
|
|
200
|
-
/* @__PURE__ */ e("p", { className: h(
|
|
201
|
+
/* @__PURE__ */ e("p", { className: h(Y, "mt-3"), children: "As a role" }),
|
|
201
202
|
/* @__PURE__ */ e(
|
|
202
|
-
|
|
203
|
+
Ce,
|
|
203
204
|
{
|
|
204
205
|
value: a.roleId ?? "",
|
|
205
|
-
onChange: (o) =>
|
|
206
|
+
onChange: (o) => c({ ...a, roleId: o || null }),
|
|
206
207
|
ariaLabel: "Preview as role",
|
|
207
208
|
className: "h-8 text-[12.5px]",
|
|
208
209
|
options: [
|
|
209
210
|
{ value: "", label: "Any role" },
|
|
210
|
-
...
|
|
211
|
+
...x.map((o) => ({ value: o.id, label: o.name }))
|
|
211
212
|
]
|
|
212
213
|
}
|
|
213
214
|
),
|
|
214
215
|
/* @__PURE__ */ e("p", { className: "mt-2 text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: "The form shows this record’s values, steps and rules. Nothing you do here changes the record." }),
|
|
215
216
|
/* @__PURE__ */ e("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border", children: /* @__PURE__ */ e(
|
|
216
|
-
|
|
217
|
+
Fe,
|
|
217
218
|
{
|
|
218
|
-
icon: /* @__PURE__ */ e(
|
|
219
|
+
icon: /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5" }),
|
|
219
220
|
label: "Show hidden",
|
|
220
221
|
hint: "Fields and sections the preview would hide, faintly, so you can select them",
|
|
221
|
-
on:
|
|
222
|
+
on: n,
|
|
222
223
|
onChange: s,
|
|
223
224
|
data: { "data-show-hidden-switch": "" }
|
|
224
225
|
}
|
|
225
226
|
) }),
|
|
226
|
-
|
|
227
|
+
l
|
|
227
228
|
]
|
|
228
229
|
}
|
|
229
230
|
)
|
|
230
231
|
] });
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function it({
|
|
233
234
|
collection: i,
|
|
234
235
|
layoutId: a,
|
|
235
|
-
layoutName:
|
|
236
|
-
layoutType:
|
|
236
|
+
layoutName: c,
|
|
237
|
+
layoutType: n,
|
|
237
238
|
row: s,
|
|
238
|
-
fields:
|
|
239
|
+
fields: l,
|
|
239
240
|
draft: t,
|
|
240
|
-
preview:
|
|
241
|
-
onPreview:
|
|
242
|
-
showHidden:
|
|
241
|
+
preview: m,
|
|
242
|
+
onPreview: u,
|
|
243
|
+
showHidden: b,
|
|
243
244
|
onShowHidden: P,
|
|
244
|
-
onBack:
|
|
245
|
-
backLabel:
|
|
246
|
-
view:
|
|
245
|
+
onBack: T,
|
|
246
|
+
backLabel: g = "Forms",
|
|
247
|
+
view: x,
|
|
247
248
|
tools: k,
|
|
248
|
-
ai:
|
|
249
|
-
previewExtra:
|
|
249
|
+
ai: B,
|
|
250
|
+
previewExtra: w,
|
|
250
251
|
problems: N,
|
|
251
|
-
more:
|
|
252
|
+
more: L,
|
|
252
253
|
presence: y,
|
|
253
254
|
onOpenUnsaved: C,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
pendingTip: S,
|
|
256
|
+
onSelectField: O,
|
|
257
|
+
onShowOnCanvas: o,
|
|
258
|
+
onReviewChanges: Z,
|
|
259
|
+
reviewing: ee = !1,
|
|
260
|
+
testing: te,
|
|
261
|
+
beforeSave: ae
|
|
260
262
|
}) {
|
|
261
|
-
const [
|
|
263
|
+
const [U, M] = I(
|
|
262
264
|
() => typeof window < "u" && new URLSearchParams(window.location.search).get("history") === "1"
|
|
263
|
-
), p = t.unsavedCount ?? 0,
|
|
264
|
-
|
|
265
|
+
), p = t.unsavedCount ?? 0, $ = s ? Le(s) : null, ne = ve(() => s ? [s] : [], [s]), re = Pe(i, l, ne), F = s ? Ue(s, l, re) : J[n] ? [{ text: J[n] }] : [], R = !!t.save && !t.autosave, j = R && p > 0, oe = ge(
|
|
266
|
+
(d) => {
|
|
267
|
+
var v, z;
|
|
268
|
+
return ((z = (v = l.find((le) => le.field === d)) == null ? void 0 : v.label) == null ? void 0 : z.trim()) || Ne(d);
|
|
269
|
+
},
|
|
270
|
+
[l]
|
|
271
|
+
), se = ye(c);
|
|
272
|
+
return /* @__PURE__ */ r(
|
|
265
273
|
"header",
|
|
266
274
|
{
|
|
267
275
|
"data-editor-topbar": "",
|
|
268
276
|
className: "flex shrink-0 flex-nowrap items-center gap-1.5 overflow-hidden border-b border-slate-200 bg-white px-3 py-2 dark:border-border dark:bg-card",
|
|
269
277
|
children: [
|
|
270
|
-
/* @__PURE__ */ e("style", { children:
|
|
271
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ e("style", { children: We }),
|
|
279
|
+
/* @__PURE__ */ r(
|
|
272
280
|
"button",
|
|
273
281
|
{
|
|
274
282
|
type: "button",
|
|
275
|
-
"aria-label":
|
|
283
|
+
"aria-label": g,
|
|
276
284
|
"data-editor-back": "",
|
|
277
|
-
onClick: (
|
|
285
|
+
onClick: (d) => T(d.currentTarget),
|
|
278
286
|
className: "inline-flex h-8 shrink-0 items-center gap-0.5 rounded-md pl-1 pr-2 text-[12px] text-slate-500 transition-colors hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
|
|
279
287
|
children: [
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
/* @__PURE__ */ e("span", { "data-tb-wide": "", children:
|
|
288
|
+
/* @__PURE__ */ e(de, { className: "h-4 w-4" }),
|
|
289
|
+
/* @__PURE__ */ e("span", { "data-tb-wide": "", children: g })
|
|
282
290
|
]
|
|
283
291
|
}
|
|
284
292
|
),
|
|
285
|
-
/* @__PURE__ */ e(
|
|
286
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ e(f, {}),
|
|
294
|
+
/* @__PURE__ */ r("div", { "data-tb-name": "", className: "flex min-w-[64px] flex-1 items-center gap-2", children: [
|
|
287
295
|
/* @__PURE__ */ e(
|
|
288
296
|
"h2",
|
|
289
297
|
{
|
|
290
|
-
ref:
|
|
298
|
+
ref: se,
|
|
291
299
|
className: "min-w-0 truncate text-[14px] font-semibold text-slate-900 dark:text-foreground",
|
|
292
|
-
children:
|
|
300
|
+
children: c
|
|
293
301
|
}
|
|
294
302
|
),
|
|
295
|
-
|
|
296
|
-
|
|
303
|
+
$ && /* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(Me, { tone: $.tone, children: $.text }) }),
|
|
304
|
+
F.length > 0 && /* @__PURE__ */ r(
|
|
297
305
|
"span",
|
|
298
306
|
{
|
|
299
307
|
"data-tb-sentence": "",
|
|
300
308
|
className: "min-w-0 truncate text-[12px] text-slate-500 dark:text-muted-foreground",
|
|
301
309
|
children: [
|
|
302
310
|
"· ",
|
|
303
|
-
/* @__PURE__ */ e(
|
|
311
|
+
/* @__PURE__ */ e($e, { segs: F, muted: !0 })
|
|
304
312
|
]
|
|
305
313
|
}
|
|
306
314
|
),
|
|
307
315
|
y
|
|
308
316
|
] }),
|
|
309
|
-
/* @__PURE__ */ e(
|
|
310
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ e(f, {}),
|
|
318
|
+
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
311
319
|
/* @__PURE__ */ e(
|
|
312
320
|
"button",
|
|
313
321
|
{
|
|
314
322
|
type: "button",
|
|
315
323
|
"aria-label": "Undo",
|
|
316
|
-
className:
|
|
324
|
+
className: E,
|
|
317
325
|
disabled: !t.canUndo,
|
|
318
326
|
onClick: t.undo,
|
|
319
327
|
"data-tip": t.undoLabel ? `Undo ${t.undoLabel} (⌘Z)` : "Undo (⌘Z)",
|
|
320
|
-
children: /* @__PURE__ */ e(
|
|
328
|
+
children: /* @__PURE__ */ e(ie, { className: "h-4 w-4" })
|
|
321
329
|
}
|
|
322
330
|
),
|
|
323
331
|
/* @__PURE__ */ e(
|
|
@@ -325,156 +333,159 @@ function nt({
|
|
|
325
333
|
{
|
|
326
334
|
type: "button",
|
|
327
335
|
"aria-label": "Redo",
|
|
328
|
-
className:
|
|
336
|
+
className: E,
|
|
329
337
|
disabled: !t.canRedo,
|
|
330
338
|
onClick: t.redo,
|
|
331
339
|
"data-tip": t.redoLabel ? `Redo ${t.redoLabel} (⇧⌘Z)` : "Redo (⇧⌘Z)",
|
|
332
|
-
children: /* @__PURE__ */ e(
|
|
340
|
+
children: /* @__PURE__ */ e(ce, { className: "h-4 w-4" })
|
|
333
341
|
}
|
|
334
342
|
)
|
|
335
343
|
] }),
|
|
336
|
-
|
|
337
|
-
/* @__PURE__ */ e(
|
|
338
|
-
/* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children:
|
|
344
|
+
x && /* @__PURE__ */ r(D, { children: [
|
|
345
|
+
/* @__PURE__ */ e(f, {}),
|
|
346
|
+
/* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: x })
|
|
339
347
|
] }),
|
|
340
|
-
/* @__PURE__ */ e(
|
|
348
|
+
/* @__PURE__ */ e(f, {}),
|
|
341
349
|
/* @__PURE__ */ e(
|
|
342
|
-
|
|
350
|
+
ze,
|
|
343
351
|
{
|
|
344
352
|
collection: i,
|
|
345
|
-
value:
|
|
346
|
-
onChange:
|
|
347
|
-
showHidden:
|
|
353
|
+
value: m,
|
|
354
|
+
onChange: u,
|
|
355
|
+
showHidden: b,
|
|
348
356
|
onShowHidden: P,
|
|
349
|
-
extra:
|
|
357
|
+
extra: w
|
|
350
358
|
}
|
|
351
359
|
),
|
|
352
360
|
/* @__PURE__ */ e(
|
|
353
|
-
|
|
361
|
+
A,
|
|
354
362
|
{
|
|
355
363
|
label: "Tools",
|
|
356
|
-
icon: /* @__PURE__ */ e(
|
|
364
|
+
icon: /* @__PURE__ */ e(me, { className: "h-3.5 w-3.5" }),
|
|
357
365
|
tip: "Arrange, find, outline, every form, form map and shortcuts",
|
|
358
366
|
children: k
|
|
359
367
|
}
|
|
360
368
|
),
|
|
361
369
|
/* @__PURE__ */ e(
|
|
362
|
-
|
|
370
|
+
A,
|
|
363
371
|
{
|
|
364
372
|
label: "AI",
|
|
365
|
-
icon: /* @__PURE__ */ e(
|
|
373
|
+
icon: /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
|
|
366
374
|
tip: "Rebuild, review and ask about this form with AI; type a change",
|
|
367
375
|
width: "w-[320px]",
|
|
368
|
-
children:
|
|
376
|
+
children: B
|
|
369
377
|
}
|
|
370
378
|
),
|
|
371
379
|
N,
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */ e(
|
|
380
|
+
/* @__PURE__ */ r(K, { open: U, onOpenChange: M, children: [
|
|
381
|
+
/* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ e(
|
|
374
382
|
"button",
|
|
375
383
|
{
|
|
376
384
|
type: "button",
|
|
377
|
-
className: h(
|
|
385
|
+
className: h(E, U && Ee),
|
|
378
386
|
"aria-label": "History",
|
|
379
387
|
"data-tip": "History: saved versions, this session’s steps, restore",
|
|
380
388
|
"data-editor-history": "",
|
|
381
|
-
children: /* @__PURE__ */ e(
|
|
389
|
+
children: /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
|
|
382
390
|
}
|
|
383
391
|
) }),
|
|
384
392
|
/* @__PURE__ */ e(
|
|
385
|
-
|
|
393
|
+
V,
|
|
386
394
|
{
|
|
387
395
|
align: "end",
|
|
388
396
|
className: "max-h-[min(75vh,640px)] w-[460px] overflow-y-auto overscroll-contain p-3",
|
|
389
|
-
children:
|
|
390
|
-
|
|
397
|
+
children: U && /* @__PURE__ */ e(
|
|
398
|
+
Ae,
|
|
391
399
|
{
|
|
392
400
|
layoutId: a,
|
|
393
|
-
onRestored: () =>
|
|
401
|
+
onRestored: () => M(!1),
|
|
394
402
|
unsavedCount: p,
|
|
395
403
|
onDiscardUnsaved: t.discard,
|
|
396
404
|
session: t.session,
|
|
397
405
|
onJump: t.jump,
|
|
398
|
-
|
|
399
|
-
|
|
406
|
+
bundle: t.bundle,
|
|
407
|
+
onApply: (d, v) => t.apply(d, { label: v }),
|
|
408
|
+
fieldLabel: oe,
|
|
409
|
+
onShowOnCanvas: o ? (d, v) => {
|
|
410
|
+
M(!1), o(d, v);
|
|
400
411
|
} : void 0
|
|
401
412
|
}
|
|
402
413
|
)
|
|
403
414
|
}
|
|
404
415
|
)
|
|
405
416
|
] }),
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
|
|
417
|
+
/* @__PURE__ */ r(
|
|
418
|
+
A,
|
|
408
419
|
{
|
|
409
420
|
label: "More",
|
|
410
|
-
icon: /* @__PURE__ */ e(
|
|
421
|
+
icon: /* @__PURE__ */ e(ue, { className: "h-4 w-4" }),
|
|
411
422
|
iconOnly: !0,
|
|
412
423
|
align: "end",
|
|
413
424
|
tip: "Test, share and watch this form, templates and download",
|
|
414
425
|
data: { "data-editor-more": "" },
|
|
415
426
|
children: [
|
|
416
|
-
|
|
417
|
-
/* @__PURE__ */ e(
|
|
418
|
-
/* @__PURE__ */ e(
|
|
419
|
-
/* @__PURE__ */ e(
|
|
420
|
-
/* @__PURE__ */ e(
|
|
421
|
-
|
|
427
|
+
te,
|
|
428
|
+
/* @__PURE__ */ e(H, {}),
|
|
429
|
+
/* @__PURE__ */ e(Oe, { layoutId: a, fields: l, onSelectField: O }),
|
|
430
|
+
/* @__PURE__ */ e(Re, { layoutId: a }),
|
|
431
|
+
/* @__PURE__ */ e(H, {}),
|
|
432
|
+
L
|
|
422
433
|
]
|
|
423
434
|
}
|
|
424
435
|
),
|
|
425
|
-
/* @__PURE__ */ e(
|
|
426
|
-
/* @__PURE__ */ e(
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
|
|
436
|
+
/* @__PURE__ */ e(f, {}),
|
|
437
|
+
/* @__PURE__ */ e(Ze, { draft: t, onOpen: C, pendingTip: S }),
|
|
438
|
+
/* @__PURE__ */ r("div", { "data-save-split": "", className: "flex shrink-0 items-center", children: [
|
|
439
|
+
R && /* @__PURE__ */ r(
|
|
429
440
|
"button",
|
|
430
441
|
{
|
|
431
442
|
type: "button",
|
|
432
443
|
"data-editor-save": "",
|
|
433
444
|
disabled: p === 0,
|
|
434
445
|
onClick: () => {
|
|
435
|
-
var
|
|
436
|
-
return void ((
|
|
446
|
+
var d;
|
|
447
|
+
return void ((d = t.save) == null ? void 0 : d.call(t));
|
|
437
448
|
},
|
|
438
|
-
"data-tip": p > 0 ? `Save ${
|
|
449
|
+
"data-tip": p > 0 ? `Save ${W(p)} (⌘S)` : "Nothing to save",
|
|
439
450
|
className: h(
|
|
440
451
|
"inline-flex h-8 items-center gap-1.5 rounded-l-md px-3 text-[12.5px] font-medium transition-opacity disabled:pointer-events-none disabled:opacity-40",
|
|
441
452
|
p > 0 ? "bg-nvr-cyan text-white hover:opacity-90" : "border border-slate-200 text-slate-700 dark:border-border dark:text-foreground"
|
|
442
453
|
),
|
|
443
454
|
children: [
|
|
444
|
-
/* @__PURE__ */ e(
|
|
455
|
+
/* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
|
|
445
456
|
"Save"
|
|
446
457
|
]
|
|
447
458
|
}
|
|
448
459
|
),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
|
|
460
|
+
/* @__PURE__ */ r(
|
|
461
|
+
A,
|
|
451
462
|
{
|
|
452
463
|
label: "Save options",
|
|
453
|
-
icon: /* @__PURE__ */ e(
|
|
464
|
+
icon: /* @__PURE__ */ e(q, { className: "h-3.5 w-3.5" }),
|
|
454
465
|
iconOnly: !0,
|
|
455
466
|
align: "end",
|
|
456
467
|
width: "w-[300px]",
|
|
457
|
-
tip:
|
|
468
|
+
tip: R ? "Review, check or schedule the changes; Autosave" : "Autosave",
|
|
458
469
|
className: h(
|
|
459
|
-
|
|
470
|
+
R ? "rounded-l-none border border-l-0 border-slate-200 dark:border-border" : "border border-slate-200 dark:border-border"
|
|
460
471
|
),
|
|
461
472
|
data: { "data-save-menu": "" },
|
|
462
473
|
children: [
|
|
463
|
-
|
|
464
|
-
|
|
474
|
+
Z && j && /* @__PURE__ */ e(
|
|
475
|
+
X,
|
|
465
476
|
{
|
|
466
477
|
label: "Review changes on canvas",
|
|
467
|
-
icon: /* @__PURE__ */ e(
|
|
478
|
+
icon: /* @__PURE__ */ e(be, { className: "h-3.5 w-3.5" }),
|
|
468
479
|
hint: "Mark the unsaved changes on the form",
|
|
469
|
-
checked:
|
|
470
|
-
onClick:
|
|
480
|
+
checked: ee,
|
|
481
|
+
onClick: Z,
|
|
471
482
|
data: { "data-editor-review": "" }
|
|
472
483
|
}
|
|
473
484
|
),
|
|
474
|
-
|
|
475
|
-
/* @__PURE__ */ e(
|
|
476
|
-
t.unsavedOps && t.discard &&
|
|
477
|
-
|
|
485
|
+
j && ae,
|
|
486
|
+
/* @__PURE__ */ e(Se, { layoutId: a, draft: t }),
|
|
487
|
+
t.unsavedOps && t.discard && j && /* @__PURE__ */ e(
|
|
488
|
+
je,
|
|
478
489
|
{
|
|
479
490
|
collection: i,
|
|
480
491
|
layoutId: a,
|
|
@@ -485,18 +496,18 @@ function nt({
|
|
|
485
496
|
}
|
|
486
497
|
}
|
|
487
498
|
),
|
|
488
|
-
t.setAutosave && /* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */ e(
|
|
499
|
+
t.setAutosave && /* @__PURE__ */ r(D, { children: [
|
|
500
|
+
/* @__PURE__ */ e(H, {}),
|
|
490
501
|
/* @__PURE__ */ e(
|
|
491
|
-
|
|
502
|
+
X,
|
|
492
503
|
{
|
|
493
504
|
label: "Autosave",
|
|
494
|
-
icon: /* @__PURE__ */ e(
|
|
505
|
+
icon: /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
|
|
495
506
|
hint: t.autosave ? "Every change saves as you make it, until you close the editor" : "Off: changes wait for Save",
|
|
496
507
|
checked: !!t.autosave,
|
|
497
508
|
onClick: () => {
|
|
498
|
-
var
|
|
499
|
-
return (
|
|
509
|
+
var d;
|
|
510
|
+
return (d = t.setAutosave) == null ? void 0 : d.call(t, !t.autosave);
|
|
500
511
|
},
|
|
501
512
|
data: { "data-autosave-switch": "" }
|
|
502
513
|
}
|
|
@@ -510,9 +521,9 @@ function nt({
|
|
|
510
521
|
}
|
|
511
522
|
);
|
|
512
523
|
}
|
|
513
|
-
function
|
|
524
|
+
function f() {
|
|
514
525
|
return /* @__PURE__ */ e("span", { "aria-hidden": !0, "data-tb-wide": "", className: "h-5 w-px shrink-0 bg-slate-200 dark:bg-border" });
|
|
515
526
|
}
|
|
516
527
|
export {
|
|
517
|
-
|
|
528
|
+
it as EditorTopBar
|
|
518
529
|
};
|