@servicetitan/json-render-react 0.4.0-ANV-5236-1290426 → 0.4.0
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/catalog/core/catalog-prompt.md +1 -12
- package/dist/catalog/core/schema.json +0 -1
- package/dist/catalog/marketing/catalog-prompt.md +1 -12
- package/dist/catalog/marketing/schema.json +0 -1
- package/dist/core/catalog/catalog-def.d.ts +2 -45
- package/dist/core/catalog/input.catalog.d.ts +1 -1
- package/dist/core/catalog/schemas.d.ts +2 -45
- package/dist/core/catalog/text.catalog.d.ts +1 -1
- package/dist/index.js +856 -1159
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/core/catalog/email-card.catalog.d.ts +0 -55
- package/dist/core/catalog/email-card.css.d.ts +0 -4
- package/dist/core/catalog/email-card.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import { IconChevronDown as
|
|
4
|
-
import { Children as
|
|
5
|
-
import { core as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { z as
|
|
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
|
|
19
|
-
import { schema as
|
|
20
|
-
import { JSONUIProvider as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import
|
|
24
|
-
import { ThemeCategorical as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import * as
|
|
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, 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
|
+
import { core as x } from "@servicetitan/anvil2/token";
|
|
6
|
+
import { Fragment as ge, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
7
|
+
import { z as w } from "zod";
|
|
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
|
+
import { schema as D } from "@json-render/react/schema";
|
|
20
|
+
import { JSONUIProvider as ke, Renderer as Ae, createStateStore as je, defineRegistry as Me, useStateStore as O } from "@json-render/react";
|
|
21
|
+
import * as k from "@amcharts/amcharts5";
|
|
22
|
+
import * as A from "@amcharts/amcharts5/xy";
|
|
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 Ie(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 ze(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 He = (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 He = (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 He = (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 He = (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",
|
|
@@ -125,33 +125,33 @@ var He = (e, t, n) => {
|
|
|
125
125
|
} },
|
|
126
126
|
defaultVariants: { expanded: !1 },
|
|
127
127
|
compoundVariants: []
|
|
128
|
-
}),
|
|
128
|
+
}), M = [
|
|
129
129
|
"success",
|
|
130
130
|
"warning",
|
|
131
131
|
"danger",
|
|
132
132
|
"info",
|
|
133
133
|
"neutral"
|
|
134
|
-
],
|
|
135
|
-
success:
|
|
136
|
-
warning:
|
|
137
|
-
danger:
|
|
138
|
-
info:
|
|
139
|
-
neutral:
|
|
134
|
+
], rt = {
|
|
135
|
+
success: x.semantic.BackgroundColorSuccessSubdued.value,
|
|
136
|
+
warning: x.semantic.BackgroundColorWarningSubdued.value,
|
|
137
|
+
danger: x.semantic.BackgroundColorDangerSubdued.value,
|
|
138
|
+
info: x.semantic.BackgroundColorPrimarySubdued.value,
|
|
139
|
+
neutral: x.semantic.BackgroundColorSecondary.value
|
|
140
140
|
};
|
|
141
|
-
function
|
|
142
|
-
return
|
|
143
|
-
}
|
|
144
|
-
var
|
|
145
|
-
success:
|
|
146
|
-
warning:
|
|
147
|
-
danger:
|
|
148
|
-
info:
|
|
141
|
+
function it(e = "neutral") {
|
|
142
|
+
return rt[e];
|
|
143
|
+
}
|
|
144
|
+
var at = {
|
|
145
|
+
success: x.semantic.BackgroundColorSuccess.value,
|
|
146
|
+
warning: x.semantic.BackgroundColorWarning.value,
|
|
147
|
+
danger: x.semantic.ForegroundColorDanger.value,
|
|
148
|
+
info: x.semantic.ForegroundColorPrimary.value,
|
|
149
149
|
neutral: void 0
|
|
150
150
|
};
|
|
151
|
-
function
|
|
152
|
-
return
|
|
151
|
+
function N(e) {
|
|
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,31 +170,31 @@ function tt(e) {
|
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region src/context/components/collapsible-card.tsx
|
|
173
|
-
function
|
|
174
|
-
return typeof e == "number" ? /* @__PURE__ */
|
|
173
|
+
function st({ badge: e }) {
|
|
174
|
+
return typeof e == "number" ? /* @__PURE__ */ S(o, {
|
|
175
175
|
label: String(e),
|
|
176
176
|
size: "small",
|
|
177
177
|
style: { marginTop: "2px" }
|
|
178
|
-
}) : /* @__PURE__ */
|
|
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] =
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
className:
|
|
189
|
-
children: /* @__PURE__ */
|
|
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
|
+
return /* @__PURE__ */ S("div", {
|
|
188
|
+
className: Je,
|
|
189
|
+
children: /* @__PURE__ */ S(m, {
|
|
190
190
|
padding: "base",
|
|
191
|
-
content: /* @__PURE__ */
|
|
192
|
-
className:
|
|
193
|
-
children: [/* @__PURE__ */
|
|
191
|
+
content: /* @__PURE__ */ C("div", {
|
|
192
|
+
className: Xe,
|
|
193
|
+
children: [/* @__PURE__ */ S(h, {
|
|
194
194
|
variant: "headline",
|
|
195
195
|
el: "h3",
|
|
196
196
|
size: "substantial",
|
|
197
|
-
text: /* @__PURE__ */
|
|
197
|
+
text: /* @__PURE__ */ C("button", {
|
|
198
198
|
type: "button",
|
|
199
199
|
"aria-expanded": i,
|
|
200
200
|
"aria-controls": c,
|
|
@@ -204,25 +204,25 @@ var rt = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
204
204
|
return t && s(!0), t;
|
|
205
205
|
});
|
|
206
206
|
},
|
|
207
|
-
className:
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
-
className:
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
-
className:
|
|
207
|
+
className: $e,
|
|
208
|
+
children: [/* @__PURE__ */ C("span", {
|
|
209
|
+
className: et,
|
|
210
|
+
children: [/* @__PURE__ */ S("span", {
|
|
211
|
+
className: tt,
|
|
212
212
|
children: e
|
|
213
|
-
}), t == null ? null : /* @__PURE__ */
|
|
214
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), t == null ? null : /* @__PURE__ */ S(st, { badge: t })]
|
|
214
|
+
}), /* @__PURE__ */ S(fe, { className: nt({ expanded: i }) })]
|
|
215
215
|
})
|
|
216
|
-
}), /* @__PURE__ */
|
|
217
|
-
className:
|
|
216
|
+
}), /* @__PURE__ */ S("div", {
|
|
217
|
+
className: Ze({ expanded: i }),
|
|
218
218
|
onTransitionEnd: (e) => {
|
|
219
219
|
e.propertyName !== "grid-template-rows" || i || s(!1);
|
|
220
220
|
},
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
className:
|
|
223
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ S("div", {
|
|
222
|
+
className: Qe({ expanded: i }),
|
|
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,55 +231,55 @@ var rt = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
|
|
|
231
231
|
})
|
|
232
232
|
})
|
|
233
233
|
});
|
|
234
|
-
},
|
|
235
|
-
label:
|
|
236
|
-
tone:
|
|
237
|
-
}),
|
|
238
|
-
props:
|
|
239
|
-
title:
|
|
240
|
-
defaultExpanded:
|
|
241
|
-
badge:
|
|
234
|
+
}, lt = w.object({
|
|
235
|
+
label: w.string(),
|
|
236
|
+
tone: w.enum(M).optional()
|
|
237
|
+
}), ut = w.union([w.number().int().nonnegative(), lt]), dt = {
|
|
238
|
+
props: w.object({
|
|
239
|
+
title: w.string(),
|
|
240
|
+
defaultExpanded: w.boolean().optional(),
|
|
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
|
-
}),
|
|
251
|
-
label:
|
|
252
|
-
tone:
|
|
253
|
-
}),
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
]),
|
|
259
|
-
key:
|
|
260
|
-
header:
|
|
261
|
-
type:
|
|
250
|
+
}), pt = w.object({
|
|
251
|
+
label: w.string(),
|
|
252
|
+
tone: w.enum(M).optional()
|
|
253
|
+
}), mt = w.union([
|
|
254
|
+
w.string(),
|
|
255
|
+
w.number(),
|
|
256
|
+
w.null(),
|
|
257
|
+
pt
|
|
258
|
+
]), ht = w.object({
|
|
259
|
+
key: w.string(),
|
|
260
|
+
header: w.string(),
|
|
261
|
+
type: w.enum([
|
|
262
262
|
"text",
|
|
263
263
|
"currency",
|
|
264
264
|
"chip",
|
|
265
265
|
"delta"
|
|
266
266
|
]).optional(),
|
|
267
|
-
sortable:
|
|
268
|
-
}),
|
|
269
|
-
props:
|
|
270
|
-
columns:
|
|
271
|
-
rows:
|
|
272
|
-
defaultSortedColumn:
|
|
273
|
-
id:
|
|
274
|
-
desc:
|
|
267
|
+
sortable: w.boolean().optional()
|
|
268
|
+
}), gt = w.record(w.string(), mt).and(w.object({ id: w.string() })), _t = {
|
|
269
|
+
props: w.object({
|
|
270
|
+
columns: w.array(ht),
|
|
271
|
+
rows: w.array(gt),
|
|
272
|
+
defaultSortedColumn: w.object({
|
|
273
|
+
id: w.string(),
|
|
274
|
+
desc: w.boolean().optional()
|
|
275
275
|
}).optional()
|
|
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,143 +296,143 @@ function ht(e) {
|
|
|
296
296
|
sign: "none"
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
className:
|
|
301
|
-
children: /* @__PURE__ */
|
|
302
|
-
columns:
|
|
303
|
-
let t =
|
|
299
|
+
var xt = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
300
|
+
className: vt,
|
|
301
|
+
children: /* @__PURE__ */ S(_e, {
|
|
302
|
+
columns: v(() => {
|
|
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 =
|
|
310
|
-
return t ? /* @__PURE__ */
|
|
309
|
+
let t = ot(e);
|
|
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 } =
|
|
318
|
-
return /* @__PURE__ */
|
|
319
|
-
className:
|
|
317
|
+
let { text: t, sign: n } = bt(e), r = n === "positive" ? N("danger") : n === "negative" ? N("success") : void 0;
|
|
318
|
+
return /* @__PURE__ */ S("span", {
|
|
319
|
+
className: yt,
|
|
320
320
|
style: r ? { color: r } : void 0,
|
|
321
321
|
children: t
|
|
322
322
|
});
|
|
323
323
|
} } : {}
|
|
324
324
|
}));
|
|
325
325
|
}, [e.columns]),
|
|
326
|
-
data:
|
|
326
|
+
data: v(() => e.rows.map((e) => ({ ...e })), [e.rows]),
|
|
327
327
|
isSelectable: !1,
|
|
328
328
|
...e.defaultSortedColumn ? { defaultSortedColumn: {
|
|
329
329
|
id: e.defaultSortedColumn.id,
|
|
330
330
|
desc: e.defaultSortedColumn.desc ?? !1
|
|
331
331
|
} } : {}
|
|
332
332
|
})
|
|
333
|
-
}),
|
|
334
|
-
label:
|
|
335
|
-
url:
|
|
336
|
-
}),
|
|
337
|
-
props:
|
|
333
|
+
}), St = w.object({
|
|
334
|
+
label: w.string(),
|
|
335
|
+
url: w.string()
|
|
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 } =
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
className:
|
|
380
|
+
}, Ft = { "--a2-mod-icon-font-size": "80px" };
|
|
381
|
+
function It({ kind: e }) {
|
|
382
|
+
let { svg: t, color: n } = Pt[e];
|
|
383
|
+
return /* @__PURE__ */ S("div", {
|
|
384
|
+
className: Dt,
|
|
385
385
|
"aria-hidden": "true",
|
|
386
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ S(d, {
|
|
387
387
|
svg: t,
|
|
388
388
|
size: "medium",
|
|
389
389
|
color: n
|
|
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
|
|
398
|
-
return /* @__PURE__ */
|
|
397
|
+
function Rt({ label: e }) {
|
|
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 } =
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
className:
|
|
409
|
-
children: [/* @__PURE__ */
|
|
410
|
-
className:
|
|
411
|
-
children: t === "image" ? /* @__PURE__ */
|
|
405
|
+
function zt({ item: e, kind: t }) {
|
|
406
|
+
let { svg: n, color: r } = Pt[t];
|
|
407
|
+
return /* @__PURE__ */ C("div", {
|
|
408
|
+
className: Ot,
|
|
409
|
+
children: [/* @__PURE__ */ S("div", {
|
|
410
|
+
className: kt,
|
|
411
|
+
children: t === "image" ? /* @__PURE__ */ S("img", {
|
|
412
412
|
src: e.url,
|
|
413
413
|
alt: e.label,
|
|
414
|
-
className:
|
|
415
|
-
}) : /* @__PURE__ */
|
|
416
|
-
className:
|
|
417
|
-
children: /* @__PURE__ */
|
|
414
|
+
className: At
|
|
415
|
+
}) : /* @__PURE__ */ S("div", {
|
|
416
|
+
className: jt,
|
|
417
|
+
children: /* @__PURE__ */ S(d, {
|
|
418
418
|
svg: n,
|
|
419
419
|
color: r,
|
|
420
|
-
style:
|
|
420
|
+
style: Ft
|
|
421
421
|
})
|
|
422
422
|
})
|
|
423
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ S(Rt, { label: e.label })]
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
let n =
|
|
428
|
-
return /* @__PURE__ */
|
|
429
|
-
className:
|
|
426
|
+
function Bt({ item: e, onPreview: t }) {
|
|
427
|
+
let n = Nt(e.label);
|
|
428
|
+
return /* @__PURE__ */ S(m, {
|
|
429
|
+
className: Tt,
|
|
430
430
|
padding: "snug",
|
|
431
431
|
onPress: t,
|
|
432
432
|
label: `Preview ${e.label}`,
|
|
433
|
-
content: /* @__PURE__ */
|
|
434
|
-
className:
|
|
435
|
-
children: [/* @__PURE__ */
|
|
433
|
+
content: /* @__PURE__ */ C("div", {
|
|
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 Ft({ item: e, onPreview: t }) {
|
|
|
440
440
|
})
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
let [t, n] =
|
|
445
|
-
return /* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
448
|
+
}), /* @__PURE__ */ S(le, {
|
|
449
449
|
title: "View Attachment",
|
|
450
|
-
content: /* @__PURE__ */
|
|
450
|
+
content: /* @__PURE__ */ S(zt, {
|
|
451
451
|
item: e,
|
|
452
452
|
kind: r
|
|
453
453
|
}),
|
|
@@ -455,96 +455,96 @@ function It({ 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__ */
|
|
465
|
-
}),
|
|
466
|
-
title:
|
|
467
|
-
identifier:
|
|
468
|
-
identifierHref:
|
|
469
|
-
meta:
|
|
470
|
-
callout:
|
|
471
|
-
calloutTone:
|
|
472
|
-
calloutLabel:
|
|
473
|
-
}),
|
|
474
|
-
props:
|
|
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
|
+
title: w.string(),
|
|
467
|
+
identifier: w.string().optional(),
|
|
468
|
+
identifierHref: w.string().optional(),
|
|
469
|
+
meta: w.string().optional(),
|
|
470
|
+
callout: w.string().optional(),
|
|
471
|
+
calloutTone: w.enum(M).optional(),
|
|
472
|
+
calloutLabel: w.string().optional()
|
|
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
|
|
481
|
-
let t = e.calloutTone ?
|
|
482
|
-
return /* @__PURE__ */
|
|
483
|
-
className:
|
|
484
|
-
children: [/* @__PURE__ */
|
|
485
|
-
className:
|
|
486
|
-
children: [/* @__PURE__ */
|
|
487
|
-
className:
|
|
480
|
+
function $t({ item: e }) {
|
|
481
|
+
let t = e.calloutTone ? N(e.calloutTone) : void 0, n = e.identifier, r = e.callout != null || e.calloutLabel != null;
|
|
482
|
+
return /* @__PURE__ */ C("div", {
|
|
483
|
+
className: Jt,
|
|
484
|
+
children: [/* @__PURE__ */ C("div", {
|
|
485
|
+
className: Yt,
|
|
486
|
+
children: [/* @__PURE__ */ C("div", {
|
|
487
|
+
className: Xt,
|
|
488
488
|
children: [
|
|
489
|
-
n && e.identifierHref ? /* @__PURE__ */
|
|
489
|
+
n && e.identifierHref ? /* @__PURE__ */ S(de, {
|
|
490
490
|
href: e.identifierHref,
|
|
491
491
|
target: "_blank",
|
|
492
492
|
text: n
|
|
493
|
-
}) : n ? /* @__PURE__ */
|
|
493
|
+
}) : n ? /* @__PURE__ */ S(h, {
|
|
494
494
|
variant: "body",
|
|
495
495
|
size: "compact",
|
|
496
496
|
text: n
|
|
497
497
|
}) : null,
|
|
498
|
-
n ? /* @__PURE__ */
|
|
498
|
+
n ? /* @__PURE__ */ S("span", {
|
|
499
499
|
"aria-hidden": "true",
|
|
500
|
-
className:
|
|
500
|
+
className: Zt
|
|
501
501
|
}) : null,
|
|
502
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ S(h, {
|
|
503
503
|
variant: "body",
|
|
504
504
|
size: "regular",
|
|
505
505
|
text: e.title
|
|
506
506
|
})
|
|
507
507
|
]
|
|
508
|
-
}), e.meta ? /* @__PURE__ */
|
|
508
|
+
}), e.meta ? /* @__PURE__ */ S(h, {
|
|
509
509
|
variant: "body",
|
|
510
510
|
size: "fine",
|
|
511
511
|
text: e.meta,
|
|
512
|
-
className:
|
|
512
|
+
className: Kt
|
|
513
513
|
}) : null]
|
|
514
|
-
}), r ? /* @__PURE__ */
|
|
515
|
-
className:
|
|
516
|
-
children: [e.callout ? /* @__PURE__ */
|
|
514
|
+
}), r ? /* @__PURE__ */ C("div", {
|
|
515
|
+
className: Qt,
|
|
516
|
+
children: [e.callout ? /* @__PURE__ */ S(h, {
|
|
517
517
|
variant: "headline",
|
|
518
518
|
el: "h6",
|
|
519
519
|
size: "regular",
|
|
520
520
|
text: e.callout,
|
|
521
521
|
...t ? { style: { color: t } } : {}
|
|
522
|
-
}) : null, e.calloutLabel ? /* @__PURE__ */
|
|
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:
|
|
532
|
-
children: e.items.map((e, t) => /* @__PURE__ */
|
|
533
|
-
className:
|
|
534
|
-
children: /* @__PURE__ */
|
|
530
|
+
var en = ({ props: e }) => /* @__PURE__ */ S("div", {
|
|
531
|
+
className: Gt,
|
|
532
|
+
children: e.items.map((e, t) => /* @__PURE__ */ S("div", {
|
|
533
|
+
className: qt,
|
|
534
|
+
children: /* @__PURE__ */ S($t, { item: e })
|
|
535
535
|
}, e.identifier ?? e.title ?? t))
|
|
536
|
-
}),
|
|
537
|
-
label:
|
|
538
|
-
value:
|
|
539
|
-
tone:
|
|
540
|
-
}),
|
|
541
|
-
props:
|
|
542
|
-
items:
|
|
543
|
-
columns:
|
|
536
|
+
}), tn = w.object({
|
|
537
|
+
label: w.string(),
|
|
538
|
+
value: w.string(),
|
|
539
|
+
tone: w.enum(M).optional()
|
|
540
|
+
}), nn = {
|
|
541
|
+
props: w.object({
|
|
542
|
+
items: w.array(tn),
|
|
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,17 +552,17 @@ var Yt = ({ props: e }) => /* @__PURE__ */ A("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
|
-
let t = e.tone ?
|
|
559
|
-
return /* @__PURE__ */
|
|
560
|
-
className:
|
|
561
|
-
children: [/* @__PURE__ */
|
|
558
|
+
let t = e.tone ? N(e.tone) : void 0;
|
|
559
|
+
return /* @__PURE__ */ C("div", {
|
|
560
|
+
className: on,
|
|
561
|
+
children: [/* @__PURE__ */ S(h, {
|
|
562
562
|
variant: "eyebrow",
|
|
563
563
|
text: e.label.toUpperCase(),
|
|
564
|
-
className:
|
|
565
|
-
}), /* @__PURE__ */
|
|
564
|
+
className: an
|
|
565
|
+
}), /* @__PURE__ */ S(h, {
|
|
566
566
|
variant: "headline",
|
|
567
567
|
el: "h6",
|
|
568
568
|
size: "regular",
|
|
@@ -571,184 +571,184 @@ var Yt = ({ props: e }) => /* @__PURE__ */ A("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
|
-
children: /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ S(m, {
|
|
578
578
|
highlighted: !0,
|
|
579
579
|
padding: "snug",
|
|
580
580
|
role: "status",
|
|
581
581
|
style: { width: "100%" },
|
|
582
|
-
content: /* @__PURE__ */
|
|
582
|
+
content: /* @__PURE__ */ S(h, {
|
|
583
583
|
variant: "body",
|
|
584
584
|
size: "regular",
|
|
585
585
|
text: e
|
|
586
586
|
})
|
|
587
587
|
})
|
|
588
|
-
}),
|
|
589
|
-
category:
|
|
590
|
-
body:
|
|
591
|
-
author:
|
|
592
|
-
date:
|
|
593
|
-
truncate:
|
|
594
|
-
}),
|
|
595
|
-
props:
|
|
596
|
-
summary:
|
|
597
|
-
items:
|
|
588
|
+
}), un = "_4l9lye0", dn = "_4l9lye1", fn = "_4l9lye2", pn = "_4l9lye3", P = "_4l9lye4", mn = w.object({
|
|
589
|
+
category: w.string().optional(),
|
|
590
|
+
body: w.string(),
|
|
591
|
+
author: w.string().optional(),
|
|
592
|
+
date: w.string().optional(),
|
|
593
|
+
truncate: w.boolean().optional()
|
|
594
|
+
}), hn = {
|
|
595
|
+
props: w.object({
|
|
596
|
+
summary: w.string().optional(),
|
|
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
|
|
605
|
-
return /* @__PURE__ */
|
|
606
|
-
className:
|
|
607
|
-
children: [e.category || e.author || e.date ? /* @__PURE__ */
|
|
608
|
-
className:
|
|
609
|
-
children: [e.category ? /* @__PURE__ */
|
|
604
|
+
function gn({ item: e }) {
|
|
605
|
+
return /* @__PURE__ */ C("div", {
|
|
606
|
+
className: fn,
|
|
607
|
+
children: [e.category || e.author || e.date ? /* @__PURE__ */ C("div", {
|
|
608
|
+
className: pn,
|
|
609
|
+
children: [e.category ? /* @__PURE__ */ S(h, {
|
|
610
610
|
variant: "eyebrow",
|
|
611
611
|
text: e.category,
|
|
612
|
-
className:
|
|
613
|
-
}) : /* @__PURE__ */
|
|
612
|
+
className: P
|
|
613
|
+
}) : /* @__PURE__ */ S("span", {}), e.author || e.date ? /* @__PURE__ */ S(h, {
|
|
614
614
|
variant: "eyebrow",
|
|
615
615
|
text: [e.author, e.date].filter(Boolean).join(" · "),
|
|
616
|
-
className:
|
|
616
|
+
className: P
|
|
617
617
|
}) : null]
|
|
618
|
-
}) : null, e.truncate ? /* @__PURE__ */
|
|
618
|
+
}) : null, e.truncate ? /* @__PURE__ */ S(te, {
|
|
619
619
|
rows: 3,
|
|
620
620
|
expandable: !0,
|
|
621
621
|
expandText: "More",
|
|
622
622
|
collapseText: "Less",
|
|
623
623
|
children: e.body
|
|
624
|
-
}) : /* @__PURE__ */
|
|
624
|
+
}) : /* @__PURE__ */ S(h, {
|
|
625
625
|
variant: "body",
|
|
626
626
|
size: "regular",
|
|
627
627
|
text: e.body
|
|
628
628
|
})]
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
var
|
|
632
|
-
className:
|
|
633
|
-
children: [e.summary ? /* @__PURE__ */
|
|
634
|
-
className:
|
|
635
|
-
children: /* @__PURE__ */
|
|
636
|
-
}) : null, e.items.map((e, t) => /* @__PURE__ */
|
|
637
|
-
}),
|
|
638
|
-
props:
|
|
631
|
+
var _n = ({ props: e }) => /* @__PURE__ */ C("div", {
|
|
632
|
+
className: un,
|
|
633
|
+
children: [e.summary ? /* @__PURE__ */ S("div", {
|
|
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
|
+
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:
|
|
643
|
-
children: [/* @__PURE__ */
|
|
644
|
-
className:
|
|
645
|
-
children: [/* @__PURE__ */
|
|
641
|
+
}, yn = "_1ysu3qn0", bn = "_1ysu3qn1", xn = ({ props: t }) => /* @__PURE__ */ C("section", {
|
|
642
|
+
className: yn,
|
|
643
|
+
children: [/* @__PURE__ */ C("div", {
|
|
644
|
+
className: bn,
|
|
645
|
+
children: [/* @__PURE__ */ S(h, {
|
|
646
646
|
variant: "headline",
|
|
647
647
|
el: "h2",
|
|
648
648
|
size: "substantial",
|
|
649
649
|
text: "Overview"
|
|
650
|
-
}), /* @__PURE__ */
|
|
650
|
+
}), /* @__PURE__ */ S(e, {
|
|
651
651
|
size: "small",
|
|
652
652
|
type: "gradient"
|
|
653
653
|
})]
|
|
654
|
-
}), /* @__PURE__ */
|
|
654
|
+
}), /* @__PURE__ */ S(h, {
|
|
655
655
|
variant: "body",
|
|
656
656
|
size: "regular",
|
|
657
657
|
text: t.summary
|
|
658
658
|
})]
|
|
659
|
-
}),
|
|
660
|
-
props:
|
|
659
|
+
}), Sn = {
|
|
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
|
-
},
|
|
664
|
-
className:
|
|
665
|
-
children:
|
|
666
|
-
}),
|
|
667
|
-
label:
|
|
668
|
-
value:
|
|
669
|
-
}),
|
|
670
|
-
eyebrow:
|
|
671
|
-
identifier:
|
|
672
|
-
identifierHref:
|
|
673
|
-
fields:
|
|
674
|
-
}),
|
|
675
|
-
label:
|
|
676
|
-
items:
|
|
677
|
-
}),
|
|
678
|
-
props:
|
|
663
|
+
}, F = "_19nljxi0", Cn = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
664
|
+
className: F,
|
|
665
|
+
children: g.toArray(e).filter(Boolean)
|
|
666
|
+
}), wn = w.object({
|
|
667
|
+
label: w.string(),
|
|
668
|
+
value: w.string()
|
|
669
|
+
}), Tn = w.object({
|
|
670
|
+
eyebrow: w.string().optional(),
|
|
671
|
+
identifier: w.string().optional(),
|
|
672
|
+
identifierHref: w.string().optional(),
|
|
673
|
+
fields: w.array(wn)
|
|
674
|
+
}), En = w.object({
|
|
675
|
+
label: w.string(),
|
|
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__ */
|
|
701
|
+
return /* @__PURE__ */ C(ge, { children: [/* @__PURE__ */ C("div", {
|
|
702
702
|
...n(0),
|
|
703
|
-
children: [e.eyebrow ? /* @__PURE__ */
|
|
703
|
+
children: [e.eyebrow ? /* @__PURE__ */ S(h, {
|
|
704
704
|
variant: "eyebrow",
|
|
705
705
|
text: e.eyebrow,
|
|
706
|
-
className:
|
|
707
|
-
}) : null, e.identifier && e.identifierHref ? /* @__PURE__ */
|
|
706
|
+
className: I
|
|
707
|
+
}) : null, e.identifier && e.identifierHref ? /* @__PURE__ */ S(de, {
|
|
708
708
|
href: e.identifierHref,
|
|
709
709
|
target: "_blank",
|
|
710
710
|
text: e.identifier
|
|
711
|
-
}) : e.identifier ? /* @__PURE__ */
|
|
711
|
+
}) : e.identifier ? /* @__PURE__ */ S(h, {
|
|
712
712
|
variant: "body",
|
|
713
713
|
size: "compact",
|
|
714
714
|
text: e.identifier
|
|
715
715
|
}) : null]
|
|
716
|
-
}), e.fields.map((e, t) => /* @__PURE__ */
|
|
716
|
+
}), e.fields.map((e, t) => /* @__PURE__ */ C("div", {
|
|
717
717
|
...n(t + 1),
|
|
718
|
-
children: [/* @__PURE__ */
|
|
718
|
+
children: [/* @__PURE__ */ S(h, {
|
|
719
719
|
variant: "eyebrow",
|
|
720
720
|
text: e.label,
|
|
721
|
-
className:
|
|
722
|
-
}), /* @__PURE__ */
|
|
721
|
+
className: I
|
|
722
|
+
}), /* @__PURE__ */ S(h, {
|
|
723
723
|
variant: "body",
|
|
724
724
|
size: "compact",
|
|
725
725
|
text: e.value
|
|
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
|
-
return /* @__PURE__ */
|
|
734
|
-
className:
|
|
735
|
-
children: [/* @__PURE__ */
|
|
736
|
-
className:
|
|
737
|
-
children: /* @__PURE__ */
|
|
733
|
+
return /* @__PURE__ */ C("div", {
|
|
734
|
+
className: kn,
|
|
735
|
+
children: [/* @__PURE__ */ S("div", {
|
|
736
|
+
className: An,
|
|
737
|
+
children: /* @__PURE__ */ S(h, {
|
|
738
738
|
variant: "headline",
|
|
739
739
|
el: "h5",
|
|
740
740
|
size: "regular",
|
|
741
741
|
text: e.label
|
|
742
742
|
})
|
|
743
|
-
}), /* @__PURE__ */
|
|
744
|
-
className:
|
|
745
|
-
style: { gridTemplateColumns:
|
|
743
|
+
}), /* @__PURE__ */ S("div", {
|
|
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__ */
|
|
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__ */
|
|
751
|
+
}) : null, /* @__PURE__ */ S(In, {
|
|
752
752
|
item: e,
|
|
753
753
|
gridRow: n
|
|
754
754
|
})] }, e.identifier ?? e.eyebrow ?? t);
|
|
@@ -756,100 +756,100 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
756
756
|
})]
|
|
757
757
|
}, e.label);
|
|
758
758
|
})
|
|
759
|
-
}),
|
|
760
|
-
ContextPanel:
|
|
761
|
-
ContextOverview:
|
|
762
|
-
ContextCard:
|
|
763
|
-
},
|
|
764
|
-
ContextNoteList:
|
|
765
|
-
ContextMetricGrid:
|
|
766
|
-
ContextDataTable:
|
|
767
|
-
ContextList:
|
|
768
|
-
ContextTabularList:
|
|
769
|
-
ContextFileList:
|
|
770
|
-
},
|
|
759
|
+
}), L = {
|
|
760
|
+
ContextPanel: Sn,
|
|
761
|
+
ContextOverview: vn,
|
|
762
|
+
ContextCard: dt
|
|
763
|
+
}, R = {
|
|
764
|
+
ContextNoteList: hn,
|
|
765
|
+
ContextMetricGrid: nn,
|
|
766
|
+
ContextDataTable: _t,
|
|
767
|
+
ContextList: Wt,
|
|
768
|
+
ContextTabularList: Dn,
|
|
769
|
+
ContextFileList: Ct
|
|
770
|
+
}, z = {
|
|
771
771
|
"atlas.submitUserAction": {
|
|
772
|
-
params:
|
|
773
|
-
data:
|
|
774
|
-
actionId:
|
|
772
|
+
params: w.object({
|
|
773
|
+
data: w.record(w.string(), w.unknown()).optional(),
|
|
774
|
+
actionId: w.string().optional()
|
|
775
775
|
}),
|
|
776
776
|
description: "Submit form data. actionId overrides default \"form_submit\" identifier."
|
|
777
777
|
},
|
|
778
778
|
"atlas.navigate": {
|
|
779
|
-
params:
|
|
779
|
+
params: w.object({ url: w.string() }),
|
|
780
780
|
description: "Navigate to a URL or internal route. External URLs (http/https) open in a new tab; internal route strings navigate within the app."
|
|
781
781
|
},
|
|
782
782
|
"atlas.artifactToolCall": {
|
|
783
|
-
params:
|
|
784
|
-
tool:
|
|
785
|
-
args:
|
|
783
|
+
params: w.object({
|
|
784
|
+
tool: w.string(),
|
|
785
|
+
args: w.record(w.string(), w.unknown()).optional()
|
|
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.artifactToolCall": async (e) => {}
|
|
793
|
-
},
|
|
794
|
-
props:
|
|
795
|
-
title:
|
|
796
|
-
status:
|
|
793
|
+
}, zn = {
|
|
794
|
+
props: w.object({
|
|
795
|
+
title: w.string(),
|
|
796
|
+
status: w.enum([
|
|
797
797
|
"info",
|
|
798
798
|
"success",
|
|
799
799
|
"warning",
|
|
800
800
|
"danger"
|
|
801
801
|
]).optional(),
|
|
802
|
-
dismissible:
|
|
803
|
-
aiMark:
|
|
802
|
+
dismissible: w.boolean().optional(),
|
|
803
|
+
aiMark: w.boolean().optional()
|
|
804
804
|
}),
|
|
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
|
-
},
|
|
809
|
-
props:
|
|
810
|
-
data:
|
|
811
|
-
category:
|
|
812
|
-
value:
|
|
808
|
+
}, Bn = {
|
|
809
|
+
props: w.object({
|
|
810
|
+
data: w.array(w.object({
|
|
811
|
+
category: w.string(),
|
|
812
|
+
value: w.number()
|
|
813
813
|
})),
|
|
814
|
-
orientation:
|
|
815
|
-
theme:
|
|
814
|
+
orientation: w.enum(["vertical", "horizontal"]).optional(),
|
|
815
|
+
theme: w.enum([
|
|
816
816
|
"monochrome",
|
|
817
817
|
"categorical",
|
|
818
818
|
"semantic"
|
|
819
819
|
]).optional(),
|
|
820
|
-
height:
|
|
821
|
-
unit:
|
|
820
|
+
height: w.number().optional(),
|
|
821
|
+
unit: w.string().optional()
|
|
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
|
-
},
|
|
826
|
-
props:
|
|
827
|
-
label:
|
|
828
|
-
appearance:
|
|
825
|
+
}, Vn = {
|
|
826
|
+
props: w.object({
|
|
827
|
+
label: w.string(),
|
|
828
|
+
appearance: w.enum([
|
|
829
829
|
"primary",
|
|
830
830
|
"secondary",
|
|
831
831
|
"ghost",
|
|
832
832
|
"danger"
|
|
833
833
|
]).optional(),
|
|
834
|
-
size:
|
|
834
|
+
size: w.enum([
|
|
835
835
|
"xsmall",
|
|
836
836
|
"small",
|
|
837
837
|
"medium",
|
|
838
838
|
"large"
|
|
839
839
|
]).optional(),
|
|
840
|
-
loading:
|
|
841
|
-
disabled:
|
|
842
|
-
badge:
|
|
840
|
+
loading: w.boolean().optional(),
|
|
841
|
+
disabled: w.boolean().optional(),
|
|
842
|
+
badge: w.string().optional()
|
|
843
843
|
}),
|
|
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
|
-
},
|
|
848
|
-
props:
|
|
849
|
-
title:
|
|
850
|
-
description:
|
|
851
|
-
background:
|
|
852
|
-
padding:
|
|
847
|
+
}, Hn = {
|
|
848
|
+
props: w.object({
|
|
849
|
+
title: w.string().optional(),
|
|
850
|
+
description: w.string().optional(),
|
|
851
|
+
background: w.enum(["strong", "stronger"]).optional(),
|
|
852
|
+
padding: w.enum([
|
|
853
853
|
"0",
|
|
854
854
|
"xsmall",
|
|
855
855
|
"small",
|
|
@@ -859,34 +859,34 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("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
|
-
},
|
|
863
|
-
props:
|
|
864
|
-
label:
|
|
865
|
-
checked:
|
|
866
|
-
disabled:
|
|
862
|
+
}, Un = {
|
|
863
|
+
props: w.object({
|
|
864
|
+
label: w.string(),
|
|
865
|
+
checked: w.boolean().optional(),
|
|
866
|
+
disabled: w.boolean().optional()
|
|
867
867
|
}),
|
|
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
|
-
},
|
|
872
|
-
props:
|
|
873
|
-
label:
|
|
874
|
-
size:
|
|
875
|
-
color:
|
|
876
|
-
icon:
|
|
871
|
+
}, Wn = {
|
|
872
|
+
props: w.object({
|
|
873
|
+
label: w.string(),
|
|
874
|
+
size: w.enum(["small", "medium"]).optional(),
|
|
875
|
+
color: w.string().optional(),
|
|
876
|
+
icon: w.enum([
|
|
877
877
|
"check-circle",
|
|
878
878
|
"in-progress",
|
|
879
879
|
"radio-button-unchecked"
|
|
880
880
|
]).optional(),
|
|
881
|
-
removable:
|
|
881
|
+
removable: w.boolean().optional()
|
|
882
882
|
}),
|
|
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
|
-
},
|
|
887
|
-
props:
|
|
888
|
-
vertical:
|
|
889
|
-
spacing:
|
|
886
|
+
}, Gn = {
|
|
887
|
+
props: w.object({
|
|
888
|
+
vertical: w.boolean().optional(),
|
|
889
|
+
spacing: w.enum([
|
|
890
890
|
"0",
|
|
891
891
|
"half",
|
|
892
892
|
"1",
|
|
@@ -898,7 +898,7 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
898
898
|
"8",
|
|
899
899
|
"12"
|
|
900
900
|
]).optional(),
|
|
901
|
-
alignContent:
|
|
901
|
+
alignContent: w.enum([
|
|
902
902
|
"start",
|
|
903
903
|
"center",
|
|
904
904
|
"end"
|
|
@@ -906,62 +906,27 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("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
|
-
},
|
|
910
|
-
props:
|
|
911
|
-
data:
|
|
912
|
-
category:
|
|
913
|
-
value:
|
|
909
|
+
}, Kn = {
|
|
910
|
+
props: w.object({
|
|
911
|
+
data: w.array(w.object({
|
|
912
|
+
category: w.string(),
|
|
913
|
+
value: w.number()
|
|
914
914
|
})),
|
|
915
|
-
theme:
|
|
915
|
+
theme: w.enum([
|
|
916
916
|
"monochrome",
|
|
917
917
|
"categorical",
|
|
918
918
|
"semantic"
|
|
919
919
|
]).optional(),
|
|
920
|
-
showLegend:
|
|
921
|
-
height:
|
|
922
|
-
unit:
|
|
920
|
+
showLegend: w.boolean().optional(),
|
|
921
|
+
height: w.number().optional(),
|
|
922
|
+
unit: w.string().optional()
|
|
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
|
-
},
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
name: M.string(),
|
|
931
|
-
id: M.string()
|
|
932
|
-
}), Gn = {
|
|
933
|
-
props: M.object({
|
|
934
|
-
to: M.array(G),
|
|
935
|
-
cc: M.array(G).optional(),
|
|
936
|
-
contactOptions: M.array(G).optional(),
|
|
937
|
-
subject: M.string().optional(),
|
|
938
|
-
body: M.string().optional(),
|
|
939
|
-
attachments: M.array(K).optional(),
|
|
940
|
-
attachmentOptions: M.array(K).optional(),
|
|
941
|
-
forms: M.array(K).optional(),
|
|
942
|
-
formOptions: M.array(K).optional(),
|
|
943
|
-
errorTitle: M.string().optional(),
|
|
944
|
-
errorMessage: M.string().optional(),
|
|
945
|
-
retryLabel: M.string().optional(),
|
|
946
|
-
sendLabel: M.string().optional(),
|
|
947
|
-
discardLabel: M.string().optional(),
|
|
948
|
-
disabled: M.boolean().optional()
|
|
949
|
-
}),
|
|
950
|
-
slots: [],
|
|
951
|
-
events: [
|
|
952
|
-
"send",
|
|
953
|
-
"discard",
|
|
954
|
-
"retry",
|
|
955
|
-
"toChange",
|
|
956
|
-
"ccChange",
|
|
957
|
-
"attachmentsChange",
|
|
958
|
-
"formsChange"
|
|
959
|
-
],
|
|
960
|
-
description: "Agent-drafted outbound email for user review before send. Use instead of stacking separate Input/Textarea fields when the agent is composing an email with recipients, subject, body, file attachments, and completed forms. EmailCard is a standalone root — do NOT wrap it in Card or Flex. Title is always \"Draft Email\". Shows editable fields with full-width Send email (primary) and Dismiss (ghost) actions. Contacts (to, cc) are objects with both name and email — never bare email strings. Example: { \"name\": \"Johnson Residence\", \"email\": \"billing@johnsonresidence.com\" }. To is required — at least one recipient before send. Users can type a new email address and press Enter to add a recipient not in contactOptions. Attachments and forms are objects with name (display label) and id (stable entity id the host uses on send). Example attachment: { \"name\": \"AR Aging Detail.pdf\", \"id\": \"file-4821-aging\" }. contactOptions supplies the typeahead search pool for To/CC; when omitted, selected contacts are used as the only suggestions. attachmentOptions / formOptions supply MultiSelectField choices; when omitted, the current attachments/forms arrays define the option set. Set errorTitle and/or errorMessage to show a danger Alert above the form (defaults title to \"Unable to complete your request\"); wire on.retry for the Alert retry action. Wire on.send / on.discard for primary actions; on.toChange / on.ccChange / on.attachmentsChange / on.formsChange when the host must react to incremental edits. Bind to, cc, subject, body, attachments, and forms with $bindState (e.g. `/to`, `/cc`, `/subject`, `/body`, `/attachments`, `/forms`) — seed initial values in spec `state`; the renderer writes user edits to those paths. Read the full draft via getSnapshot() in on.send."
|
|
961
|
-
}, Kn = {
|
|
962
|
-
props: M.object({
|
|
963
|
-
direction: M.enum(["row", "column"]).optional(),
|
|
964
|
-
gap: M.enum([
|
|
926
|
+
}, qn = {
|
|
927
|
+
props: w.object({
|
|
928
|
+
direction: w.enum(["row", "column"]).optional(),
|
|
929
|
+
gap: w.enum([
|
|
965
930
|
"0",
|
|
966
931
|
"half",
|
|
967
932
|
"1",
|
|
@@ -973,14 +938,14 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
973
938
|
"8",
|
|
974
939
|
"12"
|
|
975
940
|
]).optional(),
|
|
976
|
-
alignItems:
|
|
941
|
+
alignItems: w.enum([
|
|
977
942
|
"center",
|
|
978
943
|
"flex-start",
|
|
979
944
|
"flex-end",
|
|
980
945
|
"stretch",
|
|
981
946
|
"baseline"
|
|
982
947
|
]).optional(),
|
|
983
|
-
justifyContent:
|
|
948
|
+
justifyContent: w.enum([
|
|
984
949
|
"center",
|
|
985
950
|
"flex-start",
|
|
986
951
|
"flex-end",
|
|
@@ -988,7 +953,7 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
988
953
|
"space-around",
|
|
989
954
|
"space-evenly"
|
|
990
955
|
]).optional(),
|
|
991
|
-
alignSelf:
|
|
956
|
+
alignSelf: w.enum([
|
|
992
957
|
"auto",
|
|
993
958
|
"center",
|
|
994
959
|
"flex-start",
|
|
@@ -996,22 +961,22 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
996
961
|
"stretch",
|
|
997
962
|
"baseline"
|
|
998
963
|
]).optional(),
|
|
999
|
-
wrap:
|
|
964
|
+
wrap: w.enum([
|
|
1000
965
|
"wrap",
|
|
1001
966
|
"nowrap",
|
|
1002
967
|
"wrap-reverse"
|
|
1003
968
|
]).optional(),
|
|
1004
|
-
grow:
|
|
1005
|
-
shrink:
|
|
1006
|
-
basis:
|
|
1007
|
-
inline:
|
|
969
|
+
grow: w.number().optional(),
|
|
970
|
+
shrink: w.number().optional(),
|
|
971
|
+
basis: w.string().optional(),
|
|
972
|
+
inline: w.boolean().optional()
|
|
1008
973
|
}),
|
|
1009
974
|
slots: ["default"],
|
|
1010
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."
|
|
1011
|
-
},
|
|
1012
|
-
props:
|
|
1013
|
-
templateColumns:
|
|
1014
|
-
gap:
|
|
976
|
+
}, Jn = {
|
|
977
|
+
props: w.object({
|
|
978
|
+
templateColumns: w.string().optional(),
|
|
979
|
+
gap: w.enum([
|
|
1015
980
|
"0",
|
|
1016
981
|
"half",
|
|
1017
982
|
"1",
|
|
@@ -1023,63 +988,63 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
1023
988
|
"8",
|
|
1024
989
|
"12"
|
|
1025
990
|
]).optional(),
|
|
1026
|
-
bordered:
|
|
991
|
+
bordered: w.boolean().optional()
|
|
1027
992
|
}),
|
|
1028
993
|
slots: ["default"],
|
|
1029
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."
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1032
|
-
type:
|
|
1033
|
-
value:
|
|
995
|
+
}, Yn = w.discriminatedUnion("type", [
|
|
996
|
+
w.object({
|
|
997
|
+
type: w.literal("text"),
|
|
998
|
+
value: w.string()
|
|
1034
999
|
}),
|
|
1035
|
-
|
|
1036
|
-
type:
|
|
1037
|
-
from:
|
|
1038
|
-
to:
|
|
1000
|
+
w.object({
|
|
1001
|
+
type: w.literal("diff"),
|
|
1002
|
+
from: w.string().nullable().optional(),
|
|
1003
|
+
to: w.string().nullable().optional()
|
|
1039
1004
|
}),
|
|
1040
|
-
|
|
1041
|
-
type:
|
|
1042
|
-
value:
|
|
1005
|
+
w.object({
|
|
1006
|
+
type: w.literal("addition"),
|
|
1007
|
+
value: w.string()
|
|
1043
1008
|
})
|
|
1044
|
-
]),
|
|
1045
|
-
key:
|
|
1046
|
-
header:
|
|
1047
|
-
minWidth:
|
|
1009
|
+
]), Xn = w.union([w.string(), Yn]), Zn = w.object({
|
|
1010
|
+
key: w.string(),
|
|
1011
|
+
header: w.string(),
|
|
1012
|
+
minWidth: w.enum([
|
|
1048
1013
|
"compact",
|
|
1049
1014
|
"standard",
|
|
1050
1015
|
"wide"
|
|
1051
1016
|
]).optional()
|
|
1052
|
-
}),
|
|
1053
|
-
label:
|
|
1054
|
-
columns:
|
|
1055
|
-
data:
|
|
1056
|
-
reason:
|
|
1057
|
-
}),
|
|
1058
|
-
id:
|
|
1059
|
-
label:
|
|
1060
|
-
from:
|
|
1061
|
-
to:
|
|
1062
|
-
reason:
|
|
1063
|
-
}),
|
|
1064
|
-
type:
|
|
1065
|
-
changes:
|
|
1066
|
-
}),
|
|
1067
|
-
type:
|
|
1068
|
-
label:
|
|
1069
|
-
changeTables:
|
|
1070
|
-
}),
|
|
1071
|
-
props:
|
|
1072
|
-
state:
|
|
1017
|
+
}), Qn = w.record(w.string(), Xn).and(w.object({ id: w.string() })), $n = w.object({
|
|
1018
|
+
label: w.string(),
|
|
1019
|
+
columns: w.array(Zn),
|
|
1020
|
+
data: w.array(Qn),
|
|
1021
|
+
reason: w.string().optional()
|
|
1022
|
+
}), er = w.object({
|
|
1023
|
+
id: w.string(),
|
|
1024
|
+
label: w.string(),
|
|
1025
|
+
from: w.string().nullable().optional(),
|
|
1026
|
+
to: w.string().nullable().optional(),
|
|
1027
|
+
reason: w.string().optional()
|
|
1028
|
+
}), tr = w.object({
|
|
1029
|
+
type: w.literal("single"),
|
|
1030
|
+
changes: w.array(er)
|
|
1031
|
+
}), nr = w.object({
|
|
1032
|
+
type: w.literal("table"),
|
|
1033
|
+
label: w.string(),
|
|
1034
|
+
changeTables: w.array($n)
|
|
1035
|
+
}), rr = w.discriminatedUnion("type", [tr, nr]), ir = {
|
|
1036
|
+
props: w.object({
|
|
1037
|
+
state: w.enum([
|
|
1073
1038
|
"default",
|
|
1074
1039
|
"accepted",
|
|
1075
1040
|
"rejected",
|
|
1076
1041
|
"skipped"
|
|
1077
1042
|
]).optional(),
|
|
1078
|
-
referenceLabel:
|
|
1079
|
-
referenceHref:
|
|
1080
|
-
changeSections:
|
|
1081
|
-
appliedChangeIds:
|
|
1082
|
-
defaultExpanded:
|
|
1043
|
+
referenceLabel: w.string(),
|
|
1044
|
+
referenceHref: w.string().optional(),
|
|
1045
|
+
changeSections: w.array(rr),
|
|
1046
|
+
appliedChangeIds: w.array(w.string()).optional(),
|
|
1047
|
+
defaultExpanded: w.boolean().optional()
|
|
1083
1048
|
}),
|
|
1084
1049
|
slots: [],
|
|
1085
1050
|
events: [
|
|
@@ -1088,28 +1053,28 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
1088
1053
|
"dismiss"
|
|
1089
1054
|
],
|
|
1090
1055
|
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). Each data row requires a top-level id for selection/filtering — do NOT add an id column; use keys like code, sku, or name for visible identifiers. Column minWidth presets: compact (codes/SKUs/quantities) | standard (names/dates) | wide (descriptions/diffs) — omit when flexible. Table cell rendering is defined per cell via plain string or { type: text | diff | addition, ... }. appliedChangeIds filters accepted-state content. referenceHref opens the linked record in a new tab. Emits apply, edit, and dismiss."
|
|
1091
|
-
},
|
|
1092
|
-
props:
|
|
1093
|
-
name:
|
|
1056
|
+
}, ar = {
|
|
1057
|
+
props: w.object({
|
|
1058
|
+
name: w.enum([
|
|
1094
1059
|
"check-circle",
|
|
1095
1060
|
"in-progress",
|
|
1096
1061
|
"radio-button-unchecked"
|
|
1097
1062
|
]),
|
|
1098
|
-
size:
|
|
1063
|
+
size: w.enum([
|
|
1099
1064
|
"small",
|
|
1100
1065
|
"medium",
|
|
1101
1066
|
"large",
|
|
1102
1067
|
"xlarge"
|
|
1103
1068
|
]).optional(),
|
|
1104
|
-
color:
|
|
1069
|
+
color: w.string().optional()
|
|
1105
1070
|
}),
|
|
1106
1071
|
slots: [],
|
|
1107
1072
|
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."
|
|
1108
|
-
},
|
|
1109
|
-
props:
|
|
1110
|
-
label:
|
|
1111
|
-
placeholder:
|
|
1112
|
-
type:
|
|
1073
|
+
}, or = {
|
|
1074
|
+
props: w.object({
|
|
1075
|
+
label: w.string(),
|
|
1076
|
+
placeholder: w.string().optional(),
|
|
1077
|
+
type: w.enum([
|
|
1113
1078
|
"text",
|
|
1114
1079
|
"password",
|
|
1115
1080
|
"email",
|
|
@@ -1117,145 +1082,144 @@ var Fn = ({ props: e }) => /* @__PURE__ */ A("div", {
|
|
|
1117
1082
|
"url",
|
|
1118
1083
|
"number"
|
|
1119
1084
|
]).optional(),
|
|
1120
|
-
value:
|
|
1121
|
-
disabled:
|
|
1085
|
+
value: w.string().optional(),
|
|
1086
|
+
disabled: w.boolean().optional()
|
|
1122
1087
|
}),
|
|
1123
1088
|
slots: [],
|
|
1124
1089
|
events: ["change"],
|
|
1125
1090
|
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."
|
|
1126
|
-
},
|
|
1127
|
-
props:
|
|
1128
|
-
data:
|
|
1129
|
-
series:
|
|
1130
|
-
theme:
|
|
1091
|
+
}, B = {
|
|
1092
|
+
props: w.object({
|
|
1093
|
+
data: w.array(w.record(w.string(), w.union([w.string(), w.number()]))),
|
|
1094
|
+
series: w.array(w.string()).optional(),
|
|
1095
|
+
theme: w.enum([
|
|
1131
1096
|
"monochrome",
|
|
1132
1097
|
"categorical",
|
|
1133
1098
|
"semantic"
|
|
1134
1099
|
]).optional(),
|
|
1135
|
-
showLegend:
|
|
1136
|
-
showDots:
|
|
1137
|
-
height:
|
|
1138
|
-
unit:
|
|
1100
|
+
showLegend: w.boolean().optional(),
|
|
1101
|
+
showDots: w.boolean().optional(),
|
|
1102
|
+
height: w.number().optional(),
|
|
1103
|
+
unit: w.string().optional()
|
|
1139
1104
|
}),
|
|
1140
1105
|
slots: [],
|
|
1141
1106
|
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."
|
|
1142
1107
|
}, sr = {
|
|
1143
|
-
props:
|
|
1144
|
-
label:
|
|
1145
|
-
href:
|
|
1146
|
-
appearance:
|
|
1147
|
-
target:
|
|
1148
|
-
ghost:
|
|
1149
|
-
badge:
|
|
1108
|
+
props: w.object({
|
|
1109
|
+
label: w.string(),
|
|
1110
|
+
href: w.string(),
|
|
1111
|
+
appearance: w.enum(["primary", "secondary"]).optional(),
|
|
1112
|
+
target: w.enum(["_blank", "_self"]).optional(),
|
|
1113
|
+
ghost: w.boolean().optional(),
|
|
1114
|
+
badge: w.string().optional()
|
|
1150
1115
|
}),
|
|
1151
1116
|
slots: [],
|
|
1152
1117
|
events: ["press"],
|
|
1153
1118
|
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."
|
|
1154
1119
|
}, cr = {
|
|
1155
|
-
props:
|
|
1156
|
-
label:
|
|
1157
|
-
options:
|
|
1158
|
-
value:
|
|
1159
|
-
label:
|
|
1120
|
+
props: w.object({
|
|
1121
|
+
label: w.string(),
|
|
1122
|
+
options: w.array(w.object({
|
|
1123
|
+
value: w.string(),
|
|
1124
|
+
label: w.string()
|
|
1160
1125
|
})),
|
|
1161
|
-
value:
|
|
1162
|
-
disabled:
|
|
1126
|
+
value: w.string().optional(),
|
|
1127
|
+
disabled: w.boolean().optional()
|
|
1163
1128
|
}),
|
|
1164
1129
|
slots: [],
|
|
1165
1130
|
events: ["change"],
|
|
1166
1131
|
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."
|
|
1167
1132
|
}, lr = {
|
|
1168
|
-
props:
|
|
1169
|
-
label:
|
|
1170
|
-
value:
|
|
1171
|
-
description:
|
|
1172
|
-
indeterminate:
|
|
1133
|
+
props: w.object({
|
|
1134
|
+
label: w.string(),
|
|
1135
|
+
value: w.number().min(0).max(100).optional(),
|
|
1136
|
+
description: w.string().optional(),
|
|
1137
|
+
indeterminate: w.boolean().optional()
|
|
1173
1138
|
}),
|
|
1174
1139
|
slots: [],
|
|
1175
1140
|
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."
|
|
1176
1141
|
}, ur = {
|
|
1177
|
-
props:
|
|
1178
|
-
label:
|
|
1179
|
-
options:
|
|
1180
|
-
value:
|
|
1181
|
-
label:
|
|
1142
|
+
props: w.object({
|
|
1143
|
+
label: w.string(),
|
|
1144
|
+
options: w.array(w.object({
|
|
1145
|
+
value: w.string(),
|
|
1146
|
+
label: w.string()
|
|
1182
1147
|
})),
|
|
1183
|
-
value:
|
|
1184
|
-
disabled:
|
|
1148
|
+
value: w.string().optional(),
|
|
1149
|
+
disabled: w.boolean().optional()
|
|
1185
1150
|
}),
|
|
1186
1151
|
slots: [],
|
|
1187
1152
|
events: ["change"],
|
|
1188
1153
|
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."
|
|
1189
1154
|
}, dr = {
|
|
1190
|
-
props:
|
|
1191
|
-
label:
|
|
1192
|
-
checked:
|
|
1193
|
-
disabled:
|
|
1155
|
+
props: w.object({
|
|
1156
|
+
label: w.string(),
|
|
1157
|
+
checked: w.boolean().optional(),
|
|
1158
|
+
disabled: w.boolean().optional()
|
|
1194
1159
|
}),
|
|
1195
1160
|
slots: [],
|
|
1196
1161
|
events: ["change"],
|
|
1197
1162
|
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."
|
|
1198
1163
|
}, fr = {
|
|
1199
|
-
props:
|
|
1200
|
-
content:
|
|
1201
|
-
variant:
|
|
1164
|
+
props: w.object({
|
|
1165
|
+
content: w.string(),
|
|
1166
|
+
variant: w.enum([
|
|
1202
1167
|
"headline",
|
|
1203
1168
|
"body",
|
|
1204
1169
|
"eyebrow"
|
|
1205
1170
|
]).optional(),
|
|
1206
|
-
size:
|
|
1171
|
+
size: w.enum([
|
|
1207
1172
|
"small",
|
|
1208
1173
|
"medium",
|
|
1209
1174
|
"large",
|
|
1210
1175
|
"xlarge"
|
|
1211
1176
|
]).optional(),
|
|
1212
|
-
subdued:
|
|
1177
|
+
subdued: w.boolean().optional()
|
|
1213
1178
|
}),
|
|
1214
1179
|
slots: [],
|
|
1215
1180
|
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."
|
|
1216
1181
|
}, pr = {
|
|
1217
|
-
props:
|
|
1218
|
-
label:
|
|
1219
|
-
placeholder:
|
|
1220
|
-
description:
|
|
1221
|
-
moreInfo:
|
|
1222
|
-
value:
|
|
1223
|
-
rows:
|
|
1224
|
-
disabled:
|
|
1182
|
+
props: w.object({
|
|
1183
|
+
label: w.string(),
|
|
1184
|
+
placeholder: w.string().optional(),
|
|
1185
|
+
description: w.string().optional(),
|
|
1186
|
+
moreInfo: w.string().optional(),
|
|
1187
|
+
value: w.string().optional(),
|
|
1188
|
+
rows: w.number().optional(),
|
|
1189
|
+
disabled: w.boolean().optional()
|
|
1225
1190
|
}),
|
|
1226
1191
|
slots: [],
|
|
1227
1192
|
events: ["change"],
|
|
1228
1193
|
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."
|
|
1229
|
-
},
|
|
1194
|
+
}, V = {
|
|
1230
1195
|
Text: fr,
|
|
1231
|
-
Card:
|
|
1232
|
-
Flex:
|
|
1233
|
-
Grid:
|
|
1234
|
-
Alert:
|
|
1235
|
-
Divider:
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
Chip: Hn,
|
|
1196
|
+
Card: Hn,
|
|
1197
|
+
Flex: qn,
|
|
1198
|
+
Grid: Jn,
|
|
1199
|
+
Alert: zn,
|
|
1200
|
+
Divider: Gn,
|
|
1201
|
+
Icon: ar,
|
|
1202
|
+
Chip: Wn,
|
|
1239
1203
|
Link: sr,
|
|
1240
1204
|
ProgressBar: lr,
|
|
1241
|
-
BarChart:
|
|
1242
|
-
DonutChart:
|
|
1243
|
-
LineChart:
|
|
1244
|
-
Button:
|
|
1245
|
-
Checkbox:
|
|
1246
|
-
Input:
|
|
1205
|
+
BarChart: Bn,
|
|
1206
|
+
DonutChart: Kn,
|
|
1207
|
+
LineChart: B,
|
|
1208
|
+
Button: Vn,
|
|
1209
|
+
Checkbox: Un,
|
|
1210
|
+
Input: or,
|
|
1247
1211
|
Textarea: pr,
|
|
1248
1212
|
Listbox: cr,
|
|
1249
1213
|
RadioGroup: ur,
|
|
1250
1214
|
Switch: dr,
|
|
1251
|
-
GuidanceCard:
|
|
1215
|
+
GuidanceCard: ir
|
|
1252
1216
|
};
|
|
1253
1217
|
//#endregion
|
|
1254
1218
|
//#region src/scoped-catalog.ts
|
|
1255
|
-
function
|
|
1219
|
+
function H(e = {}) {
|
|
1256
1220
|
let { core: t = "all", overrides: n = {}, components: r = {} } = e, i = {
|
|
1257
|
-
...t === "all" ? { ...
|
|
1258
|
-
let t =
|
|
1221
|
+
...t === "all" ? { ...V } : Object.fromEntries(t.map((e) => {
|
|
1222
|
+
let t = V[e];
|
|
1259
1223
|
if (!t) throw Error(`Unknown core component: ${String(e)}`);
|
|
1260
1224
|
return [e, t];
|
|
1261
1225
|
})),
|
|
@@ -1272,18 +1236,18 @@ function mr(e = {}) {
|
|
|
1272
1236
|
}
|
|
1273
1237
|
return i;
|
|
1274
1238
|
}
|
|
1275
|
-
function
|
|
1239
|
+
function mr(e) {
|
|
1276
1240
|
return e;
|
|
1277
1241
|
}
|
|
1278
|
-
function
|
|
1279
|
-
let t =
|
|
1242
|
+
function hr(e) {
|
|
1243
|
+
let t = H({
|
|
1280
1244
|
core: e.core ?? "all",
|
|
1281
1245
|
...e.overrides ? { overrides: e.overrides } : {},
|
|
1282
1246
|
...e.components ? { components: e.components } : {}
|
|
1283
|
-
}), n = Object.fromEntries(Object.entries(e.actions ?? {}).map(([t, n]) => [`${e.prefix}.${t}`, n])), r =
|
|
1247
|
+
}), n = Object.fromEntries(Object.entries(e.actions ?? {}).map(([t, n]) => [`${e.prefix}.${t}`, n])), r = T(D, {
|
|
1284
1248
|
components: t,
|
|
1285
1249
|
actions: {
|
|
1286
|
-
...
|
|
1250
|
+
...z,
|
|
1287
1251
|
...n
|
|
1288
1252
|
}
|
|
1289
1253
|
});
|
|
@@ -1303,7 +1267,7 @@ function gr(e) {
|
|
|
1303
1267
|
}
|
|
1304
1268
|
};
|
|
1305
1269
|
}
|
|
1306
|
-
var
|
|
1270
|
+
var gr = H({
|
|
1307
1271
|
core: [
|
|
1308
1272
|
"Text",
|
|
1309
1273
|
"Chip",
|
|
@@ -1312,96 +1276,96 @@ var _r = mr({
|
|
|
1312
1276
|
],
|
|
1313
1277
|
overrides: { Link: { append: "In a context panel, links appear inside content primitives (ContextList, ContextTabularList identifier links, ContextNoteList, etc.); use a standalone Link only for inline references within rich text." } },
|
|
1314
1278
|
components: {
|
|
1315
|
-
...
|
|
1316
|
-
...
|
|
1279
|
+
...L,
|
|
1280
|
+
...R
|
|
1317
1281
|
}
|
|
1318
|
-
}),
|
|
1319
|
-
components:
|
|
1320
|
-
actions:
|
|
1321
|
-
}),
|
|
1282
|
+
}), _r = T(D, {
|
|
1283
|
+
components: gr,
|
|
1284
|
+
actions: z
|
|
1285
|
+
}), U = [
|
|
1322
1286
|
{
|
|
1323
1287
|
name: "ContextPanel",
|
|
1324
|
-
catalog:
|
|
1325
|
-
renderer:
|
|
1288
|
+
catalog: L.ContextPanel,
|
|
1289
|
+
renderer: Cn,
|
|
1326
1290
|
renderers: ["context"]
|
|
1327
1291
|
},
|
|
1328
1292
|
{
|
|
1329
1293
|
name: "ContextOverview",
|
|
1330
|
-
catalog:
|
|
1331
|
-
renderer:
|
|
1294
|
+
catalog: L.ContextOverview,
|
|
1295
|
+
renderer: xn,
|
|
1332
1296
|
renderers: ["context"]
|
|
1333
1297
|
},
|
|
1334
1298
|
{
|
|
1335
1299
|
name: "ContextCard",
|
|
1336
|
-
catalog:
|
|
1337
|
-
renderer:
|
|
1300
|
+
catalog: L.ContextCard,
|
|
1301
|
+
renderer: ft,
|
|
1338
1302
|
renderers: ["context"]
|
|
1339
1303
|
},
|
|
1340
1304
|
{
|
|
1341
1305
|
name: "ContextNoteList",
|
|
1342
|
-
catalog:
|
|
1343
|
-
renderer:
|
|
1306
|
+
catalog: R.ContextNoteList,
|
|
1307
|
+
renderer: _n,
|
|
1344
1308
|
renderers: ["context"]
|
|
1345
1309
|
},
|
|
1346
1310
|
{
|
|
1347
1311
|
name: "ContextMetricGrid",
|
|
1348
|
-
catalog:
|
|
1349
|
-
renderer:
|
|
1312
|
+
catalog: R.ContextMetricGrid,
|
|
1313
|
+
renderer: sn,
|
|
1350
1314
|
renderers: ["context"]
|
|
1351
1315
|
},
|
|
1352
1316
|
{
|
|
1353
1317
|
name: "ContextDataTable",
|
|
1354
|
-
catalog:
|
|
1355
|
-
renderer:
|
|
1318
|
+
catalog: R.ContextDataTable,
|
|
1319
|
+
renderer: xt,
|
|
1356
1320
|
renderers: ["context"]
|
|
1357
1321
|
},
|
|
1358
1322
|
{
|
|
1359
1323
|
name: "ContextList",
|
|
1360
|
-
catalog:
|
|
1361
|
-
renderer:
|
|
1324
|
+
catalog: R.ContextList,
|
|
1325
|
+
renderer: en,
|
|
1362
1326
|
renderers: ["context"]
|
|
1363
1327
|
},
|
|
1364
1328
|
{
|
|
1365
1329
|
name: "ContextTabularList",
|
|
1366
|
-
catalog:
|
|
1367
|
-
renderer:
|
|
1330
|
+
catalog: R.ContextTabularList,
|
|
1331
|
+
renderer: Ln,
|
|
1368
1332
|
renderers: ["context"]
|
|
1369
1333
|
},
|
|
1370
1334
|
{
|
|
1371
1335
|
name: "ContextFileList",
|
|
1372
|
-
catalog:
|
|
1373
|
-
renderer:
|
|
1336
|
+
catalog: R.ContextFileList,
|
|
1337
|
+
renderer: Ht,
|
|
1374
1338
|
renderers: ["context"]
|
|
1375
1339
|
}
|
|
1376
1340
|
];
|
|
1377
|
-
Object.fromEntries(
|
|
1341
|
+
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]));
|
|
1378
1342
|
//#endregion
|
|
1379
1343
|
//#region src/context/constants.ts
|
|
1380
|
-
var
|
|
1344
|
+
var vr = [
|
|
1381
1345
|
"ContextPanel",
|
|
1382
1346
|
"ContextOverview",
|
|
1383
1347
|
"ContextCard"
|
|
1384
|
-
],
|
|
1385
|
-
function
|
|
1386
|
-
return
|
|
1348
|
+
], yr = ["ContextOverview", "ContextCard"];
|
|
1349
|
+
function br(e) {
|
|
1350
|
+
return vr.includes(e);
|
|
1387
1351
|
}
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1352
|
+
function xr(e) {
|
|
1353
|
+
return yr.includes(e);
|
|
1390
1354
|
}
|
|
1391
1355
|
//#endregion
|
|
1392
1356
|
//#region src/context/validate-context-spec.ts
|
|
1393
|
-
function
|
|
1357
|
+
function W(e, t) {
|
|
1394
1358
|
return e.elements[t];
|
|
1395
1359
|
}
|
|
1396
|
-
function
|
|
1397
|
-
let r =
|
|
1360
|
+
function Sr(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1361
|
+
let r = W(e, t);
|
|
1398
1362
|
if (!r || n.has(t)) return n;
|
|
1399
1363
|
n.add(t);
|
|
1400
|
-
for (let t of r.children ?? [])
|
|
1364
|
+
for (let t of r.children ?? []) Sr(e, t, n);
|
|
1401
1365
|
return n;
|
|
1402
1366
|
}
|
|
1403
|
-
function
|
|
1404
|
-
let t = [], n = e.root, r =
|
|
1367
|
+
function G(e) {
|
|
1368
|
+
let t = [], n = e.root, r = W(e, n);
|
|
1405
1369
|
if (!r) return t.push({
|
|
1406
1370
|
path: "/root",
|
|
1407
1371
|
message: "Root element is missing from elements map."
|
|
@@ -1412,7 +1376,7 @@ function Tr(e) {
|
|
|
1412
1376
|
}), t;
|
|
1413
1377
|
let i = 0;
|
|
1414
1378
|
for (let n of r.children ?? []) {
|
|
1415
|
-
let r =
|
|
1379
|
+
let r = W(e, n);
|
|
1416
1380
|
if (!r) {
|
|
1417
1381
|
t.push({
|
|
1418
1382
|
path: `/elements/${n}`,
|
|
@@ -1420,7 +1384,7 @@ function Tr(e) {
|
|
|
1420
1384
|
});
|
|
1421
1385
|
continue;
|
|
1422
1386
|
}
|
|
1423
|
-
if (!
|
|
1387
|
+
if (!xr(r.type)) {
|
|
1424
1388
|
t.push({
|
|
1425
1389
|
path: `/elements/${n}`,
|
|
1426
1390
|
message: `Direct child of ContextPanel must be ContextOverview or ContextCard — got "${r.type}".`
|
|
@@ -1431,10 +1395,10 @@ function Tr(e) {
|
|
|
1431
1395
|
path: `/elements/${n}`,
|
|
1432
1396
|
message: "ContextOverview may appear at most once in ContextPanel."
|
|
1433
1397
|
}));
|
|
1434
|
-
for (let r of
|
|
1398
|
+
for (let r of Sr(e, n)) {
|
|
1435
1399
|
if (r === n) continue;
|
|
1436
|
-
let i =
|
|
1437
|
-
i &&
|
|
1400
|
+
let i = W(e, r);
|
|
1401
|
+
i && br(i.type) && t.push({
|
|
1438
1402
|
path: `/elements/${r}`,
|
|
1439
1403
|
message: `Shell component "${i.type}" cannot be nested inside a card.`
|
|
1440
1404
|
});
|
|
@@ -1442,61 +1406,61 @@ function Tr(e) {
|
|
|
1442
1406
|
}
|
|
1443
1407
|
return t;
|
|
1444
1408
|
}
|
|
1445
|
-
function
|
|
1409
|
+
function K(e) {
|
|
1446
1410
|
return e.map((e) => `${(e.severity ?? "error").toUpperCase()} ${e.path}: ${e.message}`).join("\n");
|
|
1447
1411
|
}
|
|
1448
1412
|
//#endregion
|
|
1449
1413
|
//#region src/context/validate-context-spec-deep.ts
|
|
1450
|
-
function
|
|
1414
|
+
function q(e, t, n, r) {
|
|
1451
1415
|
e.push({
|
|
1452
1416
|
path: t,
|
|
1453
1417
|
message: n,
|
|
1454
1418
|
severity: r
|
|
1455
1419
|
});
|
|
1456
1420
|
}
|
|
1457
|
-
function
|
|
1421
|
+
function Cr(e, t) {
|
|
1458
1422
|
return t.length === 0 ? e : `${e}/${t.map((e) => typeof e == "number" ? `[${e}]` : `.${String(e)}`).join("").replace(/^\./, "")}`;
|
|
1459
1423
|
}
|
|
1460
|
-
function
|
|
1461
|
-
return
|
|
1424
|
+
function wr(e) {
|
|
1425
|
+
return gr[e];
|
|
1462
1426
|
}
|
|
1463
|
-
function
|
|
1427
|
+
function Tr(e) {
|
|
1464
1428
|
return (e?.slots?.length ?? 0) === 0;
|
|
1465
1429
|
}
|
|
1466
|
-
function
|
|
1467
|
-
for (let [n, r] of Object.entries(e.elements)) r && r.type === "ContextCard" && r.props.defaultExpanded === !1 &&
|
|
1430
|
+
function Er(e, t) {
|
|
1431
|
+
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");
|
|
1468
1432
|
}
|
|
1469
|
-
function
|
|
1433
|
+
function Dr(e) {
|
|
1470
1434
|
let t = [];
|
|
1471
|
-
for (let n of
|
|
1472
|
-
let n =
|
|
1473
|
-
if (!n.valid) for (let e of n.issues)
|
|
1474
|
-
let r =
|
|
1435
|
+
for (let n of G(e)) q(t, n.path, n.message, "error");
|
|
1436
|
+
let n = Oe(e);
|
|
1437
|
+
if (!n.valid) for (let e of n.issues) q(t, e.elementKey ? `/elements/${e.elementKey}` : "/", e.message, e.severity === "warning" ? "warn" : "error");
|
|
1438
|
+
let r = _r.validate(e);
|
|
1475
1439
|
if (!r.success && r.error) for (let e of r.error.issues) {
|
|
1476
1440
|
let n = e.path.length > 0 ? `/${e.path.join("/")}` : "/";
|
|
1477
|
-
n.endsWith("/visible") || n.endsWith("/children") && e.message.includes("expected array, received undefined") ||
|
|
1441
|
+
n.endsWith("/visible") || n.endsWith("/children") && e.message.includes("expected array, received undefined") || q(t, n, e.message, "error");
|
|
1478
1442
|
}
|
|
1479
1443
|
for (let [n, r] of Object.entries(e.elements)) {
|
|
1480
1444
|
if (!r) continue;
|
|
1481
|
-
let e =
|
|
1445
|
+
let e = wr(r.type);
|
|
1482
1446
|
if (!e) {
|
|
1483
|
-
|
|
1447
|
+
q(t, `/elements/${n}`, `Unknown component type "${r.type}" for context catalog.`, "error");
|
|
1484
1448
|
continue;
|
|
1485
1449
|
}
|
|
1486
1450
|
if (e.props) {
|
|
1487
1451
|
let i = e.props.safeParse(r.props ?? {});
|
|
1488
|
-
if (!i.success) for (let e of i.error.issues)
|
|
1452
|
+
if (!i.success) for (let e of i.error.issues) q(t, Cr(`/elements/${n}/props`, e.path), e.message, "error");
|
|
1489
1453
|
}
|
|
1490
|
-
let i = r.children, a =
|
|
1491
|
-
i === void 0 && a &&
|
|
1454
|
+
let i = r.children, a = Tr(e);
|
|
1455
|
+
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");
|
|
1492
1456
|
}
|
|
1493
|
-
return
|
|
1457
|
+
return Er(e, t), t;
|
|
1494
1458
|
}
|
|
1495
|
-
function
|
|
1459
|
+
function Or(e) {
|
|
1496
1460
|
let t = [], n = structuredClone(e);
|
|
1497
1461
|
for (let [e, r] of Object.entries(n.elements)) {
|
|
1498
1462
|
if (!r) continue;
|
|
1499
|
-
let n =
|
|
1463
|
+
let n = Tr(wr(r.type));
|
|
1500
1464
|
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}".`));
|
|
1501
1465
|
}
|
|
1502
1466
|
return {
|
|
@@ -1504,46 +1468,46 @@ function Mr(e) {
|
|
|
1504
1468
|
fixes: t
|
|
1505
1469
|
};
|
|
1506
1470
|
}
|
|
1507
|
-
function
|
|
1471
|
+
function kr(e) {
|
|
1508
1472
|
return e.some((e) => e.severity !== "warn");
|
|
1509
1473
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1474
|
+
function Ar(e) {
|
|
1475
|
+
return K(Dr(e));
|
|
1512
1476
|
}
|
|
1513
1477
|
//#endregion
|
|
1514
1478
|
//#region src/core/catalog/alert.tsx
|
|
1515
|
-
var
|
|
1479
|
+
var jr = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
|
|
1516
1480
|
title: e.title,
|
|
1517
1481
|
status: e.status ?? "info",
|
|
1518
1482
|
...e.aiMark ? { aiMark: !0 } : {},
|
|
1519
1483
|
...e.dismissible ? { onClose: () => n("close") } : {},
|
|
1520
1484
|
children: r
|
|
1521
|
-
}),
|
|
1485
|
+
}), J = "zf6dad0";
|
|
1522
1486
|
//#endregion
|
|
1523
1487
|
//#region src/core/catalog/chart-utils.ts
|
|
1524
|
-
function
|
|
1488
|
+
function Y(e, t = "monochrome") {
|
|
1525
1489
|
let n = {
|
|
1526
|
-
monochrome:
|
|
1527
|
-
categorical:
|
|
1528
|
-
semantic:
|
|
1529
|
-
}[t] ??
|
|
1530
|
-
e.setThemes([
|
|
1490
|
+
monochrome: Fe,
|
|
1491
|
+
categorical: Pe,
|
|
1492
|
+
semantic: Ie
|
|
1493
|
+
}[t] ?? Fe;
|
|
1494
|
+
e.setThemes([Ne.new(e), n.new(e)]);
|
|
1531
1495
|
}
|
|
1532
1496
|
//#endregion
|
|
1533
1497
|
//#region src/core/catalog/bar-chart.tsx
|
|
1534
|
-
var
|
|
1535
|
-
let t =
|
|
1536
|
-
return
|
|
1498
|
+
var Mr = ({ props: e }) => {
|
|
1499
|
+
let t = y(null);
|
|
1500
|
+
return _(() => {
|
|
1537
1501
|
let n = t.current;
|
|
1538
1502
|
if (!n) return;
|
|
1539
1503
|
let r, i = () => {
|
|
1540
|
-
r && r.dispose(), r =
|
|
1541
|
-
let t = r.container.children.push(
|
|
1504
|
+
r && r.dispose(), r = k.Root.new(n), Y(r, e.theme);
|
|
1505
|
+
let t = r.container.children.push(A.XYChart.new(r, { paddingLeft: 0 }));
|
|
1542
1506
|
if (e.orientation === "horizontal") {
|
|
1543
|
-
let n = t.yAxes.push(
|
|
1507
|
+
let n = t.yAxes.push(A.CategoryAxis.new(r, {
|
|
1544
1508
|
categoryField: "category",
|
|
1545
|
-
renderer:
|
|
1546
|
-
})), i = t.xAxes.push(
|
|
1509
|
+
renderer: A.AxisRendererY.new(r, { minGridDistance: 20 })
|
|
1510
|
+
})), i = t.xAxes.push(A.ValueAxis.new(r, { renderer: A.AxisRendererX.new(r, {}) })), a = t.series.push(A.ColumnSeries.new(r, {
|
|
1547
1511
|
xAxis: i,
|
|
1548
1512
|
yAxis: n,
|
|
1549
1513
|
valueXField: "value",
|
|
@@ -1551,10 +1515,10 @@ var Rr = ({ props: e }) => {
|
|
|
1551
1515
|
}));
|
|
1552
1516
|
a.columns.template.setAll({ tooltipText: `{categoryY}: ${e.unit ?? ""}{valueX}` }), n.data.setAll(e.data), a.data.setAll(e.data);
|
|
1553
1517
|
} else {
|
|
1554
|
-
let n = t.xAxes.push(
|
|
1518
|
+
let n = t.xAxes.push(A.CategoryAxis.new(r, {
|
|
1555
1519
|
categoryField: "category",
|
|
1556
|
-
renderer:
|
|
1557
|
-
})), i = t.yAxes.push(
|
|
1520
|
+
renderer: A.AxisRendererX.new(r, { minGridDistance: 30 })
|
|
1521
|
+
})), i = t.yAxes.push(A.ValueAxis.new(r, { renderer: A.AxisRendererY.new(r, {}) })), a = t.series.push(A.ColumnSeries.new(r, {
|
|
1558
1522
|
xAxis: n,
|
|
1559
1523
|
yAxis: i,
|
|
1560
1524
|
valueYField: "value",
|
|
@@ -1568,9 +1532,9 @@ var Rr = ({ props: e }) => {
|
|
|
1568
1532
|
return a.observe(n), n.offsetWidth > 0 && i(), () => {
|
|
1569
1533
|
a.disconnect(), r?.dispose();
|
|
1570
1534
|
};
|
|
1571
|
-
}, []), /* @__PURE__ */
|
|
1535
|
+
}, []), /* @__PURE__ */ S("div", {
|
|
1572
1536
|
ref: t,
|
|
1573
|
-
className:
|
|
1537
|
+
className: J,
|
|
1574
1538
|
style: { height: e.height ?? 300 }
|
|
1575
1539
|
});
|
|
1576
1540
|
};
|
|
@@ -1586,7 +1550,7 @@ function X(e) {
|
|
|
1586
1550
|
}
|
|
1587
1551
|
//#endregion
|
|
1588
1552
|
//#region src/core/catalog/button.tsx
|
|
1589
|
-
var
|
|
1553
|
+
var Nr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
|
|
1590
1554
|
appearance: e.appearance ?? "secondary",
|
|
1591
1555
|
...X({
|
|
1592
1556
|
size: e.size,
|
|
@@ -1594,40 +1558,40 @@ var zr = ({ props: e, emit: t }) => /* @__PURE__ */ j(r, {
|
|
|
1594
1558
|
disabled: e.disabled
|
|
1595
1559
|
}),
|
|
1596
1560
|
onClick: () => t("press"),
|
|
1597
|
-
children: [e.label, e.badge === void 0 ? null : /* @__PURE__ */
|
|
1561
|
+
children: [e.label, e.badge === void 0 ? null : /* @__PURE__ */ S(n, {
|
|
1598
1562
|
"aria-label": e.badge ? `${e.badge} unread` : "unread",
|
|
1599
1563
|
children: e.badge
|
|
1600
1564
|
})]
|
|
1601
|
-
}),
|
|
1565
|
+
}), Pr = ({ props: e, children: t }) => {
|
|
1602
1566
|
let n = e.title !== void 0 || e.description !== void 0;
|
|
1603
|
-
return /* @__PURE__ */
|
|
1567
|
+
return /* @__PURE__ */ C(i, {
|
|
1604
1568
|
flexDirection: "column",
|
|
1605
1569
|
gap: "3",
|
|
1606
1570
|
...X({
|
|
1607
1571
|
background: e.background,
|
|
1608
1572
|
padding: e.padding
|
|
1609
1573
|
}),
|
|
1610
|
-
children: [n ? /* @__PURE__ */
|
|
1574
|
+
children: [n ? /* @__PURE__ */ C(l, {
|
|
1611
1575
|
direction: "column",
|
|
1612
1576
|
gap: "half",
|
|
1613
|
-
children: [e.title === void 0 ? null : /* @__PURE__ */
|
|
1577
|
+
children: [e.title === void 0 ? null : /* @__PURE__ */ S(p, {
|
|
1614
1578
|
variant: "headline",
|
|
1615
1579
|
el: "h3",
|
|
1616
1580
|
size: "small",
|
|
1617
1581
|
children: e.title
|
|
1618
|
-
}), e.description === void 0 ? null : /* @__PURE__ */
|
|
1582
|
+
}), e.description === void 0 ? null : /* @__PURE__ */ S(p, {
|
|
1619
1583
|
variant: "body",
|
|
1620
1584
|
subdued: !0,
|
|
1621
1585
|
children: e.description
|
|
1622
1586
|
})]
|
|
1623
1587
|
}) : null, t]
|
|
1624
1588
|
});
|
|
1625
|
-
},
|
|
1626
|
-
components:
|
|
1627
|
-
actions:
|
|
1628
|
-
}),
|
|
1629
|
-
let r = t?.checked, { state: i, set: o } =
|
|
1630
|
-
return /* @__PURE__ */
|
|
1589
|
+
}, Fr = T(D, {
|
|
1590
|
+
components: V,
|
|
1591
|
+
actions: z
|
|
1592
|
+
}), Ir = ({ props: e, bindings: t, emit: n }) => {
|
|
1593
|
+
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;
|
|
1594
|
+
return /* @__PURE__ */ S(a, {
|
|
1631
1595
|
label: e.label,
|
|
1632
1596
|
checked: c,
|
|
1633
1597
|
...X({ disabled: e.disabled }),
|
|
@@ -1635,13 +1599,13 @@ var zr = ({ props: e, emit: t }) => /* @__PURE__ */ j(r, {
|
|
|
1635
1599
|
r && o(r, !(t?.checked ?? !1)), n("change");
|
|
1636
1600
|
}
|
|
1637
1601
|
});
|
|
1638
|
-
},
|
|
1639
|
-
"check-circle":
|
|
1640
|
-
"in-progress":
|
|
1641
|
-
"radio-button-unchecked":
|
|
1642
|
-
},
|
|
1643
|
-
let n = e.icon ?
|
|
1644
|
-
return /* @__PURE__ */
|
|
1602
|
+
}, Lr = {
|
|
1603
|
+
"check-circle": Le,
|
|
1604
|
+
"in-progress": ze,
|
|
1605
|
+
"radio-button-unchecked": Re
|
|
1606
|
+
}, Rr = ({ props: e, emit: t }) => {
|
|
1607
|
+
let n = e.icon ? Lr[e.icon] : void 0, r = e.removable && e.size !== "small" ? () => t("close") : void 0;
|
|
1608
|
+
return /* @__PURE__ */ S(o, {
|
|
1645
1609
|
label: e.label,
|
|
1646
1610
|
...X({
|
|
1647
1611
|
size: e.size,
|
|
@@ -1650,28 +1614,28 @@ var zr = ({ props: e, emit: t }) => /* @__PURE__ */ j(r, {
|
|
|
1650
1614
|
onClose: r
|
|
1651
1615
|
})
|
|
1652
1616
|
});
|
|
1653
|
-
},
|
|
1617
|
+
}, zr = ({ props: e }) => /* @__PURE__ */ S(s, { ...X({
|
|
1654
1618
|
vertical: e.vertical,
|
|
1655
1619
|
spacing: e.spacing,
|
|
1656
1620
|
alignContent: e.alignContent
|
|
1657
|
-
}) }),
|
|
1658
|
-
let t =
|
|
1659
|
-
return
|
|
1621
|
+
}) }), Br = ({ props: e }) => {
|
|
1622
|
+
let t = y(null);
|
|
1623
|
+
return _(() => {
|
|
1660
1624
|
let n = t.current;
|
|
1661
1625
|
if (!n) return;
|
|
1662
1626
|
let r, i = () => {
|
|
1663
|
-
r && r.dispose(), r =
|
|
1664
|
-
let t = r.container.children.push(
|
|
1627
|
+
r && r.dispose(), r = k.Root.new(n), Y(r, e.theme);
|
|
1628
|
+
let t = r.container.children.push(Be.PieChart.new(r, {
|
|
1665
1629
|
layout: r.horizontalLayout,
|
|
1666
|
-
innerRadius:
|
|
1667
|
-
})), i = t.series.push(
|
|
1630
|
+
innerRadius: k.percent(50)
|
|
1631
|
+
})), i = t.series.push(Be.PieSeries.new(r, {
|
|
1668
1632
|
valueField: "value",
|
|
1669
1633
|
categoryField: "category",
|
|
1670
1634
|
legendValueText: ""
|
|
1671
1635
|
}));
|
|
1672
|
-
i.labels.template.set("text", "{valuePercentTotal.formatNumber('#.')}%"), i.data.setAll(e.data), (e.showLegend ?? !0) && t.children.push(
|
|
1673
|
-
centerY:
|
|
1674
|
-
y:
|
|
1636
|
+
i.labels.template.set("text", "{valuePercentTotal.formatNumber('#.')}%"), i.data.setAll(e.data), (e.showLegend ?? !0) && t.children.push(k.Legend.new(r, {
|
|
1637
|
+
centerY: k.percent(50),
|
|
1638
|
+
y: k.percent(50),
|
|
1675
1639
|
layout: r.verticalLayout
|
|
1676
1640
|
})).data.setAll(i.dataItems);
|
|
1677
1641
|
}, a = new ResizeObserver((e) => {
|
|
@@ -1680,273 +1644,12 @@ var zr = ({ props: e, emit: t }) => /* @__PURE__ */ j(r, {
|
|
|
1680
1644
|
return a.observe(n), n.offsetWidth > 0 && i(), () => {
|
|
1681
1645
|
a.disconnect(), r?.dispose();
|
|
1682
1646
|
};
|
|
1683
|
-
}, []), /* @__PURE__ */
|
|
1647
|
+
}, []), /* @__PURE__ */ S("div", {
|
|
1684
1648
|
ref: t,
|
|
1685
|
-
className:
|
|
1649
|
+
className: J,
|
|
1686
1650
|
style: { height: e.height ?? 300 }
|
|
1687
1651
|
});
|
|
1688
|
-
},
|
|
1689
|
-
//#endregion
|
|
1690
|
-
//#region src/core/catalog/email-card.tsx
|
|
1691
|
-
function Zr(e, t) {
|
|
1692
|
-
return e.toLowerCase() === t.toLowerCase();
|
|
1693
|
-
}
|
|
1694
|
-
function Qr(e, t) {
|
|
1695
|
-
return e.find((e) => Zr(e.email, t));
|
|
1696
|
-
}
|
|
1697
|
-
function $r(e, t) {
|
|
1698
|
-
return e.some((e) => Zr(e.email, t));
|
|
1699
|
-
}
|
|
1700
|
-
function ei(e, t) {
|
|
1701
|
-
return e.filter((e) => !Zr(e.email, t.email));
|
|
1702
|
-
}
|
|
1703
|
-
function ti(e) {
|
|
1704
|
-
return G.shape.email.safeParse(e).success;
|
|
1705
|
-
}
|
|
1706
|
-
function ni(e, t) {
|
|
1707
|
-
let n = /* @__PURE__ */ new Map();
|
|
1708
|
-
for (let r of [...e, ...t ?? []]) n.set(r.email.toLowerCase(), r);
|
|
1709
|
-
return [...n.values()];
|
|
1710
|
-
}
|
|
1711
|
-
function ri(e, t) {
|
|
1712
|
-
let n = /* @__PURE__ */ new Map();
|
|
1713
|
-
for (let r of [...e, ...t ?? []]) n.set(r.id, r);
|
|
1714
|
-
return [...n.values()];
|
|
1715
|
-
}
|
|
1716
|
-
function ii(e) {
|
|
1717
|
-
return e.map((e) => ({
|
|
1718
|
-
id: e.id,
|
|
1719
|
-
label: e.name
|
|
1720
|
-
}));
|
|
1721
|
-
}
|
|
1722
|
-
function ai(e) {
|
|
1723
|
-
return e.map((e) => ({
|
|
1724
|
-
id: String(e.id),
|
|
1725
|
-
name: e.label
|
|
1726
|
-
}));
|
|
1727
|
-
}
|
|
1728
|
-
function oi(e) {
|
|
1729
|
-
return `${e.name} <${e.email}>`;
|
|
1730
|
-
}
|
|
1731
|
-
function si(e) {
|
|
1732
|
-
let t = e.trim();
|
|
1733
|
-
if (!t) return null;
|
|
1734
|
-
let n = t.match(/^(.+?)\s*<([^>]+)>$/);
|
|
1735
|
-
if (n?.[1] && n[2]) {
|
|
1736
|
-
let e = n[2].trim(), t = n[1].trim();
|
|
1737
|
-
if (ti(e)) return {
|
|
1738
|
-
name: t,
|
|
1739
|
-
email: e
|
|
1740
|
-
};
|
|
1741
|
-
}
|
|
1742
|
-
if (t.includes("@")) {
|
|
1743
|
-
let e = t;
|
|
1744
|
-
return ti(e) ? {
|
|
1745
|
-
name: e,
|
|
1746
|
-
email: e
|
|
1747
|
-
} : null;
|
|
1748
|
-
}
|
|
1749
|
-
return null;
|
|
1750
|
-
}
|
|
1751
|
-
function ci(e, t, n) {
|
|
1752
|
-
let r = n.trim().toLowerCase();
|
|
1753
|
-
return t.filter((t) => !$r(e, t.email)).filter((e) => r.length === 0 || e.name.toLowerCase().includes(r) || e.email.toLowerCase().includes(r));
|
|
1754
|
-
}
|
|
1755
|
-
function li(e, t, n, r, i) {
|
|
1756
|
-
let a = e.trim();
|
|
1757
|
-
if (!a) return;
|
|
1758
|
-
let o = a.toLowerCase(), s = ci(t, n, "").find((e) => e.email.toLowerCase() === o);
|
|
1759
|
-
if (s) {
|
|
1760
|
-
r([...t, s]), i("");
|
|
1761
|
-
return;
|
|
1762
|
-
}
|
|
1763
|
-
let c = ci(t, n, a), l = c.length === 1 ? c[0] : void 0;
|
|
1764
|
-
if (l) {
|
|
1765
|
-
r([...t, l]), i("");
|
|
1766
|
-
return;
|
|
1767
|
-
}
|
|
1768
|
-
let u = si(a);
|
|
1769
|
-
u && !$r(t, u.email) && (r([...t, u]), i(""));
|
|
1770
|
-
}
|
|
1771
|
-
function ui({ label: e, contacts: t, contactOptions: n, disabled: r, required: i, onChange: a }) {
|
|
1772
|
-
let [s, c] = D(""), l = T(() => ni(t, n), [t, n]), u = (e) => {
|
|
1773
|
-
e.key === "Enter" && (e.preventDefault(), li(s, t, l, a, c));
|
|
1774
|
-
};
|
|
1775
|
-
return /* @__PURE__ */ j("div", {
|
|
1776
|
-
className: Jr,
|
|
1777
|
-
children: [/* @__PURE__ */ A(fe, {
|
|
1778
|
-
label: e,
|
|
1779
|
-
value: s,
|
|
1780
|
-
onChange: c,
|
|
1781
|
-
...X({
|
|
1782
|
-
disabled: r,
|
|
1783
|
-
required: i
|
|
1784
|
-
}),
|
|
1785
|
-
openOnEmptyFocus: !0,
|
|
1786
|
-
loadOptions: (e) => ci(t, l, e).map((e) => ({
|
|
1787
|
-
label: e.name,
|
|
1788
|
-
value: e.email
|
|
1789
|
-
})),
|
|
1790
|
-
onSelectOption: (e) => {
|
|
1791
|
-
let n = Qr(l, String(e.value));
|
|
1792
|
-
n && !$r(t, n.email) && a([...t, n]), c("");
|
|
1793
|
-
},
|
|
1794
|
-
onKeyDown: u,
|
|
1795
|
-
renderOption: (e) => {
|
|
1796
|
-
let t = Qr(l, String(e.value));
|
|
1797
|
-
return t ? oi(t) : e.label;
|
|
1798
|
-
}
|
|
1799
|
-
}), t.length > 0 ? /* @__PURE__ */ A("div", {
|
|
1800
|
-
className: Yr,
|
|
1801
|
-
children: t.map((e) => /* @__PURE__ */ A(o, {
|
|
1802
|
-
label: e.name,
|
|
1803
|
-
...X({ onClose: r ? void 0 : () => a(ei(t, e)) })
|
|
1804
|
-
}, e.email.toLowerCase()))
|
|
1805
|
-
}) : null]
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
function di({ label: e, selected: t, options: n, disabled: r, onChange: i }) {
|
|
1809
|
-
let a = T(() => ri(t, n), [t, n]), [o, s] = D(() => ii(t));
|
|
1810
|
-
return w(() => {
|
|
1811
|
-
s(ii(t));
|
|
1812
|
-
}, [t]), /* @__PURE__ */ A(ee, {
|
|
1813
|
-
label: e,
|
|
1814
|
-
options: ii(a),
|
|
1815
|
-
value: o,
|
|
1816
|
-
onSelectedOptionsChange: (e) => {
|
|
1817
|
-
s(e), i(ai(e));
|
|
1818
|
-
},
|
|
1819
|
-
...X({ disabled: r })
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
function fi({ disabled: e, sendLabel: t, discardLabel: n, emit: r }) {
|
|
1823
|
-
return /* @__PURE__ */ j("div", {
|
|
1824
|
-
className: Xr,
|
|
1825
|
-
children: [/* @__PURE__ */ A(ae, {
|
|
1826
|
-
label: t ?? "Send email",
|
|
1827
|
-
variant: "primary",
|
|
1828
|
-
...X({ isDisabled: e || void 0 }),
|
|
1829
|
-
onPress: () => r("send"),
|
|
1830
|
-
style: { width: "100%" }
|
|
1831
|
-
}), /* @__PURE__ */ A(ae, {
|
|
1832
|
-
label: n ?? "Dismiss",
|
|
1833
|
-
variant: "ghost",
|
|
1834
|
-
...X({ isDisabled: e || void 0 }),
|
|
1835
|
-
onPress: () => r("discard"),
|
|
1836
|
-
style: { width: "100%" }
|
|
1837
|
-
})]
|
|
1838
|
-
});
|
|
1839
|
-
}
|
|
1840
|
-
function Z(e, t, n, r, i) {
|
|
1841
|
-
return t ? P(e, t) ?? n ?? r : i;
|
|
1842
|
-
}
|
|
1843
|
-
function Q(e, t, n, r) {
|
|
1844
|
-
e ? t(e, r) : n(r);
|
|
1845
|
-
}
|
|
1846
|
-
var pi = ({ props: e, bindings: n, emit: r }) => {
|
|
1847
|
-
let i = e.disabled === !0, a = !!(e.errorTitle ?? e.errorMessage), o = n?.to, s = n?.cc, c = n?.subject, l = n?.body, u = n?.attachments, d = n?.forms, { state: f, set: p } = I(), [ee, m] = D(e.to), [h, g] = D(e.cc ?? []), [te, _] = D(e.subject ?? ""), [ne, v] = D(e.body ?? ""), [oe, b] = D(e.attachments ?? []), [se, S] = D(e.forms ?? []);
|
|
1848
|
-
w(() => {
|
|
1849
|
-
o || m(e.to);
|
|
1850
|
-
}, [e.to, o]), w(() => {
|
|
1851
|
-
s || g(e.cc ?? []);
|
|
1852
|
-
}, [e.cc, s]), w(() => {
|
|
1853
|
-
c || _(e.subject ?? "");
|
|
1854
|
-
}, [e.subject, c]), w(() => {
|
|
1855
|
-
l || v(e.body ?? "");
|
|
1856
|
-
}, [e.body, l]), w(() => {
|
|
1857
|
-
u || b(e.attachments ?? []);
|
|
1858
|
-
}, [e.attachments, u]), w(() => {
|
|
1859
|
-
d || S(e.forms ?? []);
|
|
1860
|
-
}, [e.forms, d]);
|
|
1861
|
-
let C = Z(f, o, e.to, [], ee), ce = Z(f, s, e.cc, [], h), le = Z(f, c, e.subject, "", te), ue = Z(f, l, e.body, "", ne), T = Z(f, u, e.attachments, [], oe), E = Z(f, d, e.forms, [], se), O = (e) => {
|
|
1862
|
-
Q(o, p, m, e), r("toChange");
|
|
1863
|
-
}, k = (e) => {
|
|
1864
|
-
Q(s, p, g, e), r("ccChange");
|
|
1865
|
-
}, M = (e) => {
|
|
1866
|
-
Q(u, p, b, e), r("attachmentsChange");
|
|
1867
|
-
}, de = (e) => {
|
|
1868
|
-
Q(d, p, S, e), r("formsChange");
|
|
1869
|
-
};
|
|
1870
|
-
return /* @__PURE__ */ A(y, {
|
|
1871
|
-
padding: "base",
|
|
1872
|
-
content: /* @__PURE__ */ j("div", {
|
|
1873
|
-
className: qr,
|
|
1874
|
-
children: [
|
|
1875
|
-
a ? /* @__PURE__ */ j(t, {
|
|
1876
|
-
status: "danger",
|
|
1877
|
-
title: e.errorTitle ?? "Unable to complete your request",
|
|
1878
|
-
children: [e.errorMessage ?? "There was an issue completing the request.", /* @__PURE__ */ A(ae, {
|
|
1879
|
-
label: e.retryLabel ?? "Retry",
|
|
1880
|
-
variant: "secondary",
|
|
1881
|
-
onPress: () => r("retry")
|
|
1882
|
-
})]
|
|
1883
|
-
}) : null,
|
|
1884
|
-
/* @__PURE__ */ A(x, {
|
|
1885
|
-
variant: "headline",
|
|
1886
|
-
el: "h3",
|
|
1887
|
-
size: "regular",
|
|
1888
|
-
text: "Draft Email"
|
|
1889
|
-
}),
|
|
1890
|
-
/* @__PURE__ */ A(ui, {
|
|
1891
|
-
label: "To",
|
|
1892
|
-
contacts: C,
|
|
1893
|
-
required: !0,
|
|
1894
|
-
...X({ contactOptions: e.contactOptions }),
|
|
1895
|
-
...X({ disabled: i || void 0 }),
|
|
1896
|
-
onChange: O
|
|
1897
|
-
}),
|
|
1898
|
-
/* @__PURE__ */ A(ui, {
|
|
1899
|
-
label: "CC",
|
|
1900
|
-
contacts: ce,
|
|
1901
|
-
...X({ contactOptions: e.contactOptions }),
|
|
1902
|
-
...X({ disabled: i || void 0 }),
|
|
1903
|
-
onChange: k
|
|
1904
|
-
}),
|
|
1905
|
-
/* @__PURE__ */ A(re, {
|
|
1906
|
-
label: "Subject",
|
|
1907
|
-
value: le,
|
|
1908
|
-
...X({ disabled: i || void 0 }),
|
|
1909
|
-
onChange: (e) => {
|
|
1910
|
-
let t = e.target.value;
|
|
1911
|
-
Q(c, p, _, t);
|
|
1912
|
-
}
|
|
1913
|
-
}),
|
|
1914
|
-
/* @__PURE__ */ A(ie, {
|
|
1915
|
-
label: "Body",
|
|
1916
|
-
value: ue,
|
|
1917
|
-
rows: 6,
|
|
1918
|
-
...X({ disabled: i || void 0 }),
|
|
1919
|
-
onChange: (e) => {
|
|
1920
|
-
let t = e.target.value;
|
|
1921
|
-
Q(l, p, v, t);
|
|
1922
|
-
}
|
|
1923
|
-
}),
|
|
1924
|
-
/* @__PURE__ */ A(di, {
|
|
1925
|
-
label: "Attachments",
|
|
1926
|
-
selected: T,
|
|
1927
|
-
...X({ options: e.attachmentOptions }),
|
|
1928
|
-
...X({ disabled: i || void 0 }),
|
|
1929
|
-
onChange: M
|
|
1930
|
-
}),
|
|
1931
|
-
/* @__PURE__ */ A(di, {
|
|
1932
|
-
label: "Forms",
|
|
1933
|
-
selected: E,
|
|
1934
|
-
...X({ options: e.formOptions }),
|
|
1935
|
-
...X({ disabled: i || void 0 }),
|
|
1936
|
-
onChange: de
|
|
1937
|
-
}),
|
|
1938
|
-
/* @__PURE__ */ A(fi, {
|
|
1939
|
-
disabled: i,
|
|
1940
|
-
...X({
|
|
1941
|
-
sendLabel: e.sendLabel,
|
|
1942
|
-
discardLabel: e.discardLabel
|
|
1943
|
-
}),
|
|
1944
|
-
emit: r
|
|
1945
|
-
})
|
|
1946
|
-
]
|
|
1947
|
-
})
|
|
1948
|
-
});
|
|
1949
|
-
}, mi = ({ props: e, children: t }) => /* @__PURE__ */ A(l, {
|
|
1652
|
+
}, Vr = ({ props: e, children: t }) => /* @__PURE__ */ S(l, {
|
|
1950
1653
|
...X({
|
|
1951
1654
|
direction: e.direction,
|
|
1952
1655
|
gap: e.gap,
|
|
@@ -1960,49 +1663,49 @@ var pi = ({ props: e, bindings: n, emit: r }) => {
|
|
|
1960
1663
|
inline: e.inline
|
|
1961
1664
|
}),
|
|
1962
1665
|
children: t
|
|
1963
|
-
}),
|
|
1666
|
+
}), Hr = (...e) => e.filter(Boolean).join(" "), Ur = "_1v76lkh0", Wr = "_1v76lkh1";
|
|
1964
1667
|
//#endregion
|
|
1965
1668
|
//#region src/core/catalog/grid.tsx
|
|
1966
|
-
function
|
|
1669
|
+
function Gr(e) {
|
|
1967
1670
|
let t = e.match(/repeat\(\s*(\d+)/);
|
|
1968
1671
|
return t?.[1] ? Number(t[1]) : e.trim().split(/\s+/).length;
|
|
1969
1672
|
}
|
|
1970
|
-
var
|
|
1673
|
+
var Kr = ({ props: e, children: t }) => {
|
|
1971
1674
|
if (e.bordered) {
|
|
1972
|
-
let n = e.templateColumns ?? "1fr", r =
|
|
1973
|
-
return /* @__PURE__ */
|
|
1974
|
-
className:
|
|
1675
|
+
let n = e.templateColumns ?? "1fr", r = g.count(t), i = Math.max(1, Gr(n)), a = Math.max(0, r - (r % i || i));
|
|
1676
|
+
return /* @__PURE__ */ S("div", {
|
|
1677
|
+
className: Ur,
|
|
1975
1678
|
style: { gridTemplateColumns: n },
|
|
1976
|
-
children:
|
|
1977
|
-
className:
|
|
1679
|
+
children: g.map(t, (e, t) => /* @__PURE__ */ S("div", {
|
|
1680
|
+
className: Hr(Wr, t < a && "_1v76lkh2"),
|
|
1978
1681
|
children: e
|
|
1979
1682
|
}))
|
|
1980
1683
|
});
|
|
1981
1684
|
}
|
|
1982
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ S(u, {
|
|
1983
1686
|
templateColumns: e.templateColumns,
|
|
1984
1687
|
gap: e.gap ?? "2",
|
|
1985
1688
|
children: t
|
|
1986
1689
|
});
|
|
1987
|
-
},
|
|
1690
|
+
}, qr = {
|
|
1988
1691
|
compact: 120,
|
|
1989
1692
|
standard: 180,
|
|
1990
1693
|
wide: 280
|
|
1991
1694
|
};
|
|
1992
|
-
function
|
|
1993
|
-
if (e != null) return
|
|
1695
|
+
function Jr(e) {
|
|
1696
|
+
if (e != null) return qr[e];
|
|
1994
1697
|
}
|
|
1995
1698
|
//#endregion
|
|
1996
1699
|
//#region src/core/catalog/guidance-card.tsx
|
|
1997
|
-
function
|
|
1700
|
+
function Yr(e) {
|
|
1998
1701
|
let t = {
|
|
1999
1702
|
key: e.key,
|
|
2000
1703
|
header: e.header
|
|
2001
1704
|
};
|
|
2002
|
-
return e.minWidth !== void 0 && (t.minWidth =
|
|
1705
|
+
return e.minWidth !== void 0 && (t.minWidth = Jr(e.minWidth)), t;
|
|
2003
1706
|
}
|
|
2004
|
-
var
|
|
2005
|
-
let { set: r } =
|
|
1707
|
+
var Xr = ({ props: e, emit: t, bindings: n }) => {
|
|
1708
|
+
let { set: r } = O(), i = n?.appliedChangeIds, a = (e) => {
|
|
2006
1709
|
i && r(i, e);
|
|
2007
1710
|
}, o = e.changeSections.map((e) => e.type === "single" ? {
|
|
2008
1711
|
type: "single",
|
|
@@ -2018,12 +1721,12 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2018
1721
|
label: e.label,
|
|
2019
1722
|
changeTables: e.changeTables.map((e) => ({
|
|
2020
1723
|
label: e.label,
|
|
2021
|
-
columns: e.columns.map(
|
|
1724
|
+
columns: e.columns.map(Yr),
|
|
2022
1725
|
data: e.data,
|
|
2023
1726
|
...e.reason === void 0 ? {} : { reason: e.reason }
|
|
2024
1727
|
}))
|
|
2025
1728
|
});
|
|
2026
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ S(ue, {
|
|
2027
1730
|
referenceLabel: e.referenceLabel,
|
|
2028
1731
|
changeSections: o,
|
|
2029
1732
|
...X({
|
|
@@ -2040,22 +1743,22 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2040
1743
|
},
|
|
2041
1744
|
onDismiss: () => t("dismiss")
|
|
2042
1745
|
});
|
|
2043
|
-
},
|
|
2044
|
-
"check-circle":
|
|
2045
|
-
"in-progress":
|
|
2046
|
-
"radio-button-unchecked":
|
|
2047
|
-
},
|
|
2048
|
-
let t =
|
|
2049
|
-
return t ? /* @__PURE__ */
|
|
1746
|
+
}, Zr = {
|
|
1747
|
+
"check-circle": Le,
|
|
1748
|
+
"in-progress": ze,
|
|
1749
|
+
"radio-button-unchecked": Re
|
|
1750
|
+
}, Qr = ({ props: e }) => {
|
|
1751
|
+
let t = Zr[e.name];
|
|
1752
|
+
return t ? /* @__PURE__ */ S(d, {
|
|
2050
1753
|
svg: t,
|
|
2051
1754
|
...X({
|
|
2052
1755
|
size: e.size,
|
|
2053
1756
|
color: e.color
|
|
2054
1757
|
})
|
|
2055
1758
|
}) : null;
|
|
2056
|
-
},
|
|
2057
|
-
let r = t?.value, { state: i, set: a } =
|
|
2058
|
-
return /* @__PURE__ */
|
|
1759
|
+
}, $r = ({ props: e, bindings: t, emit: n }) => {
|
|
1760
|
+
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
1761
|
+
return /* @__PURE__ */ S(se, {
|
|
2059
1762
|
label: e.label,
|
|
2060
1763
|
type: e.type ?? "text",
|
|
2061
1764
|
value: s,
|
|
@@ -2067,39 +1770,39 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2067
1770
|
r && a(r, e.target.value), n("change");
|
|
2068
1771
|
}
|
|
2069
1772
|
});
|
|
2070
|
-
},
|
|
2071
|
-
let t =
|
|
2072
|
-
return
|
|
1773
|
+
}, ei = ({ props: e }) => {
|
|
1774
|
+
let t = y(null);
|
|
1775
|
+
return _(() => {
|
|
2073
1776
|
let n = t.current;
|
|
2074
1777
|
if (!n) return;
|
|
2075
1778
|
let r, i = () => {
|
|
2076
|
-
r && r.dispose(), r =
|
|
2077
|
-
let t = r.container.children.push(
|
|
1779
|
+
r && r.dispose(), r = k.Root.new(n), Y(r, e.theme);
|
|
1780
|
+
let t = r.container.children.push(A.XYChart.new(r, { paddingLeft: 0 })), i = t.xAxes.push(A.CategoryAxis.new(r, {
|
|
2078
1781
|
categoryField: "category",
|
|
2079
|
-
renderer:
|
|
2080
|
-
})), a = t.yAxes.push(
|
|
1782
|
+
renderer: A.AxisRendererX.new(r, { minGridDistance: 30 })
|
|
1783
|
+
})), a = t.yAxes.push(A.ValueAxis.new(r, { renderer: A.AxisRendererY.new(r, {}) })), o = e.data[0], s = e.series ?? (o ? Object.keys(o).filter((e) => e !== "category") : []);
|
|
2081
1784
|
for (let n of s) {
|
|
2082
|
-
let o = t.series.push(
|
|
1785
|
+
let o = t.series.push(A.LineSeries.new(r, {
|
|
2083
1786
|
name: n,
|
|
2084
1787
|
xAxis: i,
|
|
2085
1788
|
yAxis: a,
|
|
2086
1789
|
valueYField: n,
|
|
2087
1790
|
categoryXField: "category",
|
|
2088
|
-
tooltip:
|
|
1791
|
+
tooltip: k.Tooltip.new(r, { labelText: `${n}: ${e.unit ?? ""}{valueY}` })
|
|
2089
1792
|
}));
|
|
2090
1793
|
o.strokes.template.setAll({ strokeWidth: 2 }), (e.showDots ?? !0) && o.bullets.push(() => {
|
|
2091
1794
|
if (!r) throw Error("Chart root is not initialized");
|
|
2092
1795
|
let e = o.get("fill");
|
|
2093
|
-
return
|
|
1796
|
+
return k.Bullet.new(r, { sprite: k.Circle.new(r, {
|
|
2094
1797
|
radius: 4,
|
|
2095
1798
|
...e ? { fill: e } : {},
|
|
2096
1799
|
strokeWidth: 0
|
|
2097
1800
|
}) });
|
|
2098
1801
|
}), o.data.setAll(e.data);
|
|
2099
1802
|
}
|
|
2100
|
-
i.data.setAll(e.data), (e.showLegend ?? s.length > 1) && t.children.push(
|
|
2101
|
-
centerX:
|
|
2102
|
-
x:
|
|
1803
|
+
i.data.setAll(e.data), (e.showLegend ?? s.length > 1) && t.children.push(k.Legend.new(r, {
|
|
1804
|
+
centerX: k.percent(50),
|
|
1805
|
+
x: k.percent(50),
|
|
2103
1806
|
marginTop: 8
|
|
2104
1807
|
})).data.setAll(t.series.values);
|
|
2105
1808
|
}, a = new ResizeObserver((e) => {
|
|
@@ -2108,21 +1811,21 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2108
1811
|
return a.observe(n), n.offsetWidth > 0 && i(), () => {
|
|
2109
1812
|
a.disconnect(), r?.dispose();
|
|
2110
1813
|
};
|
|
2111
|
-
}, []), /* @__PURE__ */
|
|
1814
|
+
}, []), /* @__PURE__ */ S("div", {
|
|
2112
1815
|
ref: t,
|
|
2113
|
-
className:
|
|
1816
|
+
className: J,
|
|
2114
1817
|
style: { height: e.height ?? 300 }
|
|
2115
1818
|
});
|
|
2116
|
-
},
|
|
1819
|
+
}, ti = ({ props: e, emit: t }) => {
|
|
2117
1820
|
let { label: r, href: i, appearance: a, target: o, ghost: s, badge: c } = e, l = (e) => {
|
|
2118
1821
|
e.preventDefault(), t("press");
|
|
2119
|
-
}, u = c === void 0 ? r : /* @__PURE__ */
|
|
1822
|
+
}, u = c === void 0 ? r : /* @__PURE__ */ C("span", {
|
|
2120
1823
|
style: {
|
|
2121
1824
|
position: "relative",
|
|
2122
1825
|
display: "inline-flex",
|
|
2123
1826
|
alignItems: "center"
|
|
2124
1827
|
},
|
|
2125
|
-
children: [r, /* @__PURE__ */
|
|
1828
|
+
children: [r, /* @__PURE__ */ S(n, {
|
|
2126
1829
|
"aria-label": c ? `${c} unread` : "unread",
|
|
2127
1830
|
offset: {
|
|
2128
1831
|
x: "8px",
|
|
@@ -2131,20 +1834,20 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2131
1834
|
children: c
|
|
2132
1835
|
})]
|
|
2133
1836
|
});
|
|
2134
|
-
return a === "secondary" ? /* @__PURE__ */
|
|
1837
|
+
return a === "secondary" ? /* @__PURE__ */ S(f, {
|
|
2135
1838
|
appearance: "secondary",
|
|
2136
1839
|
ghost: !1,
|
|
2137
1840
|
href: i,
|
|
2138
1841
|
...o ? { target: o } : {},
|
|
2139
1842
|
onClick: l,
|
|
2140
1843
|
children: u
|
|
2141
|
-
}) : s === void 0 ? /* @__PURE__ */
|
|
1844
|
+
}) : s === void 0 ? /* @__PURE__ */ S(f, {
|
|
2142
1845
|
appearance: "primary",
|
|
2143
1846
|
href: i,
|
|
2144
1847
|
...o ? { target: o } : {},
|
|
2145
1848
|
onClick: l,
|
|
2146
1849
|
children: u
|
|
2147
|
-
}) : /* @__PURE__ */
|
|
1850
|
+
}) : /* @__PURE__ */ S(f, {
|
|
2148
1851
|
appearance: "primary",
|
|
2149
1852
|
ghost: s,
|
|
2150
1853
|
href: i,
|
|
@@ -2152,7 +1855,7 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2152
1855
|
onClick: l,
|
|
2153
1856
|
children: u
|
|
2154
1857
|
});
|
|
2155
|
-
},
|
|
1858
|
+
}, ni = j({
|
|
2156
1859
|
defaultClassName: "_1le8ba60",
|
|
2157
1860
|
variantClassNames: { disabled: {
|
|
2158
1861
|
true: "_1le8ba61",
|
|
@@ -2160,35 +1863,35 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2160
1863
|
} },
|
|
2161
1864
|
defaultVariants: {},
|
|
2162
1865
|
compoundVariants: []
|
|
2163
|
-
}),
|
|
1866
|
+
}), ri = [
|
|
2164
1867
|
{
|
|
2165
1868
|
name: "Text",
|
|
2166
1869
|
catalog: fr,
|
|
2167
|
-
renderer: ({ props: e }) => e.variant === "headline" ? e.size === void 0 ? /* @__PURE__ */
|
|
1870
|
+
renderer: ({ props: e }) => e.variant === "headline" ? e.size === void 0 ? /* @__PURE__ */ S(p, {
|
|
2168
1871
|
variant: "headline",
|
|
2169
1872
|
el: "h3",
|
|
2170
1873
|
children: e.content
|
|
2171
|
-
}) : /* @__PURE__ */
|
|
1874
|
+
}) : /* @__PURE__ */ S(p, {
|
|
2172
1875
|
variant: "headline",
|
|
2173
1876
|
el: "h3",
|
|
2174
1877
|
size: e.size,
|
|
2175
1878
|
children: e.content
|
|
2176
|
-
}) : e.variant === "eyebrow" ? /* @__PURE__ */
|
|
1879
|
+
}) : e.variant === "eyebrow" ? /* @__PURE__ */ S(p, {
|
|
2177
1880
|
variant: "eyebrow",
|
|
2178
1881
|
children: e.content
|
|
2179
|
-
}) : e.size !== void 0 && e.subdued !== void 0 ? /* @__PURE__ */
|
|
1882
|
+
}) : e.size !== void 0 && e.subdued !== void 0 ? /* @__PURE__ */ S(p, {
|
|
2180
1883
|
variant: "body",
|
|
2181
1884
|
size: e.size,
|
|
2182
1885
|
subdued: e.subdued,
|
|
2183
1886
|
children: e.content
|
|
2184
|
-
}) : e.size === void 0 ? e.subdued === void 0 ? /* @__PURE__ */
|
|
1887
|
+
}) : e.size === void 0 ? e.subdued === void 0 ? /* @__PURE__ */ S(p, {
|
|
2185
1888
|
variant: "body",
|
|
2186
1889
|
children: e.content
|
|
2187
|
-
}) : /* @__PURE__ */
|
|
1890
|
+
}) : /* @__PURE__ */ S(p, {
|
|
2188
1891
|
variant: "body",
|
|
2189
1892
|
subdued: e.subdued,
|
|
2190
1893
|
children: e.content
|
|
2191
|
-
}) : /* @__PURE__ */
|
|
1894
|
+
}) : /* @__PURE__ */ S(p, {
|
|
2192
1895
|
variant: "body",
|
|
2193
1896
|
size: e.size,
|
|
2194
1897
|
children: e.content
|
|
@@ -2197,56 +1900,50 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2197
1900
|
},
|
|
2198
1901
|
{
|
|
2199
1902
|
name: "Card",
|
|
2200
|
-
catalog:
|
|
2201
|
-
renderer:
|
|
1903
|
+
catalog: Hn,
|
|
1904
|
+
renderer: Pr,
|
|
2202
1905
|
renderers: ["all"]
|
|
2203
1906
|
},
|
|
2204
1907
|
{
|
|
2205
1908
|
name: "Flex",
|
|
2206
|
-
catalog:
|
|
2207
|
-
renderer:
|
|
1909
|
+
catalog: qn,
|
|
1910
|
+
renderer: Vr,
|
|
2208
1911
|
renderers: ["all"]
|
|
2209
1912
|
},
|
|
2210
1913
|
{
|
|
2211
1914
|
name: "Grid",
|
|
2212
|
-
catalog:
|
|
2213
|
-
renderer:
|
|
1915
|
+
catalog: Jn,
|
|
1916
|
+
renderer: Kr,
|
|
2214
1917
|
renderers: ["all"]
|
|
2215
1918
|
},
|
|
2216
1919
|
{
|
|
2217
1920
|
name: "Alert",
|
|
2218
|
-
catalog:
|
|
2219
|
-
renderer:
|
|
1921
|
+
catalog: zn,
|
|
1922
|
+
renderer: jr,
|
|
2220
1923
|
renderers: ["all"]
|
|
2221
1924
|
},
|
|
2222
1925
|
{
|
|
2223
1926
|
name: "Divider",
|
|
2224
|
-
catalog: Un,
|
|
2225
|
-
renderer: Gr,
|
|
2226
|
-
renderers: ["all"]
|
|
2227
|
-
},
|
|
2228
|
-
{
|
|
2229
|
-
name: "EmailCard",
|
|
2230
1927
|
catalog: Gn,
|
|
2231
|
-
renderer:
|
|
1928
|
+
renderer: zr,
|
|
2232
1929
|
renderers: ["all"]
|
|
2233
1930
|
},
|
|
2234
1931
|
{
|
|
2235
1932
|
name: "Icon",
|
|
2236
|
-
catalog:
|
|
2237
|
-
renderer:
|
|
1933
|
+
catalog: ar,
|
|
1934
|
+
renderer: Qr,
|
|
2238
1935
|
renderers: ["all"]
|
|
2239
1936
|
},
|
|
2240
1937
|
{
|
|
2241
1938
|
name: "Chip",
|
|
2242
|
-
catalog:
|
|
2243
|
-
renderer:
|
|
1939
|
+
catalog: Wn,
|
|
1940
|
+
renderer: Rr,
|
|
2244
1941
|
renderers: ["all"]
|
|
2245
1942
|
},
|
|
2246
1943
|
{
|
|
2247
1944
|
name: "Link",
|
|
2248
1945
|
catalog: sr,
|
|
2249
|
-
renderer:
|
|
1946
|
+
renderer: ti,
|
|
2250
1947
|
renderers: ["all"]
|
|
2251
1948
|
},
|
|
2252
1949
|
{
|
|
@@ -2254,11 +1951,11 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2254
1951
|
catalog: lr,
|
|
2255
1952
|
renderer: ({ props: e }) => {
|
|
2256
1953
|
let t = X({ description: e.description });
|
|
2257
|
-
return e.indeterminate || e.value === void 0 ? /* @__PURE__ */
|
|
1954
|
+
return e.indeterminate || e.value === void 0 ? /* @__PURE__ */ S(ne, {
|
|
2258
1955
|
label: e.label,
|
|
2259
1956
|
indeterminate: !0,
|
|
2260
1957
|
...t
|
|
2261
|
-
}) : /* @__PURE__ */
|
|
1958
|
+
}) : /* @__PURE__ */ S(ne, {
|
|
2262
1959
|
label: e.label,
|
|
2263
1960
|
value: e.value,
|
|
2264
1961
|
...t
|
|
@@ -2268,46 +1965,46 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2268
1965
|
},
|
|
2269
1966
|
{
|
|
2270
1967
|
name: "BarChart",
|
|
2271
|
-
catalog:
|
|
2272
|
-
renderer:
|
|
1968
|
+
catalog: Bn,
|
|
1969
|
+
renderer: Mr,
|
|
2273
1970
|
renderers: ["all"]
|
|
2274
1971
|
},
|
|
2275
1972
|
{
|
|
2276
1973
|
name: "DonutChart",
|
|
2277
|
-
catalog:
|
|
2278
|
-
renderer:
|
|
1974
|
+
catalog: Kn,
|
|
1975
|
+
renderer: Br,
|
|
2279
1976
|
renderers: ["all"]
|
|
2280
1977
|
},
|
|
2281
1978
|
{
|
|
2282
1979
|
name: "LineChart",
|
|
2283
|
-
catalog:
|
|
2284
|
-
renderer:
|
|
1980
|
+
catalog: B,
|
|
1981
|
+
renderer: ei,
|
|
2285
1982
|
renderers: ["all"]
|
|
2286
1983
|
},
|
|
2287
1984
|
{
|
|
2288
1985
|
name: "Button",
|
|
2289
|
-
catalog:
|
|
2290
|
-
renderer:
|
|
1986
|
+
catalog: Vn,
|
|
1987
|
+
renderer: Nr,
|
|
2291
1988
|
renderers: ["all"]
|
|
2292
1989
|
},
|
|
2293
1990
|
{
|
|
2294
1991
|
name: "Checkbox",
|
|
2295
|
-
catalog:
|
|
2296
|
-
renderer:
|
|
1992
|
+
catalog: Un,
|
|
1993
|
+
renderer: Ir,
|
|
2297
1994
|
renderers: ["all"]
|
|
2298
1995
|
},
|
|
2299
1996
|
{
|
|
2300
1997
|
name: "Input",
|
|
2301
|
-
catalog:
|
|
2302
|
-
renderer:
|
|
1998
|
+
catalog: or,
|
|
1999
|
+
renderer: $r,
|
|
2303
2000
|
renderers: ["all"]
|
|
2304
2001
|
},
|
|
2305
2002
|
{
|
|
2306
2003
|
name: "Textarea",
|
|
2307
2004
|
catalog: pr,
|
|
2308
2005
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
2309
|
-
let r = t?.value, { state: i, set: a } =
|
|
2310
|
-
return /* @__PURE__ */
|
|
2006
|
+
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
2007
|
+
return /* @__PURE__ */ S(ce, {
|
|
2311
2008
|
label: e.label,
|
|
2312
2009
|
value: s,
|
|
2313
2010
|
...X({
|
|
@@ -2328,20 +2025,20 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2328
2025
|
name: "Listbox",
|
|
2329
2026
|
catalog: cr,
|
|
2330
2027
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
2331
|
-
let r = t?.value, { state: i, set: a } =
|
|
2028
|
+
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) => ({
|
|
2332
2029
|
id: e.value,
|
|
2333
2030
|
label: e.label
|
|
2334
2031
|
})), u = l.find((e) => e.id === s);
|
|
2335
|
-
return /* @__PURE__ */
|
|
2336
|
-
className:
|
|
2337
|
-
children: [/* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ C("div", {
|
|
2033
|
+
className: ni({ disabled: e.disabled ?? !1 }),
|
|
2034
|
+
children: [/* @__PURE__ */ S(c, { children: e.label }), /* @__PURE__ */ S(ee, {
|
|
2338
2035
|
items: l,
|
|
2339
2036
|
...u ? { selected: u } : {},
|
|
2340
2037
|
onSelectionChange: (e) => {
|
|
2341
2038
|
let t = e?.id ?? "";
|
|
2342
2039
|
r && a(r, t), n("change");
|
|
2343
2040
|
},
|
|
2344
|
-
children: ({ items: e }) => e.map((e) => /* @__PURE__ */
|
|
2041
|
+
children: ({ items: e }) => e.map((e) => /* @__PURE__ */ S(ee.Option, {
|
|
2345
2042
|
item: e,
|
|
2346
2043
|
children: e.label
|
|
2347
2044
|
}, e.id))
|
|
@@ -2354,10 +2051,10 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2354
2051
|
name: "RadioGroup",
|
|
2355
2052
|
catalog: ur,
|
|
2356
2053
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
2357
|
-
let r = t?.value, { state: i, set: a } =
|
|
2358
|
-
return /* @__PURE__ */
|
|
2054
|
+
let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
|
|
2055
|
+
return /* @__PURE__ */ S(re.Group, {
|
|
2359
2056
|
legend: e.label,
|
|
2360
|
-
children: e.options.map((t) => /* @__PURE__ */
|
|
2057
|
+
children: e.options.map((t) => /* @__PURE__ */ S(re, {
|
|
2361
2058
|
label: t.label,
|
|
2362
2059
|
value: t.value,
|
|
2363
2060
|
checked: s === t.value,
|
|
@@ -2374,8 +2071,8 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2374
2071
|
name: "Switch",
|
|
2375
2072
|
catalog: dr,
|
|
2376
2073
|
renderer: ({ props: e, bindings: t, emit: n }) => {
|
|
2377
|
-
let r = t?.checked, { state: i, set: a } =
|
|
2378
|
-
return /* @__PURE__ */
|
|
2074
|
+
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;
|
|
2075
|
+
return /* @__PURE__ */ S(oe, {
|
|
2379
2076
|
label: e.label,
|
|
2380
2077
|
value: e.label,
|
|
2381
2078
|
checked: s,
|
|
@@ -2389,28 +2086,28 @@ var Ci = ({ props: e, emit: t, bindings: n }) => {
|
|
|
2389
2086
|
},
|
|
2390
2087
|
{
|
|
2391
2088
|
name: "GuidanceCard",
|
|
2392
|
-
catalog:
|
|
2393
|
-
renderer:
|
|
2089
|
+
catalog: ir,
|
|
2090
|
+
renderer: Xr,
|
|
2394
2091
|
renderers: ["all"]
|
|
2395
2092
|
}
|
|
2396
2093
|
];
|
|
2397
|
-
Object.fromEntries(
|
|
2094
|
+
Object.fromEntries(ri.map(({ name: e, renderer: t }) => [e, t]));
|
|
2398
2095
|
//#endregion
|
|
2399
2096
|
//#region src/marketing/catalog/components/revenue-card.catalog.ts
|
|
2400
|
-
var
|
|
2401
|
-
props:
|
|
2402
|
-
title:
|
|
2403
|
-
value:
|
|
2404
|
-
trend:
|
|
2097
|
+
var ii = {
|
|
2098
|
+
props: w.object({
|
|
2099
|
+
title: w.string(),
|
|
2100
|
+
value: w.string(),
|
|
2101
|
+
trend: w.enum([
|
|
2405
2102
|
"up",
|
|
2406
2103
|
"down",
|
|
2407
2104
|
"flat"
|
|
2408
2105
|
]).optional(),
|
|
2409
|
-
delta:
|
|
2106
|
+
delta: w.string().optional()
|
|
2410
2107
|
}),
|
|
2411
2108
|
slots: [],
|
|
2412
2109
|
description: "KPI metric card. trend: up=green↑ down=red↓ flat=grey→. delta e.g. \"+12% vs last month\". Leaf node — no children."
|
|
2413
|
-
},
|
|
2110
|
+
}, ai = j({
|
|
2414
2111
|
defaultClassName: "cy2dbi0",
|
|
2415
2112
|
variantClassNames: { trend: {
|
|
2416
2113
|
up: "cy2dbi1",
|
|
@@ -2419,32 +2116,32 @@ var ji = {
|
|
|
2419
2116
|
} },
|
|
2420
2117
|
defaultVariants: {},
|
|
2421
2118
|
compoundVariants: []
|
|
2422
|
-
}),
|
|
2119
|
+
}), oi = [{
|
|
2423
2120
|
name: "RevenueCard",
|
|
2424
|
-
catalog:
|
|
2121
|
+
catalog: ii,
|
|
2425
2122
|
renderer: ({ props: e }) => {
|
|
2426
|
-
let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r =
|
|
2427
|
-
return /* @__PURE__ */
|
|
2123
|
+
let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r = ai({ trend: t });
|
|
2124
|
+
return /* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(l, {
|
|
2428
2125
|
direction: "column",
|
|
2429
2126
|
gap: "2",
|
|
2430
2127
|
children: [
|
|
2431
|
-
/* @__PURE__ */
|
|
2128
|
+
/* @__PURE__ */ S(p, {
|
|
2432
2129
|
variant: "eyebrow",
|
|
2433
2130
|
children: e.title
|
|
2434
2131
|
}),
|
|
2435
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ S(p, {
|
|
2436
2133
|
variant: "headline",
|
|
2437
2134
|
el: "h3",
|
|
2438
2135
|
children: e.value
|
|
2439
2136
|
}),
|
|
2440
|
-
e.delta && /* @__PURE__ */
|
|
2137
|
+
e.delta && /* @__PURE__ */ C(l, {
|
|
2441
2138
|
direction: "row",
|
|
2442
2139
|
gap: "1",
|
|
2443
2140
|
alignItems: "center",
|
|
2444
|
-
children: [/* @__PURE__ */
|
|
2141
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2445
2142
|
className: r,
|
|
2446
2143
|
children: n
|
|
2447
|
-
}), /* @__PURE__ */
|
|
2144
|
+
}), /* @__PURE__ */ S(p, {
|
|
2448
2145
|
variant: "eyebrow",
|
|
2449
2146
|
className: r,
|
|
2450
2147
|
children: e.delta
|
|
@@ -2457,39 +2154,39 @@ var ji = {
|
|
|
2457
2154
|
}];
|
|
2458
2155
|
//#endregion
|
|
2459
2156
|
//#region src/registry-utils.ts
|
|
2460
|
-
function
|
|
2157
|
+
function si(e, t) {
|
|
2461
2158
|
return t === "all" ? [...e] : e.filter(({ renderers: e }) => e.includes("all") || e.includes(t));
|
|
2462
2159
|
}
|
|
2463
|
-
function
|
|
2160
|
+
function ci(e) {
|
|
2464
2161
|
return Object.fromEntries(e.map(({ name: e, catalog: t }) => [e, t]));
|
|
2465
2162
|
}
|
|
2466
|
-
function
|
|
2163
|
+
function li(e) {
|
|
2467
2164
|
return Object.fromEntries(e.map(({ name: e, renderer: t }) => [e, t]));
|
|
2468
2165
|
}
|
|
2469
2166
|
//#endregion
|
|
2470
2167
|
//#region src/registry.ts
|
|
2471
|
-
var
|
|
2472
|
-
...
|
|
2473
|
-
...
|
|
2474
|
-
...
|
|
2168
|
+
var ui = [
|
|
2169
|
+
...ri,
|
|
2170
|
+
...oi,
|
|
2171
|
+
...U
|
|
2475
2172
|
];
|
|
2476
|
-
function
|
|
2477
|
-
let t =
|
|
2478
|
-
return
|
|
2173
|
+
function Z(e = "chat") {
|
|
2174
|
+
let t = si(ui, e), n = ci(t), r = li(t);
|
|
2175
|
+
return Me(T(D, {
|
|
2479
2176
|
components: n,
|
|
2480
|
-
actions:
|
|
2177
|
+
actions: z
|
|
2481
2178
|
}), {
|
|
2482
2179
|
components: r,
|
|
2483
|
-
actions:
|
|
2180
|
+
actions: Rn
|
|
2484
2181
|
});
|
|
2485
2182
|
}
|
|
2486
|
-
var
|
|
2487
|
-
function
|
|
2488
|
-
return
|
|
2183
|
+
var Q = Z("chat"), di = Q.registry, fi = Q.handlers, pi = Q.executeAction;
|
|
2184
|
+
function mi() {
|
|
2185
|
+
return Z("context");
|
|
2489
2186
|
}
|
|
2490
2187
|
//#endregion
|
|
2491
2188
|
//#region src/renderers/internal/enrichments/button-actions.ts
|
|
2492
|
-
function
|
|
2189
|
+
function hi(e) {
|
|
2493
2190
|
let t = { ...e.elements };
|
|
2494
2191
|
for (let [e, n] of Object.entries(t)) {
|
|
2495
2192
|
if (n.type !== "Button" || n.on?.press) continue;
|
|
@@ -2512,19 +2209,19 @@ function Ui(e) {
|
|
|
2512
2209
|
}
|
|
2513
2210
|
//#endregion
|
|
2514
2211
|
//#region src/renderers/internal/enrichments/useEnrichedSpec.ts
|
|
2515
|
-
function
|
|
2516
|
-
return
|
|
2212
|
+
function gi(e, t) {
|
|
2213
|
+
return v(() => t.reduce((e, t) => t(e), e), [e, t]);
|
|
2517
2214
|
}
|
|
2518
2215
|
//#endregion
|
|
2519
2216
|
//#region src/renderers/spec-renderer.tsx
|
|
2520
|
-
var
|
|
2521
|
-
let a =
|
|
2522
|
-
if (o.current !== e && (o.current = e, s.current =
|
|
2217
|
+
var _i = [hi], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i }) => {
|
|
2218
|
+
let a = gi(e, _i), o = y(null), s = y(null);
|
|
2219
|
+
if (o.current !== e && (o.current = e, s.current = je(a.state ?? {})), s.current === null) throw Error("State store is not initialized");
|
|
2523
2220
|
let c = s.current;
|
|
2524
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ S(ke, {
|
|
2525
2222
|
registry: t,
|
|
2526
2223
|
store: c,
|
|
2527
|
-
handlers:
|
|
2224
|
+
handlers: v(() => {
|
|
2528
2225
|
let e = n(() => void 0, () => c.getSnapshot()), t = r ? r({
|
|
2529
2226
|
setState: c.set,
|
|
2530
2227
|
getSnapshot: () => c.getSnapshot()
|
|
@@ -2538,14 +2235,14 @@ var Gi = [Ui], Ki = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
|
|
|
2538
2235
|
r,
|
|
2539
2236
|
c
|
|
2540
2237
|
]),
|
|
2541
|
-
functions:
|
|
2542
|
-
children: /* @__PURE__ */
|
|
2238
|
+
functions: v(() => ({ computeTotal: (e) => `$${((Number.parseFloat(String(e.quantity ?? 0)) || 0) * (Number.parseFloat(String(e.unitPrice ?? "0").replace(/[^0-9.]/g, "")) || 0)).toFixed(2)}` }), []),
|
|
2239
|
+
children: /* @__PURE__ */ S(Ae, {
|
|
2543
2240
|
spec: a,
|
|
2544
2241
|
registry: t,
|
|
2545
2242
|
loading: i ?? !1
|
|
2546
2243
|
})
|
|
2547
2244
|
});
|
|
2548
|
-
},
|
|
2245
|
+
}, vi = class extends pe {
|
|
2549
2246
|
state = {
|
|
2550
2247
|
hasError: !1,
|
|
2551
2248
|
message: ""
|
|
@@ -2563,10 +2260,10 @@ var Gi = [Ui], Ki = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
|
|
|
2563
2260
|
});
|
|
2564
2261
|
}
|
|
2565
2262
|
render() {
|
|
2566
|
-
return this.state.hasError ? process.env.NODE_ENV === "production" ? null : /* @__PURE__ */
|
|
2263
|
+
return this.state.hasError ? process.env.NODE_ENV === "production" ? null : /* @__PURE__ */ S(t, {
|
|
2567
2264
|
status: "danger",
|
|
2568
2265
|
title: `${this.props.elementType} failed to render`,
|
|
2569
|
-
children: /* @__PURE__ */
|
|
2266
|
+
children: /* @__PURE__ */ S(p, {
|
|
2570
2267
|
variant: "body",
|
|
2571
2268
|
children: this.state.message
|
|
2572
2269
|
})
|
|
@@ -2575,39 +2272,39 @@ var Gi = [Ui], Ki = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
|
|
|
2575
2272
|
};
|
|
2576
2273
|
//#endregion
|
|
2577
2274
|
//#region src/renderers/wrap-context-registry.tsx
|
|
2578
|
-
function
|
|
2275
|
+
function yi(e, t) {
|
|
2579
2276
|
if (process.env.NODE_ENV === "production") return e;
|
|
2580
2277
|
let n = { ...e };
|
|
2581
2278
|
for (let [r, i] of Object.entries(e)) {
|
|
2582
2279
|
let e = i;
|
|
2583
|
-
n[r] = ((n) => /* @__PURE__ */
|
|
2280
|
+
n[r] = ((n) => /* @__PURE__ */ S(vi, {
|
|
2584
2281
|
elementType: r,
|
|
2585
2282
|
...t ? { onError: t } : {},
|
|
2586
|
-
children: /* @__PURE__ */
|
|
2283
|
+
children: /* @__PURE__ */ S(e, { ...n })
|
|
2587
2284
|
}));
|
|
2588
2285
|
}
|
|
2589
2286
|
return n;
|
|
2590
2287
|
}
|
|
2591
2288
|
//#endregion
|
|
2592
2289
|
//#region src/renderers/context-spec-renderer.tsx
|
|
2593
|
-
var
|
|
2594
|
-
let o = a ? [] :
|
|
2595
|
-
o.length > 0 && process.env.NODE_ENV !== "production" && console.warn(`[ContextSpecRenderer] Spec validation issues:\n${
|
|
2290
|
+
var bi = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loading: a }) => {
|
|
2291
|
+
let o = a ? [] : G(e);
|
|
2292
|
+
o.length > 0 && process.env.NODE_ENV !== "production" && console.warn(`[ContextSpecRenderer] Spec validation issues:\n${K(o.map((e) => ({
|
|
2596
2293
|
...e,
|
|
2597
2294
|
severity: "error"
|
|
2598
2295
|
})))}`);
|
|
2599
|
-
let s = t ??
|
|
2600
|
-
return /* @__PURE__ */
|
|
2296
|
+
let s = t ?? Z("context").registry, c = n ?? Z("context").handlers;
|
|
2297
|
+
return /* @__PURE__ */ S($, {
|
|
2601
2298
|
spec: e,
|
|
2602
|
-
registry:
|
|
2299
|
+
registry: v(() => yi(s, i), [s, i]),
|
|
2603
2300
|
handlers: c,
|
|
2604
2301
|
...r ? { actions: r } : {},
|
|
2605
2302
|
...a === void 0 ? {} : { loading: a }
|
|
2606
2303
|
});
|
|
2607
|
-
},
|
|
2304
|
+
}, xi = "nilaa0";
|
|
2608
2305
|
//#endregion
|
|
2609
2306
|
//#region src/renderers/sectioned-context-renderer.tsx
|
|
2610
|
-
function
|
|
2307
|
+
function Si(e, t) {
|
|
2611
2308
|
let n = {}, r = !1, i = (t) => {
|
|
2612
2309
|
let a = e.elements[t];
|
|
2613
2310
|
if (!a) {
|
|
@@ -2624,8 +2321,8 @@ function Zi(e, t) {
|
|
|
2624
2321
|
hasMissingRefs: r
|
|
2625
2322
|
};
|
|
2626
2323
|
}
|
|
2627
|
-
function
|
|
2628
|
-
let { elements: n, hasMissingRefs: r } =
|
|
2324
|
+
function Ci(e, t) {
|
|
2325
|
+
let { elements: n, hasMissingRefs: r } = Si(e, t), i = {
|
|
2629
2326
|
root: t,
|
|
2630
2327
|
elements: n
|
|
2631
2328
|
}, a = e.state;
|
|
@@ -2634,14 +2331,14 @@ function Qi(e, t) {
|
|
|
2634
2331
|
hasMissingRefs: r
|
|
2635
2332
|
};
|
|
2636
2333
|
}
|
|
2637
|
-
function
|
|
2638
|
-
let n =
|
|
2639
|
-
return
|
|
2334
|
+
function wi(e, t) {
|
|
2335
|
+
let n = y(/* @__PURE__ */ new Map());
|
|
2336
|
+
return v(() => {
|
|
2640
2337
|
if (!e?.root) return [];
|
|
2641
2338
|
let r = e.elements[e.root];
|
|
2642
2339
|
if (!r) return [];
|
|
2643
2340
|
let i = (r.children ?? []).filter((t) => e.elements[t]), a = n.current, o = /* @__PURE__ */ new Map(), s = i.map((n, r) => {
|
|
2644
|
-
let { spec: s, hasMissingRefs: c } =
|
|
2341
|
+
let { spec: s, hasMissingRefs: c } = Ci(e, n), l = JSON.stringify(s), u = a.get(n), d = u && u.key === l ? u.spec : s;
|
|
2645
2342
|
o.set(n, {
|
|
2646
2343
|
key: l,
|
|
2647
2344
|
spec: d
|
|
@@ -2656,9 +2353,9 @@ function $i(e, t) {
|
|
|
2656
2353
|
return n.current = o, s;
|
|
2657
2354
|
}, [e, t]);
|
|
2658
2355
|
}
|
|
2659
|
-
function
|
|
2660
|
-
let t =
|
|
2661
|
-
return
|
|
2356
|
+
function Ti(e) {
|
|
2357
|
+
let t = y(/* @__PURE__ */ new Map());
|
|
2358
|
+
return v(() => {
|
|
2662
2359
|
let n = t.current, r = /* @__PURE__ */ new Map(), i = e.map((e) => {
|
|
2663
2360
|
let t = e.spec ? JSON.stringify(e.spec) : "", i = n.get(e.id), a = e.spec && i && i.key === t ? i.spec : e.spec;
|
|
2664
2361
|
return r.set(e.id, {
|
|
@@ -2672,45 +2369,45 @@ function ea(e) {
|
|
|
2672
2369
|
return t.current = r, i;
|
|
2673
2370
|
}, [e]);
|
|
2674
2371
|
}
|
|
2675
|
-
function
|
|
2676
|
-
return /* @__PURE__ */
|
|
2677
|
-
className:
|
|
2372
|
+
function Ei({ title: e }) {
|
|
2373
|
+
return /* @__PURE__ */ C("div", {
|
|
2374
|
+
className: Ye,
|
|
2678
2375
|
"data-testid": "context-section-skeleton",
|
|
2679
|
-
children: [/* @__PURE__ */
|
|
2376
|
+
children: [/* @__PURE__ */ S(ae, {
|
|
2680
2377
|
variant: "headline",
|
|
2681
2378
|
...e ? { "aria-label": `Loading ${e}` } : {}
|
|
2682
|
-
}), /* @__PURE__ */
|
|
2379
|
+
}), /* @__PURE__ */ S(ie, { height: "64px" })]
|
|
2683
2380
|
});
|
|
2684
2381
|
}
|
|
2685
|
-
function
|
|
2686
|
-
return e.spec ? /* @__PURE__ */
|
|
2382
|
+
function Di({ slot: e, registry: t, handlers: n, actions: r }) {
|
|
2383
|
+
return e.spec ? /* @__PURE__ */ C("div", {
|
|
2687
2384
|
"data-testid": `context-section-${e.id}`,
|
|
2688
2385
|
"data-status": e.status,
|
|
2689
|
-
children: [/* @__PURE__ */
|
|
2386
|
+
children: [/* @__PURE__ */ S($, {
|
|
2690
2387
|
spec: e.spec,
|
|
2691
2388
|
registry: t,
|
|
2692
2389
|
handlers: n,
|
|
2693
2390
|
loading: e.status === "loading",
|
|
2694
2391
|
...r ? { actions: r } : {}
|
|
2695
|
-
}), e.status === "loading" ? /* @__PURE__ */
|
|
2696
|
-
className:
|
|
2697
|
-
children: /* @__PURE__ */
|
|
2392
|
+
}), e.status === "loading" ? /* @__PURE__ */ S("div", {
|
|
2393
|
+
className: xi,
|
|
2394
|
+
children: /* @__PURE__ */ S(ae, {
|
|
2698
2395
|
variant: "body",
|
|
2699
2396
|
rows: 2,
|
|
2700
2397
|
"aria-label": "Loading more of this section"
|
|
2701
2398
|
})
|
|
2702
2399
|
}) : null]
|
|
2703
|
-
}) : /* @__PURE__ */
|
|
2400
|
+
}) : /* @__PURE__ */ S(Ei, { ...e.title ? { title: e.title } : {} });
|
|
2704
2401
|
}
|
|
2705
|
-
var
|
|
2706
|
-
let s =
|
|
2707
|
-
return /* @__PURE__ */
|
|
2708
|
-
className:
|
|
2402
|
+
var Oi = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, actions: a, onRenderError: o }) => {
|
|
2403
|
+
let s = v(() => Z("context"), []), c = r ?? s.registry, l = i ?? s.handlers, u = v(() => yi(c, o), [c, o]), d = wi(e, n);
|
|
2404
|
+
return /* @__PURE__ */ S("div", {
|
|
2405
|
+
className: F,
|
|
2709
2406
|
"data-testid": "sectioned-context-panel",
|
|
2710
|
-
children:
|
|
2407
|
+
children: Ti(t ?? d).map((e) => /* @__PURE__ */ S(vi, {
|
|
2711
2408
|
elementType: e.id,
|
|
2712
2409
|
...o ? { onError: o } : {},
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2410
|
+
children: /* @__PURE__ */ S(Di, {
|
|
2714
2411
|
slot: e,
|
|
2715
2412
|
registry: u,
|
|
2716
2413
|
handlers: l,
|
|
@@ -2720,6 +2417,6 @@ var ra = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, act
|
|
|
2720
2417
|
});
|
|
2721
2418
|
};
|
|
2722
2419
|
//#endregion
|
|
2723
|
-
export {
|
|
2420
|
+
export { bi as ContextSpecRenderer, Oi as SectionedContextRenderer, $ as SpecRenderer, Fr as catalog, H as composeCatalogComponents, _r as contextCatalog, mr as createScopedCatalog, pi as executeAction, Ci as extractSectionSpec, Ar as formatContextRenderReport, K as formatContextSpecIssues, mi as getContextRegistry, Z as getRegistry, fi as handlers, kr as hasContextSpecErrors, hr as mergeCatalogs, Or as postProcessContextSpec, di as registry, G as validateContextSpec, Dr as validateContextSpecDeep };
|
|
2724
2421
|
|
|
2725
2422
|
//# sourceMappingURL=index.js.map
|