handsontable 0.0.0-next-a148bc1-20241121 → 0.0.0-next-3058de1-20241122
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/index.js +1 -2
- package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +3 -0
- package/3rdparty/walkontable/src/core/_base.mjs +3 -0
- package/3rdparty/walkontable/src/core/clone.js +1 -0
- package/3rdparty/walkontable/src/core/clone.mjs +1 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +3 -0
- package/3rdparty/walkontable/src/facade/core.mjs +3 -0
- package/3rdparty/walkontable/src/index.js +0 -3
- package/3rdparty/walkontable/src/index.mjs +2 -3
- package/3rdparty/walkontable/src/overlay/_base.js +3 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +3 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/_base.js +4 -3
- package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +10 -11
- package/3rdparty/walkontable/src/renderer/cells.mjs +8 -10
- package/3rdparty/walkontable/src/renderer/colGroup.js +7 -6
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +5 -5
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +5 -4
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/index.js +23 -20
- package/3rdparty/walkontable/src/renderer/index.mjs +10 -8
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -5
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +4 -4
- package/3rdparty/walkontable/src/renderer/rows.js +11 -23
- package/3rdparty/walkontable/src/renderer/rows.mjs +10 -23
- package/3rdparty/walkontable/src/renderer/table.js +13 -4
- package/3rdparty/walkontable/src/renderer/table.mjs +13 -4
- package/3rdparty/walkontable/src/settings.js +0 -2
- package/3rdparty/walkontable/src/settings.mjs +0 -2
- package/3rdparty/walkontable/src/table.js +17 -9
- package/3rdparty/walkontable/src/table.mjs +17 -9
- package/3rdparty/walkontable/src/types.js +1 -0
- package/3rdparty/walkontable/src/types.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/utils/nodesPool.js +5 -22
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -22
- package/3rdparty/walkontable/src/utils/orderView/index.js +5 -4
- package/3rdparty/walkontable/src/utils/orderView/index.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +4 -3
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +76 -79
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +74 -78
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +5 -4
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +3 -3
- package/3rdparty/walkontable/src/utils/stylesHandler.js +287 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +283 -0
- package/3rdparty/walkontable/src/viewport.js +1 -0
- package/3rdparty/walkontable/src/viewport.mjs +1 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/hooks/constants.js +9 -0
- package/core/hooks/constants.mjs +9 -0
- package/core/hooks/index.d.ts +1 -0
- package/core.d.ts +2 -0
- package/core.js +47 -0
- package/core.mjs +47 -0
- package/dataMap/metaManager/metaSchema.js +23 -3
- package/dataMap/metaManager/metaSchema.mjs +23 -3
- package/dist/handsontable.css +17 -9
- package/dist/handsontable.full.css +249 -240
- package/dist/handsontable.full.js +4767 -4686
- package/dist/handsontable.full.min.css +11 -9
- package/dist/handsontable.full.min.js +53 -53
- package/dist/handsontable.js +4474 -4387
- package/dist/handsontable.min.css +5 -4
- package/dist/handsontable.min.js +24 -24
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +9 -0
- package/editors/dateEditor/dateEditor.mjs +10 -1
- package/editors/handsontableEditor/handsontableEditor.js +7 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +7 -1
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/editors/textEditor/textEditor.js +4 -11
- package/editors/textEditor/textEditor.mjs +4 -11
- package/helpers/dom/element.js +32 -1
- package/helpers/dom/element.mjs +31 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/themes.js +17 -0
- package/helpers/themes.mjs +13 -0
- package/package.json +10 -3
- package/plugins/comments/commentEditor.js +9 -0
- package/plugins/comments/commentEditor.mjs +9 -0
- package/plugins/comments/comments.js +14 -0
- package/plugins/comments/comments.mjs +15 -1
- package/plugins/contextMenu/menu/menu.js +9 -4
- package/plugins/contextMenu/menu/menu.mjs +9 -4
- package/plugins/filters/ui/multipleSelect.js +6 -0
- package/plugins/filters/ui/multipleSelect.mjs +6 -0
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.js +1 -2
- package/plugins/manualRowResize/manualRowResize.mjs +2 -3
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedRows/ui/headers.js +7 -1
- package/plugins/nestedRows/ui/headers.mjs +7 -1
- package/plugins/stretchColumns/calculator.js +2 -1
- package/plugins/stretchColumns/calculator.mjs +3 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
- package/settings.d.ts +1 -0
- package/styles/handsontable.css +2178 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-horizon.css +607 -0
- package/styles/ht-theme-horizon.min.css +30 -0
- package/styles/ht-theme-main.css +613 -0
- package/styles/ht-theme-main.min.css +30 -0
- package/tableView.js +46 -0
- package/tableView.mjs +47 -1
- package/utils/autoResize.js +4 -1
- package/utils/autoResize.mjs +4 -1
- package/utils/ghostTable.js +5 -3
- package/utils/ghostTable.mjs +5 -3
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.js +0 -138
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/index.mjs +0 -135
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.js +0 -72
- package/3rdparty/walkontable/src/utils/orderView/viewDiffer/viewOrder.mjs +0 -68
@@ -0,0 +1,30 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright (c) HANDSONCODE sp. z o. o.
|
3
|
+
*
|
4
|
+
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
|
5
|
+
* Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number
|
6
|
+
* 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
|
7
|
+
*
|
8
|
+
* This software is protected by applicable copyright laws, including international treaties, and dual-
|
9
|
+
* licensed - depending on whether your use for commercial purposes, meaning intended for or
|
10
|
+
* resulting in commercial advantage or monetary compensation, or not.
|
11
|
+
*
|
12
|
+
* If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
|
13
|
+
* the suitability, performance, and usefulness of this software outside the production environment,
|
14
|
+
* you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
|
15
|
+
*
|
16
|
+
* Your use of this software for commercial purposes is subject to the terms included in an applicable
|
17
|
+
* license agreement.
|
18
|
+
*
|
19
|
+
* In any case, you must not make any such use of this software as to develop software which may be
|
20
|
+
* considered competitive with this software.
|
21
|
+
*
|
22
|
+
* UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
|
23
|
+
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
|
24
|
+
* LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
25
|
+
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
|
+
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
|
+
*
|
28
|
+
* Version: 0.0.0-next-3058de1-20241122
|
29
|
+
* Release date: 17/10/2024 (built at 22/11/2024 13:42:49)
|
30
|
+
*/.ht-theme-main,.ht-theme-main-dark,.ht-theme-main-dark-auto{--ht-font-size:14px;--ht-line-height:20px;--ht-font-weight:400;--ht-gap-size:4px;--ht-icon-size:16px;--ht-table-transition:0.15s;--ht-border-color:#e7e7e9;--ht-accent-color:#1a42e8;--ht-foreground-color:#222;--ht-background-color:#fff;--ht-placeholder-color:#999;--ht-read-only-color:#222;--ht-disabled-color:#a3a3a3;--ht-cell-horizontal-border-color:#e7e7e9;--ht-cell-vertical-border-color:#e7e7e9;--ht-wrapper-border-width:1px;--ht-wrapper-border-radius:4px;--ht-wrapper-border-color:#e7e7e9;--ht-row-header-odd-background-color:#f7f7f9;--ht-row-header-even-background-color:#f7f7f9;--ht-row-cell-odd-background-color:rgba(34,34,34,0);--ht-row-cell-even-background-color:rgba(34,34,34,0);--ht-cell-horizontal-padding:8px;--ht-cell-vertical-padding:4px;--ht-cell-editor-border-width:2px;--ht-cell-editor-border-color:#1a42e8;--ht-cell-editor-foreground-color:#000;--ht-cell-editor-background-color:#fff;--ht-cell-editor-shadow-blur-radius:0px;--ht-cell-editor-shadow-color:rgba(17,61,201,.6);--ht-cell-success-background-color:rgba(55,188,108,.2);--ht-cell-error-background-color:rgba(250,77,50,.2);--ht-cell-selection-border-color:#1a42e8;--ht-cell-selection-background-color:#5371ee;--ht-cell-autofill-size:6px;--ht-cell-autofill-border-width:1px;--ht-cell-autofill-border-radius:4px;--ht-cell-autofill-border-color:#fff;--ht-cell-autofill-background-color:#1a42e8;--ht-cell-autofill-fill-border-color:#222;--ht-resize-indicator-color:rgba(34,34,34,.4);--ht-move-backlight-color:rgba(34,34,34,.06);--ht-move-indicator-color:#1a42e8;--ht-hidden-indicator-color:rgba(34,34,34,.4);--ht-scrollbar-border-radius:8px;--ht-scrollbar-track-color:#f7f7f9;--ht-scrollbar-thumb-color:#999;--ht-checkbox-size:16px;--ht-checkbox-border-radius:4px;--ht-checkbox-border-color:#d1d1d5;--ht-checkbox-background-color:#fff;--ht-checkbox-icon-color:hsla(0,0%,100%,0);--ht-checkbox-focus-border-color:#d1d1d5;--ht-checkbox-focus-background-color:#fff;--ht-checkbox-focus-icon-color:hsla(0,0%,100%,0);--ht-checkbox-focus-ring-color:#1a42e8;--ht-checkbox-disabled-border-color:#e7e7e9;--ht-checkbox-disabled-background-color:#d1d1d5;--ht-checkbox-disabled-icon-color:hsla(0,0%,100%,0);--ht-checkbox-checked-border-color:#3f60ec;--ht-checkbox-checked-background-color:#1a42e8;--ht-checkbox-checked-icon-color:#fff;--ht-checkbox-checked-focus-border-color:#fff;--ht-checkbox-checked-focus-background-color:#1a42e8;--ht-checkbox-checked-focus-icon-color:#fff;--ht-checkbox-checked-disabled-border-color:#e7e7e9;--ht-checkbox-checked-disabled-background-color:#d1d1d5;--ht-checkbox-checked-disabled-icon-color:#a3a3a3;--ht-header-font-weight:400;--ht-header-foreground-color:#222;--ht-header-background-color:#f7f7f9;--ht-header-active-border-color:#2e56fc;--ht-header-active-foreground-color:#fff;--ht-header-active-background-color:#1a42e8;--ht-header-highlighted-shadow-size:0px;--ht-header-highlighted-foreground-color:#000;--ht-header-highlighted-background-color:#ebebed;--ht-header-filter-background-color:rgba(55,188,108,.2);--ht-header-row-foreground-color:#222;--ht-header-row-background-color:#f7f7f9;--ht-header-row-highlighted-foreground-color:#000;--ht-header-row-highlighted-background-color:#ebebed;--ht-header-row-active-foreground-color:#fff;--ht-header-row-active-background-color:#1a42e8;--ht-icon-button-border-radius:2px;--ht-icon-button-border-color:#f7f7f9;--ht-icon-button-background-color:#f7f7f9;--ht-icon-button-icon-color:rgba(34,34,34,.4);--ht-icon-button-hover-border-color:#e7e7e8;--ht-icon-button-hover-background-color:#e7e7e8;--ht-icon-button-hover-icon-color:rgba(34,34,34,.4);--ht-icon-active-button-border-color:#2e56fc;--ht-icon-active-button-background-color:#1a42e8;--ht-icon-active-button-icon-color:#fff;--ht-icon-active-button-hover-border-color:#2e56fc;--ht-icon-active-button-hover-background-color:#3357ea;--ht-icon-active-button-hover-icon-color:#fff;--ht-collapse-button-border-radius:4px;--ht-collapse-button-open-border-color:#d1d1d5;--ht-collapse-button-open-background-color:#fff;--ht-collapse-button-open-icon-color:#999;--ht-collapse-button-open-icon-active-color:#999;--ht-collapse-button-open-hover-border-color:#d1d1d5;--ht-collapse-button-open-hover-background-color:#f7f7f9;--ht-collapse-button-open-hover-icon-color:#999;--ht-collapse-button-open-hover-icon-active-color:#999;--ht-collapse-button-close-border-color:#d1d1d5;--ht-collapse-button-close-background-color:#ebebed;--ht-collapse-button-close-icon-color:#666;--ht-collapse-button-close-icon-active-color:#666;--ht-collapse-button-close-hover-border-color:#d1d1d5;--ht-collapse-button-close-hover-background-color:#ebebed;--ht-collapse-button-close-hover-icon-color:#666;--ht-collapse-button-close-hover-icon-active-color:#666;--ht-button-border-radius:4px;--ht-button-horizontal-padding:12px;--ht-button-vertical-padding:6px;--ht-primary-button-border-color:hsla(0,0%,100%,0);--ht-primary-button-foreground-color:#fff;--ht-primary-button-background-color:#1a42e8;--ht-primary-button-disabled-border-color:hsla(0,0%,100%,0);--ht-primary-button-disabled-foreground-color:#a3a3a3;--ht-primary-button-disabled-background-color:hsla(0,0%,60%,.32);--ht-primary-button-hover-border-color:hsla(0,0%,100%,0);--ht-primary-button-hover-foreground-color:#fff;--ht-primary-button-hover-background-color:#1535bc;--ht-primary-button-focus-border-color:#fff;--ht-primary-button-focus-foreground-color:#fff;--ht-primary-button-focus-background-color:#1a42e8;--ht-secondary-button-border-color:#e7e7e9;--ht-secondary-button-foreground-color:#222;--ht-secondary-button-background-color:#fff;--ht-secondary-button-disabled-border-color:#e7e7e9;--ht-secondary-button-disabled-foreground-color:#a3a3a3;--ht-secondary-button-disabled-background-color:#ebebed;--ht-secondary-button-hover-border-color:#e7e7e9;--ht-secondary-button-hover-foreground-color:#222;--ht-secondary-button-hover-background-color:#fff;--ht-secondary-button-focus-border-color:#e7e7e9;--ht-secondary-button-focus-foreground-color:#222;--ht-secondary-button-focus-background-color:#fff;--ht-comments-textarea-horizontal-padding:8px;--ht-comments-textarea-vertical-padding:4px;--ht-comments-indicator-size:6px;--ht-comments-indicator-color:#1a42e8;--ht-comments-textarea-border-width:1px;--ht-comments-textarea-border-color:hsla(0,0%,100%,0);--ht-comments-textarea-foreground-color:#222;--ht-comments-textarea-background-color:#f7f7f9;--ht-comments-textarea-focus-border-width:1px;--ht-comments-textarea-focus-border-color:#1a42e8;--ht-comments-textarea-focus-foreground-color:#222;--ht-comments-textarea-focus-background-color:#fff;--ht-license-horizontal-padding:16px;--ht-license-vertical-padding:8px;--ht-license-foreground-color:#222;--ht-license-background-color:#f7f7f9;--ht-link-color:#1a42e8;--ht-link-hover-color:#3e67ec;--ht-input-border-width:1px;--ht-input-border-radius:4px;--ht-input-horizontal-padding:12px;--ht-input-vertical-padding:6px;--ht-input-border-color:#e7e7e9;--ht-input-foreground-color:#222;--ht-input-background-color:#f7f7f9;--ht-input-hover-border-color:#e7e7e9;--ht-input-hover-foreground-color:#222;--ht-input-hover-background-color:#fff;--ht-input-disabled-border-color:#e7e7e9;--ht-input-disabled-foreground-color:#a3a3a3;--ht-input-disabled-background-color:hsla(0,0%,60%,.32);--ht-input-focus-border-color:#1a42e8;--ht-input-focus-foreground-color:#222;--ht-input-focus-background-color:#fff;--ht-menu-border-width:1px;--ht-menu-border-radius:4px;--ht-menu-horizontal-padding:0px;--ht-menu-vertical-padding:8px;--ht-menu-item-horizontal-padding:12px;--ht-menu-item-vertical-padding:4px;--ht-menu-shadow-x:0px;--ht-menu-shadow-y:8px;--ht-menu-shadow-blur:16px;--ht-menu-border-color:#e7e7e9;--ht-menu-shadow-color:rgba(0,0,0,.08);--ht-menu-item-hover-color:rgba(0,0,0,.05);--ht-menu-item-active-color:rgba(0,0,0,.08)}.ht-theme-main-dark{--ht-border-color:#313132;--ht-accent-color:#476af7;--ht-foreground-color:#c7c7c7;--ht-background-color:#0f0f10;--ht-placeholder-color:#68696c;--ht-read-only-color:#c7c7c7;--ht-disabled-color:#68696c;--ht-cell-horizontal-border-color:#313132;--ht-cell-vertical-border-color:#313132;--ht-wrapper-border-color:#313132;--ht-row-header-odd-background-color:#1e1e1f;--ht-row-header-even-background-color:#1e1e1f;--ht-row-cell-odd-background-color:rgba(239,239,243,0);--ht-row-cell-even-background-color:rgba(239,239,243,0);--ht-cell-editor-border-color:#476af7;--ht-cell-editor-foreground-color:#fff;--ht-cell-editor-background-color:#0f0f10;--ht-cell-editor-shadow-color:rgba(71,106,247,.6);--ht-cell-success-background-color:rgba(66,190,101,.3);--ht-cell-error-background-color:rgba(255,42,52,.3);--ht-cell-selection-border-color:#476af7;--ht-cell-selection-background-color:#476af7;--ht-cell-autofill-border-color:#0f0f10;--ht-cell-autofill-background-color:#476af7;--ht-cell-autofill-fill-border-color:#c7c7c7;--ht-resize-indicator-color:hsla(0,0%,100%,.4);--ht-move-backlight-color:hsla(0,0%,87%,.12);--ht-move-indicator-color:#476af7;--ht-hidden-indicator-color:hsla(0,0%,100%,.4);--ht-scrollbar-track-color:#19191c;--ht-scrollbar-thumb-color:#68696c;--ht-checkbox-border-color:#404144;--ht-checkbox-background-color:#0f0f10;--ht-checkbox-focus-border-color:#404144;--ht-checkbox-focus-background-color:#0f0f10;--ht-checkbox-focus-ring-color:#476af7;--ht-checkbox-disabled-border-color:#313132;--ht-checkbox-disabled-background-color:#404144;--ht-checkbox-checked-border-color:#3c59cf;--ht-checkbox-checked-background-color:#476af7;--ht-checkbox-checked-icon-color:#c7c7c7;--ht-checkbox-checked-focus-background-color:#476af7;--ht-checkbox-checked-focus-icon-color:#c7c7c7;--ht-checkbox-checked-disabled-border-color:#313132;--ht-checkbox-checked-disabled-background-color:#36373a;--ht-checkbox-checked-disabled-icon-color:#68696c;--ht-header-foreground-color:#c7c7c7;--ht-header-background-color:#1e1e1f;--ht-header-active-border-color:#4767e5;--ht-header-active-foreground-color:#0f0f10;--ht-header-active-background-color:#476af7;--ht-header-highlighted-foreground-color:#f3f3f3;--ht-header-highlighted-background-color:#262627;--ht-header-filter-background-color:rgba(66,190,101,.3);--ht-header-row-foreground-color:#c7c7c7;--ht-header-row-background-color:#1e1e1f;--ht-header-row-highlighted-foreground-color:#f3f3f3;--ht-header-row-highlighted-background-color:#262627;--ht-header-row-active-foreground-color:#0f0f10;--ht-header-row-active-background-color:#476af7;--ht-icon-button-border-color:#1e1e1f;--ht-icon-button-background-color:#1e1e1f;--ht-icon-button-icon-color:hsla(0,0%,100%,.4);--ht-icon-button-hover-border-color:#303031;--ht-icon-button-hover-background-color:#303031;--ht-icon-button-hover-icon-color:hsla(0,0%,100%,.4);--ht-icon-active-button-border-color:#4767e5;--ht-icon-active-button-background-color:#476af7;--ht-icon-active-button-icon-color:#0f0f10;--ht-icon-active-button-hover-border-color:#4767e5;--ht-icon-active-button-hover-background-color:#5576f8;--ht-icon-active-button-hover-icon-color:#0f0f10;--ht-collapse-button-open-border-color:rgba(83,83,85,.64);--ht-collapse-button-open-background-color:#000;--ht-collapse-button-open-icon-color:#666;--ht-collapse-button-open-icon-active-color:#666;--ht-collapse-button-open-hover-border-color:rgba(83,83,85,.64);--ht-collapse-button-open-hover-background-color:#1e1e1f;--ht-collapse-button-open-hover-icon-color:#666;--ht-collapse-button-open-hover-icon-active-color:#666;--ht-collapse-button-close-border-color:rgba(83,83,85,.64);--ht-collapse-button-close-background-color:#262627;--ht-collapse-button-close-icon-color:#999;--ht-collapse-button-close-icon-active-color:#999;--ht-collapse-button-close-hover-border-color:rgba(83,83,85,.64);--ht-collapse-button-close-hover-background-color:#262627;--ht-collapse-button-close-hover-icon-color:#999;--ht-collapse-button-close-hover-icon-active-color:#999;--ht-primary-button-foreground-color:#c7c7c7;--ht-primary-button-background-color:#476af7;--ht-primary-button-disabled-foreground-color:#68696c;--ht-primary-button-disabled-background-color:hsla(225,2%,42%,.32);--ht-primary-button-hover-foreground-color:#c7c7c7;--ht-primary-button-hover-background-color:#6180ff;--ht-primary-button-focus-border-color:#0f0f10;--ht-primary-button-focus-foreground-color:#c7c7c7;--ht-primary-button-focus-background-color:#476af7;--ht-secondary-button-border-color:#313132;--ht-secondary-button-foreground-color:#c7c7c7;--ht-secondary-button-background-color:#0f0f10;--ht-secondary-button-disabled-border-color:#313132;--ht-secondary-button-disabled-foreground-color:#68696c;--ht-secondary-button-disabled-background-color:#262627;--ht-secondary-button-hover-border-color:#313132;--ht-secondary-button-hover-foreground-color:#c7c7c7;--ht-secondary-button-hover-background-color:#0f0f10;--ht-secondary-button-focus-border-color:#313132;--ht-secondary-button-focus-foreground-color:#c7c7c7;--ht-secondary-button-focus-background-color:#0f0f10;--ht-comments-indicator-color:#476af7;--ht-comments-textarea-foreground-color:#c7c7c7;--ht-comments-textarea-background-color:#1e1e1f;--ht-comments-textarea-focus-border-color:#476af7;--ht-comments-textarea-focus-foreground-color:#c7c7c7;--ht-comments-textarea-focus-background-color:#0f0f10;--ht-license-foreground-color:#c7c7c7;--ht-license-background-color:#1e1e1f;--ht-link-color:#476af7;--ht-link-hover-color:#728eff;--ht-input-border-color:#313132;--ht-input-foreground-color:#c7c7c7;--ht-input-background-color:#1e1e1f;--ht-input-hover-border-color:#313132;--ht-input-hover-foreground-color:#c7c7c7;--ht-input-hover-background-color:#0f0f10;--ht-input-disabled-border-color:#313132;--ht-input-disabled-foreground-color:#68696c;--ht-input-disabled-background-color:hsla(225,2%,42%,.32);--ht-input-focus-border-color:#476af7;--ht-input-focus-foreground-color:#c7c7c7;--ht-input-focus-background-color:#0f0f10;--ht-menu-border-color:#313132;--ht-menu-shadow-color:rgba(0,0,0,.8);--ht-menu-item-hover-color:rgba(239,239,243,.05);--ht-menu-item-active-color:rgba(239,239,243,.12)}@media(prefers-color-scheme:dark){.ht-theme-main-dark-auto{--ht-border-color:#313132;--ht-accent-color:#476af7;--ht-foreground-color:#c7c7c7;--ht-background-color:#0f0f10;--ht-placeholder-color:#68696c;--ht-read-only-color:#c7c7c7;--ht-disabled-color:#68696c;--ht-cell-horizontal-border-color:#313132;--ht-cell-vertical-border-color:#313132;--ht-wrapper-border-color:#313132;--ht-row-header-odd-background-color:#1e1e1f;--ht-row-header-even-background-color:#1e1e1f;--ht-row-cell-odd-background-color:rgba(239,239,243,0);--ht-row-cell-even-background-color:rgba(239,239,243,0);--ht-cell-editor-border-color:#476af7;--ht-cell-editor-foreground-color:#fff;--ht-cell-editor-background-color:#0f0f10;--ht-cell-editor-shadow-color:rgba(71,106,247,.6);--ht-cell-success-background-color:rgba(66,190,101,.3);--ht-cell-error-background-color:rgba(255,42,52,.3);--ht-cell-selection-border-color:#476af7;--ht-cell-selection-background-color:#476af7;--ht-cell-autofill-border-color:#0f0f10;--ht-cell-autofill-background-color:#476af7;--ht-cell-autofill-fill-border-color:#c7c7c7;--ht-resize-indicator-color:hsla(0,0%,100%,.4);--ht-move-backlight-color:hsla(0,0%,87%,.12);--ht-move-indicator-color:#476af7;--ht-hidden-indicator-color:hsla(0,0%,100%,.4);--ht-scrollbar-track-color:#19191c;--ht-scrollbar-thumb-color:#68696c;--ht-checkbox-border-color:#404144;--ht-checkbox-background-color:#0f0f10;--ht-checkbox-focus-border-color:#404144;--ht-checkbox-focus-background-color:#0f0f10;--ht-checkbox-focus-ring-color:#476af7;--ht-checkbox-disabled-border-color:#313132;--ht-checkbox-disabled-background-color:#404144;--ht-checkbox-checked-border-color:#3c59cf;--ht-checkbox-checked-background-color:#476af7;--ht-checkbox-checked-icon-color:#c7c7c7;--ht-checkbox-checked-focus-background-color:#476af7;--ht-checkbox-checked-focus-icon-color:#c7c7c7;--ht-checkbox-checked-disabled-border-color:#313132;--ht-checkbox-checked-disabled-background-color:#36373a;--ht-checkbox-checked-disabled-icon-color:#68696c;--ht-header-foreground-color:#c7c7c7;--ht-header-background-color:#1e1e1f;--ht-header-active-border-color:#4767e5;--ht-header-active-foreground-color:#0f0f10;--ht-header-active-background-color:#476af7;--ht-header-highlighted-foreground-color:#f3f3f3;--ht-header-highlighted-background-color:#262627;--ht-header-filter-background-color:rgba(66,190,101,.3);--ht-header-row-foreground-color:#c7c7c7;--ht-header-row-background-color:#1e1e1f;--ht-header-row-highlighted-foreground-color:#f3f3f3;--ht-header-row-highlighted-background-color:#262627;--ht-header-row-active-foreground-color:#0f0f10;--ht-header-row-active-background-color:#476af7;--ht-icon-button-border-color:#1e1e1f;--ht-icon-button-background-color:#1e1e1f;--ht-icon-button-icon-color:hsla(0,0%,100%,.4);--ht-icon-button-hover-border-color:#303031;--ht-icon-button-hover-background-color:#303031;--ht-icon-button-hover-icon-color:hsla(0,0%,100%,.4);--ht-icon-active-button-border-color:#4767e5;--ht-icon-active-button-background-color:#476af7;--ht-icon-active-button-icon-color:#0f0f10;--ht-icon-active-button-hover-border-color:#4767e5;--ht-icon-active-button-hover-background-color:#5576f8;--ht-icon-active-button-hover-icon-color:#0f0f10;--ht-collapse-button-open-border-color:rgba(83,83,85,.64);--ht-collapse-button-open-background-color:#000;--ht-collapse-button-open-icon-color:#666;--ht-collapse-button-open-icon-active-color:#666;--ht-collapse-button-open-hover-border-color:rgba(83,83,85,.64);--ht-collapse-button-open-hover-background-color:#1e1e1f;--ht-collapse-button-open-hover-icon-color:#666;--ht-collapse-button-open-hover-icon-active-color:#666;--ht-collapse-button-close-border-color:rgba(83,83,85,.64);--ht-collapse-button-close-background-color:#262627;--ht-collapse-button-close-icon-color:#999;--ht-collapse-button-close-icon-active-color:#999;--ht-collapse-button-close-hover-border-color:rgba(83,83,85,.64);--ht-collapse-button-close-hover-background-color:#262627;--ht-collapse-button-close-hover-icon-color:#999;--ht-collapse-button-close-hover-icon-active-color:#999;--ht-primary-button-foreground-color:#c7c7c7;--ht-primary-button-background-color:#476af7;--ht-primary-button-disabled-foreground-color:#68696c;--ht-primary-button-disabled-background-color:hsla(225,2%,42%,.32);--ht-primary-button-hover-foreground-color:#c7c7c7;--ht-primary-button-hover-background-color:#6180ff;--ht-primary-button-focus-border-color:#0f0f10;--ht-primary-button-focus-foreground-color:#c7c7c7;--ht-primary-button-focus-background-color:#476af7;--ht-secondary-button-border-color:#313132;--ht-secondary-button-foreground-color:#c7c7c7;--ht-secondary-button-background-color:#0f0f10;--ht-secondary-button-disabled-border-color:#313132;--ht-secondary-button-disabled-foreground-color:#68696c;--ht-secondary-button-disabled-background-color:#262627;--ht-secondary-button-hover-border-color:#313132;--ht-secondary-button-hover-foreground-color:#c7c7c7;--ht-secondary-button-hover-background-color:#0f0f10;--ht-secondary-button-focus-border-color:#313132;--ht-secondary-button-focus-foreground-color:#c7c7c7;--ht-secondary-button-focus-background-color:#0f0f10;--ht-comments-indicator-color:#476af7;--ht-comments-textarea-foreground-color:#c7c7c7;--ht-comments-textarea-background-color:#1e1e1f;--ht-comments-textarea-focus-border-color:#476af7;--ht-comments-textarea-focus-foreground-color:#c7c7c7;--ht-comments-textarea-focus-background-color:#0f0f10;--ht-license-foreground-color:#c7c7c7;--ht-license-background-color:#1e1e1f;--ht-link-color:#476af7;--ht-link-hover-color:#728eff;--ht-input-border-color:#313132;--ht-input-foreground-color:#c7c7c7;--ht-input-background-color:#1e1e1f;--ht-input-hover-border-color:#313132;--ht-input-hover-foreground-color:#c7c7c7;--ht-input-hover-background-color:#0f0f10;--ht-input-disabled-border-color:#313132;--ht-input-disabled-foreground-color:#68696c;--ht-input-disabled-background-color:hsla(225,2%,42%,.32);--ht-input-focus-border-color:#476af7;--ht-input-focus-foreground-color:#c7c7c7;--ht-input-focus-background-color:#0f0f10;--ht-menu-border-color:#313132;--ht-menu-shadow-color:rgba(0,0,0,.8);--ht-menu-item-hover-color:rgba(239,239,243,.05);--ht-menu-item-active-color:rgba(239,239,243,.12)}}[class*=ht-theme-main] .pika-single .pika-next,[class*=ht-theme-main].htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,[class*=ht-theme-main].htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,[class*=ht-theme-main].htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='M6.646 10.94 9.94 7.645 6.646 4.354'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .pika-single .pika-prev{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='M9.94 10.94 6.645 7.645 9.94 4.354'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .changeType:before,[class*=ht-theme-main] .htAutocompleteArrow:after,[class*=ht-theme-main] .htUISelectCaption:after{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill='currentColor' d='M11 6.667a.5.5 0 0 1 .392.811l-.038.042-3 3a.5.5 0 0 1-.66.042l-.047-.042-3-3-.042-.047-.027-.038-.027-.048-.008-.018-.014-.034-.016-.054-.005-.026-.005-.03-.002-.029v-.059l.003-.029.004-.03.005-.026.016-.054.014-.033.035-.066.032-.045.037-.04.047-.042.038-.027.048-.027.018-.009.034-.013.054-.016.026-.005.03-.005.029-.002z'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .columnSorting.sortAction.ascending:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='M8 12.667V3.333m0 0L5.333 6M8 3.333 10.667 6'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .columnSorting.sortAction.descending:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='M8 3.333v9.334m0 0L10.667 10M8 12.667 5.333 10'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main].htContextMenu table tbody tr td .htItemWrapper span.selected:after,[class*=ht-theme-main].htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,[class*=ht-theme-main].htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m3.333 8 3.334 3.333 6.666-6.666'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .htCheckboxRendererInput:after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m5 8 2 2 4-4'/%3E%3C/svg%3E")}[class*=ht-theme-main] .htCheckboxRendererInput:after,[class*=ht-theme-main] th.beforeHiddenColumn:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] th.beforeHiddenColumn:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none'%3E%3Cpath fill='currentColor' d='M3.333 1.875c0-.444.514-.676.846-.408l.043.04 3.125 3.125a.52.52 0 0 1 .044.687l-.044.05-3.125 3.124-.049.043-.04.029-.05.028-.018.009-.035.014-.057.016-.027.005-.031.006-.03.002h-.062l-.03-.003-.031-.005-.027-.005-.056-.016-.035-.014-.069-.037-.047-.034-.042-.038-.043-.049-.028-.04-.029-.05-.008-.019-.014-.034-.017-.057-.005-.027-.006-.032-.002-.03z'/%3E%3C/svg%3E")}[class*=ht-theme-main] th.afterHiddenColumn:after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none'%3E%3Cpath fill='currentColor' d='m6.085 1.358.03-.003h.061l.03.003.032.004.027.006.056.016.035.014.069.037.047.034.042.038.043.049.028.04.028.05.01.018.013.035.017.057.005.027.005.031.003.03v6.28a.521.521 0 0 1-.845.409l-.043-.04-3.125-3.125a.52.52 0 0 1-.044-.687l.044-.05 3.125-3.124.048-.044.04-.028.05-.028.02-.009.034-.014.056-.016.028-.006z'/%3E%3C/svg%3E")}[class*=ht-theme-main] th.afterHiddenColumn:after,[class*=ht-theme-main] th.beforeHiddenRow:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] th.beforeHiddenRow:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' fill='none'%3E%3Cpath fill='currentColor' d='M6 3c.284 0 .432.329.26.541l-.024.028-2 2a.333.333 0 0 1-.44.028l-.032-.028-2-2-.027-.031-.018-.026L1.7 3.48l-.006-.012-.01-.022-.01-.036-.003-.018-.003-.02-.002-.019v-.04l.002-.019.003-.02.003-.017.01-.036.01-.022.023-.044.022-.03.024-.027.032-.028.025-.018.032-.018.012-.006.023-.009.036-.01.017-.004.02-.003.02-.001z'/%3E%3C/svg%3E")}[class*=ht-theme-main] th.afterHiddenRow:after{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' fill='none'%3E%3Cpath fill='currentColor' d='M3.764 2.431a.333.333 0 0 1 .44-.028l.032.028 2 2 .027.031.018.026.018.032.006.012.009.022.01.036.004.018.003.02.002.019v.04l-.002.019-.003.02-.003.017-.011.036-.01.022-.022.044-.022.03-.024.027-.032.028-.025.018-.032.018-.012.006-.023.009-.036.01-.017.004-.02.003-.02.001L6 5H2a.334.334 0 0 1-.26-.541l.025-.028z'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .collapsibleIndicator:before,[class*=ht-theme-main] .ht_nestingButton:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='M4.333 8h7.334'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .collapsibleIndicator.collapsed:before,[class*=ht-theme-main] .collapsibleIndicator.ht_nestingExpand:before,[class*=ht-theme-main] .ht_nestingButton.collapsed:before,[class*=ht-theme-main] .ht_nestingButton.ht_nestingExpand:before{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.5 11.667a.5.5 0 0 0 1 0V8.5h3.167a.5.5 0 0 0 0-1H8.5V4.333a.5.5 0 0 0-1 0V7.5H4.333a.5.5 0 0 0 0 1H7.5z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}[class*=ht-theme-main] .htUIRadio>input[type=radio]:after{background-color:currentColor;height:var(--ht-icon-size);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Ccircle cx='8' cy='8' r='4' fill='currentColor'/%3E%3C/svg%3E");-webkit-mask-size:contain;width:var(--ht-icon-size)}
|
package/tableView.js
CHANGED
@@ -587,6 +587,52 @@ class TableView {
|
|
587
587
|
return count;
|
588
588
|
}
|
589
589
|
|
590
|
+
/**
|
591
|
+
* Retrieves the styles handler from the Walkontable instance.
|
592
|
+
*
|
593
|
+
* @returns {StylesHandler} The styles handler instance.
|
594
|
+
*/
|
595
|
+
getStylesHandler() {
|
596
|
+
return this._wt.stylesHandler;
|
597
|
+
}
|
598
|
+
|
599
|
+
/**
|
600
|
+
* Returns the default row height.
|
601
|
+
*
|
602
|
+
* This method retrieves the default row height from the Walkontable styles handler.
|
603
|
+
*
|
604
|
+
* @returns {number} The default row height.
|
605
|
+
*/
|
606
|
+
getDefaultRowHeight() {
|
607
|
+
return this._wt.stylesHandler.getDefaultRowHeight();
|
608
|
+
}
|
609
|
+
|
610
|
+
/**
|
611
|
+
* Add a class name to the license information element.
|
612
|
+
*
|
613
|
+
* @param {string} className The class name to add.
|
614
|
+
*/
|
615
|
+
addClassNameToLicenseElement(className) {
|
616
|
+
var _this$hot$rootElement;
|
617
|
+
const licenseInfoElement = (_this$hot$rootElement = this.hot.rootElement.parentNode) === null || _this$hot$rootElement === void 0 ? void 0 : _this$hot$rootElement.querySelector('.hot-display-license-info');
|
618
|
+
if (licenseInfoElement) {
|
619
|
+
(0, _element.addClass)(licenseInfoElement, className);
|
620
|
+
}
|
621
|
+
}
|
622
|
+
|
623
|
+
/**
|
624
|
+
* Remove a class name from the license information element.
|
625
|
+
*
|
626
|
+
* @param {string} className The class name to remove.
|
627
|
+
*/
|
628
|
+
removeClassNameFromLicenseElement(className) {
|
629
|
+
var _this$hot$rootElement2;
|
630
|
+
const licenseInfoElement = (_this$hot$rootElement2 = this.hot.rootElement.parentNode) === null || _this$hot$rootElement2 === void 0 ? void 0 : _this$hot$rootElement2.querySelector('.hot-display-license-info');
|
631
|
+
if (licenseInfoElement) {
|
632
|
+
(0, _element.removeClass)(licenseInfoElement, className);
|
633
|
+
}
|
634
|
+
}
|
635
|
+
|
590
636
|
/**
|
591
637
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
592
638
|
* bottom overlay.
|
package/tableView.mjs
CHANGED
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
9
9
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
10
10
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
11
11
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
12
|
-
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute, getParentWindow } from "./helpers/dom/element.mjs";
|
12
|
+
import { addClass, removeClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute, getParentWindow } from "./helpers/dom/element.mjs";
|
13
13
|
import EventManager from "./eventManager.mjs";
|
14
14
|
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
15
15
|
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
@@ -583,6 +583,52 @@ class TableView {
|
|
583
583
|
return count;
|
584
584
|
}
|
585
585
|
|
586
|
+
/**
|
587
|
+
* Retrieves the styles handler from the Walkontable instance.
|
588
|
+
*
|
589
|
+
* @returns {StylesHandler} The styles handler instance.
|
590
|
+
*/
|
591
|
+
getStylesHandler() {
|
592
|
+
return this._wt.stylesHandler;
|
593
|
+
}
|
594
|
+
|
595
|
+
/**
|
596
|
+
* Returns the default row height.
|
597
|
+
*
|
598
|
+
* This method retrieves the default row height from the Walkontable styles handler.
|
599
|
+
*
|
600
|
+
* @returns {number} The default row height.
|
601
|
+
*/
|
602
|
+
getDefaultRowHeight() {
|
603
|
+
return this._wt.stylesHandler.getDefaultRowHeight();
|
604
|
+
}
|
605
|
+
|
606
|
+
/**
|
607
|
+
* Add a class name to the license information element.
|
608
|
+
*
|
609
|
+
* @param {string} className The class name to add.
|
610
|
+
*/
|
611
|
+
addClassNameToLicenseElement(className) {
|
612
|
+
var _this$hot$rootElement;
|
613
|
+
const licenseInfoElement = (_this$hot$rootElement = this.hot.rootElement.parentNode) === null || _this$hot$rootElement === void 0 ? void 0 : _this$hot$rootElement.querySelector('.hot-display-license-info');
|
614
|
+
if (licenseInfoElement) {
|
615
|
+
addClass(licenseInfoElement, className);
|
616
|
+
}
|
617
|
+
}
|
618
|
+
|
619
|
+
/**
|
620
|
+
* Remove a class name from the license information element.
|
621
|
+
*
|
622
|
+
* @param {string} className The class name to remove.
|
623
|
+
*/
|
624
|
+
removeClassNameFromLicenseElement(className) {
|
625
|
+
var _this$hot$rootElement2;
|
626
|
+
const licenseInfoElement = (_this$hot$rootElement2 = this.hot.rootElement.parentNode) === null || _this$hot$rootElement2 === void 0 ? void 0 : _this$hot$rootElement2.querySelector('.hot-display-license-info');
|
627
|
+
if (licenseInfoElement) {
|
628
|
+
removeClass(licenseInfoElement, className);
|
629
|
+
}
|
630
|
+
}
|
631
|
+
|
586
632
|
/**
|
587
633
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
588
634
|
* bottom overlay.
|
package/utils/autoResize.js
CHANGED
@@ -77,6 +77,7 @@ function createInputElementResizer(ownerDocument) {
|
|
77
77
|
* Resizes the element.
|
78
78
|
*/
|
79
79
|
function resize() {
|
80
|
+
var _getComputedStyle, _getComputedStyle2;
|
80
81
|
textHolder.textContent = observedElement.value;
|
81
82
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
82
83
|
// `flex-direction` set as `column`.
|
@@ -85,7 +86,9 @@ function createInputElementResizer(ownerDocument) {
|
|
85
86
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
86
87
|
textContainer.style.whiteSpace = 'pre';
|
87
88
|
body.appendChild(textContainer);
|
88
|
-
const
|
89
|
+
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
90
|
+
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
91
|
+
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
89
92
|
body.removeChild(textContainer);
|
90
93
|
const elementStyle = observedElement.style;
|
91
94
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/autoResize.mjs
CHANGED
@@ -73,6 +73,7 @@ export function createInputElementResizer(ownerDocument) {
|
|
73
73
|
* Resizes the element.
|
74
74
|
*/
|
75
75
|
function resize() {
|
76
|
+
var _getComputedStyle, _getComputedStyle2;
|
76
77
|
textHolder.textContent = observedElement.value;
|
77
78
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
78
79
|
// `flex-direction` set as `column`.
|
@@ -81,7 +82,9 @@ export function createInputElementResizer(ownerDocument) {
|
|
81
82
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
82
83
|
textContainer.style.whiteSpace = 'pre';
|
83
84
|
body.appendChild(textContainer);
|
84
|
-
const
|
85
|
+
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
86
|
+
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
87
|
+
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
85
88
|
body.removeChild(textContainer);
|
86
89
|
const elementStyle = observedElement.style;
|
87
90
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/ghostTable.js
CHANGED
@@ -133,7 +133,7 @@ class GhostTable {
|
|
133
133
|
if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {
|
134
134
|
// Please keep in mind that the renderable column index equal to the visual columns index for the GhostTable.
|
135
135
|
// We render all columns.
|
136
|
-
this.hot.view.appendColHeader(column, this.table.th);
|
136
|
+
this.hot.view.appendColHeader(column, this.table.th, undefined, -1);
|
137
137
|
}
|
138
138
|
this.table.tBody.appendChild(this.createCol(column));
|
139
139
|
this.container.container.appendChild(this.table.fragment);
|
@@ -149,6 +149,8 @@ class GhostTable {
|
|
149
149
|
if (!this.injected) {
|
150
150
|
this.injectTable();
|
151
151
|
}
|
152
|
+
const isBorderBoxSizing = this.hot.view.getStylesHandler().areCellsBorderBox();
|
153
|
+
const borderCompensation = isBorderBoxSizing ? 0 : 1;
|
152
154
|
(0, _array.arrayEach)(this.rows, row => {
|
153
155
|
// In cases when the cell's content produces the height with a decimal point, the height
|
154
156
|
// needs to be rounded up to make sure that there will be a space for the cell's content.
|
@@ -157,8 +159,8 @@ class GhostTable {
|
|
157
159
|
height
|
158
160
|
} = row.table.getBoundingClientRect();
|
159
161
|
|
160
|
-
// -1 <- reduce border-top from table
|
161
|
-
callback(row.row, Math.ceil(height) -
|
162
|
+
// -1 <- reduce border-top from table (if box-sizing is not border-box)
|
163
|
+
callback(row.row, Math.ceil(height) - borderCompensation);
|
162
164
|
});
|
163
165
|
}
|
164
166
|
|
package/utils/ghostTable.mjs
CHANGED
@@ -130,7 +130,7 @@ class GhostTable {
|
|
130
130
|
if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {
|
131
131
|
// Please keep in mind that the renderable column index equal to the visual columns index for the GhostTable.
|
132
132
|
// We render all columns.
|
133
|
-
this.hot.view.appendColHeader(column, this.table.th);
|
133
|
+
this.hot.view.appendColHeader(column, this.table.th, undefined, -1);
|
134
134
|
}
|
135
135
|
this.table.tBody.appendChild(this.createCol(column));
|
136
136
|
this.container.container.appendChild(this.table.fragment);
|
@@ -146,6 +146,8 @@ class GhostTable {
|
|
146
146
|
if (!this.injected) {
|
147
147
|
this.injectTable();
|
148
148
|
}
|
149
|
+
const isBorderBoxSizing = this.hot.view.getStylesHandler().areCellsBorderBox();
|
150
|
+
const borderCompensation = isBorderBoxSizing ? 0 : 1;
|
149
151
|
arrayEach(this.rows, row => {
|
150
152
|
// In cases when the cell's content produces the height with a decimal point, the height
|
151
153
|
// needs to be rounded up to make sure that there will be a space for the cell's content.
|
@@ -154,8 +156,8 @@ class GhostTable {
|
|
154
156
|
height
|
155
157
|
} = row.table.getBoundingClientRect();
|
156
158
|
|
157
|
-
// -1 <- reduce border-top from table
|
158
|
-
callback(row.row, Math.ceil(height) -
|
159
|
+
// -1 <- reduce border-top from table (if box-sizing is not border-box)
|
160
|
+
callback(row.row, Math.ceil(height) - borderCompensation);
|
159
161
|
});
|
160
162
|
}
|
161
163
|
|
@@ -1,138 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
|
-
require("core-js/modules/es.array.push.js");
|
6
|
-
var _constants = require("../constants");
|
7
|
-
var _viewOrder = require("./viewOrder");
|
8
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable jsdoc/require-description-complete-sentence */
|
11
|
-
/**
|
12
|
-
* A class which is responsible for generating commands/leads which has to be executed
|
13
|
-
* to achieve new DOM nodes order.
|
14
|
-
*
|
15
|
-
* @class {ViewDiffer}
|
16
|
-
*/
|
17
|
-
class ViewDiffer {
|
18
|
-
constructor(sizeSet) {
|
19
|
-
_defineProperty(this, "sizeSet", void 0);
|
20
|
-
this.sizeSet = sizeSet;
|
21
|
-
}
|
22
|
-
|
23
|
-
/**
|
24
|
-
* A method which generates commands/leads which has to be executed to achieve new DOM
|
25
|
-
* nodes order based on new offset and view size.
|
26
|
-
*
|
27
|
-
* For example, if current order looks like this (offset = 0, viewSize = 1):
|
28
|
-
* <body> (root node)
|
29
|
-
* └ <tr> (row 0)
|
30
|
-
* and next order should look like this (offset: 0, viewSize = 5):
|
31
|
-
* <body> (root node)
|
32
|
-
* ├ <tr> (row 0)
|
33
|
-
* ├ <tr> (row 1)
|
34
|
-
* ├ <tr> (row 2)
|
35
|
-
* ├ <tr> (row 3)
|
36
|
-
* └ <tr> (row 4)
|
37
|
-
* the generated commands/leads will look like this:
|
38
|
-
* <body> (root node)
|
39
|
-
* ├ <tr> (none, do nothing, leave as it is)
|
40
|
-
* ├ <tr> (append this element at index 1)
|
41
|
-
* ├ <tr> (append this element at index 2)
|
42
|
-
* ├ <tr> (append this element at index 3)
|
43
|
-
* └ <tr> (append this element at index 4)
|
44
|
-
*
|
45
|
-
* @returns {Array[]} Returns an array with generated commands/leads.
|
46
|
-
*/
|
47
|
-
diff() {
|
48
|
-
const {
|
49
|
-
sizeSet
|
50
|
-
} = this;
|
51
|
-
const {
|
52
|
-
currentSize: currentViewSize,
|
53
|
-
nextSize: nextViewSize
|
54
|
-
} = sizeSet.getViewSize();
|
55
|
-
let maxSize = Math.max(nextViewSize, currentViewSize);
|
56
|
-
if (maxSize === 0) {
|
57
|
-
return [];
|
58
|
-
}
|
59
|
-
const {
|
60
|
-
currentOffset,
|
61
|
-
nextOffset
|
62
|
-
} = sizeSet.getViewSize();
|
63
|
-
|
64
|
-
// @TODO(perf-tip): Creating an array (createRange) is not necessary it would be enough to generate
|
65
|
-
// commands based on numeric values.
|
66
|
-
const currentViewOrder = new _viewOrder.ViewOrder(currentOffset, currentViewSize);
|
67
|
-
const nextViewOrder = new _viewOrder.ViewOrder(nextOffset, nextViewSize);
|
68
|
-
const leads = [];
|
69
|
-
for (let i = 0; i < maxSize; i++) {
|
70
|
-
const currentIndex = currentViewOrder.get(i);
|
71
|
-
const nextIndex = nextViewOrder.get(i);
|
72
|
-
|
73
|
-
// Current index exceeds the next DOM index so it is necessary to generate a "remove" command
|
74
|
-
// to achieve new order.
|
75
|
-
if (nextIndex === -1) {
|
76
|
-
leads.push(['remove', currentIndex]);
|
77
|
-
|
78
|
-
// Next index exceeds the current DOM index so it is necessary to generate a "append" command
|
79
|
-
// to achieve new order.
|
80
|
-
} else if (currentIndex === -1) {
|
81
|
-
// Check what command should be generated (depends on if this work as a shared root node
|
82
|
-
// and in what position or not)
|
83
|
-
if (!sizeSet.isShared() || sizeSet.isShared() && sizeSet.isPlaceOn(_constants.WORKING_SPACE_BOTTOM)) {
|
84
|
-
/**
|
85
|
-
* If the differ has only one root node to manage with, the "append" command is generated.
|
86
|
-
*
|
87
|
-
* For example:
|
88
|
-
* ┌─────────── <body> (root node)
|
89
|
-
* │ <tr>
|
90
|
-
* │ <tr>
|
91
|
-
* (managed by one <tr>
|
92
|
-
* differ - TRs) <tr>
|
93
|
-
* │ <tr>
|
94
|
-
* └─────────── <tr> <--- Generates "append" command (which later executes `rootNode.appendChild(node)`)
|
95
|
-
*/
|
96
|
-
leads.push(['append', nextIndex]);
|
97
|
-
} else {
|
98
|
-
/**
|
99
|
-
* If the differ is sharing root node, the "prepend" command is generated.
|
100
|
-
*
|
101
|
-
* For example:
|
102
|
-
* ┌─────────── <tr> (root node, shared between two differs)
|
103
|
-
* (first differ) <th> <--- Generates "prepend" command (which later executes `rootNode.insertBefore(...)`)
|
104
|
-
* ├─────────── <td>
|
105
|
-
* │ <td>
|
106
|
-
* (second differ <td>
|
107
|
-
* - TDs) <td>
|
108
|
-
* │ <td>
|
109
|
-
* └─────────── <td>
|
110
|
-
*/
|
111
|
-
leads.push(['prepend', nextIndex]);
|
112
|
-
}
|
113
|
-
} else if (nextIndex > currentIndex) {
|
114
|
-
// This emulates DOM behavior when we try to append (or replace) an element which is already
|
115
|
-
// mounted. The old index in the array has to be popped out indicating that an element was
|
116
|
-
// moved to a different position.
|
117
|
-
if (currentViewOrder.has(nextIndex)) {
|
118
|
-
currentViewOrder.remove(nextIndex);
|
119
|
-
|
120
|
-
// Decrease loop size to prevent generating "remove" leads. "remove" leads are necessary only for nodes
|
121
|
-
// which are not mounted in current DOM order.
|
122
|
-
if (nextViewSize <= currentViewOrder.length) {
|
123
|
-
maxSize -= 1;
|
124
|
-
}
|
125
|
-
}
|
126
|
-
leads.push(['replace', nextIndex, currentIndex]);
|
127
|
-
} else if (nextIndex < currentIndex) {
|
128
|
-
const indexToRemove = currentViewOrder.prepend(nextIndex);
|
129
|
-
leads.push(['insert_before', nextIndex, currentIndex, indexToRemove]);
|
130
|
-
} else {
|
131
|
-
// for the same current and next indexes do nothing.
|
132
|
-
leads.push(['none', nextIndex]);
|
133
|
-
}
|
134
|
-
}
|
135
|
-
return leads;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
exports.ViewDiffer = ViewDiffer;
|
@@ -1,135 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
|
-
import "core-js/modules/es.array.push.js";
|
3
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
5
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
|
-
/* eslint-disable jsdoc/require-description-complete-sentence */
|
7
|
-
import { WORKING_SPACE_BOTTOM } from "../constants.mjs";
|
8
|
-
import { ViewOrder } from "./viewOrder.mjs";
|
9
|
-
/**
|
10
|
-
* A class which is responsible for generating commands/leads which has to be executed
|
11
|
-
* to achieve new DOM nodes order.
|
12
|
-
*
|
13
|
-
* @class {ViewDiffer}
|
14
|
-
*/
|
15
|
-
export class ViewDiffer {
|
16
|
-
constructor(sizeSet) {
|
17
|
-
_defineProperty(this, "sizeSet", void 0);
|
18
|
-
this.sizeSet = sizeSet;
|
19
|
-
}
|
20
|
-
|
21
|
-
/**
|
22
|
-
* A method which generates commands/leads which has to be executed to achieve new DOM
|
23
|
-
* nodes order based on new offset and view size.
|
24
|
-
*
|
25
|
-
* For example, if current order looks like this (offset = 0, viewSize = 1):
|
26
|
-
* <body> (root node)
|
27
|
-
* └ <tr> (row 0)
|
28
|
-
* and next order should look like this (offset: 0, viewSize = 5):
|
29
|
-
* <body> (root node)
|
30
|
-
* ├ <tr> (row 0)
|
31
|
-
* ├ <tr> (row 1)
|
32
|
-
* ├ <tr> (row 2)
|
33
|
-
* ├ <tr> (row 3)
|
34
|
-
* └ <tr> (row 4)
|
35
|
-
* the generated commands/leads will look like this:
|
36
|
-
* <body> (root node)
|
37
|
-
* ├ <tr> (none, do nothing, leave as it is)
|
38
|
-
* ├ <tr> (append this element at index 1)
|
39
|
-
* ├ <tr> (append this element at index 2)
|
40
|
-
* ├ <tr> (append this element at index 3)
|
41
|
-
* └ <tr> (append this element at index 4)
|
42
|
-
*
|
43
|
-
* @returns {Array[]} Returns an array with generated commands/leads.
|
44
|
-
*/
|
45
|
-
diff() {
|
46
|
-
const {
|
47
|
-
sizeSet
|
48
|
-
} = this;
|
49
|
-
const {
|
50
|
-
currentSize: currentViewSize,
|
51
|
-
nextSize: nextViewSize
|
52
|
-
} = sizeSet.getViewSize();
|
53
|
-
let maxSize = Math.max(nextViewSize, currentViewSize);
|
54
|
-
if (maxSize === 0) {
|
55
|
-
return [];
|
56
|
-
}
|
57
|
-
const {
|
58
|
-
currentOffset,
|
59
|
-
nextOffset
|
60
|
-
} = sizeSet.getViewSize();
|
61
|
-
|
62
|
-
// @TODO(perf-tip): Creating an array (createRange) is not necessary it would be enough to generate
|
63
|
-
// commands based on numeric values.
|
64
|
-
const currentViewOrder = new ViewOrder(currentOffset, currentViewSize);
|
65
|
-
const nextViewOrder = new ViewOrder(nextOffset, nextViewSize);
|
66
|
-
const leads = [];
|
67
|
-
for (let i = 0; i < maxSize; i++) {
|
68
|
-
const currentIndex = currentViewOrder.get(i);
|
69
|
-
const nextIndex = nextViewOrder.get(i);
|
70
|
-
|
71
|
-
// Current index exceeds the next DOM index so it is necessary to generate a "remove" command
|
72
|
-
// to achieve new order.
|
73
|
-
if (nextIndex === -1) {
|
74
|
-
leads.push(['remove', currentIndex]);
|
75
|
-
|
76
|
-
// Next index exceeds the current DOM index so it is necessary to generate a "append" command
|
77
|
-
// to achieve new order.
|
78
|
-
} else if (currentIndex === -1) {
|
79
|
-
// Check what command should be generated (depends on if this work as a shared root node
|
80
|
-
// and in what position or not)
|
81
|
-
if (!sizeSet.isShared() || sizeSet.isShared() && sizeSet.isPlaceOn(WORKING_SPACE_BOTTOM)) {
|
82
|
-
/**
|
83
|
-
* If the differ has only one root node to manage with, the "append" command is generated.
|
84
|
-
*
|
85
|
-
* For example:
|
86
|
-
* ┌─────────── <body> (root node)
|
87
|
-
* │ <tr>
|
88
|
-
* │ <tr>
|
89
|
-
* (managed by one <tr>
|
90
|
-
* differ - TRs) <tr>
|
91
|
-
* │ <tr>
|
92
|
-
* └─────────── <tr> <--- Generates "append" command (which later executes `rootNode.appendChild(node)`)
|
93
|
-
*/
|
94
|
-
leads.push(['append', nextIndex]);
|
95
|
-
} else {
|
96
|
-
/**
|
97
|
-
* If the differ is sharing root node, the "prepend" command is generated.
|
98
|
-
*
|
99
|
-
* For example:
|
100
|
-
* ┌─────────── <tr> (root node, shared between two differs)
|
101
|
-
* (first differ) <th> <--- Generates "prepend" command (which later executes `rootNode.insertBefore(...)`)
|
102
|
-
* ├─────────── <td>
|
103
|
-
* │ <td>
|
104
|
-
* (second differ <td>
|
105
|
-
* - TDs) <td>
|
106
|
-
* │ <td>
|
107
|
-
* └─────────── <td>
|
108
|
-
*/
|
109
|
-
leads.push(['prepend', nextIndex]);
|
110
|
-
}
|
111
|
-
} else if (nextIndex > currentIndex) {
|
112
|
-
// This emulates DOM behavior when we try to append (or replace) an element which is already
|
113
|
-
// mounted. The old index in the array has to be popped out indicating that an element was
|
114
|
-
// moved to a different position.
|
115
|
-
if (currentViewOrder.has(nextIndex)) {
|
116
|
-
currentViewOrder.remove(nextIndex);
|
117
|
-
|
118
|
-
// Decrease loop size to prevent generating "remove" leads. "remove" leads are necessary only for nodes
|
119
|
-
// which are not mounted in current DOM order.
|
120
|
-
if (nextViewSize <= currentViewOrder.length) {
|
121
|
-
maxSize -= 1;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
leads.push(['replace', nextIndex, currentIndex]);
|
125
|
-
} else if (nextIndex < currentIndex) {
|
126
|
-
const indexToRemove = currentViewOrder.prepend(nextIndex);
|
127
|
-
leads.push(['insert_before', nextIndex, currentIndex, indexToRemove]);
|
128
|
-
} else {
|
129
|
-
// for the same current and next indexes do nothing.
|
130
|
-
leads.push(['none', nextIndex]);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
return leads;
|
134
|
-
}
|
135
|
-
}
|
@@ -1,72 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
|
-
require("core-js/modules/es.array.unshift.js");
|
6
|
-
require("core-js/modules/esnext.iterator.map.js");
|
7
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
9
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
10
|
-
/**
|
11
|
-
* The view order is a list of indexes that represent the order of the rendered elements.
|
12
|
-
*
|
13
|
-
* @class {ViewOrder}
|
14
|
-
*/
|
15
|
-
class ViewOrder {
|
16
|
-
constructor(viewOffset, viewSize) {
|
17
|
-
_defineProperty(this, "order", []);
|
18
|
-
this.order = [...Array(viewSize).keys()].map(i => viewOffset + i);
|
19
|
-
}
|
20
|
-
|
21
|
-
/**
|
22
|
-
* The length of the view order.
|
23
|
-
*
|
24
|
-
* @returns {number}
|
25
|
-
*/
|
26
|
-
get length() {
|
27
|
-
return this.order.length;
|
28
|
-
}
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Checks if the view order contains the offset index.
|
32
|
-
*
|
33
|
-
* @param {number} offsetIndex The offset index.
|
34
|
-
* @returns {boolean}
|
35
|
-
*/
|
36
|
-
has(offsetIndex) {
|
37
|
-
return this.order.indexOf(offsetIndex) > -1;
|
38
|
-
}
|
39
|
-
|
40
|
-
/**
|
41
|
-
* Gets the offset index at the given zero-based index. If the index
|
42
|
-
* is out of bounds, -1 is returned.
|
43
|
-
*
|
44
|
-
* @param {number} zeroBasedIndex The zero-based index.
|
45
|
-
* @returns {number}
|
46
|
-
*/
|
47
|
-
get(zeroBasedIndex) {
|
48
|
-
return zeroBasedIndex < this.order.length ? this.order[zeroBasedIndex] : -1;
|
49
|
-
}
|
50
|
-
|
51
|
-
/**
|
52
|
-
* Removes the offset index from the view order.
|
53
|
-
*
|
54
|
-
* @param {number} offsetIndex The offset index.
|
55
|
-
*/
|
56
|
-
remove(offsetIndex) {
|
57
|
-
this.order.splice(this.order.indexOf(offsetIndex), 1);
|
58
|
-
}
|
59
|
-
|
60
|
-
/**
|
61
|
-
* Prepends the offset index to the view order. To keep the order length constant,
|
62
|
-
* the last offset index is removed.
|
63
|
-
*
|
64
|
-
* @param {number} offsetIndex The offset index.
|
65
|
-
* @returns {number}
|
66
|
-
*/
|
67
|
-
prepend(offsetIndex) {
|
68
|
-
this.order.unshift(offsetIndex);
|
69
|
-
return this.order.pop();
|
70
|
-
}
|
71
|
-
}
|
72
|
-
exports.ViewOrder = ViewOrder;
|