seat-editor 3.3.21 → 3.3.22

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.
@@ -46,7 +46,7 @@ const UploadTool = ({ name, type, action, defaultValue, transform }) => {
46
46
  const widthWorkspace = ((_b = document === null || document === void 0 ? void 0 : document.getElementById("workspace")) === null || _b === void 0 ? void 0 : _b.clientWidth) || 0;
47
47
  const heightWorkspace = ((_c = document === null || document === void 0 ? void 0 : document.getElementById("workspace")) === null || _c === void 0 ? void 0 : _c.clientHeight) || 0;
48
48
  const defaultFormatValue = (width, height, src, id, x, y) => ({
49
- id: id || new Date().getTime(),
49
+ id: String(id) || `${Date.now()}`,
50
50
  x: x || Math.abs(transformState === null || transformState === void 0 ? void 0 : transformState.positionX),
51
51
  y: y || Math.abs(transformState === null || transformState === void 0 ? void 0 : transformState.positionY),
52
52
  width: width < 1 ? 200 : width,
@@ -73,11 +73,11 @@ const UploadTool = ({ name, type, action, defaultValue, transform }) => {
73
73
  if (isEdit) {
74
74
  dispatch({
75
75
  type: "board/updateComponent",
76
- payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, src, Number(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
76
+ payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, src, String(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
77
77
  });
78
78
  dispatch({
79
79
  type: "panel/setSelectedComponent",
80
- payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, src, Number(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
80
+ payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, src, String(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
81
81
  });
82
82
  setDefaultSrc(src);
83
83
  dispatch({ type: "board/setFlagChange", payload: true });
@@ -108,11 +108,11 @@ const UploadTool = ({ name, type, action, defaultValue, transform }) => {
108
108
  if (isEdit) {
109
109
  dispatch({
110
110
  type: "board/updateComponent",
111
- payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, img.src, Number(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
111
+ payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, img.src, selectedComponent.id, selectedComponent.x, selectedComponent.y)),
112
112
  });
113
113
  dispatch({
114
114
  type: "panel/setSelectedComponent",
115
- payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, img.src, Number(selectedComponent.id), selectedComponent.x, selectedComponent.y)),
115
+ payload: Object.assign({}, defaultFormatValue(selectedComponent.width, selectedComponent.height, img.src, selectedComponent.id, selectedComponent.x, selectedComponent.y)),
116
116
  });
117
117
  setDefaultSrc(img.src);
118
118
  dispatch({ type: "board/setFlagChange", payload: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.3.21",
3
+ "version": "3.3.22",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",