@oiz/stzh-components 2.6.0-beta → 2.7.0-alpha
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/{app-globals-b9f31c77.js → app-globals-5dfa53d1.js} +2 -2
- package/dist/cjs/{app-globals-b9f31c77.js.map → app-globals-5dfa53d1.js.map} +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-actions.cjs.entry.js +1 -5
- package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-actionset.cjs.entry.js +2 -2
- package/dist/cjs/stzh-actionset.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-amount.cjs.entry.js +50 -69
- package/dist/cjs/stzh-amount.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -2
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +60 -25
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
- package/dist/cjs/stzh-invert.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-monthyearpicker.cjs.entry.js +191 -0
- package/dist/cjs/stzh-monthyearpicker.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-timepicker.cjs.entry.js +82 -0
- package/dist/cjs/stzh-timepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +19 -7
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/translation-utils-73073e44.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +10 -7
- package/dist/collection/assets/i18n/en.json +8 -5
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/stzh-actions/stzh-actions.js +1 -5
- package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
- package/dist/collection/components/stzh-actionset/stzh-actionset.js +2 -2
- package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
- package/dist/collection/components/stzh-amount/stzh-amount.css +1 -0
- package/dist/collection/components/stzh-amount/stzh-amount.js +84 -85
- package/dist/collection/components/stzh-amount/stzh-amount.js.map +1 -1
- package/dist/collection/components/stzh-amount/stzh-amount.localization.js.map +1 -1
- package/dist/collection/components/stzh-amount/stzh-amount.stories.js +14 -0
- package/dist/collection/components/stzh-button/stzh-button.css +2 -2
- package/dist/collection/components/stzh-button/stzh-button.js +1 -1
- package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.js.map +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +2 -2
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.stories.js +3 -0
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +32 -20
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +40 -9
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +4 -4
- package/dist/collection/components/stzh-input/stzh-input.js +1 -1
- package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
- package/dist/collection/components/stzh-invert/stzh-invert.css +2 -2
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.css +123 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js +724 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.js.map +1 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js +2 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.js.map +1 -0
- package/dist/collection/components/stzh-monthyearpicker/stzh-monthyearpicker.stories.js +61 -0
- package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
- package/dist/collection/components/stzh-radio/stzh-radio.js.map +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +1 -1
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.css +109 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +438 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.js.map +1 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js +2 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.localization.js.map +1 -0
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.stories.js +45 -0
- package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
- package/dist/collection/components/stzh-toggle/stzh-toggle.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +53 -3
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/libraries/dropzone/dropzone-amd-module.js +11 -5
- package/dist/collection/libraries/dropzone/dropzone.js +11 -5
- package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
- package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
- package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +47 -18
- package/dist/collection/libraries/tom-select/cjs/tom-select.js +47 -18
- package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +47 -18
- package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +47 -18
- package/dist/collection/libraries/tom-select/esm/tom-select.js +47 -18
- package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +47 -18
- package/dist/collection/libraries/tom-select/js/tom-select.base.js +47 -18
- package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +16 -17
- package/dist/collection/libraries/tom-select/js/tom-select.complete.js +47 -18
- package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +12 -13
- package/dist/collection/libraries/tom-select/js/tom-select.popular.js +47 -18
- package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +21 -22
- package/dist/collection/utils/translation-utils.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-actions.js +1 -5
- package/dist/components/stzh-actions.js.map +1 -1
- package/dist/components/stzh-actionset2.js +2 -2
- package/dist/components/stzh-actionset2.js.map +1 -1
- package/dist/components/stzh-amount.js +69 -82
- package/dist/components/stzh-amount.js.map +1 -1
- package/dist/components/stzh-button2.js +2 -2
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-buttongroup.js +1 -31
- package/dist/components/stzh-buttongroup.js.map +1 -1
- package/dist/components/stzh-buttongroup2.js +35 -0
- package/dist/components/stzh-buttongroup2.js.map +1 -0
- package/dist/components/stzh-checkbox.js.map +1 -1
- package/dist/components/stzh-checkboxgroup.js.map +1 -1
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +61 -25
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-ghettobox2.js +1 -1
- package/dist/components/stzh-ghettobox2.js.map +1 -1
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-invert.js +1 -1
- package/dist/components/stzh-invert.js.map +1 -1
- package/dist/components/stzh-monthyearpicker.d.ts +11 -0
- package/dist/components/stzh-monthyearpicker.js +251 -0
- package/dist/components/stzh-monthyearpicker.js.map +1 -0
- package/dist/components/stzh-radio2.js.map +1 -1
- package/dist/components/stzh-radiogroup2.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-timepicker.d.ts +11 -0
- package/dist/components/stzh-timepicker.js +132 -0
- package/dist/components/stzh-timepicker.js.map +1 -0
- package/dist/components/stzh-toggle.js.map +1 -1
- package/dist/components/stzh-upload.js +22 -8
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/components/translation-utils.js.map +1 -1
- package/dist/esm/{app-globals-0c7feedc.js → app-globals-862dc6d0.js} +2 -2
- package/dist/esm/{app-globals-0c7feedc.js.map → app-globals-862dc6d0.js.map} +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-actions.entry.js +1 -5
- package/dist/esm/stzh-actions.entry.js.map +1 -1
- package/dist/esm/stzh-actionset.entry.js +2 -2
- package/dist/esm/stzh-actionset.entry.js.map +1 -1
- package/dist/esm/stzh-amount.entry.js +51 -70
- package/dist/esm/stzh-amount.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +2 -2
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-checkbox.entry.js.map +1 -1
- package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +60 -25
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/stzh-invert.entry.js +1 -1
- package/dist/esm/stzh-invert.entry.js.map +1 -1
- package/dist/esm/stzh-monthyearpicker.entry.js +187 -0
- package/dist/esm/stzh-monthyearpicker.entry.js.map +1 -0
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-timepicker.entry.js +78 -0
- package/dist/esm/stzh-timepicker.entry.js.map +1 -0
- package/dist/esm/stzh-toggle.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +19 -7
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/esm/translation-utils-2623783f.js.map +1 -1
- package/dist/esm-es5/{app-globals-0c7feedc.js → app-globals-862dc6d0.js} +2 -2
- package/dist/esm-es5/{app-globals-0c7feedc.js.map → app-globals-862dc6d0.js.map} +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-actions.entry.js +1 -1
- package/dist/esm-es5/stzh-actions.entry.js.map +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js.map +1 -1
- package/dist/esm-es5/stzh-amount.entry.js +1 -1
- package/dist/esm-es5/stzh-amount.entry.js.map +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/stzh-checkboxgroup.entry.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
- package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js.map +1 -1
- package/dist/esm-es5/stzh-input.entry.js.map +1 -1
- package/dist/esm-es5/stzh-invert.entry.js +1 -1
- package/dist/esm-es5/stzh-invert.entry.js.map +1 -1
- package/dist/esm-es5/stzh-monthyearpicker.entry.js +2 -0
- package/dist/esm-es5/stzh-monthyearpicker.entry.js.map +1 -0
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm-es5/stzh-timepicker.entry.js +2 -0
- package/dist/esm-es5/stzh-timepicker.entry.js.map +1 -0
- package/dist/esm-es5/stzh-toggle.entry.js.map +1 -1
- package/dist/esm-es5/stzh-upload.entry.js +1 -1
- package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
- package/dist/esm-es5/translation-utils-2623783f.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +10 -7
- package/dist/stzh-components/assets/i18n/en.json +8 -5
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-8228cd4c.system.entry.js → p-09191103.system.entry.js} +2 -2
- package/dist/stzh-components/{p-8228cd4c.system.entry.js.map → p-09191103.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-0f328a2d.system.entry.js +2 -0
- package/dist/stzh-components/{p-12964da2.system.entry.js.map → p-0f328a2d.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-14e782cb.entry.js +2 -0
- package/dist/stzh-components/{p-85504842.entry.js.map → p-14e782cb.entry.js.map} +1 -1
- package/dist/stzh-components/p-1678e09c.system.js +2 -0
- package/dist/stzh-components/{p-8ebb6058.system.js.map → p-1678e09c.system.js.map} +1 -1
- package/dist/stzh-components/p-25a09313.js.map +1 -1
- package/dist/stzh-components/p-2615433f.system.entry.js +2 -0
- package/dist/stzh-components/p-2615433f.system.entry.js.map +1 -0
- package/dist/stzh-components/p-2907f1b5.entry.js +2 -0
- package/dist/stzh-components/{p-72da8eba.entry.js.map → p-2907f1b5.entry.js.map} +1 -1
- package/dist/stzh-components/{p-728cc738.entry.js → p-2d25bcc8.entry.js} +2 -2
- package/dist/stzh-components/p-2d25bcc8.entry.js.map +1 -0
- package/dist/stzh-components/p-2f3add2f.system.entry.js +2 -0
- package/dist/stzh-components/{p-0fa1dc9b.system.entry.js.map → p-2f3add2f.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-39a4904e.system.entry.js.map +1 -1
- package/dist/stzh-components/p-3aa5623c.entry.js.map +1 -1
- package/dist/stzh-components/{p-37cfb2b2.system.js → p-3b4833a0.system.js} +2 -2
- package/dist/stzh-components/{p-37cfb2b2.system.js.map → p-3b4833a0.system.js.map} +1 -1
- package/dist/stzh-components/p-3cb43903.entry.js.map +1 -1
- package/dist/stzh-components/p-49a0420a.entry.js +2 -0
- package/dist/stzh-components/{p-8bbb27f2.entry.js.map → p-49a0420a.entry.js.map} +1 -1
- package/dist/stzh-components/p-51f1714c.system.entry.js +2 -0
- package/dist/stzh-components/p-51f1714c.system.entry.js.map +1 -0
- package/dist/stzh-components/p-5aa96b49.system.entry.js +2 -0
- package/dist/stzh-components/p-5aa96b49.system.entry.js.map +1 -0
- package/dist/stzh-components/p-5d8ad1f4.system.entry.js.map +1 -1
- package/dist/stzh-components/{p-6ee544b4.entry.js → p-62188444.entry.js} +2 -2
- package/dist/stzh-components/{p-6ee544b4.entry.js.map → p-62188444.entry.js.map} +1 -1
- package/dist/stzh-components/{p-e683abe3.system.entry.js → p-6d097e82.system.entry.js} +2 -2
- package/dist/stzh-components/p-6d097e82.system.entry.js.map +1 -0
- package/dist/stzh-components/p-82e886d4.entry.js.map +1 -1
- package/dist/stzh-components/{p-d69b11ec.system.entry.js → p-94a5e295.system.entry.js} +2 -2
- package/dist/stzh-components/p-94a5e295.system.entry.js.map +1 -0
- package/dist/stzh-components/p-9b7d4e8d.entry.js.map +1 -1
- package/dist/stzh-components/p-9d46101e.entry.js +2 -0
- package/dist/stzh-components/p-9d46101e.entry.js.map +1 -0
- package/dist/stzh-components/p-9f31cf7d.entry.js +2 -0
- package/dist/stzh-components/p-9f31cf7d.entry.js.map +1 -0
- package/dist/stzh-components/p-9fe69be8.system.entry.js +2 -0
- package/dist/stzh-components/{p-479a02fb.system.entry.js.map → p-9fe69be8.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-a408bfba.system.js.map +1 -1
- package/dist/stzh-components/p-ad33db31.entry.js +2 -0
- package/dist/stzh-components/p-ad33db31.entry.js.map +1 -0
- package/dist/stzh-components/p-b05c240b.system.entry.js.map +1 -1
- package/dist/stzh-components/p-b5cda655.entry.js +2 -0
- package/dist/stzh-components/p-b5cda655.entry.js.map +1 -0
- package/dist/stzh-components/p-b8ad5f47.system.entry.js.map +1 -1
- package/dist/stzh-components/{p-a226d634.js → p-bc82ed48.js} +2 -2
- package/dist/stzh-components/{p-a226d634.js.map → p-bc82ed48.js.map} +1 -1
- package/dist/stzh-components/{p-5e09547b.entry.js → p-bcd5b20e.entry.js} +2 -2
- package/dist/stzh-components/p-bcd5b20e.entry.js.map +1 -0
- package/dist/stzh-components/p-c0f971f2.entry.js +9 -0
- package/dist/stzh-components/p-c0f971f2.entry.js.map +1 -0
- package/dist/stzh-components/p-c901fe72.system.entry.js +9 -0
- package/dist/stzh-components/p-c901fe72.system.entry.js.map +1 -0
- package/dist/stzh-components/p-cc35e963.entry.js.map +1 -1
- package/dist/stzh-components/p-e8545386.system.entry.js +2 -0
- package/dist/stzh-components/p-e8545386.system.entry.js.map +1 -0
- package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
- package/dist/stzh-components/p-f2d74491.system.entry.js.map +1 -1
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components/stzh-amount/stzh-amount.localization.d.ts +0 -2
- package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.localization.d.ts +5 -0
- package/dist/types/components/stzh-timepicker/stzh-timepicker.localization.d.ts +2 -0
- package/dist/types/components.d.ts +454 -22
- package/dist/types/index.d.ts +19 -0
- package/dist/types/utils/translation-utils.d.ts +1 -0
- package/dist/vscode-data.json +282 -8
- package/package.json +1 -1
- package/dist/stzh-components/p-09a8bcde.system.entry.js +0 -9
- package/dist/stzh-components/p-09a8bcde.system.entry.js.map +0 -1
- package/dist/stzh-components/p-0fa1dc9b.system.entry.js +0 -2
- package/dist/stzh-components/p-12964da2.system.entry.js +0 -2
- package/dist/stzh-components/p-2ee0d173.system.entry.js +0 -2
- package/dist/stzh-components/p-2ee0d173.system.entry.js.map +0 -1
- package/dist/stzh-components/p-30e04d53.entry.js +0 -2
- package/dist/stzh-components/p-30e04d53.entry.js.map +0 -1
- package/dist/stzh-components/p-427461c5.system.entry.js +0 -2
- package/dist/stzh-components/p-427461c5.system.entry.js.map +0 -1
- package/dist/stzh-components/p-479a02fb.system.entry.js +0 -2
- package/dist/stzh-components/p-5e09547b.entry.js.map +0 -1
- package/dist/stzh-components/p-66c1942a.entry.js +0 -2
- package/dist/stzh-components/p-66c1942a.entry.js.map +0 -1
- package/dist/stzh-components/p-728cc738.entry.js.map +0 -1
- package/dist/stzh-components/p-72da8eba.entry.js +0 -2
- package/dist/stzh-components/p-85504842.entry.js +0 -2
- package/dist/stzh-components/p-8bbb27f2.entry.js +0 -2
- package/dist/stzh-components/p-8ebb6058.system.js +0 -2
- package/dist/stzh-components/p-c4503250.entry.js +0 -9
- package/dist/stzh-components/p-c4503250.entry.js.map +0 -1
- package/dist/stzh-components/p-d69b11ec.system.entry.js.map +0 -1
- package/dist/stzh-components/p-e683abe3.system.entry.js.map +0 -1
|
@@ -2128,17 +2128,24 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2128
2128
|
const query = "label[for='" + escapeQuery(self.inputId) + "']";
|
|
2129
2129
|
const label = document.querySelector(query);
|
|
2130
2130
|
const label_click = self.focus.bind(self);
|
|
2131
|
+
const labelled_by = input.getAttribute('aria-labelledby');
|
|
2131
2132
|
if (label) {
|
|
2132
2133
|
addEvent(label, 'click', label_click);
|
|
2133
2134
|
setAttr(label, {
|
|
2134
2135
|
for: control_id
|
|
2135
2136
|
});
|
|
2136
|
-
|
|
2137
|
+
|
|
2138
|
+
// const label_id = getId(label,self.inputId+'-ts-label');
|
|
2139
|
+
// setAttr(focus_node,{'aria-labelledby':label_id});
|
|
2140
|
+
// setAttr(dropdown_content,{'aria-labelledby':label_id});
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
if (labelled_by) {
|
|
2137
2144
|
setAttr(focus_node, {
|
|
2138
|
-
'aria-labelledby':
|
|
2145
|
+
'aria-labelledby': labelled_by
|
|
2139
2146
|
});
|
|
2140
2147
|
setAttr(dropdown_content, {
|
|
2141
|
-
'aria-labelledby':
|
|
2148
|
+
'aria-labelledby': labelled_by
|
|
2142
2149
|
});
|
|
2143
2150
|
}
|
|
2144
2151
|
wrapper.style.width = input.style.width;
|
|
@@ -2146,10 +2153,15 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2146
2153
|
const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
|
2147
2154
|
addClasses([wrapper, dropdown], classes_plugins);
|
|
2148
2155
|
}
|
|
2149
|
-
if (
|
|
2150
|
-
setAttr(
|
|
2151
|
-
|
|
2156
|
+
if (settings.mode === 'multi') {
|
|
2157
|
+
setAttr(dropdown_content, {
|
|
2158
|
+
'aria-multiselectable': 'true'
|
|
2152
2159
|
});
|
|
2160
|
+
if (self.is_select_tag) {
|
|
2161
|
+
setAttr(input, {
|
|
2162
|
+
multiple: 'multiple'
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2153
2165
|
}
|
|
2154
2166
|
if (settings.placeholder) {
|
|
2155
2167
|
setAttr(control_input, {
|
|
@@ -2805,7 +2817,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2805
2817
|
*
|
|
2806
2818
|
*/
|
|
2807
2819
|
getValue() {
|
|
2808
|
-
if (this.
|
|
2820
|
+
if (this.settings.mode === 'multi' && this.is_select_tag) {
|
|
2809
2821
|
return this.items;
|
|
2810
2822
|
}
|
|
2811
2823
|
return this.items.join(this.settings.delimiter);
|
|
@@ -2938,9 +2950,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2938
2950
|
setAttr(this.focus_node, {
|
|
2939
2951
|
'aria-activedescendant': option.getAttribute('id')
|
|
2940
2952
|
});
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2953
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2954
|
+
setAttr(option, {
|
|
2955
|
+
'aria-selected': 'true'
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2944
2958
|
addClasses(option, 'active');
|
|
2945
2959
|
if (scroll) this.scrollToOption(option);
|
|
2946
2960
|
}
|
|
@@ -2983,9 +2997,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2983
2997
|
clearActiveOption() {
|
|
2984
2998
|
if (this.activeOption) {
|
|
2985
2999
|
removeClasses(this.activeOption, 'active');
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3000
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
3001
|
+
setAttr(this.activeOption, {
|
|
3002
|
+
'aria-selected': null
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
2989
3005
|
}
|
|
2990
3006
|
this.activeOption = null;
|
|
2991
3007
|
setAttr(this.focus_node, {
|
|
@@ -3200,10 +3216,16 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3200
3216
|
if (option === undefined) continue;
|
|
3201
3217
|
let opt_hash = get_hash(opt_value);
|
|
3202
3218
|
let option_el = self.getOption(opt_hash, true);
|
|
3219
|
+
const option_selected = self.items.includes(opt_hash);
|
|
3203
3220
|
|
|
3204
3221
|
// toggle 'selected' class
|
|
3205
3222
|
if (!self.settings.hideSelected) {
|
|
3206
|
-
option_el.classList.toggle('selected',
|
|
3223
|
+
option_el.classList.toggle('selected', option_selected);
|
|
3224
|
+
if (this.settings.mode === 'multi') {
|
|
3225
|
+
setAttr(option_el, {
|
|
3226
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3227
|
+
});
|
|
3228
|
+
}
|
|
3207
3229
|
}
|
|
3208
3230
|
optgroup = option[self.settings.optgroupField] || '';
|
|
3209
3231
|
optgroups = Array.isArray(optgroup) ? optgroup : [optgroup];
|
|
@@ -3221,10 +3243,17 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3221
3243
|
// nodes can only have one parent, so if the option is in mutple groups, we need a clone
|
|
3222
3244
|
if (j > 0) {
|
|
3223
3245
|
option_el = option_el.cloneNode(true);
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3246
|
+
if (this.settings.mode === 'multi' && !self.settings.hideSelected) {
|
|
3247
|
+
setAttr(option_el, {
|
|
3248
|
+
id: option.$id + '-clone-' + j,
|
|
3249
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3250
|
+
});
|
|
3251
|
+
} else {
|
|
3252
|
+
setAttr(option_el, {
|
|
3253
|
+
id: option.$id + '-clone-' + j,
|
|
3254
|
+
'aria-selected': null
|
|
3255
|
+
});
|
|
3256
|
+
}
|
|
3228
3257
|
option_el.classList.add('ts-cloned');
|
|
3229
3258
|
removeClasses(option_el, 'active');
|
|
3230
3259
|
|
|
@@ -2128,17 +2128,24 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2128
2128
|
const query = "label[for='" + escapeQuery(self.inputId) + "']";
|
|
2129
2129
|
const label = document.querySelector(query);
|
|
2130
2130
|
const label_click = self.focus.bind(self);
|
|
2131
|
+
const labelled_by = input.getAttribute('aria-labelledby');
|
|
2131
2132
|
if (label) {
|
|
2132
2133
|
addEvent(label, 'click', label_click);
|
|
2133
2134
|
setAttr(label, {
|
|
2134
2135
|
for: control_id
|
|
2135
2136
|
});
|
|
2136
|
-
|
|
2137
|
+
|
|
2138
|
+
// const label_id = getId(label,self.inputId+'-ts-label');
|
|
2139
|
+
// setAttr(focus_node,{'aria-labelledby':label_id});
|
|
2140
|
+
// setAttr(dropdown_content,{'aria-labelledby':label_id});
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
if (labelled_by) {
|
|
2137
2144
|
setAttr(focus_node, {
|
|
2138
|
-
'aria-labelledby':
|
|
2145
|
+
'aria-labelledby': labelled_by
|
|
2139
2146
|
});
|
|
2140
2147
|
setAttr(dropdown_content, {
|
|
2141
|
-
'aria-labelledby':
|
|
2148
|
+
'aria-labelledby': labelled_by
|
|
2142
2149
|
});
|
|
2143
2150
|
}
|
|
2144
2151
|
wrapper.style.width = input.style.width;
|
|
@@ -2146,10 +2153,15 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2146
2153
|
const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
|
2147
2154
|
addClasses([wrapper, dropdown], classes_plugins);
|
|
2148
2155
|
}
|
|
2149
|
-
if (
|
|
2150
|
-
setAttr(
|
|
2151
|
-
|
|
2156
|
+
if (settings.mode === 'multi') {
|
|
2157
|
+
setAttr(dropdown_content, {
|
|
2158
|
+
'aria-multiselectable': 'true'
|
|
2152
2159
|
});
|
|
2160
|
+
if (self.is_select_tag) {
|
|
2161
|
+
setAttr(input, {
|
|
2162
|
+
multiple: 'multiple'
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2153
2165
|
}
|
|
2154
2166
|
if (settings.placeholder) {
|
|
2155
2167
|
setAttr(control_input, {
|
|
@@ -2805,7 +2817,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2805
2817
|
*
|
|
2806
2818
|
*/
|
|
2807
2819
|
getValue() {
|
|
2808
|
-
if (this.
|
|
2820
|
+
if (this.settings.mode === 'multi' && this.is_select_tag) {
|
|
2809
2821
|
return this.items;
|
|
2810
2822
|
}
|
|
2811
2823
|
return this.items.join(this.settings.delimiter);
|
|
@@ -2938,9 +2950,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2938
2950
|
setAttr(this.focus_node, {
|
|
2939
2951
|
'aria-activedescendant': option.getAttribute('id')
|
|
2940
2952
|
});
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2953
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2954
|
+
setAttr(option, {
|
|
2955
|
+
'aria-selected': 'true'
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2944
2958
|
addClasses(option, 'active');
|
|
2945
2959
|
if (scroll) this.scrollToOption(option);
|
|
2946
2960
|
}
|
|
@@ -2983,9 +2997,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2983
2997
|
clearActiveOption() {
|
|
2984
2998
|
if (this.activeOption) {
|
|
2985
2999
|
removeClasses(this.activeOption, 'active');
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3000
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
3001
|
+
setAttr(this.activeOption, {
|
|
3002
|
+
'aria-selected': null
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
2989
3005
|
}
|
|
2990
3006
|
this.activeOption = null;
|
|
2991
3007
|
setAttr(this.focus_node, {
|
|
@@ -3200,10 +3216,16 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3200
3216
|
if (option === undefined) continue;
|
|
3201
3217
|
let opt_hash = get_hash(opt_value);
|
|
3202
3218
|
let option_el = self.getOption(opt_hash, true);
|
|
3219
|
+
const option_selected = self.items.includes(opt_hash);
|
|
3203
3220
|
|
|
3204
3221
|
// toggle 'selected' class
|
|
3205
3222
|
if (!self.settings.hideSelected) {
|
|
3206
|
-
option_el.classList.toggle('selected',
|
|
3223
|
+
option_el.classList.toggle('selected', option_selected);
|
|
3224
|
+
if (this.settings.mode === 'multi') {
|
|
3225
|
+
setAttr(option_el, {
|
|
3226
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3227
|
+
});
|
|
3228
|
+
}
|
|
3207
3229
|
}
|
|
3208
3230
|
optgroup = option[self.settings.optgroupField] || '';
|
|
3209
3231
|
optgroups = Array.isArray(optgroup) ? optgroup : [optgroup];
|
|
@@ -3221,10 +3243,17 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3221
3243
|
// nodes can only have one parent, so if the option is in mutple groups, we need a clone
|
|
3222
3244
|
if (j > 0) {
|
|
3223
3245
|
option_el = option_el.cloneNode(true);
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3246
|
+
if (this.settings.mode === 'multi' && !self.settings.hideSelected) {
|
|
3247
|
+
setAttr(option_el, {
|
|
3248
|
+
id: option.$id + '-clone-' + j,
|
|
3249
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3250
|
+
});
|
|
3251
|
+
} else {
|
|
3252
|
+
setAttr(option_el, {
|
|
3253
|
+
id: option.$id + '-clone-' + j,
|
|
3254
|
+
'aria-selected': null
|
|
3255
|
+
});
|
|
3256
|
+
}
|
|
3228
3257
|
option_el.classList.add('ts-cloned');
|
|
3229
3258
|
removeClasses(option_el, 'active');
|
|
3230
3259
|
|
|
@@ -2128,17 +2128,24 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2128
2128
|
const query = "label[for='" + escapeQuery(self.inputId) + "']";
|
|
2129
2129
|
const label = document.querySelector(query);
|
|
2130
2130
|
const label_click = self.focus.bind(self);
|
|
2131
|
+
const labelled_by = input.getAttribute('aria-labelledby');
|
|
2131
2132
|
if (label) {
|
|
2132
2133
|
addEvent(label, 'click', label_click);
|
|
2133
2134
|
setAttr(label, {
|
|
2134
2135
|
for: control_id
|
|
2135
2136
|
});
|
|
2136
|
-
|
|
2137
|
+
|
|
2138
|
+
// const label_id = getId(label,self.inputId+'-ts-label');
|
|
2139
|
+
// setAttr(focus_node,{'aria-labelledby':label_id});
|
|
2140
|
+
// setAttr(dropdown_content,{'aria-labelledby':label_id});
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
if (labelled_by) {
|
|
2137
2144
|
setAttr(focus_node, {
|
|
2138
|
-
'aria-labelledby':
|
|
2145
|
+
'aria-labelledby': labelled_by
|
|
2139
2146
|
});
|
|
2140
2147
|
setAttr(dropdown_content, {
|
|
2141
|
-
'aria-labelledby':
|
|
2148
|
+
'aria-labelledby': labelled_by
|
|
2142
2149
|
});
|
|
2143
2150
|
}
|
|
2144
2151
|
wrapper.style.width = input.style.width;
|
|
@@ -2146,10 +2153,15 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2146
2153
|
const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
|
2147
2154
|
addClasses([wrapper, dropdown], classes_plugins);
|
|
2148
2155
|
}
|
|
2149
|
-
if (
|
|
2150
|
-
setAttr(
|
|
2151
|
-
|
|
2156
|
+
if (settings.mode === 'multi') {
|
|
2157
|
+
setAttr(dropdown_content, {
|
|
2158
|
+
'aria-multiselectable': 'true'
|
|
2152
2159
|
});
|
|
2160
|
+
if (self.is_select_tag) {
|
|
2161
|
+
setAttr(input, {
|
|
2162
|
+
multiple: 'multiple'
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2153
2165
|
}
|
|
2154
2166
|
if (settings.placeholder) {
|
|
2155
2167
|
setAttr(control_input, {
|
|
@@ -2805,7 +2817,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2805
2817
|
*
|
|
2806
2818
|
*/
|
|
2807
2819
|
getValue() {
|
|
2808
|
-
if (this.
|
|
2820
|
+
if (this.settings.mode === 'multi' && this.is_select_tag) {
|
|
2809
2821
|
return this.items;
|
|
2810
2822
|
}
|
|
2811
2823
|
return this.items.join(this.settings.delimiter);
|
|
@@ -2938,9 +2950,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2938
2950
|
setAttr(this.focus_node, {
|
|
2939
2951
|
'aria-activedescendant': option.getAttribute('id')
|
|
2940
2952
|
});
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2953
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2954
|
+
setAttr(option, {
|
|
2955
|
+
'aria-selected': 'true'
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2944
2958
|
addClasses(option, 'active');
|
|
2945
2959
|
if (scroll) this.scrollToOption(option);
|
|
2946
2960
|
}
|
|
@@ -2983,9 +2997,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2983
2997
|
clearActiveOption() {
|
|
2984
2998
|
if (this.activeOption) {
|
|
2985
2999
|
removeClasses(this.activeOption, 'active');
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3000
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
3001
|
+
setAttr(this.activeOption, {
|
|
3002
|
+
'aria-selected': null
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
2989
3005
|
}
|
|
2990
3006
|
this.activeOption = null;
|
|
2991
3007
|
setAttr(this.focus_node, {
|
|
@@ -3200,10 +3216,16 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3200
3216
|
if (option === undefined) continue;
|
|
3201
3217
|
let opt_hash = get_hash(opt_value);
|
|
3202
3218
|
let option_el = self.getOption(opt_hash, true);
|
|
3219
|
+
const option_selected = self.items.includes(opt_hash);
|
|
3203
3220
|
|
|
3204
3221
|
// toggle 'selected' class
|
|
3205
3222
|
if (!self.settings.hideSelected) {
|
|
3206
|
-
option_el.classList.toggle('selected',
|
|
3223
|
+
option_el.classList.toggle('selected', option_selected);
|
|
3224
|
+
if (this.settings.mode === 'multi') {
|
|
3225
|
+
setAttr(option_el, {
|
|
3226
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3227
|
+
});
|
|
3228
|
+
}
|
|
3207
3229
|
}
|
|
3208
3230
|
optgroup = option[self.settings.optgroupField] || '';
|
|
3209
3231
|
optgroups = Array.isArray(optgroup) ? optgroup : [optgroup];
|
|
@@ -3221,10 +3243,17 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3221
3243
|
// nodes can only have one parent, so if the option is in mutple groups, we need a clone
|
|
3222
3244
|
if (j > 0) {
|
|
3223
3245
|
option_el = option_el.cloneNode(true);
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3246
|
+
if (this.settings.mode === 'multi' && !self.settings.hideSelected) {
|
|
3247
|
+
setAttr(option_el, {
|
|
3248
|
+
id: option.$id + '-clone-' + j,
|
|
3249
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3250
|
+
});
|
|
3251
|
+
} else {
|
|
3252
|
+
setAttr(option_el, {
|
|
3253
|
+
id: option.$id + '-clone-' + j,
|
|
3254
|
+
'aria-selected': null
|
|
3255
|
+
});
|
|
3256
|
+
}
|
|
3228
3257
|
option_el.classList.add('ts-cloned');
|
|
3229
3258
|
removeClasses(option_el, 'active');
|
|
3230
3259
|
|
|
@@ -2126,17 +2126,24 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2126
2126
|
const query = "label[for='" + escapeQuery(self.inputId) + "']";
|
|
2127
2127
|
const label = document.querySelector(query);
|
|
2128
2128
|
const label_click = self.focus.bind(self);
|
|
2129
|
+
const labelled_by = input.getAttribute('aria-labelledby');
|
|
2129
2130
|
if (label) {
|
|
2130
2131
|
addEvent(label, 'click', label_click);
|
|
2131
2132
|
setAttr(label, {
|
|
2132
2133
|
for: control_id
|
|
2133
2134
|
});
|
|
2134
|
-
|
|
2135
|
+
|
|
2136
|
+
// const label_id = getId(label,self.inputId+'-ts-label');
|
|
2137
|
+
// setAttr(focus_node,{'aria-labelledby':label_id});
|
|
2138
|
+
// setAttr(dropdown_content,{'aria-labelledby':label_id});
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
if (labelled_by) {
|
|
2135
2142
|
setAttr(focus_node, {
|
|
2136
|
-
'aria-labelledby':
|
|
2143
|
+
'aria-labelledby': labelled_by
|
|
2137
2144
|
});
|
|
2138
2145
|
setAttr(dropdown_content, {
|
|
2139
|
-
'aria-labelledby':
|
|
2146
|
+
'aria-labelledby': labelled_by
|
|
2140
2147
|
});
|
|
2141
2148
|
}
|
|
2142
2149
|
wrapper.style.width = input.style.width;
|
|
@@ -2144,10 +2151,15 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2144
2151
|
const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
|
2145
2152
|
addClasses([wrapper, dropdown], classes_plugins);
|
|
2146
2153
|
}
|
|
2147
|
-
if (
|
|
2148
|
-
setAttr(
|
|
2149
|
-
|
|
2154
|
+
if (settings.mode === 'multi') {
|
|
2155
|
+
setAttr(dropdown_content, {
|
|
2156
|
+
'aria-multiselectable': 'true'
|
|
2150
2157
|
});
|
|
2158
|
+
if (self.is_select_tag) {
|
|
2159
|
+
setAttr(input, {
|
|
2160
|
+
multiple: 'multiple'
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2151
2163
|
}
|
|
2152
2164
|
if (settings.placeholder) {
|
|
2153
2165
|
setAttr(control_input, {
|
|
@@ -2803,7 +2815,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2803
2815
|
*
|
|
2804
2816
|
*/
|
|
2805
2817
|
getValue() {
|
|
2806
|
-
if (this.
|
|
2818
|
+
if (this.settings.mode === 'multi' && this.is_select_tag) {
|
|
2807
2819
|
return this.items;
|
|
2808
2820
|
}
|
|
2809
2821
|
return this.items.join(this.settings.delimiter);
|
|
@@ -2936,9 +2948,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2936
2948
|
setAttr(this.focus_node, {
|
|
2937
2949
|
'aria-activedescendant': option.getAttribute('id')
|
|
2938
2950
|
});
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2951
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2952
|
+
setAttr(option, {
|
|
2953
|
+
'aria-selected': 'true'
|
|
2954
|
+
});
|
|
2955
|
+
}
|
|
2942
2956
|
addClasses(option, 'active');
|
|
2943
2957
|
if (scroll) this.scrollToOption(option);
|
|
2944
2958
|
}
|
|
@@ -2981,9 +2995,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2981
2995
|
clearActiveOption() {
|
|
2982
2996
|
if (this.activeOption) {
|
|
2983
2997
|
removeClasses(this.activeOption, 'active');
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2998
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2999
|
+
setAttr(this.activeOption, {
|
|
3000
|
+
'aria-selected': null
|
|
3001
|
+
});
|
|
3002
|
+
}
|
|
2987
3003
|
}
|
|
2988
3004
|
this.activeOption = null;
|
|
2989
3005
|
setAttr(this.focus_node, {
|
|
@@ -3198,10 +3214,16 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3198
3214
|
if (option === undefined) continue;
|
|
3199
3215
|
let opt_hash = get_hash(opt_value);
|
|
3200
3216
|
let option_el = self.getOption(opt_hash, true);
|
|
3217
|
+
const option_selected = self.items.includes(opt_hash);
|
|
3201
3218
|
|
|
3202
3219
|
// toggle 'selected' class
|
|
3203
3220
|
if (!self.settings.hideSelected) {
|
|
3204
|
-
option_el.classList.toggle('selected',
|
|
3221
|
+
option_el.classList.toggle('selected', option_selected);
|
|
3222
|
+
if (this.settings.mode === 'multi') {
|
|
3223
|
+
setAttr(option_el, {
|
|
3224
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3225
|
+
});
|
|
3226
|
+
}
|
|
3205
3227
|
}
|
|
3206
3228
|
optgroup = option[self.settings.optgroupField] || '';
|
|
3207
3229
|
optgroups = Array.isArray(optgroup) ? optgroup : [optgroup];
|
|
@@ -3219,10 +3241,17 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3219
3241
|
// nodes can only have one parent, so if the option is in mutple groups, we need a clone
|
|
3220
3242
|
if (j > 0) {
|
|
3221
3243
|
option_el = option_el.cloneNode(true);
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3244
|
+
if (this.settings.mode === 'multi' && !self.settings.hideSelected) {
|
|
3245
|
+
setAttr(option_el, {
|
|
3246
|
+
id: option.$id + '-clone-' + j,
|
|
3247
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3248
|
+
});
|
|
3249
|
+
} else {
|
|
3250
|
+
setAttr(option_el, {
|
|
3251
|
+
id: option.$id + '-clone-' + j,
|
|
3252
|
+
'aria-selected': null
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3226
3255
|
option_el.classList.add('ts-cloned');
|
|
3227
3256
|
removeClasses(option_el, 'active');
|
|
3228
3257
|
|
|
@@ -2126,17 +2126,24 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2126
2126
|
const query = "label[for='" + escapeQuery(self.inputId) + "']";
|
|
2127
2127
|
const label = document.querySelector(query);
|
|
2128
2128
|
const label_click = self.focus.bind(self);
|
|
2129
|
+
const labelled_by = input.getAttribute('aria-labelledby');
|
|
2129
2130
|
if (label) {
|
|
2130
2131
|
addEvent(label, 'click', label_click);
|
|
2131
2132
|
setAttr(label, {
|
|
2132
2133
|
for: control_id
|
|
2133
2134
|
});
|
|
2134
|
-
|
|
2135
|
+
|
|
2136
|
+
// const label_id = getId(label,self.inputId+'-ts-label');
|
|
2137
|
+
// setAttr(focus_node,{'aria-labelledby':label_id});
|
|
2138
|
+
// setAttr(dropdown_content,{'aria-labelledby':label_id});
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
if (labelled_by) {
|
|
2135
2142
|
setAttr(focus_node, {
|
|
2136
|
-
'aria-labelledby':
|
|
2143
|
+
'aria-labelledby': labelled_by
|
|
2137
2144
|
});
|
|
2138
2145
|
setAttr(dropdown_content, {
|
|
2139
|
-
'aria-labelledby':
|
|
2146
|
+
'aria-labelledby': labelled_by
|
|
2140
2147
|
});
|
|
2141
2148
|
}
|
|
2142
2149
|
wrapper.style.width = input.style.width;
|
|
@@ -2144,10 +2151,15 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2144
2151
|
const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
|
2145
2152
|
addClasses([wrapper, dropdown], classes_plugins);
|
|
2146
2153
|
}
|
|
2147
|
-
if (
|
|
2148
|
-
setAttr(
|
|
2149
|
-
|
|
2154
|
+
if (settings.mode === 'multi') {
|
|
2155
|
+
setAttr(dropdown_content, {
|
|
2156
|
+
'aria-multiselectable': 'true'
|
|
2150
2157
|
});
|
|
2158
|
+
if (self.is_select_tag) {
|
|
2159
|
+
setAttr(input, {
|
|
2160
|
+
multiple: 'multiple'
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2151
2163
|
}
|
|
2152
2164
|
if (settings.placeholder) {
|
|
2153
2165
|
setAttr(control_input, {
|
|
@@ -2803,7 +2815,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2803
2815
|
*
|
|
2804
2816
|
*/
|
|
2805
2817
|
getValue() {
|
|
2806
|
-
if (this.
|
|
2818
|
+
if (this.settings.mode === 'multi' && this.is_select_tag) {
|
|
2807
2819
|
return this.items;
|
|
2808
2820
|
}
|
|
2809
2821
|
return this.items.join(this.settings.delimiter);
|
|
@@ -2936,9 +2948,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2936
2948
|
setAttr(this.focus_node, {
|
|
2937
2949
|
'aria-activedescendant': option.getAttribute('id')
|
|
2938
2950
|
});
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2951
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2952
|
+
setAttr(option, {
|
|
2953
|
+
'aria-selected': 'true'
|
|
2954
|
+
});
|
|
2955
|
+
}
|
|
2942
2956
|
addClasses(option, 'active');
|
|
2943
2957
|
if (scroll) this.scrollToOption(option);
|
|
2944
2958
|
}
|
|
@@ -2981,9 +2995,11 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
2981
2995
|
clearActiveOption() {
|
|
2982
2996
|
if (this.activeOption) {
|
|
2983
2997
|
removeClasses(this.activeOption, 'active');
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2998
|
+
if (this.settings.mode === 'single' || this.settings.hideSelected) {
|
|
2999
|
+
setAttr(this.activeOption, {
|
|
3000
|
+
'aria-selected': null
|
|
3001
|
+
});
|
|
3002
|
+
}
|
|
2987
3003
|
}
|
|
2988
3004
|
this.activeOption = null;
|
|
2989
3005
|
setAttr(this.focus_node, {
|
|
@@ -3198,10 +3214,16 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3198
3214
|
if (option === undefined) continue;
|
|
3199
3215
|
let opt_hash = get_hash(opt_value);
|
|
3200
3216
|
let option_el = self.getOption(opt_hash, true);
|
|
3217
|
+
const option_selected = self.items.includes(opt_hash);
|
|
3201
3218
|
|
|
3202
3219
|
// toggle 'selected' class
|
|
3203
3220
|
if (!self.settings.hideSelected) {
|
|
3204
|
-
option_el.classList.toggle('selected',
|
|
3221
|
+
option_el.classList.toggle('selected', option_selected);
|
|
3222
|
+
if (this.settings.mode === 'multi') {
|
|
3223
|
+
setAttr(option_el, {
|
|
3224
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3225
|
+
});
|
|
3226
|
+
}
|
|
3205
3227
|
}
|
|
3206
3228
|
optgroup = option[self.settings.optgroupField] || '';
|
|
3207
3229
|
optgroups = Array.isArray(optgroup) ? optgroup : [optgroup];
|
|
@@ -3219,10 +3241,17 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3219
3241
|
// nodes can only have one parent, so if the option is in mutple groups, we need a clone
|
|
3220
3242
|
if (j > 0) {
|
|
3221
3243
|
option_el = option_el.cloneNode(true);
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3244
|
+
if (this.settings.mode === 'multi' && !self.settings.hideSelected) {
|
|
3245
|
+
setAttr(option_el, {
|
|
3246
|
+
id: option.$id + '-clone-' + j,
|
|
3247
|
+
'aria-selected': option_selected ? 'true' : 'false'
|
|
3248
|
+
});
|
|
3249
|
+
} else {
|
|
3250
|
+
setAttr(option_el, {
|
|
3251
|
+
id: option.$id + '-clone-' + j,
|
|
3252
|
+
'aria-selected': null
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3226
3255
|
option_el.classList.add('ts-cloned');
|
|
3227
3256
|
removeClasses(option_el, 'active');
|
|
3228
3257
|
|