@cratis/event-models 0.153.2 → 0.155.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/ScreenEditor/Forms/commandFormElements.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Forms/formEditing.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Inspector/CommandFormEditor.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Inspector/FormEditor.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +11 -2
- package/dist/screen-editor/index.js +2976 -2880
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SceneEdit, type SceneElement } from '@cratis/scene.model';
|
|
2
|
+
import type { StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
|
+
export declare const commandFormComponentName = "commandForm";
|
|
4
|
+
export declare const commandProperty = "command";
|
|
5
|
+
export declare const isCommandFormType: (typeId: string) => boolean;
|
|
6
|
+
export interface CommandFormElement {
|
|
7
|
+
elementId: string;
|
|
8
|
+
command: string;
|
|
9
|
+
commandName: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare function commandFormElements(roots: readonly SceneElement[], slices: readonly StateChangeSlice[]): CommandFormElement[];
|
|
12
|
+
export declare function commandEdit(elementId: string, slice: StateChangeSlice | undefined): SceneEdit;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormGenerationMode, type Form, type FormField } from '@cratis/scene.model';
|
|
2
|
+
import type { StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
|
+
export declare function autoFormFor(slice: StateChangeSlice): Form;
|
|
4
|
+
export declare function manualFormFor(form: Form, slice: StateChangeSlice): Form;
|
|
5
|
+
export declare function modeFor(form: Form, slice: StateChangeSlice | undefined): FormGenerationMode;
|
|
6
|
+
export declare function replaceField(form: Form, index: number, field: FormField): Form;
|
|
7
|
+
export declare function formOfCommand(forms: readonly Form[], slice: StateChangeSlice | undefined): Form | undefined;
|
|
8
|
+
export declare const sliceOfCommand: (slices: readonly StateChangeSlice[], command: unknown) => StateChangeSlice | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Form } from '@cratis/scene.model';
|
|
2
|
+
import type { StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
|
+
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
4
|
+
export interface CommandFormEditorProps {
|
|
5
|
+
elementId: string;
|
|
6
|
+
command: string | undefined;
|
|
7
|
+
slices: readonly StateChangeSlice[];
|
|
8
|
+
forms: readonly Form[];
|
|
9
|
+
strings: ScreenEditorStrings;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onCommandChange: (slice: StateChangeSlice | undefined) => void;
|
|
12
|
+
onFormChange: (form: Form) => void;
|
|
13
|
+
onFormCreate: (slice: StateChangeSlice) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CommandFormEditor: ({ elementId, command, slices, forms, strings, disabled, onCommandChange, onFormChange, onFormCreate }: CommandFormEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Form } from '@cratis/scene.model';
|
|
2
|
+
import type { StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
|
+
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
4
|
+
export interface FormEditorProps {
|
|
5
|
+
form: Form;
|
|
6
|
+
slice: StateChangeSlice | undefined;
|
|
7
|
+
idPrefix: string;
|
|
8
|
+
strings: ScreenEditorStrings['properties']['forms'];
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
onChange: (form: Form) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormEditor: ({ form, slice, idPrefix, strings: text, disabled, onChange }: FormEditorProps) => import("react").JSX.Element;
|
|
@@ -157,10 +157,19 @@ export interface ScreenEditorStrings {
|
|
|
157
157
|
newTemplateName: string;
|
|
158
158
|
removeBlocked: string;
|
|
159
159
|
};
|
|
160
|
+
commandForm: {
|
|
161
|
+
label: string;
|
|
162
|
+
command: string;
|
|
163
|
+
none: string;
|
|
164
|
+
unknownCommand: string;
|
|
165
|
+
chooseCommandHint: string;
|
|
166
|
+
createForm: (command: string) => string;
|
|
167
|
+
};
|
|
160
168
|
forms: {
|
|
161
169
|
label: string;
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
ownedByElements: string;
|
|
171
|
+
presented: string;
|
|
172
|
+
notPresented: string;
|
|
164
173
|
mode: string;
|
|
165
174
|
auto: string;
|
|
166
175
|
manual: string;
|