@sheetxl/react 0.7.28-beta.4 → 0.8.0-beta.10

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 (245) hide show
  1. package/browser/esm/BHjeSMaycUkS5dVL.mjs +66 -0
  2. package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
  3. package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
  4. package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
  5. package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
  6. package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
  7. package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
  8. package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
  9. package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
  10. package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
  11. package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
  12. package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
  13. package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
  14. package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
  15. package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
  16. package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
  17. package/browser/esm/chart.mjs +60 -0
  18. package/browser/esm/control.mjs +216 -0
  19. package/browser/esm/group.mjs +123 -0
  20. package/browser/esm/index.mjs +14122 -8944
  21. package/browser/esm/note.mjs +86 -0
  22. package/browser/esm/picture.mjs +86 -0
  23. package/{node/esm/Ban9guHVB-Vxa-tq.mjs → browser/esm/shape.mjs} +2 -4
  24. package/browser/esm/slicer.mjs +276 -0
  25. package/licenses/dependencies.txt +6 -599
  26. package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
  27. package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
  28. package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
  29. package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
  30. package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
  31. package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
  32. package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
  33. package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
  34. package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
  35. package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
  36. package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
  37. package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
  38. package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
  39. package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
  40. package/node/esm/chart.mjs +60 -0
  41. package/node/esm/control.mjs +216 -0
  42. package/node/esm/group.mjs +123 -0
  43. package/node/esm/index.mjs +16649 -11320
  44. package/node/esm/note.mjs +87 -0
  45. package/node/esm/picture.mjs +86 -0
  46. package/node/esm/shape.mjs +783 -0
  47. package/node/esm/slicer.mjs +278 -0
  48. package/package.json +53 -14
  49. package/resources/contents.json +18 -0
  50. package/resources/locales/contents.json +42 -0
  51. package/resources/locales/de/movable.cmd.json +154 -0
  52. package/resources/locales/de/picture.cmd.json +31 -0
  53. package/resources/locales/de/selection.cmd.json +8 -0
  54. package/resources/locales/de/shape.cmd.json +17 -0
  55. package/resources/locales/de/sheet.cmd.json +328 -21
  56. package/resources/locales/de/slicer.cmd.json +17 -0
  57. package/resources/locales/de/table.cmd.json +9 -1
  58. package/resources/locales/de/ui.msg.json +309 -3
  59. package/resources/locales/de/workbook.cmd.json +10 -6
  60. package/resources/locales/en/movable.cmd.json +154 -0
  61. package/resources/locales/en/picture.cmd.json +31 -0
  62. package/resources/locales/en/selection.cmd.json +8 -0
  63. package/resources/locales/en/shape.cmd.json +17 -0
  64. package/resources/locales/en/sheet.cmd.json +342 -22
  65. package/resources/locales/en/slicer.cmd.json +17 -0
  66. package/resources/locales/en/table.cmd.json +9 -1
  67. package/resources/locales/en/ui.msg.json +309 -3
  68. package/resources/locales/en/workbook.cmd.json +11 -7
  69. package/types/chart.d.ts +2 -0
  70. package/types/control.d.ts +2 -0
  71. package/types/group.d.ts +2 -0
  72. package/types/note.d.ts +2 -0
  73. package/types/picture.d.ts +2 -0
  74. package/types/shape.d.ts +2 -0
  75. package/types/slicer.d.ts +2 -0
  76. package/types/src/annotation/RangeAnnotations.d.ts +119 -0
  77. package/types/src/annotation/index.d.ts +2 -0
  78. package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
  79. package/types/src/autoFill/FillMenu.d.ts +36 -0
  80. package/types/src/autoFill/FillSeries.d.ts +38 -0
  81. package/types/src/autoFill/index.d.ts +4 -0
  82. package/types/src/border/StaticBorderRenderer.d.ts +2 -2
  83. package/types/src/border/useBorders.d.ts +7 -7
  84. package/types/src/cell/CornerTriangle.d.ts +6 -0
  85. package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
  86. package/types/src/cell/OutlineButton.d.ts +123 -0
  87. package/types/src/cell/SheetCellRenderer.d.ts +17 -2
  88. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  89. package/types/src/cell/StaticCellRenderer.d.ts +57 -0
  90. package/types/src/cell/index.d.ts +2 -0
  91. package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
  92. package/types/src/chart/index.d.ts +0 -1
  93. package/types/src/checklist/ValueChecklist.d.ts +112 -0
  94. package/types/src/checklist/index.d.ts +2 -0
  95. package/types/src/commands/ContextualToolbar.d.ts +19 -0
  96. package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
  97. package/types/src/commands/index.d.ts +1 -0
  98. package/types/src/comment/CommentCardRequest.d.ts +94 -0
  99. package/types/src/comment/CommentUtils.d.ts +43 -0
  100. package/types/src/comment/NoteEditor.d.ts +20 -0
  101. package/types/src/comment/index.d.ts +5 -0
  102. package/types/src/comment/useCommentThread.d.ts +37 -0
  103. package/types/src/comment/useSheetComments.d.ts +28 -0
  104. package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
  105. package/types/src/conditionalFormat/index.d.ts +1 -0
  106. package/types/src/control/FormControlRenderers.d.ts +22 -0
  107. package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
  108. package/types/src/editor/NamedItemLabel.d.ts +29 -0
  109. package/types/src/editor/NamedItemsPanel.d.ts +13 -2
  110. package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
  111. package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
  112. package/types/src/editor/SheetCellInput.d.ts +26 -2
  113. package/types/src/editor/SheetEditable.d.ts +8 -2
  114. package/types/src/editor/formulaCaret.d.ts +39 -10
  115. package/types/src/editor/formulaEval.d.ts +9 -5
  116. package/types/src/editor/formulaLint.d.ts +36 -0
  117. package/types/src/editor/formulaPresentation.d.ts +7 -0
  118. package/types/src/editor/formulaText.d.ts +17 -5
  119. package/types/src/editor/functionArgs.d.ts +20 -0
  120. package/types/src/editor/index.d.ts +4 -1
  121. package/types/src/editor/pickedReference.d.ts +76 -0
  122. package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
  123. package/types/src/editor/useFormulaHints.d.ts +93 -3
  124. package/types/src/editor/useFormulaInput.d.ts +30 -4
  125. package/types/src/editor/useReferenceMode.d.ts +12 -0
  126. package/types/src/editor/validationAlert.d.ts +24 -0
  127. package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
  128. package/types/src/externalLink/index.d.ts +2 -0
  129. package/types/src/form/FormulaInput.d.ts +18 -2
  130. package/types/src/form/FormulaInputParts.d.ts +10 -1
  131. package/types/src/form/useEditCommit.d.ts +23 -3
  132. package/types/src/form/useInputField.d.ts +2 -3
  133. package/types/src/frame/CommandContext.d.ts +188 -6
  134. package/types/src/group/GroupEditor.d.ts +25 -0
  135. package/types/src/index.d.ts +12 -1
  136. package/types/src/io/WorkbookIO.d.ts +2 -0
  137. package/types/src/layer/CellErrorLayer.d.ts +24 -7
  138. package/types/src/layer/CommentCardLayer.d.ts +43 -0
  139. package/types/src/layer/CommentsLayer.d.ts +35 -0
  140. package/types/src/layer/ConditionalIcons.d.ts +4 -4
  141. package/types/src/layer/FreezeDragLines.d.ts +17 -0
  142. package/types/src/layer/GridFreezeLayer.d.ts +11 -0
  143. package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
  144. package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
  145. package/types/src/layer/HyperlinkLayer.d.ts +109 -0
  146. package/types/src/layer/MovableKindScope.d.ts +17 -0
  147. package/types/src/layer/ProtectionLayer.d.ts +52 -0
  148. package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
  149. package/types/src/layer/ResizeIndicator.d.ts +9 -8
  150. package/types/src/layer/ResizeTooltip.d.ts +13 -0
  151. package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
  152. package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
  153. package/types/src/layer/TableLayer.d.ts +5 -4
  154. package/types/src/layer/TableToolbar.d.ts +42 -0
  155. package/types/src/layer/ValidationDropdownLayer.d.ts +61 -0
  156. package/types/src/layer/ValidationIndicatorLayer.d.ts +14 -21
  157. package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
  158. package/types/src/layer/_tableColor.d.ts +4 -0
  159. package/types/src/layer/cellTip.d.ts +13 -0
  160. package/types/src/layer/freezeDragState.d.ts +21 -0
  161. package/types/src/layer/index.d.ts +14 -0
  162. package/types/src/layer/resizeIndicatorState.d.ts +3 -1
  163. package/types/src/layer/useFreezeDrag.d.ts +22 -0
  164. package/types/src/layer/useValidationPicker.d.ts +54 -0
  165. package/types/src/layer/validationMark.d.ts +63 -0
  166. package/types/src/listener/useModelListener.d.ts +4 -4
  167. package/types/src/movable/ConnectionSites.d.ts +18 -0
  168. package/types/src/movable/IMovableArea.d.ts +56 -0
  169. package/types/src/movable/MovableAdornment.d.ts +26 -0
  170. package/types/src/movable/MovableCommandGroups.d.ts +40 -0
  171. package/types/src/movable/MovableCommands.d.ts +6 -1
  172. package/types/src/movable/MovableControl.d.ts +78 -0
  173. package/types/src/movable/MovableEdit.d.ts +22 -0
  174. package/types/src/movable/MovableFrame.d.ts +16 -13
  175. package/types/src/movable/MovableLayer.d.ts +25 -7
  176. package/types/src/movable/MovableRenderers.d.ts +210 -0
  177. package/types/src/movable/PlaceholderFrames.d.ts +11 -0
  178. package/types/src/movable/RotateHandle.d.ts +37 -0
  179. package/types/src/movable/TextBox.d.ts +34 -0
  180. package/types/src/movable/connect.d.ts +16 -0
  181. package/types/src/movable/framePlacement.d.ts +72 -0
  182. package/types/src/movable/geometry.d.ts +61 -0
  183. package/types/src/movable/index.d.ts +10 -0
  184. package/types/src/movable/pressTarget.d.ts +20 -0
  185. package/types/src/picker/PickerPanel.d.ts +52 -0
  186. package/types/src/picker/cellPickerOpen.d.ts +6 -0
  187. package/types/src/picker/index.d.ts +4 -0
  188. package/types/src/picker/useCellPicker.d.ts +95 -0
  189. package/types/src/picture/PictureCommands.d.ts +12 -0
  190. package/types/src/picture/PictureKind.d.ts +7 -0
  191. package/types/src/picture/index.d.ts +0 -1
  192. package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
  193. package/types/src/protection/index.d.ts +3 -0
  194. package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
  195. package/types/src/richText/RichTextEditor.d.ts +41 -0
  196. package/types/src/richText/index.d.ts +2 -0
  197. package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
  198. package/types/src/shape/ConnectorControl.d.ts +46 -0
  199. package/types/src/shape/ShapeCommands.d.ts +11 -0
  200. package/types/src/shape/ShapeControl.d.ts +8 -0
  201. package/types/src/shape/ShapeEditor.d.ts +15 -2
  202. package/types/src/shape/ShapeGallery.d.ts +31 -0
  203. package/types/src/shape/ShapeHandles.d.ts +28 -0
  204. package/types/src/shape/ShapeKind.d.ts +7 -0
  205. package/types/src/shape/ShapeSVG.d.ts +22 -0
  206. package/types/src/shape/ShapeText.d.ts +17 -0
  207. package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
  208. package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
  209. package/types/src/shape/index.d.ts +3 -1
  210. package/types/src/shape/shapeFrame.d.ts +50 -0
  211. package/types/src/shape/shapeStyle.d.ts +82 -0
  212. package/types/src/sheet/ISheetElement.d.ts +62 -65
  213. package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
  214. package/types/src/sheet/SheetCommands.d.ts +21 -6
  215. package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
  216. package/types/src/sheet/SheetScrollbar.d.ts +1 -10
  217. package/types/src/sheet/_freezeAt.d.ts +10 -0
  218. package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
  219. package/types/src/sheet/circularReferences.d.ts +9 -1
  220. package/types/src/sheet/index.d.ts +1 -1
  221. package/types/src/sheet/useCycleHighlight.d.ts +21 -0
  222. package/types/src/slicer/SlicerCommands.d.ts +10 -0
  223. package/types/src/slicer/SlicerEditor.d.ts +8 -2
  224. package/types/src/slicer/SlicerKind.d.ts +7 -0
  225. package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
  226. package/types/src/slicer/index.d.ts +2 -1
  227. package/types/src/slicer/slicerStyles.d.ts +32 -0
  228. package/types/src/tabStrip/TabStrip.d.ts +7 -0
  229. package/types/src/taskPane/ITaskPane.d.ts +12 -1
  230. package/types/src/taskPane/MovablePane.d.ts +17 -0
  231. package/types/src/taskPane/index.d.ts +1 -0
  232. package/types/src/theme/ThemeState.d.ts +14 -1
  233. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  234. package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
  235. package/types/src/workbook/IWorkbookElement.d.ts +24 -0
  236. package/types/src/workbook/WorkbookCommands.d.ts +2 -4
  237. package/types/src/workbook/WorkbookStrip.d.ts +9 -0
  238. package/types/src/workbook/_followOrigin.d.ts +9 -0
  239. package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
  240. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  241. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
  242. package/browser/cjs/index.cjs +0 -35
  243. package/browser/esm/BdJpSdwyWuh-Te5p.mjs +0 -6286
  244. package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
  245. package/types/src/movable/MoveableBundle.d.ts +0 -4
