@cratis/event-models 0.349.1 → 0.350.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/Board/BoardOverlay.d.ts +3 -1
- package/dist/Board/BoardToolbarFrame.d.ts +3 -1
- package/dist/Board/BoardToolbarPlacement.d.ts +1 -0
- package/dist/Board/EventModelBoard.d.ts +4 -1
- package/dist/Board/EventModelBoardHandle.d.ts +1 -0
- package/dist/Board/findFreePosition.d.ts +13 -0
- package/dist/Board/index.d.ts +2 -0
- package/dist/Collections/useCollectionsArea.d.ts +1 -1
- package/dist/Naming/defaultNames.d.ts +5 -0
- package/dist/Naming/index.d.ts +1 -0
- package/dist/event-models.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3509 -3433
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/{DataBindingSections-BeQxUfQM.js → DataBindingSections-DAYezlvg.js} +39 -37
- package/dist/screen-editor/{QueryBindingPropertyEditor-XQDHU9xb.js → QueryBindingPropertyEditor-8eD_hPn0.js} +19 -19
- package/dist/screen-editor/ScreenEditor/DesignMode/Outlets/createOutletDesign.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/DesignMode/Outlets/screenOutlets.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +4 -3
- package/dist/screen-editor/ScreenEditor/Templates/nativeStandIns.d.ts +2 -1
- package/dist/screen-editor/index.js +2330 -2298
- package/package.json +3 -3
- /package/dist/screen-editor/ScreenEditor/{DesignMode/Outlets → Outlets}/outletDocument.d.ts +0 -0
- /package/dist/screen-editor/ScreenEditor/{DesignMode/Outlets → Outlets}/screenOutletChain.d.ts +0 -0
package/dist/screen-editor/{DataBindingSections-BeQxUfQM.js → DataBindingSections-DAYezlvg.js}
RENAMED
|
@@ -1862,58 +1862,60 @@ var Sr = (e, t) => ({
|
|
|
1862
1862
|
});
|
|
1863
1863
|
};
|
|
1864
1864
|
export {
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1865
|
+
E as $,
|
|
1866
|
+
ur as A,
|
|
1867
|
+
dr as B,
|
|
1868
|
+
sn as C,
|
|
1869
|
+
Xt as D,
|
|
1870
|
+
ke as E,
|
|
1871
|
+
qt as F,
|
|
1872
|
+
ar as G,
|
|
1873
|
+
he as H,
|
|
1874
|
+
le as I,
|
|
1875
|
+
or as J,
|
|
1876
|
+
fe as K,
|
|
1877
|
+
_e as L,
|
|
1878
|
+
Y as M,
|
|
1879
|
+
Pt as N,
|
|
1880
|
+
Jt as O,
|
|
1881
|
+
qe as P,
|
|
1882
|
+
ir as Q,
|
|
1883
|
+
c as R,
|
|
1884
|
+
pr as S,
|
|
1885
|
+
mr as T,
|
|
1886
|
+
xt as U,
|
|
1887
|
+
lr as V,
|
|
1888
|
+
Rt as W,
|
|
1889
|
+
rr as X,
|
|
1890
|
+
H as Y,
|
|
1891
|
+
sr as Z,
|
|
1892
1892
|
Sn as _,
|
|
1893
1893
|
zn as a,
|
|
1894
|
-
|
|
1894
|
+
fr as b,
|
|
1895
1895
|
hr as c,
|
|
1896
1896
|
gr as d,
|
|
1897
|
-
|
|
1897
|
+
nr as et,
|
|
1898
1898
|
Mn as f,
|
|
1899
1899
|
En as g,
|
|
1900
1900
|
br as h,
|
|
1901
1901
|
ue as i,
|
|
1902
|
-
|
|
1903
|
-
|
|
1902
|
+
cr as j,
|
|
1903
|
+
Yt as k,
|
|
1904
1904
|
yr as l,
|
|
1905
1905
|
Rn as m,
|
|
1906
1906
|
Tr as n,
|
|
1907
|
+
tr as nt,
|
|
1907
1908
|
Wn as o,
|
|
1908
1909
|
vr as p,
|
|
1909
|
-
|
|
1910
|
+
Ft as q,
|
|
1910
1911
|
Sr as r,
|
|
1911
1912
|
Or as s,
|
|
1912
1913
|
wr as t,
|
|
1914
|
+
pe as tt,
|
|
1913
1915
|
xn as u,
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1916
|
+
bn as v,
|
|
1917
|
+
Ie as w,
|
|
1918
|
+
rn as x,
|
|
1919
|
+
on as y,
|
|
1920
|
+
Dt as z
|
|
1919
1921
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
1
|
+
import { B as N, V as E, c as B, d as F, f as I, h as L, l as j, m as M, t as k, u as Q } from "./DataBindingSections-DAYezlvg.js";
|
|
2
|
+
import { useState as R } from "react";
|
|
3
3
|
import { Fragment as S, jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
4
|
-
import { validateBinding as
|
|
4
|
+
import { validateBinding as V } from "@cratis/scene.engine";
|
|
5
5
|
var c = /* @__PURE__ */ (function(r) {
|
|
6
6
|
return r.NoQuery = "noQuery", r.MissingQuery = "missingQuery", r.Loading = "loading", r.Empty = "empty", r.Error = "error", r.Ready = "ready", r;
|
|
7
7
|
})({});
|
|
8
|
-
function
|
|
8
|
+
function D({ binding: r, candidate: i, isLoading: u, error: l, rowCount: s }) {
|
|
9
9
|
return r ? i ? l != null ? c.Error : u ? c.Loading : s === 0 ? c.Empty : c.Ready : c.MissingQuery : c.NoQuery;
|
|
10
10
|
}
|
|
11
11
|
function b(r, i, u, l) {
|
|
12
|
-
const s =
|
|
12
|
+
const s = V(r, i, u, l);
|
|
13
13
|
return {
|
|
14
14
|
diagnostics: s,
|
|
15
15
|
isStorable: s.every((m) => m.severity !== "error")
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
const t = l.properties.query, [g, y] =
|
|
18
|
+
var O = (r) => r.origin.map((i) => i.name).join(" / "), T = ({ property: r, candidates: i, scope: u, strings: l, disabled: s, onChange: m }) => {
|
|
19
|
+
const t = l.properties.query, [g, y] = R(), h = Q(r.effectiveValue) ? r.effectiveValue : void 0, n = g ?? h, p = n ? i.find((e) => e.id === n.queryId) : void 0, _ = n ? b(r.descriptor, p, n, u).diagnostics : [], v = (e) => {
|
|
20
20
|
if (!e) {
|
|
21
21
|
y(void 0), m(void 0);
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
const a = b(r.descriptor, i.find((f) => f.id === e.queryId), e, u);
|
|
25
25
|
y(a.isStorable ? void 0 : e), a.isStorable && m(e);
|
|
26
|
-
}, q =
|
|
26
|
+
}, q = D({
|
|
27
27
|
binding: n,
|
|
28
28
|
candidate: p,
|
|
29
29
|
isLoading: !1
|
|
@@ -37,7 +37,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
37
37
|
value: n?.queryId ?? "",
|
|
38
38
|
onChange: (e) => {
|
|
39
39
|
const a = i.find((f) => f.id === e.target.value);
|
|
40
|
-
v(a ?
|
|
40
|
+
v(a ? B(a) : void 0);
|
|
41
41
|
},
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ o("option", {
|
|
@@ -53,7 +53,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
53
53
|
children: [
|
|
54
54
|
e.name,
|
|
55
55
|
" - ",
|
|
56
|
-
|
|
56
|
+
O(e)
|
|
57
57
|
]
|
|
58
58
|
}, e.id))
|
|
59
59
|
]
|
|
@@ -66,8 +66,8 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
66
66
|
n && p && /* @__PURE__ */ d(S, { children: [p.parameters.length > 0 && /* @__PURE__ */ d("div", {
|
|
67
67
|
className: "studio-editor-query__group",
|
|
68
68
|
children: [/* @__PURE__ */ o("strong", { children: t.parameters }), p.parameters.map((e) => /* @__PURE__ */ d("label", { children: [/* @__PURE__ */ d("span", { children: [t.sourceFor(e.name), e.required ? " *" : ""] }), /* @__PURE__ */ d("select", {
|
|
69
|
-
value:
|
|
70
|
-
onChange: (a) => v(
|
|
69
|
+
value: M(n, e),
|
|
70
|
+
onChange: (a) => v(I(n, e.name, a.target.value)),
|
|
71
71
|
children: [/* @__PURE__ */ o("option", {
|
|
72
72
|
value: "",
|
|
73
73
|
children: t.noSource
|
|
@@ -82,8 +82,8 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
82
82
|
className: "studio-editor-query__column",
|
|
83
83
|
children: [/* @__PURE__ */ o("input", {
|
|
84
84
|
type: "checkbox",
|
|
85
|
-
checked:
|
|
86
|
-
onChange: (a) => v(a.target.checked ?
|
|
85
|
+
checked: j(n, e),
|
|
86
|
+
onChange: (a) => v(a.target.checked ? F(n, e.name) : L(n, e.name))
|
|
87
87
|
}), /* @__PURE__ */ o("span", { children: t.showColumn(e.name) })]
|
|
88
88
|
}, e.name))]
|
|
89
89
|
})] }),
|
|
@@ -91,7 +91,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
91
91
|
className: "studio-editor-query__preview",
|
|
92
92
|
role: "status",
|
|
93
93
|
"data-state": q,
|
|
94
|
-
children:
|
|
94
|
+
children: $(q, t.preview)
|
|
95
95
|
}),
|
|
96
96
|
/* @__PURE__ */ o(N, {
|
|
97
97
|
diagnostics: _,
|
|
@@ -100,7 +100,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
|
|
|
100
100
|
]
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function $(r, i) {
|
|
104
104
|
switch (r) {
|
|
105
105
|
case c.NoQuery:
|
|
106
106
|
return i.noQuery;
|
|
@@ -120,14 +120,14 @@ var J = ({ value: r, onChange: i, context: u, disabled: l }) => {
|
|
|
120
120
|
const { session: s } = u;
|
|
121
121
|
if (!s) return null;
|
|
122
122
|
const m = Q(r) ? r : void 0, t = m ? u.lookups.queryCandidates.find((g) => g.id === m.queryId) : void 0;
|
|
123
|
-
return /* @__PURE__ */ d(S, { children: [/* @__PURE__ */ o(
|
|
123
|
+
return /* @__PURE__ */ d(S, { children: [/* @__PURE__ */ o(T, {
|
|
124
124
|
property: s.property,
|
|
125
125
|
candidates: u.lookups.queryCandidates,
|
|
126
126
|
scope: s.bindingScope,
|
|
127
127
|
strings: s.screenStrings,
|
|
128
128
|
disabled: l === !0,
|
|
129
129
|
onChange: i
|
|
130
|
-
}), m && t && /* @__PURE__ */ o(
|
|
130
|
+
}), m && t && /* @__PURE__ */ o(k, {
|
|
131
131
|
controller: s.controller,
|
|
132
132
|
environment: s.environment,
|
|
133
133
|
strings: s.screenStrings,
|
|
@@ -135,7 +135,7 @@ var J = ({ value: r, onChange: i, context: u, disabled: l }) => {
|
|
|
135
135
|
candidate: t,
|
|
136
136
|
disabled: l === !0,
|
|
137
137
|
onChange: (g, y, h) => {
|
|
138
|
-
const n = h === "" ? s.bindingScope :
|
|
138
|
+
const n = h === "" ? s.bindingScope : E({
|
|
139
139
|
...s.bindingScope.types,
|
|
140
140
|
[h]: y.type
|
|
141
141
|
});
|
|
@@ -2,7 +2,7 @@ import { OutletKind, type ComponentDesignModeDescriptor, type OutletItem, type O
|
|
|
2
2
|
import { type EffectiveOutlet, type OutletChain } from '@cratis/scene.engine';
|
|
3
3
|
import { type DesignModeItem, type DesignModeItemSource, type DesignModePlan, type DesignModeRejection } from '../designModeTypes';
|
|
4
4
|
import { type OutletBindingContext } from './outletBindings';
|
|
5
|
-
import { type OutletEditingLevel } from '
|
|
5
|
+
import { type OutletEditingLevel } from '../../Outlets/outletDocument';
|
|
6
6
|
import type { OutletStrings } from './OutletStrings';
|
|
7
7
|
export type OutletLevelMode = 'inherit' | 'extend' | 'override';
|
|
8
8
|
export interface OutletDesignInputs {
|
|
@@ -5,7 +5,7 @@ import type { ScreenEditorEnvironment } from '../../Host/ScreenEditorHost';
|
|
|
5
5
|
import type { StateChangeSlice } from '../../Actions/StateChangeSlice';
|
|
6
6
|
import { type OutletDesign } from './createOutletDesign';
|
|
7
7
|
import type { OutletBindingContext } from './outletBindings';
|
|
8
|
-
import { type OutletEditingLevel } from '
|
|
8
|
+
import { type OutletEditingLevel } from '../../Outlets/outletDocument';
|
|
9
9
|
import type { OutletStrings } from './OutletStrings';
|
|
10
10
|
export interface ScreenOutlets {
|
|
11
11
|
outlets: OutletChain;
|
|
@@ -12,7 +12,7 @@ import type { StructureTreeAdapter } from '../Structure/StructureTreeAdapter';
|
|
|
12
12
|
import type { EditorComposition } from '../Templates/composeEditorScreen';
|
|
13
13
|
import type { DropRegion } from '../DropRegions/DropRegion';
|
|
14
14
|
import type { LayoutItem } from '../Layouts/LayoutItem';
|
|
15
|
-
import type { OutletEditingLevel } from '../
|
|
15
|
+
import type { OutletEditingLevel } from '../Outlets/outletDocument';
|
|
16
16
|
import type { ScreenEditorButtonToAdd } from './ScreenEditorHost';
|
|
17
17
|
export type ElementMeasurer = (elementId: string) => {
|
|
18
18
|
left: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { DialogTemplate, EffectiveConfiguration, SceneDocument, SceneElement } from '@cratis/scene.model';
|
|
2
|
-
import { type DescriptorCatalog } from '@cratis/scene.engine';
|
|
1
|
+
import type { DialogTemplate, EffectiveConfiguration, Layout, SceneDocument, SceneElement, ScreenTemplate } from '@cratis/scene.model';
|
|
2
|
+
import { type DescriptorCatalog, type OutletChain } from '@cratis/scene.engine';
|
|
3
3
|
import { type DialogFrameDescription } from '../Templates/dialogPresentation';
|
|
4
4
|
export interface PlayScreen {
|
|
5
5
|
element: SceneElement;
|
|
6
6
|
configuration?: EffectiveConfiguration;
|
|
7
7
|
dialog?: DialogFrameDescription;
|
|
8
|
+
outlets?: OutletChain;
|
|
8
9
|
}
|
|
9
|
-
export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean): PlayScreen;
|
|
10
|
+
export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean, screenTemplates?: readonly ScreenTemplate[], layouts?: readonly Layout[]): PlayScreen;
|
|
@@ -24,6 +24,7 @@ export interface FormStandInSource {
|
|
|
24
24
|
*
|
|
25
25
|
* @param forms The `forms` of the screen.
|
|
26
26
|
* @param placed The commands a form element already placed on the canvas stands for, which are not drawn twice.
|
|
27
|
+
* @param sentByTheDialog Whether the screen is a dialog whose button row sends the command, so the form draws no button of its own.
|
|
27
28
|
* @returns A read-only form for each command that is not placed.
|
|
28
29
|
*/
|
|
29
|
-
export declare function formStandIns(forms: readonly FormStandInSource[] | undefined, placed?: ReadonlySet<string
|
|
30
|
+
export declare function formStandIns(forms: readonly FormStandInSource[] | undefined, placed?: ReadonlySet<string>, sentByTheDialog?: boolean): SceneElement[];
|