seat-editor 2.0.0 → 2.1.1

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.
Files changed (101) hide show
  1. package/package.json +1 -1
  2. package/dist/app/constant.d.ts +0 -101
  3. package/dist/app/constant.js +0 -3064
  4. package/dist/app/layout.d.ts +0 -6
  5. package/dist/app/layout.jsx +0 -27
  6. package/dist/app/new-board/page.d.ts +0 -1
  7. package/dist/app/new-board/page.jsx +0 -56
  8. package/dist/app/old-board/page.d.ts +0 -3
  9. package/dist/app/old-board/page.jsx +0 -510
  10. package/dist/app/only-view/constant.d.ts +0 -40
  11. package/dist/app/only-view/constant.js +0 -1336
  12. package/dist/app/only-view/page.d.ts +0 -2
  13. package/dist/app/only-view/page.jsx +0 -40
  14. package/dist/app/page.d.ts +0 -2
  15. package/dist/app/page.jsx +0 -13
  16. package/dist/app/test/page.d.ts +0 -2
  17. package/dist/app/test/page.jsx +0 -45
  18. package/dist/app/v2/page.d.ts +0 -2
  19. package/dist/app/v2/page.jsx +0 -13
  20. package/dist/components/button-tools/index.d.ts +0 -11
  21. package/dist/components/button-tools/index.jsx +0 -17
  22. package/dist/components/form-tools/label.d.ts +0 -2
  23. package/dist/components/form-tools/label.jsx +0 -44
  24. package/dist/components/form-tools/shape.d.ts +0 -4
  25. package/dist/components/form-tools/shape.jsx +0 -66
  26. package/dist/components/input/number-indicator.d.ts +0 -7
  27. package/dist/components/input/number-indicator.jsx +0 -36
  28. package/dist/components/joystick/index.d.ts +0 -12
  29. package/dist/components/joystick/index.jsx +0 -49
  30. package/dist/components/layer/index.d.ts +0 -19
  31. package/dist/components/layer/index.jsx +0 -383
  32. package/dist/components/layer-v2/index.d.ts +0 -19
  33. package/dist/components/layer-v2/index.jsx +0 -370
  34. package/dist/components/layer-v3/index.d.ts +0 -19
  35. package/dist/components/layer-v3/index.jsx +0 -418
  36. package/dist/components/lib/index.d.ts +0 -8
  37. package/dist/components/lib/index.jsx +0 -33
  38. package/dist/components/modal-preview/index.d.ts +0 -4
  39. package/dist/components/modal-preview/index.jsx +0 -11
  40. package/dist/features/board/board-slice.d.ts +0 -14
  41. package/dist/features/board/board-slice.js +0 -52
  42. package/dist/features/board/index.d.ts +0 -6
  43. package/dist/features/board/index.jsx +0 -725
  44. package/dist/features/board-v2/board-slice.d.ts +0 -14
  45. package/dist/features/board-v2/board-slice.js +0 -52
  46. package/dist/features/board-v2/index.d.ts +0 -8
  47. package/dist/features/board-v2/index.jsx +0 -869
  48. package/dist/features/board-v3/board-slice.d.ts +0 -16
  49. package/dist/features/board-v3/board-slice.js +0 -83
  50. package/dist/features/board-v3/history-slice.d.ts +0 -27
  51. package/dist/features/board-v3/history-slice.js +0 -27
  52. package/dist/features/board-v3/index.d.ts +0 -8
  53. package/dist/features/board-v3/index.jsx +0 -863
  54. package/dist/features/navbar/index.d.ts +0 -2
  55. package/dist/features/navbar/index.jsx +0 -5
  56. package/dist/features/package/index.d.ts +0 -31
  57. package/dist/features/package/index.jsx +0 -114
  58. package/dist/features/panel/index.d.ts +0 -11
  59. package/dist/features/panel/index.jsx +0 -138
  60. package/dist/features/panel/panel-slice.d.ts +0 -16
  61. package/dist/features/panel/panel-slice.js +0 -31
  62. package/dist/features/panel/select-tool.d.ts +0 -6
  63. package/dist/features/panel/select-tool.jsx +0 -60
  64. package/dist/features/panel/square-circle-tool.d.ts +0 -2
  65. package/dist/features/panel/square-circle-tool.jsx +0 -10
  66. package/dist/features/panel/table-seat-circle.d.ts +0 -2
  67. package/dist/features/panel/table-seat-circle.jsx +0 -31
  68. package/dist/features/panel/text-tool.d.ts +0 -2
  69. package/dist/features/panel/text-tool.jsx +0 -26
  70. package/dist/features/panel/upload-tool.d.ts +0 -14
  71. package/dist/features/panel/upload-tool.jsx +0 -152
  72. package/dist/features/side-tool/index.d.ts +0 -8
  73. package/dist/features/side-tool/index.jsx +0 -371
  74. package/dist/features/side-tool/side-tool-slice.d.ts +0 -16
  75. package/dist/features/side-tool/side-tool-slice.js +0 -28
  76. package/dist/features/theme/theme-slice.d.ts +0 -12
  77. package/dist/features/theme/theme-slice.js +0 -15
  78. package/dist/features/view/index.d.ts +0 -19
  79. package/dist/features/view/index.jsx +0 -228
  80. package/dist/features/view-only/index.d.ts +0 -19
  81. package/dist/features/view-only/index.jsx +0 -206
  82. package/dist/features/view-only-2/index.d.ts +0 -19
  83. package/dist/features/view-only-2/index.jsx +0 -181
  84. package/dist/hooks/use-redux.d.ts +0 -4
  85. package/dist/hooks/use-redux.js +0 -3
  86. package/dist/index.d.ts +0 -8
  87. package/dist/index.js +0 -8
  88. package/dist/libs/middleware.d.ts +0 -2
  89. package/dist/libs/middleware.js +0 -5
  90. package/dist/libs/rootReducer.d.ts +0 -12
  91. package/dist/libs/rootReducer.js +0 -14
  92. package/dist/libs/store.d.ts +0 -18
  93. package/dist/libs/store.js +0 -19
  94. package/dist/provider/antd-provider.d.ts +0 -4
  95. package/dist/provider/antd-provider.jsx +0 -46
  96. package/dist/provider/redux-provider.d.ts +0 -3
  97. package/dist/provider/redux-provider.jsx +0 -6
  98. package/dist/provider/store-provider.d.ts +0 -4
  99. package/dist/provider/store-provider.jsx +0 -10
  100. package/dist/utils/injectCss.d.ts +0 -1
  101. package/dist/utils/injectCss.js +0 -13
