seat-editor 3.3.46 → 3.4.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.
Files changed (75) hide show
  1. package/dist/app/constant.d.ts +3 -0
  2. package/dist/app/constant.js +2 -1
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/new-board/page.js +6 -1
  6. package/dist/app/new-board/page.jsx +6 -1
  7. package/dist/app/old-board/page.d.ts +1 -2
  8. package/dist/app/only-view/chair.d.ts +1 -1
  9. package/dist/app/only-view/chair.js +2 -10
  10. package/dist/app/only-view/page.d.ts +1 -1
  11. package/dist/app/only-view/page.js +7 -7
  12. package/dist/app/only-view/user.d.ts +1 -1
  13. package/dist/app/only-view/user.js +2 -10
  14. package/dist/app/page.d.ts +1 -1
  15. package/dist/app/test/page.d.ts +1 -2
  16. package/dist/app/v2/page.d.ts +1 -1
  17. package/dist/components/button-tools/index.d.ts +1 -1
  18. package/dist/components/form-tools/label.d.ts +1 -1
  19. package/dist/components/form-tools/label.js +8 -4
  20. package/dist/components/form-tools/label.jsx +27 -21
  21. package/dist/components/form-tools/shape.d.ts +1 -1
  22. package/dist/components/form-tools/shape.js +41 -16
  23. package/dist/components/form-tools/shape.jsx +35 -14
  24. package/dist/components/input/number-indicator.d.ts +1 -1
  25. package/dist/components/joystick/index.d.ts +1 -2
  26. package/dist/components/layer/index.d.ts +1 -1
  27. package/dist/components/layer-v2/index.d.ts +1 -1
  28. package/dist/components/layer-v3/index.d.ts +1 -1
  29. package/dist/components/layer-v4/index.d.ts +1 -1
  30. package/dist/components/lib/index.d.ts +1 -1
  31. package/dist/components/modal-preview/index.d.ts +1 -1
  32. package/dist/features/board/index.d.ts +1 -1
  33. package/dist/features/board-v2/index.d.ts +1 -2
  34. package/dist/features/board-v3/index.d.ts +1 -1
  35. package/dist/features/board-v3/index.js +12 -5
  36. package/dist/features/board-v3/index.jsx +12 -5
  37. package/dist/features/navbar/index.d.ts +1 -1
  38. package/dist/features/package/index.d.ts +2 -1
  39. package/dist/features/package/index.js +22 -17
  40. package/dist/features/package/index.jsx +22 -17
  41. package/dist/features/panel/index.d.ts +1 -1
  42. package/dist/features/panel/index.js +26 -13
  43. package/dist/features/panel/index.jsx +26 -13
  44. package/dist/features/panel/panel-slice.d.ts +2 -0
  45. package/dist/features/panel/panel-slice.js +3 -0
  46. package/dist/features/panel/select-tool.d.ts +1 -1
  47. package/dist/features/panel/select-tool.js +31 -14
  48. package/dist/features/panel/select-tool.jsx +31 -24
  49. package/dist/features/panel/selected-group.d.ts +1 -1
  50. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  51. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  52. package/dist/features/panel/table-seat-circle.js +2 -2
  53. package/dist/features/panel/table-seat-circle.jsx +6 -14
  54. package/dist/features/panel/table-seat-square.d.ts +1 -1
  55. package/dist/features/panel/table-seat-square.js +8 -2
  56. package/dist/features/panel/table-seat-square.jsx +15 -8
  57. package/dist/features/panel/text-tool.d.ts +1 -1
  58. package/dist/features/panel/upload-tool.d.ts +1 -1
  59. package/dist/features/panel/upload-tool.js +3 -1
  60. package/dist/features/panel/upload-tool.jsx +4 -2
  61. package/dist/features/panel/utils.d.ts +8 -2
  62. package/dist/features/panel/utils.js +60 -23
  63. package/dist/features/side-tool/index.d.ts +1 -1
  64. package/dist/features/side-tool/index.js +9 -3
  65. package/dist/features/side-tool/index.jsx +16 -4
  66. package/dist/features/view-only/index.d.ts +1 -1
  67. package/dist/features/view-only-2/index.d.ts +1 -1
  68. package/dist/features/view-only-2/index.js +6 -4
  69. package/dist/features/view-only-2/index.jsx +5 -3
  70. package/dist/features/view-only-3/index.d.ts +1 -1
  71. package/dist/features/view-only-3/index.js +7 -5
  72. package/dist/features/view-only-3/index.jsx +7 -9
  73. package/dist/provider/redux-provider.d.ts +1 -1
  74. package/dist/provider/store-provider.d.ts +1 -1
  75. package/package.json +1 -1
