handsontable 16.2.0 → 17.0.0-rc1
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/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleColumns.js +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleColumns.mjs +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleRows.js +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleRows.mjs +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleColumns.js +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleColumns.mjs +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleRows.js +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleRows.mjs +0 -3
- package/3rdparty/walkontable/src/calculator/calculationType/renderedAllColumns.js +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedAllColumns.mjs +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedAllRows.js +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedAllRows.mjs +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.js +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +0 -1
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +0 -1
- package/3rdparty/walkontable/src/calculator/viewportBase.js +0 -3
- package/3rdparty/walkontable/src/calculator/viewportBase.mjs +0 -3
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +0 -2
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +0 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.js +0 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +0 -2
- package/3rdparty/walkontable/src/cell/coords.js +0 -1
- package/3rdparty/walkontable/src/cell/coords.mjs +0 -1
- package/3rdparty/walkontable/src/cell/range.js +0 -2
- package/3rdparty/walkontable/src/cell/range.mjs +0 -2
- package/3rdparty/walkontable/src/core/_base.js +0 -2
- package/3rdparty/walkontable/src/core/_base.mjs +0 -2
- package/3rdparty/walkontable/src/core/clone.js +0 -1
- package/3rdparty/walkontable/src/core/clone.mjs +0 -1
- package/3rdparty/walkontable/src/core/core.js +0 -1
- package/3rdparty/walkontable/src/core/core.mjs +0 -1
- package/3rdparty/walkontable/src/event.js +0 -1
- package/3rdparty/walkontable/src/event.mjs +0 -1
- package/3rdparty/walkontable/src/filter/column.js +0 -1
- package/3rdparty/walkontable/src/filter/column.mjs +0 -1
- package/3rdparty/walkontable/src/filter/row.js +0 -1
- package/3rdparty/walkontable/src/filter/row.mjs +0 -1
- package/3rdparty/walkontable/src/overlay/_base.js +6 -4
- package/3rdparty/walkontable/src/overlay/_base.mjs +6 -4
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/index.js +0 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +0 -1
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +0 -1
- package/3rdparty/walkontable/src/overlays.js +5 -8
- package/3rdparty/walkontable/src/overlays.mjs +5 -8
- package/3rdparty/walkontable/src/renderer/_base.js +0 -1
- package/3rdparty/walkontable/src/renderer/_base.mjs +0 -1
- package/3rdparty/walkontable/src/renderer/cells.js +0 -1
- package/3rdparty/walkontable/src/renderer/cells.mjs +0 -1
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +1 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +1 -2
- package/3rdparty/walkontable/src/renderer/rows.js +1 -12
- package/3rdparty/walkontable/src/renderer/rows.mjs +1 -12
- package/3rdparty/walkontable/src/renderer/table.js +0 -1
- package/3rdparty/walkontable/src/renderer/table.mjs +0 -1
- package/3rdparty/walkontable/src/scroll.js +0 -1
- package/3rdparty/walkontable/src/scroll.mjs +0 -1
- package/3rdparty/walkontable/src/selection/border/border.js +13 -26
- package/3rdparty/walkontable/src/selection/border/border.mjs +13 -26
- package/3rdparty/walkontable/src/selection/border/utils.js +0 -9
- package/3rdparty/walkontable/src/selection/border/utils.mjs +0 -9
- package/3rdparty/walkontable/src/selection/index.js +0 -2
- package/3rdparty/walkontable/src/selection/manager.js +0 -13
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -13
- package/3rdparty/walkontable/src/selection/scanner.js +0 -8
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -8
- package/3rdparty/walkontable/src/settings.js +2 -2
- package/3rdparty/walkontable/src/settings.mjs +2 -2
- package/3rdparty/walkontable/src/table/master.js +1 -1
- package/3rdparty/walkontable/src/table/master.mjs +1 -1
- package/3rdparty/walkontable/src/table.js +3 -6
- package/3rdparty/walkontable/src/table.mjs +3 -6
- package/3rdparty/walkontable/src/utils/column.js +0 -1
- package/3rdparty/walkontable/src/utils/column.mjs +0 -1
- package/3rdparty/walkontable/src/utils/nodesPool.js +7 -1
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +7 -1
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/differBasedRendererAdapter.js +100 -0
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/differBasedRendererAdapter.mjs +96 -0
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/directDomRendererAdapter.js +117 -0
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/directDomRendererAdapter.mjs +113 -0
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/index.js +19 -0
- package/3rdparty/walkontable/src/utils/orderView/rendererAdapter/index.mjs +15 -0
- package/3rdparty/walkontable/src/utils/orderView/view.js +16 -58
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +16 -58
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.js +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.mjs +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +0 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +0 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +0 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +0 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +0 -1
- package/3rdparty/walkontable/src/utils/row.js +0 -1
- package/3rdparty/walkontable/src/utils/row.mjs +0 -1
- package/3rdparty/walkontable/src/viewport.js +0 -2
- package/3rdparty/walkontable/src/viewport.mjs +0 -2
- package/CHANGELOG.md +1 -1
- package/README.md +4 -23
- package/base.js +13 -2
- package/base.mjs +14 -3
- package/cellTypes/autocompleteType/accessors/valueSetter.js +2 -4
- package/cellTypes/autocompleteType/accessors/valueSetter.mjs +1 -3
- package/cellTypes/autocompleteType/autocompleteType.js +2 -1
- package/cellTypes/autocompleteType/autocompleteType.mjs +2 -1
- package/cellTypes/dropdownType/dropdownType.js +2 -1
- package/cellTypes/dropdownType/dropdownType.mjs +2 -1
- package/cellTypes/index.d.ts +6 -0
- package/cellTypes/index.js +12 -0
- package/cellTypes/index.mjs +7 -1
- package/cellTypes/intlDateType/index.d.ts +1 -0
- package/cellTypes/intlDateType/index.js +6 -0
- package/cellTypes/intlDateType/index.mjs +1 -0
- package/cellTypes/intlDateType/intlDateType.d.ts +23 -0
- package/cellTypes/intlDateType/intlDateType.js +16 -0
- package/cellTypes/intlDateType/intlDateType.mjs +13 -0
- package/cellTypes/intlTimeType/index.d.ts +1 -0
- package/cellTypes/intlTimeType/index.js +6 -0
- package/cellTypes/intlTimeType/index.mjs +1 -0
- package/cellTypes/intlTimeType/intlTimeType.d.ts +23 -0
- package/cellTypes/intlTimeType/intlTimeType.js +16 -0
- package/cellTypes/intlTimeType/intlTimeType.mjs +13 -0
- package/cellTypes/multiSelectType/accessors/index.js +7 -0
- package/cellTypes/multiSelectType/accessors/index.mjs +2 -0
- package/cellTypes/multiSelectType/accessors/valueGetter.js +20 -0
- package/cellTypes/multiSelectType/accessors/valueGetter.mjs +16 -0
- package/cellTypes/multiSelectType/accessors/valueSetter.js +27 -0
- package/cellTypes/multiSelectType/accessors/valueSetter.mjs +23 -0
- package/cellTypes/multiSelectType/index.js +6 -0
- package/cellTypes/multiSelectType/index.mjs +1 -0
- package/cellTypes/multiSelectType/multiSelectType.js +19 -0
- package/cellTypes/multiSelectType/multiSelectType.mjs +16 -0
- package/cellTypes/numericType/numericType.d.ts +3 -1
- package/cellTypes/numericType/numericType.js +2 -1
- package/cellTypes/numericType/numericType.mjs +3 -2
- package/cellTypes/registry.js +2 -2
- package/cellTypes/registry.mjs +2 -2
- package/common.d.ts +3 -1
- package/core/coordsMapper/index.js +0 -2
- package/core/coordsMapper/rangeToRenderableMapper.js +0 -1
- package/core/coordsMapper/rangeToRenderableMapper.mjs +0 -1
- package/core/hooks/bucket.js +0 -14
- package/core/hooks/bucket.mjs +0 -14
- package/core/hooks/constants.js +0 -28
- package/core/hooks/constants.mjs +0 -28
- package/core/hooks/index.d.ts +0 -3
- package/core/hooks/index.js +0 -2
- package/core/hooks/index.mjs +0 -2
- package/core/index.js +0 -2
- package/core.d.ts +0 -5
- package/core.js +193 -104
- package/core.mjs +194 -105
- package/dataMap/dataMap.js +6 -8
- package/dataMap/dataMap.mjs +6 -8
- package/dataMap/dataSource.js +0 -4
- package/dataMap/dataSource.mjs +0 -4
- package/dataMap/index.js +5 -0
- package/dataMap/index.mjs +3 -1
- package/dataMap/metaManager/index.js +2 -4
- package/dataMap/metaManager/index.mjs +2 -4
- package/dataMap/metaManager/lazyFactoryMap.js +0 -11
- package/dataMap/metaManager/lazyFactoryMap.mjs +0 -11
- package/dataMap/metaManager/metaLayers/cellMeta.js +0 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +0 -2
- package/dataMap/metaManager/metaLayers/columnMeta.js +0 -1
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +0 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +0 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +0 -1
- package/dataMap/metaManager/metaLayers/tableMeta.js +0 -1
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +0 -1
- package/dataMap/metaManager/metaSchema.js +862 -79
- package/dataMap/metaManager/metaSchema.mjs +862 -79
- package/dataMap/metaManager/mods/dynamicCellMeta.js +0 -8
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +0 -8
- package/dataMap/metaManager/mods/extendMetaProperties.js +23 -15
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +23 -15
- package/dataMap/metaManager/utils.js +2 -9
- package/dataMap/metaManager/utils.mjs +2 -9
- package/dataMap/replaceData.js +6 -3
- package/dataMap/replaceData.mjs +6 -3
- package/dataMap/sourceDataValidator.js +122 -0
- package/dataMap/sourceDataValidator.mjs +117 -0
- package/dist/handsontable.full.js +57523 -54761
- package/dist/handsontable.full.min.js +228 -213
- package/dist/handsontable.js +39604 -37938
- package/dist/handsontable.min.js +51 -51
- package/dist/languages/all.js +1 -1
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +1 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +1 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +1 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +1 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +1 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +1 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fa-IR.js +1 -1
- package/dist/languages/fa-IR.min.js +1 -1
- package/dist/languages/fr-FR.js +1 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.js +1 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.js +1 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +1 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +1 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +1 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +1 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +1 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +1 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +1 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +1 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +1 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +1 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/dist/themes/classic.js +467 -0
- package/dist/themes/classic.min.js +31 -0
- package/dist/themes/horizon.js +467 -0
- package/dist/themes/horizon.min.js +31 -0
- package/dist/themes/main.js +467 -0
- package/dist/themes/main.min.js +31 -0
- package/dist/themes/static/variables/colors/ant.js +137 -0
- package/dist/themes/static/variables/colors/ant.min.js +31 -0
- package/dist/themes/static/variables/colors/classic.js +137 -0
- package/dist/themes/static/variables/colors/classic.min.js +31 -0
- package/dist/themes/static/variables/colors/horizon.js +137 -0
- package/dist/themes/static/variables/colors/horizon.min.js +31 -0
- package/dist/themes/static/variables/colors/main.js +137 -0
- package/dist/themes/static/variables/colors/main.min.js +31 -0
- package/dist/themes/static/variables/colors/material.js +137 -0
- package/dist/themes/static/variables/colors/material.min.js +31 -0
- package/dist/themes/static/variables/colors/shadcn.js +137 -0
- package/dist/themes/static/variables/colors/shadcn.min.js +31 -0
- package/dist/themes/static/variables/density.js +163 -0
- package/dist/themes/static/variables/density.min.js +31 -0
- package/dist/themes/static/variables/helpers/iconsMap.js +240 -0
- package/dist/themes/static/variables/helpers/iconsMap.min.js +31 -0
- package/dist/themes/static/variables/icons/horizon.js +135 -0
- package/dist/themes/static/variables/icons/horizon.min.js +31 -0
- package/dist/themes/static/variables/icons/main.js +135 -0
- package/dist/themes/static/variables/icons/main.min.js +31 -0
- package/dist/themes/static/variables/sizing.js +126 -0
- package/dist/themes/static/variables/sizing.min.js +31 -0
- package/dist/themes/static/variables/tokens/classic.js +375 -0
- package/dist/themes/static/variables/tokens/classic.min.js +31 -0
- package/dist/themes/static/variables/tokens/horizon.js +375 -0
- package/dist/themes/static/variables/tokens/horizon.min.js +31 -0
- package/dist/themes/static/variables/tokens/main.js +375 -0
- package/dist/themes/static/variables/tokens/main.min.js +31 -0
- package/editorManager.js +0 -1
- package/editorManager.mjs +0 -1
- package/editors/autocompleteEditor/autocompleteEditor.js +5 -23
- package/editors/autocompleteEditor/autocompleteEditor.mjs +6 -24
- package/editors/baseEditor/baseEditor.js +18 -13
- package/editors/baseEditor/baseEditor.mjs +18 -13
- package/editors/dateEditor/dateEditor.js +9 -3
- package/editors/dateEditor/dateEditor.mjs +9 -3
- package/editors/dropdownEditor/dropdownEditor.js +0 -2
- package/editors/dropdownEditor/dropdownEditor.mjs +0 -2
- package/editors/factory.d.ts +48 -0
- package/editors/factory.js +372 -0
- package/editors/factory.mjs +368 -0
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/index.d.ts +7 -0
- package/editors/index.js +14 -0
- package/editors/index.mjs +9 -2
- package/editors/intlDateEditor/index.d.ts +1 -0
- package/editors/intlDateEditor/index.js +6 -0
- package/editors/intlDateEditor/index.mjs +1 -0
- package/editors/intlDateEditor/intlDateEditor.d.ts +7 -0
- package/editors/intlDateEditor/intlDateEditor.js +76 -0
- package/editors/intlDateEditor/intlDateEditor.mjs +72 -0
- package/editors/intlTimeEditor/index.d.ts +1 -0
- package/editors/intlTimeEditor/index.js +6 -0
- package/editors/intlTimeEditor/index.mjs +1 -0
- package/editors/intlTimeEditor/intlTimeEditor.d.ts +7 -0
- package/editors/intlTimeEditor/intlTimeEditor.js +72 -0
- package/editors/intlTimeEditor/intlTimeEditor.mjs +68 -0
- package/editors/multiSelectEditor/controllers/dropdownController.js +566 -0
- package/editors/multiSelectEditor/controllers/dropdownController.mjs +561 -0
- package/editors/multiSelectEditor/controllers/inputController.js +101 -0
- package/editors/multiSelectEditor/controllers/inputController.mjs +96 -0
- package/editors/multiSelectEditor/controllers/selectedItemsController.js +124 -0
- package/editors/multiSelectEditor/controllers/selectedItemsController.mjs +120 -0
- package/editors/multiSelectEditor/controllers/utils.js +275 -0
- package/editors/multiSelectEditor/controllers/utils.mjs +258 -0
- package/editors/multiSelectEditor/index.js +6 -0
- package/editors/multiSelectEditor/index.mjs +1 -0
- package/editors/multiSelectEditor/multiSelectEditor.js +509 -0
- package/editors/multiSelectEditor/multiSelectEditor.mjs +504 -0
- package/editors/multiSelectEditor/utils/utils.js +57 -0
- package/editors/multiSelectEditor/utils/utils.mjs +50 -0
- package/editors/passwordEditor/passwordEditor.js +0 -1
- package/editors/passwordEditor/passwordEditor.mjs +0 -1
- package/editors/registry.js +4 -4
- package/editors/registry.mjs +4 -4
- package/editors/selectEditor/selectEditor.js +1 -1
- package/editors/selectEditor/selectEditor.mjs +1 -1
- package/editors/textEditor/textEditor.js +4 -2
- package/editors/textEditor/textEditor.mjs +4 -2
- package/eventManager.js +0 -2
- package/eventManager.mjs +0 -2
- package/focusManager/grid.js +0 -1
- package/focusManager/grid.mjs +0 -1
- package/focusManager/index.js +0 -2
- package/focusManager/scopeManager.js +5 -8
- package/focusManager/scopeManager.mjs +5 -8
- package/focusManager/utils/focusDetector.js +5 -11
- package/focusManager/utils/focusDetector.mjs +5 -11
- package/helpers/a11y.js +2 -0
- package/helpers/a11y.mjs +1 -0
- package/helpers/array.js +26 -15
- package/helpers/array.mjs +25 -15
- package/helpers/console.js +33 -0
- package/helpers/console.mjs +32 -0
- package/helpers/constants.js +4 -0
- package/helpers/constants.mjs +1 -0
- package/helpers/data.js +0 -4
- package/helpers/data.mjs +0 -4
- package/helpers/dateTime.d.ts +5 -0
- package/helpers/dateTime.js +110 -0
- package/helpers/dateTime.mjs +102 -0
- package/helpers/dom/element.d.ts +1 -1
- package/helpers/dom/element.js +23 -20
- package/helpers/dom/element.mjs +23 -20
- package/helpers/errors.d.ts +1 -0
- package/helpers/errors.js +21 -0
- package/helpers/errors.mjs +17 -0
- package/helpers/index.d.ts +2 -1
- package/helpers/mixed.js +10 -7
- package/helpers/mixed.mjs +10 -6
- package/helpers/moves.js +0 -4
- package/helpers/moves.mjs +0 -4
- package/helpers/number.js +0 -9
- package/helpers/number.mjs +0 -9
- package/helpers/object.js +47 -6
- package/helpers/object.mjs +45 -6
- package/helpers/string.js +15 -2
- package/helpers/string.mjs +14 -2
- package/helpers/templateLiteralTag.js +0 -3
- package/helpers/templateLiteralTag.mjs +0 -3
- package/helpers/unicode.js +0 -1
- package/helpers/unicode.mjs +0 -1
- package/helpers/wrappers/jquery.js +2 -2
- package/helpers/wrappers/jquery.mjs +2 -2
- package/i18n/index.js +0 -2
- package/i18n/phraseFormatters/substituteVariables.js +0 -2
- package/i18n/phraseFormatters/substituteVariables.mjs +0 -2
- package/i18n/registry.js +0 -2
- package/i18n/registry.mjs +0 -2
- package/index.d.ts +85 -9
- package/index.js +18 -3
- package/index.mjs +18 -3
- package/languages/all.js +1 -1
- package/languages/ar-AR.js +1 -1
- package/languages/cs-CZ.js +1 -1
- package/languages/de-CH.js +1 -1
- package/languages/de-DE.js +1 -1
- package/languages/en-US.js +1 -1
- package/languages/es-MX.js +1 -1
- package/languages/fa-IR.js +1 -1
- package/languages/fr-FR.js +1 -1
- package/languages/hr-HR.js +1 -1
- package/languages/index.js +1 -1
- package/languages/it-IT.js +1 -1
- package/languages/ja-JP.js +1 -1
- package/languages/ko-KR.js +1 -1
- package/languages/lv-LV.js +1 -1
- package/languages/nb-NO.js +1 -1
- package/languages/nl-NL.js +1 -1
- package/languages/pl-PL.js +1 -1
- package/languages/pt-BR.js +1 -1
- package/languages/ru-RU.js +1 -1
- package/languages/sr-SP.js +1 -1
- package/languages/zh-CN.js +1 -1
- package/languages/zh-TW.js +1 -1
- package/mixins/hooksRefRegisterer.js +0 -1
- package/mixins/hooksRefRegisterer.mjs +0 -1
- package/mixins/localHooks.js +0 -1
- package/mixins/localHooks.mjs +0 -1
- package/package.json +184 -78
- package/plugins/autoColumnSize/autoColumnSize.js +4 -7
- package/plugins/autoColumnSize/autoColumnSize.mjs +4 -7
- package/plugins/autoRowSize/autoRowSize.js +8 -9
- package/plugins/autoRowSize/autoRowSize.mjs +8 -9
- package/plugins/autofill/autofill.js +7 -8
- package/plugins/autofill/autofill.mjs +7 -8
- package/plugins/base/base.js +3 -7
- package/plugins/base/base.mjs +3 -7
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +0 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +0 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +2 -3
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -3
- package/plugins/columnSorting/columnSorting.js +2 -64
- package/plugins/columnSorting/columnSorting.mjs +2 -64
- package/plugins/columnSorting/columnStatesManager.js +0 -3
- package/plugins/columnSorting/columnStatesManager.mjs +0 -3
- package/plugins/columnSorting/domHelpers.js +0 -1
- package/plugins/columnSorting/domHelpers.mjs +0 -1
- package/plugins/columnSorting/sortFunction/intlDate.js +17 -0
- package/plugins/columnSorting/sortFunction/intlDate.mjs +13 -0
- package/plugins/columnSorting/sortFunction/intlTime.js +17 -0
- package/plugins/columnSorting/sortFunction/intlTime.mjs +13 -0
- package/plugins/columnSorting/sortService/registry.js +5 -1
- package/plugins/columnSorting/sortService/registry.mjs +4 -0
- package/plugins/columnSorting/utils.js +107 -10
- package/plugins/columnSorting/utils.mjs +105 -10
- package/plugins/columnSummary/columnSummary.js +2 -2
- package/plugins/columnSummary/columnSummary.mjs +2 -2
- package/plugins/columnSummary/endpoints.js +0 -5
- package/plugins/columnSummary/endpoints.mjs +0 -5
- package/plugins/comments/commentEditor.js +0 -1
- package/plugins/comments/commentEditor.mjs +0 -1
- package/plugins/comments/comments.js +5 -6
- package/plugins/comments/comments.mjs +5 -6
- package/plugins/comments/displaySwitch.js +0 -1
- package/plugins/comments/displaySwitch.mjs +0 -1
- package/plugins/comments/editorResizeObserver.js +0 -3
- package/plugins/comments/editorResizeObserver.mjs +0 -3
- package/plugins/contextMenu/commandExecutor.js +2 -4
- package/plugins/contextMenu/commandExecutor.mjs +2 -4
- package/plugins/contextMenu/contextMenu.js +0 -1
- package/plugins/contextMenu/contextMenu.mjs +0 -1
- package/plugins/contextMenu/itemsFactory.js +0 -2
- package/plugins/contextMenu/itemsFactory.mjs +0 -2
- package/plugins/contextMenu/menu/cursor.js +0 -1
- package/plugins/contextMenu/menu/cursor.mjs +0 -1
- package/plugins/contextMenu/menu/index.js +0 -2
- package/plugins/contextMenu/menu/menu.js +3 -15
- package/plugins/contextMenu/menu/menu.mjs +3 -15
- package/plugins/contextMenu/menu/menuItemRenderer.js +4 -2
- package/plugins/contextMenu/menu/menuItemRenderer.mjs +4 -2
- package/plugins/contextMenu/menu/positioner.js +0 -1
- package/plugins/contextMenu/menu/positioner.mjs +0 -1
- package/plugins/contextMenu/menu/shortcuts.js +0 -3
- package/plugins/contextMenu/menu/shortcuts.mjs +0 -3
- package/plugins/contextMenu/menu/utils.js +0 -1
- package/plugins/contextMenu/menu/utils.mjs +0 -1
- package/plugins/copyPaste/copyPaste.js +53 -31
- package/plugins/copyPaste/copyPaste.mjs +54 -32
- package/plugins/copyPaste/copyableRanges.js +0 -2
- package/plugins/copyPaste/copyableRanges.mjs +0 -2
- package/plugins/customBorders/customBorders.js +3 -6
- package/plugins/customBorders/customBorders.mjs +3 -6
- package/plugins/customBorders/utils.js +0 -2
- package/plugins/customBorders/utils.mjs +0 -2
- package/plugins/dialog/dialog.js +3 -6
- package/plugins/dialog/dialog.mjs +3 -6
- package/plugins/dialog/templates/base.js +2 -2
- package/plugins/dialog/templates/base.mjs +2 -2
- package/plugins/dialog/templates/confirm.js +2 -5
- package/plugins/dialog/templates/confirm.mjs +2 -5
- package/plugins/dialog/ui.js +13 -8
- package/plugins/dialog/ui.mjs +13 -8
- package/plugins/dragToScroll/dragToScroll.js +0 -1
- package/plugins/dragToScroll/dragToScroll.mjs +0 -1
- package/plugins/dropdownMenu/dropdownMenu.js +0 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +0 -1
- package/plugins/emptyDataState/emptyDataState.js +0 -6
- package/plugins/emptyDataState/emptyDataState.mjs +0 -6
- package/plugins/emptyDataState/ui.js +0 -4
- package/plugins/emptyDataState/ui.mjs +0 -4
- package/plugins/exportFile/dataProvider.js +0 -2
- package/plugins/exportFile/dataProvider.mjs +0 -2
- package/plugins/exportFile/exportFile.js +3 -3
- package/plugins/exportFile/exportFile.mjs +3 -3
- package/plugins/exportFile/types/_base.js +0 -1
- package/plugins/exportFile/types/_base.mjs +0 -1
- package/plugins/exportFile/types/csv.js +0 -3
- package/plugins/exportFile/types/csv.mjs +0 -3
- package/plugins/filters/component/_base.js +3 -3
- package/plugins/filters/component/_base.mjs +3 -3
- package/plugins/filters/component/actionBar.js +0 -2
- package/plugins/filters/component/actionBar.mjs +0 -2
- package/plugins/filters/component/condition.js +2 -4
- package/plugins/filters/component/condition.mjs +2 -4
- package/plugins/filters/component/operators.js +2 -5
- package/plugins/filters/component/operators.mjs +2 -5
- package/plugins/filters/component/value.js +4 -12
- package/plugins/filters/component/value.mjs +4 -12
- package/plugins/filters/condition/intlDate/after.js +31 -0
- package/plugins/filters/condition/intlDate/after.mjs +26 -0
- package/plugins/filters/condition/intlDate/before.js +31 -0
- package/plugins/filters/condition/intlDate/before.mjs +26 -0
- package/plugins/filters/condition/intlDate/between.js +30 -0
- package/plugins/filters/condition/intlDate/between.mjs +25 -0
- package/plugins/filters/condition/intlDate/today.js +27 -0
- package/plugins/filters/condition/intlDate/today.mjs +22 -0
- package/plugins/filters/condition/intlDate/tomorrow.js +28 -0
- package/plugins/filters/condition/intlDate/tomorrow.mjs +23 -0
- package/plugins/filters/condition/intlDate/yesterday.js +28 -0
- package/plugins/filters/condition/intlDate/yesterday.mjs +23 -0
- package/plugins/filters/condition/intlTime/after.js +31 -0
- package/plugins/filters/condition/intlTime/after.mjs +26 -0
- package/plugins/filters/condition/intlTime/before.js +31 -0
- package/plugins/filters/condition/intlTime/before.mjs +26 -0
- package/plugins/filters/condition/intlTime/between.js +30 -0
- package/plugins/filters/condition/intlTime/between.mjs +25 -0
- package/plugins/filters/conditionCollection.js +3 -9
- package/plugins/filters/conditionCollection.mjs +3 -9
- package/plugins/filters/conditionRegisterer.js +3 -3
- package/plugins/filters/conditionRegisterer.mjs +3 -3
- package/plugins/filters/conditionUpdateObserver.js +3 -7
- package/plugins/filters/conditionUpdateObserver.mjs +3 -7
- package/plugins/filters/constants.js +14 -2
- package/plugins/filters/constants.mjs +14 -2
- package/plugins/filters/dataFilter.js +1 -3
- package/plugins/filters/dataFilter.mjs +1 -3
- package/plugins/filters/filters.js +36 -44
- package/plugins/filters/filters.mjs +36 -44
- package/plugins/filters/logicalOperationRegisterer.js +2 -2
- package/plugins/filters/logicalOperationRegisterer.mjs +2 -2
- package/plugins/filters/logicalOperations/conjunction.js +0 -2
- package/plugins/filters/logicalOperations/conjunction.mjs +0 -2
- package/plugins/filters/logicalOperations/disjunction.js +0 -2
- package/plugins/filters/logicalOperations/disjunction.mjs +0 -2
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +2 -4
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.mjs +2 -4
- package/plugins/filters/menu/focusController.js +0 -2
- package/plugins/filters/menu/focusController.mjs +0 -2
- package/plugins/filters/ui/_base.js +0 -1
- package/plugins/filters/ui/_base.mjs +0 -1
- package/plugins/filters/ui/input.js +1 -1
- package/plugins/filters/ui/input.mjs +1 -1
- package/plugins/filters/ui/link.js +0 -1
- package/plugins/filters/ui/link.mjs +0 -1
- package/plugins/filters/ui/multipleSelect.js +0 -6
- package/plugins/filters/ui/multipleSelect.mjs +0 -6
- package/plugins/filters/ui/radioInput.js +0 -1
- package/plugins/filters/ui/radioInput.mjs +0 -1
- package/plugins/filters/ui/select.js +0 -1
- package/plugins/filters/ui/select.mjs +0 -1
- package/plugins/filters/utils.js +0 -11
- package/plugins/filters/utils.mjs +0 -11
- package/plugins/formulas/engine/register.js +0 -4
- package/plugins/formulas/engine/register.mjs +0 -4
- package/plugins/formulas/engine/settings.js +0 -3
- package/plugins/formulas/engine/settings.mjs +0 -3
- package/plugins/formulas/formulas.js +0 -14
- package/plugins/formulas/formulas.mjs +0 -14
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -5
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -5
- package/plugins/formulas/indexSyncer/index.js +0 -1
- package/plugins/formulas/indexSyncer/index.mjs +0 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +0 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +0 -1
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +0 -3
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +0 -3
- package/plugins/hiddenColumns/hiddenColumns.js +1 -13
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -13
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +0 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +0 -1
- package/plugins/hiddenRows/contextMenuItem/showRow.js +0 -3
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +0 -3
- package/plugins/hiddenRows/hiddenRows.js +1 -13
- package/plugins/hiddenRows/hiddenRows.mjs +1 -13
- package/plugins/index.d.ts +0 -3
- package/plugins/index.js +0 -3
- package/plugins/index.mjs +1 -3
- package/plugins/loading/loading.js +0 -1
- package/plugins/loading/loading.mjs +0 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +0 -4
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +0 -4
- package/plugins/manualColumnMove/manualColumnMove.js +2 -36
- package/plugins/manualColumnMove/manualColumnMove.mjs +2 -36
- package/plugins/manualColumnMove/ui/_base.js +0 -1
- package/plugins/manualColumnMove/ui/_base.mjs +0 -1
- package/plugins/manualColumnResize/manualColumnResize.js +4 -39
- package/plugins/manualColumnResize/manualColumnResize.mjs +4 -39
- package/plugins/manualRowMove/manualRowMove.js +2 -37
- package/plugins/manualRowMove/manualRowMove.mjs +2 -37
- package/plugins/manualRowMove/ui/_base.js +0 -1
- package/plugins/manualRowMove/ui/_base.mjs +0 -1
- package/plugins/manualRowResize/manualRowResize.js +3 -38
- package/plugins/manualRowResize/manualRowResize.mjs +3 -38
- package/plugins/mergeCells/calculations/autofill.js +0 -3
- package/plugins/mergeCells/calculations/autofill.mjs +0 -3
- package/plugins/mergeCells/calculations/selection.js +0 -2
- package/plugins/mergeCells/calculations/selection.mjs +0 -2
- package/plugins/mergeCells/cellCoords.js +0 -1
- package/plugins/mergeCells/cellCoords.mjs +0 -1
- package/plugins/mergeCells/cellsCollection.js +0 -14
- package/plugins/mergeCells/cellsCollection.mjs +0 -14
- package/plugins/mergeCells/focusOrder.js +0 -4
- package/plugins/mergeCells/focusOrder.mjs +0 -4
- package/plugins/mergeCells/mergeCells.js +0 -14
- package/plugins/mergeCells/mergeCells.mjs +0 -14
- package/plugins/multiColumnSorting/domHelpers.js +0 -3
- package/plugins/multiColumnSorting/domHelpers.mjs +0 -3
- package/plugins/multiColumnSorting/multiColumnSorting.js +0 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +0 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +0 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +0 -2
- package/plugins/nestedHeaders/nestedHeaders.js +0 -4
- package/plugins/nestedHeaders/nestedHeaders.mjs +0 -4
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- package/plugins/nestedHeaders/stateManager/index.js +0 -4
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -4
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +0 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +0 -7
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +0 -7
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.js +0 -7
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +0 -7
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.js +3 -4
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +3 -4
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.js +2 -2
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +2 -2
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.js +3 -3
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +3 -3
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +0 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +0 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +3 -4
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +3 -4
- package/plugins/nestedHeaders/utils/ghostTable.js +1 -2
- package/plugins/nestedHeaders/utils/ghostTable.mjs +1 -2
- package/plugins/nestedRows/data/dataManager.js +0 -2
- package/plugins/nestedRows/data/dataManager.mjs +0 -2
- package/plugins/nestedRows/nestedRows.js +0 -12
- package/plugins/nestedRows/nestedRows.mjs +0 -12
- package/plugins/nestedRows/ui/_base.js +0 -1
- package/plugins/nestedRows/ui/_base.mjs +0 -1
- package/plugins/nestedRows/ui/collapsing.js +0 -1
- package/plugins/nestedRows/ui/collapsing.mjs +0 -1
- package/plugins/nestedRows/ui/contextMenu.js +0 -1
- package/plugins/nestedRows/ui/contextMenu.mjs +0 -1
- package/plugins/nestedRows/ui/headers.js +2 -4
- package/plugins/nestedRows/ui/headers.mjs +2 -4
- package/plugins/nestedRows/utils/rowMoveController.js +0 -6
- package/plugins/nestedRows/utils/rowMoveController.mjs +0 -6
- package/plugins/pagination/pagination.js +1 -7
- package/plugins/pagination/pagination.mjs +1 -7
- package/plugins/pagination/strategies/autoPageSize.js +0 -2
- package/plugins/pagination/strategies/autoPageSize.mjs +0 -2
- package/plugins/pagination/strategies/fixedPageSize.js +0 -1
- package/plugins/pagination/strategies/fixedPageSize.mjs +0 -1
- package/plugins/pagination/strategies/index.js +2 -2
- package/plugins/pagination/strategies/index.mjs +2 -2
- package/plugins/pagination/ui.js +0 -3
- package/plugins/pagination/ui.mjs +0 -3
- package/plugins/registry.js +2 -2
- package/plugins/registry.mjs +2 -2
- package/plugins/search/search.js +0 -2
- package/plugins/search/search.mjs +0 -2
- package/plugins/stretchColumns/calculator.js +1 -6
- package/plugins/stretchColumns/calculator.mjs +1 -6
- package/plugins/stretchColumns/strategies/_base.js +0 -1
- package/plugins/stretchColumns/strategies/_base.mjs +0 -1
- package/plugins/stretchColumns/strategies/all.js +0 -4
- package/plugins/stretchColumns/strategies/all.mjs +0 -4
- package/plugins/stretchColumns/strategies/last.js +0 -3
- package/plugins/stretchColumns/strategies/last.mjs +0 -3
- package/plugins/stretchColumns/stretchColumns.js +0 -3
- package/plugins/stretchColumns/stretchColumns.mjs +0 -3
- package/plugins/touchScroll/touchScroll.js +0 -2
- package/plugins/touchScroll/touchScroll.mjs +0 -2
- package/plugins/trimRows/trimRows.js +1 -12
- package/plugins/trimRows/trimRows.mjs +1 -12
- package/plugins/undoRedo/actions/_base.js +3 -3
- package/plugins/undoRedo/actions/_base.mjs +3 -3
- package/plugins/undoRedo/actions/cellAlignment.js +0 -1
- package/plugins/undoRedo/actions/cellAlignment.mjs +0 -1
- package/plugins/undoRedo/actions/columnMove.js +0 -3
- package/plugins/undoRedo/actions/columnMove.mjs +0 -3
- package/plugins/undoRedo/actions/columnSort.js +0 -1
- package/plugins/undoRedo/actions/columnSort.mjs +0 -1
- package/plugins/undoRedo/actions/createColumn.js +0 -1
- package/plugins/undoRedo/actions/createColumn.mjs +0 -1
- package/plugins/undoRedo/actions/createRow.js +0 -1
- package/plugins/undoRedo/actions/createRow.mjs +0 -1
- package/plugins/undoRedo/actions/dataChange.js +0 -6
- package/plugins/undoRedo/actions/dataChange.mjs +0 -6
- package/plugins/undoRedo/actions/filters.js +0 -3
- package/plugins/undoRedo/actions/filters.mjs +0 -3
- package/plugins/undoRedo/actions/mergeCells.js +0 -1
- package/plugins/undoRedo/actions/mergeCells.mjs +0 -1
- package/plugins/undoRedo/actions/removeColumn.js +0 -4
- package/plugins/undoRedo/actions/removeColumn.mjs +0 -4
- package/plugins/undoRedo/actions/removeRow.js +0 -4
- package/plugins/undoRedo/actions/removeRow.mjs +0 -4
- package/plugins/undoRedo/actions/rowMove.js +0 -3
- package/plugins/undoRedo/actions/rowMove.mjs +0 -3
- package/plugins/undoRedo/actions/unmergeCells.js +0 -1
- package/plugins/undoRedo/actions/unmergeCells.mjs +0 -1
- package/plugins/undoRedo/undoRedo.js +0 -87
- package/plugins/undoRedo/undoRedo.mjs +0 -87
- package/plugins/undoRedo/utils.js +1 -13
- package/plugins/undoRedo/utils.mjs +1 -13
- package/renderers/baseRenderer/baseRenderer.js +3 -1
- package/renderers/baseRenderer/baseRenderer.mjs +3 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -7
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +2 -7
- package/renderers/dateRenderer/dateRenderer.js +6 -0
- package/renderers/dateRenderer/dateRenderer.mjs +6 -0
- package/renderers/factory.d.ts +20 -0
- package/renderers/factory.js +51 -0
- package/renderers/factory.mjs +47 -0
- package/renderers/htmlRenderer/htmlRenderer.js +1 -4
- package/renderers/htmlRenderer/htmlRenderer.mjs +1 -4
- package/renderers/index.d.ts +7 -0
- package/renderers/index.js +10 -0
- package/renderers/index.mjs +7 -2
- package/renderers/intlDateRenderer/index.d.ts +1 -0
- package/renderers/intlDateRenderer/index.js +7 -0
- package/renderers/intlDateRenderer/index.mjs +1 -0
- package/renderers/intlDateRenderer/intlDateRenderer.d.ts +6 -0
- package/renderers/intlDateRenderer/intlDateRenderer.js +58 -0
- package/renderers/intlDateRenderer/intlDateRenderer.mjs +53 -0
- package/renderers/intlTimeRenderer/index.d.ts +1 -0
- package/renderers/intlTimeRenderer/index.js +7 -0
- package/renderers/intlTimeRenderer/index.mjs +1 -0
- package/renderers/intlTimeRenderer/intlTimeRenderer.d.ts +6 -0
- package/renderers/intlTimeRenderer/intlTimeRenderer.js +57 -0
- package/renderers/intlTimeRenderer/intlTimeRenderer.mjs +52 -0
- package/renderers/multiSelectRenderer/index.js +7 -0
- package/renderers/multiSelectRenderer/index.mjs +1 -0
- package/renderers/multiSelectRenderer/multiSelectRenderer.js +60 -0
- package/renderers/multiSelectRenderer/multiSelectRenderer.mjs +56 -0
- package/renderers/multiSelectRenderer/utils/utils.js +270 -0
- package/renderers/multiSelectRenderer/utils/utils.mjs +258 -0
- package/renderers/numericRenderer/index.d.ts +1 -1
- package/renderers/numericRenderer/index.js +1 -1
- package/renderers/numericRenderer/index.mjs +1 -1
- package/renderers/numericRenderer/numericRenderer.d.ts +1 -0
- package/renderers/numericRenderer/numericRenderer.js +19 -22
- package/renderers/numericRenderer/numericRenderer.mjs +18 -20
- package/renderers/numericRenderer/utils.js +64 -0
- package/renderers/numericRenderer/utils.mjs +57 -0
- package/renderers/passwordRenderer/passwordRenderer.js +22 -12
- package/renderers/passwordRenderer/passwordRenderer.mjs +21 -12
- package/renderers/registry.d.ts +1 -1
- package/renderers/registry.js +51 -3
- package/renderers/registry.mjs +51 -3
- package/renderers/textRenderer/textRenderer.js +0 -2
- package/renderers/textRenderer/textRenderer.mjs +0 -2
- package/renderers/timeRenderer/timeRenderer.js +6 -0
- package/renderers/timeRenderer/timeRenderer.mjs +6 -0
- package/selection/highlight/highlight.js +0 -2
- package/selection/highlight/highlight.mjs +0 -2
- package/selection/highlight/visualSelection.js +0 -1
- package/selection/highlight/visualSelection.mjs +0 -1
- package/selection/index.js +0 -2
- package/selection/mouseEventHandler.js +0 -2
- package/selection/mouseEventHandler.mjs +0 -2
- package/selection/range.js +0 -7
- package/selection/range.mjs +0 -7
- package/selection/selection.js +6 -15
- package/selection/selection.mjs +6 -15
- package/selection/transformation/_base.js +6 -6
- package/selection/transformation/_base.mjs +6 -6
- package/selection/transformation/focus.js +2 -2
- package/selection/transformation/focus.mjs +2 -2
- package/selection/utils.js +3 -13
- package/selection/utils.mjs +3 -13
- package/settings.d.ts +9 -3
- package/shortcutContexts/commands/editor/open.js +0 -2
- package/shortcutContexts/commands/editor/open.mjs +0 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -2
- package/shortcutContexts/grid.js +11 -12
- package/shortcutContexts/grid.mjs +11 -12
- package/shortcutContexts/index.js +0 -2
- package/shortcuts/context.js +4 -8
- package/shortcuts/context.mjs +4 -8
- package/shortcuts/keyObserver.js +0 -7
- package/shortcuts/keyObserver.mjs +0 -7
- package/shortcuts/manager.js +2 -2
- package/shortcuts/manager.mjs +2 -2
- package/shortcuts/recorder.js +0 -1
- package/shortcuts/recorder.mjs +0 -1
- package/shortcuts/utils.js +0 -2
- package/shortcuts/utils.mjs +0 -2
- package/styles/handsontable.css +302 -83
- package/styles/handsontable.min.css +3 -3
- package/styles/handsontableStyles.js +6 -0
- package/styles/handsontableStyles.mjs +4 -0
- package/styles/ht-icons-horizon.css +55 -61
- package/styles/ht-icons-horizon.min.css +3 -3
- package/styles/ht-icons-main.css +55 -61
- package/styles/ht-icons-main.min.css +3 -3
- package/styles/ht-theme-classic-no-icons.css +302 -374
- package/styles/ht-theme-classic-no-icons.min.css +3 -3
- package/styles/ht-theme-classic.css +383 -408
- package/styles/ht-theme-classic.min.css +3 -3
- package/styles/ht-theme-horizon-no-icons.css +300 -378
- package/styles/ht-theme-horizon-no-icons.min.css +3 -3
- package/styles/ht-theme-horizon.css +381 -412
- package/styles/ht-theme-horizon.min.css +3 -3
- package/styles/ht-theme-main-no-icons.css +302 -371
- package/styles/ht-theme-main-no-icons.min.css +3 -3
- package/styles/ht-theme-main.css +383 -405
- package/styles/ht-theme-main.min.css +3 -3
- package/tableView.js +16 -4
- package/tableView.mjs +16 -4
- package/themes/engine/builder.js +251 -0
- package/themes/engine/builder.mjs +246 -0
- package/themes/engine/index.js +7 -0
- package/themes/engine/index.mjs +2 -0
- package/themes/engine/manager.js +188 -0
- package/themes/engine/manager.mjs +183 -0
- package/themes/engine/utils/cssVariables.js +132 -0
- package/themes/engine/utils/cssVariables.mjs +128 -0
- package/themes/engine/utils/validation.js +348 -0
- package/themes/engine/utils/validation.mjs +342 -0
- package/themes/index.js +15 -0
- package/themes/index.mjs +2 -0
- package/themes/registry.js +131 -0
- package/themes/registry.mjs +122 -0
- package/themes/static/variables/colors/ant.d.ts +4 -0
- package/themes/static/variables/colors/ant.js +32 -0
- package/themes/static/variables/colors/ant.mjs +30 -0
- package/themes/static/variables/colors/classic.d.ts +4 -0
- package/themes/static/variables/colors/classic.js +32 -0
- package/themes/static/variables/colors/classic.mjs +30 -0
- package/themes/static/variables/colors/horizon.d.ts +4 -0
- package/themes/static/variables/colors/horizon.js +32 -0
- package/themes/static/variables/colors/horizon.mjs +30 -0
- package/themes/static/variables/colors/main.d.ts +4 -0
- package/themes/static/variables/colors/main.js +32 -0
- package/themes/static/variables/colors/main.mjs +30 -0
- package/themes/static/variables/colors/material.d.ts +4 -0
- package/themes/static/variables/colors/material.js +32 -0
- package/themes/static/variables/colors/material.mjs +30 -0
- package/themes/static/variables/colors/shadcn.d.ts +4 -0
- package/themes/static/variables/colors/shadcn.js +32 -0
- package/themes/static/variables/colors/shadcn.mjs +30 -0
- package/themes/static/variables/density.d.ts +4 -0
- package/themes/static/variables/density.js +59 -0
- package/themes/static/variables/density.mjs +57 -0
- package/themes/static/variables/helpers/iconsMap.d.ts +3 -0
- package/themes/static/variables/helpers/iconsMap.js +139 -0
- package/themes/static/variables/helpers/iconsMap.mjs +135 -0
- package/themes/static/variables/icons/horizon.d.ts +4 -0
- package/themes/static/variables/icons/horizon.js +29 -0
- package/themes/static/variables/icons/horizon.mjs +28 -0
- package/themes/static/variables/icons/main.d.ts +4 -0
- package/themes/static/variables/icons/main.js +29 -0
- package/themes/static/variables/icons/main.mjs +28 -0
- package/themes/static/variables/sizing.d.ts +4 -0
- package/themes/static/variables/sizing.js +22 -0
- package/themes/static/variables/sizing.mjs +20 -0
- package/themes/static/variables/tokens/classic.d.ts +4 -0
- package/themes/static/variables/tokens/classic.js +270 -0
- package/themes/static/variables/tokens/classic.mjs +268 -0
- package/themes/static/variables/tokens/horizon.d.ts +4 -0
- package/themes/static/variables/tokens/horizon.js +270 -0
- package/themes/static/variables/tokens/horizon.mjs +268 -0
- package/themes/static/variables/tokens/main.d.ts +4 -0
- package/themes/static/variables/tokens/main.js +270 -0
- package/themes/static/variables/tokens/main.mjs +268 -0
- package/themes/theme/classic.d.ts +3 -0
- package/themes/theme/classic.js +14 -0
- package/themes/theme/classic.mjs +11 -0
- package/themes/theme/horizon.d.ts +3 -0
- package/themes/theme/horizon.js +14 -0
- package/themes/theme/horizon.mjs +11 -0
- package/themes/theme/index.d.ts +5 -0
- package/themes/theme/index.js +9 -0
- package/themes/theme/index.mjs +3 -0
- package/themes/theme/main.d.ts +3 -0
- package/themes/theme/main.js +14 -0
- package/themes/theme/main.mjs +11 -0
- package/themes.d.ts +491 -0
- package/translations/changesObservable/observable.js +0 -10
- package/translations/changesObservable/observable.mjs +0 -10
- package/translations/changesObservable/observer.js +0 -1
- package/translations/changesObservable/observer.mjs +0 -1
- package/translations/changesObservable/utils.js +0 -1
- package/translations/changesObservable/utils.mjs +0 -1
- package/translations/index.js +0 -2
- package/translations/indexMapper.js +3 -14
- package/translations/indexMapper.mjs +3 -14
- package/translations/mapCollections/aggregatedCollection.js +0 -2
- package/translations/mapCollections/aggregatedCollection.mjs +0 -2
- package/translations/mapCollections/index.js +0 -2
- package/translations/mapCollections/mapCollection.js +0 -3
- package/translations/mapCollections/mapCollection.mjs +0 -3
- package/translations/maps/hidingMap.js +0 -1
- package/translations/maps/hidingMap.mjs +0 -1
- package/translations/maps/index.js +2 -4
- package/translations/maps/index.mjs +2 -2
- package/translations/maps/indexMap.js +0 -2
- package/translations/maps/indexMap.mjs +0 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.js +0 -3
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +0 -3
- package/translations/maps/trimmingMap.js +0 -1
- package/translations/maps/trimmingMap.mjs +0 -1
- package/translations/maps/utils/actionsOnIndexes.js +0 -2
- package/translations/maps/utils/actionsOnIndexes.mjs +0 -2
- package/translations/maps/utils/index.js +2 -2
- package/translations/maps/utils/index.mjs +2 -2
- package/translations/maps/utils/physicallyIndexed.js +0 -2
- package/translations/maps/utils/physicallyIndexed.mjs +0 -2
- package/utils/dataStructures/linkedList.js +0 -1
- package/utils/dataStructures/linkedList.mjs +0 -1
- package/utils/dataStructures/priorityMap.js +3 -5
- package/utils/dataStructures/priorityMap.mjs +3 -5
- package/utils/dataStructures/queue.js +0 -1
- package/utils/dataStructures/queue.mjs +0 -1
- package/utils/dataStructures/stack.js +0 -1
- package/utils/dataStructures/stack.mjs +0 -1
- package/utils/dataStructures/tree.js +2 -3
- package/utils/dataStructures/tree.mjs +2 -3
- package/utils/dataStructures/uniqueMap.js +2 -4
- package/utils/dataStructures/uniqueMap.mjs +2 -4
- package/utils/dataStructures/uniqueSet.js +2 -9
- package/utils/dataStructures/uniqueSet.mjs +2 -9
- package/utils/ghostTable.js +3 -6
- package/utils/ghostTable.mjs +3 -6
- package/utils/interval.js +0 -1
- package/utils/interval.mjs +0 -1
- package/utils/paginator.js +0 -7
- package/utils/paginator.mjs +0 -7
- package/utils/parseTable.js +0 -6
- package/utils/parseTable.mjs +0 -6
- package/utils/samplesGenerator.js +2 -3
- package/utils/samplesGenerator.mjs +2 -3
- package/utils/stylesHandler.js +49 -60
- package/utils/stylesHandler.mjs +48 -60
- package/validators/autocompleteValidator/autocompleteValidator.js +9 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +10 -2
- package/validators/dateValidator/dateValidator.js +2 -2
- package/validators/dateValidator/dateValidator.mjs +1 -1
- package/validators/index.d.ts +6 -0
- package/validators/index.js +12 -0
- package/validators/index.mjs +7 -1
- package/validators/intlDateValidator/index.d.ts +1 -0
- package/validators/intlDateValidator/index.js +8 -0
- package/validators/intlDateValidator/index.mjs +1 -0
- package/validators/intlDateValidator/intlDateValidator.d.ts +6 -0
- package/validators/intlDateValidator/intlDateValidator.js +39 -0
- package/validators/intlDateValidator/intlDateValidator.mjs +34 -0
- package/validators/intlTimeValidator/index.d.ts +1 -0
- package/validators/intlTimeValidator/index.js +8 -0
- package/validators/intlTimeValidator/index.mjs +1 -0
- package/validators/intlTimeValidator/intlTimeValidator.d.ts +6 -0
- package/validators/intlTimeValidator/intlTimeValidator.js +39 -0
- package/validators/intlTimeValidator/intlTimeValidator.mjs +34 -0
- package/validators/multiSelectValidator/index.js +6 -0
- package/validators/multiSelectValidator/index.mjs +1 -0
- package/validators/multiSelectValidator/multiSelectValidator.js +84 -0
- package/validators/multiSelectValidator/multiSelectValidator.mjs +80 -0
- package/validators/registry.js +2 -2
- package/validators/registry.mjs +2 -2
- package/dist/README.md +0 -54
- package/dist/handsontable.css +0 -2551
- package/dist/handsontable.full.css +0 -2781
- package/dist/handsontable.full.min.css +0 -51
- package/dist/handsontable.min.css +0 -46
- package/helpers/date.d.ts +0 -1
- package/helpers/date.js +0 -22
- package/helpers/date.mjs +0 -18
- package/plugins/persistentState/index.d.ts +0 -1
- package/plugins/persistentState/index.js +0 -7
- package/plugins/persistentState/index.mjs +0 -1
- package/plugins/persistentState/persistentState.d.ts +0 -16
- package/plugins/persistentState/persistentState.js +0 -159
- package/plugins/persistentState/persistentState.mjs +0 -154
- package/plugins/persistentState/storage.js +0 -120
- package/plugins/persistentState/storage.mjs +0 -117
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { isObject } from "../../../helpers/object.mjs";
|
|
2
|
+
import { warn } from "../../../helpers/console.mjs";
|
|
3
|
+
import { throwWithCause } from "../../../helpers/errors.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Valid parameters keys.
|
|
6
|
+
*
|
|
7
|
+
* @type {Set<string>}
|
|
8
|
+
*/
|
|
9
|
+
const VALID_PARAMS_KEYS = new Set(['name', 'sizing', 'density', 'icons', 'colors', 'tokens', 'colorScheme']);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Valid color scheme values.
|
|
13
|
+
*
|
|
14
|
+
* @type {Set<string>}
|
|
15
|
+
*/
|
|
16
|
+
const VALID_COLOR_SCHEMES = new Set(['light', 'dark', 'auto']);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Valid density type values.
|
|
20
|
+
*
|
|
21
|
+
* @type {Set<string>}
|
|
22
|
+
*/
|
|
23
|
+
const VALID_DENSITY_TYPES = new Set(['default', 'compact', 'comfortable']);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Valid icon key values.
|
|
27
|
+
*
|
|
28
|
+
* @type {Set<string>}
|
|
29
|
+
*/
|
|
30
|
+
export const VALID_ICON_KEYS = new Set(['arrowRight', 'arrowRightWithBar', 'arrowLeft', 'arrowLeftWithBar', 'arrowDown', 'menu', 'selectArrow', 'arrowNarrowUp', 'arrowNarrowDown', 'check', 'checkbox', 'caretHiddenLeft', 'caretHiddenRight', 'caretHiddenUp', 'caretHiddenDown', 'collapseOff', 'collapseOn', 'radio', 'chipClose', 'search']);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Valid token key values.
|
|
34
|
+
*
|
|
35
|
+
* @type {Set<string>}
|
|
36
|
+
*/
|
|
37
|
+
const VALID_TOKEN_KEYS = new Set([
|
|
38
|
+
// Typography
|
|
39
|
+
'fontFamily', 'fontSize', 'fontSizeSmall', 'lineHeight', 'lineHeightSmall', 'fontWeight', 'letterSpacing',
|
|
40
|
+
// Layout
|
|
41
|
+
'gapSize', 'iconSize', 'tableTransition',
|
|
42
|
+
// Base colors
|
|
43
|
+
'borderColor', 'accentColor', 'foregroundColor', 'foregroundSecondaryColor', 'backgroundColor', 'backgroundSecondaryColor', 'placeholderColor', 'readOnlyColor', 'disabledColor',
|
|
44
|
+
// Shadow
|
|
45
|
+
'shadowColor', 'shadowX', 'shadowY', 'shadowBlur', 'shadowOpacity',
|
|
46
|
+
// Bars
|
|
47
|
+
'barForegroundColor', 'barBackgroundColor', 'barHorizontalPadding', 'barVerticalPadding',
|
|
48
|
+
// Cell
|
|
49
|
+
'cellHorizontalBorderColor', 'cellVerticalBorderColor', 'cellHorizontalPadding', 'cellVerticalPadding',
|
|
50
|
+
// Wrapper
|
|
51
|
+
'wrapperBorderWidth', 'wrapperBorderRadius', 'wrapperBorderColor',
|
|
52
|
+
// Row
|
|
53
|
+
'rowHeaderOddBackgroundColor', 'rowHeaderEvenBackgroundColor', 'rowCellOddBackgroundColor', 'rowCellEvenBackgroundColor',
|
|
54
|
+
// Cell editor
|
|
55
|
+
'cellEditorBorderWidth', 'cellEditorBorderColor', 'cellEditorForegroundColor', 'cellEditorBackgroundColor', 'cellEditorShadowBlurRadius', 'cellEditorShadowColor',
|
|
56
|
+
// Cell states
|
|
57
|
+
'cellSuccessBackgroundColor', 'cellErrorBackgroundColor', 'cellReadOnlyBackgroundColor',
|
|
58
|
+
// Cell selection
|
|
59
|
+
'cellSelectionBorderColor', 'cellSelectionBackgroundColor',
|
|
60
|
+
// Cell autofill
|
|
61
|
+
'cellAutofillSize', 'cellAutofillHitAreaSize', 'cellAutofillBorderWidth', 'cellAutofillBorderRadius', 'cellAutofillBorderColor', 'cellAutofillBackgroundColor', 'cellAutofillFillBorderColor',
|
|
62
|
+
// Cell mobile
|
|
63
|
+
'cellMobileHandleSize', 'cellMobileHandleBorderWidth', 'cellMobileHandleBorderRadius', 'cellMobileHandleBorderColor', 'cellMobileHandleBackgroundColor', 'cellMobileHandleBackgroundOpacity',
|
|
64
|
+
// Resize/Move indicators
|
|
65
|
+
'resizeIndicatorColor', 'moveBacklightColor', 'moveBacklightOpacity', 'moveIndicatorColor', 'hiddenIndicatorColor',
|
|
66
|
+
// Scrollbar
|
|
67
|
+
'scrollbarBorderRadius', 'scrollbarTrackColor', 'scrollbarThumbColor',
|
|
68
|
+
// Header
|
|
69
|
+
'headerFontWeight', 'headerForegroundColor', 'headerBackgroundColor', 'headerHighlightedShadowSize', 'headerHighlightedForegroundColor', 'headerHighlightedBackgroundColor', 'headerActiveBorderColor', 'headerActiveForegroundColor', 'headerActiveBackgroundColor', 'headerFilterBackgroundColor',
|
|
70
|
+
// Header row
|
|
71
|
+
'headerRowForegroundColor', 'headerRowBackgroundColor', 'headerRowHighlightedForegroundColor', 'headerRowHighlightedBackgroundColor', 'headerRowActiveForegroundColor', 'headerRowActiveBackgroundColor',
|
|
72
|
+
// Checkbox
|
|
73
|
+
'checkboxSize', 'checkboxBorderRadius', 'checkboxBorderColor', 'checkboxBackgroundColor', 'checkboxIconColor', 'checkboxFocusBorderColor', 'checkboxFocusBackgroundColor', 'checkboxFocusIconColor', 'checkboxFocusRingColor', 'checkboxDisabledBorderColor', 'checkboxDisabledBackgroundColor', 'checkboxDisabledIconColor', 'checkboxCheckedBorderColor', 'checkboxCheckedBackgroundColor', 'checkboxCheckedIconColor', 'checkboxCheckedFocusBorderColor', 'checkboxCheckedFocusBackgroundColor', 'checkboxCheckedFocusIconColor', 'checkboxCheckedDisabledBorderColor', 'checkboxCheckedDisabledBackgroundColor', 'checkboxCheckedDisabledIconColor', 'checkboxIndeterminateBorderColor', 'checkboxIndeterminateBackgroundColor', 'checkboxIndeterminateIconColor', 'checkboxIndeterminateFocusBorderColor', 'checkboxIndeterminateFocusBackgroundColor', 'checkboxIndeterminateFocusIconColor', 'checkboxIndeterminateDisabledBorderColor', 'checkboxIndeterminateDisabledBackgroundColor', 'checkboxIndeterminateDisabledIconColor',
|
|
74
|
+
// Radio
|
|
75
|
+
'radioSize', 'radioBorderColor', 'radioBackgroundColor', 'radioIconColor', 'radioFocusBorderColor', 'radioFocusBackgroundColor', 'radioFocusIconColor', 'radioFocusRingColor', 'radioDisabledBorderColor', 'radioDisabledBackgroundColor', 'radioDisabledIconColor', 'radioCheckedBorderColor', 'radioCheckedBackgroundColor', 'radioCheckedIconColor', 'radioCheckedFocusBorderColor', 'radioCheckedFocusBackgroundColor', 'radioCheckedFocusIconColor', 'radioCheckedDisabledBorderColor', 'radioCheckedDisabledBackgroundColor', 'radioCheckedDisabledIconColor',
|
|
76
|
+
// Icon button
|
|
77
|
+
'iconButtonBorderRadius', 'iconButtonLargeBorderRadius', 'iconButtonLargePadding', 'iconButtonBorderColor', 'iconButtonBackgroundColor', 'iconButtonIconColor', 'iconButtonHoverBorderColor', 'iconButtonHoverBackgroundColor', 'iconButtonHoverIconColor', 'iconButtonActiveBorderColor', 'iconButtonActiveBackgroundColor', 'iconButtonActiveIconColor', 'iconButtonActiveHoverBorderColor', 'iconButtonActiveHoverBackgroundColor', 'iconButtonActiveHoverIconColor',
|
|
78
|
+
// Collapse button
|
|
79
|
+
'collapseButtonBorderRadius', 'collapseButtonOpenBorderColor', 'collapseButtonOpenBackgroundColor', 'collapseButtonOpenIconColor', 'collapseButtonOpenIconActiveColor', 'collapseButtonOpenHoverBorderColor', 'collapseButtonOpenHoverBackgroundColor', 'collapseButtonOpenHoverIconColor', 'collapseButtonOpenHoverIconActiveColor', 'collapseButtonCloseBorderColor', 'collapseButtonCloseBackgroundColor', 'collapseButtonCloseIconColor', 'collapseButtonCloseIconActiveColor', 'collapseButtonCloseHoverBorderColor', 'collapseButtonCloseHoverBackgroundColor', 'collapseButtonCloseHoverIconColor', 'collapseButtonCloseHoverIconActiveColor',
|
|
80
|
+
// Button
|
|
81
|
+
'buttonBorderRadius', 'buttonHorizontalPadding', 'buttonVerticalPadding',
|
|
82
|
+
// Primary button
|
|
83
|
+
'primaryButtonBorderColor', 'primaryButtonForegroundColor', 'primaryButtonBackgroundColor', 'primaryButtonDisabledBorderColor', 'primaryButtonDisabledForegroundColor', 'primaryButtonDisabledBackgroundColor', 'primaryButtonHoverBorderColor', 'primaryButtonHoverForegroundColor', 'primaryButtonHoverBackgroundColor', 'primaryButtonFocusBorderColor', 'primaryButtonFocusForegroundColor', 'primaryButtonFocusBackgroundColor',
|
|
84
|
+
// Secondary button
|
|
85
|
+
'secondaryButtonBorderColor', 'secondaryButtonForegroundColor', 'secondaryButtonBackgroundColor', 'secondaryButtonDisabledBorderColor', 'secondaryButtonDisabledForegroundColor', 'secondaryButtonDisabledBackgroundColor', 'secondaryButtonHoverBorderColor', 'secondaryButtonHoverForegroundColor', 'secondaryButtonHoverBackgroundColor', 'secondaryButtonFocusBorderColor', 'secondaryButtonFocusForegroundColor', 'secondaryButtonFocusBackgroundColor',
|
|
86
|
+
// Comments
|
|
87
|
+
'commentsTextareaHorizontalPadding', 'commentsTextareaVerticalPadding', 'commentsTextareaBorderWidth', 'commentsTextareaBorderColor', 'commentsTextareaForegroundColor', 'commentsTextareaBackgroundColor', 'commentsTextareaFocusBorderWidth', 'commentsTextareaFocusBorderColor', 'commentsTextareaFocusForegroundColor', 'commentsTextareaFocusBackgroundColor', 'commentsIndicatorSize', 'commentsIndicatorColor',
|
|
88
|
+
// License
|
|
89
|
+
'licenseHorizontalPadding', 'licenseVerticalPadding', 'licenseForegroundColor', 'licenseBackgroundColor',
|
|
90
|
+
// Link
|
|
91
|
+
'linkColor', 'linkHoverColor',
|
|
92
|
+
// Input
|
|
93
|
+
'inputBorderWidth', 'inputBorderRadius', 'inputHorizontalPadding', 'inputVerticalPadding', 'inputBorderColor', 'inputForegroundColor', 'inputBackgroundColor', 'inputHoverBorderColor', 'inputHoverForegroundColor', 'inputHoverBackgroundColor', 'inputDisabledBorderColor', 'inputDisabledForegroundColor', 'inputDisabledBackgroundColor', 'inputFocusBorderColor', 'inputFocusForegroundColor', 'inputFocusBackgroundColor',
|
|
94
|
+
// Menu
|
|
95
|
+
'menuBorderWidth', 'menuBorderRadius', 'menuHorizontalPadding', 'menuVerticalPadding', 'menuItemHorizontalPadding', 'menuItemVerticalPadding', 'menuBorderColor', 'menuShadowX', 'menuShadowY', 'menuShadowBlur', 'menuShadowColor', 'menuShadowOpacity', 'menuItemHoverColor', 'menuItemHoverColorOpacity', 'menuItemActiveColor', 'menuItemActiveColorOpacity',
|
|
96
|
+
// Dialog
|
|
97
|
+
'dialogSemiTransparentBackgroundColor', 'dialogSemiTransparentBackgroundOpacity', 'dialogSolidBackgroundColor', 'dialogContentPaddingHorizontal', 'dialogContentPaddingVertical', 'dialogContentBorderRadius', 'dialogContentBackgroundColor',
|
|
98
|
+
// Pagination
|
|
99
|
+
'paginationBarForegroundColor', 'paginationBarBackgroundColor', 'paginationBarHorizontalPadding', 'paginationBarVerticalPadding',
|
|
100
|
+
// Multiselect
|
|
101
|
+
'chipBackground', 'chipBorderRadius', 'chipVerticalPadding', 'chipHorizontalPadding', 'chipGap']);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Validates a theme name value.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} name The theme name to validate.
|
|
107
|
+
* @param {string} context The context name for error messages.
|
|
108
|
+
* @throws {Error} If the name is not a non-empty string.
|
|
109
|
+
* @returns {string} The validated name.
|
|
110
|
+
*/
|
|
111
|
+
function validateName(name, context) {
|
|
112
|
+
if (typeof name !== 'string' || name.trim() === '') {
|
|
113
|
+
throwWithCause(`[ThemeBuilder] ${context}.name must be a non-empty string.`);
|
|
114
|
+
}
|
|
115
|
+
return name;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Validates a color scheme value.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} mode The color scheme to validate.
|
|
122
|
+
* @throws {Error} If the color scheme is invalid.
|
|
123
|
+
* @returns {string} The validated color scheme.
|
|
124
|
+
*/
|
|
125
|
+
export function validateColorScheme(mode) {
|
|
126
|
+
if (!VALID_COLOR_SCHEMES.has(mode)) {
|
|
127
|
+
const validModes = [...VALID_COLOR_SCHEMES].join(', ');
|
|
128
|
+
throwWithCause(`[ThemeBuilder] Invalid color scheme: "${mode}". Must be one of: ${validModes}.`);
|
|
129
|
+
}
|
|
130
|
+
return mode;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Validates and returns a density type.
|
|
135
|
+
*
|
|
136
|
+
* @param {string} type The density type to validate.
|
|
137
|
+
* @throws {Error} If the density type is invalid.
|
|
138
|
+
* @returns {string} The validated density type.
|
|
139
|
+
*/
|
|
140
|
+
export function validateDensityType(type) {
|
|
141
|
+
if (!VALID_DENSITY_TYPES.has(type)) {
|
|
142
|
+
const validTypes = [...VALID_DENSITY_TYPES].join(', ');
|
|
143
|
+
throwWithCause(`[ThemeBuilder] Invalid density: "${type}". Must be one of: ${validTypes}.`);
|
|
144
|
+
}
|
|
145
|
+
return type;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Validates the structure of the density sizes object.
|
|
150
|
+
*
|
|
151
|
+
* @param {object} sizes The density sizes object to validate.
|
|
152
|
+
* @param {string} context The context name for error messages.
|
|
153
|
+
* @throws {Error} If the density sizes structure is invalid.
|
|
154
|
+
*/
|
|
155
|
+
function validateDensitySizes(sizes, context) {
|
|
156
|
+
if (!isObject(sizes)) {
|
|
157
|
+
throwWithCause(`[ThemeBuilder] ${context}.sizes must be an object.`);
|
|
158
|
+
}
|
|
159
|
+
Object.keys(sizes).forEach(key => {
|
|
160
|
+
if (!VALID_DENSITY_TYPES.has(key)) {
|
|
161
|
+
warn(`[ThemeBuilder] Unknown density size key: "${key}" in ${context}.sizes. ` + 'This may be a custom density size or a typo.');
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @param {object} density The density object to validate.
|
|
168
|
+
* @param {string} context The context name for error messages.
|
|
169
|
+
* @throws {Error} If the density structure is invalid.
|
|
170
|
+
*/
|
|
171
|
+
function validateDensityStructure(density, context) {
|
|
172
|
+
if (isObject(density)) {
|
|
173
|
+
if (!density.type || !density.sizes) {
|
|
174
|
+
throwWithCause(`[ThemeBuilder] ${context} must be a string or an object with a 'type' and 'sizes' property.`);
|
|
175
|
+
}
|
|
176
|
+
validateDensityType(density.type);
|
|
177
|
+
validateDensitySizes(density.sizes, `${context}.sizes`);
|
|
178
|
+
} else if (typeof density === 'string') {
|
|
179
|
+
validateDensityType(density);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Validates the structure of the colors object.
|
|
185
|
+
* Colors can be either strings or nested objects containing strings.
|
|
186
|
+
*
|
|
187
|
+
* @param {object} colors The colors object to validate.
|
|
188
|
+
* @param {string} context The context path for error messages.
|
|
189
|
+
* @throws {Error} If the colors structure is invalid.
|
|
190
|
+
*/
|
|
191
|
+
function validateColorsStructure(colors, context) {
|
|
192
|
+
Object.entries(colors).forEach(_ref => {
|
|
193
|
+
let [key, value] = _ref;
|
|
194
|
+
const currentPath = `${context}.${key}`;
|
|
195
|
+
if (typeof value === 'string') {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (isObject(value)) {
|
|
199
|
+
validateColorsStructure(value, currentPath);
|
|
200
|
+
} else {
|
|
201
|
+
throwWithCause(`[ThemeBuilder] ${currentPath} must be a string or an object.`);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Validates keys and warns about unknown or missing keys.
|
|
208
|
+
*
|
|
209
|
+
* @param {object} obj The object to validate.
|
|
210
|
+
* @param {Set<string>} validKeys The set of valid keys.
|
|
211
|
+
* @param {string} context The context name for warning messages.
|
|
212
|
+
* @param {object} [options] Validation options.
|
|
213
|
+
* @param {string} [options.type='key'] The type name for warning messages.
|
|
214
|
+
* @param {boolean} [options.warnMissing=false] Whether to warn about missing keys.
|
|
215
|
+
*/
|
|
216
|
+
function validateKeys(obj, validKeys, context) {
|
|
217
|
+
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
218
|
+
const {
|
|
219
|
+
type = 'key',
|
|
220
|
+
warnMissing = false
|
|
221
|
+
} = options;
|
|
222
|
+
if (!obj) {
|
|
223
|
+
if (warnMissing) {
|
|
224
|
+
warn(`[ThemeBuilder] No ${type}s provided in ${context}. All ${type}s are missing.`);
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const providedKeys = Object.keys(obj);
|
|
229
|
+
|
|
230
|
+
// Warn about unknown keys
|
|
231
|
+
providedKeys.forEach(key => {
|
|
232
|
+
if (!validKeys.has(key)) {
|
|
233
|
+
warn(`[ThemeBuilder] Unknown ${type} key: "${key}" in ${context}. ` + `This may be a custom ${type} or a typo.`);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// Warn about missing keys only if required
|
|
238
|
+
if (warnMissing) {
|
|
239
|
+
const missingKeys = [];
|
|
240
|
+
validKeys.forEach(key => {
|
|
241
|
+
if (!(key in obj)) {
|
|
242
|
+
missingKeys.push(key);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
if (missingKeys.length > 0) {
|
|
246
|
+
warn(`[ThemeBuilder] Missing ${type}(s) in ${context}: ${missingKeys.join(', ')}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Validates the parameters object structure.
|
|
253
|
+
*
|
|
254
|
+
* @param {*} parameters The parameters object to validate.
|
|
255
|
+
* @param {string} context The context name for error messages.
|
|
256
|
+
* @param {object} [options] Validation options.
|
|
257
|
+
* @param {string[]} [options.requiredFields=[]] Array of field names that are required.
|
|
258
|
+
* @throws {Error} If the parameters object structure is invalid.
|
|
259
|
+
*/
|
|
260
|
+
export function validateParams(parameters, context) {
|
|
261
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
262
|
+
const {
|
|
263
|
+
requiredFields = []
|
|
264
|
+
} = options;
|
|
265
|
+
if (typeof parameters !== 'object' || parameters === null) {
|
|
266
|
+
throwWithCause(`[ThemeBuilder] ${context} must be an object.`);
|
|
267
|
+
}
|
|
268
|
+
const {
|
|
269
|
+
name,
|
|
270
|
+
sizing,
|
|
271
|
+
density,
|
|
272
|
+
icons,
|
|
273
|
+
colors,
|
|
274
|
+
tokens,
|
|
275
|
+
colorScheme
|
|
276
|
+
} = parameters;
|
|
277
|
+
validateKeys(parameters, VALID_PARAMS_KEYS, context, {
|
|
278
|
+
type: 'param'
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
// Validate required fields
|
|
282
|
+
requiredFields.forEach(field => {
|
|
283
|
+
if (parameters[field] === undefined) {
|
|
284
|
+
throwWithCause(`[ThemeBuilder] ${context}.${field} is required.`);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// Validate name
|
|
289
|
+
if (name !== undefined) {
|
|
290
|
+
validateName(name, context);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Validate sizing
|
|
294
|
+
if (sizing !== undefined) {
|
|
295
|
+
if (!isObject(sizing)) {
|
|
296
|
+
throwWithCause(`[ThemeBuilder] ${context}.sizing must be an object.`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Validate density
|
|
301
|
+
if (density !== undefined) {
|
|
302
|
+
if (!isObject(density) && typeof density !== 'string') {
|
|
303
|
+
throwWithCause(`[ThemeBuilder] ${context}.density must be a string or an object.`);
|
|
304
|
+
}
|
|
305
|
+
validateDensityStructure(density, `${context}.density`);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Validate icons
|
|
309
|
+
if (icons !== undefined) {
|
|
310
|
+
if (!isObject(icons)) {
|
|
311
|
+
throwWithCause(`[ThemeBuilder] ${context}.icons must be an object.`);
|
|
312
|
+
}
|
|
313
|
+
validateKeys(icons, VALID_ICON_KEYS, `${context}.icons`, {
|
|
314
|
+
type: 'icon',
|
|
315
|
+
warnMissing: requiredFields.includes('icons')
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Validate colors
|
|
320
|
+
if (colors !== undefined) {
|
|
321
|
+
if (!isObject(colors)) {
|
|
322
|
+
throwWithCause(`[ThemeBuilder] ${context}.colors must be an object.`);
|
|
323
|
+
}
|
|
324
|
+
validateColorsStructure(colors, `${context}.colors`);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Validate tokens
|
|
328
|
+
if (tokens !== undefined) {
|
|
329
|
+
if (!isObject(tokens)) {
|
|
330
|
+
throwWithCause(`[ThemeBuilder] ${context}.tokens must be an object.`);
|
|
331
|
+
}
|
|
332
|
+
validateKeys(tokens, VALID_TOKEN_KEYS, `${context}.tokens`, {
|
|
333
|
+
type: 'token',
|
|
334
|
+
warnMissing: requiredFields.includes('tokens')
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// Validate color scheme
|
|
339
|
+
if (colorScheme !== undefined) {
|
|
340
|
+
validateColorScheme(colorScheme);
|
|
341
|
+
}
|
|
342
|
+
}
|
package/themes/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var _theme = require("./theme");
|
|
5
|
+
Object.keys(_theme).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _theme[key]) return;
|
|
8
|
+
exports[key] = _theme[key];
|
|
9
|
+
});
|
|
10
|
+
var _registry = require("./registry");
|
|
11
|
+
Object.keys(_registry).forEach(function (key) {
|
|
12
|
+
if (key === "default" || key === "__esModule") return;
|
|
13
|
+
if (key in exports && exports[key] === _registry[key]) return;
|
|
14
|
+
exports[key] = _registry[key];
|
|
15
|
+
});
|
package/themes/index.mjs
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getTheme = getTheme;
|
|
5
|
+
exports.getThemeNames = getThemeNames;
|
|
6
|
+
exports.getThemes = getThemes;
|
|
7
|
+
exports.hasTheme = hasTheme;
|
|
8
|
+
exports.registerTheme = registerTheme;
|
|
9
|
+
exports.reinitTheme = reinitTheme;
|
|
10
|
+
var _object = require("../helpers/object");
|
|
11
|
+
var _console = require("../helpers/console");
|
|
12
|
+
var _staticRegister = require("../utils/staticRegister");
|
|
13
|
+
var _engine = require("./engine");
|
|
14
|
+
const {
|
|
15
|
+
hasItem,
|
|
16
|
+
getItem,
|
|
17
|
+
getNames,
|
|
18
|
+
getValues,
|
|
19
|
+
register
|
|
20
|
+
} = (0, _staticRegister.staticRegister)('themes');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Check if a theme with the specified name is registered.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} themeName The theme name.
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
function hasTheme(themeName) {
|
|
29
|
+
return hasItem(themeName);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get a registered theme by name.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} themeName The theme name.
|
|
36
|
+
* @returns {object|undefined} The theme or undefined if not found.
|
|
37
|
+
*/
|
|
38
|
+
function getTheme(themeName) {
|
|
39
|
+
if (!hasTheme(themeName)) {
|
|
40
|
+
(0, _console.warn)(`Theme "${themeName}" is not registered. Please ensure it is registered before using it.`);
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return getItem(themeName);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get all registered theme names.
|
|
48
|
+
*
|
|
49
|
+
* @returns {string[]}
|
|
50
|
+
*/
|
|
51
|
+
function getThemeNames() {
|
|
52
|
+
return getNames();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get all registered themes.
|
|
57
|
+
*
|
|
58
|
+
* @returns {object[]}
|
|
59
|
+
*/
|
|
60
|
+
function getThemes() {
|
|
61
|
+
return getValues();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Parse theme name and config from arguments.
|
|
66
|
+
*
|
|
67
|
+
* @private
|
|
68
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
69
|
+
* @param {object} [themeConfig] The theme config object (optional if first parameter has already theme config).
|
|
70
|
+
* @returns {{themeName: string, themeConfigObject: object}} Parsed theme name and config object.
|
|
71
|
+
*/
|
|
72
|
+
function parseThemeArgs(themeNameOrConfig, themeConfig) {
|
|
73
|
+
let themeName = themeNameOrConfig;
|
|
74
|
+
let themeConfigObject = (0, _object.deepClone)(themeConfig);
|
|
75
|
+
if (typeof themeNameOrConfig === 'string' && (0, _object.isObject)(themeConfig)) {
|
|
76
|
+
themeConfigObject.name = themeNameOrConfig;
|
|
77
|
+
} else if ((0, _object.isObject)(themeNameOrConfig)) {
|
|
78
|
+
themeConfigObject = (0, _object.deepClone)(themeNameOrConfig);
|
|
79
|
+
themeName = themeConfigObject.name;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
themeName,
|
|
83
|
+
themeConfigObject
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Register a theme.
|
|
89
|
+
*
|
|
90
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
91
|
+
* @param {object} [themeConfig] The theme config object (optional if first parameter has already theme config).
|
|
92
|
+
* @returns {object} The registered theme (ThemeBuilder instance).
|
|
93
|
+
*/
|
|
94
|
+
function registerTheme(themeNameOrConfig, themeConfig) {
|
|
95
|
+
const {
|
|
96
|
+
themeName,
|
|
97
|
+
themeConfigObject
|
|
98
|
+
} = parseThemeArgs(themeNameOrConfig, themeConfig);
|
|
99
|
+
const theme = (0, _engine.createTheme)(themeConfigObject);
|
|
100
|
+
if (hasTheme(themeName)) {
|
|
101
|
+
(0, _console.warn)(`Theme "${themeName}" is already registered. Registration skipped.`);
|
|
102
|
+
return getTheme(themeName);
|
|
103
|
+
}
|
|
104
|
+
register(themeName, theme);
|
|
105
|
+
return theme;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Reinitialize an existing theme with a new configuration.
|
|
110
|
+
*
|
|
111
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
112
|
+
* @param {object} [themeConfig] The theme config object to reinitialize (optional if first parameter has already theme config).
|
|
113
|
+
* @returns {object|undefined} The reinitialized theme (ThemeBuilder instance) or undefined if theme not found.
|
|
114
|
+
*/
|
|
115
|
+
function reinitTheme(themeNameOrConfig, themeConfig) {
|
|
116
|
+
const {
|
|
117
|
+
themeName,
|
|
118
|
+
themeConfigObject
|
|
119
|
+
} = parseThemeArgs(themeNameOrConfig, themeConfig);
|
|
120
|
+
if (!hasTheme(themeName)) {
|
|
121
|
+
(0, _console.warn)(`Theme "${themeName}" is not registered. Cannot reinitialize a non-existent theme.`);
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Create a new theme with the new config
|
|
126
|
+
const reinitializedTheme = (0, _engine.createTheme)(themeConfigObject);
|
|
127
|
+
|
|
128
|
+
// Re-register the theme (this will replace the existing one)
|
|
129
|
+
register(themeName, reinitializedTheme);
|
|
130
|
+
return reinitializedTheme;
|
|
131
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { deepClone, isObject } from "../helpers/object.mjs";
|
|
2
|
+
import { warn } from "../helpers/console.mjs";
|
|
3
|
+
import { staticRegister } from "../utils/staticRegister.mjs";
|
|
4
|
+
import { createTheme } from "./engine/index.mjs";
|
|
5
|
+
const {
|
|
6
|
+
hasItem,
|
|
7
|
+
getItem,
|
|
8
|
+
getNames,
|
|
9
|
+
getValues,
|
|
10
|
+
register
|
|
11
|
+
} = staticRegister('themes');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Check if a theme with the specified name is registered.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} themeName The theme name.
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export function hasTheme(themeName) {
|
|
20
|
+
return hasItem(themeName);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get a registered theme by name.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} themeName The theme name.
|
|
27
|
+
* @returns {object|undefined} The theme or undefined if not found.
|
|
28
|
+
*/
|
|
29
|
+
export function getTheme(themeName) {
|
|
30
|
+
if (!hasTheme(themeName)) {
|
|
31
|
+
warn(`Theme "${themeName}" is not registered. Please ensure it is registered before using it.`);
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return getItem(themeName);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get all registered theme names.
|
|
39
|
+
*
|
|
40
|
+
* @returns {string[]}
|
|
41
|
+
*/
|
|
42
|
+
export function getThemeNames() {
|
|
43
|
+
return getNames();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get all registered themes.
|
|
48
|
+
*
|
|
49
|
+
* @returns {object[]}
|
|
50
|
+
*/
|
|
51
|
+
export function getThemes() {
|
|
52
|
+
return getValues();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Parse theme name and config from arguments.
|
|
57
|
+
*
|
|
58
|
+
* @private
|
|
59
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
60
|
+
* @param {object} [themeConfig] The theme config object (optional if first parameter has already theme config).
|
|
61
|
+
* @returns {{themeName: string, themeConfigObject: object}} Parsed theme name and config object.
|
|
62
|
+
*/
|
|
63
|
+
function parseThemeArgs(themeNameOrConfig, themeConfig) {
|
|
64
|
+
let themeName = themeNameOrConfig;
|
|
65
|
+
let themeConfigObject = deepClone(themeConfig);
|
|
66
|
+
if (typeof themeNameOrConfig === 'string' && isObject(themeConfig)) {
|
|
67
|
+
themeConfigObject.name = themeNameOrConfig;
|
|
68
|
+
} else if (isObject(themeNameOrConfig)) {
|
|
69
|
+
themeConfigObject = deepClone(themeNameOrConfig);
|
|
70
|
+
themeName = themeConfigObject.name;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
themeName,
|
|
74
|
+
themeConfigObject
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Register a theme.
|
|
80
|
+
*
|
|
81
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
82
|
+
* @param {object} [themeConfig] The theme config object (optional if first parameter has already theme config).
|
|
83
|
+
* @returns {object} The registered theme (ThemeBuilder instance).
|
|
84
|
+
*/
|
|
85
|
+
export function registerTheme(themeNameOrConfig, themeConfig) {
|
|
86
|
+
const {
|
|
87
|
+
themeName,
|
|
88
|
+
themeConfigObject
|
|
89
|
+
} = parseThemeArgs(themeNameOrConfig, themeConfig);
|
|
90
|
+
const theme = createTheme(themeConfigObject);
|
|
91
|
+
if (hasTheme(themeName)) {
|
|
92
|
+
warn(`Theme "${themeName}" is already registered. Registration skipped.`);
|
|
93
|
+
return getTheme(themeName);
|
|
94
|
+
}
|
|
95
|
+
register(themeName, theme);
|
|
96
|
+
return theme;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Reinitialize an existing theme with a new configuration.
|
|
101
|
+
*
|
|
102
|
+
* @param {string|object} themeNameOrConfig Theme name for specific theme or object representing theme config.
|
|
103
|
+
* @param {object} [themeConfig] The theme config object to reinitialize (optional if first parameter has already theme config).
|
|
104
|
+
* @returns {object|undefined} The reinitialized theme (ThemeBuilder instance) or undefined if theme not found.
|
|
105
|
+
*/
|
|
106
|
+
export function reinitTheme(themeNameOrConfig, themeConfig) {
|
|
107
|
+
const {
|
|
108
|
+
themeName,
|
|
109
|
+
themeConfigObject
|
|
110
|
+
} = parseThemeArgs(themeNameOrConfig, themeConfig);
|
|
111
|
+
if (!hasTheme(themeName)) {
|
|
112
|
+
warn(`Theme "${themeName}" is not registered. Cannot reinitialize a non-existent theme.`);
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Create a new theme with the new config
|
|
117
|
+
const reinitializedTheme = createTheme(themeConfigObject);
|
|
118
|
+
|
|
119
|
+
// Re-register the theme (this will replace the existing one)
|
|
120
|
+
register(themeName, reinitializedTheme);
|
|
121
|
+
return reinitializedTheme;
|
|
122
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
/*
|
|
5
|
+
* This file is auto-generated. Do not edit directly.
|
|
6
|
+
*/
|
|
7
|
+
var _default = exports.default = {
|
|
8
|
+
palette: {
|
|
9
|
+
50: '#fafafaff',
|
|
10
|
+
100: '#f5f5f5ff',
|
|
11
|
+
200: '#f0f0f0ff',
|
|
12
|
+
300: '#d9d9d9ff',
|
|
13
|
+
400: '#bfbfbfff',
|
|
14
|
+
500: '#8c8c8cff',
|
|
15
|
+
600: '#595959ff',
|
|
16
|
+
700: '#434343ff',
|
|
17
|
+
800: '#262626ff',
|
|
18
|
+
900: '#1a1a1aff',
|
|
19
|
+
950: '#000000ff'
|
|
20
|
+
},
|
|
21
|
+
primary: {
|
|
22
|
+
100: '#4096ffff',
|
|
23
|
+
200: '#1677ffff',
|
|
24
|
+
300: '#0958d9ff',
|
|
25
|
+
400: '#4096ffff',
|
|
26
|
+
500: '#1677ffff',
|
|
27
|
+
600: '#0958d9ff'
|
|
28
|
+
},
|
|
29
|
+
white: '#ffffffff',
|
|
30
|
+
black: '#000000ff',
|
|
31
|
+
transparent: '#ffffff00'
|
|
32
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is auto-generated. Do not edit directly.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
palette: {
|
|
7
|
+
50: '#fafafaff',
|
|
8
|
+
100: '#f5f5f5ff',
|
|
9
|
+
200: '#f0f0f0ff',
|
|
10
|
+
300: '#d9d9d9ff',
|
|
11
|
+
400: '#bfbfbfff',
|
|
12
|
+
500: '#8c8c8cff',
|
|
13
|
+
600: '#595959ff',
|
|
14
|
+
700: '#434343ff',
|
|
15
|
+
800: '#262626ff',
|
|
16
|
+
900: '#1a1a1aff',
|
|
17
|
+
950: '#000000ff'
|
|
18
|
+
},
|
|
19
|
+
primary: {
|
|
20
|
+
100: '#4096ffff',
|
|
21
|
+
200: '#1677ffff',
|
|
22
|
+
300: '#0958d9ff',
|
|
23
|
+
400: '#4096ffff',
|
|
24
|
+
500: '#1677ffff',
|
|
25
|
+
600: '#0958d9ff'
|
|
26
|
+
},
|
|
27
|
+
white: '#ffffffff',
|
|
28
|
+
black: '#000000ff',
|
|
29
|
+
transparent: '#ffffff00'
|
|
30
|
+
};
|