@dmsi/wedgekit-react 0.0.644 → 0.0.645

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 (68) hide show
  1. package/dist/{chunk-XVWCVBVF.js → chunk-3MV3KMQH.js} +1 -1
  2. package/dist/{chunk-Z3Q7PLVD.js → chunk-3PBA2EZ5.js} +1 -1
  3. package/dist/{chunk-LN3HVXH5.js → chunk-B3T7KBDA.js} +1 -1
  4. package/dist/{chunk-VAARSN7U.js → chunk-EXCAOI2L.js} +3 -3
  5. package/dist/{chunk-OXOMO76M.js → chunk-FCGPQNS2.js} +1 -1
  6. package/dist/{chunk-J2QD64F2.js → chunk-FJXWYGB7.js} +5 -5
  7. package/dist/{chunk-V2GSI3ZX.js → chunk-HIGNJAQA.js} +2 -2
  8. package/dist/{chunk-NUFBAJ6L.js → chunk-ISRG77J6.js} +1 -1
  9. package/dist/{chunk-YXZRGZ2I.js → chunk-REC2XOPI.js} +1 -1
  10. package/dist/{chunk-K22B4L3G.js → chunk-ZSRTAMSW.js} +28 -1
  11. package/dist/components/CalendarRange.cjs +157 -154
  12. package/dist/components/CalendarRange.js +11 -11
  13. package/dist/components/CompactImagesPreview.cjs +6 -3
  14. package/dist/components/CompactImagesPreview.js +2 -2
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +157 -154
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +11 -11
  17. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +157 -154
  18. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +11 -11
  19. package/dist/components/DataGrid/PinnedColumns.cjs +157 -154
  20. package/dist/components/DataGrid/PinnedColumns.js +11 -11
  21. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +157 -154
  22. package/dist/components/DataGrid/TableBody/LoadingCell.js +11 -11
  23. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +157 -154
  24. package/dist/components/DataGrid/TableBody/TableBodyRow.js +11 -11
  25. package/dist/components/DataGrid/TableBody/index.cjs +157 -154
  26. package/dist/components/DataGrid/TableBody/index.js +11 -11
  27. package/dist/components/DataGrid/index.cjs +158 -155
  28. package/dist/components/DataGrid/index.js +11 -11
  29. package/dist/components/DataGrid/utils.cjs +157 -154
  30. package/dist/components/DataGrid/utils.js +11 -11
  31. package/dist/components/DataGridCell.cjs +61 -58
  32. package/dist/components/DataGridCell.js +5 -5
  33. package/dist/components/DateInput.cjs +150 -147
  34. package/dist/components/DateInput.js +11 -11
  35. package/dist/components/DateRangeInput.cjs +163 -160
  36. package/dist/components/DateRangeInput.js +11 -11
  37. package/dist/components/Menu.cjs +15 -12
  38. package/dist/components/Menu.js +3 -3
  39. package/dist/components/MenuOption.cjs +8 -5
  40. package/dist/components/MenuOption.js +2 -2
  41. package/dist/components/MobileDataGrid/ColumnList.js +1 -1
  42. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +161 -158
  43. package/dist/components/MobileDataGrid/ColumnSelector/index.js +11 -11
  44. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
  45. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +161 -158
  46. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +11 -11
  47. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
  48. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +19 -16
  49. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +4 -4
  50. package/dist/components/MobileDataGrid/index.cjs +170 -167
  51. package/dist/components/MobileDataGrid/index.js +11 -11
  52. package/dist/components/Modal.cjs +15 -12
  53. package/dist/components/Modal.js +2 -2
  54. package/dist/components/NestedMenu.cjs +11 -8
  55. package/dist/components/NestedMenu.js +2 -2
  56. package/dist/components/PDFViewer/index.cjs +31 -28
  57. package/dist/components/PDFViewer/index.js +2 -2
  58. package/dist/components/ProductImagePreview/index.cjs +18 -15
  59. package/dist/components/ProductImagePreview/index.js +2 -2
  60. package/dist/components/ProjectBar.cjs +3 -0
  61. package/dist/components/ProjectBar.js +1 -1
  62. package/dist/components/index.cjs +218 -215
  63. package/dist/components/index.js +11 -11
  64. package/dist/components/useMenuSystem.cjs +22 -19
  65. package/dist/components/useMenuSystem.js +2 -2
  66. package/dist/hooks/index.cjs +28 -0
  67. package/dist/hooks/index.js +3 -1
  68. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-5IFPG6TS.js";
7
7
  import {
8
8
  Modal
9
- } from "./chunk-Z3Q7PLVD.js";
9
+ } from "./chunk-3PBA2EZ5.js";
10
10
  import {
11
11
  Heading2
12
12
  } from "./chunk-MXSJF6TW.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-AG43RS4Q.js";