@@ -0,0 +1,278 @@
1
+ /**
2
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./CFFlJxNwgyInjEnh.mjs";
8
+ import { n as t } from "./BfRn5S5V4X8xIAEa.mjs";
9
+ import { i as r, r as o, t as l } from "./DhSq680c5tgMFFbj.mjs";
10
+ import { forwardRef as i, memo as n, useCallback as s, useEffect as a, useLayoutEffect as c, useMemo as d, useReducer as h, useRef as p, useState as u } from "react";
11
+ import { jsx as g, jsxs as m } from "react/jsx-runtime";
12
+ import { useImperativeElement as f, useNotifier as x, useTranslator as y } from "@sheetxl/utils-react";
13
+ var b = () => m("svg", {
14
+ viewBox: "0 0 16 16",
15
+ width: 14,
16
+ height: 14,
17
+ "aria-hidden": !0,
18
+ children: [g("path", {
19
+ d: "M1.5 2.5h10l-4 5v5l-2 1v-6z",
20
+ fill: "none",
21
+ stroke: "currentColor",
22
+ strokeWidth: 1.2,
23
+ strokeLinejoin: "round"
24
+ }), g("path", {
25
+ d: "M10.5 10l4 4M14.5 10l-4 4",
26
+ stroke: "currentColor",
27
+ strokeWidth: 1.2
28
+ })]
29
+ }), v = () => m("svg", {
30
+ viewBox: "0 0 16 16",
31
+ width: 14,
32
+ height: 14,
33
+ "aria-hidden": !0,
34
+ children: [g("path", {
35
+ d: "M1.5 3.5l1.5 1.5 2.5-3M1.5 10.5l1.5 1.5 2.5-3",
36
+ fill: "none",
37
+ stroke: "currentColor",
38
+ strokeWidth: 1.2
39
+ }), g("path", {
40
+ d: "M8 4h7M8 11h7",
41
+ stroke: "currentColor",
42
+ strokeWidth: 1.2
43
+ })]
44
+ }), w = (e) => {
45
+ const t = e?.getTheme().getFontScheme().getMinorFont();
46
+ return {
47
+ fontFamily: (t ? t.includes(" ") ? `"${t}", ` : `${t}, ` : "") + "sans-serif",
48
+ fontSize: "11pt"
49
+ };
50
+ }, k = n(i((i, n) => {
51
+ const { children: k, disabled: C, style: S, slicer: M, movable: D, zoom: R = 1, isDragging: z, onHide: F, onShow: I, onDragZone: N, adornmentHost: O, flip: j, gesture: H, ...E } = i, K = y(), T = x(), P = (t() ?? M.getTable()?.getSheet() ?? null)?.getStyles() ?? null, [W, $] = h((e) => e + 1, 0);
52
+ e(M, {
53
+ onAnyChange: $,
54
+ onReferencesChange: $
55
+ }), a(() => P?.addListeners({ onAnyChange: $ }), [P]);
56
+ const [A, B] = u([]);
57
+ a(() => {
58
+ let e = !0;
59
+ if (!M.isDeleted()) return M.getItems().then((t) => {
60
+ e && B(t);
61
+ }).catch(() => {
62
+ e && B([]);
63
+ }), () => {
64
+ e = !1;
65
+ };
66
+ }, [M, W]);
67
+ const [L, J] = u(!1), [X, Y] = u(null), Z = p(null), q = p(null), G = p(null), [Q, U] = u(!1);
68
+ c(() => {
69
+ const e = G.current;
70
+ if (!e) return;
71
+ const t = () => U(e.scrollHeight > e.clientHeight);
72
+ if (t(), "undefined" == typeof ResizeObserver) return;
73
+ const r = new ResizeObserver(t);
74
+ return r.observe(e), () => r.disconnect();
75
+ }, [
76
+ A,
77
+ M.getRowHeight(),
78
+ M.getColumnCount(),
79
+ M.isShowCaption()
80
+ ]), c(() => {
81
+ N?.((e) => {
82
+ const t = e.target;
83
+ return !t || !G.current?.contains(t) && !t.closest?.("button");
84
+ });
85
+ }, [N]);
86
+ const V = p(!1), _ = M.getColumnCount(), ee = M.getRowHeight();
87
+ c(() => {
88
+ if (V.current || 0 === A.length || !G.current) return;
89
+ V.current = !0;
90
+ const e = M.toJSON()?.startItem ?? 0;
91
+ e > 0 && (G.current.scrollTop = Math.floor(e / _) * (ee + 4));
92
+ }, [
93
+ A,
94
+ _,
95
+ ee
96
+ ]);
97
+ const te = s((e) => {
98
+ M.selectItems(e).catch((e) => T.showError(e));
99
+ }, [M, T]), re = s((e, t) => {
100
+ if (C) return;
101
+ const r = A.map((e) => e.key), o = M.isFilterCleared() ? [] : A.filter((e) => e.isSelected).map((e) => e.key), l = Z.current;
102
+ if (t.shiftKey && null !== l && r.includes(l)) {
103
+ const i = r.indexOf(l), n = r.indexOf(e.key), s = r.slice(Math.min(i, n), Math.max(i, n) + 1);
104
+ te(t.ctrlKey || t.metaKey ? [.../* @__PURE__ */ new Set([...o, ...s])] : s);
105
+ return;
106
+ }
107
+ Z.current = e.key, t.ctrlKey || t.metaKey || L ? 0 === o.length ? te([e.key]) : o.includes(e.key) ? te(o.filter((t) => t !== e.key)) : te([...o, e.key]) : te([e.key]);
108
+ }, [
109
+ M,
110
+ A,
111
+ L,
112
+ C,
113
+ te
114
+ ]), oe = f(n, () => ({ isSlicerEditor: () => !0 }), []), le = l(M.getStyle(), P), ie = d(() => o(le?.wholeTable, P), [
115
+ le,
116
+ P,
117
+ W
118
+ ]), ne = d(() => o(le?.headerRow, P), [
119
+ le,
120
+ P,
121
+ W
122
+ ]);
123
+ if (M.isDeleted()) return null;
124
+ const se = M.isFilterCleared(), ae = M.isShowCaption(), ce = {
125
+ display: "flex",
126
+ alignItems: "center",
127
+ justifyContent: "center",
128
+ width: 22,
129
+ height: 22,
130
+ padding: 0,
131
+ margin: 0,
132
+ border: "1px solid transparent",
133
+ borderRadius: 2,
134
+ background: "none",
135
+ color: "inherit",
136
+ cursor: "pointer"
137
+ };
138
+ return m("div", {
139
+ className: "slicer-editor",
140
+ ...E,
141
+ ref: oe,
142
+ style: {
143
+ width: "100%",
144
+ height: "100%",
145
+ zoom: R,
146
+ boxSizing: "border-box",
147
+ display: "flex",
148
+ flexDirection: "column",
149
+ overflow: "hidden",
150
+ position: "relative",
151
+ backgroundColor: "var(--sxl-color-base-100, white)",
152
+ border: "var(--sxl-color-neutral, grey) solid 1px",
153
+ ...w(P),
154
+ ...ie,
155
+ filter: C ? "blur(1px)" : void 0,
156
+ boxShadow: z ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
157
+ ...S
158
+ },
159
+ children: [ae ? m("div", {
160
+ ref: q,
161
+ className: "slicer-caption",
162
+ style: {
163
+ display: "flex",
164
+ alignItems: "center",
165
+ gap: 2,
166
+ margin: "0 9px",
167
+ padding: "6px 0 4px 0",
168
+ flex: "none",
169
+ ...ne
170
+ },
171
+ children: [
172
+ g("span", {
173
+ style: {
174
+ flex: "1 1 auto",
175
+ overflow: "hidden",
176
+ textOverflow: "ellipsis",
177
+ whiteSpace: "nowrap"
178
+ },
179
+ children: M.getCaption()
180
+ }),
181
+ g("button", {
182
+ type: "button",
183
+ className: "slicer-multi-select",
184
+ tabIndex: -1,
185
+ title: K("slicer.multiSelect"),
186
+ "aria-label": K("slicer.multiSelect"),
187
+ "aria-pressed": L,
188
+ style: {
189
+ ...ce,
190
+ borderColor: L ? "var(--sxl-color-neutral, grey)" : "transparent",
191
+ backgroundColor: L ? "var(--sxl-color-base-200, #eee)" : void 0
192
+ },
193
+ onClick: () => J((e) => !e),
194
+ children: g(v, {})
195
+ }),
196
+ g("button", {
197
+ type: "button",
198
+ className: "slicer-clear",
199
+ tabIndex: -1,
200
+ title: K("slicer.clearFilter"),
201
+ "aria-label": K("slicer.clearFilter"),
202
+ disabled: se || C,
203
+ style: {
204
+ ...ce,
205
+ opacity: se ? .4 : 1,
206
+ cursor: se ? "default" : "pointer"
207
+ },
208
+ onClick: () => {
209
+ M.clearFilters().catch((e) => T.showError(e));
210
+ },
211
+ children: g(b, {})
212
+ })
213
+ ]
214
+ }) : null, g("div", {
215
+ ref: G,
216
+ className: "slicer-items",
217
+ role: "listbox",
218
+ "aria-multiselectable": !0,
219
+ "aria-label": M.getCaption(),
220
+ style: {
221
+ flex: "1 1 auto",
222
+ minHeight: 0,
223
+ overflowY: "auto",
224
+ overflowX: "hidden",
225
+ overscrollBehavior: "contain",
226
+ "--scrollbar-width": "8px",
227
+ "--scrollbar-border-width": "1px",
228
+ display: "grid",
229
+ gridTemplateColumns: `repeat(${_}, minmax(0, 1fr))`,
230
+ gridAutoRows: `${ee}px`,
231
+ alignContent: "start",
232
+ gap: 4,
233
+ margin: (ae ? 4 : 9) + "px 9px 9px 9px",
234
+ paddingRight: Q ? 3 : 0
235
+ },
236
+ onPointerLeave: () => Y(null),
237
+ children: A.map((e) => {
238
+ const t = r(e.isSelected, e.hasData, X === e.key);
239
+ return g("div", {
240
+ className: "slicer-item",
241
+ role: "option",
242
+ "aria-selected": e.isSelected,
243
+ "data-key": e.key,
244
+ "data-has-data": e.hasData || void 0,
245
+ title: e.name,
246
+ style: {
247
+ boxSizing: "border-box",
248
+ display: "flex",
249
+ alignItems: "center",
250
+ justifyContent: "center",
251
+ padding: "0 4px",
252
+ overflow: "hidden",
253
+ whiteSpace: "nowrap",
254
+ textOverflow: "ellipsis",
255
+ userSelect: "none",
256
+ cursor: C ? void 0 : "pointer",
257
+ border: "1px solid transparent",
258
+ ...o(le?.[t], P)
259
+ },
260
+ onPointerEnter: () => Y(e.key),
261
+ onPointerDown: (e) => {
262
+ 0 === e.button && (e.stopPropagation(), e.preventDefault(), D && !D.isSelected() && D.select());
263
+ },
264
+ onClick: (t) => re(e, t),
265
+ children: g("span", {
266
+ style: {
267
+ overflow: "hidden",
268
+ textOverflow: "ellipsis"
269
+ },
270
+ children: e.name
271
+ })
272
+ }, e.key);
273
+ })
274
+ })]
275
+ });
276
+ }));
277
+ k.displayName = "SlicerEditor";
278
+ export { k as SlicerEditor };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/react",
3
3
  "description": "React - React components needed to build advanced grid and spreadsheet UIs.",
