@cccsaurora/clue-ui 1.1.7 → 1.1.8

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.
@@ -1,7 +1,7 @@
1
- import { jsx as o, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
2
  import { materialRenderers as Je, materialCells as Oe } from "@jsonforms/material-renderers";
3
3
  import { JsonForms as Pe } from "@jsonforms/react";
4
- import { Modal as ne, Paper as ae, Stack as n, Typography as b, Divider as Z, LinearProgress as ze, Button as P, IconButton as He, Box as O, CircularProgress as Ve, Collapse as qe } from "@mui/material";
4
+ import { Modal as ne, Paper as ae, Stack as a, Typography as b, Divider as Z, LinearProgress as ze, Button as P, IconButton as He, Box as O, CircularProgress as Ve, Collapse as qe } from "@mui/material";
5
5
  import ue from "./components/display/icons/Iconified.js";
6
6
  import { J as Y } from "./index-DtRkeZWt.js";
7
7
  import { ClueComponentContext as W } from "./hooks/ClueComponentContext.js";
@@ -10,7 +10,7 @@ import { a as K } from "./useClueTypeConfig-D1DlRG7e.js";
10
10
  import { d as he } from "./_baseGet-DSZygzyq.js";
11
11
  import { b as Ne } from "./_baseSlice-M5RKzt1A.js";
12
12
  import { i as Te } from "./utils-C8TeL4oX.js";
13
- import { useState as w, useRef as Le, useMemo as S, useEffect as Q, memo as xe, useCallback as E } from "react";
13
+ import { useState as w, useRef as Le, useMemo as k, useEffect as Q, memo as xe, useCallback as S } from "react";
14
14
  import { u as A, c as Ue, a as Ge } from "./index-E7g8cRyW.js";
15
15
  import z from "./components/ErrorBoundary.js";
16
16
  import { adaptSchema as Ke } from "./components/actions/form/schemaAdapter.js";
@@ -22,15 +22,15 @@ import { dayjs as Qe } from "./utils/time.js";
22
22
  import { safeDispatchEvent as N } from "./utils/window.js";
23
23
  import Xe from "./hooks/useClue.js";
24
24
  import { i as ge } from "./isNil-CjWwlQS3.js";
25
- function We(e, l, c) {
25
+ function We(e, c, l) {
26
26
  var i = e.length;
27
- return c = c === void 0 ? i : c, !l && c >= i ? e : Ne(e, l, c);
27
+ return l = l === void 0 ? i : l, !c && l >= i ? e : Ne(e, c, l);
28
28
  }
29
- var Ae = "\\ud800-\\udfff", De = "\\u0300-\\u036f", eo = "\\ufe20-\\ufe2f", oo = "\\u20d0-\\u20ff", ro = De + eo + oo, so = "\\ufe0e\\ufe0f", to = "\\u200d", lo = RegExp("[" + to + Ae + ro + so + "]");
29
+ var Ae = "\\ud800-\\udfff", De = "\\u0300-\\u036f", eo = "\\ufe20-\\ufe2f", oo = "\\u20d0-\\u20ff", ro = De + eo + oo, so = "\\ufe0e\\ufe0f", to = "\\u200d", co = RegExp("[" + to + Ae + ro + so + "]");
30
30
  function ye(e) {
31
- return lo.test(e);
31
+ return co.test(e);
32
32
  }
33
- function co(e) {
33
+ function lo(e) {
34
34
  return e.split("");
35
35
  }
36
36
  var Ce = "\\ud800-\\udfff", io = "\\u0300-\\u036f", mo = "\\ufe20-\\ufe2f", fo = "\\u20d0-\\u20ff", po = io + mo + fo, no = "\\ufe0e\\ufe0f", ao = "[" + Ce + "]", X = "[" + po + "]", g = "\\ud83c[\\udffb-\\udfff]", uo = "(?:" + X + "|" + g + ")", ve = "[^" + Ce + "]", we = "(?:\\ud83c[\\udde6-\\uddff]){2}", Re = "[\\ud800-\\udbff][\\udc00-\\udfff]", ho = "\\u200d", be = uo + "?", ke = "[" + no + "]?", xo = "(?:" + ho + "(?:" + [ve, we, Re].join("|") + ")" + ke + be + ")*", yo = ke + be + xo, Co = "(?:" + [ve + X + "?", X, we, Re, ao].join("|") + ")", vo = RegExp(g + "(?=" + g + ")|" + Co + yo, "g");
@@ -38,104 +38,107 @@ function wo(e) {
38
38
  return e.match(vo) || [];
39
39
  }
40
40
  function Ro(e) {
41
- return ye(e) ? wo(e) : co(e);
41
+ return ye(e) ? wo(e) : lo(e);
42
42
  }
43
43
  function bo(e) {
44
- return function(l) {
45
- l = he(l);
46
- var c = ye(l) ? Ro(l) : void 0, i = c ? c[0] : l.charAt(0), r = c ? We(c, 1).join("") : l.slice(1);
47
- return i[e]() + r;
44
+ return function(c) {
45
+ c = he(c);
46
+ var l = ye(c) ? Ro(c) : void 0, i = l ? l[0] : c.charAt(0), o = l ? We(l, 1).join("") : c.slice(1);
47
+ return i[e]() + o;
48
48
  };
49
49
  }
50
50
  var ko = bo("toUpperCase");
51
51
  function Eo(e) {
52
52
  return ko(he(e).toLowerCase());
53
53
  }
54
- const So = (e, l = 2e3) => {
55
- const [c, i] = w(e), r = Le(null), { getActionStatus: x } = Se(), a = S(() => e == null ? void 0 : e.task_id, [e == null ? void 0 : e.task_id]), f = S(() => e == null ? void 0 : e.actionId, [e == null ? void 0 : e.actionId]);
54
+ const So = (e, c = 2e3) => {
55
+ const [l, i] = w(e), o = Le(null), { getActionStatus: v } = Se(), u = k(() => e == null ? void 0 : e.task_id, [e == null ? void 0 : e.task_id]), n = k(() => e == null ? void 0 : e.actionId, [e == null ? void 0 : e.actionId]);
56
56
  return Q(() => {
57
- if ((e == null ? void 0 : e.outcome) !== "pending" || !a) return;
58
- let y = !1;
59
- const u = async () => {
60
- const h = await x(f, a);
61
- if (!h)
57
+ if ((e == null ? void 0 : e.outcome) !== "pending" || !u) return;
58
+ let m = !1;
59
+ const h = async () => {
60
+ const x = await v(n, u);
61
+ if (!x)
62
62
  i({ outcome: "failure", done: !0 });
63
- else if (h.outcome === "success" || h.outcome === "failure")
64
- i({ ...h, done: !0 });
63
+ else if (x.outcome === "success" || x.outcome === "failure")
64
+ i({ ...x, done: !0 });
65
65
  else {
66
- if (y) return;
67
- i({ ...h }), r.current = setTimeout(u, l);
66
+ if (m) return;
67
+ i({ ...x }), o.current = setTimeout(h, c);
68
68
  }
69
69
  };
70
- return u(), () => {
71
- y = !0, r.current && clearTimeout(r.current);
70
+ return h(), () => {
71
+ m = !0, o.current && clearTimeout(o.current);
72
72
  };
73
- }, [f, x, l, e == null ? void 0 : e.outcome, a]), Q(() => {
73
+ }, [n, v, c, e == null ? void 0 : e.outcome, u]), Q(() => {
74
74
  i(e);
75
- }, [e]), S(
76
- () => e || c ? { ...e, ...c } : void 0,
77
- [e, c]
75
+ }, [e]), k(
76
+ () => e || l ? { ...e, ...l } : void 0,
77
+ [e, l]
78
78
  );
79
- }, Mo = ({ result: e, onClose: l, show: c = !1 }) => {
80
- var x, a;
81
- const { t: i } = A(W, (f) => f.i18next), r = So(e);
82
- return r ? /* @__PURE__ */ o(ne, { open: c, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose: l, children: /* @__PURE__ */ o(ae, { sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", p: 2, minWidth: "750px" }, children: /* @__PURE__ */ o(z, { children: /* @__PURE__ */ p(n, { spacing: 1, height: "100%", children: [
83
- /* @__PURE__ */ p(n, { direction: "row", spacing: 1, alignItems: "center", children: [
84
- r.action.action_icon && /* @__PURE__ */ o(Ze, { height: "1.5rem", icon: r.action.action_icon }),
85
- /* @__PURE__ */ o(b, { variant: "h5", children: r.action.name }),
86
- r.action.supported_types && /* @__PURE__ */ o(b, { variant: "caption", color: "text.secondary", children: r.action.supported_types.map((f) => f.toUpperCase()).join(", ") }),
87
- /* @__PURE__ */ o("div", { style: { flex: 1 } }),
88
- /* @__PURE__ */ o(Ye, { size: "small", classification: r.action.classification })
79
+ }, Mo = ({ result: e, onClose: c, show: l = !1 }) => {
80
+ var u, n;
81
+ const { t: i } = A(W, (m) => m.i18next), o = So(e), v = k(
82
+ () => (o == null ? void 0 : o.outcome) === "success" || (o == null ? void 0 : o.outcome) === "failure" || (o == null ? void 0 : o.done),
83
+ [o == null ? void 0 : o.done, o == null ? void 0 : o.outcome]
84
+ );
85
+ return o ? /* @__PURE__ */ r(ne, { open: l, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose: c, children: /* @__PURE__ */ r(ae, { sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", p: 2, minWidth: "750px" }, children: /* @__PURE__ */ r(z, { children: /* @__PURE__ */ p(a, { spacing: 1, height: "100%", children: [
86
+ /* @__PURE__ */ p(a, { direction: "row", spacing: 1, alignItems: "center", children: [
87
+ o.action.action_icon && /* @__PURE__ */ r(Ze, { height: "1.5rem", icon: o.action.action_icon }),
88
+ /* @__PURE__ */ r(b, { variant: "h5", children: o.action.name }),
89
+ o.action.supported_types && /* @__PURE__ */ r(b, { variant: "caption", color: "text.secondary", children: o.action.supported_types.map((m) => m.toUpperCase()).join(", ") }),
90
+ /* @__PURE__ */ r("div", { style: { flex: 1 } }),
91
+ /* @__PURE__ */ r(Ye, { size: "small", classification: o.action.classification })
89
92
  ] }),
90
- /* @__PURE__ */ o(b, { variant: "body1", children: r.action.summary }),
91
- /* @__PURE__ */ o(Z, { flexItem: !0 }),
92
- r.done ? /* @__PURE__ */ o(z, { children: r.format === "markdown" ? /* @__PURE__ */ o(pe, { md: r.output }) : r.format === "json" ? /* @__PURE__ */ o(Y, { data: r.output, collapse: !0, forceCompact: !0 }) : /* @__PURE__ */ p(n, { sx: { overflowY: "auto" }, children: [
93
- /* @__PURE__ */ o(pe, { md: "`" + r.format + "` is not recognized as a format in this application." }),
94
- /* @__PURE__ */ o(Y, { data: r, collapse: !0, forceCompact: !0 })
95
- ] }) }) : /* @__PURE__ */ p(n, { flex: 1, sx: { pt: 2, alignItems: "center" }, spacing: 1, children: [
96
- r.summary && /* @__PURE__ */ o(b, { variant: "caption", children: r.summary }),
97
- /* @__PURE__ */ o(
93
+ /* @__PURE__ */ r(b, { variant: "body1", children: o.action.summary }),
94
+ /* @__PURE__ */ r(Z, { flexItem: !0 }),
95
+ v ? /* @__PURE__ */ r(z, { children: o.format === "markdown" ? /* @__PURE__ */ r(pe, { md: o.output }) : o.format === "json" ? /* @__PURE__ */ r(Y, { data: o.output, collapse: !0, forceCompact: !0 }) : /* @__PURE__ */ p(a, { sx: { overflowY: "auto" }, children: [
96
+ /* @__PURE__ */ r(pe, { md: "`" + o.format + "` is not recognized as a format in this application." }),
97
+ /* @__PURE__ */ r(Y, { data: o, collapse: !0, forceCompact: !0 })
98
+ ] }) }) : /* @__PURE__ */ p(a, { flex: 1, sx: { pt: 2, alignItems: "center" }, spacing: 1, children: [
99
+ o.summary && /* @__PURE__ */ r(b, { variant: "caption", children: o.summary }),
100
+ /* @__PURE__ */ r(
98
101
  ze,
99
102
  {
100
- variant: (x = r.output) != null && x.progress ? "determinate" : "indeterminate",
101
- value: ((a = r.output) == null ? void 0 : a.progress) * 100,
102
- sx: { maxWidth: 500, width: "100%", borderRadius: (f) => f.shape.borderRadius }
103
+ variant: (u = o.output) != null && u.progress ? "determinate" : "indeterminate",
104
+ value: ((n = o.output) == null ? void 0 : n.progress) * 100,
105
+ sx: { maxWidth: 500, width: "100%", borderRadius: (m) => m.shape.borderRadius }
103
106
  }
104
107
  )
105
108
  ] }),
106
- /* @__PURE__ */ o("div", { style: { flex: 1 } }),
107
- /* @__PURE__ */ p(n, { direction: "row", spacing: 1, children: [
108
- /* @__PURE__ */ o("div", { style: { flex: 1 } }),
109
- r.link && /* @__PURE__ */ o(P, { variant: "outlined", component: "a", target: "_blank", href: r.link, children: i("details.open") }),
110
- /* @__PURE__ */ o(P, { variant: "outlined", color: "error", onClick: l, children: i("close") })
109
+ /* @__PURE__ */ r("div", { style: { flex: 1 } }),
110
+ /* @__PURE__ */ p(a, { direction: "row", spacing: 1, children: [
111
+ /* @__PURE__ */ r("div", { style: { flex: 1 } }),
112
+ o.link && /* @__PURE__ */ r(P, { variant: "outlined", component: "a", target: "_blank", href: o.link, children: i("details.open") }),
113
+ /* @__PURE__ */ r(P, { variant: "outlined", color: "error", onClick: c, children: i("close") })
111
114
  ] })
112
115
  ] }) }) }) }) : null;
113
116
  }, jo = xe(Mo), Fo = new Be({ removeAdditional: !0, coerceTypes: !0, strict: !1 }), Ee = Ue(null), rr = ({
114
117
  baseURL: e,
115
- children: l,
116
- classification: c,
118
+ children: c,
119
+ classification: l,
117
120
  includeContext: i,
118
- getToken: r,
119
- onNetworkCall: x
121
+ getToken: o,
122
+ onNetworkCall: v
120
123
  }) => {
121
- const { t: a, i18n: f } = A(W, (s) => s.i18next), { ready: y } = Xe(), [u, h] = w(null), [H, m] = w({}), [T, F] = w(!1), [t, C] = w(null), [k, M] = w(!1), [$, Me] = w({}), j = S(() => {
122
- const s = {}, v = r == null ? void 0 : r();
123
- return v && (s.Authorization = `Bearer ${v}`), x ? x({ baseURL: e, headers: s }) : { baseURL: e, headers: s };
124
- }, [e, r, x]), L = E(async () => {
125
- if (!y)
124
+ const { t: u, i18n: n } = A(W, (s) => s.i18next), { ready: m } = Xe(), [h, x] = w(null), [H, f] = w({}), [T, F] = w(!1), [t, y] = w(null), [E, M] = w(!1), [$, Me] = w({}), j = k(() => {
125
+ const s = {}, C = o == null ? void 0 : o();
126
+ return C && (s.Authorization = `Bearer ${C}`), v ? v({ baseURL: e, headers: s }) : { baseURL: e, headers: s };
127
+ }, [e, o, v]), L = S(async () => {
128
+ if (!m)
126
129
  return;
127
130
  const s = await K.actions.get(j);
128
131
  return s && Me(s), s;
129
- }, [y, j]);
132
+ }, [m, j]);
130
133
  Q(() => {
131
134
  L();
132
- }, [e, y]);
133
- const V = E(
134
- (s, v, R) => JSON.stringify({ type: s, value: v, classification: R ?? c }),
135
- [c]
136
- ), D = E(
137
- async (s, v, R, Fe) => {
138
- const { forceMenu: se, onComplete: q, skipMenu: $e, skipResultModal: te, timeout: le, includeContext: _e, extraContext: ce } = {
135
+ }, [e, m]);
136
+ const V = S(
137
+ (s, C, R) => JSON.stringify({ type: s, value: C, classification: R ?? l }),
138
+ [l]
139
+ ), D = S(
140
+ async (s, C, R, Fe) => {
141
+ const { forceMenu: se, onComplete: q, skipMenu: $e, skipResultModal: te, timeout: ce, includeContext: _e, extraContext: le } = {
139
142
  forceMenu: !1,
140
143
  skipMenu: !1,
141
144
  onComplete: null,
@@ -146,35 +149,35 @@ const So = (e, l = 2e3) => {
146
149
  };
147
150
  if (!Object.keys($).includes(s))
148
151
  throw new Error("Invalid action id");
149
- const ie = v.map(
152
+ const ie = C.map(
150
153
  (d) => d.type === "telemetry" ? { ...d, value: JSON.stringify(d.value) } : d
151
154
  ), _ = $[s], U = Fo.compile(_.params), G = { selectors: ie, ...R };
152
155
  let I = null;
153
156
  if (_e && (I = {
154
157
  timestamp: Qe().toISOString(),
155
158
  url: window.location,
156
- language: (f == null ? void 0 : f.language) ?? "en"
157
- }), ge(ce) || (I = {
159
+ language: (n == null ? void 0 : n.language) ?? "en"
160
+ }), ge(le) || (I = {
158
161
  ...I ?? {},
159
- ...ce
162
+ ...le
160
163
  }), M(!0), !U(G) || se) {
161
164
  if ($e && !se)
162
165
  throw console.error(`Form is not valid (${U.errors.length} errors)`), new Error("Form is not completed");
163
- (u == null ? void 0 : u.id) === s && (console.error(`Form is not valid (${U.errors.length} errors)`), N(
166
+ (h == null ? void 0 : h.id) === s && (console.error(`Form is not valid (${U.errors.length} errors)`), N(
164
167
  new CustomEvent(B, {
165
168
  detail: {
166
- message: a("action.error.validation"),
169
+ message: u("action.error.validation"),
167
170
  level: "error"
168
171
  }
169
172
  })
170
- )), h({
173
+ )), x({
171
174
  id: s,
172
175
  action: _,
173
- selectors: v,
176
+ selectors: C,
174
177
  params: G ?? {},
175
178
  context: I,
176
179
  onComplete: q,
177
- timeout: le
180
+ timeout: ce
178
181
  });
179
182
  return;
180
183
  }
@@ -184,11 +187,11 @@ const So = (e, l = 2e3) => {
184
187
  ie,
185
188
  G ?? {},
186
189
  I,
187
- { timeout: le },
190
+ { timeout: ce },
188
191
  j
189
192
  ), de = { ...d, actionId: s, action: _ };
190
- q == null || q(de), m((me) => {
191
- const Ie = v.map((J) => V(J.type, J.value, J.classification));
193
+ q == null || q(de), f((me) => {
194
+ const Ie = C.map((J) => V(J.type, J.value, J.classification));
192
195
  return {
193
196
  ...me,
194
197
  ...Ie.reduce(
@@ -202,9 +205,9 @@ const So = (e, l = 2e3) => {
202
205
  }), N(
203
206
  new CustomEvent(B, {
204
207
  detail: {
205
- message: /* @__PURE__ */ p(n, { direction: "row", alignItems: "center", spacing: 0.5, width: "100%", children: [
206
- /* @__PURE__ */ o(b, { children: d.summary }),
207
- d.link && /* @__PURE__ */ o(He, { component: "a", href: d.link, size: "small", target: "_blank", children: /* @__PURE__ */ o(ue, { icon: "ic:baseline-open-in-new", fontSize: "small" }) })
208
+ message: /* @__PURE__ */ p(a, { direction: "row", alignItems: "center", spacing: 0.5, width: "100%", children: [
209
+ /* @__PURE__ */ r(b, { children: d.summary }),
210
+ d.link && /* @__PURE__ */ r(He, { component: "a", href: d.link, size: "small", target: "_blank", children: /* @__PURE__ */ r(ue, { icon: "ic:baseline-open-in-new", fontSize: "small" }) })
208
211
  ] }),
209
212
  timeout: d.link ? null : 5e3,
210
213
  level: d.outcome === "success" ? "success" : d.outcome === "pending" ? "info" : "error",
@@ -220,7 +223,7 @@ const So = (e, l = 2e3) => {
220
223
  }
221
224
  }
222
225
  })
223
- ), d.outcome === "success" && h(null), d.outcome === "pending" && (C({ ...d, actionId: s, action: _ }), te || F(!0)), d.format && (C({ ...d, actionId: s, action: _ }), d.format !== "pivot" && !te ? F(!0) : window.open(d.output, "_blank", "noreferrer"));
226
+ ), d.outcome === "success" && x(null), d.outcome === "pending" && (y({ ...d, actionId: s, action: _ }), te || F(!0)), d.format && (y({ ...d, actionId: s, action: _ }), d.format !== "pivot" && !te ? F(!0) : window.open(d.output, "_blank", "noreferrer"));
224
227
  } catch (d) {
225
228
  N(
226
229
  new CustomEvent(B, {
@@ -234,11 +237,11 @@ const So = (e, l = 2e3) => {
234
237
  M(!1);
235
238
  }
236
239
  },
237
- [$, i, V, f == null ? void 0 : f.language, j, u == null ? void 0 : u.id, a]
238
- ), ee = E(
239
- async (s, v) => {
240
+ [$, i, V, n == null ? void 0 : n.language, j, h == null ? void 0 : h.id, u]
241
+ ), ee = S(
242
+ async (s, C) => {
240
243
  try {
241
- return await K.actions.status.get(s, v, {}, j);
244
+ return await K.actions.status.get(s, C, {}, j);
242
245
  } catch (R) {
243
246
  N(
244
247
  new CustomEvent(B, {
@@ -251,28 +254,28 @@ const So = (e, l = 2e3) => {
251
254
  }
252
255
  },
253
256
  [j]
254
- ), oe = E(() => {
255
- h(null), M(!1);
256
- }, []), re = E(
257
- (s, v, R) => H[V(s, v, R)] ?? [],
257
+ ), oe = S(() => {
258
+ x(null), M(!1);
259
+ }, []), re = S(
260
+ (s, C, R) => H[V(s, C, R)] ?? [],
258
261
  [H, V]
259
- ), je = S(
262
+ ), je = k(
260
263
  () => ({
261
264
  availableActions: $,
262
265
  executeAction: D,
263
266
  cancelAction: oe,
264
267
  getActionStatus: ee,
265
268
  getActionResults: re,
266
- loading: k,
269
+ loading: E,
267
270
  refreshActions: L
268
271
  }),
269
- [$, oe, D, re, ee, k, L]
272
+ [$, oe, D, re, ee, E, L]
270
273
  );
271
274
  return /* @__PURE__ */ p(Ee.Provider, { value: je, children: [
272
- l,
275
+ c,
273
276
  /* @__PURE__ */ p(z, { children: [
274
- u && /* @__PURE__ */ o(Io, { runningActionData: u }),
275
- /* @__PURE__ */ o(
277
+ h && /* @__PURE__ */ r(Io, { runningActionData: h }),
278
+ /* @__PURE__ */ r(
276
279
  jo,
277
280
  {
278
281
  show: T && !!t,
@@ -284,55 +287,55 @@ const So = (e, l = 2e3) => {
284
287
  ] });
285
288
  }, Se = () => Ge(Ee), $o = Je.map((e) => ({
286
289
  ...e,
287
- renderer: ({ ...l }) => /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(e.renderer, { ...l }) })
290
+ renderer: ({ ...c }) => /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(e.renderer, { ...c }) })
288
291
  })), _o = ({ runningActionData: e }) => {
289
- const { executeAction: l, cancelAction: c } = Se(), { t: i } = A(W, (t) => t.i18next), [r, x] = w(!1), [a, f] = w(null), [y, u] = w(e == null ? void 0 : e.params), [h, H] = w(!1), m = S(
292
+ const { executeAction: c, cancelAction: l } = Se(), { t: i } = A(W, (t) => t.i18next), [o, v] = w(!1), [u, n] = w(null), [m, h] = w(e == null ? void 0 : e.params), [x, H] = w(!1), f = k(
290
293
  () => e != null && e.action ? { ...Ke(e.action.params), ...e.action.extra_schema ?? {} } : null,
291
294
  [e == null ? void 0 : e.action]
292
- ), T = S(
295
+ ), T = k(
293
296
  () => ({
294
297
  type: "VerticalLayout",
295
- elements: Object.entries((m == null ? void 0 : m.properties) ?? {}).sort(([t, C], [k, M]) => C.order || M.order ? C.order - M.order : +(m == null ? void 0 : m.required.includes(t)) - +(m == null ? void 0 : m.required.includes(k))).map(([t, C]) => {
296
- var k;
298
+ elements: Object.entries((f == null ? void 0 : f.properties) ?? {}).sort(([t, y], [E, M]) => y.order || M.order ? y.order - M.order : +(f == null ? void 0 : f.required.includes(t)) - +(f == null ? void 0 : f.required.includes(E))).map(([t, y]) => {
299
+ var E;
297
300
  return {
298
301
  type: "Control",
299
302
  scope: `#/properties/${t}`,
300
303
  options: {
301
- autocomplete: !!C.enum || ((k = C.options) == null ? void 0 : k.autocomplete),
304
+ autocomplete: !!y.enum || ((E = y.options) == null ? void 0 : E.autocomplete),
302
305
  showUnfocusedDescription: !0,
303
- ...C.options
306
+ ...y.options
304
307
  },
305
- rule: C.rule
308
+ rule: y.rule
306
309
  };
307
310
  })
308
311
  }),
309
- [m == null ? void 0 : m.properties, m == null ? void 0 : m.required]
310
- ), F = E(async () => {
312
+ [f == null ? void 0 : f.properties, f == null ? void 0 : f.required]
313
+ ), F = S(async () => {
311
314
  try {
312
- x(!0);
315
+ v(!0);
313
316
  const t = {};
314
- e != null && e.onComplete && (t.onComplete = e == null ? void 0 : e.onComplete), e != null && e.timeout && (t.timeout = e == null ? void 0 : e.timeout), await l(e == null ? void 0 : e.id, e == null ? void 0 : e.selectors, y, t);
317
+ e != null && e.onComplete && (t.onComplete = e == null ? void 0 : e.onComplete), e != null && e.timeout && (t.timeout = e == null ? void 0 : e.timeout), await c(e == null ? void 0 : e.id, e == null ? void 0 : e.selectors, m, t);
315
318
  } catch (t) {
316
319
  console.error(t);
317
320
  } finally {
318
- x(!1);
321
+ v(!1);
319
322
  }
320
323
  }, [
321
- l,
324
+ c,
322
325
  e == null ? void 0 : e.id,
323
326
  e == null ? void 0 : e.selectors,
324
327
  e == null ? void 0 : e.onComplete,
325
328
  e == null ? void 0 : e.timeout,
326
- y
329
+ m
327
330
  ]);
328
331
  if (e != null && e.action)
329
332
  try {
330
- return /* @__PURE__ */ o(ne, { open: !0, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose: c, children: /* @__PURE__ */ o(
333
+ return /* @__PURE__ */ r(ne, { open: !0, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose: l, children: /* @__PURE__ */ r(
331
334
  ae,
332
335
  {
333
336
  sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", px: 2, pt: 2, minWidth: "750px", overflow: "auto" },
334
337
  children: /* @__PURE__ */ p(
335
- n,
338
+ a,
336
339
  {
337
340
  spacing: 1,
338
341
  height: "100%",
@@ -343,75 +346,75 @@ const So = (e, l = 2e3) => {
343
346
  }
344
347
  },
345
348
  children: [
346
- /* @__PURE__ */ p(n, { direction: "row", spacing: 1, children: [
347
- /* @__PURE__ */ p(n, { direction: "column", spacing: 1, children: [
349
+ /* @__PURE__ */ p(a, { direction: "row", spacing: 1, children: [
350
+ /* @__PURE__ */ p(a, { direction: "column", spacing: 1, children: [
348
351
  /* @__PURE__ */ p(b, { variant: "h5", children: [
349
352
  i("actions.executing"),
350
353
  " ",
351
354
  e == null ? void 0 : e.action.id.replace(/_/g, " ").split(" ").map(Eo).join(" ")
352
355
  ] }),
353
- (e == null ? void 0 : e.action.summary) && /* @__PURE__ */ o(b, { variant: "body1", color: "text.secondary", sx: { pb: 1.5 }, children: e == null ? void 0 : e.action.summary })
356
+ (e == null ? void 0 : e.action.summary) && /* @__PURE__ */ r(b, { variant: "body1", color: "text.secondary", sx: { pb: 1.5 }, children: e == null ? void 0 : e.action.summary })
354
357
  ] }),
355
- /* @__PURE__ */ o(O, { flex: 1 }),
356
- /* @__PURE__ */ o(O, { alignContent: "end", children: /* @__PURE__ */ o(
358
+ /* @__PURE__ */ r(O, { flex: 1 }),
359
+ /* @__PURE__ */ r(O, { alignContent: "end", children: /* @__PURE__ */ r(
357
360
  P,
358
361
  {
359
362
  variant: "outlined",
360
363
  onClick: () => H((t) => !t),
361
- startIcon: /* @__PURE__ */ o(
364
+ startIcon: /* @__PURE__ */ r(
362
365
  O,
363
366
  {
364
367
  component: "span",
365
368
  sx: (t) => ({
366
369
  transition: t.transitions.create("transform"),
367
- transform: h ? "rotate(180deg)" : "rotate(0deg)"
370
+ transform: x ? "rotate(180deg)" : "rotate(0deg)"
368
371
  }),
369
- children: /* @__PURE__ */ o(ue, { icon: "ic:baseline-keyboard-double-arrow-right" })
372
+ children: /* @__PURE__ */ r(ue, { icon: "ic:baseline-keyboard-double-arrow-right" })
370
373
  }
371
374
  ),
372
- children: i(h ? "actions.json.hide" : "actions.json.show")
375
+ children: i(x ? "actions.json.hide" : "actions.json.show")
373
376
  }
374
377
  ) })
375
378
  ] }),
376
- /* @__PURE__ */ o(Z, { orientation: "horizontal", variant: "middle" }),
377
- /* @__PURE__ */ o(O, { pt: 1.5 }),
378
- /* @__PURE__ */ p(n, { flexGrow: 1, direction: "row", spacing: 1, children: [
379
- /* @__PURE__ */ p(n, { direction: "column", flexGrow: 1, children: [
380
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
379
+ /* @__PURE__ */ r(Z, { orientation: "horizontal", variant: "middle" }),
380
+ /* @__PURE__ */ r(O, { pt: 1.5 }),
381
+ /* @__PURE__ */ p(a, { flexGrow: 1, direction: "row", spacing: 1, children: [
382
+ /* @__PURE__ */ p(a, { direction: "column", flexGrow: 1, children: [
383
+ /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(
381
384
  Pe,
382
385
  {
383
- schema: m,
386
+ schema: f,
384
387
  uischema: T,
385
388
  renderers: $o,
386
389
  cells: Oe,
387
- data: y,
388
- onChange: ({ data: t, errors: C }) => {
389
- Te(t, y) || u(t), f(C);
390
+ data: m,
391
+ onChange: ({ data: t, errors: y }) => {
392
+ Te(t, m) || h(t), n(y);
390
393
  },
391
394
  config: {}
392
395
  }
393
396
  ) }),
394
- /* @__PURE__ */ p(n, { direction: "row", spacing: 1, pb: 1, children: [
395
- /* @__PURE__ */ o("div", { style: { flex: 1 } }),
396
- /* @__PURE__ */ o(P, { color: "error", variant: "outlined", onClick: c, children: i("cancel") }),
397
- /* @__PURE__ */ o(
397
+ /* @__PURE__ */ p(a, { direction: "row", spacing: 1, pb: 1, children: [
398
+ /* @__PURE__ */ r("div", { style: { flex: 1 } }),
399
+ /* @__PURE__ */ r(P, { color: "error", variant: "outlined", onClick: l, children: i("cancel") }),
400
+ /* @__PURE__ */ r(
398
401
  P,
399
402
  {
400
403
  color: "success",
401
404
  variant: "outlined",
402
- disabled: r || (a == null ? void 0 : a.length) > 0,
405
+ disabled: o || (u == null ? void 0 : u.length) > 0,
403
406
  onClick: F,
404
- endIcon: r && /* @__PURE__ */ o(Ve, { color: "inherit", size: 18 }),
407
+ endIcon: o && /* @__PURE__ */ r(Ve, { color: "inherit", size: 18 }),
405
408
  children: i("actions.execute")
406
409
  }
407
410
  )
408
411
  ] })
409
412
  ] }),
410
- /* @__PURE__ */ o(qe, { orientation: "horizontal", in: h, unmountOnExit: !0, mountOnEnter: !0, children: /* @__PURE__ */ p(n, { direction: "row", height: "100%", spacing: 1, children: [
411
- /* @__PURE__ */ o(Z, { orientation: "vertical" }),
412
- /* @__PURE__ */ p(n, { children: [
413
- /* @__PURE__ */ o(b, { variant: "h5", children: i("action.data") }),
414
- /* @__PURE__ */ o(O, { width: 600, height: "100%", children: /* @__PURE__ */ o(Y, { data: y, slotProps: { stack: { height: "100%" }, json: { name: !1 } } }) })
413
+ /* @__PURE__ */ r(qe, { orientation: "horizontal", in: x, unmountOnExit: !0, mountOnEnter: !0, children: /* @__PURE__ */ p(a, { direction: "row", height: "100%", spacing: 1, children: [
414
+ /* @__PURE__ */ r(Z, { orientation: "vertical" }),
415
+ /* @__PURE__ */ p(a, { children: [
416
+ /* @__PURE__ */ r(b, { variant: "h5", children: i("action.data") }),
417
+ /* @__PURE__ */ r(O, { width: 600, height: "100%", children: /* @__PURE__ */ r(Y, { data: m, slotProps: { stack: { height: "100%" }, json: { name: !1 } } }) })
415
418
  ] })
416
419
  ] }) })
417
420
  ] })
@@ -5,7 +5,7 @@ import "@mui/material";
5
5
  import "../display/icons/Iconified.js";
6
6
  import "../../index-DtRkeZWt.js";
7
7
  import "../../hooks/ClueComponentContext.js";
8
- import { A } from "../../ActionForm-CW8ZBIh8.js";
8
+ import { A } from "../../ActionForm-BRNLvDmk.js";
9
9
  import "../../utils-C8TeL4oX.js";
10
10
  import "react";
11
11
  import "../../index-E7g8cRyW.js";
@@ -4,7 +4,7 @@ import "@mui/material";
4
4
  import "../../index-DtRkeZWt.js";
5
5
  import "../display/markdown/index.js";
6
6
  import "../../hooks/ClueComponentContext.js";
7
- import { R as u } from "../../ActionForm-CW8ZBIh8.js";
7
+ import { R as u } from "../../ActionForm-BRNLvDmk.js";
8
8
  import "react";
9
9
  import "../../index-E7g8cRyW.js";
10
10
  import "../ClassificationChip.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, Fragment as C, jsx as e } from "react/jsx-runtime";
2
2
  import { useTheme as k, Tooltip as S, IconButton as E, CircularProgress as d, Button as z, Popover as I, Paper as j, Stack as c, Box as P, Typography as B, Divider as O } from "@mui/material";
3
3
  import { useClueComponentSelector as T, useClueEnrichSelector as p } from "../../hooks/selectors.js";
4
- import { c as w } from "../../ActionForm-CW8ZBIh8.js";
4
+ import { c as w } from "../../ActionForm-BRNLvDmk.js";
5
5
  import { useState as m, useRef as M, useCallback as D, useEffect as F } from "react";
6
6
  import g from "../display/icons/Iconified.js";
7
7
  const J = ({ show: t = !1, size: b = "small", selector: n }) => {
@@ -6,7 +6,7 @@ import { SNACKBAR_EVENT_ID as w } from "../../data/event.js";
6
6
  import { ClueGroupContext as j } from "../../hooks/ClueGroupContext.js";
7
7
  import { useClueComponentSelector as A, useClueEnrichSelector as u } from "../../hooks/selectors.js";
8
8
  import { safeDispatchEvent as B } from "../../utils/window.js";
9
- import { c as F } from "../../ActionForm-CW8ZBIh8.js";
9
+ import { c as F } from "../../ActionForm-BRNLvDmk.js";
10
10
  import { useState as d, useMemo as O, useCallback as T } from "react";
11
11
  import { u as D } from "../../index-E7g8cRyW.js";
12
12
  import G from "../actions/ExecutePopover.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "@mui/material";
3
3
  import "../index-BXxfAxFt.js";
4
4
  import "../useClueTypeConfig-D1DlRG7e.js";
5
- import { a as d, C as f } from "../ActionForm-CW8ZBIh8.js";
5
+ import { a as d, C as f } from "../ActionForm-BRNLvDmk.js";
6
6
  import "../components/display/icons/Iconified.js";
7
7
  import "../components/ErrorBoundary.js";
8
8
  import "../data/event.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { C as i } from "../ActionForm-CW8ZBIh8.js";
2
+ import { C as i } from "../ActionForm-BRNLvDmk.js";
3
3
  import { ClueComponentProvider as m } from "./ClueComponentContext.js";
4
4
  import { ClueConfigProvider as n } from "./ClueConfigProvider.js";
5
5
  import { ClueDatabaseProvider as t } from "./ClueDatabaseContext.js";
@@ -1,4 +1,4 @@
1
- import { a as o } from "../ActionForm-CW8ZBIh8.js";
1
+ import { a as o } from "../ActionForm-BRNLvDmk.js";
2
2
  import { ClueComponentContext as r } from "./ClueComponentContext.js";
3
3
  import { C as n } from "../ClueEnrichContext-CCZCMklu.js";
4
4
  import { ClueFetcherContext as u } from "./ClueFetcherContext.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { b as r } from "../ActionForm-CW8ZBIh8.js";
2
+ import { b as r } from "../ActionForm-BRNLvDmk.js";
3
3
  export {
4
4
  r as useActionResult
5
5
  };
@@ -1,4 +1,4 @@
1
- import { u as a } from "../ActionForm-CW8ZBIh8.js";
1
+ import { u as a } from "../ActionForm-BRNLvDmk.js";
2
2
  import "../index-E7g8cRyW.js";
3
3
  export {
4
4
  a as default
package/icons/Action.js CHANGED
@@ -3,7 +3,7 @@ import { I } from "../iconify-BBckr5AQ.js";
3
3
  import { useTheme as j, Stack as i, Divider as l, Typography as C } from "@mui/material";
4
4
  import R from "../components/CountBadge.js";
5
5
  import { C as v } from "../AnnotationPreview-BUNr3hF2.js";
6
- import { u as B } from "../ActionForm-CW8ZBIh8.js";
6
+ import { u as B } from "../ActionForm-BRNLvDmk.js";
7
7
  import { g as D } from "../groupBy-IWYxSFLq.js";
8
8
  import { memo as L, useRef as A, useMemo as s, useEffect as O } from "react";
9
9
  import { u as M } from "../index-E7g8cRyW.js";
package/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as t, u as r } from "./ActionForm-CW8ZBIh8.js";
1
+ import { A as t, u as r } from "./ActionForm-BRNLvDmk.js";
2
2
  import { default as f } from "./components/AnnotationDetailPopover.js";
3
3
  import { A as n } from "./AnnotationDetails-BuzcQyAM.js";
4
4
  import { default as p } from "./components/AnnotationEntry.js";
package/package.json CHANGED
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "type": "module",
65
65
  "types": "main.d.ts",
66
- "version": "1.1.7",
66
+ "version": "1.1.8",
67
67
  "exports": {
68
68
  ".": "./main.js",
69
69
  "./index.css": "./index.css",