@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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { isCanvasSlot as K, UNGROUPED_KEY as $ } from "../../../lib/layout-ops.js";
|
|
2
|
+
import { titleCase as v } from "../../../lib/utils.js";
|
|
3
|
+
import { normalizedBundle as P, inPageOrder as M } from "../field-zones.js";
|
|
4
|
+
import { readOverrides as g, withKey as R } from "../inspector/model.js";
|
|
5
|
+
import { refuse as W, checked as C, groupsInPageOrder as L } from "../structure-ops.js";
|
|
6
|
+
const s = (l) => typeof l == "string" && l !== "" ? l : null, y = (l) => l.replace(/\r\n?/g, `
|
|
7
|
+
`).trim(), U = (l, n) => `f:${l}:${n ?? ""}`;
|
|
8
|
+
function O(l) {
|
|
9
|
+
if (l.startsWith("s:")) return { kind: "section", group: l.slice(2) };
|
|
10
|
+
const n = /^f:([^:]+):(.*)$/.exec(l);
|
|
11
|
+
return n ? { kind: "field", field: n[1], group: n[2] === "" ? null : n[2] } : null;
|
|
12
|
+
}
|
|
13
|
+
function S(l, n) {
|
|
14
|
+
const i = g(l);
|
|
15
|
+
return {
|
|
16
|
+
label: s(i.label) ?? s(l.label_override) ?? s(n == null ? void 0 : n.label) ?? v(l.field),
|
|
17
|
+
help: s(i.note) ?? s(n == null ? void 0 : n.note) ?? "",
|
|
18
|
+
placeholder: s(i.placeholder) ?? s(n == null ? void 0 : n.placeholder) ?? "",
|
|
19
|
+
ownLabel: s(i.label) !== null || s(l.label_override) !== null,
|
|
20
|
+
ownHelp: s(i.note) !== null,
|
|
21
|
+
ownPlaceholder: s(i.placeholder) !== null
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function x(l, n = []) {
|
|
25
|
+
const i = P(l), h = new Map(n.map((e) => [e.field, e])), f = new Map(L(i).map((e) => [e.key, e])), u = [], c = /* @__PURE__ */ new Set(), b = (e) => {
|
|
26
|
+
var o;
|
|
27
|
+
return e === null || e === $ ? "Ungrouped" : e === "__header__" ? "Header strip" : ((o = f.get(e)) == null ? void 0 : o.label) ?? v(e);
|
|
28
|
+
};
|
|
29
|
+
for (const e of M(
|
|
30
|
+
i,
|
|
31
|
+
i.placements.filter((o) => !K(o) && !o.field.startsWith("__"))
|
|
32
|
+
)) {
|
|
33
|
+
const o = e.group_key;
|
|
34
|
+
if (o && o !== "__header__" && o !== $ && !c.has(o) && f.has(o)) {
|
|
35
|
+
c.add(o);
|
|
36
|
+
const r = f.get(o);
|
|
37
|
+
r && u.push({
|
|
38
|
+
key: `s:${o}`,
|
|
39
|
+
kind: "section",
|
|
40
|
+
section: r.label,
|
|
41
|
+
field: "",
|
|
42
|
+
label: r.label,
|
|
43
|
+
help: "",
|
|
44
|
+
placeholder: ""
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const t = S(e, h.get(e.field));
|
|
48
|
+
u.push({
|
|
49
|
+
key: U(e.field, o),
|
|
50
|
+
kind: "field",
|
|
51
|
+
section: b(o),
|
|
52
|
+
field: e.field,
|
|
53
|
+
label: t.label,
|
|
54
|
+
help: t.help,
|
|
55
|
+
placeholder: t.placeholder
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return u;
|
|
59
|
+
}
|
|
60
|
+
const D = {
|
|
61
|
+
label: "Label",
|
|
62
|
+
help: "Help text",
|
|
63
|
+
placeholder: "Placeholder"
|
|
64
|
+
}, B = (l) => D[l];
|
|
65
|
+
function G(l, n, i) {
|
|
66
|
+
const h = P(l), f = new Map(n.map((t) => [t.field, t])), u = new Map(x(l, n).map((t) => [t.key, t])), c = [], b = [];
|
|
67
|
+
let e = 0, o = 0;
|
|
68
|
+
for (const t of i) {
|
|
69
|
+
const r = u.get(t.key), p = O(t.key);
|
|
70
|
+
if (!r || !p) {
|
|
71
|
+
e++;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const w = p.kind === "section" ? `Section ${r.label}` : `${r.label} · ${r.section}`;
|
|
75
|
+
let a = !1;
|
|
76
|
+
const d = (m, _, k, H) => {
|
|
77
|
+
if (y(_) !== y(k) && !(y(k) === "" && !H)) {
|
|
78
|
+
if (m === "label" && y(k) === "" && p.kind === "section") {
|
|
79
|
+
b.push(`${r.label}: a section needs a name`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
a = !0, c.push({
|
|
83
|
+
id: `${t.key}|${m}`,
|
|
84
|
+
key: t.key,
|
|
85
|
+
prop: m,
|
|
86
|
+
where: w,
|
|
87
|
+
before: _,
|
|
88
|
+
after: y(k)
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
if (p.kind === "section")
|
|
93
|
+
d("label", r.label, t.label, !0);
|
|
94
|
+
else {
|
|
95
|
+
const m = h.placements.find(
|
|
96
|
+
(k) => k.field === p.field && k.group_key === p.group
|
|
97
|
+
);
|
|
98
|
+
if (!m) {
|
|
99
|
+
e++;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const _ = S(m, f.get(m.field));
|
|
103
|
+
d("label", r.label, t.label, _.ownLabel), d("help", r.help, t.help, _.ownHelp), d("placeholder", r.placeholder, t.placeholder, _.ownPlaceholder);
|
|
104
|
+
}
|
|
105
|
+
a || o++;
|
|
106
|
+
}
|
|
107
|
+
return { changes: c, unknown: e, skipped: b, same: o };
|
|
108
|
+
}
|
|
109
|
+
function I(l, n) {
|
|
110
|
+
var u;
|
|
111
|
+
if (n.length === 0) return W("Pick at least one change");
|
|
112
|
+
const i = [], h = /* @__PURE__ */ new Map();
|
|
113
|
+
for (const c of n) h.set(c.key, [...h.get(c.key) ?? [], c]);
|
|
114
|
+
for (const [c, b] of h) {
|
|
115
|
+
const e = O(c);
|
|
116
|
+
if (!e) continue;
|
|
117
|
+
if (e.kind === "section") {
|
|
118
|
+
const a = (u = b.find((d) => d.prop === "label")) == null ? void 0 : u.after;
|
|
119
|
+
a && i.push({ op: "group_update", key: e.group, patch: { label: a } });
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const o = l.placements.find(
|
|
123
|
+
(a) => a.field === e.field && a.group_key === e.group
|
|
124
|
+
);
|
|
125
|
+
if (!o) continue;
|
|
126
|
+
let t = g(o);
|
|
127
|
+
const r = {};
|
|
128
|
+
let p = !1;
|
|
129
|
+
const w = (a, d) => {
|
|
130
|
+
t = R(t ?? {}, a, d === "" ? void 0 : d), p = !0;
|
|
131
|
+
};
|
|
132
|
+
for (const a of b)
|
|
133
|
+
a.prop === "label" ? s(g(o).label) === null && s(o.label_override) !== null ? r.label_override = a.after === "" ? null : a.after : w("label", a.after) : w(a.prop === "help" ? "note" : "placeholder", a.after);
|
|
134
|
+
p && (r.overrides = t), i.push({
|
|
135
|
+
op: "update_placement",
|
|
136
|
+
at: { field: e.field, group_key: e.group },
|
|
137
|
+
patch: r
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
const f = n.length;
|
|
141
|
+
return C(l, {
|
|
142
|
+
ok: !0,
|
|
143
|
+
ops: i,
|
|
144
|
+
label: `Apply ${f} ${f === 1 ? "change" : "changes"} from the help text sheet`,
|
|
145
|
+
notes: []
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
G as diffHelpSheet,
|
|
150
|
+
I as helpSheetPlan,
|
|
151
|
+
x as helpSheetRows,
|
|
152
|
+
U as placementKey,
|
|
153
|
+
B as propWord
|
|
154
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
async function r(e) {
|
|
2
|
+
let a = `Something went wrong (${e.status})`;
|
|
3
|
+
try {
|
|
4
|
+
const t = await e.json();
|
|
5
|
+
t.error && (a = t.error);
|
|
6
|
+
} catch {
|
|
7
|
+
}
|
|
8
|
+
return new Error(a);
|
|
9
|
+
}
|
|
10
|
+
function s(e, a) {
|
|
11
|
+
const t = /filename="([^"]+)"/.exec(e.headers.get("Content-Disposition") ?? "");
|
|
12
|
+
return (t == null ? void 0 : t[1]) ?? a;
|
|
13
|
+
}
|
|
14
|
+
async function i(e, a, t) {
|
|
15
|
+
const o = await fetch(`${e.apiBase}${a}`, {
|
|
16
|
+
headers: e.authHeaders,
|
|
17
|
+
credentials: e.credentials
|
|
18
|
+
});
|
|
19
|
+
if (!o.ok) throw await r(o);
|
|
20
|
+
return { blob: await o.blob(), filename: s(o, t) };
|
|
21
|
+
}
|
|
22
|
+
async function l(e, a, t, o) {
|
|
23
|
+
const n = await fetch(`${e.apiBase}${a}`, {
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: { ...e.authHeaders, "Content-Type": "application/json" },
|
|
26
|
+
credentials: e.credentials,
|
|
27
|
+
body: JSON.stringify(t)
|
|
28
|
+
});
|
|
29
|
+
if (!n.ok) throw await r(n);
|
|
30
|
+
return { blob: await n.blob(), filename: s(n, o) };
|
|
31
|
+
}
|
|
32
|
+
const d = (e, a) => i(e, `/collection-layouts/${a}/spreadsheet-template`, "template.xlsx"), h = (e, a, t = 5e3) => l(e, `/collection-layouts/${a}/spreadsheet-export`, { limit: t }, "records.xlsx"), p = (e, a) => i(e, `/collection-layouts/${a}/blank-form`, "blank-form.pdf"), u = (e, a, t) => l(e, "/collection-layouts/help-sheet/xlsx", { rows: a, name: t }, "help-text.xlsx");
|
|
33
|
+
async function c(e) {
|
|
34
|
+
const a = new Uint8Array(await e.arrayBuffer());
|
|
35
|
+
let t = "";
|
|
36
|
+
for (let o = 0; o < a.length; o += 32768)
|
|
37
|
+
t += String.fromCharCode(...a.subarray(o, o + 32768));
|
|
38
|
+
return btoa(t);
|
|
39
|
+
}
|
|
40
|
+
async function f(e, a) {
|
|
41
|
+
const t = await fetch(`${e.apiBase}/collection-layouts/help-sheet/parse`, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: { ...e.authHeaders, "Content-Type": "application/json" },
|
|
44
|
+
credentials: e.credentials,
|
|
45
|
+
body: JSON.stringify({ file: await c(a) })
|
|
46
|
+
});
|
|
47
|
+
if (!t.ok) throw await r(t);
|
|
48
|
+
return (await t.json()).data.rows;
|
|
49
|
+
}
|
|
50
|
+
function w({ blob: e, filename: a }) {
|
|
51
|
+
const t = URL.createObjectURL(e), o = document.createElement("a");
|
|
52
|
+
o.href = t, o.download = a, document.body.appendChild(o), o.click(), o.remove(), setTimeout(() => URL.revokeObjectURL(t), 1e3);
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
p as downloadBlankForm,
|
|
56
|
+
u as downloadHelpSheet,
|
|
57
|
+
h as downloadRecords,
|
|
58
|
+
d as downloadTemplate,
|
|
59
|
+
f as parseHelpSheetFile,
|
|
60
|
+
w as saveFile
|
|
61
|
+
};
|
|
@@ -111,7 +111,13 @@ function z(t, e, o) {
|
|
|
111
111
|
case "fallback":
|
|
112
112
|
return [{ text: "anything else", strong: !0 }];
|
|
113
113
|
case "type_use":
|
|
114
|
+
case "ab":
|
|
114
115
|
return t.type_use ? [{ text: t.type_use }] : [];
|
|
116
|
+
case "phone":
|
|
117
|
+
return [
|
|
118
|
+
{ text: "on small screens, instead of " },
|
|
119
|
+
{ text: t.phone_of_name ?? "its form", strong: !0 }
|
|
120
|
+
];
|
|
115
121
|
default:
|
|
116
122
|
return [];
|
|
117
123
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import "lucide-react";
|
|
3
|
+
import { Fragment as l } from "react";
|
|
3
4
|
import { cn as i } from "../../../lib/utils.js";
|
|
4
5
|
import { describeReason as d } from "./describe-conditions.js";
|
|
5
6
|
const o = {
|
|
@@ -9,19 +10,19 @@ const o = {
|
|
|
9
10
|
addendum: "Addendum form",
|
|
10
11
|
table: "Grid columns"
|
|
11
12
|
};
|
|
12
|
-
function
|
|
13
|
-
return e.length ? /* @__PURE__ */
|
|
13
|
+
function c({ segs: e, muted: n }) {
|
|
14
|
+
return e.length ? /* @__PURE__ */ a("span", { className: n ? "text-slate-500 dark:text-muted-foreground" : void 0, children: e.map(
|
|
14
15
|
(r, t) => r.strong ? (
|
|
15
16
|
// biome-ignore lint/suspicious/noArrayIndexKey: segments are positional
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ a("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: r.text }, t)
|
|
17
18
|
) : (
|
|
18
19
|
// biome-ignore lint/suspicious/noArrayIndexKey: segments are positional
|
|
19
|
-
/* @__PURE__ */ l
|
|
20
|
+
/* @__PURE__ */ a(l, { children: r.text }, t)
|
|
20
21
|
)
|
|
21
|
-
) }) : /* @__PURE__ */
|
|
22
|
+
) }) : /* @__PURE__ */ a("span", { className: "text-slate-400 dark:text-muted-foreground", children: "—" });
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
function b({ tone: e, children: n }) {
|
|
25
|
+
return /* @__PURE__ */ a(
|
|
25
26
|
"span",
|
|
26
27
|
{
|
|
27
28
|
className: i(
|
|
@@ -29,14 +30,15 @@ function x({ tone: e, children: n }) {
|
|
|
29
30
|
e === "default" && "bg-nvr-cyan/15 text-[#0089ad] dark:text-nvr-cyan",
|
|
30
31
|
e === "rule" && "bg-indigo-50 text-indigo-700 dark:bg-indigo-500/15 dark:text-indigo-300",
|
|
31
32
|
e === "role" && "bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",
|
|
32
|
-
(e === "link" || e === "view") && "bg-slate-100 text-slate-600 dark:bg-muted dark:text-muted-foreground"
|
|
33
|
+
(e === "link" || e === "view") && "bg-slate-100 text-slate-600 dark:bg-muted dark:text-muted-foreground",
|
|
34
|
+
e === "frozen" && "gap-1 bg-amber-50 text-amber-800 dark:bg-amber-500/15 dark:text-amber-200"
|
|
33
35
|
),
|
|
34
36
|
children: n
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
function k(e) {
|
|
39
|
-
return e.section === "forms" ? e.is_default ? { tone: "default", text: "default" } : e.reason.kind === "record_rule" ? { tone: "rule", text: "rule" } : e.reason.kind === "role" ? { tone: "role", text: "role" } : null : e.section === "link_only" ? { tone: "link", text: "link only" } : e.section === "other_views" && e.is_default ? { tone: "default", text: "default" } : null;
|
|
41
|
+
return e.section === "forms" ? e.is_default ? { tone: "default", text: "default" } : e.reason.kind === "record_rule" ? { tone: "rule", text: "rule" } : e.reason.kind === "role" ? { tone: "role", text: "role" } : e.reason.kind === "ab" ? { tone: "role", text: "A/B" } : e.reason.kind === "phone" ? { tone: "view", text: "phone" } : null : e.section === "link_only" ? { tone: "link", text: "link only" } : e.section === "other_views" && e.is_default ? { tone: "default", text: "default" } : null;
|
|
40
42
|
}
|
|
41
43
|
function p(e, n, r) {
|
|
42
44
|
switch (e.section) {
|
|
@@ -54,8 +56,8 @@ function p(e, n, r) {
|
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
b as Pill,
|
|
60
|
+
c as Sentence,
|
|
59
61
|
o as TYPE_USE,
|
|
60
62
|
p as purposeSegments,
|
|
61
63
|
k as rowPill
|