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,102 @@
|
|
|
1
|
+
import { isEmpty } from "./mixed.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* ISO 8601 date pattern.
|
|
4
|
+
*
|
|
5
|
+
* @type {RegExp}
|
|
6
|
+
*/
|
|
7
|
+
export const ISO_DATE_REGEX = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get normalized Date object for the ISO formatted date strings.
|
|
11
|
+
* Natively, the date object parsed from a ISO 8601 string will be offsetted by the timezone difference, which may result in returning a wrong date.
|
|
12
|
+
* See: Github issue #3338.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} dateString String representing the date.
|
|
15
|
+
* @returns {Date} The proper Date object.
|
|
16
|
+
*/
|
|
17
|
+
export function getNormalizedDate(dateString) {
|
|
18
|
+
const nativeDate = new Date(dateString);
|
|
19
|
+
|
|
20
|
+
// NaN if dateString is not in ISO format
|
|
21
|
+
if (!isNaN(new Date(`${dateString}T00:00`).getDate())) {
|
|
22
|
+
// Compensate timezone offset
|
|
23
|
+
return new Date(nativeDate.getTime() + nativeDate.getTimezoneOffset() * 60000);
|
|
24
|
+
}
|
|
25
|
+
return nativeDate;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Converts a date string to a Date object.
|
|
30
|
+
*
|
|
31
|
+
* @param {*} value The value to parse.
|
|
32
|
+
* @returns {Date | null} The Date object or null if the value is invalid.
|
|
33
|
+
*/
|
|
34
|
+
export function parseToLocalDate(value) {
|
|
35
|
+
if (isEmpty(value)) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
if (typeof value === 'string' && ISO_DATE_REGEX.test(value)) {
|
|
39
|
+
const [y, m, d] = value.split('-').map(Number);
|
|
40
|
+
return new Date(y, m - 1, d);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Checks if a string is a valid ISO 8601 date.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} value The value to check.
|
|
49
|
+
* @returns {boolean} True if valid ISO date string.
|
|
50
|
+
*/
|
|
51
|
+
export function isValidISODate(value) {
|
|
52
|
+
if (typeof value !== 'string' || !ISO_DATE_REGEX.test(value)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const date = new Date(value);
|
|
56
|
+
return !Number.isNaN(date.getTime()) && value === date.toISOString().slice(0, 10);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Time pattern: HH:mm, HH:mm:ss, or HH:mm:ss.SSS (24-hour).
|
|
61
|
+
* Same format as HTML input type="time" value; seconds and milliseconds optional.
|
|
62
|
+
*
|
|
63
|
+
* @type {RegExp}
|
|
64
|
+
*/
|
|
65
|
+
export const TIME_REGEX = /^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Parses a time string in HH:mm, HH:mm:ss, or HH:mm:ss.SSS format to a Date with that time on the Unix epoch (1970-01-01).
|
|
69
|
+
* Useful for comparison and sorting. Same format as HTML input type="time" value.
|
|
70
|
+
*
|
|
71
|
+
* @param {*} value The value to parse.
|
|
72
|
+
* @returns {Date | null} The Date object or null if the value is invalid.
|
|
73
|
+
*/
|
|
74
|
+
export function parseToLocalTime(value) {
|
|
75
|
+
if (isEmpty(value)) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
if (typeof value !== 'string') {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const match = TIME_REGEX.exec(value);
|
|
82
|
+
if (!match) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const hours = Number(match[1]);
|
|
86
|
+
const minutes = Number(match[2]);
|
|
87
|
+
const seconds = match[3] !== undefined ? Number(match[3]) : 0;
|
|
88
|
+
const msString = match[4];
|
|
89
|
+
const milliseconds = msString !== undefined ? Number(msString.padEnd(3, '0').slice(0, 3)) : 0;
|
|
90
|
+
return new Date(1970, 0, 1, hours, minutes, seconds, milliseconds);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Checks if a string is a valid time in HH:mm, HH:mm:ss, or HH:mm:ss.SSS format (00:00–23:59).
|
|
95
|
+
* Same format as HTML input type="time" value.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} value The value to check.
|
|
98
|
+
* @returns {boolean} True if valid time string.
|
|
99
|
+
*/
|
|
100
|
+
export function isValidTime(value) {
|
|
101
|
+
return typeof value === 'string' && TIME_REGEX.test(value);
|
|
102
|
+
}
|
package/helpers/dom/element.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export function addClass(element: HTMLElement, className: string | string[]): vo
|
|
|
13
13
|
export function removeClass(element: HTMLElement, className: string | string[]): void;
|
|
14
14
|
export function removeTextNodes(element: HTMLElement): void;
|
|
15
15
|
export function empty(element: HTMLElement): void;
|
|
16
|
-
export function fastInnerHTML(element: HTMLElement, content: string,
|
|
16
|
+
export function fastInnerHTML(element: HTMLElement, content: string, sanitizer?: (content: string, source: string) => string): void;
|
|
17
17
|
export function fastInnerText(element: HTMLElement, content: string): void;
|
|
18
18
|
export function isVisible(element: HTMLElement): boolean;
|
|
19
19
|
export function offset(element: HTMLElement): { left: number, top: number };
|
package/helpers/dom/element.js
CHANGED
|
@@ -61,14 +61,11 @@ exports.selectElementIfAllowed = selectElementIfAllowed;
|
|
|
61
61
|
exports.setAttribute = setAttribute;
|
|
62
62
|
exports.setCaretPosition = setCaretPosition;
|
|
63
63
|
exports.setOverlayPosition = setOverlayPosition;
|
|
64
|
-
require("core-js/modules/es.error.cause.js");
|
|
65
|
-
require("core-js/modules/es.array.push.js");
|
|
66
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
67
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
68
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
69
64
|
var _string = require("../string");
|
|
70
65
|
var _a11y = require("../a11y");
|
|
71
66
|
var _browser = require("../browser");
|
|
67
|
+
var _console = require("../console");
|
|
68
|
+
var _errors = require("../../helpers/errors");
|
|
72
69
|
/**
|
|
73
70
|
* Get the parent of the specified node in the DOM tree.
|
|
74
71
|
*
|
|
@@ -482,18 +479,23 @@ function empty(element) {
|
|
|
482
479
|
}
|
|
483
480
|
}
|
|
484
481
|
const HTML_CHARACTERS = exports.HTML_CHARACTERS = /(<(.*)>|&(.*);)/;
|
|
482
|
+
let dompurifyDeprecatedMessageShown = false;
|
|
485
483
|
|
|
486
484
|
/**
|
|
487
485
|
* Insert content into element trying to avoid innerHTML method.
|
|
488
486
|
*
|
|
489
487
|
* @param {HTMLElement} element An element to write into.
|
|
490
488
|
* @param {string} content The text to write.
|
|
491
|
-
* @param {boolean} [
|
|
489
|
+
* @param {function(string): string | boolean} [sanitizer] The sanitizer to use for the content.
|
|
492
490
|
*/
|
|
493
491
|
function fastInnerHTML(element, content) {
|
|
494
|
-
let
|
|
492
|
+
let sanitizer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _string.sanitize;
|
|
495
493
|
if (HTML_CHARACTERS.test(content)) {
|
|
496
|
-
|
|
494
|
+
if (!dompurifyDeprecatedMessageShown && sanitizer === _string.sanitize) {
|
|
495
|
+
dompurifyDeprecatedMessageShown = true;
|
|
496
|
+
(0, _console.deprecatedWarn)('The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. ' + 'Use the `sanitizer` option instead.\n\n' + 'Migration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n' + '`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer');
|
|
497
|
+
}
|
|
498
|
+
element.innerHTML = typeof sanitizer === 'function' ? sanitizer(content, 'innerHTML') : content;
|
|
497
499
|
} else {
|
|
498
500
|
fastInnerText(element, content);
|
|
499
501
|
}
|
|
@@ -544,7 +546,7 @@ function isVisible(element) {
|
|
|
544
546
|
// Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features enabled
|
|
545
547
|
return isVisible(next.host);
|
|
546
548
|
}
|
|
547
|
-
|
|
549
|
+
(0, _errors.throwWithCause)('Lost in Web Components world');
|
|
548
550
|
} else {
|
|
549
551
|
return false; // this is a node detached from document in IE8
|
|
550
552
|
}
|
|
@@ -568,7 +570,8 @@ function hasZeroHeight(element) {
|
|
|
568
570
|
let currentElement = element;
|
|
569
571
|
while (currentElement.parentNode) {
|
|
570
572
|
if (currentElement.style.height === '0px' || currentElement.style.height === '0') {
|
|
571
|
-
|
|
573
|
+
const computedOverflow = rootWindow.getComputedStyle(currentElement).getPropertyValue('overflow');
|
|
574
|
+
return computedOverflow === 'hidden' || computedOverflow === 'clip';
|
|
572
575
|
}
|
|
573
576
|
currentElement = currentElement.parentNode;
|
|
574
577
|
}
|
|
@@ -758,7 +761,7 @@ function getTrimmingContainer(base) {
|
|
|
758
761
|
return el;
|
|
759
762
|
}
|
|
760
763
|
const computedStyle = rootWindow.getComputedStyle(el);
|
|
761
|
-
const allowedProperties = ['scroll', 'hidden', 'auto'];
|
|
764
|
+
const allowedProperties = ['scroll', 'hidden', 'auto', 'clip'];
|
|
762
765
|
const property = computedStyle.getPropertyValue('overflow');
|
|
763
766
|
const propertyY = computedStyle.getPropertyValue('overflow-y');
|
|
764
767
|
const propertyX = computedStyle.getPropertyValue('overflow-x');
|
|
@@ -840,7 +843,7 @@ function outerWidth(element) {
|
|
|
840
843
|
* @returns {number} Element's outer height.
|
|
841
844
|
*/
|
|
842
845
|
function outerHeight(element) {
|
|
843
|
-
return element.
|
|
846
|
+
return element.offsetHeight;
|
|
844
847
|
}
|
|
845
848
|
|
|
846
849
|
/**
|
|
@@ -972,7 +975,6 @@ function setCaretPosition(element, pos, endPos) {
|
|
|
972
975
|
}
|
|
973
976
|
}
|
|
974
977
|
}
|
|
975
|
-
let cachedScrollbarWidth;
|
|
976
978
|
|
|
977
979
|
/**
|
|
978
980
|
* Returns the fractional scaling compensation for scrollbar width calculation.
|
|
@@ -997,7 +999,7 @@ function getFractionalScalingCompensation() {
|
|
|
997
999
|
* Source: https://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes.
|
|
998
1000
|
*
|
|
999
1001
|
* @private
|
|
1000
|
-
* @param {Document} rootDocument The
|
|
1002
|
+
* @param {Document} rootDocument The owner of the document.
|
|
1001
1003
|
* @returns {number}
|
|
1002
1004
|
*/
|
|
1003
1005
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -1021,22 +1023,23 @@ function walkontableCalculateScrollbarWidth() {
|
|
|
1021
1023
|
outer.style.width = '200px';
|
|
1022
1024
|
outer.style.visibility = 'hidden';
|
|
1023
1025
|
outer.appendChild(inner);
|
|
1024
|
-
|
|
1025
|
-
const w1 = inner.
|
|
1026
|
+
rootDocument.body.appendChild(outer);
|
|
1027
|
+
const w1 = inner.offsetWidth;
|
|
1026
1028
|
outer.style.overflow = 'scroll';
|
|
1027
|
-
let w2 = inner.
|
|
1029
|
+
let w2 = inner.offsetWidth;
|
|
1028
1030
|
if (w1 === w2) {
|
|
1029
1031
|
w2 = outer.clientWidth;
|
|
1030
1032
|
}
|
|
1031
|
-
|
|
1032
|
-
return
|
|
1033
|
+
rootDocument.body.removeChild(outer);
|
|
1034
|
+
return w1 - w2;
|
|
1033
1035
|
}
|
|
1036
|
+
let cachedScrollbarWidth;
|
|
1034
1037
|
|
|
1035
1038
|
/**
|
|
1036
1039
|
* Returns the computed width of the native browser scroll bar.
|
|
1037
1040
|
*
|
|
1038
1041
|
* @param {Document} [rootDocument] The owner of the document.
|
|
1039
|
-
* @returns {number}
|
|
1042
|
+
* @returns {number} The computed width of the native browser scroll bar.
|
|
1040
1043
|
*/
|
|
1041
1044
|
// eslint-disable-next-line no-restricted-globals
|
|
1042
1045
|
function getScrollbarWidth() {
|
package/helpers/dom/element.mjs
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
|
2
|
-
import "core-js/modules/es.array.push.js";
|
|
3
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
4
|
-
import "core-js/modules/esnext.iterator.filter.js";
|
|
5
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
|
6
1
|
import { sanitize } from "../string.mjs";
|
|
7
2
|
import { A11Y_HIDDEN } from "../a11y.mjs";
|
|
8
3
|
import { isWindowsOS, isSafari, isMobileBrowser, isIpadOS } from "../browser.mjs";
|
|
4
|
+
import { deprecatedWarn } from "../console.mjs";
|
|
5
|
+
import { throwWithCause } from "../../helpers/errors.mjs";
|
|
9
6
|
/**
|
|
10
7
|
* Get the parent of the specified node in the DOM tree.
|
|
11
8
|
*
|
|
@@ -419,18 +416,23 @@ export function empty(element) {
|
|
|
419
416
|
}
|
|
420
417
|
}
|
|
421
418
|
export const HTML_CHARACTERS = /(<(.*)>|&(.*);)/;
|
|
419
|
+
let dompurifyDeprecatedMessageShown = false;
|
|
422
420
|
|
|
423
421
|
/**
|
|
424
422
|
* Insert content into element trying to avoid innerHTML method.
|
|
425
423
|
*
|
|
426
424
|
* @param {HTMLElement} element An element to write into.
|
|
427
425
|
* @param {string} content The text to write.
|
|
428
|
-
* @param {boolean} [
|
|
426
|
+
* @param {function(string): string | boolean} [sanitizer] The sanitizer to use for the content.
|
|
429
427
|
*/
|
|
430
428
|
export function fastInnerHTML(element, content) {
|
|
431
|
-
let
|
|
429
|
+
let sanitizer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : sanitize;
|
|
432
430
|
if (HTML_CHARACTERS.test(content)) {
|
|
433
|
-
|
|
431
|
+
if (!dompurifyDeprecatedMessageShown && sanitizer === sanitize) {
|
|
432
|
+
dompurifyDeprecatedMessageShown = true;
|
|
433
|
+
deprecatedWarn('The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. ' + 'Use the `sanitizer` option instead.\n\n' + 'Migration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n' + '`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer');
|
|
434
|
+
}
|
|
435
|
+
element.innerHTML = typeof sanitizer === 'function' ? sanitizer(content, 'innerHTML') : content;
|
|
434
436
|
} else {
|
|
435
437
|
fastInnerText(element, content);
|
|
436
438
|
}
|
|
@@ -481,7 +483,7 @@ export function isVisible(element) {
|
|
|
481
483
|
// Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features enabled
|
|
482
484
|
return isVisible(next.host);
|
|
483
485
|
}
|
|
484
|
-
|
|
486
|
+
throwWithCause('Lost in Web Components world');
|
|
485
487
|
} else {
|
|
486
488
|
return false; // this is a node detached from document in IE8
|
|
487
489
|
}
|
|
@@ -505,7 +507,8 @@ export function hasZeroHeight(element) {
|
|
|
505
507
|
let currentElement = element;
|
|
506
508
|
while (currentElement.parentNode) {
|
|
507
509
|
if (currentElement.style.height === '0px' || currentElement.style.height === '0') {
|
|
508
|
-
|
|
510
|
+
const computedOverflow = rootWindow.getComputedStyle(currentElement).getPropertyValue('overflow');
|
|
511
|
+
return computedOverflow === 'hidden' || computedOverflow === 'clip';
|
|
509
512
|
}
|
|
510
513
|
currentElement = currentElement.parentNode;
|
|
511
514
|
}
|
|
@@ -695,7 +698,7 @@ export function getTrimmingContainer(base) {
|
|
|
695
698
|
return el;
|
|
696
699
|
}
|
|
697
700
|
const computedStyle = rootWindow.getComputedStyle(el);
|
|
698
|
-
const allowedProperties = ['scroll', 'hidden', 'auto'];
|
|
701
|
+
const allowedProperties = ['scroll', 'hidden', 'auto', 'clip'];
|
|
699
702
|
const property = computedStyle.getPropertyValue('overflow');
|
|
700
703
|
const propertyY = computedStyle.getPropertyValue('overflow-y');
|
|
701
704
|
const propertyX = computedStyle.getPropertyValue('overflow-x');
|
|
@@ -777,7 +780,7 @@ export function outerWidth(element) {
|
|
|
777
780
|
* @returns {number} Element's outer height.
|
|
778
781
|
*/
|
|
779
782
|
export function outerHeight(element) {
|
|
780
|
-
return element.
|
|
783
|
+
return element.offsetHeight;
|
|
781
784
|
}
|
|
782
785
|
|
|
783
786
|
/**
|
|
@@ -909,7 +912,6 @@ export function setCaretPosition(element, pos, endPos) {
|
|
|
909
912
|
}
|
|
910
913
|
}
|
|
911
914
|
}
|
|
912
|
-
let cachedScrollbarWidth;
|
|
913
915
|
|
|
914
916
|
/**
|
|
915
917
|
* Returns the fractional scaling compensation for scrollbar width calculation.
|
|
@@ -934,7 +936,7 @@ export function getFractionalScalingCompensation() {
|
|
|
934
936
|
* Source: https://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes.
|
|
935
937
|
*
|
|
936
938
|
* @private
|
|
937
|
-
* @param {Document} rootDocument The
|
|
939
|
+
* @param {Document} rootDocument The owner of the document.
|
|
938
940
|
* @returns {number}
|
|
939
941
|
*/
|
|
940
942
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -958,22 +960,23 @@ function walkontableCalculateScrollbarWidth() {
|
|
|
958
960
|
outer.style.width = '200px';
|
|
959
961
|
outer.style.visibility = 'hidden';
|
|
960
962
|
outer.appendChild(inner);
|
|
961
|
-
|
|
962
|
-
const w1 = inner.
|
|
963
|
+
rootDocument.body.appendChild(outer);
|
|
964
|
+
const w1 = inner.offsetWidth;
|
|
963
965
|
outer.style.overflow = 'scroll';
|
|
964
|
-
let w2 = inner.
|
|
966
|
+
let w2 = inner.offsetWidth;
|
|
965
967
|
if (w1 === w2) {
|
|
966
968
|
w2 = outer.clientWidth;
|
|
967
969
|
}
|
|
968
|
-
|
|
969
|
-
return
|
|
970
|
+
rootDocument.body.removeChild(outer);
|
|
971
|
+
return w1 - w2;
|
|
970
972
|
}
|
|
973
|
+
let cachedScrollbarWidth;
|
|
971
974
|
|
|
972
975
|
/**
|
|
973
976
|
* Returns the computed width of the native browser scroll bar.
|
|
974
977
|
*
|
|
975
978
|
* @param {Document} [rootDocument] The owner of the document.
|
|
976
|
-
* @returns {number}
|
|
979
|
+
* @returns {number} The computed width of the native browser scroll bar.
|
|
977
980
|
*/
|
|
978
981
|
// eslint-disable-next-line no-restricted-globals
|
|
979
982
|
export function getScrollbarWidth() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function throwWithCause(message: string): never;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.throwWithCause = throwWithCause;
|
|
5
|
+
/**
|
|
6
|
+
* Throws an Error with a Handsontable-specific cause for easy identification.
|
|
7
|
+
*
|
|
8
|
+
* Use this helper instead of `throw new Error()` to ensure all Handsontable errors
|
|
9
|
+
* can be recognized by checking `error.cause?.handsontable === true`.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} message The error message to display.
|
|
12
|
+
* @throws {Error} Always throws an Error with `cause: { handsontable: true }`.
|
|
13
|
+
*/
|
|
14
|
+
function throwWithCause(message) {
|
|
15
|
+
// eslint-disable-next-line handsontable/no-native-error-throw
|
|
16
|
+
throw new Error(message, {
|
|
17
|
+
cause: {
|
|
18
|
+
handsontable: true
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Throws an Error with a Handsontable-specific cause for easy identification.
|
|
3
|
+
*
|
|
4
|
+
* Use this helper instead of `throw new Error()` to ensure all Handsontable errors
|
|
5
|
+
* can be recognized by checking `error.cause?.handsontable === true`.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} message The error message to display.
|
|
8
|
+
* @throws {Error} Always throws an Error with `cause: { handsontable: true }`.
|
|
9
|
+
*/
|
|
10
|
+
export function throwWithCause(message) {
|
|
11
|
+
// eslint-disable-next-line handsontable/no-native-error-throw
|
|
12
|
+
throw new Error(message, {
|
|
13
|
+
cause: {
|
|
14
|
+
handsontable: true
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
package/helpers/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export * from './array';
|
|
|
2
2
|
export * from './browser';
|
|
3
3
|
export * from './console';
|
|
4
4
|
export * from './data';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './dateTime';
|
|
6
|
+
export * from './errors';
|
|
6
7
|
export * from './feature';
|
|
7
8
|
export * from './function';
|
|
8
9
|
export * from './mixed';
|
package/helpers/mixed.js
CHANGED
|
@@ -7,9 +7,7 @@ exports.isEmpty = isEmpty;
|
|
|
7
7
|
exports.isRegExp = isRegExp;
|
|
8
8
|
exports.isUndefined = isUndefined;
|
|
9
9
|
exports.stringify = stringify;
|
|
10
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
11
10
|
var _templateLiteralTag = require("./templateLiteralTag");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
11
|
/**
|
|
14
12
|
* Converts any value to string.
|
|
15
13
|
*
|
|
@@ -131,10 +129,10 @@ const domMessages = {
|
|
|
131
129
|
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,
|
|
132
130
|
non_commercial: () => ''
|
|
133
131
|
};
|
|
134
|
-
function _injectProductInfo(key, element) {
|
|
132
|
+
function _injectProductInfo(key, element, releaseDate) {
|
|
135
133
|
const hasValidType = !isEmpty(key);
|
|
136
134
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
|
137
|
-
const hotVersion = "
|
|
135
|
+
const hotVersion = "17.0.0-rc1";
|
|
138
136
|
let keyValidityDate;
|
|
139
137
|
let consoleMessageState = 'invalid';
|
|
140
138
|
let domMessageState = 'invalid';
|
|
@@ -142,10 +140,15 @@ function _injectProductInfo(key, element) {
|
|
|
142
140
|
const schemaValidity = _checkKeySchema(key);
|
|
143
141
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
|
144
142
|
if (schemaValidity) {
|
|
145
|
-
const
|
|
146
|
-
const releaseDays = Math.floor(
|
|
143
|
+
const [dd, mm, yyyy] = releaseDate.split('/').map(Number);
|
|
144
|
+
const releaseDays = Math.floor(Date.UTC(yyyy, mm - 1, dd) / 8.64e7);
|
|
147
145
|
const keyValidityDays = _extractTime(key);
|
|
148
|
-
keyValidityDate =
|
|
146
|
+
keyValidityDate = new Intl.DateTimeFormat('en-US', {
|
|
147
|
+
year: 'numeric',
|
|
148
|
+
month: 'long',
|
|
149
|
+
day: '2-digit',
|
|
150
|
+
timeZone: 'UTC'
|
|
151
|
+
}).format((keyValidityDays + 1) * 8.64e7);
|
|
149
152
|
if (releaseDays > keyValidityDays) {
|
|
150
153
|
consoleMessageState = 'expired';
|
|
151
154
|
domMessageState = 'expired';
|
package/helpers/mixed.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import moment from 'moment';
|
|
2
1
|
import { toSingleLine } from "./templateLiteralTag.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* Converts any value to string.
|
|
@@ -121,10 +120,10 @@ const domMessages = {
|
|
|
121
120
|
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,
|
|
122
121
|
non_commercial: () => ''
|
|
123
122
|
};
|
|
124
|
-
export function _injectProductInfo(key, element) {
|
|
123
|
+
export function _injectProductInfo(key, element, releaseDate) {
|
|
125
124
|
const hasValidType = !isEmpty(key);
|
|
126
125
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
|
127
|
-
const hotVersion = "
|
|
126
|
+
const hotVersion = "17.0.0-rc1";
|
|
128
127
|
let keyValidityDate;
|
|
129
128
|
let consoleMessageState = 'invalid';
|
|
130
129
|
let domMessageState = 'invalid';
|
|
@@ -132,10 +131,15 @@ export function _injectProductInfo(key, element) {
|
|
|
132
131
|
const schemaValidity = _checkKeySchema(key);
|
|
133
132
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
|
134
133
|
if (schemaValidity) {
|
|
135
|
-
const
|
|
136
|
-
const releaseDays = Math.floor(
|
|
134
|
+
const [dd, mm, yyyy] = releaseDate.split('/').map(Number);
|
|
135
|
+
const releaseDays = Math.floor(Date.UTC(yyyy, mm - 1, dd) / 8.64e7);
|
|
137
136
|
const keyValidityDays = _extractTime(key);
|
|
138
|
-
keyValidityDate =
|
|
137
|
+
keyValidityDate = new Intl.DateTimeFormat('en-US', {
|
|
138
|
+
year: 'numeric',
|
|
139
|
+
month: 'long',
|
|
140
|
+
day: '2-digit',
|
|
141
|
+
timeZone: 'UTC'
|
|
142
|
+
}).format((keyValidityDays + 1) * 8.64e7);
|
|
139
143
|
if (releaseDays > keyValidityDays) {
|
|
140
144
|
consoleMessageState = 'expired';
|
|
141
145
|
domMessageState = 'expired';
|
package/helpers/moves.js
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.getMoves = getMoves;
|
|
5
|
-
require("core-js/modules/es.array.push.js");
|
|
6
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
7
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
8
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
9
5
|
/**
|
|
10
6
|
* Gets first position where to move element (respecting the fact that some element will be sooner or later
|
|
11
7
|
* taken out of the dataset in order to move them).
|
package/helpers/moves.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/es.array.push.js";
|
|
2
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
3
|
-
import "core-js/modules/esnext.iterator.filter.js";
|
|
4
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
|
5
1
|
/**
|
|
6
2
|
* Gets first position where to move element (respecting the fact that some element will be sooner or later
|
|
7
3
|
* taken out of the dataset in order to move them).
|
package/helpers/number.js
CHANGED
|
@@ -9,15 +9,6 @@ exports.isUnsignedNumber = isUnsignedNumber;
|
|
|
9
9
|
exports.rangeEach = rangeEach;
|
|
10
10
|
exports.rangeEachReverse = rangeEachReverse;
|
|
11
11
|
exports.valueAccordingPercent = valueAccordingPercent;
|
|
12
|
-
require("core-js/modules/es.set.difference.v2.js");
|
|
13
|
-
require("core-js/modules/es.set.intersection.v2.js");
|
|
14
|
-
require("core-js/modules/es.set.is-disjoint-from.v2.js");
|
|
15
|
-
require("core-js/modules/es.set.is-subset-of.v2.js");
|
|
16
|
-
require("core-js/modules/es.set.is-superset-of.v2.js");
|
|
17
|
-
require("core-js/modules/es.set.symmetric-difference.v2.js");
|
|
18
|
-
require("core-js/modules/es.set.union.v2.js");
|
|
19
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
20
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
21
12
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
22
13
|
/**
|
|
23
14
|
* Checks if the passed value is numeric one. For example these values (passed as string or number)
|
package/helpers/number.mjs
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/es.set.difference.v2.js";
|
|
2
|
-
import "core-js/modules/es.set.intersection.v2.js";
|
|
3
|
-
import "core-js/modules/es.set.is-disjoint-from.v2.js";
|
|
4
|
-
import "core-js/modules/es.set.is-subset-of.v2.js";
|
|
5
|
-
import "core-js/modules/es.set.is-superset-of.v2.js";
|
|
6
|
-
import "core-js/modules/es.set.symmetric-difference.v2.js";
|
|
7
|
-
import "core-js/modules/es.set.union.v2.js";
|
|
8
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
9
|
-
import "core-js/modules/esnext.iterator.map.js";
|
|
10
1
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
11
2
|
/**
|
|
12
3
|
* Checks if the passed value is numeric one. For example these values (passed as string or number)
|
package/helpers/object.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.clone = clone;
|
|
|
6
6
|
exports.createObjectPropListener = createObjectPropListener;
|
|
7
7
|
exports.deepClone = deepClone;
|
|
8
8
|
exports.deepExtend = deepExtend;
|
|
9
|
+
exports.deepMerge = deepMerge;
|
|
9
10
|
exports.deepObjectSize = deepObjectSize;
|
|
10
11
|
exports.defineGetter = defineGetter;
|
|
11
12
|
exports.duckSchema = duckSchema;
|
|
@@ -13,17 +14,15 @@ exports.extend = extend;
|
|
|
13
14
|
exports.getProperty = getProperty;
|
|
14
15
|
exports.hasOwnProperty = hasOwnProperty;
|
|
15
16
|
exports.inherit = inherit;
|
|
17
|
+
exports.isKeyValueObject = isKeyValueObject;
|
|
16
18
|
exports.isObject = isObject;
|
|
17
19
|
exports.isObjectEqual = isObjectEqual;
|
|
18
20
|
exports.mixin = mixin;
|
|
19
21
|
exports.objectEach = objectEach;
|
|
20
22
|
exports.setProperty = setProperty;
|
|
21
|
-
require("core-js/modules/es.error.cause.js");
|
|
22
|
-
require("core-js/modules/es.array.push.js");
|
|
23
|
-
require("core-js/modules/es.json.stringify.js");
|
|
24
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
25
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
26
23
|
var _array = require("./array");
|
|
24
|
+
var _mixed = require("./mixed");
|
|
25
|
+
var _errors = require("../helpers/errors");
|
|
27
26
|
/**
|
|
28
27
|
* Generate schema for passed object.
|
|
29
28
|
*
|
|
@@ -161,7 +160,7 @@ function mixin(Base) {
|
|
|
161
160
|
Base.MIXINS.push(mixinItem.MIXIN_NAME);
|
|
162
161
|
objectEach(mixinItem, (value, key) => {
|
|
163
162
|
if (Base.prototype[key] !== undefined) {
|
|
164
|
-
|
|
163
|
+
(0, _errors.throwWithCause)(`Mixin conflict. Property '${key}' already exist and cannot be overwritten.`);
|
|
165
164
|
}
|
|
166
165
|
if (typeof value === 'function') {
|
|
167
166
|
Base.prototype[key] = value;
|
|
@@ -404,4 +403,46 @@ function assignObjectDefaults(target, defaults) {
|
|
|
404
403
|
}
|
|
405
404
|
});
|
|
406
405
|
return result;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Deeply merges two objects.
|
|
410
|
+
* For every key:
|
|
411
|
+
* - If both source and target values are plain objects, they are merged recursively.
|
|
412
|
+
* - Otherwise, the source value replaces the target value.
|
|
413
|
+
*
|
|
414
|
+
* @param {object} target The target object.
|
|
415
|
+
* @param {object} source The source object.
|
|
416
|
+
* @returns {object} The merged object.
|
|
417
|
+
*/
|
|
418
|
+
function deepMerge() {
|
|
419
|
+
let target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
420
|
+
let source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
421
|
+
const result = {
|
|
422
|
+
...target
|
|
423
|
+
};
|
|
424
|
+
Object.keys(source).forEach(key => {
|
|
425
|
+
// Prevent prototype pollution
|
|
426
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
const sourceValue = source[key];
|
|
430
|
+
const targetValue = result[key];
|
|
431
|
+
if (isObject(sourceValue) && isObject(targetValue)) {
|
|
432
|
+
result[key] = deepMerge(targetValue, sourceValue);
|
|
433
|
+
} else {
|
|
434
|
+
result[key] = sourceValue;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
return result;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Checks if the value is a key/value object.
|
|
442
|
+
*
|
|
443
|
+
* @param {*} value The value to check.
|
|
444
|
+
* @returns {boolean}
|
|
445
|
+
*/
|
|
446
|
+
function isKeyValueObject(value) {
|
|
447
|
+
return isObject(value) && (0, _mixed.isDefined)(value.key) && (0, _mixed.isDefined)(value.value);
|
|
407
448
|
}
|