@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.12
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.
- package/browser/esm/B4mT3G7GHwgDYFGP.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +730 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → BapujiblfiXDlu67.mjs} +1 -1
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
- package/browser/esm/CUekkfE6uwwsdQpc.mjs +36 -0
- package/browser/esm/C_LUq-BnguetvGZz.mjs +23561 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
- package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → Cslk_qRdBSuJIi1O.mjs} +24 -23
- package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
- package/browser/esm/D22NJmTiky4NL8tM.mjs +8 -0
- package/browser/esm/D2GydDzPuvIjdpok.mjs +42 -0
- package/browser/esm/DGG1auUKsjFbAazu.mjs +60 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DxEczXCHTerDemDP.mjs} +113 -108
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
- package/browser/esm/chart.mjs +33 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +8074 -5647
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +41 -41
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/licenses/dependencies.txt +313 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
- package/node/esm/Bi2Jwc0zpweaNzKc.mjs +1697 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → C0KLMCRb3sbd5Q20.mjs} +23 -22
- package/node/esm/CH1DVfFhjdd_3pw1.mjs +128 -0
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
- package/node/esm/CzN6c6KyxVmNvayz.mjs +8 -0
- package/node/esm/DKqdv5JubgVaq-g9.mjs +35 -0
- package/node/esm/DWkPWuf5ZrLRMixG.mjs +328 -0
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
- package/node/esm/DayGI0Bt57FDNbVF.mjs +37 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → MWges5ywL3aEdChp.mjs} +1 -1
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
- package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
- package/node/esm/chart.mjs +32 -51
- package/node/esm/control.mjs +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/{C_ANM4feA1xV-pri.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
- package/node/esm/index.mjs +10998 -8556
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +41 -41
- package/node/esm/shape.mjs +285 -332
- package/node/esm/slicer.mjs +15 -15
- package/package.json +8 -6
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/sheet.cmd.json +32 -0
- package/resources/locales/de/table.cmd.json +1 -1
- package/resources/locales/de/ui.msg.json +12 -0
- package/resources/locales/de/workbook.cmd.json +11 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +32 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +14 -0
- package/resources/locales/en/workbook.cmd.json +11 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +76 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/OutlineButton.d.ts +4 -4
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/index.d.ts +8 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -0
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +1 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/validationAlert.d.ts +3 -3
- package/types/src/frame/CommandContext.d.ts +7 -7
- package/types/src/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +5 -4
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +2 -2
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/GridFreezeLayer.d.ts +2 -2
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +11 -8
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
- package/types/src/layer/ResizeIndicator.d.ts +2 -2
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +3 -3
- package/types/src/layer/TableToolbar.d.ts +4 -4
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +21 -8
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +3 -0
- package/types/src/layer/useFreezeDrag.d.ts +2 -2
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +2 -2
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/MovableCommands.d.ts +2 -2
- package/types/src/movable/MovableControl.d.ts +3 -1
- package/types/src/movable/MovableFrame.d.ts +2 -1
- package/types/src/movable/MovableLayer.d.ts +6 -3
- package/types/src/movable/MovableRenderers.d.ts +3 -3
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +2 -2
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +64 -32
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +5 -2
- package/types/src/sheet/SheetCommands.d.ts +2 -2
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +6 -6
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +3 -3
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +2 -2
- package/types/src/sheet/circularReferences.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +6 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +76 -22
- package/types/src/workbook/WorkbookStrip.d.ts +5 -5
- package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
- package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
- package/node/esm/D3YXHeOyFp00Xk3m.mjs +0 -323
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CollisionDetection, DragStartEvent, DropAnimation, KeyboardCoordinateGetter, Modifiers, MeasuringConfiguration, PointerActivationConstraint, UniqueIdentifier } from '@dnd-kit/core';
|
|
3
3
|
import { arrayMove, SortingStrategy, AnimateLayoutChanges, NewIndexGetter } from '@dnd-kit/sortable';
|
|
4
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
5
|
+
import { TabStripItemRenderProps } from './TabStripItem';
|
|
4
6
|
export interface SortableProps {
|
|
5
7
|
className?: string;
|
|
6
8
|
activationConstraint?: PointerActivationConstraint;
|
|
@@ -15,11 +17,9 @@ export interface SortableProps {
|
|
|
15
17
|
onMove?: (indexFrom: number, indexTo: number) => void;
|
|
16
18
|
measuring?: MeasuringConfiguration;
|
|
17
19
|
modifiers?: Modifiers;
|
|
18
|
-
renderItem?:
|
|
20
|
+
renderItem?: (props: TabStripItemRenderProps) => React.ReactNode;
|
|
19
21
|
removable?: boolean;
|
|
20
|
-
renderDivider?:
|
|
21
|
-
key: string;
|
|
22
|
-
}) => React.ReactElement;
|
|
22
|
+
renderDivider?: RenderSlotFn<React.HTMLAttributes<HTMLElement>>;
|
|
23
23
|
reorderItems?: typeof arrayMove;
|
|
24
24
|
strategy?: SortingStrategy;
|
|
25
25
|
style?: React.CSSProperties;
|
|
@@ -54,7 +54,7 @@ interface SortableItemProps {
|
|
|
54
54
|
useDragOverlay?: boolean;
|
|
55
55
|
onRemove?(id: string): void;
|
|
56
56
|
style(values: any): React.CSSProperties;
|
|
57
|
-
renderItem?(
|
|
57
|
+
renderItem?(props: TabStripItemRenderProps): React.ReactNode;
|
|
58
58
|
wrapperStyle({ index, isDragging, id, }: {
|
|
59
59
|
index: number;
|
|
60
60
|
isDragging: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ScrollButtonProps } from '@sheetxl/utils-react';
|
|
2
|
+
import { RenderSlotFn, ScrollButtonProps } from '@sheetxl/utils-react';
|
|
3
3
|
import { EditableLabelProps } from '../editableLabel';
|
|
4
4
|
import { TabProps } from './Tab';
|
|
5
5
|
export interface TabStripRef extends HTMLDivElement {
|
|
@@ -12,11 +12,11 @@ export interface TabStripProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
12
12
|
onSelectedTabIndexChange?: (index: number) => void;
|
|
13
13
|
onTabNameChange?: (index: number, tabName: string) => void;
|
|
14
14
|
onTabMove?: (indexFrom: number, indexTo: number) => void;
|
|
15
|
-
renderScrollButtonStart?:
|
|
16
|
-
renderScrollButtonEnd?:
|
|
17
|
-
renderScrollButtonEdge?:
|
|
18
|
-
renderTabButton?:
|
|
19
|
-
renderTabDivider?:
|
|
15
|
+
renderScrollButtonStart?: RenderSlotFn<ScrollButtonProps> | null;
|
|
16
|
+
renderScrollButtonEnd?: RenderSlotFn<ScrollButtonProps> | null;
|
|
17
|
+
renderScrollButtonEdge?: RenderSlotFn<ScrollButtonProps> | null;
|
|
18
|
+
renderTabButton?: RenderSlotFn<TabProps>;
|
|
19
|
+
renderTabDivider?: RenderSlotFn<React.HTMLAttributes<HTMLElement>>;
|
|
20
20
|
propsEditLabel?: EditableLabelProps;
|
|
21
21
|
disabled?: boolean;
|
|
22
22
|
disableDrag?: boolean;
|
|
@@ -18,19 +18,21 @@ export interface TabStripItemProps {
|
|
|
18
18
|
wrapperStyle?: React.CSSProperties;
|
|
19
19
|
value: React.ReactNode;
|
|
20
20
|
onRemove?(): void;
|
|
21
|
-
renderItem?(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
renderItem?(props: TabStripItemRenderProps): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/** What a tab strip's item renderer is handed. */
|
|
24
|
+
export interface TabStripItemRenderProps {
|
|
25
|
+
dragOverlay: boolean;
|
|
26
|
+
dragging: boolean;
|
|
27
|
+
sorting: boolean;
|
|
28
|
+
index: number | undefined;
|
|
29
|
+
fadeIn: boolean;
|
|
30
|
+
listeners: DraggableSyntheticListeners;
|
|
31
|
+
ref: React.Ref<HTMLElement>;
|
|
32
|
+
style: React.CSSProperties | undefined;
|
|
33
|
+
transform: TabStripItemProps['transform'];
|
|
34
|
+
transition: TabStripItemProps['transition'];
|
|
35
|
+
value: TabStripItemProps['value'];
|
|
34
36
|
}
|
|
35
37
|
export declare const TabStripItem: React.NamedExoticComponent<TabStripItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
38
|
//# sourceMappingURL=TabStripItem.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RemoveListener, UndoManager } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
4
|
/** Options for {@link contributeTableCommands}. */
|
|
5
5
|
export interface ContributeTableCommandsOptions {
|
|
@@ -10,7 +10,7 @@ export interface ContributeTableCommandsOptions {
|
|
|
10
10
|
}
|
|
11
11
|
/** The single `data` bundle {@link contributeTableCommands} takes (the `DynamicCommandContributor` shape). */
|
|
12
12
|
export interface TableCommandData extends ContributeTableCommandsOptions {
|
|
13
|
-
sheet:
|
|
13
|
+
sheet: IWorksheet | null;
|
|
14
14
|
}
|
|
15
15
|
export declare function contributeTableCommands(contribution: Command.CommandContribution, data: TableCommandData): RemoveListener;
|
|
16
16
|
//# sourceMappingURL=TableCommands.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TaskPaneProps } from './ITaskPane';
|
|
3
|
+
/** The key the cell control pane is registered under, and of the command that opens it. */
|
|
4
|
+
export declare const CELL_CONTROL_PANE_KEY = "formatCellControl";
|
|
5
|
+
/**
|
|
6
|
+
* The cell control pane: follows the selection's anchor and shows the body the anchor's content
|
|
7
|
+
* entry supplies ({@link CellContentEntry.pane}). With no control under the anchor, or for a type
|
|
8
|
+
* without a body, it says so.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CellControlPane: (props: TaskPaneProps) => React.ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* Registers the cell control pane ({@link CellControlPane}) with the default task pane registry,
|
|
13
|
+
* unless a pane is already registered under its key. The `formatCellControl` command calls it before
|
|
14
|
+
* opening the pane.
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerCellControlPane(): void;
|
|
17
|
+
//# sourceMappingURL=CellControlPane.d.ts.map
|
|
@@ -112,6 +112,13 @@ export interface ITaskPaneArea {
|
|
|
112
112
|
* @param key The task pane key.
|
|
113
113
|
*/
|
|
114
114
|
activate: <A = any>(key: string, options?: ActivateFrameOptions<A>) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Whether {@link activate} can show the task pane `key`: there is an area to show it in, and a
|
|
117
|
+
* pane registered under that key. A command that opens a pane is disabled when this is `false`.
|
|
118
|
+
*
|
|
119
|
+
* @param key The task pane key.
|
|
120
|
+
*/
|
|
121
|
+
canActivate: (key: string) => boolean;
|
|
115
122
|
/**
|
|
116
123
|
* Return the key for the currently active task pane.
|
|
117
124
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
3
|
+
import { ITaskPaneArea, TaskPaneAreaProps } from './TaskPaneArea';
|
|
3
4
|
import { ITaskPaneRegistry } from './TaskPaneRegistry';
|
|
4
5
|
/**
|
|
5
6
|
* Context provider for task panes. Allows custom task pane manager
|
|
@@ -16,8 +17,10 @@ import { ITaskPaneRegistry } from './TaskPaneRegistry';
|
|
|
16
17
|
*/
|
|
17
18
|
export interface TaskPaneProviderProps {
|
|
18
19
|
children: React.ReactNode;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
/** Render the area. Pass `props.ref` on to the {@link ITaskPaneAreaElement}. */
|
|
21
|
+
renderArea: RenderSlotFn<TaskPaneAreaProps>;
|
|
22
|
+
/** The area to mount, or `null` once it closes. */
|
|
23
|
+
onUpdateArea: (area: React.ReactElement | null) => void;
|
|
21
24
|
registry?: ITaskPaneRegistry;
|
|
22
25
|
}
|
|
23
26
|
export declare const TaskPaneProvider: React.FC<TaskPaneProviderProps>;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* own tokens; decision 4). It wraps the generic {@link buildThemeCSS} (utils-react) — OOXML lives here in
|
|
5
5
|
* `@sheetxl/react`, not below — passing the sys aliases as the per-surface records.
|
|
6
6
|
*
|
|
7
|
-
* The sys aliases are **just another surface layer**, so each top-level instance (`
|
|
7
|
+
* The sys aliases are **just another surface layer**, so each top-level instance (`WorksheetElement`,
|
|
8
8
|
* `WorkbookElement`, studio) emits its own copy `@scope`d to its instance root — same per-instance `useId`
|
|
9
9
|
* model as the token sheets. Pass the instance's scope selector. The `--sxl-doc-*` document colors are
|
|
10
|
-
* model-driven and stay with `
|
|
10
|
+
* model-driven and stay with `WorksheetElement` for now.
|
|
11
11
|
*/
|
|
12
12
|
export declare const buildOOXMLThemeCSS: (layer?: string, scope?: string) => string;
|
|
13
13
|
//# sourceMappingURL=buildOOXMLThemeCSS.d.ts.map
|
|
@@ -7,7 +7,7 @@ import { ThemeMode } from '@sheetxl/utils-react';
|
|
|
7
7
|
* (`ThemeStateKey.DarkGrid`, off unless a host or the user turns it on) so the grid stays light in a dark app unless opted in.
|
|
8
8
|
*
|
|
9
9
|
* Because it reads the shared (module-singleton) preference store, every caller — the grid surface
|
|
10
|
-
* (`
|
|
10
|
+
* (`WorksheetElement`) **and** chrome that must match the grid but renders outside its DOM (the table-style
|
|
11
11
|
* preview, the cell-style / color pickers) — resolves the *same* value with no prop-threading and no
|
|
12
12
|
* drift from the studio (which reads the same keys the same way).
|
|
13
13
|
*
|
|
@@ -18,7 +18,7 @@ export declare const installSystemColorDefaults: () => void;
|
|
|
18
18
|
* to the provided values rather than the global host mapping.
|
|
19
19
|
*
|
|
20
20
|
* @remarks
|
|
21
|
-
* Used by the grid container ({@link
|
|
21
|
+
* Used by the grid container ({@link WorksheetElement}) and by UI rendered *outside* the grid subtree
|
|
22
22
|
* that must still match the grid's light/dark intent — most notably a color picker popup, which is
|
|
23
23
|
* portaled and would otherwise inherit the host's `--sxl-sys-color-*` (e.g. a light grid in a dark host
|
|
24
24
|
* would show the host's dark `auto` color). Names are lower-cased to match the variable
|
|
@@ -27,7 +27,7 @@ export declare const installSystemColorDefaults: () => void;
|
|
|
27
27
|
export declare const createSystemColorVars: (colors: Partial<Record<IColor.Named, string>>) => Record<string, string>;
|
|
28
28
|
/**
|
|
29
29
|
* Ensures the default system-color CSS variables are present (see {@link installSystemColorDefaults}).
|
|
30
|
-
* Wired into `
|
|
30
|
+
* Wired into `WorksheetElement`, so the grid themes from `--sxl-sys-color-*` out of the box.
|
|
31
31
|
*/
|
|
32
32
|
export declare const useSystemColors: () => void;
|
|
33
33
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { LoadingPanelProps } from '@sheetxl/utils-react';
|
|
3
|
-
import {
|
|
3
|
+
import { WorksheetElementProps, OpaqueSheetElementProps } from '../sheet';
|
|
4
4
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
5
5
|
/**
|
|
6
6
|
* Default renderers for {@link WorkbookElement}.
|
|
@@ -8,7 +8,8 @@ import { WorkbookStripProps } from './WorkbookStrip';
|
|
|
8
8
|
* @remarks
|
|
9
9
|
* These can be replaced by host application layers as needed.
|
|
10
10
|
*/
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
11
|
+
export declare const defaultRenderWorksheet: (props: WorksheetElementProps) => React.ReactElement;
|
|
12
|
+
export declare const defaultRenderOpaqueSheet: (props: OpaqueSheetElementProps) => React.ReactElement;
|
|
13
|
+
export declare const defaultRenderTabs: (props: WorkbookStripProps) => React.ReactElement;
|
|
14
|
+
export declare const defaultRenderWorkbookLoading: (props: LoadingPanelProps) => React.ReactElement;
|
|
14
15
|
//# sourceMappingURL=DefaultRenderers.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UndoManager } from '@sheetxl/utils';
|
|
3
|
-
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
4
|
-
import { LoadingPanelProps, ErrorPanelProps, RenderFloatPanel, FloatPanelProps, ThemeMode, Command } from '@sheetxl/utils-react';
|
|
5
|
-
import {
|
|
3
|
+
import { IWorkbook, IWorkbookIO, IMovable, ITable } from '@sheetxl/sdk';
|
|
4
|
+
import { LoadingPanelProps, ErrorPanelProps, RenderFloatPanel, FloatPanelProps, FloatReference, RenderSlotFn, ThemeMode, Command } from '@sheetxl/utils-react';
|
|
5
|
+
import { WorksheetElementProps, IWorksheetElement, OpaqueSheetElementProps } from '../sheet';
|
|
6
6
|
import { SheetEditable } from '../editor';
|
|
7
|
+
import { CommandContext } from '../frame';
|
|
7
8
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
8
9
|
/**
|
|
9
10
|
* Workbook specific attributes beyond HTMLDivElement.
|
|
@@ -17,7 +18,7 @@ export interface IWorkbookAttributes {
|
|
|
17
18
|
* Retrieve the sheet element associated with this workbook element.
|
|
18
19
|
* `null` before the sheet has mounted.
|
|
19
20
|
*/
|
|
20
|
-
getSheetElement: () =>
|
|
21
|
+
getSheetElement: () => IWorksheetElement | null;
|
|
21
22
|
/**
|
|
22
23
|
* Retrieve the viewport element associated with this workbook element.
|
|
23
24
|
* `null` before the viewport has mounted.
|
|
@@ -46,8 +47,39 @@ export interface IWorkbookElement extends HTMLDivElement, IWorkbookAttributes {
|
|
|
46
47
|
export type WorkbookLoadEvent = {
|
|
47
48
|
source: IWorkbookElement;
|
|
48
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* What every workbook menu renderer is handed. Spread the rest on the menu's root.
|
|
52
|
+
*/
|
|
53
|
+
export interface WorkbookMenuRenderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
54
|
+
/** The menu's float. Close it when an entry runs. */
|
|
55
|
+
floatReference: FloatReference;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** What {@link WorkbookElementProps.renderContextMenu} is handed. */
|
|
59
|
+
export interface ContextMenuRenderProps extends WorkbookMenuRenderProps {
|
|
60
|
+
workbook: IWorkbook;
|
|
61
|
+
}
|
|
62
|
+
/** What {@link WorkbookElementProps.renderColumnMenu} is handed. */
|
|
63
|
+
export interface ColumnMenuRenderProps extends WorkbookMenuRenderProps {
|
|
64
|
+
/** The table column whose button was pressed. */
|
|
65
|
+
column: ITable.IColumn;
|
|
66
|
+
}
|
|
67
|
+
/** What {@link WorkbookElementProps.renderMovableMenu} is handed. */
|
|
68
|
+
export interface MovableMenuRenderProps extends WorkbookMenuRenderProps {
|
|
69
|
+
movable: IMovable;
|
|
70
|
+
}
|
|
71
|
+
/** What {@link WorkbookElementProps.renderFillMenu} is handed. */
|
|
72
|
+
export interface FillMenuRenderProps extends WorkbookMenuRenderProps {
|
|
73
|
+
workbook: IWorkbook;
|
|
74
|
+
/** What the right-drag offers and runs. */
|
|
75
|
+
menu: CommandContext.FillMenu;
|
|
76
|
+
}
|
|
49
77
|
/**
|
|
50
78
|
* Properties and methods available on the workbook element.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Every `render*` slot is mounted as its own component, so a renderer may call hooks. Omit a slot (or
|
|
82
|
+
* pass `undefined`) for its default; pass `null` to render nothing.
|
|
51
83
|
*/
|
|
52
84
|
export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'autoFocus'>, React.Attributes {
|
|
53
85
|
/**
|
|
@@ -74,6 +106,24 @@ export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
74
106
|
* loading panels.
|
|
75
107
|
*/
|
|
76
108
|
onWorkbookLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Called with the workbook once {@link WorkbookElementProps.workbook} resolves, and again whenever
|
|
111
|
+
* a new input resolves to a different one. Until the first input resolves, or if an input fails,
|
|
112
|
+
* the workbook is `null`; while a later input resolves, the current workbook is kept.
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* Lets an app pass a `Promise` here and hold the live workbook in its own state, without awaiting
|
|
116
|
+
* or suspending.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* const [pending] = useState(() => createInvoice());
|
|
121
|
+
* const [workbook, setWorkbook] = useState<IWorkbook | null>(null);
|
|
122
|
+
* const [total] = useCellValue<number>(workbook, 'D23');
|
|
123
|
+
* return <WorkbookElement workbook={pending} onWorkbookChange={setWorkbook} />;
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
onWorkbookChange?: (workbook: IWorkbook | null) => void;
|
|
77
127
|
/**
|
|
78
128
|
* Whether features that load on first use (charts, shapes, form controls, file formats, dialogs)
|
|
79
129
|
* are loaded ahead of use once the workbook has shown, so their first use does not wait on the
|
|
@@ -116,30 +166,30 @@ export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
116
166
|
*/
|
|
117
167
|
propsTabs?: Partial<WorkbookStripProps>;
|
|
118
168
|
/**
|
|
119
|
-
* Render
|
|
169
|
+
* Render the sheet tabs.
|
|
120
170
|
*/
|
|
121
|
-
renderTabs?:
|
|
171
|
+
renderTabs?: RenderSlotFn<WorkbookStripProps> | null;
|
|
122
172
|
/**
|
|
123
|
-
* Props
|
|
173
|
+
* Props handed to every menu renderer.
|
|
124
174
|
*/
|
|
125
|
-
propsContextMenu?:
|
|
175
|
+
propsContextMenu?: Partial<WorkbookMenuRenderProps>;
|
|
126
176
|
/**
|
|
127
|
-
* Render
|
|
177
|
+
* Render the grid's context menu. The default renders none, and the browser's menu shows.
|
|
128
178
|
*/
|
|
129
|
-
renderContextMenu?:
|
|
179
|
+
renderContextMenu?: RenderSlotFn<ContextMenuRenderProps> | null;
|
|
130
180
|
/**
|
|
131
|
-
* Render
|
|
181
|
+
* Render the filter menu of a table column's button. The default renders none.
|
|
132
182
|
*/
|
|
133
|
-
renderColumnMenu?:
|
|
183
|
+
renderColumnMenu?: RenderSlotFn<ColumnMenuRenderProps> | null;
|
|
134
184
|
/**
|
|
135
|
-
* Render
|
|
185
|
+
* Render the context menu of a chart, shape or other movable. The default renders none.
|
|
136
186
|
*/
|
|
137
|
-
renderMovableMenu?:
|
|
187
|
+
renderMovableMenu?: RenderSlotFn<MovableMenuRenderProps> | null;
|
|
138
188
|
/**
|
|
139
|
-
* Render the
|
|
140
|
-
*
|
|
189
|
+
* Render the menu a right-drag of the fill handle ends in. The default renders none, and the
|
|
190
|
+
* right-drag is inert.
|
|
141
191
|
*/
|
|
142
|
-
renderFillMenu?:
|
|
192
|
+
renderFillMenu?: RenderSlotFn<FillMenuRenderProps> | null;
|
|
143
193
|
/**
|
|
144
194
|
* Allow for customizations on the floating surface used for the workbook's popups.
|
|
145
195
|
*/
|
|
@@ -156,12 +206,12 @@ export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
156
206
|
/**
|
|
157
207
|
* Assign a custom loading panel.
|
|
158
208
|
*/
|
|
159
|
-
renderWorkbookLoading?:
|
|
209
|
+
renderWorkbookLoading?: RenderSlotFn<LoadingPanelProps> | null;
|
|
160
210
|
/**
|
|
161
211
|
* Custom error panel, shown when a `Promise` / {@link IWorkbookIO.ReadOptions} {@link WorkbookElementProps.workbook}
|
|
162
212
|
* fails to resolve. Defaults to a minimal message. (Studio supplies a themed panel.)
|
|
163
213
|
*/
|
|
164
|
-
renderWorkbookError?:
|
|
214
|
+
renderWorkbookError?: RenderSlotFn<ErrorPanelProps> | null;
|
|
165
215
|
/**
|
|
166
216
|
* The app-created editor for the new always-mounted cell editor. Pass the SAME stable
|
|
167
217
|
* {@link IEditable} instance here and to the formula bar for free two-way sync; this forwards it to
|
|
@@ -171,11 +221,15 @@ export interface WorkbookElementProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
171
221
|
/**
|
|
172
222
|
* Allow for customizations on the sheet.
|
|
173
223
|
*/
|
|
174
|
-
propsSheet?: Partial<
|
|
224
|
+
propsSheet?: Partial<WorksheetElementProps>;
|
|
225
|
+
/**
|
|
226
|
+
* Render the active worksheet. Pass `props.ref` on to the {@link IWorksheetElement}.
|
|
227
|
+
*/
|
|
228
|
+
renderWorksheet?: RenderSlotFn<WorksheetElementProps>;
|
|
175
229
|
/**
|
|
176
|
-
* Render
|
|
230
|
+
* Render the pane of a chart sheet, a macro sheet or a dialog sheet while it is the active tab.
|
|
177
231
|
*/
|
|
178
|
-
|
|
232
|
+
renderOpaqueSheet?: RenderSlotFn<OpaqueSheetElementProps>;
|
|
179
233
|
/**
|
|
180
234
|
* Allows users to Wrap stage children in Top level Context.
|
|
181
235
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
-
import { ScrollButtonProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { ScrollButtonProps, RenderSlotFn } from '@sheetxl/utils-react';
|
|
4
4
|
import { SheetTabProps } from '../tabStrip';
|
|
5
5
|
/**
|
|
6
6
|
* A table tab strip that operates on an {@link IWorkbook}.
|
|
@@ -53,7 +53,7 @@ export interface WorkbookStripProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
53
53
|
* the whole strip. The `sheet`, `inverted` and (when {@link onTabContextMenu} is set)
|
|
54
54
|
* `onContextMenu` are provided; anything else is the underlying {@link TabStrip} tab props.
|
|
55
55
|
*/
|
|
56
|
-
renderSheetTab?:
|
|
56
|
+
renderSheetTab?: RenderSlotFn<SheetTabProps>;
|
|
57
57
|
/**
|
|
58
58
|
* Called on a sheet tab's context-menu (right-click) event, after that tab has been selected.
|
|
59
59
|
* The strip itself renders no menu — a host provides one (e.g. the MUI strip's `SheetTabMenu`).
|
|
@@ -65,9 +65,9 @@ export interface WorkbookStripProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
65
65
|
* currently rendered by `TabStrip`; start/end are accepted for parity. Pass `null` to suppress
|
|
66
66
|
* a button (as the strip does for all three in {@link condensed} layout).
|
|
67
67
|
*/
|
|
68
|
-
renderScrollButtonStart?:
|
|
69
|
-
renderScrollButtonEnd?:
|
|
70
|
-
renderScrollButtonEdge?:
|
|
68
|
+
renderScrollButtonStart?: RenderSlotFn<ScrollButtonProps> | null;
|
|
69
|
+
renderScrollButtonEnd?: RenderSlotFn<ScrollButtonProps> | null;
|
|
70
|
+
renderScrollButtonEdge?: RenderSlotFn<ScrollButtonProps> | null;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Imperative handle for {@link WorkbookStrip}: the root element plus tab-editing methods
|
|
@@ -1,66 +0,0 @@
|
|
|
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 "./Cfe0kofqVKGxLqO6.mjs";
|
|
8
|
-
import { forwardRef as t, memo as n, useEffect as r } from "react";
|
|
9
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
10
|
-
import { useImperativeElement as a, useMeasure as o, useTranslator as s } from "@sheetxl/utils-react";
|
|
11
|
-
var c = Object.defineProperty, l = (e, t) => {
|
|
12
|
-
let n = {};
|
|
13
|
-
for (var r in e) c(n, r, {
|
|
14
|
-
get: e[r],
|
|
15
|
-
enumerable: !0
|
|
16
|
-
});
|
|
17
|
-
return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
18
|
-
}, u = n(t((t, n) => {
|
|
19
|
-
let { children: s, disabled: c, style: l, movable: u, zoom: d = 1, description: f, isDragging: p, onHide: m, onShow: h, onDragZone: g, adornmentHost: _, flip: v, gesture: y, ...b } = t;
|
|
20
|
-
r(() => {}, [f]);
|
|
21
|
-
let x = a(n, () => ({ isEmptyFrame: () => !0 }), []), [S, { height: C, width: w }] = o(), T = e([x, S]);
|
|
22
|
-
return i("div", {
|
|
23
|
-
className: "unknown-editor",
|
|
24
|
-
...b,
|
|
25
|
-
ref: T,
|
|
26
|
-
style: {
|
|
27
|
-
width: "100%",
|
|
28
|
-
height: "100%",
|
|
29
|
-
border: "var(--sxl-color-neutral, grey) solid 1px",
|
|
30
|
-
backgroundColor: "var(--sxl-color-base-100, white)",
|
|
31
|
-
backgroundImage: "var(--sxl-image-background)",
|
|
32
|
-
alignItems: "center",
|
|
33
|
-
justifyContent: "center",
|
|
34
|
-
zoom: d,
|
|
35
|
-
display: "flex",
|
|
36
|
-
position: "relative",
|
|
37
|
-
filter: c ? "blur(1px)" : void 0,
|
|
38
|
-
boxShadow: p ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
|
|
39
|
-
overflow: "hidden",
|
|
40
|
-
wordBreak: "break-word",
|
|
41
|
-
...l
|
|
42
|
-
},
|
|
43
|
-
children: f
|
|
44
|
-
});
|
|
45
|
-
})), d = l({
|
|
46
|
-
ErrorContentFrame: () => p,
|
|
47
|
-
UnsupportedContentFrame: () => m
|
|
48
|
-
}), f = Object.freeze({ border: "var(--sxl-color-error, red) solid 2px" }), p = n((e) => {
|
|
49
|
-
let t = s(), n = e.movable.getContent(), r = n.getError(), a = r?.message ?? String(r);
|
|
50
|
-
return i(u, {
|
|
51
|
-
...e,
|
|
52
|
-
style: f,
|
|
53
|
-
description: t("movable.contentError", {
|
|
54
|
-
type: n.getOriginalType(),
|
|
55
|
-
message: a
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
}), m = n((e) => {
|
|
59
|
-
let t = s();
|
|
60
|
-
return i(u, {
|
|
61
|
-
...e,
|
|
62
|
-
style: f,
|
|
63
|
-
description: t("movable.unsupportedType", { type: e.movable.getContent().getType() })
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
export { l as i, m as n, u as r, d as t };
|