@nivaro/react 0.3.40 → 0.3.42
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/components/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +645 -16
- package/dist/index.js +814 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/PickerExcludedRows.js +3 -3
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordGrantTools.js +28 -28
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/settings-registry.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -1,84 +1,99 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { Globe2 as
|
|
4
|
-
import { useContext as b, useEffect as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as
|
|
1
|
+
import { jsxs as u, jsx as t, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as F } from "@tanstack/react-query";
|
|
3
|
+
import { Globe2 as R, Star as U, ChevronRight as G, ChevronDown as K, Check as M, X as V } from "lucide-react";
|
|
4
|
+
import { useContext as b, useEffect as T, createContext as L, useState as v, useCallback as Z, useMemo as Q, useRef as $ } from "react";
|
|
5
|
+
import { createPortal as W } from "react-dom";
|
|
6
|
+
import { useNivaroClient as X } from "../../../context.js";
|
|
7
|
+
import { get as j } from "../../../lib/commands.js";
|
|
8
|
+
import { describeFieldReach as Y } from "../../../lib/config-sentences.js";
|
|
8
9
|
import { cn as p } from "../../../lib/utils.js";
|
|
9
|
-
import { Command as
|
|
10
|
-
import { Popover as
|
|
10
|
+
import { Command as H, CommandInput as z, CommandList as ee, CommandEmpty as te, CommandGroup as ne, CommandItem as re } from "../../ui/command.js";
|
|
11
|
+
import { Popover as ae, PopoverTrigger as se, PopoverContent as le } from "../../ui/popover.js";
|
|
11
12
|
import { SimpleSelect as oe } from "../../ui/SimpleSelect.js";
|
|
12
|
-
import { Switch as
|
|
13
|
+
import { Switch as ie } from "../../ui/switch.js";
|
|
13
14
|
import { useFocusBuffer as k } from "../focus-buffer.js";
|
|
14
|
-
import { usePinnedSettings as
|
|
15
|
-
import { labelText as
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
const e = b(
|
|
15
|
+
import { usePinnedSettings as ce, togglePinnedSetting as de } from "../nav/view-prefs.js";
|
|
16
|
+
import { labelText as ue, effectText as A, segOption as me, segTrack as pe, inputBase as C, groupTitle as P } from "../panel-style.js";
|
|
17
|
+
const S = L(null);
|
|
18
|
+
function fe() {
|
|
19
|
+
const e = b(S);
|
|
19
20
|
if (!e) throw new Error("Inspector parts render inside <Inspector>");
|
|
20
21
|
return e;
|
|
21
22
|
}
|
|
22
|
-
const I =
|
|
23
|
-
function
|
|
23
|
+
const I = L(null);
|
|
24
|
+
function Ae(e, s) {
|
|
24
25
|
var n;
|
|
25
|
-
const
|
|
26
|
-
return r && e in r ? r[e] :
|
|
26
|
+
const o = b(I), r = (n = o == null ? void 0 : o.pending) == null ? void 0 : n.values;
|
|
27
|
+
return r && e in r ? r[e] : s;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
const e = b(I),
|
|
29
|
+
function he() {
|
|
30
|
+
const e = b(I), s = X(), o = e == null ? void 0 : e.pending, { data: r, isLoading: n } = F({
|
|
30
31
|
queryKey: ["layout-editor", "field-impact", e == null ? void 0 : e.collection, e == null ? void 0 : e.field],
|
|
31
|
-
queryFn: () =>
|
|
32
|
-
|
|
33
|
-
).then((
|
|
34
|
-
enabled: !!
|
|
32
|
+
queryFn: () => s.request(
|
|
33
|
+
j(`/data-model/${e == null ? void 0 : e.collection}/fields/${encodeURIComponent((e == null ? void 0 : e.field) ?? "")}/impact`)
|
|
34
|
+
).then((c) => c.data ?? []),
|
|
35
|
+
enabled: !!o && !!e,
|
|
35
36
|
staleTime: 6e4
|
|
37
|
+
}), { data: l } = F({
|
|
38
|
+
queryKey: ["layout-editor", "field-impact-counts", e == null ? void 0 : e.collection, e == null ? void 0 : e.field],
|
|
39
|
+
queryFn: () => s.request(
|
|
40
|
+
j(`/data-model/${e == null ? void 0 : e.collection}/fields/${encodeURIComponent((e == null ? void 0 : e.field) ?? "")}/impact`, {
|
|
41
|
+
counts: "1"
|
|
42
|
+
})
|
|
43
|
+
).then((c) => c.records ?? null),
|
|
44
|
+
enabled: !!o && !!e,
|
|
45
|
+
staleTime: 6e4
|
|
46
|
+
});
|
|
47
|
+
if (!e || !o) return null;
|
|
48
|
+
const i = [
|
|
49
|
+
...new Set((r ?? []).filter((c) => c.source === "layout").map((c) => c.label))
|
|
50
|
+
], a = [
|
|
51
|
+
...new Set((r ?? []).filter((c) => c.source !== "layout").map((c) => c.label))
|
|
52
|
+
], d = i.slice(0, 8), m = Y({
|
|
53
|
+
fieldLabel: e.fieldLabel,
|
|
54
|
+
forms: i.map((c) => c.replace(/^Layout '(.*)'$/, "$1")),
|
|
55
|
+
records: l
|
|
36
56
|
});
|
|
37
|
-
|
|
38
|
-
const a = [
|
|
39
|
-
...new Set((r ?? []).filter((i) => i.source === "layout").map((i) => i.label))
|
|
40
|
-
], c = [
|
|
41
|
-
...new Set((r ?? []).filter((i) => i.source !== "layout").map((i) => i.label))
|
|
42
|
-
], s = a.slice(0, 8);
|
|
43
|
-
return /* @__PURE__ */ d(
|
|
57
|
+
return /* @__PURE__ */ u(
|
|
44
58
|
"div",
|
|
45
59
|
{
|
|
46
60
|
"data-setting": "inspector.global_confirm",
|
|
47
61
|
"data-global-confirm": "",
|
|
48
62
|
className: "mt-1.5 space-y-2 rounded-md border border-amber-300 bg-amber-50 p-2.5 text-[12px] text-amber-900 dark:border-amber-700/60 dark:bg-amber-950/40 dark:text-amber-100",
|
|
49
63
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ u("p", { className: "font-medium", children: [
|
|
51
65
|
"This changes ",
|
|
52
66
|
e.fieldLabel,
|
|
53
67
|
" on every form that shows it, not just this one."
|
|
54
68
|
] }),
|
|
55
|
-
|
|
56
|
-
n
|
|
69
|
+
o.labels.length > 1 && /* @__PURE__ */ t("ul", { "data-global-changes": "", className: "list-disc space-y-0.5 pl-4 text-[11px]", children: o.labels.map((c) => /* @__PURE__ */ t("li", { children: c }, c)) }),
|
|
70
|
+
!n && m && /* @__PURE__ */ t("p", { "data-global-reach": "", className: "text-[11px]", children: m }),
|
|
71
|
+
n ? /* @__PURE__ */ u("p", { className: "text-[11px] opacity-80", children: [
|
|
57
72
|
"Finding where ",
|
|
58
73
|
e.fieldLabel,
|
|
59
74
|
" is used…"
|
|
60
|
-
] }) : /* @__PURE__ */
|
|
61
|
-
|
|
75
|
+
] }) : /* @__PURE__ */ u("div", { className: "space-y-1 text-[11px]", children: [
|
|
76
|
+
d.length > 0 && /* @__PURE__ */ u("p", { children: [
|
|
62
77
|
"Forms of ",
|
|
63
78
|
e.collectionLabel,
|
|
64
79
|
": ",
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
d.join(", "),
|
|
81
|
+
i.length > d.length && ` and ${i.length - d.length} more`
|
|
67
82
|
] }),
|
|
68
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ u("p", { children: [
|
|
69
84
|
"Also the ",
|
|
70
85
|
e.collectionLabel,
|
|
71
86
|
" list and any API reader of this field."
|
|
72
87
|
] }),
|
|
73
|
-
|
|
88
|
+
a.length > 0 && /* @__PURE__ */ u("p", { className: "opacity-80", children: [
|
|
74
89
|
"Other references: ",
|
|
75
|
-
|
|
76
|
-
|
|
90
|
+
a.slice(0, 5).join(", "),
|
|
91
|
+
a.length > 5 && ` and ${a.length - 5} more`
|
|
77
92
|
] })
|
|
78
93
|
] }),
|
|
79
94
|
/* @__PURE__ */ t("p", { className: "text-[11px] opacity-80", children: "Undo does not reverse this." }),
|
|
80
95
|
e.error && /* @__PURE__ */ t("p", { className: "text-[11px] text-red-700 dark:text-red-300", children: e.error }),
|
|
81
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ u("div", { className: "flex gap-2", children: [
|
|
82
97
|
/* @__PURE__ */ t(
|
|
83
98
|
"button",
|
|
84
99
|
{
|
|
@@ -105,332 +120,332 @@ function fe() {
|
|
|
105
120
|
}
|
|
106
121
|
);
|
|
107
122
|
}
|
|
108
|
-
function
|
|
109
|
-
return e === "field" ? /* @__PURE__ */
|
|
123
|
+
function be({ scope: e }) {
|
|
124
|
+
return e === "field" ? /* @__PURE__ */ u(
|
|
110
125
|
"span",
|
|
111
126
|
{
|
|
112
127
|
"data-scope": "field",
|
|
113
128
|
"data-tip": "Saved on the field itself: every form that shows this field changes",
|
|
114
129
|
className: "inline-flex shrink-0 items-center gap-1 text-[11px] font-medium text-amber-700 dark:text-amber-300",
|
|
115
130
|
children: [
|
|
116
|
-
/* @__PURE__ */ t(
|
|
131
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-3" }),
|
|
117
132
|
"Every form"
|
|
118
133
|
]
|
|
119
134
|
}
|
|
120
135
|
) : /* @__PURE__ */ t("span", { "data-scope": "form", className: "sr-only", children: "This form only" });
|
|
121
136
|
}
|
|
122
|
-
function
|
|
123
|
-
return /* @__PURE__ */ t("p", { "data-scope-legend": "", className:
|
|
137
|
+
function Be({ field: e }) {
|
|
138
|
+
return /* @__PURE__ */ t("p", { "data-scope-legend": "", className: A, children: e ? /* @__PURE__ */ u(_, { children: [
|
|
124
139
|
"Changes here apply to this form only, except settings marked",
|
|
125
140
|
" ",
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */ t(
|
|
141
|
+
/* @__PURE__ */ u("span", { className: "inline-flex items-center gap-1 whitespace-nowrap font-medium text-amber-700 dark:text-amber-300", children: [
|
|
142
|
+
/* @__PURE__ */ t(R, { className: "h-3 w-3" }),
|
|
128
143
|
"Every form"
|
|
129
144
|
] }),
|
|
130
145
|
"."
|
|
131
146
|
] }) : "Changes here apply to this form only." });
|
|
132
147
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
135
|
-
return
|
|
148
|
+
const ge = "Enforced on the default form only";
|
|
149
|
+
function xe({ className: e }) {
|
|
150
|
+
return fe().defaultForm ? null : /* @__PURE__ */ t(
|
|
136
151
|
"p",
|
|
137
152
|
{
|
|
138
153
|
"data-setting": "inspector.enforcement_note",
|
|
139
154
|
"data-enforcement": "",
|
|
140
155
|
className: p("text-[12px] leading-snug text-amber-700 dark:text-amber-300", e),
|
|
141
156
|
"data-tip": "The server applies this from the active grouped layout. On this form it only works in the browser.",
|
|
142
|
-
children:
|
|
157
|
+
children: ge
|
|
143
158
|
}
|
|
144
159
|
);
|
|
145
160
|
}
|
|
146
|
-
function
|
|
161
|
+
function ve({
|
|
147
162
|
k: e,
|
|
148
|
-
label:
|
|
149
|
-
effect:
|
|
163
|
+
label: s,
|
|
164
|
+
effect: o,
|
|
150
165
|
scope: r = "form",
|
|
151
166
|
enforced: n,
|
|
152
|
-
inline:
|
|
153
|
-
confirmAt:
|
|
154
|
-
children:
|
|
155
|
-
className:
|
|
167
|
+
inline: l,
|
|
168
|
+
confirmAt: i,
|
|
169
|
+
children: a,
|
|
170
|
+
className: d
|
|
156
171
|
}) {
|
|
157
|
-
var
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
const f = /* @__PURE__ */
|
|
172
|
+
var N;
|
|
173
|
+
const m = b(I), c = b(B), g = ce(), y = c ? g.indexOf(e) : -1, h = y >= 0, x = c == null ? void 0 : c.register;
|
|
174
|
+
T(() => h && x ? x() : void 0, [h, x]);
|
|
175
|
+
const f = /* @__PURE__ */ u(
|
|
161
176
|
"div",
|
|
162
177
|
{
|
|
163
178
|
"data-setting": e,
|
|
164
179
|
"data-setting-row": "",
|
|
165
180
|
"data-setting-pinned": h ? "" : void 0,
|
|
166
|
-
style: h ? { order:
|
|
167
|
-
className: p("group/setting relative space-y-1.5",
|
|
181
|
+
style: h ? { order: y } : void 0,
|
|
182
|
+
className: p("group/setting relative space-y-1.5", d),
|
|
168
183
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */ t("span", { className:
|
|
172
|
-
/* @__PURE__ */ t(
|
|
184
|
+
/* @__PURE__ */ u("div", { className: "flex min-h-5 items-center justify-between gap-3", children: [
|
|
185
|
+
/* @__PURE__ */ u("span", { className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5", children: [
|
|
186
|
+
/* @__PURE__ */ t("span", { className: ue, children: s }),
|
|
187
|
+
/* @__PURE__ */ t(be, { scope: r })
|
|
173
188
|
] }),
|
|
174
|
-
|
|
189
|
+
l && /* @__PURE__ */ t("span", { className: "flex shrink-0 items-center", children: a })
|
|
175
190
|
] }),
|
|
176
|
-
!
|
|
177
|
-
/* @__PURE__ */ t("p", { "data-effect": "", className:
|
|
178
|
-
n && /* @__PURE__ */ t(
|
|
179
|
-
r === "field" && ((
|
|
180
|
-
|
|
191
|
+
!l && a,
|
|
192
|
+
/* @__PURE__ */ t("p", { "data-effect": "", className: A, children: o }),
|
|
193
|
+
n && /* @__PURE__ */ t(xe, {}),
|
|
194
|
+
r === "field" && ((N = m == null ? void 0 : m.pending) == null ? void 0 : N.key) === (i ?? e) && /* @__PURE__ */ t(he, {}),
|
|
195
|
+
c && /* @__PURE__ */ t(ye, { k: e, label: s, pinned: h })
|
|
181
196
|
]
|
|
182
197
|
}
|
|
183
198
|
);
|
|
184
|
-
return h && (
|
|
199
|
+
return h && (c != null && c.el) ? W(f, c.el) : f;
|
|
185
200
|
}
|
|
186
|
-
const
|
|
187
|
-
function
|
|
188
|
-
const r = typeof
|
|
201
|
+
const B = L(null);
|
|
202
|
+
function ye({ k: e, label: s, pinned: o }) {
|
|
203
|
+
const r = typeof s == "string" ? s : "this setting";
|
|
189
204
|
return /* @__PURE__ */ t(
|
|
190
205
|
"button",
|
|
191
206
|
{
|
|
192
207
|
type: "button",
|
|
193
208
|
"data-setting-pin": e,
|
|
194
|
-
"aria-pressed":
|
|
195
|
-
"aria-label":
|
|
196
|
-
"data-tip":
|
|
197
|
-
onClick: () =>
|
|
209
|
+
"aria-pressed": o,
|
|
210
|
+
"aria-label": o ? `Unpin ${r}` : `Pin ${r} to the top of this tab`,
|
|
211
|
+
"data-tip": o ? "Unpin" : "Pin to the top of this tab",
|
|
212
|
+
onClick: () => de(e),
|
|
198
213
|
className: p(
|
|
199
214
|
"absolute -left-[15px] top-0 inline-flex h-5 w-3.5 items-center justify-center rounded-sm text-slate-400 transition-colors hover:text-amber-500 focus-visible:visible focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-muted-foreground dark:hover:text-amber-300",
|
|
200
|
-
|
|
215
|
+
o ? "visible text-amber-500 dark:text-amber-300" : "invisible group-hover/setting:visible"
|
|
201
216
|
),
|
|
202
|
-
children: /* @__PURE__ */ t(U, { className: p("h-3 w-3",
|
|
217
|
+
children: /* @__PURE__ */ t(U, { className: p("h-3 w-3", o && "fill-current") })
|
|
203
218
|
}
|
|
204
219
|
);
|
|
205
220
|
}
|
|
206
|
-
function
|
|
207
|
-
const [
|
|
208
|
-
return /* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
221
|
+
function De({ children: e }) {
|
|
222
|
+
const [s, o] = v(null), [r, n] = v(0), l = Z(() => (n((a) => a + 1), () => n((a) => a - 1)), []), i = Q(() => ({ el: s, register: l }), [s, l]);
|
|
223
|
+
return /* @__PURE__ */ u(B.Provider, { value: i, children: [
|
|
224
|
+
/* @__PURE__ */ u(
|
|
210
225
|
"div",
|
|
211
226
|
{
|
|
212
227
|
"data-pinned-settings": r,
|
|
213
228
|
hidden: r === 0,
|
|
214
229
|
className: "space-y-3 border-b border-slate-100 pb-5 dark:border-border/60",
|
|
215
230
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ u("h3", { className: p(P, "flex items-center gap-1.5"), children: [
|
|
217
232
|
/* @__PURE__ */ t(U, { className: "h-3 w-3 fill-current text-amber-500 dark:text-amber-300" }),
|
|
218
233
|
"Pinned"
|
|
219
234
|
] }),
|
|
220
|
-
/* @__PURE__ */ t("div", { ref:
|
|
235
|
+
/* @__PURE__ */ t("div", { ref: o, className: "flex flex-col gap-5" })
|
|
221
236
|
]
|
|
222
237
|
}
|
|
223
238
|
),
|
|
224
239
|
e
|
|
225
240
|
] });
|
|
226
241
|
}
|
|
227
|
-
function
|
|
242
|
+
function Je({
|
|
228
243
|
k: e,
|
|
229
|
-
label:
|
|
230
|
-
effect:
|
|
244
|
+
label: s,
|
|
245
|
+
effect: o,
|
|
231
246
|
scope: r,
|
|
232
247
|
enforced: n,
|
|
233
|
-
checked:
|
|
234
|
-
onChange:
|
|
235
|
-
disabled:
|
|
236
|
-
confirmAt:
|
|
248
|
+
checked: l,
|
|
249
|
+
onChange: i,
|
|
250
|
+
disabled: a,
|
|
251
|
+
confirmAt: d
|
|
237
252
|
}) {
|
|
238
253
|
return /* @__PURE__ */ t(
|
|
239
|
-
|
|
254
|
+
ve,
|
|
240
255
|
{
|
|
241
256
|
k: e,
|
|
242
|
-
label:
|
|
243
|
-
effect:
|
|
257
|
+
label: s,
|
|
258
|
+
effect: o,
|
|
244
259
|
scope: r,
|
|
245
260
|
enforced: n,
|
|
246
|
-
confirmAt:
|
|
261
|
+
confirmAt: d,
|
|
247
262
|
inline: !0,
|
|
248
263
|
children: /* @__PURE__ */ t(
|
|
249
|
-
|
|
264
|
+
ie,
|
|
250
265
|
{
|
|
251
|
-
checked:
|
|
252
|
-
disabled:
|
|
253
|
-
onCheckedChange:
|
|
254
|
-
"aria-label": typeof
|
|
266
|
+
checked: l,
|
|
267
|
+
disabled: a,
|
|
268
|
+
onCheckedChange: i,
|
|
269
|
+
"aria-label": typeof s == "string" ? s : void 0,
|
|
255
270
|
className: "h-[18px] w-8 border-0 data-[state=checked]:bg-nvr-cyan data-[state=unchecked]:bg-slate-300 dark:data-[state=unchecked]:bg-slate-600 [&>span]:mx-0.5 [&>span]:h-3.5 [&>span]:w-3.5 [&>span]:bg-white [&>span]:shadow-sm [&>span]:data-[state=checked]:translate-x-3.5"
|
|
256
271
|
}
|
|
257
272
|
)
|
|
258
273
|
}
|
|
259
274
|
);
|
|
260
275
|
}
|
|
261
|
-
const
|
|
276
|
+
const D = C;
|
|
262
277
|
function Ne({
|
|
263
278
|
value: e,
|
|
264
|
-
onChange:
|
|
265
|
-
placeholder:
|
|
279
|
+
onChange: s,
|
|
280
|
+
placeholder: o,
|
|
266
281
|
mono: r,
|
|
267
282
|
disabled: n,
|
|
268
|
-
type:
|
|
269
|
-
ariaLabel:
|
|
283
|
+
type: l = "text",
|
|
284
|
+
ariaLabel: i
|
|
270
285
|
}) {
|
|
271
|
-
const
|
|
286
|
+
const a = b(S), d = k(e, () => a == null ? void 0 : a.flush());
|
|
272
287
|
return /* @__PURE__ */ t(
|
|
273
288
|
"input",
|
|
274
289
|
{
|
|
275
|
-
type:
|
|
276
|
-
value:
|
|
290
|
+
type: l,
|
|
291
|
+
value: d.value,
|
|
277
292
|
disabled: n,
|
|
278
|
-
"aria-label":
|
|
279
|
-
placeholder:
|
|
280
|
-
onChange: (
|
|
281
|
-
|
|
293
|
+
"aria-label": i,
|
|
294
|
+
placeholder: o,
|
|
295
|
+
onChange: (m) => {
|
|
296
|
+
d.set(m.target.value), s(m.target.value);
|
|
282
297
|
},
|
|
283
|
-
onKeyDown: (
|
|
284
|
-
|
|
298
|
+
onKeyDown: (m) => {
|
|
299
|
+
m.key === "Enter" && (a == null || a.flush());
|
|
285
300
|
},
|
|
286
|
-
...
|
|
287
|
-
className: p(
|
|
301
|
+
...d.props,
|
|
302
|
+
className: p(D, r && "font-mono")
|
|
288
303
|
}
|
|
289
304
|
);
|
|
290
305
|
}
|
|
291
|
-
function
|
|
306
|
+
function _e({
|
|
292
307
|
value: e,
|
|
293
|
-
onChange:
|
|
294
|
-
ariaLabel:
|
|
308
|
+
onChange: s,
|
|
309
|
+
ariaLabel: o,
|
|
295
310
|
rows: r = 4,
|
|
296
311
|
mono: n
|
|
297
312
|
}) {
|
|
298
|
-
const
|
|
313
|
+
const l = b(S), i = k(e, () => l == null ? void 0 : l.flush());
|
|
299
314
|
return /* @__PURE__ */ t(
|
|
300
315
|
"textarea",
|
|
301
316
|
{
|
|
302
|
-
"aria-label":
|
|
317
|
+
"aria-label": o,
|
|
303
318
|
rows: r,
|
|
304
|
-
value:
|
|
305
|
-
onChange: (
|
|
306
|
-
|
|
319
|
+
value: i.value,
|
|
320
|
+
onChange: (a) => {
|
|
321
|
+
i.set(a.target.value), s(a.target.value);
|
|
307
322
|
},
|
|
308
|
-
...
|
|
323
|
+
...i.props,
|
|
309
324
|
className: p(C, "h-auto py-1.5 leading-snug", n && "font-mono text-[12px]")
|
|
310
325
|
}
|
|
311
326
|
);
|
|
312
327
|
}
|
|
313
|
-
function
|
|
328
|
+
function Ge({
|
|
314
329
|
value: e,
|
|
315
|
-
children:
|
|
316
|
-
className:
|
|
330
|
+
children: s,
|
|
331
|
+
className: o
|
|
317
332
|
}) {
|
|
318
|
-
const r = b(
|
|
333
|
+
const r = b(S), n = k(e, () => r == null ? void 0 : r.flush());
|
|
319
334
|
return /* @__PURE__ */ t(
|
|
320
335
|
"div",
|
|
321
336
|
{
|
|
322
|
-
className:
|
|
337
|
+
className: o,
|
|
323
338
|
...n.props,
|
|
324
|
-
onKeyDownCapture: (
|
|
325
|
-
|
|
339
|
+
onKeyDownCapture: (l) => {
|
|
340
|
+
l.key === "Enter" && l.target.tagName === "INPUT" && (r == null || r.flush());
|
|
326
341
|
},
|
|
327
|
-
children:
|
|
342
|
+
children: s(n.value, (l) => (n.set(l), l))
|
|
328
343
|
}
|
|
329
344
|
);
|
|
330
345
|
}
|
|
331
|
-
function
|
|
346
|
+
function Ke({
|
|
332
347
|
value: e,
|
|
333
|
-
onCommit:
|
|
334
|
-
placeholder:
|
|
348
|
+
onCommit: s,
|
|
349
|
+
placeholder: o,
|
|
335
350
|
mono: r,
|
|
336
351
|
ariaLabel: n
|
|
337
352
|
}) {
|
|
338
|
-
const
|
|
353
|
+
const l = k(e);
|
|
339
354
|
return /* @__PURE__ */ t(
|
|
340
355
|
"input",
|
|
341
356
|
{
|
|
342
|
-
value:
|
|
357
|
+
value: l.value,
|
|
343
358
|
"aria-label": n,
|
|
344
|
-
placeholder:
|
|
345
|
-
onChange: (
|
|
346
|
-
|
|
359
|
+
placeholder: o,
|
|
360
|
+
onChange: (i) => {
|
|
361
|
+
l.set(i.target.value), s(i.target.value);
|
|
347
362
|
},
|
|
348
|
-
...
|
|
349
|
-
className: p(
|
|
363
|
+
...l.props,
|
|
364
|
+
className: p(D, r && "font-mono")
|
|
350
365
|
}
|
|
351
366
|
);
|
|
352
367
|
}
|
|
353
|
-
function
|
|
368
|
+
function Me({
|
|
354
369
|
value: e,
|
|
355
|
-
options:
|
|
356
|
-
onChange:
|
|
370
|
+
options: s,
|
|
371
|
+
onChange: o,
|
|
357
372
|
disabled: r
|
|
358
373
|
}) {
|
|
359
|
-
return /* @__PURE__ */ t("div", { className:
|
|
374
|
+
return /* @__PURE__ */ t("div", { className: pe(s.length), children: s.map((n) => /* @__PURE__ */ t(
|
|
360
375
|
"button",
|
|
361
376
|
{
|
|
362
377
|
type: "button",
|
|
363
378
|
"aria-pressed": n.value === e,
|
|
364
379
|
disabled: r,
|
|
365
380
|
"data-tip": n.tip,
|
|
366
|
-
onClick: () =>
|
|
367
|
-
className:
|
|
381
|
+
onClick: () => o(n.value),
|
|
382
|
+
className: me(n.value === e),
|
|
368
383
|
children: n.label
|
|
369
384
|
},
|
|
370
385
|
n.value
|
|
371
386
|
)) });
|
|
372
387
|
}
|
|
373
|
-
function
|
|
388
|
+
function q({
|
|
374
389
|
value: e,
|
|
375
|
-
options:
|
|
376
|
-
onChange:
|
|
390
|
+
options: s,
|
|
391
|
+
onChange: o,
|
|
377
392
|
ariaLabel: r,
|
|
378
393
|
disabled: n,
|
|
379
|
-
unknownLabel:
|
|
394
|
+
unknownLabel: l = (i) => i
|
|
380
395
|
}) {
|
|
381
|
-
const
|
|
396
|
+
const i = e && !s.some((a) => a.value === e) ? [...s, { value: e, label: l(e) }] : s;
|
|
382
397
|
return /* @__PURE__ */ t(
|
|
383
398
|
oe,
|
|
384
399
|
{
|
|
385
400
|
value: e,
|
|
386
|
-
onChange:
|
|
387
|
-
options:
|
|
401
|
+
onChange: o,
|
|
402
|
+
options: i,
|
|
388
403
|
ariaLabel: r,
|
|
389
404
|
disabled: n,
|
|
390
405
|
className: p(C, "focus:ring-0 focus:ring-offset-0")
|
|
391
406
|
}
|
|
392
407
|
);
|
|
393
408
|
}
|
|
394
|
-
function
|
|
409
|
+
function Ve({
|
|
395
410
|
value: e,
|
|
396
|
-
onCommit:
|
|
397
|
-
placeholder:
|
|
411
|
+
onCommit: s,
|
|
412
|
+
placeholder: o,
|
|
398
413
|
rows: r = 4,
|
|
399
414
|
validate: n,
|
|
400
|
-
ariaLabel:
|
|
415
|
+
ariaLabel: l
|
|
401
416
|
}) {
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
g.current || (i
|
|
405
|
-
}, [
|
|
406
|
-
const
|
|
407
|
-
const
|
|
408
|
-
if (!
|
|
417
|
+
const i = e == null ? "" : JSON.stringify(e, null, 2), [a, d] = v(i), [m, c] = v(null), g = $(!1);
|
|
418
|
+
T(() => {
|
|
419
|
+
g.current || (d(i), c(null));
|
|
420
|
+
}, [i]);
|
|
421
|
+
const y = (f) => {
|
|
422
|
+
const N = f.trim();
|
|
423
|
+
if (!N) return e != null ? { send: void 0 } : { error: null };
|
|
409
424
|
try {
|
|
410
|
-
const
|
|
411
|
-
return
|
|
425
|
+
const w = JSON.parse(N), E = (n == null ? void 0 : n(w)) ?? null;
|
|
426
|
+
return E ? { error: E } : JSON.stringify(w) !== JSON.stringify(e) ? { send: w } : { error: null };
|
|
412
427
|
} catch {
|
|
413
428
|
return { error: "Not valid JSON — nothing saved" };
|
|
414
429
|
}
|
|
415
430
|
}, h = () => {
|
|
416
|
-
const f =
|
|
417
|
-
"send" in f ? (
|
|
418
|
-
}, x =
|
|
431
|
+
const f = y(a);
|
|
432
|
+
"send" in f ? (c(null), s(f.send)) : c(f.error);
|
|
433
|
+
}, x = $(() => {
|
|
419
434
|
});
|
|
420
435
|
return x.current = () => {
|
|
421
436
|
if (!g.current) return;
|
|
422
|
-
const f =
|
|
423
|
-
"send" in f &&
|
|
424
|
-
},
|
|
437
|
+
const f = y(a);
|
|
438
|
+
"send" in f && s(f.send);
|
|
439
|
+
}, T(() => () => x.current(), []), /* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
425
440
|
/* @__PURE__ */ t(
|
|
426
441
|
"textarea",
|
|
427
442
|
{
|
|
428
|
-
value:
|
|
443
|
+
value: a,
|
|
429
444
|
rows: r,
|
|
430
|
-
"aria-label":
|
|
445
|
+
"aria-label": l,
|
|
431
446
|
spellCheck: !1,
|
|
432
|
-
placeholder:
|
|
433
|
-
onChange: (f) =>
|
|
447
|
+
placeholder: o,
|
|
448
|
+
onChange: (f) => d(f.target.value),
|
|
434
449
|
onFocus: () => {
|
|
435
450
|
g.current = !0;
|
|
436
451
|
},
|
|
@@ -439,73 +454,73 @@ function Ke({
|
|
|
439
454
|
},
|
|
440
455
|
className: p(
|
|
441
456
|
"w-full rounded-md border bg-white px-2.5 py-1.5 font-mono text-[12px] leading-snug text-foreground placeholder:text-slate-400 focus:outline-none dark:bg-background",
|
|
442
|
-
|
|
457
|
+
m ? "border-red-400 dark:border-red-500" : "border-slate-200 focus:border-nvr-cyan dark:border-border"
|
|
443
458
|
)
|
|
444
459
|
}
|
|
445
460
|
),
|
|
446
|
-
|
|
461
|
+
m && /* @__PURE__ */ t("p", { className: "text-[12px] text-red-600 dark:text-red-400", children: m })
|
|
447
462
|
] });
|
|
448
463
|
}
|
|
449
|
-
function
|
|
464
|
+
function Ze({
|
|
450
465
|
title: e,
|
|
451
|
-
children:
|
|
452
|
-
className:
|
|
466
|
+
children: s,
|
|
467
|
+
className: o,
|
|
453
468
|
collapsible: r,
|
|
454
469
|
defaultOpen: n = !1
|
|
455
470
|
}) {
|
|
456
|
-
const [
|
|
457
|
-
return /* @__PURE__ */
|
|
471
|
+
const [l, i] = v(!r || n);
|
|
472
|
+
return /* @__PURE__ */ u(
|
|
458
473
|
"section",
|
|
459
474
|
{
|
|
460
475
|
className: p(
|
|
461
476
|
"space-y-4 border-t border-slate-100 pt-5 dark:border-border/60",
|
|
462
|
-
r && !
|
|
463
|
-
|
|
477
|
+
r && !l && "space-y-0",
|
|
478
|
+
o
|
|
464
479
|
),
|
|
465
480
|
children: [
|
|
466
|
-
r ? /* @__PURE__ */
|
|
481
|
+
r ? /* @__PURE__ */ u(
|
|
467
482
|
"button",
|
|
468
483
|
{
|
|
469
484
|
type: "button",
|
|
470
|
-
"aria-expanded":
|
|
485
|
+
"aria-expanded": l,
|
|
471
486
|
"data-section-toggle": "",
|
|
472
|
-
onClick: () =>
|
|
487
|
+
onClick: () => i((a) => !a),
|
|
473
488
|
className: p(
|
|
474
|
-
|
|
489
|
+
P,
|
|
475
490
|
"-mx-1 flex w-[calc(100%+0.5rem)] items-center gap-1.5 rounded px-1 text-left hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:hover:bg-muted/60"
|
|
476
491
|
),
|
|
477
492
|
children: [
|
|
478
493
|
/* @__PURE__ */ t(
|
|
479
|
-
|
|
494
|
+
G,
|
|
480
495
|
{
|
|
481
496
|
className: p(
|
|
482
497
|
"h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150",
|
|
483
|
-
|
|
498
|
+
l && "rotate-90"
|
|
484
499
|
)
|
|
485
500
|
}
|
|
486
501
|
),
|
|
487
502
|
e
|
|
488
503
|
]
|
|
489
504
|
}
|
|
490
|
-
) : /* @__PURE__ */ t("h3", { className:
|
|
491
|
-
/* @__PURE__ */ t("div", { hidden: !
|
|
505
|
+
) : /* @__PURE__ */ t("h3", { className: P, children: e }),
|
|
506
|
+
/* @__PURE__ */ t("div", { hidden: !l, className: "space-y-5", children: s })
|
|
492
507
|
]
|
|
493
508
|
}
|
|
494
509
|
);
|
|
495
510
|
}
|
|
496
|
-
function
|
|
511
|
+
function Qe({
|
|
497
512
|
value: e,
|
|
498
|
-
options:
|
|
499
|
-
onChange:
|
|
513
|
+
options: s,
|
|
514
|
+
onChange: o,
|
|
500
515
|
placeholder: r = "None selected",
|
|
501
516
|
ariaLabel: n
|
|
502
517
|
}) {
|
|
503
|
-
const [
|
|
504
|
-
var
|
|
505
|
-
return ((
|
|
518
|
+
const [l, i] = v(!1), a = (d) => {
|
|
519
|
+
var m;
|
|
520
|
+
return ((m = s.find((c) => c.value === d)) == null ? void 0 : m.label) ?? d;
|
|
506
521
|
};
|
|
507
|
-
return /* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */ t(
|
|
522
|
+
return /* @__PURE__ */ u(ae, { open: l, onOpenChange: i, children: [
|
|
523
|
+
/* @__PURE__ */ t(se, { asChild: !0, children: /* @__PURE__ */ u(
|
|
509
524
|
"button",
|
|
510
525
|
{
|
|
511
526
|
type: "button",
|
|
@@ -515,35 +530,35 @@ function Ve({
|
|
|
515
530
|
"flex items-center justify-between text-left hover:border-slate-300"
|
|
516
531
|
),
|
|
517
532
|
children: [
|
|
518
|
-
/* @__PURE__ */ t("span", { className: p("truncate", !e.length && "text-slate-400"), children: e.length ? e.map(
|
|
519
|
-
/* @__PURE__ */ t(
|
|
533
|
+
/* @__PURE__ */ t("span", { className: p("truncate", !e.length && "text-slate-400"), children: e.length ? e.map(a).join(", ") : r }),
|
|
534
|
+
/* @__PURE__ */ t(K, { className: "ml-1 h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
520
535
|
]
|
|
521
536
|
}
|
|
522
537
|
) }),
|
|
523
|
-
/* @__PURE__ */ t(
|
|
524
|
-
/* @__PURE__ */ t(
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */ t(
|
|
527
|
-
/* @__PURE__ */ t(
|
|
528
|
-
const
|
|
529
|
-
return /* @__PURE__ */
|
|
530
|
-
|
|
538
|
+
/* @__PURE__ */ t(le, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ u(H, { children: [
|
|
539
|
+
/* @__PURE__ */ t(z, { placeholder: "Search fields…", className: "h-8 text-[12px]" }),
|
|
540
|
+
/* @__PURE__ */ u(ee, { className: "max-h-[240px]", children: [
|
|
541
|
+
/* @__PURE__ */ t(te, { className: "py-3 text-center text-[12px] text-muted-foreground", children: "No fields" }),
|
|
542
|
+
/* @__PURE__ */ t(ne, { children: s.map((d) => {
|
|
543
|
+
const m = e.includes(d.value);
|
|
544
|
+
return /* @__PURE__ */ u(
|
|
545
|
+
re,
|
|
531
546
|
{
|
|
532
|
-
value: `${
|
|
533
|
-
onSelect: () =>
|
|
547
|
+
value: `${d.label} ${d.value}`,
|
|
548
|
+
onSelect: () => o(m ? e.filter((c) => c !== d.value) : [...e, d.value]),
|
|
534
549
|
className: "flex items-center gap-2 text-[12px]",
|
|
535
550
|
children: [
|
|
536
551
|
/* @__PURE__ */ t(
|
|
537
|
-
|
|
552
|
+
M,
|
|
538
553
|
{
|
|
539
|
-
className: p("h-3 w-3 shrink-0",
|
|
554
|
+
className: p("h-3 w-3 shrink-0", m ? "opacity-100" : "opacity-0")
|
|
540
555
|
}
|
|
541
556
|
),
|
|
542
|
-
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children:
|
|
543
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[11px] text-slate-400", children:
|
|
557
|
+
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children: d.label }),
|
|
558
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[11px] text-slate-400", children: d.hint ?? d.value })
|
|
544
559
|
]
|
|
545
560
|
},
|
|
546
|
-
|
|
561
|
+
d.value
|
|
547
562
|
);
|
|
548
563
|
}) })
|
|
549
564
|
] })
|
|
@@ -555,34 +570,34 @@ const O = [
|
|
|
555
570
|
{ value: "neq", label: "is not" },
|
|
556
571
|
{ value: "nnull", label: "is set" }
|
|
557
572
|
];
|
|
558
|
-
function
|
|
573
|
+
function We({
|
|
559
574
|
value: e,
|
|
560
|
-
fields:
|
|
561
|
-
onChange:
|
|
575
|
+
fields: s,
|
|
576
|
+
onChange: o
|
|
562
577
|
}) {
|
|
563
|
-
const r = (n,
|
|
564
|
-
return /* @__PURE__ */
|
|
565
|
-
e.map((n,
|
|
566
|
-
const
|
|
578
|
+
const r = (n, l) => o(e.map((i, a) => a === n ? { ...i, ...l } : i));
|
|
579
|
+
return /* @__PURE__ */ u("div", { className: "space-y-1.5", children: [
|
|
580
|
+
e.map((n, l) => {
|
|
581
|
+
const i = O.some((a) => a.value === n.op) ? O : [...O, { value: n.op, label: n.op }];
|
|
567
582
|
return (
|
|
568
583
|
// biome-ignore lint/suspicious/noArrayIndexKey: conditions are positional
|
|
569
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-1", "data-condition-row": "", children: [
|
|
570
585
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-[3]", children: /* @__PURE__ */ t(
|
|
571
|
-
|
|
586
|
+
q,
|
|
572
587
|
{
|
|
573
588
|
value: n.field,
|
|
574
589
|
ariaLabel: "Field",
|
|
575
|
-
options: [{ value: "", label: "Field…" }, ...
|
|
576
|
-
onChange: (
|
|
590
|
+
options: [{ value: "", label: "Field…" }, ...s],
|
|
591
|
+
onChange: (a) => r(l, { field: a })
|
|
577
592
|
}
|
|
578
593
|
) }),
|
|
579
594
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-[2]", children: /* @__PURE__ */ t(
|
|
580
|
-
|
|
595
|
+
q,
|
|
581
596
|
{
|
|
582
597
|
value: n.op,
|
|
583
598
|
ariaLabel: "Condition",
|
|
584
|
-
options:
|
|
585
|
-
onChange: (
|
|
599
|
+
options: i,
|
|
600
|
+
onChange: (a) => r(l, a === "nnull" ? { op: a, value: void 0 } : { op: a })
|
|
586
601
|
}
|
|
587
602
|
) }),
|
|
588
603
|
n.op !== "nnull" && n.op !== "null" && /* @__PURE__ */ t("div", { className: "min-w-0 flex-[2]", children: /* @__PURE__ */ t(
|
|
@@ -591,7 +606,7 @@ function Ze({
|
|
|
591
606
|
value: n.value == null ? "" : String(n.value),
|
|
592
607
|
ariaLabel: "Value",
|
|
593
608
|
placeholder: "value",
|
|
594
|
-
onChange: (
|
|
609
|
+
onChange: (a) => r(l, { value: a })
|
|
595
610
|
}
|
|
596
611
|
) }),
|
|
597
612
|
/* @__PURE__ */ t(
|
|
@@ -600,54 +615,54 @@ function Ze({
|
|
|
600
615
|
type: "button",
|
|
601
616
|
"aria-label": "Remove condition",
|
|
602
617
|
"data-tip": "Remove condition",
|
|
603
|
-
onClick: () =>
|
|
618
|
+
onClick: () => o(e.filter((a, d) => d !== l)),
|
|
604
619
|
className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded text-slate-500 transition-colors hover:bg-slate-100 hover:text-red-600 dark:hover:bg-muted dark:hover:text-red-400",
|
|
605
|
-
children: /* @__PURE__ */ t(
|
|
620
|
+
children: /* @__PURE__ */ t(V, { className: "h-3.5 w-3.5" })
|
|
606
621
|
}
|
|
607
622
|
)
|
|
608
|
-
] },
|
|
623
|
+
] }, l)
|
|
609
624
|
);
|
|
610
625
|
}),
|
|
611
626
|
/* @__PURE__ */ t(
|
|
612
627
|
"button",
|
|
613
628
|
{
|
|
614
629
|
type: "button",
|
|
615
|
-
onClick: () =>
|
|
616
|
-
className:
|
|
630
|
+
onClick: () => o([...e, { field: "", op: "eq", value: "" }]),
|
|
631
|
+
className: J,
|
|
617
632
|
children: "+ Add condition"
|
|
618
633
|
}
|
|
619
634
|
)
|
|
620
635
|
] });
|
|
621
636
|
}
|
|
622
|
-
const
|
|
623
|
-
function
|
|
624
|
-
return /* @__PURE__ */ t("button", { type: "button", onClick: e, className:
|
|
637
|
+
const J = "text-[12px] font-medium text-sky-700 hover:underline dark:text-nvr-cyan";
|
|
638
|
+
function Xe({ onClick: e, children: s }) {
|
|
639
|
+
return /* @__PURE__ */ t("button", { type: "button", onClick: e, className: J, children: s });
|
|
625
640
|
}
|
|
626
641
|
export {
|
|
627
|
-
|
|
628
|
-
|
|
642
|
+
Xe as AddButton,
|
|
643
|
+
Ge as Buffered,
|
|
629
644
|
O as CONDITION_OPS,
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
645
|
+
q as Choice,
|
|
646
|
+
We as ConditionBuilder,
|
|
647
|
+
ge as DEFAULT_FORM_ONLY,
|
|
648
|
+
Ke as DraftInput,
|
|
649
|
+
xe as EnforcementNote,
|
|
650
|
+
Qe as FieldMultiPicker,
|
|
651
|
+
he as GlobalConfirm,
|
|
637
652
|
I as GlobalWriterContext,
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
653
|
+
S as InspectorEnvContext,
|
|
654
|
+
Ve as JsonInput,
|
|
655
|
+
De as PinZone,
|
|
656
|
+
Be as ScopeLegend,
|
|
657
|
+
be as ScopeTag,
|
|
658
|
+
Ze as Section,
|
|
659
|
+
Me as Segmented,
|
|
660
|
+
ve as Setting,
|
|
661
|
+
_e as TextArea,
|
|
647
662
|
Ne as TextInput,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
663
|
+
Je as Toggle,
|
|
664
|
+
J as addLinkCls,
|
|
665
|
+
D as inputCls,
|
|
666
|
+
Ae as useGlobalValue,
|
|
667
|
+
fe as useInspectorEnv
|
|
653
668
|
};
|