4
- "version": "0.7.28-beta.4",
4
+ "version": "0.8.0-beta.10",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -9,13 +9,54 @@
9
9
  "types": "./types/index.d.ts",
10
10
  "browser": "./browser/esm/index.mjs",
11
11
  "node": "./node/esm/index.mjs",
12
- "import": "./browser/esm/index.mjs",
13
- "require": "./browser/cjs/index.cjs"
12
+ "default": "./browser/esm/index.mjs"
13
+ },
14
+ "./picture": {
15
+ "types": "./types/picture.d.ts",
16
+ "browser": "./browser/esm/picture.mjs",
17
+ "node": "./node/esm/picture.mjs",
18
+ "default": "./browser/esm/picture.mjs"
19
+ },
20
+ "./shape": {
21
+ "types": "./types/shape.d.ts",
22
+ "browser": "./browser/esm/shape.mjs",
23
+ "node": "./node/esm/shape.mjs",
24
+ "default": "./browser/esm/shape.mjs"
25
+ },
26
+ "./group": {
27
+ "types": "./types/group.d.ts",
28
+ "browser": "./browser/esm/group.mjs",
29
+ "node": "./node/esm/group.mjs",
30
+ "default": "./browser/esm/group.mjs"
31
+ },
32
+ "./chart": {
33
+ "types": "./types/chart.d.ts",
34
+ "browser": "./browser/esm/chart.mjs",
35
+ "node": "./node/esm/chart.mjs",
36
+ "default": "./browser/esm/chart.mjs"
37
+ },
38
+ "./slicer": {
39
+ "types": "./types/slicer.d.ts",
40
+ "browser": "./browser/esm/slicer.mjs",
41
+ "node": "./node/esm/slicer.mjs",
42
+ "default": "./browser/esm/slicer.mjs"
43
+ },
44
+ "./note": {
45
+ "types": "./types/note.d.ts",
46
+ "browser": "./browser/esm/note.mjs",
47
+ "node": "./node/esm/note.mjs",
48
+ "default": "./browser/esm/note.mjs"
49
+ },
50
+ "./control": {
51
+ "types": "./types/control.d.ts",
52
+ "browser": "./browser/esm/control.mjs",
53
+ "node": "./node/esm/control.mjs",
54
+ "default": "./browser/esm/control.mjs"
14
55
  }