@@ -1,16 +0,0 @@
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
- historyChanges: any[];
12
- pointer: number;
13
- }
14
- 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">;
15
- declare const _default: import("redux").Reducer<InitialState>;
16
- export default _default;
@@ -1,83 +0,0 @@
1
- import { createSlice, current } from "@reduxjs/toolkit";
2
- const initialState = {
3
- components: [],
4
- backgroundColor: "#FFFFFF",
5
- themeColor: "#4A90E2",
6
- extraComponents: [],
7
- flagChange: false,
8
- historyChanges: [],
9
- pointer: 0
10
- };
11
- const MAX_HISTORY_CHANGES = 20;
12
- const boardSlice = createSlice({
13
- name: "board",
14
- initialState,
15
- reducers: {
16
- addComponent: (state, action) => {
17
- state.components.push(action.payload);
18
- },
19
- removeComponent: (state, action) => {
20
- state.components = state.components.filter((component) => component.id !== action.payload.id);
21
- },
22
- removeExtraComponent: (state, action) => {
23
- state.extraComponents = state.extraComponents.filter((component) => component.id !== action.payload.id);
24
- },
25
- updateComponent: (state, action) => {
26
- const index = state.components.findIndex((component) => component.id === action.payload.id);
27
- const indexExtra = state.extraComponents.findIndex((extraComponent) => extraComponent.id === action.payload.id);
28
- state.historyChanges.push(state.components);
29
- if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
30
- state.historyChanges.shift();
31
- }
32
- state.pointer += 1;
33
- if (index !== -1) {
34
- // Update component biasa
35
- state.components[index] = Object.assign(Object.assign({}, state.components[index]), action.payload);
36
- }
37
- else if (indexExtra !== -1) {
38
- // Update extraComponent
39
- state.extraComponents[indexExtra] = Object.assign(Object.assign({}, state.extraComponents[indexExtra]), action.payload);
40
- }
41
- },
42
- setBackgroundColor: (state, action) => {
43
- state.backgroundColor = action.payload;
44
- },
45
- setNewComponents: (state, action) => {
46
- state.components = action.payload;
47
- state.historyChanges.push(state.components);
48
- if (state.historyChanges.length > MAX_HISTORY_CHANGES) {
49
- state.historyChanges.shift();
50
- }
51
- state.pointer += 1;
52
- },
53
- setNewExtraComponents: (state, action) => {
54
- state.extraComponents = action.payload;
55
- },
56
- setExtraComponent: (state, action) => {
57
- state.extraComponents.push(action.payload);
58
- },
59
- setFlagChange: (state, action) => {
60
- state.flagChange = action.payload;
61
- },
62
- undoHistory: (state) => {
63
- if (state.pointer > 1) {
64
- state.pointer -= 1;
65
- const prev = state.historyChanges[state.pointer - 1];
66
- state.components = current(prev);
67
- }
68
- else if (state.pointer === 1) {
69
- state.components = current(state.historyChanges[0]);
70
- state.pointer = 0;
71
- }
72
- },
73
- redoHistory: (state) => {
74
- if (state.pointer < state.historyChanges.length - 1) {
75
- const next = state.historyChanges[state.pointer + 1];
76
- state.components = current(next);
77
- state.pointer += 1;
78
- }
79
- },
80
- },
81
- });
82
- export const { addComponent, removeComponent, updateComponent, setBackgroundColor, removeExtraComponent } = boardSlice.actions;
83
- export default boardSlice.reducer;
@@ -1,27 +0,0 @@
1
- export declare const historySlice: import("@reduxjs/toolkit").Slice<{
2
- past: any[];
3
- future: any[];
4
- }, {
5
- addPast: (state: import("immer").WritableDraft<{
6
- past: any[];
7
- future: any[];
8
- }>, action: {
9
- payload: any;
10
- type: string;
11
- }) => void;
12
- addFuture: (state: import("immer").WritableDraft<{
13
- past: any[];
14
- future: any[];
15
- }>, action: {
16
- payload: any;
17
- type: string;
18
- }) => void;
19
- }, "history", "history", import("@reduxjs/toolkit").SliceSelectors<{
20
- past: any[];
21
- future: any[];
22
- }>>;
23
- declare const _default: import("redux").Reducer<{
24
- past: any[];
25
- future: any[];
26
- }>;
27
- export default _default;
@@ -1,27 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {
3
- past: [],
4
- future: [],
5
- };
6
- const MAX_HISTORY = 20;
7
- export const historySlice = createSlice({
8
- name: "history",
9
- initialState,
10
- reducers: {
11
- addPast: (state, action) => {
12
- state.past.push(action.payload);
13
- if (state.past.length > MAX_HISTORY) {
14
- state.past.shift();
15
- }
16
- state.future = [];
17
- },
18
- addFuture: (state, action) => {
19
- state.future.push(action.payload);
20
- if (state.future.length > MAX_HISTORY) {
21
- state.future.shift();
22
- }
23
- state.past = [];
24
- },
25
- },
26
- });
27
- export default historySlice.reducer;
@@ -1,8 +0,0 @@
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;