@cratis/event-models 0.158.2 → 0.159.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/Actions/StateChangeSlice.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Actions/diagnoseAction.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Forms/commandFormElements.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Forms/formEditing.d.ts +2 -2
- package/dist/screen-editor/ScreenEditor/Inspector/ActionEditor.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/ScalarEditor.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StringMapEditor.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StringOrListEditor.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredEditorStrings.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/index.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/structuredProblem.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/structuredValue.d.ts +8 -4
- package/dist/screen-editor/index.js +2203 -1990
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +11 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface StateChangeSlice {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
+
commandName?: string;
|
|
4
5
|
origin: string[];
|
|
5
6
|
inputs: {
|
|
6
7
|
name: string;
|
|
@@ -8,3 +9,5 @@ export interface StateChangeSlice {
|
|
|
8
9
|
required: boolean;
|
|
9
10
|
}[];
|
|
10
11
|
}
|
|
12
|
+
export declare const commandNameOf: (slice: StateChangeSlice) => string;
|
|
13
|
+
export declare function sliceNamedBy(slices: readonly StateChangeSlice[], command: unknown): StateChangeSlice | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionModel } from './ActionModel';
|
|
2
|
-
import type
|
|
2
|
+
import { type StateChangeSlice } from './StateChangeSlice';
|
|
3
3
|
export declare enum ActionProblemKind {
|
|
4
4
|
MissingSlice = "missingSlice",
|
|
5
5
|
UnmappedInput = "unmappedInput",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SceneEdit, type SceneElement } from '@cratis/scene.model';
|
|
2
|
-
import type
|
|
2
|
+
import { type StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
3
|
export declare const commandFormComponentName = "commandForm";
|
|
4
4
|
export declare const commandProperty = "command";
|
|
5
5
|
export declare const isCommandFormType: (typeId: string) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormGenerationMode, type Form, type FormField } from '@cratis/scene.model';
|
|
2
|
-
import type
|
|
2
|
+
import { sliceNamedBy, type StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
3
3
|
export declare function autoFormFor(slice: StateChangeSlice): Form;
|
|
4
4
|
export declare function manualFormFor(form: Form, slice: StateChangeSlice): Form;
|
|
5
5
|
export declare function modeFor(form: Form, slice: StateChangeSlice | undefined): FormGenerationMode;
|
|
6
6
|
export declare function replaceField(form: Form, index: number, field: FormField): Form;
|
|
7
7
|
export declare function formOfCommand(forms: readonly Form[], slice: StateChangeSlice | undefined): Form | undefined;
|
|
8
|
-
export declare const sliceOfCommand:
|
|
8
|
+
export declare const sliceOfCommand: typeof sliceNamedBy;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommandInputSource } from '../Actions/commandInputSources';
|
|
2
2
|
import type { ActionModel } from '../Actions/ActionModel';
|
|
3
|
-
import type
|
|
3
|
+
import { type StateChangeSlice } from '../Actions/StateChangeSlice';
|
|
4
4
|
import type { ScreenEditorStrings } from './ScreenEditorStrings';
|
|
5
5
|
export interface ActionEditorProps {
|
|
6
6
|
action?: ActionModel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StructuredEditorStrings } from './StructuredEditorStrings';
|
|
2
|
+
export interface ScalarEditorProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
id: string;
|
|
6
|
+
strings: StructuredEditorStrings;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onChange: (value: unknown) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ScalarEditor: ({ label, value, id, strings, disabled, onChange }: ScalarEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropertyDescriptor } from '@cratis/scene.model';
|
|
2
|
+
import type { StructuredEditorStrings } from './StructuredEditorStrings';
|
|
3
|
+
export interface StringMapEditorProps {
|
|
4
|
+
descriptor: PropertyDescriptor;
|
|
5
|
+
value: unknown;
|
|
6
|
+
id: string;
|
|
7
|
+
strings: StructuredEditorStrings;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
onChange: (value: unknown) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const StringMapEditor: ({ descriptor, value, id, strings, disabled, onChange }: StringMapEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropertyDescriptor } from '@cratis/scene.model';
|
|
2
|
+
import type { StructuredEditorStrings } from './StructuredEditorStrings';
|
|
3
|
+
export interface StringOrListEditorProps {
|
|
4
|
+
descriptor: PropertyDescriptor;
|
|
5
|
+
value: unknown;
|
|
6
|
+
id: string;
|
|
7
|
+
strings: StructuredEditorStrings;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
onChange: (value: unknown) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const StringOrListEditor: ({ descriptor, value, id, strings, disabled, onChange }: StringOrListEditorProps) => import("react").JSX.Element;
|
package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredEditorStrings.d.ts
CHANGED
|
@@ -14,6 +14,18 @@ export interface StructuredEditorStrings {
|
|
|
14
14
|
moveEntryDown: (position: number) => string;
|
|
15
15
|
removeEntry: (position: number) => string;
|
|
16
16
|
addEntry: string;
|
|
17
|
+
useList: string;
|
|
18
|
+
useSingle: string;
|
|
19
|
+
scalarType: string;
|
|
20
|
+
scalarText: string;
|
|
21
|
+
scalarNumber: string;
|
|
22
|
+
scalarFlag: string;
|
|
23
|
+
scalarFlagOn: string;
|
|
24
|
+
mapName: (position: number) => string;
|
|
25
|
+
mapValue: (name: string) => string;
|
|
26
|
+
addMapEntry: string;
|
|
27
|
+
removeMapEntry: (name: string) => string;
|
|
28
|
+
keptValue: string;
|
|
17
29
|
mismatch: (property: string, problem: string) => string;
|
|
18
30
|
convert: string;
|
|
19
31
|
clear: string;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { type PropertyDescriptor } from '@cratis/scene.model';
|
|
2
|
-
export declare const stringListEditorKind
|
|
3
|
-
export declare const numberListEditorKind
|
|
2
|
+
export declare const stringListEditorKind: string;
|
|
3
|
+
export declare const numberListEditorKind: string;
|
|
4
|
+
export declare const stringOrListEditorKind: string;
|
|
5
|
+
export declare const scalarEditorKind: string;
|
|
6
|
+
export declare const stringMapEditorKind: string;
|
|
4
7
|
export declare const isPrimitiveList: (descriptor: PropertyDescriptor) => boolean;
|
|
8
|
+
export declare const isStringMap: (descriptor: PropertyDescriptor) => boolean;
|
|
5
9
|
export declare const isObjectWithFields: (descriptor: PropertyDescriptor) => boolean;
|
|
6
10
|
export declare const isCollectionOfRecords: (descriptor: PropertyDescriptor) => boolean;
|
|
7
11
|
export declare const isStructured: (descriptor: PropertyDescriptor) => boolean;
|
|
8
12
|
export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
9
13
|
export declare function withField(record: unknown, path: string, value: unknown): Record<string, unknown> | undefined;
|
|
10
|
-
export declare const newItem: () => Record<string, unknown>;
|
|
11
|
-
export declare const identified: (item: unknown) => Record<string, unknown>;
|
|
14
|
+
export declare const newItem: (positional?: boolean) => Record<string, unknown>;
|
|
15
|
+
export declare const identified: (item: unknown, positional?: boolean) => Record<string, unknown>;
|
|
12
16
|
export declare function withItem(items: readonly unknown[], index: number, item: unknown): unknown[];
|
|
13
17
|
export declare function withoutItem(items: readonly unknown[], index: number): unknown[];
|
|
14
18
|
export declare function movedItem(items: readonly unknown[], index: number, offset: number): unknown[];
|