@cratis/event-models 0.201.0 → 0.201.1
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/screen-editor/{ColumnListEditor-MZzEtJuo.js → ColumnListEditor-CmhQYS5b.js} +1 -1
- package/dist/screen-editor/{FieldEditor-Biz82jlR.js → FieldEditor-e6VpsD__.js} +1 -1
- package/dist/screen-editor/{FieldListEditor-VWZ3LAwY.js → FieldListEditor-65ZJZoLM.js} +1 -1
- package/dist/screen-editor/{NavigationTargetEditor-DiGohBww.js → NavigationTargetEditor-C53kuCBJ.js} +1 -1
- package/dist/screen-editor/{ReferenceEditor-DYLimujk.js → ReferenceEditor-CTguqJZC.js} +1 -1
- package/dist/screen-editor/{ReferenceTargetEditors-D0jEg1QM.js → ReferenceTargetEditors-Bx6dhIxY.js} +1 -1
- package/dist/screen-editor/{SearchableSelect-Cj_cgVO0.js → SearchableSelect-BGZmobXo.js} +20 -19
- package/dist/screen-editor/{SelectEditor-Bi_fonS5.js → SelectEditor-CY6dlYWi.js} +1 -1
- package/dist/screen-editor/{SliceEditor-C9bAGN4f.js → SliceEditor-BdiU5-Tg.js} +1 -1
- package/dist/screen-editor/{StateChangeEditors-BkAsY31N.js → StateChangeEditors-DHzrwtMX.js} +1 -1
- package/dist/screen-editor/index.js +225 -222
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as m, o as _, v as N, y } from "./structuredValue-vqCZttsk.js";
|
|
2
|
-
import { FieldEditor as C } from "./FieldEditor-
|
|
2
|
+
import { FieldEditor as C } from "./FieldEditor-e6VpsD__.js";
|
|
3
3
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
4
4
|
var p = [
|
|
5
5
|
"start",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as c, t as g, v as w, y as m } from "./structuredValue-vqCZttsk.js";
|
|
2
|
-
import { FieldEditor as y } from "./FieldEditor-
|
|
2
|
+
import { FieldEditor as y } from "./FieldEditor-e6VpsD__.js";
|
|
3
3
|
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
4
4
|
var $ = ({ value: p, onChange: b, descriptor: h, context: l, disabled: a, problem: v, id: d }) => {
|
|
5
5
|
const s = l.strings.editors.list, o = g(p).filter((i) => typeof i == "string"), e = (i) => b(i.length === 0 ? void 0 : i), f = {
|
package/dist/screen-editor/{NavigationTargetEditor-DiGohBww.js → NavigationTargetEditor-C53kuCBJ.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as g } from "./structuredValue-vqCZttsk.js";
|
|
2
|
-
import { t as v } from "./SearchableSelect-
|
|
2
|
+
import { t as v } from "./SearchableSelect-BGZmobXo.js";
|
|
3
3
|
import { Fragment as f, jsx as l, jsxs as y } from "react/jsx-runtime";
|
|
4
4
|
var T = (o) => typeof o == "string" && o !== "" ? o : g(o) && typeof o.screen == "string" && o.screen !== "" ? o.screen : void 0, C = ({ value: o, onChange: b, descriptor: t, context: n, disabled: h, id: c }) => {
|
|
5
5
|
const r = n.strings.editors, d = n.lookups.destinations, s = T(o), a = d.find((e) => e.id === s), i = s !== void 0 && a === void 0, m = t.valueType === "destination", p = d.map((e) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as h } from "./SearchableSelect-
|
|
1
|
+
import { t as h } from "./SearchableSelect-BGZmobXo.js";
|
|
2
2
|
import { Fragment as v, jsx as p, jsxs as g } from "react/jsx-runtime";
|
|
3
3
|
var L = ({ value: s, onChange: d, descriptor: i, context: l, disabled: u, problem: b, id: n }) => {
|
|
4
4
|
const o = l.strings.editors.select, c = i.editorOptions?.reference, m = c ? l.lookups.references(c.target) : [], r = typeof s == "string" && s !== "" ? s : void 0, t = m.map((e) => ({
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Fragment as R, useId as T, useMemo as U, useRef as V, useState as g } from "react";
|
|
2
|
-
import { jsx as l, jsxs as
|
|
2
|
+
import { jsx as l, jsxs as i } from "react/jsx-runtime";
|
|
3
3
|
function $(u, a) {
|
|
4
4
|
const r = a.trim().toLowerCase();
|
|
5
|
-
return u.filter((
|
|
5
|
+
return u.filter((c) => r === "" || c.label.toLowerCase().includes(r) || (c.group ?? "").toLowerCase().includes(r));
|
|
6
6
|
}
|
|
7
|
-
var H = ({ id: u, options: a, value: r, onChange:
|
|
8
|
-
const [K, N] = g(!1), d =
|
|
9
|
-
|
|
7
|
+
var H = ({ id: u, options: a, value: r, onChange: c, disabled: b, invalid: j, placeholder: O, searchLabel: v, emptyLabel: E, clearLabel: F, clearable: I, renderClosed: y, inline: o, ...w }) => {
|
|
8
|
+
const [K, N] = g(!1), d = o === !0 || K, [h, k] = g(""), [x, m] = g(0), D = T(), C = V(null), _ = a.find((e) => e.value === r), n = U(() => $(a, h), [a, h]), s = n.filter((e) => e.disabled !== !0), f = () => {
|
|
9
|
+
o !== !0 && N(!1), k("");
|
|
10
10
|
}, M = (e) => {
|
|
11
|
-
e.disabled || (
|
|
11
|
+
e.disabled || (c(e.value), f());
|
|
12
12
|
}, L = (e) => {
|
|
13
13
|
if (e.key === "Escape") {
|
|
14
|
-
|
|
14
|
+
if (o === !0) return;
|
|
15
|
+
e.stopPropagation(), f();
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
18
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -22,16 +23,16 @@ var H = ({ id: u, options: a, value: r, onChange: i, disabled: b, invalid: j, pl
|
|
|
22
23
|
const t = s[Math.min(x, s.length - 1)];
|
|
23
24
|
t && M(t);
|
|
24
25
|
}
|
|
25
|
-
},
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
}, p = n.some((e) => e.section !== void 0), S = (e) => p ? e.section ?? "" : e.group ?? "", q = [...new Set(n.map(S))].sort((e, t) => p ? 0 : e === "" ? -1 : t === "" ? 1 : 0), B = s[Math.min(x, Math.max(s.length - 1, 0))]?.value;
|
|
27
|
+
return /* @__PURE__ */ i("div", {
|
|
27
28
|
ref: C,
|
|
28
29
|
className: "studio-editor-select",
|
|
29
30
|
onKeyDown: d ? L : void 0,
|
|
30
31
|
onBlur: (e) => {
|
|
31
|
-
C.current?.contains(e.relatedTarget) ||
|
|
32
|
+
C.current?.contains(e.relatedTarget) || f();
|
|
32
33
|
},
|
|
33
34
|
children: [
|
|
34
|
-
|
|
35
|
+
o !== !0 && /* @__PURE__ */ l("button", {
|
|
35
36
|
type: "button",
|
|
36
37
|
id: u,
|
|
37
38
|
role: "combobox",
|
|
@@ -54,12 +55,12 @@ var H = ({ id: u, options: a, value: r, onChange: i, disabled: b, invalid: j, pl
|
|
|
54
55
|
type: "button",
|
|
55
56
|
className: "studio-editor-select__clear",
|
|
56
57
|
"aria-label": F,
|
|
57
|
-
onClick: () =>
|
|
58
|
+
onClick: () => c(void 0),
|
|
58
59
|
children: "×"
|
|
59
60
|
}),
|
|
60
|
-
d && /* @__PURE__ */
|
|
61
|
-
className: `studio-editor-select__panel${
|
|
62
|
-
children: [(
|
|
61
|
+
d && /* @__PURE__ */ i("div", {
|
|
62
|
+
className: `studio-editor-select__panel${o === !0 ? " studio-editor-select__panel--inline" : ""}`,
|
|
63
|
+
children: [(o !== !0 || a.length > 10) && /* @__PURE__ */ l("input", {
|
|
63
64
|
type: "search",
|
|
64
65
|
autoFocus: !0,
|
|
65
66
|
className: "studio-editor-select__search",
|
|
@@ -69,7 +70,7 @@ var H = ({ id: u, options: a, value: r, onChange: i, disabled: b, invalid: j, pl
|
|
|
69
70
|
onChange: (e) => {
|
|
70
71
|
k(e.target.value), m(0);
|
|
71
72
|
}
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ i("ul", {
|
|
73
74
|
id: D,
|
|
74
75
|
role: "listbox",
|
|
75
76
|
"aria-labelledby": w["aria-labelledby"],
|
|
@@ -77,18 +78,18 @@ var H = ({ id: u, options: a, value: r, onChange: i, disabled: b, invalid: j, pl
|
|
|
77
78
|
children: [n.length === 0 && /* @__PURE__ */ l("li", {
|
|
78
79
|
className: "studio-editor-select__empty",
|
|
79
80
|
children: E
|
|
80
|
-
}), q.map((e) => /* @__PURE__ */
|
|
81
|
+
}), q.map((e) => /* @__PURE__ */ i("li", {
|
|
81
82
|
role: "presentation",
|
|
82
83
|
children: [e !== "" && /* @__PURE__ */ l("div", {
|
|
83
84
|
className: "studio-editor-select__group",
|
|
84
85
|
children: e
|
|
85
86
|
}), /* @__PURE__ */ l("ul", {
|
|
86
87
|
role: "presentation",
|
|
87
|
-
children: n.filter((t) => S(t) === e).map((t, A, P) => /* @__PURE__ */
|
|
88
|
+
children: n.filter((t) => S(t) === e).map((t, A, P) => /* @__PURE__ */ i(R, { children: [p && t.group && (A === 0 || P[A - 1].group !== t.group) && /* @__PURE__ */ l("li", {
|
|
88
89
|
role: "presentation",
|
|
89
90
|
className: "studio-editor-select__subgroup",
|
|
90
91
|
children: t.group
|
|
91
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ i("li", {
|
|
92
93
|
role: "option",
|
|
93
94
|
"aria-selected": t.value === r,
|
|
94
95
|
"aria-disabled": t.disabled || void 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as h, t as n } from "./choiceKeys-DQcUX97p.js";
|
|
2
|
-
import { t as u } from "./SearchableSelect-
|
|
2
|
+
import { t as u } from "./SearchableSelect-BGZmobXo.js";
|
|
3
3
|
import { jsx as m } from "react/jsx-runtime";
|
|
4
4
|
var L = ({ value: o, onChange: i, descriptor: e, context: r, disabled: d, problem: b, id: s }) => {
|
|
5
5
|
const l = r.strings.editors.select, t = o ?? void 0, c = h(e.choices ?? [], t);
|