@siemens/ix 0.0.0-pr-1522-20241021144048 → 0.0.0-pr-1522-20241022123832
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/dropdown.js +4 -4
- package/components/dropdown.js.map +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +10 -10
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/esm/ix-dropdown.entry.js +2 -2
- package/dist/esm/ix-dropdown.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/{p-c8c3efb6.entry.js → p-5bf37272.entry.js} +2 -2
- package/dist/siemens-ix/p-5bf37272.entry.js.map +1 -0
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +4 -4
- package/package.json +1 -1
- package/dist/siemens-ix/p-c8c3efb6.entry.js.map +0 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy(JSON.parse("[[\"ix-datetime-picker.cjs\",[[1,\"ix-datetime-picker\",{\"range\":[4],\"showHour\":[4,\"show-hour\"],\"showMinutes\":[4,\"show-minutes\"],\"showSeconds\":[4,\"show-seconds\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"dateFormat\":[1,\"date-format\"],\"timeFormat\":[1,\"time-format\"],\"from\":[1],\"to\":[1],\"time\":[1],\"showTimeReference\":[8,\"show-time-reference\"],\"timeReference\":[1,\"time-reference\"],\"textSelectDate\":[1,\"text-select-date\"],\"i18nDone\":[1,\"i18n-done\"],\"weekStartIndex\":[2,\"week-start-index\"],\"locale\":[1],\"eventDelimiter\":[1,\"event-delimiter\"]}]]],[\"ix-date-dropdown.cjs\",[[1,\"ix-date-dropdown\",{\"disabled\":[4],\"format\":[1],\"range\":[4],\"from\":[1],\"to\":[1],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"dateRangeId\":[1,\"date-range-id\"],\"customRangeAllowed\":[4,\"custom-range-allowed\"],\"dateRangeOptions\":[16],\"i18nCustomItem\":[1,\"i18n-custom-item\"],\"i18nDone\":[1,\"i18n-done\"],\"i18nNoRange\":[1,\"i18n-no-range\"],\"today\":[1],\"selectedDateRangeId\":[32],\"currentRangeValue\":[32],\"getDateRange\":[64]},null,{\"dateRangeId\":[\"onDateRangeIdChange\"],\"to\":[\"onDateRangeIdChange\"],\"from\":[\"onDateRangeIdChange\"],\"dateRangeOptions\":[\"onDateRangeOptionsChange\"],\"disabled\":[\"onDisabledChange\"]}]]],[\"ix-pagination.cjs\",[[1,\"ix-pagination\",{\"advanced\":[4],\"itemCount\":[2,\"item-count\"],\"showItemCount\":[4,\"show-item-count\"],\"count\":[2],\"selectedPage\":[1026,\"selected-page\"],\"i18nPage\":[1,\"i-1-8n-page\"],\"i18nOf\":[1,\"i-1-8n-of\"],\"i18nItems\":[1,\"i-1-8n-items\"]}]]],[\"ix-map-navigation.cjs\",[[1,\"ix-map-navigation\",{\"applicationName\":[1,\"application-name\"],\"navigationTitle\":[1,\"navigation-title\"],\"hideContextMenu\":[4,\"hide-context-menu\"],\"isSidebarOpen\":[32],\"hasContentHeader\":[32],\"toggleSidebar\":[64],\"openOverlay\":[64],\"closeOverlay\":[64]}]]],[\"ix-menu-avatar.cjs\",[[1,\"ix-menu-avatar\",{\"top\":[1],\"bottom\":[1],\"image\":[1],\"initials\":[1],\"i18nLogout\":[1,\"i-1-8n-logout\"],\"showLogoutButton\":[4,\"show-logout-button\"],\"showContextMenu\":[32]}]]],[\"ix-basic-navigation.cjs\",[[1,\"ix-basic-navigation\",{\"applicationName\":[1,\"application-name\"],\"hideHeader\":[4,\"hide-header\"],\"forceBreakpoint\":[1,\"force-breakpoint\"],\"breakpoints\":[16],\"breakpoint\":[32]},null,{\"hideHeader\":[\"onHideHeaderChange\"],\"breakpoints\":[\"onBreakpointsChange\"]}]]],[\"ix-card-list.cjs\",[[1,\"ix-card-list\",{\"label\":[1],\"collapse\":[1028],\"listStyle\":[1,\"list-style\"],\"maxVisibleCards\":[2,\"max-visible-cards\"],\"showAllCount\":[2,\"show-all-count\"],\"suppressOverflowHandling\":[4,\"suppress-overflow-handling\"],\"hideShowAll\":[4,\"hide-show-all\"],\"i18nShowAll\":[1,\"i-1-8n-show-all\"],\"i18nMoreCards\":[1,\"i-1-8n-more-cards\"],\"hasOverflowingElements\":[32],\"numberOfOverflowingElements\":[32],\"numberOfAllChildElements\":[32],\"leftScrollDistance\":[32],\"rightScrollDistance\":[32]},[[9,\"resize\",\"detectOverflow\"]]]]],[\"ix-menu.cjs\",[[1,\"ix-menu\",{\"showSettings\":[1028,\"show-settings\"],\"showAbout\":[1028,\"show-about\"],\"enableToggleTheme\":[4,\"enable-toggle-theme\"],\"enableSettings\":[4,\"enable-settings\"],\"enableMapExpand\":[4,\"enable-map-expand\"],\"applicationName\":[1,\"application-name\"],\"applicationDescription\":[1,\"application-description\"],\"maxVisibleMenuItems\":[2,\"max-visible-menu-items\"],\"i18nExpandSidebar\":[1,\"i-1-8n-expand-sidebar\"],\"expand\":[1540],\"startExpanded\":[4,\"start-expanded\"],\"pinned\":[4],\"i18nLegal\":[1,\"i-1-8n-legal\"],\"i18nSettings\":[1,\"i-1-8n-settings\"],\"i18nToggleTheme\":[1,\"i-1-8n-toggle-theme\"],\"i18nExpand\":[1,\"i-1-8n-expand\"],\"i18nCollapse\":[1,\"i-1-8n-collapse\"],\"showPinned\":[32],\"mapExpand\":[32],\"activeTab\":[32],\"breakpoint\":[32],\"itemsScrollShadowTop\":[32],\"itemsScrollShadowBottom\":[32],\"applicationLayoutContext\":[32],\"toggleMapExpand\":[64],\"toggleMenu\":[64],\"toggleSettings\":[64],\"toggleAbout\":[64]},[[9,\"resize\",\"handleOverflowIndicator\"],[0,\"close\",\"onOverlayClose\"]],{\"pinned\":[\"pinnedChange\"]}]]],[\"ix-menu-category.cjs\",[[1,\"ix-menu-category\",{\"label\":[1],\"icon\":[1],\"notifications\":[2],\"menuExpand\":[32],\"showItems\":[32],\"showDropdown\":[32],\"nestedItems\":[32]},[[8,\"closeOtherCategories\",\"onPointerLeave\"]]]]],[\"ix-application-switch-modal.cjs\",[[1,\"ix-application-switch-modal\",{\"config\":[16]}]]],[\"ix-push-card.cjs\",[[1,\"ix-push-card\",{\"icon\":[1],\"notification\":[1],\"heading\":[1],\"subheading\":[1],\"variant\":[1],\"collapse\":[4]}]]],[\"ix-breadcrumb.cjs\",[[1,\"ix-breadcrumb\",{\"visibleItemCount\":[2,\"visible-item-count\"],\"nextItems\":[16],\"ghost\":[4],\"ariaLabelPreviousButton\":[1,\"aria-label-previous-button\"],\"items\":[32],\"isPreviousDropdownExpanded\":[32]},null,{\"nextItems\":[\"onNextItemsChange\"]}]]],[\"ix-category-filter.cjs\",[[1,\"ix-category-filter\",{\"disabled\":[4],\"readonly\":[4],\"filterState\":[16],\"placeholder\":[1],\"categories\":[16],\"nonSelectableCategories\":[16],\"suggestions\":[16],\"icon\":[1],\"hideIcon\":[4,\"hide-icon\"],\"staticOperator\":[1,\"static-operator\"],\"repeatCategories\":[4,\"repeat-categories\"],\"tmpDisableScrollIntoView\":[4,\"tmp-disable-scroll-into-view\"],\"labelCategories\":[1,\"label-categories\"],\"i18nPlainText\":[1,\"i-1-8n-plain-text\"],\"showDropdown\":[32],\"hasFocus\":[32],\"categoryLogicalOperator\":[32],\"inputValue\":[32],\"category\":[32],\"filterTokens\":[32]},null,{\"filterState\":[\"watchFilterState\"]}]]],[\"ix-dropdown-button.cjs\",[[1,\"ix-dropdown-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[4],\"label\":[1],\"icon\":[1],\"closeBehavior\":[8,\"close-behavior\"],\"placement\":[1]}]]],[\"ix-group.cjs\",[[1,\"ix-group\",{\"suppressHeaderSelection\":[4,\"suppress-header-selection\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"collapsed\":[1540],\"selected\":[1540],\"index\":[1538],\"expandOnHeaderClick\":[4,\"expand-on-header-click\"],\"itemSelected\":[32],\"slotSize\":[32],\"footerVisible\":[32],\"showExpandCollapsedIcon\":[32]},[[0,\"selectedChanged\",\"onItemClicked\"]],{\"selected\":[\"selectedChanged\"]}]]],[\"ix-menu-about.cjs\",[[1,\"ix-menu-about\",{\"activeTabLabel\":[1025,\"active-tab-label\"],\"label\":[1],\"show\":[4],\"items\":[32]},null,{\"activeTabLabel\":[\"updateTab\"]}]]],[\"ix-menu-about-news.cjs\",[[1,\"ix-menu-about-news\",{\"show\":[1540],\"label\":[1],\"i18nShowMore\":[1,\"i-1-8n-show-more\"],\"aboutItemLabel\":[1,\"about-item-label\"],\"offsetBottom\":[2,\"offset-bottom\"],\"expanded\":[4]}]]],[\"ix-menu-settings.cjs\",[[1,\"ix-menu-settings\",{\"activeTabLabel\":[1025,\"active-tab-label\"],\"label\":[1],\"show\":[4],\"items\":[32]},null,{\"activeTabLabel\":[\"updateTab\"]}]]],[\"ix-split-button.cjs\",[[1,\"ix-split-button\",{\"variant\":[1],\"closeBehavior\":[8,\"close-behavior\"],\"outline\":[4],\"ghost\":[4],\"label\":[1],\"icon\":[1],\"splitIcon\":[1,\"split-icon\"],\"disabled\":[4],\"placement\":[1],\"toggle\":[32]}]]],[\"ix-action-card.cjs\",[[1,\"ix-action-card\",{\"variant\":[1],\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"selected\":[4]}]]],[\"ix-content-header.cjs\",[[1,\"ix-content-header\",{\"variant\":[1],\"headerTitle\":[1,\"header-title\"],\"headerSubtitle\":[1,\"header-subtitle\"],\"hasBackButton\":[4,\"has-back-button\"]}]]],[\"ix-empty-state.cjs\",[[1,\"ix-empty-state\",{\"layout\":[1],\"icon\":[1],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"action\":[1]}]]],[\"ix-modal-example.cjs\",[[0,\"ix-modal-example\"]]],[\"ix-pane.cjs\",[[1,\"ix-pane\",{\"heading\":[1],\"variant\":[1],\"hideOnCollapse\":[4,\"hide-on-collapse\"],\"size\":[1],\"borderless\":[4],\"expanded\":[1028],\"composition\":[1025],\"icon\":[1],\"ignoreLayoutSettings\":[4,\"ignore-layout-settings\"],\"isMobile\":[1028,\"is-mobile\"],\"expandIcon\":[32],\"showContent\":[32],\"minimizeIcon\":[32],\"floating\":[32],\"parentWidthPx\":[32],\"parentHeightPx\":[32]},null,{\"isMobile\":[\"onMobileChange\"],\"composition\":[\"onPositionChange\"],\"hideOnCollapse\":[\"onHideOnCollapseChange\"],\"variant\":[\"onVariantChange\"],\"borderless\":[\"onBorderlessChange\"],\"expanded\":[\"onExpandedChange\"],\"parentHeightPx\":[\"onParentSizeChange\"],\"parentWidthPx\":[\"onParentSizeChange\"],\"size\":[\"onSizeChange\"]}]]],[\"ix-toast-container.cjs\",[[1,\"ix-toast-container\",{\"containerId\":[1,\"container-id\"],\"containerClass\":[1,\"container-class\"],\"position\":[1],\"showToast\":[64]},null,{\"position\":[\"onPositionChange\"]}]]],[\"ix-chip.cjs\",[[1,\"ix-chip\",{\"variant\":[513],\"active\":[4],\"closable\":[4],\"icon\":[1],\"background\":[1],\"color\":[1],\"chipColor\":[1,\"chip-color\"],\"outline\":[4]}]]],[\"ix-drawer.cjs\",[[1,\"ix-drawer\",{\"show\":[1028],\"closeOnClickOutside\":[4,\"close-on-click-outside\"],\"fullHeight\":[4,\"full-height\"],\"minWidth\":[2,\"min-width\"],\"maxWidth\":[2,\"max-width\"],\"width\":[8],\"toggleDrawer\":[64]},null,{\"show\":[\"onShowChanged\"]}]]],[\"ix-expanding-search.cjs\",[[1,\"ix-expanding-search\",{\"icon\":[1],\"placeholder\":[1],\"value\":[1025],\"fullWidth\":[4,\"full-width\"],\"isFieldChanged\":[32],\"expanded\":[32],\"hasFocus\":[32]}]]],[\"ix-flip-tile.cjs\",[[1,\"ix-flip-tile\",{\"state\":[1],\"height\":[8],\"width\":[8],\"index\":[32],\"isFlipAnimationActive\":[32]}]]],[\"ix-message-bar.cjs\",[[1,\"ix-message-bar\",{\"type\":[1],\"dismissible\":[4],\"icon\":[32],\"color\":[32]}]]],[\"ix-slider.cjs\",[[1,\"ix-slider\",{\"step\":[2],\"min\":[2],\"max\":[2],\"value\":[2],\"marker\":[16],\"trace\":[4],\"traceReference\":[2,\"trace-reference\"],\"disabled\":[4],\"error\":[8],\"rangeInput\":[32],\"rangeMin\":[32],\"rangeMax\":[32],\"rangeTraceReference\":[32],\"showTooltip\":[32]},null,{\"showTooltip\":[\"onShowTooltipChange\"],\"value\":[\"updateRangeVariables\"],\"max\":[\"updateRangeVariables\"],\"min\":[\"updateRangeVariables\"],\"traceReference\":[\"updateRangeVariables\"]}]]],[\"ix-upload.cjs\",[[1,\"ix-upload\",{\"accept\":[1],\"multiple\":[4],\"multiline\":[4],\"disabled\":[4],\"state\":[1],\"selectFileText\":[1,\"select-file-text\"],\"loadingText\":[1,\"loading-text\"],\"uploadFailedText\":[1,\"upload-failed-text\"],\"uploadSuccessText\":[1,\"upload-success-text\"],\"i18nUploadFile\":[1,\"i-1-8n-upload-file\"],\"i18nUploadDisabled\":[1,\"i-1-8n-upload-disabled\"],\"isFileOver\":[32],\"setFilesToUpload\":[64]}]]],[\"ix-blind.cjs\",[[1,\"ix-blind\",{\"collapsed\":[1540],\"label\":[1],\"sublabel\":[1],\"icon\":[1],\"variant\":[1]},null,{\"collapsed\":[\"animation\"]}]]],[\"ix-dropdown-header.cjs\",[[1,\"ix-dropdown-header\",{\"label\":[1]}]]],[\"ix-icon-toggle-button.cjs\",[[1,\"ix-icon-toggle-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"icon\":[1],\"pressed\":[4],\"size\":[1],\"disabled\":[516],\"loading\":[4]},null,{\"variant\":[\"onVariantChange\"],\"ghost\":[\"onGhostChange\"],\"outline\":[\"onOutlineChange\"]}]]],[\"ix-modal-loading.cjs\",[[1,\"ix-modal-loading\"]]],[\"ix-split-button-item.cjs\",[[1,\"ix-split-button-item\",{\"icon\":[1],\"label\":[1],\"getDropdownItemElement\":[64]}]]],[\"ix-toggle-button.cjs\",[[1,\"ix-toggle-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[516],\"loading\":[4],\"icon\":[1],\"pressed\":[4]},null,{\"variant\":[\"onVariantChange\"],\"ghost\":[\"onGhostChange\"],\"outline\":[\"onOutlineChange\"]}]]],[\"ix-tree.cjs\",[[1,\"ix-tree\",{\"root\":[1],\"model\":[16],\"renderItem\":[16],\"context\":[1040]},null,{\"model\":[\"modelChange\"]}]]],[\"ix-application.cjs\",[[1,\"ix-application\",{\"theme\":[1],\"themeSystemAppearance\":[4,\"theme-system-appearance\"],\"forceBreakpoint\":[1,\"force-breakpoint\"],\"breakpoints\":[16],\"appSwitchConfig\":[16],\"breakpoint\":[32],\"applicationSidebarSlotted\":[32]},null,{\"breakpoints\":[\"onBreakpointsChange\"],\"theme\":[\"changeTheme\"],\"themeSystemAppearance\":[\"changeTheme\"],\"appSwitchConfig\":[\"onApplicationSidebarChange\"],\"applicationSidebarSlotted\":[\"onApplicationSidebarChange\"]}]]],[\"ix-application-sidebar.cjs\",[[1,\"ix-application-sidebar\",{\"visible\":[32]},[[8,\"application-sidebar-toggle\",\"listenToggleEvent\"]]]]],[\"ix-content.cjs\",[[1,\"ix-content\",{\"isContentHeaderSlotted\":[32]}]]],[\"ix-css-grid.cjs\",[[1,\"ix-css-grid\",{\"templates\":[16],\"currentTemplate\":[32]}]]],[\"ix-css-grid-item.cjs\",[[1,\"ix-css-grid-item\",{\"itemName\":[1,\"item-name\"]}]]],[\"ix-dropdown-quick-actions.cjs\",[[1,\"ix-dropdown-quick-actions\"]]],[\"ix-event-list.cjs\",[[1,\"ix-event-list\",{\"itemHeight\":[8,\"item-height\"],\"compact\":[4],\"animated\":[4],\"chevron\":[4]},null,{\"chevron\":[\"watchChevron\"]}]]],[\"ix-event-list-item.cjs\",[[1,\"ix-event-list-item\",{\"color\":[1],\"itemColor\":[1,\"item-color\"],\"selected\":[4],\"disabled\":[4],\"chevron\":[4]},[[1,\"click\",\"handleItemClick\"]]]]],[\"ix-flip-tile-content.cjs\",[[1,\"ix-flip-tile-content\",{\"contentVisible\":[4,\"content-visible\"]}]]],[\"ix-form-field.cjs\",[[1,\"ix-form-field\",{\"label\":[1]}]]],[\"ix-input-group.cjs\",[[1,\"ix-input-group\",{\"disabled\":[32],\"inputPaddingLeft\":[32],\"inputPaddingRight\":[32]}]]],[\"ix-key-value.cjs\",[[1,\"ix-key-value\",{\"icon\":[1],\"label\":[1],\"labelPosition\":[1,\"label-position\"],\"value\":[1]}]]],[\"ix-key-value-list.cjs\",[[1,\"ix-key-value-list\",{\"striped\":[4]}]]],[\"ix-kpi.cjs\",[[1,\"ix-kpi\",{\"label\":[1],\"value\":[8],\"unit\":[1],\"state\":[1],\"orientation\":[1]}]]],[\"ix-link-button.cjs\",[[1,\"ix-link-button\",{\"disabled\":[4],\"url\":[1],\"target\":[1]}]]],[\"ix-menu-about-item.cjs\",[[1,\"ix-menu-about-item\",{\"label\":[513]},null,{\"label\":[\"watchLabel\"]}]]],[\"ix-menu-settings-item.cjs\",[[1,\"ix-menu-settings-item\",{\"label\":[513]},null,{\"label\":[\"watchLabel\"]}]]],[\"ix-modal.cjs\",[[1,\"ix-modal\",{\"size\":[1],\"animation\":[4],\"backdrop\":[4],\"closeOnBackdropClick\":[4,\"close-on-backdrop-click\"],\"beforeDismiss\":[16],\"centered\":[4],\"keyboard\":[4],\"closeOnEscape\":[4,\"close-on-escape\"],\"modalVisible\":[32],\"showModal\":[64],\"dismissModal\":[64],\"closeModal\":[64]}]]],[\"ix-modal-footer.cjs\",[[1,\"ix-modal-footer\"]]],[\"ix-pane-layout.cjs\",[[1,\"ix-pane-layout\",{\"layout\":[1],\"variant\":[1],\"borderless\":[4],\"isMobile\":[32],\"paneElements\":[32]},[[0,\"slotChanged\",\"onSlotChanged\"],[0,\"hideOnCollapseChanged\",\"onCollapsibleChanged\"],[0,\"variantChanged\",\"onVariantChanged\"]],{\"paneElements\":[\"onPaneElementsChange\"],\"variant\":[\"onVariableChange\"],\"borderless\":[\"onBorderChange\"],\"layout\":[\"onLayoutChange\"],\"isMobile\":[\"onMobileChange\"]}]]],[\"ix-pill.cjs\",[[1,\"ix-pill\",{\"variant\":[513],\"outline\":[4],\"icon\":[1],\"background\":[1],\"color\":[1],\"pillColor\":[1,\"pill-color\"],\"alignLeft\":[4,\"align-left\"]}]]],[\"ix-playground-internal.cjs\",[[2,\"ix-playground-internal\"]]],[\"ix-tile.cjs\",[[1,\"ix-tile\",{\"size\":[1],\"hasHeaderSlot\":[32],\"hasFooterSlot\":[32]}]]],[\"ix-toggle.cjs\",[[1,\"ix-toggle\",{\"checked\":[1540],\"disabled\":[4],\"indeterminate\":[1540],\"textOn\":[1,\"text-on\"],\"textOff\":[1,\"text-off\"],\"textIndeterminate\":[1,\"text-indeterminate\"],\"hideText\":[4,\"hide-text\"]}]]],[\"ix-validation-tooltip.cjs\",[[1,\"ix-validation-tooltip\",{\"message\":[1],\"placement\":[1],\"suppressAutomaticPlacement\":[4,\"suppress-automatic-placement\"],\"isInputValid\":[32],\"tooltipPosition\":[32],\"arrowPosition\":[32]},null,{\"isInputValid\":[\"validationChanged\"]}]]],[\"ix-workflow-step.cjs\",[[1,\"ix-workflow-step\",{\"vertical\":[4],\"disabled\":[4],\"status\":[1],\"clickable\":[4],\"selected\":[4],\"position\":[1],\"iconName\":[32],\"iconColor\":[32]},null,{\"selected\":[\"selectedHandler\"],\"disabled\":[\"watchPropHandler\"],\"status\":[\"watchPropHandler\"]}]]],[\"ix-workflow-steps.cjs\",[[1,\"ix-workflow-steps\",{\"vertical\":[4],\"clickable\":[4],\"selectedIndex\":[2,\"selected-index\"]},[[0,\"selectedChanged\",\"onStepSelectionChanged\"]]]]],[\"ix-dropdown-item.cjs\",[[1,\"ix-dropdown-item\",{\"label\":[1],\"icon\":[1],\"hover\":[4],\"disabled\":[4],\"checked\":[4],\"isSubMenu\":[4,\"is-sub-menu\"],\"suppressChecked\":[4,\"suppress-checked\"],\"emitItemClick\":[64],\"getDropdownItemElement\":[64]}]]],[\"ix-dropdown.cjs\",[[1,\"ix-dropdown\",{\"suppressAutomaticPlacement\":[4,\"suppress-automatic-placement\"],\"show\":[1540],\"trigger\":[8],\"anchor\":[8],\"closeBehavior\":[8,\"close-behavior\"],\"placement\":[1],\"positioningStrategy\":[1,\"positioning-strategy\"],\"header\":[1],\"offset\":[16],\"overwriteDropdownStyle\":[16],\"discoverAllSubmenus\":[4,\"discover-all-submenus\"],\"ignoreRelatedSubmenu\":[4,\"ignore-related-submenu\"],\"discoverSubmenu\":[64],\"updatePosition\":[64]},[[0,\"ix-assign-sub-menu\",\"cacheSubmenuId\"]],{\"show\":[\"changedShow\"],\"trigger\":[\"changedTrigger\"]}]]],[\"ix-icon-button_2.cjs\",[[1,\"ix-icon-button\",{\"a11yLabel\":[1,\"a11y-label\"],\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"oval\":[4],\"icon\":[1],\"size\":[1],\"color\":[1],\"iconColor\":[1,\"icon-color\"],\"disabled\":[4],\"type\":[1],\"loading\":[4]}],[1,\"ix-spinner\",{\"variant\":[1],\"size\":[1],\"hideTrack\":[4,\"hide-track\"]}]]],[\"ix-select.cjs\",[[1,\"ix-select\",{\"selectedIndices\":[1025,\"selected-indices\"],\"value\":[1025],\"allowClear\":[4,\"allow-clear\"],\"mode\":[1],\"editable\":[4],\"disabled\":[4],\"readonly\":[4],\"i18nPlaceholder\":[1,\"i-1-8n-placeholder\"],\"i18nPlaceholderEditable\":[1,\"i-1-8n-placeholder-editable\"],\"i18nSelectListHeader\":[1,\"i-1-8n-select-list-header\"],\"i18nNoMatches\":[1,\"i-1-8n-no-matches\"],\"hideListHeader\":[4,\"hide-list-header\"],\"dropdownShow\":[32],\"selectedLabels\":[32],\"isDropdownEmpty\":[32],\"navigationItem\":[32],\"inputFilterText\":[32],\"inputValue\":[32]},[[0,\"itemClick\",\"onItemClicked\"],[0,\"ix-select-item:labelChange\",\"onLabelChange\"]],{\"selectedIndices\":[\"watchSelectedIndices\"],\"value\":[\"watchValue\"],\"dropdownShow\":[\"watchDropdownShow\"]}]]],[\"ix-time-picker.cjs\",[[1,\"ix-time-picker\",{\"format\":[1],\"corners\":[1],\"standaloneAppearance\":[4,\"standalone-appearance\"],\"individual\":[4],\"showHour\":[4,\"show-hour\"],\"showMinutes\":[4,\"show-minutes\"],\"showSeconds\":[4,\"show-seconds\"],\"time\":[1],\"showTimeReference\":[1028,\"show-time-reference\"],\"timeReference\":[1,\"time-reference\"],\"textSelectTime\":[1,\"text-select-time\"],\"textTime\":[1,\"text-time\"],\"_time\":[32],\"_timeRef\":[32],\"_formattedTime\":[32],\"getCurrentTime\":[64]},null,{\"time\":[\"watchTimePropHandler\"],\"_time\":[\"formatTime\",\"onInternalTimeChange\"]}]]],[\"ix-map-navigation-overlay.cjs\",[[1,\"ix-map-navigation-overlay\",{\"name\":[1],\"icon\":[1],\"color\":[1],\"iconColor\":[1,\"icon-color\"]}]]],[\"ix-toast.cjs\",[[1,\"ix-toast\",{\"type\":[1],\"toastTitle\":[1,\"toast-title\"],\"autoCloseDelay\":[2,\"auto-close-delay\"],\"autoClose\":[4,\"auto-close\"],\"icon\":[1],\"iconColor\":[1,\"icon-color\"],\"progress\":[32],\"touched\":[32]}]]],[\"ix-breadcrumb-item.cjs\",[[1,\"ix-breadcrumb-item\",{\"label\":[1],\"icon\":[1],\"ghost\":[4],\"visible\":[4],\"showChevron\":[4,\"show-chevron\"],\"isDropdownTrigger\":[4,\"is-dropdown-trigger\"],\"a11y\":[32]}]]],[\"ix-tree-item.cjs\",[[1,\"ix-tree-item\",{\"text\":[1],\"hasChildren\":[4,\"has-children\"],\"context\":[16]}]]],[\"ix-typography.cjs\",[[1,\"ix-typography\",{\"format\":[1],\"color\":[1],\"textColor\":[1,\"text-color\"],\"bold\":[4],\"textDecoration\":[1,\"text-decoration\"]}]]],[\"ix-avatar_2.cjs\",[[1,\"ix-avatar\",{\"image\":[1],\"initials\":[1],\"username\":[1],\"extra\":[1],\"isClosestApplicationHeader\":[32],\"hasSlottedElements\":[32]}],[1,\"ix-menu-avatar-item\",{\"icon\":[1],\"label\":[1],\"getDropdownItemElement\":[64]}]]],[\"ix-application-header.cjs\",[[1,\"ix-application-header\",{\"name\":[1],\"showMenu\":[1028,\"show-menu\"],\"breakpoint\":[32],\"menuExpanded\":[32],\"suppressResponsive\":[32],\"hasSlottedElements\":[32],\"applicationLayoutContext\":[32]},null,{\"applicationLayoutContext\":[\"watchApplicationLayoutContext\"],\"suppressResponsive\":[\"watchSuppressResponsive\"]}]]],[\"ix-modal-content_2.cjs\",[[1,\"ix-modal-header\",{\"hideClose\":[4,\"hide-close\"],\"icon\":[1],\"iconColor\":[1,\"icon-color\"]},null,{\"icon\":[\"onIconChange\"]}],[1,\"ix-modal-content\"]]],[\"ix-group-context-menu_2.cjs\",[[1,\"ix-group-context-menu\",{\"showContextMenu\":[32]}],[1,\"ix-group-item\",{\"icon\":[1],\"text\":[1],\"secondaryText\":[1,\"secondary-text\"],\"suppressSelection\":[4,\"suppress-selection\"],\"selected\":[4],\"focusable\":[4],\"index\":[2]},[[1,\"click\",\"clickListen\"]]]]],[\"ix-menu-item.cjs\",[[1,\"ix-menu-item\",{\"label\":[1],\"home\":[4],\"bottom\":[4],\"tabIcon\":[1025,\"tab-icon\"],\"icon\":[1025],\"notifications\":[2],\"active\":[4],\"disabled\":[4],\"isCategory\":[4,\"is-category\"],\"tooltip\":[32],\"menuExpanded\":[32]},null,{\"icon\":[\"onIconChange\"],\"tabIcon\":[\"onTabIconChange\"]}]]],[\"ix-card-accordion_2.cjs\",[[1,\"ix-card-accordion\",{\"collapse\":[4],\"expandContent\":[32]},null,{\"collapse\":[\"onInitialExpandChange\"]}],[1,\"ix-card-title\"]]],[\"ix-divider.cjs\",[[1,\"ix-divider\"]]],[\"ix-menu-expand-icon.cjs\",[[1,\"ix-menu-expand-icon\",{\"ixAriaLabel\":[1,\"ix-aria-label\"],\"expanded\":[516],\"breakpoint\":[513],\"pinned\":[4]}]]],[\"ix-tooltip.cjs\",[[1,\"ix-tooltip\",{\"for\":[1],\"titleContent\":[1,\"title-content\"],\"interactive\":[4],\"placement\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"animationFrame\":[4,\"animation-frame\"],\"visible\":[32],\"showTooltip\":[64],\"hideTooltip\":[64]}]]],[\"ix-tab-item_2.cjs\",[[1,\"ix-tab-item\",{\"selected\":[4],\"disabled\":[4],\"small\":[4],\"icon\":[4],\"rounded\":[4],\"counter\":[2],\"layout\":[1],\"placement\":[1]}],[1,\"ix-tabs\",{\"small\":[4],\"rounded\":[4],\"selected\":[1026],\"layout\":[1],\"placement\":[1],\"totalItems\":[32],\"currentScrollAmount\":[32],\"scrollAmount\":[32],\"scrollActionAmount\":[32],\"showArrowPrevious\":[32],\"showArrowNext\":[32]},[[9,\"resize\",\"onWindowResize\"],[0,\"tabClick\",\"onTabClick\"]],{\"selected\":[\"onSelectedChange\"]}]]],[\"ix-date-time-card.cjs\",[[1,\"ix-date-time-card\",{\"standaloneAppearance\":[8,\"standalone-appearance\"],\"individual\":[4],\"corners\":[1]}]]],[\"ix-filter-chip_2.cjs\",[[1,\"ix-select-item\",{\"label\":[513],\"value\":[520],\"selected\":[4],\"hover\":[4],\"getDropdownItemElement\":[64],\"onItemClick\":[64]},null,{\"label\":[\"labelChange\"]}],[1,\"ix-filter-chip\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ix-card_2.cjs\",[[1,\"ix-card\",{\"variant\":[1],\"selected\":[4]}],[1,\"ix-card-content\"]]],[\"ix-button.cjs\",[[1,\"ix-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[516],\"type\":[1],\"loading\":[4],\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"]}]]],[\"ix-col_4.cjs\",[[1,\"ix-date-picker\",{\"format\":[1],\"range\":[4],\"corners\":[1],\"from\":[1],\"to\":[1],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"textSelectDate\":[1,\"text-select-date\"],\"i18nDone\":[1,\"i18n-done\"],\"weekStartIndex\":[2,\"week-start-index\"],\"locale\":[1],\"individual\":[4],\"eventDelimiter\":[1,\"event-delimiter\"],\"standaloneAppearance\":[4,\"standalone-appearance\"],\"today\":[1],\"currFromDate\":[32],\"currToDate\":[32],\"selectedYear\":[32],\"tempYear\":[32],\"startYear\":[32],\"endYear\":[32],\"selectedMonth\":[32],\"tempMonth\":[32],\"dayNames\":[32],\"monthNames\":[32],\"focusedDay\":[32],\"getCurrentDate\":[64]},null,{\"from\":[\"watchFromPropHandler\"],\"to\":[\"watchToPropHandler\"],\"locale\":[\"onLocaleChange\"]}],[1,\"ix-col\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"]},[[9,\"resize\",\"onResize\"]]],[1,\"ix-layout-grid\",{\"noMargin\":[4,\"no-margin\"],\"gap\":[1],\"columns\":[2]}],[1,\"ix-row\"]]]]"), options);
|
|
22
|
+
return index.bootstrapLazy(JSON.parse("[[\"ix-datetime-picker.cjs\",[[1,\"ix-datetime-picker\",{\"range\":[4],\"showHour\":[4,\"show-hour\"],\"showMinutes\":[4,\"show-minutes\"],\"showSeconds\":[4,\"show-seconds\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"dateFormat\":[1,\"date-format\"],\"timeFormat\":[1,\"time-format\"],\"from\":[1],\"to\":[1],\"time\":[1],\"showTimeReference\":[8,\"show-time-reference\"],\"timeReference\":[1,\"time-reference\"],\"textSelectDate\":[1,\"text-select-date\"],\"i18nDone\":[1,\"i18n-done\"],\"weekStartIndex\":[2,\"week-start-index\"],\"locale\":[1],\"eventDelimiter\":[1,\"event-delimiter\"]}]]],[\"ix-date-dropdown.cjs\",[[1,\"ix-date-dropdown\",{\"disabled\":[4],\"format\":[1],\"range\":[4],\"from\":[1],\"to\":[1],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"dateRangeId\":[1,\"date-range-id\"],\"customRangeAllowed\":[4,\"custom-range-allowed\"],\"dateRangeOptions\":[16],\"i18nCustomItem\":[1,\"i18n-custom-item\"],\"i18nDone\":[1,\"i18n-done\"],\"i18nNoRange\":[1,\"i18n-no-range\"],\"today\":[1],\"selectedDateRangeId\":[32],\"currentRangeValue\":[32],\"getDateRange\":[64]},null,{\"dateRangeId\":[\"onDateRangeIdChange\"],\"to\":[\"onDateRangeIdChange\"],\"from\":[\"onDateRangeIdChange\"],\"dateRangeOptions\":[\"onDateRangeOptionsChange\"],\"disabled\":[\"onDisabledChange\"]}]]],[\"ix-pagination.cjs\",[[1,\"ix-pagination\",{\"advanced\":[4],\"itemCount\":[2,\"item-count\"],\"showItemCount\":[4,\"show-item-count\"],\"count\":[2],\"selectedPage\":[1026,\"selected-page\"],\"i18nPage\":[1,\"i-1-8n-page\"],\"i18nOf\":[1,\"i-1-8n-of\"],\"i18nItems\":[1,\"i-1-8n-items\"]}]]],[\"ix-map-navigation.cjs\",[[1,\"ix-map-navigation\",{\"applicationName\":[1,\"application-name\"],\"navigationTitle\":[1,\"navigation-title\"],\"hideContextMenu\":[4,\"hide-context-menu\"],\"isSidebarOpen\":[32],\"hasContentHeader\":[32],\"toggleSidebar\":[64],\"openOverlay\":[64],\"closeOverlay\":[64]}]]],[\"ix-menu-avatar.cjs\",[[1,\"ix-menu-avatar\",{\"top\":[1],\"bottom\":[1],\"image\":[1],\"initials\":[1],\"i18nLogout\":[1,\"i-1-8n-logout\"],\"showLogoutButton\":[4,\"show-logout-button\"],\"showContextMenu\":[32]}]]],[\"ix-basic-navigation.cjs\",[[1,\"ix-basic-navigation\",{\"applicationName\":[1,\"application-name\"],\"hideHeader\":[4,\"hide-header\"],\"forceBreakpoint\":[1,\"force-breakpoint\"],\"breakpoints\":[16],\"breakpoint\":[32]},null,{\"hideHeader\":[\"onHideHeaderChange\"],\"breakpoints\":[\"onBreakpointsChange\"]}]]],[\"ix-card-list.cjs\",[[1,\"ix-card-list\",{\"label\":[1],\"collapse\":[1028],\"listStyle\":[1,\"list-style\"],\"maxVisibleCards\":[2,\"max-visible-cards\"],\"showAllCount\":[2,\"show-all-count\"],\"suppressOverflowHandling\":[4,\"suppress-overflow-handling\"],\"hideShowAll\":[4,\"hide-show-all\"],\"i18nShowAll\":[1,\"i-1-8n-show-all\"],\"i18nMoreCards\":[1,\"i-1-8n-more-cards\"],\"hasOverflowingElements\":[32],\"numberOfOverflowingElements\":[32],\"numberOfAllChildElements\":[32],\"leftScrollDistance\":[32],\"rightScrollDistance\":[32]},[[9,\"resize\",\"detectOverflow\"]]]]],[\"ix-menu.cjs\",[[1,\"ix-menu\",{\"showSettings\":[1028,\"show-settings\"],\"showAbout\":[1028,\"show-about\"],\"enableToggleTheme\":[4,\"enable-toggle-theme\"],\"enableSettings\":[4,\"enable-settings\"],\"enableMapExpand\":[4,\"enable-map-expand\"],\"applicationName\":[1,\"application-name\"],\"applicationDescription\":[1,\"application-description\"],\"maxVisibleMenuItems\":[2,\"max-visible-menu-items\"],\"i18nExpandSidebar\":[1,\"i-1-8n-expand-sidebar\"],\"expand\":[1540],\"startExpanded\":[4,\"start-expanded\"],\"pinned\":[4],\"i18nLegal\":[1,\"i-1-8n-legal\"],\"i18nSettings\":[1,\"i-1-8n-settings\"],\"i18nToggleTheme\":[1,\"i-1-8n-toggle-theme\"],\"i18nExpand\":[1,\"i-1-8n-expand\"],\"i18nCollapse\":[1,\"i-1-8n-collapse\"],\"showPinned\":[32],\"mapExpand\":[32],\"activeTab\":[32],\"breakpoint\":[32],\"itemsScrollShadowTop\":[32],\"itemsScrollShadowBottom\":[32],\"applicationLayoutContext\":[32],\"toggleMapExpand\":[64],\"toggleMenu\":[64],\"toggleSettings\":[64],\"toggleAbout\":[64]},[[9,\"resize\",\"handleOverflowIndicator\"],[0,\"close\",\"onOverlayClose\"]],{\"pinned\":[\"pinnedChange\"]}]]],[\"ix-menu-category.cjs\",[[1,\"ix-menu-category\",{\"label\":[1],\"icon\":[1],\"notifications\":[2],\"menuExpand\":[32],\"showItems\":[32],\"showDropdown\":[32],\"nestedItems\":[32]},[[8,\"closeOtherCategories\",\"onPointerLeave\"]]]]],[\"ix-application-switch-modal.cjs\",[[1,\"ix-application-switch-modal\",{\"config\":[16]}]]],[\"ix-push-card.cjs\",[[1,\"ix-push-card\",{\"icon\":[1],\"notification\":[1],\"heading\":[1],\"subheading\":[1],\"variant\":[1],\"collapse\":[4]}]]],[\"ix-breadcrumb.cjs\",[[1,\"ix-breadcrumb\",{\"visibleItemCount\":[2,\"visible-item-count\"],\"nextItems\":[16],\"ghost\":[4],\"ariaLabelPreviousButton\":[1,\"aria-label-previous-button\"],\"items\":[32],\"isPreviousDropdownExpanded\":[32]},null,{\"nextItems\":[\"onNextItemsChange\"]}]]],[\"ix-category-filter.cjs\",[[1,\"ix-category-filter\",{\"disabled\":[4],\"readonly\":[4],\"filterState\":[16],\"placeholder\":[1],\"categories\":[16],\"nonSelectableCategories\":[16],\"suggestions\":[16],\"icon\":[1],\"hideIcon\":[4,\"hide-icon\"],\"staticOperator\":[1,\"static-operator\"],\"repeatCategories\":[4,\"repeat-categories\"],\"tmpDisableScrollIntoView\":[4,\"tmp-disable-scroll-into-view\"],\"labelCategories\":[1,\"label-categories\"],\"i18nPlainText\":[1,\"i-1-8n-plain-text\"],\"showDropdown\":[32],\"hasFocus\":[32],\"categoryLogicalOperator\":[32],\"inputValue\":[32],\"category\":[32],\"filterTokens\":[32]},null,{\"filterState\":[\"watchFilterState\"]}]]],[\"ix-dropdown-button.cjs\",[[1,\"ix-dropdown-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[4],\"label\":[1],\"icon\":[1],\"closeBehavior\":[8,\"close-behavior\"],\"placement\":[1]}]]],[\"ix-group.cjs\",[[1,\"ix-group\",{\"suppressHeaderSelection\":[4,\"suppress-header-selection\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"collapsed\":[1540],\"selected\":[1540],\"index\":[1538],\"expandOnHeaderClick\":[4,\"expand-on-header-click\"],\"itemSelected\":[32],\"slotSize\":[32],\"footerVisible\":[32],\"showExpandCollapsedIcon\":[32]},[[0,\"selectedChanged\",\"onItemClicked\"]],{\"selected\":[\"selectedChanged\"]}]]],[\"ix-menu-about.cjs\",[[1,\"ix-menu-about\",{\"activeTabLabel\":[1025,\"active-tab-label\"],\"label\":[1],\"show\":[4],\"items\":[32]},null,{\"activeTabLabel\":[\"updateTab\"]}]]],[\"ix-menu-about-news.cjs\",[[1,\"ix-menu-about-news\",{\"show\":[1540],\"label\":[1],\"i18nShowMore\":[1,\"i-1-8n-show-more\"],\"aboutItemLabel\":[1,\"about-item-label\"],\"offsetBottom\":[2,\"offset-bottom\"],\"expanded\":[4]}]]],[\"ix-menu-settings.cjs\",[[1,\"ix-menu-settings\",{\"activeTabLabel\":[1025,\"active-tab-label\"],\"label\":[1],\"show\":[4],\"items\":[32]},null,{\"activeTabLabel\":[\"updateTab\"]}]]],[\"ix-split-button.cjs\",[[1,\"ix-split-button\",{\"variant\":[1],\"closeBehavior\":[8,\"close-behavior\"],\"outline\":[4],\"ghost\":[4],\"label\":[1],\"icon\":[1],\"splitIcon\":[1,\"split-icon\"],\"disabled\":[4],\"placement\":[1],\"toggle\":[32]}]]],[\"ix-action-card.cjs\",[[1,\"ix-action-card\",{\"variant\":[1],\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"selected\":[4]}]]],[\"ix-content-header.cjs\",[[1,\"ix-content-header\",{\"variant\":[1],\"headerTitle\":[1,\"header-title\"],\"headerSubtitle\":[1,\"header-subtitle\"],\"hasBackButton\":[4,\"has-back-button\"]}]]],[\"ix-empty-state.cjs\",[[1,\"ix-empty-state\",{\"layout\":[1],\"icon\":[1],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"action\":[1]}]]],[\"ix-modal-example.cjs\",[[0,\"ix-modal-example\"]]],[\"ix-pane.cjs\",[[1,\"ix-pane\",{\"heading\":[1],\"variant\":[1],\"hideOnCollapse\":[4,\"hide-on-collapse\"],\"size\":[1],\"borderless\":[4],\"expanded\":[1028],\"composition\":[1025],\"icon\":[1],\"ignoreLayoutSettings\":[4,\"ignore-layout-settings\"],\"isMobile\":[1028,\"is-mobile\"],\"expandIcon\":[32],\"showContent\":[32],\"minimizeIcon\":[32],\"floating\":[32],\"parentWidthPx\":[32],\"parentHeightPx\":[32]},null,{\"isMobile\":[\"onMobileChange\"],\"composition\":[\"onPositionChange\"],\"hideOnCollapse\":[\"onHideOnCollapseChange\"],\"variant\":[\"onVariantChange\"],\"borderless\":[\"onBorderlessChange\"],\"expanded\":[\"onExpandedChange\"],\"parentHeightPx\":[\"onParentSizeChange\"],\"parentWidthPx\":[\"onParentSizeChange\"],\"size\":[\"onSizeChange\"]}]]],[\"ix-toast-container.cjs\",[[1,\"ix-toast-container\",{\"containerId\":[1,\"container-id\"],\"containerClass\":[1,\"container-class\"],\"position\":[1],\"showToast\":[64]},null,{\"position\":[\"onPositionChange\"]}]]],[\"ix-chip.cjs\",[[1,\"ix-chip\",{\"variant\":[513],\"active\":[4],\"closable\":[4],\"icon\":[1],\"background\":[1],\"color\":[1],\"chipColor\":[1,\"chip-color\"],\"outline\":[4]}]]],[\"ix-drawer.cjs\",[[1,\"ix-drawer\",{\"show\":[1028],\"closeOnClickOutside\":[4,\"close-on-click-outside\"],\"fullHeight\":[4,\"full-height\"],\"minWidth\":[2,\"min-width\"],\"maxWidth\":[2,\"max-width\"],\"width\":[8],\"toggleDrawer\":[64]},null,{\"show\":[\"onShowChanged\"]}]]],[\"ix-expanding-search.cjs\",[[1,\"ix-expanding-search\",{\"icon\":[1],\"placeholder\":[1],\"value\":[1025],\"fullWidth\":[4,\"full-width\"],\"isFieldChanged\":[32],\"expanded\":[32],\"hasFocus\":[32]}]]],[\"ix-flip-tile.cjs\",[[1,\"ix-flip-tile\",{\"state\":[1],\"height\":[8],\"width\":[8],\"index\":[32],\"isFlipAnimationActive\":[32]}]]],[\"ix-message-bar.cjs\",[[1,\"ix-message-bar\",{\"type\":[1],\"dismissible\":[4],\"icon\":[32],\"color\":[32]}]]],[\"ix-slider.cjs\",[[1,\"ix-slider\",{\"step\":[2],\"min\":[2],\"max\":[2],\"value\":[2],\"marker\":[16],\"trace\":[4],\"traceReference\":[2,\"trace-reference\"],\"disabled\":[4],\"error\":[8],\"rangeInput\":[32],\"rangeMin\":[32],\"rangeMax\":[32],\"rangeTraceReference\":[32],\"showTooltip\":[32]},null,{\"showTooltip\":[\"onShowTooltipChange\"],\"value\":[\"updateRangeVariables\"],\"max\":[\"updateRangeVariables\"],\"min\":[\"updateRangeVariables\"],\"traceReference\":[\"updateRangeVariables\"]}]]],[\"ix-upload.cjs\",[[1,\"ix-upload\",{\"accept\":[1],\"multiple\":[4],\"multiline\":[4],\"disabled\":[4],\"state\":[1],\"selectFileText\":[1,\"select-file-text\"],\"loadingText\":[1,\"loading-text\"],\"uploadFailedText\":[1,\"upload-failed-text\"],\"uploadSuccessText\":[1,\"upload-success-text\"],\"i18nUploadFile\":[1,\"i-1-8n-upload-file\"],\"i18nUploadDisabled\":[1,\"i-1-8n-upload-disabled\"],\"isFileOver\":[32],\"setFilesToUpload\":[64]}]]],[\"ix-blind.cjs\",[[1,\"ix-blind\",{\"collapsed\":[1540],\"label\":[1],\"sublabel\":[1],\"icon\":[1],\"variant\":[1]},null,{\"collapsed\":[\"animation\"]}]]],[\"ix-dropdown-header.cjs\",[[1,\"ix-dropdown-header\",{\"label\":[1]}]]],[\"ix-icon-toggle-button.cjs\",[[1,\"ix-icon-toggle-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"icon\":[1],\"pressed\":[4],\"size\":[1],\"disabled\":[516],\"loading\":[4]},null,{\"variant\":[\"onVariantChange\"],\"ghost\":[\"onGhostChange\"],\"outline\":[\"onOutlineChange\"]}]]],[\"ix-modal-loading.cjs\",[[1,\"ix-modal-loading\"]]],[\"ix-split-button-item.cjs\",[[1,\"ix-split-button-item\",{\"icon\":[1],\"label\":[1],\"getDropdownItemElement\":[64]}]]],[\"ix-toggle-button.cjs\",[[1,\"ix-toggle-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[516],\"loading\":[4],\"icon\":[1],\"pressed\":[4]},null,{\"variant\":[\"onVariantChange\"],\"ghost\":[\"onGhostChange\"],\"outline\":[\"onOutlineChange\"]}]]],[\"ix-tree.cjs\",[[1,\"ix-tree\",{\"root\":[1],\"model\":[16],\"renderItem\":[16],\"context\":[1040]},null,{\"model\":[\"modelChange\"]}]]],[\"ix-application.cjs\",[[1,\"ix-application\",{\"theme\":[1],\"themeSystemAppearance\":[4,\"theme-system-appearance\"],\"forceBreakpoint\":[1,\"force-breakpoint\"],\"breakpoints\":[16],\"appSwitchConfig\":[16],\"breakpoint\":[32],\"applicationSidebarSlotted\":[32]},null,{\"breakpoints\":[\"onBreakpointsChange\"],\"theme\":[\"changeTheme\"],\"themeSystemAppearance\":[\"changeTheme\"],\"appSwitchConfig\":[\"onApplicationSidebarChange\"],\"applicationSidebarSlotted\":[\"onApplicationSidebarChange\"]}]]],[\"ix-application-sidebar.cjs\",[[1,\"ix-application-sidebar\",{\"visible\":[32]},[[8,\"application-sidebar-toggle\",\"listenToggleEvent\"]]]]],[\"ix-content.cjs\",[[1,\"ix-content\",{\"isContentHeaderSlotted\":[32]}]]],[\"ix-css-grid.cjs\",[[1,\"ix-css-grid\",{\"templates\":[16],\"currentTemplate\":[32]}]]],[\"ix-css-grid-item.cjs\",[[1,\"ix-css-grid-item\",{\"itemName\":[1,\"item-name\"]}]]],[\"ix-dropdown-quick-actions.cjs\",[[1,\"ix-dropdown-quick-actions\"]]],[\"ix-event-list.cjs\",[[1,\"ix-event-list\",{\"itemHeight\":[8,\"item-height\"],\"compact\":[4],\"animated\":[4],\"chevron\":[4]},null,{\"chevron\":[\"watchChevron\"]}]]],[\"ix-event-list-item.cjs\",[[1,\"ix-event-list-item\",{\"color\":[1],\"itemColor\":[1,\"item-color\"],\"selected\":[4],\"disabled\":[4],\"chevron\":[4]},[[1,\"click\",\"handleItemClick\"]]]]],[\"ix-flip-tile-content.cjs\",[[1,\"ix-flip-tile-content\",{\"contentVisible\":[4,\"content-visible\"]}]]],[\"ix-form-field.cjs\",[[1,\"ix-form-field\",{\"label\":[1]}]]],[\"ix-input-group.cjs\",[[1,\"ix-input-group\",{\"disabled\":[32],\"inputPaddingLeft\":[32],\"inputPaddingRight\":[32]}]]],[\"ix-key-value.cjs\",[[1,\"ix-key-value\",{\"icon\":[1],\"label\":[1],\"labelPosition\":[1,\"label-position\"],\"value\":[1]}]]],[\"ix-key-value-list.cjs\",[[1,\"ix-key-value-list\",{\"striped\":[4]}]]],[\"ix-kpi.cjs\",[[1,\"ix-kpi\",{\"label\":[1],\"value\":[8],\"unit\":[1],\"state\":[1],\"orientation\":[1]}]]],[\"ix-link-button.cjs\",[[1,\"ix-link-button\",{\"disabled\":[4],\"url\":[1],\"target\":[1]}]]],[\"ix-menu-about-item.cjs\",[[1,\"ix-menu-about-item\",{\"label\":[513]},null,{\"label\":[\"watchLabel\"]}]]],[\"ix-menu-settings-item.cjs\",[[1,\"ix-menu-settings-item\",{\"label\":[513]},null,{\"label\":[\"watchLabel\"]}]]],[\"ix-modal.cjs\",[[1,\"ix-modal\",{\"size\":[1],\"animation\":[4],\"backdrop\":[4],\"closeOnBackdropClick\":[4,\"close-on-backdrop-click\"],\"beforeDismiss\":[16],\"centered\":[4],\"keyboard\":[4],\"closeOnEscape\":[4,\"close-on-escape\"],\"modalVisible\":[32],\"showModal\":[64],\"dismissModal\":[64],\"closeModal\":[64]}]]],[\"ix-modal-footer.cjs\",[[1,\"ix-modal-footer\"]]],[\"ix-pane-layout.cjs\",[[1,\"ix-pane-layout\",{\"layout\":[1],\"variant\":[1],\"borderless\":[4],\"isMobile\":[32],\"paneElements\":[32]},[[0,\"slotChanged\",\"onSlotChanged\"],[0,\"hideOnCollapseChanged\",\"onCollapsibleChanged\"],[0,\"variantChanged\",\"onVariantChanged\"]],{\"paneElements\":[\"onPaneElementsChange\"],\"variant\":[\"onVariableChange\"],\"borderless\":[\"onBorderChange\"],\"layout\":[\"onLayoutChange\"],\"isMobile\":[\"onMobileChange\"]}]]],[\"ix-pill.cjs\",[[1,\"ix-pill\",{\"variant\":[513],\"outline\":[4],\"icon\":[1],\"background\":[1],\"color\":[1],\"pillColor\":[1,\"pill-color\"],\"alignLeft\":[4,\"align-left\"]}]]],[\"ix-playground-internal.cjs\",[[2,\"ix-playground-internal\"]]],[\"ix-tile.cjs\",[[1,\"ix-tile\",{\"size\":[1],\"hasHeaderSlot\":[32],\"hasFooterSlot\":[32]}]]],[\"ix-toggle.cjs\",[[1,\"ix-toggle\",{\"checked\":[1540],\"disabled\":[4],\"indeterminate\":[1540],\"textOn\":[1,\"text-on\"],\"textOff\":[1,\"text-off\"],\"textIndeterminate\":[1,\"text-indeterminate\"],\"hideText\":[4,\"hide-text\"]}]]],[\"ix-validation-tooltip.cjs\",[[1,\"ix-validation-tooltip\",{\"message\":[1],\"placement\":[1],\"suppressAutomaticPlacement\":[4,\"suppress-automatic-placement\"],\"isInputValid\":[32],\"tooltipPosition\":[32],\"arrowPosition\":[32]},null,{\"isInputValid\":[\"validationChanged\"]}]]],[\"ix-workflow-step.cjs\",[[1,\"ix-workflow-step\",{\"vertical\":[4],\"disabled\":[4],\"status\":[1],\"clickable\":[4],\"selected\":[4],\"position\":[1],\"iconName\":[32],\"iconColor\":[32]},null,{\"selected\":[\"selectedHandler\"],\"disabled\":[\"watchPropHandler\"],\"status\":[\"watchPropHandler\"]}]]],[\"ix-workflow-steps.cjs\",[[1,\"ix-workflow-steps\",{\"vertical\":[4],\"clickable\":[4],\"selectedIndex\":[2,\"selected-index\"]},[[0,\"selectedChanged\",\"onStepSelectionChanged\"]]]]],[\"ix-dropdown-item.cjs\",[[1,\"ix-dropdown-item\",{\"label\":[1],\"icon\":[1],\"hover\":[4],\"disabled\":[4],\"checked\":[4],\"isSubMenu\":[4,\"is-sub-menu\"],\"suppressChecked\":[4,\"suppress-checked\"],\"emitItemClick\":[64],\"getDropdownItemElement\":[64]}]]],[\"ix-dropdown.cjs\",[[1,\"ix-dropdown\",{\"suppressAutomaticPlacement\":[4,\"suppress-automatic-placement\"],\"show\":[1540],\"trigger\":[1],\"anchor\":[1],\"closeBehavior\":[8,\"close-behavior\"],\"placement\":[1],\"positioningStrategy\":[1,\"positioning-strategy\"],\"header\":[1],\"offset\":[16],\"overwriteDropdownStyle\":[16],\"discoverAllSubmenus\":[4,\"discover-all-submenus\"],\"ignoreRelatedSubmenu\":[4,\"ignore-related-submenu\"],\"discoverSubmenu\":[64],\"updatePosition\":[64]},[[0,\"ix-assign-sub-menu\",\"cacheSubmenuId\"]],{\"show\":[\"changedShow\"],\"trigger\":[\"changedTrigger\"]}]]],[\"ix-icon-button_2.cjs\",[[1,\"ix-icon-button\",{\"a11yLabel\":[1,\"a11y-label\"],\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"oval\":[4],\"icon\":[1],\"size\":[1],\"color\":[1],\"iconColor\":[1,\"icon-color\"],\"disabled\":[4],\"type\":[1],\"loading\":[4]}],[1,\"ix-spinner\",{\"variant\":[1],\"size\":[1],\"hideTrack\":[4,\"hide-track\"]}]]],[\"ix-select.cjs\",[[1,\"ix-select\",{\"selectedIndices\":[1025,\"selected-indices\"],\"value\":[1025],\"allowClear\":[4,\"allow-clear\"],\"mode\":[1],\"editable\":[4],\"disabled\":[4],\"readonly\":[4],\"i18nPlaceholder\":[1,\"i-1-8n-placeholder\"],\"i18nPlaceholderEditable\":[1,\"i-1-8n-placeholder-editable\"],\"i18nSelectListHeader\":[1,\"i-1-8n-select-list-header\"],\"i18nNoMatches\":[1,\"i-1-8n-no-matches\"],\"hideListHeader\":[4,\"hide-list-header\"],\"dropdownShow\":[32],\"selectedLabels\":[32],\"isDropdownEmpty\":[32],\"navigationItem\":[32],\"inputFilterText\":[32],\"inputValue\":[32]},[[0,\"itemClick\",\"onItemClicked\"],[0,\"ix-select-item:labelChange\",\"onLabelChange\"]],{\"selectedIndices\":[\"watchSelectedIndices\"],\"value\":[\"watchValue\"],\"dropdownShow\":[\"watchDropdownShow\"]}]]],[\"ix-time-picker.cjs\",[[1,\"ix-time-picker\",{\"format\":[1],\"corners\":[1],\"standaloneAppearance\":[4,\"standalone-appearance\"],\"individual\":[4],\"showHour\":[4,\"show-hour\"],\"showMinutes\":[4,\"show-minutes\"],\"showSeconds\":[4,\"show-seconds\"],\"time\":[1],\"showTimeReference\":[1028,\"show-time-reference\"],\"timeReference\":[1,\"time-reference\"],\"textSelectTime\":[1,\"text-select-time\"],\"textTime\":[1,\"text-time\"],\"_time\":[32],\"_timeRef\":[32],\"_formattedTime\":[32],\"getCurrentTime\":[64]},null,{\"time\":[\"watchTimePropHandler\"],\"_time\":[\"formatTime\",\"onInternalTimeChange\"]}]]],[\"ix-map-navigation-overlay.cjs\",[[1,\"ix-map-navigation-overlay\",{\"name\":[1],\"icon\":[1],\"color\":[1],\"iconColor\":[1,\"icon-color\"]}]]],[\"ix-toast.cjs\",[[1,\"ix-toast\",{\"type\":[1],\"toastTitle\":[1,\"toast-title\"],\"autoCloseDelay\":[2,\"auto-close-delay\"],\"autoClose\":[4,\"auto-close\"],\"icon\":[1],\"iconColor\":[1,\"icon-color\"],\"progress\":[32],\"touched\":[32]}]]],[\"ix-breadcrumb-item.cjs\",[[1,\"ix-breadcrumb-item\",{\"label\":[1],\"icon\":[1],\"ghost\":[4],\"visible\":[4],\"showChevron\":[4,\"show-chevron\"],\"isDropdownTrigger\":[4,\"is-dropdown-trigger\"],\"a11y\":[32]}]]],[\"ix-tree-item.cjs\",[[1,\"ix-tree-item\",{\"text\":[1],\"hasChildren\":[4,\"has-children\"],\"context\":[16]}]]],[\"ix-typography.cjs\",[[1,\"ix-typography\",{\"format\":[1],\"color\":[1],\"textColor\":[1,\"text-color\"],\"bold\":[4],\"textDecoration\":[1,\"text-decoration\"]}]]],[\"ix-avatar_2.cjs\",[[1,\"ix-avatar\",{\"image\":[1],\"initials\":[1],\"username\":[1],\"extra\":[1],\"isClosestApplicationHeader\":[32],\"hasSlottedElements\":[32]}],[1,\"ix-menu-avatar-item\",{\"icon\":[1],\"label\":[1],\"getDropdownItemElement\":[64]}]]],[\"ix-application-header.cjs\",[[1,\"ix-application-header\",{\"name\":[1],\"showMenu\":[1028,\"show-menu\"],\"breakpoint\":[32],\"menuExpanded\":[32],\"suppressResponsive\":[32],\"hasSlottedElements\":[32],\"applicationLayoutContext\":[32]},null,{\"applicationLayoutContext\":[\"watchApplicationLayoutContext\"],\"suppressResponsive\":[\"watchSuppressResponsive\"]}]]],[\"ix-modal-content_2.cjs\",[[1,\"ix-modal-header\",{\"hideClose\":[4,\"hide-close\"],\"icon\":[1],\"iconColor\":[1,\"icon-color\"]},null,{\"icon\":[\"onIconChange\"]}],[1,\"ix-modal-content\"]]],[\"ix-group-context-menu_2.cjs\",[[1,\"ix-group-context-menu\",{\"showContextMenu\":[32]}],[1,\"ix-group-item\",{\"icon\":[1],\"text\":[1],\"secondaryText\":[1,\"secondary-text\"],\"suppressSelection\":[4,\"suppress-selection\"],\"selected\":[4],\"focusable\":[4],\"index\":[2]},[[1,\"click\",\"clickListen\"]]]]],[\"ix-menu-item.cjs\",[[1,\"ix-menu-item\",{\"label\":[1],\"home\":[4],\"bottom\":[4],\"tabIcon\":[1025,\"tab-icon\"],\"icon\":[1025],\"notifications\":[2],\"active\":[4],\"disabled\":[4],\"isCategory\":[4,\"is-category\"],\"tooltip\":[32],\"menuExpanded\":[32]},null,{\"icon\":[\"onIconChange\"],\"tabIcon\":[\"onTabIconChange\"]}]]],[\"ix-card-accordion_2.cjs\",[[1,\"ix-card-accordion\",{\"collapse\":[4],\"expandContent\":[32]},null,{\"collapse\":[\"onInitialExpandChange\"]}],[1,\"ix-card-title\"]]],[\"ix-divider.cjs\",[[1,\"ix-divider\"]]],[\"ix-menu-expand-icon.cjs\",[[1,\"ix-menu-expand-icon\",{\"ixAriaLabel\":[1,\"ix-aria-label\"],\"expanded\":[516],\"breakpoint\":[513],\"pinned\":[4]}]]],[\"ix-tooltip.cjs\",[[1,\"ix-tooltip\",{\"for\":[1],\"titleContent\":[1,\"title-content\"],\"interactive\":[4],\"placement\":[1],\"showDelay\":[2,\"show-delay\"],\"hideDelay\":[2,\"hide-delay\"],\"animationFrame\":[4,\"animation-frame\"],\"visible\":[32],\"showTooltip\":[64],\"hideTooltip\":[64]}]]],[\"ix-tab-item_2.cjs\",[[1,\"ix-tab-item\",{\"selected\":[4],\"disabled\":[4],\"small\":[4],\"icon\":[4],\"rounded\":[4],\"counter\":[2],\"layout\":[1],\"placement\":[1]}],[1,\"ix-tabs\",{\"small\":[4],\"rounded\":[4],\"selected\":[1026],\"layout\":[1],\"placement\":[1],\"totalItems\":[32],\"currentScrollAmount\":[32],\"scrollAmount\":[32],\"scrollActionAmount\":[32],\"showArrowPrevious\":[32],\"showArrowNext\":[32]},[[9,\"resize\",\"onWindowResize\"],[0,\"tabClick\",\"onTabClick\"]],{\"selected\":[\"onSelectedChange\"]}]]],[\"ix-date-time-card.cjs\",[[1,\"ix-date-time-card\",{\"standaloneAppearance\":[8,\"standalone-appearance\"],\"individual\":[4],\"corners\":[1]}]]],[\"ix-filter-chip_2.cjs\",[[1,\"ix-select-item\",{\"label\":[513],\"value\":[520],\"selected\":[4],\"hover\":[4],\"getDropdownItemElement\":[64],\"onItemClick\":[64]},null,{\"label\":[\"labelChange\"]}],[1,\"ix-filter-chip\",{\"disabled\":[4],\"readonly\":[4]}]]],[\"ix-card_2.cjs\",[[1,\"ix-card\",{\"variant\":[1],\"selected\":[4]}],[1,\"ix-card-content\"]]],[\"ix-button.cjs\",[[1,\"ix-button\",{\"variant\":[1],\"outline\":[4],\"ghost\":[4],\"disabled\":[516],\"type\":[1],\"loading\":[4],\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"]}]]],[\"ix-col_4.cjs\",[[1,\"ix-date-picker\",{\"format\":[1],\"range\":[4],\"corners\":[1],\"from\":[1],\"to\":[1],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"textSelectDate\":[1,\"text-select-date\"],\"i18nDone\":[1,\"i18n-done\"],\"weekStartIndex\":[2,\"week-start-index\"],\"locale\":[1],\"individual\":[4],\"eventDelimiter\":[1,\"event-delimiter\"],\"standaloneAppearance\":[4,\"standalone-appearance\"],\"today\":[1],\"currFromDate\":[32],\"currToDate\":[32],\"selectedYear\":[32],\"tempYear\":[32],\"startYear\":[32],\"endYear\":[32],\"selectedMonth\":[32],\"tempMonth\":[32],\"dayNames\":[32],\"monthNames\":[32],\"focusedDay\":[32],\"getCurrentDate\":[64]},null,{\"from\":[\"watchFromPropHandler\"],\"to\":[\"watchToPropHandler\"],\"locale\":[\"onLocaleChange\"]}],[1,\"ix-col\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"]},[[9,\"resize\",\"onResize\"]]],[1,\"ix-layout-grid\",{\"noMargin\":[4,\"no-margin\"],\"gap\":[1],\"columns\":[2]}],[1,\"ix-row\"]]]]"), options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -355,7 +355,7 @@ export class Dropdown {
|
|
|
355
355
|
this.applyDropdownPosition();
|
|
356
356
|
}
|
|
357
357
|
render() {
|
|
358
|
-
return (h(Host, { key: '
|
|
358
|
+
return (h(Host, { key: '94574fc6f58e0c00c7b8eed80c4b292e4cbf87e7', "data-ix-dropdown": this.localUId, class: {
|
|
359
359
|
'dropdown-menu': true,
|
|
360
360
|
show: this.show,
|
|
361
361
|
overflow: true,
|
|
@@ -363,7 +363,7 @@ export class Dropdown {
|
|
|
363
363
|
margin: '0',
|
|
364
364
|
minWidth: '0px',
|
|
365
365
|
position: this.positioningStrategy,
|
|
366
|
-
}, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '
|
|
366
|
+
}, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '842c5e00d9ff0b676560d0dc7a9458410a373d43', style: { display: 'contents' } }, this.header && h("div", { key: '43d4162e095c67fe85d4e78926ac154b1ac2a845', class: "dropdown-header" }, this.header), this.show && h("slot", { key: 'f82884e6f6801afe404a937c43e02bd4fb50123a' }))));
|
|
367
367
|
}
|
|
368
368
|
static get is() { return "ix-dropdown"; }
|
|
369
369
|
static get encapsulation() { return "shadow"; }
|
|
@@ -419,16 +419,16 @@ export class Dropdown {
|
|
|
419
419
|
"defaultValue": "false"
|
|
420
420
|
},
|
|
421
421
|
"trigger": {
|
|
422
|
-
"type": "
|
|
422
|
+
"type": "string",
|
|
423
423
|
"mutable": false,
|
|
424
424
|
"complexType": {
|
|
425
425
|
"original": "ElementReference",
|
|
426
|
-
"resolved": "
|
|
426
|
+
"resolved": "HTMLElement | Promise<HTMLElement> | string",
|
|
427
427
|
"references": {
|
|
428
428
|
"ElementReference": {
|
|
429
429
|
"location": "import",
|
|
430
|
-
"path": "src/components",
|
|
431
|
-
"id": "src/components.
|
|
430
|
+
"path": "src/components/utils/element-reference",
|
|
431
|
+
"id": "src/components/utils/element-reference.ts::ElementReference"
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
},
|
|
@@ -442,16 +442,16 @@ export class Dropdown {
|
|
|
442
442
|
"reflect": false
|
|
443
443
|
},
|
|
444
444
|
"anchor": {
|
|
445
|
-
"type": "
|
|
445
|
+
"type": "string",
|
|
446
446
|
"mutable": false,
|
|
447
447
|
"complexType": {
|
|
448
448
|
"original": "ElementReference",
|
|
449
|
-
"resolved": "
|
|
449
|
+
"resolved": "HTMLElement | Promise<HTMLElement> | string",
|
|
450
450
|
"references": {
|
|
451
451
|
"ElementReference": {
|
|
452
452
|
"location": "import",
|
|
453
|
-
"path": "src/components",
|
|
454
|
-
"id": "src/components.
|
|
453
|
+
"path": "src/components/utils/element-reference",
|
|
454
|
+
"id": "src/components/utils/element-reference.ts::ElementReference"
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EAEf,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAEL,kBAAkB,EAElB,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0BAA0B,GAE3B,MAAM,oCAAoC,CAAC;AAG5C,IAAI,UAAU,GAAG,CAAC,CAAC;AAOnB,MAAM,OAAO,QAAQ;;QAsFX,aAAQ,GAAG,YAAY,UAAU,EAAE,EAAE,CAAC;QACtC,oBAAe,GAAa,EAAE,CAAC;QAI/B,iBAAY,GAAI,IAAI,gBAAgB,CAAC,GAAG,EAAE;YAChD,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC9B,IAAI,CAAC,oBAAoB,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC;YAC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;;;;;;;;;;;;;;CACF","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\nimport {\n addDisposableEventListener,\n DisposableEventListener,\n} from '../utils/disposable-event-listener';\nimport { ElementReference } from 'src/components';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger?: ElementReference;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor?: ElementReference;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset?: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle?: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /** @internal */\n @Prop() ignoreRelatedSubmenu = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged!: EventEmitter<boolean>;\n\n private autoUpdateCleanup?: () => void;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController?: ArrowFocusController;\n\n private itemObserver? = new MutationObserver(() => {\n if (this.arrowFocusController) {\n this.arrowFocusController.items = this.dropdownItems;\n }\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.arrowFocusController) {\n this.arrowFocusController?.disconnect();\n this.arrowFocusController = undefined;\n }\n\n if (this.itemObserver) {\n this.itemObserver.disconnect();\n this.itemObserver = undefined;\n }\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n this.disposeClickListener = undefined;\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n this.disposeKeyListener = undefined;\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot!.querySelector('slot');\n }\n\n private disposeClickListener?: DisposableEventListener;\n private disposeKeyListener?: DisposableEventListener;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: Event) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n ((event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }) as EventListener\n );\n }\n\n private async registerListener(element: ElementReference) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(element: ElementReference) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element?: Element) {\n if (!element) {\n return undefined;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(element: ElementReference): Promise<Element | undefined> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return Promise.resolve(undefined);\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n const el = document.querySelector(selector);\n if (el !== null) {\n return resolve(el);\n }\n\n const observer = new MutationObserver(() => {\n const el = document.querySelector(selector);\n if (el) {\n resolve(el);\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n private async resolveAnchorElement() {\n if (this.anchor) {\n this.anchorElement = await this.resolveElement(this.anchor);\n } else if (this.trigger) {\n this.anchorElement = await this.resolveElement(this.trigger);\n }\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n await this.resolveAnchorElement();\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.hostElement,\n (index) => this.focusDropdownItem(index)\n );\n\n this.itemObserver?.observe(this.hostElement, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.destroyAutoUpdate();\n this.arrowFocusController?.disconnect();\n this.itemObserver?.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: ElementReference) {\n this.registerListener(newTriggerValue);\n }\n\n private destroyAutoUpdate() {\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware?.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...(positionConfig.middleware?.filter(Boolean) || []),\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n this.destroyAutoUpdate();\n\n if (!this.anchorElement) {\n return;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.hostElement,\n async () => {\n if (this.anchorElement) {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.hostElement,\n positionConfig\n );\n Object.assign(this.hostElement.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(\n computeResponse.x\n )}px,${Math.round(computeResponse.y)}px)`,\n });\n }\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.hostElement,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.hostElement.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n const button =\n this.dropdownItems[index]?.shadowRoot?.querySelector('button');\n\n if (button) {\n button.focus();\n }\n });\n }\n\n async componentDidLoad() {\n if (!this.trigger) {\n return;\n }\n\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n await this.resolveAnchorElement();\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n const target = dropdownController.pathIncludesTrigger(event.composedPath());\n if (target) {\n if (target !== this.triggerElement) {\n event.preventDefault();\n }\n\n if (this.isTriggerElement(target)) {\n if (this.closeBehavior === 'outside') {\n event.preventDefault();\n }\n return;\n }\n }\n\n if (\n !event.defaultPrevented &&\n (this.closeBehavior === 'inside' || this.closeBehavior === 'both')\n ) {\n dropdownController.dismissAll([this.getId()], this.ignoreRelatedSubmenu);\n return;\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n {this.show && <slot></slot>}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EAEf,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,GACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,E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;YAE7D,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;gBAChC,IAAI,CAAC,MAAM,IAAI,4DAAK,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,MAAM,CAAO;gBAC/D,IAAI,CAAC,IAAI,IAAI,8DAAa,CACvB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\nimport {\n addDisposableEventListener,\n DisposableEventListener,\n} from '../utils/disposable-event-listener';\nimport { ElementReference } from 'src/components/utils/element-reference';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger?: ElementReference;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor?: ElementReference;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset?: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle?: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /** @internal */\n @Prop() ignoreRelatedSubmenu = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged!: EventEmitter<boolean>;\n\n private autoUpdateCleanup?: () => void;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController?: ArrowFocusController;\n\n private itemObserver? = new MutationObserver(() => {\n if (this.arrowFocusController) {\n this.arrowFocusController.items = this.dropdownItems;\n }\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.arrowFocusController) {\n this.arrowFocusController?.disconnect();\n this.arrowFocusController = undefined;\n }\n\n if (this.itemObserver) {\n this.itemObserver.disconnect();\n this.itemObserver = undefined;\n }\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n this.disposeClickListener = undefined;\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n this.disposeKeyListener = undefined;\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot!.querySelector('slot');\n }\n\n private disposeClickListener?: DisposableEventListener;\n private disposeKeyListener?: DisposableEventListener;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: Event) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n ((event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }) as EventListener\n );\n }\n\n private async registerListener(element: ElementReference) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(element: ElementReference) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element?: Element) {\n if (!element) {\n return undefined;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(element: ElementReference): Promise<Element | undefined> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return Promise.resolve(undefined);\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n const el = document.querySelector(selector);\n if (el !== null) {\n return resolve(el);\n }\n\n const observer = new MutationObserver(() => {\n const el = document.querySelector(selector);\n if (el) {\n resolve(el);\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n private async resolveAnchorElement() {\n if (this.anchor) {\n this.anchorElement = await this.resolveElement(this.anchor);\n } else if (this.trigger) {\n this.anchorElement = await this.resolveElement(this.trigger);\n }\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n await this.resolveAnchorElement();\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.hostElement,\n (index) => this.focusDropdownItem(index)\n );\n\n this.itemObserver?.observe(this.hostElement, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.destroyAutoUpdate();\n this.arrowFocusController?.disconnect();\n this.itemObserver?.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: ElementReference) {\n this.registerListener(newTriggerValue);\n }\n\n private destroyAutoUpdate() {\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware?.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...(positionConfig.middleware?.filter(Boolean) || []),\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n this.destroyAutoUpdate();\n\n if (!this.anchorElement) {\n return;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.hostElement,\n async () => {\n if (this.anchorElement) {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.hostElement,\n positionConfig\n );\n Object.assign(this.hostElement.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(\n computeResponse.x\n )}px,${Math.round(computeResponse.y)}px)`,\n });\n }\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.hostElement,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.hostElement.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n const button =\n this.dropdownItems[index]?.shadowRoot?.querySelector('button');\n\n if (button) {\n button.focus();\n }\n });\n }\n\n async componentDidLoad() {\n if (!this.trigger) {\n return;\n }\n\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n await this.resolveAnchorElement();\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n const target = dropdownController.pathIncludesTrigger(event.composedPath());\n if (target) {\n if (target !== this.triggerElement) {\n event.preventDefault();\n }\n\n if (this.isTriggerElement(target)) {\n if (this.closeBehavior === 'outside') {\n event.preventDefault();\n }\n return;\n }\n }\n\n if (\n !event.defaultPrevented &&\n (this.closeBehavior === 'inside' || this.closeBehavior === 'both')\n ) {\n dropdownController.dismissAll([this.getId()], this.ignoreRelatedSubmenu);\n return;\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n {this.show && <slot></slot>}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -353,7 +353,7 @@ const Dropdown = class {
|
|
|
353
353
|
this.applyDropdownPosition();
|
|
354
354
|
}
|
|
355
355
|
render() {
|
|
356
|
-
return (h(Host, { key: '
|
|
356
|
+
return (h(Host, { key: '94574fc6f58e0c00c7b8eed80c4b292e4cbf87e7', "data-ix-dropdown": this.localUId, class: {
|
|
357
357
|
'dropdown-menu': true,
|
|
358
358
|
show: this.show,
|
|
359
359
|
overflow: true,
|
|
@@ -361,7 +361,7 @@ const Dropdown = class {
|
|
|
361
361
|
margin: '0',
|
|
362
362
|
minWidth: '0px',
|
|
363
363
|
position: this.positioningStrategy,
|
|
364
|
-
}, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '
|
|
364
|
+
}, role: "list", onClick: (event) => this.onDropdownClick(event) }, h("div", { key: '842c5e00d9ff0b676560d0dc7a9458410a373d43', style: { display: 'contents' } }, this.header && h("div", { key: '43d4162e095c67fe85d4e78926ac154b1ac2a845', class: "dropdown-header" }, this.header), this.show && h("slot", { key: 'f82884e6f6801afe404a937c43e02bd4fb50123a' }))));
|
|
365
365
|
}
|
|
366
366
|
get hostElement() { return getElement(this); }
|
|
367
367
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ix-dropdown.entry.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,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MAAM,CAAO,EAC/D,IAAI,CAAC,IAAI,IAAI,8DAAa,CACvB,CACD,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/dropdown/dropdown.scss?tag=ix-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n\n@import 'legacy/mixins/fonts';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n background-color: var(--theme-color-2);\n border-radius: var(--theme-default-border-radius);\n @include ix-component;\n min-width: 0px;\n z-index: var(--theme-z-index-dropdown);\n box-shadow: var(--theme-shadow-4);\n\n padding: 0.25rem 0px;\n\n .dropdown-header {\n display: flex;\n align-items: center;\n height: $large-control-height;\n color: var(--theme-menu-header--color);\n padding: 0 $default-space;\n }\n}\n\n:host(.overflow) {\n max-height: 50vh;\n overflow-y: auto;\n}\n\n:host(:not(.show)) {\n display: none;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\nimport {\n addDisposableEventListener,\n DisposableEventListener,\n} from '../utils/disposable-event-listener';\nimport { ElementReference } from 'src/components';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger?: ElementReference;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor?: ElementReference;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset?: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle?: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /** @internal */\n @Prop() ignoreRelatedSubmenu = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged!: EventEmitter<boolean>;\n\n private autoUpdateCleanup?: () => void;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController?: ArrowFocusController;\n\n private itemObserver? = new MutationObserver(() => {\n if (this.arrowFocusController) {\n this.arrowFocusController.items = this.dropdownItems;\n }\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.arrowFocusController) {\n this.arrowFocusController?.disconnect();\n this.arrowFocusController = undefined;\n }\n\n if (this.itemObserver) {\n this.itemObserver.disconnect();\n this.itemObserver = undefined;\n }\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n this.disposeClickListener = undefined;\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n this.disposeKeyListener = undefined;\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot!.querySelector('slot');\n }\n\n private disposeClickListener?: DisposableEventListener;\n private disposeKeyListener?: DisposableEventListener;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: Event) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n ((event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }) as EventListener\n );\n }\n\n private async registerListener(element: ElementReference) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(element: ElementReference) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element?: Element) {\n if (!element) {\n return undefined;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(element: ElementReference): Promise<Element | undefined> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return Promise.resolve(undefined);\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n const el = document.querySelector(selector);\n if (el !== null) {\n return resolve(el);\n }\n\n const observer = new MutationObserver(() => {\n const el = document.querySelector(selector);\n if (el) {\n resolve(el);\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n private async resolveAnchorElement() {\n if (this.anchor) {\n this.anchorElement = await this.resolveElement(this.anchor);\n } else if (this.trigger) {\n this.anchorElement = await this.resolveElement(this.trigger);\n }\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n await this.resolveAnchorElement();\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.hostElement,\n (index) => this.focusDropdownItem(index)\n );\n\n this.itemObserver?.observe(this.hostElement, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.destroyAutoUpdate();\n this.arrowFocusController?.disconnect();\n this.itemObserver?.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: ElementReference) {\n this.registerListener(newTriggerValue);\n }\n\n private destroyAutoUpdate() {\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware?.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...(positionConfig.middleware?.filter(Boolean) || []),\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n this.destroyAutoUpdate();\n\n if (!this.anchorElement) {\n return;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.hostElement,\n async () => {\n if (this.anchorElement) {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.hostElement,\n positionConfig\n );\n Object.assign(this.hostElement.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(\n computeResponse.x\n )}px,${Math.round(computeResponse.y)}px)`,\n });\n }\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.hostElement,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.hostElement.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n const button =\n this.dropdownItems[index]?.shadowRoot?.querySelector('button');\n\n if (button) {\n button.focus();\n }\n });\n }\n\n async componentDidLoad() {\n if (!this.trigger) {\n return;\n }\n\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n await this.resolveAnchorElement();\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n const target = dropdownController.pathIncludesTrigger(event.composedPath());\n if (target) {\n if (target !== this.triggerElement) {\n event.preventDefault();\n }\n\n if (this.isTriggerElement(target)) {\n if (this.closeBehavior === 'outside') {\n event.preventDefault();\n }\n return;\n }\n }\n\n if (\n !event.defaultPrevented &&\n (this.closeBehavior === 'inside' || this.closeBehavior === 'both')\n ) {\n dropdownController.dismissAll([this.getId()], this.ignoreRelatedSubmenu);\n return;\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n {this.show && <slot></slot>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ix-dropdown.entry.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,2oCAA2oC,CAAC;AAChqC,yBAAe,WAAW;;AC4C1B,IAAI,UAAU,GAAG,CAAC,CAAC;MAON,QAAQ;;;;QAsFX,aAAQ,GAAG,YAAY,UAAU,EAAE,EAAE,CAAC;QACtC,oBAAe,GAAa,EAAE,CAAC;QAI/B,iBAAY,GAAI,IAAI,gBAAgB,CAAC;YAC3C,IAAI,IAAI,CAAC,oBAAoB,EAAE;gBAC7B,IAAI,CAAC,oBAAoB,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC;aACtD;SACF,CAAC,CAAC;0CAvFkC,KAAK;oBAKK,KAAK;;;6BAiBb,MAAM;yBAKP,cAAc;mCAKA,OAAO;;;;mCA+B7B,KAAK;oCAGJ,KAAK;;IAuBpC,iBAAiB;QACf,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE;YAC7B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACrC;KACF;IAGD,cAAc,CAAC,KAA0B;QACvC,KAAK,CAAC,wBAAwB,EAAE,CAAC;QACjC,KAAK,CAAC,cAAc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;QACJ,QACE,EAAC,IAAI,yEACe,IAAI,CAAC,QAAQ,EAC/B,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI;gBACrB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI;aACf,EACD,KAAK,EAAE;gBACL,MAAM,EAAE,GAAG;gBACX,QAAQ,EAAE,KAAK;gBACf,QAAQ,EAAE,IAAI,CAAC,mBAAmB;aACnC,EACD,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,CAAC,KAAmB,KAAK,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAE7D,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,IAChC,IAAI,CAAC,MAAM,IAAI,4DAAK,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,MAAM,CAAO,EAC/D,IAAI,CAAC,IAAI,IAAI,8DAAa,CACvB,CACD,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/dropdown/dropdown.scss?tag=ix-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n\n@import 'legacy/mixins/fonts';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n background-color: var(--theme-color-2);\n border-radius: var(--theme-default-border-radius);\n @include ix-component;\n min-width: 0px;\n z-index: var(--theme-z-index-dropdown);\n box-shadow: var(--theme-shadow-4);\n\n padding: 0.25rem 0px;\n\n .dropdown-header {\n display: flex;\n align-items: center;\n height: $large-control-height;\n color: var(--theme-menu-header--color);\n padding: 0 $default-space;\n }\n}\n\n:host(.overflow) {\n max-height: 50vh;\n overflow-y: auto;\n}\n\n:host(:not(.show)) {\n display: none;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n autoUpdate,\n computePosition,\n ComputePositionConfig,\n flip,\n inline,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport { ComponentInterface } from '@stencil/core/internal';\nimport { ArrowFocusController } from '../utils/focus';\nimport {\n CloseBehavior,\n dropdownController,\n DropdownInterface,\n hasDropdownItemWrapperImplemented,\n} from './dropdown-controller';\nimport { AlignedPlacement } from './placement';\nimport {\n addDisposableEventListener,\n DisposableEventListener,\n} from '../utils/disposable-event-listener';\nimport { ElementReference } from 'src/components/utils/element-reference';\n\nlet sequenceId = 0;\n\n@Component({\n tag: 'ix-dropdown',\n styleUrl: 'dropdown.scss',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface, DropdownInterface {\n @Element() hostElement!: HTMLIxDropdownElement;\n\n /**\n * Suppress the automatic placement of the dropdown.\n *\n * @since 2.0.0\n */\n @Prop() suppressAutomaticPlacement = false;\n\n /**\n * Show dropdown\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n /**\n * Define an element that triggers the dropdown.\n * A trigger can either be a string that will be interpreted as id attribute or a DOM element.\n */\n @Prop() trigger?: ElementReference;\n\n /**\n * Define an anchor element\n */\n @Prop() anchor?: ElementReference;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n * If the dropdown is a child of another one, it will be closed with the parent, regardless of its own close behavior.\n */\n @Prop() closeBehavior: CloseBehavior = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement: AlignedPlacement = 'bottom-start';\n\n /**\n * Position strategy\n */\n @Prop() positioningStrategy: 'absolute' | 'fixed' = 'fixed';\n\n /**\n * An optional header shown at the top of the dropdown\n */\n @Prop() header?: string;\n\n /**\n * Move dropdown along main axis of alignment\n *\n * @internal\n */\n @Prop() offset?: {\n mainAxis?: number;\n crossAxis?: number;\n alignmentAxis?: number;\n };\n\n /**\n * @internal\n */\n @Prop() overwriteDropdownStyle?: (delegate: {\n dropdownRef: HTMLElement;\n triggerRef?: HTMLElement;\n }) => Promise<Partial<CSSStyleDeclaration>>;\n\n /**\n * @internal\n * If initialisation of this dropdown is expected to be defered submenu discovery will have to be re-run globally by the controller.\n * This property indicates the need for that to the controller.\n */\n @Prop() discoverAllSubmenus = false;\n\n /** @internal */\n @Prop() ignoreRelatedSubmenu = false;\n\n /**\n * Fire event after visibility of dropdown has changed\n */\n @Event() showChanged!: EventEmitter<boolean>;\n\n private autoUpdateCleanup?: () => void;\n\n private triggerElement?: Element;\n private anchorElement?: Element;\n\n private localUId = `dropdown-${sequenceId++}`;\n private assignedSubmenu: string[] = [];\n\n private arrowFocusController?: ArrowFocusController;\n\n private itemObserver? = new MutationObserver(() => {\n if (this.arrowFocusController) {\n this.arrowFocusController.items = this.dropdownItems;\n }\n });\n\n connectedCallback(): void {\n dropdownController.connected(this);\n\n if (this.trigger != undefined) {\n this.registerListener(this.trigger);\n }\n }\n\n @Listen('ix-assign-sub-menu')\n cacheSubmenuId(event: CustomEvent<string>) {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n const { detail } = event;\n\n if (this.assignedSubmenu.indexOf(detail) === -1) {\n this.assignedSubmenu.push(detail);\n }\n }\n\n disconnectedCallback() {\n dropdownController.dismiss(this);\n dropdownController.disconnected(this);\n\n if (this.arrowFocusController) {\n this.arrowFocusController?.disconnect();\n this.arrowFocusController = undefined;\n }\n\n if (this.itemObserver) {\n this.itemObserver.disconnect();\n this.itemObserver = undefined;\n }\n\n if (this.disposeClickListener) {\n this.disposeClickListener();\n this.disposeClickListener = undefined;\n }\n\n if (this.disposeKeyListener) {\n this.disposeKeyListener();\n this.disposeKeyListener = undefined;\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n getAssignedSubmenuIds() {\n return this.assignedSubmenu;\n }\n\n isPresent() {\n return this.show;\n }\n\n present() {\n this.show = true;\n }\n\n dismiss() {\n this.show = false;\n }\n\n getId() {\n return this.localUId;\n }\n\n willDismiss() {\n const { defaultPrevented } = this.showChanged.emit(false);\n return !defaultPrevented;\n }\n\n willPresent() {\n const { defaultPrevented } = this.showChanged.emit(true);\n return !defaultPrevented;\n }\n\n get dropdownItems() {\n return Array.from(this.hostElement.querySelectorAll('ix-dropdown-item'));\n }\n\n get slotElement() {\n return this.hostElement.shadowRoot!.querySelector('slot');\n }\n\n private disposeClickListener?: DisposableEventListener;\n private disposeKeyListener?: DisposableEventListener;\n\n private addEventListenersFor() {\n this.disposeClickListener?.();\n this.disposeKeyListener?.();\n\n const toggleController = () => {\n if (!this.isPresent()) {\n dropdownController.present(this);\n } else {\n dropdownController.dismiss(this);\n }\n\n dropdownController.dismissOthers(this.getId());\n };\n\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeClickListener = addDisposableEventListener(\n this.triggerElement,\n 'click',\n (event: Event) => {\n if (!event.defaultPrevented) {\n toggleController();\n }\n }\n );\n\n this.triggerElement?.setAttribute(\n 'data-ix-dropdown-trigger',\n this.localUId\n );\n }\n\n /** @internal */\n @Method()\n async discoverSubmenu() {\n this.triggerElement?.dispatchEvent(\n new CustomEvent('ix-assign-sub-menu', {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: this.localUId,\n })\n );\n }\n\n private registerKeyListener() {\n if (!this.triggerElement) {\n return;\n }\n\n this.disposeKeyListener = addDisposableEventListener(\n this.triggerElement,\n 'keydown',\n ((event: KeyboardEvent) => {\n if (event.key !== 'ArrowDown') {\n return;\n }\n\n if (document.activeElement !== this.triggerElement) {\n return;\n }\n\n dropdownController.present(this);\n\n setTimeout(() => {\n this.focusDropdownItem(0);\n });\n }) as EventListener\n );\n }\n\n private async registerListener(element: ElementReference) {\n this.triggerElement = await this.resolveElement(element);\n if (this.triggerElement) {\n this.addEventListenersFor();\n this.discoverSubmenu();\n }\n }\n\n private async resolveElement(element: ElementReference) {\n const el = await this.findElement(element);\n\n return this.checkForSubmenuAnchor(el);\n }\n\n private async checkForSubmenuAnchor(element?: Element) {\n if (!element) {\n return undefined;\n }\n\n if (hasDropdownItemWrapperImplemented(element)) {\n const dropdownItem = await element.getDropdownItemElement();\n dropdownItem.isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n if (element.tagName === 'IX-DROPDOWN-ITEM') {\n (element as HTMLIxDropdownItemElement).isSubMenu = true;\n this.hostElement.style.zIndex = `var(--theme-z-index-dropdown)`;\n }\n\n return element;\n }\n\n private findElement(element: ElementReference): Promise<Element | undefined> {\n if (element instanceof Promise) {\n return element;\n }\n\n if (typeof element === 'object') {\n return Promise.resolve(element);\n }\n\n if (typeof element != 'string') {\n return Promise.resolve(undefined);\n }\n\n const selector = `#${element}`;\n return new Promise((resolve) => {\n const el = document.querySelector(selector);\n if (el !== null) {\n return resolve(el);\n }\n\n const observer = new MutationObserver(() => {\n const el = document.querySelector(selector);\n if (el) {\n resolve(el);\n observer.disconnect();\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n });\n }\n\n private async resolveAnchorElement() {\n if (this.anchor) {\n this.anchorElement = await this.resolveElement(this.anchor);\n } else if (this.trigger) {\n this.anchorElement = await this.resolveElement(this.trigger);\n }\n }\n\n @Watch('show')\n async changedShow(newShow: boolean) {\n if (newShow) {\n await this.resolveAnchorElement();\n\n if (this.anchorElement) {\n this.applyDropdownPosition();\n }\n\n this.arrowFocusController = new ArrowFocusController(\n this.dropdownItems,\n this.hostElement,\n (index) => this.focusDropdownItem(index)\n );\n\n this.itemObserver?.observe(this.hostElement, {\n childList: true,\n subtree: true,\n });\n\n this.registerKeyListener();\n } else {\n this.destroyAutoUpdate();\n this.arrowFocusController?.disconnect();\n this.itemObserver?.disconnect();\n this.disposeKeyListener?.();\n }\n }\n\n @Watch('trigger')\n changedTrigger(newTriggerValue: ElementReference) {\n this.registerListener(newTriggerValue);\n }\n\n private destroyAutoUpdate() {\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n this.autoUpdateCleanup = undefined;\n }\n }\n\n private isAnchorSubmenu(): boolean {\n if (!hasDropdownItemWrapperImplemented(this.anchorElement)) {\n // Is no official dropdown-item, but check if any dropdown-item\n // is placed somewhere up the DOM\n return !!this.anchorElement?.closest('ix-dropdown-item');\n }\n\n return true;\n }\n\n private async applyDropdownPosition() {\n if (!this.show) {\n return;\n }\n if (!this.anchorElement) {\n return;\n }\n const isSubmenu = this.isAnchorSubmenu();\n\n let positionConfig: Partial<ComputePositionConfig> = {\n strategy: this.positioningStrategy,\n middleware: [],\n };\n\n if (!this.suppressAutomaticPlacement) {\n positionConfig.middleware?.push(\n flip({ fallbackStrategy: 'initialPlacement' })\n );\n }\n\n positionConfig.placement = isSubmenu ? 'right-start' : this.placement;\n\n positionConfig.middleware = [\n ...(positionConfig.middleware?.filter(Boolean) || []),\n inline(),\n shift(),\n ];\n\n if (this.offset) {\n positionConfig.middleware.push(offset(this.offset));\n }\n\n this.destroyAutoUpdate();\n\n if (!this.anchorElement) {\n return;\n }\n\n this.autoUpdateCleanup = autoUpdate(\n this.anchorElement,\n this.hostElement,\n async () => {\n if (this.anchorElement) {\n const computeResponse = await computePosition(\n this.anchorElement,\n this.hostElement,\n positionConfig\n );\n Object.assign(this.hostElement.style, {\n top: '0',\n left: '0',\n transform: `translate(${Math.round(\n computeResponse.x\n )}px,${Math.round(computeResponse.y)}px)`,\n });\n }\n if (this.overwriteDropdownStyle) {\n const overwriteStyle = await this.overwriteDropdownStyle({\n dropdownRef: this.hostElement,\n triggerRef: this.triggerElement as HTMLElement,\n });\n\n Object.assign(this.hostElement.style, overwriteStyle);\n }\n },\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true,\n }\n );\n }\n\n private focusDropdownItem(index: number) {\n requestAnimationFrame(() => {\n const button =\n this.dropdownItems[index]?.shadowRoot?.querySelector('button');\n\n if (button) {\n button.focus();\n }\n });\n }\n\n async componentDidLoad() {\n if (!this.trigger) {\n return;\n }\n\n this.changedTrigger(this.trigger);\n }\n\n async componentDidRender() {\n await this.applyDropdownPosition();\n await this.resolveAnchorElement();\n }\n\n private isTriggerElement(element: HTMLElement) {\n const trigger = !!element.hasAttribute('data-ix-dropdown-trigger');\n\n return trigger;\n }\n\n private onDropdownClick(event: PointerEvent) {\n const target = dropdownController.pathIncludesTrigger(event.composedPath());\n if (target) {\n if (target !== this.triggerElement) {\n event.preventDefault();\n }\n\n if (this.isTriggerElement(target)) {\n if (this.closeBehavior === 'outside') {\n event.preventDefault();\n }\n return;\n }\n }\n\n if (\n !event.defaultPrevented &&\n (this.closeBehavior === 'inside' || this.closeBehavior === 'both')\n ) {\n dropdownController.dismissAll([this.getId()], this.ignoreRelatedSubmenu);\n return;\n }\n\n dropdownController.dismissOthers(this.getId());\n }\n\n /**\n * Update position of dropdown\n */\n @Method()\n async updatePosition() {\n this.applyDropdownPosition();\n }\n\n render() {\n return (\n <Host\n data-ix-dropdown={this.localUId}\n class={{\n 'dropdown-menu': true,\n show: this.show,\n overflow: true,\n }}\n style={{\n margin: '0',\n minWidth: '0px',\n position: this.positioningStrategy,\n }}\n role=\"list\"\n onClick={(event: PointerEvent) => this.onDropdownClick(event)}\n >\n <div style={{ display: 'contents' }}>\n {this.header && <div class=\"dropdown-header\">{this.header}</div>}\n {this.show && <slot></slot>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|