@cratis/event-models 0.347.0 → 0.348.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/References/EventNavigateButton.d.ts +1 -0
- package/dist/Rows/UserExperience/UiCell.d.ts +2 -1
- package/dist/event-models.css +1 -1
- package/dist/index.js +805 -791
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/DataBindingSections-BeQxUfQM.js +1919 -0
- package/dist/screen-editor/{QueryBindingPropertyEditor-BzDtdbGf.js → QueryBindingPropertyEditor-XQDHU9xb.js} +15 -15
- package/dist/screen-editor/ScreenEditor/DesignMode/DesignModeStrings.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/DesignMode/designModeFeedback.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/DesignMode/useDesignMode.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorHost.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/openSubject.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/useEditingScene.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ViewportControls.d.ts +2 -1
- package/dist/screen-editor/ScreenEditor/Play/PlayScreen.d.ts +2 -1
- package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +4 -2
- package/dist/screen-editor/ScreenEditor/ShellFrame/shellVisibility.d.ts +3 -2
- package/dist/screen-editor/ScreenEditor/ShellFrame/useShellFrame.d.ts +3 -1
- package/dist/screen-editor/ScreenEditor/Surface/dialogFrameAttributes.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Templates/dialogActionsChrome.d.ts +3 -3
- package/dist/screen-editor/ScreenEditor/Templates/dialogPresentation.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Templates/displayedFits.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/ScreenThumbnail.d.ts +2 -1
- package/dist/screen-editor/index.js +3701 -3626
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +3 -3
- package/dist/screen-editor/DataBindingSections-DLo6sV-E.js +0 -1862
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
1
|
+
import { R as N, c as E, d as B, f as F, h as I, l as L, m as j, t as M, u as Q, z as R } from "./DataBindingSections-BeQxUfQM.js";
|
|
2
|
+
import { useState as k } from "react";
|
|
3
3
|
import { Fragment as S, jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
4
4
|
import { validateBinding as D } from "@cratis/scene.engine";
|
|
5
5
|
var c = /* @__PURE__ */ (function(r) {
|
|
@@ -15,8 +15,8 @@ function b(r, i, u, l) {
|
|
|
15
15
|
isStorable: s.every((m) => m.severity !== "error")
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
var V = (r) => r.origin.map((i) => i.name).join(" / "),
|
|
19
|
-
const t = l.properties.query, [g, y] =
|
|
18
|
+
var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, candidates: i, scope: u, strings: l, disabled: s, onChange: m }) => {
|
|
19
|
+
const t = l.properties.query, [g, y] = k(), 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;
|
|
@@ -37,7 +37,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), T = ({ 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 ? E(a) : void 0);
|
|
41
41
|
},
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ o("option", {
|
|
@@ -66,8 +66,8 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), T = ({ 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: j(n, e),
|
|
70
|
+
onChange: (a) => v(F(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(" / "), T = ({ 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: L(n, e),
|
|
86
|
+
onChange: (a) => v(a.target.checked ? B(n, e.name) : I(n, e.name))
|
|
87
87
|
}), /* @__PURE__ */ o("span", { children: t.showColumn(e.name) })]
|
|
88
88
|
}, e.name))]
|
|
89
89
|
})] }),
|
|
@@ -91,16 +91,16 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), T = ({ property: r, cand
|
|
|
91
91
|
className: "studio-editor-query__preview",
|
|
92
92
|
role: "status",
|
|
93
93
|
"data-state": q,
|
|
94
|
-
children:
|
|
94
|
+
children: T(q, t.preview)
|
|
95
95
|
}),
|
|
96
|
-
/* @__PURE__ */ o(
|
|
96
|
+
/* @__PURE__ */ o(N, {
|
|
97
97
|
diagnostics: _,
|
|
98
98
|
label: l.properties.diagnostics
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function T(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(z, {
|
|
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(M, {
|
|
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 : R({
|
|
139
139
|
...s.bindingScope.types,
|
|
140
140
|
[h]: y.type
|
|
141
141
|
});
|
|
@@ -76,6 +76,7 @@ export interface DesignModeStrings {
|
|
|
76
76
|
duplicated: (label: string) => string;
|
|
77
77
|
removed: (label: string) => string;
|
|
78
78
|
refused: (reason: string) => string;
|
|
79
|
+
nothingToAdd: string;
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
export declare const defaultDesignModeStrings: DesignModeStrings;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DesignModeFeedback {
|
|
2
|
+
announcement: string;
|
|
3
|
+
notice: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const refusedFeedback: (message: string) => DesignModeFeedback;
|
|
6
|
+
export interface AddOffer {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const addOfferOf: (label: string, readOnlyReason: string | undefined) => AddOffer;
|
|
@@ -21,6 +21,8 @@ export type ElementMeasurer = (elementId: string) => {
|
|
|
21
21
|
height: number;
|
|
22
22
|
} | undefined;
|
|
23
23
|
export interface ScreenEditorController {
|
|
24
|
+
opensOverPage: boolean;
|
|
25
|
+
readOnlyReason?: string;
|
|
24
26
|
navigation: NavigationModel;
|
|
25
27
|
structure: ApplicationStructure;
|
|
26
28
|
navigationModule: string | undefined;
|
|
@@ -2,7 +2,7 @@ import type { SceneElement } from '@cratis/scene.model';
|
|
|
2
2
|
import type { EditingContext } from '@cratis/scene.engine';
|
|
3
3
|
import type { ScreenEditSession } from '../Session/EditSession';
|
|
4
4
|
import type { ScreenEditorEnvironment } from './ScreenEditorHost';
|
|
5
|
-
export declare const useEditingScene: (document: ScreenEditSession['document'], authoringTemplate: string | undefined, environment: ScreenEditorEnvironment) => {
|
|
5
|
+
export declare const useEditingScene: (document: ScreenEditSession['document'], authoringTemplate: string | undefined, environment: ScreenEditorEnvironment, opensOverPage?: boolean) => {
|
|
6
6
|
context: EditingContext;
|
|
7
7
|
composition: import("../Templates/composeEditorScreen").EditorComposition;
|
|
8
8
|
ownershipOf: import("../Structure/OwnershipResolver").OwnershipResolver;
|
|
@@ -24,6 +24,8 @@ export interface ScreenEditorStrings {
|
|
|
24
24
|
showApplicationShell: string;
|
|
25
25
|
hideApplicationShell: string;
|
|
26
26
|
showTemplate: string;
|
|
27
|
+
opensAsDialog: string;
|
|
28
|
+
opensAsDrawer: string;
|
|
27
29
|
hideTemplate: string;
|
|
28
30
|
shellPeeking: (name: string) => string;
|
|
29
31
|
shellPeekBack: string;
|
|
@@ -8,10 +8,11 @@ export interface ViewportControlsProps {
|
|
|
8
8
|
shown: boolean;
|
|
9
9
|
toggle: () => void;
|
|
10
10
|
};
|
|
11
|
+
opensAs?: string;
|
|
11
12
|
template?: {
|
|
12
13
|
shown: boolean;
|
|
13
14
|
toggle: () => void;
|
|
14
15
|
};
|
|
15
16
|
onResize: (size: ViewportSize) => void;
|
|
16
17
|
}
|
|
17
|
-
export declare const ViewportControls: ({ windowSize, available, strings, shell, template, onResize }: ViewportControlsProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const ViewportControls: ({ windowSize, available, strings, shell, opensAs, template, onResize }: ViewportControlsProps) => import("react").JSX.Element;
|
|
@@ -7,5 +7,6 @@ export interface PlayScreenViewProps {
|
|
|
7
7
|
runtime: ScreenEditorRuntime;
|
|
8
8
|
resolveBinding: BindingResolver;
|
|
9
9
|
registry?: ComponentRegistry;
|
|
10
|
+
opensOverPage?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const PlayScreenView: ({ document, runtime, resolveBinding, registry }: PlayScreenViewProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const PlayScreenView: ({ document, runtime, resolveBinding, registry, opensOverPage }: PlayScreenViewProps) => import("react").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { EffectiveConfiguration, SceneDocument, SceneElement } from '@cratis/scene.model';
|
|
1
|
+
import type { DialogTemplate, EffectiveConfiguration, SceneDocument, SceneElement } from '@cratis/scene.model';
|
|
2
2
|
import { type DescriptorCatalog } from '@cratis/scene.engine';
|
|
3
|
+
import { type DialogFrameDescription } from '../Templates/dialogPresentation';
|
|
3
4
|
export interface PlayScreen {
|
|
4
5
|
element: SceneElement;
|
|
5
6
|
configuration?: EffectiveConfiguration;
|
|
7
|
+
dialog?: DialogFrameDescription;
|
|
6
8
|
}
|
|
7
|
-
export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog): PlayScreen;
|
|
9
|
+
export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean): PlayScreen;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { SceneDocument } from '@cratis/scene.model';
|
|
1
|
+
import type { DialogTemplate, SceneDocument } from '@cratis/scene.model';
|
|
2
2
|
export declare enum ShellSubject {
|
|
3
3
|
Screen = "screen",
|
|
4
|
+
DialogScreen = "dialogScreen",
|
|
4
5
|
ScreenTemplate = "screenTemplate",
|
|
5
6
|
DialogTemplate = "dialogTemplate",
|
|
6
7
|
TheShell = "theShell"
|
|
7
8
|
}
|
|
8
|
-
export declare function shellSubjectOf(document: SceneDocument, authoringTemplate: string | undefined, shellName: string): ShellSubject;
|
|
9
|
+
export declare function shellSubjectOf(document: SceneDocument, authoringTemplate: string | undefined, shellName: string, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean): ShellSubject;
|
|
9
10
|
export declare const shellShownByDefault: (subject: ShellSubject) => boolean;
|
|
10
11
|
export declare const templateShownByDefault: (_subject: ShellSubject) => boolean;
|
|
11
12
|
export declare const templateCanFrame: (subject: ShellSubject) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DestinationReference, SceneDocument } from '@cratis/scene.model';
|
|
2
|
+
import { type DialogFrameDescription } from '../Templates/dialogPresentation';
|
|
2
3
|
import type { ScreenEditorRuntime } from '../Runtime/screenEditorRuntime';
|
|
3
4
|
import { type ShellFrame } from './frameInShell';
|
|
4
5
|
import { type ShellPreference } from './shellVisibility';
|
|
@@ -11,10 +12,11 @@ export interface ShellState {
|
|
|
11
12
|
shown: boolean;
|
|
12
13
|
toggle(): void;
|
|
13
14
|
};
|
|
15
|
+
dialog?: DialogFrameDescription;
|
|
14
16
|
frame?: ShellFrame;
|
|
15
17
|
peeking?: DestinationReference;
|
|
16
18
|
peekingName: string;
|
|
17
19
|
navigate(destination: DestinationReference): void;
|
|
18
20
|
back(): void;
|
|
19
21
|
}
|
|
20
|
-
export declare function useShellFrame(document: SceneDocument, runtime: ScreenEditorRuntime, authoringTemplate: string | undefined, preference?: ShellPreference, hasTemplate?: boolean): ShellState;
|
|
22
|
+
export declare function useShellFrame(document: SceneDocument, runtime: ScreenEditorRuntime, authoringTemplate: string | undefined, preference?: ShellPreference, hasTemplate?: boolean, opensOverPage?: boolean): ShellState;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { DialogFrameDescription } from '../Templates/dialogPresentation';
|
|
3
|
+
export declare function dialogFrameAttributes(frame: DialogFrameDescription | undefined): {
|
|
4
|
+
'data-studio-dialog'?: string;
|
|
5
|
+
style: CSSProperties;
|
|
6
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type DialogTemplate, type Layout, type Outlet, type SceneDocument, type SceneElement, type ScreenTemplate } from '@cratis/scene.model';
|
|
2
2
|
export declare const dialogActionsChromeId = "dialog-actions-chrome";
|
|
3
3
|
export declare const defaultDialogTemplateName = "FormDialog";
|
|
4
|
-
export declare function screenFitsDialog(document: SceneDocument): boolean;
|
|
5
|
-
export declare function dialogTemplateOf(document: SceneDocument): DialogTemplate;
|
|
4
|
+
export declare function screenFitsDialog(document: SceneDocument, pageTemplateNames?: readonly string[], opensOverPage?: boolean, known?: readonly DialogTemplate[]): boolean;
|
|
5
|
+
export declare function dialogTemplateOf(document: SceneDocument, known?: readonly DialogTemplate[]): DialogTemplate;
|
|
6
6
|
export declare function dialogActionsOutletOf(template: DialogTemplate): Outlet | undefined;
|
|
7
|
-
export declare function showsDialogActions(document: SceneDocument, templates?: readonly ScreenTemplate[], layouts?: readonly Layout[]): boolean;
|
|
7
|
+
export declare function showsDialogActions(document: SceneDocument, templates?: readonly ScreenTemplate[], layouts?: readonly Layout[], opensOverPage?: boolean, known?: readonly DialogTemplate[]): boolean;
|
|
8
8
|
export declare function documentWithChrome(document: SceneDocument, chrome: readonly SceneElement[]): SceneDocument;
|
|
9
9
|
export declare function dialogActionsChrome(): SceneElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DialogTemplate, type SceneDocument, type Screen } from '@cratis/scene.model';
|
|
2
|
+
export declare enum DialogPresentation {
|
|
3
|
+
Dialog = "dialog",
|
|
4
|
+
Drawer = "drawer"
|
|
5
|
+
}
|
|
6
|
+
export interface DialogFrameDescription {
|
|
7
|
+
presentation: DialogPresentation;
|
|
8
|
+
template?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function dialogTemplatesIn(document: Pick<SceneDocument, 'dialogTemplates'>, known?: readonly DialogTemplate[]): DialogTemplate[];
|
|
12
|
+
export declare function screenPresentationOf(screen: Pick<Screen, 'fits' | 'screenTemplate'>, pageTemplateNames?: readonly string[], opensOverPage?: boolean, dialogTemplateNames?: readonly string[]): DialogPresentation | undefined;
|
|
13
|
+
export declare function dialogFrameOf(document: SceneDocument, known?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean): DialogFrameDescription | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScreenFit, type DialogTemplate, type SceneDocument, type Screen } from '@cratis/scene.model';
|
|
2
|
+
import type { ScenePackageBundle } from '@cratis/scene.react';
|
|
3
|
+
export declare function displayedFitsOf(screen: Pick<Screen, 'fits' | 'screenTemplate'> | undefined, pageTemplateNames?: readonly string[], opensOverPage?: boolean, dialogTemplateNames?: readonly string[]): readonly ScreenFit[];
|
|
4
|
+
export declare function dialogTemplateNamesOf(document: Pick<SceneDocument, 'dialogTemplates' | 'screenTemplates'> | undefined, known?: readonly Pick<DialogTemplate, 'name'>[]): string[];
|
|
5
|
+
export declare function pageTemplateNamesOf(document: Pick<SceneDocument, 'screenTemplates'> | undefined, bundles?: readonly Pick<ScenePackageBundle, 'screenTemplates'>[]): string[];
|
|
6
|
+
export declare function blueprintDialogTemplatesOf(bundles?: readonly Pick<ScenePackageBundle, 'dialogTemplates'>[]): DialogTemplate[];
|
|
@@ -11,5 +11,6 @@ export interface ScreenThumbnailProps {
|
|
|
11
11
|
openTitle?: string;
|
|
12
12
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
13
13
|
placeholder?: ReactNode;
|
|
14
|
+
opensOverPage?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare const ScreenThumbnail: ({ document, runtime, windowSize, width, title, openTitle, onClick, placeholder }: ScreenThumbnailProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const ScreenThumbnail: ({ document, runtime, windowSize, width, title, openTitle, onClick, placeholder, opensOverPage }: ScreenThumbnailProps) => import("react").JSX.Element;
|