@pine-ds/core 3.14.0 → 3.14.2-dev.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/components/floating-ui.dom.js +161 -40
- package/components/floating-ui.dom.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +1 -1
- package/components/index2.js.map +1 -1
- package/components/pds-checkbox2.js +5 -4
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-combobox.js +69 -29
- package/components/pds-combobox.js.map +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-item.js.map +1 -1
- package/components/pds-dropdown-menu.js +3 -2
- package/components/pds-dropdown-menu.js.map +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filter.js.map +1 -1
- package/components/pds-input.js +3 -3
- package/components/pds-input.js.map +1 -1
- package/components/pds-loader2.js +2 -2
- package/components/pds-loader2.js.map +1 -1
- package/components/pds-multiselect.d.ts +11 -0
- package/components/pds-multiselect.js +667 -0
- package/components/pds-multiselect.js.map +1 -0
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.js +1 -1
- package/components/pds-radio-group.js +3 -3
- package/components/pds-radio.js +3 -3
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +3 -3
- package/components/pds-select.js.map +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +5 -4
- package/components/pds-switch.js.map +1 -1
- package/components/pds-tab.js +4 -4
- package/components/pds-tab.js.map +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +2 -2
- package/components/pds-table-head-cell2.js +35 -6
- package/components/pds-table-head-cell2.js.map +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +6 -6
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-toast.js +3 -3
- package/components/pds-tooltip.js +2 -2
- package/dist/cjs/{floating-ui.dom-DTAy35nv.js → floating-ui.dom-Ca6tS7ef.js} +163 -41
- package/dist/cjs/floating-ui.dom-Ca6tS7ef.js.map +1 -0
- package/dist/cjs/{index-CMeuo765.js → index-BA--jsiy.js} +3 -3
- package/dist/cjs/index-BA--jsiy.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +6 -5
- package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +1 -1
- package/dist/cjs/pds-combobox.cjs.entry.js +70 -30
- package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +4 -3
- package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-filter.cjs.entry.js +2 -2
- package/dist/cjs/pds-filter.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-multiselect.cjs.entry.js +593 -0
- package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-popover.cjs.entry.js +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-property.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/pds-radio.cjs.entry.js +4 -4
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +6 -5
- package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +4 -4
- package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +33 -6
- package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
- package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-toast.cjs.entry.js +3 -3
- package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pds-box/pds-box.css +0 -191
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +5 -4
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
- package/dist/collection/components/pds-combobox/pds-combobox.js +4 -4
- package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +3 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +2 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -1
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +6 -2
- package/dist/collection/components/pds-input/pds-input.js +3 -3
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-loader/pds-loader.js +2 -2
- package/dist/collection/components/pds-loader/pds-loader.js.map +1 -1
- package/dist/collection/components/pds-multiselect/multiselect-interface.js +2 -0
- package/dist/collection/components/pds-multiselect/multiselect-interface.js.map +1 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +232 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +1153 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -0
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +371 -0
- package/dist/collection/components/pds-popover/pds-popover.js +1 -1
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +3 -3
- package/dist/collection/components/pds-select/pds-select.js.map +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +5 -4
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +51 -6
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +32 -4
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +6 -2
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +6 -6
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/docs.json +960 -174
- package/dist/esm/{floating-ui.dom-DbQzNDdQ.js → floating-ui.dom-BO6p966C.js} +163 -42
- package/dist/esm/floating-ui.dom-BO6p966C.js.map +1 -0
- package/dist/esm/{index-xbb79yLt.js → index-DY8eSueV.js} +3 -3
- package/dist/esm/index-DY8eSueV.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +1 -1
- package/dist/esm/pds-button.entry.js +1 -1
- package/dist/esm/pds-checkbox.entry.js +6 -5
- package/dist/esm/pds-checkbox.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js +1 -1
- package/dist/esm/pds-combobox.entry.js +70 -30
- package/dist/esm/pds-combobox.entry.js.map +1 -1
- package/dist/esm/pds-copytext.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +4 -3
- package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm/pds-filter.entry.js +2 -2
- package/dist/esm/pds-filter.entry.js.map +1 -1
- package/dist/esm/pds-input.entry.js +4 -4
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/pds-link.entry.js +1 -1
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-loader.entry.js.map +1 -1
- package/dist/esm/pds-multiselect.entry.js +591 -0
- package/dist/esm/pds-multiselect.entry.js.map +1 -0
- package/dist/esm/pds-popover.entry.js +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-property.entry.js +1 -1
- package/dist/esm/pds-radio-group.entry.js +4 -4
- package/dist/esm/pds-radio.entry.js +4 -4
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +4 -4
- package/dist/esm/pds-select.entry.js.map +1 -1
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +6 -5
- package/dist/esm/pds-switch.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +4 -4
- package/dist/esm/pds-tab.entry.js.map +1 -1
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +2 -2
- package/dist/esm/pds-table-head-cell.entry.js +33 -6
- package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-row.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +1 -1
- package/dist/esm/pds-text.entry.js +1 -1
- package/dist/esm/pds-textarea.entry.js +7 -7
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pds-toast.entry.js +3 -3
- package/dist/esm/pds-tooltip.entry.js +3 -3
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/floating-ui.dom-BO6p966C.js +2 -0
- package/dist/esm-es5/floating-ui.dom-BO6p966C.js.map +1 -0
- package/dist/esm-es5/{index-xbb79yLt.js → index-DY8eSueV.js} +1 -1
- package/dist/esm-es5/index-DY8eSueV.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js.map +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js.map +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js.map +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +2 -0
- package/dist/esm-es5/pds-multiselect.entry.js.map +1 -0
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js.map +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js.map +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/p-02f48157.system.entry.js +2 -0
- package/dist/pine-core/{p-b30424e3.system.entry.js → p-063afa19.system.entry.js} +2 -2
- package/dist/pine-core/p-0sPVsRFU.system.js.map +1 -0
- package/dist/pine-core/{p-15202869.entry.js → p-10dbe3e2.entry.js} +2 -2
- package/dist/pine-core/{p-5b7ab891.entry.js → p-12360e47.entry.js} +2 -2
- package/dist/pine-core/{p-ac14c8e3.system.entry.js → p-137b3289.system.entry.js} +2 -2
- package/dist/pine-core/{p-a737df90.entry.js → p-154a32f4.entry.js} +2 -2
- package/dist/pine-core/{p-098cbcd7.system.entry.js → p-205ec2ac.system.entry.js} +2 -2
- package/dist/pine-core/{p-098cbcd7.system.entry.js.map → p-205ec2ac.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-a847fad3.entry.js → p-2537aacb.entry.js} +2 -2
- package/dist/pine-core/{p-cd335ec2.system.entry.js → p-2fe330d0.system.entry.js} +2 -2
- package/dist/pine-core/p-30ea3668.system.entry.js +2 -0
- package/dist/pine-core/{p-1daf66d1.entry.js → p-31168da5.entry.js} +2 -2
- package/dist/pine-core/{p-732e2564.system.entry.js → p-325b3b0d.system.entry.js} +2 -2
- package/dist/pine-core/{p-4d25449c.entry.js → p-3440138d.entry.js} +2 -2
- package/dist/pine-core/{p-4d25449c.entry.js.map → p-3440138d.entry.js.map} +1 -1
- package/dist/pine-core/p-3c04c17e.system.entry.js +2 -0
- package/dist/pine-core/p-3c04c17e.system.entry.js.map +1 -0
- package/dist/pine-core/p-475bb340.entry.js +2 -0
- package/dist/pine-core/p-475bb340.entry.js.map +1 -0
- package/dist/pine-core/{p-CGo2P4Fr.system.js.map → p-4EbKXnVN.system.js.map} +1 -1
- package/dist/pine-core/{p-4SEjggIC.system.js.map → p-4alPHnzl.system.js.map} +1 -1
- package/dist/pine-core/{p-9bfaed7e.system.entry.js → p-4c23c75b.system.entry.js} +2 -2
- package/dist/pine-core/{p-bdf8bff3.system.entry.js → p-4d85945b.system.entry.js} +2 -2
- package/dist/pine-core/{p-3f8b0885.system.entry.js → p-4d9eee67.system.entry.js} +2 -2
- package/dist/pine-core/{p-4fD2iHS9.system.js.map → p-4f1cRPxE.system.js.map} +1 -1
- package/dist/pine-core/{p-e2104c31.entry.js → p-5040a872.entry.js} +2 -2
- package/dist/pine-core/p-51114c2b.system.entry.js +2 -0
- package/dist/pine-core/p-51114c2b.system.entry.js.map +1 -0
- package/dist/pine-core/p-5L_gsODn.system.js.map +1 -0
- package/dist/pine-core/{p-bbc349b3.system.entry.js → p-5b3ac18e.system.entry.js} +2 -2
- package/dist/pine-core/{p-bbc349b3.system.entry.js.map → p-5b3ac18e.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-a08b60ae.entry.js → p-5b9110fe.entry.js} +2 -2
- package/dist/pine-core/{p-94b1997d.system.entry.js → p-5e92aa34.system.entry.js} +2 -2
- package/dist/pine-core/{p-41d89f20.entry.js → p-5f2865df.entry.js} +2 -2
- package/dist/pine-core/{p-41d89f20.entry.js.map → p-5f2865df.entry.js.map} +1 -1
- package/dist/pine-core/p-622f1342.system.entry.js +4 -0
- package/dist/pine-core/p-622f1342.system.entry.js.map +1 -0
- package/dist/pine-core/p-63269b89.entry.js +2 -0
- package/dist/pine-core/{p-ff182316.system.entry.js → p-6d2da3ca.system.entry.js} +2 -2
- package/dist/pine-core/{p-ff182316.system.entry.js.map → p-6d2da3ca.system.entry.js.map} +1 -1
- package/dist/pine-core/p-6e862168.system.entry.js +2 -0
- package/dist/pine-core/{p-dcc6ad67.system.entry.js.map → p-6e862168.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-cf2e1c07.system.entry.js → p-70aa35fc.system.entry.js} +2 -2
- package/dist/pine-core/{p-fc0ee6da.entry.js → p-757c7b80.entry.js} +2 -2
- package/dist/pine-core/{p-1df25b57.system.entry.js → p-78ee2e08.system.entry.js} +2 -2
- package/dist/pine-core/{p-2319298c.system.entry.js → p-7b5c8248.system.entry.js} +2 -2
- package/dist/pine-core/{p-e3d76aa3.system.entry.js → p-7dd74fe2.system.entry.js} +2 -2
- package/dist/pine-core/p-7dd74fe2.system.entry.js.map +1 -0
- package/dist/pine-core/p-811e510d.system.entry.js +2 -0
- package/dist/pine-core/p-811e510d.system.entry.js.map +1 -0
- package/dist/pine-core/{p-f9ef2f74.system.entry.js → p-87eb8d4b.system.entry.js} +2 -2
- package/dist/pine-core/p-8b201c9a.system.entry.js +2 -0
- package/dist/pine-core/p-8b201c9a.system.entry.js.map +1 -0
- package/dist/pine-core/{p-711989de.entry.js → p-8c0fc8ff.entry.js} +2 -2
- package/dist/pine-core/p-8c0fc8ff.entry.js.map +1 -0
- package/dist/pine-core/p-8eb1c168.entry.js +2 -0
- package/dist/pine-core/{p-e5bc22b6.system.entry.js → p-8fdb10c4.system.entry.js} +2 -2
- package/dist/pine-core/{p-232e4282.system.entry.js → p-90615423.system.entry.js} +2 -2
- package/dist/pine-core/{p-f79f6f08.system.entry.js → p-932283cf.system.entry.js} +2 -2
- package/dist/pine-core/{p-0b05708b.entry.js → p-9ada659b.entry.js} +2 -2
- package/dist/pine-core/{p-4778ae70.entry.js → p-9bb6cc3d.entry.js} +2 -2
- package/dist/pine-core/{p-3f6b9520.entry.js → p-9c928c44.entry.js} +2 -2
- package/dist/pine-core/{p-dad604e4.system.entry.js → p-9e7cd072.system.entry.js} +2 -2
- package/dist/pine-core/p-9e7cd072.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e8aad8dc.entry.js → p-9eccf7b9.entry.js} +2 -2
- package/dist/pine-core/{p-WhfStK1C.system.js.map → p-B0Otb6kF.system.js.map} +1 -1
- package/dist/pine-core/{p-CUmDvil2.system.js.map → p-BA95hFrH.system.js.map} +1 -1
- package/dist/pine-core/{p-B4EMeCRH.system.js.map → p-BHjZufAO.system.js.map} +1 -1
- package/dist/pine-core/{p-IH8oGXiE.system.js.map → p-BJtTt670.system.js.map} +1 -1
- package/dist/pine-core/p-BO6p966C.js +2 -0
- package/dist/pine-core/p-BO6p966C.js.map +1 -0
- package/dist/pine-core/{p-jBhqNO5u.system.js.map → p-BSRmAvMC.system.js.map} +1 -1
- package/dist/pine-core/{p-DyrNlfLT.system.js.map → p-BTe59phF.system.js.map} +1 -1
- package/dist/pine-core/{p-B0Y1Zs9b.system.js.map → p-Bn36FPag.system.js.map} +1 -1
- package/dist/pine-core/{p-DpeOrUYB.system.js.map → p-CG5jdxoZ.system.js.map} +1 -1
- package/dist/pine-core/{p-PMNjgK0C.system.js.map → p-CP2nsJcg.system.js.map} +1 -1
- package/dist/pine-core/{p-CKzDRRgx.system.js → p-CP48ADFM.system.js} +1 -1
- package/dist/pine-core/p-CP48ADFM.system.js.map +1 -0
- package/dist/pine-core/p-CR01VmO6.system.js.map +1 -0
- package/dist/pine-core/{p-CAnnMfDw.system.js.map → p-CSLo9qKS.system.js.map} +1 -1
- package/dist/pine-core/{p-DmVKABQy.system.js.map → p-CboCokff.system.js.map} +1 -1
- package/dist/pine-core/{p-r_cS5LMw.system.js.map → p-Civ2VHC7.system.js.map} +1 -1
- package/dist/pine-core/{p-ChiYqN-p.system.js.map → p-CmquVvkz.system.js.map} +1 -1
- package/dist/pine-core/{p-CXGuX44q.system.js.map → p-Cn_QqTXg.system.js.map} +1 -1
- package/dist/pine-core/{p-tHMXRB8d.system.js.map → p-CpyTw2IQ.system.js.map} +1 -1
- package/dist/pine-core/{p-Brpt0zl5.system.js.map → p-Ct9csNdF.system.js.map} +1 -1
- package/dist/pine-core/{p-B_Co5NfG.system.js.map → p-Cun139qe.system.js.map} +1 -1
- package/dist/pine-core/p-D2eS6fhD.system.js +2 -0
- package/dist/pine-core/p-D2eS6fhD.system.js.map +1 -0
- package/dist/pine-core/{p-CTfQ_9yC.system.js.map → p-DFXWnbHE.system.js.map} +1 -1
- package/dist/pine-core/{p-xbb79yLt.js → p-DY8eSueV.js} +1 -1
- package/dist/pine-core/p-DY8eSueV.js.map +1 -0
- package/dist/pine-core/p-DbNPEZgc.system.js.map +1 -0
- package/dist/pine-core/p-DieNsvcz.system.js.map +1 -0
- package/dist/pine-core/{p-DB45WSlG.system.js.map → p-DwQewDCV.system.js.map} +1 -1
- package/dist/pine-core/p-JAVnELnm.system.js +1 -1
- package/dist/pine-core/{p-DC2NZwtk.system.js.map → p-LM0mZTib.system.js.map} +1 -1
- package/dist/pine-core/{p-DAvCgWA9.system.js.map → p-Lk6DnEPT.system.js.map} +1 -1
- package/dist/pine-core/{p-Bjj4Pcbb.system.js.map → p-YqHO7iPZ.system.js.map} +1 -1
- package/dist/pine-core/{p-00568c20.system.entry.js → p-a07b8e45.system.entry.js} +2 -2
- package/dist/pine-core/{p-c5013d20.entry.js → p-a3cdff85.entry.js} +2 -2
- package/dist/pine-core/{p-a4b16b32.system.entry.js → p-a5b24b1d.system.entry.js} +2 -2
- package/dist/pine-core/{p-596acf65.entry.js → p-a99e8caf.entry.js} +2 -2
- package/dist/pine-core/p-aPfTGFhq.system.js.map +1 -0
- package/dist/pine-core/{p-646ac76d.entry.js → p-ab3b6e0c.entry.js} +2 -2
- package/dist/pine-core/p-ab3b6e0c.entry.js.map +1 -0
- package/dist/pine-core/{p-002fe322.system.entry.js → p-ac240034.system.entry.js} +2 -2
- package/dist/pine-core/{p-fe28b975.system.entry.js → p-ac56273a.system.entry.js} +2 -2
- package/dist/pine-core/{p-fe28b975.system.entry.js.map → p-ac56273a.system.entry.js.map} +1 -1
- package/dist/pine-core/p-b41465b8.entry.js +3 -0
- package/dist/pine-core/p-b41465b8.entry.js.map +1 -0
- package/dist/pine-core/{p-b02936d2.entry.js → p-ba623ced.entry.js} +2 -2
- package/dist/pine-core/p-ba623ced.entry.js.map +1 -0
- package/dist/pine-core/{p-f8fba315.entry.js → p-bc85016b.entry.js} +2 -2
- package/dist/pine-core/{p-61588eac.entry.js → p-bddc9c5a.entry.js} +2 -2
- package/dist/pine-core/p-bff9fb8e.entry.js +2 -0
- package/dist/pine-core/p-bff9fb8e.entry.js.map +1 -0
- package/dist/pine-core/{p--gPqixhD.system.js.map → p-bs74TBAh.system.js.map} +1 -1
- package/dist/pine-core/{p-7de73ac5.entry.js → p-c24d11c7.entry.js} +2 -2
- package/dist/pine-core/p-c292e5da.system.entry.js +2 -0
- package/dist/pine-core/{p-6bc7d67f.system.entry.js.map → p-c292e5da.system.entry.js.map} +1 -1
- package/dist/pine-core/p-c68bceb1.entry.js +2 -0
- package/dist/pine-core/{p-478d1107.entry.js.map → p-c68bceb1.entry.js.map} +1 -1
- package/dist/pine-core/{p-0ace9c16.entry.js → p-c7c00a27.entry.js} +2 -2
- package/dist/pine-core/{p-cb6c279a.system.entry.js → p-cac3128b.system.entry.js} +2 -2
- package/dist/pine-core/p-ccab748a.entry.js +2 -0
- package/dist/pine-core/p-ccab748a.entry.js.map +1 -0
- package/dist/pine-core/p-d41112ad.entry.js +2 -0
- package/dist/pine-core/{p-f82b464c.entry.js.map → p-d41112ad.entry.js.map} +1 -1
- package/dist/pine-core/{p-6cba6806.entry.js → p-d6302edd.entry.js} +2 -2
- package/dist/pine-core/{p-e011d7e5.entry.js → p-d9693048.entry.js} +2 -2
- package/dist/pine-core/{p-e011d7e5.entry.js.map → p-d9693048.entry.js.map} +1 -1
- package/dist/pine-core/{p-04294b28.system.entry.js → p-daa36570.system.entry.js} +2 -2
- package/dist/pine-core/{p-15650db8.entry.js → p-e6dc2297.entry.js} +2 -2
- package/dist/pine-core/{p-9f53eb94.system.entry.js → p-e8cf15d7.system.entry.js} +2 -2
- package/dist/pine-core/p-eb026745.entry.js +2 -0
- package/dist/pine-core/{p-95f2782c.entry.js → p-f47d6724.entry.js} +2 -2
- package/dist/pine-core/p-f47d6724.entry.js.map +1 -0
- package/dist/pine-core/{p-D8Jc24Qq.system.js.map → p-htODgUCV.system.js.map} +1 -1
- package/dist/pine-core/{p-DYq1Mef8.system.js.map → p-j0609tLE.system.js.map} +1 -1
- package/dist/pine-core/{p-DoP8Sl1O.system.js.map → p-rcUX-rt5.system.js.map} +1 -1
- package/dist/pine-core/p-ztsUkqit.system.js.map +1 -0
- package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-filter.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-loader.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-loader/pds-loader.d.ts +1 -1
- package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +24 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +175 -0
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +10 -0
- package/dist/types/components.d.ts +250 -0
- package/dist/vscode.html-data.json +156 -0
- package/hydrate/index.js +939 -118
- package/hydrate/index.mjs +939 -118
- package/package.json +5 -5
- package/dist/cjs/floating-ui.dom-DTAy35nv.js.map +0 -1
- package/dist/cjs/index-CMeuo765.js.map +0 -1
- package/dist/esm/floating-ui.dom-DbQzNDdQ.js.map +0 -1
- package/dist/esm/index-xbb79yLt.js.map +0 -1
- package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js +0 -2
- package/dist/esm-es5/floating-ui.dom-DbQzNDdQ.js.map +0 -1
- package/dist/esm-es5/index-xbb79yLt.js.map +0 -1
- package/dist/pine-core/p-43990889.entry.js +0 -2
- package/dist/pine-core/p-478d1107.entry.js +0 -2
- package/dist/pine-core/p-534e44cb.system.entry.js +0 -4
- package/dist/pine-core/p-534e44cb.system.entry.js.map +0 -1
- package/dist/pine-core/p-54a56826.entry.js +0 -3
- package/dist/pine-core/p-54a56826.entry.js.map +0 -1
- package/dist/pine-core/p-553e4543.entry.js +0 -2
- package/dist/pine-core/p-553e4543.entry.js.map +0 -1
- package/dist/pine-core/p-5f6cd30d.system.entry.js +0 -2
- package/dist/pine-core/p-5f6cd30d.system.entry.js.map +0 -1
- package/dist/pine-core/p-646ac76d.entry.js.map +0 -1
- package/dist/pine-core/p-6bc7d67f.system.entry.js +0 -2
- package/dist/pine-core/p-711989de.entry.js.map +0 -1
- package/dist/pine-core/p-8323fe69.system.entry.js +0 -2
- package/dist/pine-core/p-8323fe69.system.entry.js.map +0 -1
- package/dist/pine-core/p-95f2782c.entry.js.map +0 -1
- package/dist/pine-core/p-9e62c418.system.entry.js +0 -2
- package/dist/pine-core/p-9e62c418.system.entry.js.map +0 -1
- package/dist/pine-core/p-BOmQOnQe.system.js +0 -2
- package/dist/pine-core/p-BOmQOnQe.system.js.map +0 -1
- package/dist/pine-core/p-Bnp3zJ0T.system.js.map +0 -1
- package/dist/pine-core/p-CKzDRRgx.system.js.map +0 -1
- package/dist/pine-core/p-DSwKfctG.system.js.map +0 -1
- package/dist/pine-core/p-DbQzNDdQ.js +0 -2
- package/dist/pine-core/p-DbQzNDdQ.js.map +0 -1
- package/dist/pine-core/p-DfCCzxYg.system.js.map +0 -1
- package/dist/pine-core/p-X0_TH-op.system.js.map +0 -1
- package/dist/pine-core/p-XCTiWii8.system.js.map +0 -1
- package/dist/pine-core/p-ac2f9463.entry.js +0 -2
- package/dist/pine-core/p-ac2f9463.entry.js.map +0 -1
- package/dist/pine-core/p-b02936d2.entry.js.map +0 -1
- package/dist/pine-core/p-b59a0c6b.system.entry.js +0 -2
- package/dist/pine-core/p-d0e336b7.system.entry.js +0 -2
- package/dist/pine-core/p-dad604e4.system.entry.js.map +0 -1
- package/dist/pine-core/p-dcc6ad67.system.entry.js +0 -2
- package/dist/pine-core/p-e3d76aa3.system.entry.js.map +0 -1
- package/dist/pine-core/p-e7e25d42.entry.js +0 -2
- package/dist/pine-core/p-f82b464c.entry.js +0 -2
- package/dist/pine-core/p-f92055f3.entry.js +0 -2
- package/dist/pine-core/p-xbb79yLt.js.map +0 -1
- package/dist/pine-core/p-zgS7Vsk7.system.js.map +0 -1
- /package/dist/pine-core/{p-b59a0c6b.system.entry.js.map → p-02f48157.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b30424e3.system.entry.js.map → p-063afa19.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-15202869.entry.js.map → p-10dbe3e2.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5b7ab891.entry.js.map → p-12360e47.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ac14c8e3.system.entry.js.map → p-137b3289.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a737df90.entry.js.map → p-154a32f4.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a847fad3.entry.js.map → p-2537aacb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cd335ec2.system.entry.js.map → p-2fe330d0.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d0e336b7.system.entry.js.map → p-30ea3668.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1daf66d1.entry.js.map → p-31168da5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-732e2564.system.entry.js.map → p-325b3b0d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9bfaed7e.system.entry.js.map → p-4c23c75b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bdf8bff3.system.entry.js.map → p-4d85945b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3f8b0885.system.entry.js.map → p-4d9eee67.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e2104c31.entry.js.map → p-5040a872.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a08b60ae.entry.js.map → p-5b9110fe.entry.js.map} +0 -0
- /package/dist/pine-core/{p-94b1997d.system.entry.js.map → p-5e92aa34.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-43990889.entry.js.map → p-63269b89.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cf2e1c07.system.entry.js.map → p-70aa35fc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fc0ee6da.entry.js.map → p-757c7b80.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1df25b57.system.entry.js.map → p-78ee2e08.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2319298c.system.entry.js.map → p-7b5c8248.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f9ef2f74.system.entry.js.map → p-87eb8d4b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e7e25d42.entry.js.map → p-8eb1c168.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e5bc22b6.system.entry.js.map → p-8fdb10c4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-232e4282.system.entry.js.map → p-90615423.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f79f6f08.system.entry.js.map → p-932283cf.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0b05708b.entry.js.map → p-9ada659b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4778ae70.entry.js.map → p-9bb6cc3d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3f6b9520.entry.js.map → p-9c928c44.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e8aad8dc.entry.js.map → p-9eccf7b9.entry.js.map} +0 -0
- /package/dist/pine-core/{p-00568c20.system.entry.js.map → p-a07b8e45.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c5013d20.entry.js.map → p-a3cdff85.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a4b16b32.system.entry.js.map → p-a5b24b1d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-596acf65.entry.js.map → p-a99e8caf.entry.js.map} +0 -0
- /package/dist/pine-core/{p-002fe322.system.entry.js.map → p-ac240034.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f8fba315.entry.js.map → p-bc85016b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-61588eac.entry.js.map → p-bddc9c5a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7de73ac5.entry.js.map → p-c24d11c7.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0ace9c16.entry.js.map → p-c7c00a27.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cb6c279a.system.entry.js.map → p-cac3128b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6cba6806.entry.js.map → p-d6302edd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-04294b28.system.entry.js.map → p-daa36570.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-15650db8.entry.js.map → p-e6dc2297.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9f53eb94.system.entry.js.map → p-e8cf15d7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f92055f3.entry.js.map → p-eb026745.entry.js.map} +0 -0
|
@@ -0,0 +1,1153 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { computePosition, flip, offset, shift, size, autoUpdate } from "@floating-ui/dom";
|
|
3
|
+
import { debounceEvent } from "../../utils/utils";
|
|
4
|
+
import { messageId, assignDescription } from "../../utils/form";
|
|
5
|
+
import { danger, enlarge } from "@pine-ds/icons/icons";
|
|
6
|
+
/**
|
|
7
|
+
* @slot (default) - Static option elements for the multiselect
|
|
8
|
+
* @slot empty - Custom empty state message when no options match
|
|
9
|
+
* @slot loading - Custom loading indicator
|
|
10
|
+
*/
|
|
11
|
+
export class PdsMultiselect {
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* Placeholder text for the input field.
|
|
15
|
+
*/
|
|
16
|
+
this.placeholder = 'Select...';
|
|
17
|
+
/**
|
|
18
|
+
* Array of selected option values.
|
|
19
|
+
*/
|
|
20
|
+
this.value = [];
|
|
21
|
+
/**
|
|
22
|
+
* Determines whether or not the multiselect is disabled.
|
|
23
|
+
*/
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
/**
|
|
26
|
+
* HTTP method for async requests.
|
|
27
|
+
*/
|
|
28
|
+
this.asyncMethod = 'GET';
|
|
29
|
+
/**
|
|
30
|
+
* Debounce delay in milliseconds for search/fetch.
|
|
31
|
+
*/
|
|
32
|
+
this.debounce = 300;
|
|
33
|
+
/**
|
|
34
|
+
* Maximum height of the dropdown before scrolling.
|
|
35
|
+
*/
|
|
36
|
+
this.maxHeight = '300px';
|
|
37
|
+
/**
|
|
38
|
+
* Width of the trigger button (and reference for dropdown positioning).
|
|
39
|
+
*/
|
|
40
|
+
this.triggerWidth = '100%';
|
|
41
|
+
/**
|
|
42
|
+
* Minimum width of the dropdown panel.
|
|
43
|
+
*/
|
|
44
|
+
this.minWidth = '250px';
|
|
45
|
+
/**
|
|
46
|
+
* Visually hides the label but keeps it accessible.
|
|
47
|
+
*/
|
|
48
|
+
this.hideLabel = false;
|
|
49
|
+
/**
|
|
50
|
+
* If true, the multiselect is required.
|
|
51
|
+
*/
|
|
52
|
+
this.required = false;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the component is currently loading async options.
|
|
55
|
+
*/
|
|
56
|
+
this.loading = false;
|
|
57
|
+
// Internal state
|
|
58
|
+
this.isOpen = false;
|
|
59
|
+
this.searchQuery = '';
|
|
60
|
+
this.highlightedIndex = -1;
|
|
61
|
+
this.internalOptions = [];
|
|
62
|
+
this.selectedItems = [];
|
|
63
|
+
this.currentPage = 1;
|
|
64
|
+
this.hasMore = false;
|
|
65
|
+
// Flag to prevent focusout from closing during open transition
|
|
66
|
+
this.isOpening = false;
|
|
67
|
+
this.handleTriggerClick = () => {
|
|
68
|
+
if (this.disabled)
|
|
69
|
+
return;
|
|
70
|
+
if (this.isOpen) {
|
|
71
|
+
this.closeDropdown();
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.openDropdown();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
this.handleTriggerKeyDown = (e) => {
|
|
78
|
+
switch (e.key) {
|
|
79
|
+
case 'ArrowDown':
|
|
80
|
+
case 'ArrowUp':
|
|
81
|
+
case 'Enter':
|
|
82
|
+
case ' ':
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
if (!this.isOpen) {
|
|
85
|
+
this.openDropdown();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
this.handleSearchInputChange = (e) => {
|
|
91
|
+
const target = e.target;
|
|
92
|
+
this.searchQuery = target.value;
|
|
93
|
+
this.highlightedIndex = -1;
|
|
94
|
+
// Emit search event for consumer-managed async
|
|
95
|
+
this.pdsMultiselectSearch.emit({ query: this.searchQuery });
|
|
96
|
+
// Fetch from async URL if configured
|
|
97
|
+
if (this.asyncUrl) {
|
|
98
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, 1);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
this.handleSearchInputKeyDown = (e) => {
|
|
102
|
+
const filteredOptions = this.getFilteredOptions();
|
|
103
|
+
switch (e.key) {
|
|
104
|
+
case 'ArrowDown':
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
this.highlightedIndex = Math.min(this.highlightedIndex + 1, filteredOptions.length - 1);
|
|
107
|
+
this.scrollOptionIntoView();
|
|
108
|
+
break;
|
|
109
|
+
case 'ArrowUp':
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
|
|
112
|
+
this.scrollOptionIntoView();
|
|
113
|
+
break;
|
|
114
|
+
case 'Enter':
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
if (this.highlightedIndex >= 0) {
|
|
117
|
+
const option = filteredOptions[this.highlightedIndex];
|
|
118
|
+
if (option) {
|
|
119
|
+
this.selectOption(option);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
// Escape is handled by the global @Listen('keydown') handler
|
|
124
|
+
case 'Tab':
|
|
125
|
+
this.closeDropdown();
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
this.handleContainerFocusOut = () => {
|
|
130
|
+
// Use setTimeout to delay the check - this allows click events and focus transitions to complete
|
|
131
|
+
// before we decide to close the dropdown
|
|
132
|
+
setTimeout(() => {
|
|
133
|
+
var _a;
|
|
134
|
+
// Don't close if we're in the middle of opening or already closed
|
|
135
|
+
if (!this.isOpen || this.isOpening)
|
|
136
|
+
return;
|
|
137
|
+
const activeElement = document.activeElement;
|
|
138
|
+
// Check if focus is within our component's shadow root
|
|
139
|
+
const isInShadowRoot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement);
|
|
140
|
+
// Also check if focus is on the host element itself
|
|
141
|
+
const isOnHost = activeElement === this.el;
|
|
142
|
+
if (!isInShadowRoot && !isOnHost) {
|
|
143
|
+
this.closeDropdown();
|
|
144
|
+
}
|
|
145
|
+
}, 0);
|
|
146
|
+
};
|
|
147
|
+
this.handleOptionMouseDown = (option) => (e) => {
|
|
148
|
+
e.preventDefault(); // Prevent focus change
|
|
149
|
+
this.toggleOption(option);
|
|
150
|
+
};
|
|
151
|
+
this.handleOptionMouseEnter = (index) => () => {
|
|
152
|
+
this.highlightedIndex = index;
|
|
153
|
+
};
|
|
154
|
+
this.handleScroll = (e) => {
|
|
155
|
+
if (!this.asyncUrl || !this.hasMore || this.loading)
|
|
156
|
+
return;
|
|
157
|
+
const target = e.target;
|
|
158
|
+
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
159
|
+
// Load more when near bottom (within 50px)
|
|
160
|
+
if (scrollBottom < 50) {
|
|
161
|
+
this.pdsMultiselectLoadOptions.emit({
|
|
162
|
+
query: this.searchQuery,
|
|
163
|
+
page: this.currentPage + 1,
|
|
164
|
+
});
|
|
165
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, this.currentPage + 1);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
connectedCallback() {
|
|
170
|
+
// Initialize ElementInternals for form association (only once per element instance)
|
|
171
|
+
if (this.el.attachInternals && !this.internals) {
|
|
172
|
+
this.internals = this.el.attachInternals();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
componentWillLoad() {
|
|
176
|
+
this.originalSearchEmitter = this.pdsMultiselectSearch;
|
|
177
|
+
this.syncSelectedItems();
|
|
178
|
+
}
|
|
179
|
+
componentDidLoad() {
|
|
180
|
+
this.setupDebounce();
|
|
181
|
+
this.setupMutationObserver();
|
|
182
|
+
this.setupSlotChangeListener();
|
|
183
|
+
this.updateFormValue();
|
|
184
|
+
// Ensure preselected values sync after DOM is fully ready
|
|
185
|
+
// This handles cases where slot content loads after initial render (e.g., in docs/MDX)
|
|
186
|
+
requestAnimationFrame(() => {
|
|
187
|
+
this.updateOptionsFromSlot();
|
|
188
|
+
this.syncSelectedItems();
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
setupSlotChangeListener() {
|
|
192
|
+
var _a;
|
|
193
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
|
|
194
|
+
if (slot) {
|
|
195
|
+
slot.addEventListener('slotchange', () => {
|
|
196
|
+
this.updateOptionsFromSlot();
|
|
197
|
+
this.syncSelectedItems();
|
|
198
|
+
});
|
|
199
|
+
// Also call it immediately in case content is already slotted
|
|
200
|
+
this.updateOptionsFromSlot();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
disconnectedCallback() {
|
|
204
|
+
var _a, _b;
|
|
205
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
206
|
+
(_b = this.cleanupAutoUpdate) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
207
|
+
this.clearAsyncFetchState();
|
|
208
|
+
}
|
|
209
|
+
setupDebounce() {
|
|
210
|
+
const { pdsMultiselectSearch, debounce, originalSearchEmitter } = this;
|
|
211
|
+
this.pdsMultiselectSearch = debounce === undefined
|
|
212
|
+
? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsMultiselectSearch
|
|
213
|
+
: debounceEvent(pdsMultiselectSearch, debounce);
|
|
214
|
+
}
|
|
215
|
+
valueChanged(newValue) {
|
|
216
|
+
// Handle JSON string values (from HTML attributes)
|
|
217
|
+
if (typeof newValue === 'string') {
|
|
218
|
+
try {
|
|
219
|
+
const parsed = JSON.parse(newValue);
|
|
220
|
+
if (Array.isArray(parsed)) {
|
|
221
|
+
this.value = parsed;
|
|
222
|
+
return; // The assignment will trigger this watcher again with the array
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
catch (_a) {
|
|
226
|
+
// Not valid JSON, treat as single value
|
|
227
|
+
this.value = newValue ? [newValue] : [];
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
this.syncSelectedItems();
|
|
232
|
+
this.updateFormValue();
|
|
233
|
+
}
|
|
234
|
+
optionsChanged() {
|
|
235
|
+
if (this.options) {
|
|
236
|
+
this.internalOptions = [...this.options];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
internalOptionsChanged() {
|
|
240
|
+
// Re-sync selected items when options become available
|
|
241
|
+
// This handles the case where value is set before options are loaded (e.g., from slot)
|
|
242
|
+
this.syncSelectedItems();
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Sets focus on the trigger button.
|
|
246
|
+
*/
|
|
247
|
+
async setFocus() {
|
|
248
|
+
var _a;
|
|
249
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Handle global keyboard events for accessibility.
|
|
253
|
+
* Closes dropdown on Escape key press regardless of focus location.
|
|
254
|
+
*/
|
|
255
|
+
handleWindowKeyDown(event) {
|
|
256
|
+
var _a;
|
|
257
|
+
if (!this.isOpen)
|
|
258
|
+
return;
|
|
259
|
+
if (event.key === 'Escape') {
|
|
260
|
+
event.preventDefault();
|
|
261
|
+
this.closeDropdown();
|
|
262
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
setupMutationObserver() {
|
|
266
|
+
this.observer = new MutationObserver(() => {
|
|
267
|
+
this.updateOptionsFromSlot();
|
|
268
|
+
});
|
|
269
|
+
this.observer.observe(this.el, {
|
|
270
|
+
childList: true,
|
|
271
|
+
subtree: true,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
updateOptionsFromSlot() {
|
|
275
|
+
var _a;
|
|
276
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
|
|
277
|
+
if (!slot)
|
|
278
|
+
return;
|
|
279
|
+
const options = slot.assignedElements({ flatten: true })
|
|
280
|
+
.filter((el) => el.tagName === 'OPTION')
|
|
281
|
+
.map(opt => ({
|
|
282
|
+
id: opt.value,
|
|
283
|
+
text: opt.textContent || opt.value,
|
|
284
|
+
}));
|
|
285
|
+
// Only update if we actually found options AND we're not using async/external options
|
|
286
|
+
// Don't clear internalOptions if slot returns empty (might be mid-DOM-update)
|
|
287
|
+
if (options.length > 0 && !this.asyncUrl && !this.options) {
|
|
288
|
+
this.internalOptions = options;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
clearAsyncFetchState() {
|
|
292
|
+
var _a;
|
|
293
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
294
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
295
|
+
this.fetchDebounceTimer = undefined;
|
|
296
|
+
}
|
|
297
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
298
|
+
this.abortController = undefined;
|
|
299
|
+
}
|
|
300
|
+
debouncedFetchAsyncOptions(query, page = 1) {
|
|
301
|
+
var _a;
|
|
302
|
+
if (!this.asyncUrl)
|
|
303
|
+
return;
|
|
304
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
305
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
306
|
+
}
|
|
307
|
+
const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
|
|
308
|
+
this.fetchDebounceTimer = window.setTimeout(() => {
|
|
309
|
+
this.fetchDebounceTimer = undefined;
|
|
310
|
+
this.fetchOptions(query, page);
|
|
311
|
+
}, delay);
|
|
312
|
+
}
|
|
313
|
+
syncSelectedItems() {
|
|
314
|
+
// Ensure value is an array (may be string from HTML attribute)
|
|
315
|
+
const valueArray = this.ensureValueArray();
|
|
316
|
+
const allOptions = this.getAllOptions();
|
|
317
|
+
this.selectedItems = valueArray
|
|
318
|
+
.map(val => allOptions.find(opt => String(opt.id) === String(val)))
|
|
319
|
+
.filter((opt) => opt !== undefined);
|
|
320
|
+
}
|
|
321
|
+
ensureValueArray() {
|
|
322
|
+
// Handle JSON string values passed via HTML attribute
|
|
323
|
+
if (typeof this.value === 'string') {
|
|
324
|
+
try {
|
|
325
|
+
const parsed = JSON.parse(this.value);
|
|
326
|
+
if (Array.isArray(parsed)) {
|
|
327
|
+
this.value = parsed;
|
|
328
|
+
return parsed;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
catch (_a) {
|
|
332
|
+
// Not valid JSON, treat as single value
|
|
333
|
+
const singleValue = this.value;
|
|
334
|
+
this.value = singleValue ? [singleValue] : [];
|
|
335
|
+
return this.value;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return Array.isArray(this.value) ? this.value : [];
|
|
339
|
+
}
|
|
340
|
+
getAllOptions() {
|
|
341
|
+
return this.options || this.internalOptions;
|
|
342
|
+
}
|
|
343
|
+
getFilteredOptions() {
|
|
344
|
+
const allOptions = this.getAllOptions();
|
|
345
|
+
const query = this.searchQuery.toLowerCase();
|
|
346
|
+
return allOptions.filter(opt => {
|
|
347
|
+
// Filter by search query only - don't filter out selected items
|
|
348
|
+
if (query) {
|
|
349
|
+
return opt.text.toLowerCase().includes(query);
|
|
350
|
+
}
|
|
351
|
+
return true;
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
updateFormValue() {
|
|
355
|
+
var _a;
|
|
356
|
+
if ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.setFormValue) {
|
|
357
|
+
// Ensure value is an array before iterating
|
|
358
|
+
const valueArray = this.ensureValueArray();
|
|
359
|
+
// Submit as multiple values with same name (native select multiple behavior)
|
|
360
|
+
const formData = new FormData();
|
|
361
|
+
valueArray.forEach(val => {
|
|
362
|
+
if (this.name) {
|
|
363
|
+
formData.append(this.name, val);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
this.internals.setFormValue(formData);
|
|
367
|
+
// Update validity state for required validation
|
|
368
|
+
if (this.required && valueArray.length === 0) {
|
|
369
|
+
this.internals.setValidity({ valueMissing: true }, 'Please select at least one option.', this.triggerEl);
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
this.internals.setValidity({});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
async fetchOptions(query, page = 1) {
|
|
377
|
+
var _a;
|
|
378
|
+
if (!this.asyncUrl)
|
|
379
|
+
return;
|
|
380
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
381
|
+
this.abortController = new AbortController();
|
|
382
|
+
this.loading = true;
|
|
383
|
+
try {
|
|
384
|
+
const url = new URL(this.asyncUrl, window.location.origin);
|
|
385
|
+
if (this.asyncMethod === 'GET') {
|
|
386
|
+
url.searchParams.set('search', query);
|
|
387
|
+
url.searchParams.set('page', String(page));
|
|
388
|
+
}
|
|
389
|
+
const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers: {
|
|
390
|
+
'Content-Type': 'application/json',
|
|
391
|
+
'Accept': 'application/json',
|
|
392
|
+
} }, (this.asyncMethod === 'POST' && {
|
|
393
|
+
body: JSON.stringify({ search: query, page }),
|
|
394
|
+
})));
|
|
395
|
+
if (!response.ok)
|
|
396
|
+
throw new Error('Failed to fetch options');
|
|
397
|
+
const data = await response.json();
|
|
398
|
+
const formattedResults = data.results.map(item => {
|
|
399
|
+
if (this.formatResult) {
|
|
400
|
+
return this.formatResult(item);
|
|
401
|
+
}
|
|
402
|
+
return Object.assign({ id: item.id, text: item.text }, item);
|
|
403
|
+
});
|
|
404
|
+
if (page === 1) {
|
|
405
|
+
this.internalOptions = formattedResults;
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
this.internalOptions = [...this.internalOptions, ...formattedResults];
|
|
409
|
+
}
|
|
410
|
+
this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
|
|
411
|
+
this.currentPage = page;
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
if (error.name !== 'AbortError') {
|
|
415
|
+
console.error('PdsMultiselect: Failed to fetch options', error);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
finally {
|
|
419
|
+
this.loading = false;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
openDropdown() {
|
|
423
|
+
if (this.disabled)
|
|
424
|
+
return;
|
|
425
|
+
this.isOpening = true;
|
|
426
|
+
this.isOpen = true;
|
|
427
|
+
this.highlightedIndex = -1;
|
|
428
|
+
// Trigger initial fetch if async
|
|
429
|
+
if (this.asyncUrl && this.internalOptions.length === 0) {
|
|
430
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, 1);
|
|
431
|
+
}
|
|
432
|
+
requestAnimationFrame(() => {
|
|
433
|
+
var _a;
|
|
434
|
+
this.positionDropdown();
|
|
435
|
+
// Focus the search input after the panel is positioned
|
|
436
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
437
|
+
// Clear the opening flag after focus has moved
|
|
438
|
+
setTimeout(() => {
|
|
439
|
+
this.isOpening = false;
|
|
440
|
+
}, 50);
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
closeDropdown() {
|
|
444
|
+
this.isOpen = false;
|
|
445
|
+
this.highlightedIndex = -1;
|
|
446
|
+
this.searchQuery = '';
|
|
447
|
+
// Clean up auto-update
|
|
448
|
+
if (this.cleanupAutoUpdate) {
|
|
449
|
+
this.cleanupAutoUpdate();
|
|
450
|
+
this.cleanupAutoUpdate = undefined;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
positionDropdown() {
|
|
454
|
+
if (!this.containerEl || !this.panelEl)
|
|
455
|
+
return;
|
|
456
|
+
const referenceEl = this.triggerEl || this.containerEl;
|
|
457
|
+
const { minWidth, panelWidth } = this;
|
|
458
|
+
const updatePosition = () => {
|
|
459
|
+
computePosition(referenceEl, this.panelEl, {
|
|
460
|
+
placement: 'bottom-start',
|
|
461
|
+
strategy: 'absolute',
|
|
462
|
+
middleware: [
|
|
463
|
+
offset(12),
|
|
464
|
+
flip(),
|
|
465
|
+
shift({ padding: 8 }),
|
|
466
|
+
size({
|
|
467
|
+
apply: ({ rects, elements }) => {
|
|
468
|
+
Object.assign(elements.floating.style, {
|
|
469
|
+
width: panelWidth !== null && panelWidth !== void 0 ? panelWidth : `${rects.reference.width}px`,
|
|
470
|
+
minWidth,
|
|
471
|
+
});
|
|
472
|
+
},
|
|
473
|
+
}),
|
|
474
|
+
],
|
|
475
|
+
}).then(({ x, y }) => {
|
|
476
|
+
if (this.panelEl) {
|
|
477
|
+
this.panelEl.style.left = `${x}px`;
|
|
478
|
+
this.panelEl.style.top = `${y}px`;
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
// Initial position
|
|
483
|
+
updatePosition();
|
|
484
|
+
// Set up auto-update for window resize and scroll
|
|
485
|
+
const cleanupAutoUpdate = autoUpdate(referenceEl, this.panelEl, updatePosition);
|
|
486
|
+
this.cleanupAutoUpdate = () => {
|
|
487
|
+
cleanupAutoUpdate();
|
|
488
|
+
this.clearAsyncFetchState();
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
scrollOptionIntoView() {
|
|
492
|
+
requestAnimationFrame(() => {
|
|
493
|
+
var _a;
|
|
494
|
+
const highlighted = (_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-index="${this.highlightedIndex}"]`);
|
|
495
|
+
highlighted === null || highlighted === void 0 ? void 0 : highlighted.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
toggleOption(option) {
|
|
499
|
+
var _a;
|
|
500
|
+
const isSelected = this.value.includes(String(option.id));
|
|
501
|
+
if (isSelected) {
|
|
502
|
+
// Remove from selection
|
|
503
|
+
const newValue = this.value.filter(v => v !== String(option.id));
|
|
504
|
+
this.value = newValue;
|
|
505
|
+
const newSelectedItems = this.selectedItems.filter(item => String(item.id) !== String(option.id));
|
|
506
|
+
this.pdsMultiselectChange.emit({
|
|
507
|
+
values: newValue,
|
|
508
|
+
items: newSelectedItems,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
// Add to selection
|
|
513
|
+
if (this.maxSelections && this.value.length >= this.maxSelections) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
const newValue = [...this.value, String(option.id)];
|
|
517
|
+
this.value = newValue;
|
|
518
|
+
const newSelectedItems = [...this.selectedItems, option];
|
|
519
|
+
this.pdsMultiselectChange.emit({
|
|
520
|
+
values: newValue,
|
|
521
|
+
items: newSelectedItems,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
// Keep focus on search input, don't close dropdown
|
|
525
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
526
|
+
}
|
|
527
|
+
selectOption(option) {
|
|
528
|
+
// For keyboard navigation - toggle the option
|
|
529
|
+
this.toggleOption(option);
|
|
530
|
+
}
|
|
531
|
+
renderSelectedItemsList() {
|
|
532
|
+
if (this.selectedItems.length === 0)
|
|
533
|
+
return null;
|
|
534
|
+
return (h("div", { class: "pds-multiselect__selected-section" }, h("ul", { class: "pds-multiselect__selected-list", role: "list" }, this.selectedItems.map(item => (h("li", { key: String(item.id), class: "pds-multiselect__selected-item" }, item.text))))));
|
|
535
|
+
}
|
|
536
|
+
renderDropdown() {
|
|
537
|
+
if (!this.isOpen)
|
|
538
|
+
return null;
|
|
539
|
+
const filteredOptions = this.getFilteredOptions();
|
|
540
|
+
const valueArray = this.ensureValueArray();
|
|
541
|
+
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
542
|
+
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
543
|
+
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: "Find...", value: this.searchQuery, "aria-label": "Search options", "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || 'Options', id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, "No options found")))), filteredOptions.map((option, index) => {
|
|
544
|
+
const isSelected = valueArray.includes(String(option.id));
|
|
545
|
+
const isHighlighted = index === this.highlightedIndex;
|
|
546
|
+
const optionId = `${this.componentId}-option-${index}`;
|
|
547
|
+
return (h("li", { key: String(option.id), id: optionId, class: {
|
|
548
|
+
'pds-multiselect__option': true,
|
|
549
|
+
'pds-multiselect__option--highlighted': isHighlighted,
|
|
550
|
+
'pds-multiselect__option--selected': isSelected,
|
|
551
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onMouseEnter: this.handleOptionMouseEnter(index) }, h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, style: { pointerEvents: 'none' } })));
|
|
552
|
+
}), this.hasMore && !this.loading && (h("li", { class: "pds-multiselect__load-more", role: "presentation" }, h("pds-loader", { size: "small" }))))));
|
|
553
|
+
}
|
|
554
|
+
getTriggerText() {
|
|
555
|
+
const count = this.selectedItems.length;
|
|
556
|
+
if (count === 0) {
|
|
557
|
+
return this.placeholder || 'Select...';
|
|
558
|
+
}
|
|
559
|
+
return `${count} item${count === 1 ? '' : 's'}`;
|
|
560
|
+
}
|
|
561
|
+
render() {
|
|
562
|
+
const hasSelections = this.selectedItems.length > 0;
|
|
563
|
+
return (h(Host, { key: 'e7d872fd9bedb03390eaf8a2bd9c5d6ba1cc7ecc', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '141dee3c657dd17d3389d4a25979d0f748e36361', class: "pds-multiselect" }, this.label && (h("label", { key: '386114a823424506857a1e927a2538e88d3c82f5', htmlFor: this.componentId, class: {
|
|
564
|
+
'pds-multiselect__label': true,
|
|
565
|
+
'visually-hidden': this.hideLabel,
|
|
566
|
+
} }, this.label)), h("div", { key: '9fc18bf93f981ee7f72f31c20f43f5251ed647e4', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, h("button", { key: '74e8eb5ef5984307dce779ef63d54e49e07497ea', ref: el => (this.triggerEl = el), type: "button", class: {
|
|
567
|
+
'pds-multiselect__trigger': true,
|
|
568
|
+
'pds-multiselect__trigger--open': this.isOpen,
|
|
569
|
+
'pds-multiselect__trigger--disabled': this.disabled,
|
|
570
|
+
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
571
|
+
'pds-multiselect__trigger--has-value': hasSelections,
|
|
572
|
+
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: 'fb7f9b9fffd46839ddc4ab0bb549b61de191f76c', class: {
|
|
573
|
+
'pds-multiselect__trigger-text': true,
|
|
574
|
+
'pds-multiselect__trigger-text--placeholder': !hasSelections,
|
|
575
|
+
} }, this.getTriggerText()), h("pds-icon", { key: '354e1c57758350d73557a6c94d0b31eb6732f12a', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !this.errorMessage && (h("p", { key: '3709f184a7972e1acfd3826faefc4ba139a8d518', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: '8029b58286455b7b4789a4336a79c324ca91ad74', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: 'cd781f3caed8b81deef2ce43f0a4406b6ed2d53c', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '7c303f4d64247b41b9e88892cfb8c02acd5d8d59', style: { display: 'none' } }, h("slot", { key: 'e9b384038e67bb951613933bbf68fd2b2efc71ef' })))));
|
|
576
|
+
}
|
|
577
|
+
static get is() { return "pds-multiselect"; }
|
|
578
|
+
static get encapsulation() { return "shadow"; }
|
|
579
|
+
static get formAssociated() { return true; }
|
|
580
|
+
static get originalStyleUrls() {
|
|
581
|
+
return {
|
|
582
|
+
"$": ["pds-multiselect.scss"]
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
static get styleUrls() {
|
|
586
|
+
return {
|
|
587
|
+
"$": ["pds-multiselect.css"]
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
static get properties() {
|
|
591
|
+
return {
|
|
592
|
+
"componentId": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"mutable": false,
|
|
595
|
+
"complexType": {
|
|
596
|
+
"original": "string",
|
|
597
|
+
"resolved": "string",
|
|
598
|
+
"references": {}
|
|
599
|
+
},
|
|
600
|
+
"required": true,
|
|
601
|
+
"optional": false,
|
|
602
|
+
"docs": {
|
|
603
|
+
"tags": [],
|
|
604
|
+
"text": "A unique identifier used for the underlying component `id` attribute."
|
|
605
|
+
},
|
|
606
|
+
"getter": false,
|
|
607
|
+
"setter": false,
|
|
608
|
+
"reflect": false,
|
|
609
|
+
"attribute": "component-id"
|
|
610
|
+
},
|
|
611
|
+
"label": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"mutable": false,
|
|
614
|
+
"complexType": {
|
|
615
|
+
"original": "string",
|
|
616
|
+
"resolved": "string",
|
|
617
|
+
"references": {}
|
|
618
|
+
},
|
|
619
|
+
"required": false,
|
|
620
|
+
"optional": true,
|
|
621
|
+
"docs": {
|
|
622
|
+
"tags": [],
|
|
623
|
+
"text": "Text to be displayed as the multiselect label."
|
|
624
|
+
},
|
|
625
|
+
"getter": false,
|
|
626
|
+
"setter": false,
|
|
627
|
+
"reflect": false,
|
|
628
|
+
"attribute": "label"
|
|
629
|
+
},
|
|
630
|
+
"placeholder": {
|
|
631
|
+
"type": "string",
|
|
632
|
+
"mutable": false,
|
|
633
|
+
"complexType": {
|
|
634
|
+
"original": "string",
|
|
635
|
+
"resolved": "string",
|
|
636
|
+
"references": {}
|
|
637
|
+
},
|
|
638
|
+
"required": false,
|
|
639
|
+
"optional": true,
|
|
640
|
+
"docs": {
|
|
641
|
+
"tags": [],
|
|
642
|
+
"text": "Placeholder text for the input field."
|
|
643
|
+
},
|
|
644
|
+
"getter": false,
|
|
645
|
+
"setter": false,
|
|
646
|
+
"reflect": false,
|
|
647
|
+
"attribute": "placeholder",
|
|
648
|
+
"defaultValue": "'Select...'"
|
|
649
|
+
},
|
|
650
|
+
"name": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"mutable": false,
|
|
653
|
+
"complexType": {
|
|
654
|
+
"original": "string",
|
|
655
|
+
"resolved": "string",
|
|
656
|
+
"references": {}
|
|
657
|
+
},
|
|
658
|
+
"required": false,
|
|
659
|
+
"optional": true,
|
|
660
|
+
"docs": {
|
|
661
|
+
"tags": [],
|
|
662
|
+
"text": "Specifies the name. Submitted with the form as part of a name/value pair."
|
|
663
|
+
},
|
|
664
|
+
"getter": false,
|
|
665
|
+
"setter": false,
|
|
666
|
+
"reflect": false,
|
|
667
|
+
"attribute": "name"
|
|
668
|
+
},
|
|
669
|
+
"value": {
|
|
670
|
+
"type": "unknown",
|
|
671
|
+
"mutable": true,
|
|
672
|
+
"complexType": {
|
|
673
|
+
"original": "string[]",
|
|
674
|
+
"resolved": "string[]",
|
|
675
|
+
"references": {}
|
|
676
|
+
},
|
|
677
|
+
"required": false,
|
|
678
|
+
"optional": false,
|
|
679
|
+
"docs": {
|
|
680
|
+
"tags": [],
|
|
681
|
+
"text": "Array of selected option values."
|
|
682
|
+
},
|
|
683
|
+
"getter": false,
|
|
684
|
+
"setter": false,
|
|
685
|
+
"defaultValue": "[]"
|
|
686
|
+
},
|
|
687
|
+
"disabled": {
|
|
688
|
+
"type": "boolean",
|
|
689
|
+
"mutable": false,
|
|
690
|
+
"complexType": {
|
|
691
|
+
"original": "boolean",
|
|
692
|
+
"resolved": "boolean",
|
|
693
|
+
"references": {}
|
|
694
|
+
},
|
|
695
|
+
"required": false,
|
|
696
|
+
"optional": false,
|
|
697
|
+
"docs": {
|
|
698
|
+
"tags": [],
|
|
699
|
+
"text": "Determines whether or not the multiselect is disabled."
|
|
700
|
+
},
|
|
701
|
+
"getter": false,
|
|
702
|
+
"setter": false,
|
|
703
|
+
"reflect": false,
|
|
704
|
+
"attribute": "disabled",
|
|
705
|
+
"defaultValue": "false"
|
|
706
|
+
},
|
|
707
|
+
"asyncUrl": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"mutable": false,
|
|
710
|
+
"complexType": {
|
|
711
|
+
"original": "string",
|
|
712
|
+
"resolved": "string",
|
|
713
|
+
"references": {}
|
|
714
|
+
},
|
|
715
|
+
"required": false,
|
|
716
|
+
"optional": true,
|
|
717
|
+
"docs": {
|
|
718
|
+
"tags": [],
|
|
719
|
+
"text": "URL endpoint for async data fetching."
|
|
720
|
+
},
|
|
721
|
+
"getter": false,
|
|
722
|
+
"setter": false,
|
|
723
|
+
"reflect": false,
|
|
724
|
+
"attribute": "async-url"
|
|
725
|
+
},
|
|
726
|
+
"asyncMethod": {
|
|
727
|
+
"type": "string",
|
|
728
|
+
"mutable": false,
|
|
729
|
+
"complexType": {
|
|
730
|
+
"original": "'GET' | 'POST'",
|
|
731
|
+
"resolved": "\"GET\" | \"POST\"",
|
|
732
|
+
"references": {}
|
|
733
|
+
},
|
|
734
|
+
"required": false,
|
|
735
|
+
"optional": false,
|
|
736
|
+
"docs": {
|
|
737
|
+
"tags": [],
|
|
738
|
+
"text": "HTTP method for async requests."
|
|
739
|
+
},
|
|
740
|
+
"getter": false,
|
|
741
|
+
"setter": false,
|
|
742
|
+
"reflect": false,
|
|
743
|
+
"attribute": "async-method",
|
|
744
|
+
"defaultValue": "'GET'"
|
|
745
|
+
},
|
|
746
|
+
"debounce": {
|
|
747
|
+
"type": "number",
|
|
748
|
+
"mutable": false,
|
|
749
|
+
"complexType": {
|
|
750
|
+
"original": "number",
|
|
751
|
+
"resolved": "number",
|
|
752
|
+
"references": {}
|
|
753
|
+
},
|
|
754
|
+
"required": false,
|
|
755
|
+
"optional": false,
|
|
756
|
+
"docs": {
|
|
757
|
+
"tags": [],
|
|
758
|
+
"text": "Debounce delay in milliseconds for search/fetch."
|
|
759
|
+
},
|
|
760
|
+
"getter": false,
|
|
761
|
+
"setter": false,
|
|
762
|
+
"reflect": false,
|
|
763
|
+
"attribute": "debounce",
|
|
764
|
+
"defaultValue": "300"
|
|
765
|
+
},
|
|
766
|
+
"maxSelections": {
|
|
767
|
+
"type": "number",
|
|
768
|
+
"mutable": false,
|
|
769
|
+
"complexType": {
|
|
770
|
+
"original": "number",
|
|
771
|
+
"resolved": "number",
|
|
772
|
+
"references": {}
|
|
773
|
+
},
|
|
774
|
+
"required": false,
|
|
775
|
+
"optional": true,
|
|
776
|
+
"docs": {
|
|
777
|
+
"tags": [],
|
|
778
|
+
"text": "Maximum number of selections allowed."
|
|
779
|
+
},
|
|
780
|
+
"getter": false,
|
|
781
|
+
"setter": false,
|
|
782
|
+
"reflect": false,
|
|
783
|
+
"attribute": "max-selections"
|
|
784
|
+
},
|
|
785
|
+
"maxHeight": {
|
|
786
|
+
"type": "string",
|
|
787
|
+
"mutable": false,
|
|
788
|
+
"complexType": {
|
|
789
|
+
"original": "string",
|
|
790
|
+
"resolved": "string",
|
|
791
|
+
"references": {}
|
|
792
|
+
},
|
|
793
|
+
"required": false,
|
|
794
|
+
"optional": false,
|
|
795
|
+
"docs": {
|
|
796
|
+
"tags": [],
|
|
797
|
+
"text": "Maximum height of the dropdown before scrolling."
|
|
798
|
+
},
|
|
799
|
+
"getter": false,
|
|
800
|
+
"setter": false,
|
|
801
|
+
"reflect": false,
|
|
802
|
+
"attribute": "max-height",
|
|
803
|
+
"defaultValue": "'300px'"
|
|
804
|
+
},
|
|
805
|
+
"triggerWidth": {
|
|
806
|
+
"type": "string",
|
|
807
|
+
"mutable": false,
|
|
808
|
+
"complexType": {
|
|
809
|
+
"original": "string",
|
|
810
|
+
"resolved": "string",
|
|
811
|
+
"references": {}
|
|
812
|
+
},
|
|
813
|
+
"required": false,
|
|
814
|
+
"optional": false,
|
|
815
|
+
"docs": {
|
|
816
|
+
"tags": [],
|
|
817
|
+
"text": "Width of the trigger button (and reference for dropdown positioning)."
|
|
818
|
+
},
|
|
819
|
+
"getter": false,
|
|
820
|
+
"setter": false,
|
|
821
|
+
"reflect": false,
|
|
822
|
+
"attribute": "trigger-width",
|
|
823
|
+
"defaultValue": "'100%'"
|
|
824
|
+
},
|
|
825
|
+
"minWidth": {
|
|
826
|
+
"type": "string",
|
|
827
|
+
"mutable": false,
|
|
828
|
+
"complexType": {
|
|
829
|
+
"original": "string",
|
|
830
|
+
"resolved": "string",
|
|
831
|
+
"references": {}
|
|
832
|
+
},
|
|
833
|
+
"required": false,
|
|
834
|
+
"optional": false,
|
|
835
|
+
"docs": {
|
|
836
|
+
"tags": [],
|
|
837
|
+
"text": "Minimum width of the dropdown panel."
|
|
838
|
+
},
|
|
839
|
+
"getter": false,
|
|
840
|
+
"setter": false,
|
|
841
|
+
"reflect": false,
|
|
842
|
+
"attribute": "min-width",
|
|
843
|
+
"defaultValue": "'250px'"
|
|
844
|
+
},
|
|
845
|
+
"panelWidth": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"mutable": false,
|
|
848
|
+
"complexType": {
|
|
849
|
+
"original": "string",
|
|
850
|
+
"resolved": "string",
|
|
851
|
+
"references": {}
|
|
852
|
+
},
|
|
853
|
+
"required": false,
|
|
854
|
+
"optional": true,
|
|
855
|
+
"docs": {
|
|
856
|
+
"tags": [],
|
|
857
|
+
"text": "Width of the dropdown panel. Defaults to the trigger width."
|
|
858
|
+
},
|
|
859
|
+
"getter": false,
|
|
860
|
+
"setter": false,
|
|
861
|
+
"reflect": false,
|
|
862
|
+
"attribute": "panel-width"
|
|
863
|
+
},
|
|
864
|
+
"hideLabel": {
|
|
865
|
+
"type": "boolean",
|
|
866
|
+
"mutable": false,
|
|
867
|
+
"complexType": {
|
|
868
|
+
"original": "boolean",
|
|
869
|
+
"resolved": "boolean",
|
|
870
|
+
"references": {}
|
|
871
|
+
},
|
|
872
|
+
"required": false,
|
|
873
|
+
"optional": false,
|
|
874
|
+
"docs": {
|
|
875
|
+
"tags": [],
|
|
876
|
+
"text": "Visually hides the label but keeps it accessible."
|
|
877
|
+
},
|
|
878
|
+
"getter": false,
|
|
879
|
+
"setter": false,
|
|
880
|
+
"reflect": false,
|
|
881
|
+
"attribute": "hide-label",
|
|
882
|
+
"defaultValue": "false"
|
|
883
|
+
},
|
|
884
|
+
"errorMessage": {
|
|
885
|
+
"type": "string",
|
|
886
|
+
"mutable": false,
|
|
887
|
+
"complexType": {
|
|
888
|
+
"original": "string",
|
|
889
|
+
"resolved": "string",
|
|
890
|
+
"references": {}
|
|
891
|
+
},
|
|
892
|
+
"required": false,
|
|
893
|
+
"optional": true,
|
|
894
|
+
"docs": {
|
|
895
|
+
"tags": [],
|
|
896
|
+
"text": "Error message to display."
|
|
897
|
+
},
|
|
898
|
+
"getter": false,
|
|
899
|
+
"setter": false,
|
|
900
|
+
"reflect": false,
|
|
901
|
+
"attribute": "error-message"
|
|
902
|
+
},
|
|
903
|
+
"helperMessage": {
|
|
904
|
+
"type": "string",
|
|
905
|
+
"mutable": false,
|
|
906
|
+
"complexType": {
|
|
907
|
+
"original": "string",
|
|
908
|
+
"resolved": "string",
|
|
909
|
+
"references": {}
|
|
910
|
+
},
|
|
911
|
+
"required": false,
|
|
912
|
+
"optional": true,
|
|
913
|
+
"docs": {
|
|
914
|
+
"tags": [],
|
|
915
|
+
"text": "Helper message to display below the input."
|
|
916
|
+
},
|
|
917
|
+
"getter": false,
|
|
918
|
+
"setter": false,
|
|
919
|
+
"reflect": false,
|
|
920
|
+
"attribute": "helper-message"
|
|
921
|
+
},
|
|
922
|
+
"invalid": {
|
|
923
|
+
"type": "boolean",
|
|
924
|
+
"mutable": false,
|
|
925
|
+
"complexType": {
|
|
926
|
+
"original": "boolean",
|
|
927
|
+
"resolved": "boolean",
|
|
928
|
+
"references": {}
|
|
929
|
+
},
|
|
930
|
+
"required": false,
|
|
931
|
+
"optional": true,
|
|
932
|
+
"docs": {
|
|
933
|
+
"tags": [],
|
|
934
|
+
"text": "If true, the multiselect is in an invalid state."
|
|
935
|
+
},
|
|
936
|
+
"getter": false,
|
|
937
|
+
"setter": false,
|
|
938
|
+
"reflect": false,
|
|
939
|
+
"attribute": "invalid"
|
|
940
|
+
},
|
|
941
|
+
"required": {
|
|
942
|
+
"type": "boolean",
|
|
943
|
+
"mutable": false,
|
|
944
|
+
"complexType": {
|
|
945
|
+
"original": "boolean",
|
|
946
|
+
"resolved": "boolean",
|
|
947
|
+
"references": {}
|
|
948
|
+
},
|
|
949
|
+
"required": false,
|
|
950
|
+
"optional": false,
|
|
951
|
+
"docs": {
|
|
952
|
+
"tags": [],
|
|
953
|
+
"text": "If true, the multiselect is required."
|
|
954
|
+
},
|
|
955
|
+
"getter": false,
|
|
956
|
+
"setter": false,
|
|
957
|
+
"reflect": false,
|
|
958
|
+
"attribute": "required",
|
|
959
|
+
"defaultValue": "false"
|
|
960
|
+
},
|
|
961
|
+
"loading": {
|
|
962
|
+
"type": "boolean",
|
|
963
|
+
"mutable": true,
|
|
964
|
+
"complexType": {
|
|
965
|
+
"original": "boolean",
|
|
966
|
+
"resolved": "boolean",
|
|
967
|
+
"references": {}
|
|
968
|
+
},
|
|
969
|
+
"required": false,
|
|
970
|
+
"optional": false,
|
|
971
|
+
"docs": {
|
|
972
|
+
"tags": [],
|
|
973
|
+
"text": "Whether the component is currently loading async options."
|
|
974
|
+
},
|
|
975
|
+
"getter": false,
|
|
976
|
+
"setter": false,
|
|
977
|
+
"reflect": false,
|
|
978
|
+
"attribute": "loading",
|
|
979
|
+
"defaultValue": "false"
|
|
980
|
+
},
|
|
981
|
+
"options": {
|
|
982
|
+
"type": "unknown",
|
|
983
|
+
"mutable": false,
|
|
984
|
+
"complexType": {
|
|
985
|
+
"original": "MultiselectOption[]",
|
|
986
|
+
"resolved": "MultiselectOption[]",
|
|
987
|
+
"references": {
|
|
988
|
+
"MultiselectOption": {
|
|
989
|
+
"location": "import",
|
|
990
|
+
"path": "./multiselect-interface",
|
|
991
|
+
"id": "src/components/pds-multiselect/multiselect-interface.ts::MultiselectOption"
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"required": false,
|
|
996
|
+
"optional": true,
|
|
997
|
+
"docs": {
|
|
998
|
+
"tags": [],
|
|
999
|
+
"text": "Options provided externally (for consumer-managed async)."
|
|
1000
|
+
},
|
|
1001
|
+
"getter": false,
|
|
1002
|
+
"setter": false
|
|
1003
|
+
},
|
|
1004
|
+
"formatResult": {
|
|
1005
|
+
"type": "unknown",
|
|
1006
|
+
"mutable": false,
|
|
1007
|
+
"complexType": {
|
|
1008
|
+
"original": "(item: unknown) => MultiselectOption",
|
|
1009
|
+
"resolved": "(item: unknown) => MultiselectOption",
|
|
1010
|
+
"references": {
|
|
1011
|
+
"MultiselectOption": {
|
|
1012
|
+
"location": "import",
|
|
1013
|
+
"path": "./multiselect-interface",
|
|
1014
|
+
"id": "src/components/pds-multiselect/multiselect-interface.ts::MultiselectOption"
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
"required": false,
|
|
1019
|
+
"optional": true,
|
|
1020
|
+
"docs": {
|
|
1021
|
+
"tags": [],
|
|
1022
|
+
"text": "Function to format async results. Receives raw API response item."
|
|
1023
|
+
},
|
|
1024
|
+
"getter": false,
|
|
1025
|
+
"setter": false
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
static get states() {
|
|
1030
|
+
return {
|
|
1031
|
+
"isOpen": {},
|
|
1032
|
+
"searchQuery": {},
|
|
1033
|
+
"highlightedIndex": {},
|
|
1034
|
+
"internalOptions": {},
|
|
1035
|
+
"selectedItems": {},
|
|
1036
|
+
"currentPage": {},
|
|
1037
|
+
"hasMore": {}
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
static get events() {
|
|
1041
|
+
return [{
|
|
1042
|
+
"method": "pdsMultiselectChange",
|
|
1043
|
+
"name": "pdsMultiselectChange",
|
|
1044
|
+
"bubbles": true,
|
|
1045
|
+
"cancelable": true,
|
|
1046
|
+
"composed": true,
|
|
1047
|
+
"docs": {
|
|
1048
|
+
"tags": [],
|
|
1049
|
+
"text": "Emitted when selection changes."
|
|
1050
|
+
},
|
|
1051
|
+
"complexType": {
|
|
1052
|
+
"original": "MultiselectChangeEventDetail",
|
|
1053
|
+
"resolved": "MultiselectChangeEventDetail",
|
|
1054
|
+
"references": {
|
|
1055
|
+
"MultiselectChangeEventDetail": {
|
|
1056
|
+
"location": "import",
|
|
1057
|
+
"path": "./multiselect-interface",
|
|
1058
|
+
"id": "src/components/pds-multiselect/multiselect-interface.ts::MultiselectChangeEventDetail"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}, {
|
|
1063
|
+
"method": "pdsMultiselectSearch",
|
|
1064
|
+
"name": "pdsMultiselectSearch",
|
|
1065
|
+
"bubbles": true,
|
|
1066
|
+
"cancelable": true,
|
|
1067
|
+
"composed": true,
|
|
1068
|
+
"docs": {
|
|
1069
|
+
"tags": [],
|
|
1070
|
+
"text": "Emitted on search input (for consumer-managed async)."
|
|
1071
|
+
},
|
|
1072
|
+
"complexType": {
|
|
1073
|
+
"original": "MultiselectSearchEventDetail",
|
|
1074
|
+
"resolved": "MultiselectSearchEventDetail",
|
|
1075
|
+
"references": {
|
|
1076
|
+
"MultiselectSearchEventDetail": {
|
|
1077
|
+
"location": "import",
|
|
1078
|
+
"path": "./multiselect-interface",
|
|
1079
|
+
"id": "src/components/pds-multiselect/multiselect-interface.ts::MultiselectSearchEventDetail"
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}, {
|
|
1084
|
+
"method": "pdsMultiselectLoadOptions",
|
|
1085
|
+
"name": "pdsMultiselectLoadOptions",
|
|
1086
|
+
"bubbles": true,
|
|
1087
|
+
"cancelable": true,
|
|
1088
|
+
"composed": true,
|
|
1089
|
+
"docs": {
|
|
1090
|
+
"tags": [],
|
|
1091
|
+
"text": "Emitted to request more options (pagination)."
|
|
1092
|
+
},
|
|
1093
|
+
"complexType": {
|
|
1094
|
+
"original": "MultiselectLoadOptionsEventDetail",
|
|
1095
|
+
"resolved": "MultiselectLoadOptionsEventDetail",
|
|
1096
|
+
"references": {
|
|
1097
|
+
"MultiselectLoadOptionsEventDetail": {
|
|
1098
|
+
"location": "import",
|
|
1099
|
+
"path": "./multiselect-interface",
|
|
1100
|
+
"id": "src/components/pds-multiselect/multiselect-interface.ts::MultiselectLoadOptionsEventDetail"
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}];
|
|
1105
|
+
}
|
|
1106
|
+
static get methods() {
|
|
1107
|
+
return {
|
|
1108
|
+
"setFocus": {
|
|
1109
|
+
"complexType": {
|
|
1110
|
+
"signature": "() => Promise<void>",
|
|
1111
|
+
"parameters": [],
|
|
1112
|
+
"references": {
|
|
1113
|
+
"Promise": {
|
|
1114
|
+
"location": "global",
|
|
1115
|
+
"id": "global::Promise"
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
"return": "Promise<void>"
|
|
1119
|
+
},
|
|
1120
|
+
"docs": {
|
|
1121
|
+
"text": "Sets focus on the trigger button.",
|
|
1122
|
+
"tags": []
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
static get elementRef() { return "el"; }
|
|
1128
|
+
static get watchers() {
|
|
1129
|
+
return [{
|
|
1130
|
+
"propName": "debounce",
|
|
1131
|
+
"methodName": "setupDebounce"
|
|
1132
|
+
}, {
|
|
1133
|
+
"propName": "value",
|
|
1134
|
+
"methodName": "valueChanged"
|
|
1135
|
+
}, {
|
|
1136
|
+
"propName": "options",
|
|
1137
|
+
"methodName": "optionsChanged"
|
|
1138
|
+
}, {
|
|
1139
|
+
"propName": "internalOptions",
|
|
1140
|
+
"methodName": "internalOptionsChanged"
|
|
1141
|
+
}];
|
|
1142
|
+
}
|
|
1143
|
+
static get listeners() {
|
|
1144
|
+
return [{
|
|
1145
|
+
"name": "keydown",
|
|
1146
|
+
"method": "handleWindowKeyDown",
|
|
1147
|
+
"target": "window",
|
|
1148
|
+
"capture": false,
|
|
1149
|
+
"passive": false
|
|
1150
|
+
}];
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
//# sourceMappingURL=pds-multiselect.js.map
|