@sheetxl/sdk 0.7.27 → 0.7.28-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/THIRD-PARTY-NOTICES.md +34 -0
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +1 -0
- package/browser/cjs/BG7YDVxiC4ErxvF1.cjs +1 -0
- package/browser/cjs/BREMLtxkQhtNSVra.cjs +1 -0
- package/browser/cjs/CQf4zxkBmheTVbjX.cjs +57 -0
- package/browser/cjs/DoemwsUQoGCk0vBK.cjs +33 -0
- package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +10 -0
- package/browser/cjs/_c2uwwpr03Y7lzIj.cjs +1 -0
- package/browser/cjs/index.cjs +3 -6
- package/browser/esm/BxIOX1TojvA-1ZZP.mjs +14 -0
- package/browser/esm/CB_4gdPPPruwremH.mjs +49989 -0
- package/browser/esm/CZO1RubmqnJV96rq.mjs +503 -0
- package/browser/esm/DN4d5bDBkti28wuc.mjs +818 -0
- package/browser/esm/DPOelA1J3WHbMXyh.mjs +109 -0
- package/browser/esm/DRWu3TmcE9JFf78V.mjs +4436 -0
- package/browser/esm/index.mjs +3225 -62
- package/browser/esm/vHWuKF-ftK7LM1uw.mjs +24 -0
- package/licenses/dependencies.txt +74 -193
- package/node/esm/B-tgcZihStNV9CbZ.mjs +22 -0
- package/node/esm/C8tfYGL3wHy9IDDc.mjs +114 -0
- package/node/esm/XQhP3dYwF_tEuswB.mjs +837 -0
- package/node/esm/index.mjs +53604 -23262
- package/package.json +19 -14
- package/resources/contents.json +21 -0
- package/resources/locales/contents.json +19 -0
- package/resources/locales/de/grammar.json +16 -0
- package/resources/locales/de/model.msg.json +510 -0
- package/resources/locales/en/model.msg.json +525 -0
- package/types/index.d.ts +2 -21294
- package/types/scripting-enums.json +1009 -0
- package/types/scripting.d.ts +26540 -31455
- package/types/src/address/AddressUtils.d.ts +252 -0
- package/types/src/address/_AddressMessages.d.ts +7 -0
- package/types/src/address/index.d.ts +35 -0
- package/types/src/anchored/AbstractAnchored.d.ts +200 -0
- package/types/src/anchored/Anchored.d.ts +154 -0
- package/types/src/anchored/AnchoredMap.d.ts +178 -0
- package/types/src/anchored/IAnchored.d.ts +118 -0
- package/types/src/anchored/IAnchoredMap.d.ts +207 -0
- package/types/src/anchored/_AnchorMessages.d.ts +3 -0
- package/types/src/anchored/index.d.ts +2 -0
- package/types/src/autoFill/AutoFill.d.ts +161 -0
- package/types/src/autoFill/IAutoFill.d.ts +117 -0
- package/types/src/autoFill/index.d.ts +3 -0
- package/types/src/border/IBorder.d.ts +284 -0
- package/types/src/border/index.d.ts +2 -0
- package/types/src/calculation/Calculation.d.ts +440 -0
- package/types/src/calculation/FormulaLiterals.d.ts +18 -0
- package/types/src/calculation/ICalculation.d.ts +1016 -0
- package/types/src/calculation/INamedFormulasCollection.d.ts +141 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +671 -0
- package/types/src/calculation/TokenType.d.ts +117 -0
- package/types/src/calculation/Types.d.ts +110 -0
- package/types/src/calculation/_CalculationMessages.d.ts +3 -0
- package/types/src/calculation/builtInNames.d.ts +2 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +180 -0
- package/types/src/calculation/compiler/CompilerLocale.d.ts +69 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +331 -0
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +69 -0
- package/types/src/calculation/compiler/FormulaLexer.d.ts +85 -0
- package/types/src/calculation/compiler/FormulaParser.d.ts +270 -0
- package/types/src/calculation/compiler/FormulaSeparators.d.ts +35 -0
- package/types/src/calculation/compiler/LiteTransform.d.ts +15 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +167 -0
- package/types/src/calculation/compiler/SRLexer.d.ts +19 -0
- package/types/src/calculation/compiler/SRParser.d.ts +38 -0
- package/types/src/calculation/compiler/Types.d.ts +274 -0
- package/types/src/calculation/compiler/index.d.ts +3 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +115 -0
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +11 -0
- package/types/src/calculation/executor/index.d.ts +3 -0
- package/types/src/calculation/formula/Formula.d.ts +168 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +207 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +181 -0
- package/types/src/calculation/formula/LambdaValue.d.ts +166 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +26 -0
- package/types/src/calculation/formula/index.d.ts +4 -0
- package/types/src/calculation/functions/Operators.d.ts +30 -0
- package/types/src/calculation/functions/index.d.ts +2 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +22 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +205 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +172 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +500 -0
- package/types/src/calculation/grid/index.d.ts +3 -0
- package/types/src/calculation/index.d.ts +5 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +25 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +120 -0
- package/types/src/calculation/spatial/PrecedentSpatialValue.d.ts +115 -0
- package/types/src/calculation/spatial/SpillEntry.d.ts +40 -0
- package/types/src/calculation/spatial/index.d.ts +5 -0
- package/types/src/calculation/state/CalcNode.d.ts +71 -0
- package/types/src/calculation/state/CalcScope.d.ts +35 -0
- package/types/src/calculation/state/CalcState.d.ts +28 -0
- package/types/src/calculation/state/CalculationContext.d.ts +125 -0
- package/types/src/calculation/state/IContextContainer.d.ts +320 -0
- package/types/src/calculation/state/index.d.ts +6 -0
- package/types/src/calculation/symbol/FunctionSymbolProvider.d.ts +44 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +93 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +144 -0
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +18 -0
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +19 -0
- package/types/src/calculation/symbol/TableColumnSymbolProvider.d.ts +21 -0
- package/types/src/calculation/symbol/TableSymbolProvider.d.ts +19 -0
- package/types/src/calculation/symbol/index.d.ts +9 -0
- package/types/src/cell/ICell.d.ts +672 -0
- package/types/src/cell/ICellHeader.d.ts +142 -0
- package/types/src/cell/ICellProtection.d.ts +41 -0
- package/types/src/cell/index.d.ts +4 -0
- package/types/src/cellRange/ICellHeaderRange.d.ts +306 -0
- package/types/src/cellRange/ICellHeaderRanges.d.ts +107 -0
- package/types/src/cellRange/ICellRange.d.ts +2509 -0
- package/types/src/cellRange/ICellRanges.d.ts +407 -0
- package/types/src/cellRange/ICellRegion.d.ts +133 -0
- package/types/src/cellRange/_GraphNode.d.ts +38 -0
- package/types/src/cellRange/index.d.ts +6 -0
- package/types/src/chart/Chart.d.ts +53 -0
- package/types/src/chart/IChart.d.ts +42 -0
- package/types/src/chart/index.d.ts +5 -0
- package/types/src/collections/ArraysGrid.d.ts +72 -0
- package/types/src/collections/BooleanList.d.ts +67 -0
- package/types/src/collections/GridMap.d.ts +47 -0
- package/types/src/collections/HashMap.d.ts +15 -0
- package/types/src/collections/IGrid.d.ts +278 -0
- package/types/src/collections/IList.d.ts +89 -0
- package/types/src/collections/IMap.d.ts +45 -0
- package/types/src/collections/IReadableList.d.ts +120 -0
- package/types/src/collections/ISortedMap.d.ts +171 -0
- package/types/src/collections/ISparseGrid.d.ts +61 -0
- package/types/src/collections/ISparseList.d.ts +103 -0
- package/types/src/collections/ISpatialMap.d.ts +515 -0
- package/types/src/collections/ISpatialMap3D.d.ts +116 -0
- package/types/src/collections/IWritableList.d.ts +41 -0
- package/types/src/collections/ImmutableList.d.ts +52 -0
- package/types/src/collections/IteratorUtils.d.ts +91 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +140 -0
- package/types/src/collections/OverlappingRangeIterator.d.ts +91 -0
- package/types/src/collections/RTree.d.ts +111 -0
- package/types/src/collections/RepeatingList.d.ts +20 -0
- package/types/src/collections/SortedMap.d.ts +396 -0
- package/types/src/collections/SparseGrid.d.ts +99 -0
- package/types/src/collections/SparseList.d.ts +90 -0
- package/types/src/collections/SpatialMap.d.ts +102 -0
- package/types/src/collections/SpatialMap3D.d.ts +64 -0
- package/types/src/collections/Tuple.d.ts +160 -0
- package/types/src/collections/_CollectionUtils.d.ts +25 -0
- package/types/src/collections/_GridUtils.d.ts +268 -0
- package/types/src/collections/_RunUtils.d.ts +170 -0
- package/types/src/collections/_SpatialUtils.d.ts +115 -0
- package/types/src/collections/index.d.ts +21 -0
- package/types/src/color/Color.d.ts +120 -0
- package/types/src/color/ColorSpace.d.ts +45 -0
- package/types/src/color/IColor.d.ts +1110 -0
- package/types/src/color/_BuiltInIndexDefs.d.ts +4 -0
- package/types/src/color/_BuiltInNamedDefs.d.ts +29 -0
- package/types/src/color/_BuiltInSchemeDefs.d.ts +7 -0
- package/types/src/color/_ColorUtils.d.ts +93 -0
- package/types/src/color/index.d.ts +3 -0
- package/types/src/comment/IComment.d.ts +108 -0
- package/types/src/comment/index.d.ts +2 -0
- package/types/src/condition/AnchoredConditional.d.ts +263 -0
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +83 -0
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/BlankOperator.d.ts +9 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +11 -0
- package/types/src/condition/BuiltInOperators/ErrorOperator.d.ts +9 -0
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +17 -0
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +14 -0
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +13 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/UniqueOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ValidEmailOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ValidUrlOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/index.d.ts +59 -0
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +43 -0
- package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +12 -0
- package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +16 -0
- package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/index.d.ts +18 -0
- package/types/src/condition/Condition.d.ts +123 -0
- package/types/src/condition/ICondition.d.ts +915 -0
- package/types/src/condition/_ConditionUtils.d.ts +190 -0
- package/types/src/condition/index.d.ts +3 -0
- package/types/src/conditionalFormat/ConditionalEntry.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +190 -0
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +20 -0
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +518 -0
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +70 -0
- package/types/src/conditionalFormat/_ConditionalMessages.d.ts +2 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/dataValidation/DataValidation.d.ts +121 -0
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -0
- package/types/src/dataValidation/IDataValidation.d.ts +327 -0
- package/types/src/dataValidation/IDataValidationCollection.d.ts +63 -0
- package/types/src/dataValidation/_DataValidationMessages.d.ts +2 -0
- package/types/src/dataValidation/_Utils.d.ts +10 -0
- package/types/src/dataValidation/index.d.ts +3 -0
- package/types/src/date/DateUtils.d.ts +8 -0
- package/types/src/date/_DateUtils.d.ts +122 -0
- package/types/src/date/index.d.ts +2 -0
- package/types/src/externalBook/ExternalBookCollection.d.ts +36 -0
- package/types/src/externalBook/IExternalBook.d.ts +97 -0
- package/types/src/externalBook/IExternalBookCollection.d.ts +29 -0
- package/types/src/externalBook/index.d.ts +3 -0
- package/types/src/fill/IEffect.d.ts +389 -0
- package/types/src/fill/IFill.d.ts +597 -0
- package/types/src/fill/IStroke.d.ts +265 -0
- package/types/src/fill/_BuiltInPatterns.d.ts +27 -0
- package/types/src/fill/index.d.ts +4 -0
- package/types/src/filter/IFilter.d.ts +83 -0
- package/types/src/filter/index.d.ts +2 -0
- package/types/src/font/CanvasFontMeasurer.d.ts +25 -0
- package/types/src/font/ExtendedTextMetrics.d.ts +1 -0
- package/types/src/font/Font.d.ts +19 -0
- package/types/src/font/FontKitFontMeasurer.d.ts +11 -0
- package/types/src/font/FontUtils.d.ts +9 -0
- package/types/src/font/IFont.d.ts +261 -0
- package/types/src/font/IFontCollection.d.ts +31 -0
- package/types/src/font/SimpleFontMeasurer.d.ts +4 -0
- package/types/src/font/_FontUtils.d.ts +22 -0
- package/types/src/font/index.d.ts +5 -0
- package/types/src/history/IHistory.d.ts +110 -0
- package/types/src/history/index.d.ts +2 -0
- package/types/src/hyperlink/IHyperlink.d.ts +96 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +21 -0
- package/types/src/hyperlink/index.d.ts +2 -0
- package/types/src/i18n/LanguagePack.d.ts +97 -0
- package/types/src/i18n/LocaleProfile.d.ts +15 -0
- package/types/src/i18n/_CurrencyData.d.ts +20 -0
- package/types/src/i18n/functionLocales.d.ts +6 -0
- package/types/src/i18n/index.d.ts +4 -0
- package/types/src/i18n/locales.d.ts +3 -0
- package/types/src/index.d.ts +71 -0
- package/types/src/io/AbstractBackingStore.d.ts +53 -0
- package/types/src/io/ArrayBackingStore.d.ts +34 -0
- package/types/src/io/IWorkbookIO.d.ts +1322 -0
- package/types/src/io/WorkbookIO.d.ts +91 -0
- package/types/src/io/WorkbookOrigin.d.ts +114 -0
- package/types/src/io/WorkbookRegistry.d.ts +49 -0
- package/types/src/io/index.d.ts +5 -0
- package/types/src/lib/file/file.browser.d.ts +41 -0
- package/types/src/lib/file/file.node.d.ts +25 -0
- package/types/src/lib/utils/_Utils.d.ts +20 -0
- package/types/src/lib/utils/banner.d.ts +6 -0
- package/types/src/lib/utils/utils.browser.d.ts +28 -0
- package/types/src/lib/utils/utils.node.d.ts +42 -0
- package/types/src/license/LicenseDetails.d.ts +22 -0
- package/types/src/license/LicenseManager.d.ts +63 -0
- package/types/src/license/index.d.ts +3 -0
- package/types/src/license/license-key.d.ts +33 -0
- package/types/src/listener/IListener.d.ts +62 -0
- package/types/src/listener/ListenerEmitter.d.ts +47 -0
- package/types/src/listener/index.d.ts +2 -0
- package/types/src/model/AbstractModel.d.ts +90 -0
- package/types/src/model/IModel.d.ts +108 -0
- package/types/src/model/_ModelMessages.d.ts +2 -0
- package/types/src/model/index.d.ts +3 -0
- package/types/src/movable/CustomElement.d.ts +42 -0
- package/types/src/movable/ICustomElement.d.ts +29 -0
- package/types/src/movable/IGroup.d.ts +30 -0
- package/types/src/movable/IMovable.d.ts +327 -0
- package/types/src/movable/IMovableCollection.d.ts +129 -0
- package/types/src/movable/IMovableSelection.d.ts +49 -0
- package/types/src/movable/Movable.d.ts +221 -0
- package/types/src/movable/MovableCollection.d.ts +29 -0
- package/types/src/movable/_MovableUtils.d.ts +4 -0
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +41 -0
- package/types/src/named/INamed.d.ts +225 -0
- package/types/src/named/INamedCollection.d.ts +230 -0
- package/types/src/named/NamedCollection.d.ts +302 -0
- package/types/src/named/_BuiltInNamed.d.ts +6 -0
- package/types/src/named/index.d.ts +3 -0
- package/types/src/numFmt/BuiltInFormats.d.ts +49 -0
- package/types/src/numFmt/IFormatEngine.d.ts +149 -0
- package/types/src/numFmt/NumberFormatBuilder.d.ts +46 -0
- package/types/src/numFmt/NumberFormatParser.d.ts +168 -0
- package/types/src/numFmt/NumberFormatStyles.d.ts +43 -0
- package/types/src/numFmt/NumberFormatType.d.ts +79 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +33 -0
- package/types/src/numFmt/_BuiltInNumberFormats.d.ts +12 -0
- package/types/src/numFmt/_FormatCell.d.ts +52 -0
- package/types/src/numFmt/_NumFmtUtils.d.ts +102 -0
- package/types/src/numFmt/index.d.ts +105 -0
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +15 -0
- package/types/src/numFmt/vendor/numfmt/index.d.ts +721 -0
- package/types/src/picture/IPicture.d.ts +69 -0
- package/types/src/picture/Picture.d.ts +67 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +63 -0
- package/types/src/primitives/Criteria.d.ts +35 -0
- package/types/src/primitives/FormulaContext.d.ts +2 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +255 -0
- package/types/src/primitives/Range.d.ts +221 -0
- package/types/src/primitives/RangeStats.d.ts +48 -0
- package/types/src/primitives/ReferenceRange.d.ts +19 -0
- package/types/src/primitives/Runtime.d.ts +55 -0
- package/types/src/primitives/ScalarCollation.d.ts +174 -0
- package/types/src/primitives/TextFold.d.ts +62 -0
- package/types/src/primitives/_PrimitiveMessages.d.ts +3 -0
- package/types/src/primitives/index.d.ts +7 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +119 -0
- package/types/src/primitives/stats/Cancellation.d.ts +43 -0
- package/types/src/primitives/stats/FrequencyStats.d.ts +94 -0
- package/types/src/primitives/stats/Ranked.d.ts +26 -0
- package/types/src/primitives/stats/ScalarOrder.d.ts +18 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +48 -0
- package/types/src/primitives/stats/index.d.ts +7 -0
- package/types/src/print/IPrint.d.ts +234 -0
- package/types/src/print/index.d.ts +2 -0
- package/types/src/protectedRange/IProtectedRange.d.ts +239 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +73 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +101 -0
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +21 -0
- package/types/src/protectedRange/index.d.ts +3 -0
- package/types/src/protection/DefaultProtection.d.ts +43 -0
- package/types/src/protection/IProtection.d.ts +170 -0
- package/types/src/protection/PasswordHasher.d.ts +35 -0
- package/types/src/protection/index.d.ts +6 -0
- package/types/src/resource/IResource.d.ts +98 -0
- package/types/src/resource/IResourceCollection.d.ts +96 -0
- package/types/src/resource/Resource.d.ts +39 -0
- package/types/src/resource/ResourceCollection.d.ts +19 -0
- package/types/src/resource/_ResourceMessages.d.ts +4 -0
- package/types/src/resource/index.d.ts +5 -0
- package/types/src/resource/resourceKinds.d.ts +23 -0
- package/types/src/richData/index.d.ts +1 -0
- package/types/src/scripting/FunctionCollection.d.ts +88 -0
- package/types/src/scripting/IFunctionCollection.d.ts +208 -0
- package/types/src/scripting/IModule.d.ts +82 -0
- package/types/src/scripting/IModuleCollection.d.ts +79 -0
- package/types/src/scripting/IScript.d.ts +289 -0
- package/types/src/scripting/ITypedFunction.d.ts +61 -0
- package/types/src/scripting/MacroFunction.d.ts +15 -0
- package/types/src/scripting/Module.d.ts +39 -0
- package/types/src/scripting/ModuleCollection.d.ts +56 -0
- package/types/src/scripting/Runtime.d.ts +16 -0
- package/types/src/scripting/Scripts.d.ts +79 -0
- package/types/src/scripting/TypedFunction.d.ts +161 -0
- package/types/src/scripting/_FunctionIndex.d.ts +111 -0
- package/types/src/scripting/_FunctionMessages.d.ts +6 -0
- package/types/src/scripting/_ModuleUtils.d.ts +5 -0
- package/types/src/scripting/_ScriptUtils.d.ts +18 -0
- package/types/src/scripting/enumManifest.browser.d.ts +9 -0
- package/types/src/scripting/enumManifest.node.d.ts +13 -0
- package/types/src/scripting/index.d.ts +4 -0
- package/types/src/selection/IRangeSelection.d.ts +307 -0
- package/types/src/selection/RangeSelection.d.ts +144 -0
- package/types/src/selection/_RangeSelectionUtils.d.ts +32 -0
- package/types/src/selection/index.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +279 -0
- package/types/src/shape/Shape.d.ts +54 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/sheet/CellRegion.d.ts +106 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +97 -0
- package/types/src/sheet/ISheet.d.ts +1074 -0
- package/types/src/sheet/ISheetCollection.d.ts +70 -0
- package/types/src/sheet/NamedCellRange.d.ts +45 -0
- package/types/src/sheet/NamedRange.d.ts +30 -0
- package/types/src/sheet/Sheet.d.ts +1068 -0
- package/types/src/sheet/SheetCell.d.ts +335 -0
- package/types/src/sheet/SheetCollection.d.ts +18 -0
- package/types/src/sheet/SheetRange.d.ts +362 -0
- package/types/src/sheet/SheetRanges.d.ts +225 -0
- package/types/src/sheet/_CopyUtils.d.ts +33 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +70 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +18 -0
- package/types/src/sheet/_SheetCoords.d.ts +54 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +9 -0
- package/types/src/sheet/_SheetMessages.d.ts +11 -0
- package/types/src/sheet/_SheetMutations.d.ts +137 -0
- package/types/src/sheet/_SheetSortUtils.d.ts +9 -0
- package/types/src/sheet/_SheetStateReader.d.ts +161 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +446 -0
- package/types/src/sheet/_SheetUtils.d.ts +265 -0
- package/types/src/sheet/clipboard/IHTMLParser.d.ts +92 -0
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +55 -0
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +29 -0
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +46 -0
- package/types/src/sheet/clipboard/_ClipboardUtils.d.ts +10 -0
- package/types/src/sheet/clipboard/index.d.ts +2 -0
- package/types/src/sheet/index.d.ts +6 -0
- package/types/src/sheet/listener/RangesListener.d.ts +32 -0
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +19 -0
- package/types/src/sheet/listener/index.d.ts +3 -0
- package/types/src/sheet/spatial/MergeEntry.d.ts +17 -0
- package/types/src/sheet/spatial/index.d.ts +2 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +540 -0
- package/types/src/sheet/style/SheetDirectStyle.d.ts +130 -0
- package/types/src/sheet/style/SheetNamedStyle.d.ts +47 -0
- package/types/src/sheet/style/SheetTableStyle.d.ts +47 -0
- package/types/src/sheet/style/UsedRangeSpatialMap.d.ts +80 -0
- package/types/src/sheet/style/_Resolvers.d.ts +41 -0
- package/types/src/sheet/style/_StyleUtils.d.ts +69 -0
- package/types/src/sheet/style/index.d.ts +1 -0
- package/types/src/sheetHeader/ISheetHeader.d.ts +217 -0
- package/types/src/sheetHeader/SheetCellHeader.d.ts +61 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +54 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +46 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +257 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +94 -0
- package/types/src/sheetHeader/_InvalidSheetHeaderRange.d.ts +7 -0
- package/types/src/sheetHeader/index.d.ts +2 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +150 -0
- package/types/src/sheetProtection/SheetProtection.d.ts +39 -0
- package/types/src/sheetProtection/index.d.ts +2 -0
- package/types/src/sheetView/ISheetView.d.ts +439 -0
- package/types/src/sheetView/SheetView.d.ts +113 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +19 -0
- package/types/src/sheetView/index.d.ts +2 -0
- package/types/src/slicer/ISlicer.d.ts +38 -0
- package/types/src/slicer/Slicer.d.ts +41 -0
- package/types/src/slicer/index.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +318 -0
- package/types/src/sort/Sort.d.ts +48 -0
- package/types/src/sort/_SortUtils.d.ts +12 -0
- package/types/src/sort/index.d.ts +3 -0
- package/types/src/string/IStringCollection.d.ts +50 -0
- package/types/src/string/StringCollection.d.ts +26 -0
- package/types/src/string/index.d.ts +3 -0
- package/types/src/style/IStyle.d.ts +485 -0
- package/types/src/style/IStyleCollection.d.ts +292 -0
- package/types/src/style/StyleCollection.d.ts +125 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +18 -0
- package/types/src/style/_BuiltInStyleNames.d.ts +20 -0
- package/types/src/style/index.d.ts +5 -0
- package/types/src/table/AnchoredTable.d.ts +349 -0
- package/types/src/table/AutoTable.d.ts +64 -0
- package/types/src/table/ITable.d.ts +714 -0
- package/types/src/table/ITableCollection.d.ts +88 -0
- package/types/src/table/ITableStyle.d.ts +318 -0
- package/types/src/table/Table.d.ts +8 -0
- package/types/src/table/TableCollection.d.ts +20 -0
- package/types/src/table/_AutoTableColumn.d.ts +27 -0
- package/types/src/table/_BuiltInTableStyles.d.ts +9 -0
- package/types/src/table/_FilterField.d.ts +30 -0
- package/types/src/table/_NamedTable.d.ts +84 -0
- package/types/src/table/_NamedTableSource.d.ts +57 -0
- package/types/src/table/_SortField.d.ts +29 -0
- package/types/src/table/_TableColumn.d.ts +51 -0
- package/types/src/table/_TableMessages.d.ts +5 -0
- package/types/src/table/_TableUtils.d.ts +94 -0
- package/types/src/table/index.d.ts +5 -0
- package/types/src/text/AutoNumberingScheme.d.ts +175 -0
- package/types/src/text/Bullet.d.ts +34 -0
- package/types/src/text/IText.d.ts +53 -0
- package/types/src/text/ITextFrame.d.ts +313 -0
- package/types/src/text/TextBoxAlignment.d.ts +141 -0
- package/types/src/text/TextFrame.d.ts +43 -0
- package/types/src/text/TextLine.d.ts +24 -0
- package/types/src/text/TextParagraph.d.ts +61 -0
- package/types/src/text/TextRotation.d.ts +106 -0
- package/types/src/text/TextRun.d.ts +85 -0
- package/types/src/text/TextUtils.d.ts +165 -0
- package/types/src/text/TextVisitor.d.ts +11 -0
- package/types/src/text/TextWrapper.d.ts +78 -0
- package/types/src/text/_TextUtils.d.ts +90 -0
- package/types/src/text/impl/Phrase.d.ts +3 -0
- package/types/src/text/impl/TabStrategy.d.ts +9 -0
- package/types/src/text/impl/WordWrapUtils.d.ts +6 -0
- package/types/src/text/index.d.ts +7 -0
- package/types/src/text/richtext/IStyledFont.d.ts +330 -0
- package/types/src/text/richtext/index.d.ts +2 -0
- package/types/src/theme/ITheme.d.ts +252 -0
- package/types/src/theme/IThemeCollection.d.ts +84 -0
- package/types/src/theme/ThemeCollection.d.ts +62 -0
- package/types/src/theme/_BuiltInColorSchemes.d.ts +3 -0
- package/types/src/theme/_BuiltInFontSchemes.d.ts +3 -0
- package/types/src/theme/_BuiltInThemeDefs.d.ts +3 -0
- package/types/src/theme/_ThemeMessages.d.ts +3 -0
- package/types/src/theme/_ThemeUtils.d.ts +3 -0
- package/types/src/theme/index.d.ts +4 -0
- package/types/src/transaction/ITransaction.d.ts +594 -0
- package/types/src/transaction/Transaction.d.ts +184 -0
- package/types/src/transaction/TransactionSaveStateManager.d.ts +85 -0
- package/types/src/transaction/TransactionUndoManager.d.ts +60 -0
- package/types/src/transaction/index.d.ts +5 -0
- package/types/src/type/ICollection.d.ts +110 -0
- package/types/src/type/IProperties.d.ts +51 -0
- package/types/src/type/ITypes.d.ts +69 -0
- package/types/src/type/Registry.d.ts +66 -0
- package/types/src/type/index.d.ts +5 -0
- package/types/src/utils/GeomUtils.d.ts +61 -0
- package/types/src/utils/ObjectPath.d.ts +9 -0
- package/types/src/utils/Profiler.d.ts +38 -0
- package/types/src/utils/_CSSUtils.d.ts +156 -0
- package/types/src/utils/_GeomUtils.d.ts +14 -0
- package/types/src/utils/_RangeCoordUtils.d.ts +84 -0
- package/types/src/utils/_RangeSetUtils.d.ts +55 -0
- package/types/src/utils/index.d.ts +2 -0
- package/types/src/workbook/IWorkbook.d.ts +711 -0
- package/types/src/workbook/Workbook.d.ts +342 -0
- package/types/src/workbook/WorkbookRange.d.ts +25 -0
- package/types/src/workbook/WorkbookRanges.d.ts +39 -0
- package/types/src/workbook/_WorkbookMessages.d.ts +8 -0
- package/types/src/workbook/_WorkbookUtils.d.ts +35 -0
- package/types/src/workbook/index.d.ts +3 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +57 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +14 -0
- package/types/src/workbookProtection/index.d.ts +2 -0
- package/types/src/workbookView/IWorkbookView.d.ts +134 -0
- package/types/src/workbookView/WorkbookView.d.ts +49 -0
- package/types/src/workbookView/index.d.ts +3 -0
- package/browser/cjs/-P9BHlnCf8OF6D_m.cjs +0 -6
- package/browser/cjs/4kU87sIrnTEoJHwl.cjs +0 -6
- package/browser/cjs/B8mBx-uU2X9Qvdnr.cjs +0 -6
- package/browser/cjs/BD9lJn7w8OVsIwgC.cjs +0 -6
- package/browser/cjs/BI57E6P5MbZI3G2Z.cjs +0 -6
- package/browser/cjs/BRgYzaAY9tLpJe7C.cjs +0 -6
- package/browser/cjs/BdoGTvcTjso5IcRq.cjs +0 -15
- package/browser/cjs/C3ScwpfBnQ8JeHF-.cjs +0 -6
- package/browser/cjs/CI8H5FLYtzy-Y2TO.cjs +0 -55
- package/browser/cjs/ClUc2Qdf-BFmgsJR.cjs +0 -6
- package/browser/cjs/CsEmF6ZwF-2A9AvC.cjs +0 -6
- package/browser/cjs/D6eH4loatnriRosn.cjs +0 -124
- package/browser/cjs/DJTioC8laMAxiW-z.cjs +0 -6
- package/browser/cjs/DN6U4mb4Jt2b37q-.cjs +0 -7
- package/browser/cjs/DfNwTsshId9JPwTK.cjs +0 -6
- package/browser/cjs/DnQwOaG_1n5GvCnM.cjs +0 -6
- package/browser/cjs/DtOYNHcDq5p3S21C.cjs +0 -6
- package/browser/cjs/Dy2xo5nrA4OFe7w4.cjs +0 -6
- package/browser/cjs/EzhtX7d4GOngN0Se.cjs +0 -6
- package/browser/cjs/FBky5iT5me5H1I0-.cjs +0 -6
- package/browser/cjs/JcziJrpVHeAEo8Iv.cjs +0 -6
- package/browser/cjs/LABm2VcP5Duieabc.cjs +0 -6
- package/browser/cjs/OZxxkm3CI5jiE3O-.cjs +0 -6
- package/browser/cjs/W8_0e_fQB-spiB55.cjs +0 -6
- package/browser/cjs/nS_oDgpzBeOV487v.cjs +0 -6
- package/browser/cjs/srhqHYaGNtcM9evy.cjs +0 -6
- package/browser/cjs/v2J4J4s0rRAvsx4v.cjs +0 -6
- package/browser/esm/8Cdp6eg5fQM4U0CD.mjs +0 -10
- package/browser/esm/BvtSjnucMGltTjeM.mjs +0 -426
- package/browser/esm/Bzw2Xms8ZtifZcAF.mjs +0 -10
- package/browser/esm/C9ojFSLlGrdG3EDE.mjs +0 -10
- package/browser/esm/CPxdCZqGhuQENst8.mjs +0 -10
- package/browser/esm/CQXqHgLFDd57bQSy.mjs +0 -10
- package/browser/esm/CRlsrdZLcL-QKyo2.mjs +0 -12
- package/browser/esm/CUqge0vhYI_M8Hpg.mjs +0 -10
- package/browser/esm/C__wCYJcwKkBqp8t.mjs +0 -10
- package/browser/esm/Cou0jxSdkKrqQBPA.mjs +0 -10
- package/browser/esm/CtGy0C3HHvNhQ3j5.mjs +0 -10
- package/browser/esm/Ctol2MswJyCxIJcQ.mjs +0 -10
- package/browser/esm/D7tUJDQqPM4e3FEC.mjs +0 -10
- package/browser/esm/DB5Wpq1m-bJ7gpBF.mjs +0 -10
- package/browser/esm/DLXAhFMo3NyECo8b.mjs +0 -23842
- package/browser/esm/DTlPJulnTLqG3WSw.mjs +0 -10
- package/browser/esm/DwfM2tfEPAzMl86c.mjs +0 -10
- package/browser/esm/Dx0TIy0V5EVTNOEZ.mjs +0 -10
- package/browser/esm/Dxfd2MfY8kHHUtnu.mjs +0 -4022
- package/browser/esm/E0SwR3N6qggAhdBh.mjs +0 -10
- package/browser/esm/JGdZf2WBzvkRao7-.mjs +0 -10
- package/browser/esm/NAcqiYlYK4mm9q_F.mjs +0 -10
- package/browser/esm/NGg21AIVBhRCHoOh.mjs +0 -10
- package/browser/esm/PjtmxdNFMVskYmPB.mjs +0 -10
- package/browser/esm/a_LQ18tLbXq3N9hu.mjs +0 -10
- package/browser/esm/hXx5ZKLpc4RvmCjH.mjs +0 -10
- package/browser/esm/zoqPtKWJmGQs1ZUb.mjs +0 -5653
- package/node/esm/7QlvuodPxz-B25P9.mjs +0 -10
- package/node/esm/8Cdp6eg5fQM4U0CD.mjs +0 -10
- package/node/esm/B94PecmbGgqY0k9O.mjs +0 -13
- package/node/esm/BpvIVwL4NNRKuaD7.mjs +0 -10
- package/node/esm/Bzw2Xms8ZtifZcAF.mjs +0 -10
- package/node/esm/C9ojFSLlGrdG3EDE.mjs +0 -10
- package/node/esm/CQXqHgLFDd57bQSy.mjs +0 -10
- package/node/esm/CSg2ysafDv5h1zz2.mjs +0 -2458
- package/node/esm/CUqge0vhYI_M8Hpg.mjs +0 -10
- package/node/esm/C__wCYJcwKkBqp8t.mjs +0 -10
- package/node/esm/Cou0jxSdkKrqQBPA.mjs +0 -10
- package/node/esm/CtlHMovXY4x1NgI6.mjs +0 -10
- package/node/esm/Ctol2MswJyCxIJcQ.mjs +0 -10
- package/node/esm/Cv3hTIkdeILrJGYc.mjs +0 -10
- package/node/esm/D7tUJDQqPM4e3FEC.mjs +0 -10
- package/node/esm/DTlPJulnTLqG3WSw.mjs +0 -10
- package/node/esm/Dvg1Ay14DLNhMgmD.mjs +0 -10
- package/node/esm/DwfM2tfEPAzMl86c.mjs +0 -10
- package/node/esm/Dx0TIy0V5EVTNOEZ.mjs +0 -10
- package/node/esm/F5A4vdvxqRt8hFAs.mjs +0 -10
- package/node/esm/NGg21AIVBhRCHoOh.mjs +0 -10
- package/node/esm/PjtmxdNFMVskYmPB.mjs +0 -10
- package/node/esm/a_LQ18tLbXq3N9hu.mjs +0 -10
- package/node/esm/hXx5ZKLpc4RvmCjH.mjs +0 -10
- package/node/esm/lUsLEOryW9viP9g7.mjs +0 -1072
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { IColor } from '../color';
|
|
2
|
+
import { formatValue as _formatValue } from './_NumFmtUtils';
|
|
3
|
+
import { FormatInfo, FormatDateInfo } from './IFormatEngine';
|
|
4
|
+
/**
|
|
5
|
+
* Options for parsing a NumberFormat.
|
|
6
|
+
*/
|
|
7
|
+
export interface ParserOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Call when a repeat char
|
|
10
|
+
*/
|
|
11
|
+
onRepeatChar?: (offset: number, character: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The character to add to the formatted string when a spacing character is
|
|
14
|
+
* introduced.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue ' '
|
|
17
|
+
*/
|
|
18
|
+
spacingCharacter?: string;
|
|
19
|
+
/**
|
|
20
|
+
* When '_' is encountered this is called.
|
|
21
|
+
*/
|
|
22
|
+
onSpacingChar?: (offset: number, character: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* When '?' this encountered this is called.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue ' '
|
|
27
|
+
*/
|
|
28
|
+
digitCharacter?: string;
|
|
29
|
+
onDigitChar?: (offset: number) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface ParsedCharPlaceHolder {
|
|
32
|
+
offset: number;
|
|
33
|
+
char: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const ParseRunType: {
|
|
36
|
+
/**
|
|
37
|
+
* Contains text.
|
|
38
|
+
*/
|
|
39
|
+
readonly Text: "text";
|
|
40
|
+
/**
|
|
41
|
+
* Indicates the text at this run should repeat.
|
|
42
|
+
*/
|
|
43
|
+
readonly Repeat: "repeat";
|
|
44
|
+
/**
|
|
45
|
+
* Indicates the text at this run should not be displayed but used for measuring white-space.
|
|
46
|
+
*/
|
|
47
|
+
readonly Spacing: "spacing";
|
|
48
|
+
};
|
|
49
|
+
export type ParseRunType = typeof ParseRunType[keyof typeof ParseRunType];
|
|
50
|
+
export interface ParsedRun {
|
|
51
|
+
type: ParseRunType;
|
|
52
|
+
width: number;
|
|
53
|
+
text: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ParsedRuns {
|
|
56
|
+
runs: readonly ParsedRun[];
|
|
57
|
+
readonly length: number;
|
|
58
|
+
readonly width: number;
|
|
59
|
+
readonly lastRepeatIndex: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* This interface returns rendering information about the formatted text based on the numberFormat.
|
|
63
|
+
*
|
|
64
|
+
* @see
|
|
65
|
+
* * {@link https://customformats.com/}
|
|
66
|
+
* * {@link https://exceljet.net/custom-number-formats}
|
|
67
|
+
* * {@link https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformats?view=openxml-2.8.1}
|
|
68
|
+
*/
|
|
69
|
+
export interface Parsed {
|
|
70
|
+
/**
|
|
71
|
+
* @remarks
|
|
72
|
+
* Never null
|
|
73
|
+
*/
|
|
74
|
+
readonly displayText: string;
|
|
75
|
+
/**
|
|
76
|
+
* If provided then there was a formatting error.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* If this is not `null` then a character should be displayed.
|
|
80
|
+
*
|
|
81
|
+
* This is different then repeatChars in that it will only display the value
|
|
82
|
+
* and not any additional.
|
|
83
|
+
*/
|
|
84
|
+
readonly errorPlaceholder: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* If there is a conditional color then this is the color to use.
|
|
87
|
+
*/
|
|
88
|
+
readonly conditionalColor: IColor | null;
|
|
89
|
+
/**
|
|
90
|
+
* From the '*' formatChar.
|
|
91
|
+
* A single character (usually a ' ' but can be anything)
|
|
92
|
+
*
|
|
93
|
+
* Repeats the next character in the format enough times to fill the column to its current width.
|
|
94
|
+
* There shall not be more than one asterisk in one section of the format. If more than one asterisk
|
|
95
|
+
* appears in one section of the format, all but the last asterisk shall be ignored.
|
|
96
|
+
* [Example: if the number format is 0*x, and the value 3 is in the cell, the value 3xxxxxx is displayed.
|
|
97
|
+
* The number of x characters that are displayed in the cell varies based on the width of the column. end example]
|
|
98
|
+
*/
|
|
99
|
+
readonly repeatChars: ParsedCharPlaceHolder[];
|
|
100
|
+
/**
|
|
101
|
+
* From the '_' formatChar.
|
|
102
|
+
* An array of single characters.
|
|
103
|
+
*
|
|
104
|
+
* Skips the width of the next character.
|
|
105
|
+
* Useful for lining up negative and positive values in different cells of the same column.
|
|
106
|
+
* [Example: The number format _(0.0_);(0.0) aligns the numbers 2.3 and the column even though the
|
|
107
|
+
* negative number is enclosed by parentheses. end example]
|
|
108
|
+
*/
|
|
109
|
+
readonly spacingChars: ParsedCharPlaceHolder[];
|
|
110
|
+
/**
|
|
111
|
+
* The displayText broken down into runs. Useful for more complex layouts.
|
|
112
|
+
*/
|
|
113
|
+
readonly formattedRuns: ParsedRuns;
|
|
114
|
+
/**
|
|
115
|
+
* If true then the text could wrap if it doesn't fit.
|
|
116
|
+
*/
|
|
117
|
+
readonly canWrap: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Returns the value as a javascript date if possible. Will
|
|
120
|
+
* return null if not possible.
|
|
121
|
+
*/
|
|
122
|
+
readonly asDate: Date | null;
|
|
123
|
+
/**
|
|
124
|
+
* If the format is a date format then this is true.
|
|
125
|
+
*/
|
|
126
|
+
readonly isDateFormat: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* If the format is a time format then this is true.
|
|
129
|
+
*/
|
|
130
|
+
readonly isTimeFormat: boolean;
|
|
131
|
+
}
|
|
132
|
+
export declare const Parser: Readonly<{
|
|
133
|
+
/**
|
|
134
|
+
* Language Code Identifier (LCIDs) are 'embedded' within numberFormat.
|
|
135
|
+
*
|
|
136
|
+
* There is the original (being deprecated) format and the new 'locale names' format.
|
|
137
|
+
* The original format (most widely used at time of writing but being deprecated). Is an 8 digit hex number (xxyyzzzz). If the number is less than this then it is assumed to have
|
|
138
|
+
* leading 0s. The hex is broken down into 3 parts.
|
|
139
|
+
* xx - appearance of the number (see)
|
|
140
|
+
*
|
|
141
|
+
* Also modern Excel 365 now allows this syntax: [$-lg-CN,xxyy] where lg-CN is the language and country of the locale (replacing zzzz), and xxyy are as defined in the prior answer. Leading zeros are not needed and the whole ,xxyy part is optional.
|
|
142
|
+
* In addition, a gannen suffix -x-gannen is allowed on Japanese locale codes, which replaces a 1 value (first year of emperor reign) for e formats with 元. For example:
|
|
143
|
+
*/
|
|
144
|
+
formatValue: typeof _formatValue;
|
|
145
|
+
/**
|
|
146
|
+
* Returns true if the format contains fraction formatting.
|
|
147
|
+
*/
|
|
148
|
+
isFractionFormat: (format: string) => boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Adjust the decimal in a format by an amount.
|
|
151
|
+
*
|
|
152
|
+
* @param format The format string.
|
|
153
|
+
* @param amount The number of decimals to adjust by.
|
|
154
|
+
*/
|
|
155
|
+
adjustDecimalPlaces: (format: string, amount: number) => string;
|
|
156
|
+
/**
|
|
157
|
+
* Structural metadata about a format code (category, decimals, grouping, ...),
|
|
158
|
+
* for format dialogs and classification. `null` if the code is invalid.
|
|
159
|
+
*/
|
|
160
|
+
getFormatInfo: (format: string) => FormatInfo | null;
|
|
161
|
+
/**
|
|
162
|
+
* Which date/time components a date format renders. `null` for non-date codes.
|
|
163
|
+
*/
|
|
164
|
+
getFormatDateInfo: (format: string) => FormatDateInfo | null;
|
|
165
|
+
/** True if a format code parses (for live custom-code validation). */
|
|
166
|
+
isValidFormat: (format: string) => boolean;
|
|
167
|
+
}>;
|
|
168
|
+
//# sourceMappingURL=NumberFormatParser.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Type } from './NumberFormatType';
|
|
2
|
+
/**
|
|
3
|
+
* These are only returned if all segments have the same values.
|
|
4
|
+
*/
|
|
5
|
+
export interface StyleConfig {
|
|
6
|
+
separator?: boolean;
|
|
7
|
+
decimalPlaces?: number;
|
|
8
|
+
currencySymbol?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns meta data about the number format.
|
|
12
|
+
*/
|
|
13
|
+
export interface Style {
|
|
14
|
+
numberFormat: string;
|
|
15
|
+
/**
|
|
16
|
+
* Category of format/
|
|
17
|
+
*/
|
|
18
|
+
formatType: Type;
|
|
19
|
+
/**
|
|
20
|
+
* If used in a menu it's the sort oder.
|
|
21
|
+
* TODO - enrich this since excel and drawMl (charts are slightly different. Union these?)
|
|
22
|
+
*/
|
|
23
|
+
primary?: number;
|
|
24
|
+
args?: StyleConfig;
|
|
25
|
+
regMatch?: RegExp;
|
|
26
|
+
}
|
|
27
|
+
export declare class Styles {
|
|
28
|
+
/**
|
|
29
|
+
* Find the style for a numberFormat.
|
|
30
|
+
*/
|
|
31
|
+
lookupStyle(numberFormat: string | number): Style;
|
|
32
|
+
/**
|
|
33
|
+
* Returns an ordered list of a select set of the builtIn FormatCodes.
|
|
34
|
+
*/
|
|
35
|
+
lookupPrimary(): Style[];
|
|
36
|
+
/**
|
|
37
|
+
* Returns all catalog styles for a category (`formatType`), in catalog order.
|
|
38
|
+
* Used by the format dialog to list a category's preset variants.
|
|
39
|
+
*/
|
|
40
|
+
lookupByType(formatType: string | Type): Style[];
|
|
41
|
+
lookupDefault(numberFormatKey: string | Type): string | undefined;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=NumberFormatStyles.d.ts.map
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the built-in categorization of a number format, or 'Custom' if the format is not recognized as a built-in type.
|
|
3
|
+
*
|
|
4
|
+
* Excel has the following:
|
|
5
|
+
* @see
|
|
6
|
+
* {@link https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformats?view=openxml-2.8.1}
|
|
7
|
+
*/
|
|
8
|
+
export declare const Type: {
|
|
9
|
+
/**
|
|
10
|
+
* The default format, displays numbers as entered.
|
|
11
|
+
*/
|
|
12
|
+
readonly General: "General";
|
|
13
|
+
/**
|
|
14
|
+
* Displays numbers with a thousands separator and two decimal places.
|
|
15
|
+
*/
|
|
16
|
+
readonly Number: "Number";
|
|
17
|
+
/**
|
|
18
|
+
* Formats numbers as currency with a currency symbol and two decimal places.
|
|
19
|
+
*/
|
|
20
|
+
readonly Currency: "Currency";
|
|
21
|
+
/**
|
|
22
|
+
* Formats numbers as currency, aligning currency symbols and decimal points in a column.
|
|
23
|
+
*/
|
|
24
|
+
readonly Accounting: "Accounting";
|
|
25
|
+
/**
|
|
26
|
+
* Displays dates in a short format (e.g., "M/d/yyyy").
|
|
27
|
+
*/
|
|
28
|
+
readonly ShortDate: "Short Date";
|
|
29
|
+
/**
|
|
30
|
+
* Displays dates in a long format (e.g., "dddd, MMMM d, yyyy").
|
|
31
|
+
*/
|
|
32
|
+
readonly LongDate: "Long Date";
|
|
33
|
+
/**
|
|
34
|
+
* Displays dates in a medium format (e.g., "d-mmm-yy").
|
|
35
|
+
*/
|
|
36
|
+
readonly MediumDate: "Medium Date";
|
|
37
|
+
/**
|
|
38
|
+
* Displays times in a short format (e.g., "h:mm AM/PM").
|
|
39
|
+
*/
|
|
40
|
+
readonly ShortTime: "Short Time";
|
|
41
|
+
/**
|
|
42
|
+
* Displays times in a medium format (e.g., "h:mm:ss AM/PM").
|
|
43
|
+
*/
|
|
44
|
+
readonly MediumTime: "Medium Time";
|
|
45
|
+
/**
|
|
46
|
+
* Displays times in a long format (e.g., "h:mm:ss.000 AM/PM").
|
|
47
|
+
*/
|
|
48
|
+
readonly LongTime: "Long Time";
|
|
49
|
+
/**
|
|
50
|
+
* Displays numbers with a thousands separator.
|
|
51
|
+
*/
|
|
52
|
+
readonly Comma: "Comma";
|
|
53
|
+
/**
|
|
54
|
+
* Displays numbers as percentages with a percent symbol.
|
|
55
|
+
*/
|
|
56
|
+
readonly Percentage: "Percentage";
|
|
57
|
+
/**
|
|
58
|
+
* Displays numbers as fractions.
|
|
59
|
+
*/
|
|
60
|
+
readonly Fraction: "Fraction";
|
|
61
|
+
/**
|
|
62
|
+
* Displays numbers in scientific notation.
|
|
63
|
+
*/
|
|
64
|
+
readonly Scientific: "Scientific";
|
|
65
|
+
/**
|
|
66
|
+
* Treats the cell content as text, even if it appears to be a number.
|
|
67
|
+
*/
|
|
68
|
+
readonly Text: "Text";
|
|
69
|
+
/**
|
|
70
|
+
* A placeholder for special or custom number formats.
|
|
71
|
+
*/
|
|
72
|
+
readonly Special: "Special";
|
|
73
|
+
/**
|
|
74
|
+
* Indicates a user-defined or custom number format.
|
|
75
|
+
*/
|
|
76
|
+
readonly Custom: "Custom";
|
|
77
|
+
};
|
|
78
|
+
export type Type = typeof Type[keyof typeof Type];
|
|
79
|
+
//# sourceMappingURL=NumberFormatType.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NumberFormatRef } from './BuiltInFormats';
|
|
2
|
+
import { FormatEngineOptions, FormatEngineResult, FormatInfo, FormatDateInfo, IFormatEngine } from './IFormatEngine';
|
|
3
|
+
/**
|
|
4
|
+
* The SheetXL number-format engine.
|
|
5
|
+
*
|
|
6
|
+
* Renders Excel format codes — and ECMA-376 built-in ids — to display text,
|
|
7
|
+
* section color, and the fill/skip placeholders the cell renderer uses for
|
|
8
|
+
* width-aware alignment.
|
|
9
|
+
*
|
|
10
|
+
* Locale-adaptive presets (`Short Date`, `[$-F800]`, ...) are resolved before
|
|
11
|
+
* the format code reaches the formatter, so built-ins such as `14`/`22` render
|
|
12
|
+
* per the viewer's locale rather than their canonical codes.
|
|
13
|
+
*/
|
|
14
|
+
export declare class NumfmtFormatEngine implements IFormatEngine {
|
|
15
|
+
readonly key: string;
|
|
16
|
+
/** @inheritdoc IFormatEngine.format */
|
|
17
|
+
format(format: NumberFormatRef, value: string | number, options?: FormatEngineOptions): FormatEngineResult;
|
|
18
|
+
/** @inheritdoc IFormatEngine.isDateFormat */
|
|
19
|
+
isDateFormat(format: NumberFormatRef): boolean;
|
|
20
|
+
/** @inheritdoc IFormatEngine.isTimeFormat */
|
|
21
|
+
isTimeFormat(format: NumberFormatRef): boolean;
|
|
22
|
+
/** @inheritdoc IFormatEngine.isFractionFormat */
|
|
23
|
+
isFractionFormat(format: NumberFormatRef): boolean;
|
|
24
|
+
/** @inheritdoc IFormatEngine.adjustDecimalPlaces */
|
|
25
|
+
adjustDecimalPlaces(format: NumberFormatRef, amount: number): string;
|
|
26
|
+
/** @inheritdoc IFormatEngine.getFormatInfo */
|
|
27
|
+
getFormatInfo(format: NumberFormatRef): FormatInfo | null;
|
|
28
|
+
/** @inheritdoc IFormatEngine.getFormatDateInfo */
|
|
29
|
+
getFormatDateInfo(format: NumberFormatRef): FormatDateInfo | null;
|
|
30
|
+
/** @inheritdoc IFormatEngine.isValidFormat */
|
|
31
|
+
isValidFormat(format: NumberFormatRef): boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=NumfmtFormatEngine.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NumberFormatRef } from './BuiltInFormats';
|
|
2
|
+
/**
|
|
3
|
+
* Find the default number format string for a format id as defined in OOXML.
|
|
4
|
+
*/
|
|
5
|
+
export declare function _BuiltInNumberFormats(fmtId: number): string;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the built-in numeric id for a format code, or the code itself if it
|
|
8
|
+
* is not a built-in. Numeric refs (already ids) pass through unchanged, which
|
|
9
|
+
* keeps stored ids lossless through the xlsx writer.
|
|
10
|
+
*/
|
|
11
|
+
export declare function _FindBuiltInNumberFormatId(fmtString: NumberFormatRef): string | number | undefined;
|
|
12
|
+
//# sourceMappingURL=_BuiltInNumberFormats.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ScalarType, Scalar, IRuntime } from '@sheetxl/primitives';
|
|
2
|
+
import { IColor } from '../color';
|
|
3
|
+
import { IStyle } from '../style';
|
|
4
|
+
import { NumberFormatRef } from './BuiltInFormats';
|
|
5
|
+
import { Parsed, ParserOptions } from './NumberFormatParser';
|
|
6
|
+
export declare function parseNumberFormat(runtime: IRuntime, value: Scalar, style: IStyle, type: ScalarType, numberFormat: NumberFormatRef, parseColor: (val: any) => IColor): Parsed;
|
|
7
|
+
/**
|
|
8
|
+
* The unformatted text for a number.
|
|
9
|
+
*
|
|
10
|
+
* Excel's binary→decimal conversion is 15 significant digits, rounded (`PI()` echoes in the
|
|
11
|
+
* formula bar as `3.14159265358979`, `2/3` as `0.666666666666667`); JavaScript's `String()`
|
|
12
|
+
* emits the shortest round-trip form — up to 17 digits. Round through `toPrecision(15)` to
|
|
13
|
+
* match (`Number()` strips the trailing zeros it pads with).
|
|
14
|
+
*
|
|
15
|
+
* JavaScript also switches to exponential notation outside `1e-7 .. 1e21` and writes the
|
|
16
|
+
* exponent marker in lowercase (`1e+30`). Excel spells it uppercase with a signed,
|
|
17
|
+
* at-least-two-digit exponent (`1E+30`, `1E-07`), so normalize to Excel's spelling.
|
|
18
|
+
*
|
|
19
|
+
* Exported for the SHOW FORMULAS text frame, which strips formatting down to the raw value
|
|
20
|
+
* (measured — see `unformattedNumberText`'s use in `SheetCell.csTextFrame`) and so needs this
|
|
21
|
+
* number spelling WITHOUT the date/percent conversions `unformattedTextFromCell` applies.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function unformattedNumberText(value: Scalar): string;
|
|
26
|
+
/**
|
|
27
|
+
* The text a value shows with formatting stripped ENTIRELY — SHOW FORMULAS' non-formula cell.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* A different rule from {@link unformattedTextFromCell} (the formula bar), and the difference is
|
|
31
|
+
* the point: measured over COM, Excel strips all formatting to the raw value here — a `m/d/yyyy`
|
|
32
|
+
* cell shows `45292`, `0.00%` shows `0.125` — while the formula bar keeps the date and the percent.
|
|
33
|
+
* Only the NUMBER SPELLING is shared ({@link unformattedNumberText}).
|
|
34
|
+
*
|
|
35
|
+
* The ONE definition of that text: the show-formulas text frame (`SheetCell.csTextFrame`'s
|
|
36
|
+
* `disabledFormatting` path, which both paint and autoFit measure go through) and
|
|
37
|
+
* `ICell.GetTextOptions.showFormulas` (what the clipboard writes) both resolve it here, so
|
|
38
|
+
* what is copied cannot drift from what is painted.
|
|
39
|
+
*
|
|
40
|
+
* "Stripped" is about the NUMBER FORMAT, not about localization: a boolean and an error are words,
|
|
41
|
+
* and Excel shows the spreadsheet language's word (`WAHR`, `#WERT!`) in formula view exactly as it
|
|
42
|
+
* does everywhere else. JavaScript's own spelling — `'' + value`, i.e. `true`, and an error's
|
|
43
|
+
* MESSAGE in preference to its label — is never what a cell paints.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function rawTextFromValue(value: Scalar, type: ScalarType): string;
|
|
48
|
+
/**
|
|
49
|
+
* Note - Even in the case of unformatted text we do a 'minimum' amount. For example we convert dates and percentages
|
|
50
|
+
*/
|
|
51
|
+
export declare function unformattedTextFromCell(runtime: IRuntime, value: Scalar, type: ScalarType, numberFormat: NumberFormatRef, options?: ParserOptions): string;
|
|
52
|
+
//# sourceMappingURL=_FormatCell.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { IRuntime } from '@sheetxl/primitives';
|
|
2
|
+
import { NumberFormatRef } from './BuiltInFormats';
|
|
3
|
+
import { ParserOptions } from './NumberFormatParser';
|
|
4
|
+
import { Type } from './NumberFormatType';
|
|
5
|
+
export declare const regExpLocaleRule: RegExp;
|
|
6
|
+
export declare const regExHex: RegExp;
|
|
7
|
+
/**
|
|
8
|
+
* Split a format code into its `;`-separated sections, ignoring separators
|
|
9
|
+
* inside quoted literals, `[...]` groups (colors/conditions/locales), and after
|
|
10
|
+
* a `\` escape.
|
|
11
|
+
*/
|
|
12
|
+
export declare function splitFmt(fmt: string): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Adjust the decimal places in a format code by `amount` (toolbar
|
|
15
|
+
* increase/decrease decimal). Pure string surgery over the `;` sections.
|
|
16
|
+
*/
|
|
17
|
+
export declare function adjustDecimalPlaces(formatRef: NumberFormatRef, amount: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Options for the pure formatting core — explicit workbook context
|
|
20
|
+
* (`date1904`, `locale`) instead of an `IRuntime`.
|
|
21
|
+
*/
|
|
22
|
+
export interface FormatValueOptions extends ParserOptions {
|
|
23
|
+
/** @defaultValue false */
|
|
24
|
+
date1904?: boolean;
|
|
25
|
+
/** BCP-47 locale tag. @defaultValue 'en-US' */
|
|
26
|
+
locale?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Compat wrapper: extracts `date1904`/`locale` from the runtime and delegates
|
|
30
|
+
* to {@link formatValueCore}.
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatValue(runtime: IRuntime, format: NumberFormatRef, value: string | number, options?: ParserOptions): string;
|
|
33
|
+
export declare function formatValueCore(format: NumberFormatRef, value: string | number, options?: FormatValueOptions): string;
|
|
34
|
+
/**
|
|
35
|
+
* Compat wrapper: extracts `date1904`/`locale` from the runtime and delegates
|
|
36
|
+
* to {@link toLocaleDateCore}.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toLocaleDate(runtime: IRuntime, format: NumberFormatRef, value: number, options?: ParserOptions): {
|
|
39
|
+
fmt: string;
|
|
40
|
+
date: Date;
|
|
41
|
+
} | null;
|
|
42
|
+
export declare function toLocaleDateCore(format: NumberFormatRef, value: number, options?: FormatValueOptions): {
|
|
43
|
+
fmt: string;
|
|
44
|
+
date: Date;
|
|
45
|
+
} | null;
|
|
46
|
+
export declare const XMLFormatMap: Readonly<Record<string, string | number>>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns a legacy color as an rgb value
|
|
49
|
+
*/
|
|
50
|
+
export declare function convertToLegacyColor(color: string): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Colors, spacing, column width adjustments (turning a long number into scientific notation)
|
|
53
|
+
*
|
|
54
|
+
* https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformats?view=openxml-2.8.1
|
|
55
|
+
*
|
|
56
|
+
* Rules to accommodate.
|
|
57
|
+
* 1. Defaults Formatting rules (based on # of parts 1 - 4)
|
|
58
|
+
* a. (4) >0;<0;=0; text
|
|
59
|
+
* b. (3) >0;<0;=0; (General for text)
|
|
60
|
+
* c. (2) >=0;<0; (General for text)
|
|
61
|
+
* d. (1) Value is not considered
|
|
62
|
+
* 2. Custom formatting rules specified with brackets []
|
|
63
|
+
* If custom formatting rules are applied then only 1 -3 parts
|
|
64
|
+
a. 1-2 parts can contain custom rules. last part (if 3rd part can be a default format.
|
|
65
|
+
b. If a custom eval is used no default and value doesn't match then returns overflow ([Red][<=100]General;[Blue][>100]General)
|
|
66
|
+
* 3. Color rules
|
|
67
|
+
* a. color definition
|
|
68
|
+
* i. 8 standard colors [Black],[Blue],[Cyan],[Green],[Magenta],[Red],[White],[Yellow]
|
|
69
|
+
* ii. and legacy colors codes - default legacy color palette values are listed in §18.8.27
|
|
70
|
+
* 4. Adjusting for width
|
|
71
|
+
* a. padding should only add the number of characters viewable
|
|
72
|
+
* b. Overflow (support for drawing ### when column width is too small)
|
|
73
|
+
*/
|
|
74
|
+
declare const Operator: {
|
|
75
|
+
readonly Equal: "=";
|
|
76
|
+
readonly NotEqual: "<>";
|
|
77
|
+
readonly GreaterThan: ">";
|
|
78
|
+
readonly LessThan: "<";
|
|
79
|
+
readonly GreaterThanOrEqual: ">=";
|
|
80
|
+
readonly LessThanOrEqual: "<=";
|
|
81
|
+
};
|
|
82
|
+
export type Operator = typeof Operator[keyof typeof Operator];
|
|
83
|
+
export declare function getConditionalColor(format: string, value: string | number): string | null;
|
|
84
|
+
export declare function isFraction(fmt: string): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Compares the number format types to determine which has a higher priority for default during formula entry.
|
|
87
|
+
* Excel typically prioritizes formats in this order:
|
|
88
|
+
* 1. Date/Time formats (highest)
|
|
89
|
+
* 2. Percentage
|
|
90
|
+
* 3. Currency/Accounting
|
|
91
|
+
* 4. Number formats with decimals
|
|
92
|
+
* 5. General/other formats (lowest)
|
|
93
|
+
*/
|
|
94
|
+
export declare function compareFormatPriorities(a: Type, b: Type): number;
|
|
95
|
+
/**
|
|
96
|
+
* Determines if a number format string or ID should be treated as 'Text'.
|
|
97
|
+
* When true, the calculation engine should skip numeric parsing and treat
|
|
98
|
+
* the input as a literal string.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isTextFormat(formatCode: string | number): boolean;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=_NumFmtUtils.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Type as _Type } from './NumberFormatType';
|
|
2
|
+
import { Parsed as _Parsed, ParsedCharPlaceHolder as _ParsedCharPlaceHolder, ParsedRun as _ParsedRun, ParsedRuns as _ParsedRuns } from './NumberFormatParser';
|
|
3
|
+
import { Style as _Style, Styles as _Styles, StyleConfig as _StyleConfig } from './NumberFormatStyles';
|
|
4
|
+
import { _FindBuiltInNumberFormatId } from './_BuiltInNumberFormats';
|
|
5
|
+
import { getFormatEngine as _getFormatEngine, IFormatEngine as _IFormatEngine, FormatEngineOptions as _FormatEngineOptions, FormatEngineResult as _FormatEngineResult } from './IFormatEngine';
|
|
6
|
+
import { resolveNumberFormat as _resolveNumberFormat, getBuiltInFormatCode as _getBuiltInFormatCode, NumberFormatRef as _NumberFormatRef } from './BuiltInFormats';
|
|
7
|
+
import * as _NumberFormatBuilder from './NumberFormatBuilder';
|
|
8
|
+
/**
|
|
9
|
+
* Capabilities for defining and applying number formats to cells.
|
|
10
|
+
*
|
|
11
|
+
* Number formats control how numeric values are displayed in a spreadsheet,
|
|
12
|
+
* enabling users to present data in various ways such as currency, percentages, dates, and more.
|
|
13
|
+
*
|
|
14
|
+
* Key features include:
|
|
15
|
+
* - Applying built-in number formats (e.g., currency, date, percentage).
|
|
16
|
+
* - Creating custom number formats using format codes.
|
|
17
|
+
* - Setting and retrieving number formats for cells or ranges.
|
|
18
|
+
*/
|
|
19
|
+
export declare namespace NumberFormat {
|
|
20
|
+
type Parsed = _Parsed;
|
|
21
|
+
/**
|
|
22
|
+
* Represents the built-in categorization of a number format, or 'Custom' if the format is not recognized as a built-in type.
|
|
23
|
+
*
|
|
24
|
+
* Excel has the following:
|
|
25
|
+
* @see
|
|
26
|
+
* {@link https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformats?view=openxml-2.8.1}
|
|
27
|
+
*/
|
|
28
|
+
type Type = typeof _Type[keyof typeof _Type];
|
|
29
|
+
const Type: {
|
|
30
|
+
readonly General: "General";
|
|
31
|
+
readonly Number: "Number";
|
|
32
|
+
readonly Currency: "Currency";
|
|
33
|
+
readonly Accounting: "Accounting";
|
|
34
|
+
readonly ShortDate: "Short Date";
|
|
35
|
+
readonly LongDate: "Long Date";
|
|
36
|
+
readonly MediumDate: "Medium Date";
|
|
37
|
+
readonly ShortTime: "Short Time";
|
|
38
|
+
readonly MediumTime: "Medium Time";
|
|
39
|
+
readonly LongTime: "Long Time";
|
|
40
|
+
readonly Comma: "Comma";
|
|
41
|
+
readonly Percentage: "Percentage";
|
|
42
|
+
readonly Fraction: "Fraction";
|
|
43
|
+
readonly Scientific: "Scientific";
|
|
44
|
+
readonly Text: "Text";
|
|
45
|
+
readonly Special: "Special";
|
|
46
|
+
readonly Custom: "Custom";
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* This interface returns rendering information about the formatted text based on the numberFormat.
|
|
50
|
+
*
|
|
51
|
+
* https://customformats.com/
|
|
52
|
+
* https://exceljet.net/custom-number-formats
|
|
53
|
+
* https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformats?view=openxml-2.8.1
|
|
54
|
+
*/
|
|
55
|
+
const Parser: Readonly<{
|
|
56
|
+
formatValue: typeof import("./_NumFmtUtils").formatValue;
|
|
57
|
+
isFractionFormat: (format: string) => boolean;
|
|
58
|
+
adjustDecimalPlaces: (format: string, amount: number) => string;
|
|
59
|
+
getFormatInfo: (format: string) => import("./IFormatEngine").FormatInfo | null;
|
|
60
|
+
getFormatDateInfo: (format: string) => import("./IFormatEngine").FormatDateInfo | null;
|
|
61
|
+
isValidFormat: (format: string) => boolean;
|
|
62
|
+
}>;
|
|
63
|
+
const Styles: _Styles;
|
|
64
|
+
type Styles = _Styles;
|
|
65
|
+
type ParsedCharPlaceHolder = _ParsedCharPlaceHolder;
|
|
66
|
+
const ParseRunType: {
|
|
67
|
+
readonly Text: "text";
|
|
68
|
+
readonly Repeat: "repeat";
|
|
69
|
+
readonly Spacing: "spacing";
|
|
70
|
+
};
|
|
71
|
+
type ParsedRun = _ParsedRun;
|
|
72
|
+
type ParsedRuns = _ParsedRuns;
|
|
73
|
+
type Style = _Style;
|
|
74
|
+
type StyleConfig = _StyleConfig;
|
|
75
|
+
const toBuiltInID: typeof _FindBuiltInNumberFormatId;
|
|
76
|
+
/**
|
|
77
|
+
* A number format reference: an ECMA-376 built-in id (number) or a format
|
|
78
|
+
* code string. Built-ins are STORED as ids (Excel's own model) and resolved
|
|
79
|
+
* to codes at the render/classification boundary.
|
|
80
|
+
*/
|
|
81
|
+
type Ref = _NumberFormatRef;
|
|
82
|
+
/** Resolve a {@link Ref} to a format-code string. */
|
|
83
|
+
const resolve: typeof _resolveNumberFormat;
|
|
84
|
+
/** The raw ECMA-376 §18.8.30 table lookup, or `undefined` for unknown ids. */
|
|
85
|
+
const builtInFormat: typeof _getBuiltInFormatCode;
|
|
86
|
+
/** Renders format codes to display text, color, and layout placeholders. */
|
|
87
|
+
type IEngine = _IFormatEngine;
|
|
88
|
+
/** Options for {@link IEngine.format}. */
|
|
89
|
+
type EngineOptions = _FormatEngineOptions;
|
|
90
|
+
/** Result of {@link IEngine.format}. */
|
|
91
|
+
type EngineResult = _FormatEngineResult;
|
|
92
|
+
/** Returns the number-format engine. */
|
|
93
|
+
const getEngine: typeof _getFormatEngine;
|
|
94
|
+
/**
|
|
95
|
+
* Format-code builder for the Format Cells → Number dialog: `Builder.build(params)`
|
|
96
|
+
* synthesizes a code from category + options; `Builder.parse(code)` reverses it.
|
|
97
|
+
* Also exposes the category list and preset/symbol tables.
|
|
98
|
+
*/
|
|
99
|
+
const Builder: typeof _NumberFormatBuilder;
|
|
100
|
+
/** Dialog parameters for {@link Builder}. */
|
|
101
|
+
type BuilderParams = _NumberFormatBuilder.NumberFormatParams;
|
|
102
|
+
/** Top-level dialog category. */
|
|
103
|
+
type Category = _NumberFormatBuilder.NumberFormatCategory;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SHEETXL-PATCH — declarations for `_sheetxl.js`, which (like everything in this
|
|
3
|
+
* directory) is plain JavaScript. The repo compiles without `allowJs`, so TypeScript can
|
|
4
|
+
* only resolve a vendored module through a declaration file — this one is hand-carried
|
|
5
|
+
* next to its source the same way `index.d.ts` is. Keep in sync with the JSDoc there.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** §3b — `value` rounded to 15 significant digits (display-only; see `_sheetxl.js`). */
|
|
9
|
+
export declare function clampSignificand(value: number): number;
|
|
10
|
+
|
|
11
|
+
/** `value` rounded to `places` decimals, then capped at 15 significant digits. */
|
|
12
|
+
export declare function roundDisplay(value: number, places: number): number;
|
|
13
|
+
|
|
14
|
+
/** §3a — `String(value)` with the exponential form expanded to plain decimal notation. */
|
|
15
|
+
export declare function toDecimalString(value: number): string;
|