@@ -88,9 +88,11 @@ const LayerView = (props) => {
88
88
  payload: defaultBoundingBox,
89
89
  });
90
90
  // }
91
- setTimeout(() => {
92
- dispatch({ type: "panel/setLoading", payload: false });
93
- }, 1000);
91
+ if (loading) {
92
+ setTimeout(() => {
93
+ dispatch({ type: "panel/setLoading", payload: false });
94
+ }, 1000);
95
+ }
94
96
  }, [
95
97
  componentProps,
96
98
  extraComponentProps,
@@ -91,5 +91,5 @@ export interface LayerViewProps<TMeta = undefined> {
91
91
  rightClick: boolean;
92
92
  };
93
93
  }
94
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
94
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
95
95
  export default LayerView;
@@ -90,9 +90,11 @@ const LayerView = (props) => {
90
90
  payload: defaultBoundingBox,
91
91
  });
92
92
  // }
93
- setTimeout(() => {
94
- dispatch({ type: "panel/setLoading", payload: false });
95
- }, 1000);
93
+ if (loading) {
94
+ setTimeout(() => {
95
+ dispatch({ type: "panel/setLoading", payload: false });
96
+ }, 1000);
97
+ }
96
98
  }, [
97
99
  componentProps,
98
100
  extraComponentProps,
@@ -326,7 +328,7 @@ const LayerView = (props) => {
326
328
  : !((_a = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _a === void 0 ? void 0 : _a.some((_) => {
327
329
  const dataRaw = originalData({ id: ghostId, type: "find" });
328
330
  return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
329
- }))) && !(actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.switch);
331
+ }))) && ((actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.move) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.switch));
330
332
  if (ghostAttributes) {
331
333
  Object.keys(ghostAttributes).forEach((key) => {
332
334
  ghost.setAttribute(key, ghostAttributes[key]);
@@ -433,7 +435,7 @@ const LayerView = (props) => {
433
435
  }
434
436
  if (isDragging.current && hasMoved && allowedDrag) {
435
437
  // drag between group
436
- console.log("drag between group");
438
+ // console.log("drag between group");
437
439
  const dataHoveredGhost = hoverUnderghostId.current;
438
440
  const sourceTable = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
439
441
  const data = {
@@ -89,9 +89,11 @@ const LayerView = (props) => {
89
89
  payload: defaultBoundingBox,
90
90
  });
91
91
  // }
92
- setTimeout(() => {
93
- dispatch({ type: "panel/setLoading", payload: false });
94
- }, 1000);
92
+ if (loading) {
93
+ setTimeout(() => {
94
+ dispatch({ type: "panel/setLoading", payload: false });
95
+ }, 1000);
96
+ }
95
97
  }, [
96
98
  componentProps,
97
99
  extraComponentProps,
@@ -300,7 +302,7 @@ const LayerView = (props) => {
300
302
  return { x: transformed.x, y: transformed.y };
301
303
  };
302
304
  const handlePointerDown = (e) => {
303
- var _a, _b;
305
+ var _a;
304
306
  const svg = svgRef.current;
305
307
  if (!e.isPrimary)
306
308
  return;
@@ -326,10 +328,6 @@ const LayerView = (props) => {
326
328
  const dataRaw = originalData({ id: ghostId, type: "find" });
327
329
  return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
328
330
  }))) && ((actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.move) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.switch));
329
- console.log({ allowedDrag }, !((_b = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _b === void 0 ? void 0 : _b.some((_) => {
330
- const dataRaw = originalData({ id: ghostId, type: "find" });
331
- return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
332
- })), ((actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.move) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.switch)));
333
331
  if (ghostAttributes) {
334
332
  Object.keys(ghostAttributes).forEach((key) => {
335
333
  ghost.setAttribute(key, ghostAttributes[key]);
@@ -436,7 +434,7 @@ const LayerView = (props) => {
436
434
  }
437
435
  if (isDragging.current && hasMoved && allowedDrag) {
438
436
  // drag between group
439
- console.log("drag between group");
437
+ // console.log("drag between group");
440
438
  const dataHoveredGhost = hoverUnderghostId.current;
441
439
  const sourceTable = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
442
440
  const data = {
@@ -1,3 +1,3 @@
1
1
  export declare const ReduxProvider: ({ children }: {
2
2
  children: React.ReactNode;
3
- }) => import("react").JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export declare const StoreProvider: ({ children, themeColor, }: {
2
2
  children: React.ReactNode;
3
3
  themeColor?: string;
4
- }) => import("react").JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.3.46",
3
+ "version": "3.4.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",