@servicetitan/json-render-react 0.3.0 → 0.3.2-anv-5204-0ef51ea
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/README.md +334 -0
- package/dist/catalog/core/catalog-prompt.md +10 -1
- package/dist/catalog/core/schema.json +2 -1
- package/dist/catalog/marketing/catalog-prompt.md +10 -1
- package/dist/catalog/marketing/schema.json +1 -0
- package/dist/core/catalog/catalog-def.d.ts +59 -0
- package/dist/core/catalog/guidance-card-column-width.d.ts +11 -0
- package/dist/core/catalog/guidance-card.catalog.d.ts +61 -0
- package/dist/core/catalog/guidance-card.css.d.ts +1 -0
- package/dist/core/catalog/guidance-card.d.ts +7 -0
- package/dist/core/catalog/schemas.d.ts +59 -0
- package/dist/{json-render-react.js → index.js} +530 -405
- package/dist/index.js.map +1 -0
- package/package.json +4 -3
- package/dist/json-render-react.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { AiMark as e, Alert as t, Badge as n, Button as r, Card as i, Checkbox as a, Chip as o, Divider as s, FieldLabel as c, Flex as l, Grid as u, Icon as d, Link as f, Listbox as ee, OverflowText as te, ProgressBar as ne, Radio as re, SkeletonRectangle as ie, SkeletonText as ae, Switch as oe, Text as p, TextField as se, Textarea as ce } from "@servicetitan/anvil2";
|
|
2
|
-
import { Card as m, Dialog as le,
|
|
3
|
-
import { IconChevronDown as
|
|
4
|
-
import { Children as g, Component as
|
|
2
|
+
import { Card as m, Dialog as le, GuidanceCard as ue, Link as de, Text as h } from "@servicetitan/carto-react-kit";
|
|
3
|
+
import { IconChevronDown as fe } from "@servicetitan/carto-react-kit/icons";
|
|
4
|
+
import { Children as g, Component as pe, Fragment as me, useEffect as _, useId as he, useMemo as v, useRef as y, useState as b } from "react";
|
|
5
5
|
import { core as x } from "@servicetitan/anvil2/token";
|
|
6
|
-
import { Fragment as
|
|
6
|
+
import { Fragment as ge, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
7
7
|
import { z as w } from "zod";
|
|
8
|
-
import { DataTable as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { primitive as
|
|
18
|
-
import { defineCatalog as T, getByPath as E, validateSpec as
|
|
8
|
+
import { DataTable as _e, createColumnHelper as ve } from "@servicetitan/anvil2/beta";
|
|
9
|
+
import ye from "@servicetitan/anvil2/assets/icons/material/round/image.svg";
|
|
10
|
+
import be from "@servicetitan/anvil2/assets/icons/st/document_audio.svg";
|
|
11
|
+
import xe from "@servicetitan/anvil2/assets/icons/st/document_doc.svg";
|
|
12
|
+
import Se from "@servicetitan/anvil2/assets/icons/st/document_form.svg";
|
|
13
|
+
import Ce from "@servicetitan/anvil2/assets/icons/st/document_other.svg";
|
|
14
|
+
import we from "@servicetitan/anvil2/assets/icons/st/document_pdf.svg";
|
|
15
|
+
import Te from "@servicetitan/anvil2/assets/icons/st/document_spreadsheet.svg";
|
|
16
|
+
import Ee from "@servicetitan/anvil2/assets/icons/st/document_text.svg";
|
|
17
|
+
import { primitive as De } from "@servicetitan/carto-react-kit/tokens";
|
|
18
|
+
import { defineCatalog as T, getByPath as E, validateSpec as Oe } from "@json-render/core";
|
|
19
19
|
import { schema as D } from "@json-render/react/schema";
|
|
20
|
-
import { JSONUIProvider as
|
|
20
|
+
import { JSONUIProvider as ke, Renderer as Ae, createStateStore as je, defineRegistry as Me, useStateStore as O } from "@json-render/react";
|
|
21
21
|
import * as k from "@amcharts/amcharts5";
|
|
22
22
|
import * as A from "@amcharts/amcharts5/xy";
|
|
23
|
-
import
|
|
24
|
-
import { ThemeCategorical as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import * as
|
|
23
|
+
import Ne from "@amcharts/amcharts5/themes/Animated";
|
|
24
|
+
import { ThemeCategorical as Pe, ThemeMonochrome as Fe, ThemeSemantic as Ie } from "@servicetitan/anvil2-ext-charts/am5";
|
|
25
|
+
import Le from "@servicetitan/anvil2/assets/icons/material/round/check_circle.svg";
|
|
26
|
+
import Re from "@servicetitan/anvil2/assets/icons/material/round/radio_button_unchecked.svg";
|
|
27
|
+
import ze from "@servicetitan/anvil2/assets/icons/st/in_progress.svg";
|
|
28
|
+
import * as Be from "@amcharts/amcharts5/percent";
|
|
29
29
|
//#region ../../node_modules/.pnpm/@vanilla-extract+recipes@0.5.7_@vanilla-extract+css@1.20.1/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js
|
|
30
|
-
function
|
|
30
|
+
function Ve(e, t) {
|
|
31
31
|
if (typeof e != "object" || !e) return e;
|
|
32
32
|
var n = e[Symbol.toPrimitive];
|
|
33
33
|
if (n !== void 0) {
|
|
@@ -37,19 +37,19 @@ function Be(e, t) {
|
|
|
37
37
|
}
|
|
38
38
|
return (t === "string" ? String : Number)(e);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
var t =
|
|
40
|
+
function He(e) {
|
|
41
|
+
var t = Ve(e, "string");
|
|
42
42
|
return typeof t == "symbol" ? t : String(t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return t =
|
|
44
|
+
function Ue(e, t, n) {
|
|
45
|
+
return t = He(t), t in e ? Object.defineProperty(e, t, {
|
|
46
46
|
value: n,
|
|
47
47
|
enumerable: !0,
|
|
48
48
|
configurable: !0,
|
|
49
49
|
writable: !0
|
|
50
50
|
}) : e[t] = n, e;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function We(e, t) {
|
|
53
53
|
var n = Object.keys(e);
|
|
54
54
|
if (Object.getOwnPropertySymbols) {
|
|
55
55
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -59,28 +59,28 @@ function Ue(e, t) {
|
|
|
59
59
|
}
|
|
60
60
|
return n;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Ge(e) {
|
|
63
63
|
for (var t = 1; t < arguments.length; t++) {
|
|
64
64
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
65
|
-
t % 2 ?
|
|
66
|
-
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
65
|
+
t % 2 ? We(Object(n), !0).forEach(function(t) {
|
|
66
|
+
Ue(e, t, n[t]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : We(Object(n)).forEach(function(t) {
|
|
68
68
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
return e;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ke(e, t) {
|
|
74
74
|
var n = {};
|
|
75
75
|
for (var r in e) n[r] = t(e[r], r);
|
|
76
76
|
return n;
|
|
77
77
|
}
|
|
78
|
-
var
|
|
78
|
+
var qe = (e, t, n) => {
|
|
79
79
|
for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
|
|
80
80
|
return !0;
|
|
81
81
|
}, j = (e) => {
|
|
82
82
|
var t = (t) => {
|
|
83
|
-
var n = e.defaultClassName, r =
|
|
83
|
+
var n = e.defaultClassName, r = Ge(Ge({}, e.defaultVariants), t);
|
|
84
84
|
for (var i in r) {
|
|
85
85
|
var a = r[i] ?? e.defaultVariants[i];
|
|
86
86
|
if (a != null) {
|
|
@@ -90,7 +90,7 @@ var Ke = (e, t, n) => {
|
|
|
90
90
|
s && (n += " " + s);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
for (var [c, l] of e.compoundVariants)
|
|
93
|
+
for (var [c, l] of e.compoundVariants) qe(c, r, e.defaultVariants) && (n += " " + l);
|
|
94
94
|
return n;
|
|
95
95
|
};
|
|
96
96
|
return t.variants = () => Object.keys(e.variantClassNames), t.classNames = {
|
|
@@ -98,10 +98,10 @@ var Ke = (e, t, n) => {
|
|
|
98
98
|
return e.defaultClassName.split(" ")[0];
|
|
99
99
|
},
|
|
100
100
|
get variants() {
|
|
101
|
-
return
|
|
101
|
+
return Ke(e.variantClassNames, (e) => Ke(e, (e) => e.split(" ")[0]));
|
|
102
102
|
}
|
|
103
103
|
}, t;
|
|
104
|
-
},
|
|
104
|
+
}, Je = "_7hazmf0", Ye = "_7hazmf1", Xe = "_7hazmf2", Ze = j({
|
|
105
105
|
defaultClassName: "_7hazmf3",
|
|
106
106
|
variantClassNames: { expanded: {
|
|
107
107
|
true: "_7hazmf4",
|
|
@@ -109,7 +109,7 @@ var Ke = (e, t, n) => {
|
|
|
109
109
|
} },
|
|
110
110
|
defaultVariants: { expanded: !1 },
|
|
111
111
|
compoundVariants: []
|
|
112
|
-
}),
|
|
112
|
+
}), Qe = j({
|
|
113
113
|
defaultClassName: "_7hazmf6",
|
|
114
114
|
variantClassNames: { expanded: {
|
|
115
115
|
true: "_7hazmf7",
|
|
@@ -117,7 +117,7 @@ var Ke = (e, t, n) => {
|
|
|
117
117
|
} },
|
|
118
118
|
defaultVariants: { expanded: !1 },
|
|
119
119
|
compoundVariants: []
|
|
120
|
-
}),
|
|
120
|
+
}), $e = "_7hazmf9", et = "_7hazmfa", tt = "_7hazmfb", nt = j({
|
|
121
121
|
defaultClassName: "_7hazmfc",
|
|
122
122
|
variantClassNames: { expanded: {
|
|
123
123
|
true: "_7hazmfd",
|
|
@@ -131,17 +131,17 @@ var Ke = (e, t, n) => {
|
|
|
131
131
|
"danger",
|
|
132
132
|
"info",
|
|
133
133
|
"neutral"
|
|
134
|
-
],
|
|
134
|
+
], rt = {
|
|
135
135
|
success: x.semantic.BackgroundColorSuccessSubdued.value,
|
|
136
136
|
warning: x.semantic.BackgroundColorWarningSubdued.value,
|
|
137
137
|
danger: x.semantic.BackgroundColorDangerSubdued.value,
|
|
138
138
|
info: x.semantic.BackgroundColorPrimarySubdued.value,
|
|
139
139
|
neutral: x.semantic.BackgroundColorSecondary.value
|
|
140
140
|
};
|
|
141
|
-
function
|
|
142
|
-
return
|
|
141
|
+
function it(e = "neutral") {
|
|
142
|
+
return rt[e];
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var at = {
|
|
145
145
|
success: x.semantic.BackgroundColorSuccess.value,
|
|
146
146
|
warning: x.semantic.BackgroundColorWarning.value,
|
|
147
147
|
danger: x.semantic.ForegroundColorDanger.value,
|
|
@@ -149,9 +149,9 @@ var it = {
|
|
|
149
149
|
neutral: void 0
|
|
150
150
|
};
|
|
151
151
|
function N(e) {
|
|
152
|
-
return
|
|
152
|
+
return at[e];
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function ot(e) {
|
|
155
155
|
if (e == null || e === "") return null;
|
|
156
156
|
if (typeof e == "object" && e && "label" in e) {
|
|
157
157
|
let t = e;
|
|
@@ -170,7 +170,7 @@ function at(e) {
|
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region src/context/components/collapsible-card.tsx
|
|
173
|
-
function
|
|
173
|
+
function st({ badge: e }) {
|
|
174
174
|
return typeof e == "number" ? /* @__PURE__ */ S(o, {
|
|
175
175
|
label: String(e),
|
|
176
176
|
size: "small",
|
|
@@ -178,18 +178,18 @@ function ot({ badge: e }) {
|
|
|
178
178
|
}) : /* @__PURE__ */ S(o, {
|
|
179
179
|
label: e.label,
|
|
180
180
|
size: "small",
|
|
181
|
-
color:
|
|
181
|
+
color: it(e.tone ?? "neutral"),
|
|
182
182
|
style: { marginTop: "2px" }
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
var
|
|
186
|
-
let [i, a] = b(n), [o, s] = b(n), c =
|
|
185
|
+
var ct = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
186
|
+
let [i, a] = b(n), [o, s] = b(n), c = he();
|
|
187
187
|
return /* @__PURE__ */ S("div", {
|
|
188
|
-
className:
|
|
188
|
+
className: Je,
|
|
189
189
|
children: /* @__PURE__ */ S(m, {
|
|
190
190
|
padding: "base",
|
|
191
191
|
content: /* @__PURE__ */ C("div", {
|
|
192
|
-
className:
|
|
192
|
+
className: Xe,
|
|
193
193
|
children: [/* @__PURE__ */ S(h, {
|
|
194
194
|
variant: "headline",
|
|
195
195
|
el: "h3",
|
|
@@ -204,25 +204,25 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
204
204
|
return t && s(!0), t;
|
|
205
205
|
});
|
|
206
206
|
},
|
|
207
|
-
className:
|
|
207
|
+
className: $e,
|
|
208
208
|
children: [/* @__PURE__ */ C("span", {
|
|
209
|
-
className:
|
|
209
|
+
className: et,
|
|
210
210
|
children: [/* @__PURE__ */ S("span", {
|
|
211
|
-
className:
|
|
211
|
+
className: tt,
|
|
212
212
|
children: e
|
|
213
|
-
}), t == null ? null : /* @__PURE__ */ S(
|
|
214
|
-
}), /* @__PURE__ */ S(
|
|
213
|
+
}), t == null ? null : /* @__PURE__ */ S(st, { badge: t })]
|
|
214
|
+
}), /* @__PURE__ */ S(fe, { className: nt({ expanded: i }) })]
|
|
215
215
|
})
|
|
216
216
|
}), /* @__PURE__ */ S("div", {
|
|
217
|
-
className:
|
|
217
|
+
className: Ze({ expanded: i }),
|
|
218
218
|
onTransitionEnd: (e) => {
|
|
219
219
|
e.propertyName !== "grid-template-rows" || i || s(!1);
|
|
220
220
|
},
|
|
221
221
|
children: /* @__PURE__ */ S("div", {
|
|
222
|
-
className:
|
|
222
|
+
className: Qe({ expanded: i }),
|
|
223
223
|
children: /* @__PURE__ */ S("div", {
|
|
224
224
|
id: c,
|
|
225
|
-
className:
|
|
225
|
+
className: Ye,
|
|
226
226
|
"aria-hidden": !i,
|
|
227
227
|
children: o ? r : null
|
|
228
228
|
})
|
|
@@ -231,31 +231,31 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
231
231
|
})
|
|
232
232
|
})
|
|
233
233
|
});
|
|
234
|
-
},
|
|
234
|
+
}, lt = w.object({
|
|
235
235
|
label: w.string(),
|
|
236
236
|
tone: w.enum(M).optional()
|
|
237
|
-
}),
|
|
237
|
+
}), ut = w.union([w.number().int().nonnegative(), lt]), dt = {
|
|
238
238
|
props: w.object({
|
|
239
239
|
title: w.string(),
|
|
240
240
|
defaultExpanded: w.boolean().optional(),
|
|
241
|
-
badge:
|
|
241
|
+
badge: ut.optional()
|
|
242
242
|
}),
|
|
243
243
|
slots: ["default"],
|
|
244
244
|
description: "Collapsible card for the Context panel. Each card holds a single content component as its body. Optional badge shows a count (number) or status label ({ label, tone? }) in the card header. Use defaultExpanded: false to start collapsed."
|
|
245
|
-
},
|
|
245
|
+
}, ft = ({ props: e, children: t }) => /* @__PURE__ */ S(ct, {
|
|
246
246
|
title: e.title,
|
|
247
247
|
...e.badge == null ? {} : { badge: e.badge },
|
|
248
248
|
defaultExpanded: e.defaultExpanded ?? !0,
|
|
249
249
|
children: t
|
|
250
|
-
}),
|
|
250
|
+
}), pt = w.object({
|
|
251
251
|
label: w.string(),
|
|
252
252
|
tone: w.enum(M).optional()
|
|
253
|
-
}),
|
|
253
|
+
}), mt = w.union([
|
|
254
254
|
w.string(),
|
|
255
255
|
w.number(),
|
|
256
256
|
w.null(),
|
|
257
|
-
|
|
258
|
-
]),
|
|
257
|
+
pt
|
|
258
|
+
]), ht = w.object({
|
|
259
259
|
key: w.string(),
|
|
260
260
|
header: w.string(),
|
|
261
261
|
type: w.enum([
|
|
@@ -265,10 +265,10 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
265
265
|
"delta"
|
|
266
266
|
]).optional(),
|
|
267
267
|
sortable: w.boolean().optional()
|
|
268
|
-
}),
|
|
268
|
+
}), gt = w.record(w.string(), mt).and(w.object({ id: w.string() })), _t = {
|
|
269
269
|
props: w.object({
|
|
270
|
-
columns: w.array(
|
|
271
|
-
rows: w.array(
|
|
270
|
+
columns: w.array(ht),
|
|
271
|
+
rows: w.array(gt),
|
|
272
272
|
defaultSortedColumn: w.object({
|
|
273
273
|
id: w.string(),
|
|
274
274
|
desc: w.boolean().optional()
|
|
@@ -276,10 +276,10 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
276
276
|
}),
|
|
277
277
|
slots: [],
|
|
278
278
|
description: "Read-only DataTable for context cards. Column type: text (default), currency, chip, or delta. Chip cells: plain string (neutral tone) or { label, tone } where tone is success | warning | danger | info | neutral. Delta cells: signed string ('+5%', '-3%') or null — positive renders danger-red, negative renders success-green, null renders '–'. Rows must include id."
|
|
279
|
-
},
|
|
279
|
+
}, vt = "_1b4fiav0", yt = "_1b4fiav1";
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/context/catalog/context-data-table.tsx
|
|
282
|
-
function
|
|
282
|
+
function bt(e) {
|
|
283
283
|
if (e == null || e === "" || e === "–" || e === "0" || e === "0%") return {
|
|
284
284
|
text: "–",
|
|
285
285
|
sign: "none"
|
|
@@ -296,27 +296,27 @@ function yt(e) {
|
|
|
296
296
|
sign: "none"
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
className:
|
|
301
|
-
children: /* @__PURE__ */ S(
|
|
299
|
+
var xt = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
300
|
+
className: vt,
|
|
301
|
+
children: /* @__PURE__ */ S(_e, {
|
|
302
302
|
columns: v(() => {
|
|
303
|
-
let t =
|
|
303
|
+
let t = ve();
|
|
304
304
|
return e.columns.map((e) => t(e.key, {
|
|
305
305
|
header: { label: e.header },
|
|
306
306
|
...e.sortable ? { sortable: !0 } : {},
|
|
307
307
|
...e.type === "currency" ? { type: "currency" } : {},
|
|
308
308
|
...e.type === "chip" ? { renderCell: (e) => {
|
|
309
|
-
let t =
|
|
309
|
+
let t = ot(e);
|
|
310
310
|
return t ? /* @__PURE__ */ S(o, {
|
|
311
311
|
label: t.label,
|
|
312
312
|
size: "small",
|
|
313
|
-
color:
|
|
313
|
+
color: it(t.tone)
|
|
314
314
|
}) : null;
|
|
315
315
|
} } : {},
|
|
316
316
|
...e.type === "delta" ? { renderCell: (e) => {
|
|
317
|
-
let { text: t, sign: n } =
|
|
317
|
+
let { text: t, sign: n } = bt(e), r = n === "positive" ? N("danger") : n === "negative" ? N("success") : void 0;
|
|
318
318
|
return /* @__PURE__ */ S("span", {
|
|
319
|
-
className:
|
|
319
|
+
className: yt,
|
|
320
320
|
style: r ? { color: r } : void 0,
|
|
321
321
|
children: t
|
|
322
322
|
});
|
|
@@ -330,58 +330,58 @@ var bt = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
330
330
|
desc: e.defaultSortedColumn.desc ?? !1
|
|
331
331
|
} } : {}
|
|
332
332
|
})
|
|
333
|
-
}),
|
|
333
|
+
}), St = w.object({
|
|
334
334
|
label: w.string(),
|
|
335
335
|
url: w.string()
|
|
336
|
-
}),
|
|
337
|
-
props: w.object({ items: w.array(
|
|
336
|
+
}), Ct = {
|
|
337
|
+
props: w.object({ items: w.array(St) }),
|
|
338
338
|
slots: [],
|
|
339
339
|
description: "Vertical list of file attachments and documents. Each row shows a color-coded file-type icon (inferred from the extension: pdf, xlsx/csv, doc/docx, image, or generic) and the filename. Clicking a row opens a preview dialog. Image files render from url; other files show a large icon and a Download footer action. Use for Completed Forms and Attachments sections."
|
|
340
|
-
},
|
|
340
|
+
}, wt = "_1afcqze0", Tt = "_1afcqze1", Et = "_1afcqze2", Dt = "_1afcqze3", Ot = "_1afcqze4", kt = "_1afcqze5", At = "_1afcqze6", jt = "_1afcqze7", Mt = "_1afcqze8";
|
|
341
341
|
//#endregion
|
|
342
342
|
//#region src/context/catalog/context-file-list.tsx
|
|
343
|
-
function
|
|
343
|
+
function Nt(e) {
|
|
344
344
|
let t = e.toLowerCase();
|
|
345
345
|
return t.endsWith(".pdf") ? "pdf" : /\.(xlsx|xls|csv|numbers)$/.test(t) ? "spreadsheet" : /\.(doc|docx|pages)$/.test(t) ? /form/i.test(t.replace(/\.[^.]+$/, "")) ? "form" : "doc" : /\.(txt|rtf|md)$/.test(t) ? "text" : /\.(mp3|wav|aac|m4a|flac|ogg)$/.test(t) ? "audio" : /\.(jpg|jpeg|png|gif|webp|heic|svg)$/.test(t) ? "image" : /form/i.test(t.replace(/\.[^.]+$/, "")) ? "form" : "generic";
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var Pt = {
|
|
348
348
|
pdf: {
|
|
349
|
-
svg:
|
|
349
|
+
svg: we,
|
|
350
350
|
color: "#DC2626"
|
|
351
351
|
},
|
|
352
352
|
spreadsheet: {
|
|
353
|
-
svg:
|
|
353
|
+
svg: Te,
|
|
354
354
|
color: "#16A34A"
|
|
355
355
|
},
|
|
356
356
|
doc: {
|
|
357
|
-
svg:
|
|
357
|
+
svg: xe,
|
|
358
358
|
color: "#2563EB"
|
|
359
359
|
},
|
|
360
360
|
text: {
|
|
361
|
-
svg:
|
|
361
|
+
svg: Ee,
|
|
362
362
|
color: "#6B7280"
|
|
363
363
|
},
|
|
364
364
|
form: {
|
|
365
|
-
svg:
|
|
365
|
+
svg: Se,
|
|
366
366
|
color: "#2563EB"
|
|
367
367
|
},
|
|
368
368
|
audio: {
|
|
369
|
-
svg:
|
|
369
|
+
svg: be,
|
|
370
370
|
color: "#6B7280"
|
|
371
371
|
},
|
|
372
372
|
image: {
|
|
373
|
-
svg:
|
|
373
|
+
svg: ye,
|
|
374
374
|
color: "#374151"
|
|
375
375
|
},
|
|
376
376
|
generic: {
|
|
377
|
-
svg:
|
|
377
|
+
svg: Ce,
|
|
378
378
|
color: "#6B7280"
|
|
379
379
|
}
|
|
380
|
-
},
|
|
381
|
-
function
|
|
382
|
-
let { svg: t, color: n } =
|
|
380
|
+
}, Ft = { "--a2-mod-icon-font-size": "80px" };
|
|
381
|
+
function It({ kind: e }) {
|
|
382
|
+
let { svg: t, color: n } = Pt[e];
|
|
383
383
|
return /* @__PURE__ */ S("div", {
|
|
384
|
-
className:
|
|
384
|
+
className: Dt,
|
|
385
385
|
"aria-hidden": "true",
|
|
386
386
|
children: /* @__PURE__ */ S(d, {
|
|
387
387
|
svg: t,
|
|
@@ -390,49 +390,49 @@ function Ft({ kind: e }) {
|
|
|
390
390
|
})
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Lt(e, t) {
|
|
394
394
|
let n = document.createElement("a");
|
|
395
395
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), n.remove();
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Rt({ label: e }) {
|
|
398
398
|
return /* @__PURE__ */ S(h, {
|
|
399
399
|
variant: "body",
|
|
400
400
|
size: "regular",
|
|
401
401
|
text: e,
|
|
402
|
-
className:
|
|
402
|
+
className: Mt
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
let { svg: n, color: r } =
|
|
405
|
+
function zt({ item: e, kind: t }) {
|
|
406
|
+
let { svg: n, color: r } = Pt[t];
|
|
407
407
|
return /* @__PURE__ */ C("div", {
|
|
408
|
-
className:
|
|
408
|
+
className: Ot,
|
|
409
409
|
children: [/* @__PURE__ */ S("div", {
|
|
410
|
-
className:
|
|
410
|
+
className: kt,
|
|
411
411
|
children: t === "image" ? /* @__PURE__ */ S("img", {
|
|
412
412
|
src: e.url,
|
|
413
413
|
alt: e.label,
|
|
414
|
-
className:
|
|
414
|
+
className: At
|
|
415
415
|
}) : /* @__PURE__ */ S("div", {
|
|
416
|
-
className:
|
|
416
|
+
className: jt,
|
|
417
417
|
children: /* @__PURE__ */ S(d, {
|
|
418
418
|
svg: n,
|
|
419
419
|
color: r,
|
|
420
|
-
style:
|
|
420
|
+
style: Ft
|
|
421
421
|
})
|
|
422
422
|
})
|
|
423
|
-
}), /* @__PURE__ */ S(
|
|
423
|
+
}), /* @__PURE__ */ S(Rt, { label: e.label })]
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
let n =
|
|
426
|
+
function Bt({ item: e, onPreview: t }) {
|
|
427
|
+
let n = Nt(e.label);
|
|
428
428
|
return /* @__PURE__ */ S(m, {
|
|
429
|
-
className:
|
|
429
|
+
className: Tt,
|
|
430
430
|
padding: "snug",
|
|
431
431
|
onPress: t,
|
|
432
432
|
label: `Preview ${e.label}`,
|
|
433
433
|
content: /* @__PURE__ */ C("div", {
|
|
434
|
-
className:
|
|
435
|
-
children: [/* @__PURE__ */ S(
|
|
434
|
+
className: Et,
|
|
435
|
+
children: [/* @__PURE__ */ S(It, { kind: n }), /* @__PURE__ */ S(h, {
|
|
436
436
|
variant: "body",
|
|
437
437
|
size: "compact",
|
|
438
438
|
text: e.label
|
|
@@ -440,14 +440,14 @@ function zt({ item: e, onPreview: t }) {
|
|
|
440
440
|
})
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
let [t, n] = b(!1), r =
|
|
445
|
-
return /* @__PURE__ */ C(
|
|
443
|
+
function Vt({ item: e }) {
|
|
444
|
+
let [t, n] = b(!1), r = Nt(e.label);
|
|
445
|
+
return /* @__PURE__ */ C(ge, { children: [/* @__PURE__ */ S(Bt, {
|
|
446
446
|
item: e,
|
|
447
447
|
onPreview: () => n(!0)
|
|
448
448
|
}), /* @__PURE__ */ S(le, {
|
|
449
449
|
title: "View Attachment",
|
|
450
|
-
content: /* @__PURE__ */ S(
|
|
450
|
+
content: /* @__PURE__ */ S(zt, {
|
|
451
451
|
item: e,
|
|
452
452
|
kind: r
|
|
453
453
|
}),
|
|
@@ -455,14 +455,14 @@ function Bt({ item: e }) {
|
|
|
455
455
|
onOpenChange: n,
|
|
456
456
|
...r === "image" ? {} : { primaryAction: {
|
|
457
457
|
label: "Download",
|
|
458
|
-
onPress: () =>
|
|
458
|
+
onPress: () => Lt(e.url, e.label)
|
|
459
459
|
} }
|
|
460
460
|
})] });
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
className:
|
|
464
|
-
children: e.items.map((e, t) => /* @__PURE__ */ S(
|
|
465
|
-
}),
|
|
462
|
+
var Ht = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
463
|
+
className: wt,
|
|
464
|
+
children: e.items.map((e, t) => /* @__PURE__ */ S(Vt, { item: e }, `${e.label}-${t}`))
|
|
465
|
+
}), Ut = w.object({
|
|
466
466
|
title: w.string(),
|
|
467
467
|
identifier: w.string().optional(),
|
|
468
468
|
identifierHref: w.string().optional(),
|
|
@@ -470,23 +470,23 @@ var Vt = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
470
470
|
callout: w.string().optional(),
|
|
471
471
|
calloutTone: w.enum(M).optional(),
|
|
472
472
|
calloutLabel: w.string().optional()
|
|
473
|
-
}),
|
|
474
|
-
props: w.object({ items: w.array(
|
|
473
|
+
}), Wt = {
|
|
474
|
+
props: w.object({ items: w.array(Ut) }),
|
|
475
475
|
slots: [],
|
|
476
476
|
description: "Flat list for timesheets and recent jobs. Each item has a required title, optional identifier link + meta on the left, and optional callout + calloutLabel on the right. For grouped procurement records with aligned columns, use ContextTabularList instead."
|
|
477
|
-
},
|
|
477
|
+
}, Gt = "blgld0", Kt = "blgld1", qt = "blgld2", Jt = "blgld3", Yt = "blgld4", Xt = "blgld5", Zt = "blgld6", Qt = "blgld7";
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/context/catalog/context-list.tsx
|
|
480
|
-
function
|
|
480
|
+
function $t({ item: e }) {
|
|
481
481
|
let t = e.calloutTone ? N(e.calloutTone) : void 0, n = e.identifier, r = e.callout != null || e.calloutLabel != null;
|
|
482
482
|
return /* @__PURE__ */ C("div", {
|
|
483
|
-
className:
|
|
483
|
+
className: Jt,
|
|
484
484
|
children: [/* @__PURE__ */ C("div", {
|
|
485
|
-
className:
|
|
485
|
+
className: Yt,
|
|
486
486
|
children: [/* @__PURE__ */ C("div", {
|
|
487
|
-
className:
|
|
487
|
+
className: Xt,
|
|
488
488
|
children: [
|
|
489
|
-
n && e.identifierHref ? /* @__PURE__ */ S(
|
|
489
|
+
n && e.identifierHref ? /* @__PURE__ */ S(de, {
|
|
490
490
|
href: e.identifierHref,
|
|
491
491
|
target: "_blank",
|
|
492
492
|
text: n
|
|
@@ -497,7 +497,7 @@ function Qt({ item: e }) {
|
|
|
497
497
|
}) : null,
|
|
498
498
|
n ? /* @__PURE__ */ S("span", {
|
|
499
499
|
"aria-hidden": "true",
|
|
500
|
-
className:
|
|
500
|
+
className: Zt
|
|
501
501
|
}) : null,
|
|
502
502
|
/* @__PURE__ */ S(h, {
|
|
503
503
|
variant: "body",
|
|
@@ -509,10 +509,10 @@ function Qt({ item: e }) {
|
|
|
509
509
|
variant: "body",
|
|
510
510
|
size: "fine",
|
|
511
511
|
text: e.meta,
|
|
512
|
-
className:
|
|
512
|
+
className: Kt
|
|
513
513
|
}) : null]
|
|
514
514
|
}), r ? /* @__PURE__ */ C("div", {
|
|
515
|
-
className:
|
|
515
|
+
className: Qt,
|
|
516
516
|
children: [e.callout ? /* @__PURE__ */ S(h, {
|
|
517
517
|
variant: "headline",
|
|
518
518
|
el: "h6",
|
|
@@ -522,29 +522,29 @@ function Qt({ item: e }) {
|
|
|
522
522
|
}) : null, e.calloutLabel ? /* @__PURE__ */ S(h, {
|
|
523
523
|
variant: "eyebrow",
|
|
524
524
|
text: e.calloutLabel,
|
|
525
|
-
className:
|
|
525
|
+
className: Kt
|
|
526
526
|
}) : null]
|
|
527
527
|
}) : null]
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
var
|
|
531
|
-
className:
|
|
530
|
+
var en = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
531
|
+
className: Gt,
|
|
532
532
|
children: e.items.map((e, t) => /* @__PURE__ */ S("div", {
|
|
533
|
-
className:
|
|
534
|
-
children: /* @__PURE__ */ S(
|
|
533
|
+
className: qt,
|
|
534
|
+
children: /* @__PURE__ */ S($t, { item: e })
|
|
535
535
|
}, e.identifier ?? e.title ?? t))
|
|
536
|
-
}),
|
|
536
|
+
}), tn = w.object({
|
|
537
537
|
label: w.string(),
|
|
538
538
|
value: w.string(),
|
|
539
539
|
tone: w.enum(M).optional()
|
|
540
|
-
}),
|
|
540
|
+
}), nn = {
|
|
541
541
|
props: w.object({
|
|
542
|
-
items: w.array(
|
|
542
|
+
items: w.array(tn),
|
|
543
543
|
columns: w.enum(["3", "4"]).optional()
|
|
544
544
|
}),
|
|
545
545
|
slots: [],
|
|
546
546
|
description: "KPI grid with label and value pairs. Optional columns: 3 (default) or 4. Each item supports an optional tone (danger | warning | success | info | neutral) to color the value text."
|
|
547
|
-
},
|
|
547
|
+
}, rn = j({
|
|
548
548
|
defaultClassName: "_16tl57e0",
|
|
549
549
|
variantClassNames: { columns: {
|
|
550
550
|
3: "_16tl57e1",
|
|
@@ -552,16 +552,16 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
552
552
|
} },
|
|
553
553
|
defaultVariants: { columns: "3" },
|
|
554
554
|
compoundVariants: []
|
|
555
|
-
}),
|
|
556
|
-
className:
|
|
555
|
+
}), an = "_16tl57e3", on = "_16tl57e4", sn = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
556
|
+
className: rn({ columns: e.columns === "4" ? "4" : "3" }),
|
|
557
557
|
children: e.items.map((e) => {
|
|
558
558
|
let t = e.tone ? N(e.tone) : void 0;
|
|
559
559
|
return /* @__PURE__ */ C("div", {
|
|
560
|
-
className:
|
|
560
|
+
className: on,
|
|
561
561
|
children: [/* @__PURE__ */ S(h, {
|
|
562
562
|
variant: "eyebrow",
|
|
563
563
|
text: e.label.toUpperCase(),
|
|
564
|
-
className:
|
|
564
|
+
className: an
|
|
565
565
|
}), /* @__PURE__ */ S(h, {
|
|
566
566
|
variant: "headline",
|
|
567
567
|
el: "h6",
|
|
@@ -571,8 +571,8 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
571
571
|
})]
|
|
572
572
|
}, e.label);
|
|
573
573
|
})
|
|
574
|
-
}),
|
|
575
|
-
className:
|
|
574
|
+
}), cn = "_2pn4ri0", ln = ({ summary: e }) => /* @__PURE__ */ S("div", {
|
|
575
|
+
className: cn,
|
|
576
576
|
"data-carto": "context-ai-summary",
|
|
577
577
|
children: /* @__PURE__ */ S(m, {
|
|
578
578
|
highlighted: !0,
|
|
@@ -585,27 +585,27 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
585
585
|
text: e
|
|
586
586
|
})
|
|
587
587
|
})
|
|
588
|
-
}),
|
|
588
|
+
}), un = "_4l9lye0", dn = "_4l9lye1", fn = "_4l9lye2", pn = "_4l9lye3", P = "_4l9lye4", mn = w.object({
|
|
589
589
|
category: w.string().optional(),
|
|
590
590
|
body: w.string(),
|
|
591
591
|
author: w.string().optional(),
|
|
592
592
|
date: w.string().optional(),
|
|
593
593
|
truncate: w.boolean().optional()
|
|
594
|
-
}),
|
|
594
|
+
}), hn = {
|
|
595
595
|
props: w.object({
|
|
596
596
|
summary: w.string().optional(),
|
|
597
|
-
items: w.array(
|
|
597
|
+
items: w.array(mn)
|
|
598
598
|
}),
|
|
599
599
|
slots: [],
|
|
600
600
|
description: "Notes & Summaries list. Optional summary renders an AI-highlighted box at the top. Each item shows an optional category eyebrow (e.g. 'JOB SUMMARY'), body text, and optional author + date at top-right. Set truncate: true on long items to clamp to ~3 lines with an inline More/Less expand."
|
|
601
601
|
};
|
|
602
602
|
//#endregion
|
|
603
603
|
//#region src/context/catalog/context-note-list.tsx
|
|
604
|
-
function
|
|
604
|
+
function gn({ item: e }) {
|
|
605
605
|
return /* @__PURE__ */ C("div", {
|
|
606
|
-
className:
|
|
606
|
+
className: fn,
|
|
607
607
|
children: [e.category || e.author || e.date ? /* @__PURE__ */ C("div", {
|
|
608
|
-
className:
|
|
608
|
+
className: pn,
|
|
609
609
|
children: [e.category ? /* @__PURE__ */ S(h, {
|
|
610
610
|
variant: "eyebrow",
|
|
611
611
|
text: e.category,
|
|
@@ -628,20 +628,20 @@ function hn({ item: e }) {
|
|
|
628
628
|
})]
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
className:
|
|
631
|
+
var _n = ({ props: e }) => /* @__PURE__ */ C("div", {
|
|
632
|
+
className: un,
|
|
633
633
|
children: [e.summary ? /* @__PURE__ */ S("div", {
|
|
634
|
-
className:
|
|
635
|
-
children: /* @__PURE__ */ S(
|
|
636
|
-
}) : null, e.items.map((e, t) => /* @__PURE__ */ S(
|
|
637
|
-
}),
|
|
634
|
+
className: dn,
|
|
635
|
+
children: /* @__PURE__ */ S(ln, { summary: e.summary })
|
|
636
|
+
}) : null, e.items.map((e, t) => /* @__PURE__ */ S(gn, { item: e }, `${e.category ?? ""}-${t}`))]
|
|
637
|
+
}), vn = {
|
|
638
638
|
props: w.object({ summary: w.string() }),
|
|
639
639
|
slots: [],
|
|
640
640
|
description: "AI-generated overview summary for the Context panel. Optional first child of ContextPanel. Renders as a plain section (not a card): Overview headline with sparkle icon and body text. Leaf node — no children."
|
|
641
|
-
},
|
|
642
|
-
className:
|
|
641
|
+
}, yn = "_1ysu3qn0", bn = "_1ysu3qn1", xn = ({ props: t }) => /* @__PURE__ */ C("section", {
|
|
642
|
+
className: yn,
|
|
643
643
|
children: [/* @__PURE__ */ C("div", {
|
|
644
|
-
className:
|
|
644
|
+
className: bn,
|
|
645
645
|
children: [/* @__PURE__ */ S(h, {
|
|
646
646
|
variant: "headline",
|
|
647
647
|
el: "h2",
|
|
@@ -656,55 +656,55 @@ var gn = ({ props: e }) => /* @__PURE__ */ C("div", {
|
|
|
656
656
|
size: "regular",
|
|
657
657
|
text: t.summary
|
|
658
658
|
})]
|
|
659
|
-
}),
|
|
659
|
+
}), Sn = {
|
|
660
660
|
props: w.object({}),
|
|
661
661
|
slots: ["default"],
|
|
662
662
|
description: "Root container for the Context panel. MUST be the spec root. Children MUST only be ContextOverview (optional, first) followed by one or more ContextCard components."
|
|
663
|
-
}, F = "_19nljxi0",
|
|
663
|
+
}, F = "_19nljxi0", Cn = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
664
664
|
className: F,
|
|
665
665
|
children: g.toArray(e).filter(Boolean)
|
|
666
|
-
}),
|
|
666
|
+
}), wn = w.object({
|
|
667
667
|
label: w.string(),
|
|
668
668
|
value: w.string()
|
|
669
|
-
}),
|
|
669
|
+
}), Tn = w.object({
|
|
670
670
|
eyebrow: w.string().optional(),
|
|
671
671
|
identifier: w.string().optional(),
|
|
672
672
|
identifierHref: w.string().optional(),
|
|
673
|
-
fields: w.array(
|
|
674
|
-
}),
|
|
673
|
+
fields: w.array(wn)
|
|
674
|
+
}), En = w.object({
|
|
675
675
|
label: w.string(),
|
|
676
|
-
items: w.array(
|
|
677
|
-
}),
|
|
678
|
-
props: w.object({ groups: w.array(
|
|
676
|
+
items: w.array(Tn)
|
|
677
|
+
}), Dn = {
|
|
678
|
+
props: w.object({ groups: w.array(En) }),
|
|
679
679
|
slots: [],
|
|
680
680
|
description: "Grouped tabular list for procurement-style records. Each group has a vendor label and rows with an optional eyebrow + identifier in the first column and additional label/value field columns (e.g. DATE, AMOUNT). Use inside ContextCard for Procurement sections."
|
|
681
|
-
},
|
|
681
|
+
}, On = "_5kl5rv0", kn = "_5kl5rv1", An = "_5kl5rv2", I = "_5kl5rv3", jn = "_5kl5rv4", Mn = "_5kl5rv5", Nn = "_5kl5rv6";
|
|
682
682
|
//#endregion
|
|
683
683
|
//#region src/context/catalog/context-tabular-list.tsx
|
|
684
|
-
function
|
|
684
|
+
function Pn(e) {
|
|
685
685
|
let t = e + 1;
|
|
686
686
|
if (t <= 1) return "max-content";
|
|
687
|
-
let n = `minmax(${
|
|
687
|
+
let n = `minmax(${De.size[400]}, 1fr)`;
|
|
688
688
|
return Array(t).fill("max-content").join(` ${n} `);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Fn(e) {
|
|
691
691
|
return e * 2 + 1;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function In({ item: e, gridRow: t }) {
|
|
694
694
|
let n = (e) => ({
|
|
695
695
|
style: {
|
|
696
|
-
gridColumn:
|
|
696
|
+
gridColumn: Fn(e),
|
|
697
697
|
gridRow: t
|
|
698
698
|
},
|
|
699
|
-
className:
|
|
699
|
+
className: Nn
|
|
700
700
|
});
|
|
701
|
-
return /* @__PURE__ */ C(
|
|
701
|
+
return /* @__PURE__ */ C(ge, { children: [/* @__PURE__ */ C("div", {
|
|
702
702
|
...n(0),
|
|
703
703
|
children: [e.eyebrow ? /* @__PURE__ */ S(h, {
|
|
704
704
|
variant: "eyebrow",
|
|
705
705
|
text: e.eyebrow,
|
|
706
706
|
className: I
|
|
707
|
-
}) : null, e.identifier && e.identifierHref ? /* @__PURE__ */ S(
|
|
707
|
+
}) : null, e.identifier && e.identifierHref ? /* @__PURE__ */ S(de, {
|
|
708
708
|
href: e.identifierHref,
|
|
709
709
|
target: "_blank",
|
|
710
710
|
text: e.identifier
|
|
@@ -726,14 +726,14 @@ function Fn({ item: e, gridRow: t }) {
|
|
|
726
726
|
})]
|
|
727
727
|
}, e.label))] });
|
|
728
728
|
}
|
|
729
|
-
var
|
|
730
|
-
className:
|
|
729
|
+
var Ln = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
730
|
+
className: On,
|
|
731
731
|
children: e.groups.map((e) => {
|
|
732
732
|
let t = e.items[0]?.fields.length ?? 0;
|
|
733
733
|
return /* @__PURE__ */ C("div", {
|
|
734
|
-
className:
|
|
734
|
+
className: kn,
|
|
735
735
|
children: [/* @__PURE__ */ S("div", {
|
|
736
|
-
className:
|
|
736
|
+
className: An,
|
|
737
737
|
children: /* @__PURE__ */ S(h, {
|
|
738
738
|
variant: "headline",
|
|
739
739
|
el: "h5",
|
|
@@ -741,14 +741,14 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
741
741
|
text: e.label
|
|
742
742
|
})
|
|
743
743
|
}), /* @__PURE__ */ S("div", {
|
|
744
|
-
className:
|
|
745
|
-
style: { gridTemplateColumns:
|
|
744
|
+
className: jn,
|
|
745
|
+
style: { gridTemplateColumns: Pn(t) },
|
|
746
746
|
children: e.items.map((e, t) => {
|
|
747
747
|
let n = t * 2 + 1;
|
|
748
|
-
return /* @__PURE__ */ C(
|
|
749
|
-
className:
|
|
748
|
+
return /* @__PURE__ */ C(me, { children: [t > 0 ? /* @__PURE__ */ S("div", {
|
|
749
|
+
className: Mn,
|
|
750
750
|
style: { gridRow: t * 2 }
|
|
751
|
-
}) : null, /* @__PURE__ */ S(
|
|
751
|
+
}) : null, /* @__PURE__ */ S(In, {
|
|
752
752
|
item: e,
|
|
753
753
|
gridRow: n
|
|
754
754
|
})] }, e.identifier ?? e.eyebrow ?? t);
|
|
@@ -757,16 +757,16 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
757
757
|
}, e.label);
|
|
758
758
|
})
|
|
759
759
|
}), L = {
|
|
760
|
-
ContextPanel:
|
|
761
|
-
ContextOverview:
|
|
762
|
-
ContextCard:
|
|
760
|
+
ContextPanel: Sn,
|
|
761
|
+
ContextOverview: vn,
|
|
762
|
+
ContextCard: dt
|
|
763
763
|
}, R = {
|
|
764
|
-
ContextNoteList:
|
|
765
|
-
ContextMetricGrid:
|
|
766
|
-
ContextDataTable:
|
|
767
|
-
ContextList:
|
|
768
|
-
ContextTabularList:
|
|
769
|
-
ContextFileList:
|
|
764
|
+
ContextNoteList: hn,
|
|
765
|
+
ContextMetricGrid: nn,
|
|
766
|
+
ContextDataTable: _t,
|
|
767
|
+
ContextList: Wt,
|
|
768
|
+
ContextTabularList: Dn,
|
|
769
|
+
ContextFileList: Ct
|
|
770
770
|
}, z = {
|
|
771
771
|
"atlas.submitUserAction": {
|
|
772
772
|
params: w.object({
|
|
@@ -786,11 +786,11 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
786
786
|
}),
|
|
787
787
|
description: "Invoke a tool on the active artifact panel app (an MCP-backed MFE). args is the tool argument payload; if omitted the current form state is sent."
|
|
788
788
|
}
|
|
789
|
-
},
|
|
789
|
+
}, Rn = {
|
|
790
790
|
"atlas.submitUserAction": async (e) => {},
|
|
791
791
|
"atlas.navigate": async (e) => {},
|
|
792
792
|
"atlas.toolCall": async (e) => {}
|
|
793
|
-
},
|
|
793
|
+
}, zn = {
|
|
794
794
|
props: w.object({
|
|
795
795
|
title: w.string(),
|
|
796
796
|
status: w.enum([
|
|
@@ -805,7 +805,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
805
805
|
slots: ["default"],
|
|
806
806
|
events: ["close"],
|
|
807
807
|
description: "Inline notification banner with a required title. status: info (default) | success | warning | danger — danger for errors, warning for cautions, success for confirmations. Put the main message in the alert's children (rendered below the title). dismissible: true adds a close button that emits a \"close\" event."
|
|
808
|
-
},
|
|
808
|
+
}, Bn = {
|
|
809
809
|
props: w.object({
|
|
810
810
|
data: w.array(w.object({
|
|
811
811
|
category: w.string(),
|
|
@@ -822,7 +822,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
822
822
|
}),
|
|
823
823
|
slots: [],
|
|
824
824
|
description: "Bar chart (vertical or horizontal) with Anvil2 theme. data: [{category, value}]. theme: monochrome (default, ≤4 vars), categorical (5-9 distinct), semantic (success/neutral/warning/danger order). unit: tooltip suffix."
|
|
825
|
-
},
|
|
825
|
+
}, Vn = {
|
|
826
826
|
props: w.object({
|
|
827
827
|
label: w.string(),
|
|
828
828
|
appearance: w.enum([
|
|
@@ -844,7 +844,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
844
844
|
slots: [],
|
|
845
845
|
events: ["press"],
|
|
846
846
|
description: "Clickable button. Emits a \"press\" event when clicked; inside a form the host treats press as a submit and uses the element key as the actionId, so no explicit on.press wiring is needed for form submits. appearance: primary | secondary (default) | ghost | danger (destructive actions like delete/cancel). size: xsmall | small | medium (default) | large. loading: true shows a spinner and blocks interaction. disabled: true prevents interaction. badge: optional notification count shown as a superscript (e.g. \"3\", \"99+\"); use an empty string for a dot-only indicator."
|
|
847
|
-
},
|
|
847
|
+
}, Hn = {
|
|
848
848
|
props: w.object({
|
|
849
849
|
title: w.string().optional(),
|
|
850
850
|
description: w.string().optional(),
|
|
@@ -859,7 +859,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
859
859
|
}),
|
|
860
860
|
slots: ["default"],
|
|
861
861
|
description: "White surface that groups a logical section of related content. title: optional headline rendered at the top of the card. description: optional subdued line below the title. Children render below the header and are stacked vertically with consistent spacing — you do not need to wrap them in a Flex. Prefer the built-in title/description over standalone Text children for the heading. background: strong | stronger for nested/elevated surfaces. padding: 0 | xsmall | small | medium (default) | large. Do not nest a Card inside another Card."
|
|
862
|
-
},
|
|
862
|
+
}, Un = {
|
|
863
863
|
props: w.object({
|
|
864
864
|
label: w.string(),
|
|
865
865
|
checked: w.boolean().optional(),
|
|
@@ -868,7 +868,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
868
868
|
slots: [],
|
|
869
869
|
events: ["change"],
|
|
870
870
|
description: "Checkbox for selecting zero or more independent options that are submitted with a form (one Checkbox per option). For a single on/off setting with immediate effect prefer Switch. Bind state with $bindState on checked; emits a \"change\" event when toggled. disabled: true prevents toggling."
|
|
871
|
-
},
|
|
871
|
+
}, Wn = {
|
|
872
872
|
props: w.object({
|
|
873
873
|
label: w.string(),
|
|
874
874
|
size: w.enum(["small", "medium"]).optional(),
|
|
@@ -883,7 +883,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
883
883
|
slots: [],
|
|
884
884
|
events: ["close"],
|
|
885
885
|
description: "Inline label pill for metadata, tags, or categories — use for job statuses, not notification counts (use a Button/Link badge prop for those). size: small | medium (default). color: any CSS color. icon: optional leading status icon. removable: true adds a close button that emits a \"close\" event (ignored when size=small)."
|
|
886
|
-
},
|
|
886
|
+
}, Gn = {
|
|
887
887
|
props: w.object({
|
|
888
888
|
vertical: w.boolean().optional(),
|
|
889
889
|
spacing: w.enum([
|
|
@@ -906,7 +906,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
906
906
|
}),
|
|
907
907
|
slots: [],
|
|
908
908
|
description: "Horizontal (default) or vertical rule that separates content sections. vertical: true for a vertical separator between side-by-side content. spacing (space around the divider, ~4px per step): 0 (default) | half | 1–6 | 8 | 12. alignContent: alignment of any divider content (start | center | end). Place between logical sections — not as a top/bottom border of a container."
|
|
909
|
-
},
|
|
909
|
+
}, Kn = {
|
|
910
910
|
props: w.object({
|
|
911
911
|
data: w.array(w.object({
|
|
912
912
|
category: w.string(),
|
|
@@ -923,7 +923,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
923
923
|
}),
|
|
924
924
|
slots: [],
|
|
925
925
|
description: "Donut chart with optional legend and Anvil2 theme. data: [{category, value}]. theme: monochrome (≤4 vars), categorical (5-9 distinct), semantic (status values)."
|
|
926
|
-
},
|
|
926
|
+
}, qn = {
|
|
927
927
|
props: w.object({
|
|
928
928
|
direction: w.enum(["row", "column"]).optional(),
|
|
929
929
|
gap: w.enum([
|
|
@@ -973,7 +973,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
973
973
|
}),
|
|
974
974
|
slots: ["default"],
|
|
975
975
|
description: "Flex layout container. direction: row (default) | column — always set column when stacking children vertically. gap (spacing token, ~4px per step): half=2px 1=4px 2=8px 3=12px 4=16px 5=20px 6=24px 8=32px 12=48px. alignItems: cross-axis alignment of children. justifyContent: main-axis distribution. When this Flex is itself a child of another Flex, use grow (1=fill available space), shrink, basis (CSS flex-basis e.g. \"200px\"), and alignSelf to control how it flexes."
|
|
976
|
-
},
|
|
976
|
+
}, Jn = {
|
|
977
977
|
props: w.object({
|
|
978
978
|
templateColumns: w.string().optional(),
|
|
979
979
|
gap: w.enum([
|
|
@@ -992,7 +992,75 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
992
992
|
}),
|
|
993
993
|
slots: ["default"],
|
|
994
994
|
description: "CSS Grid layout. templateColumns: CSS grid-template-columns value — \"repeat(3, 1fr)\" for equal columns, \"200px 1fr\" for fixed+flex two-column (e.g. key-value tables), \"1fr 1fr 80px\" for multi-column tables. Children flow into grid cells left-to-right, top-to-bottom. gap (spacing token, ~4px per step): 1=4px 2=8px … 6=24px 8=32px 12=48px (default 2). bordered: true renders a bordered table with row separators and cell padding — use for key-value and data tables."
|
|
995
|
-
},
|
|
995
|
+
}, Yn = w.object({
|
|
996
|
+
from: w.string().nullable().optional(),
|
|
997
|
+
to: w.string().nullable().optional()
|
|
998
|
+
}).refine((e) => !("type" in e)), Xn = w.discriminatedUnion("type", [
|
|
999
|
+
w.object({
|
|
1000
|
+
type: w.literal("text"),
|
|
1001
|
+
value: w.string()
|
|
1002
|
+
}),
|
|
1003
|
+
w.object({
|
|
1004
|
+
type: w.literal("diff"),
|
|
1005
|
+
from: w.string().nullable().optional(),
|
|
1006
|
+
to: w.string().nullable().optional()
|
|
1007
|
+
}),
|
|
1008
|
+
w.object({
|
|
1009
|
+
type: w.literal("addition"),
|
|
1010
|
+
value: w.string()
|
|
1011
|
+
})
|
|
1012
|
+
]), Zn = w.union([
|
|
1013
|
+
w.string(),
|
|
1014
|
+
Xn,
|
|
1015
|
+
Yn
|
|
1016
|
+
]), Qn = w.object({
|
|
1017
|
+
key: w.string(),
|
|
1018
|
+
header: w.string(),
|
|
1019
|
+
minWidth: w.enum([
|
|
1020
|
+
"compact",
|
|
1021
|
+
"standard",
|
|
1022
|
+
"wide"
|
|
1023
|
+
]).optional()
|
|
1024
|
+
}), $n = w.record(w.string(), Zn).and(w.object({ id: w.string() })), er = w.object({
|
|
1025
|
+
label: w.string(),
|
|
1026
|
+
columns: w.array(Qn),
|
|
1027
|
+
data: w.array($n),
|
|
1028
|
+
reason: w.string().optional()
|
|
1029
|
+
}), tr = w.object({
|
|
1030
|
+
id: w.string(),
|
|
1031
|
+
label: w.string(),
|
|
1032
|
+
from: w.string().nullable().optional(),
|
|
1033
|
+
to: w.string().nullable().optional(),
|
|
1034
|
+
reason: w.string().optional()
|
|
1035
|
+
}), nr = w.object({
|
|
1036
|
+
type: w.literal("single"),
|
|
1037
|
+
changes: w.array(tr)
|
|
1038
|
+
}), rr = w.object({
|
|
1039
|
+
type: w.literal("table"),
|
|
1040
|
+
label: w.string(),
|
|
1041
|
+
changeTables: w.array(er)
|
|
1042
|
+
}), ir = w.discriminatedUnion("type", [nr, rr]), ar = {
|
|
1043
|
+
props: w.object({
|
|
1044
|
+
state: w.enum([
|
|
1045
|
+
"default",
|
|
1046
|
+
"accepted",
|
|
1047
|
+
"rejected",
|
|
1048
|
+
"skipped"
|
|
1049
|
+
]).optional(),
|
|
1050
|
+
referenceLabel: w.string(),
|
|
1051
|
+
referenceHref: w.string().optional(),
|
|
1052
|
+
changeSections: w.array(ir),
|
|
1053
|
+
appliedChangeIds: w.array(w.string()).optional(),
|
|
1054
|
+
defaultExpanded: w.boolean().optional()
|
|
1055
|
+
}),
|
|
1056
|
+
slots: [],
|
|
1057
|
+
events: [
|
|
1058
|
+
"apply",
|
|
1059
|
+
"edit",
|
|
1060
|
+
"dismiss"
|
|
1061
|
+
],
|
|
1062
|
+
description: "Suggested-change review card for Atlas agent chat. Use in the default state while the user can accept, edit, or dismiss AI-proposed updates to an estimate/invoice. state: default (selectable diffs + actions) | accepted (collapsible accepted summary) | rejected | skipped (collapsible read-only summaries). Bind state and appliedChangeIds with $bindState so apply/reject can update lifecycle state locally. Checkbox selection is managed internally and defaults to all single-change and table-row ids selected. changeSections[] defines ordered body content: type single (changes[] with label/from/to/reason) or type table (label + changeTables[] with editable labels, columns[{ key, header, minWidth? }], data, optional reason). Column minWidth presets: compact (codes/SKUs/quantities) | standard (names/dates) | wide (descriptions/diffs) — omit when flexible. Table cell rendering is defined per cell via string (plain text), { type: text | diff | addition, ... }, or legacy { from, to } diff shorthand. appliedChangeIds filters accepted-state content. referenceHref opens the linked record in a new tab. Emits apply, edit, and dismiss."
|
|
1063
|
+
}, or = {
|
|
996
1064
|
props: w.object({
|
|
997
1065
|
name: w.enum([
|
|
998
1066
|
"check-circle",
|
|
@@ -1009,7 +1077,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1009
1077
|
}),
|
|
1010
1078
|
slots: [],
|
|
1011
1079
|
description: "Small status icon. name (only these three are available): check-circle=completed/success checkmark, in-progress=partial circle (active/working), radio-button-unchecked=empty circle (pending/not started). size: small | medium (default) | large | xlarge. color: any CSS color (defaults to the current text color). Commonly paired with status Text in lists and checklists."
|
|
1012
|
-
},
|
|
1080
|
+
}, sr = {
|
|
1013
1081
|
props: w.object({
|
|
1014
1082
|
label: w.string(),
|
|
1015
1083
|
placeholder: w.string().optional(),
|
|
@@ -1027,7 +1095,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1027
1095
|
slots: [],
|
|
1028
1096
|
events: ["change"],
|
|
1029
1097
|
description: "Free-text input field for user-typed values (names, notes, numbers, etc). type: text (default), password (masked), email, tel (phone), url, number. Bind value with $bindState so the typed value is captured in state; emits a \"change\" event on every keystroke. Prefer this over Listbox when the value is not from a fixed list. disabled: true prevents editing."
|
|
1030
|
-
},
|
|
1098
|
+
}, B = {
|
|
1031
1099
|
props: w.object({
|
|
1032
1100
|
data: w.array(w.record(w.string(), w.union([w.string(), w.number()]))),
|
|
1033
1101
|
series: w.array(w.string()).optional(),
|
|
@@ -1043,7 +1111,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1043
1111
|
}),
|
|
1044
1112
|
slots: [],
|
|
1045
1113
|
description: "Line chart for tracking trends over time with optional multiple series. data: array of objects with a \"category\" key (x-axis label) and one numeric key per series (e.g. [{category: \"Jan\", revenue: 100, cost: 60}]). series: explicit list of series keys to plot (inferred from data keys if omitted, max 6). theme: monochrome (1-2 series), categorical (3-6 distinct). showLegend: true when multiple series (default true for 2+ series). showDots: true adds data-point markers (default true). unit: tooltip value suffix."
|
|
1046
|
-
},
|
|
1114
|
+
}, cr = {
|
|
1047
1115
|
props: w.object({
|
|
1048
1116
|
label: w.string(),
|
|
1049
1117
|
href: w.string(),
|
|
@@ -1055,7 +1123,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1055
1123
|
slots: [],
|
|
1056
1124
|
events: ["press"],
|
|
1057
1125
|
description: "Inline navigation link (renders an <a>). Emits a \"press\" event when clicked — handle navigation in on.press; href and target are inputs for the host/router rather than native browser navigation. href: destination URL for the host/router. appearance: primary (default) | secondary. target: _blank marks the link as external (shows external-link icon) and lets the host open a new tab if desired. ghost: quieter styling (primary only). badge: optional notification count shown as a superscript (e.g. \"5\"); use an empty string for a dot-only indicator."
|
|
1058
|
-
},
|
|
1126
|
+
}, lr = {
|
|
1059
1127
|
props: w.object({
|
|
1060
1128
|
label: w.string(),
|
|
1061
1129
|
options: w.array(w.object({
|
|
@@ -1068,7 +1136,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1068
1136
|
slots: [],
|
|
1069
1137
|
events: ["change"],
|
|
1070
1138
|
description: "Single-select dropdown for choosing one value from a fixed list of known options. options: [{ value, label }] — value is stored in state, label is shown. Bind the selection with $bindState on value; emits a \"change\" event on selection. Use only when options are predefined; for free-text user input use Input, and for 2–7 visible mutually-exclusive choices prefer RadioGroup. disabled: true prevents selection."
|
|
1071
|
-
},
|
|
1139
|
+
}, ur = {
|
|
1072
1140
|
props: w.object({
|
|
1073
1141
|
label: w.string(),
|
|
1074
1142
|
value: w.number().min(0).max(100).optional(),
|
|
@@ -1077,7 +1145,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1077
1145
|
}),
|
|
1078
1146
|
slots: [],
|
|
1079
1147
|
description: "Horizontal progress bar showing task completion. label is required (the accessible name for the bar). value: 0–100 percentage filled. Omit value and set indeterminate=true when progress cannot be measured (do not set both). description: optional helper text shown below the bar."
|
|
1080
|
-
},
|
|
1148
|
+
}, dr = {
|
|
1081
1149
|
props: w.object({
|
|
1082
1150
|
label: w.string(),
|
|
1083
1151
|
options: w.array(w.object({
|
|
@@ -1090,7 +1158,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1090
1158
|
slots: [],
|
|
1091
1159
|
events: ["change"],
|
|
1092
1160
|
description: "Group of radio buttons for picking one option from 2–7 visible mutually-exclusive choices. options: [{ value, label }]. Bind the selection with $bindState on value; emits a \"change\" event on selection. For longer option lists use Listbox. disabled: true prevents selection."
|
|
1093
|
-
},
|
|
1161
|
+
}, fr = {
|
|
1094
1162
|
props: w.object({
|
|
1095
1163
|
label: w.string(),
|
|
1096
1164
|
checked: w.boolean().optional(),
|
|
@@ -1099,7 +1167,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1099
1167
|
slots: [],
|
|
1100
1168
|
events: ["change"],
|
|
1101
1169
|
description: "Toggle switch for a single binary on/off setting with immediate effect (no form submit). Prefer over Checkbox for enabling/disabling features. Bind state with $bindState on checked; emits a \"change\" event when toggled. disabled: true prevents toggling."
|
|
1102
|
-
},
|
|
1170
|
+
}, pr = {
|
|
1103
1171
|
props: w.object({
|
|
1104
1172
|
content: w.string(),
|
|
1105
1173
|
variant: w.enum([
|
|
@@ -1117,7 +1185,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1117
1185
|
}),
|
|
1118
1186
|
slots: [],
|
|
1119
1187
|
description: "Display text. variant: headline=bold title, eyebrow=small uppercase label, body=default (default variant). size: small | medium (default) | large | xlarge — applies to headline and body only (ignored for eyebrow). subdued: deemphasized secondary text (body only). Use eyebrow+headline pairs for KPI/stat labels above values."
|
|
1120
|
-
},
|
|
1188
|
+
}, mr = {
|
|
1121
1189
|
props: w.object({
|
|
1122
1190
|
label: w.string(),
|
|
1123
1191
|
placeholder: w.string().optional(),
|
|
@@ -1131,26 +1199,27 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
|
1131
1199
|
events: ["change"],
|
|
1132
1200
|
description: "Multi-line free-text input for long values (notes, descriptions, email body). Bind value with $bindState; emits a \"change\" event on every keystroke. rows: visible row count (default 3). description: helper text below the field. moreInfo: tooltip text on the label. disabled: true prevents editing."
|
|
1133
1201
|
}, V = {
|
|
1134
|
-
Text:
|
|
1135
|
-
Card:
|
|
1136
|
-
Flex:
|
|
1137
|
-
Grid:
|
|
1138
|
-
Alert:
|
|
1139
|
-
Divider:
|
|
1140
|
-
Icon:
|
|
1141
|
-
Chip:
|
|
1142
|
-
Link:
|
|
1143
|
-
ProgressBar:
|
|
1144
|
-
BarChart:
|
|
1145
|
-
DonutChart:
|
|
1146
|
-
LineChart:
|
|
1147
|
-
Button:
|
|
1148
|
-
Checkbox:
|
|
1149
|
-
Input:
|
|
1150
|
-
Textarea:
|
|
1151
|
-
Listbox:
|
|
1152
|
-
RadioGroup:
|
|
1153
|
-
Switch:
|
|
1202
|
+
Text: pr,
|
|
1203
|
+
Card: Hn,
|
|
1204
|
+
Flex: qn,
|
|
1205
|
+
Grid: Jn,
|
|
1206
|
+
Alert: zn,
|
|
1207
|
+
Divider: Gn,
|
|
1208
|
+
Icon: or,
|
|
1209
|
+
Chip: Wn,
|
|
1210
|
+
Link: cr,
|
|
1211
|
+
ProgressBar: ur,
|
|
1212
|
+
BarChart: Bn,
|
|
1213
|
+
DonutChart: Kn,
|
|
1214
|
+
LineChart: B,
|
|
1215
|
+
Button: Vn,
|
|
1216
|
+
Checkbox: Un,
|
|
1217
|
+
Input: sr,
|
|
1218
|
+
Textarea: mr,
|
|
1219
|
+
Listbox: lr,
|
|
1220
|
+
RadioGroup: dr,
|
|
1221
|
+
Switch: fr,
|
|
1222
|
+
GuidanceCard: ar
|
|
1154
1223
|
};
|
|
1155
1224
|
//#endregion
|
|
1156
1225
|
//#region src/scoped-catalog.ts
|
|
@@ -1174,10 +1243,10 @@ function H(e = {}) {
|
|
|
1174
1243
|
}
|
|
1175
1244
|
return i;
|
|
1176
1245
|
}
|
|
1177
|
-
function
|
|
1246
|
+
function hr(e) {
|
|
1178
1247
|
return e;
|
|
1179
1248
|
}
|
|
1180
|
-
function
|
|
1249
|
+
function gr(e) {
|
|
1181
1250
|
let t = H({
|
|
1182
1251
|
core: e.core ?? "all",
|
|
1183
1252
|
...e.overrides ? { overrides: e.overrides } : {},
|
|
@@ -1205,7 +1274,7 @@ function ir(e) {
|
|
|
1205
1274
|
}
|
|
1206
1275
|
};
|
|
1207
1276
|
}
|
|
1208
|
-
var
|
|
1277
|
+
var _r = H({
|
|
1209
1278
|
core: [
|
|
1210
1279
|
"Text",
|
|
1211
1280
|
"Chip",
|
|
@@ -1217,89 +1286,89 @@ var ar = H({
|
|
|
1217
1286
|
...L,
|
|
1218
1287
|
...R
|
|
1219
1288
|
}
|
|
1220
|
-
}),
|
|
1221
|
-
components:
|
|
1289
|
+
}), vr = T(D, {
|
|
1290
|
+
components: _r,
|
|
1222
1291
|
actions: z
|
|
1223
1292
|
}), U = [
|
|
1224
1293
|
{
|
|
1225
1294
|
name: "ContextPanel",
|
|
1226
1295
|
catalog: L.ContextPanel,
|
|
1227
|
-
renderer:
|
|
1296
|
+
renderer: Cn,
|
|
1228
1297
|
renderers: ["context"]
|
|
1229
1298
|
},
|
|
1230
1299
|
{
|
|
1231
1300
|
name: "ContextOverview",
|
|
1232
1301
|
catalog: L.ContextOverview,
|
|
1233
|
-
renderer:
|
|
1302
|
+
renderer: xn,
|
|
1234
1303
|
renderers: ["context"]
|
|
1235
1304
|
},
|
|
1236
1305
|
{
|
|
1237
1306
|
name: "ContextCard",
|
|
1238
1307
|
catalog: L.ContextCard,
|
|
1239
|
-
renderer:
|
|
1308
|
+
renderer: ft,
|
|
1240
1309
|
renderers: ["context"]
|
|
1241
1310
|
},
|
|
1242
1311
|
{
|
|
1243
1312
|
name: "ContextNoteList",
|
|
1244
1313
|
catalog: R.ContextNoteList,
|
|
1245
|
-
renderer:
|
|
1314
|
+
renderer: _n,
|
|
1246
1315
|
renderers: ["context"]
|
|
1247
1316
|
},
|
|
1248
1317
|
{
|
|
1249
1318
|
name: "ContextMetricGrid",
|
|
1250
1319
|
catalog: R.ContextMetricGrid,
|
|
1251
|
-
renderer:
|
|
1320
|
+
renderer: sn,
|
|
1252
1321
|
renderers: ["context"]
|
|
1253
1322
|
},
|
|
1254
1323
|
{
|
|
1255
1324
|
name: "ContextDataTable",
|
|
1256
1325
|
catalog: R.ContextDataTable,
|
|
1257
|
-
renderer:
|
|
1326
|
+
renderer: xt,
|
|
1258
1327
|
renderers: ["context"]
|
|
1259
1328
|
},
|
|
1260
1329
|
{
|
|
1261
1330
|
name: "ContextList",
|
|
1262
1331
|
catalog: R.ContextList,
|
|
1263
|
-
renderer:
|
|
1332
|
+
renderer: en,
|
|
1264
1333
|
renderers: ["context"]
|
|
1265
1334
|
},
|
|
1266
1335
|
{
|
|
1267
1336
|
name: "ContextTabularList",
|
|
1268
1337
|
catalog: R.ContextTabularList,
|
|
1269
|
-
renderer:
|
|
1338
|
+
renderer: Ln,
|
|
1270
1339
|
renderers: ["context"]
|
|
1271
1340
|
},
|
|
1272
1341
|
{
|
|
1273
1342
|
name: "ContextFileList",
|
|
1274
1343
|
catalog: R.ContextFileList,
|
|
1275
|
-
renderer:
|
|
1344
|
+
renderer: Ht,
|
|
1276
1345
|
renderers: ["context"]
|
|
1277
1346
|
}
|
|
1278
1347
|
];
|
|
1279
1348
|
Object.fromEntries(U.filter(({ name: e }) => e in L).map(({ name: e, renderer: t }) => [e, t])), Object.fromEntries(U.filter(({ name: e }) => e in R).map(({ name: e, renderer: t }) => [e, t]));
|
|
1280
1349
|
//#endregion
|
|
1281
1350
|
//#region src/context/constants.ts
|
|
1282
|
-
var
|
|
1351
|
+
var yr = [
|
|
1283
1352
|
"ContextPanel",
|
|
1284
1353
|
"ContextOverview",
|
|
1285
1354
|
"ContextCard"
|
|
1286
|
-
],
|
|
1287
|
-
function
|
|
1288
|
-
return
|
|
1355
|
+
], br = ["ContextOverview", "ContextCard"];
|
|
1356
|
+
function xr(e) {
|
|
1357
|
+
return yr.includes(e);
|
|
1289
1358
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1359
|
+
function Sr(e) {
|
|
1360
|
+
return br.includes(e);
|
|
1292
1361
|
}
|
|
1293
1362
|
//#endregion
|
|
1294
1363
|
//#region src/context/validate-context-spec.ts
|
|
1295
1364
|
function W(e, t) {
|
|
1296
1365
|
return e.elements[t];
|
|
1297
1366
|
}
|
|
1298
|
-
function
|
|
1367
|
+
function Cr(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1299
1368
|
let r = W(e, t);
|
|
1300
1369
|
if (!r || n.has(t)) return n;
|
|
1301
1370
|
n.add(t);
|
|
1302
|
-
for (let t of r.children ?? [])
|
|
1371
|
+
for (let t of r.children ?? []) Cr(e, t, n);
|
|
1303
1372
|
return n;
|
|
1304
1373
|
}
|
|
1305
1374
|
function G(e) {
|
|
@@ -1322,7 +1391,7 @@ function G(e) {
|
|
|
1322
1391
|
});
|
|
1323
1392
|
continue;
|
|
1324
1393
|
}
|
|
1325
|
-
if (!
|
|
1394
|
+
if (!Sr(r.type)) {
|
|
1326
1395
|
t.push({
|
|
1327
1396
|
path: `/elements/${n}`,
|
|
1328
1397
|
message: `Direct child of ContextPanel must be ContextOverview or ContextCard — got "${r.type}".`
|
|
@@ -1333,10 +1402,10 @@ function G(e) {
|
|
|
1333
1402
|
path: `/elements/${n}`,
|
|
1334
1403
|
message: "ContextOverview may appear at most once in ContextPanel."
|
|
1335
1404
|
}));
|
|
1336
|
-
for (let r of
|
|
1405
|
+
for (let r of Cr(e, n)) {
|
|
1337
1406
|
if (r === n) continue;
|
|
1338
1407
|
let i = W(e, r);
|
|
1339
|
-
i &&
|
|
1408
|
+
i && xr(i.type) && t.push({
|
|
1340
1409
|
path: `/elements/${r}`,
|
|
1341
1410
|
message: `Shell component "${i.type}" cannot be nested inside a card.`
|
|
1342
1411
|
});
|
|
@@ -1356,49 +1425,49 @@ function q(e, t, n, r) {
|
|
|
1356
1425
|
severity: r
|
|
1357
1426
|
});
|
|
1358
1427
|
}
|
|
1359
|
-
function
|
|
1428
|
+
function wr(e, t) {
|
|
1360
1429
|
return t.length === 0 ? e : `${e}/${t.map((e) => typeof e == "number" ? `[${e}]` : `.${String(e)}`).join("").replace(/^\./, "")}`;
|
|
1361
1430
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return
|
|
1431
|
+
function Tr(e) {
|
|
1432
|
+
return _r[e];
|
|
1364
1433
|
}
|
|
1365
|
-
function
|
|
1434
|
+
function Er(e) {
|
|
1366
1435
|
return (e?.slots?.length ?? 0) === 0;
|
|
1367
1436
|
}
|
|
1368
|
-
function
|
|
1437
|
+
function Dr(e, t) {
|
|
1369
1438
|
for (let [n, r] of Object.entries(e.elements)) r && r.type === "ContextCard" && r.props.defaultExpanded === !1 && q(t, `/elements/${n}/props/defaultExpanded`, "defaultExpanded: false shows only the card header until the user expands the card.", "warn");
|
|
1370
1439
|
}
|
|
1371
|
-
function
|
|
1440
|
+
function Or(e) {
|
|
1372
1441
|
let t = [];
|
|
1373
1442
|
for (let n of G(e)) q(t, n.path, n.message, "error");
|
|
1374
|
-
let n =
|
|
1443
|
+
let n = Oe(e);
|
|
1375
1444
|
if (!n.valid) for (let e of n.issues) q(t, e.elementKey ? `/elements/${e.elementKey}` : "/", e.message, e.severity === "warning" ? "warn" : "error");
|
|
1376
|
-
let r =
|
|
1445
|
+
let r = vr.validate(e);
|
|
1377
1446
|
if (!r.success && r.error) for (let e of r.error.issues) {
|
|
1378
1447
|
let n = e.path.length > 0 ? `/${e.path.join("/")}` : "/";
|
|
1379
1448
|
n.endsWith("/visible") || n.endsWith("/children") && e.message.includes("expected array, received undefined") || q(t, n, e.message, "error");
|
|
1380
1449
|
}
|
|
1381
1450
|
for (let [n, r] of Object.entries(e.elements)) {
|
|
1382
1451
|
if (!r) continue;
|
|
1383
|
-
let e =
|
|
1452
|
+
let e = Tr(r.type);
|
|
1384
1453
|
if (!e) {
|
|
1385
1454
|
q(t, `/elements/${n}`, `Unknown component type "${r.type}" for context catalog.`, "error");
|
|
1386
1455
|
continue;
|
|
1387
1456
|
}
|
|
1388
1457
|
if (e.props) {
|
|
1389
1458
|
let i = e.props.safeParse(r.props ?? {});
|
|
1390
|
-
if (!i.success) for (let e of i.error.issues) q(t,
|
|
1459
|
+
if (!i.success) for (let e of i.error.issues) q(t, wr(`/elements/${n}/props`, e.path), e.message, "error");
|
|
1391
1460
|
}
|
|
1392
|
-
let i = r.children, a =
|
|
1461
|
+
let i = r.children, a = Er(e);
|
|
1393
1462
|
i === void 0 && a && q(t, `/elements/${n}/children`, `Leaf element "${r.type}" should include "children": [].`, "warn"), a && (i?.length ?? 0) > 0 && q(t, `/elements/${n}/children`, `Leaf component "${r.type}" must not have children.`, "error");
|
|
1394
1463
|
}
|
|
1395
|
-
return
|
|
1464
|
+
return Dr(e, t), t;
|
|
1396
1465
|
}
|
|
1397
|
-
function
|
|
1466
|
+
function kr(e) {
|
|
1398
1467
|
let t = [], n = structuredClone(e);
|
|
1399
1468
|
for (let [e, r] of Object.entries(n.elements)) {
|
|
1400
1469
|
if (!r) continue;
|
|
1401
|
-
let n =
|
|
1470
|
+
let n = Er(Tr(r.type));
|
|
1402
1471
|
r.children === void 0 && n && (r.children = [], t.push(`Added children: [] to leaf element "${e}".`)), n && r.children && r.children.length > 0 && (r.children = [], t.push(`Removed illegal children from leaf element "${e}".`));
|
|
1403
1472
|
}
|
|
1404
1473
|
return {
|
|
@@ -1406,15 +1475,15 @@ function _r(e) {
|
|
|
1406
1475
|
fixes: t
|
|
1407
1476
|
};
|
|
1408
1477
|
}
|
|
1409
|
-
function
|
|
1478
|
+
function Ar(e) {
|
|
1410
1479
|
return e.some((e) => e.severity !== "warn");
|
|
1411
1480
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return K(
|
|
1481
|
+
function jr(e) {
|
|
1482
|
+
return K(Or(e));
|
|
1414
1483
|
}
|
|
1415
1484
|
//#endregion
|
|
1416
1485
|
//#region src/core/catalog/alert.tsx
|
|
1417
|
-
var
|
|
1486
|
+
var Mr = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
|
|
1418
1487
|
title: e.title,
|
|
1419
1488
|
status: e.status ?? "info",
|
|
1420
1489
|
...e.aiMark ? { aiMark: !0 } : {},
|
|
@@ -1425,15 +1494,15 @@ var br = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
|
|
|
1425
1494
|
//#region src/core/catalog/chart-utils.ts
|
|
1426
1495
|
function Y(e, t = "monochrome") {
|
|
1427
1496
|
let n = {
|
|
1428
|
-
monochrome:
|
|
1429
|
-
categorical:
|
|
1430
|
-
semantic:
|
|
1431
|
-
}[t] ??
|
|
1432
|
-
e.setThemes([
|
|
1497
|
+
monochrome: Fe,
|
|
1498
|
+
categorical: Pe,
|
|
1499
|
+
semantic: Ie
|
|
1500
|
+
}[t] ?? Fe;
|
|
1501
|
+
e.setThemes([Ne.new(e), n.new(e)]);
|
|
1433
1502
|
}
|
|
1434
1503
|
//#endregion
|
|
1435
1504
|
//#region src/core/catalog/bar-chart.tsx
|
|
1436
|
-
var
|
|
1505
|
+
var Nr = ({ props: e }) => {
|
|
1437
1506
|
let t = y(null);
|
|
1438
1507
|
return _(() => {
|
|
1439
1508
|
let n = t.current;
|
|
@@ -1488,7 +1557,7 @@ function X(e) {
|
|
|
1488
1557
|
}
|
|
1489
1558
|
//#endregion
|
|
1490
1559
|
//#region src/core/catalog/button.tsx
|
|
1491
|
-
var
|
|
1560
|
+
var Pr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
1492
1561
|
appearance: e.appearance ?? "secondary",
|
|
1493
1562
|
...X({
|
|
1494
1563
|
size: e.size,
|
|
@@ -1500,7 +1569,7 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1500
1569
|
"aria-label": e.badge ? `${e.badge} unread` : "unread",
|
|
1501
1570
|
children: e.badge
|
|
1502
1571
|
})]
|
|
1503
|
-
}),
|
|
1572
|
+
}), Fr = ({ props: e, children: t }) => {
|
|
1504
1573
|
let n = e.title !== void 0 || e.description !== void 0;
|
|
1505
1574
|
return /* @__PURE__ */ C(i, {
|
|
1506
1575
|
flexDirection: "column",
|
|
@@ -1524,10 +1593,10 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1524
1593
|
})]
|
|
1525
1594
|
}) : null, t]
|
|
1526
1595
|
});
|
|
1527
|
-
},
|
|
1596
|
+
}, Ir = T(D, {
|
|
1528
1597
|
components: V,
|
|
1529
1598
|
actions: z
|
|
1530
|
-
}),
|
|
1599
|
+
}), Lr = ({ props: e, bindings: t, emit: n }) => {
|
|
1531
1600
|
let r = t?.checked, { state: i, set: o } = O(), s = r ? E(i, r) : void 0, c = r ? s ?? e.checked ?? !1 : e.checked ?? !1;
|
|
1532
1601
|
return /* @__PURE__ */ S(a, {
|
|
1533
1602
|
label: e.label,
|
|
@@ -1537,12 +1606,12 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1537
1606
|
r && o(r, !(t?.checked ?? !1)), n("change");
|
|
1538
1607
|
}
|
|
1539
1608
|
});
|
|
1540
|
-
},
|
|
1541
|
-
"check-circle":
|
|
1542
|
-
"in-progress":
|
|
1543
|
-
"radio-button-unchecked":
|
|
1544
|
-
},
|
|
1545
|
-
let n = e.icon ?
|
|
1609
|
+
}, Rr = {
|
|
1610
|
+
"check-circle": Le,
|
|
1611
|
+
"in-progress": ze,
|
|
1612
|
+
"radio-button-unchecked": Re
|
|
1613
|
+
}, zr = ({ props: e, emit: t }) => {
|
|
1614
|
+
let n = e.icon ? Rr[e.icon] : void 0, r = e.removable && e.size !== "small" ? () => t("close") : void 0;
|
|
1546
1615
|
return /* @__PURE__ */ S(o, {
|
|
1547
1616
|
label: e.label,
|
|
1548
1617
|
...X({
|
|
@@ -1552,21 +1621,21 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1552
1621
|
onClose: r
|
|
1553
1622
|
})
|
|
1554
1623
|
});
|
|
1555
|
-
},
|
|
1624
|
+
}, Br = ({ props: e }) => /* @__PURE__ */ S(s, { ...X({
|
|
1556
1625
|
vertical: e.vertical,
|
|
1557
1626
|
spacing: e.spacing,
|
|
1558
1627
|
alignContent: e.alignContent
|
|
1559
|
-
}) }),
|
|
1628
|
+
}) }), Vr = ({ props: e }) => {
|
|
1560
1629
|
let t = y(null);
|
|
1561
1630
|
return _(() => {
|
|
1562
1631
|
let n = t.current;
|
|
1563
1632
|
if (!n) return;
|
|
1564
1633
|
let r, i = () => {
|
|
1565
1634
|
r && r.dispose(), r = k.Root.new(n), Y(r, e.theme);
|
|
1566
|
-
let t = r.container.children.push(
|
|
1635
|
+
let t = r.container.children.push(Be.PieChart.new(r, {
|
|
1567
1636
|
layout: r.horizontalLayout,
|
|
1568
1637
|
innerRadius: k.percent(50)
|
|
1569
|
-
})), i = t.series.push(
|
|
1638
|
+
})), i = t.series.push(Be.PieSeries.new(r, {
|
|
1570
1639
|
valueField: "value",
|
|
1571
1640
|
categoryField: "category",
|
|
1572
1641
|
legendValueText: ""
|
|
@@ -1587,7 +1656,7 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1587
1656
|
className: J,
|
|
1588
1657
|
style: { height: e.height ?? 300 }
|
|
1589
1658
|
});
|
|
1590
|
-
},
|
|
1659
|
+
}, Hr = ({ props: e, children: t }) => /* @__PURE__ */ S(l, {
|
|
1591
1660
|
...X({
|
|
1592
1661
|
direction: e.direction,
|
|
1593
1662
|
gap: e.gap,
|
|
@@ -1601,21 +1670,21 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
|
1601
1670
|
inline: e.inline
|
|
1602
1671
|
}),
|
|
1603
1672
|
children: t
|
|
1604
|
-
}),
|
|
1673
|
+
}), Ur = (...e) => e.filter(Boolean).join(" "), Wr = "_1v76lkh0", Gr = "_1v76lkh1";
|
|
1605
1674
|
//#endregion
|
|
1606
1675
|
//#region src/core/catalog/grid.tsx
|
|
1607
|
-
function
|
|
1676
|
+
function Kr(e) {
|
|
1608
1677
|
let t = e.match(/repeat\(\s*(\d+)/);
|
|
1609
1678
|
return t?.[1] ? Number(t[1]) : e.trim().split(/\s+/).length;
|
|
1610
1679
|
}
|
|
1611
|
-
var
|
|
1680
|
+
var qr = ({ props: e, children: t }) => {
|
|
1612
1681
|
if (e.bordered) {
|
|
1613
|
-
let n = e.templateColumns ?? "1fr", r = g.count(t), i = Math.max(1,
|
|
1682
|
+
let n = e.templateColumns ?? "1fr", r = g.count(t), i = Math.max(1, Kr(n)), a = Math.max(0, r - (r % i || i));
|
|
1614
1683
|
return /* @__PURE__ */ S("div", {
|
|
1615
|
-
className:
|
|
1684
|
+
className: Wr,
|
|
1616
1685
|
style: { gridTemplateColumns: n },
|
|
1617
1686
|
children: g.map(t, (e, t) => /* @__PURE__ */ S("div", {
|
|
1618
|
-
className:
|
|
1687
|
+
className: Ur(Gr, t < a && "_1v76lkh2"),
|
|
1619
1688
|
children: e
|
|
1620
1689
|
}))
|
|
1621
1690
|
});
|
|
@@ -1625,12 +1694,62 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1625
1694
|
gap: e.gap ?? "2",
|
|
1626
1695
|
children: t
|
|
1627
1696
|
});
|
|
1628
|
-
},
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1697
|
+
}, Jr = {
|
|
1698
|
+
compact: 120,
|
|
1699
|
+
standard: 180,
|
|
1700
|
+
wide: 280
|
|
1701
|
+
};
|
|
1702
|
+
function Yr(e) {
|
|
1703
|
+
if (e != null) return Jr[e];
|
|
1704
|
+
}
|
|
1705
|
+
//#endregion
|
|
1706
|
+
//#region src/core/catalog/guidance-card.tsx
|
|
1707
|
+
function Xr(e) {
|
|
1708
|
+
let t = {
|
|
1709
|
+
key: e.key,
|
|
1710
|
+
header: e.header
|
|
1711
|
+
};
|
|
1712
|
+
return e.minWidth !== void 0 && (t.minWidth = Yr(e.minWidth)), t;
|
|
1713
|
+
}
|
|
1714
|
+
var Zr = ({ props: e, emit: t }) => {
|
|
1715
|
+
let n = e.changeSections.map((e) => e.type === "single" ? {
|
|
1716
|
+
type: "single",
|
|
1717
|
+
changes: e.changes.map((e) => ({
|
|
1718
|
+
id: e.id,
|
|
1719
|
+
label: e.label,
|
|
1720
|
+
from: e.from ?? null,
|
|
1721
|
+
to: e.to ?? null,
|
|
1722
|
+
...e.reason === void 0 ? {} : { reason: e.reason }
|
|
1723
|
+
}))
|
|
1724
|
+
} : {
|
|
1725
|
+
type: "table",
|
|
1726
|
+
label: e.label,
|
|
1727
|
+
changeTables: e.changeTables.map((e) => ({
|
|
1728
|
+
label: e.label,
|
|
1729
|
+
columns: e.columns.map(Xr),
|
|
1730
|
+
data: e.data,
|
|
1731
|
+
...e.reason === void 0 ? {} : { reason: e.reason }
|
|
1732
|
+
}))
|
|
1733
|
+
});
|
|
1734
|
+
return /* @__PURE__ */ S(ue, {
|
|
1735
|
+
referenceLabel: e.referenceLabel,
|
|
1736
|
+
changeSections: n,
|
|
1737
|
+
...X({
|
|
1738
|
+
state: e.state,
|
|
1739
|
+
referenceHref: e.referenceHref,
|
|
1740
|
+
appliedChangeIds: e.appliedChangeIds,
|
|
1741
|
+
defaultExpanded: e.defaultExpanded
|
|
1742
|
+
}),
|
|
1743
|
+
onApply: () => t("apply"),
|
|
1744
|
+
onEdit: () => t("edit"),
|
|
1745
|
+
onDismiss: () => t("dismiss")
|
|
1746
|
+
});
|
|
1747
|
+
}, Qr = {
|
|
1748
|
+
"check-circle": Le,
|
|
1749
|
+
"in-progress": ze,
|
|
1750
|
+
"radio-button-unchecked": Re
|
|
1751
|
+
}, $r = ({ props: e }) => {
|
|
1752
|
+
let t = Qr[e.name];
|
|
1634
1753
|
return t ? /* @__PURE__ */ S(d, {
|
|
1635
1754
|
svg: t,
|
|
1636
1755
|
...X({
|
|
@@ -1638,7 +1757,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1638
1757
|
color: e.color
|
|
1639
1758
|
})
|
|
1640
1759
|
}) : null;
|
|
1641
|
-
},
|
|
1760
|
+
}, ei = ({ props: e, bindings: t, emit: n }) => {
|
|
1642
1761
|
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
1643
1762
|
return /* @__PURE__ */ S(se, {
|
|
1644
1763
|
label: e.label,
|
|
@@ -1652,7 +1771,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1652
1771
|
r && a(r, e.target.value), n("change");
|
|
1653
1772
|
}
|
|
1654
1773
|
});
|
|
1655
|
-
},
|
|
1774
|
+
}, ti = ({ props: e }) => {
|
|
1656
1775
|
let t = y(null);
|
|
1657
1776
|
return _(() => {
|
|
1658
1777
|
let n = t.current;
|
|
@@ -1698,7 +1817,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1698
1817
|
className: J,
|
|
1699
1818
|
style: { height: e.height ?? 300 }
|
|
1700
1819
|
});
|
|
1701
|
-
},
|
|
1820
|
+
}, ni = ({ props: e, emit: t }) => {
|
|
1702
1821
|
let { label: r, href: i, appearance: a, target: o, ghost: s, badge: c } = e, l = (e) => {
|
|
1703
1822
|
e.preventDefault(), t("press");
|
|
1704
1823
|
}, u = c === void 0 ? r : /* @__PURE__ */ C("span", {
|
|
@@ -1737,7 +1856,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1737
1856
|
onClick: l,
|
|
1738
1857
|
children: u
|
|
1739
1858
|
});
|
|
1740
|
-
},
|
|
1859
|
+
}, ri = j({
|
|
1741
1860
|
defaultClassName: "_1le8ba60",
|
|
1742
1861
|
variantClassNames: { disabled: {
|
|
1743
1862
|
true: "_1le8ba61",
|
|
@@ -1745,10 +1864,10 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1745
1864
|
} },
|
|
1746
1865
|
defaultVariants: {},
|
|
1747
1866
|
compoundVariants: []
|
|
1748
|
-
}),
|
|
1867
|
+
}), ii = [
|
|
1749
1868
|
{
|
|
1750
1869
|
name: "Text",
|
|
1751
|
-
catalog:
|
|
1870
|
+
catalog: pr,
|
|
1752
1871
|
renderer: ({ props: e }) => e.variant === "headline" ? e.size === void 0 ? /* @__PURE__ */ S(p, {
|
|
1753
1872
|
variant: "headline",
|
|
1754
1873
|
el: "h3",
|
|
@@ -1782,55 +1901,55 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1782
1901
|
},
|
|
1783
1902
|
{
|
|
1784
1903
|
name: "Card",
|
|
1785
|
-
catalog:
|
|
1786
|
-
renderer:
|
|
1904
|
+
catalog: Hn,
|
|
1905
|
+
renderer: Fr,
|
|
1787
1906
|
renderers: ["all"]
|
|
1788
1907
|
},
|
|
1789
1908
|
{
|
|
1790
1909
|
name: "Flex",
|
|
1791
|
-
catalog:
|
|
1792
|
-
renderer:
|
|
1910
|
+
catalog: qn,
|
|
1911
|
+
renderer: Hr,
|
|
1793
1912
|
renderers: ["all"]
|
|
1794
1913
|
},
|
|
1795
1914
|
{
|
|
1796
1915
|
name: "Grid",
|
|
1797
|
-
catalog:
|
|
1798
|
-
renderer:
|
|
1916
|
+
catalog: Jn,
|
|
1917
|
+
renderer: qr,
|
|
1799
1918
|
renderers: ["all"]
|
|
1800
1919
|
},
|
|
1801
1920
|
{
|
|
1802
1921
|
name: "Alert",
|
|
1803
|
-
catalog:
|
|
1804
|
-
renderer:
|
|
1922
|
+
catalog: zn,
|
|
1923
|
+
renderer: Mr,
|
|
1805
1924
|
renderers: ["all"]
|
|
1806
1925
|
},
|
|
1807
1926
|
{
|
|
1808
1927
|
name: "Divider",
|
|
1809
|
-
catalog:
|
|
1810
|
-
renderer:
|
|
1928
|
+
catalog: Gn,
|
|
1929
|
+
renderer: Br,
|
|
1811
1930
|
renderers: ["all"]
|
|
1812
1931
|
},
|
|
1813
1932
|
{
|
|
1814
1933
|
name: "Icon",
|
|
1815
|
-
catalog:
|
|
1816
|
-
renderer:
|
|
1934
|
+
catalog: or,
|
|
1935
|
+
renderer: $r,
|
|
1817
1936
|
renderers: ["all"]
|
|
1818
1937
|
},
|
|
1819
1938
|
{
|
|
1820
1939
|
name: "Chip",
|
|
1821
|
-
catalog:
|
|
1822
|
-
renderer:
|
|
1940
|
+
catalog: Wn,
|
|
1941
|
+
renderer: zr,
|
|
1823
1942
|
renderers: ["all"]
|
|
1824
1943
|
},
|
|
1825
1944
|
{
|
|
1826
1945
|
name: "Link",
|
|
1827
|
-
catalog:
|
|
1828
|
-
renderer:
|
|
1946
|
+
catalog: cr,
|
|
1947
|
+
renderer: ni,
|
|
1829
1948
|
renderers: ["all"]
|
|
1830
1949
|
},
|
|
1831
1950
|
{
|
|
1832
1951
|
name: "ProgressBar",
|
|
1833
|
-
catalog:
|
|
1952
|
+
catalog: ur,
|
|
1834
1953
|
renderer: ({ props: e }) => {
|
|
1835
1954
|
let t = X({ description: e.description });
|
|
1836
1955
|
return e.indeterminate || e.value === void 0 ? /* @__PURE__ */ S(ne, {
|
|
@@ -1847,43 +1966,43 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1847
1966
|
},
|
|
1848
1967
|
{
|
|
1849
1968
|
name: "BarChart",
|
|
1850
|
-
catalog:
|
|
1851
|
-
renderer:
|
|
1969
|
+
catalog: Bn,
|
|
1970
|
+
renderer: Nr,
|
|
1852
1971
|
renderers: ["all"]
|
|
1853
1972
|
},
|
|
1854
1973
|
{
|
|
1855
1974
|
name: "DonutChart",
|
|
1856
|
-
catalog:
|
|
1857
|
-
renderer:
|
|
1975
|
+
catalog: Kn,
|
|
1976
|
+
renderer: Vr,
|
|
1858
1977
|
renderers: ["all"]
|
|
1859
1978
|
},
|
|
1860
1979
|
{
|
|
1861
1980
|
name: "LineChart",
|
|
1862
|
-
catalog:
|
|
1863
|
-
renderer:
|
|
1981
|
+
catalog: B,
|
|
1982
|
+
renderer: ti,
|
|
1864
1983
|
renderers: ["all"]
|
|
1865
1984
|
},
|
|
1866
1985
|
{
|
|
1867
1986
|
name: "Button",
|
|
1868
|
-
catalog:
|
|
1869
|
-
renderer:
|
|
1987
|
+
catalog: Vn,
|
|
1988
|
+
renderer: Pr,
|
|
1870
1989
|
renderers: ["all"]
|
|
1871
1990
|
},
|
|
1872
1991
|
{
|
|
1873
1992
|
name: "Checkbox",
|
|
1874
|
-
catalog:
|
|
1875
|
-
renderer:
|
|
1993
|
+
catalog: Un,
|
|
1994
|
+
renderer: Lr,
|
|
1876
1995
|
renderers: ["all"]
|
|
1877
1996
|
},
|
|
1878
1997
|
{
|
|
1879
1998
|
name: "Input",
|
|
1880
|
-
catalog:
|
|
1881
|
-
renderer:
|
|
1999
|
+
catalog: sr,
|
|
2000
|
+
renderer: ei,
|
|
1882
2001
|
renderers: ["all"]
|
|
1883
2002
|
},
|
|
1884
2003
|
{
|
|
1885
2004
|
name: "Textarea",
|
|
1886
|
-
catalog:
|
|
2005
|
+
catalog: mr,
|
|
1887
2006
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
1888
2007
|
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
1889
2008
|
return /* @__PURE__ */ S(ce, {
|
|
@@ -1905,14 +2024,14 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1905
2024
|
},
|
|
1906
2025
|
{
|
|
1907
2026
|
name: "Listbox",
|
|
1908
|
-
catalog:
|
|
2027
|
+
catalog: lr,
|
|
1909
2028
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
1910
2029
|
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "", l = e.options.map((e) => ({
|
|
1911
2030
|
id: e.value,
|
|
1912
2031
|
label: e.label
|
|
1913
2032
|
})), u = l.find((e) => e.id === s);
|
|
1914
2033
|
return /* @__PURE__ */ C("div", {
|
|
1915
|
-
className:
|
|
2034
|
+
className: ri({ disabled: e.disabled ?? !1 }),
|
|
1916
2035
|
children: [/* @__PURE__ */ S(c, { children: e.label }), /* @__PURE__ */ S(ee, {
|
|
1917
2036
|
items: l,
|
|
1918
2037
|
...u ? { selected: u } : {},
|
|
@@ -1931,7 +2050,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1931
2050
|
},
|
|
1932
2051
|
{
|
|
1933
2052
|
name: "RadioGroup",
|
|
1934
|
-
catalog:
|
|
2053
|
+
catalog: dr,
|
|
1935
2054
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
1936
2055
|
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
1937
2056
|
return /* @__PURE__ */ S(re.Group, {
|
|
@@ -1951,7 +2070,7 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1951
2070
|
},
|
|
1952
2071
|
{
|
|
1953
2072
|
name: "Switch",
|
|
1954
|
-
catalog:
|
|
2073
|
+
catalog: fr,
|
|
1955
2074
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
1956
2075
|
let r = t?.checked, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.checked ?? !1 : e.checked ?? !1;
|
|
1957
2076
|
return /* @__PURE__ */ S(oe, {
|
|
@@ -1965,12 +2084,18 @@ var Fr = ({ props: e, children: t }) => {
|
|
|
1965
2084
|
});
|
|
1966
2085
|
},
|
|
1967
2086
|
renderers: ["all"]
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
name: "GuidanceCard",
|
|
2090
|
+
catalog: ar,
|
|
2091
|
+
renderer: Zr,
|
|
2092
|
+
renderers: ["all"]
|
|
1968
2093
|
}
|
|
1969
2094
|
];
|
|
1970
|
-
Object.fromEntries(
|
|
2095
|
+
Object.fromEntries(ii.map(({ name: e, renderer: t }) => [e, t]));
|
|
1971
2096
|
//#endregion
|
|
1972
2097
|
//#region src/marketing/catalog/components/revenue-card.catalog.ts
|
|
1973
|
-
var
|
|
2098
|
+
var ai = {
|
|
1974
2099
|
props: w.object({
|
|
1975
2100
|
title: w.string(),
|
|
1976
2101
|
value: w.string(),
|
|
@@ -1983,7 +2108,7 @@ var Ur = {
|
|
|
1983
2108
|
}),
|
|
1984
2109
|
slots: [],
|
|
1985
2110
|
description: "KPI metric card. trend: up=green↑ down=red↓ flat=grey→. delta e.g. \"+12% vs last month\". Leaf node — no children."
|
|
1986
|
-
},
|
|
2111
|
+
}, oi = j({
|
|
1987
2112
|
defaultClassName: "cy2dbi0",
|
|
1988
2113
|
variantClassNames: { trend: {
|
|
1989
2114
|
up: "cy2dbi1",
|
|
@@ -1992,11 +2117,11 @@ var Ur = {
|
|
|
1992
2117
|
} },
|
|
1993
2118
|
defaultVariants: {},
|
|
1994
2119
|
compoundVariants: []
|
|
1995
|
-
}),
|
|
2120
|
+
}), si = [{
|
|
1996
2121
|
name: "RevenueCard",
|
|
1997
|
-
catalog:
|
|
2122
|
+
catalog: ai,
|
|
1998
2123
|
renderer: ({ props: e }) => {
|
|
1999
|
-
let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r =
|
|
2124
|
+
let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r = oi({ trend: t });
|
|
2000
2125
|
return /* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(l, {
|
|
2001
2126
|
direction: "column",
|
|
2002
2127
|
gap: "2",
|
|
@@ -2030,39 +2155,39 @@ var Ur = {
|
|
|
2030
2155
|
}];
|
|
2031
2156
|
//#endregion
|
|
2032
2157
|
//#region src/registry-utils.ts
|
|
2033
|
-
function
|
|
2158
|
+
function ci(e, t) {
|
|
2034
2159
|
return t === "all" ? [...e] : e.filter(({ renderers: e }) => e.includes("all") || e.includes(t));
|
|
2035
2160
|
}
|
|
2036
|
-
function
|
|
2161
|
+
function li(e) {
|
|
2037
2162
|
return Object.fromEntries(e.map(({ name: e, catalog: t }) => [e, t]));
|
|
2038
2163
|
}
|
|
2039
|
-
function
|
|
2164
|
+
function ui(e) {
|
|
2040
2165
|
return Object.fromEntries(e.map(({ name: e, renderer: t }) => [e, t]));
|
|
2041
2166
|
}
|
|
2042
2167
|
//#endregion
|
|
2043
2168
|
//#region src/registry.ts
|
|
2044
|
-
var
|
|
2045
|
-
...
|
|
2046
|
-
...
|
|
2169
|
+
var di = [
|
|
2170
|
+
...ii,
|
|
2171
|
+
...si,
|
|
2047
2172
|
...U
|
|
2048
2173
|
];
|
|
2049
2174
|
function Z(e = "chat") {
|
|
2050
|
-
let t =
|
|
2051
|
-
return
|
|
2175
|
+
let t = ci(di, e), n = li(t), r = ui(t);
|
|
2176
|
+
return Me(T(D, {
|
|
2052
2177
|
components: n,
|
|
2053
2178
|
actions: z
|
|
2054
2179
|
}), {
|
|
2055
2180
|
components: r,
|
|
2056
|
-
actions:
|
|
2181
|
+
actions: Rn
|
|
2057
2182
|
});
|
|
2058
2183
|
}
|
|
2059
|
-
var Q = Z("chat"),
|
|
2060
|
-
function
|
|
2184
|
+
var Q = Z("chat"), fi = Q.registry, pi = Q.handlers, mi = Q.executeAction;
|
|
2185
|
+
function hi() {
|
|
2061
2186
|
return Z("context");
|
|
2062
2187
|
}
|
|
2063
2188
|
//#endregion
|
|
2064
2189
|
//#region src/renderers/internal/enrichments/button-actions.ts
|
|
2065
|
-
function
|
|
2190
|
+
function gi(e) {
|
|
2066
2191
|
let t = { ...e.elements };
|
|
2067
2192
|
for (let [e, n] of Object.entries(t)) {
|
|
2068
2193
|
if (n.type !== "Button" || n.on?.press) continue;
|
|
@@ -2085,16 +2210,16 @@ function ei(e) {
|
|
|
2085
2210
|
}
|
|
2086
2211
|
//#endregion
|
|
2087
2212
|
//#region src/renderers/internal/enrichments/useEnrichedSpec.ts
|
|
2088
|
-
function
|
|
2213
|
+
function _i(e, t) {
|
|
2089
2214
|
return v(() => t.reduce((e, t) => t(e), e), [e, t]);
|
|
2090
2215
|
}
|
|
2091
2216
|
//#endregion
|
|
2092
2217
|
//#region src/renderers/spec-renderer.tsx
|
|
2093
|
-
var
|
|
2094
|
-
let a =
|
|
2095
|
-
if (o.current !== e && (o.current = e, s.current =
|
|
2218
|
+
var vi = [gi], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i }) => {
|
|
2219
|
+
let a = _i(e, vi), o = y(null), s = y(null);
|
|
2220
|
+
if (o.current !== e && (o.current = e, s.current = je(a.state ?? {})), s.current === null) throw Error("State store is not initialized");
|
|
2096
2221
|
let c = s.current;
|
|
2097
|
-
return /* @__PURE__ */ S(
|
|
2222
|
+
return /* @__PURE__ */ S(ke, {
|
|
2098
2223
|
registry: t,
|
|
2099
2224
|
store: c,
|
|
2100
2225
|
handlers: v(() => {
|
|
@@ -2112,13 +2237,13 @@ var ni = [ei], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
|
|
|
2112
2237
|
c
|
|
2113
2238
|
]),
|
|
2114
2239
|
functions: v(() => ({ computeTotal: (e) => `$${((Number.parseFloat(String(e.quantity ?? 0)) || 0) * (Number.parseFloat(String(e.unitPrice ?? "0").replace(/[^0-9.]/g, "")) || 0)).toFixed(2)}` }), []),
|
|
2115
|
-
children: /* @__PURE__ */ S(
|
|
2240
|
+
children: /* @__PURE__ */ S(Ae, {
|
|
2116
2241
|
spec: a,
|
|
2117
2242
|
registry: t,
|
|
2118
2243
|
loading: i ?? !1
|
|
2119
2244
|
})
|
|
2120
2245
|
});
|
|
2121
|
-
},
|
|
2246
|
+
}, yi = class extends pe {
|
|
2122
2247
|
state = {
|
|
2123
2248
|
hasError: !1,
|
|
2124
2249
|
message: ""
|
|
@@ -2148,12 +2273,12 @@ var ni = [ei], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
|
|
|
2148
2273
|
};
|
|
2149
2274
|
//#endregion
|
|
2150
2275
|
//#region src/renderers/wrap-context-registry.tsx
|
|
2151
|
-
function
|
|
2276
|
+
function bi(e, t) {
|
|
2152
2277
|
if (process.env.NODE_ENV === "production") return e;
|
|
2153
2278
|
let n = { ...e };
|
|
2154
2279
|
for (let [r, i] of Object.entries(e)) {
|
|
2155
2280
|
let e = i;
|
|
2156
|
-
n[r] = ((n) => /* @__PURE__ */ S(
|
|
2281
|
+
n[r] = ((n) => /* @__PURE__ */ S(yi, {
|
|
2157
2282
|
elementType: r,
|
|
2158
2283
|
...t ? { onError: t } : {},
|
|
2159
2284
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
@@ -2163,7 +2288,7 @@ function ii(e, t) {
|
|
|
2163
2288
|
}
|
|
2164
2289
|
//#endregion
|
|
2165
2290
|
//#region src/renderers/context-spec-renderer.tsx
|
|
2166
|
-
var
|
|
2291
|
+
var xi = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loading: a }) => {
|
|
2167
2292
|
let o = a ? [] : G(e);
|
|
2168
2293
|
o.length > 0 && process.env.NODE_ENV !== "production" && console.warn(`[ContextSpecRenderer] Spec validation issues:\n${K(o.map((e) => ({
|
|
2169
2294
|
...e,
|
|
@@ -2172,15 +2297,15 @@ var ai = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loa
|
|
|
2172
2297
|
let s = t ?? Z("context").registry, c = n ?? Z("context").handlers;
|
|
2173
2298
|
return /* @__PURE__ */ S($, {
|
|
2174
2299
|
spec: e,
|
|
2175
|
-
registry: v(() =>
|
|
2300
|
+
registry: v(() => bi(s, i), [s, i]),
|
|
2176
2301
|
handlers: c,
|
|
2177
2302
|
...r ? { actions: r } : {},
|
|
2178
2303
|
...a === void 0 ? {} : { loading: a }
|
|
2179
2304
|
});
|
|
2180
|
-
},
|
|
2305
|
+
}, Si = "nilaa0";
|
|
2181
2306
|
//#endregion
|
|
2182
2307
|
//#region src/renderers/sectioned-context-renderer.tsx
|
|
2183
|
-
function
|
|
2308
|
+
function Ci(e, t) {
|
|
2184
2309
|
let n = {}, r = !1, i = (t) => {
|
|
2185
2310
|
let a = e.elements[t];
|
|
2186
2311
|
if (!a) {
|
|
@@ -2197,8 +2322,8 @@ function si(e, t) {
|
|
|
2197
2322
|
hasMissingRefs: r
|
|
2198
2323
|
};
|
|
2199
2324
|
}
|
|
2200
|
-
function
|
|
2201
|
-
let { elements: n, hasMissingRefs: r } =
|
|
2325
|
+
function wi(e, t) {
|
|
2326
|
+
let { elements: n, hasMissingRefs: r } = Ci(e, t), i = {
|
|
2202
2327
|
root: t,
|
|
2203
2328
|
elements: n
|
|
2204
2329
|
}, a = e.state;
|
|
@@ -2207,14 +2332,14 @@ function ci(e, t) {
|
|
|
2207
2332
|
hasMissingRefs: r
|
|
2208
2333
|
};
|
|
2209
2334
|
}
|
|
2210
|
-
function
|
|
2335
|
+
function Ti(e, t) {
|
|
2211
2336
|
let n = y(/* @__PURE__ */ new Map());
|
|
2212
2337
|
return v(() => {
|
|
2213
2338
|
if (!e?.root) return [];
|
|
2214
2339
|
let r = e.elements[e.root];
|
|
2215
2340
|
if (!r) return [];
|
|
2216
2341
|
let i = (r.children ?? []).filter((t) => e.elements[t]), a = n.current, o = /* @__PURE__ */ new Map(), s = i.map((n, r) => {
|
|
2217
|
-
let { spec: s, hasMissingRefs: c } =
|
|
2342
|
+
let { spec: s, hasMissingRefs: c } = wi(e, n), l = JSON.stringify(s), u = a.get(n), d = u && u.key === l ? u.spec : s;
|
|
2218
2343
|
o.set(n, {
|
|
2219
2344
|
key: l,
|
|
2220
2345
|
spec: d
|
|
@@ -2229,7 +2354,7 @@ function li(e, t) {
|
|
|
2229
2354
|
return n.current = o, s;
|
|
2230
2355
|
}, [e, t]);
|
|
2231
2356
|
}
|
|
2232
|
-
function
|
|
2357
|
+
function Ei(e) {
|
|
2233
2358
|
let t = y(/* @__PURE__ */ new Map());
|
|
2234
2359
|
return v(() => {
|
|
2235
2360
|
let n = t.current, r = /* @__PURE__ */ new Map(), i = e.map((e) => {
|
|
@@ -2245,9 +2370,9 @@ function ui(e) {
|
|
|
2245
2370
|
return t.current = r, i;
|
|
2246
2371
|
}, [e]);
|
|
2247
2372
|
}
|
|
2248
|
-
function
|
|
2373
|
+
function Di({ title: e }) {
|
|
2249
2374
|
return /* @__PURE__ */ C("div", {
|
|
2250
|
-
className:
|
|
2375
|
+
className: Ye,
|
|
2251
2376
|
"data-testid": "context-section-skeleton",
|
|
2252
2377
|
children: [/* @__PURE__ */ S(ae, {
|
|
2253
2378
|
variant: "headline",
|
|
@@ -2255,7 +2380,7 @@ function di({ title: e }) {
|
|
|
2255
2380
|
}), /* @__PURE__ */ S(ie, { height: "64px" })]
|
|
2256
2381
|
});
|
|
2257
2382
|
}
|
|
2258
|
-
function
|
|
2383
|
+
function Oi({ slot: e, registry: t, handlers: n, actions: r }) {
|
|
2259
2384
|
return e.spec ? /* @__PURE__ */ C("div", {
|
|
2260
2385
|
"data-testid": `context-section-${e.id}`,
|
|
2261
2386
|
"data-status": e.status,
|
|
@@ -2266,24 +2391,24 @@ function fi({ slot: e, registry: t, handlers: n, actions: r }) {
|
|
|
2266
2391
|
loading: e.status === "loading",
|
|
2267
2392
|
...r ? { actions: r } : {}
|
|
2268
2393
|
}), e.status === "loading" ? /* @__PURE__ */ S("div", {
|
|
2269
|
-
className:
|
|
2394
|
+
className: Si,
|
|
2270
2395
|
children: /* @__PURE__ */ S(ae, {
|
|
2271
2396
|
variant: "body",
|
|
2272
2397
|
rows: 2,
|
|
2273
2398
|
"aria-label": "Loading more of this section"
|
|
2274
2399
|
})
|
|
2275
2400
|
}) : null]
|
|
2276
|
-
}) : /* @__PURE__ */ S(
|
|
2401
|
+
}) : /* @__PURE__ */ S(Di, { ...e.title ? { title: e.title } : {} });
|
|
2277
2402
|
}
|
|
2278
|
-
var
|
|
2279
|
-
let s = v(() => Z("context"), []), c = r ?? s.registry, l = i ?? s.handlers, u = v(() =>
|
|
2403
|
+
var ki = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, actions: a, onRenderError: o }) => {
|
|
2404
|
+
let s = v(() => Z("context"), []), c = r ?? s.registry, l = i ?? s.handlers, u = v(() => bi(c, o), [c, o]), d = Ti(e, n);
|
|
2280
2405
|
return /* @__PURE__ */ S("div", {
|
|
2281
2406
|
className: F,
|
|
2282
2407
|
"data-testid": "sectioned-context-panel",
|
|
2283
|
-
children:
|
|
2408
|
+
children: Ei(t ?? d).map((e) => /* @__PURE__ */ S(yi, {
|
|
2284
2409
|
elementType: e.id,
|
|
2285
2410
|
...o ? { onError: o } : {},
|
|
2286
|
-
children: /* @__PURE__ */ S(
|
|
2411
|
+
children: /* @__PURE__ */ S(Oi, {
|
|
2287
2412
|
slot: e,
|
|
2288
2413
|
registry: u,
|
|
2289
2414
|
handlers: l,
|
|
@@ -2293,6 +2418,6 @@ var pi = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, act
|
|
|
2293
2418
|
});
|
|
2294
2419
|
};
|
|
2295
2420
|
//#endregion
|
|
2296
|
-
export {
|
|
2421
|
+
export { xi as ContextSpecRenderer, ki as SectionedContextRenderer, $ as SpecRenderer, Ir as catalog, H as composeCatalogComponents, vr as contextCatalog, hr as createScopedCatalog, mi as executeAction, wi as extractSectionSpec, jr as formatContextRenderReport, K as formatContextSpecIssues, hi as getContextRegistry, Z as getRegistry, pi as handlers, Ar as hasContextSpecErrors, gr as mergeCatalogs, kr as postProcessContextSpec, fi as registry, G as validateContextSpec, Or as validateContextSpecDeep };
|
|
2297
2422
|
|
|
2298
|
-
//# sourceMappingURL=
|
|
2423
|
+
//# sourceMappingURL=index.js.map
|