@gov-design-system-ce/components 4.0.6 → 4.0.8-rc01
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/array.utils-5a024b3a.js +46 -0
- package/dist/cjs/array.utils-5a024b3a.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-74063d50.js → form-47b5ef29.js} +2 -2
- package/dist/cjs/form-47b5ef29.js.map +1 -0
- package/dist/cjs/gov-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gov-attachments_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js +26 -3
- package/dist/cjs/gov-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +7 -4
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-card.cjs.entry.js +1 -1
- package/dist/cjs/gov-chip.cjs.entry.js +2 -2
- package/dist/cjs/gov-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-container.cjs.entry.js +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/gov-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gov-empty.cjs.entry.js +1 -1
- package/dist/cjs/gov-error-code.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-control.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-file.cjs.entry.js +17 -5
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-group.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +6 -2
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +83 -102
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +15 -19
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +2 -2
- package/dist/cjs/gov-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-grid.cjs.entry.js +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +2 -2
- package/dist/cjs/gov-infobar.cjs.entry.js +3 -2
- package/dist/cjs/gov-infobar.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-layout-column.cjs.entry.js +1 -1
- package/dist/cjs/gov-layout.cjs.entry.js +1 -1
- package/dist/cjs/gov-loading.cjs.entry.js +1 -1
- package/dist/cjs/gov-message.cjs.entry.js +1 -1
- package/dist/cjs/gov-modal.cjs.entry.js +5 -2
- package/dist/cjs/gov-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +9 -11
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-prompt.cjs.entry.js +5 -2
- package/dist/cjs/gov-prompt.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-side-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-side-nav.cjs.entry.js +1 -1
- package/dist/cjs/gov-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/gov-spacer.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-statsbar.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-stepper.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gov-tag.cjs.entry.js +2 -2
- package/dist/cjs/gov-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tile.cjs.entry.js +3 -3
- package/dist/cjs/gov-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tiles.cjs.entry.js +1 -1
- package/dist/cjs/gov-toast.cjs.entry.js +1 -1
- package/dist/cjs/gov-tooltip-content.cjs.entry.js +2 -2
- package/dist/cjs/gov-tooltip-content.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tooltip.cjs.entry.js +8 -9
- package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +1 -1
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.utils-22814956.js +11 -0
- package/dist/cjs/stencil.utils-22814956.js.map +1 -0
- package/dist/cjs/{template-4b951d1d.js → template-9534c584.js} +5 -1
- package/dist/cjs/template-9534c584.js.map +1 -0
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +58 -16
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js +48 -1
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.js.map +1 -1
- package/dist/collection/components/gov-button/button/gov-button.css +1 -1
- package/dist/collection/components/gov-button/button/gov-button.js +13 -16
- package/dist/collection/components/gov-button/button/gov-button.js.map +1 -1
- package/dist/collection/components/gov-chip/gov-chip.css +2 -6
- package/dist/collection/components/gov-form/file/gov-form-file.js +51 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +18 -0
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js +134 -253
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.js.map +1 -1
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.types.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.css +1 -1
- package/dist/collection/components/gov-form/select/constants.js +1 -1
- package/dist/collection/components/gov-form/select/constants.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +40 -64
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.types.js.map +1 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js +25 -1
- package/dist/collection/components/gov-infobar/gov-infobar.js.map +1 -1
- package/dist/collection/components/gov-modal/gov-modal.js +6 -3
- package/dist/collection/components/gov-modal/gov-modal.js.map +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js +80 -5
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.js +4 -1
- package/dist/collection/components/gov-promp/gov-prompt.js.map +1 -1
- package/dist/collection/components/gov-tag/gov-tag.css +5 -100
- package/dist/collection/components/gov-tile/gov-tile.css +3 -5
- package/dist/collection/components/gov-tile/gov-tile.js +1 -1
- package/dist/collection/components/gov-tile/gov-tile.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +2 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +7 -8
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/helpers/Dom/template.js +3 -0
- package/dist/collection/helpers/Dom/template.js.map +1 -1
- package/dist/collection/pages/Breadcrumbs.js +3 -2
- package/dist/collection/pages/Breadcrumbs.js.map +1 -1
- package/dist/collection/pages/Button.js +101 -101
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/Chip.js +50 -50
- package/dist/collection/pages/Chip.js.map +1 -1
- package/dist/collection/pages/Forms.js +27 -17
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Tag.js +27 -27
- package/dist/collection/pages/Tag.js.map +1 -1
- package/dist/collection/pages/Tooltip.js +13 -16
- package/dist/collection/pages/Tooltip.js.map +1 -1
- package/dist/collection/utils/array.utils.js +14 -0
- package/dist/collection/utils/array.utils.js.map +1 -1
- package/dist/collection/utils/object.utils.js +18 -0
- package/dist/collection/utils/object.utils.js.map +1 -0
- package/dist/collection/utils/stencil.utils.js +6 -0
- package/dist/collection/utils/stencil.utils.js.map +1 -0
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-infobar.js.map +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-modal.js.map +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-prompt.js.map +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-side-nav.js +1 -1
- package/dist/components/gov-side-nav.js.map +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-skeleton.js.map +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-statsbar-item.js +1 -1
- package/dist/components/gov-statsbar.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-tag.js.map +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-tile.js.map +1 -1
- package/dist/components/gov-tiles.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip-content.js.map +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-tooltip.js.map +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/{p-b526e440.js → p-033f8bda.js} +2 -2
- package/dist/components/{p-ec6c2272.js → p-23990b41.js} +2 -2
- package/dist/components/{p-62074db5.js → p-26805569.js} +2 -2
- package/dist/components/p-2dee9951.js.map +1 -1
- package/dist/components/p-6c1d0f47.js +2 -0
- package/dist/components/p-6c1d0f47.js.map +1 -0
- package/dist/components/p-a6a15eb1.js +2 -0
- package/dist/components/p-a6a15eb1.js.map +1 -0
- package/dist/components/p-b48d3aae.js +2 -0
- package/dist/components/p-b48d3aae.js.map +1 -0
- package/dist/components/{p-990d2990.js → p-b5a06a0a.js} +2 -2
- package/dist/components/p-b5a06a0a.js.map +1 -0
- package/dist/components/{p-9795ad94.js → p-b9ee51d6.js} +2 -2
- package/dist/components/{p-28e59384.js → p-c353678b.js} +2 -2
- package/dist/components/p-c353678b.js.map +1 -0
- package/dist/components/p-c9baa62f.js +2 -0
- package/dist/components/p-c9baa62f.js.map +1 -0
- package/dist/components/{p-d29431c0.js → p-e2bee1ef.js} +2 -2
- package/dist/components/p-e2bee1ef.js.map +1 -0
- package/dist/components/{p-570803ab.js → p-f8b7ea69.js} +2 -2
- package/dist/components/p-f9f8e529.js +2 -0
- package/dist/components/{p-6f391c4a.js.map → p-f9f8e529.js.map} +1 -1
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-96d141a3.entry.js → p-0028fadc.entry.js} +2 -2
- package/dist/core/{p-2969eb69.entry.js → p-0ab12526.entry.js} +2 -2
- package/dist/core/{p-22abe742.entry.js → p-0c5c6dee.entry.js} +2 -2
- package/dist/core/{p-1116fec6.entry.js → p-127af1b4.entry.js} +2 -2
- package/dist/core/{p-fb51d693.entry.js → p-151f1b89.entry.js} +2 -2
- package/dist/core/{p-fd4b0f54.entry.js → p-191e9b0c.entry.js} +2 -2
- package/dist/core/p-1cbd2c7c.entry.js +2 -0
- package/dist/core/p-1cbd2c7c.entry.js.map +1 -0
- package/dist/core/{p-fc8a29e9.entry.js → p-2a13c39c.entry.js} +2 -2
- package/dist/core/{p-6dc942b8.entry.js → p-2d1f3d62.entry.js} +2 -2
- package/dist/core/p-2d1f3d62.entry.js.map +1 -0
- package/dist/core/p-30673e46.entry.js +2 -0
- package/dist/core/p-30673e46.entry.js.map +1 -0
- package/dist/core/{p-de3429ab.entry.js → p-3975851f.entry.js} +2 -2
- package/dist/core/{p-141d9af4.entry.js → p-4988c0bb.entry.js} +2 -2
- package/dist/core/p-4b4a270d.entry.js +2 -0
- package/dist/core/p-4b4a270d.entry.js.map +1 -0
- package/dist/core/{p-83e998d8.entry.js → p-529ce9a4.entry.js} +2 -2
- package/dist/core/{p-fc2a1e14.entry.js → p-53e0ad52.entry.js} +2 -2
- package/dist/core/{p-81593c86.entry.js → p-54fa7af5.entry.js} +2 -2
- package/dist/core/{p-41c18f64.entry.js → p-555eaa93.entry.js} +2 -2
- package/dist/core/{p-e24236b0.entry.js → p-55cb727e.entry.js} +2 -2
- package/dist/core/p-575d0c94.entry.js +2 -0
- package/dist/core/p-575d0c94.entry.js.map +1 -0
- package/dist/core/p-5bc604a3.js.map +1 -1
- package/dist/core/{p-28e59384.js → p-5de606f8.js} +2 -2
- package/dist/core/p-5de606f8.js.map +1 -0
- package/dist/core/{p-3c12c766.entry.js → p-60d681a6.entry.js} +2 -2
- package/dist/core/{p-b4a59c79.entry.js → p-64c5748e.entry.js} +2 -2
- package/dist/core/p-64c5748e.entry.js.map +1 -0
- package/dist/core/p-67096d72.entry.js +2 -0
- package/dist/core/p-67096d72.entry.js.map +1 -0
- package/dist/core/{p-b49293dc.entry.js → p-6bf8e7bf.entry.js} +2 -2
- package/dist/core/{p-89b3e4d4.entry.js → p-72c5997f.entry.js} +2 -2
- package/dist/core/p-7f158b6f.entry.js +2 -0
- package/dist/core/p-7f158b6f.entry.js.map +1 -0
- package/dist/core/p-831edc90.entry.js +2 -0
- package/dist/core/p-831edc90.entry.js.map +1 -0
- package/dist/core/{p-bb7f0a66.entry.js → p-8f121cad.entry.js} +2 -2
- package/dist/core/p-8fcc8483.js +2 -0
- package/dist/core/p-8fcc8483.js.map +1 -0
- package/dist/core/{p-01d928c5.entry.js → p-90c068ff.entry.js} +2 -2
- package/dist/core/{p-cf86a858.entry.js → p-927880d6.entry.js} +2 -2
- package/dist/core/p-927880d6.entry.js.map +1 -0
- package/dist/core/{p-b4ab0d15.entry.js → p-9469ecc2.entry.js} +2 -2
- package/dist/core/{p-f29b0193.entry.js → p-984b36f7.entry.js} +2 -2
- package/dist/core/p-9c04470d.entry.js +2 -0
- package/dist/core/p-9c04470d.entry.js.map +1 -0
- package/dist/core/{p-ccf73a1a.entry.js → p-a35484ed.entry.js} +2 -2
- package/dist/core/p-a49391e5.entry.js +2 -0
- package/dist/core/p-a49391e5.entry.js.map +1 -0
- package/dist/core/{p-b127c8a8.entry.js → p-aaf2510a.entry.js} +2 -2
- package/dist/core/p-aaf2510a.entry.js.map +1 -0
- package/dist/core/p-ab5a13ea.js +2 -0
- package/dist/core/p-ab5a13ea.js.map +1 -0
- package/dist/core/{p-b580666b.entry.js → p-adf276b0.entry.js} +2 -2
- package/dist/core/{p-b1184db4.entry.js → p-af9a14e3.entry.js} +2 -2
- package/dist/core/{p-e5c2f601.entry.js → p-b7e0b030.entry.js} +2 -2
- package/dist/core/{p-78942f76.entry.js → p-be8eec3f.entry.js} +2 -2
- package/dist/core/{p-9c6699d6.entry.js → p-c0e8802d.entry.js} +2 -2
- package/dist/core/p-c0e8802d.entry.js.map +1 -0
- package/dist/core/{p-f1227928.entry.js → p-c6a4ca41.entry.js} +2 -2
- package/dist/core/{p-67138ae9.entry.js → p-ce1486b8.entry.js} +2 -2
- package/dist/core/{p-ee4c58e3.entry.js → p-d2c370d6.entry.js} +2 -2
- package/dist/core/p-d513468a.entry.js +2 -0
- package/dist/core/p-d513468a.entry.js.map +1 -0
- package/dist/core/p-d784c44d.js +2 -0
- package/dist/core/p-d784c44d.js.map +1 -0
- package/dist/core/{p-ac5e5b2c.entry.js → p-dd4445ee.entry.js} +2 -2
- package/dist/core/{p-b7d23697.entry.js → p-dd8816aa.entry.js} +2 -2
- package/dist/core/p-dd8816aa.entry.js.map +1 -0
- package/dist/core/{p-92af05f2.entry.js → p-e4f11ddf.entry.js} +2 -2
- package/dist/core/{p-6675a0f0.entry.js → p-eaedc9e3.entry.js} +2 -2
- package/dist/core/{p-b5e1ee46.entry.js → p-ed580ac7.entry.js} +2 -2
- package/dist/core/p-ef387ab2.entry.js +2 -0
- package/dist/core/{p-f76f0a67.entry.js.map → p-ef387ab2.entry.js.map} +1 -1
- package/dist/core/{p-f636a1ca.entry.js → p-f2206bbb.entry.js} +2 -2
- package/dist/core/{p-497c90ea.entry.js → p-f4f969d0.entry.js} +2 -2
- package/dist/core/p-f4f969d0.entry.js.map +1 -0
- package/dist/core/{p-4a235ef5.entry.js → p-f59b858f.entry.js} +2 -2
- package/dist/core/{p-7757e4a1.entry.js → p-fc710edb.entry.js} +2 -2
- package/dist/esm/array.utils-b27436ea.js +43 -0
- package/dist/esm/array.utils-b27436ea.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-39dc6896.js → form-e3424b70.js} +2 -2
- package/dist/esm/form-e3424b70.js.map +1 -0
- package/dist/esm/gov-accordion-item.entry.js +1 -1
- package/dist/esm/gov-accordion.entry.js +1 -1
- package/dist/esm/gov-attachments_3.entry.js +1 -1
- package/dist/esm/gov-backdrop.entry.js +1 -1
- package/dist/esm/gov-breadcrumbs.entry.js +26 -3
- package/dist/esm/gov-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +7 -4
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-card.entry.js +1 -1
- package/dist/esm/gov-chip.entry.js +2 -2
- package/dist/esm/gov-chip.entry.js.map +1 -1
- package/dist/esm/gov-container.entry.js +1 -1
- package/dist/esm/gov-control-group.entry.js +1 -1
- package/dist/esm/gov-cookiebar.entry.js +1 -1
- package/dist/esm/gov-dropdown.entry.js +1 -1
- package/dist/esm/gov-empty.entry.js +1 -1
- package/dist/esm/gov-error-code.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +1 -1
- package/dist/esm/gov-form-checkbox.entry.js +2 -2
- package/dist/esm/gov-form-control.entry.js +2 -2
- package/dist/esm/gov-form-file.entry.js +17 -5
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-group.entry.js +1 -1
- package/dist/esm/gov-form-input.entry.js +6 -2
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +83 -102
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +2 -2
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +15 -19
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +2 -2
- package/dist/esm/gov-grid-item.entry.js +1 -1
- package/dist/esm/gov-grid.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +2 -2
- package/dist/esm/gov-infobar.entry.js +3 -2
- package/dist/esm/gov-infobar.entry.js.map +1 -1
- package/dist/esm/gov-layout-column.entry.js +1 -1
- package/dist/esm/gov-layout.entry.js +1 -1
- package/dist/esm/gov-loading.entry.js +1 -1
- package/dist/esm/gov-message.entry.js +1 -1
- package/dist/esm/gov-modal.entry.js +5 -2
- package/dist/esm/gov-modal.entry.js.map +1 -1
- package/dist/esm/gov-pagination.entry.js +9 -11
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-prompt.entry.js +5 -2
- package/dist/esm/gov-prompt.entry.js.map +1 -1
- package/dist/esm/gov-side-nav-item.entry.js +1 -1
- package/dist/esm/gov-side-nav.entry.js +1 -1
- package/dist/esm/gov-skeleton.entry.js +1 -1
- package/dist/esm/gov-spacer.entry.js +1 -1
- package/dist/esm/gov-statsbar-item.entry.js +1 -1
- package/dist/esm/gov-statsbar.entry.js +1 -1
- package/dist/esm/gov-stepper-item.entry.js +1 -1
- package/dist/esm/gov-stepper.entry.js +1 -1
- package/dist/esm/gov-tabs-item.entry.js +1 -1
- package/dist/esm/gov-tabs.entry.js +1 -1
- package/dist/esm/gov-tag.entry.js +2 -2
- package/dist/esm/gov-tag.entry.js.map +1 -1
- package/dist/esm/gov-tile.entry.js +3 -3
- package/dist/esm/gov-tile.entry.js.map +1 -1
- package/dist/esm/gov-tiles.entry.js +1 -1
- package/dist/esm/gov-toast.entry.js +1 -1
- package/dist/esm/gov-tooltip-content.entry.js +2 -2
- package/dist/esm/gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.entry.js +8 -9
- package/dist/esm/gov-tooltip.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +1 -1
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil.utils-7cb5b075.js +9 -0
- package/dist/esm/stencil.utils-7cb5b075.js.map +1 -0
- package/dist/esm/{template-df429738.js → template-a0067bb6.js} +5 -2
- package/dist/esm/template-a0067bb6.js.map +1 -0
- package/dist/hydrate/index.js +238 -167
- package/dist/stencil.config.js +23 -1
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/Users/iwory/iWork/asseco/mv/gov-design-system-ce/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
- package/dist/types/components/gov-breadcrumbs/gov-breadcrumbs.d.ts +9 -0
- package/dist/types/components/gov-button/button/gov-button.d.ts +5 -4
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +9 -0
- package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -0
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.d.ts +17 -29
- package/dist/types/components/gov-form/multiselect/gov-form-multi-select.types.d.ts +3 -2
- package/dist/types/components/gov-form/select/constants.d.ts +1 -1
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +6 -9
- package/dist/types/components/gov-form/select/gov-form-select.types.d.ts +1 -1
- package/dist/types/components/gov-infobar/gov-infobar.d.ts +4 -0
- package/dist/types/components/gov-modal/gov-modal.d.ts +1 -0
- package/dist/types/components/gov-pagination/gov-pagination.d.ts +17 -1
- package/dist/types/components/gov-promp/gov-prompt.d.ts +1 -0
- package/dist/types/components/gov-tile/gov-tile.d.ts +3 -3
- package/dist/types/components.d.ts +100 -40
- package/dist/types/helpers/Dom/template.d.ts +1 -0
- package/dist/types/utils/array.utils.d.ts +1 -0
- package/dist/types/utils/object.utils.d.ts +1 -0
- package/dist/types/utils/stencil.utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/form-74063d50.js.map +0 -1
- package/dist/cjs/template-4b951d1d.js.map +0 -1
- package/dist/components/p-28e59384.js.map +0 -1
- package/dist/components/p-43554d2d.js +0 -2
- package/dist/components/p-43554d2d.js.map +0 -1
- package/dist/components/p-53e02bee.js +0 -2
- package/dist/components/p-53e02bee.js.map +0 -1
- package/dist/components/p-6f391c4a.js +0 -2
- package/dist/components/p-990d2990.js.map +0 -1
- package/dist/components/p-a3d5a7e3.js +0 -2
- package/dist/components/p-a3d5a7e3.js.map +0 -1
- package/dist/components/p-d29431c0.js.map +0 -1
- package/dist/core/p-044f4c35.entry.js +0 -2
- package/dist/core/p-044f4c35.entry.js.map +0 -1
- package/dist/core/p-09966eaa.entry.js +0 -2
- package/dist/core/p-09966eaa.entry.js.map +0 -1
- package/dist/core/p-0e5fa8bf.js +0 -2
- package/dist/core/p-0e5fa8bf.js.map +0 -1
- package/dist/core/p-2712444e.entry.js +0 -2
- package/dist/core/p-2712444e.entry.js.map +0 -1
- package/dist/core/p-28e59384.js.map +0 -1
- package/dist/core/p-2f858bf5.entry.js +0 -2
- package/dist/core/p-2f858bf5.entry.js.map +0 -1
- package/dist/core/p-3b42950e.entry.js +0 -2
- package/dist/core/p-3b42950e.entry.js.map +0 -1
- package/dist/core/p-497c90ea.entry.js.map +0 -1
- package/dist/core/p-6dc942b8.entry.js.map +0 -1
- package/dist/core/p-73b7585b.entry.js +0 -2
- package/dist/core/p-73b7585b.entry.js.map +0 -1
- package/dist/core/p-9c6699d6.entry.js.map +0 -1
- package/dist/core/p-a63bb91e.entry.js +0 -2
- package/dist/core/p-a63bb91e.entry.js.map +0 -1
- package/dist/core/p-a6b6dc73.entry.js +0 -2
- package/dist/core/p-a6b6dc73.entry.js.map +0 -1
- package/dist/core/p-b127c8a8.entry.js.map +0 -1
- package/dist/core/p-b4a59c79.entry.js.map +0 -1
- package/dist/core/p-b7d23697.entry.js.map +0 -1
- package/dist/core/p-c574ecc8.entry.js +0 -2
- package/dist/core/p-c574ecc8.entry.js.map +0 -1
- package/dist/core/p-cf86a858.entry.js.map +0 -1
- package/dist/core/p-d69599bc.entry.js +0 -2
- package/dist/core/p-d69599bc.entry.js.map +0 -1
- package/dist/core/p-f76f0a67.entry.js +0 -2
- package/dist/esm/form-39dc6896.js.map +0 -1
- package/dist/esm/template-df429738.js.map +0 -1
- package/dist/globals.d.ts +0 -2
- package/dist/types/Users/leo/Projects/repos/asseco/design-system/gov-design-system-ce/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
- package/dist/types/types/typings.d.ts +0 -6
- /package/dist/components/{p-b526e440.js.map → p-033f8bda.js.map} +0 -0
- /package/dist/components/{p-ec6c2272.js.map → p-23990b41.js.map} +0 -0
- /package/dist/components/{p-62074db5.js.map → p-26805569.js.map} +0 -0
- /package/dist/components/{p-9795ad94.js.map → p-b9ee51d6.js.map} +0 -0
- /package/dist/components/{p-570803ab.js.map → p-f8b7ea69.js.map} +0 -0
- /package/dist/core/{p-96d141a3.entry.js.map → p-0028fadc.entry.js.map} +0 -0
- /package/dist/core/{p-2969eb69.entry.js.map → p-0ab12526.entry.js.map} +0 -0
- /package/dist/core/{p-22abe742.entry.js.map → p-0c5c6dee.entry.js.map} +0 -0
- /package/dist/core/{p-1116fec6.entry.js.map → p-127af1b4.entry.js.map} +0 -0
- /package/dist/core/{p-fb51d693.entry.js.map → p-151f1b89.entry.js.map} +0 -0
- /package/dist/core/{p-fd4b0f54.entry.js.map → p-191e9b0c.entry.js.map} +0 -0
- /package/dist/core/{p-fc8a29e9.entry.js.map → p-2a13c39c.entry.js.map} +0 -0
- /package/dist/core/{p-de3429ab.entry.js.map → p-3975851f.entry.js.map} +0 -0
- /package/dist/core/{p-141d9af4.entry.js.map → p-4988c0bb.entry.js.map} +0 -0
- /package/dist/core/{p-83e998d8.entry.js.map → p-529ce9a4.entry.js.map} +0 -0
- /package/dist/core/{p-fc2a1e14.entry.js.map → p-53e0ad52.entry.js.map} +0 -0
- /package/dist/core/{p-81593c86.entry.js.map → p-54fa7af5.entry.js.map} +0 -0
- /package/dist/core/{p-41c18f64.entry.js.map → p-555eaa93.entry.js.map} +0 -0
- /package/dist/core/{p-e24236b0.entry.js.map → p-55cb727e.entry.js.map} +0 -0
- /package/dist/core/{p-3c12c766.entry.js.map → p-60d681a6.entry.js.map} +0 -0
- /package/dist/core/{p-b49293dc.entry.js.map → p-6bf8e7bf.entry.js.map} +0 -0
- /package/dist/core/{p-89b3e4d4.entry.js.map → p-72c5997f.entry.js.map} +0 -0
- /package/dist/core/{p-bb7f0a66.entry.js.map → p-8f121cad.entry.js.map} +0 -0
- /package/dist/core/{p-01d928c5.entry.js.map → p-90c068ff.entry.js.map} +0 -0
- /package/dist/core/{p-b4ab0d15.entry.js.map → p-9469ecc2.entry.js.map} +0 -0
- /package/dist/core/{p-f29b0193.entry.js.map → p-984b36f7.entry.js.map} +0 -0
- /package/dist/core/{p-ccf73a1a.entry.js.map → p-a35484ed.entry.js.map} +0 -0
- /package/dist/core/{p-b580666b.entry.js.map → p-adf276b0.entry.js.map} +0 -0
- /package/dist/core/{p-b1184db4.entry.js.map → p-af9a14e3.entry.js.map} +0 -0
- /package/dist/core/{p-e5c2f601.entry.js.map → p-b7e0b030.entry.js.map} +0 -0
- /package/dist/core/{p-78942f76.entry.js.map → p-be8eec3f.entry.js.map} +0 -0
- /package/dist/core/{p-f1227928.entry.js.map → p-c6a4ca41.entry.js.map} +0 -0
- /package/dist/core/{p-67138ae9.entry.js.map → p-ce1486b8.entry.js.map} +0 -0
- /package/dist/core/{p-ee4c58e3.entry.js.map → p-d2c370d6.entry.js.map} +0 -0
- /package/dist/core/{p-ac5e5b2c.entry.js.map → p-dd4445ee.entry.js.map} +0 -0
- /package/dist/core/{p-92af05f2.entry.js.map → p-e4f11ddf.entry.js.map} +0 -0
- /package/dist/core/{p-6675a0f0.entry.js.map → p-eaedc9e3.entry.js.map} +0 -0
- /package/dist/core/{p-b5e1ee46.entry.js.map → p-ed580ac7.entry.js.map} +0 -0
- /package/dist/core/{p-f636a1ca.entry.js.map → p-f2206bbb.entry.js.map} +0 -0
- /package/dist/core/{p-4a235ef5.entry.js.map → p-f59b858f.entry.js.map} +0 -0
- /package/dist/core/{p-7757e4a1.entry.js.map → p-fc710edb.entry.js.map} +0 -0
|
@@ -7,9 +7,12 @@ import { validateWcagLabelFor, validateWcagRef } from "../../../helpers/Validate
|
|
|
7
7
|
import { createID, removeDiacritics } from "../../../utils/string.utils";
|
|
8
8
|
import { delay } from "../../../utils/utils";
|
|
9
9
|
import { FormMultiSelectClass, FormMultiselectSizes, FormMultiselectVariants } from "./constants";
|
|
10
|
-
import {
|
|
10
|
+
import { propsValueToArray } from "../../../utils/array.utils";
|
|
11
|
+
import { tick } from "../../../utils/stencil.utils";
|
|
11
12
|
export class GovFormMultiSelect {
|
|
12
13
|
constructor() {
|
|
14
|
+
this.value = undefined;
|
|
15
|
+
this.options = undefined;
|
|
13
16
|
this.identifier = undefined;
|
|
14
17
|
this.placeholder = undefined;
|
|
15
18
|
this.variant = undefined;
|
|
@@ -26,9 +29,9 @@ export class GovFormMultiSelect {
|
|
|
26
29
|
this.wcagLabelledBy = undefined;
|
|
27
30
|
this.wcagOwns = undefined;
|
|
28
31
|
this.focused = undefined;
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
+
this.valueState = undefined;
|
|
33
|
+
this.selectedOptionsState = [];
|
|
34
|
+
this.optionsState = [];
|
|
32
35
|
this.selectId = createID('GovSelect');
|
|
33
36
|
this.listId = createID('GovMultiList');
|
|
34
37
|
this.h = govHost(this.host);
|
|
@@ -40,6 +43,12 @@ export class GovFormMultiSelect {
|
|
|
40
43
|
validateSize(newValue) {
|
|
41
44
|
validateProp(FormMultiselectSizes, newValue, FormMultiSelectClass.root);
|
|
42
45
|
}
|
|
46
|
+
watchOptions(newValue) {
|
|
47
|
+
this.optionsState = propsValueToArray(newValue);
|
|
48
|
+
}
|
|
49
|
+
watchValue(newValue) {
|
|
50
|
+
this.selectedOptionsState = propsValueToArray(newValue);
|
|
51
|
+
}
|
|
43
52
|
watchDisabled() {
|
|
44
53
|
this.passControlAttrs();
|
|
45
54
|
}
|
|
@@ -52,65 +61,74 @@ export class GovFormMultiSelect {
|
|
|
52
61
|
this.validateVariant(this.variant);
|
|
53
62
|
this.validateSize(this.size);
|
|
54
63
|
this.watchDisabled();
|
|
64
|
+
this.passControlAttrs();
|
|
65
|
+
this.f.passAttrToLabel('required', String(this.required));
|
|
66
|
+
this.optionsState = propsValueToArray(this.options);
|
|
67
|
+
this.selectedOptionsState = propsValueToArray(this.value);
|
|
55
68
|
}
|
|
56
69
|
getAvailableOptions(ignoreFilter = false) {
|
|
57
|
-
if (Array.isArray(this.
|
|
70
|
+
if (Array.isArray(this.optionsState) && this.optionsState.length) {
|
|
58
71
|
if (ignoreFilter) {
|
|
59
|
-
return this.
|
|
72
|
+
return this.optionsState;
|
|
60
73
|
}
|
|
61
|
-
return this.
|
|
62
|
-
const
|
|
63
|
-
return (
|
|
64
|
-
});
|
|
74
|
+
return this.optionsState.filter((option) => {
|
|
75
|
+
const selectedIndex = this.selectedValueIndex(option.value);
|
|
76
|
+
return (selectedIndex !== -1 || (option === null || option === void 0 ? void 0 : option.disabled)) ? false : true;
|
|
77
|
+
}).map((option) => { var _a; return ({ name: (_a = option.name) !== null && _a !== void 0 ? _a : option.value, value: option.value }); });
|
|
65
78
|
}
|
|
66
79
|
return Array.from(this.selectRef.querySelectorAll('option'))
|
|
67
80
|
.filter((option) => {
|
|
68
81
|
if (ignoreFilter) {
|
|
69
82
|
return true;
|
|
70
83
|
}
|
|
71
|
-
|
|
84
|
+
const selectedIndex = this.selectedValueIndex(option.value);
|
|
85
|
+
return !(option.disabled || option.selected || selectedIndex > -1);
|
|
72
86
|
})
|
|
73
87
|
.map((option) => ({ name: option.textContent, value: option.value }));
|
|
74
88
|
}
|
|
75
89
|
initAutocomplete() {
|
|
76
|
-
|
|
77
|
-
this.autocompleteRef.addEventListener('gov-
|
|
78
|
-
this.autocompleteRef.addEventListener('gov-
|
|
79
|
-
this.autocompleteRef.addEventListener('gov-
|
|
80
|
-
this.autocompleteRef
|
|
81
|
-
|
|
90
|
+
var _a, _b, _c, _d, _e;
|
|
91
|
+
(_a = this.autocompleteRef) === null || _a === void 0 ? void 0 : _a.addEventListener('gov-select', this.onSelectHandler.bind(this));
|
|
92
|
+
(_b = this.autocompleteRef) === null || _b === void 0 ? void 0 : _b.addEventListener('gov-input', this.onInputHandler.bind(this));
|
|
93
|
+
(_c = this.autocompleteRef) === null || _c === void 0 ? void 0 : _c.addEventListener('gov-focus', this.onFocusHandler.bind(this));
|
|
94
|
+
(_d = this.autocompleteRef) === null || _d === void 0 ? void 0 : _d.addEventListener('gov-blur', this.onBlurHandler.bind(this));
|
|
95
|
+
(_e = this.autocompleteRef) === null || _e === void 0 ? void 0 : _e.setSearchCallback(searchString => {
|
|
82
96
|
return new Promise(resolve => {
|
|
83
97
|
const data = this.getAvailableOptions();
|
|
84
|
-
if (String(
|
|
98
|
+
if (String(searchString).length === 0) {
|
|
85
99
|
return resolve(data);
|
|
86
100
|
}
|
|
87
|
-
resolve(data.filter(({ name }) => {
|
|
101
|
+
resolve(data.filter(({ name, value }) => {
|
|
88
102
|
if (!name)
|
|
89
|
-
|
|
90
|
-
return removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(
|
|
103
|
+
name = value;
|
|
104
|
+
return removeDiacritics(name).toLowerCase().indexOf(removeDiacritics(searchString).toLowerCase()) > -1;
|
|
91
105
|
}));
|
|
92
106
|
});
|
|
93
|
-
})
|
|
94
|
-
.then();
|
|
107
|
+
}).finally();
|
|
95
108
|
}
|
|
96
|
-
|
|
97
|
-
return this.
|
|
109
|
+
selectedValueIndex(value) {
|
|
110
|
+
return this.selectedOptionsState.findIndex((selected) => selected === value);
|
|
98
111
|
}
|
|
99
112
|
getOptionElement(value) {
|
|
100
|
-
return this.selectRef.querySelector('option[value="' + value
|
|
113
|
+
return this.selectRef.querySelector('option[value="' + value + '"]');
|
|
114
|
+
}
|
|
115
|
+
getOption(value) {
|
|
116
|
+
var _a;
|
|
117
|
+
return (_a = this.getAvailableOptions(true).find((option) => option.value === value)) !== null && _a !== void 0 ? _a : null;
|
|
101
118
|
}
|
|
102
119
|
selectOption(newOption, notify = true) {
|
|
103
|
-
const index = this.
|
|
120
|
+
const index = this.selectedValueIndex(newOption);
|
|
104
121
|
if (index === -1) {
|
|
105
|
-
this.
|
|
122
|
+
this.selectedOptionsState = [...this.selectedOptionsState, newOption];
|
|
123
|
+
this.value = this.selectedOptionsState;
|
|
106
124
|
if (notify) {
|
|
107
125
|
this.govChange.emit({
|
|
108
126
|
component: FormMultiSelectClass.root,
|
|
109
|
-
value: this.
|
|
127
|
+
value: this.selectedOptionsState,
|
|
110
128
|
});
|
|
111
129
|
this.govSelect.emit({
|
|
112
130
|
component: FormMultiSelectClass.root,
|
|
113
|
-
value: this.
|
|
131
|
+
value: this.selectedOptionsState,
|
|
114
132
|
});
|
|
115
133
|
}
|
|
116
134
|
const option = this.getOptionElement(newOption);
|
|
@@ -120,18 +138,19 @@ export class GovFormMultiSelect {
|
|
|
120
138
|
}
|
|
121
139
|
}
|
|
122
140
|
removeOption(removeOption, notify = true) {
|
|
123
|
-
const index = this.
|
|
141
|
+
const index = this.selectedValueIndex(removeOption);
|
|
124
142
|
if (index !== -1) {
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
143
|
+
this.selectedOptionsState.splice(index, 1);
|
|
144
|
+
this.selectedOptionsState = [...this.selectedOptionsState];
|
|
145
|
+
this.value = this.selectedOptionsState;
|
|
127
146
|
if (notify) {
|
|
128
147
|
this.govChange.emit({
|
|
129
148
|
component: FormMultiSelectClass.root,
|
|
130
|
-
value: this.
|
|
149
|
+
value: this.selectedOptionsState,
|
|
131
150
|
});
|
|
132
151
|
this.govRemove.emit({
|
|
133
152
|
component: FormMultiSelectClass.root,
|
|
134
|
-
value: this.
|
|
153
|
+
value: this.selectedOptionsState,
|
|
135
154
|
});
|
|
136
155
|
}
|
|
137
156
|
const option = this.getOptionElement(removeOption);
|
|
@@ -142,13 +161,14 @@ export class GovFormMultiSelect {
|
|
|
142
161
|
}
|
|
143
162
|
async componentDidLoad() {
|
|
144
163
|
this.initAutocomplete();
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
164
|
+
}
|
|
165
|
+
async componentDidRender() {
|
|
166
|
+
tick(() => {
|
|
167
|
+
this.selectRef.querySelectorAll('option').forEach((option) => {
|
|
168
|
+
if (option.selected) {
|
|
169
|
+
this.selectOption(option.value, false);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
152
172
|
});
|
|
153
173
|
if (canValidateWcagOnRender()) {
|
|
154
174
|
await delay(500);
|
|
@@ -156,10 +176,16 @@ export class GovFormMultiSelect {
|
|
|
156
176
|
}
|
|
157
177
|
}
|
|
158
178
|
render() {
|
|
159
|
-
return (h(Host, { class: FormMultiSelectClass.root, size: this.size, variant: this.variant }, h("div", { class: FormMultiSelectClass.wrap }, h("div", { class: "element" }, h("gov-form-autocomplete", { value: this.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return (h("
|
|
179
|
+
return (h(Host, { class: FormMultiSelectClass.root, size: this.size, variant: this.variant }, h("div", { class: FormMultiSelectClass.wrap }, h("div", { class: "element" }, h("gov-form-autocomplete", { value: this.valueState, disabled: this.disabled, identifier: this.identifier || this.selectId, required: false, size: this.size, variant: this.variant, placeholder: this.placeholder, "message-empty": this.messageEmpty, "message-loading": this.messageLoading, ref: el => (this.autocompleteRef = el), minlength: 0, wcagDescribedBy: this.wcagDescribedBy, wcagLabelledBy: this.wcagLabelledBy, wcagOwns: this.listId }), h("gov-icon", { slot: "right-icon", class: "icon-arrow", name: "chevron-down" }), this.h.hasSlot('right-icon') && !(this.success || this.invalid) && h("slot", { name: "right-icon" }), this.success && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && h("gov-icon", { slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h("select", { hidden: true, class: 'hidden-select-list', "aria-hidden": toBoolAttr(true), multiple: true, required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns }, h("slot", null), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
|
|
180
|
+
var _a;
|
|
181
|
+
const selectedOption = this.selectedValueIndex(option.value);
|
|
182
|
+
return (h("option", { value: option.value, selected: selectedOption > -1, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.name) !== null && _a !== void 0 ? _a : option.value));
|
|
183
|
+
})))), this.hideSelectedList === false ? (h("ul", { role: "listbox", id: this.listId, class: FormMultiSelectClass.list }, Array.isArray(this.selectedOptionsState) && this.selectedOptionsState.map(selected => {
|
|
184
|
+
var _a, _b;
|
|
185
|
+
const option = this.getOption(selected);
|
|
186
|
+
if (!option)
|
|
187
|
+
return null;
|
|
188
|
+
return (h("li", { class: FormMultiSelectClass.item, role: "option" }, (_a = option.name) !== null && _a !== void 0 ? _a : option.value, h("gov-button", { wcagLabel: (_b = 'Odebrat vybranou položku ' + option.name) !== null && _b !== void 0 ? _b : option.value, variant: "primary", type: "base", size: "s", "on-gov-click": () => this.onTagRemove(selected) }, h("gov-icon", { name: "x-lg" }))));
|
|
163
189
|
}))) : null));
|
|
164
190
|
}
|
|
165
191
|
onFocusHandler(e) {
|
|
@@ -168,7 +194,7 @@ export class GovFormMultiSelect {
|
|
|
168
194
|
this.govFocus.emit({
|
|
169
195
|
component: FormMultiSelectClass.root,
|
|
170
196
|
originalEvent: e,
|
|
171
|
-
value: this.
|
|
197
|
+
value: this.selectedOptionsState,
|
|
172
198
|
});
|
|
173
199
|
}
|
|
174
200
|
onBlurHandler(e) {
|
|
@@ -178,19 +204,19 @@ export class GovFormMultiSelect {
|
|
|
178
204
|
this.govBlur.emit({
|
|
179
205
|
component: FormMultiSelectClass.root,
|
|
180
206
|
originalEvent: e,
|
|
181
|
-
value: this.
|
|
207
|
+
value: this.selectedOptionsState,
|
|
182
208
|
});
|
|
183
209
|
}
|
|
184
210
|
onInputHandler(e) {
|
|
185
|
-
this.
|
|
211
|
+
this.valueState = e.detail.value;
|
|
186
212
|
e.stopPropagation();
|
|
187
213
|
}
|
|
188
214
|
onSelectHandler(e) {
|
|
189
215
|
e.stopPropagation();
|
|
190
216
|
const value = e.detail.selected;
|
|
191
|
-
this.selectOption(value);
|
|
192
|
-
this.
|
|
193
|
-
this.autocompleteRef.clearValue();
|
|
217
|
+
this.selectOption(value.value);
|
|
218
|
+
this.valueState = '';
|
|
219
|
+
this.autocompleteRef.clearValue().finally();
|
|
194
220
|
this.autocompleteRef.focus();
|
|
195
221
|
}
|
|
196
222
|
onTagRemove(removeOption) {
|
|
@@ -206,7 +232,7 @@ export class GovFormMultiSelect {
|
|
|
206
232
|
* Sets the ordered value of the element
|
|
207
233
|
*/
|
|
208
234
|
async setValue(value) {
|
|
209
|
-
this.
|
|
235
|
+
this.valueState = value;
|
|
210
236
|
}
|
|
211
237
|
/**
|
|
212
238
|
* Returns an instance of the native html select element
|
|
@@ -214,50 +240,6 @@ export class GovFormMultiSelect {
|
|
|
214
240
|
async getRef() {
|
|
215
241
|
return this.selectRef;
|
|
216
242
|
}
|
|
217
|
-
/**
|
|
218
|
-
* Returns a list of selected items
|
|
219
|
-
*/
|
|
220
|
-
async getSelectedOptions() {
|
|
221
|
-
return this.selectedOptions;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Setting a list of options to choose from
|
|
225
|
-
*/
|
|
226
|
-
async setOptions(options) {
|
|
227
|
-
if (Array.isArray(options)) {
|
|
228
|
-
this.options = [...options];
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Returns all available options
|
|
233
|
-
*/
|
|
234
|
-
async getOptions(ignoreFilter = true) {
|
|
235
|
-
return this.getAvailableOptions(ignoreFilter);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Setting the list of selected options
|
|
239
|
-
*/
|
|
240
|
-
async setSelectedOptions(options) {
|
|
241
|
-
if (Array.isArray(options)) {
|
|
242
|
-
this.selectedOptions = [...options];
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* To remove an option from the selected list
|
|
247
|
-
*/
|
|
248
|
-
async removeSelectedOption(option, notify = false) {
|
|
249
|
-
if (typeof option === 'object' && hasOwnProperty(option, 'name') && hasOwnProperty(option, 'value')) {
|
|
250
|
-
this.removeOption(option, notify);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Returns an instance of the native html select element
|
|
255
|
-
*/
|
|
256
|
-
async setSelectedOption(option, notify = false) {
|
|
257
|
-
if (typeof option === 'object' && hasOwnProperty(option, 'name') && hasOwnProperty(option, 'value')) {
|
|
258
|
-
this.selectOption(option, notify);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
243
|
/**
|
|
262
244
|
* Validate the WCAG attributes of the component
|
|
263
245
|
*/
|
|
@@ -280,6 +262,52 @@ export class GovFormMultiSelect {
|
|
|
280
262
|
}
|
|
281
263
|
static get properties() {
|
|
282
264
|
return {
|
|
265
|
+
"value": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"mutable": true,
|
|
268
|
+
"complexType": {
|
|
269
|
+
"original": "string | GovFormMultiSelectSelectedItem[]",
|
|
270
|
+
"resolved": "GovFormMultiSelectSelectedItem[] | string",
|
|
271
|
+
"references": {
|
|
272
|
+
"GovFormMultiSelectSelectedItem": {
|
|
273
|
+
"location": "import",
|
|
274
|
+
"path": "./gov-form-multi-select.types",
|
|
275
|
+
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectSelectedItem"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": false,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": "Value of multi-select"
|
|
284
|
+
},
|
|
285
|
+
"attribute": "value",
|
|
286
|
+
"reflect": true
|
|
287
|
+
},
|
|
288
|
+
"options": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"mutable": true,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "string | GovFormMultiSelectItem[]",
|
|
293
|
+
"resolved": "GovFormMultiSelectItem[] | string",
|
|
294
|
+
"references": {
|
|
295
|
+
"GovFormMultiSelectItem": {
|
|
296
|
+
"location": "import",
|
|
297
|
+
"path": "./gov-form-multi-select.types",
|
|
298
|
+
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Options of multi-select"
|
|
307
|
+
},
|
|
308
|
+
"attribute": "options",
|
|
309
|
+
"reflect": true
|
|
310
|
+
},
|
|
283
311
|
"identifier": {
|
|
284
312
|
"type": "string",
|
|
285
313
|
"mutable": false,
|
|
@@ -558,9 +586,9 @@ export class GovFormMultiSelect {
|
|
|
558
586
|
static get states() {
|
|
559
587
|
return {
|
|
560
588
|
"focused": {},
|
|
561
|
-
"
|
|
562
|
-
"
|
|
563
|
-
"
|
|
589
|
+
"valueState": {},
|
|
590
|
+
"selectedOptionsState": {},
|
|
591
|
+
"optionsState": {}
|
|
564
592
|
};
|
|
565
593
|
}
|
|
566
594
|
static get events() {
|
|
@@ -738,159 +766,6 @@ export class GovFormMultiSelect {
|
|
|
738
766
|
"tags": []
|
|
739
767
|
}
|
|
740
768
|
},
|
|
741
|
-
"getSelectedOptions": {
|
|
742
|
-
"complexType": {
|
|
743
|
-
"signature": "() => Promise<GovFormMultiSelectItem[]>",
|
|
744
|
-
"parameters": [],
|
|
745
|
-
"references": {
|
|
746
|
-
"Promise": {
|
|
747
|
-
"location": "global",
|
|
748
|
-
"id": "global::Promise"
|
|
749
|
-
},
|
|
750
|
-
"GovFormMultiSelectItem": {
|
|
751
|
-
"location": "import",
|
|
752
|
-
"path": "./gov-form-multi-select.types",
|
|
753
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
754
|
-
}
|
|
755
|
-
},
|
|
756
|
-
"return": "Promise<GovFormMultiSelectItem[]>"
|
|
757
|
-
},
|
|
758
|
-
"docs": {
|
|
759
|
-
"text": "Returns a list of selected items",
|
|
760
|
-
"tags": []
|
|
761
|
-
}
|
|
762
|
-
},
|
|
763
|
-
"setOptions": {
|
|
764
|
-
"complexType": {
|
|
765
|
-
"signature": "(options: GovFormMultiSelectItem[]) => Promise<void>",
|
|
766
|
-
"parameters": [{
|
|
767
|
-
"tags": [],
|
|
768
|
-
"text": ""
|
|
769
|
-
}],
|
|
770
|
-
"references": {
|
|
771
|
-
"Promise": {
|
|
772
|
-
"location": "global",
|
|
773
|
-
"id": "global::Promise"
|
|
774
|
-
},
|
|
775
|
-
"GovFormMultiSelectItem": {
|
|
776
|
-
"location": "import",
|
|
777
|
-
"path": "./gov-form-multi-select.types",
|
|
778
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
779
|
-
}
|
|
780
|
-
},
|
|
781
|
-
"return": "Promise<void>"
|
|
782
|
-
},
|
|
783
|
-
"docs": {
|
|
784
|
-
"text": "Setting a list of options to choose from",
|
|
785
|
-
"tags": []
|
|
786
|
-
}
|
|
787
|
-
},
|
|
788
|
-
"getOptions": {
|
|
789
|
-
"complexType": {
|
|
790
|
-
"signature": "(ignoreFilter?: boolean) => Promise<GovFormMultiSelectItem[]>",
|
|
791
|
-
"parameters": [{
|
|
792
|
-
"tags": [],
|
|
793
|
-
"text": ""
|
|
794
|
-
}],
|
|
795
|
-
"references": {
|
|
796
|
-
"Promise": {
|
|
797
|
-
"location": "global",
|
|
798
|
-
"id": "global::Promise"
|
|
799
|
-
},
|
|
800
|
-
"GovFormMultiSelectItem": {
|
|
801
|
-
"location": "import",
|
|
802
|
-
"path": "./gov-form-multi-select.types",
|
|
803
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
"return": "Promise<GovFormMultiSelectItem[]>"
|
|
807
|
-
},
|
|
808
|
-
"docs": {
|
|
809
|
-
"text": "Returns all available options",
|
|
810
|
-
"tags": []
|
|
811
|
-
}
|
|
812
|
-
},
|
|
813
|
-
"setSelectedOptions": {
|
|
814
|
-
"complexType": {
|
|
815
|
-
"signature": "(options: GovFormMultiSelectItem[]) => Promise<void>",
|
|
816
|
-
"parameters": [{
|
|
817
|
-
"tags": [],
|
|
818
|
-
"text": ""
|
|
819
|
-
}],
|
|
820
|
-
"references": {
|
|
821
|
-
"Promise": {
|
|
822
|
-
"location": "global",
|
|
823
|
-
"id": "global::Promise"
|
|
824
|
-
},
|
|
825
|
-
"GovFormMultiSelectItem": {
|
|
826
|
-
"location": "import",
|
|
827
|
-
"path": "./gov-form-multi-select.types",
|
|
828
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
"return": "Promise<void>"
|
|
832
|
-
},
|
|
833
|
-
"docs": {
|
|
834
|
-
"text": "Setting the list of selected options",
|
|
835
|
-
"tags": []
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
"removeSelectedOption": {
|
|
839
|
-
"complexType": {
|
|
840
|
-
"signature": "(option: GovFormMultiSelectItem, notify?: boolean) => Promise<void>",
|
|
841
|
-
"parameters": [{
|
|
842
|
-
"tags": [],
|
|
843
|
-
"text": ""
|
|
844
|
-
}, {
|
|
845
|
-
"tags": [],
|
|
846
|
-
"text": ""
|
|
847
|
-
}],
|
|
848
|
-
"references": {
|
|
849
|
-
"Promise": {
|
|
850
|
-
"location": "global",
|
|
851
|
-
"id": "global::Promise"
|
|
852
|
-
},
|
|
853
|
-
"GovFormMultiSelectItem": {
|
|
854
|
-
"location": "import",
|
|
855
|
-
"path": "./gov-form-multi-select.types",
|
|
856
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
857
|
-
}
|
|
858
|
-
},
|
|
859
|
-
"return": "Promise<void>"
|
|
860
|
-
},
|
|
861
|
-
"docs": {
|
|
862
|
-
"text": "To remove an option from the selected list",
|
|
863
|
-
"tags": []
|
|
864
|
-
}
|
|
865
|
-
},
|
|
866
|
-
"setSelectedOption": {
|
|
867
|
-
"complexType": {
|
|
868
|
-
"signature": "(option: GovFormMultiSelectItem, notify?: boolean) => Promise<void>",
|
|
869
|
-
"parameters": [{
|
|
870
|
-
"tags": [],
|
|
871
|
-
"text": ""
|
|
872
|
-
}, {
|
|
873
|
-
"tags": [],
|
|
874
|
-
"text": ""
|
|
875
|
-
}],
|
|
876
|
-
"references": {
|
|
877
|
-
"Promise": {
|
|
878
|
-
"location": "global",
|
|
879
|
-
"id": "global::Promise"
|
|
880
|
-
},
|
|
881
|
-
"GovFormMultiSelectItem": {
|
|
882
|
-
"location": "import",
|
|
883
|
-
"path": "./gov-form-multi-select.types",
|
|
884
|
-
"id": "../../../packages/core/src/components/gov-form/multiselect/gov-form-multi-select.types.ts::GovFormMultiSelectItem"
|
|
885
|
-
}
|
|
886
|
-
},
|
|
887
|
-
"return": "Promise<void>"
|
|
888
|
-
},
|
|
889
|
-
"docs": {
|
|
890
|
-
"text": "Returns an instance of the native html select element",
|
|
891
|
-
"tags": []
|
|
892
|
-
}
|
|
893
|
-
},
|
|
894
769
|
"validateWcag": {
|
|
895
770
|
"complexType": {
|
|
896
771
|
"signature": "() => Promise<void>",
|
|
@@ -918,6 +793,12 @@ export class GovFormMultiSelect {
|
|
|
918
793
|
}, {
|
|
919
794
|
"propName": "size",
|
|
920
795
|
"methodName": "validateSize"
|
|
796
|
+
}, {
|
|
797
|
+
"propName": "options",
|
|
798
|
+
"methodName": "watchOptions"
|
|
799
|
+
}, {
|
|
800
|
+
"propName": "value",
|
|
801
|
+
"methodName": "watchValue"
|
|
921
802
|
}, {
|
|
922
803
|
"propName": "disabled",
|
|
923
804
|
"methodName": "watchDisabled"
|