@gridsheet/react-core 3.0.0-rc.0 → 3.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/hooks-Y7BI_RNj.mjs +1103 -0
- package/dist/hooks-Y7BI_RNj.mjs.map +1 -0
- package/dist/index.d.ts +2 -31
- package/dist/index.js +3180 -12636
- package/dist/index.js.map +1 -1
- package/dist/react-core/src/components/Cell.d.ts.map +1 -0
- package/dist/react-core/src/components/CellStateOverlay.d.ts.map +1 -0
- package/dist/react-core/src/components/ColumnMenu.d.ts.map +1 -0
- package/dist/react-core/src/components/ColumnMenuFilterSection.d.ts +5 -0
- package/dist/react-core/src/components/ColumnMenuFilterSection.d.ts.map +1 -0
- package/dist/react-core/src/components/ColumnMenuLabelSection.d.ts +5 -0
- package/dist/react-core/src/components/ColumnMenuLabelSection.d.ts.map +1 -0
- package/dist/react-core/src/components/ColumnMenuSortSection.d.ts +5 -0
- package/dist/react-core/src/components/ColumnMenuSortSection.d.ts.map +1 -0
- package/dist/react-core/src/components/ContextMenu.d.ts +2 -0
- package/dist/react-core/src/components/ContextMenu.d.ts.map +1 -0
- package/dist/react-core/src/components/Editor.d.ts.map +1 -0
- package/dist/react-core/src/components/EditorOptions.d.ts +11 -0
- package/dist/react-core/src/components/EditorOptions.d.ts.map +1 -0
- package/dist/react-core/src/components/Emitter.d.ts.map +1 -0
- package/dist/react-core/src/components/Fixed.d.ts.map +1 -0
- package/dist/react-core/src/components/FormulaBar.d.ts.map +1 -0
- package/dist/react-core/src/components/FunctionGuide.d.ts +19 -0
- package/dist/react-core/src/components/FunctionGuide.d.ts.map +1 -0
- package/dist/react-core/src/components/GridSheet.d.ts +7 -0
- package/dist/react-core/src/components/GridSheet.d.ts.map +1 -0
- package/dist/react-core/src/components/HeaderCellLeft.d.ts.map +1 -0
- package/dist/react-core/src/components/HeaderCellTop.d.ts.map +1 -0
- package/dist/react-core/src/components/MenuItem.d.ts +18 -0
- package/dist/react-core/src/components/MenuItem.d.ts.map +1 -0
- package/dist/{components → react-core/src/components}/PluginBase.d.ts +2 -2
- package/dist/react-core/src/components/PluginBase.d.ts.map +1 -0
- package/dist/react-core/src/components/Resizer.d.ts.map +1 -0
- package/dist/react-core/src/components/RowMenu.d.ts.map +1 -0
- package/dist/react-core/src/components/ScrollHandle.d.ts.map +1 -0
- package/dist/react-core/src/components/SearchBar.d.ts.map +1 -0
- package/dist/react-core/src/components/StoreObserver.d.ts +14 -0
- package/dist/react-core/src/components/StoreObserver.d.ts.map +1 -0
- package/dist/react-core/src/components/Tabular.d.ts.map +1 -0
- package/dist/react-core/src/components/svg/AddIcon.d.ts.map +1 -0
- package/dist/react-core/src/components/svg/Base.d.ts.map +1 -0
- package/dist/react-core/src/components/svg/CloseIcon.d.ts.map +1 -0
- package/dist/react-core/src/components/svg/SearchIcon.d.ts.map +1 -0
- package/dist/react-core/src/components/useAutocomplete.d.ts +23 -0
- package/dist/react-core/src/components/useAutocomplete.d.ts.map +1 -0
- package/dist/react-core/src/index.d.ts +17 -0
- package/dist/react-core/src/index.d.ts.map +1 -0
- package/dist/react-core/src/lib/clipboard.d.ts +18 -0
- package/dist/react-core/src/lib/clipboard.d.ts.map +1 -0
- package/dist/react-core/src/lib/events.d.ts.map +1 -0
- package/dist/{components → react-core/src/lib}/hooks.d.ts +2 -0
- package/dist/react-core/src/lib/hooks.d.ts.map +1 -0
- package/dist/react-core/src/lib/menu.d.ts +99 -0
- package/dist/react-core/src/lib/menu.d.ts.map +1 -0
- package/dist/react-core/src/lib/paste.d.ts.map +1 -0
- package/dist/react-core/src/lib/style.d.ts +12 -0
- package/dist/react-core/src/lib/style.d.ts.map +1 -0
- package/dist/react-core/src/policy/checkbox.d.ts +3 -0
- package/dist/react-core/src/policy/checkbox.d.ts.map +1 -0
- package/dist/react-core/src/spellbook.d.ts +6 -0
- package/dist/react-core/src/spellbook.d.ts.map +1 -0
- package/dist/{store → react-core/src/store}/actions.d.ts +15 -3
- package/dist/react-core/src/store/actions.d.ts.map +1 -0
- package/dist/react-core/src/store/applyers.d.ts +40 -0
- package/dist/react-core/src/store/applyers.d.ts.map +1 -0
- package/dist/react-core/src/store/helpers.d.ts +33 -0
- package/dist/react-core/src/store/helpers.d.ts.map +1 -0
- package/dist/react-core/src/store/index.d.ts.map +1 -0
- package/dist/react-core/src/types.d.ts +101 -0
- package/dist/react-core/src/types.d.ts.map +1 -0
- package/dist/spellbook.d.ts +2 -0
- package/dist/spellbook.js +9 -0
- package/dist/spellbook.js.map +1 -0
- package/package.json +28 -10
- package/dist/components/Cell.d.ts.map +0 -1
- package/dist/components/CellStateOverlay.d.ts.map +0 -1
- package/dist/components/ColumnMenu.d.ts.map +0 -1
- package/dist/components/ContextMenu.d.ts +0 -20
- package/dist/components/ContextMenu.d.ts.map +0 -1
- package/dist/components/Editor.d.ts.map +0 -1
- package/dist/components/Emitter.d.ts.map +0 -1
- package/dist/components/Fixed.d.ts.map +0 -1
- package/dist/components/FormulaBar.d.ts.map +0 -1
- package/dist/components/GridSheet.d.ts +0 -5
- package/dist/components/GridSheet.d.ts.map +0 -1
- package/dist/components/HeaderCellLeft.d.ts.map +0 -1
- package/dist/components/HeaderCellTop.d.ts.map +0 -1
- package/dist/components/PluginBase.d.ts.map +0 -1
- package/dist/components/Resizer.d.ts.map +0 -1
- package/dist/components/RowMenu.d.ts.map +0 -1
- package/dist/components/ScrollHandle.d.ts.map +0 -1
- package/dist/components/SearchBar.d.ts.map +0 -1
- package/dist/components/StoreObserver.d.ts +0 -11
- package/dist/components/StoreObserver.d.ts.map +0 -1
- package/dist/components/Tabular.d.ts.map +0 -1
- package/dist/components/hooks.d.ts.map +0 -1
- package/dist/components/svg/AddIcon.d.ts.map +0 -1
- package/dist/components/svg/Base.d.ts.map +0 -1
- package/dist/components/svg/CloseIcon.d.ts.map +0 -1
- package/dist/components/svg/SearchIcon.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -30
- package/dist/constants.d.ts.map +0 -1
- package/dist/formula/evaluator.d.ts +0 -136
- package/dist/formula/evaluator.d.ts.map +0 -1
- package/dist/formula/functions/__async.d.ts +0 -59
- package/dist/formula/functions/__async.d.ts.map +0 -1
- package/dist/formula/functions/__base.d.ts +0 -31
- package/dist/formula/functions/__base.d.ts.map +0 -1
- package/dist/formula/functions/__utils.d.ts +0 -19
- package/dist/formula/functions/__utils.d.ts.map +0 -1
- package/dist/formula/functions/abs.d.ts +0 -12
- package/dist/formula/functions/abs.d.ts.map +0 -1
- package/dist/formula/functions/acos.d.ts +0 -12
- package/dist/formula/functions/acos.d.ts.map +0 -1
- package/dist/formula/functions/add.d.ts +0 -13
- package/dist/formula/functions/add.d.ts.map +0 -1
- package/dist/formula/functions/and.d.ts +0 -19
- package/dist/formula/functions/and.d.ts.map +0 -1
- package/dist/formula/functions/asin.d.ts +0 -12
- package/dist/formula/functions/asin.d.ts.map +0 -1
- package/dist/formula/functions/atan.d.ts +0 -12
- package/dist/formula/functions/atan.d.ts.map +0 -1
- package/dist/formula/functions/atan2.d.ts +0 -12
- package/dist/formula/functions/atan2.d.ts.map +0 -1
- package/dist/formula/functions/average.d.ts +0 -19
- package/dist/formula/functions/average.d.ts.map +0 -1
- package/dist/formula/functions/col.d.ts +0 -13
- package/dist/formula/functions/col.d.ts.map +0 -1
- package/dist/formula/functions/concat.d.ts +0 -12
- package/dist/formula/functions/concat.d.ts.map +0 -1
- package/dist/formula/functions/concatenate.d.ts +0 -19
- package/dist/formula/functions/concatenate.d.ts.map +0 -1
- package/dist/formula/functions/cos.d.ts +0 -12
- package/dist/formula/functions/cos.d.ts.map +0 -1
- package/dist/formula/functions/count.d.ts +0 -19
- package/dist/formula/functions/count.d.ts.map +0 -1
- package/dist/formula/functions/counta.d.ts +0 -19
- package/dist/formula/functions/counta.d.ts.map +0 -1
- package/dist/formula/functions/countif.d.ts +0 -13
- package/dist/formula/functions/countif.d.ts.map +0 -1
- package/dist/formula/functions/divide.d.ts +0 -12
- package/dist/formula/functions/divide.d.ts.map +0 -1
- package/dist/formula/functions/eq.d.ts +0 -12
- package/dist/formula/functions/eq.d.ts.map +0 -1
- package/dist/formula/functions/exp.d.ts +0 -12
- package/dist/formula/functions/exp.d.ts.map +0 -1
- package/dist/formula/functions/gt.d.ts +0 -12
- package/dist/formula/functions/gt.d.ts.map +0 -1
- package/dist/formula/functions/gte.d.ts +0 -12
- package/dist/formula/functions/gte.d.ts.map +0 -1
- package/dist/formula/functions/hlookup.d.ts +0 -18
- package/dist/formula/functions/hlookup.d.ts.map +0 -1
- package/dist/formula/functions/if.d.ts +0 -17
- package/dist/formula/functions/if.d.ts.map +0 -1
- package/dist/formula/functions/iferror.d.ts +0 -20
- package/dist/formula/functions/iferror.d.ts.map +0 -1
- package/dist/formula/functions/index.d.ts +0 -18
- package/dist/formula/functions/index.d.ts.map +0 -1
- package/dist/formula/functions/len.d.ts +0 -12
- package/dist/formula/functions/len.d.ts.map +0 -1
- package/dist/formula/functions/lenb.d.ts +0 -12
- package/dist/formula/functions/lenb.d.ts.map +0 -1
- package/dist/formula/functions/ln.d.ts +0 -12
- package/dist/formula/functions/ln.d.ts.map +0 -1
- package/dist/formula/functions/log.d.ts +0 -12
- package/dist/formula/functions/log.d.ts.map +0 -1
- package/dist/formula/functions/log10.d.ts +0 -12
- package/dist/formula/functions/log10.d.ts.map +0 -1
- package/dist/formula/functions/lt.d.ts +0 -12
- package/dist/formula/functions/lt.d.ts.map +0 -1
- package/dist/formula/functions/lte.d.ts +0 -12
- package/dist/formula/functions/lte.d.ts.map +0 -1
- package/dist/formula/functions/match.d.ts +0 -18
- package/dist/formula/functions/match.d.ts.map +0 -1
- package/dist/formula/functions/match.test.d.ts +0 -2
- package/dist/formula/functions/match.test.d.ts.map +0 -1
- package/dist/formula/functions/max.d.ts +0 -19
- package/dist/formula/functions/max.d.ts.map +0 -1
- package/dist/formula/functions/min.d.ts +0 -19
- package/dist/formula/functions/min.d.ts.map +0 -1
- package/dist/formula/functions/minus.d.ts +0 -13
- package/dist/formula/functions/minus.d.ts.map +0 -1
- package/dist/formula/functions/mod.d.ts +0 -12
- package/dist/formula/functions/mod.d.ts.map +0 -1
- package/dist/formula/functions/multiply.d.ts +0 -12
- package/dist/formula/functions/multiply.d.ts.map +0 -1
- package/dist/formula/functions/ne.d.ts +0 -12
- package/dist/formula/functions/ne.d.ts.map +0 -1
- package/dist/formula/functions/not.d.ts +0 -12
- package/dist/formula/functions/not.d.ts.map +0 -1
- package/dist/formula/functions/now.d.ts +0 -9
- package/dist/formula/functions/now.d.ts.map +0 -1
- package/dist/formula/functions/or.d.ts +0 -19
- package/dist/formula/functions/or.d.ts.map +0 -1
- package/dist/formula/functions/pi.d.ts +0 -9
- package/dist/formula/functions/pi.d.ts.map +0 -1
- package/dist/formula/functions/power.d.ts +0 -12
- package/dist/formula/functions/power.d.ts.map +0 -1
- package/dist/formula/functions/product.d.ts +0 -19
- package/dist/formula/functions/product.d.ts.map +0 -1
- package/dist/formula/functions/radians.d.ts +0 -12
- package/dist/formula/functions/radians.d.ts.map +0 -1
- package/dist/formula/functions/rand.d.ts +0 -9
- package/dist/formula/functions/rand.d.ts.map +0 -1
- package/dist/formula/functions/round.d.ts +0 -17
- package/dist/formula/functions/round.d.ts.map +0 -1
- package/dist/formula/functions/rounddown.d.ts +0 -17
- package/dist/formula/functions/rounddown.d.ts.map +0 -1
- package/dist/formula/functions/roundup.d.ts +0 -17
- package/dist/formula/functions/roundup.d.ts.map +0 -1
- package/dist/formula/functions/row.d.ts +0 -13
- package/dist/formula/functions/row.d.ts.map +0 -1
- package/dist/formula/functions/sin.d.ts +0 -12
- package/dist/formula/functions/sin.d.ts.map +0 -1
- package/dist/formula/functions/sqrt.d.ts +0 -12
- package/dist/formula/functions/sqrt.d.ts.map +0 -1
- package/dist/formula/functions/sum.d.ts +0 -19
- package/dist/formula/functions/sum.d.ts.map +0 -1
- package/dist/formula/functions/sumif.d.ts +0 -18
- package/dist/formula/functions/sumif.d.ts.map +0 -1
- package/dist/formula/functions/tan.d.ts +0 -12
- package/dist/formula/functions/tan.d.ts.map +0 -1
- package/dist/formula/functions/uminus.d.ts +0 -12
- package/dist/formula/functions/uminus.d.ts.map +0 -1
- package/dist/formula/functions/vlookup.d.ts +0 -18
- package/dist/formula/functions/vlookup.d.ts.map +0 -1
- package/dist/formula/mapping.d.ts +0 -3
- package/dist/formula/mapping.d.ts.map +0 -1
- package/dist/formula/solver.d.ts +0 -26
- package/dist/formula/solver.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/autofill.d.ts +0 -17
- package/dist/lib/autofill.d.ts.map +0 -1
- package/dist/lib/cell.d.ts +0 -3
- package/dist/lib/cell.d.ts.map +0 -1
- package/dist/lib/clipboard.d.ts +0 -3
- package/dist/lib/clipboard.d.ts.map +0 -1
- package/dist/lib/coords.d.ts +0 -10
- package/dist/lib/coords.d.ts.map +0 -1
- package/dist/lib/date.d.ts +0 -2
- package/dist/lib/date.d.ts.map +0 -1
- package/dist/lib/events.d.ts.map +0 -1
- package/dist/lib/filter.d.ts +0 -7
- package/dist/lib/filter.d.ts.map +0 -1
- package/dist/lib/hub.d.ts +0 -132
- package/dist/lib/hub.d.ts.map +0 -1
- package/dist/lib/input.d.ts +0 -15
- package/dist/lib/input.d.ts.map +0 -1
- package/dist/lib/operation.d.ts +0 -34
- package/dist/lib/operation.d.ts.map +0 -1
- package/dist/lib/palette.d.ts +0 -2
- package/dist/lib/palette.d.ts.map +0 -1
- package/dist/lib/paste.d.ts.map +0 -1
- package/dist/lib/reference.d.ts +0 -13
- package/dist/lib/reference.d.ts.map +0 -1
- package/dist/lib/sheet.d.ts +0 -3
- package/dist/lib/sheet.d.ts.map +0 -1
- package/dist/lib/spatial.d.ts +0 -92
- package/dist/lib/spatial.d.ts.map +0 -1
- package/dist/lib/table.d.ts +0 -458
- package/dist/lib/table.d.ts.map +0 -1
- package/dist/lib/time.d.ts +0 -25
- package/dist/lib/time.d.ts.map +0 -1
- package/dist/lib/virtualization.d.ts +0 -22
- package/dist/lib/virtualization.d.ts.map +0 -1
- package/dist/parsers/core.d.ts +0 -38
- package/dist/parsers/core.d.ts.map +0 -1
- package/dist/policy/core.d.ts +0 -47
- package/dist/policy/core.d.ts.map +0 -1
- package/dist/renderers/checkbox.d.ts +0 -5
- package/dist/renderers/checkbox.d.ts.map +0 -1
- package/dist/renderers/core.d.ts +0 -66
- package/dist/renderers/core.d.ts.map +0 -1
- package/dist/renderers/thousand_separator.d.ts +0 -3
- package/dist/renderers/thousand_separator.d.ts.map +0 -1
- package/dist/store/actions.d.ts.map +0 -1
- package/dist/store/dispatchers.d.ts +0 -34
- package/dist/store/dispatchers.d.ts.map +0 -1
- package/dist/store/helpers.d.ts +0 -31
- package/dist/store/helpers.d.ts.map +0 -1
- package/dist/store/index.d.ts.map +0 -1
- package/dist/styles/embedder.d.ts +0 -2
- package/dist/styles/embedder.d.ts.map +0 -1
- package/dist/styles/minified.d.ts +0 -3
- package/dist/styles/minified.d.ts.map +0 -1
- package/dist/styles/utils.d.ts +0 -52
- package/dist/styles/utils.d.ts.map +0 -1
- package/dist/types.d.ts +0 -355
- package/dist/types.d.ts.map +0 -1
- package/dist/utils.d.ts +0 -2
- package/dist/utils.d.ts.map +0 -1
- /package/dist/{components → react-core/src/components}/Cell.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/CellStateOverlay.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/ColumnMenu.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Editor.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Emitter.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Fixed.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/FormulaBar.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/HeaderCellLeft.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/HeaderCellTop.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Resizer.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/RowMenu.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/ScrollHandle.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/SearchBar.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/Tabular.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/AddIcon.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/Base.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/CloseIcon.d.ts +0 -0
- /package/dist/{components → react-core/src/components}/svg/SearchIcon.d.ts +0 -0
- /package/dist/{lib → react-core/src/lib}/events.d.ts +0 -0
- /package/dist/{lib → react-core/src/lib}/paste.d.ts +0 -0
- /package/dist/{store → react-core/src/store}/index.d.ts +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Sheet } from '../../../core/src';
|
|
2
|
+
import { PointType, StorePatchType, StoreType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Strip redundant fields from a StorePatchType before recording in history.
|
|
5
|
+
* - selectingZone with endY === -1 && endX === -1 is a no-selection sentinel and need not be stored.
|
|
6
|
+
*/
|
|
7
|
+
export declare const compactReflection: (reflection: StorePatchType) => StorePatchType;
|
|
8
|
+
export declare const restrictPoints: (store: StoreType, sheet: Sheet) => {
|
|
9
|
+
choosing: PointType;
|
|
10
|
+
selectingZone: {
|
|
11
|
+
startY: number;
|
|
12
|
+
startX: number;
|
|
13
|
+
endY: number;
|
|
14
|
+
endX: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const flashSheet: (el: HTMLElement | null) => void;
|
|
18
|
+
export declare const flashWithCallback: (store: StoreType, sheet: Sheet, callback: ((s: StoreType) => void) | undefined) => StoreType & {
|
|
19
|
+
callback?: (store: StoreType) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const initSearchStatement: (sheet: Sheet, store: StoreType) => {
|
|
22
|
+
matchingCells: never[];
|
|
23
|
+
searchQuery?: undefined;
|
|
24
|
+
matchingCellIndex?: undefined;
|
|
25
|
+
choosing?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
matchingCells: string[];
|
|
28
|
+
searchQuery: string;
|
|
29
|
+
matchingCellIndex: number;
|
|
30
|
+
choosing: PointType;
|
|
31
|
+
};
|
|
32
|
+
export declare const isXSheetFocused: (store: StoreType) => boolean;
|
|
33
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/store/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,EAAW,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,cAAc,KAAG,cAM9D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,EAAE,OAAO,KAAK;cAwBnC,SAAS;;;;;;;CAGlC,CAAC;AAIF,eAAO,MAAM,UAAU,GAAI,IAAI,WAAW,GAAG,IAAI,SAShD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,EAChB,OAAO,KAAK,EACZ,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,KAC7C,SAAS,GAAG;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;CAOpD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,OAAO,SAAS;;;;;;;;;;CAwDjE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,SAAS,YAU/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;CACZ,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO;WAET,SAAS;cACN,UAAU;EAEvB,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { RefObject, CSSProperties, KeyboardEvent } from 'react';
|
|
2
|
+
import { Sheet, UserSheet, BookType, PolicyType, ModeType, PointType, ZoneType, RectType, PositionType, CellsByAddressType, SheetLimits } from '../../core/src';
|
|
3
|
+
import { ContextMenuItemDescriptor, RowMenuItemDescriptor, ColMenuItemDescriptor } from './lib/menu';
|
|
4
|
+
export type { CSSPropertiesLike, RefLike, Resolution, Y, X, Height, Width, ShapeType, RectType, MatrixType, CursorStateType, FeedbackType, ModeType, HeadersType, AsyncCache, System, FilterConditionMethod, FilterCondition, FilterConfig, CellType, RawCellType, CellPatchType, CellFilter, CellsByAddressType, CellsByIdType, SystemsByIdType, RangeType, PointType, ExtraPointType, PositionType, ZoneType, AreaType, WriterType, Id, Ids, IdMatrix, Address, MatricesByAddress, StorePatchType, HistoryUpdateType, MoveRelation, MoveRelations, HistoryMoveType, HistoryInsertRowsType, HistoryRemoveRowsType, HistoryInsertColsType, HistoryRemoveColsType, HistorySortRowsType, HistoryType, Virtualization, OperatorType, OperationType, Dispatcher, StoreDispatchType, ContextsBySheetId, SheetIdsByName, RefPaletteType, } from '../../core/src';
|
|
5
|
+
export type Policies = {
|
|
6
|
+
[s: string]: PolicyType;
|
|
7
|
+
};
|
|
8
|
+
export type OptionsType = {
|
|
9
|
+
sheetHeight?: number;
|
|
10
|
+
sheetWidth?: number;
|
|
11
|
+
sheetResize?: CSSProperties['resize'];
|
|
12
|
+
editingOnEnter?: boolean;
|
|
13
|
+
showFormulaBar?: boolean;
|
|
14
|
+
limits?: SheetLimits;
|
|
15
|
+
mode?: ModeType;
|
|
16
|
+
contextMenu?: ContextMenuItemDescriptor[];
|
|
17
|
+
rowMenu?: RowMenuItemDescriptor[];
|
|
18
|
+
colMenu?: ColMenuItemDescriptor[];
|
|
19
|
+
};
|
|
20
|
+
export type StoreType = {
|
|
21
|
+
sheetId: number;
|
|
22
|
+
sheetReactive: RefObject<Sheet>;
|
|
23
|
+
rootRef: RefObject<HTMLDivElement>;
|
|
24
|
+
flashRef: RefObject<HTMLDivElement>;
|
|
25
|
+
mainRef: RefObject<HTMLDivElement>;
|
|
26
|
+
editorRef: RefObject<HTMLTextAreaElement>;
|
|
27
|
+
largeEditorRef: RefObject<HTMLTextAreaElement>;
|
|
28
|
+
tabularRef: RefObject<HTMLDivElement>;
|
|
29
|
+
searchInputRef: RefObject<HTMLTextAreaElement>;
|
|
30
|
+
entering: boolean;
|
|
31
|
+
choosing: PointType;
|
|
32
|
+
inputting: string;
|
|
33
|
+
selectingZone: ZoneType;
|
|
34
|
+
autofillDraggingTo: PointType | null;
|
|
35
|
+
leftHeaderSelecting: boolean;
|
|
36
|
+
topHeaderSelecting: boolean;
|
|
37
|
+
editingAddress: string;
|
|
38
|
+
editorRect: RectType;
|
|
39
|
+
dragging: boolean;
|
|
40
|
+
sheetHeight: number;
|
|
41
|
+
sheetWidth: number;
|
|
42
|
+
mode: ModeType;
|
|
43
|
+
searchQuery?: string;
|
|
44
|
+
searchCaseSensitive: boolean;
|
|
45
|
+
searchRegex: boolean;
|
|
46
|
+
searchRange?: ZoneType;
|
|
47
|
+
matchingCells: string[];
|
|
48
|
+
matchingCellIndex: number;
|
|
49
|
+
editingOnEnter: boolean;
|
|
50
|
+
contextMenuPosition: PositionType;
|
|
51
|
+
contextMenu: ContextMenuItemDescriptor[];
|
|
52
|
+
rowMenu: RowMenuItemDescriptor[];
|
|
53
|
+
colMenu: ColMenuItemDescriptor[];
|
|
54
|
+
resizingPositionY: [number, number, number];
|
|
55
|
+
resizingPositionX: [number, number, number];
|
|
56
|
+
columnMenuState: {
|
|
57
|
+
x: number;
|
|
58
|
+
position: PositionType;
|
|
59
|
+
} | null;
|
|
60
|
+
rowMenuState: {
|
|
61
|
+
y: number;
|
|
62
|
+
position: PositionType;
|
|
63
|
+
} | null;
|
|
64
|
+
editorHovering: boolean;
|
|
65
|
+
};
|
|
66
|
+
export type Manager<T> = {
|
|
67
|
+
instance: T;
|
|
68
|
+
sync: T extends StoreType ? React.Dispatch<{
|
|
69
|
+
type: number;
|
|
70
|
+
value: any;
|
|
71
|
+
}> : (instance: T) => void;
|
|
72
|
+
};
|
|
73
|
+
export type SheetHandle = {
|
|
74
|
+
sheet: UserSheet;
|
|
75
|
+
apply: (sheet: UserSheet) => void;
|
|
76
|
+
};
|
|
77
|
+
export type StoreHandle = {
|
|
78
|
+
store: StoreType;
|
|
79
|
+
apply: (store: StoreType) => void;
|
|
80
|
+
dispatch: React.Dispatch<{
|
|
81
|
+
type: number;
|
|
82
|
+
value: any;
|
|
83
|
+
}>;
|
|
84
|
+
};
|
|
85
|
+
export type Props = {
|
|
86
|
+
initialCells: CellsByAddressType;
|
|
87
|
+
sheetName?: string;
|
|
88
|
+
book?: BookType;
|
|
89
|
+
sheetRef?: RefObject<SheetHandle | null>;
|
|
90
|
+
storeRef?: RefObject<StoreHandle | null>;
|
|
91
|
+
options?: OptionsType;
|
|
92
|
+
className?: string;
|
|
93
|
+
style?: CSSProperties;
|
|
94
|
+
};
|
|
95
|
+
export type EditorEvent = KeyboardEvent<HTMLTextAreaElement>;
|
|
96
|
+
export type EditorEventWithNativeEvent = EditorEvent & {
|
|
97
|
+
nativeEvent: KeyboardEvent & {
|
|
98
|
+
isComposing: boolean;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AACA,YAAY,EACV,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,CAAC,EACD,CAAC,EACD,MAAM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KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,YAAY,EAAE,kBAAkB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAC7D,MAAM,MAAM,0BAA0B,GAAG,WAAW,GAAG;IACrD,WAAW,EAAE,aAAa,GAAG;QAAE,WAAW,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { allFunctions as i } from "@gridsheet/functions";
|
|
2
|
+
import { createBook as n } from "@gridsheet/core";
|
|
3
|
+
import { U as e } from "./hooks-Y7BI_RNj.mjs";
|
|
4
|
+
const s = ({ additionalFunctions: o, ...t } = {}) => e({ ...t, additionalFunctions: { ...i, ...o } }), c = ({ additionalFunctions: o, ...t } = {}) => n({ ...t, additionalFunctions: { ...i, ...o } });
|
|
5
|
+
export {
|
|
6
|
+
c as createSpellbook,
|
|
7
|
+
s as useSpellbook
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=spellbook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spellbook.js","sources":["../src/spellbook.ts"],"sourcesContent":["import { allFunctions } from '@gridsheet/functions';\nimport type { RegistryProps } from '@gridsheet/core';\nimport { createBook } from '@gridsheet/core';\nimport { useBook } from './lib/hooks';\n\n/** useBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */\nexport const useSpellbook = ({ additionalFunctions, ...rest }: RegistryProps = {}) =>\n useBook({ ...rest, additionalFunctions: { ...allFunctions, ...additionalFunctions } });\n\n/** createBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */\nexport const createSpellbook = ({ additionalFunctions, ...rest }: RegistryProps = {}) =>\n createBook({ ...rest, additionalFunctions: { ...allFunctions, ...additionalFunctions } });\n"],"names":["useSpellbook","additionalFunctions","rest","useBook","allFunctions","createSpellbook","createBook"],"mappings":";;;AAMa,MAAAA,IAAe,CAAC,EAAE,qBAAAC,GAAqB,GAAGC,EAAK,IAAmB,CAAA,MAC7EC,EAAQ,EAAE,GAAGD,GAAM,qBAAqB,EAAE,GAAGE,GAAc,GAAGH,EAAA,EAAuB,CAAA,GAG1EI,IAAkB,CAAC,EAAE,qBAAAJ,GAAqB,GAAGC,EAAK,IAAmB,CAAA,MAChFI,EAAW,EAAE,GAAGJ,GAAM,qBAAqB,EAAE,GAAGE,GAAc,GAAGH,EAAA,EAAuB,CAAA;"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsheet/react-core",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.10",
|
|
4
4
|
"description": "Spreadsheet component for React",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./dev": {
|
|
15
|
+
"types": "./dist/dev.d.ts",
|
|
16
|
+
"import": "./dist/dev.js",
|
|
17
|
+
"default": "./dist/dev.js"
|
|
18
|
+
},
|
|
19
|
+
"./spellbook": {
|
|
20
|
+
"types": "./dist/spellbook.d.ts",
|
|
21
|
+
"import": "./dist/spellbook.js",
|
|
22
|
+
"default": "./dist/spellbook.js"
|
|
23
|
+
}
|
|
14
24
|
},
|
|
15
25
|
"repository": {
|
|
16
26
|
"type": "git",
|
|
@@ -33,7 +43,6 @@
|
|
|
33
43
|
"url": "https://github.com/walkframe/gridsheet/issues"
|
|
34
44
|
},
|
|
35
45
|
"homepage": "https://gridsheet.walkframe.com/",
|
|
36
|
-
"packageManager": "pnpm@10.6.5",
|
|
37
46
|
"devDependencies": {
|
|
38
47
|
"@types/jest": "^29.4.0",
|
|
39
48
|
"@types/react": "^16.9.24",
|
|
@@ -50,7 +59,11 @@
|
|
|
50
59
|
"ts-node": "^10.9.1",
|
|
51
60
|
"typescript": "^5.8.2",
|
|
52
61
|
"vite": "^6.2.2",
|
|
53
|
-
"vite-plugin-dts": "^4.5.3"
|
|
62
|
+
"vite-plugin-dts": "^4.5.3",
|
|
63
|
+
"@gridsheet/functions": "3.0.0-rc.10"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@gridsheet/core": "3.0.0-rc.10"
|
|
54
67
|
},
|
|
55
68
|
"peerDependencies": {
|
|
56
69
|
"dayjs": "^1.11.13",
|
|
@@ -59,5 +72,10 @@
|
|
|
59
72
|
},
|
|
60
73
|
"publishConfig": {
|
|
61
74
|
"access": "public"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"build": "rm -rf ./dist || true && vite build",
|
|
78
|
+
"typecheck": "pnpm tsc --noEmit --types jest",
|
|
79
|
+
"jest": "jest"
|
|
62
80
|
}
|
|
63
|
-
}
|
|
81
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../src/components/Cell.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,KAAK,KAAK,GAAG;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,KAAK,CA0TzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CellStateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CellStateOverlay.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAwBnE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAmEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CA6PtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnMenu.d.ts","sourceRoot":"","sources":["../../src/components/ColumnMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAwD,MAAM,OAAO,CAAC;AAmCtF,eAAO,MAAM,UAAU,EAAE,EAwgBxB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ContextMenuProps } from '../types';
|
|
3
|
-
export declare const ContextMenu: () => JSX.Element | null;
|
|
4
|
-
export declare const DividerItem: (props: ContextMenuProps) => JSX.Element;
|
|
5
|
-
export declare const CutItem: (props: ContextMenuProps) => JSX.Element;
|
|
6
|
-
export declare const CopyItem: (props: ContextMenuProps) => JSX.Element;
|
|
7
|
-
export declare const PasteItem: (props: ContextMenuProps) => JSX.Element;
|
|
8
|
-
export declare const PasteOnlyValueItem: (props: ContextMenuProps) => JSX.Element;
|
|
9
|
-
export declare const RowsColsOperationDividerItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
10
|
-
export declare const InsertRowsAboveItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
11
|
-
export declare const InsertRowsBelowItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
12
|
-
export declare const InsertColsLeftItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
13
|
-
export declare const InsertColsRightItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
14
|
-
export declare const RemoveRowsItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
15
|
-
export declare const RemoveColsItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
16
|
-
export declare const HistoryDeviderItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
17
|
-
export declare const UndoItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
18
|
-
export declare const RedoItem: (props: ContextMenuProps) => JSX.Element | null;
|
|
19
|
-
export declare const defaultContextMenuItems: FC<ContextMenuProps>[];
|
|
20
|
-
//# sourceMappingURL=ContextMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/ContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAqBpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,WAAW,0BAyBvB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,gBAElD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,gBAAgB,gBA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eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,gBAgEvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Emitter.d.ts","sourceRoot":"","sources":["../../src/components/Emitter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,eAAO,MAAM,OAAO,EAAE,EA+BrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fixed.d.ts","sourceRoot":"","sources":["../../src/components/Fixed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1D,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,KAAK,CAW3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormulaBar.d.ts","sourceRoot":"","sources":["../../src/components/FormulaBar.tsx"],"names":[],"mappings":"AAUA,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,gBAsMpD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Connector, Props } from '../types';
|
|
2
|
-
export declare const createConnector: () => import('react').RefObject<Connector | null>;
|
|
3
|
-
export declare const useConnector: () => import('react').MutableRefObject<Connector | null>;
|
|
4
|
-
export declare function GridSheet({ initialCells, sheetName, connector: initialConnector, options, className, style, hub: initialHub, }: Props): JSX.Element;
|
|
5
|
-
//# sourceMappingURL=GridSheet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../src/components/GridSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,SAAS,EAAe,KAAK,EAAa,MAAM,UAAU,CAAC;AAqB7F,eAAO,MAAM,eAAe,mDAAsC,CAAC;AACnE,eAAO,MAAM,YAAY,0DAAuC,CAAC;AAEjE,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,SAAc,EACd,SAAS,EAAE,gBAAgB,EAC3B,OAAY,EACZ,SAAS,EACT,KAAK,EACL,GAAG,EAAE,UAAU,GAChB,EAAE,KAAK,eA+JP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderCellLeft.d.ts","sourceRoot":"","sources":["../../src/components/HeaderCellLeft.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2BhC,KAAK,KAAK,GAAG;IACX,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAwPnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderCellTop.d.ts","sourceRoot":"","sources":["../../src/components/HeaderCellTop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2BhC,KAAK,KAAK,GAAG;IACX,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CA6PlC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginBase.d.ts","sourceRoot":"","sources":["../../src/components/PluginBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,aAAa,4CAAyC,CAAC;AAEpE,wBAAgB,uBAAuB,IAAI,iBAAiB,CAU3D;AAED,wBAAgB,gBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAM/D;AAED,wBAAgB,iBAAiB,kCAMhC;AAED,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,eAMtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Resizer.d.ts","sourceRoot":"","sources":["../../src/components/Resizer.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO,mBAuGnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RowMenu.d.ts","sourceRoot":"","sources":["../../src/components/RowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AAS5C,eAAO,MAAM,OAAO,EAAE,EAmIrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollHandle.d.ts","sourceRoot":"","sources":["../../src/components/ScrollHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,UAAc,EAAE,QAAY,EAAE,SAAc,EAAE,EAAE,KAAK,eAsL1F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../src/components/SearchBar.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS,0BAoGrB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC, MutableRefObject } from 'react';
|
|
2
|
-
import { OptionsType, Connector } from '../types';
|
|
3
|
-
type StoreObserverProps = OptionsType & {
|
|
4
|
-
sheetName?: string;
|
|
5
|
-
connector?: MutableRefObject<Connector | null>;
|
|
6
|
-
};
|
|
7
|
-
export declare const createConnector: () => import('react').RefObject<Connector | null>;
|
|
8
|
-
export declare const useConnector: () => MutableRefObject<Connector | null>;
|
|
9
|
-
export declare const StoreObserver: FC<StoreObserverProps>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=StoreObserver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StoreObserver.d.ts","sourceRoot":"","sources":["../../src/components/StoreObserver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAS,SAAS,EAAE,MAAM,UAAU,CAAC;AAQ9D,KAAK,kBAAkB,GAAG,WAAW,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,eAAe,mDAAsC,CAAC;AACnE,eAAO,MAAM,YAAY,0CAAuC,CAAC;AACjE,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA2FhD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tabular.d.ts","sourceRoot":"","sources":["../../src/components/Tabular.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO,0BA8NnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/components/hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;CAStB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,cAAW,MAWnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,cAAW,MAQzE,GAAG,MAAM,GAAG,EAAE,SAMvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddIcon.d.ts","sourceRoot":"","sources":["../../../src/components/svg/AddIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,QAAQ,CAAC;AAI9C,eAAO,MAAM,OAAO,GAAI,wBAAsC,SAAS,gBAQtE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../../src/components/svg/Base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,SAAU,SAAQ,SAAS;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAID,eAAO,MAAM,IAAI,GAAI,2BAAgC,SAAS,gBAkB7D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloseIcon.d.ts","sourceRoot":"","sources":["../../../src/components/svg/CloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,QAAQ,CAAC;AAI9C,eAAO,MAAM,SAAS,GAAI,wBAAsC,SAAS,gBAQxE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchIcon.d.ts","sourceRoot":"","sources":["../../../src/components/svg/SearchIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,QAAQ,CAAC;AAI9C,eAAO,MAAM,UAAU,GAAI,wBAAsC,SAAS,gBAQzE,CAAC"}
|
package/dist/constants.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ZoneType } from './types';
|
|
2
|
-
export declare const DEFAULT_HISTORY_LIMIT = 20;
|
|
3
|
-
export declare const DEFAULT_HEIGHT = 24;
|
|
4
|
-
export declare const DEFAULT_WIDTH = 90;
|
|
5
|
-
export declare const SHEET_HEIGHT = 500;
|
|
6
|
-
export declare const SHEET_WIDTH = 1000;
|
|
7
|
-
export declare const HEADER_HEIGHT = 24;
|
|
8
|
-
export declare const HEADER_WIDTH = 50;
|
|
9
|
-
export declare const MIN_WIDTH = 5;
|
|
10
|
-
export declare const MIN_HEIGHT = 5;
|
|
11
|
-
export declare const OVERSCAN_X = 5;
|
|
12
|
-
export declare const OVERSCAN_Y = 10;
|
|
13
|
-
export declare const DEFAULT_ALPHABET_CACHE_SIZE = 1000;
|
|
14
|
-
export declare class Special {
|
|
15
|
-
name: string;
|
|
16
|
-
constructor(name: string);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Sentinel value representing an in-flight async formula computation.
|
|
20
|
-
* Cells whose solved cache contains a Pending will render a loading indicator.
|
|
21
|
-
* Dependent cells that encounter a Pending value also become pending.
|
|
22
|
-
*/
|
|
23
|
-
export declare class Pending {
|
|
24
|
-
promise: Promise<any>;
|
|
25
|
-
constructor(promise: Promise<any>);
|
|
26
|
-
}
|
|
27
|
-
export declare const SECONDS_IN_DAY = 86400;
|
|
28
|
-
export declare const FULLDATE_FORMAT_UTC = "YYYY-MM-DDTHH:mm:ss.SSSZ";
|
|
29
|
-
export declare const RESET_ZONE: ZoneType;
|
|
30
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,WAAW,OAAO,CAAC;AAEhC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,qBAAa,OAAO;IACX,IAAI,EAAE,MAAM,CAAC;gBACR,IAAI,EAAE,MAAM;CAGzB;AAED;;;;GAIG;AACH,qBAAa,OAAO;IACX,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;CAGlC;AAED,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,eAAO,MAAM,UAAU,EAAE,QAKxB,CAAC"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Table } from '../lib/table';
|
|
2
|
-
import { Id, PointType } from '../types';
|
|
3
|
-
type EvaluateProps = {
|
|
4
|
-
table: Table;
|
|
5
|
-
};
|
|
6
|
-
export type IdentifyProps = {
|
|
7
|
-
table: Table;
|
|
8
|
-
slideY?: number;
|
|
9
|
-
slideX?: number;
|
|
10
|
-
operation?: 'move' | 'removeRows' | 'removeCols';
|
|
11
|
-
dependency: string;
|
|
12
|
-
idMap?: {
|
|
13
|
-
[id: string]: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type DisplayProps = {
|
|
17
|
-
table: Table;
|
|
18
|
-
slideY?: number;
|
|
19
|
-
slideX?: number;
|
|
20
|
-
};
|
|
21
|
-
export declare class FormulaError {
|
|
22
|
-
code: string;
|
|
23
|
-
message: string;
|
|
24
|
-
error?: Error;
|
|
25
|
-
__isFormulaError: boolean;
|
|
26
|
-
constructor(code: string, message: string, error?: Error);
|
|
27
|
-
static is(obj: any): boolean;
|
|
28
|
-
}
|
|
29
|
-
declare class Entity<T = any> {
|
|
30
|
-
value: T;
|
|
31
|
-
constructor(value: T);
|
|
32
|
-
}
|
|
33
|
-
export declare class ValueEntity extends Entity {
|
|
34
|
-
evaluate(): any;
|
|
35
|
-
}
|
|
36
|
-
export declare class UnreferencedEntity extends Entity {
|
|
37
|
-
evaluate(): void;
|
|
38
|
-
}
|
|
39
|
-
export declare class InvalidRefEntity extends Entity<string> {
|
|
40
|
-
evaluate(): void;
|
|
41
|
-
}
|
|
42
|
-
export declare class RefEntity extends Entity<string> {
|
|
43
|
-
constructor(value: string);
|
|
44
|
-
stringify(): string;
|
|
45
|
-
evaluate({ table }: EvaluateProps): Table;
|
|
46
|
-
identify(props: IdentifyProps): string;
|
|
47
|
-
}
|
|
48
|
-
export declare class RangeEntity extends Entity<string> {
|
|
49
|
-
stringify(): string;
|
|
50
|
-
evaluate({ table }: EvaluateProps): Table;
|
|
51
|
-
identify(props: IdentifyProps): string;
|
|
52
|
-
}
|
|
53
|
-
export declare class IdEntity extends Entity<string> {
|
|
54
|
-
private parse;
|
|
55
|
-
evaluate({ table }: EvaluateProps): Table;
|
|
56
|
-
display({ table, slideY, slideX }: DisplayProps): string;
|
|
57
|
-
identify(props: IdentifyProps): string;
|
|
58
|
-
}
|
|
59
|
-
export declare class IdRangeEntity extends Entity<string> {
|
|
60
|
-
private parse;
|
|
61
|
-
evaluate({ table }: EvaluateProps): Table;
|
|
62
|
-
display({ table, slideY, slideX }: DisplayProps): string;
|
|
63
|
-
identify(props: IdentifyProps): string | undefined;
|
|
64
|
-
}
|
|
65
|
-
export declare class FunctionEntity {
|
|
66
|
-
args: Expression[];
|
|
67
|
-
name: string;
|
|
68
|
-
precedence: number;
|
|
69
|
-
private origin?;
|
|
70
|
-
constructor(name: string, precedence?: number, args?: Expression[], origin?: PointType);
|
|
71
|
-
evaluate({ table }: EvaluateProps): any;
|
|
72
|
-
}
|
|
73
|
-
export type Expression = ValueEntity | RefEntity | RangeEntity | IdEntity | IdRangeEntity | FunctionEntity | UnreferencedEntity | InvalidRefEntity;
|
|
74
|
-
export type TokenType = 'VALUE' | 'REF' | 'RANGE' | 'ID' | 'ID_RANGE' | 'FUNCTION' | 'PREFIX_OPERATOR' | 'INFIX_OPERATOR' | 'POSTFIX_OPERATOR' | 'OPEN' | 'CLOSE' | 'COMMA' | 'SPACE' | 'UNREFERENCED' | 'INVALID_REF';
|
|
75
|
-
export declare class Token {
|
|
76
|
-
type: TokenType;
|
|
77
|
-
entity: any;
|
|
78
|
-
precedence: number;
|
|
79
|
-
private origin?;
|
|
80
|
-
constructor(type: TokenType, entity: any, precedence?: number, origin?: PointType);
|
|
81
|
-
length(): number;
|
|
82
|
-
stringify(): string;
|
|
83
|
-
convert(): ValueEntity | UnreferencedEntity | InvalidRefEntity | RefEntity | RangeEntity | IdEntity | IdRangeEntity | FunctionEntity | undefined;
|
|
84
|
-
}
|
|
85
|
-
type LexerOption = {
|
|
86
|
-
origin?: PointType;
|
|
87
|
-
idMap?: {
|
|
88
|
-
[id: Id]: Id;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export declare class Lexer {
|
|
92
|
-
private index;
|
|
93
|
-
private formula;
|
|
94
|
-
tokens: Token[];
|
|
95
|
-
foreign: boolean;
|
|
96
|
-
private origin?;
|
|
97
|
-
private idMap;
|
|
98
|
-
constructor(formula: string, options?: LexerOption);
|
|
99
|
-
private isWhiteSpace;
|
|
100
|
-
private next;
|
|
101
|
-
private get;
|
|
102
|
-
private getToken;
|
|
103
|
-
getTokenIndexByCharPosition(pos: number): [number, boolean];
|
|
104
|
-
getTokenPositionRange(index: number, slide?: number): [number, number];
|
|
105
|
-
stringify(): string;
|
|
106
|
-
identify(props: IdentifyProps): string;
|
|
107
|
-
display({ table }: DisplayProps): string;
|
|
108
|
-
tokenize(): void;
|
|
109
|
-
private skipSpaces;
|
|
110
|
-
private getString;
|
|
111
|
-
private resolveIdRange;
|
|
112
|
-
}
|
|
113
|
-
export declare class Parser {
|
|
114
|
-
index: number;
|
|
115
|
-
depth: number;
|
|
116
|
-
tokens: Token[];
|
|
117
|
-
constructor(tokens: Token[]);
|
|
118
|
-
build(): Expression | undefined;
|
|
119
|
-
private parse;
|
|
120
|
-
}
|
|
121
|
-
export declare const identifyFormula: (value: any, { idMap, ...props }: IdentifyProps) => any;
|
|
122
|
-
export declare const stripSheetName: (sheetName: string) => string;
|
|
123
|
-
export declare function splitRef(ref: string): {
|
|
124
|
-
sheetName: string | undefined;
|
|
125
|
-
addresses: string[];
|
|
126
|
-
};
|
|
127
|
-
export declare const parseRef: (ref: string, { table, operation, dependency }: IdentifyProps) => {
|
|
128
|
-
table: Table;
|
|
129
|
-
sheetId?: number;
|
|
130
|
-
formula?: string;
|
|
131
|
-
sheetName?: string;
|
|
132
|
-
addresses: string[];
|
|
133
|
-
ids: string[];
|
|
134
|
-
};
|
|
135
|
-
export {};
|
|
136
|
-
//# sourceMappingURL=evaluator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/formula/evaluator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzC,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAcF,qBAAa,YAAY;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACrB,gBAAgB,UAAQ;gBACZ,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;IAKxD,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;CAG7B;AAED,cAAM,MAAM,CAAC,CAAC,GAAG,GAAG;IACX,KAAK,EAAE,CAAC,CAAC;gBACJ,KAAK,EAA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Special } from '../../constants';
|
|
2
|
-
import { Wire } from '../../lib/hub';
|
|
3
|
-
import { PointType } from '../../types';
|
|
4
|
-
/**
|
|
5
|
-
* Sentinel value to distinguish cache miss from user-returned undefined/null.
|
|
6
|
-
* Since user functions can return undefined or null, we need a special marker
|
|
7
|
-
* to indicate "no cache entry found" vs "cache entry is undefined".
|
|
8
|
-
*/
|
|
9
|
-
export declare const asyncCacheMiss: Special;
|
|
10
|
-
/** Returns true if any element of `args` is a Pending sentinel. */
|
|
11
|
-
export declare const hasPendingArg: (args: any[]) => boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Build a cache key from function name + hashed serialised arguments.
|
|
14
|
-
*
|
|
15
|
-
* Format: `funcName:length:hash1-hash2-...`
|
|
16
|
-
* - length: byte length of the JSON-serialised args
|
|
17
|
-
* - hash: cyrb53 hash of the JSON string, repeated hashPrecision times with different seeds
|
|
18
|
-
*
|
|
19
|
-
* When a Table appears as an argument its trimmed area is converted to a
|
|
20
|
-
* value matrix (`any[][]`) via `getFieldMatrix()` so the key reflects the
|
|
21
|
-
* actual cell values the function will operate on.
|
|
22
|
-
*/
|
|
23
|
-
export declare const buildAsyncCacheKey: (funcName: string, bareArgs: any[], hashPrecision?: number) => string;
|
|
24
|
-
/**
|
|
25
|
-
* Try to retrieve a cached or pending async result for the given cache key.
|
|
26
|
-
*
|
|
27
|
-
* Returns:
|
|
28
|
-
* - Cached value if present, valid, and not expired
|
|
29
|
-
* - Pending if there is an in-flight promise for this cell
|
|
30
|
-
* - asyncCacheMiss if no cache/pending exists (distinguishes from user-returned undefined/null)
|
|
31
|
-
*/
|
|
32
|
-
export declare const getAsyncCache: (table: {
|
|
33
|
-
wire: Wire;
|
|
34
|
-
getId: (p: PointType) => string;
|
|
35
|
-
}, origin: PointType, key: string) => any;
|
|
36
|
-
/**
|
|
37
|
-
* Handle an async (Promise) result returned by BaseFunction.main().
|
|
38
|
-
*
|
|
39
|
-
* Cache is stored per-cell in cell.asyncCache.
|
|
40
|
-
* In-flight tracking uses Wire.asyncPending (keyed by cell ID).
|
|
41
|
-
*
|
|
42
|
-
* Flow:
|
|
43
|
-
* 1. If cell has asyncCache and the key matches (inputs unchanged) and not expired → return cached value
|
|
44
|
-
* 2. If there is already an in-flight promise for this cell → return its Pending
|
|
45
|
-
* 3. Otherwise start the async work, return a new Pending, and on completion
|
|
46
|
-
* write the result into cell.asyncCache and trigger a re-render.
|
|
47
|
-
*
|
|
48
|
-
* @param ttlMilliseconds - Cache time-to-live in **milliseconds**. undefined = never expires.
|
|
49
|
-
*/
|
|
50
|
-
export declare const getOrSaveAsyncCache: (promise: Promise<any>, table: {
|
|
51
|
-
wire: Wire;
|
|
52
|
-
getId: (p: PointType) => string;
|
|
53
|
-
}, origin: PointType, key: string, ttlMilliseconds?: number) => any;
|
|
54
|
-
/**
|
|
55
|
-
* Create a Pending sentinel that resolves immediately.
|
|
56
|
-
* Used when an argument is already pending — the result is propagated.
|
|
57
|
-
*/
|
|
58
|
-
export declare const createPropagatedPending: () => Pending;
|
|
59
|
-
//# sourceMappingURL=__async.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"__async.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/__async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAAgC,CAAC;AAE5D,mEAAmE;AACnE,eAAO,MAAM,aAAa,GAAI,MAAM,GAAG,EAAE,KAAG,OAE3C,CAAC;AAwBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,gBAAe,MAAU,KAAG,MAYjG,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,MAAM,CAAA;CAAE,EACtD,QAAQ,SAAS,EACjB,KAAK,MAAM,KACV,GA0BF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,OAAO,CAAC,GAAG,CAAC,EACrB,OAAO;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,MAAM,CAAA;CAAE,EACtD,QAAQ,SAAS,EACjB,KAAK,MAAM,EACX,kBAAkB,MAAM,KACvB,GAkCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,OAE1C,CAAC"}
|