handsontable 12.2.0 → 12.3.0-next-9dc4f5d-20221209
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +13 -6
- package/3rdparty/walkontable/src/border.mjs +12 -5
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -1
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +64 -26
- package/3rdparty/walkontable/src/cell/coords.mjs +64 -26
- package/3rdparty/walkontable/src/cell/range.d.ts +19 -16
- package/3rdparty/walkontable/src/cell/range.js +199 -104
- package/3rdparty/walkontable/src/cell/range.mjs +201 -106
- package/3rdparty/walkontable/src/core/_base.js +17 -3
- package/3rdparty/walkontable/src/core/_base.mjs +20 -6
- package/3rdparty/walkontable/src/core/clone.js +13 -7
- package/3rdparty/walkontable/src/core/clone.mjs +15 -9
- package/3rdparty/walkontable/src/core/core.js +8 -2
- package/3rdparty/walkontable/src/core/core.mjs +10 -4
- package/3rdparty/walkontable/src/event.js +10 -1
- package/3rdparty/walkontable/src/event.mjs +10 -1
- package/3rdparty/walkontable/src/facade/core.js +16 -2
- package/3rdparty/walkontable/src/facade/core.mjs +22 -8
- package/3rdparty/walkontable/src/filter/column.js +16 -2
- package/3rdparty/walkontable/src/filter/column.mjs +16 -2
- package/3rdparty/walkontable/src/filter/row.js +16 -2
- package/3rdparty/walkontable/src/filter/row.mjs +16 -2
- package/3rdparty/walkontable/src/overlay/_base.js +17 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +24 -10
- package/3rdparty/walkontable/src/overlay/bottom.js +13 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/top.js +13 -7
- package/3rdparty/walkontable/src/overlay/top.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +13 -7
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +15 -9
- package/3rdparty/walkontable/src/overlays.js +69 -19
- package/3rdparty/walkontable/src/overlays.mjs +71 -21
- package/3rdparty/walkontable/src/renderer/_base.js +16 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/cells.js +8 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/colGroup.js +8 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/index.js +16 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/rows.js +8 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +8 -3
- package/3rdparty/walkontable/src/renderer/table.js +16 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +16 -2
- package/3rdparty/walkontable/src/scroll.js +16 -3
- package/3rdparty/walkontable/src/scroll.mjs +18 -5
- package/3rdparty/walkontable/src/selection.js +11 -5
- package/3rdparty/walkontable/src/selection.mjs +11 -5
- package/3rdparty/walkontable/src/settings.js +16 -2
- package/3rdparty/walkontable/src/settings.mjs +16 -2
- package/3rdparty/walkontable/src/table/bottom.js +8 -2
- package/3rdparty/walkontable/src/table/bottom.mjs +13 -7
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/table/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/table/master.js +8 -2
- package/3rdparty/walkontable/src/table/master.mjs +13 -7
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +12 -6
- package/3rdparty/walkontable/src/table/top.js +8 -2
- package/3rdparty/walkontable/src/table/top.mjs +13 -7
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table.js +13 -6
- package/3rdparty/walkontable/src/table.mjs +21 -14
- package/3rdparty/walkontable/src/utils/column.js +12 -2
- package/3rdparty/walkontable/src/utils/column.mjs +16 -6
- package/3rdparty/walkontable/src/utils/nodesPool.js +16 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +8 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +12 -6
- package/3rdparty/walkontable/src/utils/orderView/view.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +23 -9
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +31 -17
- package/3rdparty/walkontable/src/utils/row.js +16 -2
- package/3rdparty/walkontable/src/utils/row.mjs +16 -2
- package/3rdparty/walkontable/src/viewport.js +16 -2
- package/3rdparty/walkontable/src/viewport.mjs +18 -4
- package/CHANGELOG.md +23 -0
- package/base.d.ts +1 -0
- package/base.js +7 -2
- package/base.mjs +9 -4
- package/cellTypes/index.mjs +4 -3
- package/core.d.ts +1 -1
- package/core.js +234 -122
- package/core.mjs +231 -119
- package/dataMap/dataMap.js +98 -28
- package/dataMap/dataMap.mjs +97 -27
- package/dataMap/dataSource.js +14 -2
- package/dataMap/dataSource.mjs +17 -5
- package/dataMap/metaManager/index.js +15 -2
- package/dataMap/metaManager/index.mjs +41 -28
- package/dataMap/metaManager/lazyFactoryMap.js +7 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +7 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +13 -8
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +12 -7
- package/dataMap/metaManager/metaLayers/columnMeta.js +15 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +23 -9
- package/dataMap/metaManager/metaLayers/globalMeta.js +26 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +27 -3
- package/dataMap/metaManager/metaLayers/tableMeta.js +17 -3
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +41 -27
- package/dataMap/metaManager/metaSchema.js +119 -66
- package/dataMap/metaManager/metaSchema.mjs +119 -66
- package/dataMap/metaManager/mods/dynamicCellMeta.js +12 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +26 -16
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +10 -1
- package/dataMap/metaManager/utils.js +44 -14
- package/dataMap/metaManager/utils.mjs +51 -20
- package/dataMap/replaceData.js +2 -1
- package/dataMap/replaceData.mjs +24 -22
- package/dist/handsontable.css +9 -9
- package/dist/handsontable.full.css +9 -9
- package/dist/handsontable.full.js +7350 -10885
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +107 -113
- package/dist/handsontable.js +5800 -4499
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +111 -65
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +50 -4
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +52 -6
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +52 -6
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +53 -7
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +56 -10
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +56 -10
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +55 -9
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +55 -9
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +83 -33
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +84 -33
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +85 -33
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +86 -33
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +87 -33
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +88 -33
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +68 -19
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +68 -19
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +55 -6
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +55 -6
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +55 -6
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +18 -9
- package/editorManager.mjs +15 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -5
- package/editors/autocompleteEditor/autocompleteEditor.mjs +9 -4
- package/editors/baseEditor/baseEditor.js +11 -6
- package/editors/baseEditor/baseEditor.mjs +10 -5
- package/editors/checkboxEditor/checkboxEditor.js +6 -1
- package/editors/checkboxEditor/checkboxEditor.mjs +6 -1
- package/editors/dateEditor/dateEditor.js +6 -1
- package/editors/dateEditor/dateEditor.mjs +6 -1
- package/editors/dropdownEditor/dropdownEditor.js +6 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +6 -1
- package/editors/handsontableEditor/handsontableEditor.js +6 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +6 -1
- package/editors/index.mjs +4 -3
- package/editors/numericEditor/numericEditor.js +6 -1
- package/editors/numericEditor/numericEditor.mjs +6 -1
- package/editors/passwordEditor/passwordEditor.js +6 -1
- package/editors/passwordEditor/passwordEditor.mjs +6 -1
- package/editors/registry.js +3 -0
- package/editors/registry.mjs +5 -1
- package/editors/selectEditor/selectEditor.js +6 -1
- package/editors/selectEditor/selectEditor.mjs +6 -1
- package/editors/textEditor/caretPositioner.mjs +11 -10
- package/editors/textEditor/textEditor.js +7 -2
- package/editors/textEditor/textEditor.mjs +7 -2
- package/editors/timeEditor/timeEditor.js +6 -1
- package/editors/timeEditor/timeEditor.mjs +6 -1
- package/eventManager.js +24 -9
- package/eventManager.mjs +26 -11
- package/helpers/console.mjs +6 -5
- package/helpers/data.d.ts +0 -1
- package/helpers/data.js +0 -49
- package/helpers/data.mjs +1 -49
- package/helpers/dom/element.js +23 -0
- package/helpers/dom/element.mjs +30 -7
- package/helpers/feature.js +9 -36
- package/helpers/feature.mjs +3 -30
- package/helpers/function.mjs +7 -6
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +9 -8
- package/helpers/object.js +15 -9
- package/helpers/object.mjs +17 -10
- package/helpers/string.mjs +7 -6
- package/helpers/templateLiteralTag.mjs +8 -7
- package/i18n/constants.js +49 -42
- package/i18n/constants.mjs +45 -41
- package/i18n/languages/ar-AR.js +12 -7
- package/i18n/languages/ar-AR.mjs +16 -2
- package/i18n/languages/cs-CZ.js +12 -7
- package/i18n/languages/cs-CZ.mjs +16 -2
- package/i18n/languages/de-CH.js +12 -7
- package/i18n/languages/de-CH.mjs +16 -2
- package/i18n/languages/de-DE.js +12 -7
- package/i18n/languages/de-DE.mjs +16 -2
- package/i18n/languages/en-US.js +13 -8
- package/i18n/languages/en-US.mjs +17 -3
- package/i18n/languages/es-MX.js +13 -8
- package/i18n/languages/es-MX.mjs +19 -4
- package/i18n/languages/fr-FR.js +12 -7
- package/i18n/languages/fr-FR.mjs +16 -2
- package/i18n/languages/it-IT.js +12 -7
- package/i18n/languages/it-IT.mjs +16 -2
- package/i18n/languages/ja-JP.js +12 -7
- package/i18n/languages/ja-JP.mjs +16 -2
- package/i18n/languages/ko-KR.js +12 -7
- package/i18n/languages/ko-KR.mjs +16 -2
- package/i18n/languages/lv-LV.js +13 -8
- package/i18n/languages/lv-LV.mjs +19 -5
- package/i18n/languages/nb-NO.js +12 -7
- package/i18n/languages/nb-NO.mjs +16 -2
- package/i18n/languages/nl-NL.js +13 -8
- package/i18n/languages/nl-NL.mjs +19 -5
- package/i18n/languages/pl-PL.js +13 -8
- package/i18n/languages/pl-PL.mjs +18 -4
- package/i18n/languages/pt-BR.js +12 -7
- package/i18n/languages/pt-BR.mjs +16 -2
- package/i18n/languages/ru-RU.js +12 -7
- package/i18n/languages/ru-RU.mjs +16 -2
- package/i18n/languages/sr-SP.js +12 -7
- package/i18n/languages/sr-SP.mjs +16 -2
- package/i18n/languages/zh-CN.js +12 -7
- package/i18n/languages/zh-CN.mjs +16 -2
- package/i18n/languages/zh-TW.js +12 -7
- package/i18n/languages/zh-TW.mjs +16 -2
- package/i18n/phraseFormatters/substituteVariables.mjs +9 -8
- package/i18n/utils.mjs +10 -9
- package/index.d.ts +9 -0
- package/index.js +4 -2
- package/index.mjs +2 -1
- package/languages/all.js +111 -65
- package/languages/ar-AR.js +50 -4
- package/languages/ar-AR.mjs +16 -2
- package/languages/cs-CZ.js +52 -6
- package/languages/cs-CZ.mjs +16 -2
- package/languages/de-CH.js +52 -6
- package/languages/de-CH.mjs +16 -2
- package/languages/de-DE.js +53 -7
- package/languages/de-DE.mjs +16 -2
- package/languages/en-US.js +56 -10
- package/languages/en-US.mjs +17 -3
- package/languages/es-MX.js +56 -10
- package/languages/es-MX.mjs +19 -4
- package/languages/fr-FR.js +55 -9
- package/languages/fr-FR.mjs +16 -2
- package/languages/index.js +111 -65
- package/languages/it-IT.js +55 -9
- package/languages/it-IT.mjs +16 -2
- package/languages/ja-JP.js +83 -33
- package/languages/ja-JP.mjs +16 -2
- package/languages/ko-KR.js +84 -33
- package/languages/ko-KR.mjs +16 -2
- package/languages/lv-LV.js +85 -33
- package/languages/lv-LV.mjs +19 -5
- package/languages/nb-NO.js +86 -33
- package/languages/nb-NO.mjs +16 -2
- package/languages/nl-NL.js +87 -33
- package/languages/nl-NL.mjs +19 -5
- package/languages/pl-PL.js +88 -33
- package/languages/pl-PL.mjs +18 -4
- package/languages/pt-BR.js +68 -19
- package/languages/pt-BR.mjs +16 -2
- package/languages/ru-RU.js +68 -19
- package/languages/ru-RU.mjs +16 -2
- package/languages/sr-SP.js +55 -6
- package/languages/sr-SP.mjs +16 -2
- package/languages/zh-CN.js +55 -6
- package/languages/zh-CN.mjs +16 -2
- package/languages/zh-TW.js +55 -6
- package/languages/zh-TW.mjs +16 -2
- package/mixins/hooksRefRegisterer.js +6 -3
- package/mixins/hooksRefRegisterer.mjs +6 -3
- package/mixins/localHooks.js +6 -3
- package/mixins/localHooks.mjs +6 -3
- package/package.json +2 -2
- package/pluginHooks.d.ts +7 -2
- package/pluginHooks.js +109 -24
- package/pluginHooks.mjs +109 -24
- package/plugins/autoColumnSize/autoColumnSize.js +7 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +7 -2
- package/plugins/autoRowSize/autoRowSize.js +16 -7
- package/plugins/autoRowSize/autoRowSize.mjs +16 -7
- package/plugins/autofill/autofill.js +7 -2
- package/plugins/autofill/autofill.mjs +7 -2
- package/plugins/base/base.js +8 -2
- package/plugins/base/base.mjs +8 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +6 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +6 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +10 -5
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -4
- package/plugins/columnSorting/columnSorting.js +8 -4
- package/plugins/columnSorting/columnSorting.mjs +8 -4
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +9 -3
- package/plugins/columnSorting/rootComparator.mjs +8 -7
- package/plugins/columnSorting/sortFunction/checkbox.mjs +9 -8
- package/plugins/columnSorting/sortFunction/date.mjs +9 -8
- package/plugins/columnSorting/sortFunction/default.mjs +9 -8
- package/plugins/columnSorting/sortFunction/numeric.mjs +9 -8
- package/plugins/columnSummary/columnSummary.js +13 -8
- package/plugins/columnSummary/columnSummary.mjs +13 -8
- package/plugins/columnSummary/endpoints.js +17 -16
- package/plugins/columnSummary/endpoints.mjs +22 -21
- package/plugins/comments/commentEditor.js +16 -2
- package/plugins/comments/commentEditor.mjs +21 -7
- package/plugins/comments/comments.js +15 -4
- package/plugins/comments/comments.mjs +15 -4
- package/plugins/comments/displaySwitch.js +14 -1
- package/plugins/comments/displaySwitch.mjs +14 -1
- package/plugins/contextMenu/commandExecutor.js +22 -7
- package/plugins/contextMenu/commandExecutor.mjs +27 -12
- package/plugins/contextMenu/contextMenu.d.ts +4 -3
- package/plugins/contextMenu/contextMenu.js +7 -17
- package/plugins/contextMenu/contextMenu.mjs +7 -17
- package/plugins/contextMenu/cursor.js +16 -2
- package/plugins/contextMenu/cursor.mjs +21 -7
- package/plugins/contextMenu/itemsFactory.js +23 -8
- package/plugins/contextMenu/itemsFactory.mjs +28 -13
- package/plugins/contextMenu/menu.js +14 -3
- package/plugins/contextMenu/menu.mjs +13 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/contextMenu/predefinedItems.js +12 -7
- package/plugins/contextMenu/predefinedItems.mjs +14 -1
- package/plugins/contextMenu/utils.mjs +5 -4
- package/plugins/copyPaste/clipboardData.js +16 -2
- package/plugins/copyPaste/clipboardData.mjs +16 -2
- package/plugins/copyPaste/contextMenuItem/copy.js +4 -16
- package/plugins/copyPaste/contextMenuItem/copy.mjs +8 -7
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +5 -4
- package/plugins/copyPaste/copyPaste.d.ts +10 -2
- package/plugins/copyPaste/copyPaste.js +303 -202
- package/plugins/copyPaste/copyPaste.mjs +303 -202
- package/plugins/copyPaste/copyableRanges.js +269 -0
- package/plugins/copyPaste/copyableRanges.mjs +264 -0
- package/plugins/copyPaste/focusableElement.js +12 -2
- package/plugins/copyPaste/focusableElement.mjs +15 -5
- package/plugins/copyPaste/pasteEvent.js +16 -2
- package/plugins/copyPaste/pasteEvent.mjs +18 -4
- package/plugins/customBorders/contextMenuItem/bottom.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/left.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/noBorders.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/right.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/top.mjs +5 -4
- package/plugins/customBorders/customBorders.js +12 -7
- package/plugins/customBorders/customBorders.mjs +11 -6
- package/plugins/customBorders/utils.mjs +8 -7
- package/plugins/dragToScroll/dragToScroll.js +6 -1
- package/plugins/dragToScroll/dragToScroll.mjs +6 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +6 -1
- package/plugins/exportFile/dataProvider.js +13 -6
- package/plugins/exportFile/dataProvider.mjs +12 -5
- package/plugins/exportFile/exportFile.js +8 -3
- package/plugins/exportFile/exportFile.mjs +6 -1
- package/plugins/exportFile/typeFactory.js +14 -1
- package/plugins/exportFile/typeFactory.mjs +14 -1
- package/plugins/exportFile/types/_base.js +16 -2
- package/plugins/exportFile/types/_base.mjs +18 -4
- package/plugins/exportFile/types/csv.js +6 -1
- package/plugins/exportFile/types/csv.mjs +6 -1
- package/plugins/filters/component/_base.js +16 -2
- package/plugins/filters/component/_base.mjs +19 -5
- package/plugins/filters/component/actionBar.js +10 -4
- package/plugins/filters/component/actionBar.mjs +11 -5
- package/plugins/filters/component/condition.js +10 -4
- package/plugins/filters/component/condition.mjs +11 -5
- package/plugins/filters/component/operators.js +8 -3
- package/plugins/filters/component/operators.mjs +8 -3
- package/plugins/filters/component/value.js +9 -3
- package/plugins/filters/component/value.mjs +12 -6
- package/plugins/filters/condition/beginsWith.js +1 -1
- package/plugins/filters/condition/beginsWith.mjs +1 -1
- package/plugins/filters/condition/between.js +1 -1
- package/plugins/filters/condition/between.mjs +1 -1
- package/plugins/filters/condition/byValue.js +1 -1
- package/plugins/filters/condition/byValue.mjs +1 -1
- package/plugins/filters/condition/contains.js +1 -1
- package/plugins/filters/condition/contains.mjs +1 -1
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/after.mjs +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/before.mjs +1 -1
- package/plugins/filters/condition/endsWith.js +1 -1
- package/plugins/filters/condition/endsWith.mjs +1 -1
- package/plugins/filters/condition/equal.js +1 -1
- package/plugins/filters/condition/equal.mjs +1 -1
- package/plugins/filters/condition/greaterThan.js +1 -1
- package/plugins/filters/condition/greaterThan.mjs +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.mjs +1 -1
- package/plugins/filters/condition/lessThan.js +1 -1
- package/plugins/filters/condition/lessThan.mjs +1 -1
- package/plugins/filters/condition/lessThanOrEqual.js +1 -1
- package/plugins/filters/condition/lessThanOrEqual.mjs +1 -1
- package/plugins/filters/conditionCollection.js +10 -4
- package/plugins/filters/conditionCollection.mjs +18 -12
- package/plugins/filters/conditionUpdateObserver.js +15 -2
- package/plugins/filters/conditionUpdateObserver.mjs +23 -10
- package/plugins/filters/constants.js +14 -1
- package/plugins/filters/constants.mjs +14 -1
- package/plugins/filters/dataFilter.js +16 -2
- package/plugins/filters/dataFilter.mjs +19 -5
- package/plugins/filters/filters.js +7 -2
- package/plugins/filters/filters.mjs +7 -2
- package/plugins/filters/ui/_base.js +12 -7
- package/plugins/filters/ui/_base.mjs +14 -1
- package/plugins/filters/ui/input.js +6 -1
- package/plugins/filters/ui/input.mjs +6 -1
- package/plugins/filters/ui/link.js +6 -1
- package/plugins/filters/ui/link.mjs +6 -1
- package/plugins/filters/ui/multipleSelect.js +14 -8
- package/plugins/filters/ui/multipleSelect.mjs +6 -1
- package/plugins/filters/ui/radioInput.js +6 -1
- package/plugins/filters/ui/radioInput.mjs +6 -1
- package/plugins/filters/ui/select.js +6 -1
- package/plugins/filters/ui/select.mjs +6 -1
- package/plugins/formulas/engine/register.mjs +6 -5
- package/plugins/formulas/engine/settings.js +12 -1
- package/plugins/formulas/engine/settings.mjs +12 -1
- package/plugins/formulas/formulas.js +24 -11
- package/plugins/formulas/formulas.mjs +24 -11
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +6 -5
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -4
- package/plugins/hiddenColumns/hiddenColumns.js +5 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +5 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +6 -5
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -4
- package/plugins/hiddenRows/hiddenRows.js +5 -1
- package/plugins/hiddenRows/hiddenRows.mjs +5 -1
- package/plugins/index.mjs +4 -3
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +6 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +6 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -1
- package/plugins/manualColumnMove/manualColumnMove.mjs +6 -1
- package/plugins/manualColumnMove/ui/_base.js +14 -1
- package/plugins/manualColumnMove/ui/_base.mjs +14 -1
- package/plugins/manualColumnMove/ui/backlight.js +6 -1
- package/plugins/manualColumnMove/ui/backlight.mjs +6 -1
- package/plugins/manualColumnMove/ui/guideline.js +6 -1
- package/plugins/manualColumnMove/ui/guideline.mjs +6 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -1
- package/plugins/manualRowMove/manualRowMove.js +6 -1
- package/plugins/manualRowMove/manualRowMove.mjs +6 -1
- package/plugins/manualRowMove/ui/_base.js +14 -1
- package/plugins/manualRowMove/ui/_base.mjs +14 -1
- package/plugins/manualRowMove/ui/backlight.js +6 -1
- package/plugins/manualRowMove/ui/backlight.mjs +6 -1
- package/plugins/manualRowMove/ui/guideline.js +6 -1
- package/plugins/manualRowMove/ui/guideline.mjs +6 -1
- package/plugins/manualRowResize/manualRowResize.js +6 -1
- package/plugins/manualRowResize/manualRowResize.mjs +6 -1
- package/plugins/mergeCells/calculations/autofill.js +13 -6
- package/plugins/mergeCells/calculations/autofill.mjs +15 -8
- package/plugins/mergeCells/calculations/selection.js +16 -2
- package/plugins/mergeCells/calculations/selection.mjs +16 -2
- package/plugins/mergeCells/cellCoords.js +16 -2
- package/plugins/mergeCells/cellCoords.mjs +21 -7
- package/plugins/mergeCells/cellsCollection.js +12 -5
- package/plugins/mergeCells/cellsCollection.mjs +14 -7
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +5 -4
- package/plugins/mergeCells/mergeCells.js +7 -2
- package/plugins/mergeCells/mergeCells.mjs +7 -2
- package/plugins/multiColumnSorting/multiColumnSorting.js +6 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -1
- package/plugins/multiColumnSorting/rootComparator.mjs +8 -7
- package/plugins/multiColumnSorting/utils.mjs +4 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +6 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +6 -1
- package/plugins/nestedHeaders/nestedHeaders.js +124 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +131 -23
- package/plugins/nestedHeaders/stateManager/headersTree.js +10 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +10 -3
- package/plugins/nestedHeaders/stateManager/index.js +34 -14
- package/plugins/nestedHeaders/stateManager/index.mjs +67 -47
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +33 -31
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +18 -17
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +17 -16
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +2 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +41 -39
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +11 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +23 -14
- package/plugins/nestedHeaders/utils/ghostTable.js +17 -3
- package/plugins/nestedHeaders/utils/ghostTable.mjs +24 -10
- package/plugins/nestedRows/data/dataManager.js +10 -4
- package/plugins/nestedRows/data/dataManager.mjs +12 -6
- package/plugins/nestedRows/nestedRows.js +6 -1
- package/plugins/nestedRows/nestedRows.mjs +6 -1
- package/plugins/nestedRows/ui/_base.js +16 -2
- package/plugins/nestedRows/ui/_base.mjs +16 -2
- package/plugins/nestedRows/ui/collapsing.js +8 -2
- package/plugins/nestedRows/ui/collapsing.mjs +14 -8
- package/plugins/nestedRows/ui/contextMenu.js +7 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +6 -1
- package/plugins/nestedRows/ui/headers.js +8 -2
- package/plugins/nestedRows/ui/headers.mjs +14 -8
- package/plugins/nestedRows/utils/rowMoveController.js +11 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +25 -18
- package/plugins/persistentState/persistentState.js +6 -1
- package/plugins/persistentState/persistentState.mjs +6 -1
- package/plugins/persistentState/storage.js +16 -2
- package/plugins/persistentState/storage.mjs +19 -5
- package/plugins/registry.js +1 -1
- package/plugins/registry.mjs +3 -2
- package/plugins/search/search.js +6 -1
- package/plugins/search/search.mjs +6 -1
- package/plugins/touchScroll/touchScroll.js +6 -1
- package/plugins/touchScroll/touchScroll.mjs +6 -1
- package/plugins/trimRows/trimRows.js +5 -1
- package/plugins/trimRows/trimRows.mjs +5 -1
- package/plugins/undoRedo/undoRedo.js +50 -32
- package/plugins/undoRedo/undoRedo.mjs +50 -32
- package/registry.mjs +2 -1
- package/renderers/baseRenderer/baseRenderer.mjs +2 -1
- package/renderers/index.mjs +4 -3
- package/selection/highlight/highlight.js +10 -3
- package/selection/highlight/highlight.mjs +24 -17
- package/selection/highlight/types/activeHeader.js +13 -2
- package/selection/highlight/types/activeHeader.mjs +19 -7
- package/selection/highlight/types/area.js +13 -2
- package/selection/highlight/types/area.mjs +22 -10
- package/selection/highlight/types/cell.js +13 -2
- package/selection/highlight/types/cell.mjs +22 -10
- package/selection/highlight/types/customSelection.js +13 -2
- package/selection/highlight/types/customSelection.mjs +23 -11
- package/selection/highlight/types/fill.js +14 -3
- package/selection/highlight/types/fill.mjs +22 -10
- package/selection/highlight/types/header.js +13 -2
- package/selection/highlight/types/header.mjs +24 -12
- package/selection/highlight/types/index.js +14 -3
- package/selection/highlight/types/index.mjs +14 -3
- package/selection/highlight/visualSelection.js +11 -6
- package/selection/highlight/visualSelection.mjs +11 -6
- package/selection/mouseEventHandler.mjs +14 -13
- package/selection/range.js +9 -2
- package/selection/range.mjs +9 -2
- package/selection/selection.js +13 -6
- package/selection/selection.mjs +21 -14
- package/selection/transformation.js +16 -2
- package/selection/transformation.mjs +24 -10
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +1 -1
- package/shortcuts/context.js +1 -1
- package/shortcuts/context.mjs +1 -1
- package/shortcuts/keyObserver.js +8 -4
- package/shortcuts/keyObserver.mjs +8 -4
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- package/tableView.js +147 -68
- package/tableView.mjs +147 -68
- package/translations/changesObservable/observable.js +12 -2
- package/translations/changesObservable/observable.mjs +19 -9
- package/translations/changesObservable/observer.js +12 -2
- package/translations/changesObservable/observer.mjs +17 -7
- package/translations/indexMapper.js +12 -6
- package/translations/indexMapper.mjs +17 -11
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +11 -5
- package/translations/mapCollections/mapCollection.js +10 -1
- package/translations/mapCollections/mapCollection.mjs +10 -1
- package/translations/maps/hidingMap.js +8 -2
- package/translations/maps/hidingMap.mjs +13 -7
- package/translations/maps/indexMap.js +16 -2
- package/translations/maps/indexMap.mjs +20 -6
- package/translations/maps/indexesSequence.js +8 -2
- package/translations/maps/indexesSequence.mjs +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.js +12 -6
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +18 -12
- package/translations/maps/physicalIndexToValueMap.js +8 -2
- package/translations/maps/physicalIndexToValueMap.mjs +14 -8
- package/translations/maps/trimmingMap.js +8 -2
- package/translations/maps/trimmingMap.mjs +13 -7
- package/translations/maps/utils/actionsOnIndexes.mjs +9 -8
- package/translations/maps/utils/indexesSequence.mjs +10 -9
- package/translations/maps/utils/physicallyIndexed.mjs +11 -10
- package/utils/dataStructures/linkedList.js +21 -7
- package/utils/dataStructures/linkedList.mjs +21 -7
- package/utils/dataStructures/priorityMap.js +1 -1
- package/utils/dataStructures/priorityMap.mjs +1 -1
- package/utils/dataStructures/queue.js +16 -2
- package/utils/dataStructures/queue.mjs +16 -2
- package/utils/dataStructures/stack.js +16 -2
- package/utils/dataStructures/stack.mjs +16 -2
- package/utils/dataStructures/tree.js +8 -2
- package/utils/dataStructures/tree.mjs +8 -2
- package/utils/dataStructures/uniqueMap.js +1 -1
- package/utils/dataStructures/uniqueMap.mjs +1 -1
- package/utils/ghostTable.js +12 -5
- package/utils/ghostTable.mjs +12 -5
- package/utils/interval.js +23 -8
- package/utils/interval.mjs +18 -4
- package/utils/samplesGenerator.js +13 -3
- package/utils/samplesGenerator.mjs +15 -5
- package/validators/index.mjs +4 -3
package/helpers/console.mjs
CHANGED
@@ -6,11 +6,12 @@
|
|
6
6
|
*
|
7
7
|
* Source: https://stackoverflow.com/a/5473193.
|
8
8
|
*/
|
9
|
-
import { isDefined } from "./mixed.mjs";
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
import { isDefined } from "./mixed.mjs";
|
10
|
+
/**
|
11
|
+
* Logs message to the console if the `console` object is exposed.
|
12
|
+
*
|
13
|
+
* @param {...*} args Values which will be logged.
|
14
|
+
*/
|
14
15
|
export function log() {
|
15
16
|
if (isDefined(console)) {
|
16
17
|
var _console;
|
package/helpers/data.d.ts
CHANGED
@@ -5,7 +5,6 @@ export function spreadsheetColumnIndex(label: string): number;
|
|
5
5
|
export function createSpreadsheetData(rows?: number, columns?: number): any[][];
|
6
6
|
export function createSpreadsheetObjectData(rows?: number, colCount?: number): any[][];
|
7
7
|
export function createEmptySpreadsheetData(rows: number, columns: number): string[][];
|
8
|
-
export function cellMethodLookupFactory(methodName: string, allowUndefined?: boolean): (row: number, col: number) => (prop: string) => any;
|
9
8
|
export function dataRowToChangesArray(dataRow: CellValue[] | object, rowOffset?: number): number[] | Array<number | string> | CellValue[];
|
10
9
|
export function countFirstRowKeys(data: CellValue[]): number;
|
11
10
|
export function isArrayOfArrays(data: any[]): boolean;
|
package/helpers/data.js
CHANGED
@@ -7,7 +7,6 @@ require("core-js/modules/es.array.iterator.js");
|
|
7
7
|
require("core-js/modules/es.string.iterator.js");
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
9
9
|
exports.__esModule = true;
|
10
|
-
exports.cellMethodLookupFactory = cellMethodLookupFactory;
|
11
10
|
exports.countFirstRowKeys = countFirstRowKeys;
|
12
11
|
exports.createEmptySpreadsheetData = createEmptySpreadsheetData;
|
13
12
|
exports.createSpreadsheetData = createSpreadsheetData;
|
@@ -17,11 +16,9 @@ exports.isArrayOfArrays = isArrayOfArrays;
|
|
17
16
|
exports.isArrayOfObjects = isArrayOfObjects;
|
18
17
|
exports.spreadsheetColumnIndex = spreadsheetColumnIndex;
|
19
18
|
exports.spreadsheetColumnLabel = spreadsheetColumnLabel;
|
20
|
-
require("core-js/modules/es.object.get-prototype-of.js");
|
21
19
|
require("core-js/modules/es.object.to-string.js");
|
22
20
|
require("core-js/modules/web.dom-collections.for-each.js");
|
23
21
|
require("core-js/modules/es.object.keys.js");
|
24
|
-
var _registry = require("./../cellTypes/registry");
|
25
22
|
var _object = require("./object");
|
26
23
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
27
24
|
var COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
@@ -128,52 +125,6 @@ function createEmptySpreadsheetData(rows, columns) {
|
|
128
125
|
return data;
|
129
126
|
}
|
130
127
|
|
131
|
-
/**
|
132
|
-
* Factory that produces a function for searching methods (or any properties) which could be defined directly in
|
133
|
-
* table configuration or implicitly, within cell type definition.
|
134
|
-
*
|
135
|
-
* For example: renderer can be defined explicitly using "renderer" property in column configuration or it can be
|
136
|
-
* defined implicitly using "type" property.
|
137
|
-
*
|
138
|
-
* Methods/properties defined explicitly always takes precedence over those defined through "type".
|
139
|
-
*
|
140
|
-
* If the method/property is not found in an object, searching is continued recursively through prototype chain, until
|
141
|
-
* it reaches the Object.prototype.
|
142
|
-
*
|
143
|
-
* @param {string} methodName Name of the method/property to search (i.e. 'renderer', 'validator', 'copyable').
|
144
|
-
* @param {boolean} [allowUndefined] If `false`, the search is continued if methodName has not been found in cell
|
145
|
-
* "type".
|
146
|
-
* @returns {Function}
|
147
|
-
*/
|
148
|
-
function cellMethodLookupFactory(methodName, allowUndefined) {
|
149
|
-
var isUndefinedAllowed = typeof allowUndefined === 'undefined' ? true : allowUndefined;
|
150
|
-
return function cellMethodLookup(row, col) {
|
151
|
-
return function getMethodFromProperties(properties) {
|
152
|
-
if (!properties) {
|
153
|
-
return; // method or property not found
|
154
|
-
}
|
155
|
-
|
156
|
-
if ((0, _object.hasOwnProperty)(properties, methodName) && properties[methodName] !== void 0) {
|
157
|
-
// check if it is own and is not empty
|
158
|
-
return properties[methodName]; // method defined directly
|
159
|
-
} else if ((0, _object.hasOwnProperty)(properties, 'type') && properties.type) {
|
160
|
-
// check if it is own and is not empty
|
161
|
-
if (typeof properties.type !== 'string') {
|
162
|
-
throw new Error('Cell "type" must be a string');
|
163
|
-
}
|
164
|
-
var type = (0, _registry.getCellType)(properties.type);
|
165
|
-
if ((0, _object.hasOwnProperty)(type, methodName)) {
|
166
|
-
return type[methodName]; // method defined in type.
|
167
|
-
} else if (isUndefinedAllowed) {
|
168
|
-
return; // method does not defined in type (eg. validator), returns undefined
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
return getMethodFromProperties(Object.getPrototypeOf(properties));
|
173
|
-
}(typeof row === 'number' ? this.getCellMeta(row, col) : row);
|
174
|
-
};
|
175
|
-
}
|
176
|
-
|
177
128
|
/**
|
178
129
|
* Transform a data row (either an array or an object) or an array of data rows to array of changes in a form of `[row,
|
179
130
|
* prop/col, value]`. Convenient to use with `setDataAtRowProp` and `setSourceDataAtCell` methods.
|
package/helpers/data.mjs
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
-
import "core-js/modules/es.object.get-prototype-of.js";
|
3
2
|
import "core-js/modules/es.object.to-string.js";
|
4
3
|
import "core-js/modules/web.dom-collections.for-each.js";
|
5
4
|
import "core-js/modules/es.object.keys.js";
|
@@ -9,8 +8,7 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
9
8
|
import "core-js/modules/es.array.iterator.js";
|
10
9
|
import "core-js/modules/es.string.iterator.js";
|
11
10
|
import "core-js/modules/web.dom-collections.iterator.js";
|
12
|
-
import {
|
13
|
-
import { deepObjectSize, hasOwnProperty, isObject } from "./object.mjs";
|
11
|
+
import { deepObjectSize, isObject } from "./object.mjs";
|
14
12
|
var COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
15
13
|
var COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;
|
16
14
|
|
@@ -115,52 +113,6 @@ export function createEmptySpreadsheetData(rows, columns) {
|
|
115
113
|
return data;
|
116
114
|
}
|
117
115
|
|
118
|
-
/**
|
119
|
-
* Factory that produces a function for searching methods (or any properties) which could be defined directly in
|
120
|
-
* table configuration or implicitly, within cell type definition.
|
121
|
-
*
|
122
|
-
* For example: renderer can be defined explicitly using "renderer" property in column configuration or it can be
|
123
|
-
* defined implicitly using "type" property.
|
124
|
-
*
|
125
|
-
* Methods/properties defined explicitly always takes precedence over those defined through "type".
|
126
|
-
*
|
127
|
-
* If the method/property is not found in an object, searching is continued recursively through prototype chain, until
|
128
|
-
* it reaches the Object.prototype.
|
129
|
-
*
|
130
|
-
* @param {string} methodName Name of the method/property to search (i.e. 'renderer', 'validator', 'copyable').
|
131
|
-
* @param {boolean} [allowUndefined] If `false`, the search is continued if methodName has not been found in cell
|
132
|
-
* "type".
|
133
|
-
* @returns {Function}
|
134
|
-
*/
|
135
|
-
export function cellMethodLookupFactory(methodName, allowUndefined) {
|
136
|
-
var isUndefinedAllowed = typeof allowUndefined === 'undefined' ? true : allowUndefined;
|
137
|
-
return function cellMethodLookup(row, col) {
|
138
|
-
return function getMethodFromProperties(properties) {
|
139
|
-
if (!properties) {
|
140
|
-
return; // method or property not found
|
141
|
-
}
|
142
|
-
|
143
|
-
if (hasOwnProperty(properties, methodName) && properties[methodName] !== void 0) {
|
144
|
-
// check if it is own and is not empty
|
145
|
-
return properties[methodName]; // method defined directly
|
146
|
-
} else if (hasOwnProperty(properties, 'type') && properties.type) {
|
147
|
-
// check if it is own and is not empty
|
148
|
-
if (typeof properties.type !== 'string') {
|
149
|
-
throw new Error('Cell "type" must be a string');
|
150
|
-
}
|
151
|
-
var type = getCellType(properties.type);
|
152
|
-
if (hasOwnProperty(type, methodName)) {
|
153
|
-
return type[methodName]; // method defined in type.
|
154
|
-
} else if (isUndefinedAllowed) {
|
155
|
-
return; // method does not defined in type (eg. validator), returns undefined
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
return getMethodFromProperties(Object.getPrototypeOf(properties));
|
160
|
-
}(typeof row === 'number' ? this.getCellMeta(row, col) : row);
|
161
|
-
};
|
162
|
-
}
|
163
|
-
|
164
116
|
/**
|
165
117
|
* Transform a data row (either an array or an object) or an array of data rows to array of changes in a form of `[row,
|
166
118
|
* prop/col, value]`. Convenient to use with `setDataAtRowProp` and `setSourceDataAtCell` methods.
|
package/helpers/dom/element.js
CHANGED
@@ -47,6 +47,7 @@ exports.isInput = isInput;
|
|
47
47
|
exports.isOutsideInput = isOutsideInput;
|
48
48
|
exports.isVisible = isVisible;
|
49
49
|
exports.matchesCSSRules = matchesCSSRules;
|
50
|
+
exports.observeVisibilityChangeOnce = observeVisibilityChangeOnce;
|
50
51
|
exports.offset = offset;
|
51
52
|
exports.outerHeight = outerHeight;
|
52
53
|
exports.outerWidth = outerWidth;
|
@@ -72,6 +73,7 @@ require("core-js/modules/es.array.join.js");
|
|
72
73
|
require("core-js/modules/es.string.trim.js");
|
73
74
|
require("core-js/modules/es.string.replace.js");
|
74
75
|
require("core-js/modules/es.array.concat.js");
|
76
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
75
77
|
var _feature = require("../feature");
|
76
78
|
var _browser = require("../browser");
|
77
79
|
var _string = require("../string");
|
@@ -1114,4 +1116,25 @@ function selectElementIfAllowed(element) {
|
|
1114
1116
|
*/
|
1115
1117
|
function isDetached(element) {
|
1116
1118
|
return !element.parentNode;
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
/**
|
1122
|
+
* Set up an observer to recognize when the provided element first becomes visible and trigger a callback when it
|
1123
|
+
* happens.
|
1124
|
+
*
|
1125
|
+
* @param {HTMLElement} elementToBeObserved Element to be observed.
|
1126
|
+
* @param {Function} callback The callback function.
|
1127
|
+
*/
|
1128
|
+
function observeVisibilityChangeOnce(elementToBeObserved, callback) {
|
1129
|
+
var visibilityObserver = new IntersectionObserver(function (entries, observer) {
|
1130
|
+
entries.forEach(function (entry) {
|
1131
|
+
if (entry.isIntersecting && elementToBeObserved.offsetParent !== null) {
|
1132
|
+
callback();
|
1133
|
+
observer.unobserve(elementToBeObserved);
|
1134
|
+
}
|
1135
|
+
});
|
1136
|
+
}, {
|
1137
|
+
root: elementToBeObserved.ownerDocument.body
|
1138
|
+
});
|
1139
|
+
visibilityObserver.observe(elementToBeObserved);
|
1117
1140
|
}
|
package/helpers/dom/element.mjs
CHANGED
@@ -18,6 +18,7 @@ import "core-js/modules/es.array.join.js";
|
|
18
18
|
import "core-js/modules/es.string.trim.js";
|
19
19
|
import "core-js/modules/es.string.replace.js";
|
20
20
|
import "core-js/modules/es.array.concat.js";
|
21
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
21
22
|
import "core-js/modules/es.symbol.js";
|
22
23
|
import "core-js/modules/es.symbol.description.js";
|
23
24
|
import "core-js/modules/es.symbol.iterator.js";
|
@@ -28,13 +29,14 @@ import "core-js/modules/es.array.from.js";
|
|
28
29
|
import "core-js/modules/es.function.name.js";
|
29
30
|
import { hasCaptionProblem, isClassListSupported, isTextContentSupported, isGetComputedStyleSupported } from "../feature.mjs";
|
30
31
|
import { isSafari, isIE9 } from "../browser.mjs";
|
31
|
-
import { sanitize } from "../string.mjs";
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
import { sanitize } from "../string.mjs";
|
33
|
+
/**
|
34
|
+
* Get the parent of the specified node in the DOM tree.
|
35
|
+
*
|
36
|
+
* @param {HTMLElement} element Element from which traversing is started.
|
37
|
+
* @param {number} [level=0] Traversing deep level.
|
38
|
+
* @returns {HTMLElement|null}
|
39
|
+
*/
|
38
40
|
export function getParent(element) {
|
39
41
|
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
40
42
|
var iteration = -1;
|
@@ -1060,4 +1062,25 @@ export function selectElementIfAllowed(element) {
|
|
1060
1062
|
*/
|
1061
1063
|
export function isDetached(element) {
|
1062
1064
|
return !element.parentNode;
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
/**
|
1068
|
+
* Set up an observer to recognize when the provided element first becomes visible and trigger a callback when it
|
1069
|
+
* happens.
|
1070
|
+
*
|
1071
|
+
* @param {HTMLElement} elementToBeObserved Element to be observed.
|
1072
|
+
* @param {Function} callback The callback function.
|
1073
|
+
*/
|
1074
|
+
export function observeVisibilityChangeOnce(elementToBeObserved, callback) {
|
1075
|
+
var visibilityObserver = new IntersectionObserver(function (entries, observer) {
|
1076
|
+
entries.forEach(function (entry) {
|
1077
|
+
if (entry.isIntersecting && elementToBeObserved.offsetParent !== null) {
|
1078
|
+
callback();
|
1079
|
+
observer.unobserve(elementToBeObserved);
|
1080
|
+
}
|
1081
|
+
});
|
1082
|
+
}, {
|
1083
|
+
root: elementToBeObserved.ownerDocument.body
|
1084
|
+
});
|
1085
|
+
visibilityObserver.observe(elementToBeObserved);
|
1063
1086
|
}
|
package/helpers/feature.js
CHANGED
@@ -1,12 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
4
|
-
require("core-js/modules/es.symbol.description.js");
|
5
|
-
require("core-js/modules/es.object.to-string.js");
|
6
|
-
require("core-js/modules/es.symbol.iterator.js");
|
7
|
-
require("core-js/modules/es.array.iterator.js");
|
8
|
-
require("core-js/modules/es.string.iterator.js");
|
9
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
10
3
|
exports.__esModule = true;
|
11
4
|
exports.cancelAnimationFrame = cancelAnimationFrame;
|
12
5
|
exports.getComparisonFunction = getComparisonFunction;
|
@@ -17,35 +10,15 @@ exports.isPassiveEventSupported = isPassiveEventSupported;
|
|
17
10
|
exports.isTextContentSupported = isTextContentSupported;
|
18
11
|
exports.isTouchSupported = isTouchSupported;
|
19
12
|
exports.requestAnimationFrame = requestAnimationFrame;
|
20
|
-
require("core-js/modules/
|
13
|
+
require("core-js/modules/es.symbol.js");
|
14
|
+
require("core-js/modules/es.symbol.description.js");
|
15
|
+
require("core-js/modules/es.object.to-string.js");
|
16
|
+
require("core-js/modules/es.symbol.iterator.js");
|
17
|
+
require("core-js/modules/es.array.iterator.js");
|
18
|
+
require("core-js/modules/es.string.iterator.js");
|
19
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
21
20
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
22
|
-
// https://gist.github.com/paulirish/1579671
|
23
21
|
/* eslint-disable no-restricted-globals */
|
24
|
-
var lastTime = 0;
|
25
|
-
var vendors = ['ms', 'moz', 'webkit', 'o'];
|
26
|
-
var _requestAnimationFrame = window.requestAnimationFrame;
|
27
|
-
var _cancelAnimationFrame = window.cancelAnimationFrame;
|
28
|
-
for (var x = 0; x < vendors.length && !_requestAnimationFrame; ++x) {
|
29
|
-
_requestAnimationFrame = window["".concat(vendors[x], "RequestAnimationFrame")];
|
30
|
-
_cancelAnimationFrame = window["".concat(vendors[x], "CancelAnimationFrame")] || window["".concat(vendors[x], "CancelRequestAnimationFrame")];
|
31
|
-
}
|
32
|
-
if (!_requestAnimationFrame) {
|
33
|
-
_requestAnimationFrame = function _requestAnimationFrame(callback) {
|
34
|
-
var currTime = new Date().getTime();
|
35
|
-
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
36
|
-
var id = window.setTimeout(function () {
|
37
|
-
callback(currTime + timeToCall);
|
38
|
-
}, timeToCall);
|
39
|
-
lastTime = currTime + timeToCall;
|
40
|
-
return id;
|
41
|
-
};
|
42
|
-
}
|
43
|
-
if (!_cancelAnimationFrame) {
|
44
|
-
_cancelAnimationFrame = function _cancelAnimationFrame(id) {
|
45
|
-
clearTimeout(id);
|
46
|
-
};
|
47
|
-
}
|
48
|
-
|
49
22
|
/**
|
50
23
|
* Polyfill for requestAnimationFrame.
|
51
24
|
*
|
@@ -53,7 +26,7 @@ if (!_cancelAnimationFrame) {
|
|
53
26
|
* @returns {number}
|
54
27
|
*/
|
55
28
|
function requestAnimationFrame(callback) {
|
56
|
-
return
|
29
|
+
return window.requestAnimationFrame(callback);
|
57
30
|
}
|
58
31
|
|
59
32
|
/**
|
@@ -82,7 +55,7 @@ function isGetComputedStyleSupported() {
|
|
82
55
|
* @param {number} id The request Id, generated by `requestAnimationFrame`.
|
83
56
|
*/
|
84
57
|
function cancelAnimationFrame(id) {
|
85
|
-
|
58
|
+
window.cancelAnimationFrame(id);
|
86
59
|
}
|
87
60
|
|
88
61
|
/**
|
package/helpers/feature.mjs
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
-
import "core-js/modules/web.timers.js";
|
3
1
|
import "core-js/modules/es.symbol.js";
|
4
2
|
import "core-js/modules/es.symbol.description.js";
|
5
3
|
import "core-js/modules/es.object.to-string.js";
|
@@ -7,33 +5,8 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
7
5
|
import "core-js/modules/es.array.iterator.js";
|
8
6
|
import "core-js/modules/es.string.iterator.js";
|
9
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
10
|
-
|
8
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
11
9
|
/* eslint-disable no-restricted-globals */
|
12
|
-
var lastTime = 0;
|
13
|
-
var vendors = ['ms', 'moz', 'webkit', 'o'];
|
14
|
-
var _requestAnimationFrame = window.requestAnimationFrame;
|
15
|
-
var _cancelAnimationFrame = window.cancelAnimationFrame;
|
16
|
-
for (var x = 0; x < vendors.length && !_requestAnimationFrame; ++x) {
|
17
|
-
_requestAnimationFrame = window["".concat(vendors[x], "RequestAnimationFrame")];
|
18
|
-
_cancelAnimationFrame = window["".concat(vendors[x], "CancelAnimationFrame")] || window["".concat(vendors[x], "CancelRequestAnimationFrame")];
|
19
|
-
}
|
20
|
-
if (!_requestAnimationFrame) {
|
21
|
-
_requestAnimationFrame = function _requestAnimationFrame(callback) {
|
22
|
-
var currTime = new Date().getTime();
|
23
|
-
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
24
|
-
var id = window.setTimeout(function () {
|
25
|
-
callback(currTime + timeToCall);
|
26
|
-
}, timeToCall);
|
27
|
-
lastTime = currTime + timeToCall;
|
28
|
-
return id;
|
29
|
-
};
|
30
|
-
}
|
31
|
-
if (!_cancelAnimationFrame) {
|
32
|
-
_cancelAnimationFrame = function _cancelAnimationFrame(id) {
|
33
|
-
clearTimeout(id);
|
34
|
-
};
|
35
|
-
}
|
36
|
-
|
37
10
|
/**
|
38
11
|
* Polyfill for requestAnimationFrame.
|
39
12
|
*
|
@@ -41,7 +14,7 @@ if (!_cancelAnimationFrame) {
|
|
41
14
|
* @returns {number}
|
42
15
|
*/
|
43
16
|
export function requestAnimationFrame(callback) {
|
44
|
-
return
|
17
|
+
return window.requestAnimationFrame(callback);
|
45
18
|
}
|
46
19
|
|
47
20
|
/**
|
@@ -70,7 +43,7 @@ export function isGetComputedStyleSupported() {
|
|
70
43
|
* @param {number} id The request Id, generated by `requestAnimationFrame`.
|
71
44
|
*/
|
72
45
|
export function cancelAnimationFrame(id) {
|
73
|
-
|
46
|
+
window.cancelAnimationFrame(id);
|
74
47
|
}
|
75
48
|
|
76
49
|
/**
|
package/helpers/function.mjs
CHANGED
@@ -3,12 +3,13 @@ import "core-js/modules/es.array.slice.js";
|
|
3
3
|
import "core-js/modules/es.array.concat.js";
|
4
4
|
import "core-js/modules/es.array.reverse.js";
|
5
5
|
import { arrayReduce } from "./array.mjs";
|
6
|
-
import { isDefined } from "./mixed.mjs";
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
import { isDefined } from "./mixed.mjs";
|
7
|
+
/**
|
8
|
+
* Checks if given variable is function.
|
9
|
+
*
|
10
|
+
* @param {*} func Variable to check.
|
11
|
+
* @returns {boolean}
|
12
|
+
*/
|
12
13
|
export function isFunction(func) {
|
13
14
|
return typeof func === 'function';
|
14
15
|
}
|
package/helpers/mixed.js
CHANGED
@@ -152,7 +152,7 @@ var domMessages = {
|
|
152
152
|
function _injectProductInfo(key, element) {
|
153
153
|
var hasValidType = !isEmpty(key);
|
154
154
|
var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
155
|
-
var hotVersion = "12.
|
155
|
+
var hotVersion = "12.3.0-next-9dc4f5d-20221209";
|
156
156
|
var keyValidityDate;
|
157
157
|
var consoleMessageState = 'invalid';
|
158
158
|
var domMessageState = 'invalid';
|
@@ -160,7 +160,7 @@ function _injectProductInfo(key, element) {
|
|
160
160
|
var schemaValidity = _checkKeySchema(key);
|
161
161
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
162
162
|
if (schemaValidity) {
|
163
|
-
var releaseDate = (0, _moment.default)("
|
163
|
+
var releaseDate = (0, _moment.default)("14/12/2022", 'DD/MM/YYYY');
|
164
164
|
var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
|
165
165
|
var keyValidityDays = _extractTime(key);
|
166
166
|
keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
|
package/helpers/mixed.mjs
CHANGED
@@ -16,12 +16,13 @@ import "core-js/modules/es.string.iterator.js";
|
|
16
16
|
import "core-js/modules/web.dom-collections.iterator.js";
|
17
17
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
18
18
|
import moment from 'moment';
|
19
|
-
import { toSingleLine } from "./templateLiteralTag.mjs";
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
import { toSingleLine } from "./templateLiteralTag.mjs";
|
20
|
+
/**
|
21
|
+
* Converts any value to string.
|
22
|
+
*
|
23
|
+
* @param {*} value The value to stringify.
|
24
|
+
* @returns {string}
|
25
|
+
*/
|
25
26
|
export function stringify(value) {
|
26
27
|
var result;
|
27
28
|
switch (_typeof(value)) {
|
@@ -141,7 +142,7 @@ var domMessages = {
|
|
141
142
|
export function _injectProductInfo(key, element) {
|
142
143
|
var hasValidType = !isEmpty(key);
|
143
144
|
var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
144
|
-
var hotVersion = "12.
|
145
|
+
var hotVersion = "12.3.0-next-9dc4f5d-20221209";
|
145
146
|
var keyValidityDate;
|
146
147
|
var consoleMessageState = 'invalid';
|
147
148
|
var domMessageState = 'invalid';
|
@@ -149,7 +150,7 @@ export function _injectProductInfo(key, element) {
|
|
149
150
|
var schemaValidity = _checkKeySchema(key);
|
150
151
|
if (hasValidType || isNonCommercial || schemaValidity) {
|
151
152
|
if (schemaValidity) {
|
152
|
-
var releaseDate = moment("
|
153
|
+
var releaseDate = moment("14/12/2022", 'DD/MM/YYYY');
|
153
154
|
var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
|
154
155
|
var keyValidityDays = _extractTime(key);
|
155
156
|
keyValidityDate = moment((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
|
package/helpers/object.js
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
5
|
+
require("core-js/modules/es.symbol.iterator.js");
|
6
|
+
require("core-js/modules/es.array.iterator.js");
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
9
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
11
|
+
require("core-js/modules/es.number.constructor.js");
|
3
12
|
exports.__esModule = true;
|
4
13
|
exports.clone = clone;
|
5
14
|
exports.createObjectPropListener = createObjectPropListener;
|
@@ -17,18 +26,15 @@ exports.isObjectEqual = isObjectEqual;
|
|
17
26
|
exports.mixin = mixin;
|
18
27
|
exports.objectEach = objectEach;
|
19
28
|
exports.setProperty = setProperty;
|
29
|
+
require("core-js/modules/es.array.fill.js");
|
20
30
|
require("core-js/modules/es.array.includes.js");
|
21
31
|
require("core-js/modules/es.string.includes.js");
|
22
32
|
require("core-js/modules/es.object.to-string.js");
|
23
33
|
require("core-js/modules/web.dom-collections.for-each.js");
|
24
|
-
require("core-js/modules/es.symbol.js");
|
25
|
-
require("core-js/modules/es.symbol.description.js");
|
26
|
-
require("core-js/modules/es.symbol.iterator.js");
|
27
|
-
require("core-js/modules/es.array.iterator.js");
|
28
|
-
require("core-js/modules/es.string.iterator.js");
|
29
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
30
34
|
var _array = require("./array");
|
31
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
35
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
36
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
37
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
32
38
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
33
39
|
/**
|
34
40
|
* Generate schema for passed object.
|
@@ -39,7 +45,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
39
45
|
function duckSchema(object) {
|
40
46
|
var schema;
|
41
47
|
if (Array.isArray(object)) {
|
42
|
-
schema = [];
|
48
|
+
schema = object.length ? new Array(object.length).fill(null) : [];
|
43
49
|
} else {
|
44
50
|
schema = {};
|
45
51
|
objectEach(object, function (value, key) {
|
@@ -362,7 +368,7 @@ function createObjectPropListener(defaultValue) {
|
|
362
368
|
/**
|
363
369
|
* Check if at specified `key` there is any value for `object`.
|
364
370
|
*
|
365
|
-
* @param {object} object Object to search value at
|
371
|
+
* @param {object} object Object to search value at specific key.
|
366
372
|
* @param {string} key String key to check.
|
367
373
|
* @returns {boolean}
|
368
374
|
*/
|
package/helpers/object.mjs
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
3
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
4
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
5
|
+
import "core-js/modules/es.array.fill.js";
|
2
6
|
import "core-js/modules/es.array.includes.js";
|
3
7
|
import "core-js/modules/es.string.includes.js";
|
4
8
|
import "core-js/modules/es.object.to-string.js";
|
@@ -9,17 +13,20 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
9
13
|
import "core-js/modules/es.array.iterator.js";
|
10
14
|
import "core-js/modules/es.string.iterator.js";
|
11
15
|
import "core-js/modules/web.dom-collections.iterator.js";
|
12
|
-
|
13
|
-
import
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
17
|
+
import "core-js/modules/es.date.to-primitive.js";
|
18
|
+
import "core-js/modules/es.number.constructor.js";
|
19
|
+
import { arrayEach } from "./array.mjs";
|
20
|
+
/**
|
21
|
+
* Generate schema for passed object.
|
22
|
+
*
|
23
|
+
* @param {Array|object} object An object to analyze.
|
24
|
+
* @returns {Array|object}
|
25
|
+
*/
|
19
26
|
export function duckSchema(object) {
|
20
27
|
var schema;
|
21
28
|
if (Array.isArray(object)) {
|
22
|
-
schema = [];
|
29
|
+
schema = object.length ? new Array(object.length).fill(null) : [];
|
23
30
|
} else {
|
24
31
|
schema = {};
|
25
32
|
objectEach(object, function (value, key) {
|
@@ -342,7 +349,7 @@ export function createObjectPropListener(defaultValue) {
|
|
342
349
|
/**
|
343
350
|
* Check if at specified `key` there is any value for `object`.
|
344
351
|
*
|
345
|
-
* @param {object} object Object to search value at
|
352
|
+
* @param {object} object Object to search value at specific key.
|
346
353
|
* @param {string} key String key to check.
|
347
354
|
* @returns {boolean}
|
348
355
|
*/
|
package/helpers/string.mjs
CHANGED
@@ -4,12 +4,13 @@ import "core-js/modules/es.regexp.to-string.js";
|
|
4
4
|
import "core-js/modules/es.regexp.exec.js";
|
5
5
|
import "core-js/modules/es.string.replace.js";
|
6
6
|
import DOMPurify from 'dompurify';
|
7
|
-
import { stringify } from "./mixed.mjs";
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
import { stringify } from "./mixed.mjs";
|
8
|
+
/**
|
9
|
+
* Convert string to upper case first letter.
|
10
|
+
*
|
11
|
+
* @param {string} string String to convert.
|
12
|
+
* @returns {string}
|
13
|
+
*/
|
13
14
|
export function toUpperCaseFirst(string) {
|
14
15
|
return string[0].toUpperCase() + string.substr(1);
|
15
16
|
}
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import "core-js/modules/es.regexp.exec.js";
|
2
2
|
import "core-js/modules/es.string.replace.js";
|
3
3
|
import "core-js/modules/es.string.trim.js";
|
4
|
-
import { arrayReduce } from "../helpers/array.mjs";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
import { arrayReduce } from "../helpers/array.mjs";
|
5
|
+
/**
|
6
|
+
* Tags a multiline string and return new one without line break characters and following spaces.
|
7
|
+
*
|
8
|
+
* @param {Array} strings Parts of the entire string without expressions.
|
9
|
+
* @param {...string} expressions Expressions converted to strings, which are added to the entire string.
|
10
|
+
* @returns {string}
|
11
|
+
*/
|
11
12
|
export function toSingleLine(strings) {
|
12
13
|
for (var _len = arguments.length, expressions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
13
14
|
expressions[_key - 1] = arguments[_key];
|