15
56
  },
16
57
  "types": "./types/index.d.ts",
17
58
  "module": "./browser/esm/index.mjs",
18
- "main": "./browser/cjs/index.cjs",
59
+ "main": "./browser/esm/index.mjs",
19
60
  "sideEffects": [
20
61
  "*.css",
21
62
  "**/*.css"
@@ -48,23 +89,21 @@
48
89
  "@dnd-kit/modifiers": "^9.0.0",
49
90
  "@dnd-kit/sortable": "^10.0.0",
50
91
  "@dnd-kit/utilities": "^3.2.2",
51
- "@sheetxl/grid-react": "^0.7.28-beta.4",
52
- "@sheetxl/io": "^0.7.28-beta.4",
53
- "@sheetxl/sdk": "^0.7.28-beta.4",
54
- "@sheetxl/utils": "^0.7.28-beta.4",
55
- "@sheetxl/utils-react": "^0.7.28-beta.4",
92
+ "@sheetxl/grid-react": "^0.8.0-beta.10",
93
+ "@sheetxl/io": "^0.8.0-beta.10",
94
+ "@sheetxl/sdk": "^0.8.0-beta.10",
95
+ "@sheetxl/utils": "^0.8.0-beta.10",
96
+ "@sheetxl/utils-react": "^0.8.0-beta.10",
56
97
  "clsx": "^2.1.1",
57
98
  "react-merge-refs": "^3.0.2",
58
- "react-moveable": "^0.56.0",
59
- "react-use": "^17.6.1",
60
- "rooks": "^9.8.0"
99
+ "rooks": "^9.9.0"
61
100
  },
