@trebco/treb 37.0.0 → 37.1.0
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/build/package.json +119 -0
- package/build/treb-base-types/src/api_types.d.ts +11 -0
- package/build/treb-base-types/src/api_types.js +22 -0
- package/build/treb-base-types/src/api_types.js.map +1 -0
- package/build/treb-base-types/src/area-utils.d.ts +9 -0
- package/build/treb-base-types/src/area-utils.js +50 -0
- package/build/treb-base-types/src/area-utils.js.map +1 -0
- package/build/treb-base-types/src/area.d.ts +182 -0
- package/build/treb-base-types/src/area.js +715 -0
- package/build/treb-base-types/src/area.js.map +1 -0
- package/build/treb-base-types/src/basic_types.d.ts +20 -0
- package/build/treb-base-types/src/basic_types.js +22 -0
- package/build/treb-base-types/src/basic_types.js.map +1 -0
- package/build/treb-base-types/src/cell.d.ts +167 -0
- package/build/treb-base-types/src/cell.js +432 -0
- package/build/treb-base-types/src/cell.js.map +1 -0
- package/build/treb-base-types/src/cells.d.ts +251 -0
- package/build/treb-base-types/src/cells.js +1136 -0
- package/build/treb-base-types/src/cells.js.map +1 -0
- package/build/treb-base-types/src/color.d.ts +35 -0
- package/build/treb-base-types/src/color.js +162 -0
- package/build/treb-base-types/src/color.js.map +1 -0
- package/build/treb-base-types/src/dom-utilities.d.ts +70 -0
- package/build/treb-base-types/src/dom-utilities.js +144 -0
- package/build/treb-base-types/src/dom-utilities.js.map +1 -0
- package/build/treb-base-types/src/evaluate-options.d.ts +35 -0
- package/build/treb-base-types/src/evaluate-options.js +22 -0
- package/build/treb-base-types/src/evaluate-options.js.map +1 -0
- package/build/treb-base-types/src/font-stack.d.ts +37 -0
- package/build/treb-base-types/src/font-stack.js +93 -0
- package/build/treb-base-types/src/font-stack.js.map +1 -0
- package/build/treb-base-types/src/gradient.d.ts +18 -0
- package/build/treb-base-types/src/gradient.js +86 -0
- package/build/treb-base-types/src/gradient.js.map +1 -0
- package/build/treb-base-types/src/import.d.ts +48 -0
- package/build/treb-base-types/src/import.js +22 -0
- package/build/treb-base-types/src/import.js.map +1 -0
- package/build/treb-base-types/src/index-standalone.d.ts +6 -0
- package/build/treb-base-types/src/index-standalone.js +27 -0
- package/build/treb-base-types/src/index-standalone.js.map +1 -0
- package/build/treb-base-types/src/index.d.ts +22 -0
- package/build/treb-base-types/src/index.js +45 -0
- package/build/treb-base-types/src/index.js.map +1 -0
- package/build/treb-base-types/src/layout.d.ts +22 -0
- package/build/treb-base-types/src/layout.js +22 -0
- package/build/treb-base-types/src/layout.js.map +1 -0
- package/build/treb-base-types/src/localization.d.ts +37 -0
- package/build/treb-base-types/src/localization.js +157 -0
- package/build/treb-base-types/src/localization.js.map +1 -0
- package/build/treb-base-types/src/rectangle.d.ts +51 -0
- package/build/treb-base-types/src/rectangle.js +123 -0
- package/build/treb-base-types/src/rectangle.js.map +1 -0
- package/build/treb-base-types/src/render_text.d.ts +34 -0
- package/build/treb-base-types/src/render_text.js +22 -0
- package/build/treb-base-types/src/render_text.js.map +1 -0
- package/build/treb-base-types/src/style.d.ts +214 -0
- package/build/treb-base-types/src/style.js +373 -0
- package/build/treb-base-types/src/style.js.map +1 -0
- package/build/treb-base-types/src/table.d.ts +58 -0
- package/build/treb-base-types/src/table.js +27 -0
- package/build/treb-base-types/src/table.js.map +1 -0
- package/build/treb-base-types/src/text_part.d.ts +26 -0
- package/build/treb-base-types/src/text_part.js +47 -0
- package/build/treb-base-types/src/text_part.js.map +1 -0
- package/build/treb-base-types/src/theme.d.ts +120 -0
- package/build/treb-base-types/src/theme.js +460 -0
- package/build/treb-base-types/src/theme.js.map +1 -0
- package/build/treb-base-types/src/union.d.ts +73 -0
- package/build/treb-base-types/src/union.js +61 -0
- package/build/treb-base-types/src/union.js.map +1 -0
- package/build/treb-base-types/src/value-type.d.ts +86 -0
- package/build/treb-base-types/src/value-type.js +168 -0
- package/build/treb-base-types/src/value-type.js.map +1 -0
- package/build/treb-base-types/src/worker-proxy.d.ts +95 -0
- package/build/treb-base-types/src/worker-proxy.js +221 -0
- package/build/treb-base-types/src/worker-proxy.js.map +1 -0
- package/build/treb-calculator/src/calculator.d.ts +249 -0
- package/build/treb-calculator/src/calculator.js +2755 -0
- package/build/treb-calculator/src/calculator.js.map +1 -0
- package/build/treb-calculator/src/complex-math.d.ts +75 -0
- package/build/treb-calculator/src/complex-math.js +559 -0
- package/build/treb-calculator/src/complex-math.js.map +1 -0
- package/build/treb-calculator/src/dag/array-vertex.d.ts +71 -0
- package/build/treb-calculator/src/dag/array-vertex.js +156 -0
- package/build/treb-calculator/src/dag/array-vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.d.ts +48 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.js +84 -0
- package/build/treb-calculator/src/dag/calculation_leaf_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/graph.d.ts +134 -0
- package/build/treb-calculator/src/dag/graph.js +842 -0
- package/build/treb-calculator/src/dag/graph.js.map +1 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.d.ts +58 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.js +232 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.d.ts +20 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js +25 -0
- package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js.map +1 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.d.ts +43 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.js +81 -0
- package/build/treb-calculator/src/dag/state_leaf_vertex.js.map +1 -0
- package/build/treb-calculator/src/dag/vertex.d.ts +71 -0
- package/build/treb-calculator/src/dag/vertex.js +274 -0
- package/build/treb-calculator/src/dag/vertex.js.map +1 -0
- package/build/treb-calculator/src/descriptors.d.ts +189 -0
- package/build/treb-calculator/src/descriptors.js +22 -0
- package/build/treb-calculator/src/descriptors.js.map +1 -0
- package/build/treb-calculator/src/expression-calculator.d.ts +127 -0
- package/build/treb-calculator/src/expression-calculator.js +1033 -0
- package/build/treb-calculator/src/expression-calculator.js.map +1 -0
- package/build/treb-calculator/src/function-error.d.ts +35 -0
- package/build/treb-calculator/src/function-error.js +85 -0
- package/build/treb-calculator/src/function-error.js.map +1 -0
- package/build/treb-calculator/src/function-library.d.ts +22 -0
- package/build/treb-calculator/src/function-library.js +96 -0
- package/build/treb-calculator/src/function-library.js.map +1 -0
- package/build/treb-calculator/src/functions/base-functions.d.ts +7 -0
- package/build/treb-calculator/src/functions/base-functions.js +2611 -0
- package/build/treb-calculator/src/functions/base-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/beta.d.ts +17 -0
- package/build/treb-calculator/src/functions/beta.js +201 -0
- package/build/treb-calculator/src/functions/beta.js.map +1 -0
- package/build/treb-calculator/src/functions/checkbox.d.ts +3 -0
- package/build/treb-calculator/src/functions/checkbox.js +128 -0
- package/build/treb-calculator/src/functions/checkbox.js.map +1 -0
- package/build/treb-calculator/src/functions/complex-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/complex-functions.js +217 -0
- package/build/treb-calculator/src/functions/complex-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/date-utils.d.ts +3 -0
- package/build/treb-calculator/src/functions/date-utils.js +59 -0
- package/build/treb-calculator/src/functions/date-utils.js.map +1 -0
- package/build/treb-calculator/src/functions/finance-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/finance-functions.js +547 -0
- package/build/treb-calculator/src/functions/finance-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/fp.d.ts +2 -0
- package/build/treb-calculator/src/functions/fp.js +463 -0
- package/build/treb-calculator/src/functions/fp.js.map +1 -0
- package/build/treb-calculator/src/functions/function-utilities.d.ts +2 -0
- package/build/treb-calculator/src/functions/function-utilities.js +36 -0
- package/build/treb-calculator/src/functions/function-utilities.js.map +1 -0
- package/build/treb-calculator/src/functions/gamma.d.ts +20 -0
- package/build/treb-calculator/src/functions/gamma.js +142 -0
- package/build/treb-calculator/src/functions/gamma.js.map +1 -0
- package/build/treb-calculator/src/functions/information-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/information-functions.js +71 -0
- package/build/treb-calculator/src/functions/information-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/lambda-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/lambda-functions.js +85 -0
- package/build/treb-calculator/src/functions/lambda-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/matrix-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/matrix-functions.js +144 -0
- package/build/treb-calculator/src/functions/matrix-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/normal.d.ts +2 -0
- package/build/treb-calculator/src/functions/normal.js +32 -0
- package/build/treb-calculator/src/functions/normal.js.map +1 -0
- package/build/treb-calculator/src/functions/regex-functions.d.ts +2 -0
- package/build/treb-calculator/src/functions/regex-functions.js +188 -0
- package/build/treb-calculator/src/functions/regex-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/sparkline.d.ts +37 -0
- package/build/treb-calculator/src/functions/sparkline.js +264 -0
- package/build/treb-calculator/src/functions/sparkline.js.map +1 -0
- package/build/treb-calculator/src/functions/statistics-functions.d.ts +6 -0
- package/build/treb-calculator/src/functions/statistics-functions.js +989 -0
- package/build/treb-calculator/src/functions/statistics-functions.js.map +1 -0
- package/build/treb-calculator/src/functions/students-t.d.ts +3 -0
- package/build/treb-calculator/src/functions/students-t.js +64 -0
- package/build/treb-calculator/src/functions/students-t.js.map +1 -0
- package/build/treb-calculator/src/functions/text-functions.d.ts +3 -0
- package/build/treb-calculator/src/functions/text-functions.js +320 -0
- package/build/treb-calculator/src/functions/text-functions.js.map +1 -0
- package/build/treb-calculator/src/index.d.ts +2 -0
- package/build/treb-calculator/src/index.js +22 -0
- package/build/treb-calculator/src/index.js.map +1 -0
- package/build/treb-calculator/src/notifier-types.d.ts +26 -0
- package/build/treb-calculator/src/notifier-types.js +22 -0
- package/build/treb-calculator/src/notifier-types.js.map +1 -0
- package/build/treb-calculator/src/primitives.d.ts +15 -0
- package/build/treb-calculator/src/primitives.js +398 -0
- package/build/treb-calculator/src/primitives.js.map +1 -0
- package/build/treb-calculator/src/utilities.d.ts +68 -0
- package/build/treb-calculator/src/utilities.js +324 -0
- package/build/treb-calculator/src/utilities.js.map +1 -0
- package/build/treb-charts/src/chart-functions.d.ts +8 -0
- package/build/treb-charts/src/chart-functions.js +209 -0
- package/build/treb-charts/src/chart-functions.js.map +1 -0
- package/build/treb-charts/src/chart-types.d.ts +233 -0
- package/build/treb-charts/src/chart-types.js +57 -0
- package/build/treb-charts/src/chart-types.js.map +1 -0
- package/build/treb-charts/src/chart-utils.d.ts +106 -0
- package/build/treb-charts/src/chart-utils.js +1060 -0
- package/build/treb-charts/src/chart-utils.js.map +1 -0
- package/build/treb-charts/src/chart.d.ts +23 -0
- package/build/treb-charts/src/chart.js +94 -0
- package/build/treb-charts/src/chart.js.map +1 -0
- package/build/treb-charts/src/default-chart-renderer.d.ts +16 -0
- package/build/treb-charts/src/default-chart-renderer.js +533 -0
- package/build/treb-charts/src/default-chart-renderer.js.map +1 -0
- package/build/treb-charts/src/index.d.ts +5 -0
- package/build/treb-charts/src/index.js +24 -0
- package/build/treb-charts/src/index.js.map +1 -0
- package/build/treb-charts/src/main.d.ts +1 -0
- package/build/treb-charts/src/main.js +34 -0
- package/build/treb-charts/src/main.js.map +1 -0
- package/build/treb-charts/src/quicksort.d.ts +1 -0
- package/build/treb-charts/src/quicksort.js +49 -0
- package/build/treb-charts/src/quicksort.js.map +1 -0
- package/build/treb-charts/src/rectangle.d.ts +18 -0
- package/build/treb-charts/src/rectangle.js +41 -0
- package/build/treb-charts/src/rectangle.js.map +1 -0
- package/build/treb-charts/src/renderer-type.d.ts +24 -0
- package/build/treb-charts/src/renderer-type.js +22 -0
- package/build/treb-charts/src/renderer-type.js.map +1 -0
- package/build/treb-charts/src/renderer.d.ts +127 -0
- package/build/treb-charts/src/renderer.js +1518 -0
- package/build/treb-charts/src/renderer.js.map +1 -0
- package/build/treb-charts/src/util.d.ts +18 -0
- package/build/treb-charts/src/util.js +71 -0
- package/build/treb-charts/src/util.js.map +1 -0
- package/build/treb-data-model/src/annotation.d.ts +167 -0
- package/build/treb-data-model/src/annotation.js +120 -0
- package/build/treb-data-model/src/annotation.js.map +1 -0
- package/build/treb-data-model/src/conditional_format.d.ts +155 -0
- package/build/treb-data-model/src/conditional_format.js +62 -0
- package/build/treb-data-model/src/conditional_format.js.map +1 -0
- package/build/treb-data-model/src/data-validation.d.ts +28 -0
- package/build/treb-data-model/src/data-validation.js +22 -0
- package/build/treb-data-model/src/data-validation.js.map +1 -0
- package/build/treb-data-model/src/data_model.d.ts +173 -0
- package/build/treb-data-model/src/data_model.js +637 -0
- package/build/treb-data-model/src/data_model.js.map +1 -0
- package/build/treb-data-model/src/index.d.ts +13 -0
- package/build/treb-data-model/src/index.js +28 -0
- package/build/treb-data-model/src/index.js.map +1 -0
- package/build/treb-data-model/src/language-model.d.ts +22 -0
- package/build/treb-data-model/src/language-model.js +22 -0
- package/build/treb-data-model/src/language-model.js.map +1 -0
- package/build/treb-data-model/src/named.d.ts +124 -0
- package/build/treb-data-model/src/named.js +372 -0
- package/build/treb-data-model/src/named.js.map +1 -0
- package/build/treb-data-model/src/serialize_options.d.ts +49 -0
- package/build/treb-data-model/src/serialize_options.js +22 -0
- package/build/treb-data-model/src/serialize_options.js.map +1 -0
- package/build/treb-data-model/src/sheet.d.ts +499 -0
- package/build/treb-data-model/src/sheet.js +2904 -0
- package/build/treb-data-model/src/sheet.js.map +1 -0
- package/build/treb-data-model/src/sheet_collection.d.ts +58 -0
- package/build/treb-data-model/src/sheet_collection.js +112 -0
- package/build/treb-data-model/src/sheet_collection.js.map +1 -0
- package/build/treb-data-model/src/sheet_selection.d.ts +42 -0
- package/build/treb-data-model/src/sheet_selection.js +39 -0
- package/build/treb-data-model/src/sheet_selection.js.map +1 -0
- package/build/treb-data-model/src/sheet_types.d.ts +104 -0
- package/build/treb-data-model/src/sheet_types.js +22 -0
- package/build/treb-data-model/src/sheet_types.js.map +1 -0
- package/build/treb-data-model/src/types.d.ts +59 -0
- package/build/treb-data-model/src/types.js +22 -0
- package/build/treb-data-model/src/types.js.map +1 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.d.ts +75 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.js +1144 -0
- package/build/treb-embed/src/custom-element/spreadsheet-constructor.js.map +1 -0
- package/build/treb-embed/src/custom-element/treb-global.d.ts +36 -0
- package/build/treb-embed/src/custom-element/treb-global.js +64 -0
- package/build/treb-embed/src/custom-element/treb-global.js.map +1 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.d.ts +1 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js +61 -0
- package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js.map +1 -0
- package/build/treb-embed/src/embedded-spreadsheet.d.ts +1358 -0
- package/build/treb-embed/src/embedded-spreadsheet.js +5205 -0
- package/build/treb-embed/src/embedded-spreadsheet.js.map +1 -0
- package/build/treb-embed/src/index.d.ts +12 -0
- package/build/treb-embed/src/index.js +34 -0
- package/build/treb-embed/src/index.js.map +1 -0
- package/build/treb-embed/src/options.d.ts +266 -0
- package/build/treb-embed/src/options.js +56 -0
- package/build/treb-embed/src/options.js.map +1 -0
- package/build/treb-embed/src/plugin.d.ts +9 -0
- package/build/treb-embed/src/plugin.js +22 -0
- package/build/treb-embed/src/plugin.js.map +1 -0
- package/build/treb-embed/src/progress-dialog.d.ts +49 -0
- package/build/treb-embed/src/progress-dialog.js +178 -0
- package/build/treb-embed/src/progress-dialog.js.map +1 -0
- package/build/treb-embed/src/selection-state.d.ts +15 -0
- package/build/treb-embed/src/selection-state.js +22 -0
- package/build/treb-embed/src/selection-state.js.map +1 -0
- package/build/treb-embed/src/spinner.d.ts +8 -0
- package/build/treb-embed/src/spinner.js +40 -0
- package/build/treb-embed/src/spinner.js.map +1 -0
- package/build/treb-embed/src/toolbar-message.d.ts +72 -0
- package/build/treb-embed/src/toolbar-message.js +22 -0
- package/build/treb-embed/src/toolbar-message.js.map +1 -0
- package/build/treb-embed/src/types.d.ts +185 -0
- package/build/treb-embed/src/types.js +45 -0
- package/build/treb-embed/src/types.js.map +1 -0
- package/build/treb-embed/tsconfig.tsbuildinfo +1 -0
- package/build/treb-export/src/address-type.d.ts +34 -0
- package/build/treb-export/src/address-type.js +53 -0
- package/build/treb-export/src/address-type.js.map +1 -0
- package/build/treb-export/src/base-template.d.ts +1 -0
- package/build/treb-export/src/base-template.js +22 -0
- package/build/treb-export/src/base-template.js.map +1 -0
- package/build/treb-export/src/column-width.d.ts +2 -0
- package/build/treb-export/src/column-width.js +80 -0
- package/build/treb-export/src/column-width.js.map +1 -0
- package/build/treb-export/src/drawing/bubble-chart-template.d.ts +514 -0
- package/build/treb-export/src/drawing/bubble-chart-template.js +544 -0
- package/build/treb-export/src/drawing/bubble-chart-template.js.map +1 -0
- package/build/treb-export/src/drawing/chart-template-components2.d.ts +365 -0
- package/build/treb-export/src/drawing/chart-template-components2.js +386 -0
- package/build/treb-export/src/drawing/chart-template-components2.js.map +1 -0
- package/build/treb-export/src/drawing/chart.d.ts +26 -0
- package/build/treb-export/src/drawing/chart.js +247 -0
- package/build/treb-export/src/drawing/chart.js.map +1 -0
- package/build/treb-export/src/drawing/column-chart-template2.d.ts +490 -0
- package/build/treb-export/src/drawing/column-chart-template2.js +518 -0
- package/build/treb-export/src/drawing/column-chart-template2.js.map +1 -0
- package/build/treb-export/src/drawing/donut-chart-template2.d.ts +272 -0
- package/build/treb-export/src/drawing/donut-chart-template2.js +293 -0
- package/build/treb-export/src/drawing/donut-chart-template2.js.map +1 -0
- package/build/treb-export/src/drawing/drawing.d.ts +49 -0
- package/build/treb-export/src/drawing/drawing.js +193 -0
- package/build/treb-export/src/drawing/drawing.js.map +1 -0
- package/build/treb-export/src/drawing/embedded-image.d.ts +12 -0
- package/build/treb-export/src/drawing/embedded-image.js +54 -0
- package/build/treb-export/src/drawing/embedded-image.js.map +1 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.d.ts +520 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.js +551 -0
- package/build/treb-export/src/drawing/scatter-chart-template2.js.map +1 -0
- package/build/treb-export/src/export.d.ts +72 -0
- package/build/treb-export/src/export.js +2039 -0
- package/build/treb-export/src/export.js.map +1 -0
- package/build/treb-export/src/import-export-messages.d.ts +31 -0
- package/build/treb-export/src/import-export-messages.js +22 -0
- package/build/treb-export/src/import-export-messages.js.map +1 -0
- package/build/treb-export/src/import.d.ts +33 -0
- package/build/treb-export/src/import.js +1258 -0
- package/build/treb-export/src/import.js.map +1 -0
- package/build/treb-export/src/index.worker.d.ts +1 -0
- package/build/treb-export/src/index.worker.js +93 -0
- package/build/treb-export/src/index.worker.js.map +1 -0
- package/build/treb-export/src/metadata.d.ts +51 -0
- package/build/treb-export/src/metadata.js +153 -0
- package/build/treb-export/src/metadata.js.map +1 -0
- package/build/treb-export/src/ooxml.d.ts +7 -0
- package/build/treb-export/src/ooxml.js +41 -0
- package/build/treb-export/src/ooxml.js.map +1 -0
- package/build/treb-export/src/relationship.d.ts +8 -0
- package/build/treb-export/src/relationship.js +27 -0
- package/build/treb-export/src/relationship.js.map +1 -0
- package/build/treb-export/src/shared-strings.d.ts +11 -0
- package/build/treb-export/src/shared-strings.js +105 -0
- package/build/treb-export/src/shared-strings.js.map +1 -0
- package/build/treb-export/src/template-2.d.ts +1 -0
- package/build/treb-export/src/template-2.js +22 -0
- package/build/treb-export/src/template-2.js.map +1 -0
- package/build/treb-export/src/unescape_xml.d.ts +1 -0
- package/build/treb-export/src/unescape_xml.js +61 -0
- package/build/treb-export/src/unescape_xml.js.map +1 -0
- package/build/treb-export/src/workbook-sheet.d.ts +75 -0
- package/build/treb-export/src/workbook-sheet.js +128 -0
- package/build/treb-export/src/workbook-sheet.js.map +1 -0
- package/build/treb-export/src/workbook-style.d.ts +110 -0
- package/build/treb-export/src/workbook-style.js +1134 -0
- package/build/treb-export/src/workbook-style.js.map +1 -0
- package/build/treb-export/src/workbook-theme.d.ts +13 -0
- package/build/treb-export/src/workbook-theme.js +85 -0
- package/build/treb-export/src/workbook-theme.js.map +1 -0
- package/build/treb-export/src/workbook.d.ts +123 -0
- package/build/treb-export/src/workbook.js +644 -0
- package/build/treb-export/src/workbook.js.map +1 -0
- package/build/treb-export/src/xml-test.d.ts +9 -0
- package/build/treb-export/src/xml-test.js +52 -0
- package/build/treb-export/src/xml-test.js.map +1 -0
- package/build/treb-export/src/xml-utils.d.ts +76 -0
- package/build/treb-export/src/xml-utils.js +223 -0
- package/build/treb-export/src/xml-utils.js.map +1 -0
- package/build/treb-export/src/zip-wrapper.d.ts +22 -0
- package/build/treb-export/src/zip-wrapper.js +93 -0
- package/build/treb-export/src/zip-wrapper.js.map +1 -0
- package/build/treb-format/src/format.d.ts +130 -0
- package/build/treb-format/src/format.js +805 -0
- package/build/treb-format/src/format.js.map +1 -0
- package/build/treb-format/src/format_cache.d.ts +55 -0
- package/build/treb-format/src/format_cache.js +166 -0
- package/build/treb-format/src/format_cache.js.map +1 -0
- package/build/treb-format/src/format_parser.d.ts +70 -0
- package/build/treb-format/src/format_parser.js +618 -0
- package/build/treb-format/src/format_parser.js.map +1 -0
- package/build/treb-format/src/index.d.ts +4 -0
- package/build/treb-format/src/index.js +25 -0
- package/build/treb-format/src/index.js.map +1 -0
- package/build/treb-format/src/number_format_section.d.ts +58 -0
- package/build/treb-format/src/number_format_section.js +78 -0
- package/build/treb-format/src/number_format_section.js.map +1 -0
- package/build/treb-format/src/value_parser.d.ts +48 -0
- package/build/treb-format/src/value_parser.js +244 -0
- package/build/treb-format/src/value_parser.js.map +1 -0
- package/build/treb-grid/src/editors/autocomplete.d.ts +39 -0
- package/build/treb-grid/src/editors/autocomplete.js +316 -0
- package/build/treb-grid/src/editors/autocomplete.js.map +1 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.d.ts +74 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.js +212 -0
- package/build/treb-grid/src/editors/autocomplete_matcher.js.map +1 -0
- package/build/treb-grid/src/editors/editor.d.ts +214 -0
- package/build/treb-grid/src/editors/editor.js +879 -0
- package/build/treb-grid/src/editors/editor.js.map +1 -0
- package/build/treb-grid/src/editors/external_editor.d.ts +11 -0
- package/build/treb-grid/src/editors/external_editor.js +118 -0
- package/build/treb-grid/src/editors/external_editor.js.map +1 -0
- package/build/treb-grid/src/editors/formula_bar.d.ts +85 -0
- package/build/treb-grid/src/editors/formula_bar.js +444 -0
- package/build/treb-grid/src/editors/formula_bar.js.map +1 -0
- package/build/treb-grid/src/editors/overlay_editor.d.ts +85 -0
- package/build/treb-grid/src/editors/overlay_editor.js +353 -0
- package/build/treb-grid/src/editors/overlay_editor.js.map +1 -0
- package/build/treb-grid/src/index.d.ts +12 -0
- package/build/treb-grid/src/index.js +28 -0
- package/build/treb-grid/src/index.js.map +1 -0
- package/build/treb-grid/src/layout/base_layout.d.ts +346 -0
- package/build/treb-grid/src/layout/base_layout.js +2050 -0
- package/build/treb-grid/src/layout/base_layout.js.map +1 -0
- package/build/treb-grid/src/layout/grid_layout.d.ts +19 -0
- package/build/treb-grid/src/layout/grid_layout.js +235 -0
- package/build/treb-grid/src/layout/grid_layout.js.map +1 -0
- package/build/treb-grid/src/layout/mock-layout.d.ts +10 -0
- package/build/treb-grid/src/layout/mock-layout.js +37 -0
- package/build/treb-grid/src/layout/mock-layout.js.map +1 -0
- package/build/treb-grid/src/render/selection-renderer.d.ts +97 -0
- package/build/treb-grid/src/render/selection-renderer.js +315 -0
- package/build/treb-grid/src/render/selection-renderer.js.map +1 -0
- package/build/treb-grid/src/render/svg_header_overlay.d.ts +20 -0
- package/build/treb-grid/src/render/svg_header_overlay.js +76 -0
- package/build/treb-grid/src/render/svg_header_overlay.js.map +1 -0
- package/build/treb-grid/src/render/svg_selection_block.d.ts +27 -0
- package/build/treb-grid/src/render/svg_selection_block.js +106 -0
- package/build/treb-grid/src/render/svg_selection_block.js.map +1 -0
- package/build/treb-grid/src/render/tile_renderer.d.ts +121 -0
- package/build/treb-grid/src/render/tile_renderer.js +1609 -0
- package/build/treb-grid/src/render/tile_renderer.js.map +1 -0
- package/build/treb-grid/src/types/border_constants.d.ts +9 -0
- package/build/treb-grid/src/types/border_constants.js +34 -0
- package/build/treb-grid/src/types/border_constants.js.map +1 -0
- package/build/treb-grid/src/types/clipboard_data.d.ts +11 -0
- package/build/treb-grid/src/types/clipboard_data.js +22 -0
- package/build/treb-grid/src/types/clipboard_data.js.map +1 -0
- package/build/treb-grid/src/types/clipboard_data2.d.ts +46 -0
- package/build/treb-grid/src/types/clipboard_data2.js +22 -0
- package/build/treb-grid/src/types/clipboard_data2.js.map +1 -0
- package/build/treb-grid/src/types/drag_mask.d.ts +10 -0
- package/build/treb-grid/src/types/drag_mask.js +78 -0
- package/build/treb-grid/src/types/drag_mask.js.map +1 -0
- package/build/treb-grid/src/types/external_editor_config.d.ts +33 -0
- package/build/treb-grid/src/types/external_editor_config.js +22 -0
- package/build/treb-grid/src/types/external_editor_config.js.map +1 -0
- package/build/treb-grid/src/types/grid.d.ts +806 -0
- package/build/treb-grid/src/types/grid.js +6410 -0
- package/build/treb-grid/src/types/grid.js.map +1 -0
- package/build/treb-grid/src/types/grid_base.d.ts +442 -0
- package/build/treb-grid/src/types/grid_base.js +3523 -0
- package/build/treb-grid/src/types/grid_base.js.map +1 -0
- package/build/treb-grid/src/types/grid_command.d.ts +408 -0
- package/build/treb-grid/src/types/grid_command.js +75 -0
- package/build/treb-grid/src/types/grid_command.js.map +1 -0
- package/build/treb-grid/src/types/grid_events.d.ts +93 -0
- package/build/treb-grid/src/types/grid_events.js +36 -0
- package/build/treb-grid/src/types/grid_events.js.map +1 -0
- package/build/treb-grid/src/types/grid_options.d.ts +50 -0
- package/build/treb-grid/src/types/grid_options.js +34 -0
- package/build/treb-grid/src/types/grid_options.js.map +1 -0
- package/build/treb-grid/src/types/scale-control.d.ts +21 -0
- package/build/treb-grid/src/types/scale-control.js +148 -0
- package/build/treb-grid/src/types/scale-control.js.map +1 -0
- package/build/treb-grid/src/types/set_range_options.d.ts +24 -0
- package/build/treb-grid/src/types/set_range_options.js +22 -0
- package/build/treb-grid/src/types/set_range_options.js.map +1 -0
- package/build/treb-grid/src/types/tab_bar.d.ts +84 -0
- package/build/treb-grid/src/types/tab_bar.js +426 -0
- package/build/treb-grid/src/types/tab_bar.js.map +1 -0
- package/build/treb-grid/src/types/tile.d.ts +29 -0
- package/build/treb-grid/src/types/tile.js +22 -0
- package/build/treb-grid/src/types/tile.js.map +1 -0
- package/build/treb-grid/src/types/update_flags.d.ts +48 -0
- package/build/treb-grid/src/types/update_flags.js +22 -0
- package/build/treb-grid/src/types/update_flags.js.map +1 -0
- package/build/treb-grid/src/util/fontmetrics.d.ts +21 -0
- package/build/treb-grid/src/util/fontmetrics.js +82 -0
- package/build/treb-grid/src/util/fontmetrics.js.map +1 -0
- package/build/treb-grid/src/util/ua.d.ts +33 -0
- package/build/treb-grid/src/util/ua.js +86 -0
- package/build/treb-grid/src/util/ua.js.map +1 -0
- package/build/treb-parser/src/csv-parser.d.ts +13 -0
- package/build/treb-parser/src/csv-parser.js +107 -0
- package/build/treb-parser/src/csv-parser.js.map +1 -0
- package/build/treb-parser/src/index.d.ts +4 -0
- package/build/treb-parser/src/index.js +25 -0
- package/build/treb-parser/src/index.js.map +1 -0
- package/build/treb-parser/src/md-parser.d.ts +97 -0
- package/build/treb-parser/src/md-parser.js +403 -0
- package/build/treb-parser/src/md-parser.js.map +1 -0
- package/build/treb-parser/src/parser-types.d.ts +345 -0
- package/build/treb-parser/src/parser-types.js +53 -0
- package/build/treb-parser/src/parser-types.js.map +1 -0
- package/build/treb-parser/src/parser.d.ts +422 -0
- package/build/treb-parser/src/parser.js +2418 -0
- package/build/treb-parser/src/parser.js.map +1 -0
- package/build/treb-utils/src/event_source.d.ts +34 -0
- package/build/treb-utils/src/event_source.js +110 -0
- package/build/treb-utils/src/event_source.js.map +1 -0
- package/build/treb-utils/src/ievent_source.d.ts +9 -0
- package/build/treb-utils/src/ievent_source.js +22 -0
- package/build/treb-utils/src/ievent_source.js.map +1 -0
- package/build/treb-utils/src/index.d.ts +6 -0
- package/build/treb-utils/src/index.js +30 -0
- package/build/treb-utils/src/index.js.map +1 -0
- package/build/treb-utils/src/measurement.d.ts +42 -0
- package/build/treb-utils/src/measurement.js +145 -0
- package/build/treb-utils/src/measurement.js.map +1 -0
- package/build/treb-utils/src/scale.d.ts +16 -0
- package/build/treb-utils/src/scale.js +106 -0
- package/build/treb-utils/src/scale.js.map +1 -0
- package/build/treb-utils/src/serialize_html.d.ts +5 -0
- package/build/treb-utils/src/serialize_html.js +128 -0
- package/build/treb-utils/src/serialize_html.js.map +1 -0
- package/build/treb-utils/src/validate_uri.d.ts +20 -0
- package/build/treb-utils/src/validate_uri.js +55 -0
- package/build/treb-utils/src/validate_uri.js.map +1 -0
- package/dist/{chunk-XD5PEZBZ.mjs → chunk-A2NJA5VB.mjs} +1 -1
- package/dist/treb-export-worker.mjs +2 -2
- package/dist/treb-spreadsheet.mjs +4 -4
- package/dist/treb.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import type { ExpressionUnit, UnitAddress, UnitIdentifier, UnitRange, DependencyList, ParseResult, UnitLiteral, ParserFlags, UnitStructuredReference, RenderOptions } from './parser-types';
|
|
2
|
+
import { ArgumentSeparatorType, DecimalMarkType } from './parser-types';
|
|
3
|
+
/**
|
|
4
|
+
* regex determines if a sheet name requires quotes. centralizing
|
|
5
|
+
* this to simplify maintenance and reduce overlap/errors
|
|
6
|
+
*/
|
|
7
|
+
export declare const QuotedSheetNameRegex: RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* similarly, illegal sheet name. we don't actually handle this in
|
|
10
|
+
* the parser, but it seems like a reasonable place to keep this
|
|
11
|
+
* definition.
|
|
12
|
+
*/
|
|
13
|
+
export declare const IllegalSheetNameRegex: RegExp;
|
|
14
|
+
/**
|
|
15
|
+
* parser for spreadsheet language.
|
|
16
|
+
*
|
|
17
|
+
* FIXME: this is stateless, think about exporting a singleton.
|
|
18
|
+
*
|
|
19
|
+
* (there is internal state, but it's only used during a Parse() call,
|
|
20
|
+
* which runs synchronously). one benefit of using a singleton would be
|
|
21
|
+
* consistency in decimal mark, we'd only have to set once.
|
|
22
|
+
*
|
|
23
|
+
* FIXME: the internal state is starting to grate. there's no reason for
|
|
24
|
+
* it and it just confuses things because parsing is stateless (except for
|
|
25
|
+
* configuration). internal state just keeps results from the last parse
|
|
26
|
+
* operation. we should refactor so parsing is clean and returns all
|
|
27
|
+
* results directly, caller can store if necessary.
|
|
28
|
+
*
|
|
29
|
+
* FIXME: split rendering into a separate class? would be a little cleaner.
|
|
30
|
+
*
|
|
31
|
+
* FIXME: we don't currently handle full-width punctuation. it would be
|
|
32
|
+
* simple to parse, a little more complicated to keep track of if we wanted
|
|
33
|
+
* to be able to rewrite. TODO/FIXME.
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare class Parser {
|
|
37
|
+
/**
|
|
38
|
+
* accessor replacing old field. the actual value is moved to flags,
|
|
39
|
+
* and should be set via the SetLocaleSettings method.
|
|
40
|
+
*/
|
|
41
|
+
get argument_separator(): ArgumentSeparatorType;
|
|
42
|
+
/**
|
|
43
|
+
* accessor replacing old field. the actual value is moved to flags,
|
|
44
|
+
* and should be set via the SetLocaleSettings method.
|
|
45
|
+
*/
|
|
46
|
+
get decimal_mark(): DecimalMarkType;
|
|
47
|
+
/**
|
|
48
|
+
* unifying flags
|
|
49
|
+
*/
|
|
50
|
+
flags: ParserFlags;
|
|
51
|
+
/**
|
|
52
|
+
* FIXME: why is this a class member? at a minimum it could be static
|
|
53
|
+
* FIXME: why are we doing this with a regex?
|
|
54
|
+
*/
|
|
55
|
+
protected r1c1_regex: RegExp;
|
|
56
|
+
/**
|
|
57
|
+
* internal argument separator, as a number. this is set internally on
|
|
58
|
+
* parse call, following the argument_separator value.
|
|
59
|
+
*/
|
|
60
|
+
protected argument_separator_char: number;
|
|
61
|
+
/**
|
|
62
|
+
* internal decimal mark, as a number.
|
|
63
|
+
*/
|
|
64
|
+
protected decimal_mark_char: number;
|
|
65
|
+
/**
|
|
66
|
+
* imaginary number value. this is "i", except for those EE weirdos who
|
|
67
|
+
* use "j". although I guess those guys put it in front, so it won't really
|
|
68
|
+
* work anyway... let's stick with "i" for now.
|
|
69
|
+
*/
|
|
70
|
+
protected imaginary_char: 0x69 | 0x6A;
|
|
71
|
+
/**
|
|
72
|
+
* imaginary number as text for matching
|
|
73
|
+
*/
|
|
74
|
+
protected imaginary_number: 'i' | 'j';
|
|
75
|
+
/**
|
|
76
|
+
* internal counter for incrementing IDs
|
|
77
|
+
*/
|
|
78
|
+
protected id_counter: number;
|
|
79
|
+
protected expression: string;
|
|
80
|
+
protected data: number[];
|
|
81
|
+
protected index: number;
|
|
82
|
+
protected length: number;
|
|
83
|
+
/** success flag */
|
|
84
|
+
protected valid: boolean;
|
|
85
|
+
/** rolling error state */
|
|
86
|
+
protected error_position: number | undefined;
|
|
87
|
+
/** rolling error state */
|
|
88
|
+
protected error: string | undefined;
|
|
89
|
+
protected dependencies: DependencyList;
|
|
90
|
+
protected address_refcount: {
|
|
91
|
+
[index: string]: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* full list of referenced addresses and ranges. we're adding this
|
|
95
|
+
* to support highlighting, for which we need multiple instances
|
|
96
|
+
* of a single address. the original dep list was used for graph dependencies,
|
|
97
|
+
* so we compressed the list.
|
|
98
|
+
*
|
|
99
|
+
* FIXME: use a single list, i.e. something like
|
|
100
|
+
*
|
|
101
|
+
* address -> [instance, instance]
|
|
102
|
+
*
|
|
103
|
+
* because that's a big API change it's going to have to wait. for now,
|
|
104
|
+
* use a second list.
|
|
105
|
+
*
|
|
106
|
+
* UPDATE: adding (otherwise unused) tokens, which could be named ranges.
|
|
107
|
+
* in the future we may pass in a list of names at parse time, and resolve
|
|
108
|
+
* them; for now we are just listing names.
|
|
109
|
+
*/
|
|
110
|
+
protected full_reference_list: Array<UnitAddress | UnitRange | UnitIdentifier | UnitStructuredReference>;
|
|
111
|
+
/**
|
|
112
|
+
* cache for storing/restoring parser state, if we toggle it
|
|
113
|
+
*/
|
|
114
|
+
protected parser_state_cache: string[];
|
|
115
|
+
/**
|
|
116
|
+
* step towards protecting these values and setting them in one
|
|
117
|
+
* operation.
|
|
118
|
+
*
|
|
119
|
+
* UPDATE: switch order. argument separator is optional and implied.
|
|
120
|
+
*/
|
|
121
|
+
SetLocaleSettings(decimal_mark: DecimalMarkType, argument_separator?: ArgumentSeparatorType): void;
|
|
122
|
+
/**
|
|
123
|
+
* save local configuration to a buffer, so it can be restored. we're doing
|
|
124
|
+
* this because in a lot of places we're caching parser flagss, changing
|
|
125
|
+
* them, and then restoring them. that's become repetitive, fragile to
|
|
126
|
+
* changes or new flags, and annoying.
|
|
127
|
+
*
|
|
128
|
+
* config is managed in a list with push/pop semantics. we store it as
|
|
129
|
+
* JSON so there's no possibility we'll accidentally mutate.
|
|
130
|
+
*
|
|
131
|
+
* FIXME: while we're at it why not migrate the separators -> flags, so
|
|
132
|
+
* there's a single location for this kind of state? (...TODO)
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
Save(): void;
|
|
136
|
+
/**
|
|
137
|
+
* restore persisted config
|
|
138
|
+
* @see Save
|
|
139
|
+
*/
|
|
140
|
+
Restore(): void;
|
|
141
|
+
/**
|
|
142
|
+
* recursive tree walk that allows substitution. this should be
|
|
143
|
+
* a drop-in replacement for the original Walk function but I'm
|
|
144
|
+
* keeping it separate temporarily just in case it breaks something.
|
|
145
|
+
*
|
|
146
|
+
* @param func - in this version function can return `true` (continue
|
|
147
|
+
* walking subtree), `false` (don't walk subtree), or an ExpressionUnit.
|
|
148
|
+
* in the last case, we'll replace the original unit with the substitution.
|
|
149
|
+
* obviously in that case we don't recurse.
|
|
150
|
+
*/
|
|
151
|
+
Walk2(unit: ExpressionUnit, func: (unit: ExpressionUnit) => boolean | ExpressionUnit | undefined): ExpressionUnit;
|
|
152
|
+
/**
|
|
153
|
+
* recursive tree walk.
|
|
154
|
+
*
|
|
155
|
+
* @param func function called on each node. for nodes that have children
|
|
156
|
+
* (operations, calls, groups) return false to skip the subtree, or true to
|
|
157
|
+
* traverse.
|
|
158
|
+
*/
|
|
159
|
+
Walk(unit: ExpressionUnit, func: (unit: ExpressionUnit) => boolean): void;
|
|
160
|
+
/** utility: transpose array */
|
|
161
|
+
Transpose(arr: Array<Array<string | boolean | number | undefined>>): Array<Array<string | boolean | number | undefined>>;
|
|
162
|
+
/**
|
|
163
|
+
* renders the passed expression as a string.
|
|
164
|
+
* @param unit base expression
|
|
165
|
+
* @param offset offset for addresses, used to offset relative addresses
|
|
166
|
+
* (and ranges). this is for copy-and-paste or move operations.
|
|
167
|
+
* @param missing string to represent missing values (can be '', for functions)
|
|
168
|
+
*
|
|
169
|
+
* FIXME: we're accumulating too many arguments. need to switch to an
|
|
170
|
+
* options object. do that after the structured reference stuff merges.
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
Render(unit: ExpressionUnit, options?: Partial<RenderOptions>): string;
|
|
174
|
+
/**
|
|
175
|
+
* parses expression and returns the root of the parse tree, plus a
|
|
176
|
+
* list of dependencies (addresses and ranges) found in the expression.
|
|
177
|
+
*
|
|
178
|
+
* NOTE that in the new address parsing structure, we will overlap ranges
|
|
179
|
+
* and addresses (range corners). this is OK because ranges are mapped
|
|
180
|
+
* to individual address dependencies. it's just sloppy (FIXME: refcount?)
|
|
181
|
+
*/
|
|
182
|
+
Parse(expression: string): ParseResult;
|
|
183
|
+
/** generates column label ("A") from column index (0-based) */
|
|
184
|
+
protected ColumnLabel(column: number): string;
|
|
185
|
+
/**
|
|
186
|
+
* generates absolute or relative R1C1 address
|
|
187
|
+
*
|
|
188
|
+
* FIXME: not supporting relative (offset) addresses atm? I'd like to
|
|
189
|
+
* change this but I don't want to break anything...
|
|
190
|
+
*/
|
|
191
|
+
protected R1C1Label(address: UnitAddress, options: Partial<RenderOptions>): string;
|
|
192
|
+
/**
|
|
193
|
+
* generates address label ("C3") from address (0-based).
|
|
194
|
+
*
|
|
195
|
+
* @param offset - offset by some number of rows or columns
|
|
196
|
+
* @param r1c1 - if set, return data in R1C1 format.
|
|
197
|
+
*/
|
|
198
|
+
protected AddressLabel(address: UnitAddress, offset: {
|
|
199
|
+
rows: number;
|
|
200
|
+
columns: number;
|
|
201
|
+
}): string;
|
|
202
|
+
/**
|
|
203
|
+
* base parse routine; may recurse inside parens (either as grouped
|
|
204
|
+
* operations or in function arguments).
|
|
205
|
+
*
|
|
206
|
+
* @param exit exit on specific characters
|
|
207
|
+
*/
|
|
208
|
+
protected ParseGeneric(exit?: number[], explicit_group?: boolean): ExpressionUnit | null;
|
|
209
|
+
/**
|
|
210
|
+
* helper function, @see BinaryToRange
|
|
211
|
+
* @param unit
|
|
212
|
+
* @returns
|
|
213
|
+
*/
|
|
214
|
+
protected UnitToAddress(unit: UnitLiteral | UnitIdentifier): UnitAddress | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* rewrite of binary to range. this version operates on the initial stream,
|
|
217
|
+
* which should be OK because range has the highest precedence so we would
|
|
218
|
+
* never reorder a range.
|
|
219
|
+
*
|
|
220
|
+
* ACTUALLY this will break in the case of
|
|
221
|
+
*
|
|
222
|
+
* -15:16
|
|
223
|
+
*
|
|
224
|
+
* (I think that's the only case). we can fix that though. this should
|
|
225
|
+
* not impact the case of `2-15:16`, because in that case the - will look
|
|
226
|
+
* like an operator and not part of the number. the same goes for a leading
|
|
227
|
+
* `+` which will get dropped implicitly but has no effect (we might want
|
|
228
|
+
* to preserve it for consistency though).
|
|
229
|
+
*
|
|
230
|
+
* NOTE: that error existed in the old version, too, and this way is perhaps
|
|
231
|
+
* better for fixing it. we should merge this into main.
|
|
232
|
+
*
|
|
233
|
+
*
|
|
234
|
+
* old version comments:
|
|
235
|
+
* ---
|
|
236
|
+
*
|
|
237
|
+
* converts binary operations with a colon operator to ranges. this also
|
|
238
|
+
* validates that there are no colon operations with non-address operands
|
|
239
|
+
* (which is why it's called after precendence reordering; colon has the
|
|
240
|
+
* highest preference). recursive only over binary ops AND unary ops.
|
|
241
|
+
*
|
|
242
|
+
* NOTE: there are other legal arguments to a colon operator. specifically:
|
|
243
|
+
*
|
|
244
|
+
* (1) two numbers, in either order
|
|
245
|
+
*
|
|
246
|
+
* 15:16
|
|
247
|
+
* 16:16
|
|
248
|
+
* 16:15
|
|
249
|
+
*
|
|
250
|
+
* (2) with one or both optionally having a $
|
|
251
|
+
*
|
|
252
|
+
* 15:$16
|
|
253
|
+
* $16:$16
|
|
254
|
+
*
|
|
255
|
+
* (3) two column identifiers, in either order
|
|
256
|
+
*
|
|
257
|
+
* A:F
|
|
258
|
+
* B:A
|
|
259
|
+
*
|
|
260
|
+
* (4) and the same with $
|
|
261
|
+
*
|
|
262
|
+
* $A:F
|
|
263
|
+
* $A:$F
|
|
264
|
+
*
|
|
265
|
+
* because none of these are legal in any other context, we leave the
|
|
266
|
+
* default treatment of them UNLESS they are arguments to the colon
|
|
267
|
+
* operator, in which case we will grab them. that does mean we parse
|
|
268
|
+
* them twice, but (...)
|
|
269
|
+
*
|
|
270
|
+
* FIXME: will need some updated to rendering these, we don't have any
|
|
271
|
+
* handler for rendering infinity
|
|
272
|
+
*/
|
|
273
|
+
protected BinaryToRange2(stream: ExpressionUnit[]): ExpressionUnit[];
|
|
274
|
+
/**
|
|
275
|
+
* we've now come full circle. we started with handling ranges as
|
|
276
|
+
* binary operators; then we added complex composition as a first-pass
|
|
277
|
+
* function; then we moved ranges to a first-pass function; and now we're
|
|
278
|
+
* moving complex composition to a lower-level restructuring of binary
|
|
279
|
+
* operations.
|
|
280
|
+
*
|
|
281
|
+
* that allows better precedence handling for (potentially) ambiguous
|
|
282
|
+
* constructions like =B3 * 2 + 3i. we do have parens, so.
|
|
283
|
+
*
|
|
284
|
+
* @param unit
|
|
285
|
+
* @returns
|
|
286
|
+
*/
|
|
287
|
+
protected BinaryToComplex(unit: ExpressionUnit): ExpressionUnit;
|
|
288
|
+
/**
|
|
289
|
+
* reorders operations for precendence
|
|
290
|
+
*
|
|
291
|
+
* this method was written with the assumption that groups were
|
|
292
|
+
* always an error. that's no longer true, with implicit calls.
|
|
293
|
+
* we should still error if it's not an _explicit_ group, i.e. there's
|
|
294
|
+
* just a bunch of naked tokens.
|
|
295
|
+
*
|
|
296
|
+
*/
|
|
297
|
+
protected ArrangeUnits(stream: ExpressionUnit[]): ExpressionUnit;
|
|
298
|
+
/**
|
|
299
|
+
* parses literals and tokens from the stream, ignoring whitespace,
|
|
300
|
+
* and stopping on unexpected tokens (generally operators or parens).
|
|
301
|
+
*
|
|
302
|
+
* @param naked treat -/+ as signs (part of numbers) rather than operators.
|
|
303
|
+
*/
|
|
304
|
+
protected ParseNext(naked?: boolean): ExpressionUnit | number;
|
|
305
|
+
protected ConsumeArray(): ExpressionUnit;
|
|
306
|
+
protected ConsumeOperator(): ExpressionUnit | null;
|
|
307
|
+
/** consume function arguments, which can be of any type */
|
|
308
|
+
protected ConsumeArguments(): ExpressionUnit[];
|
|
309
|
+
/**
|
|
310
|
+
* consume token. also checks for function call, because parens
|
|
311
|
+
* have a different meaning (grouping/precedence) when they appear
|
|
312
|
+
* not immediately after a token.
|
|
313
|
+
*
|
|
314
|
+
* regarding periods: as long as there's no intervening whitespace
|
|
315
|
+
* or operator, period should be a valid token character. tokens
|
|
316
|
+
* cannot start with a period.
|
|
317
|
+
*
|
|
318
|
+
* NOTE: that's true irrespective of decimal mark type.
|
|
319
|
+
*
|
|
320
|
+
* you can have tokens (addresses) with single quotes; these are used
|
|
321
|
+
* to escape sheet names with spaces (which is a bad idea, but hey). this
|
|
322
|
+
* should only be legal if the token starts with a single quote, and only
|
|
323
|
+
* for one (closing) quote.
|
|
324
|
+
*
|
|
325
|
+
* R1C1 relative notation uses square brackets, like =R2C[-1] or =R[-1]C[-2].
|
|
326
|
+
* that's pretty easy to see. there's also regular R1C1, like =R1C1.
|
|
327
|
+
*
|
|
328
|
+
* "structured references" use square brackets. they can start with
|
|
329
|
+
* square brackets -- in that case the table source is implicit (has to
|
|
330
|
+
* be in the table). otherwise they look like =TableName[@ColumnName]. that
|
|
331
|
+
* @ is optional and (I think) means don't spill.
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
protected ConsumeToken(initial_char: number): ExpressionUnit;
|
|
335
|
+
/**
|
|
336
|
+
* like ConsumeAddress, look for a structured reference.
|
|
337
|
+
*/
|
|
338
|
+
protected ConsumeStructuredReference(token: string, position: number): UnitStructuredReference | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* consumes address. this is outside of the normal parse flow;
|
|
341
|
+
* we already have a token, here we're checking if it's an address.
|
|
342
|
+
*
|
|
343
|
+
* this used to check for ranges as well, but we now treat ranges as
|
|
344
|
+
* an operation on two addresses; that supports whitespace between the
|
|
345
|
+
* tokens.
|
|
346
|
+
*
|
|
347
|
+
* FIXME: that means we can now inline the column/row routines, since
|
|
348
|
+
* they are not called more than once
|
|
349
|
+
*/
|
|
350
|
+
protected ConsumeAddress(token: string, position: number): UnitAddress | null;
|
|
351
|
+
/**
|
|
352
|
+
* consumes a row, possibly absolute ($). returns the numeric row
|
|
353
|
+
* (0-based) and metadata.
|
|
354
|
+
*
|
|
355
|
+
* note that something like "X0" is a legal token, because 0 is not
|
|
356
|
+
* a valid row. but at the same time it can't have a $ in it. although
|
|
357
|
+
* maybe "X$0" is a token but not a valid name? dunno
|
|
358
|
+
*/
|
|
359
|
+
protected ConsumeAddressRow(position: number): {
|
|
360
|
+
absolute: boolean;
|
|
361
|
+
row: number;
|
|
362
|
+
position: number;
|
|
363
|
+
spill?: boolean;
|
|
364
|
+
} | false;
|
|
365
|
+
/**
|
|
366
|
+
* consumes a column, possibly absolute ($). returns the numeric
|
|
367
|
+
* column (0-based) and metadata
|
|
368
|
+
*/
|
|
369
|
+
protected ConsumeAddressColumn(position: number): {
|
|
370
|
+
absolute: boolean;
|
|
371
|
+
column: number;
|
|
372
|
+
position: number;
|
|
373
|
+
} | false;
|
|
374
|
+
/**
|
|
375
|
+
* consumes number. supported formats (WIP):
|
|
376
|
+
*
|
|
377
|
+
* -3
|
|
378
|
+
* +3
|
|
379
|
+
* 100.9
|
|
380
|
+
* 10.0%
|
|
381
|
+
* 1e-2.2
|
|
382
|
+
*
|
|
383
|
+
* ~1,333,123.22~
|
|
384
|
+
*
|
|
385
|
+
* UPDATE: commas (separators) are not acceptable in numbers passed
|
|
386
|
+
* in formulae, can't distinguish between them and function argument
|
|
387
|
+
* separators.
|
|
388
|
+
*
|
|
389
|
+
* regarding the above, a couple of rules:
|
|
390
|
+
*
|
|
391
|
+
* 1. +/- is only legal in position 0 or immediately after e/E
|
|
392
|
+
* 2. only one decimal point is allowed.
|
|
393
|
+
* 3. any number of separators, in any position, are legal, but
|
|
394
|
+
* only before the decimal point.
|
|
395
|
+
* 4. only one % is allowed, and only in the last position
|
|
396
|
+
*
|
|
397
|
+
* NOTE: this is probably going to break on unfinished strings that
|
|
398
|
+
* end in - or +... if they're not treated as operators...
|
|
399
|
+
*
|
|
400
|
+
* FIXME: find test cases for that so we can fix it
|
|
401
|
+
*
|
|
402
|
+
* UPDATE: exporting original text string for preservation/insertion.
|
|
403
|
+
* this function now returns a tuple of [value, text].
|
|
404
|
+
*
|
|
405
|
+
* UPDATE: we now (at least in a branch) consume complex numbers. the last
|
|
406
|
+
* element of the return array is a boolean which is set if the value is an
|
|
407
|
+
* imaginary number. when parsing, we will only see the imaginary part;
|
|
408
|
+
* we'll use a separate step to put complex numbers together.
|
|
409
|
+
*
|
|
410
|
+
*
|
|
411
|
+
*/
|
|
412
|
+
protected ConsumeNumber(): ExpressionUnit;
|
|
413
|
+
/**
|
|
414
|
+
* in spreadsheet language ONLY double-quoted strings are legal. there
|
|
415
|
+
* are no escape characters, and a backslash is a legal character. to
|
|
416
|
+
* embed a quotation mark, use "" (double-double quote); that's an escaped
|
|
417
|
+
* double-quote.
|
|
418
|
+
*/
|
|
419
|
+
protected ConsumeString(): string;
|
|
420
|
+
/** run through any intervening whitespace */
|
|
421
|
+
protected ConsumeWhiteSpace(): void;
|
|
422
|
+
}
|