@gridsheet/react-core 0.12.2 → 0.12.4-alpha.1
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/README.md +1 -1
- package/dist/index.js +5183 -11
- package/package.json +18 -3
- package/dist/components/Cell.d.ts +0 -8
- package/dist/components/Cell.d.ts.map +0 -1
- package/dist/components/Cell.js +0 -199
- package/dist/components/Cell.js.map +0 -1
- package/dist/components/ContextMenu.d.ts +0 -3
- package/dist/components/ContextMenu.d.ts.map +0 -1
- package/dist/components/ContextMenu.js +0 -207
- package/dist/components/ContextMenu.js.map +0 -1
- package/dist/components/Editor.d.ts +0 -3
- package/dist/components/Editor.d.ts.map +0 -1
- package/dist/components/Editor.js +0 -304
- package/dist/components/Editor.js.map +0 -1
- package/dist/components/Emitter.d.ts +0 -9
- package/dist/components/Emitter.d.ts.map +0 -1
- package/dist/components/Emitter.js +0 -26
- package/dist/components/Emitter.js.map +0 -1
- package/dist/components/GridSheet.d.ts +0 -4
- package/dist/components/GridSheet.d.ts.map +0 -1
- package/dist/components/GridSheet.js +0 -110
- package/dist/components/GridSheet.js.map +0 -1
- package/dist/components/HeaderLeftCell.d.ts +0 -7
- package/dist/components/HeaderLeftCell.d.ts.map +0 -1
- package/dist/components/HeaderLeftCell.js +0 -67
- package/dist/components/HeaderLeftCell.js.map +0 -1
- package/dist/components/HeaderTopCell.d.ts +0 -7
- package/dist/components/HeaderTopCell.d.ts.map +0 -1
- package/dist/components/HeaderTopCell.js +0 -68
- package/dist/components/HeaderTopCell.js.map +0 -1
- package/dist/components/Resizer.d.ts +0 -3
- package/dist/components/Resizer.d.ts.map +0 -1
- package/dist/components/Resizer.js +0 -83
- package/dist/components/Resizer.js.map +0 -1
- package/dist/components/SearchBox.d.ts +0 -3
- package/dist/components/SearchBox.d.ts.map +0 -1
- package/dist/components/SearchBox.js +0 -52
- package/dist/components/SearchBox.js.map +0 -1
- package/dist/components/StoreInitializer.d.ts +0 -4
- package/dist/components/StoreInitializer.d.ts.map +0 -1
- package/dist/components/StoreInitializer.js +0 -68
- package/dist/components/StoreInitializer.js.map +0 -1
- package/dist/components/Tabular.d.ts +0 -9
- package/dist/components/Tabular.d.ts.map +0 -1
- package/dist/components/Tabular.js +0 -84
- package/dist/components/Tabular.js.map +0 -1
- package/dist/constants.d.ts +0 -18
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -21
- package/dist/constants.js.map +0 -1
- package/dist/formula/evaluator.d.ts +0 -91
- package/dist/formula/evaluator.d.ts.map +0 -1
- package/dist/formula/evaluator.js +0 -541
- package/dist/formula/evaluator.js.map +0 -1
- package/dist/formula/functions/__base.d.ts +0 -23
- package/dist/formula/functions/__base.d.ts.map +0 -1
- package/dist/formula/functions/__base.js +0 -16
- package/dist/formula/functions/__base.js.map +0 -1
- package/dist/formula/functions/__utils.d.ts +0 -6
- package/dist/formula/functions/__utils.d.ts.map +0 -1
- package/dist/formula/functions/__utils.js +0 -102
- package/dist/formula/functions/__utils.js.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/abs.js +0 -21
- package/dist/formula/functions/abs.js.map +0 -1
- package/dist/formula/functions/abs.spec.d.ts +0 -2
- package/dist/formula/functions/abs.spec.d.ts.map +0 -1
- package/dist/formula/functions/abs.spec.js +0 -29
- package/dist/formula/functions/abs.spec.js.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/acos.js +0 -29
- package/dist/formula/functions/acos.js.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/add.js +0 -50
- package/dist/formula/functions/add.js.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/and.js +0 -28
- package/dist/formula/functions/and.js.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/asin.js +0 -29
- package/dist/formula/functions/asin.js.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/atan.js +0 -26
- package/dist/formula/functions/atan.js.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/atan2.js +0 -32
- package/dist/formula/functions/atan2.js.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/average.js +0 -41
- package/dist/formula/functions/average.js.map +0 -1
- package/dist/formula/functions/col.d.ts +0 -14
- package/dist/formula/functions/col.d.ts.map +0 -1
- package/dist/formula/functions/col.js +0 -30
- package/dist/formula/functions/col.js.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/concat.js +0 -27
- package/dist/formula/functions/concat.js.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/concatenate.js +0 -25
- package/dist/formula/functions/concatenate.js.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/cos.js +0 -26
- package/dist/formula/functions/cos.js.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/count.js +0 -35
- package/dist/formula/functions/count.js.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/counta.js +0 -35
- package/dist/formula/functions/counta.js.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/countif.js +0 -30
- package/dist/formula/functions/countif.js.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/divide.js +0 -33
- package/dist/formula/functions/divide.js.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/eq.js +0 -25
- package/dist/formula/functions/eq.js.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/exp.js +0 -28
- package/dist/formula/functions/exp.js.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/gt.js +0 -27
- package/dist/formula/functions/gt.js.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/gte.js +0 -27
- package/dist/formula/functions/gte.js.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/hlookup.js +0 -74
- package/dist/formula/functions/hlookup.js.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/if.js +0 -36
- package/dist/formula/functions/if.js.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/iferror.js +0 -41
- package/dist/formula/functions/iferror.js.map +0 -1
- package/dist/formula/functions/iferror.spec.d.ts +0 -2
- package/dist/formula/functions/iferror.spec.d.ts.map +0 -1
- package/dist/formula/functions/iferror.spec.js +0 -61
- package/dist/formula/functions/iferror.spec.js.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/len.js +0 -26
- package/dist/formula/functions/len.js.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/lenb.js +0 -26
- package/dist/formula/functions/lenb.js.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/ln.js +0 -29
- package/dist/formula/functions/ln.js.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/log.js +0 -35
- package/dist/formula/functions/log.js.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/log10.js +0 -29
- package/dist/formula/functions/log10.js.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/lt.js +0 -27
- package/dist/formula/functions/lt.js.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/lte.js +0 -27
- package/dist/formula/functions/lte.js.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/max.js +0 -44
- package/dist/formula/functions/max.js.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/min.js +0 -44
- package/dist/formula/functions/min.js.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/minus.js +0 -50
- package/dist/formula/functions/minus.js.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/mod.js +0 -31
- package/dist/formula/functions/mod.js.map +0 -1
- package/dist/formula/functions/mod.spec.d.ts +0 -2
- package/dist/formula/functions/mod.spec.d.ts.map +0 -1
- package/dist/formula/functions/mod.spec.js +0 -52
- package/dist/formula/functions/mod.spec.js.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/multiply.js +0 -27
- package/dist/formula/functions/multiply.js.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/ne.js +0 -25
- package/dist/formula/functions/ne.js.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/not.js +0 -30
- package/dist/formula/functions/not.js.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/now.js +0 -21
- package/dist/formula/functions/now.js.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/or.js +0 -28
- package/dist/formula/functions/or.js.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/pi.js +0 -19
- package/dist/formula/functions/pi.js.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/power.js +0 -24
- package/dist/formula/functions/power.js.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/product.js +0 -37
- package/dist/formula/functions/product.js.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/radians.js +0 -26
- package/dist/formula/functions/radians.js.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/rand.js +0 -19
- package/dist/formula/functions/rand.js.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/round.js +0 -34
- package/dist/formula/functions/round.js.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/rounddown.js +0 -34
- package/dist/formula/functions/rounddown.js.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/roundup.js +0 -34
- package/dist/formula/functions/roundup.js.map +0 -1
- package/dist/formula/functions/row.d.ts +0 -14
- package/dist/formula/functions/row.d.ts.map +0 -1
- package/dist/formula/functions/row.js +0 -30
- package/dist/formula/functions/row.js.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/sin.js +0 -26
- package/dist/formula/functions/sin.js.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/sqrt.js +0 -29
- package/dist/formula/functions/sqrt.js.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/sum.js +0 -44
- package/dist/formula/functions/sum.js.map +0 -1
- package/dist/formula/functions/sum.spec.d.ts +0 -2
- package/dist/formula/functions/sum.spec.d.ts.map +0 -1
- package/dist/formula/functions/sum.spec.js +0 -40
- package/dist/formula/functions/sum.spec.js.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/sumif.js +0 -59
- package/dist/formula/functions/sumif.js.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/tan.js +0 -26
- package/dist/formula/functions/tan.js.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/uminus.js +0 -23
- package/dist/formula/functions/uminus.js.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/functions/vlookup.js +0 -74
- package/dist/formula/functions/vlookup.js.map +0 -1
- package/dist/formula/mapping.d.ts +0 -114
- package/dist/formula/mapping.d.ts.map +0 -1
- package/dist/formula/mapping.js +0 -114
- package/dist/formula/mapping.js.map +0 -1
- package/dist/formula/solver.d.ts +0 -12
- package/dist/formula/solver.d.ts.map +0 -1
- package/dist/formula/solver.js +0 -64
- package/dist/formula/solver.js.map +0 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/autofill.d.ts +0 -17
- package/dist/lib/autofill.d.ts.map +0 -1
- package/dist/lib/autofill.js +0 -389
- package/dist/lib/autofill.js.map +0 -1
- package/dist/lib/clipboard.d.ts +0 -3
- package/dist/lib/clipboard.d.ts.map +0 -1
- package/dist/lib/clipboard.js +0 -45
- package/dist/lib/clipboard.js.map +0 -1
- package/dist/lib/converters.d.ts +0 -10
- package/dist/lib/converters.d.ts.map +0 -1
- package/dist/lib/converters.js +0 -127
- package/dist/lib/converters.js.map +0 -1
- package/dist/lib/structs.d.ts +0 -60
- package/dist/lib/structs.d.ts.map +0 -1
- package/dist/lib/structs.js +0 -251
- package/dist/lib/structs.js.map +0 -1
- package/dist/lib/table.d.ts +0 -299
- package/dist/lib/table.d.ts.map +0 -1
- package/dist/lib/table.js +0 -989
- package/dist/lib/table.js.map +0 -1
- package/dist/lib/time.d.ts +0 -14
- package/dist/lib/time.d.ts.map +0 -1
- package/dist/lib/time.js +0 -60
- package/dist/lib/time.js.map +0 -1
- package/dist/lib/virtualization.d.ts +0 -30
- package/dist/lib/virtualization.d.ts.map +0 -1
- package/dist/lib/virtualization.js +0 -114
- package/dist/lib/virtualization.js.map +0 -1
- package/dist/parsers/core.d.ts +0 -36
- package/dist/parsers/core.d.ts.map +0 -1
- package/dist/parsers/core.js +0 -123
- package/dist/parsers/core.js.map +0 -1
- package/dist/renderers/checkbox.d.ts +0 -5
- package/dist/renderers/checkbox.d.ts.map +0 -1
- package/dist/renderers/checkbox.js +0 -10
- package/dist/renderers/checkbox.js.map +0 -1
- package/dist/renderers/core.d.ts +0 -48
- package/dist/renderers/core.d.ts.map +0 -1
- package/dist/renderers/core.js +0 -143
- package/dist/renderers/core.js.map +0 -1
- package/dist/renderers/thousand_separator.d.ts +0 -5
- package/dist/renderers/thousand_separator.d.ts.map +0 -1
- package/dist/renderers/thousand_separator.js +0 -14
- package/dist/renderers/thousand_separator.js.map +0 -1
- package/dist/store/actions.d.ts +0 -198
- package/dist/store/actions.d.ts.map +0 -1
- package/dist/store/actions.js +0 -519
- package/dist/store/actions.js.map +0 -1
- package/dist/store/helpers.d.ts +0 -28
- package/dist/store/helpers.d.ts.map +0 -1
- package/dist/store/helpers.js +0 -78
- package/dist/store/helpers.js.map +0 -1
- package/dist/store/index.d.ts +0 -11
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -3
- package/dist/store/index.js.map +0 -1
- package/dist/styles/embedder.d.ts +0 -2
- package/dist/styles/embedder.d.ts.map +0 -1
- package/dist/styles/embedder.js +0 -16
- package/dist/styles/embedder.js.map +0 -1
- package/dist/styles/minified.d.ts +0 -3
- package/dist/styles/minified.d.ts.map +0 -1
- package/dist/styles/minified.js +0 -4
- package/dist/styles/minified.js.map +0 -1
- package/dist/types.d.ts +0 -213
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -2
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -7
- package/dist/utils.js.map +0 -1
package/dist/formula/mapping.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AddFunction } from "./functions/add";
|
|
2
|
-
import { MinusFunction } from "./functions/minus";
|
|
3
|
-
import { MultiplyFunction } from "./functions/multiply";
|
|
4
|
-
import { DivideFunction } from "./functions/divide";
|
|
5
|
-
import { ModFunction } from "./functions/mod";
|
|
6
|
-
import { SumFunction } from "./functions/sum";
|
|
7
|
-
import { ConcatFunction } from "./functions/concat";
|
|
8
|
-
import { ConcatenateFunction } from "./functions/concatenate";
|
|
9
|
-
import { EqFunction } from "./functions/eq";
|
|
10
|
-
import { NeFunction } from "./functions/ne";
|
|
11
|
-
import { GtFunction } from "./functions/gt";
|
|
12
|
-
import { GteFunction } from "./functions/gte";
|
|
13
|
-
import { LtFunction } from "./functions/lt";
|
|
14
|
-
import { LteFunction } from "./functions/lte";
|
|
15
|
-
import { NowFunction } from "./functions/now";
|
|
16
|
-
import { AndFunction } from "./functions/and";
|
|
17
|
-
import { OrFunction } from "./functions/or";
|
|
18
|
-
import { IfFunction } from "./functions/if";
|
|
19
|
-
import { IfErrorFunction } from "./functions/iferror";
|
|
20
|
-
import { NotFunction } from "./functions/not";
|
|
21
|
-
import { CountFunction } from "./functions/count";
|
|
22
|
-
import { CountifFunction } from "./functions/countif";
|
|
23
|
-
import { SumifFunction } from "./functions/sumif";
|
|
24
|
-
import { VlookupFunction } from "./functions/vlookup";
|
|
25
|
-
import { HlookupFunction } from "./functions/hlookup";
|
|
26
|
-
import { LogFunction } from "./functions/log";
|
|
27
|
-
import { Log10Function } from "./functions/log10";
|
|
28
|
-
import { LnFunction } from "./functions/ln";
|
|
29
|
-
import { AbsFunction } from "./functions/abs";
|
|
30
|
-
import { ProductFunction } from "./functions/product";
|
|
31
|
-
import { RandFunction } from "./functions/rand";
|
|
32
|
-
import { PiFunction } from "./functions/pi";
|
|
33
|
-
import { ExpFunction } from "./functions/exp";
|
|
34
|
-
import { RadiansFunction } from "./functions/radians";
|
|
35
|
-
import { PowerFunction } from "./functions/power";
|
|
36
|
-
import { SqrtFunction } from "./functions/sqrt";
|
|
37
|
-
import { RoundFunction } from "./functions/round";
|
|
38
|
-
import { RoundupFunction } from "./functions/roundup";
|
|
39
|
-
import { RounddownFunction } from "./functions/rounddown";
|
|
40
|
-
import { SinFunction } from "./functions/sin";
|
|
41
|
-
import { CosFunction } from "./functions/cos";
|
|
42
|
-
import { TanFunction } from "./functions/tan";
|
|
43
|
-
import { AsinFunction } from "./functions/asin";
|
|
44
|
-
import { AcosFunction } from "./functions/acos";
|
|
45
|
-
import { AtanFunction } from "./functions/atan";
|
|
46
|
-
import { Atan2Function } from "./functions/atan2";
|
|
47
|
-
import { CountaFunction } from "./functions/counta";
|
|
48
|
-
import { AverageFunction } from "./functions/average";
|
|
49
|
-
import { MaxFunction } from "./functions/max";
|
|
50
|
-
import { MinFunction } from "./functions/min";
|
|
51
|
-
import { LenFunction } from "./functions/len";
|
|
52
|
-
import { LenbFunction } from "./functions/lenb";
|
|
53
|
-
import { UminusFunction } from "./functions/uminus";
|
|
54
|
-
import { RowFunction } from "./functions/row";
|
|
55
|
-
import { ColFunction } from "./functions/col";
|
|
56
|
-
export const functions = {
|
|
57
|
-
abs: AbsFunction,
|
|
58
|
-
add: AddFunction,
|
|
59
|
-
divide: DivideFunction,
|
|
60
|
-
mod: ModFunction,
|
|
61
|
-
minus: MinusFunction,
|
|
62
|
-
uminus: UminusFunction,
|
|
63
|
-
multiply: MultiplyFunction,
|
|
64
|
-
pow: PowerFunction,
|
|
65
|
-
power: PowerFunction,
|
|
66
|
-
sqrt: SqrtFunction,
|
|
67
|
-
sum: SumFunction,
|
|
68
|
-
sumif: SumifFunction,
|
|
69
|
-
max: MaxFunction,
|
|
70
|
-
min: MinFunction,
|
|
71
|
-
average: AverageFunction,
|
|
72
|
-
count: CountFunction,
|
|
73
|
-
counta: CountaFunction,
|
|
74
|
-
countif: CountifFunction,
|
|
75
|
-
product: ProductFunction,
|
|
76
|
-
concat: ConcatFunction,
|
|
77
|
-
concatenate: ConcatenateFunction,
|
|
78
|
-
eq: EqFunction,
|
|
79
|
-
ne: NeFunction,
|
|
80
|
-
gt: GtFunction,
|
|
81
|
-
gte: GteFunction,
|
|
82
|
-
lt: LtFunction,
|
|
83
|
-
lte: LteFunction,
|
|
84
|
-
and: AndFunction,
|
|
85
|
-
or: OrFunction,
|
|
86
|
-
round: RoundFunction,
|
|
87
|
-
rounddown: RounddownFunction,
|
|
88
|
-
roundup: RoundupFunction,
|
|
89
|
-
if: IfFunction,
|
|
90
|
-
iferror: IfErrorFunction,
|
|
91
|
-
not: NotFunction,
|
|
92
|
-
vlookup: VlookupFunction,
|
|
93
|
-
hlookup: HlookupFunction,
|
|
94
|
-
row: RowFunction,
|
|
95
|
-
col: ColFunction,
|
|
96
|
-
now: NowFunction,
|
|
97
|
-
rand: RandFunction,
|
|
98
|
-
log: LogFunction,
|
|
99
|
-
log10: Log10Function,
|
|
100
|
-
ln: LnFunction,
|
|
101
|
-
exp: ExpFunction,
|
|
102
|
-
pi: PiFunction,
|
|
103
|
-
radians: RadiansFunction,
|
|
104
|
-
sin: SinFunction,
|
|
105
|
-
cos: CosFunction,
|
|
106
|
-
tan: TanFunction,
|
|
107
|
-
asin: AsinFunction,
|
|
108
|
-
acos: AcosFunction,
|
|
109
|
-
atan: AtanFunction,
|
|
110
|
-
atan2: Atan2Function,
|
|
111
|
-
len: LenFunction,
|
|
112
|
-
lenb: LenbFunction,
|
|
113
|
-
};
|
|
114
|
-
//# sourceMappingURL=mapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/formula/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,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IACd,GAAG,EAAE,WAAW;IAChB,EAAE,EAAE,UAAU;IACd,OAAO,EAAE,eAAe;IACxB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;CACnB,CAAC"}
|
package/dist/formula/solver.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Table } from "../lib/table";
|
|
2
|
-
import { MatrixType } from "../types";
|
|
3
|
-
export declare const solveFormula: ({ value, table, raise, }: {
|
|
4
|
-
value: any;
|
|
5
|
-
table: Table;
|
|
6
|
-
raise?: boolean | undefined;
|
|
7
|
-
}) => any;
|
|
8
|
-
export declare const solveTable: ({ table, raise, }: {
|
|
9
|
-
table: Table;
|
|
10
|
-
raise?: boolean | undefined;
|
|
11
|
-
}) => MatrixType<any>;
|
|
12
|
-
//# sourceMappingURL=solver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solver.d.ts","sourceRoot":"","sources":["../../src/formula/solver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMtC,eAAO,MAAM,YAAY;WAKhB,GAAG;WACH,KAAK;;SAwBb,CAAC;AAEF,eAAO,MAAM,UAAU;WAId,KAAK;;qBAoCb,CAAC"}
|
package/dist/formula/solver.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Special } from "../constants";
|
|
2
|
-
import { Table } from "../lib/table";
|
|
3
|
-
import { FormulaError, Lexer, Parser } from "./evaluator";
|
|
4
|
-
import { p2a } from "../lib/converters";
|
|
5
|
-
const SOLVING = new Special("solving");
|
|
6
|
-
export const solveFormula = ({ value, table, raise = true, }) => {
|
|
7
|
-
var _a;
|
|
8
|
-
let solved = value;
|
|
9
|
-
if (typeof value === "string") {
|
|
10
|
-
if (value.charAt(0) === "=") {
|
|
11
|
-
try {
|
|
12
|
-
const lexer = new Lexer(value.substring(1));
|
|
13
|
-
lexer.tokenize();
|
|
14
|
-
const parser = new Parser(lexer.tokens);
|
|
15
|
-
const expr = parser.build();
|
|
16
|
-
solved = (_a = expr === null || expr === void 0 ? void 0 : expr.evaluate) === null || _a === void 0 ? void 0 : _a.call(expr, { table });
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
if (raise) {
|
|
20
|
-
throw e;
|
|
21
|
-
}
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (solved instanceof Table) {
|
|
27
|
-
solved = solveTable({ table: solved, raise })[0][0];
|
|
28
|
-
}
|
|
29
|
-
return solved;
|
|
30
|
-
};
|
|
31
|
-
export const solveTable = ({ table, raise = true, }) => {
|
|
32
|
-
const area = table.getArea();
|
|
33
|
-
return table.getMatrixFlatten({ area, evaluates: false }).map((row, i) => {
|
|
34
|
-
const y = area.top + i;
|
|
35
|
-
return row.map((value, j) => {
|
|
36
|
-
const x = area.left + j;
|
|
37
|
-
const address = p2a({ y, x });
|
|
38
|
-
const cache = table.getSolvedCache(address);
|
|
39
|
-
try {
|
|
40
|
-
if (cache === SOLVING) {
|
|
41
|
-
throw new FormulaError("#RFF!", "References are circulating.", new Error(value));
|
|
42
|
-
}
|
|
43
|
-
else if (cache instanceof FormulaError) {
|
|
44
|
-
throw cache;
|
|
45
|
-
}
|
|
46
|
-
else if (cache != null) {
|
|
47
|
-
return cache;
|
|
48
|
-
}
|
|
49
|
-
table.setSolvedCache(address, SOLVING);
|
|
50
|
-
const solved = solveFormula({ value, table, raise });
|
|
51
|
-
table.setSolvedCache(address, solved);
|
|
52
|
-
return solved;
|
|
53
|
-
}
|
|
54
|
-
catch (e) {
|
|
55
|
-
table.setSolvedCache(address, e);
|
|
56
|
-
if (raise) {
|
|
57
|
-
throw e;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=solver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solver.js","sourceRoot":"","sources":["../../src/formula/solver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,KAAK,GAAG,IAAI,GAKb,EAAE,EAAE;;IACH,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YAC3B,IAAI;gBACF,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5C,KAAK,CAAC,QAAQ,EAAE,CAAC;gBACjB,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBACxC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;gBAC5B,MAAM,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,qDAAG,EAAE,KAAK,EAAE,CAAC,CAAC;aACtC;YAAC,OAAO,CAAC,EA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,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACvC,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBACrD,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBACtC,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBACjC,IAAI,KAAK,EAAE;oBACT,MAAM,CAAC,CAAC;iBACT;gBACD,OAAO,IAAI,CAAC;aACb;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { GridSheet } from "./components/GridSheet";
|
|
2
|
-
export { createTableRef } from "./components/Tabular";
|
|
3
|
-
export { Renderer, RendererMixinType } from "./renderers/core";
|
|
4
|
-
export { Parser, ParserMixinType } from "./parsers/core";
|
|
5
|
-
export { oa2aa, aa2oa, generateInitial, generateInitialSimple } from "./lib/structs";
|
|
6
|
-
export { x2c, c2x, y2r, r2y, p2a, a2p } from "./lib/converters";
|
|
7
|
-
export { MatrixType, CellType, FeedbackType, OptionsType, WriterType, CellsByAddressType, CellsByIdType, } from "./types";
|
|
8
|
-
export { ThousandSeparatorRendererMixin } from "./renderers/thousand_separator";
|
|
9
|
-
export { CheckboxRendererMixin } from "./renderers/checkbox";
|
|
10
|
-
export { BaseFunction } from "./formula/functions/__base";
|
|
11
|
-
export { Table } from "./lib/table";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD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E,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/lib/autofill.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AreaType, PointType, StoreType } from "../types";
|
|
3
|
-
import { Table } from "../lib/table";
|
|
4
|
-
export declare class Autofill {
|
|
5
|
-
private readonly src;
|
|
6
|
-
private readonly dst;
|
|
7
|
-
private readonly direction;
|
|
8
|
-
private readonly table;
|
|
9
|
-
constructor(store: StoreType, draggingTo: PointType);
|
|
10
|
-
get applied(): Table;
|
|
11
|
-
get wholeArea(): AreaType;
|
|
12
|
-
getCellStyle(target: PointType): React.CSSProperties;
|
|
13
|
-
private getDestinationArea;
|
|
14
|
-
private suggestDirection;
|
|
15
|
-
private getChangePatterns;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=autofill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autofill.d.ts","sourceRoot":"","sources":["../../src/lib/autofill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAC,QAAQ,EAAgC,SAAS,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAmBrC,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;gBAClB,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS;IAQnD,IAAW,OAAO,IAAI,KAAK,CAmC1B;IAED,IAAW,SAAS,aAEnB;IAEM,YAAY,CAAC,MAAM,EAAE,SAAS;IAmErC,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,gBAAgB;IA+BxB,OAAO,CAAC,iBAAiB;CAyF1B"}
|
package/dist/lib/autofill.js
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
import { isEqual } from 'date-fns';
|
|
2
|
-
import { areaShape, areaToZone, complementSelectingArea, concatAreas, zoneToArea } from "./structs";
|
|
3
|
-
import { p2a } from "./converters";
|
|
4
|
-
import { convertFormulaAbsolute } from "../formula/evaluator";
|
|
5
|
-
import { TimeDelta } from "./time";
|
|
6
|
-
const BORDER_AUTOFILL_DRAGGING = "dashed 1px #000000";
|
|
7
|
-
const DirectionMapping = {
|
|
8
|
-
left: ["horizontal", -1],
|
|
9
|
-
right: ["horizontal", 1],
|
|
10
|
-
up: ["vertical", -1],
|
|
11
|
-
down: ["vertical", 1],
|
|
12
|
-
};
|
|
13
|
-
export class Autofill {
|
|
14
|
-
constructor(store, draggingTo) {
|
|
15
|
-
const { table, choosing, selectingZone } = store;
|
|
16
|
-
this.src = complementSelectingArea(zoneToArea(selectingZone), choosing);
|
|
17
|
-
this.direction = this.suggestDirection(draggingTo);
|
|
18
|
-
this.dst = this.getDestinationArea(draggingTo);
|
|
19
|
-
this.table = table;
|
|
20
|
-
}
|
|
21
|
-
get applied() {
|
|
22
|
-
const [orientation, sign] = DirectionMapping[this.direction];
|
|
23
|
-
const matrix = this.table.getMatrix({ area: this.src, evaluates: false });
|
|
24
|
-
const srcShape = areaShape(Object.assign(Object.assign({}, this.src), { base: 1 }));
|
|
25
|
-
const dstShape = areaShape(Object.assign(Object.assign({}, this.dst), { base: 1 }));
|
|
26
|
-
const diff = {};
|
|
27
|
-
if (orientation === "horizontal") {
|
|
28
|
-
for (let i = 0; i < dstShape.height; i++) {
|
|
29
|
-
const patterns = this.getChangePatterns(matrix[i]);
|
|
30
|
-
for (let j = 0; j < dstShape.width; j++) {
|
|
31
|
-
const baseCell = matrix[i % srcShape.height][j % srcShape.width];
|
|
32
|
-
const x = sign > 0 ? this.dst.left + j : this.dst.right - j;
|
|
33
|
-
const px = sign > 0 ? j % srcShape.width : (srcShape.width - 1 - (j % srcShape.width)) % srcShape.width;
|
|
34
|
-
diff[p2a({ y: this.dst.top + i, x })] = Object.assign(Object.assign({}, baseCell), { value: patterns[px].next().value });
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
for (let i = 0; i < dstShape.width; i++) {
|
|
40
|
-
const patterns = this.getChangePatterns(matrix.map((row) => row[i]));
|
|
41
|
-
for (let j = 0; j < dstShape.height; j++) {
|
|
42
|
-
const baseCell = matrix[i % srcShape.height][j % srcShape.width];
|
|
43
|
-
const y = sign > 0 ? this.dst.top + j : this.dst.bottom - j;
|
|
44
|
-
const py = sign > 0 ? j % srcShape.height : (srcShape.height - 1 - (j % srcShape.height)) % srcShape.height;
|
|
45
|
-
diff[p2a({ y, x: this.dst.left + i })] = Object.assign(Object.assign({}, baseCell), { value: patterns[py].next().value });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const table = this.table.update({
|
|
50
|
-
diff,
|
|
51
|
-
reflection: {
|
|
52
|
-
selectingZone: areaToZone(this.src),
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return table;
|
|
56
|
-
}
|
|
57
|
-
get wholeArea() {
|
|
58
|
-
return concatAreas(this.src, this.dst);
|
|
59
|
-
}
|
|
60
|
-
getCellStyle(target) {
|
|
61
|
-
const { x, y } = target;
|
|
62
|
-
const style = {};
|
|
63
|
-
const { top, left, bottom, right } = this.src;
|
|
64
|
-
switch (this.direction) {
|
|
65
|
-
case "left": {
|
|
66
|
-
if (this.dst.left <= x && x <= this.dst.right) {
|
|
67
|
-
if (top === y) {
|
|
68
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
69
|
-
}
|
|
70
|
-
if (bottom === y - 1) {
|
|
71
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (this.dst.left === x && top <= y && y <= bottom) {
|
|
75
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
76
|
-
}
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
case "right": {
|
|
80
|
-
if (this.dst.left <= x && x <= this.dst.right) {
|
|
81
|
-
if (top === y) {
|
|
82
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
83
|
-
}
|
|
84
|
-
if (bottom === y - 1) {
|
|
85
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (this.dst.right === x - 1 && top <= y && y <= bottom) {
|
|
89
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
90
|
-
}
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
case "up": {
|
|
94
|
-
if (this.dst.top <= y && y <= this.dst.bottom) {
|
|
95
|
-
if (left === x) {
|
|
96
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
97
|
-
}
|
|
98
|
-
if (right === x - 1) {
|
|
99
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (this.dst.top === y && left <= x && x <= right) {
|
|
103
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
case "down": {
|
|
108
|
-
if (this.dst.top <= y && y <= this.dst.bottom) {
|
|
109
|
-
if (left === x) {
|
|
110
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
111
|
-
}
|
|
112
|
-
if (right === x - 1) {
|
|
113
|
-
style.borderLeft = BORDER_AUTOFILL_DRAGGING;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (this.dst.bottom === y - 1 && left <= x && x <= right) {
|
|
117
|
-
style.borderTop = BORDER_AUTOFILL_DRAGGING;
|
|
118
|
-
}
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return style;
|
|
123
|
-
}
|
|
124
|
-
getDestinationArea(autofillDraggingTo) {
|
|
125
|
-
const { x, y } = autofillDraggingTo;
|
|
126
|
-
const { top, left, bottom, right } = this.src;
|
|
127
|
-
switch (this.direction) {
|
|
128
|
-
case "left":
|
|
129
|
-
return { top, bottom, left: x, right: left - 1 };
|
|
130
|
-
case "right":
|
|
131
|
-
return { top, bottom, left: right + 1, right: x };
|
|
132
|
-
case "up":
|
|
133
|
-
return { left, right, top: y, bottom: top - 1 };
|
|
134
|
-
case "down":
|
|
135
|
-
return { left, right, top: bottom + 1, bottom: y };
|
|
136
|
-
}
|
|
137
|
-
return this.src;
|
|
138
|
-
}
|
|
139
|
-
suggestDirection(draggingTo) {
|
|
140
|
-
const { top, left, bottom, right } = this.src;
|
|
141
|
-
let horizontal = 0, vertical = 0;
|
|
142
|
-
if (draggingTo.x < left) {
|
|
143
|
-
horizontal = draggingTo.x - left;
|
|
144
|
-
}
|
|
145
|
-
else if (draggingTo.x > right) {
|
|
146
|
-
horizontal = draggingTo.x - right;
|
|
147
|
-
}
|
|
148
|
-
if (draggingTo.y < top) {
|
|
149
|
-
vertical = draggingTo.y - top;
|
|
150
|
-
}
|
|
151
|
-
else if (draggingTo.y > bottom) {
|
|
152
|
-
vertical = draggingTo.y - bottom;
|
|
153
|
-
}
|
|
154
|
-
// diagonal
|
|
155
|
-
if (Math.abs(horizontal) > 0 && Math.abs(vertical) > 0) {
|
|
156
|
-
if (Math.abs(horizontal) > Math.abs(vertical)) {
|
|
157
|
-
return horizontal < 0 ? "left" : "right";
|
|
158
|
-
}
|
|
159
|
-
return vertical < 0 ? "up" : "down";
|
|
160
|
-
}
|
|
161
|
-
if (horizontal !== 0) {
|
|
162
|
-
return horizontal < 0 ? "left" : "right";
|
|
163
|
-
}
|
|
164
|
-
if (vertical !== 0) {
|
|
165
|
-
return vertical < 0 ? "up" : "down";
|
|
166
|
-
}
|
|
167
|
-
return "down";
|
|
168
|
-
}
|
|
169
|
-
;
|
|
170
|
-
getChangePatterns(cells) {
|
|
171
|
-
const result = [];
|
|
172
|
-
const groups = groupByType(cells);
|
|
173
|
-
const [orientation, sign] = DirectionMapping[this.direction];
|
|
174
|
-
groups.forEach((group) => {
|
|
175
|
-
const lastValue = sign > 0 ? group.last : group.first;
|
|
176
|
-
switch (group.kind) {
|
|
177
|
-
case "other": {
|
|
178
|
-
result.push(pass(group.first));
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
case "formula": {
|
|
182
|
-
const value = group.first;
|
|
183
|
-
const table = this.table;
|
|
184
|
-
function* generateFormula() {
|
|
185
|
-
let slide = 0;
|
|
186
|
-
const skip = cells.length * sign;
|
|
187
|
-
while (true) {
|
|
188
|
-
slide += skip;
|
|
189
|
-
yield convertFormulaAbsolute({
|
|
190
|
-
value,
|
|
191
|
-
table,
|
|
192
|
-
slideY: orientation === "vertical" ? slide : 0,
|
|
193
|
-
slideX: orientation === "horizontal" ? slide : 0,
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
result.push(generateFormula());
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
case "number": {
|
|
201
|
-
if (!group.equidistant) {
|
|
202
|
-
result.push(pass(group.first), ...group.nexts.map((v) => pass(v)));
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
function* generateNumber() {
|
|
206
|
-
let value = lastValue;
|
|
207
|
-
const skip = group.numericDelta * sign;
|
|
208
|
-
while (true) {
|
|
209
|
-
value += skip;
|
|
210
|
-
yield value;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
const g = generateNumber();
|
|
214
|
-
result.push(g, ...group.nexts.map(() => g));
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
case "date": {
|
|
218
|
-
const next = (d) => {
|
|
219
|
-
return sign > 0 ? group.timeDelta.add(d) : group.timeDelta.sub(d);
|
|
220
|
-
};
|
|
221
|
-
if (!group.equidistant) {
|
|
222
|
-
result.push(pass(group.first), ...group.nexts.map((v) => pass(v)));
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
function* generateDate() {
|
|
226
|
-
let value = lastValue;
|
|
227
|
-
while (true) {
|
|
228
|
-
value = next(value);
|
|
229
|
-
yield new Date(value);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
const g = generateDate();
|
|
233
|
-
result.push(g, ...group.nexts.map(() => g));
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
case "string+number": {
|
|
237
|
-
if (!group.equidistant) {
|
|
238
|
-
result.push(pass(group.first), ...group.nexts.map((v) => pass(v)));
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
function* generateStringNumber() {
|
|
242
|
-
const { prefix } = extractStringNumber(group.first);
|
|
243
|
-
const { number: lastNumber } = extractStringNumber(lastValue);
|
|
244
|
-
let value = lastNumber;
|
|
245
|
-
const skip = group.numericDelta * sign;
|
|
246
|
-
while (true) {
|
|
247
|
-
value += skip;
|
|
248
|
-
yield `${prefix}${Math.abs(value)}`;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
const g = generateStringNumber();
|
|
252
|
-
result.push(g, ...group.nexts.map(() => g));
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
return result;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function* pass(value) {
|
|
261
|
-
while (true) {
|
|
262
|
-
yield value;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
const StringNumberPattern = new RegExp('(.+?)(\\d+)$');
|
|
266
|
-
const extractStringNumber = (value) => {
|
|
267
|
-
const match = value.match(StringNumberPattern);
|
|
268
|
-
if (match) {
|
|
269
|
-
const [, prefix, n] = match;
|
|
270
|
-
return { prefix, number: Number(n) };
|
|
271
|
-
}
|
|
272
|
-
return { prefix: "", number: 0 };
|
|
273
|
-
};
|
|
274
|
-
class TypedGroup {
|
|
275
|
-
constructor(value) {
|
|
276
|
-
this.timeDelta = TimeDelta.create();
|
|
277
|
-
this.numericDelta = 0;
|
|
278
|
-
this.equidistant = true;
|
|
279
|
-
this.first = value;
|
|
280
|
-
this.nexts = [];
|
|
281
|
-
this.kind = this.discriminate(value);
|
|
282
|
-
}
|
|
283
|
-
discriminate(value) {
|
|
284
|
-
let kind = value instanceof Date ? "date" : typeof value;
|
|
285
|
-
if (kind === "number" || kind === "date") {
|
|
286
|
-
return kind;
|
|
287
|
-
}
|
|
288
|
-
if (kind === "string" && value[0] === "=") {
|
|
289
|
-
return "formula";
|
|
290
|
-
}
|
|
291
|
-
else if (kind === "string" && value.match(StringNumberPattern)) {
|
|
292
|
-
return "string+number";
|
|
293
|
-
}
|
|
294
|
-
return "other";
|
|
295
|
-
}
|
|
296
|
-
get last() {
|
|
297
|
-
if (this.nexts.length === 0) {
|
|
298
|
-
return this.first;
|
|
299
|
-
}
|
|
300
|
-
return this.nexts[this.nexts.length - 1];
|
|
301
|
-
}
|
|
302
|
-
add(value) {
|
|
303
|
-
const kind = this.discriminate(value);
|
|
304
|
-
if (this.kind !== kind || kind === "other" || kind === "formula") {
|
|
305
|
-
return new TypedGroup(value);
|
|
306
|
-
}
|
|
307
|
-
if (this.nexts.length === 0) {
|
|
308
|
-
switch (kind) {
|
|
309
|
-
case "date": {
|
|
310
|
-
this.timeDelta = new TimeDelta(value, this.first);
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
case "number": {
|
|
314
|
-
this.numericDelta = value - this.first;
|
|
315
|
-
break;
|
|
316
|
-
}
|
|
317
|
-
case "string+number": {
|
|
318
|
-
const { prefix: prefix1, number: number1 } = extractStringNumber(this.first);
|
|
319
|
-
const { prefix: prefix2, number: number2 } = extractStringNumber(value);
|
|
320
|
-
if (prefix1 === prefix2) {
|
|
321
|
-
this.numericDelta = number2 - number1;
|
|
322
|
-
}
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
this.nexts.push(value);
|
|
328
|
-
}
|
|
329
|
-
subdivide() {
|
|
330
|
-
if (this.nexts.length === 0) {
|
|
331
|
-
return [];
|
|
332
|
-
}
|
|
333
|
-
const news = [];
|
|
334
|
-
let lastGroup = this;
|
|
335
|
-
switch (this.kind) {
|
|
336
|
-
case "date": {
|
|
337
|
-
const eq = this.nexts.every((v, i) => i === 0 || isEqual(v, this.timeDelta.add(this.nexts[i - 1])));
|
|
338
|
-
this.equidistant = eq;
|
|
339
|
-
return [];
|
|
340
|
-
}
|
|
341
|
-
case "number": {
|
|
342
|
-
const eq = this.nexts.every((v, i) => i === 0 || v === this.first + this.numericDelta * (i + 1));
|
|
343
|
-
this.equidistant = eq;
|
|
344
|
-
return [];
|
|
345
|
-
}
|
|
346
|
-
case "string+number": {
|
|
347
|
-
let { prefix: basePrefix, number: baseNumber } = extractStringNumber(this.first);
|
|
348
|
-
for (let i = 0; i < lastGroup.nexts.length; i++) {
|
|
349
|
-
const next = lastGroup.nexts[i];
|
|
350
|
-
const { prefix, number } = extractStringNumber(next);
|
|
351
|
-
if (basePrefix !== prefix) {
|
|
352
|
-
const nexts = this.nexts.splice(i, this.nexts.length);
|
|
353
|
-
lastGroup = new TypedGroup(nexts.splice(0, 1)[0]);
|
|
354
|
-
nexts.forEach(lastGroup.add.bind(lastGroup));
|
|
355
|
-
news.push(lastGroup, ...lastGroup.subdivide());
|
|
356
|
-
break;
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
const { number: firstNumber } = extractStringNumber(lastGroup.first);
|
|
360
|
-
if (number !== firstNumber + (i + 1) * lastGroup.numericDelta) {
|
|
361
|
-
lastGroup.equidistant = false;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
break;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
return news;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
function groupByType(cells) {
|
|
372
|
-
var _a, _b;
|
|
373
|
-
let group = new TypedGroup((_a = cells[0]) === null || _a === void 0 ? void 0 : _a.value);
|
|
374
|
-
const groups = [group];
|
|
375
|
-
for (let i = 1; i < cells.length; i++) {
|
|
376
|
-
const value = (_b = cells[i]) === null || _b === void 0 ? void 0 : _b.value;
|
|
377
|
-
const nextGroup = group.add(value);
|
|
378
|
-
if (nextGroup) {
|
|
379
|
-
groups.push(nextGroup);
|
|
380
|
-
group = nextGroup;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
for (let i = groups.length - 1; i >= 0; i--) {
|
|
384
|
-
const group = groups[i];
|
|
385
|
-
groups.splice(i + 1, 0, ...group.subdivide());
|
|
386
|
-
}
|
|
387
|
-
return groups;
|
|
388
|
-
}
|
|
389
|
-
//# sourceMappingURL=autofill.js.map
|