62
101
  "peerDependencies": {
63
102
  "react": "^19.0.0",
64
103
  "react-dom": "^19.0.0"
65
104
  },
66
105
  "devDependencies": {
67
- "@types/react": "^19.2.17",
68
- "@types/react-dom": "^19.2.3"
106
+ "@types/react": "^19.3.0",
107
+ "@types/react-dom": "^19.3.0"
69
108
  }
70
109
  }
@@ -12,12 +12,21 @@
12
12
  {
13
13
  "path": "locales/de/movable.cmd.json"
14
14
  },
15
+ {
16
+ "path": "locales/de/picture.cmd.json"
17
+ },
15
18
  {
16
19
  "path": "locales/de/selection.cmd.json"
17
20
  },
21
+ {
22
+ "path": "locales/de/shape.cmd.json"
23
+ },
18
24
  {
19
25
  "path": "locales/de/sheet.cmd.json"
20
26
  },
27
+ {
28
+ "path": "locales/de/slicer.cmd.json"
29
+ },
21
30
  {
22
31
  "path": "locales/de/table.cmd.json"
23
32
  },
@@ -36,12 +45,21 @@
36
45
  {
37
46
  "path": "locales/en/movable.cmd.json"
38
47
  },
48
+ {
49
+ "path": "locales/en/picture.cmd.json"
50
+ },
39
51
  {
40
52
  "path": "locales/en/selection.cmd.json"
41
53
  },