16
16
  import {
17
17
  useMatchesMobile
18
- } from "./chunk-K22B4L3G.js";
18
+ } from "./chunk-ZSRTAMSW.js";
19
19
  import {
20
20
  findDocumentRoot
21
21
  } from "./chunk-VXWSAIB5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMatchesMobile
3
- } from "./chunk-K22B4L3G.js";
3
+ } from "./chunk-ZSRTAMSW.js";
4
4
  import {
5
5
  Stack
6
6
  } from "./chunk-MTGNBARV.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Menu
3
- } from "./chunk-V2GSI3ZX.js";
3
+ } from "./chunk-HIGNJAQA.js";
4
4
  import {
5
5
  useSubMenuSystem
6
- } from "./chunk-NUFBAJ6L.js";
6
+ } from "./chunk-ISRG77J6.js";
7
7
  import {
8
8
  MenuOption
9
- } from "./chunk-YXZRGZ2I.js";
9
+ } from "./chunk-REC2XOPI.js";
10
10
  import {
11
11
  Search
12
12
  } from "./chunk-FHXCCVOG.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-BWPNXY7T.js";
19
19
  import {
20
20
  useMatchesMobile
21
- } from "./chunk-K22B4L3G.js";
21
+ } from "./chunk-ZSRTAMSW.js";
22
22
  import {
23
23
  Stack
24
24
  } from "./chunk-MTGNBARV.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RowDetailModalProvider
3
- } from "./chunk-XVWCVBVF.js";
3
+ } from "./chunk-3MV3KMQH.js";
4
4
  import {
5
5
  GridContextProvider
6
6
  } from "./chunk-M7INAUAJ.js";
@@ -25,13 +25,13 @@ import {
25
25
  DataGridCell,
26
26
  DragAlongCell,
27
27
  DraggableCellHeader
28
- } from "./chunk-VAARSN7U.js";
28
+ } from "./chunk-EXCAOI2L.js";
29
29
  import {
30
30
  Menu
31
- } from "./chunk-V2GSI3ZX.js";
31
+ } from "./chunk-HIGNJAQA.js";
32
32
  import {
33
33
  MenuOption
34
- } from "./chunk-YXZRGZ2I.js";
34
+ } from "./chunk-REC2XOPI.js";
35
35
  import {
36
36
  Search
37
37
  } from "./chunk-FHXCCVOG.js";
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  useInfiniteScroll,
50
50
  useTableLayout
51
- } from "./chunk-K22B4L3G.js";
51
+ } from "./chunk-ZSRTAMSW.js";
52
52
  import {
53
53
  findDocumentRoot
54
54
  } from "./chunk-VXWSAIB5.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useMenuPosition
3
- } from "./chunk-NUFBAJ6L.js";
3
+ } from "./chunk-ISRG77J6.js";
4
4
  import {
5
5
  useMatchesMobile
6
- } from "./chunk-K22B4L3G.js";
6
+ } from "./chunk-ZSRTAMSW.js";
7
7
  import {
8
8
  findDocumentRoot
9
9
  } from "./chunk-VXWSAIB5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMatchesMobile
3
- } from "./chunk-K22B4L3G.js";
3
+ } from "./chunk-ZSRTAMSW.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-HXGJVYGQ.js";
4
4
  import {
5
5
  useMatchesMobile
6
- } from "./chunk-K22B4L3G.js";
6
+ } from "./chunk-ZSRTAMSW.js";
7
7
  import {
8
8
  Caption
9
9
  } from "./chunk-PS6UJZVH.js";
@@ -151,10 +151,37 @@ function useTableLayout(initialColumns, key, autosync = true) {
151
151
  return { columns, setColumns: handleSaveLayout, isReady, getSavedLayout };
152
152
  }
153
153
 
154
+ // src/hooks/useEditCell.tsx
155
+ import { useRef as useRef2, useState as useState3 } from "react";
156
+ function useEditCell(initialValue) {
157
+ const [value, setValue] = useState3(initialValue);
158
+ const [isEdit, setIsEdit] = useState3(false);
159
+ const inputRef = useRef2(null);
160
+ function changeToEditMode() {
161
+ setIsEdit(true);
162
+ requestAnimationFrame(() => {
163
+ var _a;
164
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
165
+ });
166
+ }
167
+ function changeToViewMode() {
168
+ setIsEdit(false);
169
+ }
170
+ return {
171
+ value,
172
+ setValue,
173
+ isEdit,
174
+ inputRef,
175
+ changeToEditMode,
176
+ changeToViewMode
177
+ };
178
+ }
179
+
154
180
  export {
155
181
  useKeydown,
156
182
  useInfiniteScroll,
157
183
  useMatchesMedia,
158
184
  useMatchesMobile,
159
- useTableLayout
185
+ useTableLayout,
186
+ useEditCell
160
187
  };