@dxos/plugin-sheet 0.8.4-main.406dc2a → 0.8.4-main.52d7546f51
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/dist/lib/browser/SheetContainer-6DNFC4TY.mjs +397 -0
- package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs.map +7 -0
- package/dist/lib/browser/anchor-sort-AMMLA66W.mjs +24 -0
- package/dist/lib/browser/anchor-sort-AMMLA66W.mjs.map +7 -0
- package/dist/lib/browser/chunk-EDWHV64N.mjs +1473 -0
- package/dist/lib/browser/chunk-EDWHV64N.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SSN4HYJL.mjs → chunk-IFLWVS2V.mjs} +9 -9
- package/dist/lib/browser/chunk-IFLWVS2V.mjs.map +7 -0
- package/dist/lib/browser/chunk-KE3AKN5W.mjs +397 -0
- package/dist/lib/browser/chunk-KE3AKN5W.mjs.map +7 -0
- package/dist/lib/browser/compute-graph-registry-RC5L7RE4.mjs +21 -0
- package/dist/lib/browser/compute-graph-registry-RC5L7RE4.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +71 -80
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-D2T2DOVX.mjs +29 -0
- package/dist/lib/browser/markdown-D2T2DOVX.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-P2RX75DA.mjs +79 -0
- package/dist/lib/browser/operation-resolver-P2RX75DA.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-7ZDMQDCT.mjs → react-surface-45CRAB5G.mjs} +19 -21
- package/dist/lib/browser/react-surface-45CRAB5G.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -12
- package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs +398 -0
- package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs.map +7 -0
- package/dist/lib/node-esm/anchor-sort-VHMBRX2E.mjs +25 -0
- package/dist/lib/node-esm/anchor-sort-VHMBRX2E.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6J5L47IB.mjs +398 -0
- package/dist/lib/node-esm/chunk-6J5L47IB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AYSEWH7N.mjs +1474 -0
- package/dist/lib/node-esm/chunk-AYSEWH7N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IK4O7FUJ.mjs → chunk-PPOYR7DK.mjs} +9 -9
- package/dist/lib/node-esm/chunk-PPOYR7DK.mjs.map +7 -0
- package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs +22 -0
- package/dist/lib/node-esm/compute-graph-registry-ZGXVLVGD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +71 -80
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-PTV72DLO.mjs +30 -0
- package/dist/lib/node-esm/markdown-PTV72DLO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs +80 -0
- package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-TUME5MM2.mjs → react-surface-ITV2L6HK.mjs} +19 -21
- package/dist/lib/node-esm/react-surface-ITV2L6HK.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -12
- package/dist/types/src/SheetPlugin.d.ts +2 -1
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +6 -0
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +1 -0
- package/dist/types/src/capabilities/anchor-sort/index.d.ts +3 -0
- package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts +5 -0
- package/dist/types/src/capabilities/compute-graph-registry/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts +3 -0
- package/dist/types/src/capabilities/compute-graph-registry/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +3 -2
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts +1 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/RangeList/RangeList.d.ts +2 -2
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +5 -6
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +5 -3
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +2 -2
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +3 -4
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +2 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +12 -19
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts +12 -18
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts +14 -1
- package/dist/types/src/components/SheetToolbar/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +6 -6
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/model/testing.d.ts +2 -2
- package/dist/types/src/model/testing.d.ts.map +1 -1
- package/dist/types/src/model/useSheetModel.d.ts +2 -2
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- package/dist/types/src/serializer.d.ts +2 -2
- package/dist/types/src/serializer.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +2 -2
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +26 -2
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +76 -0
- package/dist/types/src/types/Sheet.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +6 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts +2 -2
- package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +91 -74
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +10 -10
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +76 -68
- package/src/SheetPlugin.tsx +41 -61
- package/src/capabilities/anchor-sort/anchor-sort.ts +27 -0
- package/src/capabilities/anchor-sort/index.ts +7 -0
- package/src/capabilities/compute-graph-registry/compute-graph-registry.ts +27 -0
- package/src/capabilities/compute-graph-registry/index.ts +7 -0
- package/src/capabilities/index.ts +5 -9
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +30 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +77 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +43 -0
- package/src/components/ComputeGraph/compute-graph.stories.tsx +9 -9
- package/src/components/FunctionEditor/FunctionEditor.tsx +2 -2
- package/src/components/GridSheet/GridSheet.stories.tsx +5 -5
- package/src/components/GridSheet/GridSheet.tsx +40 -30
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +12 -9
- package/src/components/GridSheet/util.ts +11 -5
- package/src/components/RangeList/RangeList.tsx +10 -7
- package/src/components/SheetContainer/SheetContainer.stories.tsx +46 -23
- package/src/components/SheetContainer/SheetContainer.tsx +30 -22
- package/src/components/SheetContext/SheetContext.tsx +8 -8
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +1 -1
- package/src/components/SheetToolbar/SheetToolbar.tsx +39 -30
- package/src/components/SheetToolbar/align.ts +41 -16
- package/src/components/SheetToolbar/style.ts +45 -15
- package/src/components/SheetToolbar/useToolbarState.ts +22 -5
- package/src/extensions/compute.stories.tsx +19 -10
- package/src/extensions/compute.ts +1 -1
- package/src/extensions/editor/sheet-extension.ts +7 -4
- package/src/index.ts +1 -1
- package/src/integrations/thread-ranges.ts +39 -49
- package/src/meta.ts +8 -4
- package/src/model/sheet-model.test.ts +4 -4
- package/src/model/sheet-model.ts +80 -48
- package/src/model/testing.ts +4 -4
- package/src/model/useSheetModel.ts +2 -2
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/sheet.spec.ts +1 -0
- package/src/sanity.test.ts +3 -4
- package/src/serializer.ts +4 -4
- package/src/testing/data.ts +2 -2
- package/src/testing/testing.tsx +3 -3
- package/src/translations.ts +3 -2
- package/src/types/Sheet.ts +97 -0
- package/src/{capabilities → types}/capabilities.ts +2 -2
- package/src/types/index.ts +2 -1
- package/src/types/sheet-range-types.ts +2 -2
- package/src/types/types.ts +82 -48
- package/src/types/util.ts +11 -38
- package/dist/lib/browser/SheetContainer-VL34UND4.mjs +0 -351
- package/dist/lib/browser/SheetContainer-VL34UND4.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-3N44DS5F.mjs +0 -24
- package/dist/lib/browser/anchor-sort-3N44DS5F.mjs.map +0 -7
- package/dist/lib/browser/chunk-ADK2HW4A.mjs +0 -906
- package/dist/lib/browser/chunk-ADK2HW4A.mjs.map +0 -7
- package/dist/lib/browser/chunk-CSBSADPQ.mjs +0 -16
- package/dist/lib/browser/chunk-CSBSADPQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-SSN4HYJL.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZJWJMX4E.mjs +0 -852
- package/dist/lib/browser/chunk-ZJWJMX4E.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZMPNHFIP.mjs +0 -15
- package/dist/lib/browser/chunk-ZMPNHFIP.mjs.map +0 -7
- package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs +0 -21
- package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs +0 -56
- package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs.map +0 -7
- package/dist/lib/browser/markdown-RMTMI237.mjs +0 -26
- package/dist/lib/browser/markdown-RMTMI237.mjs.map +0 -7
- package/dist/lib/browser/react-surface-7ZDMQDCT.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs +0 -352
- package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-YL2OZHYM.mjs +0 -25
- package/dist/lib/node-esm/anchor-sort-YL2OZHYM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BZAPYBSH.mjs +0 -907
- package/dist/lib/node-esm/chunk-BZAPYBSH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H3GSD33H.mjs +0 -18
- package/dist/lib/node-esm/chunk-H3GSD33H.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IK4O7FUJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LN6ZSAII.mjs +0 -16
- package/dist/lib/node-esm/chunk-LN6ZSAII.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YL7BVJPC.mjs +0 -853
- package/dist/lib/node-esm/chunk-YL7BVJPC.mjs.map +0 -7
- package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs +0 -22
- package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs +0 -57
- package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-EDIWHA3P.mjs +0 -27
- package/dist/lib/node-esm/markdown-EDIWHA3P.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TUME5MM2.mjs.map +0 -7
- package/dist/types/src/capabilities/anchor-sort.d.ts +0 -6
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +0 -4
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -37
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/anchor-sort.ts +0 -22
- package/src/capabilities/compute-graph-registry.ts +0 -23
- package/src/capabilities/intent-resolver.ts +0 -38
- package/src/capabilities/markdown.ts +0 -23
- package/src/capabilities/react-surface.tsx +0 -40
- package/src/types/schema.ts +0 -61
|
@@ -26,9 +26,9 @@ export const FunctionEditor = () => {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<div className='flex shrink-0 justify-between items-center
|
|
29
|
+
<div className='flex shrink-0 justify-between items-center pli-4 plb-1 text-sm bg-toolbarSurface border-bs !border-subduedSeparator'>
|
|
30
30
|
<div className='flex gap-4 items-center'>
|
|
31
|
-
<div className='flex
|
|
31
|
+
<div className='flex is-16 items-center font-mono'>
|
|
32
32
|
{(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}
|
|
33
33
|
</div>
|
|
34
34
|
<div className='flex gap-2 items-center'>
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
8
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
9
|
import { testFunctionPlugins } from '@dxos/compute/testing';
|
|
10
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/plugin-testing';
|
|
11
11
|
import { useSpace } from '@dxos/react-client/echo';
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
13
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
14
|
|
|
15
15
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
16
16
|
import { translations } from '../../translations';
|
|
17
|
-
import {
|
|
17
|
+
import { Sheet } from '../../types';
|
|
18
18
|
import { useComputeGraph } from '../ComputeGraph';
|
|
19
19
|
import { SheetProvider } from '../SheetContext';
|
|
20
20
|
|
|
@@ -41,11 +41,11 @@ const meta = {
|
|
|
41
41
|
title: 'plugins/plugin-sheet/GridSheet',
|
|
42
42
|
component: GridSheet,
|
|
43
43
|
decorators: [
|
|
44
|
-
withTheme,
|
|
45
|
-
withClientProvider({ types: [
|
|
44
|
+
withTheme(),
|
|
45
|
+
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
46
46
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
47
47
|
withPluginManager({
|
|
48
|
-
plugins: [
|
|
48
|
+
plugins: [OperationPlugin(), RuntimePlugin()],
|
|
49
49
|
}),
|
|
50
50
|
],
|
|
51
51
|
parameters: {
|
|
@@ -13,8 +13,9 @@ import React, {
|
|
|
13
13
|
useState,
|
|
14
14
|
} from 'react';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
17
17
|
import { type CellRange, rangeToA1Notation } from '@dxos/compute';
|
|
18
|
+
import { Obj } from '@dxos/echo';
|
|
18
19
|
import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
|
|
19
20
|
import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
20
21
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
import { type RangeController, rangeExtension, sheetExtension } from '../../extensions';
|
|
36
37
|
import { useSelectThreadOnCellFocus, useUpdateFocusedCellOnThreadSelection } from '../../integrations';
|
|
37
38
|
import { meta } from '../../meta';
|
|
38
|
-
import { DEFAULT_COLS, DEFAULT_ROWS,
|
|
39
|
+
import { DEFAULT_COLS, DEFAULT_ROWS, SheetOperation } from '../../types';
|
|
39
40
|
import { useSheetContext } from '../SheetContext';
|
|
40
41
|
|
|
41
42
|
import { colLabelCell, rowLabelCell, useSheetModelDxGridProps } from './util';
|
|
@@ -76,7 +77,7 @@ export const GridSheet = () => {
|
|
|
76
77
|
// a reliable dependency for `useEffect` whereas `useLayoutEffect` does not guarantee the element will be defined.
|
|
77
78
|
const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
|
|
78
79
|
const [extraplanarFocus, setExtraplanarFocus] = useState<DxGridPosition | null>(null);
|
|
79
|
-
const {
|
|
80
|
+
const { invokePromise } = useOperationInvoker();
|
|
80
81
|
const rangeController = useRef<RangeController>(null);
|
|
81
82
|
const { hasAttention } = useAttention(id);
|
|
82
83
|
|
|
@@ -127,15 +128,17 @@ export const GridSheet = () => {
|
|
|
127
128
|
|
|
128
129
|
const handleAxisResize = useCallback<NonNullable<GridContentProps['onAxisResize']>>(
|
|
129
130
|
({ axis, size, index: numericIndex }) => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
Obj.change(model.sheet, (sheet) => {
|
|
132
|
+
if (axis === 'row') {
|
|
133
|
+
const rowId = sheet.rows[parseInt(numericIndex)];
|
|
134
|
+
sheet.rowMeta[rowId] ??= {};
|
|
135
|
+
sheet.rowMeta[rowId].size = size;
|
|
136
|
+
} else {
|
|
137
|
+
const columnId = sheet.columns[parseInt(numericIndex)];
|
|
138
|
+
sheet.columnMeta[columnId] ??= {};
|
|
139
|
+
sheet.columnMeta[columnId].size = size;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
139
142
|
},
|
|
140
143
|
[model],
|
|
141
144
|
);
|
|
@@ -172,12 +175,20 @@ export const GridSheet = () => {
|
|
|
172
175
|
case 'frozenRowsStart':
|
|
173
176
|
return dxGrid?.setSelection({
|
|
174
177
|
start: { col: pos.col, row: 0, plane: 'grid' },
|
|
175
|
-
end: {
|
|
178
|
+
end: {
|
|
179
|
+
col: pos.col,
|
|
180
|
+
row: model.sheet.rows.length - 1,
|
|
181
|
+
plane: 'grid',
|
|
182
|
+
},
|
|
176
183
|
});
|
|
177
184
|
case 'frozenColsStart':
|
|
178
185
|
return dxGrid?.setSelection({
|
|
179
186
|
start: { row: pos.row, col: 0, plane: 'grid' },
|
|
180
|
-
end: {
|
|
187
|
+
end: {
|
|
188
|
+
row: pos.row,
|
|
189
|
+
col: model.sheet.columns.length - 1,
|
|
190
|
+
plane: 'grid',
|
|
191
|
+
},
|
|
181
192
|
});
|
|
182
193
|
}
|
|
183
194
|
},
|
|
@@ -257,31 +268,30 @@ export const GridSheet = () => {
|
|
|
257
268
|
switch (operation) {
|
|
258
269
|
case 'insert-before':
|
|
259
270
|
case 'insert-after':
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}),
|
|
266
|
-
);
|
|
271
|
+
return invokePromise(SheetOperation.InsertAxis, {
|
|
272
|
+
model,
|
|
273
|
+
axis: contextMenuAxis,
|
|
274
|
+
index: contextMenuOpen![contextMenuAxis] + (operation === 'insert-before' ? 0 : 1),
|
|
275
|
+
});
|
|
267
276
|
case 'drop':
|
|
268
|
-
return
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
);
|
|
277
|
+
return invokePromise(SheetOperation.DropAxis, {
|
|
278
|
+
model,
|
|
279
|
+
axis: contextMenuAxis,
|
|
280
|
+
axisIndex: model.sheet[contextMenuAxis === 'row' ? 'rows' : 'columns'][contextMenuOpen![contextMenuAxis]],
|
|
281
|
+
});
|
|
275
282
|
}
|
|
276
283
|
},
|
|
277
|
-
[contextMenuAxis, contextMenuOpen, model,
|
|
284
|
+
[contextMenuAxis, contextMenuOpen, model, invokePromise],
|
|
278
285
|
);
|
|
279
286
|
|
|
280
287
|
const { columns, rows } = useSheetModelDxGridProps(dxGrid, model);
|
|
281
288
|
|
|
282
289
|
const extensions = useMemo(
|
|
283
290
|
() => [
|
|
284
|
-
editorKeys({
|
|
291
|
+
editorKeys({
|
|
292
|
+
onClose: handleClose,
|
|
293
|
+
...(editing?.initialContent && { onNav: handleClose }),
|
|
294
|
+
}),
|
|
285
295
|
sheetExtension({ functions: model.graph.getFunctions() }),
|
|
286
296
|
rangeExtension({
|
|
287
297
|
onInit: (fn) => (rangeController.current = fn),
|
|
@@ -6,16 +6,17 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
import React, { useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Client } from '@dxos/client';
|
|
9
|
-
import { createDocAccessor } from '@dxos/client/echo';
|
|
10
9
|
import { defaultFunctions } from '@dxos/compute';
|
|
11
10
|
import { getRegisteredFunctionNames } from '@dxos/compute/testing';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { createDocAccessor } from '@dxos/echo-db';
|
|
12
13
|
import { useAsyncEffect } from '@dxos/react-hooks';
|
|
13
14
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
|
-
import { automerge } from '@dxos/react-ui-editor';
|
|
15
15
|
import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
|
|
16
|
+
import { automerge } from '@dxos/ui-editor';
|
|
16
17
|
|
|
17
18
|
import { sheetExtension } from '../../extensions';
|
|
18
|
-
import {
|
|
19
|
+
import { Sheet } from '../../types';
|
|
19
20
|
|
|
20
21
|
const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
21
22
|
const extensions = useMemo(() => {
|
|
@@ -29,16 +30,18 @@ const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
|
29
30
|
|
|
30
31
|
const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
|
|
31
32
|
const cell = 'A1';
|
|
32
|
-
const [object, setObject] = useState<
|
|
33
|
+
const [object, setObject] = useState<Sheet.Sheet>();
|
|
33
34
|
useAsyncEffect(async () => {
|
|
34
|
-
const client = new Client({ types: [
|
|
35
|
+
const client = new Client({ types: [Sheet.Sheet] });
|
|
35
36
|
await client.initialize();
|
|
36
37
|
await client.halo.createIdentity();
|
|
37
38
|
const space = await client.spaces.create();
|
|
38
39
|
|
|
39
|
-
const sheet =
|
|
40
|
-
sheet
|
|
41
|
-
|
|
40
|
+
const sheet = Sheet.make();
|
|
41
|
+
Obj.change(sheet, (obj) => {
|
|
42
|
+
obj.name = 'Test';
|
|
43
|
+
obj.cells[cell] = { value };
|
|
44
|
+
});
|
|
42
45
|
space.db.add(sheet);
|
|
43
46
|
setObject(sheet);
|
|
44
47
|
}, [value]);
|
|
@@ -60,7 +63,7 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
|
|
|
60
63
|
const meta = {
|
|
61
64
|
title: 'plugins/plugin-sheet/CellEditor',
|
|
62
65
|
|
|
63
|
-
decorators: [withTheme],
|
|
66
|
+
decorators: [withTheme()],
|
|
64
67
|
component: CellEditor,
|
|
65
68
|
render: DefaultStory,
|
|
66
69
|
} satisfies Meta<typeof DefaultStory>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { inRange } from '@dxos/compute';
|
|
8
|
-
import { createDocAccessor } from '@dxos/
|
|
8
|
+
import { createDocAccessor } from '@dxos/echo-db';
|
|
9
9
|
import { cellClassesForFieldType, parseValue } from '@dxos/react-ui-form';
|
|
10
10
|
import {
|
|
11
11
|
type DxGridAxisMeta,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
commentedClassName,
|
|
20
20
|
rowToA1Notation,
|
|
21
21
|
} from '@dxos/react-ui-grid';
|
|
22
|
-
import { mx } from '@dxos/
|
|
22
|
+
import { mx } from '@dxos/ui-theme';
|
|
23
23
|
|
|
24
24
|
import { type SheetModel } from '../../model';
|
|
25
25
|
import { cellClassNameForRange, rangeFromIndex } from '../../types';
|
|
@@ -28,7 +28,10 @@ const createDxGridColumns = (model: SheetModel): DxGridAxisMeta => {
|
|
|
28
28
|
return model.sheet.columns.reduce(
|
|
29
29
|
(acc: DxGridAxisMeta, columnId, numericIndex) => {
|
|
30
30
|
if (model.sheet.columnMeta[columnId] && model.sheet.columnMeta[columnId].size) {
|
|
31
|
-
acc.grid[numericIndex] = {
|
|
31
|
+
acc.grid[numericIndex] = {
|
|
32
|
+
size: model.sheet.columnMeta[columnId].size,
|
|
33
|
+
resizeable: true,
|
|
34
|
+
};
|
|
32
35
|
}
|
|
33
36
|
return acc;
|
|
34
37
|
},
|
|
@@ -40,7 +43,10 @@ const createDxGridRows = (model: SheetModel): DxGridAxisMeta => {
|
|
|
40
43
|
return model.sheet.rows.reduce(
|
|
41
44
|
(acc: DxGridAxisMeta, rowId, numericIndex) => {
|
|
42
45
|
if (model.sheet.rowMeta[rowId] && model.sheet.rowMeta[rowId].size) {
|
|
43
|
-
acc.grid[numericIndex] = {
|
|
46
|
+
acc.grid[numericIndex] = {
|
|
47
|
+
size: model.sheet.rowMeta[rowId].size,
|
|
48
|
+
resizeable: true,
|
|
49
|
+
};
|
|
44
50
|
}
|
|
45
51
|
return acc;
|
|
46
52
|
},
|
|
@@ -59,7 +65,7 @@ const projectCellProps = (model: SheetModel, col: number, row: number): DxGridCe
|
|
|
59
65
|
// const range = thread.target?.anchor && parseThreadAnchorAsCellRange(thread.target!.anchor);
|
|
60
66
|
// return thread && range ? inRange(range, address) : false;
|
|
61
67
|
// })
|
|
62
|
-
// .map((thread) =>
|
|
68
|
+
// .map((thread) => Obj.getDXN(thread!).toString())
|
|
63
69
|
// .join(' ');
|
|
64
70
|
|
|
65
71
|
const description = model.getValueDescription(address);
|
|
@@ -6,26 +6,29 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
8
|
import { rangeToA1Notation } from '@dxos/compute';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
9
10
|
import { Callout, useTranslation } from '@dxos/react-ui';
|
|
10
11
|
import { List } from '@dxos/react-ui-list';
|
|
11
|
-
import { ghostHover } from '@dxos/
|
|
12
|
+
import { ghostHover } from '@dxos/ui-theme';
|
|
12
13
|
|
|
13
14
|
import { meta } from '../../meta';
|
|
14
15
|
import { rangeFromIndex } from '../../types';
|
|
15
|
-
import {
|
|
16
|
+
import { Sheet } from '../../types';
|
|
16
17
|
|
|
17
18
|
export type RangeListProps = {
|
|
18
|
-
sheet:
|
|
19
|
+
sheet: Sheet.Sheet;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export const RangeList = ({ sheet }: RangeListProps) => {
|
|
22
23
|
const { t } = useTranslation(meta.id);
|
|
23
24
|
// TODO(thure): Implement similar to comments, #8121
|
|
24
|
-
const handleSelectRange = (range: Range) => {};
|
|
25
|
+
const handleSelectRange = (range: Sheet.Range) => {};
|
|
25
26
|
const handleDeleteRange = useCallback(
|
|
26
|
-
(range: Range) => {
|
|
27
|
+
(range: Sheet.Range) => {
|
|
27
28
|
const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);
|
|
28
|
-
|
|
29
|
+
Obj.change(sheet, (obj) => {
|
|
30
|
+
obj.ranges.splice(index, 1);
|
|
31
|
+
});
|
|
29
32
|
},
|
|
30
33
|
[sheet],
|
|
31
34
|
);
|
|
@@ -37,7 +40,7 @@ export const RangeList = ({ sheet }: RangeListProps) => {
|
|
|
37
40
|
<Callout.Title>{t('no ranges message')}</Callout.Title>
|
|
38
41
|
</Callout.Root>
|
|
39
42
|
) : (
|
|
40
|
-
<List.Root<Range> items={sheet.ranges} isItem={Schema.is(Range)}>
|
|
43
|
+
<List.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>
|
|
41
44
|
{({ items: ranges }) =>
|
|
42
45
|
ranges.map((range, i) => (
|
|
43
46
|
<List.Item key={i} item={range} classNames={['p-2', ghostHover]}>
|
|
@@ -3,20 +3,22 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Meta } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
|
|
8
|
-
import { Capabilities,
|
|
9
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { OperationResolver } from '@dxos/operation';
|
|
13
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
14
|
+
import { useSpace } from '@dxos/react-client/echo';
|
|
12
15
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
16
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
17
|
import { AttendableContainer } from '@dxos/react-ui-attention';
|
|
15
|
-
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
16
18
|
|
|
17
19
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
18
20
|
import { translations } from '../../translations';
|
|
19
|
-
import {
|
|
21
|
+
import { Sheet, SheetOperation } from '../../types';
|
|
20
22
|
import { useComputeGraph } from '../ComputeGraph';
|
|
21
23
|
import { RangeList } from '../RangeList';
|
|
22
24
|
|
|
@@ -26,23 +28,25 @@ const meta = {
|
|
|
26
28
|
title: 'plugins/plugin-sheet/SheetContainer',
|
|
27
29
|
component: SheetContainer,
|
|
28
30
|
decorators: [
|
|
29
|
-
withTheme,
|
|
30
|
-
|
|
31
|
+
withTheme(),
|
|
32
|
+
withLayout({ layout: 'fullscreen' }),
|
|
33
|
+
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
31
34
|
withComputeGraphDecorator(),
|
|
32
|
-
withAttention,
|
|
33
35
|
// TODO(wittjosiah): Consider whether we should refactor component so story doesn't need to depend on intents.
|
|
34
36
|
withPluginManager({
|
|
35
|
-
plugins: [
|
|
37
|
+
plugins: [...corePlugins()],
|
|
36
38
|
capabilities: [
|
|
37
|
-
contributes(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
Capability.contributes(Capabilities.OperationResolver, [
|
|
40
|
+
OperationResolver.make({
|
|
41
|
+
operation: SheetOperation.DropAxis,
|
|
42
|
+
handler: ({ model, axis, axisIndex }) =>
|
|
43
|
+
Effect.sync(() => {
|
|
44
|
+
model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
|
|
45
|
+
// Return stub output for story purposes.
|
|
46
|
+
return { axis, axisIndex, index: 0, axisMeta: null, values: [] };
|
|
47
|
+
}),
|
|
44
48
|
}),
|
|
45
|
-
),
|
|
49
|
+
]),
|
|
46
50
|
],
|
|
47
51
|
}),
|
|
48
52
|
],
|
|
@@ -63,12 +67,31 @@ export const Default = () => {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
return (
|
|
66
|
-
<AttendableContainer id={
|
|
67
|
-
<SheetContainer space={space}
|
|
70
|
+
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
71
|
+
<SheetContainer role='article' space={space} subject={sheet} ignoreAttention />
|
|
68
72
|
</AttendableContainer>
|
|
69
73
|
);
|
|
70
74
|
};
|
|
71
75
|
|
|
76
|
+
export const Section = () => {
|
|
77
|
+
const space = useSpace();
|
|
78
|
+
const graph = useComputeGraph(space);
|
|
79
|
+
const sheet = useTestSheet(space, graph, { cells: createTestCells() });
|
|
80
|
+
if (!sheet || !space) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className='is-full flex justify-center'>
|
|
86
|
+
<div className='is-[40rem]'>
|
|
87
|
+
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
88
|
+
<SheetContainer role='section' space={space} subject={sheet} ignoreAttention />
|
|
89
|
+
</AttendableContainer>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
72
95
|
export const Spec = () => {
|
|
73
96
|
const space = useSpace();
|
|
74
97
|
const graph = useComputeGraph(space);
|
|
@@ -78,9 +101,9 @@ export const Spec = () => {
|
|
|
78
101
|
}
|
|
79
102
|
|
|
80
103
|
return (
|
|
81
|
-
<AttendableContainer id={
|
|
82
|
-
<div role='none' className='grid grid-
|
|
83
|
-
<SheetContainer space={space}
|
|
104
|
+
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
105
|
+
<div role='none' className='is-full grid grid-cols-[1fr_20rem]'>
|
|
106
|
+
<SheetContainer role='article' space={space} subject={sheet} ignoreAttention />
|
|
84
107
|
<div role='none' data-testid='grid.range-list'>
|
|
85
108
|
<RangeList sheet={sheet} />
|
|
86
109
|
</div>
|
|
@@ -2,39 +2,47 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { Fragment } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
8
|
-
import {
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
10
|
+
import { Flex, type FlexProps, Layout } from '@dxos/react-ui';
|
|
9
11
|
|
|
10
|
-
import { type
|
|
12
|
+
import { type Sheet } from '../../types';
|
|
11
13
|
import { useComputeGraph } from '../ComputeGraph';
|
|
12
14
|
import { FunctionEditor } from '../FunctionEditor';
|
|
13
15
|
import { GridSheet } from '../GridSheet';
|
|
14
16
|
import { SheetProvider } from '../SheetContext';
|
|
15
17
|
import { SheetToolbar } from '../SheetToolbar';
|
|
16
18
|
|
|
17
|
-
export type SheetContainerProps =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
export type SheetContainerProps = SurfaceComponentProps<
|
|
20
|
+
Sheet.Sheet,
|
|
21
|
+
{
|
|
22
|
+
space: Space;
|
|
23
|
+
ignoreAttention?: boolean;
|
|
24
|
+
}
|
|
25
|
+
>;
|
|
23
26
|
|
|
24
|
-
export const SheetContainer = ({
|
|
27
|
+
export const SheetContainer = ({ role, subject: sheet, space, ignoreAttention }: SheetContainerProps) => {
|
|
25
28
|
const graph = useComputeGraph(space);
|
|
29
|
+
if (!graph) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const Root = role === 'section' ? Container : Fragment;
|
|
26
34
|
|
|
27
|
-
return
|
|
35
|
+
return (
|
|
28
36
|
<SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>
|
|
29
|
-
<
|
|
30
|
-
toolbar
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<FunctionEditor />
|
|
37
|
-
</StackItem.Content>
|
|
37
|
+
<Root>
|
|
38
|
+
<Layout.Main toolbar statusbar>
|
|
39
|
+
<SheetToolbar id={Obj.getDXN(sheet).toString()} />
|
|
40
|
+
<GridSheet />
|
|
41
|
+
<FunctionEditor />
|
|
42
|
+
</Layout.Main>
|
|
43
|
+
</Root>
|
|
38
44
|
</SheetProvider>
|
|
39
|
-
)
|
|
45
|
+
);
|
|
40
46
|
};
|
|
47
|
+
|
|
48
|
+
const Container = (props: FlexProps) => <Flex {...props} classNames='aspect-square' />;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
8
9
|
import { invariant } from '@dxos/invariant';
|
|
9
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|
|
11
11
|
Grid,
|
|
12
12
|
type GridContentProps,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@dxos/react-ui-grid';
|
|
17
17
|
|
|
18
18
|
import { type SheetModel, useSheetModel } from '../../model';
|
|
19
|
-
import { type
|
|
19
|
+
import { type Sheet } from '../../types';
|
|
20
20
|
|
|
21
21
|
export type SheetContextValue = {
|
|
22
22
|
id: string;
|
|
@@ -56,12 +56,12 @@ export const useSheetContext = (): SheetContextValue => {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const SheetProviderImpl = ({
|
|
59
|
+
__gridScope,
|
|
60
|
+
children,
|
|
61
|
+
ignoreAttention,
|
|
59
62
|
model,
|
|
60
63
|
onInfo,
|
|
61
|
-
|
|
62
|
-
children,
|
|
63
|
-
__gridScope,
|
|
64
|
-
}: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'onInfo' | 'model' | 'ignoreAttention'>>>) => {
|
|
64
|
+
}: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'ignoreAttention' | 'model' | 'onInfo'>>>) => {
|
|
65
65
|
const { id, editing, setEditing } = useGridContext('SheetProvider', __gridScope);
|
|
66
66
|
|
|
67
67
|
const [cursor, setCursorInternal] = useState<CellAddress>();
|
|
@@ -114,7 +114,7 @@ const SheetProviderImpl = ({
|
|
|
114
114
|
|
|
115
115
|
export type SheetProviderProps = {
|
|
116
116
|
graph: ComputeGraph;
|
|
117
|
-
sheet:
|
|
117
|
+
sheet: Sheet.Sheet;
|
|
118
118
|
readonly?: boolean;
|
|
119
119
|
ignoreAttention?: boolean;
|
|
120
120
|
} & Pick<SheetContextValue, 'onInfo'>;
|
|
@@ -130,7 +130,7 @@ export const SheetProvider = ({
|
|
|
130
130
|
const model = useSheetModel(graph, sheet, { readonly });
|
|
131
131
|
|
|
132
132
|
return !model ? null : (
|
|
133
|
-
<Grid.Root id={
|
|
133
|
+
<Grid.Root id={Obj.getDXN(sheet).toString()}>
|
|
134
134
|
<SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
|
|
135
135
|
{children}
|
|
136
136
|
</SheetProviderImpl>
|