seat-editor 3.3.13 → 3.3.15
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/app/constant.d.ts +1 -0
- package/dist/app/constant.js +1 -0
- package/dist/app/layout.d.ts +6 -0
- package/dist/app/layout.jsx +27 -0
- package/dist/app/new-board/page.jsx +55 -0
- package/dist/app/old-board/page.d.ts +3 -0
- package/dist/app/old-board/page.jsx +510 -0
- package/dist/app/only-view/chair.d.ts +1 -0
- package/dist/app/only-view/chair.js +12 -0
- package/dist/app/only-view/constant.d.ts +60 -0
- package/dist/app/only-view/constant.js +1336 -0
- package/dist/app/only-view/page.jsx +248 -0
- package/dist/app/only-view/user.d.ts +1 -0
- package/dist/app/only-view/user.js +12 -0
- package/dist/app/page.d.ts +2 -0
- package/dist/app/page.jsx +13 -0
- package/dist/app/test/page.d.ts +2 -0
- package/dist/app/test/page.jsx +45 -0
- package/dist/app/v2/page.d.ts +2 -0
- package/dist/app/v2/page.jsx +13 -0
- package/dist/components/button-tools/index.d.ts +11 -0
- package/dist/components/button-tools/index.jsx +17 -0
- package/dist/components/form-tools/label.d.ts +2 -0
- package/dist/components/form-tools/label.jsx +63 -0
- package/dist/components/form-tools/shape.d.ts +8 -0
- package/dist/components/form-tools/shape.jsx +113 -0
- package/dist/components/input/number-indicator.d.ts +7 -0
- package/dist/components/input/number-indicator.jsx +36 -0
- package/dist/components/joystick/index.d.ts +12 -0
- package/dist/components/joystick/index.jsx +49 -0
- package/dist/components/layer/index.d.ts +19 -0
- package/dist/components/layer/index.jsx +383 -0
- package/dist/components/layer-v2/index.d.ts +19 -0
- package/dist/components/layer-v2/index.jsx +370 -0
- package/dist/components/layer-v3/index.d.ts +13 -0
- package/dist/components/layer-v3/index.jsx +631 -0
- package/dist/components/layer-v3/utils.d.ts +19 -0
- package/dist/components/layer-v3/utils.js +72 -0
- package/dist/components/layer-v4/constant.d.ts +60 -0
- package/dist/components/layer-v4/constant.js +93 -0
- package/dist/components/layer-v4/index.d.ts +24 -0
- package/dist/components/layer-v4/index.jsx +1046 -0
- package/dist/components/lib/index.d.ts +8 -0
- package/dist/components/lib/index.jsx +33 -0
- package/dist/components/modal-preview/index.d.ts +4 -0
- package/dist/components/modal-preview/index.jsx +11 -0
- package/dist/dto/event-handler.d.ts +1 -0
- package/dist/dto/event-handler.js +1 -0
- package/dist/dto/table.d.ts +80 -0
- package/dist/dto/table.js +1 -0
- package/dist/features/board/board-slice.d.ts +14 -0
- package/dist/features/board/board-slice.js +52 -0
- package/dist/features/board/index.d.ts +6 -0
- package/dist/features/board/index.jsx +725 -0
- package/dist/features/board-v2/board-slice.d.ts +14 -0
- package/dist/features/board-v2/board-slice.js +52 -0
- package/dist/features/board-v2/index.d.ts +8 -0
- package/dist/features/board-v2/index.jsx +869 -0
- package/dist/features/board-v3/board-slice.d.ts +19 -0
- package/dist/features/board-v3/board-slice.js +274 -0
- package/dist/features/board-v3/constant.d.ts +5 -0
- package/dist/features/board-v3/constant.js +5 -0
- package/dist/features/board-v3/history-slice.d.ts +27 -0
- package/dist/features/board-v3/history-slice.js +27 -0
- package/dist/features/board-v3/icons.d.ts +4 -0
- package/dist/features/board-v3/icons.jsx +100 -0
- package/dist/features/board-v3/index.d.ts +16 -0
- package/dist/features/board-v3/index.jsx +1678 -0
- package/dist/features/board-v3/polygon.d.ts +28 -0
- package/dist/features/board-v3/polygon.js +109 -0
- package/dist/features/board-v3/rect.d.ts +9 -0
- package/dist/features/board-v3/rect.js +152 -0
- package/dist/features/board-v3/resize-element.d.ts +12 -0
- package/dist/features/board-v3/resize-element.js +43 -0
- package/dist/features/board-v3/utils.d.ts +180 -0
- package/dist/features/board-v3/utils.js +1235 -0
- package/dist/features/navbar/index.d.ts +2 -0
- package/dist/features/navbar/index.jsx +5 -0
- package/dist/features/panel/index.d.ts +6 -0
- package/dist/features/panel/index.jsx +251 -0
- package/dist/features/panel/panel-slice.d.ts +23 -0
- package/dist/features/panel/panel-slice.js +46 -0
- package/dist/features/panel/select-tool.d.ts +6 -0
- package/dist/features/panel/select-tool.jsx +70 -0
- package/dist/features/panel/selected-group.d.ts +2 -0
- package/dist/features/panel/selected-group.jsx +93 -0
- package/dist/features/panel/square-circle-tool.d.ts +2 -0
- package/dist/features/panel/square-circle-tool.jsx +10 -0
- package/dist/features/panel/table-seat-circle.d.ts +2 -0
- package/dist/features/panel/table-seat-circle.jsx +36 -0
- package/dist/features/panel/table-seat-square.d.ts +2 -0
- package/dist/features/panel/table-seat-square.jsx +51 -0
- package/dist/features/panel/text-tool.d.ts +2 -0
- package/dist/features/panel/text-tool.jsx +57 -0
- package/dist/features/panel/upload-tool.d.ts +10 -0
- package/dist/features/panel/upload-tool.jsx +176 -0
- package/dist/features/panel/utils.d.ts +5 -0
- package/dist/features/panel/utils.js +47 -0
- package/dist/features/side-tool/index.d.ts +8 -0
- package/dist/features/side-tool/index.jsx +390 -0
- package/dist/features/side-tool/side-tool-slice.d.ts +16 -0
- package/dist/features/side-tool/side-tool-slice.js +28 -0
- package/dist/features/theme/theme-slice.d.ts +12 -0
- package/dist/features/theme/theme-slice.js +15 -0
- package/dist/features/view-only/index.d.ts +19 -0
- package/dist/features/view-only/index.jsx +205 -0
- package/dist/features/view-only-2/index.d.ts +19 -0
- package/dist/features/view-only-2/index.jsx +190 -0
- package/dist/features/view-only-3/index.d.ts +89 -0
- package/dist/features/view-only-3/index.jsx +590 -0
- package/dist/features/view-only-3/utils.d.ts +1 -0
- package/dist/features/view-only-3/utils.js +3 -0
- package/dist/hooks/use-redux.d.ts +4 -0
- package/dist/hooks/use-redux.js +3 -0
- package/dist/index.js +10 -0
- package/dist/libs/middleware.d.ts +2 -0
- package/dist/libs/middleware.js +5 -0
- package/dist/libs/rootReducer.d.ts +12 -0
- package/dist/libs/rootReducer.js +14 -0
- package/dist/libs/store.d.ts +18 -0
- package/dist/libs/store.js +19 -0
- package/dist/provider/antd-provider.d.ts +4 -0
- package/dist/provider/antd-provider.jsx +46 -0
- package/dist/provider/redux-provider.d.ts +3 -0
- package/dist/provider/redux-provider.jsx +6 -0
- package/dist/provider/store-provider.d.ts +4 -0
- package/dist/provider/store-provider.jsx +10 -0
- package/dist/utils/constant.d.ts +3 -0
- package/dist/utils/constant.js +13 -0
- package/dist/utils/format.d.ts +2 -0
- package/dist/utils/format.js +29 -0
- package/dist/utils/injectCss.d.ts +1 -0
- package/dist/utils/injectCss.js +13 -0
- package/dist/utils/regex.d.ts +3 -0
- package/dist/utils/regex.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Component {
|
|
2
|
+
id: string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface InitialState {
|
|
6
|
+
components: Component[];
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
themeColor: string;
|
|
9
|
+
extraComponents: Component[];
|
|
10
|
+
flagChange: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "board/addComponent">, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "board/removeComponent">, updateComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "board/updateComponent">, setBackgroundColor: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "board/setBackgroundColor">, removeExtraComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "board/removeExtraComponent">;
|
|
13
|
+
declare const _default: import("redux").Reducer<InitialState>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
const initialState = {
|
|
3
|
+
components: [],
|
|
4
|
+
backgroundColor: "#FFFFFF",
|
|
5
|
+
themeColor: "#4A90E2",
|
|
6
|
+
extraComponents: [],
|
|
7
|
+
flagChange: false
|
|
8
|
+
};
|
|
9
|
+
const boardSlice = createSlice({
|
|
10
|
+
name: "board",
|
|
11
|
+
initialState,
|
|
12
|
+
reducers: {
|
|
13
|
+
addComponent: (state, action) => {
|
|
14
|
+
state.components.push(action.payload);
|
|
15
|
+
},
|
|
16
|
+
removeComponent: (state, action) => {
|
|
17
|
+
state.components = state.components.filter((component) => component.id !== action.payload.id);
|
|
18
|
+
},
|
|
19
|
+
removeExtraComponent: (state, action) => {
|
|
20
|
+
state.extraComponents = state.extraComponents.filter((component) => component.id !== action.payload.id);
|
|
21
|
+
},
|
|
22
|
+
updateComponent: (state, action) => {
|
|
23
|
+
const index = state.components.findIndex((component) => component.id === action.payload.id);
|
|
24
|
+
const indexExtra = state.extraComponents.findIndex((extraComponent) => extraComponent.id === action.payload.id);
|
|
25
|
+
if (index !== -1) {
|
|
26
|
+
// Update component biasa
|
|
27
|
+
state.components[index] = Object.assign(Object.assign({}, state.components[index]), action.payload);
|
|
28
|
+
}
|
|
29
|
+
else if (indexExtra !== -1) {
|
|
30
|
+
// Update extraComponent
|
|
31
|
+
state.extraComponents[indexExtra] = Object.assign(Object.assign({}, state.extraComponents[indexExtra]), action.payload);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setBackgroundColor: (state, action) => {
|
|
35
|
+
state.backgroundColor = action.payload;
|
|
36
|
+
},
|
|
37
|
+
setNewComponents: (state, action) => {
|
|
38
|
+
state.components = action.payload;
|
|
39
|
+
},
|
|
40
|
+
setNewExtraComponents: (state, action) => {
|
|
41
|
+
state.extraComponents = action.payload;
|
|
42
|
+
},
|
|
43
|
+
setExtraComponent: (state, action) => {
|
|
44
|
+
state.extraComponents.push(action.payload);
|
|
45
|
+
},
|
|
46
|
+
setFlagChange: (state, action) => {
|
|
47
|
+
state.flagChange = action.payload;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export const { addComponent, removeComponent, updateComponent, setBackgroundColor, removeExtraComponent } = boardSlice.actions;
|
|
52
|
+
export default boardSlice.reducer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BoardTemplateProps {
|
|
3
|
+
onSelectComponent?: (items: any) => void;
|
|
4
|
+
mappingKey?: string;
|
|
5
|
+
viewOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const BoardTemplate: ({ onSelectComponent, viewOnly }: BoardTemplateProps) => React.JSX.Element;
|
|
8
|
+
export default BoardTemplate;
|