54
+ {
55
+ "path": "locales/en/shape.cmd.json"
56
+ },
42
57
  {
43
58
  "path": "locales/en/sheet.cmd.json"
44
59
  },
60
+ {
61
+ "path": "locales/en/slicer.cmd.json"
62
+ },
45
63
  {
46
64
  "path": "locales/en/table.cmd.json"
47
65
  },
@@ -23,6 +23,13 @@
23
23
  "scope": "movable",
24
24
  "sourceId": "movable"
25
25
  },
26
+ {
27
+ "path": "de/picture.cmd.json",
28
+ "locale": "de",
29
+ "role": "catalog",
30
+ "scope": "picture",
31
+ "sourceId": "picture"
32
+ },
26
33
  {
27
34
  "path": "de/selection.cmd.json",
28
35
  "locale": "de",
@@ -30,6 +37,13 @@
30
37
  "scope": "selection",
31
38
  "sourceId": "selection"
32
39
  },
40
+ {
41
+ "path": "de/shape.cmd.json",
42
+ "locale": "de",
43
+ "role": "catalog",
44
+ "scope": "shape",
45
+ "sourceId": "shape"
46
+ },
33
47
  {
34
48
  "path": "de/sheet.cmd.json",
35
49
  "locale": "de",
@@ -37,6 +51,13 @@
37
51
  "scope": "sheet",
38
52
  "sourceId": "sheet"
39
53
  },
