@infineon/infineon-design-system-stencil 39.5.3--canary.2143.df790fabdc350922c24a2831c6694c57d6d12352.0 → 39.5.3--canary.2143.7e22c74e4f4e08bfb2cb8d5e5811adf79267a112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +10 -10
- package/dist/cjs/ifx-search-field.cjs.entry.js +2 -74
- package/dist/cjs/ifx-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-search-field.entry.cjs.js.map +1 -1
- package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
- package/dist/cjs/ifx-select.cjs.entry.js +2 -2
- package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +4 -4
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +4 -4
- package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
- package/dist/cjs/ifx-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
- package/dist/collection/components/search-field/search-field.js +2 -74
- package/dist/collection/components/search-field/search-field.js.map +1 -1
- package/dist/collection/components/segmented-control/segment/segment.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js +2 -2
- package/dist/collection/components/select/multi-select/multiselect-option.js +4 -4
- package/dist/collection/components/select/multi-select/multiselect.js +6 -6
- package/dist/collection/components/select/single-select/select.js +2 -2
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/status/status.js +1 -1
- package/dist/collection/components/stepper/step/step.js +4 -4
- package/dist/collection/components/stepper/stepper.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
- package/dist/collection/components/table-advanced-version/table.js +2 -2
- package/dist/collection/components/table-basic-version/table.js +1 -1
- package/dist/collection/components/tabs/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/templates/template/template.js +1 -1
- package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
- package/dist/collection/components/text-field/text-field.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +4 -4
- package/dist/collection/components/tree-view/tree-view-item.js +2 -2
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
- package/dist/components/ifx-basic-table.js +1 -1
- package/dist/components/ifx-faq.js +1 -1
- package/dist/components/ifx-filter-accordion.js +2 -2
- package/dist/components/ifx-filter-bar.js +1 -1
- package/dist/components/ifx-filter-search.js +2 -2
- package/dist/components/ifx-filter-type-group.js +1 -1
- package/dist/components/ifx-icons-preview.js +1 -1
- package/dist/components/ifx-list-entry.js +1 -1
- package/dist/components/ifx-multiselect-option.js +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-search-bar.js +1 -1
- package/dist/components/ifx-search-field.js +1 -1
- package/dist/components/ifx-segment.js +1 -1
- package/dist/components/ifx-segmented-control.js +2 -2
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +5 -5
- package/dist/components/ifx-slider.js +2 -2
- package/dist/components/ifx-spinner.js +1 -1
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-step.js +4 -4
- package/dist/components/ifx-stepper.js +2 -2
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-tab.js +1 -1
- package/dist/components/ifx-table.js +4 -4
- package/dist/components/ifx-tabs.js +2 -2
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +4 -4
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +2 -2
- package/dist/components/ifx-tooltip.js +4 -4
- package/dist/components/ifx-tree-view-item.js +2 -2
- package/dist/components/ifx-tree-view.js +1 -1
- package/dist/components/{p-dwBbLAVm.js → p-BO6nWGLo.js} +4 -76
- package/dist/components/p-BO6nWGLo.js.map +1 -0
- package/dist/components/{p-DdOsLLJc.js → p-BxWZjkxk.js} +4 -4
- package/dist/components/{p-DdOsLLJc.js.map → p-BxWZjkxk.js.map} +1 -1
- package/dist/components/{p-C53lC4vo.js → p-D7r3u21_.js} +3 -3
- package/dist/components/{p-C53lC4vo.js.map → p-D7r3u21_.js.map} +1 -1
- package/dist/components/{p-B61i82g5.js → p-DGAOPH_P.js} +4 -4
- package/dist/components/{p-B61i82g5.js.map → p-DGAOPH_P.js.map} +1 -1
- package/dist/components/{p-CG8WUF7S.js → p-DQYngnHn.js} +9 -9
- package/dist/components/{p-CG8WUF7S.js.map → p-DQYngnHn.js.map} +1 -1
- package/dist/components/{p-DmM40b2X.js → p-Dce2xAGf.js} +5 -5
- package/dist/components/{p-DmM40b2X.js.map → p-Dce2xAGf.js.map} +1 -1
- package/dist/components/{p-Cmd43Oxg.js → p-DxKWinW1.js} +6 -6
- package/dist/components/{p-Cmd43Oxg.js.map → p-DxKWinW1.js.map} +1 -1
- package/dist/components/{p-GP5uSTr1.js → p-kFkxPh9g.js} +4 -4
- package/dist/components/{p-GP5uSTr1.js.map → p-kFkxPh9g.js.map} +1 -1
- package/dist/esm/ifx-alert_2.entry.js +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-faq.entry.js +1 -1
- package/dist/esm/ifx-filter-accordion.entry.js +2 -2
- package/dist/esm/ifx-filter-bar.entry.js +1 -1
- package/dist/esm/ifx-filter-search.entry.js +1 -1
- package/dist/esm/ifx-filter-type-group.entry.js +1 -1
- package/dist/esm/ifx-list-entry.entry.js +1 -1
- package/dist/esm/ifx-multiselect_2.entry.js +10 -10
- package/dist/esm/ifx-search-field.entry.js +2 -74
- package/dist/esm/ifx-search-field.entry.js.map +1 -1
- package/dist/esm/ifx-segment.entry.js +1 -1
- package/dist/esm/ifx-segmented-control.entry.js +2 -2
- package/dist/esm/ifx-select.entry.js +2 -2
- package/dist/esm/ifx-slider.entry.js +2 -2
- package/dist/esm/ifx-spinner_2.entry.js +4 -4
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js +4 -4
- package/dist/esm/ifx-stepper.entry.js +2 -2
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-tab.entry.js +1 -1
- package/dist/esm/ifx-table.entry.js +2 -2
- package/dist/esm/ifx-tabs.entry.js +2 -2
- package/dist/esm/ifx-templates-ui.entry.js +1 -1
- package/dist/esm/ifx-textarea.entry.js +2 -2
- package/dist/esm/ifx-tooltip.entry.js +4 -4
- package/dist/esm/ifx-tree-view-item.entry.js +2 -2
- package/dist/esm/ifx-tree-view.entry.js +1 -1
- package/dist/infineon-design-system-stencil/ifx-search-field.entry.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/{p-98c2e3a9.entry.js → p-07e1efa5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-9ea43bb7.entry.js → p-0d5a32ec.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-fe373208.entry.js → p-1fcb504e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-2537f7fe.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-2a7e30cf.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-22a45c93.entry.js.map → p-2a7e30cf.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-242fc6b0.entry.js → p-2b4778da.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-54785004.entry.js → p-39a29970.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-dcc7240e.entry.js → p-3b5cf4ca.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0d9da371.entry.js → p-44026267.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e7b72d33.entry.js → p-4fca78a6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6504f8d0.entry.js → p-6162a610.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8ab64504.entry.js → p-8aabbd26.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-8d19ae4f.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-8d19ae4f.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-0d4211db.entry.js → p-8eef85bc.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-913a8693.entry.js → p-9577d799.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-9c93e258.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-b5efb1d6.entry.js → p-9dbede78.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-f5811026.entry.js → p-a827c4bc.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-13fed6df.entry.js → p-b3ba9994.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-bfbe3ddc.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-c9d594e1.entry.js.map → p-bfbe3ddc.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-453bd9bd.entry.js → p-c3362d41.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3f3a5140.entry.js → p-ddff8e4e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-372fa9eb.entry.js → p-ebce6648.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6407c496.entry.js → p-f06af3d9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-af1e0cb5.entry.js → p-f855d12d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-83816596.entry.js → p-fc030370.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-eed36710.entry.js → p-fef185c2.entry.js} +2 -2
- package/dist/types/components/search-field/search-field.d.ts +0 -4
- package/package.json +1 -1
- package/dist/components/p-dwBbLAVm.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-22a45c93.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-36758398.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-36758398.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-ba4ee343.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-c9d594e1.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-d3a6bbf7.entry.js +0 -2
- /package/dist/infineon-design-system-stencil/{p-98c2e3a9.entry.js.map → p-07e1efa5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-9ea43bb7.entry.js.map → p-0d5a32ec.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-fe373208.entry.js.map → p-1fcb504e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d3a6bbf7.entry.js.map → p-2537f7fe.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-242fc6b0.entry.js.map → p-2b4778da.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-54785004.entry.js.map → p-39a29970.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-dcc7240e.entry.js.map → p-3b5cf4ca.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0d9da371.entry.js.map → p-44026267.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e7b72d33.entry.js.map → p-4fca78a6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6504f8d0.entry.js.map → p-6162a610.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8ab64504.entry.js.map → p-8aabbd26.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0d4211db.entry.js.map → p-8eef85bc.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-913a8693.entry.js.map → p-9577d799.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ba4ee343.entry.js.map → p-9c93e258.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b5efb1d6.entry.js.map → p-9dbede78.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f5811026.entry.js.map → p-a827c4bc.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-13fed6df.entry.js.map → p-b3ba9994.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-453bd9bd.entry.js.map → p-c3362d41.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3f3a5140.entry.js.map → p-ddff8e4e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-372fa9eb.entry.js.map → p-ebce6648.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6407c496.entry.js.map → p-f06af3d9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-af1e0cb5.entry.js.map → p-f855d12d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-83816596.entry.js.map → p-fc030370.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-eed36710.entry.js.map → p-fef185c2.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,a as s,d as o}from"./p-DtIEDtZ8.js";import{d as n,t as l}from"./p-DcmcuUOA.js";import{i as c}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", \'Arial, sans-serif\'}.ifx-multiselect-container{position:relative;box-sizing:border-box;font-family:var(--ifx-font-family)}.ifx-multiselect-container.disabled .ifx-label-wrapper{color:#BFBBBB}.ifx-multiselect-container.disabled .ifx-multiselect-wrapper{background:#BFBBBB;color:#FFFFFF;border-color:#BFBBBB;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-multiselect-container:hover{cursor:pointer}.ifx-multiselect-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-label-wrapper .required{margin-left:4px}.ifx-multiselect-container .ifx-label-wrapper .required.error{color:#CD002F}.ifx-multiselect-container .multi__select-caption{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;color:#1D1D1D;flex:none;order:1;align-self:stretch;flex-grow:0}.ifx-multiselect-container .multi__select-caption.error{color:#CD002F}.ifx-multiselect-container .multi__select-caption.disabled{color:#BFBBBB}.ifx-multiselect-container .ifx-multiselect-wrapper{background-color:#FFFFFF;box-sizing:border-box;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;width:100%;font-weight:400;font-style:normal;height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible{outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active)::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-multiselect-container .ifx-multiselect-wrapper.error{border-color:#CD002F}.ifx-multiselect-container .ifx-multiselect-wrapper.active{border-color:#0A8276 !important}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-down{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-up{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.is-flipped .ifx-multiselect-dropdown-menu{top:auto;bottom:100%}.ifx-multiselect-container .ifx-multiselect-input{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ifx-multiselect-container .ifx-multiselect-input.placeholder{opacity:0.5}.ifx-multiselect-container .ifx-multiselect-icon-container{margin-left:auto;display:flex;align-items:center;gap:8px}.ifx-multiselect-container .ifx-multiselect-icon-container .ifx-multiselect-icon-container{display:flex}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper{display:flex;align-items:center;transition:transform 0.2s ease-in-out}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper--open{transform:rotate(180deg)}.ifx-multiselect-container .ifx-clear-button{display:flex;align-items:center}.ifx-multiselect-container .ifx-clear-button.hide{display:none}.ifx-multiselect-container .ifx-multiselect-dropdown-menu{box-sizing:border-box;position:absolute;top:100%;left:0;width:100%;margin-top:4px;border:1px solid #EEEDED;background-color:#FFFFFF;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1);max-height:300px;z-index:1000;display:flex;flex-direction:column}.ifx-multiselect-container:not(.disabled) .ifx-multiselect-wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-multiselect-dropdown-functions{padding:12px 16px;border-bottom:1px solid #EEEDED;flex-shrink:0}.ifx-multiselect-dropdown-search{margin-bottom:12px}.ifx-multiselect-dropdown-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}.ifx-multiselect-dropdown-controls .select-all-wrapper{display:flex}.ifx-multiselect-dropdown-controls .expand-collapse-controls{display:flex;gap:12px}.ifx-multiselect-dropdown-controls .control-item{font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-dropdown-controls .control-item:hover{color:#0A8276}.ifx-multiselect-dropdown-controls .control-item:active{color:#08665C}.ifx-multiselect-dropdown-controls .control-item:focus{outline:none}.ifx-multiselect-dropdown-controls .control-item:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.ifx-multiselect-options{flex:1;overflow-y:auto;padding-top:12px;padding-bottom:12px}.ifx-multiselect-options.show-no-results .ifx-multiselect-no-results{display:block}.ifx-multiselect-no-results{padding-left:16px;padding-right:16px;display:none}';function a(e,t){let i;return function s(...o){const n=()=>{clearTimeout(i);e(...o)};clearTimeout(i);i=setTimeout(n,t)}}const h=class{constructor(i){e(this,i);this.ifxSelect=t(this,"ifxSelect",7);this.ifxOpen=t(this,"ifxOpen",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.disabled=false;this.required=false;this.error=false;this.caption="";this.label="";this.placeholder="";this.showSearch=true;this.showSelectAll=true;this.showClearButton=true;this.showExpandCollapse=true;this.noResultsMessage="No results found.";this.showNoResultsMessage=true;this.searchPlaceholder="Search";this.selectAllLabel="Select all";this.expandLabel="Expand";this.collapseLabel="Collapse";this.ariaMultiSelectLabel="Multi-select dropdown";this.ariaMultiSelectLabelledBy="";this.ariaMultiSelectDescribedBy="";this.ariaSearchLabel="Search options";this.ariaClearLabel="Clear all selections";this.ariaToggleLabel="Toggle dropdown";this.ariaSelectAllLabel="Select all options";this.ariaExpandAllLabel="Expand all categories";this.ariaCollapseAllLabel="Collapse all categories";this.internalError=false;this.persistentSelectedOptions=[];this.dropdownOpen=false;this.searchTerm="";this.handleSearch=a((e=>{const t=e.value.toLowerCase();const i=t!=="";this.searchTerm=t;const s=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper");if(s){if(i){s.classList.remove("active")}else{const e=this.el.shadowRoot.querySelector("ifx-search-field");const t=e&&e.matches(":focus-within");if(!t){s.classList.add("active")}}}const o=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(o){if(i){o.classList.add("has-search-filter")}else{o.classList.remove("has-search-filter")}}requestAnimationFrame((()=>{const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const s=new CustomEvent("ifx-search-filter",{detail:{searchTerm:t,isActive:i}});e.dispatchEvent(s)}));if(i){setTimeout((()=>{const e=this.el.querySelectorAll("ifx-multiselect-option");let t=0;e.forEach((e=>{const i=window.getComputedStyle(e);const s=e.getBoundingClientRect();if(i.display!=="none"&&i.visibility!=="hidden"&&i.opacity!=="0"&&s.height>0){t++}}));const i=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(i){if(t===0){i.classList.add("show-no-results")}else{i.classList.remove("show-no-results")}}}),200)}else{const e=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(e){e.classList.remove("show-no-results")}}}))}),150);this.handleDocumentClick=e=>{const t=e.composedPath();if(!t.includes(this.dropdownElement)){this.dropdownOpen=false;document.removeEventListener("click",this.handleDocumentClick);this.resetSearch();this.ifxOpen.emit(this.dropdownOpen)}}}parseChildOptions(){const e=[];const t=Array.from(this.el.children);t.forEach(((t,i)=>{if(t.tagName==="IFX-MULTISELECT-OPTION"){const s=this.parseOptionElement(t,i);if(s){e.push(s)}}}));return e}parseOptionElement(e,t){const i=e.getAttribute("value")||`option-${t}`;const s=e.hasAttribute("selected");const o=e.hasAttribute("disabled");const n=e.hasAttribute("indeterminate");const l={value:i,selected:s,disabled:o,indeterminate:n};const c=Array.from(e.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map(((e,t)=>this.parseOptionElement(e,t))).filter((e=>e!==null));if(c.length>0){l.children=c}return l}loadInitialOptions(){this.internalError=this.error;const e=this.parseChildOptions();const t=this.collectSelectedOptions(e);const i=t.filter((e=>!this.persistentSelectedOptions.some((t=>t.value==e.value))));this.persistentSelectedOptions=[...this.persistentSelectedOptions,...i]}collectSelectedOptions(e){let t=[];for(const i of e){if(i.selected){if(i.children&&i.children.length>0){t=t.concat(this.collectLeafOptions(i.children))}else{if(!t.some((e=>e.value===i.value))){t.push(i)}}}else{if(i.children&&i.children.length>0){t=t.concat(this.collectSelectedOptions(i.children))}}}return t}collectLeafOptions(e){let t=[];for(const i of e){if(i.children&&i.children.length>0){t=t.concat(this.collectLeafOptions(i.children))}else{t.push(i)}}return t}handleSearchFocus(e){const t=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper");if(t){if(e||this.searchTerm!==""){t.classList.remove("active")}else{t.classList.add("active")}}}positionDropdown(){var e;const t=(e=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper"))===null||e===void 0?void 0:e.getBoundingClientRect();const i=window.innerHeight-t.bottom;const s=t.top;if(s>i&&t.height>i||t.bottom>window.innerHeight){this.dropdownFlipped=true}else{this.dropdownFlipped=false}}updateSlotBasedSelections(e=false){const t=this.el.querySelectorAll("ifx-multiselect-option");const i=[];t.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.selected&&!t.hasChildren){i.push({value:t.value,selected:true,disabled:t.disabled,label:t.getTextContent()||t.value})}}));this.persistentSelectedOptions=i;if(e){this.ifxSelect.emit(this.persistentSelectedOptions)}}updateInitialParentStates(){const e=this.el.querySelectorAll("ifx-multiselect-option");const t=Array.from(e).map((e=>({element:e,instance:e["__stencil_instance"],depth:parseInt(e.getAttribute("data-level")||"0")}))).filter((e=>e.instance)).sort(((e,t)=>t.depth-e.depth));t.forEach((({instance:e})=>{if(e.hasChildren){this.updateParentState(e)}}))}updateParentState(e){const t=Array.from(e.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map((e=>e["__stencil_instance"])).filter((e=>e!==null));const i=t.filter((e=>e.selected)).length;const s=t.filter((e=>e.indeterminate)).length;const o=t.length;if(i===o&&s===0){e.selected=true;e.indeterminate=false}else if(i===0&&s===0){e.selected=false;e.indeterminate=false}else{e.selected=false;e.indeterminate=true}}async componentDidLoad(){if(!c(this.el)){const e=n();l("ifx-multiselect",await e)}setTimeout((()=>{this.positionDropdown()}),500);this.el.addEventListener("ifx-option-changed",(e=>{var t;const i=(t=e.target)===null||t===void 0?void 0:t.__stencil_instance;if(i&&!i.hasChildren){this.updateSlotBasedSelections(true)}}));setTimeout((()=>{this.updateSlotBasedSelections(false);this.updateInitialParentStates()}),100)}componentWillLoad(){this.loadInitialOptions()}updateInternalError(){this.internalError=this.error}onSelectionChange(e,t){const i=new FormData;e.forEach((e=>i.append(this.name,e.value)))}collapseAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.hasChildren){t.isExpanded=false}}))}expandAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.hasChildren){t.isExpanded=true}}))}selectAll(){this.resetSearch();const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t){if(t.hasChildren){t.isExpanded=true}else{t.selected=true}}}));setTimeout((()=>{this.updateInitialParentStates();this.updateSlotBasedSelections(false);this.ifxSelect.emit(this.persistentSelectedOptions)}),0)}async clearSelection(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t){t.selected=false;t.indeterminate=false;if(t.hasChildren){t.isExpanded=false}}}));this.persistentSelectedOptions=[];setTimeout((()=>{this.updateSlotBasedSelections(false);this.ifxSelect.emit(this.persistentSelectedOptions)}),0)}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;setTimeout((()=>{if(this.dropdownOpen){document.addEventListener("click",this.handleDocumentClick)}else{this.resetSearch()}this.ifxOpen.emit(this.dropdownOpen)}),0)}resetSearch(){this.searchTerm="";const e=this.el.shadowRoot.querySelector("ifx-search-field");if(e){e.value=""}const t=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(t){t.classList.remove("has-search-filter")}const i=this.el.querySelectorAll("ifx-multiselect-option");i.forEach((e=>{const t=new CustomEvent("ifx-search-filter",{detail:{searchTerm:"",isActive:false}});e.dispatchEvent(t)}))}handleWrapperClick(e){this.positionDropdown();if(e.currentTarget===e.target){this.toggleDropdown()}}handleKeyDown(e){if(this.disabled)return;if(!this.dropdownOpen){switch(e.code){case"Enter":case"Space":case"ArrowDown":e.preventDefault();this.toggleDropdown();break}return}switch(e.code){case"Escape":e.preventDefault();this.toggleDropdown();break;case"Enter":case"Space":const t=e.target;if(!t.closest(".ifx-multiselect-dropdown-functions")){e.preventDefault();this.toggleDropdown()}break;case"ArrowDown":case"ArrowUp":e.preventDefault();this.focusFirstOption();break}}focusFirstOption(){var e;const t=this.el.querySelector("ifx-multiselect-option:not(.search-hidden)");if(t){const i=(e=t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");i===null||i===void 0?void 0:i.focus()}}renderSelectAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");const t=Array.from(e).filter((e=>!e.hasChildren));const s=Array.from(e).filter((e=>!e.hasChildren&&e.selected));const o=t.length>0&&s.length===t.length;const n=e=>{if(e){e.preventDefault();e.stopPropagation()}if(o){this.clearSelection()}else{this.selectAll()}};return i("div",{class:"select-all-wrapper"},i("ifx-checkbox",{id:"selectAll",checked:o,size:"s","aria-label":this.ariaSelectAllLabel,onClick:n,onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();n(e)}}},this.selectAllLabel))}renderNoResultsMessage(){return i("div",{class:"ifx-multiselect-no-results"},i("div",{class:"no-results-content"},i("span",{class:"no-results-text"},this.noResultsMessage)))}render(){const e=this.persistentSelectedOptions.map((e=>e.label||e.value)).join(", ");const t=this.persistentSelectedOptions.length>0;let s=false;const o=this.el.querySelectorAll("ifx-multiselect-option");if(o.length>0){s=Array.from(o).every((e=>e.children.length===0))}return i("div",{key:"fd7ce64694f743334f1c4577105d9c40f084ebbf",class:`ifx-multiselect-container ${this.disabled&&!this.error?"disabled":""}`,ref:e=>this.dropdownElement=e},i("div",{key:"81abefbfc60b69bcd9c7e9b909dae93fd1767773",class:"ifx-label-wrapper"},this.label&&i("span",{key:"6de06dac0828d7831519e3c92b68095e533ae375",class:"wrapper-label"},i("span",{key:"ed9c68a25201321d0d69444e88d60d68db24e330"},this.label),this.required&&i("span",{key:"070422e2ebb9cb47fb21dcee37229b70016c0da1",class:`required ${this.error?"error":""}`},"*"))),i("div",{key:"3b5d28e2c87f472e68f1a8293daa9d5246d170b2",class:`ifx-multiselect-wrapper\n ${this.dropdownOpen?"active":""}\n ${this.dropdownFlipped?"is-flipped":""}\n ${this.internalError?"error":""}\n ${this.disabled&&!this.error?"disabled":""}`,role:"combobox","aria-label":this.ariaMultiSelectLabel,"aria-labelledby":this.ariaMultiSelectLabelledBy||undefined,"aria-describedby":this.ariaMultiSelectDescribedBy||undefined,"aria-expanded":this.dropdownOpen,"aria-haspopup":"listbox","aria-disabled":this.disabled&&!this.error,tabindex:"0",onClick:this.disabled&&!this.error?undefined:e=>this.handleWrapperClick(e),onKeyDown:this.disabled&&!this.error?undefined:e=>this.handleKeyDown(e)},i("div",{key:"1d5e621056168b08004c8efb998ff25865da2239",class:`ifx-multiselect-input\n ${t?"":"placeholder"}\n `,onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},t?e:this.placeholder),this.dropdownOpen&&i("div",{key:"88762a0e7d11feb2fba793f3d4dc7fc183c161e9",class:"ifx-multiselect-dropdown-menu"},(this.showSearch||this.showSelectAll||this.showExpandCollapse&&!s)&&i("div",{key:"f47c4fd519f502997c2c8ac3611f914e628a465b",class:"ifx-multiselect-dropdown-functions",onClick:e=>e.stopPropagation()},this.showSearch&&i("div",{key:"6d34c960d1dba9eca8bf4e1c89377d736c590b20",class:"ifx-multiselect-dropdown-search"},i("ifx-search-field",{key:"37bc73b76fb6011f64566aa3ffc4b01056a0ac1b",class:"search-input",placeholder:this.searchPlaceholder,size:"s","show-delete-icon":"true","aria-label":this.ariaSearchLabel,onKeyDown:e=>{e.stopPropagation()},onIfxInput:e=>this.handleSearch(e.target),onFocus:()=>this.handleSearchFocus(true),onBlur:()=>this.handleSearchFocus(false)})),i("div",{key:"d7a0b92d7532aa2290e253172359c694a83d92e9",class:"ifx-multiselect-dropdown-controls"},this.showSelectAll&&this.renderSelectAll(),this.showExpandCollapse&&!s&&i("div",{key:"c509eb6f7b77507cf3c1207f1e912130b722f84e",class:"expand-collapse-controls"},i("span",{key:"912ffe8e593e4e0f81cff8ad03e72139b492c23f",class:"control-item",role:"button",tabIndex:0,"aria-label":this.ariaExpandAllLabel,onClick:e=>{e.stopPropagation();this.expandAll()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.expandAll()}}},this.expandLabel),i("span",{key:"e7201dfca2b2e16469778ffd922b4c64f3d06619",class:"control-item",role:"button",tabIndex:0,"aria-label":this.ariaCollapseAllLabel,onClick:e=>{e.stopPropagation();this.collapseAll()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.collapseAll()}}},this.collapseLabel)))),i("div",{key:"031e2384922144e63b528ac69a8ad1bea1420acf",class:"ifx-multiselect-options",role:"listbox","aria-multiselectable":"true"},i("slot",{key:"b5e77631b05852b7f708b92f2cdd797b7cb653a2"}),this.searchTerm&&this.showNoResultsMessage&&this.renderNoResultsMessage())),i("div",{key:"5a813087f59df7ab9dca060d5c80d158bc8d6da1",class:"ifx-multiselect-icon-container"},this.persistentSelectedOptions.length>0&&i("div",{key:"0ae8b58fa2d2ccf28962264bfaa8949114f5767d",class:`ifx-clear-button ${!this.showClearButton?"hide":""}`,onClick:this.disabled&&!this.error?undefined:()=>this.clearSelection()},i("ifx-icon",{key:"8e60813fa135b67a28ba5759c37fb000641af257",icon:"cRemove16"})),i("div",{key:"f71cc3fa883c5af46d24048320bdf822c8ceeb99",class:"icon-wrapper-up",onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-up",icon:"chevron-up-16"})),i("div",{key:"fb08f6a16daebfc6e0a58fcb24e5cfdffd80b423",class:"icon-wrapper-down",onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-down",icon:"chevron-down-16"})))),this.caption&&i("div",{key:"4bd2795e4eb8539f8609bf83065f2637f2f1dc1b",class:`multi__select-caption ${this.error?"error":""} ${this.disabled&&!this.error?"disabled":""}`},this.caption))}get el(){return s(this)}static get watchers(){return{error:["updateInternalError"],persistentSelectedOptions:["onSelectionChange"]}}};h.style=r;const f=":host{display:block;width:100%}.option{display:flex;flex-direction:column;position:relative;cursor:pointer;list-style:none}.option.option--expanded{position:relative}.option.option--has-children{position:relative}.option.option--has-children .option-item>.chevron-wrapper{display:flex}.option--disabled{cursor:not-allowed;pointer-events:none;color:#BFBBBB}.option.search-hidden{display:none !important}.option.search-match .option-item .option-label .search-highlight{font-weight:bold}.option-item{display:flex;flex-direction:row;align-items:center;white-space:nowrap;min-height:20px;padding:4px 16px;background-color:#FFFFFF;transition:background-color 0.2s ease-in-out}.option-item:hover{background-color:#F7F7F7}.option--disabled .option-item:hover{background-color:transparent}.option-children{display:block}.chevron-wrapper{display:none;align-items:center;justify-content:center;margin-right:8px;width:20px;height:20px;flex-shrink:0}.chevron-wrapper:focus{outline:none}.chevron-wrapper:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--has-children .chevron-wrapper{display:flex}.chevron-wrapper .chevron{transition:transform 0.2s ease-in-out;color:#3C3A39}.chevron-wrapper .chevron.chevron--expanded{transform:rotate(90deg)}.chevron-wrapper .chevron.chevron--collapsed{transform:rotate(0deg)}.checkbox-wrapper{display:flex;align-items:center;margin-right:8px;flex-shrink:0}.option-label{flex-grow:1;display:flex;align-items:center;cursor:pointer;padding:2px 0;font-size:0.875rem}.option-label:focus{outline:none}.option-label:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--disabled .option-label{cursor:not-allowed;color:#BFBBBB}";const d=class{constructor(t){e(this,t);this.selected=false;this.disabled=false;this.indeterminate=false;this.isExpanded=false;this.hasChildren=false;this.depth=0;this.searchTerm="";this.isSearchActive=false;this.isSearchDisabled=false;this.handleSearchFilter=e=>{const{searchTerm:t,isActive:i}=e.detail;this.searchTerm=t.toLowerCase();this.isSearchActive=i;requestAnimationFrame((()=>{this.updateSearchClasses()}))};this.handleCheckboxClick=e=>{if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;e.stopPropagation();let t;if(this.indeterminate){t=true}else{t=!this.selected}this.selected=t;this.indeterminate=false;if(this.hasChildren){this.isExpanded=t;requestAnimationFrame((()=>{this.selectAllChildren(t);this.expandAllChildren(t)}))}this.updateParentStates();this.notifyMultiselect()};this.handleHeaderClick=e=>{e.stopPropagation();if(!this.disabled&&!(this.isSearchActive&&this.isSearchDisabled)){this.handleClick(e)}}}componentWillLoad(){this.hasChildren=this.el.children.length>0;this.depth=this.calculateDepth();this.el.setAttribute("data-level",this.depth.toString());if(this.hasChildren){const e=this.hasAnySelectedChildren();if(e){this.isExpanded=true}}}componentDidLoad(){this.el["__stencil_instance"]=this;this.notifyMultiselect();this.el.addEventListener("ifx-search-filter",this.handleSearchFilter)}componentWillUpdate(){this.notifyMultiselect()}disconnectedCallback(){this.el.removeEventListener("ifx-search-filter",this.handleSearchFilter)}updateSearchClasses(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option");if(!t)return;if(!this.isSearchActive){t.classList.remove("search-hidden","search-parent","search-match");this.removeHighlighting();this.isSearchDisabled=false;return}const i=this.getTextContent().toLowerCase();const s=i.includes(this.searchTerm);const o=this.hasMatchingParent();requestAnimationFrame((()=>{const e=this.hasMatchingChildren();t.classList.remove("search-hidden","search-parent","search-match");this.isSearchDisabled=false;if(s&&!this.hasChildren){t.classList.add("search-match");this.highlightSearchTerm()}else if(s&&this.hasChildren){t.classList.add("search-match");this.highlightSearchTerm();this.isExpanded=true}else if(!s&&this.hasChildren&&e){t.classList.add("search-parent");this.removeHighlighting();this.isExpanded=true;this.isSearchDisabled=true}else if(o){t.classList.add("search-match");this.removeHighlighting()}else{t.classList.add("search-hidden");this.removeHighlighting()}}))}highlightSearchTerm(){var e;if(!this.searchTerm)return;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");if(!t)return;const i=t.querySelector("slot");if(!i)return;this.removeHighlighting();const s=this.getTextContent();const o=this.searchTerm.toLowerCase();const n=s.toLowerCase();if(!n.includes(o))return;const l=n.indexOf(o);if(l===-1)return;const c=s.substring(0,l);const r=s.substring(l,l+o.length);const a=s.substring(l+o.length);const h=document.createElement("span");h.className="highlighted-text";if(c){h.appendChild(document.createTextNode(c))}const f=document.createElement("strong");f.className="search-highlight";f.textContent=r;h.appendChild(f);if(a){h.appendChild(document.createTextNode(a))}t.setAttribute("data-original-content","true");i.style.display="none";t.appendChild(h)}removeHighlighting(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");if(!t)return;const i=t.querySelector("slot");const s=t.querySelector(".highlighted-text");if(s){t.removeChild(s)}if(i){i.style.display=""}t.removeAttribute("data-original-content")}getTextContent(){let e="";Array.from(this.el.childNodes).forEach((t=>{var i;if(t.nodeType===Node.TEXT_NODE){e+=((i=t.textContent)===null||i===void 0?void 0:i.trim())||""}}));return e||this.value||""}hasMatchingChildren(){if(!this.hasChildren)return false;const e=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return e.some((e=>{const t=e["__stencil_instance"];if(!t)return false;const i=t.getTextContent().toLowerCase();const s=i.includes(this.searchTerm);const o=t.hasMatchingChildren();return s||o}))}hasMatchingParent(){let e=this.el.parentElement;while(e&&e.tagName==="IFX-MULTISELECT-OPTION"){const t=e["__stencil_instance"];if(t){const e=t.getTextContent().toLowerCase();if(e.includes(this.searchTerm)){return true}}e=e.parentElement}return false}calculateDepth(){let e=0;let t=this.el.parentElement;while(t&&t.tagName!=="IFX-MULTISELECT"){if(t.tagName==="IFX-MULTISELECT-OPTION"){e++}t=t.parentElement}return e}handleClick(e){if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;e.stopPropagation();if(e.type==="click"&&e.target.closest(".chevron-wrapper")){this.toggleExpansion();return}let t;if(this.indeterminate){t=true}else{t=!this.selected}this.selected=t;this.indeterminate=false;if(this.hasChildren){this.isExpanded=t;requestAnimationFrame((()=>{this.selectAllChildren(t);this.expandAllChildren(t)}))}this.updateParentStates();this.notifyMultiselect()}handleKeyDown(e){if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;const t=e.target;if(t.closest(".chevron-wrapper")||t.closest(".checkbox-wrapper")){return}if(e.key!=="ArrowUp"&&e.key!=="ArrowDown"){e.stopPropagation()}if(e.key==="ArrowRight"&&this.hasChildren){this.isExpanded=true}if(e.key==="ArrowLeft"&&this.hasChildren){this.isExpanded=false}}notifyMultiselect(){const e=new CustomEvent("ifx-option-changed",{bubbles:true,detail:{value:this.value,selected:this.selected,indeterminate:this.indeterminate}});this.el.dispatchEvent(e)}selectAllChildren(e){const t=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));t.forEach((t=>{var i;const s=t["__stencil_instance"];if(s){s.selected=e;s.indeterminate=false;if(s.hasChildren){s.isExpanded=e;s.selectAllChildren(e)}(i=s.notifyMultiselect)===null||i===void 0?void 0:i.call(s)}}))}expandAllChildren(e){const t=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));t.forEach((t=>{const i=t["__stencil_instance"];if(i&&i.hasChildren){i.isExpanded=e;i.expandAllChildren(e)}}))}updateParentStates(){var e;let t=this.el.parentElement;while(t&&t.tagName==="IFX-MULTISELECT-OPTION"){const i=t["__stencil_instance"];if(!i){t=t.parentElement;continue}const s=Array.from(t.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map((e=>e["__stencil_instance"])).filter((e=>e!==null));const o=s.filter((e=>e.selected)).length;const n=s.filter((e=>e.indeterminate)).length;const l=s.length;if(o===l&&n===0){i.selected=true;i.indeterminate=false}else if(o===0&&n===0){i.selected=false;i.indeterminate=false}else{i.selected=false;i.indeterminate=true}(e=i.notifyMultiselect)===null||e===void 0?void 0:e.call(i);t=t.parentElement}}toggleExpansion(){this.isExpanded=!this.isExpanded}hasAnySelectedChildren(){const e=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return e.some((e=>{const t=e.hasAttribute("selected");const i=this.checkForSelectedDescendants(e);return t||i}))}checkForSelectedDescendants(e){const t=Array.from(e.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return t.some((e=>{const t=e.hasAttribute("selected");const i=this.checkForSelectedDescendants(e);return t||i}))}render(){let e=false;const t=this.el.closest("ifx-multiselect");if(t){const i=Array.from(t.querySelectorAll("ifx-multiselect-option"));e=i.every((e=>e.children.length===0))}const s=this.depth*28+16;const n=this.hasChildren?0:28;let l=s+n;const c=e?undefined:{paddingLeft:`${l}px`};return i(o,{key:"4dd008dabc4aec3070ad355aa877ff391e3883df"},i("div",{key:"848afd2fa2a34c2b5763dc8c979d898b498b39b1",class:{option:true,"option--has-children":this.hasChildren,"option--expanded":this.isExpanded,"option--disabled":this.disabled,"option--selected":this.selected},role:"option","aria-expanded":this.hasChildren?this.isExpanded?"true":"false":undefined,"aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false","data-level":this.depth,"data-value":this.value},i("div",{key:"28fe299c78e8f42d9ef763ba14c84e0123276de8",class:"option-item",style:c},i("div",{key:"891cd1a5c09c53df6c8079642aab48a893295cd8",class:"chevron-wrapper",tabIndex:this.hasChildren?0:-1,role:this.hasChildren?"button":undefined,"aria-label":this.hasChildren?this.isExpanded?"Collapse":"Expand":undefined,onClick:e=>{e.stopPropagation();this.toggleExpansion()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.toggleExpansion()}}},this.hasChildren&&i("ifx-icon",{key:"7ddb0f0245f14fd8bc64fbfb3278c1d3a53f3834",class:`chevron ${this.isExpanded?"chevron--expanded":"chevron--collapsed"}`,icon:"chevron-right-16"})),i("div",{key:"a688fb56fd51cc1aefccf9b42d8f5c2a6ac271f8",class:"checkbox-wrapper",onClick:e=>e.stopPropagation()},i("ifx-checkbox",{key:"6ba8ea62a25285a59f3866dc0e7911b658477b3d",size:"s",checked:this.isSearchActive&&this.isSearchDisabled?false:this.indeterminate?false:this.selected,indeterminate:this.isSearchActive&&this.isSearchDisabled?false:this.indeterminate,onClick:this.handleCheckboxClick,disabled:this.disabled||this.isSearchActive&&this.isSearchDisabled,onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.handleCheckboxClick(e)}}})),i("div",{key:"63d0d6313ee94b3e80a2a0058fa1e79431becb29",class:"option-label",onClick:this.handleHeaderClick,tabIndex:-1},i("slot",{key:"f503e85ef020cedec37931b6079a9164c1ce8d5d"}))),this.isExpanded&&i("div",{key:"75297050484cdc4a9c80b2bff614119a7c18ff3f",class:"option-children"},i("slot",{key:"f33fbe0abb5e7c9277e24e0445838d8e4d0a6910",name:"children"}))))}get el(){return s(this)}};d.style=f;export{h as ifx_multiselect,d as ifx_multiselect_option};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,h as i,a as s,d as o}from"./p-DtIEDtZ8.js";import{d as n,t as l}from"./p-DcmcuUOA.js";import{i as c}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", \'Arial, sans-serif\'}.ifx-multiselect-container{position:relative;box-sizing:border-box;font-family:var(--ifx-font-family)}.ifx-multiselect-container.disabled .ifx-label-wrapper{color:#BFBBBB}.ifx-multiselect-container.disabled .ifx-multiselect-wrapper{background:#BFBBBB;color:#FFFFFF;border-color:#BFBBBB;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-multiselect-container:hover{cursor:pointer}.ifx-multiselect-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-label-wrapper .required{margin-left:4px}.ifx-multiselect-container .ifx-label-wrapper .required.error{color:#CD002F}.ifx-multiselect-container .multi__select-caption{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;color:#1D1D1D;flex:none;order:1;align-self:stretch;flex-grow:0}.ifx-multiselect-container .multi__select-caption.error{color:#CD002F}.ifx-multiselect-container .multi__select-caption.disabled{color:#BFBBBB}.ifx-multiselect-container .ifx-multiselect-wrapper{background-color:#FFFFFF;box-sizing:border-box;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;width:100%;font-weight:400;font-style:normal;height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible{outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active)::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-multiselect-container .ifx-multiselect-wrapper.error{border-color:#CD002F}.ifx-multiselect-container .ifx-multiselect-wrapper.active{border-color:#0A8276 !important}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-down{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-up{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.is-flipped .ifx-multiselect-dropdown-menu{top:auto;bottom:100%}.ifx-multiselect-container .ifx-multiselect-input{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ifx-multiselect-container .ifx-multiselect-input.placeholder{opacity:0.5}.ifx-multiselect-container .ifx-multiselect-icon-container{margin-left:auto;display:flex;align-items:center;gap:8px}.ifx-multiselect-container .ifx-multiselect-icon-container .ifx-multiselect-icon-container{display:flex}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper{display:flex;align-items:center;transition:transform 0.2s ease-in-out}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper--open{transform:rotate(180deg)}.ifx-multiselect-container .ifx-clear-button{display:flex;align-items:center}.ifx-multiselect-container .ifx-clear-button.hide{display:none}.ifx-multiselect-container .ifx-multiselect-dropdown-menu{box-sizing:border-box;position:absolute;top:100%;left:0;width:100%;margin-top:4px;border:1px solid #EEEDED;background-color:#FFFFFF;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1);max-height:300px;z-index:1000;display:flex;flex-direction:column}.ifx-multiselect-container:not(.disabled) .ifx-multiselect-wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-multiselect-dropdown-functions{padding:12px 16px;border-bottom:1px solid #EEEDED;flex-shrink:0}.ifx-multiselect-dropdown-search{margin-bottom:12px}.ifx-multiselect-dropdown-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}.ifx-multiselect-dropdown-controls .select-all-wrapper{display:flex}.ifx-multiselect-dropdown-controls .expand-collapse-controls{display:flex;gap:12px}.ifx-multiselect-dropdown-controls .control-item{font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-dropdown-controls .control-item:hover{color:#0A8276}.ifx-multiselect-dropdown-controls .control-item:active{color:#08665C}.ifx-multiselect-dropdown-controls .control-item:focus{outline:none}.ifx-multiselect-dropdown-controls .control-item:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.ifx-multiselect-options{flex:1;overflow-y:auto;padding-top:12px;padding-bottom:12px}.ifx-multiselect-options.show-no-results .ifx-multiselect-no-results{display:block}.ifx-multiselect-no-results{padding-left:16px;padding-right:16px;display:none}';function a(e,t){let i;return function s(...o){const n=()=>{clearTimeout(i);e(...o)};clearTimeout(i);i=setTimeout(n,t)}}const h=class{constructor(i){e(this,i);this.ifxSelect=t(this,"ifxSelect",7);this.ifxOpen=t(this,"ifxOpen",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.disabled=false;this.required=false;this.error=false;this.caption="";this.label="";this.placeholder="";this.showSearch=true;this.showSelectAll=true;this.showClearButton=true;this.showExpandCollapse=true;this.noResultsMessage="No results found.";this.showNoResultsMessage=true;this.searchPlaceholder="Search";this.selectAllLabel="Select all";this.expandLabel="Expand";this.collapseLabel="Collapse";this.ariaMultiSelectLabel="Multi-select dropdown";this.ariaMultiSelectLabelledBy="";this.ariaMultiSelectDescribedBy="";this.ariaSearchLabel="Search options";this.ariaClearLabel="Clear all selections";this.ariaToggleLabel="Toggle dropdown";this.ariaSelectAllLabel="Select all options";this.ariaExpandAllLabel="Expand all categories";this.ariaCollapseAllLabel="Collapse all categories";this.internalError=false;this.persistentSelectedOptions=[];this.dropdownOpen=false;this.searchTerm="";this.handleSearch=a((e=>{const t=e.value.toLowerCase();const i=t!=="";this.searchTerm=t;const s=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper");if(s){if(i){s.classList.remove("active")}else{const e=this.el.shadowRoot.querySelector("ifx-search-field");const t=e&&e.matches(":focus-within");if(!t){s.classList.add("active")}}}const o=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(o){if(i){o.classList.add("has-search-filter")}else{o.classList.remove("has-search-filter")}}requestAnimationFrame((()=>{const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const s=new CustomEvent("ifx-search-filter",{detail:{searchTerm:t,isActive:i}});e.dispatchEvent(s)}));if(i){setTimeout((()=>{const e=this.el.querySelectorAll("ifx-multiselect-option");let t=0;e.forEach((e=>{const i=window.getComputedStyle(e);const s=e.getBoundingClientRect();if(i.display!=="none"&&i.visibility!=="hidden"&&i.opacity!=="0"&&s.height>0){t++}}));const i=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(i){if(t===0){i.classList.add("show-no-results")}else{i.classList.remove("show-no-results")}}}),200)}else{const e=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(e){e.classList.remove("show-no-results")}}}))}),150);this.handleDocumentClick=e=>{const t=e.composedPath();if(!t.includes(this.dropdownElement)){this.dropdownOpen=false;document.removeEventListener("click",this.handleDocumentClick);this.resetSearch();this.ifxOpen.emit(this.dropdownOpen)}}}parseChildOptions(){const e=[];const t=Array.from(this.el.children);t.forEach(((t,i)=>{if(t.tagName==="IFX-MULTISELECT-OPTION"){const s=this.parseOptionElement(t,i);if(s){e.push(s)}}}));return e}parseOptionElement(e,t){const i=e.getAttribute("value")||`option-${t}`;const s=e.hasAttribute("selected");const o=e.hasAttribute("disabled");const n=e.hasAttribute("indeterminate");const l={value:i,selected:s,disabled:o,indeterminate:n};const c=Array.from(e.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map(((e,t)=>this.parseOptionElement(e,t))).filter((e=>e!==null));if(c.length>0){l.children=c}return l}loadInitialOptions(){this.internalError=this.error;const e=this.parseChildOptions();const t=this.collectSelectedOptions(e);const i=t.filter((e=>!this.persistentSelectedOptions.some((t=>t.value==e.value))));this.persistentSelectedOptions=[...this.persistentSelectedOptions,...i]}collectSelectedOptions(e){let t=[];for(const i of e){if(i.selected){if(i.children&&i.children.length>0){t=t.concat(this.collectLeafOptions(i.children))}else{if(!t.some((e=>e.value===i.value))){t.push(i)}}}else{if(i.children&&i.children.length>0){t=t.concat(this.collectSelectedOptions(i.children))}}}return t}collectLeafOptions(e){let t=[];for(const i of e){if(i.children&&i.children.length>0){t=t.concat(this.collectLeafOptions(i.children))}else{t.push(i)}}return t}handleSearchFocus(e){const t=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper");if(t){if(e||this.searchTerm!==""){t.classList.remove("active")}else{t.classList.add("active")}}}positionDropdown(){var e;const t=(e=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper"))===null||e===void 0?void 0:e.getBoundingClientRect();const i=window.innerHeight-t.bottom;const s=t.top;if(s>i&&t.height>i||t.bottom>window.innerHeight){this.dropdownFlipped=true}else{this.dropdownFlipped=false}}updateSlotBasedSelections(e=false){const t=this.el.querySelectorAll("ifx-multiselect-option");const i=[];t.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.selected&&!t.hasChildren){i.push({value:t.value,selected:true,disabled:t.disabled,label:t.getTextContent()||t.value})}}));this.persistentSelectedOptions=i;if(e){this.ifxSelect.emit(this.persistentSelectedOptions)}}updateInitialParentStates(){const e=this.el.querySelectorAll("ifx-multiselect-option");const t=Array.from(e).map((e=>({element:e,instance:e["__stencil_instance"],depth:parseInt(e.getAttribute("data-level")||"0")}))).filter((e=>e.instance)).sort(((e,t)=>t.depth-e.depth));t.forEach((({instance:e})=>{if(e.hasChildren){this.updateParentState(e)}}))}updateParentState(e){const t=Array.from(e.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map((e=>e["__stencil_instance"])).filter((e=>e!==null));const i=t.filter((e=>e.selected)).length;const s=t.filter((e=>e.indeterminate)).length;const o=t.length;if(i===o&&s===0){e.selected=true;e.indeterminate=false}else if(i===0&&s===0){e.selected=false;e.indeterminate=false}else{e.selected=false;e.indeterminate=true}}async componentDidLoad(){if(!c(this.el)){const e=n();l("ifx-multiselect",await e)}setTimeout((()=>{this.positionDropdown()}),500);this.el.addEventListener("ifx-option-changed",(e=>{var t;const i=(t=e.target)===null||t===void 0?void 0:t.__stencil_instance;if(i&&!i.hasChildren){this.updateSlotBasedSelections(true)}}));setTimeout((()=>{this.updateSlotBasedSelections(false);this.updateInitialParentStates()}),100)}componentWillLoad(){this.loadInitialOptions()}updateInternalError(){this.internalError=this.error}onSelectionChange(e,t){const i=new FormData;e.forEach((e=>i.append(this.name,e.value)))}collapseAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.hasChildren){t.isExpanded=false}}))}expandAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t&&t.hasChildren){t.isExpanded=true}}))}selectAll(){this.resetSearch();const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t){if(t.hasChildren){t.isExpanded=true}else{t.selected=true}}}));setTimeout((()=>{this.updateInitialParentStates();this.updateSlotBasedSelections(false);this.ifxSelect.emit(this.persistentSelectedOptions)}),0)}async clearSelection(){const e=this.el.querySelectorAll("ifx-multiselect-option");e.forEach((e=>{const t=e["__stencil_instance"];if(t){t.selected=false;t.indeterminate=false;if(t.hasChildren){t.isExpanded=false}}}));this.persistentSelectedOptions=[];setTimeout((()=>{this.updateSlotBasedSelections(false);this.ifxSelect.emit(this.persistentSelectedOptions)}),0)}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;setTimeout((()=>{if(this.dropdownOpen){document.addEventListener("click",this.handleDocumentClick)}else{this.resetSearch()}this.ifxOpen.emit(this.dropdownOpen)}),0)}resetSearch(){this.searchTerm="";const e=this.el.shadowRoot.querySelector("ifx-search-field");if(e){e.value=""}const t=this.el.shadowRoot.querySelector(".ifx-multiselect-options");if(t){t.classList.remove("has-search-filter")}const i=this.el.querySelectorAll("ifx-multiselect-option");i.forEach((e=>{const t=new CustomEvent("ifx-search-filter",{detail:{searchTerm:"",isActive:false}});e.dispatchEvent(t)}))}handleWrapperClick(e){this.positionDropdown();if(e.currentTarget===e.target){this.toggleDropdown()}}handleKeyDown(e){if(this.disabled)return;if(!this.dropdownOpen){switch(e.code){case"Enter":case"Space":case"ArrowDown":e.preventDefault();this.toggleDropdown();break}return}switch(e.code){case"Escape":e.preventDefault();this.toggleDropdown();break;case"Enter":case"Space":const t=e.target;if(!t.closest(".ifx-multiselect-dropdown-functions")){e.preventDefault();this.toggleDropdown()}break;case"ArrowDown":case"ArrowUp":e.preventDefault();this.focusFirstOption();break}}focusFirstOption(){var e;const t=this.el.querySelector("ifx-multiselect-option:not(.search-hidden)");if(t){const i=(e=t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");i===null||i===void 0?void 0:i.focus()}}renderSelectAll(){const e=this.el.querySelectorAll("ifx-multiselect-option");const t=Array.from(e).filter((e=>!e.hasChildren));const s=Array.from(e).filter((e=>!e.hasChildren&&e.selected));const o=t.length>0&&s.length===t.length;const n=e=>{if(e){e.preventDefault();e.stopPropagation()}if(o){this.clearSelection()}else{this.selectAll()}};return i("div",{class:"select-all-wrapper"},i("ifx-checkbox",{id:"selectAll",checked:o,size:"s","aria-label":this.ariaSelectAllLabel,onClick:n,onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();n(e)}}},this.selectAllLabel))}renderNoResultsMessage(){return i("div",{class:"ifx-multiselect-no-results"},i("div",{class:"no-results-content"},i("span",{class:"no-results-text"},this.noResultsMessage)))}render(){const e=this.persistentSelectedOptions.map((e=>e.label||e.value)).join(", ");const t=this.persistentSelectedOptions.length>0;let s=false;const o=this.el.querySelectorAll("ifx-multiselect-option");if(o.length>0){s=Array.from(o).every((e=>e.children.length===0))}return i("div",{key:"d0643a04050d28db8a1d162832a5bd01699e46cc",class:`ifx-multiselect-container ${this.disabled&&!this.error?"disabled":""}`,ref:e=>this.dropdownElement=e},i("div",{key:"5cbe0844098305cb052e5384635571e24e6fbe1c",class:"ifx-label-wrapper"},this.label&&i("span",{key:"69dbafbcbfa0b836666846a0ea3ff7126c9b5e43",class:"wrapper-label"},i("span",{key:"a2ee5fd71ae7f6f00ae1a004cda4e3e8cc2feb16"},this.label),this.required&&i("span",{key:"e4e902879f8237e32045f4b037a72b3bf5025ebf",class:`required ${this.error?"error":""}`},"*"))),i("div",{key:"97870fecccab25f3775fbd0d7685ad7844efc8bb",class:`ifx-multiselect-wrapper\n ${this.dropdownOpen?"active":""}\n ${this.dropdownFlipped?"is-flipped":""}\n ${this.internalError?"error":""}\n ${this.disabled&&!this.error?"disabled":""}`,role:"combobox","aria-label":this.ariaMultiSelectLabel,"aria-labelledby":this.ariaMultiSelectLabelledBy||undefined,"aria-describedby":this.ariaMultiSelectDescribedBy||undefined,"aria-expanded":this.dropdownOpen,"aria-haspopup":"listbox","aria-disabled":this.disabled&&!this.error,tabindex:"0",onClick:this.disabled&&!this.error?undefined:e=>this.handleWrapperClick(e),onKeyDown:this.disabled&&!this.error?undefined:e=>this.handleKeyDown(e)},i("div",{key:"fdf4c22a5b0f30a4f7b514bc39646b669871aecd",class:`ifx-multiselect-input\n ${t?"":"placeholder"}\n `,onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},t?e:this.placeholder),this.dropdownOpen&&i("div",{key:"9556190732b4ef5d96053ca4976be86c95b5edb8",class:"ifx-multiselect-dropdown-menu"},(this.showSearch||this.showSelectAll||this.showExpandCollapse&&!s)&&i("div",{key:"b7da4fd10300eda5bfdd55dbe35b133b3fdadc34",class:"ifx-multiselect-dropdown-functions",onClick:e=>e.stopPropagation()},this.showSearch&&i("div",{key:"88745790d159eaee099d67f47da895347c643bf2",class:"ifx-multiselect-dropdown-search"},i("ifx-search-field",{key:"23929393f48d8f8c42bf8bc0540bba51e63f2a5a",class:"search-input",placeholder:this.searchPlaceholder,size:"s","show-delete-icon":"true","aria-label":this.ariaSearchLabel,onKeyDown:e=>{e.stopPropagation()},onIfxInput:e=>this.handleSearch(e.target),onFocus:()=>this.handleSearchFocus(true),onBlur:()=>this.handleSearchFocus(false)})),i("div",{key:"d4877d51dcaf0fbaf0005a35543316d9d971ff9a",class:"ifx-multiselect-dropdown-controls"},this.showSelectAll&&this.renderSelectAll(),this.showExpandCollapse&&!s&&i("div",{key:"87b47b9f686188fa0accd7dc65cbe52b53ef9f35",class:"expand-collapse-controls"},i("span",{key:"15cc27a42d424e9bd086900b473d9c38140ce55c",class:"control-item",role:"button",tabIndex:0,"aria-label":this.ariaExpandAllLabel,onClick:e=>{e.stopPropagation();this.expandAll()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.expandAll()}}},this.expandLabel),i("span",{key:"23f0373cf51e46ee8d4bec3b0b4acfd2a1e927ff",class:"control-item",role:"button",tabIndex:0,"aria-label":this.ariaCollapseAllLabel,onClick:e=>{e.stopPropagation();this.collapseAll()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.collapseAll()}}},this.collapseLabel)))),i("div",{key:"bd17374af6fccd246b8f95b8dcb0ffc7cc736a1a",class:"ifx-multiselect-options",role:"listbox","aria-multiselectable":"true"},i("slot",{key:"007836fb8658edf0cae20978916af89a5c0293e3"}),this.searchTerm&&this.showNoResultsMessage&&this.renderNoResultsMessage())),i("div",{key:"80089a7f30ae376e6d06229abb9875ec051127e4",class:"ifx-multiselect-icon-container"},this.persistentSelectedOptions.length>0&&i("div",{key:"98e96edd536d19c9ab5f199b0cb222bd4c07e063",class:`ifx-clear-button ${!this.showClearButton?"hide":""}`,onClick:this.disabled&&!this.error?undefined:()=>this.clearSelection()},i("ifx-icon",{key:"9ae175841f71314c4450e109219906745cfe3274",icon:"cRemove16"})),i("div",{key:"11e0b4088fb5f85f69518b1bdab326f78a87a3c0",class:"icon-wrapper-up",onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-up",icon:"chevron-up-16"})),i("div",{key:"a6d5d8a22605f7028571c63d6f2c59b43e097fac",class:"icon-wrapper-down",onClick:this.disabled&&!this.error?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-down",icon:"chevron-down-16"})))),this.caption&&i("div",{key:"172f27a685b53a6f519a857c4a4b3966ea85b693",class:`multi__select-caption ${this.error?"error":""} ${this.disabled&&!this.error?"disabled":""}`},this.caption))}get el(){return s(this)}static get watchers(){return{error:["updateInternalError"],persistentSelectedOptions:["onSelectionChange"]}}};h.style=r;const f=":host{display:block;width:100%}.option{display:flex;flex-direction:column;position:relative;cursor:pointer;list-style:none}.option.option--expanded{position:relative}.option.option--has-children{position:relative}.option.option--has-children .option-item>.chevron-wrapper{display:flex}.option--disabled{cursor:not-allowed;pointer-events:none;color:#BFBBBB}.option.search-hidden{display:none !important}.option.search-match .option-item .option-label .search-highlight{font-weight:bold}.option-item{display:flex;flex-direction:row;align-items:center;white-space:nowrap;min-height:20px;padding:4px 16px;background-color:#FFFFFF;transition:background-color 0.2s ease-in-out}.option-item:hover{background-color:#F7F7F7}.option--disabled .option-item:hover{background-color:transparent}.option-children{display:block}.chevron-wrapper{display:none;align-items:center;justify-content:center;margin-right:8px;width:20px;height:20px;flex-shrink:0}.chevron-wrapper:focus{outline:none}.chevron-wrapper:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--has-children .chevron-wrapper{display:flex}.chevron-wrapper .chevron{transition:transform 0.2s ease-in-out;color:#3C3A39}.chevron-wrapper .chevron.chevron--expanded{transform:rotate(90deg)}.chevron-wrapper .chevron.chevron--collapsed{transform:rotate(0deg)}.checkbox-wrapper{display:flex;align-items:center;margin-right:8px;flex-shrink:0}.option-label{flex-grow:1;display:flex;align-items:center;cursor:pointer;padding:2px 0;font-size:0.875rem}.option-label:focus{outline:none}.option-label:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--disabled .option-label{cursor:not-allowed;color:#BFBBBB}";const d=class{constructor(t){e(this,t);this.selected=false;this.disabled=false;this.indeterminate=false;this.isExpanded=false;this.hasChildren=false;this.depth=0;this.searchTerm="";this.isSearchActive=false;this.isSearchDisabled=false;this.handleSearchFilter=e=>{const{searchTerm:t,isActive:i}=e.detail;this.searchTerm=t.toLowerCase();this.isSearchActive=i;requestAnimationFrame((()=>{this.updateSearchClasses()}))};this.handleCheckboxClick=e=>{if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;e.stopPropagation();let t;if(this.indeterminate){t=true}else{t=!this.selected}this.selected=t;this.indeterminate=false;if(this.hasChildren){this.isExpanded=t;requestAnimationFrame((()=>{this.selectAllChildren(t);this.expandAllChildren(t)}))}this.updateParentStates();this.notifyMultiselect()};this.handleHeaderClick=e=>{e.stopPropagation();if(!this.disabled&&!(this.isSearchActive&&this.isSearchDisabled)){this.handleClick(e)}}}componentWillLoad(){this.hasChildren=this.el.children.length>0;this.depth=this.calculateDepth();this.el.setAttribute("data-level",this.depth.toString());if(this.hasChildren){const e=this.hasAnySelectedChildren();if(e){this.isExpanded=true}}}componentDidLoad(){this.el["__stencil_instance"]=this;this.notifyMultiselect();this.el.addEventListener("ifx-search-filter",this.handleSearchFilter)}componentWillUpdate(){this.notifyMultiselect()}disconnectedCallback(){this.el.removeEventListener("ifx-search-filter",this.handleSearchFilter)}updateSearchClasses(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option");if(!t)return;if(!this.isSearchActive){t.classList.remove("search-hidden","search-parent","search-match");this.removeHighlighting();this.isSearchDisabled=false;return}const i=this.getTextContent().toLowerCase();const s=i.includes(this.searchTerm);const o=this.hasMatchingParent();requestAnimationFrame((()=>{const e=this.hasMatchingChildren();t.classList.remove("search-hidden","search-parent","search-match");this.isSearchDisabled=false;if(s&&!this.hasChildren){t.classList.add("search-match");this.highlightSearchTerm()}else if(s&&this.hasChildren){t.classList.add("search-match");this.highlightSearchTerm();this.isExpanded=true}else if(!s&&this.hasChildren&&e){t.classList.add("search-parent");this.removeHighlighting();this.isExpanded=true;this.isSearchDisabled=true}else if(o){t.classList.add("search-match");this.removeHighlighting()}else{t.classList.add("search-hidden");this.removeHighlighting()}}))}highlightSearchTerm(){var e;if(!this.searchTerm)return;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");if(!t)return;const i=t.querySelector("slot");if(!i)return;this.removeHighlighting();const s=this.getTextContent();const o=this.searchTerm.toLowerCase();const n=s.toLowerCase();if(!n.includes(o))return;const l=n.indexOf(o);if(l===-1)return;const c=s.substring(0,l);const r=s.substring(l,l+o.length);const a=s.substring(l+o.length);const h=document.createElement("span");h.className="highlighted-text";if(c){h.appendChild(document.createTextNode(c))}const f=document.createElement("strong");f.className="search-highlight";f.textContent=r;h.appendChild(f);if(a){h.appendChild(document.createTextNode(a))}t.setAttribute("data-original-content","true");i.style.display="none";t.appendChild(h)}removeHighlighting(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".option-label");if(!t)return;const i=t.querySelector("slot");const s=t.querySelector(".highlighted-text");if(s){t.removeChild(s)}if(i){i.style.display=""}t.removeAttribute("data-original-content")}getTextContent(){let e="";Array.from(this.el.childNodes).forEach((t=>{var i;if(t.nodeType===Node.TEXT_NODE){e+=((i=t.textContent)===null||i===void 0?void 0:i.trim())||""}}));return e||this.value||""}hasMatchingChildren(){if(!this.hasChildren)return false;const e=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return e.some((e=>{const t=e["__stencil_instance"];if(!t)return false;const i=t.getTextContent().toLowerCase();const s=i.includes(this.searchTerm);const o=t.hasMatchingChildren();return s||o}))}hasMatchingParent(){let e=this.el.parentElement;while(e&&e.tagName==="IFX-MULTISELECT-OPTION"){const t=e["__stencil_instance"];if(t){const e=t.getTextContent().toLowerCase();if(e.includes(this.searchTerm)){return true}}e=e.parentElement}return false}calculateDepth(){let e=0;let t=this.el.parentElement;while(t&&t.tagName!=="IFX-MULTISELECT"){if(t.tagName==="IFX-MULTISELECT-OPTION"){e++}t=t.parentElement}return e}handleClick(e){if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;e.stopPropagation();if(e.type==="click"&&e.target.closest(".chevron-wrapper")){this.toggleExpansion();return}let t;if(this.indeterminate){t=true}else{t=!this.selected}this.selected=t;this.indeterminate=false;if(this.hasChildren){this.isExpanded=t;requestAnimationFrame((()=>{this.selectAllChildren(t);this.expandAllChildren(t)}))}this.updateParentStates();this.notifyMultiselect()}handleKeyDown(e){if(this.disabled||this.isSearchActive&&this.isSearchDisabled)return;const t=e.target;if(t.closest(".chevron-wrapper")||t.closest(".checkbox-wrapper")){return}if(e.key!=="ArrowUp"&&e.key!=="ArrowDown"){e.stopPropagation()}if(e.key==="ArrowRight"&&this.hasChildren){this.isExpanded=true}if(e.key==="ArrowLeft"&&this.hasChildren){this.isExpanded=false}}notifyMultiselect(){const e=new CustomEvent("ifx-option-changed",{bubbles:true,detail:{value:this.value,selected:this.selected,indeterminate:this.indeterminate}});this.el.dispatchEvent(e)}selectAllChildren(e){const t=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));t.forEach((t=>{var i;const s=t["__stencil_instance"];if(s){s.selected=e;s.indeterminate=false;if(s.hasChildren){s.isExpanded=e;s.selectAllChildren(e)}(i=s.notifyMultiselect)===null||i===void 0?void 0:i.call(s)}}))}expandAllChildren(e){const t=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));t.forEach((t=>{const i=t["__stencil_instance"];if(i&&i.hasChildren){i.isExpanded=e;i.expandAllChildren(e)}}))}updateParentStates(){var e;let t=this.el.parentElement;while(t&&t.tagName==="IFX-MULTISELECT-OPTION"){const i=t["__stencil_instance"];if(!i){t=t.parentElement;continue}const s=Array.from(t.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION")).map((e=>e["__stencil_instance"])).filter((e=>e!==null));const o=s.filter((e=>e.selected)).length;const n=s.filter((e=>e.indeterminate)).length;const l=s.length;if(o===l&&n===0){i.selected=true;i.indeterminate=false}else if(o===0&&n===0){i.selected=false;i.indeterminate=false}else{i.selected=false;i.indeterminate=true}(e=i.notifyMultiselect)===null||e===void 0?void 0:e.call(i);t=t.parentElement}}toggleExpansion(){this.isExpanded=!this.isExpanded}hasAnySelectedChildren(){const e=Array.from(this.el.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return e.some((e=>{const t=e.hasAttribute("selected");const i=this.checkForSelectedDescendants(e);return t||i}))}checkForSelectedDescendants(e){const t=Array.from(e.children).filter((e=>e.tagName==="IFX-MULTISELECT-OPTION"));return t.some((e=>{const t=e.hasAttribute("selected");const i=this.checkForSelectedDescendants(e);return t||i}))}render(){let e=false;const t=this.el.closest("ifx-multiselect");if(t){const i=Array.from(t.querySelectorAll("ifx-multiselect-option"));e=i.every((e=>e.children.length===0))}const s=this.depth*28+16;const n=this.hasChildren?0:28;let l=s+n;const c=e?undefined:{paddingLeft:`${l}px`};return i(o,{key:"87fc18abf09bc48cc6429d9cf6a7c41bb27bf33c"},i("div",{key:"6b453922a7f29c58a5ee60d3cb9e302a1062aa3a",class:{option:true,"option--has-children":this.hasChildren,"option--expanded":this.isExpanded,"option--disabled":this.disabled,"option--selected":this.selected},role:"option","aria-expanded":this.hasChildren?this.isExpanded?"true":"false":undefined,"aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false","data-level":this.depth,"data-value":this.value},i("div",{key:"ec104ce71c38d4b33e8e1b00c8be1d448f3b1d70",class:"option-item",style:c},i("div",{key:"84684cf716bd80669252f611badd4570c696a3fd",class:"chevron-wrapper",tabIndex:this.hasChildren?0:-1,role:this.hasChildren?"button":undefined,"aria-label":this.hasChildren?this.isExpanded?"Collapse":"Expand":undefined,onClick:e=>{e.stopPropagation();this.toggleExpansion()},onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.toggleExpansion()}}},this.hasChildren&&i("ifx-icon",{key:"671daf9ed91d6aa31ae693530e205b882b43760d",class:`chevron ${this.isExpanded?"chevron--expanded":"chevron--collapsed"}`,icon:"chevron-right-16"})),i("div",{key:"49cbd2830df83246e190c6b99fb8b4e032e1a00d",class:"checkbox-wrapper",onClick:e=>e.stopPropagation()},i("ifx-checkbox",{key:"815951eb3d5528dd9c987622ffe7886b51d8f592",size:"s",checked:this.isSearchActive&&this.isSearchDisabled?false:this.indeterminate?false:this.selected,indeterminate:this.isSearchActive&&this.isSearchDisabled?false:this.indeterminate,onClick:this.handleCheckboxClick,disabled:this.disabled||this.isSearchActive&&this.isSearchDisabled,onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();e.stopPropagation();this.handleCheckboxClick(e)}}})),i("div",{key:"374d1d3344dc99cb5efbb89dd744e1bbba969169",class:"option-label",onClick:this.handleHeaderClick,tabIndex:-1},i("slot",{key:"f729b2f14d20953221a14c159743539e979b2d12"}))),this.isExpanded&&i("div",{key:"248b9ca94f6781537ca7a651d25621bfabcdfcad",class:"option-children"},i("slot",{key:"269266cc56a04693d6c08d3f80c45df3a4ad0c56",name:"children"}))))}get el(){return s(this)}};d.style=f;export{h as ifx_multiselect,d as ifx_multiselect_option};
|
|
2
|
+
//# sourceMappingURL=p-f06af3d9.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,h as r,a as e}from"./p-DtIEDtZ8.js";import{d as n,t as d}from"./p-DcmcuUOA.js";import{i}from"./p-Bw2fh5LT.js";const a=":root{--ifx-font-family:\"Source Sans 3\", 'Arial, sans-serif'}:host{display:inline-block}.container{display:flex;min-height:1.25em;align-items:center;padding:0 8px;border-radius:9999px;font-family:var(--ifx-font-family)}.container.no-border{padding:0}.container.border-engineering-100{border:1px solid #F7F7F7}.container.border-engineering-200{border:1px solid #EEEDED}.container.border-engineering-300{border:1px solid #BFBBBB}.container.border-engineering-400{border:1px solid #8D8786}.container.border-engineering-500{border:1px solid #575352}.container.border-engineering-600{border:1px solid #3C3A39}.container.border-ocean-100{border:1px solid #DFF4F3}.container.border-ocean-200{border:1px solid #B8DEDA}.container.border-ocean-300{border:1px solid #6CB4AD}.container.border-ocean-400{border:1px solid #3B9B91}.container.border-ocean-500{border:1px solid #0A8276}.container.border-ocean-600{border:1px solid #08665C}.container.border-ocean-700{border:1px solid #06534B}.container.border-red-500{border:1px solid #CD002F}.container.border-red-600{border:1px solid #A2001E}.container.border-red-700{border:1px solid #900021}.container.border-orange-500{border:1px solid #E16B25}.container.border-green-500{border:1px solid #4CA460}.container.border-lawn-400{border:1px solid #B9D257}.container.border-lawn-500{border:1px solid #9BBA43}.container.border-lawn-700{border:1px solid #3C6C0F}.container.border-berry-400{border:1px solid #BE3283}.container.border-berry-500{border:1px solid #9C216E}.container.border-sun-400{border:1px solid #FF9737}.container.border-sun-500{border:1px solid #F97414}.container.border-sand-400{border:1px solid #FBE273}.container.border-sand-500{border:1px solid #FCD442}.text{margin:0;padding-left:4px;font-style:normal;font-weight:600;font-size:1rem;line-height:1.25rem;display:inline;color:#1D1D1D}.dot{display:inline-block;width:8px;height:8px;border-radius:9999px}.dot.engineering-100{background-color:#F7F7F7}.dot.engineering-200{background-color:#EEEDED}.dot.engineering-300{background-color:#BFBBBB}.dot.engineering-400{background-color:#8D8786}.dot.engineering-500{background-color:#575352}.dot.engineering-600{background-color:#3C3A39}.dot.ocean-100{background-color:#DFF4F3}.dot.ocean-200{background-color:#B8DEDA}.dot.ocean-300{background-color:#6CB4AD}.dot.ocean-400{background-color:#3B9B91}.dot.ocean-500{background-color:#0A8276}.dot.ocean-600{background-color:#08665C}.dot.ocean-700{background-color:#06534B}.dot.red-500{background-color:#CD002F}.dot.red-600{background-color:#A2001E}.dot.red-700{background-color:#900021}.dot.orange-500{background-color:#E16B25}.dot.green-500{background-color:#4CA460}.dot.lawn-400{background-color:#B9D257}.dot.lawn-500{background-color:#9BBA43}.dot.lawn-700{background-color:#3C6C0F}.dot.berry-400{background-color:#BE3283}.dot.berry-500{background-color:#9C216E}.dot.sun-400{background-color:#FF9737}.dot.sun-500{background-color:#F97414}.dot.sand-400{background-color:#FBE273}.dot.sand-500{background-color:#FCD442}";const c=class{constructor(r){o(this,r);this.border=false;this.color="orange-500"}async componentDidLoad(){if(!i(this.el)){const o=n();d("ifx-status",await o)}}render(){var o;const e=((o=this.color)===null||o===void 0?void 0:o.trim())?this.color:"orange-500";const n=this.border?`container border-${e}`:"container no-border";return r("div",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,h as r,a as e}from"./p-DtIEDtZ8.js";import{d as n,t as d}from"./p-DcmcuUOA.js";import{i}from"./p-Bw2fh5LT.js";const a=":root{--ifx-font-family:\"Source Sans 3\", 'Arial, sans-serif'}:host{display:inline-block}.container{display:flex;min-height:1.25em;align-items:center;padding:0 8px;border-radius:9999px;font-family:var(--ifx-font-family)}.container.no-border{padding:0}.container.border-engineering-100{border:1px solid #F7F7F7}.container.border-engineering-200{border:1px solid #EEEDED}.container.border-engineering-300{border:1px solid #BFBBBB}.container.border-engineering-400{border:1px solid #8D8786}.container.border-engineering-500{border:1px solid #575352}.container.border-engineering-600{border:1px solid #3C3A39}.container.border-ocean-100{border:1px solid #DFF4F3}.container.border-ocean-200{border:1px solid #B8DEDA}.container.border-ocean-300{border:1px solid #6CB4AD}.container.border-ocean-400{border:1px solid #3B9B91}.container.border-ocean-500{border:1px solid #0A8276}.container.border-ocean-600{border:1px solid #08665C}.container.border-ocean-700{border:1px solid #06534B}.container.border-red-500{border:1px solid #CD002F}.container.border-red-600{border:1px solid #A2001E}.container.border-red-700{border:1px solid #900021}.container.border-orange-500{border:1px solid #E16B25}.container.border-green-500{border:1px solid #4CA460}.container.border-lawn-400{border:1px solid #B9D257}.container.border-lawn-500{border:1px solid #9BBA43}.container.border-lawn-700{border:1px solid #3C6C0F}.container.border-berry-400{border:1px solid #BE3283}.container.border-berry-500{border:1px solid #9C216E}.container.border-sun-400{border:1px solid #FF9737}.container.border-sun-500{border:1px solid #F97414}.container.border-sand-400{border:1px solid #FBE273}.container.border-sand-500{border:1px solid #FCD442}.text{margin:0;padding-left:4px;font-style:normal;font-weight:600;font-size:1rem;line-height:1.25rem;display:inline;color:#1D1D1D}.dot{display:inline-block;width:8px;height:8px;border-radius:9999px}.dot.engineering-100{background-color:#F7F7F7}.dot.engineering-200{background-color:#EEEDED}.dot.engineering-300{background-color:#BFBBBB}.dot.engineering-400{background-color:#8D8786}.dot.engineering-500{background-color:#575352}.dot.engineering-600{background-color:#3C3A39}.dot.ocean-100{background-color:#DFF4F3}.dot.ocean-200{background-color:#B8DEDA}.dot.ocean-300{background-color:#6CB4AD}.dot.ocean-400{background-color:#3B9B91}.dot.ocean-500{background-color:#0A8276}.dot.ocean-600{background-color:#08665C}.dot.ocean-700{background-color:#06534B}.dot.red-500{background-color:#CD002F}.dot.red-600{background-color:#A2001E}.dot.red-700{background-color:#900021}.dot.orange-500{background-color:#E16B25}.dot.green-500{background-color:#4CA460}.dot.lawn-400{background-color:#B9D257}.dot.lawn-500{background-color:#9BBA43}.dot.lawn-700{background-color:#3C6C0F}.dot.berry-400{background-color:#BE3283}.dot.berry-500{background-color:#9C216E}.dot.sun-400{background-color:#FF9737}.dot.sun-500{background-color:#F97414}.dot.sand-400{background-color:#FBE273}.dot.sand-500{background-color:#FCD442}";const c=class{constructor(r){o(this,r);this.border=false;this.color="orange-500"}async componentDidLoad(){if(!i(this.el)){const o=n();d("ifx-status",await o)}}render(){var o;const e=((o=this.color)===null||o===void 0?void 0:o.trim())?this.color:"orange-500";const n=this.border?`container border-${e}`:"container no-border";return r("div",{key:"7de92ae631477ee2334aeb95cd02d68f4e54e112",role:"status",class:n},r("span",{key:"c6d819a3be750301fe179d5dc50874aa41cfeef8",class:`dot ${e}`}),r("p",{key:"4a00e2033f705a6755d609f6bd9f7fe44a619f75",class:"text"},this.label))}get el(){return e(this)}};c.style=a;export{c as ifx_status};
|
|
2
|
+
//# sourceMappingURL=p-f855d12d.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,a as s}from"./p-DtIEDtZ8.js";function a(e){return Array.from(e.querySelectorAll("ifx-list-entry")).filter((e=>e.getAttribute("value")==="true")).map((e=>({label:e.getAttribute("label"),value:e.getAttribute("value"),type:e.getAttribute("type")})))}const n=".header{display:flex;align-items:flex-start;align-self:stretch;cursor:pointer;border-left:3px solid transparent}.text-and-icon{display:flex;padding:12px 16px 12px 20px;align-items:center;gap:16px;flex:1 0 0}.header.expanded{border-left:3px solid #0A8276}.text{display:flex;align-items:center;gap:8px;flex:1 0 0;color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.hidden{display:none}.accordion{border-bottom:1px solid #EEEDED}.filter-accordion-container{display:flex;padding:8px 16px 16px 20px;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch;border-left:3px solid #0A8276}::slotted(ifx-filter-entry:nth-child(n+7)){display:none}.link{display:flex;align-items:center;gap:8px}.show-more ::slotted(ifx-filter-entry:nth-child(n+7)){display:block}.show-more .show-more-link{display:none}";const d=class{constructor(t){e(this,t);this.ifxFilterAccordionChange=i(this,"ifxFilterAccordionChange",7);this.initialized=false;this.expanded=false;this.count=0;this.totalItems=0;this.filterGroupName="";this.handleCheckedChange=e=>{const i=e.detail.selectedItems;this.count=i.length;this.ifxFilterAccordionChange.emit({filterGroupName:this.filterGroupName,selectedItems:i})};this.toggleAccordion=e=>{e.stopPropagation();this.expanded=!this.expanded}}componentWillLoad(){this.el.addEventListener("ifxListUpdate",this.handleCheckedChange)}componentDidLoad(){if(!this.initialized){const e=a(this.el);this.count=e.length;this.initialized=true}}componentWillUnload(){this.el.removeEventListener("ifxListUpdate",this.handleCheckedChange)}render(){return t("div",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as i,h as t,a as s}from"./p-DtIEDtZ8.js";function a(e){return Array.from(e.querySelectorAll("ifx-list-entry")).filter((e=>e.getAttribute("value")==="true")).map((e=>({label:e.getAttribute("label"),value:e.getAttribute("value"),type:e.getAttribute("type")})))}const n=".header{display:flex;align-items:flex-start;align-self:stretch;cursor:pointer;border-left:3px solid transparent}.text-and-icon{display:flex;padding:12px 16px 12px 20px;align-items:center;gap:16px;flex:1 0 0}.header.expanded{border-left:3px solid #0A8276}.text{display:flex;align-items:center;gap:8px;flex:1 0 0;color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.hidden{display:none}.accordion{border-bottom:1px solid #EEEDED}.filter-accordion-container{display:flex;padding:8px 16px 16px 20px;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch;border-left:3px solid #0A8276}::slotted(ifx-filter-entry:nth-child(n+7)){display:none}.link{display:flex;align-items:center;gap:8px}.show-more ::slotted(ifx-filter-entry:nth-child(n+7)){display:block}.show-more .show-more-link{display:none}";const d=class{constructor(t){e(this,t);this.ifxFilterAccordionChange=i(this,"ifxFilterAccordionChange",7);this.initialized=false;this.expanded=false;this.count=0;this.totalItems=0;this.filterGroupName="";this.handleCheckedChange=e=>{const i=e.detail.selectedItems;this.count=i.length;this.ifxFilterAccordionChange.emit({filterGroupName:this.filterGroupName,selectedItems:i})};this.toggleAccordion=e=>{e.stopPropagation();this.expanded=!this.expanded}}componentWillLoad(){this.el.addEventListener("ifxListUpdate",this.handleCheckedChange)}componentDidLoad(){if(!this.initialized){const e=a(this.el);this.count=e.length;this.initialized=true}}componentWillUnload(){this.el.removeEventListener("ifxListUpdate",this.handleCheckedChange)}render(){return t("div",{key:"b4a21b89e0d939e05deae72440aef2159a6c1bda",class:`accordion ${this.expanded?"expanded":""}`},t("div",{key:"270907a017f3fcd0130f1aaf979df5570884c04b",class:`header ${this.expanded?"expanded":""}`,onClick:this.toggleAccordion},t("div",{key:"cff21898f155ab2ba80d8bbfd5b299f2c013674e",class:`text-and-icon ${this.expanded?"expanded":""}`},t("div",{key:"a3a72e8c8e5b27e7d583dd79e495b07e6627996d",class:"text"},t("span",{key:"88fb60623b86205e8212e4a86f1d3870964112e2"},this.filterGroupName),t("ifx-indicator",{key:"ef21b584256849cae07b792cc072dfc404454fc8",variant:"number",number:this.count})),t("ifx-icon",{key:"49b73fdb66254dcd887b8640dc016bd76e027546",class:this.expanded?"":"hidden",icon:"minus-16",onClick:this.toggleAccordion}),t("ifx-icon",{key:"9d08f6314056b2c0c44e37976c5102a762a5f086",class:this.expanded?"hidden":"",icon:"plus-16",onClick:this.toggleAccordion}))),this.expanded&&t("div",{key:"22152489e3de743eff22354cfe12c413261ce488",class:"filter-accordion-container"},t("slot",{key:"68b884d7fd28e8d68157ab05cd07b329a34b7dae",name:"list"})))}get el(){return s(this)}};d.style=n;export{d as ifx_filter_accordion};
|
|
2
|
+
//# sourceMappingURL=p-fc030370.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,d as s,a as r}from"./p-DtIEDtZ8.js";const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as i,d as s,a as r}from"./p-DtIEDtZ8.js";const o=":host{display:flex}.filter-type-group{width:260px;align-items:flex-start;gap:8px}.filter-type-group>::slotted(*){margin-bottom:8px}";const n=class{constructor(i){t(this,i);this.ifxSidebarFilterChange=e(this,"ifxSidebarFilterChange",7);this.selectedOptions=[];this.handleResetEvent=()=>{const t=this.el.shadowRoot.querySelector('slot[name="filter-accordion"]');const e=t.assignedElements({flatten:true});e.forEach((t=>{const e=t.querySelectorAll("ifx-list");e.forEach((t=>{t.resetTrigger=!t.resetTrigger}))}));const i=this.el.shadowRoot.querySelector('slot[name="filter-search"]');const s=i.assignedElements({flatten:true});s.forEach((t=>{const e=t.querySelector("ifx-filter-search");const i=e.shadowRoot.querySelectorAll("ifx-search-field");if(i.length>0){i.forEach((t=>{t.value=""}))}}));this.selectedOptions=[];this.ifxSidebarFilterChange.emit(this.selectedOptions)};this.handleUpdateSidebarFilter=t=>{const{filterName:e}=t.detail;const i=this.el.shadowRoot.querySelector('slot[name="filter-accordion"]');const s=i?i.assignedElements({flatten:true}):[];s.forEach((t=>{const i=t.querySelectorAll("ifx-list");i.forEach((t=>{if(t.getAttribute("name")===e){t.resetTrigger=!t.resetTrigger}}))}));const r=this.el.shadowRoot.querySelector('slot[name="filter-search"]');const o=r?r.assignedNodes({flatten:true}):[];o.forEach((t=>{if(t.nodeType===Node.ELEMENT_NODE){const e=t;const i=e.firstElementChild;if(i){i.setAttribute("value","");i.dispatchEvent(new CustomEvent("ifxInput",{bubbles:true,composed:true,detail:""}))}}}));const n=this.selectedOptions.map((t=>{if(t.filterGroupName===e){return Object.assign(Object.assign({},t),{selectedItems:[],value:""})}return t}));this.selectedOptions=n;this.ifxSidebarFilterChange.emit(this.selectedOptions)};this.handleAccordionChange=t=>{this.handleFilterChange(t)};this.handleSearchChange=t=>{this.handleFilterChange(t)};this.handleFilterChange=t=>{const e=[...this.selectedOptions];if(t.type==="ifxFilterSearchChange"){const{filterName:i,filterValue:s}=t.detail;const r=e.findIndex((t=>typeof t!=="string"&&t.filterGroupName===i));if(r!==-1){e[r].value=s}else{e.push({filterGroupName:i,value:s})}}else if(t.type==="ifxFilterAccordionChange"){const{filterGroupName:i,selectedItems:s}=t.detail;const r=e.findIndex((t=>t.filterGroupName===i));if(r!==-1){e[r]={filterGroupName:i,selectedItems:s}}else{e.push({filterGroupName:i,selectedItems:s})}}this.selectedOptions=e;this.ifxSidebarFilterChange.emit(this.selectedOptions)}}connectedCallback(){this.el.addEventListener("ifxFilterAccordionChange",this.handleAccordionChange);this.el.addEventListener("ifxFilterSearchChange",this.handleSearchChange);window.addEventListener("ifxResetFiltersEvent",this.handleResetEvent);window.addEventListener("ifxUpdateSidebarFilter",this.handleUpdateSidebarFilter)}componentWillUnload(){this.el.removeEventListener("ifxFilterAccordionChange",this.handleAccordionChange);this.el.removeEventListener("ifxFilterSearchChange",this.handleSearchChange);window.removeEventListener("ifxResetFiltersEvent",this.handleResetEvent)}render(){return i(s,{key:"f7718698368335b6f2dba728a7d0bb04ee108122"},i("div",{key:"9d24441d487b7a8be2194b0024a29dc42703b5d4",class:"filter-type-group"},i("slot",{key:"918ab2eac7736bfd96f8b407f12c1bed4844ba70",name:"filter-search"}),i("slot",{key:"fb69779d06e7da53479ea8cd6936c36cc2bc48f3",name:"filter-accordion"})))}get el(){return r(this)}};n.style=o;export{n as ifx_filter_type_group};
|
|
2
|
+
//# sourceMappingURL=p-fef185c2.entry.js.map
|
|
@@ -57,16 +57,12 @@ export declare class SearchField {
|
|
|
57
57
|
loadSearchHistory(): void;
|
|
58
58
|
clearSearchHistory(): void;
|
|
59
59
|
private addToHistory;
|
|
60
|
-
private removeFromHistory;
|
|
61
|
-
private handleHistoryDelete;
|
|
62
60
|
private requestSuggestions;
|
|
63
61
|
private updateSuggestions;
|
|
64
62
|
private navigateSuggestions;
|
|
65
63
|
private selectSuggestion;
|
|
66
64
|
private hideDropdown;
|
|
67
65
|
private showHistoryDropdown;
|
|
68
|
-
private isShowingOnlyHistory;
|
|
69
|
-
private renderHighlightedText;
|
|
70
66
|
componentWillLoad(): void;
|
|
71
67
|
componentDidLoad(): Promise<void>;
|
|
72
68
|
componentWillUpdate(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infineon/infineon-design-system-stencil",
|
|
3
|
-
"version": "39.5.3--canary.2143.
|
|
3
|
+
"version": "39.5.3--canary.2143.7e22c74e4f4e08bfb2cb8d5e5811adf79267a112.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Infineon design system Stencil web components",
|
|
6
6
|
"homepage": "https://infineon.github.io/infineon-design-system-stencil",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-dwBbLAVm.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,o9KAAo9K;;MCqB99K,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AANxB,IAAA,WAAA,GAAA;;;;;;;;;AAW2B,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AACnC,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A,CAAE,EAC9C,CAAA,EAAG,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EACpC,CAAA,EAAG,IAAI,CAAC,YAAY,GAAG,eAAe,GAAG,EAAE,CAAA,CAAE,EAC7C,CAAA,EAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,CACrC;;AAGH,IAAA,uBAAuB,CAAC,KAAa,EAAA;;QACnC,OAAO,UAAU,CACf,iBAAiB,EACjB;AACE,YAAA,2BAA2B,EAAE,KAAK,KAAK,IAAI,CAAC,uBAAuB;AACnE,YAAA,0BAA0B,EAAE,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,MAAK;AACvE,SAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/search-field/search-field.scss?tag=ifx-search-field&encapsulation=shadow","src/components/search-field/search-field.tsx"],"sourcesContent":["@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: tokens.$ifxColorBaseWhite;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative; // Wichtig für absolute positioning des Dropdowns\n\n .search-field__wrapper {\n box-sizing: border-box;\n height: tokens.$ifxSize500;\n display: flex;\n align-items: center;\n border: 1px solid #8d8786;\n border-radius: tokens.$ifxBorderRadius12;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace150;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n\n &:focus-visible:not(.disabled) {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &.search-field__wrapper-s {\n height: 36px;\n }\n\n &:hover:not(.focused, :focus) {\n border: 1px solid #3c3a39;\n }\n\n & .delete-icon {\n outline: 1px solid transparent;\n right: 12px;\n cursor: pointer;\n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 1px;\n }\n }\n\n input[type='text'] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n //line-height: 24px;\n color: #8d8786;\n border: none;\n width: 100%;\n outline: none;\n //height: 100%;\n height: 16px;\n\n &:focus {\n outline: none;\n color: #1d1d1d;\n }\n\n &:disabled {\n background: tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorBaseWhite;\n\n &::placeholder {\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;\n border: none;\n color: tokens.$ifxColorBaseWhite;\n\n &:hover {\n border: none;\n outline: none;\n }\n\n & .delete-icon { \n cursor: default;\n &:focus-visible { \n outline: 1px solid transparent;\n }\n }\n }\n }\n\n // Suggestions Dropdown Styles\n .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: tokens.$ifxColorBaseWhite;\n margin-top: tokens.$ifxSpace50;\n border: 1px solid tokens.$ifxColorEngineering200;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size; // Enable container queries\n\n .suggestions-header {\n // font: tokens.$ifxEyebrowEyebrow02; TODO\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: tokens.$ifxColorEngineering500;\n border-bottom: 1px solid tokens.$ifxColorEngineering200;\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n }\n\n .suggestion-item {\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n &:last-child {\n border-bottom: none;\n }\n\n &:hover,\n &--selected {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n .suggestion-content {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace150;\n\n .suggestion-icon {\n color: tokens.$ifxColorEngineering500;\n flex-shrink: 0;\n\n &--history {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0; // Important for flexbox truncation\n\n .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n }\n\n .suggestion-scope {\n color: tokens.$ifxColorEngineering400;\n flex-shrink: 0; // Never truncate the scope\n white-space: nowrap;\n margin-left: tokens.$ifxSpace25; // Add space before the scope\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeXs;\n }\n\n // When container is narrow, stack scope below main text\n @container (max-width: 320px) {\n flex-direction: column;\n align-items: flex-start;\n\n .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n\n .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1; // Allow truncation when narrow\n }\n }\n }\n\n .suggestion-count {\n color: tokens.$ifxColorEngineering400;\n margin-left: auto;\n flex-shrink: 0;\n }\n\n .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: tokens.$ifxColorEngineering500;\n\n &:hover {\n color: tokens.$ifxColorEngineering600;\n }\n }\n }\n\n &:hover {\n .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n }\n }\n }\n }\n\n // Wrapper modifications when dropdown is open\n .search-field__wrapper.dropdown-open {\n border-radius: tokens.$ifxBorderRadius12 tokens.$ifxBorderRadius12 0 0;\n border-color: tokens.$ifxColorOcean500;\n }\n}\n","import { Component, EventEmitter, h, Event, Prop, Watch, State, Listen, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n\nexport interface SuggestionItem {\n id: string;\n text: string;\n type?: 'suggestion' | 'history';\n scope?: string;\n resultCount?: number;\n metadata?: any;\n}\n\n@Component({\n tag: 'ifx-search-field',\n styleUrl: 'search-field.scss',\n shadow: true\n})\n\nexport class SearchField {\n @Element() el;\n private inputElement: HTMLInputElement;\n private dropdownElement: HTMLDivElement;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop() suggestions: SuggestionItem[] = [];\n @Prop() showSuggestions: boolean = false;\n @Prop() maxSuggestions: number = 10;\n @Prop() maxHistoryItems: number = 5;\n @Prop() enableHistory: boolean = true;\n @Prop() historyKey: string = 'ifx-search-history';\n @Prop() historyHeaderText: string = 'Recent Searches';\n\n // ARIA Labels and Accessibility Props\n @Prop() ariaLabel: string | null = \"Search Field\"\n @Prop() ariaLabelledBy?: string | null;\n @Prop() ariaDescribedBy?: string | null;\n @Prop() deleteIconAriaLabel: string = 'Clear search';\n @Prop() historyDeleteAriaLabel: string = 'Remove from history';\n @Prop() dropdownAriaLabel: string = 'Search suggestions and history';\n @Prop() suggestionAriaLabel: string = 'Search suggestion';\n @Prop() historyItemAriaLabel: string = 'Search history item';\n\n @Event() ifxInput: EventEmitter<string>;\n @Event() ifxSuggestionRequested: EventEmitter<string>;\n @Event() ifxSuggestionSelected: EventEmitter<SuggestionItem>;\n @Event() ifxFocus: EventEmitter<void>;\n @Event() ifxBlur: EventEmitter<void>;\n\n @State() showDropdown: boolean = false;\n @State() filteredSuggestions: SuggestionItem[] = [];\n @State() selectedSuggestionIndex: number = -1;\n @State() searchHistory: string[] = [];\n\n @Prop() showDeleteIcon: boolean = false;\n @State() showDeleteIconInternalState: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() size: string = 'l';\n @State() isFocused: boolean = false;\n @Prop() placeholder: string = \"Search...\";\n @Prop() autocomplete: string = \"off\";\n @Prop() maxlength?: number = null;\n\n private focusEmitted: boolean = false;\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this.inputElement) && !path.includes(this.dropdownElement)) {\n this.hideDropdown();\n }\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.showDropdown) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.navigateSuggestions(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.navigateSuggestions(-1);\n break;\n case 'Enter':\n event.preventDefault();\n if (this.selectedSuggestionIndex >= 0) {\n this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex]);\n } else {\n this.handleSearch();\n }\n break;\n case 'Escape':\n this.hideDropdown();\n break;\n }\n }\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (this.inputElement && newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n this.updateSuggestions();\n }\n\n @Watch('suggestions')\n suggestionsWatcher() {\n this.updateSuggestions();\n }\n\n\n handleInput = () => {\n const query = this.inputElement.value;\n this.value = query;\n this.ifxInput.emit(this.value);\n\n if (this.showSuggestions) {\n this.showDropdown = true;\n this.selectedSuggestionIndex = -1;\n this.requestSuggestions(query);\n }\n };\n\n handleDelete = () => {\n if(!this.disabled) { \n this.inputElement.value = '';\n this.value = \"\";\n this.ifxInput.emit(this.value);\n this.hideDropdown();\n }\n }\n\n handleSearch = () => {\n if (this.value.trim() && this.enableHistory) {\n // Only add to history if there are actual results\n if (this.filteredSuggestions.length > 0) {\n this.addToHistory(this.value);\n }\n }\n this.hideDropdown();\n }\n\n focusInput() {\n // Only emit focus event if it hasn't been emitted already\n if (!this.focusEmitted) {\n this.focusEmitted = true;\n this.isFocused = true;\n this.ifxFocus.emit();\n }\n\n if (this.showSuggestions) {\n // On focus without input: Show only history\n if (this.value.length === 0) {\n this.showHistoryDropdown();\n // Only show dropdown if history is actually present\n this.showDropdown = this.enableHistory && this.searchHistory.length > 0;\n } else {\n // With existing input: Normal suggestion logic\n this.updateSuggestions();\n this.showDropdown = this.filteredSuggestions.length > 0;\n }\n }\n }\n\n blurInput() {\n setTimeout(() => {\n this.isFocused = false;\n this.focusEmitted = false; // Reset focus flag when blur occurs\n this.ifxBlur.emit();\n }, 150);\n }\n\n // Public method to update history from external sources\n public loadSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n const stored = localStorage.getItem(this.historyKey);\n this.searchHistory = stored ? JSON.parse(stored) : [];\n\n // Update suggestions when history is loaded\n this.updateSuggestions();\n\n // If no input and no history left, close dropdown\n if (this.value.length === 0 && this.searchHistory.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Public method to completely clear history\n public clearSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n // Clear from localStorage\n localStorage.removeItem(this.historyKey);\n\n // Clear internal history\n this.searchHistory = [];\n\n // Reset all dropdown-relevant states\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n this.showDropdown = false;\n\n // Update suggestions after reset\n this.updateSuggestions();\n }\n }\n\n // Suggestion Management Methods\n private addToHistory(term: string) {\n if (!this.enableHistory || !term.trim()) return;\n\n const history = [...this.searchHistory];\n const existingIndex = history.indexOf(term);\n\n if (existingIndex > -1) {\n history.splice(existingIndex, 1);\n }\n\n history.unshift(term);\n // Limit history to maxHistoryItems (default 5)\n this.searchHistory = history.slice(0, this.maxHistoryItems);\n\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n }\n\n // Remove individual history entry\n private removeFromHistory(term: string) {\n if (!this.enableHistory) return;\n\n const history = [...this.searchHistory];\n const index = history.indexOf(term);\n\n if (index > -1) {\n history.splice(index, 1);\n this.searchHistory = history;\n\n // Update localStorage\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n\n // Update suggestions after removal\n this.updateSuggestions();\n\n // Close dropdown if no history remains\n if (this.searchHistory.length === 0 && this.value.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Handle click on history delete button\n private handleHistoryDelete = (event: Event, term: string) => {\n event.stopPropagation(); // Prevent selection of the entry\n this.removeFromHistory(term);\n }\n\n private requestSuggestions(query: string) {\n this.ifxSuggestionRequested.emit(query);\n this.updateSuggestions();\n }\n\n private updateSuggestions() {\n const query = this.value.toLowerCase();\n let suggestions: SuggestionItem[] = [];\n\n if (query.length > 0) {\n // For text input: Mix external suggestions and relevant history\n\n // 1. Filter external suggestions\n if (this.suggestions && this.suggestions.length > 0) {\n const filteredExternal = this.suggestions.filter(s =>\n s.text.toLowerCase().includes(query)\n );\n suggestions = [...suggestions, ...filteredExternal];\n }\n\n // 2. Filter relevant history entries\n if (this.enableHistory && this.searchHistory.length > 0) {\n const filteredHistory = this.searchHistory\n .filter(term => term.toLowerCase().includes(query))\n .map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n suggestions = [...suggestions, ...filteredHistory];\n }\n\n // 3. Sort by relevance (exact matches first, then prefix matches)\n suggestions.sort((a, b) => {\n const aText = a.text.toLowerCase();\n const bText = b.text.toLowerCase();\n\n // Exact match has highest priority\n if (aText === query && bText !== query) return -1;\n if (bText === query && aText !== query) return 1;\n\n // Prefix match has second highest priority\n const aStartsWith = aText.startsWith(query);\n const bStartsWith = bText.startsWith(query);\n\n if (aStartsWith && !bStartsWith) return -1;\n if (bStartsWith && !aStartsWith) return 1;\n\n // With equal relevance: external suggestions before history\n if (a.type === 'suggestion' && b.type === 'history') return -1;\n if (a.type === 'history' && b.type === 'suggestion') return 1;\n\n // Alphabetical sorting as last criterion\n return aText.localeCompare(bText);\n });\n\n } else {\n // For empty query: Show only history (no external suggestions)\n if (this.enableHistory && this.searchHistory.length > 0) {\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n suggestions = historySuggestions;\n }\n // For empty query DO NOT show external suggestions\n }\n\n // Remove duplicates based on text and scope combination (history takes precedence over external)\n const uniqueSuggestions = suggestions.reduce((unique: SuggestionItem[], current) => {\n const existingIndex = unique.findIndex(item =>\n item.text.toLowerCase() === current.text.toLowerCase() &&\n item.scope === current.scope\n );\n if (existingIndex === -1) {\n unique.push(current);\n } else {\n // If already exists, prefer history over external suggestions\n if (current.type === 'history' && unique[existingIndex].type !== 'history') {\n unique[existingIndex] = current;\n }\n }\n return unique;\n }, []);\n\n this.filteredSuggestions = uniqueSuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n }\n\n private navigateSuggestions(direction: number) {\n const maxIndex = this.filteredSuggestions.length - 1;\n\n if (direction > 0) {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex < maxIndex\n ? this.selectedSuggestionIndex + 1\n : 0;\n } else {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex > 0\n ? this.selectedSuggestionIndex - 1\n : maxIndex;\n }\n }\n\n private selectSuggestion(suggestion: SuggestionItem) {\n this.value = suggestion.text;\n this.inputElement.value = suggestion.text;\n this.ifxSuggestionSelected.emit(suggestion);\n this.ifxInput.emit(this.value);\n\n if (this.enableHistory) {\n // Always add selected suggestions to history since they are valid results\n this.addToHistory(suggestion.text);\n }\n\n this.hideDropdown();\n }\n\n private hideDropdown() {\n this.showDropdown = false;\n this.selectedSuggestionIndex = -1;\n this.isFocused = false;\n }\n\n // Show only history in dropdown (e.g. on focus without input)\n private showHistoryDropdown() {\n if (this.enableHistory && this.searchHistory.length > 0) {\n // Show only history entries\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n this.filteredSuggestions = historySuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n } else {\n this.filteredSuggestions = [];\n }\n }\n\n // Check if only history entries are displayed (without text input)\n private isShowingOnlyHistory(): boolean {\n return this.value.length === 0 &&\n this.filteredSuggestions.length > 0 &&\n this.filteredSuggestions.every(s => s.type === 'history');\n }\n\n // Render text with highlighted matches\n private renderHighlightedText(text: string, query: string) {\n if (!query || query.length === 0) {\n return text;\n }\n\n const lowerText = text.toLowerCase();\n const lowerQuery = query.toLowerCase();\n const index = lowerText.indexOf(lowerQuery);\n\n if (index === -1) {\n return text;\n }\n\n const before = text.substring(0, index);\n const match = text.substring(index, index + query.length);\n const after = text.substring(index + query.length);\n\n return [\n before,\n <strong>{match}</strong>,\n after\n ];\n }\n\n componentWillLoad() {\n this.loadSearchHistory();\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework()\n trackComponent('ifx-search-field', await framework)\n }\n }\n\n componentWillUpdate() {\n if (this.value !== \"\") {\n this.showDeleteIconInternalState = true;\n } else this.showDeleteIconInternalState = false;\n }\n\n render() {\n // Debug: Check for Symbol values in suggestions\n this.filteredSuggestions.forEach((suggestion, index) => {\n if (typeof suggestion.id === 'symbol' || typeof suggestion.text === 'symbol' || typeof suggestion.scope === 'symbol') {\n // eslint-disable-next-line no-console\n console.warn('Symbol value detected in suggestion', { suggestion, index });\n }\n });\n\n return (\n <div\n aria-disabled={this.disabled}\n class=\"search-field\"\n >\n <div\n class={this.getWrapperClassNames()}\n tabIndex={1}\n onClick={() => this.focusInput()}\n >\n <ifx-icon icon=\"search-16\" class=\"search-icon\"></ifx-icon>\n <input\n ref={(el) => (this.inputElement = el)}\n type=\"text\"\n autocomplete={String(this.autocomplete)}\n onInput={() => this.handleInput()}\n onFocus={() => this.focusInput()}\n onBlur={() => this.blurInput()}\n placeholder={String(this.placeholder)}\n disabled={this.disabled}\n maxlength={this.maxlength}\n value={String(this.value)}\n role=\"combobox\"\n aria-controls={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-expanded={this.showDropdown}\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-label={this.ariaLabel ? String(this.ariaLabel) : undefined}\n aria-labelledby={this.ariaLabelledBy ? String(this.ariaLabelledBy) : undefined}\n aria-describedby={this.ariaDescribedBy ? String(this.ariaDescribedBy) : undefined}\n aria-owns={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-activedescendant={this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined}\n />\n {this.showDeleteIcon && this.showDeleteIconInternalState ? (\n <ifx-icon\n icon=\"cRemove16\"\n class=\"delete-icon\"\n onClick={this.handleDelete}\n role=\"button\"\n tabIndex={0}\n aria-label={this.deleteIconAriaLabel ? String(this.deleteIconAriaLabel) : undefined}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleDelete();\n }\n }}>\n </ifx-icon>\n ) : null}\n </div>\n\n {/* Suggestions Dropdown */}\n {this.showDropdown && this.filteredSuggestions.length > 0 && (\n <div\n ref={(el) => (this.dropdownElement = el)}\n id=\"suggestions-dropdown\"\n class=\"suggestions-dropdown\"\n role=\"listbox\"\n aria-label={this.dropdownAriaLabel ? String(this.dropdownAriaLabel) : undefined}\n >\n {/* History Header - only show when exclusively showing history entries */}\n {this.isShowingOnlyHistory() && (\n <div class=\"suggestions-header\">\n {this.historyHeaderText}\n </div>\n )}\n\n {this.filteredSuggestions.map((suggestion, index) => {\n // Defensive string conversion for all dynamic attributes\n const suggestionId = typeof suggestion.id === 'symbol' ? String(suggestion.id) : String(suggestion.id);\n const suggestionText = typeof suggestion.text === 'symbol' ? String(suggestion.text) : String(suggestion.text);\n const suggestionScope = suggestion.scope !== undefined && suggestion.scope !== null ? String(suggestion.scope) : '';\n const suggestionResultCount = suggestion.resultCount !== undefined && suggestion.resultCount !== null ? String(suggestion.resultCount) : '';\n const ariaLabel = `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestionText}${suggestion.scope ? `, ${suggestionScope}` : ''}${suggestion.resultCount ? `, ${suggestionResultCount} results` : ''}`;\n return (\n <div\n key={suggestionId}\n id={`suggestion-${index}`}\n class={this.getSuggestionClassNames(index)}\n role=\"option\"\n aria-selected={index === this.selectedSuggestionIndex}\n aria-label={ariaLabel}\n onClick={() => this.selectSuggestion(suggestion)}\n onMouseEnter={() => this.selectedSuggestionIndex = index}\n >\n <div class=\"suggestion-content\">\n {suggestion.type === 'history' && (\n <ifx-icon icon=\"history-16\" class=\"suggestion-icon suggestion-icon--history\"></ifx-icon>\n )}\n {suggestion.type === 'suggestion' && (\n <ifx-icon icon=\"search-16\" class=\"suggestion-icon suggestion-icon--suggestion\"></ifx-icon>\n )}\n <span class=\"suggestion-text\">\n <span class=\"suggestion-main-text\">\n {this.renderHighlightedText(suggestionText, this.value)}\n </span>\n {suggestion.scope && (\n <span class=\"suggestion-scope\">– {suggestionScope}</span>\n )}\n </span>\n\n {suggestion.resultCount !== undefined && suggestion.scope && (\n <span class=\"suggestion-count\">{suggestionResultCount}</span>\n )}\n\n {/* Delete Button only for history entries */}\n {suggestion.type === 'history' && (\n <ifx-icon\n icon=\"cross16\"\n class=\"suggestion-delete-icon\"\n role=\"button\"\n tabIndex={0}\n aria-label={`${this.historyDeleteAriaLabel ? String(this.historyDeleteAriaLabel) : ''}: ${suggestionText}`}\n onClick={(event) => this.handleHistoryDelete(event, suggestion.text)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleHistoryDelete(event, suggestion.text);\n }\n }}\n ></ifx-icon>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"search-field__wrapper-s\"\n : \"\";\n }\n\n getWrapperClassNames() {\n return classNames(\n `search-field__wrapper`,\n `search-field__wrapper ${this.getSizeClass()}`,\n `${this.isFocused ? 'focused' : \"\"}`,\n `${this.showDropdown ? 'dropdown-open' : \"\"}`,\n `${this.disabled ? 'disabled' : \"\"}`\n );\n }\n\n getSuggestionClassNames(index: number) {\n return classNames(\n 'suggestion-item',\n {\n 'suggestion-item--selected': index === this.selectedSuggestionIndex,\n 'suggestion-item--history': this.filteredSuggestions[index]?.type === 'history'\n }\n );\n }\n}\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,F as s,a as n}from"./p-DtIEDtZ8.js";const a='.tree-item{position:relative;cursor:pointer;list-style:none}.tree-item.tree-item--expanded{position:relative}.tree-item.tree-item--has-children{position:relative}.tree-item.tree-item--has-children .tree-item__header>.tree-item__chevron-container{display:flex}.tree-item.tree-item--has-children.tree-item--expanded .tree-item__header>.tree-item__chevron-container::after{display:block}.tree-item--disabled{cursor:not-allowed;pointer-events:none;color:#BFBBBB}.tree-item__content{display:flex;flex-direction:row}.tree-item__content:hover .tree-item__checkbox-container,.tree-item__content:hover .tree-item__header{background-color:#F7F7F7}.tree-item__checkbox-container{position:sticky;left:0;z-index:10;padding:4px;background-color:#FFFFFF}.tree-item__header{flex-grow:1;display:flex;align-items:center;white-space:nowrap;height:20px;padding-top:4px;padding-right:16px;padding-bottom:4px;padding-left:8px}.tree-item__chevron-container{display:none;align-items:center;margin-right:8px;height:20px}.tree-item__chevron-container::after{--height-line-start:28px;display:none;content:"";position:absolute;z-index:1;top:var(--height-line-start);left:auto;margin-left:8px;width:1px;height:calc(100% - var(--height-line-start));background-color:#EEEDED}.tree-item--disabled .tree-item__chevron-container::after{color:#EEEDED}.tree-item__chevron.chevron-down{transform:rotate(90deg)}.tree-item__chevron.chevron-right{transform:rotate(0)}.tree-item__label-icon-container{display:flex;align-items:center}.tree-item__label-icon-container:focus{outline:none}.tree-item__label-icon-container:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.tree-item__icon-container{position:relative;width:16px;height:16px}.tree-item__icon-container ifx-icon{position:absolute;left:0;top:0;opacity:1;transition:opacity 0.2s ease-in-out}.tree-item__icon-container ifx-icon.icon--hidden{opacity:0}.tree-item__label{padding-left:8px}.tree-item__children{display:none}.tree-item[aria-expanded=true]>.tree-item__children{display:block}';const r=class{constructor(i){e(this,i);this.ifxTreeViewItemExpandChange=t(this,"ifxTreeViewItemExpandChange",7);this.ifxTreeViewItemCheckChange=t(this,"ifxTreeViewItemCheckChange",7);this.ifxTreeViewItemDisableChange=t(this,"ifxTreeViewItemDisableChange",7);this.expanded=false;this.initiallyExpanded=false;this.disableItem=false;this.initiallySelected=false;this.hasChildren=false;this.isChecked=false;this.partialChecked=false;this.level=0;this.disableAllItems=false;this.expandAllItems=false;this.suppressExpandEvents=false;this.findChildren=()=>Array.from(this.host.children).filter((e=>e instanceof HTMLElement&&e.tagName==="IFX-TREE-VIEW-ITEM"));this.calculateNodeLevel=()=>{let e=0,t=this.host.parentElement;while(t){if(t.tagName==="IFX-TREE-VIEW-ITEM")e++;t=t.parentElement}return e};this.handleStateChange=e=>{if(this.disabled)return;e.stopPropagation();this.updateCheckState(e.detail.checked)};this.handleCheckboxChange=e=>{var t,i;if(this.disabled)return;this.updateCheckState((i=(t=e.detail)===null||t===void 0?void 0:t.checked)!==null&&i!==void 0?i:!this.isChecked)};this.handleHeaderClick=({target:e})=>{if(this.disabled)return;if(!e.closest(".tree-item__checkbox-container, .tree-item__chevron-container")){if(this.hasChildren){const e=!this.isChecked;this.updateCheckState(e);const t=e?this.expandOrCollapseAllDescendants(true):this.expandOrCollapseAllDescendants(false);this.ifxTreeViewItemExpandChange.emit({expanded:e,affectedItems:t,component:this})}else{this.updateCheckState(!this.isChecked)}}};this.toggleExpand=()=>{if(this.disabled||!this.hasChildren)return;this.expanded=!this.expanded};this.handleKeyDown=e=>{var t,i,s,n,a,r;const h=Array.from(((t=this.host.closest("ifx-tree-view"))===null||t===void 0?void 0:t.querySelectorAll("ifx-tree-view-item"))||[]);const o=h.filter((e=>{var t,i;let s=(t=e.parentElement)===null||t===void 0?void 0:t.closest("ifx-tree-view-item");while(s){const e=s;if(!(e.expandAllItems||e.expanded))return false;s=(i=s.parentElement)===null||i===void 0?void 0:i.closest("ifx-tree-view-item")}return true}));const c=o.findIndex((e=>e===this.host));const l=e=>e===null||e===void 0?void 0:e.focus();switch(e.key){case"ArrowDown":{e.preventDefault();for(let e=c+1;e<o.length;e++){const t=o[e];if(!t.disabled){l((i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tree-item__label-icon-container"));break}}break}case"ArrowUp":{e.preventDefault();for(let e=c-1;e>=0;e--){const t=o[e];if(!t.disabled){l((s=t.shadowRoot)===null||s===void 0?void 0:s.querySelector(".tree-item__label-icon-container"));break}}break}case"ArrowRight":{e.preventDefault();if(!this.isExpanded&&this.hasChildren){this.expanded=true}else if(this.isExpanded&&this.hasChildren){const e=this.host.querySelector("ifx-tree-view-item");if(e&&!e.disabled){l((n=e.shadowRoot)===null||n===void 0?void 0:n.querySelector(".tree-item__label-icon-container"))}}break}case"ArrowLeft":{e.preventDefault();if(this.isExpanded&&this.hasChildren){this.expanded=false}else{const e=(a=this.host.parentElement)===null||a===void 0?void 0:a.closest("ifx-tree-view-item");if(e&&!e.disabled){l((r=e.shadowRoot)===null||r===void 0?void 0:r.querySelector(".tree-item__label-icon-container"))}}break}case" ":case"Enter":{e.preventDefault();if(this.hasChildren){const e=!this.isChecked;this.updateCheckState(e);const t=e?this.expandOrCollapseAllDescendants(true):this.expandOrCollapseAllDescendants(false);this.ifxTreeViewItemExpandChange.emit({expanded:e,affectedItems:t,component:this})}else{this.updateCheckState(!this.isChecked)}break}}}}get disabled(){return this.disableAllItems||this.disableItem}get isExpanded(){return this.expandAllItems||this.expanded}componentWillLoad(){this.expanded=this.initiallyExpanded;this.hasChildren=this.findChildren().length>0;this.level=this.calculateNodeLevel();this.host.setAttribute("data-level",this.level.toString());this.isChecked=this.initiallySelected;this.host.addEventListener("internal-check-state-change",this.handleStateChange)}componentDidLoad(){this.observeParentAttribute("disable-all-items",(e=>this.disableAllItems=e));this.observeParentAttribute("data-expand-all-items",(e=>this.expandAllItems=e),true);if(this.shouldExpandFromParent())this.expandAllDescendants();this.host["__stencil_instance"]=this;if(this.initiallySelected)setTimeout((()=>this.updateParentState()),0)}observeParentAttribute(e,t,i=false){let s=this.host.parentElement;while(s){if(s.tagName==="IFX-TREE-VIEW"||i&&s.hasAttribute(e)){const i=new MutationObserver((()=>t(s.hasAttribute(e))));i.observe(s,{attributes:true});t(s.hasAttribute(e));break}s=s.parentElement}}shouldExpandFromParent(){let e=this.host.parentElement;while(e){if(e.tagName==="IFX-TREE-VIEW"&&(e.hasAttribute("expand-all-items")||e.hasAttribute("data-expand-all-items")))return true;e=e.parentElement}return false}expandAllDescendants(){this.expanded=true;this.findChildren().forEach((e=>{var t,i;e.expanded=true;(i=(t=e).expandAllDescendants)===null||i===void 0?void 0:i.call(t)}))}expandOrCollapseAllDescendants(e){this.suppressExpandEvents=true;const t=[];this.expanded=e;if(this.hasChildren)t.push({expanded:e,value:this.value});this.findChildren().forEach((i=>{const s=i["__stencil_instance"];if(s&&s.hasChildren){s.suppressExpandEvents=true;s.expanded=e;t.push({expanded:e,value:s.value});if(s.hasChildren){const i=s.expandOrCollapseAllDescendants(e);t.push(...i)}}}));this.suppressExpandEvents=false;return t}async updateCheckState(e,t=false){if(this.disabled)return;if(!t&&this.hasChildren){const t=this.collectDescendantStates(e);this.setNodeState({isChecked:e,partialChecked:false},false);await this.updateChildrenSilently(e);this.ifxTreeViewItemCheckChange.emit({checked:e,indeterminate:false,value:this.value,affectedChildItems:t,component:this});this.updateParentState()}else if(t){this.setNodeState({isChecked:e,partialChecked:false},false)}else{this.setNodeState({isChecked:e,partialChecked:false});await this.updateChildrenState(e);this.updateParentState()}}async updateChildrenSilently(e){for(const t of this.findChildren()){const i=t["__stencil_instance"];if(i&&!i.disabled){i.setNodeState({isChecked:e,partialChecked:false},false);await i.updateChildrenSilently(e)}}}handleExpandedChange(e){if(!this.suppressExpandEvents){this.ifxTreeViewItemExpandChange.emit({expanded:e,value:this.value,affectedItems:[{expanded:e,value:this.value}],component:this})}}handleDisableItemChange(e){this.ifxTreeViewItemDisableChange.emit({disabled:e,component:this})}setNodeState(e,t=true){this.isChecked=e.isChecked;this.partialChecked=e.partialChecked;if(t){this.ifxTreeViewItemCheckChange.emit({checked:this.isChecked,indeterminate:this.partialChecked,value:this.value,level:this.level,disabled:this.disabled,component:this})}}collectDescendantStates(e){const t=[];const i=(s,n=false)=>{let a=s===this.host?this:s["__stencil_instance"];if(!n&&!(a===null||a===void 0?void 0:a.disabled)){t.push({checked:e,indeterminate:false,value:a===null||a===void 0?void 0:a.value})}Array.from(s.children).forEach((e=>{if(e.tagName==="IFX-TREE-VIEW-ITEM")i(e,false)}))};Array.from(this.host.children).forEach((e=>{if(e.tagName==="IFX-TREE-VIEW-ITEM")i(e,false)}));return t}async updateChildrenState(e){for(const t of this.findChildren()){const i=t["__stencil_instance"];if(i&&!i.disabled){await t.componentOnReady();t.dispatchEvent(new CustomEvent("internal-check-state-change",{detail:{checked:e},bubbles:false,composed:true}))}}}findSiblingNodes(e){return Array.from(e.children).filter((e=>e instanceof HTMLElement&&e.tagName==="IFX-TREE-VIEW-ITEM"))}updateParentState(){var e;const t=(e=this.host.parentElement)===null||e===void 0?void 0:e.closest("ifx-tree-view-item");if(!t)return;setTimeout((()=>{const e=t["__stencil_instance"];if(!e)return;const i=this.findSiblingNodes(t);const{allChecked:s,someChecked:n}=this.calculateSiblingStates(i);e.setNodeState({isChecked:s,partialChecked:!s&&n},false);e.updateParentState()}),0)}calculateSiblingStates(e){const t=e.map((e=>{const t=e["__stencil_instance"];return{checked:t===null||t===void 0?void 0:t.isChecked,partial:t===null||t===void 0?void 0:t.partialChecked}}));const i=t.filter((e=>e.checked)).length;const s=t.filter((e=>e.partial)).length;return{allChecked:t.length>0&&i===t.length&&s===0,someChecked:i>0||s>0}}render(){return i("div",{key:"06430c8297a83b8ede5128151c7393c3fd03e2a2",class:{"tree-item":true,"tree-item--expanded":this.isExpanded,"tree-item--has-children":this.hasChildren,"tree-item--disabled":this.disabled},role:"treeitem","aria-expanded":this.isExpanded?"true":"false","data-level":this.level,"aria-disabled":this.disabled?"true":undefined,"aria-label":this.ariaLabel},i("div",{key:"2de63b8310c477646aeaf8deb3131bba1dc3801d",class:"tree-item__content"},i("div",{key:"4269b1df1e670ec4106c1c4462cdd1dbe3cee7bd",class:"tree-item__checkbox-container",onClick:e=>e.stopPropagation()},i("ifx-checkbox",{key:"819444dfb6c9dd52a0aa703796c3e59c90616a79",size:"s",checked:this.partialChecked?false:this.isChecked,indeterminate:this.partialChecked,onIfxChange:this.handleCheckboxChange,disabled:this.disabled})),i("div",{key:"2b4f487b08fbb77eed104ecee0774033c26f96fd",class:"tree-item__header",style:{paddingLeft:`${this.level*24+10}px`},onClick:this.handleHeaderClick,tabIndex:-1,"aria-disabled":this.disabled?"true":undefined},this.hasChildren&&i("div",{key:"59770cbe680dce25156ded6580dad90d3f4cc880",class:"tree-item__chevron-container",onClick:this.toggleExpand},i("ifx-icon",{key:"ef7ef1761781d4c179ee696e08af6d24af7d9b9f",class:`tree-item__chevron ${this.isExpanded?"chevron-down":"chevron-right"}`,icon:"chevron-right-16"}),i("div",{key:"99ec9f0abe191fde4a158484fb3b74d9d4ce524e",class:"tree-item__line"})),i("div",{key:"e91ecf4d195285403ac2229fc838e470c0e46ba6",class:"tree-item__label-icon-container",tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown},i("div",{key:"a4b44e04c85234486602bdce7be330c7b9775233",class:"tree-item__icon-container"},this.hasChildren?i(s,null,i("ifx-icon",{class:{"icon--hidden":this.isExpanded},icon:"folder-16"}),i("ifx-icon",{class:{"icon--hidden":!this.isExpanded},icon:"folder-open-16"})):i("ifx-icon",{icon:"file-16"})),i("span",{key:"855ebc797490c23969a22b31fe8df64ffae2ff32",class:"tree-item__label"},i("slot",{key:"92d518b2c916f43229ca5f9a9c38809b08888d09"}))))),this.isExpanded&&i("div",{key:"769744e6235899295020700585f278ae8f3ba091",class:"tree-item__children"},i("slot",{key:"4e760a8d309e22549df336927b955a35036c1826",name:"children"})))}get host(){return n(this)}static get watchers(){return{expanded:["handleExpandedChange"],disableItem:["handleDisableItemChange"]}}};r.style=a;export{r as ifx_tree_view_item};
|
|
2
|
-
//# sourceMappingURL=p-22a45c93.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,a as e}from"./p-DtIEDtZ8.js";import{d as n,t as o}from"./p-DcmcuUOA.js";import{i as r}from"./p-Bw2fh5LT.js";import{c as h}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const a=":root {\n --ifx-font-family: \"Source Sans 3\", 'Arial, sans-serif';\n}\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: #FFFFFF;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative;\n}\n.search-field .search-field__wrapper {\n box-sizing: border-box;\n height: 40px;\n display: flex;\n align-items: center;\n border: 1px solid #8d8786;\n border-radius: 1px;\n padding: 8px 16px;\n gap: 12px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n}\n.search-field .search-field__wrapper:focus-visible:not(.disabled) {\n outline: 2px solid #0A8276;\n outline-offset: 2px;\n}\n.search-field .search-field__wrapper.search-field__wrapper-s {\n height: 36px;\n}\n.search-field .search-field__wrapper:hover:not(.focused, :focus) {\n border: 1px solid #3c3a39;\n}\n.search-field .search-field__wrapper .delete-icon {\n outline: 1px solid transparent;\n right: 12px;\n cursor: pointer;\n}\n.search-field .search-field__wrapper .delete-icon:focus-visible {\n outline: 2px solid #0A8276;\n outline-offset: 1px;\n}\n.search-field .search-field__wrapper input[type=text] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #8d8786;\n border: none;\n width: 100%;\n outline: none;\n height: 16px;\n}\n.search-field .search-field__wrapper input[type=text]:focus {\n outline: none;\n color: #1d1d1d;\n}\n.search-field .search-field__wrapper input[type=text]:disabled {\n background: #BFBBBB;\n color: #FFFFFF;\n}\n.search-field .search-field__wrapper input[type=text]:disabled::placeholder {\n color: #FFFFFF;\n}\n.search-field .search-field__wrapper.disabled {\n background: #BFBBBB;\n border: none;\n color: #FFFFFF;\n}\n.search-field .search-field__wrapper.disabled:hover {\n border: none;\n outline: none;\n}\n.search-field .search-field__wrapper.disabled .delete-icon {\n cursor: default;\n}\n.search-field .search-field__wrapper.disabled .delete-icon:focus-visible {\n outline: 1px solid transparent;\n}\n.search-field .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: #FFFFFF;\n margin-top: 4px;\n border: 1px solid #EEEDED;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size;\n}\n.search-field .suggestions-dropdown .suggestions-header {\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: #575352;\n border-bottom: 1px solid #EEEDED;\n padding: 12px 16px;\n}\n.search-field .suggestions-dropdown .suggestion-item {\n padding: 12px 16px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n.search-field .suggestions-dropdown .suggestion-item:last-child {\n border-bottom: none;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover, .search-field .suggestions-dropdown .suggestion-item--selected {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon {\n color: #575352;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon--history {\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n color: #8D8786;\n flex-shrink: 0;\n white-space: nowrap;\n margin-left: 2px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n@container (max-width: 320px) {\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex-direction: column;\n align-items: flex-start;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1;\n }\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-count {\n color: #8D8786;\n margin-left: auto;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon:hover {\n color: #3C3A39;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n}\n.search-field .search-field__wrapper.dropdown-open {\n border-radius: 1px 1px 0 0;\n border-color: #0A8276;\n}";const l=class{constructor(t){s(this,t);this.ifxInput=i(this,"ifxInput",7);this.ifxSuggestionRequested=i(this,"ifxSuggestionRequested",7);this.ifxSuggestionSelected=i(this,"ifxSuggestionSelected",7);this.ifxFocus=i(this,"ifxFocus",7);this.ifxBlur=i(this,"ifxBlur",7);this.value="";this.suggestions=[];this.showSuggestions=false;this.maxSuggestions=10;this.maxHistoryItems=5;this.enableHistory=true;this.historyKey="ifx-search-history";this.historyHeaderText="Recent Searches";this.ariaLabel="Search Field";this.deleteIconAriaLabel="Clear search";this.historyDeleteAriaLabel="Remove from history";this.dropdownAriaLabel="Search suggestions and history";this.suggestionAriaLabel="Search suggestion";this.historyItemAriaLabel="Search history item";this.showDropdown=false;this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.searchHistory=[];this.showDeleteIcon=false;this.showDeleteIconInternalState=false;this.disabled=false;this.size="l";this.isFocused=false;this.placeholder="Search...";this.autocomplete="off";this.maxlength=null;this.focusEmitted=false;this.handleInput=()=>{const s=this.inputElement.value;this.value=s;this.ifxInput.emit(this.value);if(this.showSuggestions){this.showDropdown=true;this.selectedSuggestionIndex=-1;this.requestSuggestions(s)}};this.handleDelete=()=>{if(!this.disabled){this.inputElement.value="";this.value="";this.ifxInput.emit(this.value);this.hideDropdown()}};this.handleSearch=()=>{if(this.value.trim()&&this.enableHistory){if(this.filteredSuggestions.length>0){this.addToHistory(this.value)}}this.hideDropdown()};this.handleHistoryDelete=(s,i)=>{s.stopPropagation();this.removeFromHistory(i)}}handleOutsideClick(s){const i=s.composedPath();if(!i.includes(this.inputElement)&&!i.includes(this.dropdownElement)){this.hideDropdown()}}handleKeyDown(s){if(!this.showDropdown)return;switch(s.key){case"ArrowDown":s.preventDefault();this.navigateSuggestions(1);break;case"ArrowUp":s.preventDefault();this.navigateSuggestions(-1);break;case"Enter":s.preventDefault();if(this.selectedSuggestionIndex>=0){this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex])}else{this.handleSearch()}break;case"Escape":this.hideDropdown();break}}valueWatcher(s){if(this.inputElement&&s!==this.inputElement.value){this.inputElement.value=s}this.updateSuggestions()}suggestionsWatcher(){this.updateSuggestions()}focusInput(){if(!this.focusEmitted){this.focusEmitted=true;this.isFocused=true;this.ifxFocus.emit()}if(this.showSuggestions){if(this.value.length===0){this.showHistoryDropdown();this.showDropdown=this.enableHistory&&this.searchHistory.length>0}else{this.updateSuggestions();this.showDropdown=this.filteredSuggestions.length>0}}}blurInput(){setTimeout((()=>{this.isFocused=false;this.focusEmitted=false;this.ifxBlur.emit()}),150)}loadSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){const s=localStorage.getItem(this.historyKey);this.searchHistory=s?JSON.parse(s):[];this.updateSuggestions();if(this.value.length===0&&this.searchHistory.length===0){this.showDropdown=false}}}clearSearchHistory(){if(this.enableHistory&&typeof localStorage!=="undefined"){localStorage.removeItem(this.historyKey);this.searchHistory=[];this.filteredSuggestions=[];this.selectedSuggestionIndex=-1;this.showDropdown=false;this.updateSuggestions()}}addToHistory(s){if(!this.enableHistory||!s.trim())return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1)}i.unshift(s);this.searchHistory=i.slice(0,this.maxHistoryItems);if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}}removeFromHistory(s){if(!this.enableHistory)return;const i=[...this.searchHistory];const t=i.indexOf(s);if(t>-1){i.splice(t,1);this.searchHistory=i;if(typeof localStorage!=="undefined"){localStorage.setItem(this.historyKey,JSON.stringify(this.searchHistory))}this.updateSuggestions();if(this.searchHistory.length===0&&this.value.length===0){this.showDropdown=false}}}requestSuggestions(s){this.ifxSuggestionRequested.emit(s);this.updateSuggestions()}updateSuggestions(){const s=this.value.toLowerCase();let i=[];if(s.length>0){if(this.suggestions&&this.suggestions.length>0){const t=this.suggestions.filter((i=>i.text.toLowerCase().includes(s)));i=[...i,...t]}if(this.enableHistory&&this.searchHistory.length>0){const t=this.searchHistory.filter((i=>i.toLowerCase().includes(s))).map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=[...i,...t]}i.sort(((i,t)=>{const e=i.text.toLowerCase();const n=t.text.toLowerCase();if(e===s&&n!==s)return-1;if(n===s&&e!==s)return 1;const o=e.startsWith(s);const r=n.startsWith(s);if(o&&!r)return-1;if(r&&!o)return 1;if(i.type==="suggestion"&&t.type==="history")return-1;if(i.type==="history"&&t.type==="suggestion")return 1;return e.localeCompare(n)}))}else{if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));i=s}}const t=i.reduce(((s,i)=>{const t=s.findIndex((s=>s.text.toLowerCase()===i.text.toLowerCase()&&s.scope===i.scope));if(t===-1){s.push(i)}else{if(i.type==="history"&&s[t].type!=="history"){s[t]=i}}return s}),[]);this.filteredSuggestions=t.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}navigateSuggestions(s){const i=this.filteredSuggestions.length-1;if(s>0){this.selectedSuggestionIndex=this.selectedSuggestionIndex<i?this.selectedSuggestionIndex+1:0}else{this.selectedSuggestionIndex=this.selectedSuggestionIndex>0?this.selectedSuggestionIndex-1:i}}selectSuggestion(s){this.value=s.text;this.inputElement.value=s.text;this.ifxSuggestionSelected.emit(s);this.ifxInput.emit(this.value);if(this.enableHistory){this.addToHistory(s.text)}this.hideDropdown()}hideDropdown(){this.showDropdown=false;this.selectedSuggestionIndex=-1;this.isFocused=false}showHistoryDropdown(){if(this.enableHistory&&this.searchHistory.length>0){const s=this.searchHistory.map(((s,i)=>({id:`history-${i}`,text:s,type:"history"})));this.filteredSuggestions=s.slice(0,this.maxSuggestions);this.selectedSuggestionIndex=-1}else{this.filteredSuggestions=[]}}isShowingOnlyHistory(){return this.value.length===0&&this.filteredSuggestions.length>0&&this.filteredSuggestions.every((s=>s.type==="history"))}renderHighlightedText(s,i){if(!i||i.length===0){return s}const e=s.toLowerCase();const n=i.toLowerCase();const o=e.indexOf(n);if(o===-1){return s}const r=s.substring(0,o);const h=s.substring(o,o+i.length);const a=s.substring(o+i.length);return[r,t("strong",null,h),a]}componentWillLoad(){this.loadSearchHistory()}async componentDidLoad(){if(!r(this.el)){const s=n();o("ifx-search-field",await s)}}componentWillUpdate(){if(this.value!==""){this.showDeleteIconInternalState=true}else this.showDeleteIconInternalState=false}render(){this.filteredSuggestions.forEach(((s,i)=>{if(typeof s.id==="symbol"||typeof s.text==="symbol"||typeof s.scope==="symbol"){console.warn("Symbol value detected in suggestion",{suggestion:s,index:i})}}));return t("div",{key:"fa449752baf4a06c3160069d720db1bc4f63b69f","aria-disabled":this.disabled,class:"search-field"},t("div",{key:"91abbdb324e0f5d10a9916360b2576ddbe2073cc",class:this.getWrapperClassNames(),tabIndex:1,onClick:()=>this.focusInput()},t("ifx-icon",{key:"80a75c095e19a85e03ea4d4cce872748079e43c8",icon:"search-16",class:"search-icon"}),t("input",{key:"c9a56734a3056e581d88fe887f05bfd3f32ff566",ref:s=>this.inputElement=s,type:"text",autocomplete:String(this.autocomplete),onInput:()=>this.handleInput(),onFocus:()=>this.focusInput(),onBlur:()=>this.blurInput(),placeholder:String(this.placeholder),disabled:this.disabled,maxlength:this.maxlength,value:String(this.value),role:"combobox","aria-controls":this.showDropdown?"suggestions-dropdown":undefined,"aria-expanded":this.showDropdown,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-label":this.ariaLabel?String(this.ariaLabel):undefined,"aria-labelledby":this.ariaLabelledBy?String(this.ariaLabelledBy):undefined,"aria-describedby":this.ariaDescribedBy?String(this.ariaDescribedBy):undefined,"aria-owns":this.showDropdown?"suggestions-dropdown":undefined,"aria-activedescendant":this.selectedSuggestionIndex>=0?`suggestion-${this.selectedSuggestionIndex}`:undefined}),this.showDeleteIcon&&this.showDeleteIconInternalState?t("ifx-icon",{icon:"cRemove16",class:"delete-icon",onClick:this.handleDelete,role:"button",tabIndex:0,"aria-label":this.deleteIconAriaLabel?String(this.deleteIconAriaLabel):undefined,onKeyDown:s=>{if(s.key==="Enter"||s.key===" "){s.preventDefault();this.handleDelete()}}}):null),this.showDropdown&&this.filteredSuggestions.length>0&&t("div",{key:"b8bad4f2efa77404ad6cb7d07530698befe103fd",ref:s=>this.dropdownElement=s,id:"suggestions-dropdown",class:"suggestions-dropdown",role:"listbox","aria-label":this.dropdownAriaLabel?String(this.dropdownAriaLabel):undefined},this.isShowingOnlyHistory()&&t("div",{key:"fdc557afa120253e3d6765b16320eb6fee838a6c",class:"suggestions-header"},this.historyHeaderText),this.filteredSuggestions.map(((s,i)=>{const e=typeof s.id==="symbol"?String(s.id):String(s.id);const n=typeof s.text==="symbol"?String(s.text):String(s.text);const o=s.scope!==undefined&&s.scope!==null?String(s.scope):"";const r=s.resultCount!==undefined&&s.resultCount!==null?String(s.resultCount):"";const h=`${s.type==="history"?this.historyItemAriaLabel:this.suggestionAriaLabel}: ${n}${s.scope?`, ${o}`:""}${s.resultCount?`, ${r} results`:""}`;return t("div",{key:e,id:`suggestion-${i}`,class:this.getSuggestionClassNames(i),role:"option","aria-selected":i===this.selectedSuggestionIndex,"aria-label":h,onClick:()=>this.selectSuggestion(s),onMouseEnter:()=>this.selectedSuggestionIndex=i},t("div",{class:"suggestion-content"},s.type==="history"&&t("ifx-icon",{icon:"history-16",class:"suggestion-icon suggestion-icon--history"}),s.type==="suggestion"&&t("ifx-icon",{icon:"search-16",class:"suggestion-icon suggestion-icon--suggestion"}),t("span",{class:"suggestion-text"},t("span",{class:"suggestion-main-text"},this.renderHighlightedText(n,this.value)),s.scope&&t("span",{class:"suggestion-scope"},"– ",o)),s.resultCount!==undefined&&s.scope&&t("span",{class:"suggestion-count"},r),s.type==="history"&&t("ifx-icon",{icon:"cross16",class:"suggestion-delete-icon",role:"button",tabIndex:0,"aria-label":`${this.historyDeleteAriaLabel?String(this.historyDeleteAriaLabel):""}: ${n}`,onClick:i=>this.handleHistoryDelete(i,s.text),onKeyDown:i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.handleHistoryDelete(i,s.text)}}})))}))))}getSizeClass(){return`${this.size}`==="s"?"search-field__wrapper-s":""}getWrapperClassNames(){return h(`search-field__wrapper`,`search-field__wrapper ${this.getSizeClass()}`,`${this.isFocused?"focused":""}`,`${this.showDropdown?"dropdown-open":""}`,`${this.disabled?"disabled":""}`)}getSuggestionClassNames(s){var i;return h("suggestion-item",{"suggestion-item--selected":s===this.selectedSuggestionIndex,"suggestion-item--history":((i=this.filteredSuggestions[s])===null||i===void 0?void 0:i.type)==="history"})}get el(){return e(this)}static get watchers(){return{value:["valueWatcher"],suggestions:["suggestionsWatcher"]}}};l.style=a;export{l as ifx_search_field};
|
|
2
|
-
//# sourceMappingURL=p-36758398.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["searchFieldCss","SearchField","constructor","hostRef","this","value","suggestions","showSuggestions","maxSuggestions","maxHistoryItems","enableHistory","historyKey","historyHeaderText","ariaLabel","deleteIconAriaLabel","historyDeleteAriaLabel","dropdownAriaLabel","suggestionAriaLabel","historyItemAriaLabel","showDropdown","filteredSuggestions","selectedSuggestionIndex","searchHistory","showDeleteIcon","showDeleteIconInternalState","disabled","size","isFocused","placeholder","autocomplete","maxlength","focusEmitted","handleInput","query","inputElement","ifxInput","emit","requestSuggestions","handleDelete","hideDropdown","handleSearch","trim","length","addToHistory","handleHistoryDelete","event","term","stopPropagation","removeFromHistory","handleOutsideClick","path","composedPath","includes","dropdownElement","handleKeyDown","key","preventDefault","navigateSuggestions","selectSuggestion","valueWatcher","newValue","updateSuggestions","suggestionsWatcher","focusInput","ifxFocus","showHistoryDropdown","blurInput","setTimeout","ifxBlur","loadSearchHistory","localStorage","stored","getItem","JSON","parse","clearSearchHistory","removeItem","history","existingIndex","indexOf","splice","unshift","slice","setItem","stringify","index","ifxSuggestionRequested","toLowerCase","filteredExternal","filter","s","text","filteredHistory","map","id","type","sort","a","b","aText","bText","aStartsWith","startsWith","bStartsWith","localeCompare","historySuggestions","uniqueSuggestions","reduce","unique","current","findIndex","item","scope","push","direction","maxIndex","suggestion","ifxSuggestionSelected","isShowingOnlyHistory","every","renderHighlightedText","lowerText","lowerQuery","before","substring","match","after","h","componentWillLoad","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","componentWillUpdate","render","forEach","console","warn","class","getWrapperClassNames","tabIndex","onClick","icon","ref","String","onInput","onFocus","onBlur","role","undefined","ariaLabelledBy","ariaDescribedBy","onKeyDown","suggestionId","suggestionText","suggestionScope","suggestionResultCount","resultCount","getSuggestionClassNames","onMouseEnter","getSizeClass","classNames","_a"],"sources":["src/components/search-field/search-field.scss?tag=ifx-search-field&encapsulation=shadow","src/components/search-field/search-field.tsx"],"sourcesContent":["@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: tokens.$ifxColorBaseWhite;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative; // Wichtig für absolute positioning des Dropdowns\n\n .search-field__wrapper {\n box-sizing: border-box;\n height: tokens.$ifxSize500;\n display: flex;\n align-items: center;\n border: 1px solid #8d8786;\n border-radius: tokens.$ifxBorderRadius12;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace150;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n\n &:focus-visible:not(.disabled) {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &.search-field__wrapper-s {\n height: 36px;\n }\n\n &:hover:not(.focused, :focus) {\n border: 1px solid #3c3a39;\n }\n\n & .delete-icon {\n outline: 1px solid transparent;\n right: 12px;\n cursor: pointer;\n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 1px;\n }\n }\n\n input[type='text'] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n //line-height: 24px;\n color: #8d8786;\n border: none;\n width: 100%;\n outline: none;\n //height: 100%;\n height: 16px;\n\n &:focus {\n outline: none;\n color: #1d1d1d;\n }\n\n &:disabled {\n background: tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorBaseWhite;\n\n &::placeholder {\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;\n border: none;\n color: tokens.$ifxColorBaseWhite;\n\n &:hover {\n border: none;\n outline: none;\n }\n\n & .delete-icon { \n cursor: default;\n &:focus-visible { \n outline: 1px solid transparent;\n }\n }\n }\n }\n\n // Suggestions Dropdown Styles\n .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: tokens.$ifxColorBaseWhite;\n margin-top: tokens.$ifxSpace50;\n border: 1px solid tokens.$ifxColorEngineering200;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size; // Enable container queries\n\n .suggestions-header {\n // font: tokens.$ifxEyebrowEyebrow02; TODO\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: tokens.$ifxColorEngineering500;\n border-bottom: 1px solid tokens.$ifxColorEngineering200;\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n }\n\n .suggestion-item {\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n &:last-child {\n border-bottom: none;\n }\n\n &:hover,\n &--selected {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n .suggestion-content {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace150;\n\n .suggestion-icon {\n color: tokens.$ifxColorEngineering500;\n flex-shrink: 0;\n\n &--history {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0; // Important for flexbox truncation\n\n .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n }\n\n .suggestion-scope {\n color: tokens.$ifxColorEngineering400;\n flex-shrink: 0; // Never truncate the scope\n white-space: nowrap;\n margin-left: tokens.$ifxSpace25; // Add space before the scope\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeXs;\n }\n\n // When container is narrow, stack scope below main text\n @container (max-width: 320px) {\n flex-direction: column;\n align-items: flex-start;\n\n .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n\n .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1; // Allow truncation when narrow\n }\n }\n }\n\n .suggestion-count {\n color: tokens.$ifxColorEngineering400;\n margin-left: auto;\n flex-shrink: 0;\n }\n\n .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: tokens.$ifxColorEngineering500;\n\n &:hover {\n color: tokens.$ifxColorEngineering600;\n }\n }\n }\n\n &:hover {\n .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n }\n }\n }\n }\n\n // Wrapper modifications when dropdown is open\n .search-field__wrapper.dropdown-open {\n border-radius: tokens.$ifxBorderRadius12 tokens.$ifxBorderRadius12 0 0;\n border-color: tokens.$ifxColorOcean500;\n }\n}\n","import { Component, EventEmitter, h, Event, Prop, Watch, State, Listen, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n\nexport interface SuggestionItem {\n id: string;\n text: string;\n type?: 'suggestion' | 'history';\n scope?: string;\n resultCount?: number;\n metadata?: any;\n}\n\n@Component({\n tag: 'ifx-search-field',\n styleUrl: 'search-field.scss',\n shadow: true\n})\n\nexport class SearchField {\n @Element() el;\n private inputElement: HTMLInputElement;\n private dropdownElement: HTMLDivElement;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop() suggestions: SuggestionItem[] = [];\n @Prop() showSuggestions: boolean = false;\n @Prop() maxSuggestions: number = 10;\n @Prop() maxHistoryItems: number = 5;\n @Prop() enableHistory: boolean = true;\n @Prop() historyKey: string = 'ifx-search-history';\n @Prop() historyHeaderText: string = 'Recent Searches';\n\n // ARIA Labels and Accessibility Props\n @Prop() ariaLabel: string | null = \"Search Field\"\n @Prop() ariaLabelledBy?: string | null;\n @Prop() ariaDescribedBy?: string | null;\n @Prop() deleteIconAriaLabel: string = 'Clear search';\n @Prop() historyDeleteAriaLabel: string = 'Remove from history';\n @Prop() dropdownAriaLabel: string = 'Search suggestions and history';\n @Prop() suggestionAriaLabel: string = 'Search suggestion';\n @Prop() historyItemAriaLabel: string = 'Search history item';\n\n @Event() ifxInput: EventEmitter<string>;\n @Event() ifxSuggestionRequested: EventEmitter<string>;\n @Event() ifxSuggestionSelected: EventEmitter<SuggestionItem>;\n @Event() ifxFocus: EventEmitter<void>;\n @Event() ifxBlur: EventEmitter<void>;\n\n @State() showDropdown: boolean = false;\n @State() filteredSuggestions: SuggestionItem[] = [];\n @State() selectedSuggestionIndex: number = -1;\n @State() searchHistory: string[] = [];\n\n @Prop() showDeleteIcon: boolean = false;\n @State() showDeleteIconInternalState: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() size: string = 'l';\n @State() isFocused: boolean = false;\n @Prop() placeholder: string = \"Search...\";\n @Prop() autocomplete: string = \"off\";\n @Prop() maxlength?: number = null;\n\n private focusEmitted: boolean = false;\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this.inputElement) && !path.includes(this.dropdownElement)) {\n this.hideDropdown();\n }\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.showDropdown) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.navigateSuggestions(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.navigateSuggestions(-1);\n break;\n case 'Enter':\n event.preventDefault();\n if (this.selectedSuggestionIndex >= 0) {\n this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex]);\n } else {\n this.handleSearch();\n }\n break;\n case 'Escape':\n this.hideDropdown();\n break;\n }\n }\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (this.inputElement && newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n this.updateSuggestions();\n }\n\n @Watch('suggestions')\n suggestionsWatcher() {\n this.updateSuggestions();\n }\n\n\n handleInput = () => {\n const query = this.inputElement.value;\n this.value = query;\n this.ifxInput.emit(this.value);\n\n if (this.showSuggestions) {\n this.showDropdown = true;\n this.selectedSuggestionIndex = -1;\n this.requestSuggestions(query);\n }\n };\n\n handleDelete = () => {\n if(!this.disabled) { \n this.inputElement.value = '';\n this.value = \"\";\n this.ifxInput.emit(this.value);\n this.hideDropdown();\n }\n }\n\n handleSearch = () => {\n if (this.value.trim() && this.enableHistory) {\n // Only add to history if there are actual results\n if (this.filteredSuggestions.length > 0) {\n this.addToHistory(this.value);\n }\n }\n this.hideDropdown();\n }\n\n focusInput() {\n // Only emit focus event if it hasn't been emitted already\n if (!this.focusEmitted) {\n this.focusEmitted = true;\n this.isFocused = true;\n this.ifxFocus.emit();\n }\n\n if (this.showSuggestions) {\n // On focus without input: Show only history\n if (this.value.length === 0) {\n this.showHistoryDropdown();\n // Only show dropdown if history is actually present\n this.showDropdown = this.enableHistory && this.searchHistory.length > 0;\n } else {\n // With existing input: Normal suggestion logic\n this.updateSuggestions();\n this.showDropdown = this.filteredSuggestions.length > 0;\n }\n }\n }\n\n blurInput() {\n setTimeout(() => {\n this.isFocused = false;\n this.focusEmitted = false; // Reset focus flag when blur occurs\n this.ifxBlur.emit();\n }, 150);\n }\n\n // Public method to update history from external sources\n public loadSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n const stored = localStorage.getItem(this.historyKey);\n this.searchHistory = stored ? JSON.parse(stored) : [];\n\n // Update suggestions when history is loaded\n this.updateSuggestions();\n\n // If no input and no history left, close dropdown\n if (this.value.length === 0 && this.searchHistory.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Public method to completely clear history\n public clearSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n // Clear from localStorage\n localStorage.removeItem(this.historyKey);\n\n // Clear internal history\n this.searchHistory = [];\n\n // Reset all dropdown-relevant states\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n this.showDropdown = false;\n\n // Update suggestions after reset\n this.updateSuggestions();\n }\n }\n\n // Suggestion Management Methods\n private addToHistory(term: string) {\n if (!this.enableHistory || !term.trim()) return;\n\n const history = [...this.searchHistory];\n const existingIndex = history.indexOf(term);\n\n if (existingIndex > -1) {\n history.splice(existingIndex, 1);\n }\n\n history.unshift(term);\n // Limit history to maxHistoryItems (default 5)\n this.searchHistory = history.slice(0, this.maxHistoryItems);\n\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n }\n\n // Remove individual history entry\n private removeFromHistory(term: string) {\n if (!this.enableHistory) return;\n\n const history = [...this.searchHistory];\n const index = history.indexOf(term);\n\n if (index > -1) {\n history.splice(index, 1);\n this.searchHistory = history;\n\n // Update localStorage\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n\n // Update suggestions after removal\n this.updateSuggestions();\n\n // Close dropdown if no history remains\n if (this.searchHistory.length === 0 && this.value.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Handle click on history delete button\n private handleHistoryDelete = (event: Event, term: string) => {\n event.stopPropagation(); // Prevent selection of the entry\n this.removeFromHistory(term);\n }\n\n private requestSuggestions(query: string) {\n this.ifxSuggestionRequested.emit(query);\n this.updateSuggestions();\n }\n\n private updateSuggestions() {\n const query = this.value.toLowerCase();\n let suggestions: SuggestionItem[] = [];\n\n if (query.length > 0) {\n // For text input: Mix external suggestions and relevant history\n\n // 1. Filter external suggestions\n if (this.suggestions && this.suggestions.length > 0) {\n const filteredExternal = this.suggestions.filter(s =>\n s.text.toLowerCase().includes(query)\n );\n suggestions = [...suggestions, ...filteredExternal];\n }\n\n // 2. Filter relevant history entries\n if (this.enableHistory && this.searchHistory.length > 0) {\n const filteredHistory = this.searchHistory\n .filter(term => term.toLowerCase().includes(query))\n .map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n suggestions = [...suggestions, ...filteredHistory];\n }\n\n // 3. Sort by relevance (exact matches first, then prefix matches)\n suggestions.sort((a, b) => {\n const aText = a.text.toLowerCase();\n const bText = b.text.toLowerCase();\n\n // Exact match has highest priority\n if (aText === query && bText !== query) return -1;\n if (bText === query && aText !== query) return 1;\n\n // Prefix match has second highest priority\n const aStartsWith = aText.startsWith(query);\n const bStartsWith = bText.startsWith(query);\n\n if (aStartsWith && !bStartsWith) return -1;\n if (bStartsWith && !aStartsWith) return 1;\n\n // With equal relevance: external suggestions before history\n if (a.type === 'suggestion' && b.type === 'history') return -1;\n if (a.type === 'history' && b.type === 'suggestion') return 1;\n\n // Alphabetical sorting as last criterion\n return aText.localeCompare(bText);\n });\n\n } else {\n // For empty query: Show only history (no external suggestions)\n if (this.enableHistory && this.searchHistory.length > 0) {\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n suggestions = historySuggestions;\n }\n // For empty query DO NOT show external suggestions\n }\n\n // Remove duplicates based on text and scope combination (history takes precedence over external)\n const uniqueSuggestions = suggestions.reduce((unique: SuggestionItem[], current) => {\n const existingIndex = unique.findIndex(item =>\n item.text.toLowerCase() === current.text.toLowerCase() &&\n item.scope === current.scope\n );\n if (existingIndex === -1) {\n unique.push(current);\n } else {\n // If already exists, prefer history over external suggestions\n if (current.type === 'history' && unique[existingIndex].type !== 'history') {\n unique[existingIndex] = current;\n }\n }\n return unique;\n }, []);\n\n this.filteredSuggestions = uniqueSuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n }\n\n private navigateSuggestions(direction: number) {\n const maxIndex = this.filteredSuggestions.length - 1;\n\n if (direction > 0) {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex < maxIndex\n ? this.selectedSuggestionIndex + 1\n : 0;\n } else {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex > 0\n ? this.selectedSuggestionIndex - 1\n : maxIndex;\n }\n }\n\n private selectSuggestion(suggestion: SuggestionItem) {\n this.value = suggestion.text;\n this.inputElement.value = suggestion.text;\n this.ifxSuggestionSelected.emit(suggestion);\n this.ifxInput.emit(this.value);\n\n if (this.enableHistory) {\n // Always add selected suggestions to history since they are valid results\n this.addToHistory(suggestion.text);\n }\n\n this.hideDropdown();\n }\n\n private hideDropdown() {\n this.showDropdown = false;\n this.selectedSuggestionIndex = -1;\n this.isFocused = false;\n }\n\n // Show only history in dropdown (e.g. on focus without input)\n private showHistoryDropdown() {\n if (this.enableHistory && this.searchHistory.length > 0) {\n // Show only history entries\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n this.filteredSuggestions = historySuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n } else {\n this.filteredSuggestions = [];\n }\n }\n\n // Check if only history entries are displayed (without text input)\n private isShowingOnlyHistory(): boolean {\n return this.value.length === 0 &&\n this.filteredSuggestions.length > 0 &&\n this.filteredSuggestions.every(s => s.type === 'history');\n }\n\n // Render text with highlighted matches\n private renderHighlightedText(text: string, query: string) {\n if (!query || query.length === 0) {\n return text;\n }\n\n const lowerText = text.toLowerCase();\n const lowerQuery = query.toLowerCase();\n const index = lowerText.indexOf(lowerQuery);\n\n if (index === -1) {\n return text;\n }\n\n const before = text.substring(0, index);\n const match = text.substring(index, index + query.length);\n const after = text.substring(index + query.length);\n\n return [\n before,\n <strong>{match}</strong>,\n after\n ];\n }\n\n componentWillLoad() {\n this.loadSearchHistory();\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework()\n trackComponent('ifx-search-field', await framework)\n }\n }\n\n componentWillUpdate() {\n if (this.value !== \"\") {\n this.showDeleteIconInternalState = true;\n } else this.showDeleteIconInternalState = false;\n }\n\n render() {\n // Debug: Check for Symbol values in suggestions\n this.filteredSuggestions.forEach((suggestion, index) => {\n if (typeof suggestion.id === 'symbol' || typeof suggestion.text === 'symbol' || typeof suggestion.scope === 'symbol') {\n // eslint-disable-next-line no-console\n console.warn('Symbol value detected in suggestion', { suggestion, index });\n }\n });\n\n return (\n <div\n aria-disabled={this.disabled}\n class=\"search-field\"\n >\n <div\n class={this.getWrapperClassNames()}\n tabIndex={1}\n onClick={() => this.focusInput()}\n >\n <ifx-icon icon=\"search-16\" class=\"search-icon\"></ifx-icon>\n <input\n ref={(el) => (this.inputElement = el)}\n type=\"text\"\n autocomplete={String(this.autocomplete)}\n onInput={() => this.handleInput()}\n onFocus={() => this.focusInput()}\n onBlur={() => this.blurInput()}\n placeholder={String(this.placeholder)}\n disabled={this.disabled}\n maxlength={this.maxlength}\n value={String(this.value)}\n role=\"combobox\"\n aria-controls={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-expanded={this.showDropdown}\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-label={this.ariaLabel ? String(this.ariaLabel) : undefined}\n aria-labelledby={this.ariaLabelledBy ? String(this.ariaLabelledBy) : undefined}\n aria-describedby={this.ariaDescribedBy ? String(this.ariaDescribedBy) : undefined}\n aria-owns={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-activedescendant={this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined}\n />\n {this.showDeleteIcon && this.showDeleteIconInternalState ? (\n <ifx-icon\n icon=\"cRemove16\"\n class=\"delete-icon\"\n onClick={this.handleDelete}\n role=\"button\"\n tabIndex={0}\n aria-label={this.deleteIconAriaLabel ? String(this.deleteIconAriaLabel) : undefined}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleDelete();\n }\n }}>\n </ifx-icon>\n ) : null}\n </div>\n\n {/* Suggestions Dropdown */}\n {this.showDropdown && this.filteredSuggestions.length > 0 && (\n <div\n ref={(el) => (this.dropdownElement = el)}\n id=\"suggestions-dropdown\"\n class=\"suggestions-dropdown\"\n role=\"listbox\"\n aria-label={this.dropdownAriaLabel ? String(this.dropdownAriaLabel) : undefined}\n >\n {/* History Header - only show when exclusively showing history entries */}\n {this.isShowingOnlyHistory() && (\n <div class=\"suggestions-header\">\n {this.historyHeaderText}\n </div>\n )}\n\n {this.filteredSuggestions.map((suggestion, index) => {\n // Defensive string conversion for all dynamic attributes\n const suggestionId = typeof suggestion.id === 'symbol' ? String(suggestion.id) : String(suggestion.id);\n const suggestionText = typeof suggestion.text === 'symbol' ? String(suggestion.text) : String(suggestion.text);\n const suggestionScope = suggestion.scope !== undefined && suggestion.scope !== null ? String(suggestion.scope) : '';\n const suggestionResultCount = suggestion.resultCount !== undefined && suggestion.resultCount !== null ? String(suggestion.resultCount) : '';\n const ariaLabel = `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestionText}${suggestion.scope ? `, ${suggestionScope}` : ''}${suggestion.resultCount ? `, ${suggestionResultCount} results` : ''}`;\n return (\n <div\n key={suggestionId}\n id={`suggestion-${index}`}\n class={this.getSuggestionClassNames(index)}\n role=\"option\"\n aria-selected={index === this.selectedSuggestionIndex}\n aria-label={ariaLabel}\n onClick={() => this.selectSuggestion(suggestion)}\n onMouseEnter={() => this.selectedSuggestionIndex = index}\n >\n <div class=\"suggestion-content\">\n {suggestion.type === 'history' && (\n <ifx-icon icon=\"history-16\" class=\"suggestion-icon suggestion-icon--history\"></ifx-icon>\n )}\n {suggestion.type === 'suggestion' && (\n <ifx-icon icon=\"search-16\" class=\"suggestion-icon suggestion-icon--suggestion\"></ifx-icon>\n )}\n <span class=\"suggestion-text\">\n <span class=\"suggestion-main-text\">\n {this.renderHighlightedText(suggestionText, this.value)}\n </span>\n {suggestion.scope && (\n <span class=\"suggestion-scope\">– {suggestionScope}</span>\n )}\n </span>\n\n {suggestion.resultCount !== undefined && suggestion.scope && (\n <span class=\"suggestion-count\">{suggestionResultCount}</span>\n )}\n\n {/* Delete Button only for history entries */}\n {suggestion.type === 'history' && (\n <ifx-icon\n icon=\"cross16\"\n class=\"suggestion-delete-icon\"\n role=\"button\"\n tabIndex={0}\n aria-label={`${this.historyDeleteAriaLabel ? String(this.historyDeleteAriaLabel) : ''}: ${suggestionText}`}\n onClick={(event) => this.handleHistoryDelete(event, suggestion.text)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleHistoryDelete(event, suggestion.text);\n }\n }}\n ></ifx-icon>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"search-field__wrapper-s\"\n : \"\";\n }\n\n getWrapperClassNames() {\n return classNames(\n `search-field__wrapper`,\n `search-field__wrapper ${this.getSizeClass()}`,\n `${this.isFocused ? 'focused' : \"\"}`,\n `${this.showDropdown ? 'dropdown-open' : \"\"}`,\n `${this.disabled ? 'disabled' : \"\"}`\n );\n }\n\n getSuggestionClassNames(index: number) {\n return classNames(\n 'suggestion-item',\n {\n 'suggestion-item--selected': index === this.selectedSuggestionIndex,\n 'suggestion-item--history': this.filteredSuggestions[index]?.type === 'history'\n }\n );\n }\n}\n"],"mappings":"oMAAA,MAAMA,EAAiB,q9K,MCqBVC,EAAW,MANxB,WAAAC,CAAAC,G,6OAW2BC,KAAKC,MAAW,GACjCD,KAAWE,YAAqB,GAChCF,KAAeG,gBAAY,MAC3BH,KAAcI,eAAW,GACzBJ,KAAeK,gBAAW,EAC1BL,KAAaM,cAAY,KACzBN,KAAUO,WAAW,qBACrBP,KAAiBQ,kBAAW,kBAG5BR,KAASS,UAAkB,eAG3BT,KAAmBU,oBAAW,eAC9BV,KAAsBW,uBAAW,sBACjCX,KAAiBY,kBAAW,iCAC5BZ,KAAmBa,oBAAW,oBAC9Bb,KAAoBc,qBAAW,sBAQ9Bd,KAAYe,aAAY,MACxBf,KAAmBg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M,oBAAoBkB,GAIjC1C,EAAWrB,OAAS,WACnBgC,EACE,YAAAiB,KAAK,UACLJ,MAAM,yBACNU,KAAK,SACLR,SAAU,EACE,gBAAG1I,KAAKW,uBAAyBmI,OAAO9I,KAAKW,wBAA0B,OAAO6I,IAC1Fb,QAAUlG,GAAUzC,KAAKwC,oBAAoBC,EAAOuE,EAAWzB,MAC/D+D,UAAY7G,IACV,GAAIA,EAAMU,MAAQ,SAAWV,EAAMU,MAAQ,IAAK,CAC9CV,EAAMW,iBACNpD,KAAKwC,oBAAoBC,EAAOuE,EAAWzB,K,MAMjD,K,CASpB,YAAAuE,GACE,MAAO,GAAG9J,KAAKsB,SAAW,IACtB,0BACA,E,CAGN,oBAAAmH,GACE,OAAOsB,EACL,wBACA,yBAAyB/J,KAAK8J,iBAC9B,GAAG9J,KAAKuB,UAAY,UAAY,KAChC,GAAGvB,KAAKe,aAAe,gBAAkB,KACzC,GAAGf,KAAKqB,SAAW,WAAa,K,CAIpC,uBAAAuI,CAAwB3E,G,MACtB,OAAO8E,EACL,kBACA,CACE,4BAA6B9E,IAAUjF,KAAKiB,wBAC5C,6BAA4B+I,EAAAhK,KAAKgB,oBAAoBiE,MAAM,MAAA+E,SAAA,SAAAA,EAAErE,QAAS,W","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,a as i}from"./p-DtIEDtZ8.js";const a=".list-entry{display:flex;align-items:center;margin-top:8px;align-self:stretch}";const r=class{constructor(s){t(this,s);this.ifxListEntryChange=e(this,"ifxListEntryChange",7)}valueChanged(t){if(t){this.host.setAttribute("value","true")}else{this.host.removeAttribute("value")}}handleFilterEntryChange(t){this.value=t.detail;this.ifxListEntryChange.emit({label:this.label,value:this.value,type:this.type})}render(){return s("div",{key:"696527cfd70dab938c5cb9ee45add98cfda271ec",class:"wrapper"},this.type==="checkbox"?s("div",{class:"list-entry"},s("ifx-checkbox",{size:"s",checked:this.value},this.label)):s("div",{class:"list-entry"},s("ifx-radio-button",{size:"s",checked:this.value},this.label)))}get host(){return i(this)}static get watchers(){return{value:["valueChanged"]}}};r.style=a;export{r as ifx_list_entry};
|
|
2
|
-
//# sourceMappingURL=p-ba4ee343.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as a,a as e}from"./p-DtIEDtZ8.js";const r=":host{display:block}";const i=class{constructor(a){t(this,a);this.tabHeaderChange=s(this,"tabHeaderChange",7);this.icon="";this.iconPosition="left"}componentWillUpdate(){this.tabHeaderChange.emit(this.header)}render(){return a("slot",{key:"dad01fbbf74d672ac8755a57cf6a31b18b4de550"})}get el(){return e(this)}};i.style=r;export{i as ifx_tab};
|
|
2
|
-
//# sourceMappingURL=p-c9d594e1.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,d as s,a}from"./p-DtIEDtZ8.js";const l=":host{display:block;width:100%}.search-container{display:flex;width:calc(100% - 48px);padding-left:24px;padding-right:24px;flex-direction:row;align-items:flex-start;margin-bottom:16px}.components-container{display:flex;width:calc(100% - 48px);padding-left:24px;padding-right:24px;flex-direction:row;align-items:flex-end;align-content:flex-end;flex-wrap:wrap;gap:16px}.filter-slot-wrapper{flex-grow:1;flex-basis:100%;max-width:100%}@media (max-width: 1024px){.more-filters-wrapper{order:3;width:100%;display:flex;justify-content:center;padding-top:16px;}}@media (min-width: 720px) and (max-width: 1024px){.filter-slot-wrapper{flex-basis:calc((100% - 16px) / 2);max-width:calc((100% - 16px) / 2)}}@media (min-width: 1025px){.filter-slot-wrapper{flex-basis:auto;max-width:200px}::slotted([slot=filter-search]){max-width:828px}}::slotted([slot=filter-search]){flex-grow:1;flex-basis:100%;width:100%}";const r=class{constructor(i){t(this,i);this.ifxTopbarFilterChange=e(this,"ifxTopbarFilterChange",7);this.selectedOptions=[];this.showAllFilters=false;this.maxShownFilters=4;this.showMoreFiltersButton=true;this.handleMoreFiltersClick=()=>{this.showAllFilters=true;this.updateVisibleSlots()};this.handleResetEvent=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector('slot[name="filter-search"]');if(e instanceof HTMLSlotElement){const t=e.assignedElements({flatten:true});t.forEach((t=>{const e=t.querySelector("ifx-filter-search");const i=e.shadowRoot.querySelectorAll("ifx-search-field");if(i.length>0){i.forEach((t=>{t.value=""}))}}))}this.selectedOptions=[];this.ifxTopbarFilterChange.emit(this.selectedOptions)};this.handleSearchChange=t=>{this.handleTopbarFilterChange(t)};this.handleFilterSelect=t=>{this.handleTopbarFilterChange(t)};this.handleTopbarFilterChange=t=>{const e=[...this.selectedOptions];if(t.type==="ifxFilterSearchChange"){const{filterName:i,filterValue:s}=t.detail;const a=e.findIndex((t=>t.filterName===i));if(a!==-1){e[a].filterValues=[s]}else{e.push({filterName:i,filterValues:[s],type:"text"})}}else if(t.type==="ifxFilterSelect"){const{filterName:i,filterValues:s,type:a}=t.detail;const l=e.findIndex((t=>t.filterName===i));if(l!==-1){e[l].filterValues=s;e[l].type=a}else{e.push({filterName:i,filterValues:s,type:a})}}this.selectedOptions=e;this.ifxTopbarFilterChange.emit(this.selectedOptions)}}connectedCallback(){this.el.addEventListener("ifxFilterSelect",this.handleTopbarFilterChange);this.el.addEventListener("ifxFilterSearchChange",this.handleSearchChange);window.addEventListener("ifxResetFiltersEvent",this.handleResetEvent)}componentWillUnload(){this.el.removeEventListener("ifxFilterSelect",this.handleTopbarFilterChange);this.el.removeEventListener("ifxFilterSearchChange",this.handleSearchChange);window.removeEventListener("ifxResetFiltersEvent",this.handleResetEvent)}componentWillLoad(){this.updateVisibleSlots()}updateVisibleSlots(){this.visibleSlots=this.showAllFilters?Number.MAX_SAFE_INTEGER:this.maxShownFilters}render(){const t=Math.max(0,this.visibleSlots);const e=this.el.querySelectorAll("ifx-set-filter").length;const a=Math.min(t,e,Number.MAX_SAFE_INTEGER);const l=Array.from({length:a},((t,e)=>i("div",{class:"filter-slot-wrapper"},i("slot",{name:`filter-component-${e+1}`}))));return i(s,{key:"2b4927cc61d5e9c566f85544f47b8f3a4305be4e"},i("div",{key:"dc3fc02769297cfea89e54f7403bd811ad4cf952",class:"search-container"},i("slot",{key:"9ec9fe23bd4d14de1d2795d0d2dd21622c93eb76",name:"filter-search"})," "),i("div",{key:"c4ea12c884a69fc6905cb178de6da350648821e0",class:"components-container"},l.length>0?l:i("slot",{name:"filter-component"}),this.showMoreFiltersButton&&!this.showAllFilters&&i("div",{key:"d99f66f19f88a1788b9bfdb86b5ceacbe2fd3fad",class:"more-filters-wrapper",onClick:this.handleMoreFiltersClick},i("ifx-button",{key:"fbf09d84fc2ea71ece0a6440fc808ddf89b78f65",type:"button",disabled:false,variant:"tertiary",size:"m",target:"_blank",theme:"default","full-width":"false"},i("ifx-icon",{key:"930c10fd594a70b820249134cbbb320e17ebf8a7",icon:"filter-16"}),"More filters"))))}get el(){return a(this)}};r.style=l;export{r as ifx_filter_bar};
|
|
2
|
-
//# sourceMappingURL=p-d3a6bbf7.entry.js.map
|
/package/dist/infineon-design-system-stencil/{p-98c2e3a9.entry.js.map → p-07e1efa5.entry.js.map}
RENAMED
|
File without changes
|
/package/dist/infineon-design-system-stencil/{p-9ea43bb7.entry.js.map → p-0d5a32ec.entry.js.map}
RENAMED
|
File without changes
|