@siemens/ix 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button.js +7 -2
- package/components/button.js.map +1 -1
- package/components/dropdown-item.js +1 -1
- package/components/dropdown-item.js.map +1 -1
- package/components/field-label.js +1 -1
- package/components/field-label.js.map +1 -1
- package/components/field-wrapper.js +2 -2
- package/components/field-wrapper.js.map +1 -1
- package/components/index3.js +2 -1
- package/components/index3.js.map +1 -1
- package/components/input.util.js +4 -8
- package/components/input.util.js.map +1 -1
- package/components/ix-date-input.js +6 -6
- package/components/ix-date-input.js.map +1 -1
- package/components/ix-input.js +3 -3
- package/components/ix-input.js.map +1 -1
- package/components/ix-number-input.js +5 -5
- package/components/ix-number-input.js.map +1 -1
- package/components/ix-textarea.js +2 -2
- package/components/ix-textarea.js.map +1 -1
- package/components/ix-toggle-button.js +2 -2
- package/components/ix-toggle.js +25 -5
- package/components/ix-toggle.js.map +1 -1
- package/components/ix-tree.js +330 -496
- package/components/ix-tree.js.map +1 -1
- package/components/ix-upload.js +3 -3
- package/components/ix-validation-tooltip.js +2 -2
- package/components/ix-workflow-step.js +3 -3
- package/components/ix-workflow-steps.js +1 -1
- package/components/modal.js +6 -0
- package/components/modal.js.map +1 -1
- package/components/select.js +68 -52
- package/components/select.js.map +1 -1
- package/components/tooltip.js +2 -2
- package/components/tree-item.js +6 -5
- package/components/tree-item.js.map +1 -1
- package/dist/cjs/{app-globals-3c9c6a50.js → app-globals-4d8f1524.js} +2 -2
- package/dist/cjs/{app-globals-3c9c6a50.js.map → app-globals-4d8f1524.js.map} +1 -1
- package/dist/cjs/core-js-b22adfab.js +26 -0
- package/dist/cjs/core-js-b22adfab.js.map +1 -0
- package/dist/cjs/{helper-text-util-3192e78f.js → helper-text-util-635a1877.js} +2 -2
- package/dist/cjs/{helper-text-util-3192e78f.js.map → helper-text-util-635a1877.js.map} +1 -1
- package/dist/cjs/{index-74904d8b.js → index-492e6488.js} +2 -2
- package/dist/cjs/{index-74904d8b.js.map → index-492e6488.js.map} +1 -1
- package/dist/cjs/{index-d2117dc0.js → index-b44a6617.js} +3 -1
- package/dist/cjs/index-b44a6617.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es2017-0c2b80b6.js → index.es2017-805b5876.js} +3 -3
- package/dist/cjs/{index.es2017-0c2b80b6.js.map → index.es2017-805b5876.js.map} +1 -1
- package/dist/cjs/{input.util-1c2fa43d.js → input.util-54d161e6.js} +5 -9
- package/dist/cjs/input.util-54d161e6.js.map +1 -0
- package/dist/cjs/ix-application-header.cjs.entry.js +2 -2
- package/dist/cjs/ix-application-switch-modal.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js +7 -2
- package/dist/cjs/ix-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-col_4.cjs.entry.js +1 -1
- package/dist/cjs/ix-date-input.cjs.entry.js +6 -6
- package/dist/cjs/ix-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-field-label_3.cjs.entry.js +7 -7
- package/dist/cjs/ix-field-label_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/{ix-icon.entry-e95ddded.js → ix-icon.entry-e33446e2.js} +2 -2
- package/dist/cjs/{ix-icon.entry-e95ddded.js.map → ix-icon.entry-e33446e2.js.map} +1 -1
- package/dist/cjs/ix-input.cjs.entry.js +5 -5
- package/dist/cjs/ix-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js +2 -2
- package/dist/cjs/ix-number-input.cjs.entry.js +7 -7
- package/dist/cjs/ix-number-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-select.cjs.entry.js +68 -52
- package/dist/cjs/ix-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ix-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-toggle.cjs.entry.js +17 -3
- package/dist/cjs/ix-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tree-item.cjs.entry.js +6 -5
- package/dist/cjs/ix-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tree.cjs.entry.js +330 -489
- package/dist/cjs/ix-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-upload.cjs.entry.js +3 -3
- package/dist/cjs/ix-validation-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
- package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{modal-a49409aa.js → modal-923c83a6.js} +7 -1
- package/dist/cjs/modal-923c83a6.js.map +1 -0
- package/dist/cjs/{setup-86b7d543.js → setup-cc07fbfc.js} +2 -2
- package/dist/cjs/{setup-86b7d543.js.map → setup-cc07fbfc.js.map} +1 -1
- package/dist/cjs/siemens-ix.cjs.js +3 -3
- package/dist/collection/components/button/button.js +7 -2
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/date-input/date-input.js +8 -6
- package/dist/collection/components/date-input/date-input.js.map +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +0 -3
- package/dist/collection/components/field-label/field-label.js +13 -5
- package/dist/collection/components/field-label/field-label.js.map +1 -1
- package/dist/collection/components/field-wrapper/field-wrapper.js +12 -4
- package/dist/collection/components/field-wrapper/field-wrapper.js.map +1 -1
- package/dist/collection/components/input/input.fc.js +4 -8
- package/dist/collection/components/input/input.fc.js.map +1 -1
- package/dist/collection/components/input/input.js +5 -3
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input/number-input.js +7 -5
- package/dist/collection/components/input/number-input.js.map +1 -1
- package/dist/collection/components/input/textarea.js +2 -2
- package/dist/collection/components/input/textarea.js.map +1 -1
- package/dist/collection/components/modal/test/modal.ct.js +57 -65
- package/dist/collection/components/modal/test/modal.ct.js.map +1 -1
- package/dist/collection/components/select/select.js +68 -52
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select/test/select.ct.js +72 -100
- package/dist/collection/components/select/test/select.ct.js.map +1 -1
- package/dist/collection/components/toggle/toggle.css +376 -161
- package/dist/collection/components/toggle/toggle.js +17 -3
- package/dist/collection/components/toggle/toggle.js.map +1 -1
- package/dist/collection/components/toggle-button/toggle-button.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/components/tree/tree.js +6 -3
- package/dist/collection/components/tree/tree.js.map +1 -1
- package/dist/collection/components/tree-item/tree-item.js +6 -5
- package/dist/collection/components/tree-item/tree-item.js.map +1 -1
- package/dist/collection/components/upload/upload.js +3 -3
- package/dist/collection/components/utils/lazy-list/index.js +2 -0
- package/dist/collection/components/utils/lazy-list/index.js.map +1 -0
- package/dist/collection/components/utils/lazy-list/lazy.js +343 -0
- package/dist/collection/components/utils/lazy-list/lazy.js.map +1 -0
- package/dist/collection/components/utils/modal/modal.js +6 -0
- package/dist/collection/components/utils/modal/modal.js.map +1 -1
- package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
- package/dist/collection/components/workflow-step/workflow-step.js +3 -3
- package/dist/collection/components/workflow-steps/workflow-steps.js +1 -1
- package/dist/collection/tests/html-tags/html-tags.e2e.js +17 -0
- package/dist/collection/tests/html-tags/html-tags.e2e.js.map +1 -0
- package/dist/esm/app-globals-40082a83.js +7 -0
- package/dist/esm/{app-globals-ae0ca705.js.map → app-globals-40082a83.js.map} +1 -1
- package/dist/esm/{core-js-78b486a8.js → core-js-4a847feb.js} +2 -2
- package/dist/esm/{core-js-78b486a8.js.map → core-js-4a847feb.js.map} +1 -1
- package/dist/esm/{helper-text-util-10896253.js → helper-text-util-e47b864d.js} +2 -2
- package/dist/esm/{helper-text-util-10896253.js.map → helper-text-util-e47b864d.js.map} +1 -1
- package/dist/esm/{index-ad2af369.js → index-2b76ea55.js} +3 -2
- package/dist/esm/index-2b76ea55.js.map +1 -0
- package/dist/esm/{index-60d17930.js → index-7421df0c.js} +2 -2
- package/dist/esm/{index-60d17930.js.map → index-7421df0c.js.map} +1 -1
- package/dist/esm/{index.es2017-93ac816c.js → index.es2017-4e6fdf77.js} +3 -3
- package/dist/esm/{index.es2017-93ac816c.js.map → index.es2017-4e6fdf77.js.map} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{input.util-715860e3.js → input.util-c855b2ed.js} +5 -9
- package/dist/esm/input.util-c855b2ed.js.map +1 -0
- package/dist/esm/ix-application-header.entry.js +2 -2
- package/dist/esm/ix-application-switch-modal.entry.js +1 -1
- package/dist/esm/ix-button.entry.js +7 -2
- package/dist/esm/ix-button.entry.js.map +1 -1
- package/dist/esm/ix-col_4.entry.js +1 -1
- package/dist/esm/ix-date-input.entry.js +6 -6
- package/dist/esm/ix-date-input.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-item.entry.js +1 -1
- package/dist/esm/ix-dropdown-item.entry.js.map +1 -1
- package/dist/esm/ix-field-label_3.entry.js +7 -7
- package/dist/esm/ix-field-label_3.entry.js.map +1 -1
- package/dist/esm/ix-helper-text.entry.js +2 -2
- package/dist/esm/{ix-icon.entry-621b700a.js → ix-icon.entry-f5f7c268.js} +2 -2
- package/dist/esm/{ix-icon.entry-621b700a.js.map → ix-icon.entry-f5f7c268.js.map} +1 -1
- package/dist/esm/ix-input.entry.js +5 -5
- package/dist/esm/ix-input.entry.js.map +1 -1
- package/dist/esm/ix-menu.entry.js +2 -2
- package/dist/esm/ix-number-input.entry.js +7 -7
- package/dist/esm/ix-number-input.entry.js.map +1 -1
- package/dist/esm/ix-select.entry.js +68 -52
- package/dist/esm/ix-select.entry.js.map +1 -1
- package/dist/esm/ix-textarea.entry.js +3 -3
- package/dist/esm/ix-textarea.entry.js.map +1 -1
- package/dist/esm/ix-time-picker.entry.js +1 -1
- package/dist/esm/ix-toggle-button.entry.js +2 -2
- package/dist/esm/ix-toggle.entry.js +18 -4
- package/dist/esm/ix-toggle.entry.js.map +1 -1
- package/dist/esm/ix-tree-item.entry.js +6 -5
- package/dist/esm/ix-tree-item.entry.js.map +1 -1
- package/dist/esm/ix-tree.entry.js +330 -489
- package/dist/esm/ix-tree.entry.js.map +1 -1
- package/dist/esm/ix-upload.entry.js +3 -3
- package/dist/esm/ix-validation-tooltip.entry.js +2 -2
- package/dist/esm/ix-workflow-step.entry.js +3 -3
- package/dist/esm/ix-workflow-steps.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{modal-101eef04.js → modal-4b3f8800.js} +7 -1
- package/dist/{cjs/modal-a49409aa.js.map → esm/modal-4b3f8800.js.map} +1 -1
- package/dist/esm/{setup-d88021f8.js → setup-9c5fe321.js} +2 -2
- package/dist/esm/{setup-d88021f8.js.map → setup-9c5fe321.js.map} +1 -1
- package/dist/esm/siemens-ix.js +3 -3
- package/dist/siemens-ix/index.esm.js +1 -1
- package/dist/siemens-ix/{p-0dbc970e.entry.js → p-0b2f0536.entry.js} +2 -2
- package/dist/siemens-ix/{p-2b226409.entry.js → p-0b5c9f33.entry.js} +2 -2
- package/dist/siemens-ix/p-0b5c9f33.entry.js.map +1 -0
- package/dist/siemens-ix/{p-044c2a7b.entry.js → p-18542846.entry.js} +2 -2
- package/dist/siemens-ix/p-20938f73.entry.js +2 -0
- package/dist/siemens-ix/p-20938f73.entry.js.map +1 -0
- package/dist/siemens-ix/p-22cba43a.entry.js +2 -0
- package/dist/siemens-ix/p-22cba43a.entry.js.map +1 -0
- package/dist/siemens-ix/{p-9fe2759f.entry.js → p-243e8b32.entry.js} +2 -2
- package/dist/siemens-ix/p-243e8b32.entry.js.map +1 -0
- package/dist/siemens-ix/p-38d9d569.js +2 -0
- package/dist/siemens-ix/p-38d9d569.js.map +1 -0
- package/dist/siemens-ix/{p-d7aa00d6.js → p-3aaecbd9.js} +2 -2
- package/dist/siemens-ix/{p-175599e4.entry.js → p-42320fb3.entry.js} +2 -2
- package/dist/siemens-ix/p-44fa005c.js +4 -0
- package/dist/siemens-ix/{p-a2200306.js.map → p-44fa005c.js.map} +1 -1
- package/dist/siemens-ix/p-451551d1.js +2 -0
- package/dist/siemens-ix/p-451551d1.js.map +1 -0
- package/dist/siemens-ix/p-53fd545a.entry.js +2 -0
- package/dist/siemens-ix/p-53fd545a.entry.js.map +1 -0
- package/dist/siemens-ix/p-5fbdff13.entry.js +2 -0
- package/dist/siemens-ix/p-5fbdff13.entry.js.map +1 -0
- package/dist/siemens-ix/{p-1f6df0c6.js → p-738c2d1f.js} +2 -2
- package/dist/siemens-ix/{p-424e8092.entry.js → p-897c8e5b.entry.js} +2 -2
- package/dist/siemens-ix/p-897c8e5b.entry.js.map +1 -0
- package/dist/siemens-ix/{p-f35386ec.js → p-93d4d3c9.js} +2 -2
- package/dist/siemens-ix/{p-9948574f.entry.js → p-97d4b3bd.entry.js} +2 -2
- package/dist/siemens-ix/{p-6a4a2064.entry.js → p-9f960c0b.entry.js} +2 -2
- package/dist/siemens-ix/{p-0c89cbcc.entry.js → p-a4dc6824.entry.js} +2 -2
- package/dist/siemens-ix/{p-fe87443e.js → p-a6af13b0.js} +2 -2
- package/dist/siemens-ix/p-af7c4b16.entry.js +2 -0
- package/dist/siemens-ix/p-af7c4b16.entry.js.map +1 -0
- package/dist/siemens-ix/{p-a3364116.entry.js → p-afb4565c.entry.js} +2 -2
- package/dist/siemens-ix/{p-4c9b7548.entry.js → p-bc272f75.entry.js} +2 -2
- package/dist/siemens-ix/{p-3205726a.entry.js → p-bfe469e4.entry.js} +2 -2
- package/dist/siemens-ix/{p-792e1c52.entry.js → p-c07557b0.entry.js} +2 -2
- package/dist/siemens-ix/p-c07557b0.entry.js.map +1 -0
- package/dist/siemens-ix/p-c3ca17fc.js +2 -0
- package/dist/siemens-ix/p-c530de51.entry.js +2 -0
- package/dist/siemens-ix/p-c530de51.entry.js.map +1 -0
- package/dist/siemens-ix/p-d2f21544.js +2 -0
- package/dist/siemens-ix/{p-68bb2a09.entry.js → p-d9b654af.entry.js} +2 -2
- package/dist/siemens-ix/p-d9b654af.entry.js.map +1 -0
- package/dist/siemens-ix/{p-e9a37b3f.entry.js → p-ee0645f8.entry.js} +2 -2
- package/dist/siemens-ix/p-fe158b99.js +2 -0
- package/dist/siemens-ix/p-fe158b99.js.map +1 -0
- package/dist/siemens-ix/{p-f39048a2.entry.js → p-fe396297.entry.js} +2 -2
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/date-input/date-input.d.ts +2 -0
- package/dist/types/components/field-label/field-label.d.ts +1 -1
- package/dist/types/components/field-wrapper/field-wrapper.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/input/number-input.d.ts +2 -0
- package/dist/types/components/modal/test/modal.ct.d.ts +2 -1
- package/dist/types/components/select/select.d.ts +9 -8
- package/dist/types/components/utils/lazy-list/index.d.ts +2 -0
- package/dist/types/components/utils/lazy-list/lazy.d.ts +51 -0
- package/dist/types/components.d.ts +9 -3
- package/hydrate/index.js +499 -621
- package/package.json +1 -2
- package/dist/cjs/_commonjsHelpers-0192c5b3.js +0 -17
- package/dist/cjs/_commonjsHelpers-0192c5b3.js.map +0 -1
- package/dist/cjs/core-js-2fc351ee.js +0 -26
- package/dist/cjs/core-js-2fc351ee.js.map +0 -1
- package/dist/cjs/index-d2117dc0.js.map +0 -1
- package/dist/cjs/input.util-1c2fa43d.js.map +0 -1
- package/dist/esm/_commonjsHelpers-e557d4a5.js +0 -13
- package/dist/esm/_commonjsHelpers-e557d4a5.js.map +0 -1
- package/dist/esm/app-globals-ae0ca705.js +0 -7
- package/dist/esm/index-ad2af369.js.map +0 -1
- package/dist/esm/input.util-715860e3.js.map +0 -1
- package/dist/esm/modal-101eef04.js.map +0 -1
- package/dist/siemens-ix/p-0f0e7e14.entry.js +0 -2
- package/dist/siemens-ix/p-0f0e7e14.entry.js.map +0 -1
- package/dist/siemens-ix/p-23a4b81f.js +0 -2
- package/dist/siemens-ix/p-23a4b81f.js.map +0 -1
- package/dist/siemens-ix/p-2b226409.entry.js.map +0 -1
- package/dist/siemens-ix/p-424e8092.entry.js.map +0 -1
- package/dist/siemens-ix/p-45840cb9.js +0 -2
- package/dist/siemens-ix/p-45840cb9.js.map +0 -1
- package/dist/siemens-ix/p-4624a772.entry.js +0 -2
- package/dist/siemens-ix/p-4624a772.entry.js.map +0 -1
- package/dist/siemens-ix/p-50096707.js +0 -2
- package/dist/siemens-ix/p-5682e985.js +0 -2
- package/dist/siemens-ix/p-5db5a0b5.entry.js +0 -2
- package/dist/siemens-ix/p-5db5a0b5.entry.js.map +0 -1
- package/dist/siemens-ix/p-68bb2a09.entry.js.map +0 -1
- package/dist/siemens-ix/p-792e1c52.entry.js.map +0 -1
- package/dist/siemens-ix/p-79bb0d39.js +0 -2
- package/dist/siemens-ix/p-79bb0d39.js.map +0 -1
- package/dist/siemens-ix/p-857f99c8.entry.js +0 -2
- package/dist/siemens-ix/p-857f99c8.entry.js.map +0 -1
- package/dist/siemens-ix/p-9fe2759f.entry.js.map +0 -1
- package/dist/siemens-ix/p-a2200306.js +0 -4
- package/dist/siemens-ix/p-a427e6a2.js +0 -2
- package/dist/siemens-ix/p-a427e6a2.js.map +0 -1
- package/dist/siemens-ix/p-bded112a.entry.js +0 -2
- package/dist/siemens-ix/p-bded112a.entry.js.map +0 -1
- package/dist/siemens-ix/p-f7618d1d.entry.js +0 -2
- package/dist/siemens-ix/p-f7618d1d.entry.js.map +0 -1
- /package/dist/siemens-ix/{p-0dbc970e.entry.js.map → p-0b2f0536.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-044c2a7b.entry.js.map → p-18542846.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d7aa00d6.js.map → p-3aaecbd9.js.map} +0 -0
- /package/dist/siemens-ix/{p-175599e4.entry.js.map → p-42320fb3.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-1f6df0c6.js.map → p-738c2d1f.js.map} +0 -0
- /package/dist/siemens-ix/{p-f35386ec.js.map → p-93d4d3c9.js.map} +0 -0
- /package/dist/siemens-ix/{p-9948574f.entry.js.map → p-97d4b3bd.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6a4a2064.entry.js.map → p-9f960c0b.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-0c89cbcc.entry.js.map → p-a4dc6824.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-fe87443e.js.map → p-a6af13b0.js.map} +0 -0
- /package/dist/siemens-ix/{p-a3364116.entry.js.map → p-afb4565c.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-4c9b7548.entry.js.map → p-bc272f75.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-3205726a.entry.js.map → p-bfe469e4.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-5682e985.js.map → p-c3ca17fc.js.map} +0 -0
- /package/dist/siemens-ix/{p-50096707.js.map → p-d2f21544.js.map} +0 -0
- /package/dist/siemens-ix/{p-e9a37b3f.entry.js.map → p-ee0645f8.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-f39048a2.entry.js.map → p-fe396297.entry.js.map} +0 -0
package/components/ix-tree.js
CHANGED
|
@@ -3,517 +3,348 @@ import { r as renderDefaultItem } from './default-tree-item.js';
|
|
|
3
3
|
import { d as dropdownController } from './dropdown-controller.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './tree-item.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var hyperlist = {exports: {}};
|
|
15
|
-
|
|
16
|
-
(function (module, exports) {
|
|
17
|
-
(function(f){{module.exports=f();}})(function(){return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof commonjsRequire&&commonjsRequire;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t);}return n[i].exports}for(var u="function"==typeof commonjsRequire&&commonjsRequire,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
|
|
18
|
-
|
|
19
|
-
// Default configuration.
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
|
|
29
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
|
-
|
|
31
|
-
var defaultConfig = {
|
|
32
|
-
width: '100%',
|
|
33
|
-
height: '100%'
|
|
34
|
-
|
|
35
|
-
// Check for valid number.
|
|
36
|
-
};var isNumber = function isNumber(input) {
|
|
37
|
-
return Number(input) === Number(input);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// Add a class to an element.
|
|
41
|
-
var addClass = 'classList' in document.documentElement ? function (element, className) {
|
|
42
|
-
element.classList.add(className);
|
|
43
|
-
} : function (element, className) {
|
|
44
|
-
var oldClass = element.getAttribute('class') || '';
|
|
45
|
-
element.setAttribute('class', oldClass + ' ' + className);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Creates a HyperList instance that virtually scrolls very large amounts of
|
|
50
|
-
* data effortlessly.
|
|
6
|
+
/*
|
|
7
|
+
* SPDX-FileCopyrightText: 2024 Siemens AG
|
|
8
|
+
*
|
|
9
|
+
* SPDX-License-Identifier: MIT
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
51
13
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
14
|
+
// Manually forked from https://github.com/tbranyen/hyperlist to remove
|
|
15
|
+
// features a direct document calls
|
|
16
|
+
//
|
|
17
|
+
// Hyperlist is licensed MIT. https://github.com/tbranyen/hyperlist
|
|
18
|
+
const isNumber = (input) => !Number.isNaN(Number(input));
|
|
19
|
+
const addClass = (element, className) => {
|
|
20
|
+
element.classList.add(className);
|
|
21
|
+
};
|
|
22
|
+
class VirtualList {
|
|
23
|
+
static create(element, userProvidedConfig = VirtualList.defaultConfig) {
|
|
24
|
+
return new VirtualList(element, userProvidedConfig);
|
|
58
25
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, {
|
|
67
|
-
key: 'mergeStyle',
|
|
68
|
-
value: function mergeStyle(element, style) {
|
|
69
|
-
for (var i in style) {
|
|
70
|
-
if (element.style[i] !== style[i]) {
|
|
71
|
-
element.style[i] = style[i];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
26
|
+
static mergeStyle(element, style) {
|
|
27
|
+
for (let i in style) {
|
|
28
|
+
if (element.style[i] !== style[i]) {
|
|
29
|
+
element.style[i] = style[i];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
74
32
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// Remove the element immediately after reading the value.
|
|
100
|
-
document.body.removeChild(wrapper);
|
|
101
|
-
|
|
102
|
-
return maxElementHeight;
|
|
33
|
+
static getMaxBrowserHeight() {
|
|
34
|
+
// Create two elements, the wrapper is `1px` tall and is transparent and
|
|
35
|
+
// positioned at the top of the page. Inside that is an element that gets
|
|
36
|
+
// set to 1 billion pixels. Then reads the max height the browser can
|
|
37
|
+
// calculate.
|
|
38
|
+
const wrapper = document.createElement('div');
|
|
39
|
+
const fixture = document.createElement('div');
|
|
40
|
+
// As said above, these values get set to put the fixture elements into the
|
|
41
|
+
// right visual state.
|
|
42
|
+
VirtualList.mergeStyle(wrapper, {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
height: '1px',
|
|
45
|
+
opacity: 0,
|
|
46
|
+
});
|
|
47
|
+
VirtualList.mergeStyle(fixture, { height: '1e7px' });
|
|
48
|
+
// Add the fixture into the wrapper element.
|
|
49
|
+
wrapper.appendChild(fixture);
|
|
50
|
+
// Apply to the page, the values won't kick in unless this is attached.
|
|
51
|
+
document.body.appendChild(wrapper);
|
|
52
|
+
// Get the maximum element height in pixels.
|
|
53
|
+
const maxElementHeight = fixture.offsetHeight;
|
|
54
|
+
// Remove the element immediately after reading the value.
|
|
55
|
+
document.body.removeChild(wrapper);
|
|
56
|
+
return maxElementHeight;
|
|
103
57
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var diff = lastRepaint ? scrollTop - lastRepaint : 0;
|
|
131
|
-
if (!lastRepaint || diff < 0 || diff > _this._averageHeight) {
|
|
132
|
-
var rendered = _this._renderChunk();
|
|
133
|
-
|
|
134
|
-
_this._lastRepaint = scrollTop;
|
|
135
|
-
|
|
136
|
-
if (rendered !== false && typeof config.afterRender === 'function') {
|
|
137
|
-
config.afterRender();
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
render();
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
_createClass(HyperList, [{
|
|
146
|
-
key: 'destroy',
|
|
147
|
-
value: function destroy() {
|
|
148
|
-
window.cancelAnimationFrame(this._renderAnimationFrame);
|
|
58
|
+
constructor(element, userProvidedConfig) {
|
|
59
|
+
this._lastRepaint = null;
|
|
60
|
+
this._maxElementHeight = VirtualList.getMaxBrowserHeight();
|
|
61
|
+
this.refresh(element, userProvidedConfig);
|
|
62
|
+
const config = this._config;
|
|
63
|
+
// Create internal render loop.
|
|
64
|
+
const render = () => {
|
|
65
|
+
const scrollTop = this._getScrollPosition();
|
|
66
|
+
const lastRepaint = this._lastRepaint;
|
|
67
|
+
this._renderAnimationFrame = window.requestAnimationFrame(render);
|
|
68
|
+
if (scrollTop === lastRepaint) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const diff = lastRepaint ? scrollTop - lastRepaint : 0;
|
|
72
|
+
if (!lastRepaint || diff < 0 || diff > this._averageHeight) {
|
|
73
|
+
let rendered = this._renderChunk();
|
|
74
|
+
this._lastRepaint = scrollTop;
|
|
75
|
+
if (rendered !== false && typeof config.afterRender === 'function') {
|
|
76
|
+
config.afterRender();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
render();
|
|
149
81
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (!element || element.nodeType !== 1) {
|
|
158
|
-
throw new Error('HyperList requires a valid DOM Node container');
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
this._element = element;
|
|
162
|
-
|
|
163
|
-
var config = this._config;
|
|
164
|
-
|
|
165
|
-
var scroller = this._scroller || config.scroller || document.createElement(config.scrollerTagName || 'tr');
|
|
166
|
-
|
|
167
|
-
// Default configuration option `useFragment` to `true`.
|
|
168
|
-
if (typeof config.useFragment !== 'boolean') {
|
|
169
|
-
this._config.useFragment = true;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (!config.generate) {
|
|
173
|
-
throw new Error('Missing required `generate` function');
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (!isNumber(config.total)) {
|
|
177
|
-
throw new Error('Invalid required `total` value, expected number');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (!Array.isArray(config.itemHeight) && !isNumber(config.itemHeight)) {
|
|
181
|
-
throw new Error('\n Invalid required `itemHeight` value, expected number or array\n '.trim());
|
|
182
|
-
} else if (isNumber(config.itemHeight)) {
|
|
183
|
-
this._itemHeights = Array(config.total).fill(config.itemHeight);
|
|
184
|
-
} else {
|
|
185
|
-
this._itemHeights = config.itemHeight;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Width and height should be coerced to string representations. Either in
|
|
189
|
-
// `%` or `px`.
|
|
190
|
-
Object.keys(defaultConfig).filter(function (prop) {
|
|
191
|
-
return prop in config;
|
|
192
|
-
}).forEach(function (prop) {
|
|
193
|
-
var value = config[prop];
|
|
194
|
-
var isValueNumber = isNumber(value);
|
|
195
|
-
|
|
196
|
-
if (value && typeof value !== 'string' && typeof value !== 'number') {
|
|
197
|
-
var msg = 'Invalid optional `' + prop + '`, expected string or number';
|
|
198
|
-
throw new Error(msg);
|
|
199
|
-
} else if (isValueNumber) {
|
|
200
|
-
config[prop] = value + 'px';
|
|
82
|
+
destroy() {
|
|
83
|
+
window.cancelAnimationFrame(this._renderAnimationFrame);
|
|
84
|
+
}
|
|
85
|
+
refresh(element, userProvidedConfig = VirtualList.defaultConfig) {
|
|
86
|
+
this._config = userProvidedConfig;
|
|
87
|
+
if (!element || element.nodeType !== 1) {
|
|
88
|
+
throw new Error('HyperList requires a valid DOM Node container');
|
|
201
89
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
90
|
+
this._element = element;
|
|
91
|
+
const config = this._config;
|
|
92
|
+
const scroller = this._scroller ||
|
|
93
|
+
config.scroller ||
|
|
94
|
+
document.createElement(config.scrollerTagName || 'tr');
|
|
95
|
+
// Default configuration option `useFragment` to `true`.
|
|
96
|
+
if (typeof config.useFragment !== 'boolean') {
|
|
97
|
+
this._config.useFragment = true;
|
|
98
|
+
}
|
|
99
|
+
if (!config.generate) {
|
|
100
|
+
throw new Error('Missing required `generate` function');
|
|
101
|
+
}
|
|
102
|
+
if (!isNumber(config.total)) {
|
|
103
|
+
throw new Error('Invalid required `total` value, expected number');
|
|
104
|
+
}
|
|
105
|
+
if (!Array.isArray(config.itemHeight) && !isNumber(config.itemHeight)) {
|
|
106
|
+
throw new Error(`
|
|
107
|
+
Invalid required \`itemHeight\` value, expected number or array
|
|
108
|
+
`.trim());
|
|
109
|
+
}
|
|
110
|
+
else if (isNumber(config.itemHeight)) {
|
|
111
|
+
this._itemHeights = Array(config.total).fill(config.itemHeight);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
this._itemHeights = [config.itemHeight];
|
|
115
|
+
}
|
|
116
|
+
// Width and height should be coerced to string representations. Either in
|
|
117
|
+
// `%` or `px`.
|
|
118
|
+
Object.keys(VirtualList.defaultConfig)
|
|
119
|
+
.filter((prop) => prop in config)
|
|
120
|
+
.forEach((prop) => {
|
|
121
|
+
const value = config[prop];
|
|
122
|
+
const isValueNumber = isNumber(value);
|
|
123
|
+
if (value && typeof value !== 'string' && typeof value !== 'number') {
|
|
124
|
+
let msg = `Invalid optional \`${prop}\`, expected string or number`;
|
|
125
|
+
throw new Error(msg);
|
|
126
|
+
}
|
|
127
|
+
else if (isValueNumber) {
|
|
128
|
+
config[prop] = `${value}px`;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const isHorizontal = Boolean(config.horizontal);
|
|
132
|
+
const value = config[isHorizontal ? 'width' : 'height'];
|
|
133
|
+
if (value) {
|
|
134
|
+
const isValueNumber = isNumber(value);
|
|
135
|
+
const isValuePercent = isValueNumber ? false : value.slice(-1) === '%';
|
|
136
|
+
// Compute the containerHeight as number
|
|
137
|
+
const numberValue = isValueNumber
|
|
138
|
+
? parseInt(value, 10)
|
|
139
|
+
: parseInt(value.replace(/px|%/, ''), 10);
|
|
140
|
+
const innerSize = window[isHorizontal ? 'innerWidth' : 'innerHeight'];
|
|
141
|
+
if (isValuePercent) {
|
|
142
|
+
this._containerSize = (innerSize * numberValue) / 100;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this._containerSize = isNumber(value) ? value : numberValue;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const scrollContainer = config.scrollContainer;
|
|
149
|
+
const scrollerHeight = config.itemHeight * config.total;
|
|
150
|
+
const maxElementHeight = this._maxElementHeight;
|
|
151
|
+
if (scrollerHeight > maxElementHeight) {
|
|
152
|
+
console.warn([
|
|
153
|
+
'HyperList: The maximum element height',
|
|
154
|
+
maxElementHeight + 'px has',
|
|
155
|
+
'been exceeded; please reduce your item height.',
|
|
156
|
+
].join(' '));
|
|
157
|
+
}
|
|
158
|
+
// Decorate the container element with styles that will match
|
|
159
|
+
// the user supplied configuration.
|
|
160
|
+
const elementStyle = {
|
|
161
|
+
width: `${config.width}`,
|
|
162
|
+
height: scrollContainer ? `${scrollerHeight}px` : `${config.height}`,
|
|
163
|
+
overflow: scrollContainer ? 'none' : 'auto',
|
|
164
|
+
position: 'relative',
|
|
165
|
+
};
|
|
166
|
+
VirtualList.mergeStyle(element, elementStyle);
|
|
167
|
+
if (scrollContainer) {
|
|
168
|
+
VirtualList.mergeStyle(config.scrollContainer, { overflow: 'auto' });
|
|
169
|
+
}
|
|
170
|
+
const scrollerStyle = {
|
|
171
|
+
opacity: '0',
|
|
172
|
+
position: 'absolute',
|
|
173
|
+
[isHorizontal ? 'height' : 'width']: '1px',
|
|
174
|
+
[isHorizontal ? 'width' : 'height']: `${scrollerHeight}px`,
|
|
175
|
+
};
|
|
176
|
+
VirtualList.mergeStyle(scroller, scrollerStyle);
|
|
177
|
+
// Only append the scroller element once.
|
|
178
|
+
if (!this._scroller) {
|
|
179
|
+
element.appendChild(scroller);
|
|
180
|
+
}
|
|
181
|
+
const padding = this._computeScrollPadding();
|
|
182
|
+
this._scrollPaddingBottom = padding.bottom;
|
|
183
|
+
this._scrollPaddingTop = padding.top;
|
|
184
|
+
// Set the scroller instance.
|
|
185
|
+
this._scroller = scroller;
|
|
186
|
+
this._scrollHeight = this._computeScrollHeight();
|
|
187
|
+
// Reuse the item positions if refreshed, otherwise set to empty array.
|
|
188
|
+
this._itemPositions = this._itemPositions || Array(config.total).fill(0);
|
|
189
|
+
// Each index in the array should represent the position in the DOM.
|
|
190
|
+
this._computePositions(0);
|
|
191
|
+
// Render after refreshing. Force render if we're calling refresh manually.
|
|
192
|
+
this._renderChunk(this._lastRepaint !== null);
|
|
193
|
+
if (typeof config.afterRender === 'function') {
|
|
194
|
+
config.afterRender();
|
|
218
195
|
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
var scrollContainer = config.scrollContainer;
|
|
222
|
-
var scrollerHeight = config.itemHeight * config.total;
|
|
223
|
-
var maxElementHeight = this._maxElementHeight;
|
|
224
|
-
|
|
225
|
-
if (scrollerHeight > maxElementHeight) {
|
|
226
|
-
console.warn(['HyperList: The maximum element height', maxElementHeight + 'px has', 'been exceeded; please reduce your item height.'].join(' '));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// Decorate the container element with styles that will match
|
|
230
|
-
// the user supplied configuration.
|
|
231
|
-
var elementStyle = {
|
|
232
|
-
width: '' + config.width,
|
|
233
|
-
height: scrollContainer ? scrollerHeight + 'px' : '' + config.height,
|
|
234
|
-
overflow: scrollContainer ? 'none' : 'auto',
|
|
235
|
-
position: 'relative'
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
HyperList.mergeStyle(element, elementStyle);
|
|
239
|
-
|
|
240
|
-
if (scrollContainer) {
|
|
241
|
-
HyperList.mergeStyle(config.scrollContainer, { overflow: 'auto' });
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
var scrollerStyle = (_scrollerStyle = {
|
|
245
|
-
opacity: '0',
|
|
246
|
-
position: 'absolute'
|
|
247
|
-
}, _defineProperty(_scrollerStyle, isHoriz ? 'height' : 'width', '1px'), _defineProperty(_scrollerStyle, isHoriz ? 'width' : 'height', scrollerHeight + 'px'), _scrollerStyle);
|
|
248
|
-
|
|
249
|
-
HyperList.mergeStyle(scroller, scrollerStyle);
|
|
250
|
-
|
|
251
|
-
// Only append the scroller element once.
|
|
252
|
-
if (!this._scroller) {
|
|
253
|
-
element.appendChild(scroller);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
var padding = this._computeScrollPadding();
|
|
257
|
-
this._scrollPaddingBottom = padding.bottom;
|
|
258
|
-
this._scrollPaddingTop = padding.top;
|
|
259
|
-
|
|
260
|
-
// Set the scroller instance.
|
|
261
|
-
this._scroller = scroller;
|
|
262
|
-
this._scrollHeight = this._computeScrollHeight();
|
|
263
|
-
|
|
264
|
-
// Reuse the item positions if refreshed, otherwise set to empty array.
|
|
265
|
-
this._itemPositions = this._itemPositions || Array(config.total).fill(0);
|
|
266
|
-
|
|
267
|
-
// Each index in the array should represent the position in the DOM.
|
|
268
|
-
this._computePositions(0);
|
|
269
|
-
|
|
270
|
-
// Render after refreshing. Force render if we're calling refresh manually.
|
|
271
|
-
this._renderChunk(this._lastRepaint !== null);
|
|
272
|
-
|
|
273
|
-
if (typeof config.afterRender === 'function') {
|
|
274
|
-
config.afterRender();
|
|
275
|
-
}
|
|
276
196
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
var top = this._itemPositions[i] + this._scrollPaddingTop;
|
|
304
|
-
|
|
305
|
-
HyperList.mergeStyle(item, _defineProperty({
|
|
306
|
-
position: 'absolute'
|
|
307
|
-
}, config.horizontal ? 'left' : 'top', top + 'px'));
|
|
308
|
-
|
|
309
|
-
return item;
|
|
197
|
+
_getRow(i) {
|
|
198
|
+
const config = this._config;
|
|
199
|
+
let item = config.generate(i);
|
|
200
|
+
let height = item.height;
|
|
201
|
+
if (height !== undefined && isNumber(height)) {
|
|
202
|
+
item = item.element;
|
|
203
|
+
// The height isn't the same as predicted, compute positions again
|
|
204
|
+
if (height !== this._itemHeights[i]) {
|
|
205
|
+
this._itemHeights[i] = height;
|
|
206
|
+
this._computePositions(i);
|
|
207
|
+
this._scrollHeight = this._computeScrollHeight();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
height = this._itemHeights[i];
|
|
212
|
+
}
|
|
213
|
+
if (!item || item.nodeType !== 1) {
|
|
214
|
+
throw new Error(`Generator did not return a DOM Node for index: ${i}`);
|
|
215
|
+
}
|
|
216
|
+
addClass(item, config.rowClassName || 'vrow');
|
|
217
|
+
const top = this._itemPositions[i] + this._scrollPaddingTop;
|
|
218
|
+
VirtualList.mergeStyle(item, {
|
|
219
|
+
position: 'absolute',
|
|
220
|
+
[config.horizontal ? 'left' : 'top']: `${top}px`,
|
|
221
|
+
});
|
|
222
|
+
return item;
|
|
310
223
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
return config.overrideScrollPosition();
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
return this._element[config.horizontal ? 'scrollLeft' : 'scrollTop'];
|
|
224
|
+
_getScrollPosition() {
|
|
225
|
+
const config = this._config;
|
|
226
|
+
if (typeof config.overrideScrollPosition === 'function') {
|
|
227
|
+
return config.overrideScrollPosition();
|
|
228
|
+
}
|
|
229
|
+
return this._element[config.horizontal ? 'scrollLeft' : 'scrollTop'];
|
|
321
230
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
for (var i = from; i < to; i++) {
|
|
362
|
-
var row = this._getRow(i);
|
|
363
|
-
|
|
364
|
-
fragment[config.useFragment ? 'appendChild' : 'push'](row);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (config.applyPatch) {
|
|
368
|
-
return config.applyPatch(element, fragment);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
element.innerHTML = '';
|
|
372
|
-
element.appendChild(fragment);
|
|
231
|
+
_renderChunk(force = false) {
|
|
232
|
+
const config = this._config;
|
|
233
|
+
const element = this._element;
|
|
234
|
+
const scrollTop = this._getScrollPosition();
|
|
235
|
+
const total = config.total;
|
|
236
|
+
let from = this._getFrom(scrollTop) - 1;
|
|
237
|
+
if (from < 0 || from - this._screenItemsLen < 0) {
|
|
238
|
+
from = 0;
|
|
239
|
+
}
|
|
240
|
+
if (!force && this._lastFrom === from) {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
this._lastFrom = from;
|
|
244
|
+
let to = from + this._cachedItemsLen;
|
|
245
|
+
if (to > total || to + this._cachedItemsLen > total) {
|
|
246
|
+
to = total;
|
|
247
|
+
}
|
|
248
|
+
// Append all the new rows in a document fragment that we will later append
|
|
249
|
+
// to the parent node
|
|
250
|
+
const fragment = config.useFragment
|
|
251
|
+
? document.createDocumentFragment()
|
|
252
|
+
: [
|
|
253
|
+
// Sometimes you'll pass fake elements to this tool and Fragments require
|
|
254
|
+
// real elements.
|
|
255
|
+
];
|
|
256
|
+
// The element that forces the container to scroll.
|
|
257
|
+
const scroller = this._scroller;
|
|
258
|
+
// Keep the scroller in the list of children.
|
|
259
|
+
fragment[config.useFragment ? 'appendChild' : 'push'](scroller);
|
|
260
|
+
for (let i = from; i < to; i++) {
|
|
261
|
+
let row = this._getRow(i);
|
|
262
|
+
fragment[config.useFragment ? 'appendChild' : 'push'](row);
|
|
263
|
+
}
|
|
264
|
+
if (config.applyPatch) {
|
|
265
|
+
return config.applyPatch(element, fragment);
|
|
266
|
+
}
|
|
267
|
+
element.innerHTML = '';
|
|
268
|
+
element.appendChild(fragment);
|
|
373
269
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
from = 1;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
for (var i = from; i < total; i++) {
|
|
388
|
-
if (reverse) {
|
|
389
|
-
if (i === 0) {
|
|
390
|
-
this._itemPositions[0] = this._scrollHeight - this._itemHeights[0];
|
|
391
|
-
} else {
|
|
392
|
-
this._itemPositions[i] = this._itemPositions[i - 1] - this._itemHeights[i];
|
|
393
|
-
}
|
|
394
|
-
} else {
|
|
395
|
-
this._itemPositions[i] = this._itemHeights[i - 1] + this._itemPositions[i - 1];
|
|
396
|
-
}
|
|
397
|
-
}
|
|
270
|
+
_computePositions(from = 1) {
|
|
271
|
+
const config = this._config;
|
|
272
|
+
const total = config.total;
|
|
273
|
+
if (from < 1) {
|
|
274
|
+
from = 1;
|
|
275
|
+
}
|
|
276
|
+
for (let i = from; i < total; i++) {
|
|
277
|
+
this._itemPositions[i] =
|
|
278
|
+
this._itemHeights[i - 1] + this._itemPositions[i - 1];
|
|
279
|
+
}
|
|
398
280
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
HyperList.mergeStyle(this._scroller, (_HyperList$mergeStyle2 = {
|
|
413
|
-
opacity: 0,
|
|
414
|
-
position: 'absolute',
|
|
415
|
-
top: '0px'
|
|
416
|
-
}, _defineProperty(_HyperList$mergeStyle2, isHoriz ? 'height' : 'width', '1px'), _defineProperty(_HyperList$mergeStyle2, isHoriz ? 'width' : 'height', scrollHeight + 'px'), _HyperList$mergeStyle2));
|
|
417
|
-
|
|
418
|
-
// Calculate the height median
|
|
419
|
-
var sortedItemHeights = this._itemHeights.slice(0).sort(function (a, b) {
|
|
420
|
-
return a - b;
|
|
421
|
-
});
|
|
422
|
-
var middle = Math.floor(total / 2);
|
|
423
|
-
var averageHeight = total % 2 === 0 ? (sortedItemHeights[middle] + sortedItemHeights[middle - 1]) / 2 : sortedItemHeights[middle];
|
|
424
|
-
|
|
425
|
-
var clientProp = isHoriz ? 'clientWidth' : 'clientHeight';
|
|
426
|
-
var element = config.scrollContainer ? config.scrollContainer : this._element;
|
|
427
|
-
var containerHeight = element[clientProp] ? element[clientProp] : this._containerSize;
|
|
428
|
-
this._screenItemsLen = Math.ceil(containerHeight / averageHeight);
|
|
429
|
-
this._containerSize = containerHeight;
|
|
430
|
-
|
|
431
|
-
// Cache 3 times the number of items that fit in the container viewport.
|
|
432
|
-
this._cachedItemsLen = Math.max(this._cachedItemsLen || 0, this._screenItemsLen * 3);
|
|
433
|
-
this._averageHeight = averageHeight;
|
|
434
|
-
|
|
435
|
-
if (config.reverse) {
|
|
436
|
-
window.requestAnimationFrame(function () {
|
|
437
|
-
if (isHoriz) {
|
|
438
|
-
_this2._element.scrollLeft = scrollHeight;
|
|
439
|
-
} else {
|
|
440
|
-
_this2._element.scrollTop = scrollHeight;
|
|
441
|
-
}
|
|
281
|
+
_computeScrollHeight() {
|
|
282
|
+
const config = this._config;
|
|
283
|
+
const isHorizontal = Boolean(config.horizontal);
|
|
284
|
+
const total = config.total;
|
|
285
|
+
const scrollHeight = this._itemHeights.reduce((a, b) => a + b, 0) +
|
|
286
|
+
this._scrollPaddingBottom +
|
|
287
|
+
this._scrollPaddingTop;
|
|
288
|
+
VirtualList.mergeStyle(this._scroller, {
|
|
289
|
+
opacity: 0,
|
|
290
|
+
position: 'absolute',
|
|
291
|
+
top: '0px',
|
|
292
|
+
[isHorizontal ? 'height' : 'width']: '1px',
|
|
293
|
+
[isHorizontal ? 'width' : 'height']: `${scrollHeight}px`,
|
|
442
294
|
});
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
295
|
+
// Calculate the height median
|
|
296
|
+
const sortedItemHeights = this._itemHeights.slice(0).sort((a, b) => a - b);
|
|
297
|
+
const middle = Math.floor(total / 2);
|
|
298
|
+
const averageHeight = total % 2 === 0
|
|
299
|
+
? (sortedItemHeights[middle] + sortedItemHeights[middle - 1]) / 2
|
|
300
|
+
: sortedItemHeights[middle];
|
|
301
|
+
const clientProp = isHorizontal ? 'clientWidth' : 'clientHeight';
|
|
302
|
+
const element = config.scrollContainer
|
|
303
|
+
? config.scrollContainer
|
|
304
|
+
: this._element;
|
|
305
|
+
const containerHeight = element[clientProp]
|
|
306
|
+
? element[clientProp]
|
|
307
|
+
: this._containerSize;
|
|
308
|
+
this._screenItemsLen = Math.ceil(containerHeight / averageHeight);
|
|
309
|
+
this._containerSize = containerHeight;
|
|
310
|
+
// Cache 3 times the number of items that fit in the container viewport.
|
|
311
|
+
this._cachedItemsLen = Math.max(this._cachedItemsLen || 0, this._screenItemsLen * 3);
|
|
312
|
+
this._averageHeight = averageHeight;
|
|
313
|
+
return scrollHeight;
|
|
446
314
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var padding = function padding(location) {
|
|
456
|
-
var cssValue = styles.getPropertyValue('padding-' + location);
|
|
457
|
-
return parseInt(cssValue, 10) || 0;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
if (isHoriz && isReverse) {
|
|
461
|
-
return {
|
|
462
|
-
bottom: padding('left'),
|
|
463
|
-
top: padding('right')
|
|
464
|
-
};
|
|
465
|
-
} else if (isHoriz) {
|
|
466
|
-
return {
|
|
467
|
-
bottom: padding('right'),
|
|
468
|
-
top: padding('left')
|
|
469
|
-
};
|
|
470
|
-
} else if (isReverse) {
|
|
471
|
-
return {
|
|
472
|
-
bottom: padding('top'),
|
|
473
|
-
top: padding('bottom')
|
|
315
|
+
_computeScrollPadding() {
|
|
316
|
+
const config = this._config;
|
|
317
|
+
const isHoriz = Boolean(config.horizontal);
|
|
318
|
+
const styles = window.getComputedStyle(this._element);
|
|
319
|
+
const padding = (location) => {
|
|
320
|
+
const cssValue = styles.getPropertyValue(`padding-${location}`);
|
|
321
|
+
return parseInt(cssValue, 10) || 0;
|
|
474
322
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
while (this._itemPositions[i] < scrollTop) {
|
|
488
|
-
i++;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
return i;
|
|
323
|
+
if (isHoriz) {
|
|
324
|
+
return {
|
|
325
|
+
bottom: padding('right'),
|
|
326
|
+
top: padding('left'),
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
return {
|
|
331
|
+
bottom: padding('bottom'),
|
|
332
|
+
top: padding('top'),
|
|
333
|
+
};
|
|
334
|
+
}
|
|
492
335
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
i--;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
return i;
|
|
336
|
+
_getFrom(scrollTop) {
|
|
337
|
+
let i = 0;
|
|
338
|
+
while (this._itemPositions[i] < scrollTop) {
|
|
339
|
+
i++;
|
|
340
|
+
}
|
|
341
|
+
return i;
|
|
503
342
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
exports.default = HyperList;
|
|
510
|
-
module.exports = exports['default'];
|
|
511
|
-
|
|
512
|
-
},{}]},{},[1])(1)
|
|
513
|
-
});
|
|
514
|
-
}(hyperlist));
|
|
515
|
-
|
|
516
|
-
const Hyperlist = /*@__PURE__*/getDefaultExportFromCjs(hyperlist.exports);
|
|
343
|
+
}
|
|
344
|
+
VirtualList.defaultConfig = {
|
|
345
|
+
width: '100%',
|
|
346
|
+
height: '100%',
|
|
347
|
+
};
|
|
517
348
|
|
|
518
349
|
const treeCss = ":host{display:block}";
|
|
519
350
|
const IxTreeStyle0 = treeCss;
|
|
@@ -556,6 +387,8 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class Tree extends HTMLElement {
|
|
|
556
387
|
}
|
|
557
388
|
};
|
|
558
389
|
return {
|
|
390
|
+
width: '100%',
|
|
391
|
+
height: '100%',
|
|
559
392
|
itemHeight: 32,
|
|
560
393
|
total: list.length,
|
|
561
394
|
generate: (index) => {
|
|
@@ -692,6 +525,7 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class Tree extends HTMLElement {
|
|
|
692
525
|
}
|
|
693
526
|
isListInitialized() {
|
|
694
527
|
var _a;
|
|
528
|
+
//@ts-ignore
|
|
695
529
|
const itemPositions = (_a = this.hyperlist) === null || _a === void 0 ? void 0 : _a._itemPositions;
|
|
696
530
|
return (itemPositions !== undefined &&
|
|
697
531
|
itemPositions.length &&
|
|
@@ -709,10 +543,10 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class Tree extends HTMLElement {
|
|
|
709
543
|
}
|
|
710
544
|
(_a = this.hyperlist) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
711
545
|
const config = this.getVirtualizerOptions();
|
|
712
|
-
this.hyperlist = new
|
|
546
|
+
this.hyperlist = new VirtualList(this.hostElement, config);
|
|
713
547
|
}
|
|
714
548
|
render() {
|
|
715
|
-
return (h(Host, { key: '
|
|
549
|
+
return (h(Host, { key: '23855bc97fd2eceb9af149d6b39e32ccb930b1d9' }, h("slot", { key: '1fe905f3ded4b94af84d2e827f6056914c14fc45' })));
|
|
716
550
|
}
|
|
717
551
|
get hostElement() { return this; }
|
|
718
552
|
static get watchers() { return {
|