54
+ {
55
+ "path": "de/slicer.cmd.json",
56
+ "locale": "de",
57
+ "role": "catalog",
58
+ "scope": "slicer",
59
+ "sourceId": "slicer"
60
+ },
40
61
  {
41
62
  "path": "de/table.cmd.json",
42
63
  "locale": "de",
@@ -77,6 +98,13 @@
77
98
  "scope": "movable",
78
99
  "sourceId": "movable"
79
100
  },
101
+ {
102
+ "path": "en/picture.cmd.json",
103
+ "locale": "en",
104
+ "role": "catalog",
105
+ "scope": "picture",
106
+ "sourceId": "picture"
107
+ },
80
108
  {
81
109
  "path": "en/selection.cmd.json",
82
110
  "locale": "en",
@@ -84,6 +112,13 @@
84
112
  "scope": "selection",
85
113
  "sourceId": "selection"
86
114
  },
115
+ {
116
+ "path": "en/shape.cmd.json",
117
+ "locale": "en",
118
+ "role": "catalog",
119
+ "scope": "shape",
120
+ "sourceId": "shape"
121
+ },
87
122
  {
88
123
  "path": "en/sheet.cmd.json",
89
124
  "locale": "en",
@@ -91,6 +126,13 @@
91
126
  "scope": "sheet",
92
127
  "sourceId": "sheet"
93
128
  },
129
+ {
130
+ "path": "en/slicer.cmd.json",
131
+ "locale": "en",
132
+ "role": "catalog",
133
+ "scope": "slicer",
134
+ "sourceId": "slicer"
135
+ },
94
136
  {
95
137
  "path": "en/table.cmd.json",
96
138
  "locale": "en",
@@ -29,6 +29,41 @@
29
29
  "icon": "DrawMoveBackward",
30
30
  "shortcut": "ctrl+BracketLeft"
31
31
  },
32
+ "groupDrawings": {
33
+ "label": "Gruppieren",
34
+ "description": "Die ausgewählten Zeichnungen zu einem Objekt gruppieren.",
35
+ "icon": "DrawGroup"
36
+ },
37
+ "ungroupDrawings": {
38
+ "label": "Gruppierung aufheben",
39
+ "description": "Die ausgewählte Gruppe in ihre Mitglieder zerlegen.",
40
+ "icon": "DrawUngroup"
41
+ },
42
+ "deleteDrawings": {
43
+ "label": "Löschen",
44
+ "description": "Die ausgewählten Zeichnungen löschen.",
45
+ "shortcut": "Delete"
46
+ },
47
+ "selectAllDrawings": {
48
+ "label": "Alle Zeichnungen auswählen",
49
+ "description": "Alle Zeichnungen auf dem Blatt auswählen.",
50
+ "shortcut": "ctrl+A"
51
+ },
52
+ "selectNextDrawing": {
53
+ "label": "Nächste Zeichnung auswählen",
54
+ "description": "Die nächste Zeichnung auf dem Blatt auswählen.",
55
+ "shortcut": "Tab"
56
+ },
57
+ "selectPreviousDrawing": {
58
+ "label": "Vorherige Zeichnung auswählen",
59
+ "description": "Die vorherige Zeichnung auf dem Blatt auswählen.",
60
+ "shortcut": "shift+Tab"
61
+ },
62
+ "clearDrawingSelection": {
63
+ "label": "Zurück zu den Zellen",
64
+ "description": "Die Auswahl der Zeichnungen aufheben und zu den Zellen zurückkehren.",
65
+ "shortcut": "Escape"
66
+ },
32
67
  "toggleLockAspectRatio": {
33
68
  "label": "Seitenverhältnis sperren",
34
69
  "description": "Umschalten, ob das Seitenverhältnis beim Ändern der Größe über die Ecken beibehalten wird.",
@@ -49,6 +84,92 @@
49
84
  "description": "Die Zeichnung weder verschieben noch ihre Größe ändern, wenn sich das darunterliegende Blatt ändert.",
50
85
  "icon": "DrawResize"
51
86
  },
