@dxos/plugin-sheet 0.6.13 → 0.6.14-staging.9e90729
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-JBB7W52Y.mjs +280 -0
- package/dist/lib/browser/SheetContainer-JBB7W52Y.mjs.map +7 -0
- package/dist/lib/browser/{chunk-D5AGLXJP.mjs → chunk-2ZK3YMZG.mjs} +621 -675
- package/dist/lib/browser/chunk-2ZK3YMZG.mjs.map +7 -0
- package/dist/lib/browser/chunk-3QWIMZZJ.mjs +65 -0
- package/dist/lib/browser/chunk-3QWIMZZJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-D3QTX46O.mjs +14 -0
- package/dist/lib/browser/chunk-D3QTX46O.mjs.map +7 -0
- package/dist/lib/browser/chunk-XXDHBYZQ.mjs +1455 -0
- package/dist/lib/browser/chunk-XXDHBYZQ.mjs.map +7 -0
- package/dist/lib/browser/compute-graph-ZQKB6QVP.mjs +35 -0
- package/dist/lib/browser/compute-graph-ZQKB6QVP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +139 -65
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types.mjs +6 -12
- package/dist/lib/node/SheetContainer-L37HUFCF.cjs +286 -0
- package/dist/lib/node/SheetContainer-L37HUFCF.cjs.map +7 -0
- package/dist/lib/node/chunk-7AWAC3R3.cjs +1441 -0
- package/dist/lib/node/chunk-7AWAC3R3.cjs.map +7 -0
- package/dist/lib/node/chunk-QIFIGEKV.cjs +37 -0
- package/dist/lib/node/chunk-QIFIGEKV.cjs.map +7 -0
- package/dist/lib/node/{chunk-5KKJ4NPP.cjs → chunk-QNFMTK3X.cjs} +638 -674
- package/dist/lib/node/chunk-QNFMTK3X.cjs.map +7 -0
- package/dist/lib/node/{chunk-DSYKOI4E.cjs → chunk-V7E5JZBD.cjs} +31 -51
- package/dist/lib/node/chunk-V7E5JZBD.cjs.map +7 -0
- package/dist/lib/node/compute-graph-RJB6OVW6.cjs +57 -0
- package/dist/lib/node/compute-graph-RJB6OVW6.cjs.map +7 -0
- package/dist/lib/node/index.cjs +148 -73
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +3 -3
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types.cjs +9 -15
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/SheetContainer-CLKFEM35.mjs +281 -0
- package/dist/lib/node-esm/SheetContainer-CLKFEM35.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3JYJEOCF.mjs +1456 -0
- package/dist/lib/node-esm/chunk-3JYJEOCF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JBTORSST.mjs +3182 -0
- package/dist/lib/node-esm/chunk-JBTORSST.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SPQFLYC2.mjs +66 -0
- package/dist/lib/node-esm/chunk-SPQFLYC2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VCYJWE3O.mjs +16 -0
- package/dist/lib/node-esm/chunk-VCYJWE3O.mjs.map +7 -0
- package/dist/lib/node-esm/compute-graph-VKRG526N.mjs +36 -0
- package/dist/lib/node-esm/compute-graph-VKRG526N.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +323 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +10 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +17 -0
- package/dist/lib/node-esm/types.mjs.map +7 -0
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +13 -0
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/index.d.ts +1 -3
- package/dist/types/src/components/ComputeGraph/index.d.ts.map +1 -1
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +3 -0
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -0
- package/dist/types/src/components/FunctionEditor/index.d.ts +2 -0
- package/dist/types/src/components/FunctionEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/GridSheet.d.ts +3 -0
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +6 -0
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -0
- package/dist/types/src/components/{CellEditor/CellEditor.stories.d.ts → GridSheet/SheetCellEditor.stories.d.ts} +5 -9
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/index.d.ts +2 -0
- package/dist/types/src/components/GridSheet/index.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/util.d.ts +16 -0
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -0
- package/dist/types/src/components/RangeList/RangeList.d.ts +9 -0
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +1 -0
- package/dist/types/src/components/RangeList/index.d.ts +2 -0
- package/dist/types/src/components/RangeList/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +6 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +6 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer/index.d.ts +3 -0
- package/dist/types/src/components/SheetContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +28 -0
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -0
- package/dist/types/src/components/SheetContext/index.d.ts +2 -0
- package/dist/types/src/components/SheetContext/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +33 -9
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +4 -32
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/compute-graph/compute-graph-registry.d.ts +34 -0
- package/dist/types/src/compute-graph/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/compute-graph/compute-graph.d.ts +64 -0
- package/dist/types/src/compute-graph/compute-graph.d.ts.map +1 -0
- package/dist/types/src/compute-graph/compute-graph.stories.d.ts +6 -0
- package/dist/types/src/compute-graph/compute-graph.stories.d.ts.map +1 -0
- package/dist/types/src/compute-graph/compute-graph.test.d.ts +2 -0
- package/dist/types/src/compute-graph/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/compute-graph/compute-node.d.ts +26 -0
- package/dist/types/src/compute-graph/compute-node.d.ts.map +1 -0
- package/dist/types/src/{components/ComputeGraph → compute-graph/functions}/async-function.d.ts +14 -5
- package/dist/types/src/compute-graph/functions/async-function.d.ts.map +1 -0
- package/dist/types/src/compute-graph/functions/edge-function.d.ts +21 -0
- package/dist/types/src/compute-graph/functions/edge-function.d.ts.map +1 -0
- package/dist/types/src/{model/functions.d.ts → compute-graph/functions/function-defs.d.ts} +1 -1
- package/dist/types/src/compute-graph/functions/function-defs.d.ts.map +1 -0
- package/dist/types/src/compute-graph/functions/index.d.ts +4 -0
- package/dist/types/src/compute-graph/functions/index.d.ts.map +1 -0
- package/dist/types/src/compute-graph/hyperformula.test.d.ts +2 -0
- package/dist/types/src/compute-graph/hyperformula.test.d.ts.map +1 -0
- package/dist/types/src/compute-graph/index.d.ts +5 -0
- package/dist/types/src/compute-graph/index.d.ts.map +1 -0
- package/dist/types/src/compute-graph/testing/index.d.ts +3 -0
- package/dist/types/src/compute-graph/testing/index.d.ts.map +1 -0
- package/dist/types/src/compute-graph/testing/test-builder.d.ts +15 -0
- package/dist/types/src/compute-graph/testing/test-builder.d.ts.map +1 -0
- package/dist/types/src/compute-graph/testing/test-plugin.d.ts +36 -0
- package/dist/types/src/compute-graph/testing/test-plugin.d.ts.map +1 -0
- package/dist/types/src/compute-graph/util.d.ts +2 -0
- package/dist/types/src/compute-graph/util.d.ts.map +1 -0
- package/dist/types/src/defs/index.d.ts +4 -0
- package/dist/types/src/defs/index.d.ts.map +1 -0
- package/dist/types/src/defs/sheet-range-types.d.ts +13 -0
- package/dist/types/src/defs/sheet-range-types.d.ts.map +1 -0
- package/dist/types/src/defs/types.d.ts +28 -0
- package/dist/types/src/defs/types.d.ts.map +1 -0
- package/dist/types/src/defs/types.test.d.ts.map +1 -0
- package/dist/types/src/defs/util.d.ts +39 -0
- package/dist/types/src/defs/util.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.d.ts +6 -0
- package/dist/types/src/extensions/compute.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.stories.d.ts +21 -0
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/extension.d.ts +39 -0
- package/dist/types/src/extensions/editor/extension.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/extension.test.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/index.d.ts +2 -0
- package/dist/types/src/extensions/editor/index.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +3 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/integrations/index.d.ts +2 -0
- package/dist/types/src/integrations/index.d.ts.map +1 -0
- package/dist/types/src/integrations/thread-ranges.d.ts +8 -0
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/index.d.ts +2 -3
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/model/{model.d.ts → sheet-model.d.ts} +13 -67
- package/dist/types/src/model/sheet-model.d.ts.map +1 -0
- package/dist/types/src/model/sheet-model.test.d.ts +2 -0
- package/dist/types/src/model/sheet-model.test.d.ts.map +1 -0
- package/dist/types/src/model/useSheetModel.d.ts +8 -0
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -0
- package/dist/types/src/sanity.test.d.ts +2 -0
- package/dist/types/src/sanity.test.d.ts.map +1 -0
- package/dist/types/src/serializer.d.ts +4 -0
- package/dist/types/src/serializer.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +8 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +23 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +100 -41
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/vendor/hyperformula.mjs +37145 -0
- package/package.json +60 -61
- package/src/SheetPlugin.tsx +69 -78
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +37 -0
- package/src/components/ComputeGraph/index.ts +1 -3
- package/src/components/FunctionEditor/FunctionEditor.tsx +45 -0
- package/src/components/FunctionEditor/index.ts +5 -0
- package/src/components/GridSheet/GridSheet.stories.tsx +46 -0
- package/src/components/GridSheet/GridSheet.tsx +296 -0
- package/src/components/{CellEditor/CellEditor.stories.tsx → GridSheet/SheetCellEditor.stories.tsx} +18 -15
- package/src/components/GridSheet/index.ts +5 -0
- package/src/components/GridSheet/util.ts +164 -0
- package/src/components/RangeList/RangeList.tsx +38 -0
- package/src/components/RangeList/index.ts +5 -0
- package/src/components/SheetContainer/SheetContainer.stories.tsx +43 -0
- package/src/components/SheetContainer/SheetContainer.tsx +27 -0
- package/src/components/SheetContainer/index.ts +7 -0
- package/src/components/SheetContext/SheetContext.tsx +127 -0
- package/src/components/SheetContext/index.ts +5 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +9 -6
- package/src/components/Toolbar/Toolbar.tsx +240 -111
- package/src/components/index.ts +5 -3
- package/src/compute-graph/compute-graph-registry.ts +90 -0
- package/src/compute-graph/compute-graph.stories.tsx +97 -0
- package/src/compute-graph/compute-graph.test.ts +87 -0
- package/src/compute-graph/compute-graph.ts +245 -0
- package/src/compute-graph/compute-node.ts +62 -0
- package/src/{components/ComputeGraph → compute-graph/functions}/async-function.ts +25 -15
- package/src/{components/ComputeGraph → compute-graph/functions}/edge-function.ts +16 -14
- package/src/compute-graph/functions/index.ts +7 -0
- package/src/compute-graph/hyperformula.test.ts +14 -0
- package/src/compute-graph/index.ts +8 -0
- package/src/compute-graph/testing/index.ts +6 -0
- package/src/compute-graph/testing/test-builder.ts +54 -0
- package/src/{components/ComputeGraph/custom.ts → compute-graph/testing/test-plugin.ts} +44 -14
- package/src/compute-graph/util.ts +8 -0
- package/src/defs/index.ts +7 -0
- package/src/defs/sheet-range-types.ts +47 -0
- package/src/{model → defs}/types.test.ts +8 -9
- package/src/defs/types.ts +86 -0
- package/src/defs/util.ts +135 -0
- package/src/extensions/compute.stories.tsx +155 -0
- package/src/extensions/compute.ts +147 -0
- package/src/{components/CellEditor → extensions/editor}/extension.test.ts +4 -6
- package/src/{components/CellEditor → extensions/editor}/extension.ts +51 -27
- package/src/{components/CellEditor → extensions/editor}/index.ts +0 -1
- package/src/extensions/index.ts +6 -0
- package/src/index.ts +2 -2
- package/src/integrations/index.ts +5 -0
- package/src/integrations/thread-ranges.ts +101 -0
- package/src/meta.ts +14 -0
- package/src/model/index.ts +2 -3
- package/src/model/sheet-model.test.ts +57 -0
- package/src/model/sheet-model.ts +423 -0
- package/src/model/useSheetModel.ts +40 -0
- package/src/sanity.test.ts +40 -0
- package/src/serializer.ts +27 -0
- package/src/{components/Sheet → testing}/index.ts +1 -1
- package/src/testing/testing.tsx +68 -0
- package/src/translations.ts +12 -1
- package/src/types.ts +41 -46
- package/dist/lib/browser/SheetContainer-U4H5D34A.mjs +0 -1772
- package/dist/lib/browser/SheetContainer-U4H5D34A.mjs.map +0 -7
- package/dist/lib/browser/chunk-APHOLYUB.mjs +0 -175
- package/dist/lib/browser/chunk-APHOLYUB.mjs.map +0 -7
- package/dist/lib/browser/chunk-D5AGLXJP.mjs.map +0 -7
- package/dist/lib/browser/chunk-FUAGSXA4.mjs +0 -82
- package/dist/lib/browser/chunk-FUAGSXA4.mjs.map +0 -7
- package/dist/lib/browser/chunk-JRL5LGCE.mjs +0 -18
- package/dist/lib/browser/chunk-JRL5LGCE.mjs.map +0 -7
- package/dist/lib/browser/chunk-NU4PBN33.mjs +0 -8
- package/dist/lib/browser/chunk-NU4PBN33.mjs.map +0 -7
- package/dist/lib/browser/testing.mjs +0 -92
- package/dist/lib/browser/testing.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-AXQV3ZT5.cjs +0 -1765
- package/dist/lib/node/SheetContainer-AXQV3ZT5.cjs.map +0 -7
- package/dist/lib/node/chunk-5KKJ4NPP.cjs.map +0 -7
- package/dist/lib/node/chunk-BJ6ZD7MN.cjs +0 -51
- package/dist/lib/node/chunk-BJ6ZD7MN.cjs.map +0 -7
- package/dist/lib/node/chunk-CN3RPESU.cjs +0 -202
- package/dist/lib/node/chunk-CN3RPESU.cjs.map +0 -7
- package/dist/lib/node/chunk-DSYKOI4E.cjs.map +0 -7
- package/dist/lib/node/chunk-PYXHNAAK.cjs +0 -40
- package/dist/lib/node/chunk-PYXHNAAK.cjs.map +0 -7
- package/dist/lib/node/testing.cjs +0 -111
- package/dist/lib/node/testing.cjs.map +0 -7
- package/dist/types/src/components/CellEditor/CellEditor.d.ts +0 -14
- package/dist/types/src/components/CellEditor/CellEditor.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/CellEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/extension.d.ts +0 -19
- package/dist/types/src/components/CellEditor/extension.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/extension.test.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/index.d.ts +0 -3
- package/dist/types/src/components/CellEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/async-function.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/custom.d.ts +0 -21
- package/dist/types/src/components/ComputeGraph/custom.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/edge-function.d.ts +0 -20
- package/dist/types/src/components/ComputeGraph/edge-function.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph-context.d.ts +0 -12
- package/dist/types/src/components/ComputeGraph/graph-context.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph.browser.test.d.ts +0 -2
- package/dist/types/src/components/ComputeGraph/graph.browser.test.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph.d.ts +0 -26
- package/dist/types/src/components/ComputeGraph/graph.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +0 -55
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts +0 -54
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/formatting.d.ts +0 -14
- package/dist/types/src/components/Sheet/formatting.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/grid.d.ts +0 -52
- package/dist/types/src/components/Sheet/grid.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/index.d.ts +0 -2
- package/dist/types/src/components/Sheet/index.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/nav.d.ts +0 -29
- package/dist/types/src/components/Sheet/nav.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/sheet-context.d.ts +0 -25
- package/dist/types/src/components/Sheet/sheet-context.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/util.d.ts +0 -18
- package/dist/types/src/components/Sheet/util.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer.d.ts +0 -9
- package/dist/types/src/components/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/common.d.ts +0 -20
- package/dist/types/src/components/Toolbar/common.d.ts.map +0 -1
- package/dist/types/src/model/functions.d.ts.map +0 -1
- package/dist/types/src/model/model.browser.test.d.ts +0 -2
- package/dist/types/src/model/model.browser.test.d.ts.map +0 -1
- package/dist/types/src/model/model.d.ts.map +0 -1
- package/dist/types/src/model/types.d.ts +0 -17
- package/dist/types/src/model/types.d.ts.map +0 -1
- package/dist/types/src/model/types.test.d.ts.map +0 -1
- package/dist/types/src/model/util.d.ts +0 -15
- package/dist/types/src/model/util.d.ts.map +0 -1
- package/dist/types/src/testing.d.ts +0 -9
- package/dist/types/src/testing.d.ts.map +0 -1
- package/src/components/CellEditor/CellEditor.tsx +0 -113
- package/src/components/ComputeGraph/graph-context.tsx +0 -50
- package/src/components/ComputeGraph/graph.browser.test.ts +0 -50
- package/src/components/ComputeGraph/graph.ts +0 -62
- package/src/components/Sheet/Sheet.stories.tsx +0 -287
- package/src/components/Sheet/Sheet.tsx +0 -1160
- package/src/components/Sheet/formatting.ts +0 -106
- package/src/components/Sheet/grid.ts +0 -191
- package/src/components/Sheet/nav.ts +0 -157
- package/src/components/Sheet/sheet-context.tsx +0 -150
- package/src/components/Sheet/util.ts +0 -56
- package/src/components/SheetContainer.tsx +0 -34
- package/src/components/Toolbar/common.tsx +0 -72
- package/src/meta.tsx +0 -18
- package/src/model/model.browser.test.ts +0 -100
- package/src/model/model.ts +0 -550
- package/src/model/types.ts +0 -71
- package/src/model/util.ts +0 -36
- package/src/testing.ts +0 -50
- /package/dist/types/src/{model → defs}/types.test.d.ts +0 -0
- /package/dist/types/src/{components/CellEditor → extensions/editor}/extension.test.d.ts +0 -0
- /package/src/{model/functions.ts → compute-graph/functions/function-defs.ts} +0 -0
|
@@ -26,45 +26,301 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
var chunk_QNFMTK3X_exports = {};
|
|
30
|
+
__export(chunk_QNFMTK3X_exports, {
|
|
31
|
+
AsyncFunctionPlugin: () => AsyncFunctionPlugin,
|
|
32
|
+
ComputeGraph: () => ComputeGraph,
|
|
33
|
+
ComputeGraphRegistry: () => ComputeGraphRegistry,
|
|
34
|
+
ComputeNode: () => ComputeNode,
|
|
35
|
+
DEFAULT_COLUMNS: () => DEFAULT_COLUMNS,
|
|
36
|
+
DEFAULT_ROWS: () => DEFAULT_ROWS,
|
|
37
|
+
EDGE_FUNCTION_NAME: () => EDGE_FUNCTION_NAME,
|
|
38
|
+
EdgeFunctionPlugin: () => EdgeFunctionPlugin,
|
|
39
|
+
EdgeFunctionPluginTranslations: () => EdgeFunctionPluginTranslations,
|
|
40
|
+
FunctionContext: () => FunctionContext,
|
|
41
|
+
MAX_COLUMNS: () => MAX_COLUMNS,
|
|
42
|
+
MAX_ROWS: () => MAX_ROWS,
|
|
43
|
+
RANGE_NOTATION: () => RANGE_NOTATION,
|
|
44
|
+
ReadonlyException: () => ReadonlyException,
|
|
35
45
|
addressFromA1Notation: () => addressFromA1Notation,
|
|
46
|
+
addressFromIndex: () => addressFromIndex,
|
|
36
47
|
addressToA1Notation: () => addressToA1Notation,
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
addressToIndex: () => addressToIndex,
|
|
49
|
+
cellClassNameForRange: () => cellClassNameForRange,
|
|
50
|
+
compareIndexPositions: () => compareIndexPositions,
|
|
51
|
+
createSheet: () => createSheet,
|
|
52
|
+
createSheetName: () => createSheetName,
|
|
53
|
+
defaultFunctionContextOptions: () => defaultFunctionContextOptions,
|
|
39
54
|
defaultFunctions: () => defaultFunctions,
|
|
55
|
+
defaultOptions: () => defaultOptions,
|
|
56
|
+
defaultPlugins: () => defaultPlugins,
|
|
40
57
|
inRange: () => inRange,
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
initialize: () => initialize,
|
|
59
|
+
insertIndices: () => insertIndices,
|
|
60
|
+
isFormula: () => isFormula,
|
|
61
|
+
parseSheetName: () => parseSheetName,
|
|
62
|
+
rangeFromIndex: () => rangeFromIndex,
|
|
63
|
+
rangeToA1Notation: () => rangeToA1Notation,
|
|
64
|
+
rangeToIndex: () => rangeToIndex
|
|
43
65
|
});
|
|
44
|
-
module.exports = __toCommonJS(
|
|
45
|
-
var
|
|
46
|
-
var import_hyperformula = require("hyperformula");
|
|
66
|
+
module.exports = __toCommonJS(chunk_QNFMTK3X_exports);
|
|
67
|
+
var import_chunk_V7E5JZBD = require("./chunk-V7E5JZBD.cjs");
|
|
47
68
|
var import_async = require("@dxos/async");
|
|
69
|
+
var import_echo = require("@dxos/client/echo");
|
|
70
|
+
var import_context = require("@dxos/context");
|
|
71
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
72
|
+
var import_invariant = require("@dxos/invariant");
|
|
48
73
|
var import_keys = require("@dxos/keys");
|
|
49
74
|
var import_log = require("@dxos/log");
|
|
50
|
-
var
|
|
51
|
-
var
|
|
75
|
+
var import_types = require("@dxos/plugin-script/types");
|
|
76
|
+
var import_util = require("@dxos/util");
|
|
77
|
+
var import_hyperformula = require("#hyperformula");
|
|
52
78
|
var import_async2 = require("@dxos/async");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var import_async3 = require("@dxos/async");
|
|
56
|
-
var import_context = require("@dxos/context");
|
|
57
|
-
var import_invariant = require("@dxos/invariant");
|
|
58
|
-
var import_keys2 = require("@dxos/keys");
|
|
59
|
-
var import_log3 = require("@dxos/log");
|
|
79
|
+
var import_context2 = require("@dxos/context");
|
|
80
|
+
var import_hyperformula2 = require("#hyperformula");
|
|
60
81
|
var import_invariant2 = require("@dxos/invariant");
|
|
61
82
|
var import_crypto = require("@dxos/crypto");
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
83
|
+
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
84
|
+
var import_lodash = __toESM(require("lodash.defaultsdeep"));
|
|
85
|
+
var import_async3 = require("@dxos/async");
|
|
86
|
+
var import_log2 = require("@dxos/log");
|
|
87
|
+
var import_hyperformula3 = require("#hyperformula");
|
|
88
|
+
var import_signals_core = require("@preact/signals-core");
|
|
89
|
+
var import_echo2 = require("@dxos/client/echo");
|
|
90
|
+
var import_log3 = require("@dxos/log");
|
|
91
|
+
var import_edge = require("@dxos/plugin-script/edge");
|
|
92
|
+
var import_types2 = require("@dxos/plugin-script/types");
|
|
93
|
+
var import_util2 = require("@dxos/util");
|
|
94
|
+
var import_hyperformula4 = require("#hyperformula");
|
|
95
|
+
var import_lodash2 = __toESM(require("lodash.defaultsdeep"));
|
|
96
|
+
var import_context3 = require("@dxos/context");
|
|
97
|
+
var import_invariant3 = require("@dxos/invariant");
|
|
98
|
+
var import_log4 = require("@dxos/log");
|
|
99
|
+
var import_hyperformula5 = require("#hyperformula");
|
|
100
|
+
var cellClassNameForRange = ({ key, value }) => {
|
|
101
|
+
switch (key) {
|
|
102
|
+
case "align":
|
|
103
|
+
switch (value) {
|
|
104
|
+
case "start":
|
|
105
|
+
return "text-start";
|
|
106
|
+
case "center":
|
|
107
|
+
return "text-center";
|
|
108
|
+
case "end":
|
|
109
|
+
return "text-end";
|
|
110
|
+
default:
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
case "comment":
|
|
114
|
+
return "bg-gridComment";
|
|
115
|
+
case "style":
|
|
116
|
+
switch (value) {
|
|
117
|
+
case "highlight":
|
|
118
|
+
return "bg-gridHighlight";
|
|
119
|
+
default:
|
|
120
|
+
return void 0;
|
|
121
|
+
}
|
|
122
|
+
default:
|
|
123
|
+
return void 0;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/defs/types.ts";
|
|
127
|
+
var DEFAULT_ROWS = 50;
|
|
128
|
+
var DEFAULT_COLUMNS = 26;
|
|
129
|
+
var MAX_ROWS = 500;
|
|
130
|
+
var MAX_COLUMNS = 26 * 2;
|
|
131
|
+
var RANGE_NOTATION = /^[A-Z]+[0-9]+(:[A-Z]+[0-9]+)?$/;
|
|
132
|
+
var isFormula = (value) => typeof value === "string" && value.charAt(0) === "=";
|
|
133
|
+
var posEquals = (a, b) => {
|
|
134
|
+
return a?.col === b?.col && a?.row === b?.row;
|
|
135
|
+
};
|
|
136
|
+
var columnLetter = (col) => {
|
|
137
|
+
(0, import_invariant2.invariant)(col < MAX_COLUMNS, `Invalid column: ${col}`, {
|
|
138
|
+
F: __dxlog_file,
|
|
139
|
+
L: 31,
|
|
140
|
+
S: void 0,
|
|
141
|
+
A: [
|
|
142
|
+
"col < MAX_COLUMNS",
|
|
143
|
+
"`Invalid column: ${col}`"
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
return (col >= 26 ? String.fromCharCode("A".charCodeAt(0) + Math.floor(col / 26) - 1) : "") + String.fromCharCode("A".charCodeAt(0) + col % 26);
|
|
147
|
+
};
|
|
148
|
+
var addressToA1Notation = ({ col, row }) => {
|
|
149
|
+
return `${columnLetter(col)}${row + 1}`;
|
|
150
|
+
};
|
|
151
|
+
var addressFromA1Notation = (ref) => {
|
|
152
|
+
const match = ref.match(/([A-Z]+)(\d+)/);
|
|
153
|
+
(0, import_invariant2.invariant)(match, `Invalid notation: ${ref}`, {
|
|
154
|
+
F: __dxlog_file,
|
|
155
|
+
L: 45,
|
|
156
|
+
S: void 0,
|
|
157
|
+
A: [
|
|
158
|
+
"match",
|
|
159
|
+
"`Invalid notation: ${ref}`"
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
return {
|
|
163
|
+
row: parseInt(match[2], 10) - 1,
|
|
164
|
+
col: match[1].split("").reduce((acc, c) => acc * 26 + c.charCodeAt(0) - "A".charCodeAt(0) + 1, 0) - 1
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
var rangeToA1Notation = (range) => {
|
|
168
|
+
return [
|
|
169
|
+
range?.from && addressToA1Notation(range?.from),
|
|
170
|
+
range?.to && addressToA1Notation(range?.to)
|
|
171
|
+
].filter(Boolean).join(":");
|
|
172
|
+
};
|
|
173
|
+
var inRange = (range, cell) => {
|
|
174
|
+
if (!range) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
const { from, to } = range;
|
|
178
|
+
if (from && posEquals(from, cell) || to && posEquals(to, cell)) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
if (!from || !to) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
const { col: c1, row: r1 } = from;
|
|
185
|
+
const { col: c2, row: r2 } = to;
|
|
186
|
+
const cMin = Math.min(c1, c2);
|
|
187
|
+
const cMax = Math.max(c1, c2);
|
|
188
|
+
const rMin = Math.min(r1, r2);
|
|
189
|
+
const rMax = Math.max(r1, r2);
|
|
190
|
+
const { col, row } = cell;
|
|
191
|
+
return col >= cMin && col <= cMax && row >= rMin && row <= rMax;
|
|
192
|
+
};
|
|
193
|
+
var ApiError = class extends Error {
|
|
194
|
+
};
|
|
195
|
+
var ReadonlyException = class extends ApiError {
|
|
196
|
+
};
|
|
197
|
+
var RangeException = class extends ApiError {
|
|
198
|
+
constructor(n) {
|
|
199
|
+
super();
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
var createIndex = (length = 8) => {
|
|
203
|
+
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
204
|
+
const charactersLength = characters.length;
|
|
205
|
+
const randomBuffer = (0, import_crypto.randomBytes)(length);
|
|
206
|
+
return Array.from(randomBuffer, (byte) => characters[byte % charactersLength]).join("");
|
|
207
|
+
};
|
|
208
|
+
var createIndices = (length) => Array.from({
|
|
209
|
+
length
|
|
210
|
+
}).map(() => createIndex());
|
|
211
|
+
var insertIndices = (indices, i, n, max) => {
|
|
212
|
+
if (i + n > max) {
|
|
213
|
+
throw new RangeException(i + n);
|
|
214
|
+
}
|
|
215
|
+
const idx = createIndices(n);
|
|
216
|
+
indices.splice(i, 0, ...idx);
|
|
217
|
+
};
|
|
218
|
+
var initialize = (sheet, { rows = DEFAULT_ROWS, columns = DEFAULT_COLUMNS } = {}) => {
|
|
219
|
+
if (!sheet.rows.length) {
|
|
220
|
+
insertIndices(sheet.rows, 0, rows, MAX_ROWS);
|
|
221
|
+
}
|
|
222
|
+
if (!sheet.columns.length) {
|
|
223
|
+
insertIndices(sheet.columns, 0, columns, MAX_COLUMNS);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
var createSheet = ({ name, cells, ...size } = {}) => {
|
|
227
|
+
const sheet = (0, import_echo_schema2.create)(import_chunk_V7E5JZBD.SheetType, {
|
|
228
|
+
name,
|
|
229
|
+
cells: {},
|
|
230
|
+
rows: [],
|
|
231
|
+
columns: [],
|
|
232
|
+
rowMeta: {},
|
|
233
|
+
columnMeta: {},
|
|
234
|
+
ranges: [],
|
|
235
|
+
threads: []
|
|
236
|
+
});
|
|
237
|
+
initialize(sheet, size);
|
|
238
|
+
if (cells) {
|
|
239
|
+
Object.entries(cells).forEach(([key, { value }]) => {
|
|
240
|
+
const idx = addressToIndex(sheet, addressFromA1Notation(key));
|
|
241
|
+
sheet.cells[idx] = {
|
|
242
|
+
value
|
|
243
|
+
};
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
return sheet;
|
|
247
|
+
};
|
|
248
|
+
var addressToIndex = (sheet, cell) => {
|
|
249
|
+
return `${sheet.columns[cell.col]}@${sheet.rows[cell.row]}`;
|
|
250
|
+
};
|
|
251
|
+
var addressFromIndex = (sheet, idx) => {
|
|
252
|
+
const [column, row] = idx.split("@");
|
|
253
|
+
return {
|
|
254
|
+
col: sheet.columns.indexOf(column),
|
|
255
|
+
row: sheet.rows.indexOf(row)
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
var rangeToIndex = (sheet, range) => {
|
|
259
|
+
return [
|
|
260
|
+
range.from,
|
|
261
|
+
range.to ?? range.from
|
|
262
|
+
].map((cell) => addressToIndex(sheet, cell)).join(":");
|
|
263
|
+
};
|
|
264
|
+
var rangeFromIndex = (sheet, idx) => {
|
|
265
|
+
const [from, to] = idx.split(":").map((index) => addressFromIndex(sheet, index));
|
|
266
|
+
return {
|
|
267
|
+
from,
|
|
268
|
+
to
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
var compareIndexPositions = (sheet, indexA, indexB) => {
|
|
272
|
+
const { row: rowA, col: columnA } = addressFromIndex(sheet, indexA);
|
|
273
|
+
const { row: rowB, col: columnB } = addressFromIndex(sheet, indexB);
|
|
274
|
+
if (rowA !== rowB) {
|
|
275
|
+
return rowA - rowB;
|
|
276
|
+
} else {
|
|
277
|
+
return columnA - columnB;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
var ComputeNode = class extends import_context2.Resource {
|
|
281
|
+
constructor(_graph, sheetId) {
|
|
282
|
+
super();
|
|
283
|
+
this._graph = _graph;
|
|
284
|
+
this.sheetId = sheetId;
|
|
285
|
+
this.update = new import_async2.Event();
|
|
286
|
+
}
|
|
287
|
+
get graph() {
|
|
288
|
+
return this._graph;
|
|
289
|
+
}
|
|
290
|
+
clear() {
|
|
291
|
+
this._graph.hf.clearSheet(this.sheetId);
|
|
292
|
+
}
|
|
293
|
+
getValue(cell) {
|
|
294
|
+
const value = this._graph.hf.getCellValue({
|
|
295
|
+
sheet: this.sheetId,
|
|
296
|
+
row: cell.row,
|
|
297
|
+
col: cell.col
|
|
298
|
+
});
|
|
299
|
+
if (value instanceof import_hyperformula2.DetailedCellError) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
setValue(cell, value) {
|
|
305
|
+
const mappedValue = isFormula(value) ? this._graph.mapFormulaToNative(value) : value;
|
|
306
|
+
this._graph.hf.setCellContents({
|
|
307
|
+
sheet: this.sheetId,
|
|
308
|
+
row: cell.row,
|
|
309
|
+
col: cell.col
|
|
310
|
+
}, [
|
|
311
|
+
[
|
|
312
|
+
mappedValue
|
|
313
|
+
]
|
|
314
|
+
]);
|
|
315
|
+
}
|
|
316
|
+
// TODO(burdon): Load data into sheet.
|
|
317
|
+
async _open() {
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts";
|
|
65
321
|
var defaultFunctionContextOptions = {
|
|
66
322
|
defaultTtl: 5e3,
|
|
67
|
-
|
|
323
|
+
debounceDelay: 200,
|
|
68
324
|
remoteFunctionUrl: "https://edge.dxos.workers.dev/functions"
|
|
69
325
|
};
|
|
70
326
|
var FunctionContext = class _FunctionContext {
|
|
@@ -75,7 +331,7 @@ var FunctionContext = class _FunctionContext {
|
|
|
75
331
|
...args
|
|
76
332
|
});
|
|
77
333
|
}
|
|
78
|
-
constructor(_hf, _space,
|
|
334
|
+
constructor(_hf, _space, _options) {
|
|
79
335
|
this._hf = _hf;
|
|
80
336
|
this._space = _space;
|
|
81
337
|
this._cache = /* @__PURE__ */ new Map();
|
|
@@ -83,10 +339,10 @@ var FunctionContext = class _FunctionContext {
|
|
|
83
339
|
this._subscriptions = /* @__PURE__ */ new Map();
|
|
84
340
|
this._invocations = {};
|
|
85
341
|
this._options = (0, import_lodash.default)(_options ?? {}, defaultFunctionContextOptions);
|
|
86
|
-
this._onUpdate = (0,
|
|
342
|
+
this._onUpdate = (0, import_async3.debounce)((update) => {
|
|
87
343
|
this._hf.resumeEvaluation();
|
|
88
|
-
onUpdate(
|
|
89
|
-
}, this._options.
|
|
344
|
+
this._options.onUpdate?.(update);
|
|
345
|
+
}, this._options.debounceDelay);
|
|
90
346
|
}
|
|
91
347
|
get space() {
|
|
92
348
|
return this._space;
|
|
@@ -135,24 +391,27 @@ var FunctionContext = class _FunctionContext {
|
|
|
135
391
|
cell,
|
|
136
392
|
value: value2
|
|
137
393
|
}, {
|
|
138
|
-
F:
|
|
139
|
-
L:
|
|
394
|
+
F: __dxlog_file2,
|
|
395
|
+
L: 143,
|
|
140
396
|
S: this,
|
|
141
397
|
C: (f, a) => f(...a)
|
|
142
398
|
});
|
|
143
|
-
this._onUpdate(
|
|
399
|
+
this._onUpdate({
|
|
400
|
+
name,
|
|
401
|
+
cell
|
|
402
|
+
});
|
|
144
403
|
} catch (err) {
|
|
145
404
|
import_log2.log.warn("failed", {
|
|
146
405
|
cell,
|
|
147
406
|
err
|
|
148
407
|
}, {
|
|
149
|
-
F:
|
|
150
|
-
L:
|
|
408
|
+
F: __dxlog_file2,
|
|
409
|
+
L: 147,
|
|
151
410
|
S: this,
|
|
152
411
|
C: (f, a) => f(...a)
|
|
153
412
|
});
|
|
154
413
|
this._cache.set(invocationKey, {
|
|
155
|
-
value: new
|
|
414
|
+
value: new import_hyperformula3.CellError(import_hyperformula3.ErrorType.ERROR, "Function failed."),
|
|
156
415
|
ts: Date.now()
|
|
157
416
|
});
|
|
158
417
|
} finally {
|
|
@@ -166,60 +425,138 @@ var FunctionContext = class _FunctionContext {
|
|
|
166
425
|
args,
|
|
167
426
|
cache: value
|
|
168
427
|
}, {
|
|
169
|
-
F:
|
|
170
|
-
L:
|
|
428
|
+
F: __dxlog_file2,
|
|
429
|
+
L: 155,
|
|
171
430
|
S: this,
|
|
172
431
|
C: (f, a) => f(...a)
|
|
173
432
|
});
|
|
174
433
|
return value;
|
|
175
434
|
}
|
|
176
435
|
};
|
|
177
|
-
var
|
|
436
|
+
var AsyncFunctionPlugin = class extends import_hyperformula3.FunctionPlugin {
|
|
178
437
|
get context() {
|
|
179
438
|
return this.config.context;
|
|
180
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Immediately returns cached value then runs the async function.
|
|
442
|
+
*/
|
|
181
443
|
runAsyncFunction(ast, state, cb, options) {
|
|
182
444
|
const { procedureName } = ast;
|
|
183
445
|
const metadata = this.metadata(procedureName);
|
|
184
446
|
return this.runFunction(ast.args, state, metadata, (...args) => {
|
|
185
|
-
return this.context.invokeFunction(procedureName, state, args, cb, options) ??
|
|
447
|
+
return this.context.invokeFunction(procedureName, state, args, cb, options) ?? import_hyperformula3.EmptyValue;
|
|
186
448
|
});
|
|
187
449
|
}
|
|
188
450
|
};
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
451
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/compute-graph/functions/edge-function.ts";
|
|
452
|
+
var EDGE_FUNCTION_NAME = "DX";
|
|
453
|
+
var FUNCTION_TTL = 1e4;
|
|
454
|
+
var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
455
|
+
dx(ast, state) {
|
|
456
|
+
const handler = (subscribe = false) => async (binding, ...args) => {
|
|
457
|
+
const space = this.context.space;
|
|
458
|
+
if (!space) {
|
|
459
|
+
return new import_hyperformula4.CellError(import_hyperformula4.ErrorType.REF, "Missing space");
|
|
460
|
+
}
|
|
461
|
+
const { objects: [fn] } = await space.db.query(import_echo2.Filter.schema(import_types2.FunctionType, {
|
|
462
|
+
binding
|
|
463
|
+
})).run();
|
|
464
|
+
if (!fn) {
|
|
465
|
+
import_log3.log.info("Function not found", {
|
|
466
|
+
binding
|
|
467
|
+
}, {
|
|
468
|
+
F: __dxlog_file3,
|
|
469
|
+
L: 41,
|
|
470
|
+
S: this,
|
|
471
|
+
C: (f, a) => f(...a)
|
|
472
|
+
});
|
|
473
|
+
return new import_hyperformula4.CellError(import_hyperformula4.ErrorType.REF, "Function not found");
|
|
474
|
+
}
|
|
475
|
+
if (subscribe) {
|
|
476
|
+
const unsubscribe = (0, import_signals_core.effect)(() => {
|
|
477
|
+
import_log3.log.info("function changed", {
|
|
478
|
+
fn
|
|
479
|
+
}, {
|
|
480
|
+
F: __dxlog_file3,
|
|
481
|
+
L: 47,
|
|
482
|
+
S: this,
|
|
483
|
+
C: (f, a) => f(...a)
|
|
484
|
+
});
|
|
485
|
+
const _ = fn?.version;
|
|
486
|
+
this.runAsyncFunction(ast, state, handler(false), {
|
|
487
|
+
ttl: FUNCTION_TTL
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
this.context.createSubscription(ast.procedureName, unsubscribe);
|
|
491
|
+
}
|
|
492
|
+
const path = (0, import_edge.getUserFunctionUrlInMetadata)((0, import_echo2.getMeta)(fn));
|
|
493
|
+
const result = await fetch(`${this.context.remoteFunctionUrl}${path}`, {
|
|
494
|
+
method: "POST",
|
|
495
|
+
headers: {
|
|
496
|
+
"Content-Type": "application/json"
|
|
497
|
+
},
|
|
498
|
+
body: JSON.stringify({
|
|
499
|
+
args: args.filter(import_util2.nonNullable)
|
|
500
|
+
})
|
|
501
|
+
});
|
|
502
|
+
return await result.text();
|
|
503
|
+
};
|
|
504
|
+
return this.runAsyncFunction(ast, state, handler(true), {
|
|
505
|
+
ttl: FUNCTION_TTL
|
|
211
506
|
});
|
|
212
507
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
508
|
+
};
|
|
509
|
+
EdgeFunctionPlugin.implementedFunctions = {
|
|
510
|
+
[EDGE_FUNCTION_NAME]: {
|
|
511
|
+
method: "dx",
|
|
512
|
+
parameters: [
|
|
513
|
+
// Binding
|
|
514
|
+
{
|
|
515
|
+
argumentType: import_hyperformula4.FunctionArgumentType.STRING
|
|
516
|
+
},
|
|
517
|
+
// Remote function arguments (currently supporting up to 8).
|
|
518
|
+
{
|
|
519
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
520
|
+
optionalArg: true
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
524
|
+
optionalArg: true
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
528
|
+
optionalArg: true
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
532
|
+
optionalArg: true
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
536
|
+
optionalArg: true
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
540
|
+
optionalArg: true
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
544
|
+
optionalArg: true
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
argumentType: import_hyperformula4.FunctionArgumentType.ANY,
|
|
548
|
+
optionalArg: true
|
|
549
|
+
}
|
|
550
|
+
],
|
|
551
|
+
isVolatile: true
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
var EdgeFunctionPluginTranslations = {
|
|
555
|
+
enGB: {
|
|
556
|
+
[EDGE_FUNCTION_NAME]: "Remote function"
|
|
557
|
+
},
|
|
558
|
+
enUS: {
|
|
559
|
+
[EDGE_FUNCTION_NAME]: "Remote function"
|
|
223
560
|
}
|
|
224
561
|
};
|
|
225
562
|
var defaultFunctions = [
|
|
@@ -2594,666 +2931,293 @@ var defaultFunctions = [
|
|
|
2594
2931
|
section: "Text"
|
|
2595
2932
|
}
|
|
2596
2933
|
];
|
|
2597
|
-
var
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
A: [
|
|
2608
|
-
"column < MAX_COLUMNS",
|
|
2609
|
-
"`Invalid column: ${column}`"
|
|
2610
|
-
]
|
|
2611
|
-
});
|
|
2612
|
-
return (column >= 26 ? String.fromCharCode("A".charCodeAt(0) + Math.floor(column / 26) - 1) : "") + String.fromCharCode("A".charCodeAt(0) + column % 26);
|
|
2613
|
-
};
|
|
2614
|
-
var addressToA1Notation = ({ column, row }) => {
|
|
2615
|
-
return `${columnLetter(column)}${row + 1}`;
|
|
2616
|
-
};
|
|
2617
|
-
var addressFromA1Notation = (ref) => {
|
|
2618
|
-
const match = ref.match(/([A-Z]+)(\d+)/);
|
|
2619
|
-
(0, import_invariant2.invariant)(match, `Invalid notation: ${ref}`, {
|
|
2620
|
-
F: __dxlog_file3,
|
|
2621
|
-
L: 30,
|
|
2622
|
-
S: void 0,
|
|
2623
|
-
A: [
|
|
2624
|
-
"match",
|
|
2625
|
-
"`Invalid notation: ${ref}`"
|
|
2626
|
-
]
|
|
2627
|
-
});
|
|
2628
|
-
return {
|
|
2629
|
-
row: parseInt(match[2], 10) - 1,
|
|
2630
|
-
column: match[1].split("").reduce((acc, c) => acc * 26 + c.charCodeAt(0) - "A".charCodeAt(0) + 1, 0) - 1
|
|
2934
|
+
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts";
|
|
2935
|
+
var OBJECT_ID_LENGTH = 60;
|
|
2936
|
+
var createSheetName = ({ type, id }) => `${type}@${id}`;
|
|
2937
|
+
var parseSheetName = (name) => {
|
|
2938
|
+
const [type, id] = name.split("@");
|
|
2939
|
+
return id ? {
|
|
2940
|
+
type,
|
|
2941
|
+
id
|
|
2942
|
+
} : {
|
|
2943
|
+
id: type
|
|
2631
2944
|
};
|
|
2632
2945
|
};
|
|
2633
|
-
var
|
|
2634
|
-
|
|
2635
|
-
range?.from && addressToA1Notation(range?.from),
|
|
2636
|
-
range?.to && addressToA1Notation(range?.to)
|
|
2637
|
-
].filter(Boolean).join(":");
|
|
2638
|
-
};
|
|
2639
|
-
var inRange = (range, cell) => {
|
|
2640
|
-
if (!range) {
|
|
2641
|
-
return false;
|
|
2642
|
-
}
|
|
2643
|
-
const { from, to } = range;
|
|
2644
|
-
if (from && posEquals(from, cell) || to && posEquals(to, cell)) {
|
|
2645
|
-
return true;
|
|
2646
|
-
}
|
|
2647
|
-
if (!from || !to) {
|
|
2648
|
-
return false;
|
|
2649
|
-
}
|
|
2650
|
-
const { column: c1, row: r1 } = from;
|
|
2651
|
-
const { column: c2, row: r2 } = to;
|
|
2652
|
-
const cMin = Math.min(c1, c2);
|
|
2653
|
-
const cMax = Math.max(c1, c2);
|
|
2654
|
-
const rMin = Math.min(r1, r2);
|
|
2655
|
-
const rMax = Math.max(r1, r2);
|
|
2656
|
-
const { column, row } = cell;
|
|
2657
|
-
return column >= cMin && column <= cMax && row >= rMin && row <= rMax;
|
|
2658
|
-
};
|
|
2659
|
-
var ApiError = class extends Error {
|
|
2660
|
-
};
|
|
2661
|
-
var ReadonlyException = class extends ApiError {
|
|
2662
|
-
};
|
|
2663
|
-
var RangeException = class extends ApiError {
|
|
2664
|
-
constructor(n) {
|
|
2946
|
+
var ComputeGraph = class extends import_context.Resource {
|
|
2947
|
+
constructor(_hf, _space, _options) {
|
|
2665
2948
|
super();
|
|
2666
|
-
|
|
2667
|
-
};
|
|
2668
|
-
var createIndex = (length = 8) => {
|
|
2669
|
-
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
2670
|
-
const charactersLength = characters.length;
|
|
2671
|
-
const randomBuffer = (0, import_crypto.randomBytes)(length);
|
|
2672
|
-
return Array.from(randomBuffer, (byte) => characters[byte % charactersLength]).join("");
|
|
2673
|
-
};
|
|
2674
|
-
var createIndices = (length) => Array.from({
|
|
2675
|
-
length
|
|
2676
|
-
}).map(() => createIndex());
|
|
2677
|
-
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/model/model.ts";
|
|
2678
|
-
var DEFAULT_ROWS = 100;
|
|
2679
|
-
var DEFAULT_COLUMNS = 26;
|
|
2680
|
-
var typeMap = {
|
|
2681
|
-
BOOLEAN: import_chunk_DSYKOI4E.ValueTypeEnum.Boolean,
|
|
2682
|
-
NUMBER_RAW: import_chunk_DSYKOI4E.ValueTypeEnum.Number,
|
|
2683
|
-
NUMBER_PERCENT: import_chunk_DSYKOI4E.ValueTypeEnum.Percent,
|
|
2684
|
-
NUMBER_CURRENCY: import_chunk_DSYKOI4E.ValueTypeEnum.Currency,
|
|
2685
|
-
NUMBER_DATETIME: import_chunk_DSYKOI4E.ValueTypeEnum.DateTime,
|
|
2686
|
-
NUMBER_DATE: import_chunk_DSYKOI4E.ValueTypeEnum.Date,
|
|
2687
|
-
NUMBER_TIME: import_chunk_DSYKOI4E.ValueTypeEnum.Time
|
|
2688
|
-
};
|
|
2689
|
-
var defaultOptions = {
|
|
2690
|
-
rows: 50,
|
|
2691
|
-
columns: 26,
|
|
2692
|
-
mapFormulaBindingFromId: () => (formula) => formula,
|
|
2693
|
-
mapFormulaBindingToId: () => (formula) => formula
|
|
2694
|
-
};
|
|
2695
|
-
var getTopLeft = (range) => {
|
|
2696
|
-
const to = range.to ?? range.from;
|
|
2697
|
-
return {
|
|
2698
|
-
row: Math.min(range.from.row, to.row),
|
|
2699
|
-
column: Math.min(range.from.column, to.column)
|
|
2700
|
-
};
|
|
2701
|
-
};
|
|
2702
|
-
var toSimpleCellAddress = (sheet, cell) => ({
|
|
2703
|
-
sheet,
|
|
2704
|
-
row: cell.row,
|
|
2705
|
-
col: cell.column
|
|
2706
|
-
});
|
|
2707
|
-
var toModelRange = (sheet, range) => ({
|
|
2708
|
-
start: toSimpleCellAddress(sheet, range.from),
|
|
2709
|
-
end: toSimpleCellAddress(sheet, range.to ?? range.from)
|
|
2710
|
-
});
|
|
2711
|
-
var SheetModel = class {
|
|
2712
|
-
constructor(_graph, _sheet, _space, options = {}) {
|
|
2713
|
-
this._graph = _graph;
|
|
2714
|
-
this._sheet = _sheet;
|
|
2949
|
+
this._hf = _hf;
|
|
2715
2950
|
this._space = _space;
|
|
2716
|
-
this.
|
|
2717
|
-
this.
|
|
2718
|
-
this.
|
|
2719
|
-
this.
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2951
|
+
this._options = _options;
|
|
2952
|
+
this.id = `graph-${import_keys.PublicKey.random().truncate()}`;
|
|
2953
|
+
this._nodes = /* @__PURE__ */ new Map();
|
|
2954
|
+
this._remoteFunctions = [];
|
|
2955
|
+
this.update = new import_async.Event();
|
|
2956
|
+
this.context = new FunctionContext(this._hf, this._space, this._options);
|
|
2957
|
+
this._hf.updateConfig({
|
|
2958
|
+
context: this.context
|
|
2959
|
+
});
|
|
2960
|
+
const onValuesUpdate = (changes) => {
|
|
2961
|
+
for (const change of changes) {
|
|
2962
|
+
if (change instanceof import_hyperformula.ExportedCellChange) {
|
|
2963
|
+
const { sheet } = change;
|
|
2964
|
+
const node = this._nodes.get(sheet);
|
|
2965
|
+
if (node) {
|
|
2966
|
+
node.update.emit({
|
|
2967
|
+
type: "valuesUpdated",
|
|
2968
|
+
change
|
|
2969
|
+
});
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2728
2973
|
};
|
|
2729
|
-
this.
|
|
2730
|
-
|
|
2731
|
-
get graph() {
|
|
2732
|
-
return this._graph;
|
|
2974
|
+
this._hf.on("valuesUpdated", onValuesUpdate);
|
|
2975
|
+
this._ctx.onDispose(() => this._hf.off("valuesUpdated", onValuesUpdate));
|
|
2733
2976
|
}
|
|
2734
|
-
get
|
|
2735
|
-
return this.
|
|
2977
|
+
get hf() {
|
|
2978
|
+
return this._hf;
|
|
2736
2979
|
}
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
return {
|
|
2742
|
-
rows: this._sheet.rows.length,
|
|
2743
|
-
columns: this._sheet.columns.length
|
|
2744
|
-
};
|
|
2745
|
-
}
|
|
2746
|
-
get functions() {
|
|
2747
|
-
const hfFunctions = this._graph.hf.getRegisteredFunctionNames().map((name) => defaultFunctions.find((fn) => fn.name === name) ?? {
|
|
2748
|
-
name
|
|
2749
|
-
});
|
|
2750
|
-
const echoFunctions = this._functions.map((fn) => ({
|
|
2751
|
-
name: fn.binding
|
|
2752
|
-
}));
|
|
2980
|
+
getFunctions({ standard, echo } = {
|
|
2981
|
+
standard: true,
|
|
2982
|
+
echo: true
|
|
2983
|
+
}) {
|
|
2753
2984
|
return [
|
|
2754
|
-
...
|
|
2755
|
-
|
|
2985
|
+
...standard ? this._hf.getRegisteredFunctionNames().map((name) => defaultFunctions.find((fn) => fn.name === name) ?? {
|
|
2986
|
+
name
|
|
2987
|
+
}) : [],
|
|
2988
|
+
...echo ? this._remoteFunctions.map((fn) => ({
|
|
2989
|
+
name: fn.binding
|
|
2990
|
+
})) : []
|
|
2756
2991
|
];
|
|
2757
2992
|
}
|
|
2758
|
-
get initialized() {
|
|
2759
|
-
return !!this._ctx;
|
|
2760
|
-
}
|
|
2761
2993
|
/**
|
|
2762
|
-
*
|
|
2994
|
+
* Get or create cell representing a sheet.
|
|
2763
2995
|
*/
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2996
|
+
// TODO(burdon): Async (open node).
|
|
2997
|
+
// The graph should be an extensible factory that plugins extend with model constructors.
|
|
2998
|
+
// This would enable on-the-fly instantiation of new models when then are referenced.
|
|
2999
|
+
// E.g., Cross-object reference would be stored as "ObjectId!A1"
|
|
3000
|
+
// The graph would then load the object and create a ComputeNode (model) of the appropriate type.
|
|
3001
|
+
getOrCreateNode(name) {
|
|
3002
|
+
(0, import_invariant.invariant)(name.length, void 0, {
|
|
2768
3003
|
F: __dxlog_file4,
|
|
2769
|
-
L:
|
|
2770
|
-
S: this,
|
|
2771
|
-
C: (f, a) => f(...a)
|
|
2772
|
-
});
|
|
2773
|
-
(0, import_invariant.invariant)(!this.initialized, "Already initialized.", {
|
|
2774
|
-
F: __dxlog_file4,
|
|
2775
|
-
L: 143,
|
|
3004
|
+
L: 120,
|
|
2776
3005
|
S: this,
|
|
2777
3006
|
A: [
|
|
2778
|
-
"
|
|
2779
|
-
"
|
|
3007
|
+
"name.length",
|
|
3008
|
+
""
|
|
2780
3009
|
]
|
|
2781
3010
|
});
|
|
2782
|
-
this.
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
}
|
|
2792
|
-
this.reset();
|
|
2793
|
-
const unsubscribe = this._graph.update.on(() => this.update.emit());
|
|
2794
|
-
this._ctx.onDispose(unsubscribe);
|
|
2795
|
-
if (this._space) {
|
|
2796
|
-
const { Filter } = await import("@dxos/client/echo");
|
|
2797
|
-
const { FunctionType } = await import("@dxos/plugin-script/types");
|
|
2798
|
-
const query = this._space?.db.query(Filter.schema(FunctionType));
|
|
2799
|
-
const unsubscribe2 = query.subscribe(({ objects }) => {
|
|
2800
|
-
this._functions = objects.filter((fn) => fn.binding);
|
|
2801
|
-
this.update.emit();
|
|
3011
|
+
if (!this._hf.doesSheetExist(name)) {
|
|
3012
|
+
(0, import_log.log)("created node", {
|
|
3013
|
+
space: this._space?.id,
|
|
3014
|
+
sheet: name
|
|
3015
|
+
}, {
|
|
3016
|
+
F: __dxlog_file4,
|
|
3017
|
+
L: 122,
|
|
3018
|
+
S: this,
|
|
3019
|
+
C: (f, a) => f(...a)
|
|
2802
3020
|
});
|
|
2803
|
-
this.
|
|
3021
|
+
this._hf.addSheet(name);
|
|
2804
3022
|
}
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
async destroy() {
|
|
2808
|
-
(0, import_log3.log)("destroy", {
|
|
2809
|
-
id: this.id
|
|
2810
|
-
}, {
|
|
3023
|
+
const sheetId = this._hf.getSheetId(name);
|
|
3024
|
+
(0, import_invariant.invariant)(sheetId !== void 0, void 0, {
|
|
2811
3025
|
F: __dxlog_file4,
|
|
2812
|
-
L:
|
|
3026
|
+
L: 127,
|
|
2813
3027
|
S: this,
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
await this._ctx.dispose();
|
|
2818
|
-
this._ctx = void 0;
|
|
2819
|
-
}
|
|
2820
|
-
}
|
|
2821
|
-
/**
|
|
2822
|
-
* Update engine.
|
|
2823
|
-
* NOTE: This resets the undo history.
|
|
2824
|
-
* @deprecated
|
|
2825
|
-
*/
|
|
2826
|
-
reset() {
|
|
2827
|
-
this._graph.hf.clearSheet(this._sheetId);
|
|
2828
|
-
Object.entries(this._sheet.cells).forEach(([key, { value }]) => {
|
|
2829
|
-
const { column, row } = this.addressFromIndex(key);
|
|
2830
|
-
if (typeof value === "string" && value.charAt(0) === "=") {
|
|
2831
|
-
value = this.mapFormulaBindingToFormula(this.mapFormulaBindingFromId(this.mapFormulaIndicesToRefs(value)));
|
|
2832
|
-
}
|
|
2833
|
-
this._graph.hf.setCellContents({
|
|
2834
|
-
sheet: this._sheetId,
|
|
2835
|
-
row,
|
|
2836
|
-
col: column
|
|
2837
|
-
}, value);
|
|
2838
|
-
});
|
|
2839
|
-
}
|
|
2840
|
-
/**
|
|
2841
|
-
* Recalculate formulas.
|
|
2842
|
-
* NOTE: This resets the undo history.
|
|
2843
|
-
* https://hyperformula.handsontable.com/guide/volatile-functions.html#volatile-actions
|
|
2844
|
-
* @deprecated
|
|
2845
|
-
*/
|
|
2846
|
-
// TODO(burdon): Remove.
|
|
2847
|
-
recalculate() {
|
|
2848
|
-
this._graph.hf.rebuildAndRecalculate();
|
|
2849
|
-
}
|
|
2850
|
-
insertRows(i, n = 1) {
|
|
2851
|
-
this._insertIndices(this._sheet.rows, i, n, DEFAULT_ROWS);
|
|
2852
|
-
this.reset();
|
|
2853
|
-
}
|
|
2854
|
-
insertColumns(i, n = 1) {
|
|
2855
|
-
this._insertIndices(this._sheet.columns, i, n, DEFAULT_COLUMNS);
|
|
2856
|
-
this.reset();
|
|
2857
|
-
}
|
|
2858
|
-
//
|
|
2859
|
-
// Undoable actions.
|
|
2860
|
-
// TODO(burdon): Group undoable methods; consistently update hf/sheet.
|
|
2861
|
-
//
|
|
2862
|
-
/**
|
|
2863
|
-
* Clear range of values.
|
|
2864
|
-
*/
|
|
2865
|
-
clear(range) {
|
|
2866
|
-
const topLeft = getTopLeft(range);
|
|
2867
|
-
const values = this._iterRange(range, () => null);
|
|
2868
|
-
this._graph.hf.setCellContents(toSimpleCellAddress(this._sheetId, topLeft), values);
|
|
2869
|
-
this._iterRange(range, (cell) => {
|
|
2870
|
-
const idx = this.addressToIndex(cell);
|
|
2871
|
-
delete this._sheet.cells[idx];
|
|
2872
|
-
});
|
|
2873
|
-
}
|
|
2874
|
-
cut(range) {
|
|
2875
|
-
this._graph.hf.cut(toModelRange(this._sheetId, range));
|
|
2876
|
-
this._iterRange(range, (cell) => {
|
|
2877
|
-
const idx = this.addressToIndex(cell);
|
|
2878
|
-
delete this._sheet.cells[idx];
|
|
2879
|
-
});
|
|
2880
|
-
}
|
|
2881
|
-
copy(range) {
|
|
2882
|
-
this._graph.hf.copy(toModelRange(this._sheetId, range));
|
|
2883
|
-
}
|
|
2884
|
-
paste(cell) {
|
|
2885
|
-
if (!this._graph.hf.isClipboardEmpty()) {
|
|
2886
|
-
const changes = this._graph.hf.paste(toSimpleCellAddress(this._sheetId, cell));
|
|
2887
|
-
for (const change of changes) {
|
|
2888
|
-
if (change instanceof import_hyperformula3.ExportedCellChange) {
|
|
2889
|
-
const { address, newValue } = change;
|
|
2890
|
-
const idx = this.addressToIndex({
|
|
2891
|
-
row: address.row,
|
|
2892
|
-
column: address.col
|
|
2893
|
-
});
|
|
2894
|
-
this._sheet.cells[idx] = {
|
|
2895
|
-
value: newValue
|
|
2896
|
-
};
|
|
2897
|
-
}
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
// TODO(burdon): Display undo/redo state.
|
|
2902
|
-
undo() {
|
|
2903
|
-
if (this._graph.hf.isThereSomethingToUndo()) {
|
|
2904
|
-
this._graph.hf.undo();
|
|
2905
|
-
this.update.emit();
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
redo() {
|
|
2909
|
-
if (this._graph.hf.isThereSomethingToRedo()) {
|
|
2910
|
-
this._graph.hf.redo();
|
|
2911
|
-
this.update.emit();
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
/**
|
|
2915
|
-
* Get value from sheet.
|
|
2916
|
-
*/
|
|
2917
|
-
getCellValue(cell) {
|
|
2918
|
-
const idx = this.addressToIndex(cell);
|
|
2919
|
-
return this._sheet.cells[idx]?.value ?? null;
|
|
2920
|
-
}
|
|
2921
|
-
/**
|
|
2922
|
-
* Get value as a string for editing.
|
|
2923
|
-
*/
|
|
2924
|
-
getCellText(cell) {
|
|
2925
|
-
const value = this.getCellValue(cell);
|
|
2926
|
-
if (value == null) {
|
|
2927
|
-
return void 0;
|
|
2928
|
-
}
|
|
2929
|
-
if (typeof value === "string" && value.charAt(0) === "=") {
|
|
2930
|
-
return this.mapFormulaBindingFromId(this.mapFormulaIndicesToRefs(value));
|
|
2931
|
-
} else {
|
|
2932
|
-
return String(value);
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
/**
|
|
2936
|
-
* Get array of raw values from sheet.
|
|
2937
|
-
*/
|
|
2938
|
-
getCellValues(range) {
|
|
2939
|
-
return this._iterRange(range, (cell) => this.getCellValue(cell));
|
|
2940
|
-
}
|
|
2941
|
-
/**
|
|
2942
|
-
* Gets the regular or computed value from the engine.
|
|
2943
|
-
*/
|
|
2944
|
-
getValue(cell) {
|
|
2945
|
-
const value = this._graph.hf.getCellValue(toSimpleCellAddress(this._sheetId, cell));
|
|
2946
|
-
if (value instanceof import_hyperformula3.DetailedCellError) {
|
|
2947
|
-
return value.toString();
|
|
2948
|
-
}
|
|
2949
|
-
return value;
|
|
2950
|
-
}
|
|
2951
|
-
/**
|
|
2952
|
-
* Get value type.
|
|
2953
|
-
*/
|
|
2954
|
-
getValueType(cell) {
|
|
2955
|
-
const addr = toSimpleCellAddress(this._sheetId, cell);
|
|
2956
|
-
const type = this._graph.hf.getCellValueDetailedType(addr);
|
|
2957
|
-
return typeMap[type];
|
|
2958
|
-
}
|
|
2959
|
-
/**
|
|
2960
|
-
* Sets the value, updating the sheet and engine.
|
|
2961
|
-
*/
|
|
2962
|
-
setValue(cell, value) {
|
|
2963
|
-
if (this._options.readonly) {
|
|
2964
|
-
throw new ReadonlyException();
|
|
2965
|
-
}
|
|
2966
|
-
let refresh = false;
|
|
2967
|
-
if (cell.row >= this._sheet.rows.length) {
|
|
2968
|
-
this._insertIndices(this._sheet.rows, cell.row, 1, DEFAULT_ROWS);
|
|
2969
|
-
refresh = true;
|
|
2970
|
-
}
|
|
2971
|
-
if (cell.column >= this._sheet.columns.length) {
|
|
2972
|
-
this._insertIndices(this._sheet.columns, cell.column, 1, DEFAULT_COLUMNS);
|
|
2973
|
-
refresh = true;
|
|
2974
|
-
}
|
|
2975
|
-
if (refresh) {
|
|
2976
|
-
this.reset();
|
|
2977
|
-
}
|
|
2978
|
-
this._graph.hf.setCellContents({
|
|
2979
|
-
sheet: this._sheetId,
|
|
2980
|
-
row: cell.row,
|
|
2981
|
-
col: cell.column
|
|
2982
|
-
}, [
|
|
2983
|
-
[
|
|
2984
|
-
typeof value === "string" && value.charAt(0) === "=" ? this.mapFormulaBindingToFormula(value) : value
|
|
3028
|
+
A: [
|
|
3029
|
+
"sheetId !== undefined",
|
|
3030
|
+
""
|
|
2985
3031
|
]
|
|
2986
|
-
]);
|
|
2987
|
-
const idx = this.addressToIndex(cell);
|
|
2988
|
-
if (value === void 0 || value === null) {
|
|
2989
|
-
delete this._sheet.cells[idx];
|
|
2990
|
-
} else {
|
|
2991
|
-
if (typeof value === "string" && value.charAt(0) === "=") {
|
|
2992
|
-
value = this.mapFormulaBindingToId(this.mapFormulaRefsToIndices(value));
|
|
2993
|
-
}
|
|
2994
|
-
this._sheet.cells[idx] = {
|
|
2995
|
-
value
|
|
2996
|
-
};
|
|
2997
|
-
}
|
|
2998
|
-
}
|
|
2999
|
-
/**
|
|
3000
|
-
* Sets values from a simple map.
|
|
3001
|
-
*/
|
|
3002
|
-
setValues(values) {
|
|
3003
|
-
Object.entries(values).forEach(([key, { value }]) => {
|
|
3004
|
-
this.setValue(addressFromA1Notation(key), value);
|
|
3005
3032
|
});
|
|
3033
|
+
const node = new ComputeNode(this, sheetId);
|
|
3034
|
+
this._nodes.set(sheetId, node);
|
|
3035
|
+
return node;
|
|
3006
3036
|
}
|
|
3007
3037
|
/**
|
|
3008
|
-
*
|
|
3038
|
+
* Map bound value to custom function invocation.
|
|
3039
|
+
* E.g., "HELLO(...args)" => "DX("HELLO", ...args)".
|
|
3009
3040
|
*/
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
row,
|
|
3026
|
-
column
|
|
3027
|
-
});
|
|
3028
|
-
if (value !== void 0) {
|
|
3029
|
-
rowCells.push(value);
|
|
3041
|
+
mapFormulaToNative(formula) {
|
|
3042
|
+
return formula.replace(/['"]?([ \w]+)['"]?!/, (_match, name) => {
|
|
3043
|
+
if (name) {
|
|
3044
|
+
const objects = this._hf.getSheetNames().map((name2) => {
|
|
3045
|
+
const { type, id } = parseSheetName(name2);
|
|
3046
|
+
return type && id ? this._space?.db.getObjectById(id) : void 0;
|
|
3047
|
+
}).filter(import_util.nonNullable);
|
|
3048
|
+
for (const obj of objects) {
|
|
3049
|
+
if (obj.name === name) {
|
|
3050
|
+
const type = (0, import_echo_schema.getTypename)(obj);
|
|
3051
|
+
return `'${createSheetName({
|
|
3052
|
+
type,
|
|
3053
|
+
id: obj.id
|
|
3054
|
+
})}'!`;
|
|
3055
|
+
}
|
|
3030
3056
|
}
|
|
3031
3057
|
}
|
|
3032
|
-
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3035
|
-
}
|
|
3036
|
-
/**
|
|
3037
|
-
*
|
|
3038
|
-
*/
|
|
3039
|
-
// TODO(burdon): Insert indices into sheet.
|
|
3040
|
-
_insertIndices(indices, i, n, max) {
|
|
3041
|
-
if (i + n > max) {
|
|
3042
|
-
throw new RangeException(i + n);
|
|
3043
|
-
}
|
|
3044
|
-
const idx = createIndices(n);
|
|
3045
|
-
indices.splice(i, 0, ...idx);
|
|
3046
|
-
}
|
|
3047
|
-
// TODO(burdon): Delete index.
|
|
3048
|
-
_deleteIndices(indices, i, n) {
|
|
3049
|
-
throw new Error("Not implemented");
|
|
3050
|
-
}
|
|
3051
|
-
// TODO(burdon): Move. Cannot use fractional without changing. Switch back to using unique IDs?
|
|
3052
|
-
_moveIndices(indices, i, j, n) {
|
|
3053
|
-
throw new Error("Not implemented");
|
|
3054
|
-
}
|
|
3055
|
-
//
|
|
3056
|
-
// Indices.
|
|
3057
|
-
//
|
|
3058
|
-
/**
|
|
3059
|
-
* E.g., "A1" => "x1@y1".
|
|
3060
|
-
*/
|
|
3061
|
-
addressToIndex(cell) {
|
|
3062
|
-
return `${this._sheet.columns[cell.column]}@${this._sheet.rows[cell.row]}`;
|
|
3063
|
-
}
|
|
3064
|
-
/**
|
|
3065
|
-
* E.g., "x1@y1" => "A1".
|
|
3066
|
-
*/
|
|
3067
|
-
addressFromIndex(idx) {
|
|
3068
|
-
const [column, row] = idx.split("@");
|
|
3069
|
-
return {
|
|
3070
|
-
column: this._sheet.columns.indexOf(column),
|
|
3071
|
-
row: this._sheet.rows.indexOf(row)
|
|
3072
|
-
};
|
|
3073
|
-
}
|
|
3074
|
-
/**
|
|
3075
|
-
* E.g., "A1:B2" => "x1@y1:x2@y2".
|
|
3076
|
-
*/
|
|
3077
|
-
rangeToIndex(range) {
|
|
3078
|
-
return [
|
|
3079
|
-
range.from,
|
|
3080
|
-
range.to ?? range.from
|
|
3081
|
-
].map((cell) => this.addressToIndex(cell)).join(":");
|
|
3082
|
-
}
|
|
3083
|
-
/**
|
|
3084
|
-
* E.g., "x1@y1:x2@y2" => "A1:B2".
|
|
3085
|
-
*/
|
|
3086
|
-
rangeFromIndex(idx) {
|
|
3087
|
-
const [from, to] = idx.split(":").map((idx2) => this.addressFromIndex(idx2));
|
|
3088
|
-
return {
|
|
3089
|
-
from,
|
|
3090
|
-
to
|
|
3091
|
-
};
|
|
3092
|
-
}
|
|
3093
|
-
/**
|
|
3094
|
-
* E.g., "HELLO()" => "EDGE("HELLO")".
|
|
3095
|
-
*/
|
|
3096
|
-
mapFormulaBindingToFormula(formula) {
|
|
3097
|
-
return formula.replace(/([a-zA-Z0-9]+)\((.*)\)/g, (match, binding, args) => {
|
|
3098
|
-
const fn = this._functions.find((fn2) => fn2.binding === binding);
|
|
3058
|
+
return `${name}!`;
|
|
3059
|
+
}).replace(/(\w+)\((.*)\)/g, (match, binding, args) => {
|
|
3060
|
+
const fn = this._remoteFunctions.find((fn2) => fn2.binding === binding);
|
|
3099
3061
|
if (!fn) {
|
|
3100
3062
|
return match;
|
|
3101
3063
|
}
|
|
3102
3064
|
if (args.trim() === "") {
|
|
3103
|
-
return
|
|
3065
|
+
return `${EDGE_FUNCTION_NAME}("${binding}")`;
|
|
3066
|
+
} else {
|
|
3067
|
+
return `${EDGE_FUNCTION_NAME}("${binding}", ${args})`;
|
|
3104
3068
|
}
|
|
3105
|
-
return `EDGE("${binding}", ${args})`;
|
|
3106
3069
|
});
|
|
3107
3070
|
}
|
|
3108
3071
|
/**
|
|
3109
|
-
*
|
|
3072
|
+
* Map from binding to fully qualified ECHO ID (to store).
|
|
3073
|
+
* E.g., HELLO() => spaceId:objectId()
|
|
3110
3074
|
*/
|
|
3111
|
-
|
|
3112
|
-
return formula.replace(/
|
|
3113
|
-
if (
|
|
3114
|
-
return
|
|
3075
|
+
mapFunctionBindingToId(formula) {
|
|
3076
|
+
return formula.replace(/(\w+)\((.*)\)/g, (match, binding, args) => {
|
|
3077
|
+
if (binding === EDGE_FUNCTION_NAME || defaultFunctions.find((fn2) => fn2.name === binding)) {
|
|
3078
|
+
return match;
|
|
3079
|
+
}
|
|
3080
|
+
const fn = this._remoteFunctions.find((fn2) => fn2.binding === binding);
|
|
3081
|
+
if (fn) {
|
|
3082
|
+
const id = (0, import_echo.fullyQualifiedId)(fn);
|
|
3083
|
+
return `${id}(${args})`;
|
|
3084
|
+
} else {
|
|
3085
|
+
return match;
|
|
3115
3086
|
}
|
|
3116
|
-
return `${binding}(${args.slice(2)})`;
|
|
3117
|
-
});
|
|
3118
|
-
}
|
|
3119
|
-
/**
|
|
3120
|
-
* Map from binding to fully qualified ECHO ID.
|
|
3121
|
-
*/
|
|
3122
|
-
mapFormulaBindingToId(formula) {
|
|
3123
|
-
return this._options.mapFormulaBindingToId(this._functions)(formula);
|
|
3124
|
-
}
|
|
3125
|
-
/**
|
|
3126
|
-
* Map from fully qualified ECHO ID to binding.
|
|
3127
|
-
*/
|
|
3128
|
-
mapFormulaBindingFromId(formula) {
|
|
3129
|
-
return this._options.mapFormulaBindingFromId(this._functions)(formula);
|
|
3130
|
-
}
|
|
3131
|
-
/**
|
|
3132
|
-
* Map from A1 notation to indices.
|
|
3133
|
-
*/
|
|
3134
|
-
mapFormulaRefsToIndices(formula) {
|
|
3135
|
-
(0, import_invariant.invariant)(formula.charAt(0) === "=", void 0, {
|
|
3136
|
-
F: __dxlog_file4,
|
|
3137
|
-
L: 509,
|
|
3138
|
-
S: this,
|
|
3139
|
-
A: [
|
|
3140
|
-
"formula.charAt(0) === '='",
|
|
3141
|
-
""
|
|
3142
|
-
]
|
|
3143
|
-
});
|
|
3144
|
-
return formula.replace(/([a-zA-Z]+)([0-9]+)/g, (match) => {
|
|
3145
|
-
return this.addressToIndex(addressFromA1Notation(match));
|
|
3146
3087
|
});
|
|
3147
3088
|
}
|
|
3148
3089
|
/**
|
|
3149
|
-
* Map from
|
|
3090
|
+
* Map from fully qualified ECHO ID to binding (from store).
|
|
3091
|
+
* E.g., spaceId:objectId() => HELLO()
|
|
3150
3092
|
*/
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3093
|
+
mapFunctionBindingFromId(formula) {
|
|
3094
|
+
return formula.replace(/(\w+):([a-zA-Z0-9]+)\((.*)\)/g, (match, spaceId, objectId, args) => {
|
|
3095
|
+
const id = `${spaceId}:${objectId}`;
|
|
3096
|
+
if (id.length !== OBJECT_ID_LENGTH) {
|
|
3097
|
+
return match;
|
|
3098
|
+
}
|
|
3099
|
+
const fn = this._remoteFunctions.find((fn2) => (0, import_echo.fullyQualifiedId)(fn2) === id);
|
|
3100
|
+
if (fn?.binding) {
|
|
3101
|
+
return `${fn.binding}(${args})`;
|
|
3102
|
+
} else {
|
|
3103
|
+
return match;
|
|
3104
|
+
}
|
|
3163
3105
|
});
|
|
3164
3106
|
}
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
}
|
|
3177
|
-
toDateTime(num) {
|
|
3178
|
-
return this._graph.hf.numberToDateTime(num);
|
|
3179
|
-
}
|
|
3180
|
-
toDate(num) {
|
|
3181
|
-
return this._graph.hf.numberToDate(num);
|
|
3107
|
+
async _open() {
|
|
3108
|
+
if (this._space) {
|
|
3109
|
+
const query = this._space.db.query(import_echo.Filter.schema(import_types.FunctionType));
|
|
3110
|
+
const unsubscribe = query.subscribe(({ objects }) => {
|
|
3111
|
+
this._remoteFunctions = objects.filter(({ binding }) => binding);
|
|
3112
|
+
this.update.emit({
|
|
3113
|
+
type: "functionsUpdated"
|
|
3114
|
+
});
|
|
3115
|
+
});
|
|
3116
|
+
this._ctx.onDispose(unsubscribe);
|
|
3117
|
+
}
|
|
3182
3118
|
}
|
|
3183
|
-
|
|
3184
|
-
|
|
3119
|
+
async _close() {
|
|
3120
|
+
for (const node of this._nodes.values()) {
|
|
3121
|
+
await node.close();
|
|
3122
|
+
}
|
|
3185
3123
|
}
|
|
3186
3124
|
};
|
|
3187
|
-
var
|
|
3188
|
-
|
|
3125
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts";
|
|
3126
|
+
var defaultOptions = {
|
|
3127
|
+
licenseKey: "gpl-v3"
|
|
3189
3128
|
};
|
|
3190
|
-
var
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
};
|
|
3195
|
-
return this.runAsyncFunction(ast, state, handler);
|
|
3129
|
+
var defaultPlugins = [
|
|
3130
|
+
{
|
|
3131
|
+
plugin: EdgeFunctionPlugin,
|
|
3132
|
+
translations: EdgeFunctionPluginTranslations
|
|
3196
3133
|
}
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
if (!rate) {
|
|
3208
|
-
return NaN;
|
|
3209
|
-
}
|
|
3210
|
-
return parseNumberString(rate);
|
|
3211
|
-
};
|
|
3212
|
-
return this.runAsyncFunction(ast, state, handler, {
|
|
3213
|
-
ttl: 1e4
|
|
3134
|
+
];
|
|
3135
|
+
var ComputeGraphRegistry = class extends import_context3.Resource {
|
|
3136
|
+
constructor(options = {
|
|
3137
|
+
plugins: defaultPlugins
|
|
3138
|
+
}) {
|
|
3139
|
+
super();
|
|
3140
|
+
this._graphs = /* @__PURE__ */ new Map();
|
|
3141
|
+
this._options = (0, import_lodash2.default)({}, options, defaultOptions);
|
|
3142
|
+
this._options.plugins?.forEach(({ plugin, translations }) => {
|
|
3143
|
+
import_hyperformula5.HyperFormula.registerFunctionPlugin(plugin, translations);
|
|
3214
3144
|
});
|
|
3215
3145
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
|
|
3146
|
+
getGraph(spaceId) {
|
|
3147
|
+
return this._graphs.get(spaceId);
|
|
3148
|
+
}
|
|
3149
|
+
getOrCreateGraph(space) {
|
|
3150
|
+
let graph = this._graphs.get(space.id);
|
|
3151
|
+
if (!graph) {
|
|
3152
|
+
(0, import_log4.log)("create graph", {
|
|
3153
|
+
space: space.id
|
|
3154
|
+
}, {
|
|
3155
|
+
F: __dxlog_file5,
|
|
3156
|
+
L: 69,
|
|
3157
|
+
S: this,
|
|
3158
|
+
C: (f, a) => f(...a)
|
|
3159
|
+
});
|
|
3160
|
+
graph = this.createGraph(space);
|
|
3161
|
+
}
|
|
3162
|
+
return graph;
|
|
3232
3163
|
}
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3164
|
+
createGraph(space) {
|
|
3165
|
+
(0, import_invariant3.invariant)(!this._graphs.has(space.id), `ComputeGraph already exists for space: ${space.id}`, {
|
|
3166
|
+
F: __dxlog_file5,
|
|
3167
|
+
L: 77,
|
|
3168
|
+
S: this,
|
|
3169
|
+
A: [
|
|
3170
|
+
"!this._graphs.has(space.id)",
|
|
3171
|
+
"`ComputeGraph already exists for space: ${space.id}`"
|
|
3172
|
+
]
|
|
3173
|
+
});
|
|
3174
|
+
const hf = import_hyperformula5.HyperFormula.buildEmpty(this._options);
|
|
3175
|
+
const graph = new ComputeGraph(hf, space, this._options);
|
|
3176
|
+
this._graphs.set(space.id, graph);
|
|
3177
|
+
return graph;
|
|
3178
|
+
}
|
|
3179
|
+
async _close() {
|
|
3180
|
+
for (const graph of this._graphs.values()) {
|
|
3181
|
+
await graph.close();
|
|
3182
|
+
}
|
|
3183
|
+
this._graphs.clear();
|
|
3242
3184
|
}
|
|
3243
3185
|
};
|
|
3244
3186
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3245
3187
|
0 && (module.exports = {
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3188
|
+
AsyncFunctionPlugin,
|
|
3189
|
+
ComputeGraph,
|
|
3190
|
+
ComputeGraphRegistry,
|
|
3191
|
+
ComputeNode,
|
|
3192
|
+
DEFAULT_COLUMNS,
|
|
3193
|
+
DEFAULT_ROWS,
|
|
3194
|
+
EDGE_FUNCTION_NAME,
|
|
3195
|
+
EdgeFunctionPlugin,
|
|
3196
|
+
EdgeFunctionPluginTranslations,
|
|
3197
|
+
FunctionContext,
|
|
3198
|
+
MAX_COLUMNS,
|
|
3199
|
+
MAX_ROWS,
|
|
3200
|
+
RANGE_NOTATION,
|
|
3201
|
+
ReadonlyException,
|
|
3250
3202
|
addressFromA1Notation,
|
|
3203
|
+
addressFromIndex,
|
|
3251
3204
|
addressToA1Notation,
|
|
3252
|
-
|
|
3253
|
-
|
|
3205
|
+
addressToIndex,
|
|
3206
|
+
cellClassNameForRange,
|
|
3207
|
+
compareIndexPositions,
|
|
3208
|
+
createSheet,
|
|
3209
|
+
createSheetName,
|
|
3210
|
+
defaultFunctionContextOptions,
|
|
3254
3211
|
defaultFunctions,
|
|
3212
|
+
defaultOptions,
|
|
3213
|
+
defaultPlugins,
|
|
3255
3214
|
inRange,
|
|
3256
|
-
|
|
3257
|
-
|
|
3215
|
+
initialize,
|
|
3216
|
+
insertIndices,
|
|
3217
|
+
isFormula,
|
|
3218
|
+
parseSheetName,
|
|
3219
|
+
rangeFromIndex,
|
|
3220
|
+
rangeToA1Notation,
|
|
3221
|
+
rangeToIndex
|
|
3258
3222
|
});
|
|
3259
|
-
//# sourceMappingURL=chunk-
|
|
3223
|
+
//# sourceMappingURL=chunk-QNFMTK3X.cjs.map
|