@gridsheet/functions 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/README.md +75 -0
- package/dist/functions/src/index.d.ts +7 -0
- package/dist/functions/src/index.d.ts.map +1 -0
- package/dist/functions/src/information/index.d.ts +4 -0
- package/dist/functions/src/information/index.d.ts.map +1 -0
- package/dist/functions/src/information/isblank.d.ts +9 -0
- package/dist/functions/src/information/isblank.d.ts.map +1 -0
- package/dist/functions/src/information/isblank.spec.d.ts +2 -0
- package/dist/functions/src/information/isblank.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isdate.d.ts +9 -0
- package/dist/functions/src/information/isdate.d.ts.map +1 -0
- package/dist/functions/src/information/isdate.spec.d.ts +2 -0
- package/dist/functions/src/information/isdate.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isemail.d.ts +9 -0
- package/dist/functions/src/information/isemail.d.ts.map +1 -0
- package/dist/functions/src/information/isemail.spec.d.ts +2 -0
- package/dist/functions/src/information/isemail.spec.d.ts.map +1 -0
- package/dist/functions/src/information/iserr.d.ts +9 -0
- package/dist/functions/src/information/iserr.d.ts.map +1 -0
- package/dist/functions/src/information/iserr.spec.d.ts +2 -0
- package/dist/functions/src/information/iserr.spec.d.ts.map +1 -0
- package/dist/functions/src/information/iserror.d.ts +9 -0
- package/dist/functions/src/information/iserror.d.ts.map +1 -0
- package/dist/functions/src/information/iserror.spec.d.ts +2 -0
- package/dist/functions/src/information/iserror.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isformula.d.ts +9 -0
- package/dist/functions/src/information/isformula.d.ts.map +1 -0
- package/dist/functions/src/information/isformula.spec.d.ts +2 -0
- package/dist/functions/src/information/isformula.spec.d.ts.map +1 -0
- package/dist/functions/src/information/islogical.d.ts +9 -0
- package/dist/functions/src/information/islogical.d.ts.map +1 -0
- package/dist/functions/src/information/islogical.spec.d.ts +2 -0
- package/dist/functions/src/information/islogical.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isna.d.ts +9 -0
- package/dist/functions/src/information/isna.d.ts.map +1 -0
- package/dist/functions/src/information/isna.spec.d.ts +2 -0
- package/dist/functions/src/information/isna.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isnontext.d.ts +9 -0
- package/dist/functions/src/information/isnontext.d.ts.map +1 -0
- package/dist/functions/src/information/isnontext.spec.d.ts +2 -0
- package/dist/functions/src/information/isnontext.spec.d.ts.map +1 -0
- package/dist/functions/src/information/isref.d.ts +9 -0
- package/dist/functions/src/information/isref.d.ts.map +1 -0
- package/dist/functions/src/information/isref.spec.d.ts +2 -0
- package/dist/functions/src/information/isref.spec.d.ts.map +1 -0
- package/dist/functions/src/information/istext.d.ts +9 -0
- package/dist/functions/src/information/istext.d.ts.map +1 -0
- package/dist/functions/src/information/istext.spec.d.ts +2 -0
- package/dist/functions/src/information/istext.spec.d.ts.map +1 -0
- package/dist/functions/src/information/n.d.ts +9 -0
- package/dist/functions/src/information/n.d.ts.map +1 -0
- package/dist/functions/src/information/n.spec.d.ts +2 -0
- package/dist/functions/src/information/n.spec.d.ts.map +1 -0
- package/dist/functions/src/information/na.d.ts +9 -0
- package/dist/functions/src/information/na.d.ts.map +1 -0
- package/dist/functions/src/information/na.spec.d.ts +2 -0
- package/dist/functions/src/information/na.spec.d.ts.map +1 -0
- package/dist/functions/src/information/sheets.d.ts +9 -0
- package/dist/functions/src/information/sheets.d.ts.map +1 -0
- package/dist/functions/src/information/sheets.spec.d.ts +2 -0
- package/dist/functions/src/information/sheets.spec.d.ts.map +1 -0
- package/dist/functions/src/logical/ifna.d.ts +10 -0
- package/dist/functions/src/logical/ifna.d.ts.map +1 -0
- package/dist/functions/src/logical/ifs.d.ts +10 -0
- package/dist/functions/src/logical/ifs.d.ts.map +1 -0
- package/dist/functions/src/logical/index.d.ts +4 -0
- package/dist/functions/src/logical/index.d.ts.map +1 -0
- package/dist/functions/src/logical/xor.d.ts +9 -0
- package/dist/functions/src/logical/xor.d.ts.map +1 -0
- package/dist/functions/src/lookup/column.d.ts +12 -0
- package/dist/functions/src/lookup/column.d.ts.map +1 -0
- package/dist/functions/src/lookup/column.spec.d.ts +2 -0
- package/dist/functions/src/lookup/column.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/columns.d.ts +9 -0
- package/dist/functions/src/lookup/columns.d.ts.map +1 -0
- package/dist/functions/src/lookup/columns.spec.d.ts +2 -0
- package/dist/functions/src/lookup/columns.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/hlookup.d.ts +9 -0
- package/dist/functions/src/lookup/hlookup.d.ts.map +1 -0
- package/dist/functions/src/lookup/hlookup.spec.d.ts +2 -0
- package/dist/functions/src/lookup/hlookup.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/index.d.ts +4 -0
- package/dist/functions/src/lookup/index.d.ts.map +1 -0
- package/dist/functions/src/lookup/indexFn.d.ts +10 -0
- package/dist/functions/src/lookup/indexFn.d.ts.map +1 -0
- package/dist/functions/src/lookup/indexFn.spec.d.ts +2 -0
- package/dist/functions/src/lookup/indexFn.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/match.d.ts +10 -0
- package/dist/functions/src/lookup/match.d.ts.map +1 -0
- package/dist/functions/src/lookup/match.spec.d.ts +2 -0
- package/dist/functions/src/lookup/match.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/row.d.ts +12 -0
- package/dist/functions/src/lookup/row.d.ts.map +1 -0
- package/dist/functions/src/lookup/row.spec.d.ts +2 -0
- package/dist/functions/src/lookup/row.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/rows.d.ts +9 -0
- package/dist/functions/src/lookup/rows.d.ts.map +1 -0
- package/dist/functions/src/lookup/rows.spec.d.ts +2 -0
- package/dist/functions/src/lookup/rows.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/sheet.d.ts +9 -0
- package/dist/functions/src/lookup/sheet.d.ts.map +1 -0
- package/dist/functions/src/lookup/sheet.spec.d.ts +2 -0
- package/dist/functions/src/lookup/sheet.spec.d.ts.map +1 -0
- package/dist/functions/src/lookup/vlookup.d.ts +9 -0
- package/dist/functions/src/lookup/vlookup.d.ts.map +1 -0
- package/dist/functions/src/lookup/vlookup.spec.d.ts +2 -0
- package/dist/functions/src/lookup/vlookup.spec.d.ts.map +1 -0
- package/dist/functions/src/math/__matrix_base.d.ts +15 -0
- package/dist/functions/src/math/__matrix_base.d.ts.map +1 -0
- package/dist/functions/src/math/acos.d.ts +9 -0
- package/dist/functions/src/math/acos.d.ts.map +1 -0
- package/dist/functions/src/math/acos.spec.d.ts +2 -0
- package/dist/functions/src/math/acos.spec.d.ts.map +1 -0
- package/dist/functions/src/math/asin.d.ts +9 -0
- package/dist/functions/src/math/asin.d.ts.map +1 -0
- package/dist/functions/src/math/asin.spec.d.ts +2 -0
- package/dist/functions/src/math/asin.spec.d.ts.map +1 -0
- package/dist/functions/src/math/atan.d.ts +9 -0
- package/dist/functions/src/math/atan.d.ts.map +1 -0
- package/dist/functions/src/math/atan.spec.d.ts +2 -0
- package/dist/functions/src/math/atan.spec.d.ts.map +1 -0
- package/dist/functions/src/math/atan2.d.ts +9 -0
- package/dist/functions/src/math/atan2.d.ts.map +1 -0
- package/dist/functions/src/math/atan2.spec.d.ts +2 -0
- package/dist/functions/src/math/atan2.spec.d.ts.map +1 -0
- package/dist/functions/src/math/base.d.ts +10 -0
- package/dist/functions/src/math/base.d.ts.map +1 -0
- package/dist/functions/src/math/base.spec.d.ts +2 -0
- package/dist/functions/src/math/base.spec.d.ts.map +1 -0
- package/dist/functions/src/math/cos.d.ts +9 -0
- package/dist/functions/src/math/cos.d.ts.map +1 -0
- package/dist/functions/src/math/cos.spec.d.ts +2 -0
- package/dist/functions/src/math/cos.spec.d.ts.map +1 -0
- package/dist/functions/src/math/countif.d.ts +9 -0
- package/dist/functions/src/math/countif.d.ts.map +1 -0
- package/dist/functions/src/math/countif.spec.d.ts +2 -0
- package/dist/functions/src/math/countif.spec.d.ts.map +1 -0
- package/dist/functions/src/math/countifs.d.ts +10 -0
- package/dist/functions/src/math/countifs.d.ts.map +1 -0
- package/dist/functions/src/math/countifs.spec.d.ts +2 -0
- package/dist/functions/src/math/countifs.spec.d.ts.map +1 -0
- package/dist/functions/src/math/even.d.ts +9 -0
- package/dist/functions/src/math/even.d.ts.map +1 -0
- package/dist/functions/src/math/even.spec.d.ts +2 -0
- package/dist/functions/src/math/even.spec.d.ts.map +1 -0
- package/dist/functions/src/math/exp.d.ts +10 -0
- package/dist/functions/src/math/exp.d.ts.map +1 -0
- package/dist/functions/src/math/exp.spec.d.ts +2 -0
- package/dist/functions/src/math/exp.spec.d.ts.map +1 -0
- package/dist/functions/src/math/fact.d.ts +9 -0
- package/dist/functions/src/math/fact.d.ts.map +1 -0
- package/dist/functions/src/math/fact.spec.d.ts +2 -0
- package/dist/functions/src/math/fact.spec.d.ts.map +1 -0
- package/dist/functions/src/math/index.d.ts +4 -0
- package/dist/functions/src/math/index.d.ts.map +1 -0
- package/dist/functions/src/math/int.d.ts +9 -0
- package/dist/functions/src/math/int.d.ts.map +1 -0
- package/dist/functions/src/math/int.spec.d.ts +2 -0
- package/dist/functions/src/math/int.spec.d.ts.map +1 -0
- package/dist/functions/src/math/iseven.d.ts +9 -0
- package/dist/functions/src/math/iseven.d.ts.map +1 -0
- package/dist/functions/src/math/iseven.spec.d.ts +2 -0
- package/dist/functions/src/math/iseven.spec.d.ts.map +1 -0
- package/dist/functions/src/math/isodd.d.ts +9 -0
- package/dist/functions/src/math/isodd.d.ts.map +1 -0
- package/dist/functions/src/math/isodd.spec.d.ts +2 -0
- package/dist/functions/src/math/isodd.spec.d.ts.map +1 -0
- package/dist/functions/src/math/lcm.d.ts +10 -0
- package/dist/functions/src/math/lcm.d.ts.map +1 -0
- package/dist/functions/src/math/lcm.spec.d.ts +2 -0
- package/dist/functions/src/math/lcm.spec.d.ts.map +1 -0
- package/dist/functions/src/math/ln.d.ts +9 -0
- package/dist/functions/src/math/ln.d.ts.map +1 -0
- package/dist/functions/src/math/ln.spec.d.ts +2 -0
- package/dist/functions/src/math/ln.spec.d.ts.map +1 -0
- package/dist/functions/src/math/log.d.ts +10 -0
- package/dist/functions/src/math/log.d.ts.map +1 -0
- package/dist/functions/src/math/log.spec.d.ts +2 -0
- package/dist/functions/src/math/log.spec.d.ts.map +1 -0
- package/dist/functions/src/math/log10.d.ts +9 -0
- package/dist/functions/src/math/log10.d.ts.map +1 -0
- package/dist/functions/src/math/log10.spec.d.ts +2 -0
- package/dist/functions/src/math/log10.spec.d.ts.map +1 -0
- package/dist/functions/src/math/mdeterm.d.ts +11 -0
- package/dist/functions/src/math/mdeterm.d.ts.map +1 -0
- package/dist/functions/src/math/minverse.d.ts +12 -0
- package/dist/functions/src/math/minverse.d.ts.map +1 -0
- package/dist/functions/src/math/mmult.d.ts +11 -0
- package/dist/functions/src/math/mmult.d.ts.map +1 -0
- package/dist/functions/src/math/mod.d.ts +10 -0
- package/dist/functions/src/math/mod.d.ts.map +1 -0
- package/dist/functions/src/math/mod.spec.d.ts +2 -0
- package/dist/functions/src/math/mod.spec.d.ts.map +1 -0
- package/dist/functions/src/math/odd.d.ts +9 -0
- package/dist/functions/src/math/odd.d.ts.map +1 -0
- package/dist/functions/src/math/odd.spec.d.ts +2 -0
- package/dist/functions/src/math/odd.spec.d.ts.map +1 -0
- package/dist/functions/src/math/pi.d.ts +9 -0
- package/dist/functions/src/math/pi.d.ts.map +1 -0
- package/dist/functions/src/math/pi.spec.d.ts +2 -0
- package/dist/functions/src/math/pi.spec.d.ts.map +1 -0
- package/dist/functions/src/math/product.d.ts +9 -0
- package/dist/functions/src/math/product.d.ts.map +1 -0
- package/dist/functions/src/math/product.spec.d.ts +2 -0
- package/dist/functions/src/math/product.spec.d.ts.map +1 -0
- package/dist/functions/src/math/radians.d.ts +9 -0
- package/dist/functions/src/math/radians.d.ts.map +1 -0
- package/dist/functions/src/math/radians.spec.d.ts +2 -0
- package/dist/functions/src/math/radians.spec.d.ts.map +1 -0
- package/dist/functions/src/math/rand.d.ts +9 -0
- package/dist/functions/src/math/rand.d.ts.map +1 -0
- package/dist/functions/src/math/rand.spec.d.ts +2 -0
- package/dist/functions/src/math/rand.spec.d.ts.map +1 -0
- package/dist/functions/src/math/round.d.ts +9 -0
- package/dist/functions/src/math/round.d.ts.map +1 -0
- package/dist/functions/src/math/round.spec.d.ts +2 -0
- package/dist/functions/src/math/round.spec.d.ts.map +1 -0
- package/dist/functions/src/math/rounddown.d.ts +9 -0
- package/dist/functions/src/math/rounddown.d.ts.map +1 -0
- package/dist/functions/src/math/rounddown.spec.d.ts +2 -0
- package/dist/functions/src/math/rounddown.spec.d.ts.map +1 -0
- package/dist/functions/src/math/roundup.d.ts +9 -0
- package/dist/functions/src/math/roundup.d.ts.map +1 -0
- package/dist/functions/src/math/roundup.spec.d.ts +2 -0
- package/dist/functions/src/math/roundup.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sequence.d.ts +11 -0
- package/dist/functions/src/math/sequence.d.ts.map +1 -0
- package/dist/functions/src/math/sequence.spec.d.ts +2 -0
- package/dist/functions/src/math/sequence.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sign.d.ts +9 -0
- package/dist/functions/src/math/sign.d.ts.map +1 -0
- package/dist/functions/src/math/sign.spec.d.ts +2 -0
- package/dist/functions/src/math/sign.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sin.d.ts +9 -0
- package/dist/functions/src/math/sin.d.ts.map +1 -0
- package/dist/functions/src/math/sin.spec.d.ts +2 -0
- package/dist/functions/src/math/sin.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sqrt.d.ts +9 -0
- package/dist/functions/src/math/sqrt.d.ts.map +1 -0
- package/dist/functions/src/math/sqrt.spec.d.ts +2 -0
- package/dist/functions/src/math/sqrt.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sumif.d.ts +9 -0
- package/dist/functions/src/math/sumif.d.ts.map +1 -0
- package/dist/functions/src/math/sumifs.d.ts +10 -0
- package/dist/functions/src/math/sumifs.d.ts.map +1 -0
- package/dist/functions/src/math/sumifs.spec.d.ts +2 -0
- package/dist/functions/src/math/sumifs.spec.d.ts.map +1 -0
- package/dist/functions/src/math/sumproduct.d.ts +10 -0
- package/dist/functions/src/math/sumproduct.d.ts.map +1 -0
- package/dist/functions/src/math/sumsq.d.ts +9 -0
- package/dist/functions/src/math/sumsq.d.ts.map +1 -0
- package/dist/functions/src/math/sumsq.spec.d.ts +2 -0
- package/dist/functions/src/math/sumsq.spec.d.ts.map +1 -0
- package/dist/functions/src/math/tan.d.ts +9 -0
- package/dist/functions/src/math/tan.d.ts.map +1 -0
- package/dist/functions/src/math/tan.spec.d.ts +2 -0
- package/dist/functions/src/math/tan.spec.d.ts.map +1 -0
- package/dist/functions/src/math/transpose.d.ts +11 -0
- package/dist/functions/src/math/transpose.d.ts.map +1 -0
- package/dist/functions/src/math/trunc.d.ts +9 -0
- package/dist/functions/src/math/trunc.d.ts.map +1 -0
- package/dist/functions/src/math/trunc.spec.d.ts +2 -0
- package/dist/functions/src/math/trunc.spec.d.ts.map +1 -0
- package/dist/functions/src/math/unaryPercent.d.ts +9 -0
- package/dist/functions/src/math/unaryPercent.d.ts.map +1 -0
- package/dist/functions/src/math/unaryPercent.spec.d.ts +2 -0
- package/dist/functions/src/math/unaryPercent.spec.d.ts.map +1 -0
- package/dist/functions/src/math/uplus.d.ts +9 -0
- package/dist/functions/src/math/uplus.d.ts.map +1 -0
- package/dist/functions/src/math/uplus.spec.d.ts +2 -0
- package/dist/functions/src/math/uplus.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/averageif.d.ts +9 -0
- package/dist/functions/src/statistics/averageif.d.ts.map +1 -0
- package/dist/functions/src/statistics/averageifs.d.ts +10 -0
- package/dist/functions/src/statistics/averageifs.d.ts.map +1 -0
- package/dist/functions/src/statistics/averageifs.spec.d.ts +2 -0
- package/dist/functions/src/statistics/averageifs.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/correl.d.ts +10 -0
- package/dist/functions/src/statistics/correl.d.ts.map +1 -0
- package/dist/functions/src/statistics/correl.spec.d.ts +2 -0
- package/dist/functions/src/statistics/correl.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/covariance_p.d.ts +10 -0
- package/dist/functions/src/statistics/covariance_p.d.ts.map +1 -0
- package/dist/functions/src/statistics/covariance_p.spec.d.ts +2 -0
- package/dist/functions/src/statistics/covariance_p.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/covariance_s.d.ts +10 -0
- package/dist/functions/src/statistics/covariance_s.d.ts.map +1 -0
- package/dist/functions/src/statistics/covariance_s.spec.d.ts +2 -0
- package/dist/functions/src/statistics/covariance_s.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/index.d.ts +4 -0
- package/dist/functions/src/statistics/index.d.ts.map +1 -0
- package/dist/functions/src/statistics/median.d.ts +10 -0
- package/dist/functions/src/statistics/median.d.ts.map +1 -0
- package/dist/functions/src/statistics/median.spec.d.ts +2 -0
- package/dist/functions/src/statistics/median.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/mode_sngl.d.ts +10 -0
- package/dist/functions/src/statistics/mode_sngl.d.ts.map +1 -0
- package/dist/functions/src/statistics/mode_sngl.spec.d.ts +2 -0
- package/dist/functions/src/statistics/mode_sngl.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/percentile_inc.d.ts +10 -0
- package/dist/functions/src/statistics/percentile_inc.d.ts.map +1 -0
- package/dist/functions/src/statistics/percentile_inc.spec.d.ts +2 -0
- package/dist/functions/src/statistics/percentile_inc.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/quartile_inc.d.ts +10 -0
- package/dist/functions/src/statistics/quartile_inc.d.ts.map +1 -0
- package/dist/functions/src/statistics/quartile_inc.spec.d.ts +2 -0
- package/dist/functions/src/statistics/quartile_inc.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/rank_eq.d.ts +10 -0
- package/dist/functions/src/statistics/rank_eq.d.ts.map +1 -0
- package/dist/functions/src/statistics/rank_eq.spec.d.ts +2 -0
- package/dist/functions/src/statistics/rank_eq.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/rsq.d.ts +10 -0
- package/dist/functions/src/statistics/rsq.d.ts.map +1 -0
- package/dist/functions/src/statistics/rsq.spec.d.ts +2 -0
- package/dist/functions/src/statistics/rsq.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/stdev_p.d.ts +10 -0
- package/dist/functions/src/statistics/stdev_p.d.ts.map +1 -0
- package/dist/functions/src/statistics/stdev_p.spec.d.ts +2 -0
- package/dist/functions/src/statistics/stdev_p.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/stdev_s.d.ts +10 -0
- package/dist/functions/src/statistics/stdev_s.d.ts.map +1 -0
- package/dist/functions/src/statistics/stdev_s.spec.d.ts +2 -0
- package/dist/functions/src/statistics/stdev_s.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/t_test.d.ts +10 -0
- package/dist/functions/src/statistics/t_test.d.ts.map +1 -0
- package/dist/functions/src/statistics/t_test.spec.d.ts +2 -0
- package/dist/functions/src/statistics/t_test.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/var_p.d.ts +10 -0
- package/dist/functions/src/statistics/var_p.d.ts.map +1 -0
- package/dist/functions/src/statistics/var_p.spec.d.ts +2 -0
- package/dist/functions/src/statistics/var_p.spec.d.ts.map +1 -0
- package/dist/functions/src/statistics/var_s.d.ts +10 -0
- package/dist/functions/src/statistics/var_s.d.ts.map +1 -0
- package/dist/functions/src/statistics/var_s.spec.d.ts +2 -0
- package/dist/functions/src/statistics/var_s.spec.d.ts.map +1 -0
- package/dist/functions/src/text/char.d.ts +9 -0
- package/dist/functions/src/text/char.d.ts.map +1 -0
- package/dist/functions/src/text/char.spec.d.ts +2 -0
- package/dist/functions/src/text/char.spec.d.ts.map +1 -0
- package/dist/functions/src/text/clean.d.ts +9 -0
- package/dist/functions/src/text/clean.d.ts.map +1 -0
- package/dist/functions/src/text/clean.spec.d.ts +2 -0
- package/dist/functions/src/text/clean.spec.d.ts.map +1 -0
- package/dist/functions/src/text/concatenate.d.ts +9 -0
- package/dist/functions/src/text/concatenate.d.ts.map +1 -0
- package/dist/functions/src/text/concatenate.spec.d.ts +2 -0
- package/dist/functions/src/text/concatenate.spec.d.ts.map +1 -0
- package/dist/functions/src/text/exact.d.ts +9 -0
- package/dist/functions/src/text/exact.d.ts.map +1 -0
- package/dist/functions/src/text/exact.spec.d.ts +2 -0
- package/dist/functions/src/text/exact.spec.d.ts.map +1 -0
- package/dist/functions/src/text/index.d.ts +4 -0
- package/dist/functions/src/text/index.d.ts.map +1 -0
- package/dist/functions/src/text/join.d.ts +10 -0
- package/dist/functions/src/text/join.d.ts.map +1 -0
- package/dist/functions/src/text/join.spec.d.ts +2 -0
- package/dist/functions/src/text/join.spec.d.ts.map +1 -0
- package/dist/functions/src/text/lenb.d.ts +9 -0
- package/dist/functions/src/text/lenb.d.ts.map +1 -0
- package/dist/functions/src/text/lenb.spec.d.ts +2 -0
- package/dist/functions/src/text/lenb.spec.d.ts.map +1 -0
- package/dist/functions/src/text/lower.d.ts +9 -0
- package/dist/functions/src/text/lower.d.ts.map +1 -0
- package/dist/functions/src/text/lower.spec.d.ts +2 -0
- package/dist/functions/src/text/lower.spec.d.ts.map +1 -0
- package/dist/functions/src/text/proper.d.ts +9 -0
- package/dist/functions/src/text/proper.d.ts.map +1 -0
- package/dist/functions/src/text/proper.spec.d.ts +2 -0
- package/dist/functions/src/text/proper.spec.d.ts.map +1 -0
- package/dist/functions/src/text/replace.d.ts +10 -0
- package/dist/functions/src/text/replace.d.ts.map +1 -0
- package/dist/functions/src/text/replace.spec.d.ts +2 -0
- package/dist/functions/src/text/replace.spec.d.ts.map +1 -0
- package/dist/functions/src/text/rept.d.ts +10 -0
- package/dist/functions/src/text/rept.d.ts.map +1 -0
- package/dist/functions/src/text/rept.spec.d.ts +2 -0
- package/dist/functions/src/text/rept.spec.d.ts.map +1 -0
- package/dist/functions/src/text/trim.d.ts +9 -0
- package/dist/functions/src/text/trim.d.ts.map +1 -0
- package/dist/functions/src/text/trim.spec.d.ts +2 -0
- package/dist/functions/src/text/trim.spec.d.ts.map +1 -0
- package/dist/functions/src/text/unichar.d.ts +9 -0
- package/dist/functions/src/text/unichar.d.ts.map +1 -0
- package/dist/functions/src/text/unichar.spec.d.ts +2 -0
- package/dist/functions/src/text/unichar.spec.d.ts.map +1 -0
- package/dist/functions/src/text/unicode.d.ts +9 -0
- package/dist/functions/src/text/unicode.d.ts.map +1 -0
- package/dist/functions/src/text/unicode.spec.d.ts +2 -0
- package/dist/functions/src/text/unicode.spec.d.ts.map +1 -0
- package/dist/functions/src/text/upper.d.ts +9 -0
- package/dist/functions/src/text/upper.d.ts.map +1 -0
- package/dist/functions/src/text/upper.spec.d.ts +2 -0
- package/dist/functions/src/text/upper.spec.d.ts.map +1 -0
- package/dist/functions/src/time/date.d.ts +9 -0
- package/dist/functions/src/time/date.d.ts.map +1 -0
- package/dist/functions/src/time/day.d.ts +9 -0
- package/dist/functions/src/time/day.d.ts.map +1 -0
- package/dist/functions/src/time/days.d.ts +9 -0
- package/dist/functions/src/time/days.d.ts.map +1 -0
- package/dist/functions/src/time/hour.d.ts +9 -0
- package/dist/functions/src/time/hour.d.ts.map +1 -0
- package/dist/functions/src/time/index.d.ts +4 -0
- package/dist/functions/src/time/index.d.ts.map +1 -0
- package/dist/functions/src/time/minute.d.ts +9 -0
- package/dist/functions/src/time/minute.d.ts.map +1 -0
- package/dist/functions/src/time/month.d.ts +9 -0
- package/dist/functions/src/time/month.d.ts.map +1 -0
- package/dist/functions/src/time/second.d.ts +9 -0
- package/dist/functions/src/time/second.d.ts.map +1 -0
- package/dist/functions/src/time/time.d.ts +9 -0
- package/dist/functions/src/time/time.d.ts.map +1 -0
- package/dist/functions/src/time/today.d.ts +9 -0
- package/dist/functions/src/time/today.d.ts.map +1 -0
- package/dist/functions/src/time/workday.d.ts +9 -0
- package/dist/functions/src/time/workday.d.ts.map +1 -0
- package/dist/functions/src/time/year.d.ts +9 -0
- package/dist/functions/src/time/year.d.ts.map +1 -0
- package/dist/functions/src/types.d.ts +2 -0
- package/dist/functions/src/types.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +321 -0
- package/dist/index.js.map +1 -0
- package/dist/lookup/index.d.ts +6 -0
- package/dist/lookup/index.js +360 -0
- package/dist/lookup/index.js.map +1 -0
- package/dist/math/index.d.ts +6 -0
- package/dist/math/index.js +1021 -0
- package/dist/math/index.js.map +1 -0
- package/dist/statistics/index.d.ts +6 -0
- package/dist/statistics/index.js +706 -0
- package/dist/statistics/index.js.map +1 -0
- package/dist/text/index.d.ts +6 -0
- package/dist/text/index.js +258 -0
- package/dist/text/index.js.map +1 -0
- package/dist/time/index.d.ts +6 -0
- package/dist/time/index.js +194 -0
- package/dist/time/index.js.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { BaseFunction as u, FormulaError as i, Sheet as h, ensureNumber as w, stripMatrix as x, matrixShape as y } from "@gridsheet/core";
|
|
2
|
+
const b = "Searches vertically for the specified key in the first column of the range and returns the value of the specified cell in the same row.";
|
|
3
|
+
class T extends u {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this.example = "VLOOKUP(10003, A2:B26, 2, FALSE)", this.description = b, this.defs = [
|
|
6
|
+
{ name: "key", description: "Search key.", acceptedTypes: ["any"] },
|
|
7
|
+
{
|
|
8
|
+
name: "range",
|
|
9
|
+
description: "A range for search",
|
|
10
|
+
takesMatrix: !0,
|
|
11
|
+
acceptedTypes: ["matrix"]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "index",
|
|
15
|
+
description: "The index of the column in the range.",
|
|
16
|
+
acceptedTypes: ["number"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "is_sorted",
|
|
20
|
+
description: "FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.",
|
|
21
|
+
acceptedTypes: ["boolean"],
|
|
22
|
+
optional: !0
|
|
23
|
+
}
|
|
24
|
+
], this.category = "lookup";
|
|
25
|
+
}
|
|
26
|
+
main(e, t, s, n) {
|
|
27
|
+
var o, m, p, f;
|
|
28
|
+
const r = this.toMatrix(t);
|
|
29
|
+
if (n) {
|
|
30
|
+
let a = -1;
|
|
31
|
+
for (let c = 0; c <= t.numRows; c++) {
|
|
32
|
+
const d = (o = r[c]) == null ? void 0 : o[0];
|
|
33
|
+
if (d != null)
|
|
34
|
+
if (d <= e)
|
|
35
|
+
a = c;
|
|
36
|
+
else
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
if (a !== -1)
|
|
40
|
+
return (m = r[a]) == null ? void 0 : m[s - 1];
|
|
41
|
+
} else
|
|
42
|
+
for (let a = 0; a <= t.numRows; a++)
|
|
43
|
+
if (((p = r[a]) == null ? void 0 : p[0]) === e)
|
|
44
|
+
return (f = r[a]) == null ? void 0 : f[s - 1];
|
|
45
|
+
throw new i("#N/A", `No values found for '${e}'.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const A = "Searches horizontally for the specified key in the first row of the range and returns the value of the specified cell in the same column.";
|
|
49
|
+
class k extends u {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments), this.example = "HLOOKUP(10003, A2:Z6, 2, FALSE)", this.description = A, this.defs = [
|
|
52
|
+
{ name: "key", description: "Search key.", acceptedTypes: ["any"] },
|
|
53
|
+
{
|
|
54
|
+
name: "range",
|
|
55
|
+
description: "A range for search",
|
|
56
|
+
takesMatrix: !0,
|
|
57
|
+
acceptedTypes: ["matrix"]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "index",
|
|
61
|
+
description: "The index of the row in the range.",
|
|
62
|
+
acceptedTypes: ["number"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "is_sorted",
|
|
66
|
+
description: "FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.",
|
|
67
|
+
optional: !0,
|
|
68
|
+
acceptedTypes: ["boolean"]
|
|
69
|
+
}
|
|
70
|
+
], this.category = "lookup";
|
|
71
|
+
}
|
|
72
|
+
main(e, t, s, n) {
|
|
73
|
+
var o, m, p, f;
|
|
74
|
+
const r = this.toMatrix(t);
|
|
75
|
+
if (n) {
|
|
76
|
+
let a = -1;
|
|
77
|
+
for (let c = 0; c <= t.numCols; c++) {
|
|
78
|
+
const d = (o = r[0]) == null ? void 0 : o[c];
|
|
79
|
+
if (d != null)
|
|
80
|
+
if (d <= e)
|
|
81
|
+
a = c;
|
|
82
|
+
else
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (a !== -1)
|
|
86
|
+
return (m = r[s - 1]) == null ? void 0 : m[a];
|
|
87
|
+
} else
|
|
88
|
+
for (let a = 0; a <= t.numCols; a++)
|
|
89
|
+
if (((p = r[0]) == null ? void 0 : p[a]) === e)
|
|
90
|
+
return (f = r[s - 1]) == null ? void 0 : f[a];
|
|
91
|
+
throw new i("#N/A", `No values found for '${e}'.`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const M = `Returns a trimmed sheet based on row and column indices.
|
|
95
|
+
If row or column is 0 or omitted, returns all rows or columns.`;
|
|
96
|
+
class N extends u {
|
|
97
|
+
constructor() {
|
|
98
|
+
super(...arguments), this.example = "INDEX(A1:C10, 2, 3)", this.description = M, this.defs = [
|
|
99
|
+
{ name: "range", description: "A range of cells.", takesMatrix: !0, acceptedTypes: ["matrix"] },
|
|
100
|
+
{
|
|
101
|
+
name: "row_num",
|
|
102
|
+
description: "The row number in the range (0 or omitted for all rows).",
|
|
103
|
+
optional: !0,
|
|
104
|
+
acceptedTypes: ["number"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "column_num",
|
|
108
|
+
description: "The column number in the range (0 or omitted for all columns).",
|
|
109
|
+
optional: !0,
|
|
110
|
+
acceptedTypes: ["number"]
|
|
111
|
+
}
|
|
112
|
+
], this.category = "lookup";
|
|
113
|
+
}
|
|
114
|
+
validate(e) {
|
|
115
|
+
if (e.length < 1 || e.length > 3)
|
|
116
|
+
throw new i("#N/A", "Number of arguments for INDEX is incorrect.");
|
|
117
|
+
if (!(e[0] instanceof h))
|
|
118
|
+
throw new i("#VALUE!", "First argument must be a range.");
|
|
119
|
+
if (e.length >= 2 && (e[1] = w(e[1]), e[1] < 0))
|
|
120
|
+
throw new i("#VALUE!", "Row number must be greater than or equal to 0.");
|
|
121
|
+
if (e.length === 3 && (e[2] = w(e[2]), e[2] < 0))
|
|
122
|
+
throw new i("#VALUE!", "Column number must be greater than or equal to 0.");
|
|
123
|
+
return e;
|
|
124
|
+
}
|
|
125
|
+
main(e, t, s) {
|
|
126
|
+
const n = e.area;
|
|
127
|
+
if (t) {
|
|
128
|
+
if (t < 0 || t > e.numRows)
|
|
129
|
+
throw new i("#NUM!", `Row number ${t} is out of range.`);
|
|
130
|
+
n.top = n.bottom = n.top + t - 1;
|
|
131
|
+
}
|
|
132
|
+
if (s) {
|
|
133
|
+
if (s < 0 || s > e.numCols)
|
|
134
|
+
throw new i("#NUM!", `Column number ${s} is out of range.`);
|
|
135
|
+
n.left = n.right = n.left + s - 1;
|
|
136
|
+
}
|
|
137
|
+
return e.trim(n);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const E = `Searches for a value in a sheet and returns its position.
|
|
141
|
+
Returns the position of the matched value (1-based index).`;
|
|
142
|
+
class S extends u {
|
|
143
|
+
constructor() {
|
|
144
|
+
super(...arguments), this.example = 'MATCH("apple", A1:A10, 0)', this.description = E, this.defs = [
|
|
145
|
+
{ name: "search_key", description: "The value to search for.", acceptedTypes: ["any"] },
|
|
146
|
+
{ name: "range", description: "The range to search in.", takesMatrix: !0, acceptedTypes: ["matrix"] },
|
|
147
|
+
{
|
|
148
|
+
name: "search_type",
|
|
149
|
+
description: "0 for exact match, 1 for less than or equal, -1 for greater than or equal.",
|
|
150
|
+
acceptedTypes: ["number"],
|
|
151
|
+
optional: !0
|
|
152
|
+
}
|
|
153
|
+
], this.category = "lookup";
|
|
154
|
+
}
|
|
155
|
+
validate(e) {
|
|
156
|
+
const t = super.validate(e);
|
|
157
|
+
t[0] = x(t[0], this.at);
|
|
158
|
+
const s = this.toMatrix(t[1]), { rows: n, cols: r } = y({ matrix: s });
|
|
159
|
+
if (!(n === 1 && r >= 1 || r === 1 && n >= 1))
|
|
160
|
+
throw new i("#N/A", "Range must be a single row or single column.");
|
|
161
|
+
if (t[1] = s, t.length < 3)
|
|
162
|
+
t[2] = 1;
|
|
163
|
+
else if (![-1, 0, 1].includes(t[2]))
|
|
164
|
+
throw new i("#VALUE!", "Match type must be -1, 0, or 1.");
|
|
165
|
+
return t;
|
|
166
|
+
}
|
|
167
|
+
main(e, t, s = 1) {
|
|
168
|
+
const n = t.reduce((r, o) => r.concat(o), []);
|
|
169
|
+
if (n.length === 0)
|
|
170
|
+
throw new i("#N/A", "range is empty.");
|
|
171
|
+
switch (s) {
|
|
172
|
+
case 0:
|
|
173
|
+
for (let r = 0; r < n.length; r++)
|
|
174
|
+
if (n[r] === e)
|
|
175
|
+
return r + 1;
|
|
176
|
+
throw new i("#N/A", "Value not found in range.");
|
|
177
|
+
case 1: {
|
|
178
|
+
let r = -1;
|
|
179
|
+
for (let o = 0; o < n.length && n[o] <= e; o++)
|
|
180
|
+
r = o;
|
|
181
|
+
if (r === -1)
|
|
182
|
+
throw new i("#N/A", "Value not found in range.");
|
|
183
|
+
return r + 1;
|
|
184
|
+
}
|
|
185
|
+
case -1: {
|
|
186
|
+
let r = -1;
|
|
187
|
+
for (let o = 0; o < n.length && n[o] >= e; o++)
|
|
188
|
+
r = o;
|
|
189
|
+
if (r === -1)
|
|
190
|
+
throw new i("#N/A", "Value not found in range.");
|
|
191
|
+
return r + 1;
|
|
192
|
+
}
|
|
193
|
+
default:
|
|
194
|
+
throw new i("#VALUE!", "Invalid match type.");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const R = "Returns the row number of a specified cell.";
|
|
199
|
+
class F extends u {
|
|
200
|
+
constructor() {
|
|
201
|
+
super(...arguments), this.example = "ROW(A9)", this.description = R, this.defs = [
|
|
202
|
+
{
|
|
203
|
+
name: "cell_reference",
|
|
204
|
+
description: "The cell whose row number will be returned.",
|
|
205
|
+
acceptedTypes: ["reference"],
|
|
206
|
+
optional: !0
|
|
207
|
+
}
|
|
208
|
+
], this.category = "lookup";
|
|
209
|
+
}
|
|
210
|
+
toMatrix(e) {
|
|
211
|
+
if (e instanceof h) {
|
|
212
|
+
const t = e.area, s = [];
|
|
213
|
+
for (let n = t.top; n <= t.bottom; n++) {
|
|
214
|
+
const r = [];
|
|
215
|
+
for (let o = t.left; o <= t.right; o++)
|
|
216
|
+
r.push(e.trim({ top: n, left: o, bottom: n, right: o }));
|
|
217
|
+
s.push(r);
|
|
218
|
+
}
|
|
219
|
+
return s;
|
|
220
|
+
}
|
|
221
|
+
return super.toMatrix(e);
|
|
222
|
+
}
|
|
223
|
+
toScalar(e) {
|
|
224
|
+
if (e instanceof h) {
|
|
225
|
+
const t = e.area;
|
|
226
|
+
return e.trim({ ...t, bottom: t.top });
|
|
227
|
+
}
|
|
228
|
+
return super.toScalar(e);
|
|
229
|
+
}
|
|
230
|
+
validate(e) {
|
|
231
|
+
if (e.length === 0) {
|
|
232
|
+
const t = this.sheet.getPointById(this.at);
|
|
233
|
+
return [(t == null ? void 0 : t.y) ?? 1];
|
|
234
|
+
} else {
|
|
235
|
+
if (e.length === 1)
|
|
236
|
+
return [e[0].top];
|
|
237
|
+
throw new i("#N/A", "Number of arguments for ROW is incorrect.");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
main(e) {
|
|
241
|
+
return e;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const L = "Returns the column number of a specified cell.";
|
|
245
|
+
class g extends u {
|
|
246
|
+
constructor() {
|
|
247
|
+
super(...arguments), this.example = "COLUMN(A9)", this.description = L, this.defs = [
|
|
248
|
+
{
|
|
249
|
+
name: "cell_reference",
|
|
250
|
+
description: "The cell whose column number will be returned.",
|
|
251
|
+
optional: !0,
|
|
252
|
+
acceptedTypes: ["reference"]
|
|
253
|
+
}
|
|
254
|
+
], this.category = "lookup";
|
|
255
|
+
}
|
|
256
|
+
toMatrix(e) {
|
|
257
|
+
if (e instanceof h) {
|
|
258
|
+
const t = e.area, s = [];
|
|
259
|
+
for (let n = t.top; n <= t.bottom; n++) {
|
|
260
|
+
const r = [];
|
|
261
|
+
for (let o = t.left; o <= t.right; o++)
|
|
262
|
+
r.push(e.trim({ top: n, left: o, bottom: n, right: o }));
|
|
263
|
+
s.push(r);
|
|
264
|
+
}
|
|
265
|
+
return s;
|
|
266
|
+
}
|
|
267
|
+
return super.toMatrix(e);
|
|
268
|
+
}
|
|
269
|
+
toScalar(e) {
|
|
270
|
+
if (e instanceof h) {
|
|
271
|
+
const t = e.area;
|
|
272
|
+
return e.trim({ ...t, right: t.left });
|
|
273
|
+
}
|
|
274
|
+
return super.toScalar(e);
|
|
275
|
+
}
|
|
276
|
+
validate(e) {
|
|
277
|
+
if (e.length === 0) {
|
|
278
|
+
const t = this.sheet.getPointById(this.at);
|
|
279
|
+
return [(t == null ? void 0 : t.x) ?? 1];
|
|
280
|
+
} else {
|
|
281
|
+
if (e.length === 1)
|
|
282
|
+
return [e[0].left];
|
|
283
|
+
throw new i("#N/A", "Number of arguments for COLUMN is incorrect.");
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
main(e) {
|
|
287
|
+
return e;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
const U = "Returns the sheet number of the specified sheet or reference.";
|
|
291
|
+
class C extends u {
|
|
292
|
+
constructor() {
|
|
293
|
+
super(...arguments), this.example = "SHEET(Sheet2!A1)", this.description = U, this.defs = [
|
|
294
|
+
{
|
|
295
|
+
name: "value",
|
|
296
|
+
description: "The reference or sheet whose sheet number will be returned. If omitted, returns the sheet number of the current sheet.",
|
|
297
|
+
optional: !0,
|
|
298
|
+
takesMatrix: !0,
|
|
299
|
+
acceptedTypes: ["reference"]
|
|
300
|
+
}
|
|
301
|
+
], this.category = "lookup";
|
|
302
|
+
}
|
|
303
|
+
main(e) {
|
|
304
|
+
if (e == null)
|
|
305
|
+
return this.sheet.id;
|
|
306
|
+
if (e instanceof h)
|
|
307
|
+
return e.id;
|
|
308
|
+
throw new i("#VALUE!", "Invalid argument for SHEET.");
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const O = "Returns the number of columns in a specified array or range.";
|
|
312
|
+
class $ extends u {
|
|
313
|
+
constructor() {
|
|
314
|
+
super(...arguments), this.example = "COLUMNS(A1:D5)", this.description = O, this.defs = [
|
|
315
|
+
{
|
|
316
|
+
name: "range",
|
|
317
|
+
description: "The array or range whose number of columns will be returned.",
|
|
318
|
+
takesMatrix: !0,
|
|
319
|
+
acceptedTypes: ["matrix"]
|
|
320
|
+
}
|
|
321
|
+
], this.category = "lookup";
|
|
322
|
+
}
|
|
323
|
+
main(e) {
|
|
324
|
+
var s;
|
|
325
|
+
return ((s = this.toMatrix(e)[0]) == null ? void 0 : s.length) || 0;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const V = "Returns the number of rows in a specified array or range.";
|
|
329
|
+
class v extends u {
|
|
330
|
+
constructor() {
|
|
331
|
+
super(...arguments), this.example = "ROWS(A1:D5)", this.description = V, this.defs = [
|
|
332
|
+
{
|
|
333
|
+
name: "range",
|
|
334
|
+
description: "The array or range whose number of rows will be returned.",
|
|
335
|
+
takesMatrix: !0,
|
|
336
|
+
acceptedTypes: ["matrix", "reference"]
|
|
337
|
+
}
|
|
338
|
+
], this.category = "lookup";
|
|
339
|
+
}
|
|
340
|
+
main(e) {
|
|
341
|
+
return this.toMatrix(e).length;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
const _ = {
|
|
345
|
+
vlookup: T,
|
|
346
|
+
hlookup: k,
|
|
347
|
+
index: N,
|
|
348
|
+
match: S,
|
|
349
|
+
row: F,
|
|
350
|
+
col: g,
|
|
351
|
+
column: g,
|
|
352
|
+
sheet: C,
|
|
353
|
+
columns: $,
|
|
354
|
+
rows: v
|
|
355
|
+
};
|
|
356
|
+
export {
|
|
357
|
+
_ as default,
|
|
358
|
+
_ as lookupFunctions
|
|
359
|
+
};
|
|
360
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/lookup/vlookup.ts","../../src/lookup/hlookup.ts","../../src/lookup/indexFn.ts","../../src/lookup/match.ts","../../src/lookup/row.ts","../../src/lookup/column.ts","../../src/lookup/sheet.ts","../../src/lookup/columns.ts","../../src/lookup/rows.ts","../../src/lookup/index.ts"],"sourcesContent":["import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Searches vertically for the specified key in the first column of the range and returns the value of the specified cell in the same row.`;\n\nexport class VlookupFunction extends BaseFunction {\n example = 'VLOOKUP(10003, A2:B26, 2, FALSE)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'key', description: 'Search key.', acceptedTypes: ['any'] },\n {\n name: 'range',\n description: 'A range for search',\n takesMatrix: true,\n acceptedTypes: ['matrix'],\n },\n {\n name: 'index',\n description: 'The index of the column in the range.',\n acceptedTypes: ['number'],\n },\n {\n name: 'is_sorted',\n description:\n 'FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.',\n acceptedTypes: ['boolean'],\n optional: true,\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected main(key: any, range: Sheet, index: number, isSorted: boolean) {\n const matrix = this.toMatrix(range);\n if (isSorted) {\n let last = -1;\n for (let y = 0; y <= range.numRows; y++) {\n const v = matrix[y]?.[0];\n if (v == null) {\n continue;\n }\n if (v <= key) {\n last = y;\n } else {\n break;\n }\n }\n if (last !== -1) {\n return matrix[last]?.[index - 1];\n }\n } else {\n for (let y = 0; y <= range.numRows; y++) {\n if (matrix[y]?.[0] === key) {\n return matrix[y]?.[index - 1];\n }\n }\n }\n throw new FormulaError('#N/A', `No values found for '${key}'.`);\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Searches horizontally for the specified key in the first row of the range and returns the value of the specified cell in the same column.`;\n\nexport class HlookupFunction extends BaseFunction {\n example = 'HLOOKUP(10003, A2:Z6, 2, FALSE)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'key', description: 'Search key.', acceptedTypes: ['any'] },\n {\n name: 'range',\n description: 'A range for search',\n takesMatrix: true,\n acceptedTypes: ['matrix'],\n },\n {\n name: 'index',\n description: 'The index of the row in the range.',\n acceptedTypes: ['number'],\n },\n {\n name: 'is_sorted',\n description:\n 'FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.',\n optional: true,\n acceptedTypes: ['boolean'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected main(key: any, range: Sheet, index: number, isSorted: boolean) {\n const matrix = this.toMatrix(range);\n if (isSorted) {\n let last = -1;\n for (let x = 0; x <= range.numCols; x++) {\n const v = matrix[0]?.[x];\n if (v == null) {\n continue;\n }\n if (v <= key) {\n last = x;\n } else {\n break;\n }\n }\n if (last !== -1) {\n return matrix[index - 1]?.[last];\n }\n } else {\n for (let x = 0; x <= range.numCols; x++) {\n if (matrix[0]?.[x] === key) {\n return matrix[index - 1]?.[x];\n }\n }\n }\n throw new FormulaError('#N/A', `No values found for '${key}'.`);\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet, ensureNumber } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns a trimmed sheet based on row and column indices.\nIf row or column is 0 or omitted, returns all rows or columns.`;\n\nexport class IndexFunction extends BaseFunction {\n example = 'INDEX(A1:C10, 2, 3)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'range', description: 'A range of cells.', takesMatrix: true, acceptedTypes: ['matrix'] },\n {\n name: 'row_num',\n description: 'The row number in the range (0 or omitted for all rows).',\n optional: true,\n acceptedTypes: ['number'],\n },\n {\n name: 'column_num',\n description: 'The column number in the range (0 or omitted for all columns).',\n optional: true,\n acceptedTypes: ['number'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected validate(args: any[]): any[] {\n if (args.length < 1 || args.length > 3) {\n throw new FormulaError('#N/A', 'Number of arguments for INDEX is incorrect.');\n }\n\n if (!(args[0] instanceof Sheet)) {\n throw new FormulaError('#VALUE!', 'First argument must be a range.');\n }\n\n if (args.length >= 2) {\n args[1] = ensureNumber(args[1]);\n if (args[1] < 0) {\n throw new FormulaError('#VALUE!', 'Row number must be greater than or equal to 0.');\n }\n }\n\n if (args.length === 3) {\n args[2] = ensureNumber(args[2]);\n if (args[2] < 0) {\n throw new FormulaError('#VALUE!', 'Column number must be greater than or equal to 0.');\n }\n }\n return args;\n }\n\n protected main(sheet: Sheet, y?: number, x?: number) {\n const area = sheet.area;\n if (y) {\n if (y < 0 || y > sheet.numRows) {\n throw new FormulaError('#NUM!', `Row number ${y} is out of range.`);\n }\n area.top = area.bottom = area.top + y - 1;\n }\n if (x) {\n if (x < 0 || x > sheet.numCols) {\n throw new FormulaError('#NUM!', `Column number ${x} is out of range.`);\n }\n area.left = area.right = area.left + x - 1;\n }\n return sheet.trim(area);\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { stripMatrix, matrixShape } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Searches for a value in a sheet and returns its position.\nReturns the position of the matched value (1-based index).`;\n\nexport class MatchFunction extends BaseFunction {\n example = 'MATCH(\"apple\", A1:A10, 0)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'search_key', description: 'The value to search for.', acceptedTypes: ['any'] },\n { name: 'range', description: 'The range to search in.', takesMatrix: true, acceptedTypes: ['matrix'] },\n {\n name: 'search_type',\n description: '0 for exact match, 1 for less than or equal, -1 for greater than or equal.',\n acceptedTypes: ['number'],\n optional: true,\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected validate(args: any[]): any[] {\n const validated = super.validate(args);\n\n validated[0] = stripMatrix(validated[0], this.at);\n\n const matrix = this.toMatrix(validated[1]);\n const { rows, cols } = matrixShape({ matrix });\n if (!((rows === 1 && cols >= 1) || (cols === 1 && rows >= 1))) {\n throw new FormulaError('#N/A', 'Range must be a single row or single column.');\n }\n validated[1] = matrix;\n\n if (validated.length < 3) {\n validated[2] = 1;\n } else if (![-1, 0, 1].includes(validated[2])) {\n throw new FormulaError('#VALUE!', 'Match type must be -1, 0, or 1.');\n }\n\n return validated;\n }\n\n protected main(searchKey: any, range: any[][], searchType: number = 1) {\n const array = range.reduce((acc: any[], row: any[]) => acc.concat(row), []);\n\n if (array.length === 0) {\n throw new FormulaError('#N/A', 'range is empty.');\n }\n\n switch (searchType) {\n case 0: // Exact match\n for (let i = 0; i < array.length; i++) {\n if (array[i] === searchKey) {\n return i + 1; // 1-based index\n }\n }\n throw new FormulaError('#N/A', 'Value not found in range.');\n\n case 1: {\n // Less than or equal (data must be sorted ascending)\n let lastMatch = -1;\n for (let i = 0; i < array.length; i++) {\n if (array[i] <= searchKey) {\n lastMatch = i;\n } else {\n break;\n }\n }\n if (lastMatch === -1) {\n throw new FormulaError('#N/A', 'Value not found in range.');\n }\n return lastMatch + 1;\n }\n\n case -1: {\n // Greater than or equal (data must be sorted descending)\n let lastMatch = -1;\n for (let i = 0; i < array.length; i++) {\n if (array[i] >= searchKey) {\n lastMatch = i;\n } else {\n break;\n }\n }\n if (lastMatch === -1) {\n throw new FormulaError('#N/A', 'Value not found in range.');\n }\n return lastMatch + 1;\n }\n\n default:\n throw new FormulaError('#VALUE!', 'Invalid match type.');\n }\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns the row number of a specified cell.`;\n\nexport class RowFunction extends BaseFunction {\n example = 'ROW(A9)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'cell_reference',\n description: 'The cell whose row number will be returned.',\n acceptedTypes: ['reference'],\n optional: true,\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected toMatrix(value: any): any[][] {\n if (value instanceof Sheet) {\n const area = value.area;\n const result: any[][] = [];\n for (let r = area.top; r <= area.bottom; r++) {\n const row: any[] = [];\n for (let c = area.left; c <= area.right; c++) {\n row.push(value.trim({ top: r, left: c, bottom: r, right: c }));\n }\n result.push(row);\n }\n return result;\n }\n return super.toMatrix(value);\n }\n\n protected toScalar(value: any): any {\n if (value instanceof Sheet) {\n const area = value.area;\n return value.trim({ ...area, bottom: area.top });\n }\n return super.toScalar(value);\n }\n\n protected validate(args: any[]): any[] {\n if (args.length === 0) {\n const point = this.sheet.getPointById(this.at);\n return [point?.y ?? 1];\n } else if (args.length === 1) {\n const sheet = args[0] as Sheet;\n return [sheet.top];\n } else {\n throw new FormulaError('#N/A', 'Number of arguments for ROW is incorrect.');\n }\n }\n\n protected main(top: number) {\n return top;\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns the column number of a specified cell.`;\n\nexport class ColumnFunction extends BaseFunction {\n example = 'COLUMN(A9)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'cell_reference',\n description: 'The cell whose column number will be returned.',\n optional: true,\n acceptedTypes: ['reference'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected toMatrix(value: any): any[][] {\n if (value instanceof Sheet) {\n const area = value.area;\n const result: any[][] = [];\n for (let r = area.top; r <= area.bottom; r++) {\n const row: any[] = [];\n for (let c = area.left; c <= area.right; c++) {\n row.push(value.trim({ top: r, left: c, bottom: r, right: c }));\n }\n result.push(row);\n }\n return result;\n }\n return super.toMatrix(value);\n }\n\n protected toScalar(value: any): any {\n if (value instanceof Sheet) {\n const area = value.area;\n return value.trim({ ...area, right: area.left });\n }\n return super.toScalar(value);\n }\n\n protected validate(args: any[]): any[] {\n if (args.length === 0) {\n const point = this.sheet.getPointById(this.at);\n return [point?.x ?? 1];\n } else if (args.length === 1) {\n const sheet = args[0] as Sheet;\n return [sheet.left];\n } else {\n throw new FormulaError('#N/A', 'Number of arguments for COLUMN is incorrect.');\n }\n }\n\n protected main(left: number) {\n return left;\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns the sheet number of the specified sheet or reference.`;\n\nexport class SheetFunction extends BaseFunction {\n example = 'SHEET(Sheet2!A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description:\n 'The reference or sheet whose sheet number will be returned. If omitted, returns the sheet number of the current sheet.',\n optional: true,\n takesMatrix: true,\n acceptedTypes: ['reference'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected main(ref?: Sheet | any) {\n if (ref == null) {\n return this.sheet.id;\n }\n\n if (ref instanceof Sheet) {\n return ref.id;\n }\n\n throw new FormulaError('#VALUE!', 'Invalid argument for SHEET.');\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns the number of columns in a specified array or range.`;\n\nexport class ColumnsFunction extends BaseFunction {\n example = 'COLUMNS(A1:D5)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'range',\n description: 'The array or range whose number of columns will be returned.',\n takesMatrix: true,\n acceptedTypes: ['matrix'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected main(value: any) {\n const matrix = this.toMatrix(value);\n return matrix[0]?.length || 0;\n }\n}\n","import { FormulaError } from '@gridsheet/core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/core';\nimport { Sheet } from '@gridsheet/core';\nimport type { FunctionCategory } from '@gridsheet/core';\n\nconst description = `Returns the number of rows in a specified array or range.`;\n\nexport class RowsFunction extends BaseFunction {\n example = 'ROWS(A1:D5)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'range',\n description: 'The array or range whose number of rows will be returned.',\n takesMatrix: true,\n acceptedTypes: ['matrix', 'reference'],\n },\n ];\n category: FunctionCategory = 'lookup';\n\n protected main(value: any) {\n const matrix = this.toMatrix(value);\n return matrix.length;\n }\n}\n","import type { FunctionMapping } from '@gridsheet/core';\nimport { VlookupFunction } from './vlookup';\nimport { HlookupFunction } from './hlookup';\nimport { IndexFunction } from './indexFn';\nimport { MatchFunction } from './match';\nimport { RowFunction } from './row';\nimport { ColumnFunction } from './column';\nimport { SheetFunction } from './sheet';\nimport { ColumnsFunction } from './columns';\nimport { RowsFunction } from './rows';\n\nexport const lookupFunctions: FunctionMapping = {\n vlookup: VlookupFunction,\n hlookup: HlookupFunction,\n index: IndexFunction,\n match: MatchFunction,\n row: RowFunction,\n col: ColumnFunction,\n column: ColumnFunction,\n sheet: SheetFunction,\n columns: ColumnsFunction,\n rows: RowsFunction,\n};\n\nexport default lookupFunctions;\n"],"names":["description","VlookupFunction","BaseFunction","key","range","index","isSorted","matrix","last","y","v","_a","_b","_c","_d","FormulaError","HlookupFunction","x","IndexFunction","args","Sheet","ensureNumber","sheet","area","MatchFunction","validated","stripMatrix","rows","cols","matrixShape","searchKey","searchType","array","acc","row","i","lastMatch","RowFunction","value","result","r","c","point","top","ColumnFunction","left","SheetFunction","ref","ColumnsFunction","RowsFunction","lookupFunctions"],"mappings":";AAKA,MAAMA,IAAc;AAEb,MAAMC,UAAwBC,EAAa;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA,GACK,KAAA,UAAA,oCACI,KAAA,cAAAF,GACuB,KAAA,OAAA;AAAA,MACnC,EAAE,MAAM,OAAO,aAAa,eAAe,eAAe,CAAC,KAAK,EAAE;AAAA,MAClE;AAAA,QACE,MAAM;AAAA,QACN,aAAa;AAAA,QACb,aAAa;AAAA,QACb,eAAe,CAAC,QAAQ;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,aAAa;AAAA,QACb,eAAe,CAAC,QAAQ;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,aACE;AAAA,QACF,eAAe,CAAC,SAAS;AAAA,QACzB,UAAU;AAAA,MAAA;AAAA,IAEd,GAC6B,KAAA,WAAA;AAAA,EAAA;AAAA,EAEnB,KAAKG,GAAUC,GAAcC,GAAeC,GAAmB;;AACjE,UAAAC,IAAS,KAAK,SAASH,CAAK;AAClC,QAAIE,GAAU;AACZ,UAAIE,IAAO;AACX,eAASC,IAAI,GAAGA,KAAKL,EAAM,SAASK,KAAK;AACvC,cAAMC,KAAIC,IAAAJ,EAAOE,CAAC,MAAR,gBAAAE,EAAY;AACtB,YAAID,KAAK;AAGT,cAAIA,KAAKP;AACA,YAAAK,IAAAC;AAAA;AAEP;AAAA,MACF;AAEF,UAAID,MAAS;AACX,gBAAOI,IAAAL,EAAOC,CAAI,MAAX,g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