@cratis/event-models 0.136.3 → 0.136.5
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/ScreenEditor/Forms/commandFormLayout.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +3 -1
- package/dist/screen-editor/ScreenEditor/Inspector/DialogTemplateAuthoringSection.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Inspector/DialogTemplateListEditor.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Inspector/FormLayoutEditor.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +26 -0
- package/dist/screen-editor/index.js +2933 -2533
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +20 -20
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormWidthUnit, type CommandFormLayout, type Form, type FormField, type FormFieldPlacement, type FormWidth } from '@cratis/scene.model';
|
|
2
|
+
export declare const defaultFormWidth: (value?: number, unit?: FormWidthUnit) => FormWidth;
|
|
3
|
+
export declare function defaultFormLayout(fields: readonly FormField[]): CommandFormLayout;
|
|
4
|
+
export declare function formWithLayout(form: Form): Form;
|
|
5
|
+
export declare function updateFieldPlacement(form: Form, fieldName: string, update: (placement: FormFieldPlacement) => FormFieldPlacement): Form;
|
|
6
|
+
export declare function updateColumnWidth(form: Form, index: number, width: FormWidth): Form;
|
|
7
|
+
export declare function updateGap(form: Form, gap: 'columnGap' | 'rowGap', width: FormWidth): Form;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CanvasPlacement } from '../Document/placeOnCanvas';
|
|
2
|
-
import type { Form, NodeInspection, Outlet, SceneDiagnostic, SceneDocument, SceneEdit, SceneElement } from '@cratis/scene.model';
|
|
2
|
+
import type { DestinationReference, DialogTemplate, Form, NodeInspection, Outlet, SceneDiagnostic, SceneDocument, SceneEdit, SceneElement } from '@cratis/scene.model';
|
|
3
3
|
import type { EditingContext } from '@cratis/scene.engine';
|
|
4
4
|
import type { Ownership } from '../Structure/Ownership';
|
|
5
5
|
import type { StructureEdit } from '../Structure/StructureEdit';
|
|
@@ -45,6 +45,8 @@ export interface ScreenEditorController {
|
|
|
45
45
|
setProperty: (property: NodeInspection['properties'][number], value: unknown) => void;
|
|
46
46
|
setScreenForms: (forms: Form[], label: string) => void;
|
|
47
47
|
setScreenTemplateOutlets: (templateName: string, outlets: Outlet[], label: string) => void;
|
|
48
|
+
setDialogTemplates: (templates: DialogTemplate[], label: string) => void;
|
|
49
|
+
setCollectionItemDestination: (componentId: string, path: string, itemId: string, destination: DestinationReference | undefined, label: string) => void;
|
|
48
50
|
undo: () => void;
|
|
49
51
|
redo: () => void;
|
|
50
52
|
canUndo: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ScreenEditorController } from '../Host/ScreenEditorController';
|
|
2
|
+
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
3
|
+
export interface DialogTemplateAuthoringSectionProps {
|
|
4
|
+
controller: ScreenEditorController;
|
|
5
|
+
strings: ScreenEditorStrings;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const DialogTemplateAuthoringSection: ({ controller, strings, disabled }: DialogTemplateAuthoringSectionProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DialogTemplate } from '@cratis/scene.model';
|
|
2
|
+
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
3
|
+
export interface DialogTemplateListEditorProps {
|
|
4
|
+
templates: readonly DialogTemplate[];
|
|
5
|
+
referencedTemplates: ReadonlySet<string>;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
strings: ScreenEditorStrings['properties']['dialogTemplates'];
|
|
8
|
+
onChange: (templates: DialogTemplate[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DialogTemplateListEditor: ({ templates, referencedTemplates, disabled, strings, onChange }: DialogTemplateListEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Form } from '@cratis/scene.model';
|
|
2
|
+
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
3
|
+
export interface FormLayoutEditorProps {
|
|
4
|
+
form: Form;
|
|
5
|
+
strings: ScreenEditorStrings['properties']['forms'];
|
|
6
|
+
onChange: (form: Form) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormLayoutEditor: ({ form, strings, onChange }: FormLayoutEditorProps) => import("react").JSX.Element;
|
|
@@ -92,6 +92,19 @@ export interface ScreenEditorStrings {
|
|
|
92
92
|
dialog: string;
|
|
93
93
|
clear: string;
|
|
94
94
|
};
|
|
95
|
+
dialogTemplates: {
|
|
96
|
+
label: string;
|
|
97
|
+
name: string;
|
|
98
|
+
displayName: string;
|
|
99
|
+
description: string;
|
|
100
|
+
add: string;
|
|
101
|
+
remove: string;
|
|
102
|
+
moveUp: string;
|
|
103
|
+
moveDown: string;
|
|
104
|
+
unnamed: string;
|
|
105
|
+
newTemplateName: string;
|
|
106
|
+
removeBlocked: string;
|
|
107
|
+
};
|
|
95
108
|
forms: {
|
|
96
109
|
label: string;
|
|
97
110
|
add: string;
|
|
@@ -102,6 +115,19 @@ export interface ScreenEditorStrings {
|
|
|
102
115
|
fieldLabel: string;
|
|
103
116
|
sourceProperty: string;
|
|
104
117
|
fieldComposition: string;
|
|
118
|
+
columns: string;
|
|
119
|
+
column: (index: number) => string;
|
|
120
|
+
gaps: string;
|
|
121
|
+
columnGap: string;
|
|
122
|
+
rowGap: string;
|
|
123
|
+
placements: string;
|
|
124
|
+
row: string;
|
|
125
|
+
columnPlacement: string;
|
|
126
|
+
rowSpan: string;
|
|
127
|
+
columnSpan: string;
|
|
128
|
+
fieldWidth: string;
|
|
129
|
+
widthValue: string;
|
|
130
|
+
widthUnit: string;
|
|
105
131
|
remove: string;
|
|
106
132
|
};
|
|
107
133
|
binding: {
|