@cratis/event-models 0.174.0 → 0.176.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/screen-editor/BindingExpressionPropertyEditor-DbYpy_bX.js +426 -0
- package/dist/screen-editor/BooleanEditor-eC1yCpz0.js +17 -0
- package/dist/screen-editor/CollectionEditor-C7eX8Hw7.js +320 -0
- package/dist/screen-editor/ColorEditor-Cc6Xq8pW.js +49 -0
- package/dist/screen-editor/ColumnListEditor-Cku6GGLp.js +103 -0
- package/dist/screen-editor/EnumEditor-DNnnf9i3.js +26 -0
- package/dist/screen-editor/FieldEditor-SquvComm.js +66 -0
- package/dist/screen-editor/FieldListEditor-CNxskXPf.js +56 -0
- package/dist/screen-editor/IconEditor-C0ibqn-e.js +22 -0
- package/dist/screen-editor/InheritanceModeEditor-CtdsACnc.js +65 -0
- package/dist/screen-editor/ListEditor-CfFPVVJ4.js +53 -0
- package/dist/screen-editor/NavigationTargetEditor-DGnW5pVF.js +41 -0
- package/dist/screen-editor/NumberEditor-Cyo9_23Z.js +48 -0
- package/dist/screen-editor/QueryBindingEditor-3C_utVJm.js +17 -0
- package/dist/screen-editor/QueryBindingPropertyEditor-DLlC-slh.js +169 -0
- package/dist/screen-editor/ReferenceEditor-BnI2Qd7H.js +32 -0
- package/dist/screen-editor/ReferenceTargetEditors-COKAWO5q.js +19 -0
- package/dist/screen-editor/RenderingSlotEditor-Cani_PtT.js +128 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorHost.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Inspector/PropertiesPanel.d.ts +1 -3
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +2 -4
- package/dist/screen-editor/ScreenEditor/Properties/choiceKeys.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Properties/toPropertyGroups.d.ts +6 -7
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/BooleanEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/ColorEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/EnumEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/IconEditor.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/ListEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/NumberEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/ReferenceEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/SelectEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/TextEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Generic/draftProblem.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/PropertyEditorHost.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/PropertyEditorProps.d.ts +91 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/PropertyEditorRegistry.d.ts +24 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/PropertyEditorStrings.d.ts +73 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/SearchableSelect.d.ts +26 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/createEditorContext.d.ts +20 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/createPropertyEditorRegistry.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Registry/screenEditorPropertyEditors.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/BindingExpressionPropertyEditor.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/CollectionEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/ColumnListEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/FieldEditor.d.ts +23 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/FieldListEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/InheritanceModeEditor.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/NavigationTargetEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/OrderedItemsEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/QueryBindingPropertyEditor.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/ReferenceTargetEditors.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/RenderingSlotEditor.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/SliceEditor.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/StateChangeEditors.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/StructuredPropertyEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/SummaryEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/UndescribedEditor.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Specific/fieldKind.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/index.d.ts +0 -3
- package/dist/screen-editor/SearchableSelect-WUNlC3tk.js +109 -0
- package/dist/screen-editor/SelectEditor-BuQPlIyf.js +26 -0
- package/dist/screen-editor/SliceEditor-Dle8OlsB.js +45 -0
- package/dist/screen-editor/StateChangeEditors-9k3Gqtc0.js +15 -0
- package/dist/screen-editor/StructuredPropertyEditor-B3lVjrHZ.js +13 -0
- package/dist/screen-editor/StructuredValueEditor-CcwyOga0.js +337 -0
- package/dist/screen-editor/SummaryEditor-C5wP1uIH.js +23 -0
- package/dist/screen-editor/TextEditor-BEH-9K1S.js +40 -0
- package/dist/screen-editor/UndescribedEditor-Cqs6bHhD.js +10 -0
- package/dist/screen-editor/allowedIconChoices-DBgeRdGI.js +138 -0
- package/dist/screen-editor/choiceKeys-DQcUX97p.js +17 -0
- package/dist/screen-editor/defaultStructuredEditorStrings-Ch1I0Lci.js +137 -0
- package/dist/screen-editor/draftProblem-BGC5Gfsv.js +12 -0
- package/dist/screen-editor/iconDiagnostics-Ds4CnqD0.js +49 -0
- package/dist/screen-editor/index.js +2997 -4376
- package/dist/screen-editor/screen-editor.css +1 -1
- package/dist/screen-editor/structuredValue-vqCZttsk.js +61 -0
- package/package.json +12 -12
- package/dist/screen-editor/ScreenEditor/Inspector/IconProperties.d.ts +0 -14
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredProperties.d.ts +0 -9
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/UndescribedProperties.d.ts +0 -7
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/classifyStructures.d.ts +0 -6
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { BindingMode as p, BindingNullBehavior as c, BindingSourceKind as d, PropertyValueType as i } from "@cratis/scene.model";
|
|
2
|
+
import { elementNodeId as f, inspect as y, isCanvas as g, isExternalComponent as h, isPanel as $ } from "@cratis/scene.engine";
|
|
3
|
+
function u(e) {
|
|
4
|
+
return $(e) ? e.children : h(e) ? Object.values(e.slots).flat() : [];
|
|
5
|
+
}
|
|
6
|
+
function m(e) {
|
|
7
|
+
return e.flatMap((t) => [t.id, ...m(u(t))]);
|
|
8
|
+
}
|
|
9
|
+
function b(e, t) {
|
|
10
|
+
for (const n of e) {
|
|
11
|
+
if (n.id === t) return n;
|
|
12
|
+
const o = b(u(n), t);
|
|
13
|
+
if (o) return o;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function v(e, t) {
|
|
17
|
+
for (const n of e) {
|
|
18
|
+
if (u(n).some((s) => s.id === t)) return n;
|
|
19
|
+
const o = v(u(n), t);
|
|
20
|
+
if (o) return o;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function B(e, t) {
|
|
24
|
+
const n = v(e, t);
|
|
25
|
+
return n !== void 0 && g(n);
|
|
26
|
+
}
|
|
27
|
+
function M(e, t, n, o, s) {
|
|
28
|
+
const a = m(t).map((r) => C(e, r, n)).filter((r) => !!r && r.outputs.length > 0);
|
|
29
|
+
return {
|
|
30
|
+
dataContextPaths: Object.keys(o).sort((r, l) => r.localeCompare(l)),
|
|
31
|
+
queryResults: s.map((r) => ({
|
|
32
|
+
id: r.id,
|
|
33
|
+
name: r.name,
|
|
34
|
+
fields: r.resultFields.map((l) => l.name)
|
|
35
|
+
})),
|
|
36
|
+
componentOutputs: a
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function C(e, t, n) {
|
|
40
|
+
const o = y(e, f(t), n);
|
|
41
|
+
if (!o) return;
|
|
42
|
+
const s = o.properties.filter((a) => a.descriptor.output === !0).map((a) => ({
|
|
43
|
+
path: a.descriptor.path,
|
|
44
|
+
label: a.descriptor.label,
|
|
45
|
+
type: String(a.descriptor.valueType)
|
|
46
|
+
}));
|
|
47
|
+
return {
|
|
48
|
+
componentId: t,
|
|
49
|
+
label: o.label,
|
|
50
|
+
outputs: s
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
var E = [
|
|
54
|
+
d.DataContext,
|
|
55
|
+
d.QueryResult,
|
|
56
|
+
d.ComponentProperty,
|
|
57
|
+
d.Literal
|
|
58
|
+
], S = [p.OneWay, p.TwoWay], N = [
|
|
59
|
+
c.Propagate,
|
|
60
|
+
c.Clear,
|
|
61
|
+
c.Preserve
|
|
62
|
+
], O = [
|
|
63
|
+
i.String,
|
|
64
|
+
i.Number,
|
|
65
|
+
i.Boolean,
|
|
66
|
+
i.Enum,
|
|
67
|
+
i.Icon,
|
|
68
|
+
i.Destination,
|
|
69
|
+
i.QueryReference,
|
|
70
|
+
i.Collection,
|
|
71
|
+
i.Object,
|
|
72
|
+
i.Json
|
|
73
|
+
];
|
|
74
|
+
function T(e) {
|
|
75
|
+
const t = e;
|
|
76
|
+
return !!t && typeof t == "object" && typeof t.path == "string" && (t.kind === void 0 || E.includes(t.kind));
|
|
77
|
+
}
|
|
78
|
+
function D(e) {
|
|
79
|
+
return (e.descriptor.acceptedBindingKinds?.length ?? 0) > 0 || T(e.effectiveValue);
|
|
80
|
+
}
|
|
81
|
+
function P(e) {
|
|
82
|
+
return {
|
|
83
|
+
kind: e.descriptor.acceptedBindingKinds?.[0] ?? d.DataContext,
|
|
84
|
+
path: "",
|
|
85
|
+
mode: e.descriptor.bindingMode,
|
|
86
|
+
expectedValueType: e.descriptor.valueType
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
var R = {
|
|
90
|
+
unset: "Not set",
|
|
91
|
+
item: "Item",
|
|
92
|
+
itemTitle: (e, t) => `${e} ${t}`,
|
|
93
|
+
add: (e) => `Add ${e.toLowerCase()}`,
|
|
94
|
+
remove: (e, t) => `Remove ${e.toLowerCase()} ${t}`,
|
|
95
|
+
removeText: "Remove",
|
|
96
|
+
moveUp: (e, t) => `Move ${e.toLowerCase()} ${t} up`,
|
|
97
|
+
moveUpText: "Up",
|
|
98
|
+
moveDown: (e, t) => `Move ${e.toLowerCase()} ${t} down`,
|
|
99
|
+
moveDownText: "Down",
|
|
100
|
+
entry: (e) => `Entry ${e}`,
|
|
101
|
+
moveEntryUp: (e) => `Move entry ${e} up`,
|
|
102
|
+
moveEntryDown: (e) => `Move entry ${e} down`,
|
|
103
|
+
removeEntry: (e) => `Remove entry ${e}`,
|
|
104
|
+
addEntry: "Add entry",
|
|
105
|
+
useList: "Use a list",
|
|
106
|
+
useSingle: "Use one value",
|
|
107
|
+
scalarType: "Type",
|
|
108
|
+
scalarText: "Text",
|
|
109
|
+
scalarNumber: "Number",
|
|
110
|
+
scalarFlag: "Yes or no",
|
|
111
|
+
scalarFlagOn: "Yes",
|
|
112
|
+
mapName: (e) => `Name ${e}`,
|
|
113
|
+
mapValue: (e) => `Value of ${e}`,
|
|
114
|
+
addMapEntry: "Add value",
|
|
115
|
+
removeMapEntry: (e) => `Remove ${e}`,
|
|
116
|
+
keptValue: "A structured value, kept as it is.",
|
|
117
|
+
mismatch: (e, t) => `The saved value of '${e}' does not fit what it is described as: ${t}.`,
|
|
118
|
+
convert: "Give its items identifiers",
|
|
119
|
+
clear: "Clear the value",
|
|
120
|
+
noEditor: (e) => `'${e}' has no editor: nothing describes what it holds, so it cannot be edited here.`
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
P as a,
|
|
124
|
+
D as c,
|
|
125
|
+
m as d,
|
|
126
|
+
b as f,
|
|
127
|
+
N as i,
|
|
128
|
+
M as l,
|
|
129
|
+
v as m,
|
|
130
|
+
E as n,
|
|
131
|
+
O as o,
|
|
132
|
+
B as p,
|
|
133
|
+
S as r,
|
|
134
|
+
T as s,
|
|
135
|
+
R as t,
|
|
136
|
+
u
|
|
137
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DiagnosticCode as i, DiagnosticSeverity as u } from "@cratis/scene.model";
|
|
2
|
+
var p = /* @__PURE__ */ (function(t) {
|
|
3
|
+
return t.NoTarget = "noTarget", t.UnknownScreen = "unknownScreen", t.InvalidRoute = "invalidRoute", t.UnknownOutlet = "unknownOutlet", t.UnknownDialog = "unknownDialog", t.UnknownSlice = "unknownSlice", t.OutletKindWithoutOutlet = "outletKindWithoutOutlet", t.DialogKindWithoutDialog = "dialogKindWithoutDialog", t.ExternalKindWithoutRoute = "externalKindWithoutRoute", t;
|
|
4
|
+
})({});
|
|
5
|
+
function d(t, a) {
|
|
6
|
+
const o = t.runtime.bundles;
|
|
7
|
+
return {
|
|
8
|
+
screens: s(t.destinations.map((e) => e.id)),
|
|
9
|
+
outlets: s([
|
|
10
|
+
...o.flatMap((e) => (e.layouts ?? []).flatMap((n) => n.outlets ?? [])),
|
|
11
|
+
...o.flatMap((e) => (e.screenTemplates ?? []).flatMap((n) => n.outlets ?? [])),
|
|
12
|
+
...a.screenTemplates.flatMap((e) => e.outlets ?? [])
|
|
13
|
+
].map((e) => e.name)),
|
|
14
|
+
dialogTemplates: s([...o.flatMap((e) => e.dialogTemplates ?? []), ...a.dialogTemplates].map((e) => e.name)),
|
|
15
|
+
slices: s(t.stateChangeSlices.map((e) => e.id))
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function s(t) {
|
|
19
|
+
return [...new Set(t.filter((a) => a.length > 0))].sort((a, o) => a.localeCompare(o));
|
|
20
|
+
}
|
|
21
|
+
var r = /* @__PURE__ */ new Set([
|
|
22
|
+
i.MissingIconLibrary,
|
|
23
|
+
i.MissingIcon,
|
|
24
|
+
i.MissingIconVariant,
|
|
25
|
+
i.IncompatibleIconLibrary,
|
|
26
|
+
i.IconCatalogUnavailable,
|
|
27
|
+
i.IconNotVerified
|
|
28
|
+
]), l = (t) => r.has(t.code), c = (t) => t.code === i.IconNotVerified;
|
|
29
|
+
function f(t, a, o) {
|
|
30
|
+
const e = t.filter((n) => l(n) && !c(n) && n.path === a && n.itemId === o);
|
|
31
|
+
return (e.find((n) => n.severity === u.Error) ?? e[0])?.message;
|
|
32
|
+
}
|
|
33
|
+
var I = (t) => t.filter((a) => !l(a));
|
|
34
|
+
function m(t, a) {
|
|
35
|
+
const o = {};
|
|
36
|
+
for (const e of t) {
|
|
37
|
+
if (e.itemId === void 0) continue;
|
|
38
|
+
const n = f(t, a, e.itemId);
|
|
39
|
+
n && (o[e.itemId] = { icon: n });
|
|
40
|
+
}
|
|
41
|
+
return o;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
p as a,
|
|
45
|
+
s as i,
|
|
46
|
+
I as n,
|
|
47
|
+
d as r,
|
|
48
|
+
m as t
|
|
49
|
+
};
|