@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,36 +1,39 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { MousePointerClick as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { HEADER_GROUP_KEY as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { jsx as t, jsxs as a, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { MousePointerClick as Q } from "lucide-react";
|
|
3
|
+
import { useMemo as Y, useState as Z, useId as ee } from "react";
|
|
4
|
+
import { HEADER_GROUP_KEY as O, CANVAS_SLOT_KEYS as te, UNGROUPED_KEY as le } from "../../../lib/layout-ops.js";
|
|
5
|
+
import { isDisplayFormulaField as ne } from "../../../lib/placement-behaviour.js";
|
|
6
|
+
import { cn as ie, titleCase as h } from "../../../lib/utils.js";
|
|
7
|
+
import { TipLayer as re } from "../../TipLayer.js";
|
|
8
|
+
import { ArrangeButton as oe } from "../ArrangeButton.js";
|
|
9
|
+
import { AutoArrangeButton as ae } from "../AutoArrange.js";
|
|
10
|
+
import { useLayoutDesign as de, targetKey as se } from "../design-context.js";
|
|
11
|
+
import { PlacementPresets as ce } from "../entry/PlacementPresets.js";
|
|
12
|
+
import { FIELD_HOLDERS as ue } from "../field-zones.js";
|
|
13
|
+
import { PanelHeader as E, PanelBody as F, PanelTabs as me, tabId as fe, tabPanelId as pe } from "../panel-frame.js";
|
|
14
|
+
import { tintCard as be } from "../panel-style.js";
|
|
15
|
+
import { slotName as z } from "../slot-names.js";
|
|
16
|
+
import { useLayoutBundle as he } from "../useLayoutDraft.js";
|
|
17
|
+
import { AdvancedTab as ye } from "./AdvancedTab.js";
|
|
18
|
+
import { DisplayFormulaSettings as ke } from "./BehaviourSettings.js";
|
|
19
|
+
import { Breadcrumb as I } from "./Breadcrumb.js";
|
|
20
|
+
import { useCollectionMeta as R, useGlobalWriter as xe, useFieldCtxValue as _e, FieldCtxContext as ve } from "./field-context.js";
|
|
21
|
+
import { GridTab as ge } from "./GridTab.js";
|
|
22
|
+
import { GroupInspector as Ne } from "./GroupInspector.js";
|
|
23
|
+
import { HeaderItemInspector as Te } from "./HeaderItemInspector.js";
|
|
24
|
+
import { HelpVideoSetting as $, NoteSetting as V } from "./HelpTab.js";
|
|
25
|
+
import { InspectorEnvContext as W, useInspectorEnv as L, ScopeLegend as H, GlobalWriterContext as Pe } from "./kit.js";
|
|
26
|
+
import { LookTab as Se } from "./LookTab.js";
|
|
27
|
+
import { isDefaultForm as Ie, layoutTypeOf as Ee, findPlacement as w, SUBTITLE_FIELD as A, overrideGroupOps as Fe, overridePlacementOps as Le, describeField as q, asObject as G, NUMERIC_TYPES as Ce } from "./model.js";
|
|
28
|
+
import { OverrideNotice as Ke } from "./OverrideNotice.js";
|
|
29
|
+
import { PickerTab as Me } from "./PickerTab.js";
|
|
30
|
+
import { RulesTab as De } from "./RulesTab.js";
|
|
31
|
+
import { SlotInspector as Ge } from "./SlotInspector.js";
|
|
32
|
+
import { SubtitleInspector as Oe } from "./SubtitleInspector.js";
|
|
33
|
+
import { useInspectorTabRequest as Re } from "./tab-request.js";
|
|
34
|
+
import { WidgetInspector as He } from "./WidgetInspector.js";
|
|
35
|
+
const Ae = /^__widget_\d+__$/, Be = /^__ext_[a-z][a-z0-9-]{1,60}__$/, J = (e) => te.includes(e) || e === "__owners__" || e === "__pdf__" || Be.test(e);
|
|
36
|
+
function X(e) {
|
|
34
37
|
switch (e.kind) {
|
|
35
38
|
case "field":
|
|
36
39
|
case "slot":
|
|
@@ -38,56 +41,56 @@ function J(e) {
|
|
|
38
41
|
case "header":
|
|
39
42
|
return {
|
|
40
43
|
field: e.field,
|
|
41
|
-
group_key: e.field ===
|
|
44
|
+
group_key: e.field === A ? null : O
|
|
42
45
|
};
|
|
43
46
|
default:
|
|
44
47
|
return null;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
|
-
function
|
|
48
|
-
const { bundle: l, target: n, apply: i, collection:
|
|
50
|
+
function Ft(e) {
|
|
51
|
+
const { bundle: l, target: n, apply: i, collection: d } = e, o = de(), m = Y(
|
|
49
52
|
() => ({
|
|
50
53
|
bundle: l,
|
|
51
54
|
apply: i,
|
|
52
55
|
flush: e.flush ?? (() => {
|
|
53
56
|
}),
|
|
54
|
-
collection:
|
|
55
|
-
layoutType:
|
|
56
|
-
defaultForm:
|
|
57
|
+
collection: d,
|
|
58
|
+
layoutType: Ee(l.layout),
|
|
59
|
+
defaultForm: Ie(l.layout),
|
|
57
60
|
select: e.onSelect
|
|
58
61
|
}),
|
|
59
|
-
[l, i, e.flush,
|
|
60
|
-
),
|
|
62
|
+
[l, i, e.flush, d, e.onSelect]
|
|
63
|
+
), s = n ? X(n) : null, r = s ? w(l, s.field, s.group_key) : null, x = (n == null ? void 0 : n.kind) === "group" ? l.groups.find((b) => b.key === n.key) ?? null : null, _ = !!n && (n.kind === "group" ? !x : !r && !J((s == null ? void 0 : s.field) ?? "") && (s == null ? void 0 : s.field) !== A), g = l.layout.parent_layout_id != null ? Number(l.layout.parent_layout_id) : null, C = e.inheritedFrom ?? (n ? (o == null ? void 0 : o.inheritedFrom(n)) ?? null : null), { data: c } = he(g), f = _ && c && s ? w(c, s.field, s.group_key) : null, p = _ && c && (n == null ? void 0 : n.kind) === "group" ? c.groups.find((b) => b.key === n.key) ?? null : null, N = _ && (!!f || !!p || !!C);
|
|
61
64
|
if (!n)
|
|
62
|
-
return /* @__PURE__ */ t(
|
|
63
|
-
/* @__PURE__ */ t(
|
|
65
|
+
return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-8 pb-16 text-center", children: [
|
|
66
|
+
/* @__PURE__ */ t(Q, { className: "h-5 w-5 text-slate-400" }),
|
|
64
67
|
/* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Select a field, section or panel on the form to change it." })
|
|
65
68
|
] }) });
|
|
66
69
|
if (N) {
|
|
67
|
-
const b =
|
|
68
|
-
} },
|
|
69
|
-
if (!
|
|
70
|
-
const y = p ?
|
|
71
|
-
y.length && i(y, { label: `Override ${
|
|
72
|
-
}, v = /* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
70
|
+
const b = c != null && c.layout.name ? String(c.layout.name) : C ?? "the parent form", K = { ...m, bundle: c ?? l, apply: () => {
|
|
71
|
+
} }, M = () => {
|
|
72
|
+
if (!c) return;
|
|
73
|
+
const y = p ? Fe(l, c, p) : f ? Le(l, c, f) : [];
|
|
74
|
+
y.length && i(y, { label: `Override ${P(n)} on this form` });
|
|
75
|
+
}, v = /* @__PURE__ */ a("div", { "data-setting": "inspector.inherited_override", className: ie(be, "space-y-2.5 p-3"), children: [
|
|
76
|
+
/* @__PURE__ */ a("p", { className: "text-[12px] leading-snug text-slate-700 dark:text-foreground", children: [
|
|
74
77
|
"This comes from ",
|
|
75
78
|
/* @__PURE__ */ t("span", { className: "font-medium", children: b }),
|
|
76
79
|
". Change it there for every form built on it, or override it on this form only."
|
|
77
80
|
] }),
|
|
78
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
|
|
79
82
|
/* @__PURE__ */ t(
|
|
80
83
|
"button",
|
|
81
84
|
{
|
|
82
85
|
type: "button",
|
|
83
86
|
"data-override-here": "",
|
|
84
|
-
disabled: !
|
|
85
|
-
onClick:
|
|
87
|
+
disabled: !c || !f && !p,
|
|
88
|
+
onClick: M,
|
|
86
89
|
className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-medium text-white transition-colors hover:bg-[#00b8e0] disabled:opacity-40",
|
|
87
90
|
children: "Override here"
|
|
88
91
|
}
|
|
89
92
|
),
|
|
90
|
-
g != null && e.openLayout && /* @__PURE__ */
|
|
93
|
+
g != null && e.openLayout && /* @__PURE__ */ a(
|
|
91
94
|
"button",
|
|
92
95
|
{
|
|
93
96
|
type: "button",
|
|
@@ -105,53 +108,53 @@ function vt(e) {
|
|
|
105
108
|
)
|
|
106
109
|
] })
|
|
107
110
|
] });
|
|
108
|
-
return /* @__PURE__ */ t(
|
|
109
|
-
/* @__PURE__ */ t(
|
|
110
|
-
/* @__PURE__ */ t(
|
|
111
|
+
return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(W.Provider, { value: K, children: p ? /* @__PURE__ */ t(j, { group: p, notice: v, readOnly: !0 }) : f ? /* @__PURE__ */ t(U, { target: n, row: f, notice: v, readOnly: !0 }) : /* @__PURE__ */ a(k, { children: [
|
|
112
|
+
/* @__PURE__ */ t(E, { title: P(n) }),
|
|
113
|
+
/* @__PURE__ */ t(F, { children: v })
|
|
111
114
|
] }) }) });
|
|
112
115
|
}
|
|
113
116
|
const u = _ ? null : /* @__PURE__ */ t(
|
|
114
|
-
|
|
117
|
+
Ke,
|
|
115
118
|
{
|
|
116
119
|
bundle: l,
|
|
117
|
-
parent:
|
|
120
|
+
parent: c,
|
|
118
121
|
target: n,
|
|
119
|
-
title:
|
|
122
|
+
title: P(n),
|
|
120
123
|
apply: i
|
|
121
124
|
}
|
|
122
125
|
);
|
|
123
|
-
return /* @__PURE__ */ t(
|
|
124
|
-
/* @__PURE__ */ t(
|
|
125
|
-
/* @__PURE__ */ t(
|
|
126
|
-
|
|
126
|
+
return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(W.Provider, { value: m, children: n.kind === "group" ? x && /* @__PURE__ */ t(j, { group: x, notice: u }, x.key) : _ ? /* @__PURE__ */ a(k, { children: [
|
|
127
|
+
/* @__PURE__ */ t(E, { title: P(n) }),
|
|
128
|
+
/* @__PURE__ */ t(F, { children: /* @__PURE__ */ a("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: [
|
|
129
|
+
P(n),
|
|
127
130
|
" is not on this form any more."
|
|
128
131
|
] }) })
|
|
129
132
|
] }) : /* @__PURE__ */ t(
|
|
130
|
-
|
|
133
|
+
U,
|
|
131
134
|
{
|
|
132
135
|
target: n,
|
|
133
136
|
row: r,
|
|
134
137
|
notice: u
|
|
135
138
|
},
|
|
136
|
-
|
|
139
|
+
se(n)
|
|
137
140
|
) }) });
|
|
138
141
|
}
|
|
139
|
-
function
|
|
140
|
-
return e.kind === "group" ? h(e.key) : e.field.startsWith("__") ?
|
|
142
|
+
function P(e) {
|
|
143
|
+
return e.kind === "group" ? h(e.key) : e.field.startsWith("__") ? z(e.field) : h(e.field.split(".").pop() ?? e.field);
|
|
141
144
|
}
|
|
142
|
-
function
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */ t(
|
|
145
|
+
function D({ children: e }) {
|
|
146
|
+
return /* @__PURE__ */ a("div", { "data-inspector": "", className: "flex h-full min-h-0 min-w-0 flex-col text-[12px]", children: [
|
|
147
|
+
/* @__PURE__ */ t(re, {}),
|
|
145
148
|
e
|
|
146
149
|
] });
|
|
147
150
|
}
|
|
148
|
-
function
|
|
151
|
+
function We(e, l) {
|
|
149
152
|
if (!l || l === le) return null;
|
|
150
|
-
if (l ===
|
|
153
|
+
if (l === O) return "Header strip";
|
|
151
154
|
const n = e.groups.find((i) => i.key === l);
|
|
152
155
|
return n ? n.label || h(n.key) : h(l);
|
|
153
156
|
}
|
|
154
|
-
function
|
|
157
|
+
function we(e) {
|
|
155
158
|
if (e.isPath) return "shows a linked value";
|
|
156
159
|
if (e.computedType) return "calculated";
|
|
157
160
|
if (e.relKind === "M2O") return "picks one record";
|
|
@@ -159,7 +162,7 @@ function Be(e) {
|
|
|
159
162
|
if (e.relKind === "O2M")
|
|
160
163
|
return e.iface === "inline-table" ? "table of related rows" : "related rows";
|
|
161
164
|
if (e.relKind) return "related records";
|
|
162
|
-
if (
|
|
165
|
+
if (Ce.has(e.type)) return "number";
|
|
163
166
|
switch (e.type) {
|
|
164
167
|
case "boolean":
|
|
165
168
|
return "yes or no";
|
|
@@ -182,51 +185,51 @@ function Be(e) {
|
|
|
182
185
|
return e.type;
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
|
-
function
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
e && /* @__PURE__ */
|
|
188
|
+
function B({ words: e, k: l, setting: n }) {
|
|
189
|
+
return /* @__PURE__ */ a("span", { "data-setting": n, children: [
|
|
190
|
+
e && /* @__PURE__ */ a(k, { children: [
|
|
188
191
|
e,
|
|
189
192
|
" · "
|
|
190
193
|
] }),
|
|
191
194
|
/* @__PURE__ */ t("span", { className: "font-mono text-[11px]", children: l })
|
|
192
195
|
] });
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function je(e, l) {
|
|
195
198
|
const n = l.parent_key ? e.groups.find((i) => i.key === l.parent_key) ?? null : null;
|
|
196
199
|
return l.type === "tab" ? (n == null ? void 0 : n.tab_mode) === "steps" ? "Step" : "Tab" : l.type === "container" ? l.tab_mode === "steps" ? "Steps holder" : "Tabs holder" : l.type === "content" ? "Text block" : l.type === "metadata" ? "Record info" : "Section";
|
|
197
200
|
}
|
|
198
|
-
function
|
|
201
|
+
function j({
|
|
199
202
|
group: e,
|
|
200
203
|
notice: l,
|
|
201
204
|
readOnly: n = !1
|
|
202
205
|
}) {
|
|
203
|
-
const i =
|
|
204
|
-
return /* @__PURE__ */
|
|
206
|
+
const i = L(), d = /* @__PURE__ */ t(Ne, { group: e, readOnly: n });
|
|
207
|
+
return /* @__PURE__ */ a(k, { children: [
|
|
205
208
|
/* @__PURE__ */ t(
|
|
206
|
-
|
|
209
|
+
E,
|
|
207
210
|
{
|
|
208
211
|
eyebrow: /* @__PURE__ */ t(
|
|
209
|
-
|
|
212
|
+
I,
|
|
210
213
|
{
|
|
211
|
-
kind:
|
|
214
|
+
kind: je(i.bundle, e),
|
|
212
215
|
target: { kind: "group", key: e.key }
|
|
213
216
|
}
|
|
214
217
|
),
|
|
215
218
|
title: e.label || h(e.key),
|
|
216
|
-
sub: /* @__PURE__ */ t(
|
|
219
|
+
sub: /* @__PURE__ */ t(B, { k: e.key, setting: "group.key" })
|
|
217
220
|
}
|
|
218
221
|
),
|
|
219
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ a(F, { children: [
|
|
220
223
|
l,
|
|
221
224
|
n ? (
|
|
222
225
|
// Inputs sit in a disabled fieldset and writes go nowhere.
|
|
223
|
-
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children:
|
|
224
|
-
) : /* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */ t(
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */ t(
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: d })
|
|
227
|
+
) : /* @__PURE__ */ a(k, { children: [
|
|
228
|
+
/* @__PURE__ */ t(H, {}),
|
|
229
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
|
|
230
|
+
/* @__PURE__ */ t(oe, { targets: [{ kind: "group", key: e.key }] }),
|
|
231
|
+
ue.has(e.type) && i.layoutType !== "table" && i.layoutType !== "file" && /* @__PURE__ */ t(
|
|
232
|
+
ae,
|
|
230
233
|
{
|
|
231
234
|
bundle: i.bundle,
|
|
232
235
|
apply: i.apply,
|
|
@@ -235,15 +238,15 @@ function w({
|
|
|
235
238
|
}
|
|
236
239
|
)
|
|
237
240
|
] }),
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */
|
|
241
|
+
d,
|
|
242
|
+
/* @__PURE__ */ a(
|
|
240
243
|
"div",
|
|
241
244
|
{
|
|
242
245
|
"data-group-help": "",
|
|
243
246
|
className: "mt-5 space-y-5 border-t border-slate-100 pt-5 dark:border-border/60",
|
|
244
247
|
children: [
|
|
245
248
|
/* @__PURE__ */ t(
|
|
246
|
-
|
|
249
|
+
$,
|
|
247
250
|
{
|
|
248
251
|
kind: "section",
|
|
249
252
|
name: e.key,
|
|
@@ -251,7 +254,7 @@ function w({
|
|
|
251
254
|
}
|
|
252
255
|
),
|
|
253
256
|
/* @__PURE__ */ t(
|
|
254
|
-
|
|
257
|
+
V,
|
|
255
258
|
{
|
|
256
259
|
target: { kind: "group", key: e.key },
|
|
257
260
|
name: e.label || h(e.key)
|
|
@@ -264,142 +267,160 @@ function w({
|
|
|
264
267
|
] })
|
|
265
268
|
] });
|
|
266
269
|
}
|
|
267
|
-
function
|
|
270
|
+
function S({
|
|
268
271
|
eyebrow: e,
|
|
269
272
|
title: l,
|
|
270
273
|
sub: n,
|
|
271
274
|
notice: i,
|
|
272
|
-
readOnly:
|
|
273
|
-
children:
|
|
275
|
+
readOnly: d,
|
|
276
|
+
children: o
|
|
274
277
|
}) {
|
|
275
|
-
return /* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */ t(
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ a(k, { children: [
|
|
279
|
+
/* @__PURE__ */ t(E, { eyebrow: e, title: l, sub: n }),
|
|
280
|
+
/* @__PURE__ */ a(F, { children: [
|
|
278
281
|
i,
|
|
279
|
-
|
|
280
|
-
/* @__PURE__ */ t(
|
|
281
|
-
|
|
282
|
+
d ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: /* @__PURE__ */ t("fieldset", { disabled: !0, className: "min-w-0", children: o }) }) : /* @__PURE__ */ a(k, { children: [
|
|
283
|
+
/* @__PURE__ */ t(H, {}),
|
|
284
|
+
o
|
|
282
285
|
] })
|
|
283
286
|
] })
|
|
284
287
|
] });
|
|
285
288
|
}
|
|
286
|
-
function
|
|
289
|
+
function U({
|
|
287
290
|
target: e,
|
|
288
291
|
row: l,
|
|
289
292
|
notice: n,
|
|
290
293
|
readOnly: i = !1
|
|
291
294
|
}) {
|
|
292
295
|
var r;
|
|
293
|
-
const
|
|
294
|
-
return
|
|
295
|
-
|
|
296
|
+
const d = L(), o = e.kind === "group" ? "" : e.field, m = (l == null ? void 0 : l.group_key) ?? (e.kind === "group" ? null : ((r = X(e)) == null ? void 0 : r.group_key) ?? null), s = We(d.bundle, m);
|
|
297
|
+
return o === A ? /* @__PURE__ */ t(S, { eyebrow: "Header", title: "Subtitle", notice: n, readOnly: i, children: /* @__PURE__ */ t(Oe, {}) }) : l && (Ae.test(o) || l.widget_id != null) ? /* @__PURE__ */ t(
|
|
298
|
+
S,
|
|
296
299
|
{
|
|
297
|
-
eyebrow: /* @__PURE__ */ t(
|
|
300
|
+
eyebrow: /* @__PURE__ */ t(I, { kind: "Widget", target: e, where: s }),
|
|
298
301
|
title: l.label_override || "Widget",
|
|
299
302
|
notice: n,
|
|
300
303
|
readOnly: i,
|
|
301
|
-
children: /* @__PURE__ */ t(
|
|
304
|
+
children: /* @__PURE__ */ t(He, { row: l })
|
|
305
|
+
}
|
|
306
|
+
) : J(o) ? /* @__PURE__ */ t(
|
|
307
|
+
S,
|
|
308
|
+
{
|
|
309
|
+
eyebrow: /* @__PURE__ */ t(I, { kind: "Panel", target: e, where: s }),
|
|
310
|
+
title: z(o),
|
|
311
|
+
notice: n,
|
|
312
|
+
readOnly: i,
|
|
313
|
+
children: /* @__PURE__ */ t(Ge, { field: o, groupKey: m, row: l })
|
|
302
314
|
}
|
|
303
|
-
) :
|
|
304
|
-
|
|
315
|
+
) : l ? e.kind === "header" || l.group_key === O ? /* @__PURE__ */ t(ze, { row: l, notice: n, readOnly: i }) : ne(o) ? /* @__PURE__ */ t(
|
|
316
|
+
S,
|
|
305
317
|
{
|
|
306
|
-
eyebrow: /* @__PURE__ */ t(
|
|
307
|
-
title:
|
|
318
|
+
eyebrow: /* @__PURE__ */ t(I, { kind: "Formula", target: e, where: s }),
|
|
319
|
+
title: Ue(l),
|
|
308
320
|
notice: n,
|
|
309
321
|
readOnly: i,
|
|
310
|
-
children: /* @__PURE__ */ t(
|
|
322
|
+
children: /* @__PURE__ */ t(Ye, { row: l })
|
|
311
323
|
}
|
|
312
|
-
) :
|
|
324
|
+
) : /* @__PURE__ */ t(Ve, { target: e, row: l, where: s, notice: n, readOnly: i }) : null;
|
|
325
|
+
}
|
|
326
|
+
function Ue(e) {
|
|
327
|
+
const l = G(e.overrides);
|
|
328
|
+
return typeof l.label == "string" && l.label.trim() ? l.label : "Formula";
|
|
329
|
+
}
|
|
330
|
+
function Ye({ row: e }) {
|
|
331
|
+
const l = L(), { data: n } = R(l.collection), i = Y(() => ((n == null ? void 0 : n.fields) ?? []).map((d) => d.field), [n == null ? void 0 : n.fields]);
|
|
332
|
+
return /* @__PURE__ */ t(ke, { row: e, fields: i });
|
|
313
333
|
}
|
|
314
|
-
function
|
|
334
|
+
function ze({
|
|
315
335
|
row: e,
|
|
316
336
|
notice: l,
|
|
317
337
|
readOnly: n
|
|
318
338
|
}) {
|
|
319
|
-
const i =
|
|
339
|
+
const i = L(), { data: d } = R(i.collection), o = q(e.field, (d == null ? void 0 : d.fields) ?? [], (d == null ? void 0 : d.relations) ?? [], null).label;
|
|
320
340
|
return /* @__PURE__ */ t(
|
|
321
|
-
|
|
341
|
+
S,
|
|
322
342
|
{
|
|
323
343
|
eyebrow: "Header strip",
|
|
324
|
-
title: e.label_override ||
|
|
325
|
-
sub: /* @__PURE__ */ t(
|
|
344
|
+
title: e.label_override || o,
|
|
345
|
+
sub: /* @__PURE__ */ t(B, { k: e.field }),
|
|
326
346
|
notice: l,
|
|
327
347
|
readOnly: n,
|
|
328
|
-
children: /* @__PURE__ */ t(
|
|
348
|
+
children: /* @__PURE__ */ t(Te, { row: e, label: o })
|
|
329
349
|
}
|
|
330
350
|
);
|
|
331
351
|
}
|
|
332
|
-
const
|
|
333
|
-
function
|
|
352
|
+
const $e = { fields: [], relations: [], label: "" };
|
|
353
|
+
function Ve({
|
|
334
354
|
target: e,
|
|
335
355
|
row: l,
|
|
336
356
|
where: n,
|
|
337
357
|
notice: i,
|
|
338
|
-
readOnly:
|
|
358
|
+
readOnly: d
|
|
339
359
|
}) {
|
|
340
|
-
var
|
|
341
|
-
const
|
|
342
|
-
collection:
|
|
343
|
-
collectionLabel:
|
|
360
|
+
var K, M, v, y;
|
|
361
|
+
const o = L(), { data: m } = R(o.collection), s = m ?? $e, r = q(l.field, s.fields, s.relations, l), x = xe({
|
|
362
|
+
collection: o.collection,
|
|
363
|
+
collectionLabel: s.label || h(o.collection),
|
|
344
364
|
field: l.field,
|
|
345
365
|
fieldLabel: r.label,
|
|
346
366
|
stored: {
|
|
347
|
-
options:
|
|
348
|
-
dependency_config:
|
|
367
|
+
options: G((K = r.global) == null ? void 0 : K.options),
|
|
368
|
+
dependency_config: G((M = r.global) == null ? void 0 : M.dependency_config),
|
|
349
369
|
columns: {
|
|
350
370
|
deprecated: !!((v = r.global) != null && v.deprecated_at),
|
|
351
371
|
deprecation_note: ((y = r.global) == null ? void 0 : y.deprecation_note) || null
|
|
352
372
|
}
|
|
353
373
|
}
|
|
354
|
-
}), _ =
|
|
374
|
+
}), _ = _e({ env: o, row: l, meta: s, writer: x, readOnly: d }), g = r.relKind === "M2O" || r.relKind === "M2M" || r.isPath || r.iface === "relation-path" || r.iface === "file-image" || r.iface === "files-m2m", C = r.relKind === "O2M" && (r.iface === "inline-grid" || r.iface === "inline-table"), c = [
|
|
355
375
|
{ key: "look", label: "Look" },
|
|
356
376
|
{ key: "rules", label: "Rules" },
|
|
357
377
|
...g ? [{ key: "picker", label: "Picker" }] : [],
|
|
358
|
-
...
|
|
378
|
+
...C ? [{ key: "grid", label: r.iface === "inline-table" ? "Table" : "Grid" }] : [],
|
|
359
379
|
{ key: "help", label: "Help" },
|
|
360
380
|
{ key: "advanced", label: "Advanced" }
|
|
361
|
-
], [
|
|
362
|
-
|
|
363
|
-
const N = ee(), u =
|
|
381
|
+
], [f, p] = Z("look");
|
|
382
|
+
Re(l.field, (T) => p(T));
|
|
383
|
+
const N = ee(), u = c.some((T) => T.key === f) ? f : "look", b = /* @__PURE__ */ t("fieldset", { disabled: d, className: "min-w-0", children: m ? u === "look" ? /* @__PURE__ */ t(Se, {}) : u === "rules" ? /* @__PURE__ */ t(De, {}) : u === "picker" ? /* @__PURE__ */ t(Me, {}) : u === "grid" ? /* @__PURE__ */ t(ge, {}) : u === "help" ? /* @__PURE__ */ a("div", { "data-help-tab": "", className: "space-y-5", children: [
|
|
364
384
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "Help text and the placeholder are on the Look tab." }),
|
|
365
|
-
/* @__PURE__ */ t(
|
|
385
|
+
/* @__PURE__ */ t($, { kind: "field", name: l.field, label: r.label }),
|
|
366
386
|
/* @__PURE__ */ t(
|
|
367
|
-
|
|
387
|
+
V,
|
|
368
388
|
{
|
|
369
389
|
target: { kind: "field", field: l.field, group_key: l.group_key },
|
|
370
390
|
name: r.label
|
|
371
391
|
}
|
|
372
392
|
)
|
|
373
|
-
] }) : /* @__PURE__ */ t(
|
|
374
|
-
return /* @__PURE__ */ t(
|
|
393
|
+
] }) : /* @__PURE__ */ t(ye, {}) : /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Loading the field…" }) });
|
|
394
|
+
return /* @__PURE__ */ t(ve.Provider, { value: _, children: /* @__PURE__ */ a(Pe.Provider, { value: x, children: [
|
|
375
395
|
/* @__PURE__ */ t(
|
|
376
|
-
|
|
396
|
+
E,
|
|
377
397
|
{
|
|
378
|
-
eyebrow: /* @__PURE__ */ t(
|
|
398
|
+
eyebrow: /* @__PURE__ */ t(I, { kind: "Field", target: e, where: n }),
|
|
379
399
|
title: r.label,
|
|
380
|
-
sub: /* @__PURE__ */ t(
|
|
400
|
+
sub: /* @__PURE__ */ t(B, { words: m ? we(r) : void 0, k: l.field }),
|
|
381
401
|
children: /* @__PURE__ */ t(
|
|
382
|
-
|
|
402
|
+
me,
|
|
383
403
|
{
|
|
384
404
|
idBase: N,
|
|
385
405
|
label: `Settings of ${r.label}`,
|
|
386
|
-
tabs:
|
|
406
|
+
tabs: c,
|
|
387
407
|
active: u,
|
|
388
408
|
onChange: (T) => {
|
|
389
|
-
|
|
409
|
+
o.flush(), p(T);
|
|
390
410
|
}
|
|
391
411
|
}
|
|
392
412
|
)
|
|
393
413
|
}
|
|
394
414
|
),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
|
|
415
|
+
/* @__PURE__ */ a(
|
|
416
|
+
F,
|
|
397
417
|
{
|
|
398
|
-
tabpanel: { id:
|
|
418
|
+
tabpanel: { id: pe(N), labelledBy: fe(N, u) },
|
|
399
419
|
children: [
|
|
400
420
|
i,
|
|
401
|
-
|
|
402
|
-
/* @__PURE__ */ t(
|
|
421
|
+
d ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: b }) : /* @__PURE__ */ a(k, { children: [
|
|
422
|
+
/* @__PURE__ */ t(ce, { bundle: o.bundle, rows: [l], apply: o.apply }),
|
|
423
|
+
/* @__PURE__ */ t(H, { field: !0 }),
|
|
403
424
|
b
|
|
404
425
|
] })
|
|
405
426
|
]
|
|
@@ -409,5 +430,5 @@ function je({
|
|
|
409
430
|
] }) });
|
|
410
431
|
}
|
|
411
432
|
export {
|
|
412
|
-
|
|
433
|
+
Ft as Inspector
|
|
413
434
|
};
|