@stackmango/graff 0.1.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/README.md +73 -0
- package/dist/js/graff.css +1 -0
- package/dist/js/index.cjs +213 -0
- package/dist/js/index.js +43125 -0
- package/dist/js/vite.svg +1 -0
- package/dist/types/App.d.ts +1 -0
- package/dist/types/App.d.ts.map +1 -0
- package/dist/types/Document/Document.d.ts +7 -0
- package/dist/types/Document/Document.d.ts.map +1 -0
- package/dist/types/Document/index.d.ts +3 -0
- package/dist/types/Document/index.d.ts.map +1 -0
- package/dist/types/Utils/Connection.d.ts +5 -0
- package/dist/types/Utils/Connection.d.ts.map +1 -0
- package/dist/types/Utils/Draggable.d.ts +13 -0
- package/dist/types/Utils/Draggable.d.ts.map +1 -0
- package/dist/types/Utils/Form.d.ts +4 -0
- package/dist/types/Utils/Form.d.ts.map +1 -0
- package/dist/types/Utils/index.d.ts +6 -0
- package/dist/types/Utils/index.d.ts.map +1 -0
- package/dist/types/Utils/misc.d.ts +9 -0
- package/dist/types/Utils/misc.d.ts.map +1 -0
- package/dist/types/Workspace/Workspace.d.ts +4 -0
- package/dist/types/Workspace/Workspace.d.ts.map +1 -0
- package/dist/types/Workspace/index.d.ts +3 -0
- package/dist/types/Workspace/index.d.ts.map +1 -0
- package/dist/types/components/Document/Document.d.ts +7 -0
- package/dist/types/components/Document/Document.d.ts.map +1 -0
- package/dist/types/components/Document/index.d.ts +3 -0
- package/dist/types/components/Document/index.d.ts.map +1 -0
- package/dist/types/components/UIElements/Dropdown.d.ts +4 -0
- package/dist/types/components/UIElements/Dropdown.d.ts.map +1 -0
- package/dist/types/components/UIElements/Textbox.d.ts +4 -0
- package/dist/types/components/UIElements/Textbox.d.ts.map +1 -0
- package/dist/types/components/UIElements/Toggle.d.ts +4 -0
- package/dist/types/components/UIElements/Toggle.d.ts.map +1 -0
- package/dist/types/components/UIElements/index.d.ts +5 -0
- package/dist/types/components/UIElements/index.d.ts.map +1 -0
- package/dist/types/components/Utils/Connection.d.ts +5 -0
- package/dist/types/components/Utils/Connection.d.ts.map +1 -0
- package/dist/types/components/Utils/Draggable.d.ts +13 -0
- package/dist/types/components/Utils/Draggable.d.ts.map +1 -0
- package/dist/types/components/Utils/Form.d.ts +4 -0
- package/dist/types/components/Utils/Form.d.ts.map +1 -0
- package/dist/types/components/Utils/index.d.ts +6 -0
- package/dist/types/components/Utils/index.d.ts.map +1 -0
- package/dist/types/components/Utils/misc.d.ts +9 -0
- package/dist/types/components/Utils/misc.d.ts.map +1 -0
- package/dist/types/components/Workspace/Workspace.d.ts +4 -0
- package/dist/types/components/Workspace/Workspace.d.ts.map +1 -0
- package/dist/types/components/Workspace/index.d.ts +3 -0
- package/dist/types/components/Workspace/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +11 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/type.d.ts +5 -0
- package/dist/types/components/type.d.ts.map +1 -0
- package/dist/types/contexts/Formcontext.d.ts +32 -0
- package/dist/types/contexts/Formcontext.d.ts.map +1 -0
- package/dist/types/contexts/Graphcontext.d.ts +3 -0
- package/dist/types/contexts/Graphcontext.d.ts.map +1 -0
- package/dist/types/hooks/useForm.d.ts +3 -0
- package/dist/types/hooks/useForm.d.ts.map +1 -0
- package/dist/types/hooks/useGraph.d.ts +1 -0
- package/dist/types/hooks/useGraph.d.ts.map +1 -0
- package/dist/types/hooks/useWorkspace.d.ts +37 -0
- package/dist/types/hooks/useWorkspace.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/library/Input.d.ts +77 -0
- package/dist/types/library/Input.d.ts.map +1 -0
- package/dist/types/library/JSONForms.d.ts +233 -0
- package/dist/types/library/JSONForms.d.ts.map +1 -0
- package/dist/types/library/NodeTemplates.d.ts +41 -0
- package/dist/types/library/NodeTemplates.d.ts.map +1 -0
- package/dist/types/library/coordinateSystemUtils.d.ts +29 -0
- package/dist/types/library/coordinateSystemUtils.d.ts.map +1 -0
- package/dist/types/library/form.d.ts +66 -0
- package/dist/types/library/form.d.ts.map +1 -0
- package/dist/types/library/misc.d.ts +47 -0
- package/dist/types/library/misc.d.ts.map +1 -0
- package/dist/types/library/utils.d.ts +104 -0
- package/dist/types/library/utils.d.ts.map +1 -0
- package/dist/types/library/vectorApi.d.ts +31 -0
- package/dist/types/library/vectorApi.d.ts.map +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/reducers/form.d.ts +14 -0
- package/dist/types/reducers/form.d.ts.map +1 -0
- package/dist/types/reducers/graph.d.ts +90 -0
- package/dist/types/reducers/graph.d.ts.map +1 -0
- package/dist/types/reducers/graph_data.d.ts +1 -0
- package/dist/types/reducers/graph_data.d.ts.map +1 -0
- package/dist/types/reducers/uiElements.d.ts +5 -0
- package/dist/types/reducers/uiElements.d.ts.map +1 -0
- package/dist/types/type.d.ts +5 -0
- package/dist/types/type.d.ts.map +1 -0
- package/dist/types/types/Dataflow.d.ts +1 -0
- package/dist/types/types/Dataflow.d.ts.map +1 -0
- package/dist/types/types/Execution.d.ts +24 -0
- package/dist/types/types/Execution.d.ts.map +1 -0
- package/dist/types/types/Form.d.ts +115 -0
- package/dist/types/types/Form.d.ts.map +1 -0
- package/dist/types/types/Schema.d.ts +23 -0
- package/dist/types/types/Schema.d.ts.map +1 -0
- package/dist/types/types/UIElements.d.ts +55 -0
- package/dist/types/types/UIElements.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +564 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { Connection_Design_Action, Connection_Design_Draft, Connection_Skeleton_Action, Connection_Skeleton_Draft, Coordinate, CoordinateSystem, CoordinateSystemAction, Document_Action, FreeConnectionsAction, Node_Generic_Design_Action, Node_Generic_Design_Draft, Node_Generic_Skeleton_Action, Node_Generic_Skeleton_Draft, SelectionBox, SelectionBox_Action, Viewport_Action } from "../types/index";
|
|
2
|
+
export declare const CoordinateSystemReducer: (state: CoordinateSystem, action: CoordinateSystemAction) => {
|
|
3
|
+
viewport: Coordinate;
|
|
4
|
+
workspace: Coordinate;
|
|
5
|
+
viewspace: Coordinate;
|
|
6
|
+
};
|
|
7
|
+
export declare const SelectionBoxReducer: (state: SelectionBox, action: SelectionBox_Action) => {
|
|
8
|
+
start: Coordinate;
|
|
9
|
+
end: Coordinate;
|
|
10
|
+
} | null;
|
|
11
|
+
export declare const Node_Generic_Skeleton_Reducer: <node_core>(state: Record<string, Node_Generic_Skeleton_Draft<node_core>> | undefined, action: Node_Generic_Skeleton_Action<node_core>) => {
|
|
12
|
+
[x: string]: Node_Generic_Skeleton_Draft<node_core>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Node_Generic_Design_Reducer: (state: Record<string, Node_Generic_Design_Draft> | undefined, action: Node_Generic_Design_Action) => {
|
|
15
|
+
[x: string]: Node_Generic_Design_Draft;
|
|
16
|
+
};
|
|
17
|
+
export declare const Connection_Skeleton_Reducer: (state: Record<string, Connection_Skeleton_Draft> | undefined, action: Connection_Skeleton_Action) => {
|
|
18
|
+
[x: string]: Connection_Skeleton_Draft;
|
|
19
|
+
};
|
|
20
|
+
export declare const Connection_Design_Reducer: (state: Record<string, Connection_Design_Draft> | undefined, action: Connection_Design_Action) => {
|
|
21
|
+
[x: string]: Connection_Design_Draft;
|
|
22
|
+
};
|
|
23
|
+
export declare const Connection_Root_Reducer: (state: Record<string, {
|
|
24
|
+
portStatus: "NO_PORT" | "COMPATIBLE_PORT" | "INCOMPATIBLE_PORT";
|
|
25
|
+
skeleton: Connection_Skeleton_Draft;
|
|
26
|
+
design: Connection_Design_Draft;
|
|
27
|
+
}>, action: FreeConnectionsAction) => {
|
|
28
|
+
[x: string]: {
|
|
29
|
+
portStatus: "NO_PORT" | "COMPATIBLE_PORT" | "INCOMPATIBLE_PORT";
|
|
30
|
+
skeleton: Connection_Skeleton_Draft;
|
|
31
|
+
design: Connection_Design_Draft;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const Document_Position_Reducer: (state: Coordinate, action: Document_Action) => {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
};
|
|
38
|
+
export declare const Viewport_Position_Reducer: (state: Coordinate, action: Viewport_Action) => {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
export declare const AssetsReducer: import("redux").Reducer<{
|
|
43
|
+
nodes: {
|
|
44
|
+
[x: string]: Node_Generic_Skeleton_Draft<unknown>;
|
|
45
|
+
};
|
|
46
|
+
connections: {
|
|
47
|
+
[x: string]: Connection_Skeleton_Draft;
|
|
48
|
+
};
|
|
49
|
+
}, Connection_Skeleton_Action | Node_Generic_Skeleton_Action<unknown>, Partial<{
|
|
50
|
+
nodes: never;
|
|
51
|
+
connections: never;
|
|
52
|
+
}>>;
|
|
53
|
+
export declare const ViewReducer: import("redux").Reducer<{
|
|
54
|
+
nodes: {
|
|
55
|
+
[x: string]: Node_Generic_Design_Draft;
|
|
56
|
+
};
|
|
57
|
+
connections: {
|
|
58
|
+
[x: string]: Connection_Design_Draft;
|
|
59
|
+
};
|
|
60
|
+
viewportPosition: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
documentPosition: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
};
|
|
68
|
+
}, Node_Generic_Design_Action | Connection_Design_Action | Viewport_Action | Document_Action, Partial<{
|
|
69
|
+
nodes: never;
|
|
70
|
+
connections: never;
|
|
71
|
+
viewportPosition: never;
|
|
72
|
+
documentPosition: never;
|
|
73
|
+
}>>;
|
|
74
|
+
export declare const InteractionReducer: import("redux").Reducer<{
|
|
75
|
+
connections: {
|
|
76
|
+
[x: string]: {
|
|
77
|
+
portStatus: "NO_PORT" | "COMPATIBLE_PORT" | "INCOMPATIBLE_PORT";
|
|
78
|
+
skeleton: Connection_Skeleton_Draft;
|
|
79
|
+
design: Connection_Design_Draft;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
selection: {
|
|
83
|
+
start: Coordinate;
|
|
84
|
+
end: Coordinate;
|
|
85
|
+
} | null;
|
|
86
|
+
}, FreeConnectionsAction | SelectionBox_Action, Partial<{
|
|
87
|
+
connections: never;
|
|
88
|
+
selection: never;
|
|
89
|
+
}>>;
|
|
90
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/reducers/graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,UAAU,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIlZ,eAAO,MAAM,uBAAuB,GAAE,OAAM,gBAAgB,EAAC,QAAO,sBAAsB;;;;CAYzF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAE,OAAM,YAAY,EAAC,QAAO,mBAAmB;;;QAQ9E,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAE,SAAS,EAAG,OAAM,MAAM,CAAC,MAAM,EAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC,YAAG,EAAC,QAAO,4BAA4B,CAAC,SAAS,CAAC;;CAuDpK,CAAA;AACD,eAAO,MAAM,2BAA2B,GAAE,OAAM,MAAM,CAAC,MAAM,EAAC,yBAAyB,CAAC,YAAG,EAAC,QAAO,0BAA0B;;CA0B5H,CAAA;AACD,eAAO,MAAM,2BAA2B,GAAE,OAAM,MAAM,CAAC,MAAM,EAAC,yBAAyB,CAAC,YAAG,EAAC,QAAO,0BAA0B;;CAsB5H,CAAA;AACD,eAAO,MAAM,yBAAyB,GAAE,OAAM,MAAM,CAAC,MAAM,EAAC,uBAAuB,CAAC,YAAG,EAAC,QAAO,wBAAwB;;CAsCtH,CAAA;AACD,eAAO,MAAM,uBAAuB,GAAE,OAAM,MAAM,CAAC,MAAM,EAAC;IAAC,UAAU,EAAC,SAAS,GAAC,iBAAiB,GAAC,mBAAmB,CAAC;IAAA,QAAQ,EAAC,yBAAyB,CAAC;IAAA,MAAM,EAAC,uBAAuB,CAAA;CAAC,CAAC,EAAC,QAAO,qBAAqB;;oBAAhJ,SAAS,GAAC,iBAAiB,GAAC,mBAAmB;kBAAU,yBAAyB;gBAAQ,uBAAuB;;CA+DtL,CAAA;AAiBD,eAAO,MAAM,yBAAyB,GAAE,OAAM,UAAU,EAAC,QAAO,eAAe;;;CAY9E,CAAA;AACD,eAAO,MAAM,yBAAyB,GAAE,OAAM,UAAU,EAAC,QAAO,eAAe;;;CAQ9E,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;GAGxB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;GAKtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;wBAnHuC,SAAS,GAAC,iBAAiB,GAAC,mBAAmB;sBAAU,yBAAyB;oBAAQ,uBAAuB;;;;;;;;;;GAsHrL,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=graph_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph_data.d.ts","sourceRoot":"","sources":["../../../src/reducers/graph_data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DropdownAction, TextboxAction, ToggleAction } from "../types/UIElements";
|
|
2
|
+
export declare const DropdownReducer: (state: string[], action: DropdownAction) => string[];
|
|
3
|
+
export declare const TextboxReducer: (state: string | number, action: TextboxAction) => string | number;
|
|
4
|
+
export declare const ToggleReducer: (state: boolean, action: ToggleAction) => boolean;
|
|
5
|
+
//# sourceMappingURL=uiElements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiElements.d.ts","sourceRoot":"","sources":["../../../src/reducers/uiElements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEvF,eAAO,MAAM,eAAe,GAAE,OAAM,MAAM,EAAE,EAAC,QAAO,cAAc,aAoCjE,CAAA;AAED,eAAO,MAAM,cAAc,GAAE,OAAM,MAAM,GAAC,MAAM,EAAC,QAAO,aAAa,oBAapE,CAAA;AAED,eAAO,MAAM,aAAa,GAAE,OAAM,OAAO,EAAC,QAAO,YAAY,YAY5D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/type.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Dataflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dataflow.d.ts","sourceRoot":"","sources":["../../../src/types/Dataflow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Asset_Generic, Config, JSONSchema, Node_Generic_Design, Node_Generic_Design_Action, Node_Generic_Skeleton, Node_Generic_Skeleton_Action, Port_Generic, View_Generic } from ".";
|
|
2
|
+
export type Node_Execution_Core = {
|
|
3
|
+
configSchema: JSONSchema | null;
|
|
4
|
+
function: string;
|
|
5
|
+
};
|
|
6
|
+
export type Node_Execution_Skeleton = Node_Generic_Skeleton<Node_Execution_Core>;
|
|
7
|
+
export type Node_Execution_Skeleton_Draft = Omit<Node_Execution_Skeleton, "id">;
|
|
8
|
+
export type Node_Execution_Design_Draft = Omit<Node_Generic_Design, "id">;
|
|
9
|
+
export type Node_Execution_Type = Omit<Node_Execution_Skeleton, "id"> & {
|
|
10
|
+
type: string;
|
|
11
|
+
editRules: {
|
|
12
|
+
ports: {
|
|
13
|
+
input: boolean;
|
|
14
|
+
ouput: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type Port_Execution_Draft = Omit<Port_Generic, "id">;
|
|
19
|
+
export type Assets_Execution = Asset_Generic<Node_Execution_Core>;
|
|
20
|
+
export type View_Execution = View_Generic;
|
|
21
|
+
export type Config_Execution = Config;
|
|
22
|
+
export type Node_Execution_Skeleton_Action = Node_Generic_Skeleton_Action<Node_Execution_Core>;
|
|
23
|
+
export type Node_Execution_Design_Action = Node_Generic_Design_Action;
|
|
24
|
+
//# sourceMappingURL=Execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Execution.d.ts","sourceRoot":"","sources":["../../../src/types/Execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAG,0BAA0B,EAAG,qBAAqB,EAAC,4BAA4B,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,GAAG,CAAA;AAE3L,MAAM,MAAM,mBAAmB,GAAC;IAC9B,YAAY,EAAC,UAAU,GAAC,IAAI,CAAC;IAC7B,QAAQ,EAAC,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAA;AAE9E,MAAM,MAAM,6BAA6B,GAAC,IAAI,CAAC,uBAAuB,EAAC,IAAI,CAAC,CAAA;AAC5E,MAAM,MAAM,2BAA2B,GAAC,IAAI,CAAC,mBAAmB,EAAC,IAAI,CAAC,CAAA;AACtE,MAAM,MAAM,mBAAmB,GAAC,IAAI,CAAC,uBAAuB,EAAC,IAAI,CAAC,GAAC;IACjE,IAAI,EAAC,MAAM,CAAC;IACZ,SAAS,EAAC;QACR,KAAK,EAAC;YACJ,KAAK,EAAC,OAAO,CAAC;YACd,KAAK,EAAC,OAAO,CAAA;SACd,CAAA;KACJ,CAAA;CAAC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAC,IAAI,CAAC,YAAY,EAAC,IAAI,CAAC,CAAA;AAExD,MAAM,MAAM,gBAAgB,GAAC,aAAa,CAAC,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAC,YAAY,CAAA;AACvC,MAAM,MAAM,gBAAgB,GAAC,MAAM,CAAA;AAEnC,MAAM,MAAM,8BAA8B,GAAC,4BAA4B,CAAC,mBAAmB,CAAC,CAAA;AAC5F,MAAM,MAAM,4BAA4B,GAAC,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { JSONSchema, StyleConfig } from ".";
|
|
3
|
+
import type { PayloadAction } from "@reduxjs/toolkit";
|
|
4
|
+
import type { UIElement_Generic } from "./UIElements";
|
|
5
|
+
export type Asset_Form_action = {
|
|
6
|
+
type: "set-field";
|
|
7
|
+
payload: {
|
|
8
|
+
fieldId: string;
|
|
9
|
+
value: any;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
type: "set-fields";
|
|
13
|
+
payload: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
export type View_Form_action = {
|
|
16
|
+
type: "set-field";
|
|
17
|
+
payload: {
|
|
18
|
+
fieldId: string;
|
|
19
|
+
value: any;
|
|
20
|
+
};
|
|
21
|
+
} | {
|
|
22
|
+
type: "set-fields";
|
|
23
|
+
payload: Record<string, any>;
|
|
24
|
+
};
|
|
25
|
+
export type Runtime_Form_action = {
|
|
26
|
+
type: "set-field";
|
|
27
|
+
payload: {
|
|
28
|
+
fieldId: string;
|
|
29
|
+
value: any;
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
type: "set-fields";
|
|
33
|
+
payload: Record<string, any>;
|
|
34
|
+
};
|
|
35
|
+
export type Asset_Field = {
|
|
36
|
+
label: string;
|
|
37
|
+
value: any;
|
|
38
|
+
};
|
|
39
|
+
export type View_Field = {
|
|
40
|
+
component: string;
|
|
41
|
+
exposedChildren?: Record<string, StyleConfig>;
|
|
42
|
+
};
|
|
43
|
+
export type Runtime_Field = {
|
|
44
|
+
active: boolean;
|
|
45
|
+
isDisabled: boolean;
|
|
46
|
+
isDirty: boolean;
|
|
47
|
+
isTouched?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type Preferences_Field = any;
|
|
50
|
+
export type Config_Field = any;
|
|
51
|
+
export type Asset_Form = {
|
|
52
|
+
title?: string;
|
|
53
|
+
fields: Record<string, Asset_Field>;
|
|
54
|
+
};
|
|
55
|
+
export type Schema_Form = Record<string, JSONSchema>;
|
|
56
|
+
export type View_Form = {
|
|
57
|
+
form: any;
|
|
58
|
+
fields: Record<string, View_Field>;
|
|
59
|
+
};
|
|
60
|
+
export type Runtime_Form = {
|
|
61
|
+
form: any;
|
|
62
|
+
fields: Record<string, Runtime_Field>;
|
|
63
|
+
};
|
|
64
|
+
export type Config_Form = {
|
|
65
|
+
form?: {
|
|
66
|
+
routingRules?: Record<string, string[]>;
|
|
67
|
+
adapters?: {
|
|
68
|
+
intent: Record<string, string>;
|
|
69
|
+
action: Record<string, Record<string, (inputAction: PayloadAction<any>) => PayloadAction<any>>>;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
fields?: Record<string, Config_Field>;
|
|
73
|
+
};
|
|
74
|
+
export type Preferences_Form = {
|
|
75
|
+
form: {
|
|
76
|
+
hideTitle?: boolean;
|
|
77
|
+
};
|
|
78
|
+
fields: Record<string, Preferences_Field>;
|
|
79
|
+
};
|
|
80
|
+
export type Form_Props = {
|
|
81
|
+
formDefination: {
|
|
82
|
+
initialState: Asset_Form;
|
|
83
|
+
view: View_Form;
|
|
84
|
+
schema: Schema_Form;
|
|
85
|
+
config?: Config_Form;
|
|
86
|
+
preferences?: Preferences_Form;
|
|
87
|
+
};
|
|
88
|
+
uiElementsRegistry: Record<string, {
|
|
89
|
+
component: React.FC<any>;
|
|
90
|
+
reducer: React.Reducer<any, any>;
|
|
91
|
+
}>;
|
|
92
|
+
reducer: React.Reducer<Asset_Form, {
|
|
93
|
+
type: "form-update";
|
|
94
|
+
payload: Asset_Form;
|
|
95
|
+
}>;
|
|
96
|
+
};
|
|
97
|
+
export type Field_props = {
|
|
98
|
+
value: Asset_Field;
|
|
99
|
+
schema: JSONSchema;
|
|
100
|
+
config: any;
|
|
101
|
+
preferences: Preferences_Field;
|
|
102
|
+
view: Record<string, StyleConfig>;
|
|
103
|
+
};
|
|
104
|
+
export type Field_Component = React.FC<UIElement_Generic>;
|
|
105
|
+
export type error = {
|
|
106
|
+
success: boolean;
|
|
107
|
+
message: string;
|
|
108
|
+
data?: any;
|
|
109
|
+
};
|
|
110
|
+
export type Event = {
|
|
111
|
+
name: string;
|
|
112
|
+
triggeredBy: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/types/Form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,MAAM,iBAAiB,GAAC;IAC1B,IAAI,EAAC,WAAW,CAAC;IACjB,OAAO,EAAC;QACJ,OAAO,EAAC,MAAM,CAAC;QACf,KAAK,EAAC,GAAG,CAAA;KACZ,CAAA;CACJ,GAAC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AkB,EAAC,MAAM,CAAC,MAAM,EAAC;QAC7B,SAAS,EAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,EAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAC,GAAG,CAAC,CAAA;KACjC,CAAC,CAAC;IACH,OAAO,EAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAC;QAAC,IAAI,EAAC,aAAa,CAAC;QAAA,OAAO,EAAC,UAAU,CAAA;KAAC,CAAC,CAAA;CAC5E,CAAA;AACD,MAAM,MAAM,WAAW,GAAC;IACpB,KAAK,EAAC,WAAW,CAAC;IAClB,MAAM,EAAC,UAAU,CAAC;IAClB,MAAM,EAAC,GAAG,CAAC;IACX,WAAW,EAAC,iBAAiB,CAAC;IAC9B,IAAI,EAAC,MAAM,CAAC,MAAM,EAAC,WAAW,CAAC,CAAA;CAClC,CAAA;AASD,MAAM,MAAM,eAAe,GAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAA;AACvD,MAAM,MAAM,KAAK,GAAC;IAAC,OAAO,EAAC,OAAO,CAAC;IAAA,OAAO,EAAC,MAAM,CAAC;IAAA,IAAI,CAAC,EAAC,GAAG,CAAA;CAAC,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAC;IACd,IAAI,EAAC,MAAM,CAAC;IACZ,WAAW,EAAC,MAAM,CAAC;IACnB,OAAO,EAAC,GAAG,CAAA;CACd,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Asset_Generic, Config, JSONSchema, Node_Generic_Design, Node_Generic_Design_Action, Node_Generic_Skeleton, Node_Generic_Skeleton_Action, Port_Generic, View_Generic } from ".";
|
|
2
|
+
export type Node_Schema_Core = JSONSchema & {
|
|
3
|
+
key: string;
|
|
4
|
+
};
|
|
5
|
+
export type Node_Schema_Skeleton = Node_Generic_Skeleton<Node_Schema_Core>;
|
|
6
|
+
export type Node_Schema_Skeleton_Draft = Omit<Node_Schema_Skeleton, "id">;
|
|
7
|
+
export type Node_Schema_Design_Draft = Omit<Node_Generic_Design, "id">;
|
|
8
|
+
export type Node_Schema_Type = Omit<Node_Schema_Skeleton, "id"> & {
|
|
9
|
+
type: string;
|
|
10
|
+
editRules: {
|
|
11
|
+
ports: {
|
|
12
|
+
input: boolean;
|
|
13
|
+
ouput: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type Port_Schema_Draft = Omit<Port_Generic, "id">;
|
|
18
|
+
export type Assets_Schema = Asset_Generic<Node_Schema_Core>;
|
|
19
|
+
export type View_Schema = View_Generic;
|
|
20
|
+
export type Config_Schema = Config;
|
|
21
|
+
export type Node_Schema_Skeleton_Action = Node_Generic_Skeleton_Action<Node_Schema_Core>;
|
|
22
|
+
export type Node_Schema_Design_Action = Node_Generic_Design_Action;
|
|
23
|
+
//# sourceMappingURL=Schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/types/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAG,0BAA0B,EAAG,qBAAqB,EAAC,4BAA4B,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,GAAG,CAAA;AAE3L,MAAM,MAAM,gBAAgB,GAAC,UAAU,GAAC;IAAC,GAAG,EAAC,MAAM,CAAA;CAAC,CAAA;AACpD,MAAM,MAAM,oBAAoB,GAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAA;AAExE,MAAM,MAAM,0BAA0B,GAAC,IAAI,CAAC,oBAAoB,EAAC,IAAI,CAAC,CAAA;AACtE,MAAM,MAAM,wBAAwB,GAAC,IAAI,CAAC,mBAAmB,EAAC,IAAI,CAAC,CAAA;AACnE,MAAM,MAAM,gBAAgB,GAAC,IAAI,CAAC,oBAAoB,EAAC,IAAI,CAAC,GAAC;IAC3D,IAAI,EAAC,MAAM,CAAC;IACZ,SAAS,EAAC;QACR,KAAK,EAAC;YACJ,KAAK,EAAC,OAAO,CAAC;YACd,KAAK,EAAC,OAAO,CAAA;SACd,CAAA;KACJ,CAAA;CAAC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAC,IAAI,CAAC,YAAY,EAAC,IAAI,CAAC,CAAA;AAErD,MAAM,MAAM,aAAa,GAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,WAAW,GAAC,YAAY,CAAA;AACpC,MAAM,MAAM,aAAa,GAAC,MAAM,CAAA;AAEhC,MAAM,MAAM,2BAA2B,GAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAA;AACtF,MAAM,MAAM,yBAAyB,GAAC,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import type { JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaString, StyleConfig } from ".";
|
|
3
|
+
export type UIElement<value, view, config, preferences, action, schema> = {
|
|
4
|
+
value: value;
|
|
5
|
+
schema: schema;
|
|
6
|
+
config: config;
|
|
7
|
+
preferences: preferences;
|
|
8
|
+
view: view;
|
|
9
|
+
reducer: (state: any, action: action) => value;
|
|
10
|
+
};
|
|
11
|
+
export type DropdownAction = {
|
|
12
|
+
type: "set-selection";
|
|
13
|
+
payload: string[];
|
|
14
|
+
} | {
|
|
15
|
+
type: "add-selection";
|
|
16
|
+
payload: {
|
|
17
|
+
selectType: "single" | "multi";
|
|
18
|
+
selection: string;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
type: "remove-selection";
|
|
22
|
+
payload: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "reset-selection";
|
|
25
|
+
};
|
|
26
|
+
export type TextboxAction = {
|
|
27
|
+
type: "set-text";
|
|
28
|
+
payload: string | number;
|
|
29
|
+
} | {
|
|
30
|
+
type: "reset-text";
|
|
31
|
+
payload: string | number;
|
|
32
|
+
};
|
|
33
|
+
export type ToggleAction = {
|
|
34
|
+
type: "set";
|
|
35
|
+
payload: boolean;
|
|
36
|
+
} | {
|
|
37
|
+
type: "toggle";
|
|
38
|
+
};
|
|
39
|
+
export type UIElement_Generic = UIElement<any, {
|
|
40
|
+
exposedChildren: Record<string, StyleConfig>;
|
|
41
|
+
}, any, any, PayloadAction, JSONSchema>;
|
|
42
|
+
export type UIElement_Dropdown = UIElement<string[], {
|
|
43
|
+
exposedChildren: Record<string, StyleConfig>;
|
|
44
|
+
}, {
|
|
45
|
+
isMultiSelect: boolean;
|
|
46
|
+
}, null, DropdownAction, JSONSchemaArray>;
|
|
47
|
+
export type UIElement_Textbox = UIElement<string | number, {
|
|
48
|
+
exposedChildren: Record<string, StyleConfig>;
|
|
49
|
+
}, {
|
|
50
|
+
dataType: "string" | "integer" | "float";
|
|
51
|
+
}, null, TextboxAction, JSONSchemaString>;
|
|
52
|
+
export type UIElement_Toggle = UIElement<boolean, {
|
|
53
|
+
exposedChildren: Record<string, StyleConfig>;
|
|
54
|
+
}, {}, null, ToggleAction, JSONSchemaBoolean>;
|
|
55
|
+
//# sourceMappingURL=UIElements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIElements.d.ts","sourceRoot":"","sources":["../../../src/types/UIElements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAC,MAAM,GAAG,CAAA;AAErG,MAAM,MAAM,SAAS,CAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,IAAE;IAC/D,KAAK,EAAC,KAAK,CAAC;IACZ,MAAM,EAAC,MAAM,CAAC;IACd,MAAM,EAAC,MAAM,CAAC;IACd,WAAW,EAAC,WA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