87
+ "formatDrawNudgeLeft": {
88
+ "label": "Nach links verschieben",
89
+ "description": "Die ausgewählten Zeichnungen um 1 Pixel nach links verschieben.",
90
+ "shortcut": "ArrowLeft"
91
+ },
92
+ "formatDrawNudgeRight": {
93
+ "label": "Nach rechts verschieben",
94
+ "description": "Die ausgewählten Zeichnungen um 1 Pixel nach rechts verschieben.",
95
+ "shortcut": "ArrowRight"
96
+ },
97
+ "formatDrawNudgeUp": {
98
+ "label": "Nach oben verschieben",
99
+ "description": "Die ausgewählten Zeichnungen um 1 Pixel nach oben verschieben.",
100
+ "shortcut": "ArrowUp"
101
+ },
102
+ "formatDrawNudgeDown": {
103
+ "label": "Nach unten verschieben",
104
+ "description": "Die ausgewählten Zeichnungen um 1 Pixel nach unten verschieben.",
105
+ "shortcut": "ArrowDown"
106
+ },
107
+ "formatDrawNudgeLeftLarge": {
108
+ "label": "Nach links verschieben (grob)",
109
+ "description": "Die ausgewählten Zeichnungen um 10 Pixel nach links verschieben.",
110
+ "shortcut": "ctrl+ArrowLeft"
111
+ },
112
+ "formatDrawNudgeRightLarge": {
113
+ "label": "Nach rechts verschieben (grob)",
114
+ "description": "Die ausgewählten Zeichnungen um 10 Pixel nach rechts verschieben.",
115
+ "shortcut": "ctrl+ArrowRight"
116
+ },
117
+ "formatDrawNudgeUpLarge": {
118
+ "label": "Nach oben verschieben (grob)",
119
+ "description": "Die ausgewählten Zeichnungen um 10 Pixel nach oben verschieben.",
120
+ "shortcut": "ctrl+ArrowUp"
121
+ },
122
+ "formatDrawNudgeDownLarge": {
123
+ "label": "Nach unten verschieben (grob)",
124
+ "description": "Die ausgewählten Zeichnungen um 10 Pixel nach unten verschieben.",
125
+ "shortcut": "ctrl+ArrowDown"
126
+ },
127
+ "formatDrawSizeIncrease": {
128
+ "label": "Vergrößern",
129
+ "description": "Die ausgewählten Zeichnungen um 10 % vergrößern.",
130
+ "shortcut": [
131
+ "shift+ArrowRight",
132
+ "shift+ArrowUp",
133
+ "ctrl+shift+ArrowRight",
134
+ "ctrl+shift+ArrowUp"
135
+ ]
136
+ },
137
+ "formatDrawSizeDecrease": {
138
+ "label": "Verkleinern",
139
+ "description": "Die ausgewählten Zeichnungen um 10 % verkleinern.",
140
+ "shortcut": [
141
+ "shift+ArrowLeft",
142
+ "shift+ArrowDown",
143
+ "ctrl+shift+ArrowLeft",
144
+ "ctrl+shift+ArrowDown"
145
+ ]
146
+ },
147
+ "formatDrawFlipHorizontal": {
148
+ "label": "Horizontal spiegeln",
149
+ "description": "Die ausgewählten Zeichnungen von links nach rechts spiegeln.",
150
+ "icon": "DrawFlipHorz"
151
+ },
152
+ "formatDrawFlipVertical": {
153
+ "label": "Vertikal spiegeln",
154
+ "description": "Die ausgewählten Zeichnungen von oben nach unten spiegeln.",
155
+ "icon": "DrawFlipVert"
156
+ },
157
+ "formatDrawRotateLeft": {
158
+ "label": "Nach links drehen",
159
+ "description": "Die ausgewählten Zeichnungen um 10 Grad gegen den Uhrzeigersinn drehen.",
160
+ "shortcut": [
161
+ "alt+ArrowLeft",
162
+ "ctrl+alt+ArrowLeft"
163
+ ]
164
+ },
165
+ "formatDrawRotateRight": {
166
+ "label": "Nach rechts drehen",
167
+ "description": "Die ausgewählten Zeichnungen um 10 Grad im Uhrzeigersinn drehen.",
168
+ "shortcut": [
169
+ "alt+ArrowRight",
170
+ "ctrl+alt+ArrowRight"
171
+ ]
172
+ },
52
173
  "formatDrawAlignLeft": {
53
174
  "label": "Links ausrichten",
54
175
  "description": "Die ausgewählten Zeichnungen links ausrichten.",
@@ -118,6 +239,39 @@
118
239
  "formatDrawSwapShapesVert": {
119
240
  "label": "Formen vertikal tauschen",
120
241
  "description": "Die Positionen der ausgewählten Formen vertikal tauschen."
242
+ },
243
+ "formatMovable": {
244
+ "label": "Formatieren",
245
+ "description": "Die Formatierungsoptionen der ausgewählten Zeichnung anzeigen.",
246
+ "icon": "CellsFormat",
247
+ "groupLabels": {
248
+ "movableContextMenu": "Formatieren…"
249
+ }
250
+ },
251
+ "arrangeOptions": {
252
+ "label": "Anordnen",
253
+ "description": "Die ausgewählten Zeichnungen anordnen, ausrichten, gruppieren und verankern.",
254
+ "icon": "DrawToFront"
255
+ },
256
+ "drawAlignOptions": {
257
+ "label": "Ausrichten",
258
+ "description": "Ändern Sie schnell die Platzierung Ihrer Zeichnungen.",
259
+ "icon": "DrawAlignLeft"
260
+ },
261
+ "drawFlipOptions": {
262
+ "label": "Spiegeln",
263
+ "description": "Zeichnungen von links nach rechts oder von oben nach unten spiegeln.",
264
+ "icon": "DrawFlipHorz"
265
+ },
266
+ "drawGroupOptions": {
267
+ "label": "Gruppieren",
268
+ "description": "Zeichnungen zu einem Objekt gruppieren oder eine Gruppe in ihre Mitglieder zerlegen.",
269
+ "icon": "DrawGroup"
270
+ },
271
+ "drawSizingOptions": {
272
+ "label": "Größenanpassung",
273
+ "description": "Legen Sie fest, wie sich die Zeichnungsgröße bei Änderungen der Zellgröße anpasst.",
274
+ "icon": "DrawResize"
121
275
  }
122
276
  }
123
277
  }