@siemens/ix 1.2.1 → 1.3.0-beta.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/dist/cjs/alignment-24ae2e63.js +1372 -0
- package/dist/cjs/{index-354a8c3d.js → index-17eb8998.js} +4 -3
- package/dist/cjs/index.cjs.js +5 -2
- package/dist/cjs/ix-animated-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-application-header.cjs.entry.js +1 -1
- package/dist/cjs/ix-basic-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +1 -1
- package/dist/cjs/ix-breadcrumb_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js +5 -3
- package/dist/cjs/ix-category-filter.cjs.entry.js +9 -9
- package/dist/cjs/ix-chip.cjs.entry.js +22 -9
- package/dist/cjs/ix-counter-pill.cjs.entry.js +2 -2
- package/dist/cjs/ix-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-date-time-card.cjs.entry.js +1 -1
- package/dist/cjs/ix-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-button.cjs.entry.js +40 -0
- package/dist/cjs/ix-dropdown_2.cjs.entry.js +88 -42
- package/dist/cjs/ix-event-list_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-expanding-search.cjs.entry.js +3 -3
- package/dist/cjs/ix-filter-chip.cjs.entry.js +1 -1
- package/dist/cjs/ix-flip-tile_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-group-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ix-group_3.cjs.entry.js +1 -1
- package/dist/cjs/ix-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/ix-icon.cjs.entry.js +1 -1
- package/dist/cjs/ix-input-group.cjs.entry.js +1 -1
- package/dist/cjs/ix-kpi.cjs.entry.js +1 -1
- package/dist/cjs/ix-map-navigation_2.cjs.entry.js +5 -4
- package/dist/cjs/ix-menu_9.cjs.entry.js +14 -95
- package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal-example.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-pill.cjs.entry.js +6 -3
- package/dist/cjs/ix-select_2.cjs.entry.js +36 -15
- package/dist/cjs/ix-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ix-split-button_2.cjs.entry.js +7 -36
- package/dist/cjs/ix-tab-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ix-tile.cjs.entry.js +1 -1
- package/dist/cjs/ix-toast_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ix-tree_2.cjs.entry.js +24 -5
- package/dist/cjs/ix-upload.cjs.entry.js +1 -1
- package/dist/cjs/ix-validation-tooltip.cjs.entry.js +72 -27
- package/dist/cjs/ix-workflow-step_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{modal-a5b22d3f.js → modal-dda2f6be.js} +9 -3
- package/dist/cjs/my-component.cjs.entry.js +2 -2
- package/dist/cjs/siemens-ix.cjs.js +2 -2
- package/dist/cjs/theme-switcher-f91c8d8d.js +92 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +4 -2
- package/dist/collection/components/category-filter/category-filter.css +4 -4
- package/dist/collection/components/category-filter/category-filter.js +7 -7
- package/dist/collection/components/chip/chip.css +20 -0
- package/dist/collection/components/chip/chip.js +22 -9
- package/dist/collection/components/counter-pill/counter-pill.css +10 -0
- package/dist/collection/components/dropdown/alignment.js +9 -0
- package/dist/collection/components/dropdown/dropdown.css +1 -0
- package/dist/collection/components/dropdown/dropdown.js +113 -50
- package/dist/collection/components/dropdown/placement.js +1 -0
- package/dist/collection/components/dropdown-button/dropdown-button.css +81 -0
- package/dist/collection/components/dropdown-button/dropdown-button.js +191 -0
- package/dist/collection/components/expanding-search/expanding-search.css +1 -0
- package/dist/collection/components/expanding-search/expanding-search.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +3 -30
- package/dist/collection/components/icon-button/icon-button.js +2 -2
- package/dist/collection/components/map-navigation/map-navigation.js +3 -2
- package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +9 -4
- package/dist/collection/components/menu/menu.css +5 -1
- package/dist/collection/components/menu/menu.js +6 -21
- package/dist/collection/components/menu-avatar/menu-avatar.js +4 -30
- package/dist/collection/components/modal/modal.css +1 -0
- package/dist/collection/components/modal/modal.js +7 -1
- package/dist/collection/components/my-component/my-component.css +0 -8
- package/dist/collection/components/pill/pill.css +10 -0
- package/dist/collection/components/pill/pill.js +4 -1
- package/dist/collection/components/select/select.css +0 -3
- package/dist/collection/components/select/select.js +13 -12
- package/dist/collection/components/select-item/events.js +16 -0
- package/dist/collection/components/select-item/select-item.js +23 -4
- package/dist/collection/components/split-button/split-button.js +7 -36
- package/dist/collection/components/tree/tree.js +24 -5
- package/dist/collection/components/utils/theme-switcher.js +86 -0
- package/dist/collection/components/validation-tooltip/validation-tooltip.css +4 -24
- package/dist/collection/components/validation-tooltip/validation-tooltip.js +75 -28
- package/dist/collection/exports.js +1 -0
- package/dist/components/alignment.js +1363 -0
- package/dist/components/button.js +5 -3
- package/dist/components/dropdown.js +88 -41
- package/dist/components/icon-button.js +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -1
- package/dist/components/ix-category-filter.js +18 -12
- package/dist/components/ix-chip.js +21 -8
- package/dist/components/ix-counter-pill.js +1 -1
- package/dist/components/ix-dropdown-button.d.ts +11 -0
- package/dist/components/ix-dropdown-button.js +86 -0
- package/dist/components/ix-expanding-search.js +2 -2
- package/dist/components/ix-map-navigation.js +3 -2
- package/dist/components/ix-menu-avatar.js +6 -19
- package/dist/components/ix-menu.js +93 -46
- package/dist/components/ix-pill.js +5 -2
- package/dist/components/ix-select.js +9 -14
- package/dist/components/ix-split-button.js +6 -35
- package/dist/components/ix-tree.js +23 -4
- package/dist/components/ix-validation-tooltip.js +74 -27
- package/dist/components/map-navigation-overlay.js +1 -1
- package/dist/components/modal.js +8 -2
- package/dist/components/my-component.js +1 -1
- package/dist/components/select-item.js +27 -1
- package/dist/esm/alignment-f63c1b89.js +1363 -0
- package/dist/esm/{index-7746a810.js → index-6f4f3582.js} +5 -3
- package/dist/esm/index.js +3 -2
- package/dist/esm/ix-animated-tab_2.entry.js +1 -1
- package/dist/esm/ix-application-header.entry.js +1 -1
- package/dist/esm/ix-basic-navigation.entry.js +1 -1
- package/dist/esm/ix-blind.entry.js +1 -1
- package/dist/esm/ix-breadcrumb_2.entry.js +1 -1
- package/dist/esm/ix-button.entry.js +5 -3
- package/dist/esm/ix-category-filter.entry.js +9 -9
- package/dist/esm/ix-chip.entry.js +22 -9
- package/dist/esm/ix-counter-pill.entry.js +2 -2
- package/dist/esm/ix-date-picker_2.entry.js +1 -1
- package/dist/esm/ix-date-time-card.entry.js +1 -1
- package/dist/esm/ix-datetime-picker.entry.js +1 -1
- package/dist/esm/ix-drawer.entry.js +1 -1
- package/dist/esm/ix-dropdown-button.entry.js +36 -0
- package/dist/esm/ix-dropdown_2.entry.js +88 -42
- package/dist/esm/ix-event-list_2.entry.js +1 -1
- package/dist/esm/ix-expanding-search.entry.js +3 -3
- package/dist/esm/ix-filter-chip.entry.js +1 -1
- package/dist/esm/ix-flip-tile_2.entry.js +1 -1
- package/dist/esm/ix-group-context-menu.entry.js +1 -1
- package/dist/esm/ix-group_3.entry.js +1 -1
- package/dist/esm/ix-icon-button.entry.js +3 -3
- package/dist/esm/ix-icon.entry.js +1 -1
- package/dist/esm/ix-input-group.entry.js +1 -1
- package/dist/esm/ix-kpi.entry.js +1 -1
- package/dist/esm/ix-map-navigation_2.entry.js +5 -4
- package/dist/esm/ix-menu_9.entry.js +14 -95
- package/dist/esm/ix-message-bar.entry.js +1 -1
- package/dist/esm/ix-modal-example.entry.js +1 -1
- package/dist/esm/ix-modal_2.entry.js +2 -2
- package/dist/esm/ix-pill.entry.js +6 -3
- package/dist/esm/ix-select_2.entry.js +36 -15
- package/dist/esm/ix-spinner.entry.js +1 -1
- package/dist/esm/ix-split-button_2.entry.js +7 -36
- package/dist/esm/ix-tab-item.entry.js +1 -1
- package/dist/esm/ix-tabs.entry.js +1 -1
- package/dist/esm/ix-tile.entry.js +1 -1
- package/dist/esm/ix-toast_2.entry.js +1 -1
- package/dist/esm/ix-toggle.entry.js +1 -1
- package/dist/esm/ix-tree_2.entry.js +24 -5
- package/dist/esm/ix-upload.entry.js +1 -1
- package/dist/esm/ix-validation-tooltip.entry.js +72 -27
- package/dist/esm/ix-workflow-step_2.entry.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{modal-9c9eaf8e.js → modal-df0a62f2.js} +9 -3
- package/dist/esm/my-component.entry.js +2 -2
- package/dist/esm/siemens-ix.js +2 -2
- package/dist/esm/theme-switcher-9ecc9b69.js +89 -0
- package/dist/siemens-ix/index.esm.js +1 -1
- package/dist/siemens-ix/p-03d38416.entry.js +1 -0
- package/dist/siemens-ix/{p-5e4c3828.js → p-05c16b94.js} +2 -2
- package/dist/siemens-ix/p-0e357d27.entry.js +1 -0
- package/dist/siemens-ix/{p-963c5690.entry.js → p-150d7a02.entry.js} +1 -1
- package/dist/siemens-ix/p-18d02e6f.entry.js +1 -0
- package/dist/siemens-ix/{p-5871e480.entry.js → p-218de283.entry.js} +1 -1
- package/dist/siemens-ix/{p-b2ecf415.entry.js → p-23d79e3d.entry.js} +1 -1
- package/dist/siemens-ix/{p-91eb1fdd.entry.js → p-2bc72119.entry.js} +1 -1
- package/dist/siemens-ix/p-2bd88760.entry.js +1 -0
- package/dist/siemens-ix/p-2c5abec1.js +1 -0
- package/dist/siemens-ix/{p-dfb5730f.entry.js → p-2e24ae23.entry.js} +1 -1
- package/dist/siemens-ix/{p-4d61503b.entry.js → p-33283dbf.entry.js} +1 -1
- package/dist/siemens-ix/{p-6e915c70.entry.js → p-3663f989.entry.js} +1 -1
- package/dist/siemens-ix/{p-2f3294b8.entry.js → p-418e2d14.entry.js} +1 -1
- package/dist/siemens-ix/p-43616759.entry.js +1 -0
- package/dist/siemens-ix/{p-03687070.entry.js → p-4b170382.entry.js} +1 -1
- package/dist/siemens-ix/p-4fcb5f2b.entry.js +1 -0
- package/dist/siemens-ix/p-5631ae88.entry.js +1 -0
- package/dist/siemens-ix/{p-56771b32.entry.js → p-592f1ed3.entry.js} +1 -1
- package/dist/siemens-ix/p-5bbe9943.entry.js +1 -0
- package/dist/siemens-ix/{p-05f3c48e.entry.js → p-65e61684.entry.js} +1 -1
- package/dist/siemens-ix/p-67eb9d59.entry.js +1 -0
- package/dist/siemens-ix/p-6fe3bb9c.entry.js +1 -0
- package/dist/siemens-ix/{p-5e3700c3.entry.js → p-72f851ae.entry.js} +1 -1
- package/dist/siemens-ix/{p-e5397173.entry.js → p-7f842cdc.entry.js} +1 -1
- package/dist/siemens-ix/{p-412dbb89.entry.js → p-8a7141a6.entry.js} +1 -1
- package/dist/siemens-ix/{p-10879145.entry.js → p-8b4e4718.entry.js} +1 -1
- package/dist/siemens-ix/{p-ded3a35d.entry.js → p-9b5290d4.entry.js} +1 -1
- package/dist/siemens-ix/{p-c885685e.entry.js → p-a5fa7ae5.entry.js} +1 -1
- package/dist/siemens-ix/p-a6f4cfc6.entry.js +1 -0
- package/dist/siemens-ix/{p-61cb7ab7.entry.js → p-a88618e3.entry.js} +1 -1
- package/dist/siemens-ix/p-ab7949ff.entry.js +1 -0
- package/dist/siemens-ix/{p-23578bb6.entry.js → p-b242bd39.entry.js} +1 -1
- package/dist/siemens-ix/p-b3d00feb.entry.js +1 -0
- package/dist/siemens-ix/{p-19cc942a.entry.js → p-c3e90c06.entry.js} +1 -1
- package/dist/siemens-ix/{p-558623ce.entry.js → p-c993560f.entry.js} +1 -1
- package/dist/siemens-ix/{p-35d7f18d.entry.js → p-cc0f6f6b.entry.js} +1 -1
- package/dist/siemens-ix/{p-f24f1eb7.entry.js → p-d0bb8225.entry.js} +1 -1
- package/dist/siemens-ix/p-d20119c1.entry.js +1 -0
- package/dist/siemens-ix/p-dec6114f.js +1 -0
- package/dist/siemens-ix/{p-91ecd6ac.entry.js → p-e2925222.entry.js} +1 -1
- package/dist/siemens-ix/{p-1ba8c910.entry.js → p-e7621b0a.entry.js} +1 -1
- package/dist/siemens-ix/{p-494512c0.entry.js → p-ea333007.entry.js} +1 -1
- package/dist/siemens-ix/{p-8f6809f1.entry.js → p-eb150313.entry.js} +1 -1
- package/dist/siemens-ix/{p-b0c95c22.entry.js → p-eed28e55.entry.js} +1 -1
- package/dist/siemens-ix/p-f6e713f3.js +1 -0
- package/dist/siemens-ix/{p-2995294d.entry.js → p-f7be9635.entry.js} +1 -1
- package/dist/siemens-ix/{p-712e8945.entry.js → p-fecf0ade.entry.js} +1 -1
- package/dist/siemens-ix/siemens-ix.css +25 -3
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/category-filter/category-filter.d.ts +1 -0
- package/dist/types/components/chip/chip.d.ts +2 -1
- package/dist/types/components/dropdown/alignment.d.ts +2 -0
- package/dist/types/components/dropdown/dropdown.d.ts +19 -6
- package/dist/types/components/dropdown/placement.d.ts +8 -0
- package/dist/types/components/dropdown-button/dropdown-button.d.ts +37 -0
- package/dist/types/components/menu/menu.d.ts +0 -2
- package/dist/types/components/menu-avatar/menu-avatar.d.ts +1 -5
- package/dist/types/components/modal/modal.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +2 -1
- package/dist/types/components/select-item/events.d.ts +9 -0
- package/dist/types/components/select-item/select-item.d.ts +3 -2
- package/dist/types/components/split-button/split-button.d.ts +4 -6
- package/dist/types/components/tree/tree.d.ts +3 -1
- package/dist/types/components/utils/theme-switcher.d.ts +19 -0
- package/dist/types/components/validation-tooltip/validation-tooltip.d.ts +12 -4
- package/dist/types/components.d.ts +86 -15
- package/dist/types/exports.d.ts +1 -0
- package/package.json +5 -6
- package/scss/components/_buttons.scss +23 -0
- package/scss/components/_dropdown.scss +2 -0
- package/dist/cjs/popper-d7a0f999.js +0 -1801
- package/dist/collection/components/utils/popover.util.js +0 -33
- package/dist/collection/components/utils/toggle-theme.js +0 -24
- package/dist/components/popover.util.js +0 -36
- package/dist/components/popper.js +0 -1799
- package/dist/esm/popper-42db9fbd.js +0 -1799
- package/dist/siemens-ix/p-080c00b1.entry.js +0 -1
- package/dist/siemens-ix/p-263949b1.js +0 -1
- package/dist/siemens-ix/p-2709fafd.entry.js +0 -1
- package/dist/siemens-ix/p-2b69b027.entry.js +0 -1
- package/dist/siemens-ix/p-6da1e24d.entry.js +0 -1
- package/dist/siemens-ix/p-7b103473.entry.js +0 -1
- package/dist/siemens-ix/p-80d27c08.entry.js +0 -1
- package/dist/siemens-ix/p-842a7652.entry.js +0 -1
- package/dist/siemens-ix/p-9a98369e.entry.js +0 -1
- package/dist/siemens-ix/p-af8213cc.entry.js +0 -1
- package/dist/siemens-ix/p-aff5f463.entry.js +0 -1
- package/dist/siemens-ix/p-bf387a1f.entry.js +0 -1
- package/dist/siemens-ix/p-f3996fc1.entry.js +0 -1
- package/dist/siemens-ix/p-f86fcdf4.js +0 -1
- package/dist/siemens-ix/p-fe28a2be.entry.js +0 -1
- package/dist/types/components/utils/popover.util.d.ts +0 -9
- package/dist/types/components/utils/toggle-theme.d.ts +0 -1
- package/src/components/animated-tab/readme.md +0 -24
- package/src/components/animated-tabs/readme.md +0 -31
- package/src/components/application-header/readme.md +0 -21
- package/src/components/basic-navigation/readme.md +0 -22
- package/src/components/blind/readme.md +0 -29
- package/src/components/breadcrumb/readme.md +0 -33
- package/src/components/breadcrumb-item/readme.md +0 -22
- package/src/components/button/readme.md +0 -27
- package/src/components/category-filter/readme.md +0 -39
- package/src/components/chip/readme.md +0 -36
- package/src/components/counter-pill/readme.md +0 -25
- package/src/components/date-picker/readme.md +0 -53
- package/src/components/date-time-card/readme.md +0 -22
- package/src/components/datetime-picker/readme.md +0 -45
- package/src/components/drawer/readme.md +0 -47
- package/src/components/dropdown/readme.md +0 -49
- package/src/components/dropdown-item/readme.md +0 -45
- package/src/components/event-list/readme.md +0 -24
- package/src/components/event-list-item/readme.md +0 -32
- package/src/components/expanding-search/readme.md +0 -32
- package/src/components/filter-chip/readme.md +0 -30
- package/src/components/flip-tile/readme.md +0 -22
- package/src/components/flip-tile-content/readme.md +0 -14
- package/src/components/group/readme.md +0 -14
- package/src/components/group-dropdown-item/readme.md +0 -22
- package/src/components/group-item/readme.md +0 -34
- package/src/components/icon/readme.md +0 -23
- package/src/components/icon-button/readme.md +0 -31
- package/src/components/input-group/readme.md +0 -14
- package/src/components/kpi/readme.md +0 -27
- package/src/components/map-navigation/readme.md +0 -54
- package/src/components/map-navigation-overlay/readme.md +0 -30
- package/src/components/menu/readme.md +0 -86
- package/src/components/menu-about/readme.md +0 -30
- package/src/components/menu-about-item/readme.md +0 -21
- package/src/components/menu-about-news/readme.md +0 -34
- package/src/components/menu-avatar/readme.md +0 -30
- package/src/components/menu-avatar-item/readme.md +0 -29
- package/src/components/menu-item/readme.md +0 -26
- package/src/components/menu-settings/readme.md +0 -30
- package/src/components/menu-settings-item/readme.md +0 -21
- package/src/components/message-bar/readme.md +0 -31
- package/src/components/modal/readme.md +0 -67
- package/src/components/modal-container/readme.md +0 -29
- package/src/components/my-component/readme.md +0 -16
- package/src/components/pill/readme.md +0 -26
- package/src/components/select/readme.md +0 -37
- package/src/components/select-item/readme.md +0 -44
- package/src/components/spinner/readme.md +0 -22
- package/src/components/split-button/readme.md +0 -36
- package/src/components/split-button-item/readme.md +0 -29
- package/src/components/tab-item/readme.md +0 -28
- package/src/components/tabs/readme.md +0 -25
- package/src/components/tile/readme.md +0 -21
- package/src/components/time-picker/readme.md +0 -51
- package/src/components/toast/readme.md +0 -36
- package/src/components/toggle/readme.md +0 -35
- package/src/components/tree/readme.md +0 -32
- package/src/components/tree-item/readme.md +0 -31
- package/src/components/upload/readme.md +0 -51
- package/src/components/validation-tooltip/readme.md +0 -31
- package/src/components/workflow-step/readme.md +0 -28
- package/src/components/workflow-steps/readme.md +0 -33
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$5 } from './button.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './dropdown.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './icon.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './icon-button.js';
|
|
6
|
+
|
|
7
|
+
const dropdownButtonCss = ".sc-ix-dropdown-button-h{display:inline-block;position:relative;height:2rem}.sc-ix-dropdown-button-h .dropdown-button.sc-ix-dropdown-button{position:relative}.sc-ix-dropdown-button-h .hide.sc-ix-dropdown-button{display:none}.sc-ix-dropdown-button-h .triangle.sc-ix-dropdown-button{position:absolute;-webkit-margin-start:1.5625rem;margin-inline-start:1.5625rem;-webkit-margin-before:-0.4375rem;margin-block-start:-0.4375rem;border-right:0 solid transparent;border-left:4px solid transparent;border-top:0 solid transparent;border-bottom:4px solid;color:var(--theme-btn-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color)}.sc-ix-dropdown-button-h .triangle.primary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.primary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-primary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.outline.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color)}.sc-ix-dropdown-button-h .triangle.secondary.ghost.disabled.sc-ix-dropdown-button{color:var(--theme-btn-invisible-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.outline.disabled.sc-ix-dropdown-button{color:var(--theme-btn-outline-secondary--color--disabled)}.sc-ix-dropdown-button-h .triangle.secondary.disabled.sc-ix-dropdown-button{color:var(--theme-btn-secondary--color--disabled)}.sc-ix-dropdown-button-h .hide.sc-ix-dropdown-button{display:none}.sc-ix-dropdown-button-h .dropdown.sc-ix-dropdown-button{width:auto !important;inset:auto !important;transform:unset !important}";
|
|
8
|
+
|
|
9
|
+
const DropdownButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.variant = 'Primary';
|
|
14
|
+
this.outline = false;
|
|
15
|
+
this.ghost = false;
|
|
16
|
+
this.active = false;
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
this.label = '';
|
|
19
|
+
this.icon = undefined;
|
|
20
|
+
this.dropdownAnchor = undefined;
|
|
21
|
+
}
|
|
22
|
+
getTriangle() {
|
|
23
|
+
return (h("div", { class: {
|
|
24
|
+
triangle: true,
|
|
25
|
+
hide: this.label !== '',
|
|
26
|
+
primary: this.variant === 'Primary',
|
|
27
|
+
secondary: this.variant === 'Secondary',
|
|
28
|
+
ghost: this.ghost,
|
|
29
|
+
outline: this.outline,
|
|
30
|
+
disabled: this.disabled,
|
|
31
|
+
} }));
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (h(Host, null, h("div", { class: "dropdown-button", ref: (ref) => {
|
|
35
|
+
this.dropdownAnchor = ref;
|
|
36
|
+
} }, h("ix-button", { variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled, class: { hide: this.label === '' } }, h("ix-icon", { name: this.icon, size: "24", class: { hide: this.icon === '' || this.icon === undefined } }), this.label, h("ix-icon", { name: "chevron-down-small", size: "24" })), h("ix-icon-button", { icon: this.icon, variant: this.variant, outline: this.outline, ghost: this.ghost, disabled: this.disabled, class: { hide: this.label !== '' } }), this.getTriangle()), h("ix-dropdown", { class: "dropdown", trigger: this.dropdownAnchor, placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, h("slot", null))));
|
|
37
|
+
}
|
|
38
|
+
static get style() { return dropdownButtonCss; }
|
|
39
|
+
}, [6, "ix-dropdown-button", {
|
|
40
|
+
"variant": [1],
|
|
41
|
+
"outline": [4],
|
|
42
|
+
"ghost": [4],
|
|
43
|
+
"active": [4],
|
|
44
|
+
"disabled": [4],
|
|
45
|
+
"label": [1],
|
|
46
|
+
"icon": [1],
|
|
47
|
+
"dropdownAnchor": [32]
|
|
48
|
+
}]);
|
|
49
|
+
function defineCustomElement$1() {
|
|
50
|
+
if (typeof customElements === "undefined") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const components = ["ix-dropdown-button", "ix-button", "ix-dropdown", "ix-icon", "ix-icon-button"];
|
|
54
|
+
components.forEach(tagName => { switch (tagName) {
|
|
55
|
+
case "ix-dropdown-button":
|
|
56
|
+
if (!customElements.get(tagName)) {
|
|
57
|
+
customElements.define(tagName, DropdownButton);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case "ix-button":
|
|
61
|
+
if (!customElements.get(tagName)) {
|
|
62
|
+
defineCustomElement$5();
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case "ix-dropdown":
|
|
66
|
+
if (!customElements.get(tagName)) {
|
|
67
|
+
defineCustomElement$4();
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
case "ix-icon":
|
|
71
|
+
if (!customElements.get(tagName)) {
|
|
72
|
+
defineCustomElement$3();
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
case "ix-icon-button":
|
|
76
|
+
if (!customElements.get(tagName)) {
|
|
77
|
+
defineCustomElement$2();
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
} });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const IxDropdownButton = DropdownButton;
|
|
84
|
+
const defineCustomElement = defineCustomElement$1;
|
|
85
|
+
|
|
86
|
+
export { IxDropdownButton, defineCustomElement };
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { d as defineCustomElement$3 } from './icon.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './icon-button.js';
|
|
4
4
|
|
|
5
|
-
const expandingSearchCss = ".sc-ix-expanding-search-h{display:inline-flex;width:auto;height:2rem;align-items:center;justify-content:space-between}.right-position.sc-ix-expanding-search-h{width:11.5625rem !important}.sc-ix-expanding-search-h .input-container.sc-ix-expanding-search{transition:all 0.3s ease-in-out}.sc-ix-expanding-search-h .disable-pointer.sc-ix-expanding-search{pointer-events:none}.sc-ix-expanding-search-h input.sc-ix-expanding-search{box-shadow:var(--theme-input--box-shadow)}.sc-ix-expanding-search-h .expanded.sc-ix-expanding-search{width:11.5625rem}.sc-ix-expanding-search-h .collapsed.sc-ix-expanding-search{width:1.5rem;border:none}.sc-ix-expanding-search-h .btn-search-icon.sc-ix-expanding-search{align-self:center;margin:auto;position:relative}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search{display:flex;max-width:2rem;max-height:2rem;border-radius:var(--theme-input--border-radius);transition:all 0.15s ease-in-out;z-index:1;align-items:center;position:relative;border:none}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):hover{border-color:transparent}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):active{border-color:transparent}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):focus-visible{outline:none}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):focus-visible{outline:var(--focus--border-color);outline-width:1px;outline-style:solid}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:active{width:2rem;height:2rem;border-radius:var(--theme-input--border-radius);border:var(--theme-std-bdr-1) !important}.sc-ix-expanding-search-h .input-container.sc-ix-expanding-search{display:flex;position:absolute;align-items:center;flex-wrap:nowrap}.sc-ix-expanding-search-h .btn-clear.sc-ix-expanding-search{position:absolute;border-radius:var(--theme-input--border-radius);right:0px}.sc-ix-expanding-search-h .input.sc-ix-expanding-search{padding-left:2rem !important;padding-right:2.5rem !important}.sc-ix-expanding-search-h .opacity-before.sc-ix-expanding-search{opacity:0}.sc-ix-expanding-search-h .opacity-after.sc-ix-expanding-search{opacity:1}";
|
|
5
|
+
const expandingSearchCss = ".sc-ix-expanding-search-h{display:inline-flex;width:auto;height:2rem;align-items:center;justify-content:space-between}.right-position.sc-ix-expanding-search-h{width:11.5625rem !important}.sc-ix-expanding-search-h .input-container.sc-ix-expanding-search{transition:all 0.3s ease-in-out}.sc-ix-expanding-search-h .disable-pointer.sc-ix-expanding-search{pointer-events:none}.sc-ix-expanding-search-h input.sc-ix-expanding-search{box-shadow:var(--theme-input--box-shadow)}.sc-ix-expanding-search-h .expanded.sc-ix-expanding-search{width:11.5625rem}.sc-ix-expanding-search-h .collapsed.sc-ix-expanding-search{width:1.5rem;border:none}.sc-ix-expanding-search-h .btn-search-icon.sc-ix-expanding-search{align-self:center;margin:auto;position:relative}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search{display:flex;max-width:2rem;max-height:2rem;border-radius:var(--theme-input--border-radius);transition:all 0.15s ease-in-out;z-index:1;align-items:center;position:relative;border:none}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):hover{border-color:transparent}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):active{border-color:transparent}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):focus-visible{outline:none}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:not(.disabled):not(:disabled):focus-visible{outline:var(--focus--border-color);outline-width:1px;outline-style:solid}.sc-ix-expanding-search-h .btn-search.sc-ix-expanding-search:active{width:2rem;height:2rem;border-radius:var(--theme-input--border-radius);border:var(--theme-std-bdr-1) !important}.sc-ix-expanding-search-h .input-container.sc-ix-expanding-search{display:flex;position:absolute;align-items:center;flex-wrap:nowrap}.sc-ix-expanding-search-h .btn-clear.sc-ix-expanding-search{position:absolute;border-radius:var(--theme-input--border-radius);right:0px;margin-right:0.25rem}.sc-ix-expanding-search-h .input.sc-ix-expanding-search{padding-left:2rem !important;padding-right:2.5rem !important}.sc-ix-expanding-search-h .opacity-before.sc-ix-expanding-search{opacity:0}.sc-ix-expanding-search-h .opacity-after.sc-ix-expanding-search{opacity:1}";
|
|
6
6
|
|
|
7
7
|
const ExpandingSearch = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -74,7 +74,7 @@ const ExpandingSearch = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
74
74
|
}, ref: (el) => (this.textInput = el), "data-testid": "input", placeholder: this.placeholder, type: "text", value: this.value, onBlur: () => {
|
|
75
75
|
this.collapseInput();
|
|
76
76
|
this.hasFocus = false;
|
|
77
|
-
}, onFocus: () => (this.hasFocus = true), onInput: (e) => this.onChange(e), tabindex: this.expanded ? 0 : -1 }), this.isFieldChanged ? (h("ix-icon-button", { class: "btn-clear", icon: "clear", ghost: true, size: "
|
|
77
|
+
}, onFocus: () => (this.hasFocus = true), onInput: (e) => this.onChange(e), tabindex: this.expanded ? 0 : -1 }), this.isFieldChanged ? (h("ix-icon-button", { class: "btn-clear", icon: "clear", ghost: true, size: "16", "data-testid": "clear-button", onClick: () => this.clearClicked() })) : null)));
|
|
78
78
|
}
|
|
79
79
|
static get style() { return expandingSearchCss; }
|
|
80
80
|
}, [2, "ix-expanding-search", {
|
|
@@ -110,9 +110,10 @@ const MapNavigation = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
110
110
|
overlayInstance.setAttribute('color', color);
|
|
111
111
|
overlayInstance.setAttribute('name', name);
|
|
112
112
|
overlayInstance.setAttribute('icon', icon);
|
|
113
|
+
overlayInstance.setAttribute('slot', 'overlay');
|
|
113
114
|
overlayInstance.addEventListener('closeClick', () => this.closeOverlay());
|
|
114
115
|
overlayInstance.appendChild(component);
|
|
115
|
-
this.
|
|
116
|
+
this.hostElement.appendChild(overlayInstance);
|
|
116
117
|
}
|
|
117
118
|
/**
|
|
118
119
|
* Close current shown overlay
|
|
@@ -137,7 +138,7 @@ const MapNavigation = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
137
138
|
});
|
|
138
139
|
}
|
|
139
140
|
render() {
|
|
140
|
-
return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null))))));
|
|
141
|
+
return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null), h("slot", { name: "overlay" }))))));
|
|
141
142
|
}
|
|
142
143
|
get hostElement() { return this; }
|
|
143
144
|
static get style() { return mapNavigationCss; }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { P as Popover } from './popover.util.js';
|
|
3
2
|
import { d as defineCustomElement$5 } from './dropdown.js';
|
|
4
3
|
import { d as defineCustomElement$4 } from './dropdown-item.js';
|
|
5
4
|
import { d as defineCustomElement$3 } from './icon.js';
|
|
@@ -12,26 +11,15 @@ const MenuAvatar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
12
11
|
super();
|
|
13
12
|
this.__registerHost();
|
|
14
13
|
this.logoutClick = createEvent(this, "logoutClick", 7);
|
|
15
|
-
this.
|
|
14
|
+
this.avatarElementId = 'ix-menu-avatar-id';
|
|
16
15
|
this.top = undefined;
|
|
17
16
|
this.bottom = undefined;
|
|
18
17
|
this.i18nLogout = 'Logout';
|
|
19
18
|
}
|
|
20
|
-
toggleMenu() {
|
|
21
|
-
this.outsideListener.open();
|
|
22
|
-
this.displayMenu = !this.displayMenu;
|
|
23
|
-
}
|
|
24
|
-
componentDidLoad() {
|
|
25
|
-
this.outsideListener = new Popover(this.hostElement, this.hostElement.querySelector('ix-dropdown'), () => {
|
|
26
|
-
this.displayMenu = false;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
disconnectedCallback() {
|
|
30
|
-
var _a;
|
|
31
|
-
(_a = this.outsideListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
32
|
-
}
|
|
33
19
|
render() {
|
|
34
|
-
return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", {
|
|
20
|
+
return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top, id: this.avatarElementId }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", { trigger: this.avatarElementId, placement: 'right-start', offset: {
|
|
21
|
+
mainAxis: 12,
|
|
22
|
+
} }, h("slot", null), h("ix-menu-avatar-item", { label: this.i18nLogout, icon: "log-out", onClick: (e) => {
|
|
35
23
|
this.logoutClick.emit(e);
|
|
36
24
|
} }))));
|
|
37
25
|
}
|
|
@@ -40,9 +28,8 @@ const MenuAvatar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
40
28
|
}, [6, "ix-menu-avatar", {
|
|
41
29
|
"top": [1],
|
|
42
30
|
"bottom": [1],
|
|
43
|
-
"i18nLogout": [1, "i-1-8n-logout"]
|
|
44
|
-
|
|
45
|
-
}, [[1, "click", "toggleMenu"]]]);
|
|
31
|
+
"i18nLogout": [1, "i-1-8n-logout"]
|
|
32
|
+
}]);
|
|
46
33
|
function defineCustomElement$1() {
|
|
47
34
|
if (typeof customElements === "undefined") {
|
|
48
35
|
return;
|
|
@@ -1,35 +1,96 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { P as Popover } from './popover.util.js';
|
|
3
2
|
import { a as convertToRemString } from './rwd.util.js';
|
|
3
|
+
import { T as TypedEvent } from './typed-event.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './dropdown.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './menu-item.js';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
class ThemeSwitcher {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.prefixTheme = 'theme-';
|
|
10
|
+
this.suffixLight = '-light';
|
|
11
|
+
this.suffixDark = '-dark';
|
|
12
|
+
this.defaultTheme = 'theme-classic-dark';
|
|
13
|
+
this._themeChanged = new TypedEvent();
|
|
14
|
+
this.registerMutationObserver();
|
|
15
|
+
}
|
|
16
|
+
get themeChanged() {
|
|
17
|
+
return this._themeChanged;
|
|
18
|
+
}
|
|
19
|
+
hasVariantSuffix(className) {
|
|
20
|
+
return (className.endsWith(this.suffixDark) ||
|
|
21
|
+
className.endsWith(this.suffixLight));
|
|
22
|
+
}
|
|
23
|
+
isThemeClass(className) {
|
|
24
|
+
return (className.startsWith(this.prefixTheme) && this.hasVariantSuffix(className));
|
|
25
|
+
}
|
|
26
|
+
setTheme(themeName) {
|
|
27
|
+
if (!this.isThemeClass(themeName)) {
|
|
28
|
+
throw Error(`Provided theme name ${themeName} does not match our naming conventions. (theme-<name>-(dark,light))`);
|
|
29
|
+
}
|
|
30
|
+
const oldThemes = [];
|
|
31
|
+
document.body.classList.forEach((className) => {
|
|
32
|
+
if (this.isThemeClass(className)) {
|
|
33
|
+
oldThemes.push(className);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
document.body.classList.remove(...oldThemes);
|
|
37
|
+
document.body.classList.add(themeName);
|
|
38
|
+
}
|
|
39
|
+
toggleMode() {
|
|
40
|
+
const oldThemes = [];
|
|
41
|
+
document.body.classList.forEach((className) => {
|
|
42
|
+
if (this.isThemeClass(className)) {
|
|
43
|
+
oldThemes.push(className);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (oldThemes.length === 0) {
|
|
47
|
+
document.body.classList.add(this.getOppositeMode(this.defaultTheme));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
oldThemes.forEach((themeName) => {
|
|
51
|
+
document.body.classList.replace(themeName, this.getOppositeMode(themeName));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
getOppositeMode(themeName) {
|
|
55
|
+
if (themeName.endsWith(this.suffixDark)) {
|
|
56
|
+
return themeName.replace(/-dark$/g, this.suffixLight);
|
|
57
|
+
}
|
|
58
|
+
if (themeName.endsWith(this.suffixLight)) {
|
|
59
|
+
return themeName.replace(/-light$/g, this.suffixDark);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
handleMutations(mutations) {
|
|
63
|
+
return mutations.forEach((mutation) => {
|
|
64
|
+
const { target } = mutation;
|
|
65
|
+
target.classList.forEach((className) => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (this.isThemeClass(className) &&
|
|
68
|
+
!((_a = mutation.oldValue) === null || _a === void 0 ? void 0 : _a.includes(className))) {
|
|
69
|
+
this._themeChanged.emit(className);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
registerMutationObserver() {
|
|
75
|
+
if (typeof window === 'undefined') {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (!('MutationObserver' in window)) {
|
|
79
|
+
console.warn('ThemeSwitcher not supported by your browser. Missing MutationObserver API');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.mutationObserver = new MutationObserver((mutations) => {
|
|
83
|
+
this.handleMutations(mutations);
|
|
84
|
+
});
|
|
85
|
+
this.mutationObserver.observe(document.body, {
|
|
86
|
+
attributeFilter: ['class'],
|
|
87
|
+
attributeOldValue: true,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const themeSwitcher = new ThemeSwitcher();
|
|
31
92
|
|
|
32
|
-
const menuCss = "ix-menu{display:flex;flex-direction:row;position:absolute;height:100%;min-height:22.75rem;z-index:var(--theme-z-index-sticky);width:auto}ix-menu .menu{display:flex;flex-direction:column;position:relative;width:4rem;height:100%;-webkit-padding-after:1rem;padding-block-end:1rem;background-color:var(--theme-nav--background);transition:width var(--animate-duration)}ix-menu .menu.expanded{box-shadow:var(--theme-navigation--box-shadow)}ix-menu .menu .burger-menu-button{display:flex;justify-content:center;margin-top:0.75rem;margin-left:0.75rem;margin-bottom:1rem;height:2rem;width:2.5rem;border-radius:0.25rem}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).hover,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).active,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}ix-menu .menu .burger-menu-button svg{display:inline-block;fill:var(--theme-menu-btn--color);position:relative}ix-menu .menu .burger-menu-button svg .line{opacity:1;transform:rotate(0) translateY(0) translateX(0);transition:transform 0.3s ease-in-out, opacity 0.2s ease-in-out}ix-menu .menu .burger-menu-button.expanded svg .line-1{transform:translate(0.6875rem, -0.05rem) rotate(45deg)}ix-menu .menu .burger-menu-button.expanded svg .line-2{opacity:0}ix-menu .menu .burger-menu-button.expanded svg .line-3{transform:translate(-0.75625rem, 0.8125rem) rotate(-45deg)}ix-menu .menu-overlay{display:block;position:absolute;width:calc(100vw - 4rem);height:100%;left:4rem;z-index:-1;-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem);background-color:var(--theme-sidebar-overlay-blur);transition:all
|
|
93
|
+
const menuCss = "ix-menu{display:flex;flex-direction:row;position:absolute;height:100%;min-height:22.75rem;z-index:var(--theme-z-index-sticky);width:auto}ix-menu .menu{display:flex;flex-direction:column;position:relative;width:4rem;height:100%;-webkit-padding-after:1rem;padding-block-end:1rem;background-color:var(--theme-nav--background);transition:width var(--animate-duration)}ix-menu .menu.expanded{box-shadow:var(--theme-navigation--box-shadow)}ix-menu .menu .burger-menu-button{display:flex;justify-content:center;margin-top:0.75rem;margin-left:0.75rem;margin-bottom:1rem;height:2rem;width:2.5rem;border-radius:0.25rem}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).hover,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled).active,ix-menu .menu .burger-menu-button:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}ix-menu .menu .burger-menu-button svg{display:inline-block;fill:var(--theme-menu-btn--color);position:relative}ix-menu .menu .burger-menu-button svg .line{opacity:1;transform:rotate(0) translateY(0) translateX(0);transition:transform 0.3s ease-in-out, opacity 0.2s ease-in-out}ix-menu .menu .burger-menu-button.expanded svg .line-1{transform:translate(0.6875rem, -0.05rem) rotate(45deg)}ix-menu .menu .burger-menu-button.expanded svg .line-2{opacity:0}ix-menu .menu .burger-menu-button.expanded svg .line-3{transform:translate(-0.75625rem, 0.8125rem) rotate(-45deg)}ix-menu .menu-overlay{display:block;position:absolute;width:calc(100vw - 4rem);height:100%;left:4rem;z-index:-1;-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem);background-color:var(--theme-sidebar-overlay-blur);transition:all 300ms ease-out}ix-menu .menu-overlay-invisible{display:none}ix-menu .menu.expanded{width:16rem}ix-menu .menu-overlay.expanded{width:calc(100vw - 16rem);left:16rem}ix-menu #avatar-tab-placeholder{max-height:3rem}ix-menu .avatar{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-product-name{margin-bottom:1rem}ix-menu #cui-imprint .cui-imprint-product-description{margin-bottom:2rem}ix-menu #cui-imprint .cui-imprint-link-container{display:flex;align-items:center}ix-menu .bottom-tab-divider{margin-top:auto}a[href]:has(>ix-menu-item){text-decoration:none}";
|
|
33
94
|
|
|
34
95
|
const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
35
96
|
constructor() {
|
|
@@ -156,10 +217,6 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
156
217
|
}
|
|
157
218
|
componentDidLoad() {
|
|
158
219
|
var _a, _b, _c, _d;
|
|
159
|
-
const anchor = this.hostElement.querySelector('#more-tab');
|
|
160
|
-
this.popoverListener = new Popover(anchor, this.moreItemsDropdown, () => {
|
|
161
|
-
this.showMoreItems = false;
|
|
162
|
-
});
|
|
163
220
|
(_a = this.settings) === null || _a === void 0 ? void 0 : _a.addEventListener('close', () => {
|
|
164
221
|
this.showSettings = false;
|
|
165
222
|
this.settings.show = this.showSettings;
|
|
@@ -188,10 +245,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
188
245
|
subtree: true,
|
|
189
246
|
});
|
|
190
247
|
}
|
|
191
|
-
disconnectedCallback() {
|
|
192
|
-
var _a;
|
|
193
|
-
(_a = this.popoverListener) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
194
|
-
}
|
|
248
|
+
disconnectedCallback() { }
|
|
195
249
|
componentWillRender() {
|
|
196
250
|
this.appendTabs();
|
|
197
251
|
}
|
|
@@ -354,13 +408,6 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
354
408
|
}
|
|
355
409
|
return Math.min(visibleCount - 2, this.maxVisibleMenuItems);
|
|
356
410
|
}
|
|
357
|
-
toggleShowMoreDropdown() {
|
|
358
|
-
if (this.moreItemsDropdown.querySelectorAll('.appended').length === 0) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
this.popoverListener.open();
|
|
362
|
-
this.showMoreItems = !this.showMoreItems;
|
|
363
|
-
}
|
|
364
411
|
/**
|
|
365
412
|
* Toggle map sidebar expand
|
|
366
413
|
* @param show
|
|
@@ -476,7 +523,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
476
523
|
isMenuItemClicked(event) {
|
|
477
524
|
const path = event.composedPath();
|
|
478
525
|
const menuItems = path
|
|
479
|
-
.filter((element) => element.id !== 'more-tab')
|
|
526
|
+
.filter((element) => element.id !== 'ix-menu-more-tab')
|
|
480
527
|
.filter((element) => {
|
|
481
528
|
return element.tagName === 'IX-MENU-ITEM';
|
|
482
529
|
});
|
|
@@ -499,11 +546,11 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
499
546
|
if (this.isMenuItemClicked(event)) {
|
|
500
547
|
this.resetOverlay();
|
|
501
548
|
}
|
|
502
|
-
} }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "more-tab", tabIcon: "more-menu", class: {
|
|
549
|
+
} }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "ix-menu-more-tab", tabIcon: "more-menu", class: {
|
|
503
550
|
'internal-tab': true,
|
|
504
551
|
}, style: {
|
|
505
552
|
display: this.showMoreButton() ? 'block' : 'none',
|
|
506
|
-
}, title: "Show more", notifications: this.countMoreNotifications
|
|
553
|
+
}, title: "Show more", notifications: this.countMoreNotifications }, this.i18nMore, h("ix-dropdown", { trigger: 'ix-menu-more-tab', positioningStrategy: 'fixed', placement: 'right-start' }, this.menuItems
|
|
507
554
|
.filter((elm, index) => !this.showTab(index) &&
|
|
508
555
|
!this.isMenuItemActive(elm) &&
|
|
509
556
|
this.isVisible(elm))
|
|
@@ -517,7 +564,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
517
564
|
'internal-tab': true,
|
|
518
565
|
'bottom-tab': true,
|
|
519
566
|
active: this.showAbout,
|
|
520
|
-
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () =>
|
|
567
|
+
}, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () => themeSwitcher.toggleMode(), class: "internal-tab bottom-tab", tabIcon: "bulb" }, this.i18nToggleTheme)) : null, this.enableMapExpand ? (h("ix-menu-item", { id: "menu-collapse", onClick: () => this.mapExpandChange.emit(this.mapExpand), class: "internal-tab bottom-tab", tabIcon: `${this.getCollapseIcon()}` }, this.getCollapseText())) : null), h("div", { class: {
|
|
521
568
|
'menu-overlay': true,
|
|
522
569
|
expanded: this.expand,
|
|
523
570
|
'd-block': this.showAbout || this.showSettings,
|
|
@@ -581,4 +628,4 @@ function defineCustomElement$1() {
|
|
|
581
628
|
const IxMenu = Menu;
|
|
582
629
|
const defineCustomElement = defineCustomElement$1;
|
|
583
630
|
|
|
584
|
-
export { IxMenu, defineCustomElement };
|
|
631
|
+
export { IxMenu, ThemeSwitcher as T, defineCustomElement, themeSwitcher as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
3
3
|
|
|
4
|
-
const pillCss = ".sc-ix-pill-h{display:inline-flex;position:relative;align-items:center;justify-content:center;border-radius:100px;padding:0px 6px;margin-left:0.25rem;min-width:1.5rem;height:1.25rem;min-height:1.25rem;max-height:1.25rem;cursor:auto}.sc-ix-pill-h .with-icon.sc-ix-pill{margin-right:0.25rem}.align-left.sc-ix-pill-h{justify-content:flex-start}[variant=primary].sc-ix-pill-h{background-color:var(--theme-color-primary);color:var(--theme-chip-primary--color)}[variant=primary].sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary--color);pointer-events:auto}[variant=primary].outline.sc-ix-pill-h{color:var(--theme-chip-primary-outline--color);background-color:transparent;border:solid 1px var(--theme-chip-primary-outline--border-color)}[variant=primary].outline.sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary-outline--color)}[variant=alarm].sc-ix-pill-h{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-alarm)}[variant=alarm].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=alarm].sc-ix-pill-h:not(.outline).active::after,[variant=alarm].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=alarm].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-alarm)}[variant=alarm].outline.sc-ix-pill-h:hover::after{display:none}[variant=alarm].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=alarm].outline.active.sc-ix-pill-h::after,[variant=alarm].outline.sc-ix-pill-h:active::after{display:none}[variant=alarm].outline.active.sc-ix-pill-h,[variant=alarm].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=critical].sc-ix-pill-h{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-critical)}[variant=critical].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=critical].sc-ix-pill-h:not(.outline).active::after,[variant=critical].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=critical].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-critical)}[variant=critical].outline.sc-ix-pill-h:hover::after{display:none}[variant=critical].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=critical].outline.active.sc-ix-pill-h::after,[variant=critical].outline.sc-ix-pill-h:active::after{display:none}[variant=critical].outline.active.sc-ix-pill-h,[variant=critical].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=warning].sc-ix-pill-h{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-warning)}[variant=warning].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=warning].sc-ix-pill-h:not(.outline).active::after,[variant=warning].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=warning].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-warning)}[variant=warning].outline.sc-ix-pill-h:hover::after{display:none}[variant=warning].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=warning].outline.active.sc-ix-pill-h::after,[variant=warning].outline.sc-ix-pill-h:active::after{display:none}[variant=warning].outline.active.sc-ix-pill-h,[variant=warning].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=info].sc-ix-pill-h{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-info)}[variant=info].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=info].sc-ix-pill-h:not(.outline).active::after,[variant=info].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=info].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-info)}[variant=info].outline.sc-ix-pill-h:hover::after{display:none}[variant=info].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=info].outline.active.sc-ix-pill-h::after,[variant=info].outline.sc-ix-pill-h:active::after{display:none}[variant=info].outline.active.sc-ix-pill-h,[variant=info].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=neutral].sc-ix-pill-h{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-neutral)}[variant=neutral].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=neutral].sc-ix-pill-h:not(.outline).active::after,[variant=neutral].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=neutral].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-neutral)}[variant=neutral].outline.sc-ix-pill-h:hover::after{display:none}[variant=neutral].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=neutral].outline.active.sc-ix-pill-h::after,[variant=neutral].outline.sc-ix-pill-h:active::after{display:none}[variant=neutral].outline.active.sc-ix-pill-h,[variant=neutral].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=success].sc-ix-pill-h{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-success)}[variant=success].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=success].sc-ix-pill-h:not(.outline).active::after,[variant=success].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=success].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-success)}[variant=success].outline.sc-ix-pill-h:hover::after{display:none}[variant=success].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=success].outline.active.sc-ix-pill-h::after,[variant=success].outline.sc-ix-pill-h:active::after{display:none}[variant=success].outline.active.sc-ix-pill-h,[variant=success].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}.sc-ix-pill-h .slot.sc-ix-pill{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
4
|
+
const pillCss = ".sc-ix-pill-h{display:inline-flex;width:-moz-fit-content;width:fit-content;position:relative;align-items:center;justify-content:center;border-radius:100px;padding:0px 6px;margin-left:0.25rem;min-width:1.5rem;height:1.25rem;min-height:1.25rem;max-height:1.25rem;cursor:auto}.sc-ix-pill-h .with-icon.sc-ix-pill{margin-right:0.25rem}.align-left.sc-ix-pill-h{justify-content:flex-start}[variant=primary].sc-ix-pill-h{background-color:var(--theme-color-primary);color:var(--theme-chip-primary--color)}[variant=primary].sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary--color);pointer-events:auto}[variant=primary].outline.sc-ix-pill-h{color:var(--theme-chip-primary-outline--color);background-color:transparent;border:solid 1px var(--theme-chip-primary-outline--border-color)}[variant=primary].outline.sc-ix-pill-h .close-button.sc-ix-pill{color:var(--theme-chip-primary-outline--color)}[variant=alarm].sc-ix-pill-h{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-alarm)}[variant=alarm].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-alarm--contrast)}[variant=alarm].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=alarm].sc-ix-pill-h:not(.outline).active::after,[variant=alarm].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=alarm].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-alarm)}[variant=alarm].outline.sc-ix-pill-h:hover::after{display:none}[variant=alarm].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=alarm].outline.active.sc-ix-pill-h::after,[variant=alarm].outline.sc-ix-pill-h:active::after{display:none}[variant=alarm].outline.active.sc-ix-pill-h,[variant=alarm].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=critical].sc-ix-pill-h{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-critical)}[variant=critical].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-critical--contrast)}[variant=critical].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=critical].sc-ix-pill-h:not(.outline).active::after,[variant=critical].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=critical].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-critical)}[variant=critical].outline.sc-ix-pill-h:hover::after{display:none}[variant=critical].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=critical].outline.active.sc-ix-pill-h::after,[variant=critical].outline.sc-ix-pill-h:active::after{display:none}[variant=critical].outline.active.sc-ix-pill-h,[variant=critical].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=warning].sc-ix-pill-h{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-warning)}[variant=warning].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-warning--contrast)}[variant=warning].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=warning].sc-ix-pill-h:not(.outline).active::after,[variant=warning].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=warning].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-warning)}[variant=warning].outline.sc-ix-pill-h:hover::after{display:none}[variant=warning].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=warning].outline.active.sc-ix-pill-h::after,[variant=warning].outline.sc-ix-pill-h:active::after{display:none}[variant=warning].outline.active.sc-ix-pill-h,[variant=warning].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=info].sc-ix-pill-h{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-info)}[variant=info].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-info--contrast)}[variant=info].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=info].sc-ix-pill-h:not(.outline).active::after,[variant=info].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=info].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-info)}[variant=info].outline.sc-ix-pill-h:hover::after{display:none}[variant=info].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=info].outline.active.sc-ix-pill-h::after,[variant=info].outline.sc-ix-pill-h:active::after{display:none}[variant=info].outline.active.sc-ix-pill-h,[variant=info].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=neutral].sc-ix-pill-h{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-neutral)}[variant=neutral].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-neutral--contrast)}[variant=neutral].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=neutral].sc-ix-pill-h:not(.outline).active::after,[variant=neutral].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=neutral].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-neutral)}[variant=neutral].outline.sc-ix-pill-h:hover::after{display:none}[variant=neutral].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=neutral].outline.active.sc-ix-pill-h::after,[variant=neutral].outline.sc-ix-pill-h:active::after{display:none}[variant=neutral].outline.active.sc-ix-pill-h,[variant=neutral].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=success].sc-ix-pill-h{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline){background-color:var(--theme-color-success)}[variant=success].sc-ix-pill-h:not(.outline) .close-button.sc-ix-pill{color:var(--theme-color-success--contrast)}[variant=success].sc-ix-pill-h:not(.outline):hover::after{content:\"\";background-color:rgba(0, 0, 0, 0.05)}[variant=success].sc-ix-pill-h:not(.outline).active::after,[variant=success].sc-ix-pill-h:not(.outline):active::after{background-color:rgba(0, 0, 0, 0.1)}[variant=success].outline.sc-ix-pill-h{color:var(--theme-chip-outline--color);border:solid 1px var(--theme-color-success)}[variant=success].outline.sc-ix-pill-h:hover::after{display:none}[variant=success].outline.sc-ix-pill-h:hover{background-color:var(--theme-chip-outline--background--hover)}[variant=success].outline.active.sc-ix-pill-h::after,[variant=success].outline.sc-ix-pill-h:active::after{display:none}[variant=success].outline.active.sc-ix-pill-h,[variant=success].outline.sc-ix-pill-h:active{background-color:var(--theme-chip-outline--background--active)}[variant=custom].outline.sc-ix-pill-h{border:solid 1px transparent;background-color:transparent}.sc-ix-pill-h .slot.sc-ix-pill{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-ix-pill-h .hidden.sc-ix-pill{width:0px;margin-right:0px}";
|
|
5
5
|
|
|
6
6
|
const Pill = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -23,7 +23,10 @@ const Pill = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
23
23
|
color: this.color,
|
|
24
24
|
backgroundColor: this.background,
|
|
25
25
|
}
|
|
26
|
-
: {}, title: this.el.textContent },
|
|
26
|
+
: {}, title: this.el.textContent }, h("ix-icon", { class: {
|
|
27
|
+
'with-icon': true,
|
|
28
|
+
hidden: this.icon === undefined || this.icon === '',
|
|
29
|
+
}, name: this.icon, size: '16' }), h("div", { class: "slot" }, h("slot", null))));
|
|
27
30
|
}
|
|
28
31
|
get el() { return this; }
|
|
29
32
|
static get style() { return pillCss; }
|
|
@@ -6,7 +6,7 @@ import { d as defineCustomElement$4 } from './icon.js';
|
|
|
6
6
|
import { d as defineCustomElement$3 } from './icon-button.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './select-item.js';
|
|
8
8
|
|
|
9
|
-
const selectCss = ".sc-ix-select-h{display:inline-block;position:relative;height:auto;width:100%}.sc-ix-select-h .select.sc-ix-select{position:relative;display:flex;align-items:center;height:auto;background-color:var(--theme-input--background);border:var(--theme-input--border-thickness) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);padding:0 0 0 0.5rem}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover)}.sc-ix-select-h .select.sc-ix-select:focus-within{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline:1px solid #119fff !important;outline-offset:var(--theme-input--focus--outline-offset)}.sc-ix-select-h .trigger.sc-ix-select{display:flex;align-items:center;flex-grow:1;height:100%}.sc-ix-select-h .input-container.sc-ix-select{display:flex;position:relative;align-items:flex-start;width:100%}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select{position:relative;display:flex;align-items:center;flex-wrap:wrap;height:100%;max-height:3.5rem;flex-grow:1;overflow-y:auto}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select>ix-filter-chip.sc-ix-select{margin:0 0.1rem}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);background:transparent;height:1.75rem;width:100%}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:hover,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:focus-visible{border:none;outline:none}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::-moz-placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::-moz-placeholder{opacity:0}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::placeholder{opacity:0}.sc-ix-select-h .chevron-down-container.sc-ix-select{display:flex;align-items:center;justify-content:center;width:2rem;min-width:2rem;height:100%}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-btn-invisible-secondary--background--hover)}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):active{background-color:var(--theme-btn-invisible-secondary--background--active)}.sc-ix-select-h .add-item.sc-ix-select{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%}.sc-ix-select-h .select-list-header.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;color:var(--theme-select-list-item-hint--color);margin:0 0.5rem 0 2rem}
|
|
9
|
+
const selectCss = ".sc-ix-select-h{display:inline-block;position:relative;height:auto;width:100%}.sc-ix-select-h .select.sc-ix-select{position:relative;display:flex;align-items:center;height:auto;background-color:var(--theme-input--background);border:var(--theme-input--border-thickness) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);padding:0 0 0 0.5rem}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .select.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover)}.sc-ix-select-h .select.sc-ix-select:focus-within{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline:1px solid #119fff !important;outline-offset:var(--theme-input--focus--outline-offset)}.sc-ix-select-h .trigger.sc-ix-select{display:flex;align-items:center;flex-grow:1;height:100%}.sc-ix-select-h .input-container.sc-ix-select{display:flex;position:relative;align-items:flex-start;width:100%}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select{position:relative;display:flex;align-items:center;flex-wrap:wrap;height:100%;max-height:3.5rem;flex-grow:1;overflow-y:auto}.sc-ix-select-h .input-container.sc-ix-select .chips.sc-ix-select>ix-filter-chip.sc-ix-select{margin:0 0.1rem}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);background:transparent;height:1.75rem;width:100%}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:hover,.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select:focus-visible{border:none;outline:none}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::-moz-placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.sc-ix-select::placeholder{color:var(--theme-input-select-icon--color)}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::-moz-placeholder{opacity:0}.sc-ix-select-h .input-container.sc-ix-select input.hide-placeholder.sc-ix-select::placeholder{opacity:0}.sc-ix-select-h .chevron-down-container.sc-ix-select{display:flex;align-items:center;justify-content:center;width:2rem;min-width:2rem;height:100%}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):hover{background-color:var(--theme-btn-invisible-secondary--background--hover)}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled){cursor:pointer}.sc-ix-select-h .editable.sc-ix-select .chevron-down-container.sc-ix-select:not(.disabled):not(:disabled):active{background-color:var(--theme-btn-invisible-secondary--background--active)}.sc-ix-select-h .add-item.sc-ix-select{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%}.sc-ix-select-h .select-list-header.sc-ix-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;height:2rem;color:var(--theme-select-list-item-hint--color);margin:0 0.5rem 0 2rem}";
|
|
10
10
|
|
|
11
11
|
const Select = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -117,17 +117,12 @@ const Select = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
117
117
|
: [this.selectedIndices]);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.labelMutationObserver.observe(this.hostElement, {
|
|
127
|
-
subtree: true,
|
|
128
|
-
attributes: true,
|
|
129
|
-
attributeFilter: ['label'],
|
|
130
|
-
});
|
|
120
|
+
onLabelChange(event) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
event.stopImmediatePropagation();
|
|
123
|
+
this.selectValue(Array.isArray(this.selectedIndices)
|
|
124
|
+
? this.selectedIndices
|
|
125
|
+
: [this.selectedIndices]);
|
|
131
126
|
}
|
|
132
127
|
disconnectedCallback() {
|
|
133
128
|
if (this.labelMutationObserver) {
|
|
@@ -264,7 +259,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
264
259
|
'd-none': this.disabled ||
|
|
265
260
|
this.readonly ||
|
|
266
261
|
(this.isDropdownEmpty && !this.editable),
|
|
267
|
-
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom", positioningStrategy: '
|
|
262
|
+
}, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", positioningStrategy: 'absolute' }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
|
|
268
263
|
'add-item': true,
|
|
269
264
|
'd-none': !(this.editable && this.inputFilterText),
|
|
270
265
|
}, label: this.inputFilterText, onItemClick: (e) => {
|
|
@@ -298,7 +293,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
298
293
|
"navigationItem": [32],
|
|
299
294
|
"inputFilterText": [32],
|
|
300
295
|
"inputValue": [32]
|
|
301
|
-
}, [[0, "itemClick", "onItemClicked"], [8, "keydown", "onKeyDown"]]]);
|
|
296
|
+
}, [[0, "itemClick", "onItemClicked"], [0, "ix-select-item:labelChange", "onLabelChange"], [8, "keydown", "onKeyDown"]]]);
|
|
302
297
|
function defineCustomElement$1() {
|
|
303
298
|
if (typeof customElements === "undefined") {
|
|
304
299
|
return;
|
|
@@ -2,7 +2,6 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { g as getButtonClasses } from './base-button.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './dropdown.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
|
-
import { c as createPopper } from './popper.js';
|
|
6
5
|
|
|
7
6
|
const splitButtonCss = ".sc-ix-split-button-h{display:block}";
|
|
8
7
|
|
|
@@ -25,46 +24,18 @@ const SplitButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
25
24
|
get splitItems() {
|
|
26
25
|
return Array.from(this.hostElement.querySelectorAll('ix-split-button-item'));
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
this.
|
|
27
|
+
linkTriggerRef() {
|
|
28
|
+
if (this.triggerElement && this.dropdownElement) {
|
|
29
|
+
this.dropdownElement.trigger = this.triggerElement;
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
componentDidLoad() {
|
|
34
|
-
|
|
35
|
-
this.popover = this.hostElement.querySelector('ix-dropdown');
|
|
36
|
-
this.popperInstance = createPopper(element, this.popover, {
|
|
37
|
-
strategy: 'fixed',
|
|
38
|
-
placement: this.placement,
|
|
39
|
-
modifiers: [
|
|
40
|
-
{
|
|
41
|
-
name: 'offset',
|
|
42
|
-
options: {
|
|
43
|
-
offset: [0, 0],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'flip',
|
|
48
|
-
options: {
|
|
49
|
-
padding: 8,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
});
|
|
54
|
-
window.addEventListener('click', this.clickOutside.bind(this));
|
|
55
|
-
}
|
|
56
|
-
disconnectedCallback() {
|
|
57
|
-
var _a;
|
|
58
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
59
|
-
window.removeEventListener('click', this.clickOutside.bind(this));
|
|
60
|
-
}
|
|
61
|
-
toggleDropdown() {
|
|
62
|
-
this.toggle = !this.toggle;
|
|
33
|
+
this.linkTriggerRef();
|
|
63
34
|
}
|
|
64
35
|
render() {
|
|
65
|
-
return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
36
|
+
return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { ref: (r) => (this.triggerElement = r), class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
|
|
66
37
|
anchor: true,
|
|
67
|
-
})
|
|
38
|
+
}) }, h("ix-icon", { name: this.splitIcon }), h("ix-dropdown", { ref: (r) => (this.dropdownElement = r) }, h("slot", null)))));
|
|
68
39
|
}
|
|
69
40
|
get hostElement() { return this; }
|
|
70
41
|
static get style() { return splitButtonCss; }
|
|
@@ -634,8 +634,7 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
634
634
|
return itemList;
|
|
635
635
|
}
|
|
636
636
|
componentDidLoad() {
|
|
637
|
-
|
|
638
|
-
this.hyperlist = new Hyperlist(this.host, config);
|
|
637
|
+
this.initList();
|
|
639
638
|
this.observer = new MutationObserver((records) => {
|
|
640
639
|
let removed = [];
|
|
641
640
|
records.forEach((record) => {
|
|
@@ -654,20 +653,40 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
654
653
|
});
|
|
655
654
|
}
|
|
656
655
|
componentWillRender() {
|
|
657
|
-
this.
|
|
656
|
+
if (this.isListInitialized()) {
|
|
657
|
+
this.refreshList();
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
this.initList();
|
|
661
|
+
}
|
|
658
662
|
}
|
|
659
663
|
disconnectedCallback() {
|
|
660
664
|
this.hyperlist.destroy();
|
|
661
665
|
this.observer.disconnect();
|
|
662
666
|
}
|
|
663
667
|
modelChange() {
|
|
664
|
-
this.
|
|
668
|
+
if (!this.isListInitialized()) {
|
|
669
|
+
this.initList();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
isListInitialized() {
|
|
673
|
+
var _a;
|
|
674
|
+
const itemPositions = (_a = this.hyperlist) === null || _a === void 0 ? void 0 : _a._itemPositions;
|
|
675
|
+
return (itemPositions !== undefined &&
|
|
676
|
+
itemPositions.length &&
|
|
677
|
+
!(itemPositions === null || itemPositions === void 0 ? void 0 : itemPositions.some((item) => item === undefined || Number.isNaN(item))));
|
|
665
678
|
}
|
|
666
679
|
refreshList() {
|
|
667
680
|
if (this.hyperlist) {
|
|
668
681
|
this.hyperlist.refresh(this.host, this.getVirtualizerOptions());
|
|
669
682
|
}
|
|
670
683
|
}
|
|
684
|
+
initList() {
|
|
685
|
+
var _a;
|
|
686
|
+
(_a = this.hyperlist) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
687
|
+
const config = this.getVirtualizerOptions();
|
|
688
|
+
this.hyperlist = new Hyperlist(this.host, config);
|
|
689
|
+
}
|
|
671
690
|
render() {
|
|
672
691
|
return (h(Host, null, h("slot", null)));
|
|
673
692
|
}
|