@mozaic-ds/web-components 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/public/DataTableUtilities-13ee8d4e.js +2 -0
- package/public/DataTableUtilities-13ee8d4e.js.map +1 -0
- package/public/adeo/DataTableUtilities-13ee8d4e.js +2 -0
- package/public/adeo/DataTableUtilities-13ee8d4e.js.map +1 -0
- package/public/adeo/components/accordion/Accordion.js +1 -1
- package/public/adeo/components/accordion/Accordion.js.map +1 -1
- package/public/adeo/components/autocomplete/Autocomplete.js +1 -1
- package/public/adeo/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/adeo/components/autocomplete/Autocomplete.svelte +27 -17
- package/public/adeo/components/breadcrumb/Breadcrumb.js +1 -1
- package/public/adeo/components/breadcrumb/Breadcrumb.nested.js +1 -1
- package/public/adeo/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/adeo/components/datatable/DataTable.js +1 -1
- package/public/adeo/components/datatable/DataTable.js.map +1 -1
- package/public/adeo/components/datatable/DataTable.svelte +32 -34
- package/public/adeo/components/datatable/datatable-default-action.nested.js +1 -1
- package/public/adeo/components/datatable/datatable-default-action.nested.js.map +1 -1
- package/public/adeo/components/datatable/datatable-default-edtion.nested.js +1 -1
- package/public/adeo/components/datatable/datatable-default-edtion.nested.js.map +1 -1
- package/public/adeo/components/datatable/datatable-default-filter-tags.nested.js +1 -1
- package/public/adeo/components/datatable/datatable-default-filter-tags.nested.js.map +1 -1
- package/public/adeo/components/datatable/datatable-default-footer.nested.js +1 -1
- package/public/adeo/components/datatable/datatable-default-footer.nested.js.map +1 -1
- package/public/adeo/components/datatable/datatable-default-footer.nested.svelte +7 -3
- package/public/adeo/components/dropdown/Dropdown.js +1 -1
- package/public/adeo/components/dropdown/Dropdown.js.map +1 -1
- package/public/adeo/components/dropdown/Dropdown.svelte +29 -24
- package/public/adeo/components/listbox/Listbox.js +1 -1
- package/public/adeo/components/listbox/Listbox.js.map +1 -1
- package/public/adeo/components/listbox/Listbox.nested.js +1 -1
- package/public/adeo/components/listbox/Listbox.nested.js.map +1 -1
- package/public/adeo/components/listbox/Listbox.nested.svelte +61 -54
- package/public/adeo/components/listbox/Listbox.svelte +48 -41
- package/public/adeo/components/menu/Menu.js +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/adeo/components/stepper/Stepper.js +1 -1
- package/public/adeo/components/textarea/Textarea.js +1 -1
- package/public/adeo/components/tooltip/Tooltip.js +1 -1
- package/public/adeo/components/tooltip/Tooltip.js.map +1 -1
- package/public/adeo/utilities/stories/actionbar/ActionBar.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/actionbar/ActionBar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/autocomplete/Autocomplete.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/autocomplete/Autocomplete.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/badge/Badge.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/badge/Badge.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/bottombar/BottomBar.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/bottombar/BottomBar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/button/Button.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/button/Button.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/card/Card.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/card/Card.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/BarChart.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/chart/BarChart.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/Donut.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/chart/Donut.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/GroupedBarChart.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/chart/GroupedBarChart.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/LineChart.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/chart/LineChart.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/Radar.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/chart/Radar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/chart/StackedBarChart.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/chart/StackedBarChart.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/checkbox/Checkbox.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/checkbox/Checkbox.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/datatable/DataTable.stories.d.ts +15 -0
- package/public/adeo/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/dropdown/Dropdown.stories.d.ts +9 -0
- package/public/adeo/utilities/stories/dropdown/Dropdown.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/field/Field.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/field/Field.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/fileuploader/FileUploader.stories.d.ts +11 -0
- package/public/adeo/utilities/stories/fileuploader/FileUploader.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/flag/Flag.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/flag/Flag.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/header/Header.stories.d.ts +9 -0
- package/public/adeo/utilities/stories/header/Header.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/hero/Hero.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/hero/Hero.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/icon/Icon.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/icon/Icon.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/kpi/kpi.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/kpi/kpi.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/layer/Layer.stories.d.ts +9 -0
- package/public/adeo/utilities/stories/layer/Layer.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/link/Link.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/link/Link.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/listbox/Listbox.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/listbox/Listbox.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/loader/Loader.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/loader/Loader.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/menu/Menu.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/menu/Menu.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/modal/Modal.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/modal/Modal.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/notification/Notification.stories.d.ts +13 -0
- package/public/adeo/utilities/stories/notification/Notification.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/optionbutton/OptionButton.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/optionbutton/OptionButton.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/overlay/Overlay.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/overlay/Overlay.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/overlay/OverlayLoader.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/overlay/OverlayLoader.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/pagination/Pagination.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/pagination/Pagination.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/passwordinput/PasswordInput.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/passwordinput/PasswordInput.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/phonenumber/PhoneNumber.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/phonenumber/PhoneNumber.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/price/Price.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/price/Price.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/progressbar/ProgressBar.stories.d.ts +10 -0
- package/public/adeo/utilities/stories/progressbar/ProgressBar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/quantityselector/QuantitySelector.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/radio/Radio.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/radio/Radio.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/radio-group/Radio-group.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/radio-group/Radio-group.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/ratings/StarsInput.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/ratings/StarsInput.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/ratings/StarsResult.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/select/Select.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/select/Select.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/sidebar/Sidebar.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/sidebar/Sidebar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/stepper/Stepper.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/stepper/Stepper.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/stepperbar/StepperBar.stories.d.ts +7 -0
- package/public/adeo/utilities/stories/stepperbar/StepperBar.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/tabs/Tabs.stories.d.ts +9 -0
- package/public/adeo/utilities/stories/tabs/Tabs.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/tag/Tag.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/tag/Tag.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/taglist/Taglist.stories.d.ts +6 -0
- package/public/adeo/utilities/stories/taglist/Taglist.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/textarea/Textarea.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/textarea/Textarea.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/textinput/Textinput.stories.d.ts +11 -0
- package/public/adeo/utilities/stories/textinput/Textinput.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/toggle/Toggle.stories.d.ts +8 -0
- package/public/adeo/utilities/stories/toggle/Toggle.stories.d.ts.map +1 -0
- package/public/adeo/utilities/stories/tooltip/Tooltip.stories.d.ts +5 -0
- package/public/adeo/utilities/stories/tooltip/Tooltip.stories.d.ts.map +1 -0
- package/public/bricoman/DataTableUtilities-13ee8d4e.js +2 -0
- package/public/bricoman/DataTableUtilities-13ee8d4e.js.map +1 -0
- package/public/bricoman/components/accordion/Accordion.js +1 -1
- package/public/bricoman/components/accordion/Accordion.js.map +1 -1
- package/public/bricoman/components/autocomplete/Autocomplete.js +1 -1
- package/public/bricoman/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/bricoman/components/autocomplete/Autocomplete.svelte +27 -17
- package/public/bricoman/components/breadcrumb/Breadcrumb.js +1 -1
- package/public/bricoman/components/breadcrumb/Breadcrumb.nested.js +1 -1
- package/public/bricoman/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/bricoman/components/datatable/DataTable.js +1 -1
- package/public/bricoman/components/datatable/DataTable.js.map +1 -1
- package/public/bricoman/components/datatable/DataTable.svelte +32 -34
- package/public/bricoman/components/datatable/datatable-default-action.nested.js +1 -1
- package/public/bricoman/components/datatable/datatable-default-action.nested.js.map +1 -1
- package/public/bricoman/components/datatable/datatable-default-edtion.nested.js +1 -1
- package/public/bricoman/components/datatable/datatable-default-edtion.nested.js.map +1 -1
- package/public/bricoman/components/datatable/datatable-default-filter-tags.nested.js +1 -1
- package/public/bricoman/components/datatable/datatable-default-filter-tags.nested.js.map +1 -1
- package/public/bricoman/components/datatable/datatable-default-footer.nested.js +1 -1
- package/public/bricoman/components/datatable/datatable-default-footer.nested.js.map +1 -1
- package/public/bricoman/components/datatable/datatable-default-footer.nested.svelte +7 -3
- package/public/bricoman/components/dropdown/Dropdown.js +1 -1
- package/public/bricoman/components/dropdown/Dropdown.js.map +1 -1
- package/public/bricoman/components/dropdown/Dropdown.svelte +29 -24
- package/public/bricoman/components/listbox/Listbox.js +1 -1
- package/public/bricoman/components/listbox/Listbox.js.map +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.js.map +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.svelte +61 -54
- package/public/bricoman/components/listbox/Listbox.svelte +48 -41
- package/public/bricoman/components/menu/Menu.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/bricoman/components/stepper/Stepper.js +1 -1
- package/public/bricoman/components/textarea/Textarea.js +1 -1
- package/public/bricoman/components/tooltip/Tooltip.js +1 -1
- package/public/bricoman/components/tooltip/Tooltip.js.map +1 -1
- package/public/bricoman/utilities/stories/actionbar/ActionBar.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/actionbar/ActionBar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/autocomplete/Autocomplete.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/autocomplete/Autocomplete.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/badge/Badge.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/badge/Badge.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/bottombar/BottomBar.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/bottombar/BottomBar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/button/Button.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/button/Button.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/card/Card.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/card/Card.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/BarChart.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/chart/BarChart.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/Donut.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/chart/Donut.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/GroupedBarChart.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/chart/GroupedBarChart.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/LineChart.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/chart/LineChart.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/Radar.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/chart/Radar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/chart/StackedBarChart.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/chart/StackedBarChart.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/checkbox/Checkbox.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/checkbox/Checkbox.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/datatable/DataTable.stories.d.ts +15 -0
- package/public/bricoman/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/dropdown/Dropdown.stories.d.ts +9 -0
- package/public/bricoman/utilities/stories/dropdown/Dropdown.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/field/Field.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/field/Field.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/fileuploader/FileUploader.stories.d.ts +11 -0
- package/public/bricoman/utilities/stories/fileuploader/FileUploader.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/flag/Flag.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/flag/Flag.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/header/Header.stories.d.ts +9 -0
- package/public/bricoman/utilities/stories/header/Header.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/hero/Hero.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/hero/Hero.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/icon/Icon.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/icon/Icon.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/kpi/kpi.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/kpi/kpi.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/layer/Layer.stories.d.ts +9 -0
- package/public/bricoman/utilities/stories/layer/Layer.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/link/Link.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/link/Link.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/listbox/Listbox.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/listbox/Listbox.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/loader/Loader.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/loader/Loader.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/menu/Menu.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/menu/Menu.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/modal/Modal.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/modal/Modal.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/notification/Notification.stories.d.ts +13 -0
- package/public/bricoman/utilities/stories/notification/Notification.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/optionbutton/OptionButton.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/optionbutton/OptionButton.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/overlay/Overlay.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/overlay/Overlay.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/overlay/OverlayLoader.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/overlay/OverlayLoader.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/pagination/Pagination.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/pagination/Pagination.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/passwordinput/PasswordInput.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/passwordinput/PasswordInput.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/phonenumber/PhoneNumber.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/phonenumber/PhoneNumber.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/price/Price.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/price/Price.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/progressbar/ProgressBar.stories.d.ts +10 -0
- package/public/bricoman/utilities/stories/progressbar/ProgressBar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/quantityselector/QuantitySelector.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/radio/Radio.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/radio/Radio.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/radio-group/Radio-group.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/radio-group/Radio-group.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/ratings/StarsInput.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/ratings/StarsInput.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/ratings/StarsResult.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/select/Select.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/select/Select.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/sidebar/Sidebar.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/sidebar/Sidebar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/stepper/Stepper.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/stepper/Stepper.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/stepperbar/StepperBar.stories.d.ts +7 -0
- package/public/bricoman/utilities/stories/stepperbar/StepperBar.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/tabs/Tabs.stories.d.ts +9 -0
- package/public/bricoman/utilities/stories/tabs/Tabs.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/tag/Tag.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/tag/Tag.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/taglist/Taglist.stories.d.ts +6 -0
- package/public/bricoman/utilities/stories/taglist/Taglist.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/textarea/Textarea.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/textarea/Textarea.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/textinput/Textinput.stories.d.ts +11 -0
- package/public/bricoman/utilities/stories/textinput/Textinput.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/toggle/Toggle.stories.d.ts +8 -0
- package/public/bricoman/utilities/stories/toggle/Toggle.stories.d.ts.map +1 -0
- package/public/bricoman/utilities/stories/tooltip/Tooltip.stories.d.ts +5 -0
- package/public/bricoman/utilities/stories/tooltip/Tooltip.stories.d.ts.map +1 -0
- package/public/components/accordion/Accordion.js +1 -1
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1 -1
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.svelte +27 -17
- package/public/components/breadcrumb/Breadcrumb.js +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/datatable/DataTable.js +1 -1
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +32 -34
- package/public/components/datatable/datatable-default-action.nested.js +1 -1
- package/public/components/datatable/datatable-default-action.nested.js.map +1 -1
- package/public/components/datatable/datatable-default-edtion.nested.js +1 -1
- package/public/components/datatable/datatable-default-edtion.nested.js.map +1 -1
- package/public/components/datatable/datatable-default-filter-tags.nested.js +1 -1
- package/public/components/datatable/datatable-default-filter-tags.nested.js.map +1 -1
- package/public/components/datatable/datatable-default-footer.nested.js +1 -1
- package/public/components/datatable/datatable-default-footer.nested.js.map +1 -1
- package/public/components/datatable/datatable-default-footer.nested.svelte +7 -3
- package/public/components/dropdown/Dropdown.js +1 -1
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/dropdown/Dropdown.svelte +29 -24
- package/public/components/listbox/Listbox.js +1 -1
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +1 -1
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/listbox/Listbox.nested.svelte +61 -54
- package/public/components/listbox/Listbox.svelte +48 -41
- package/public/components/menu/Menu.js +1 -1
- package/public/components/phonenumber/PhoneNumber.js +1 -1
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/stepper/Stepper.js +1 -1
- package/public/components/textarea/Textarea.js +1 -1
- package/public/components/tooltip/Tooltip.js +1 -1
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/icons/Itinerary24.js +1 -1
- package/public/icons/Itinerary24.js.map +1 -1
- package/public/icons/Itinerary32.js +1 -1
- package/public/icons/Itinerary32.js.map +1 -1
- package/public/icons/Itinerary48.js +1 -1
- package/public/icons/Itinerary48.js.map +1 -1
- package/public/icons/Itinerary64.js +1 -1
- package/public/icons/Itinerary64.js.map +1 -1
- package/public/icons/PaymentMonochromeOneyRaty24.js +2 -0
- package/public/icons/PaymentMonochromeOneyRaty24.js.map +1 -0
- package/public/icons/PaymentMonochromeOneyRaty32.js +2 -0
- package/public/icons/PaymentMonochromeOneyRaty32.js.map +1 -0
- package/public/icons/PaymentMonochromeOneyRaty48.js +2 -0
- package/public/icons/PaymentMonochromeOneyRaty48.js.map +1 -0
- package/public/icons/PaymentMonochromeOneyRaty64.js +2 -0
- package/public/icons/PaymentMonochromeOneyRaty64.js.map +1 -0
- package/public/icons/PaymentMonochromePrzelesw24.js +2 -0
- package/public/icons/PaymentMonochromePrzelesw24.js.map +1 -0
- package/public/icons/PaymentMonochromePrzelesw32.js +2 -0
- package/public/icons/PaymentMonochromePrzelesw32.js.map +1 -0
- package/public/icons/PaymentMonochromePrzelesw48.js +2 -0
- package/public/icons/PaymentMonochromePrzelesw48.js.map +1 -0
- package/public/icons/PaymentMonochromePrzelesw64.js +2 -0
- package/public/icons/PaymentMonochromePrzelesw64.js.map +1 -0
- package/public/icons/PromiseDestocking24.js +1 -1
- package/public/icons/PromiseDestocking24.js.map +1 -1
- package/public/icons/PromiseDestocking32.js +1 -1
- package/public/icons/PromiseDestocking32.js.map +1 -1
- package/public/icons/PromiseDestocking48.js +1 -1
- package/public/icons/PromiseDestocking48.js.map +1 -1
- package/public/icons/PromiseDestocking64.js +1 -1
- package/public/icons/PromiseDestocking64.js.map +1 -1
- package/public/icons/SocialNetworkFacebook24.js +1 -1
- package/public/icons/SocialNetworkFacebook24.js.map +1 -1
- package/public/icons/SocialNetworkFacebook32.js +1 -1
- package/public/icons/SocialNetworkFacebook32.js.map +1 -1
- package/public/icons/SocialNetworkFacebook48.js +1 -1
- package/public/icons/SocialNetworkFacebook48.js.map +1 -1
- package/public/icons/SocialNetworkFacebook64.js +1 -1
- package/public/icons/SocialNetworkFacebook64.js.map +1 -1
- package/public/icons/SocialNetworkInstagram24.js +1 -1
- package/public/icons/SocialNetworkInstagram24.js.map +1 -1
- package/public/icons/SocialNetworkInstagram32.js +1 -1
- package/public/icons/SocialNetworkInstagram32.js.map +1 -1
- package/public/icons/SocialNetworkInstagram48.js +1 -1
- package/public/icons/SocialNetworkInstagram48.js.map +1 -1
- package/public/icons/SocialNetworkInstagram64.js +1 -1
- package/public/icons/SocialNetworkInstagram64.js.map +1 -1
- package/public/icons/SocialNetworkLinkedin24.js +1 -1
- package/public/icons/SocialNetworkLinkedin24.js.map +1 -1
- package/public/icons/SocialNetworkLinkedin32.js +1 -1
- package/public/icons/SocialNetworkLinkedin32.js.map +1 -1
- package/public/icons/SocialNetworkLinkedin48.js +1 -1
- package/public/icons/SocialNetworkLinkedin48.js.map +1 -1
- package/public/icons/SocialNetworkLinkedin64.js +1 -1
- package/public/icons/SocialNetworkLinkedin64.js.map +1 -1
- package/public/icons/SocialNetworkPinterest24.js +1 -1
- package/public/icons/SocialNetworkPinterest24.js.map +1 -1
- package/public/icons/SocialNetworkPinterest32.js +1 -1
- package/public/icons/SocialNetworkPinterest32.js.map +1 -1
- package/public/icons/SocialNetworkPinterest48.js +1 -1
- package/public/icons/SocialNetworkPinterest48.js.map +1 -1
- package/public/icons/SocialNetworkPinterest64.js +1 -1
- package/public/icons/SocialNetworkPinterest64.js.map +1 -1
- package/public/icons/SocialNetworkSpotify24.js +2 -0
- package/public/icons/SocialNetworkSpotify24.js.map +1 -0
- package/public/icons/SocialNetworkSpotify32.js +2 -0
- package/public/icons/SocialNetworkSpotify32.js.map +1 -0
- package/public/icons/SocialNetworkSpotify48.js +2 -0
- package/public/icons/SocialNetworkSpotify48.js.map +1 -0
- package/public/icons/SocialNetworkSpotify64.js +2 -0
- package/public/icons/SocialNetworkSpotify64.js.map +1 -0
- package/public/icons/SocialNetworkTelegram24.js +2 -0
- package/public/icons/SocialNetworkTelegram24.js.map +1 -0
- package/public/icons/SocialNetworkTelegram32.js +2 -0
- package/public/icons/SocialNetworkTelegram32.js.map +1 -0
- package/public/icons/SocialNetworkTelegram48.js +2 -0
- package/public/icons/SocialNetworkTelegram48.js.map +1 -0
- package/public/icons/SocialNetworkTelegram64.js +2 -0
- package/public/icons/SocialNetworkTelegram64.js.map +1 -0
- package/public/icons/SocialNetworkX24.js +2 -0
- package/public/icons/SocialNetworkX24.js.map +1 -0
- package/public/icons/SocialNetworkX32.js +2 -0
- package/public/icons/SocialNetworkX32.js.map +1 -0
- package/public/icons/SocialNetworkX48.js +2 -0
- package/public/icons/SocialNetworkX48.js.map +1 -0
- package/public/icons/SocialNetworkX64.js +2 -0
- package/public/icons/SocialNetworkX64.js.map +1 -0
- package/public/icons/SocialNetworkYoutube24.js +1 -1
- package/public/icons/SocialNetworkYoutube24.js.map +1 -1
- package/public/icons/SocialNetworkYoutube32.js +1 -1
- package/public/icons/SocialNetworkYoutube32.js.map +1 -1
- package/public/icons/SocialNetworkYoutube48.js +1 -1
- package/public/icons/SocialNetworkYoutube48.js.map +1 -1
- package/public/icons/SocialNetworkYoutube64.js +1 -1
- package/public/icons/SocialNetworkYoutube64.js.map +1 -1
- package/public/icons/Trolley24.js +2 -0
- package/public/icons/Trolley24.js.map +1 -0
- package/public/icons/Trolley32.js +2 -0
- package/public/icons/Trolley32.js.map +1 -0
- package/public/icons/Trolley48.js +2 -0
- package/public/icons/Trolley48.js.map +1 -0
- package/public/icons/Trolley64.js +2 -0
- package/public/icons/Trolley64.js.map +1 -0
- package/public/icons.js +817 -737
- package/public/utilities/stories/actionbar/ActionBar.stories.d.ts +7 -0
- package/public/utilities/stories/actionbar/ActionBar.stories.d.ts.map +1 -0
- package/public/utilities/stories/autocomplete/Autocomplete.stories.d.ts +10 -0
- package/public/utilities/stories/autocomplete/Autocomplete.stories.d.ts.map +1 -0
- package/public/utilities/stories/badge/Badge.stories.d.ts +5 -0
- package/public/utilities/stories/badge/Badge.stories.d.ts.map +1 -0
- package/public/utilities/stories/bottombar/BottomBar.stories.d.ts +6 -0
- package/public/utilities/stories/bottombar/BottomBar.stories.d.ts.map +1 -0
- package/public/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/public/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts.map +1 -0
- package/public/utilities/stories/button/Button.stories.d.ts +10 -0
- package/public/utilities/stories/button/Button.stories.d.ts.map +1 -0
- package/public/utilities/stories/card/Card.stories.d.ts +7 -0
- package/public/utilities/stories/card/Card.stories.d.ts.map +1 -0
- package/public/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
- package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/BarChart.stories.d.ts +7 -0
- package/public/utilities/stories/chart/BarChart.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/Donut.stories.d.ts +7 -0
- package/public/utilities/stories/chart/Donut.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/GroupedBarChart.stories.d.ts +6 -0
- package/public/utilities/stories/chart/GroupedBarChart.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/LineChart.stories.d.ts +5 -0
- package/public/utilities/stories/chart/LineChart.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/Radar.stories.d.ts +7 -0
- package/public/utilities/stories/chart/Radar.stories.d.ts.map +1 -0
- package/public/utilities/stories/chart/StackedBarChart.stories.d.ts +6 -0
- package/public/utilities/stories/chart/StackedBarChart.stories.d.ts.map +1 -0
- package/public/utilities/stories/checkbox/Checkbox.stories.d.ts +10 -0
- package/public/utilities/stories/checkbox/Checkbox.stories.d.ts.map +1 -0
- package/public/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts +5 -0
- package/public/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts.map +1 -0
- package/public/utilities/stories/datatable/DataTable.stories.d.ts +15 -0
- package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -0
- package/public/utilities/stories/dropdown/Dropdown.stories.d.ts +9 -0
- package/public/utilities/stories/dropdown/Dropdown.stories.d.ts.map +1 -0
- package/public/utilities/stories/field/Field.stories.d.ts +10 -0
- package/public/utilities/stories/field/Field.stories.d.ts.map +1 -0
- package/public/utilities/stories/fileuploader/FileUploader.stories.d.ts +11 -0
- package/public/utilities/stories/fileuploader/FileUploader.stories.d.ts.map +1 -0
- package/public/utilities/stories/flag/Flag.stories.d.ts +6 -0
- package/public/utilities/stories/flag/Flag.stories.d.ts.map +1 -0
- package/public/utilities/stories/header/Header.stories.d.ts +9 -0
- package/public/utilities/stories/header/Header.stories.d.ts.map +1 -0
- package/public/utilities/stories/hero/Hero.stories.d.ts +8 -0
- package/public/utilities/stories/hero/Hero.stories.d.ts.map +1 -0
- package/public/utilities/stories/icon/Icon.stories.d.ts +6 -0
- package/public/utilities/stories/icon/Icon.stories.d.ts.map +1 -0
- package/public/utilities/stories/kpi/kpi.stories.d.ts +7 -0
- package/public/utilities/stories/kpi/kpi.stories.d.ts.map +1 -0
- package/public/utilities/stories/layer/Layer.stories.d.ts +9 -0
- package/public/utilities/stories/layer/Layer.stories.d.ts.map +1 -0
- package/public/utilities/stories/link/Link.stories.d.ts +7 -0
- package/public/utilities/stories/link/Link.stories.d.ts.map +1 -0
- package/public/utilities/stories/listbox/Listbox.stories.d.ts +6 -0
- package/public/utilities/stories/listbox/Listbox.stories.d.ts.map +1 -0
- package/public/utilities/stories/loader/Loader.stories.d.ts +7 -0
- package/public/utilities/stories/loader/Loader.stories.d.ts.map +1 -0
- package/public/utilities/stories/menu/Menu.stories.d.ts +5 -0
- package/public/utilities/stories/menu/Menu.stories.d.ts.map +1 -0
- package/public/utilities/stories/modal/Modal.stories.d.ts +5 -0
- package/public/utilities/stories/modal/Modal.stories.d.ts.map +1 -0
- package/public/utilities/stories/notification/Notification.stories.d.ts +13 -0
- package/public/utilities/stories/notification/Notification.stories.d.ts.map +1 -0
- package/public/utilities/stories/optionbutton/OptionButton.stories.d.ts +6 -0
- package/public/utilities/stories/optionbutton/OptionButton.stories.d.ts.map +1 -0
- package/public/utilities/stories/overlay/Overlay.stories.d.ts +5 -0
- package/public/utilities/stories/overlay/Overlay.stories.d.ts.map +1 -0
- package/public/utilities/stories/overlay/OverlayLoader.stories.d.ts +5 -0
- package/public/utilities/stories/overlay/OverlayLoader.stories.d.ts.map +1 -0
- package/public/utilities/stories/pagination/Pagination.stories.d.ts +6 -0
- package/public/utilities/stories/pagination/Pagination.stories.d.ts.map +1 -0
- package/public/utilities/stories/passwordinput/PasswordInput.stories.d.ts +5 -0
- package/public/utilities/stories/passwordinput/PasswordInput.stories.d.ts.map +1 -0
- package/public/utilities/stories/phonenumber/PhoneNumber.stories.d.ts +7 -0
- package/public/utilities/stories/phonenumber/PhoneNumber.stories.d.ts.map +1 -0
- package/public/utilities/stories/price/Price.stories.d.ts +10 -0
- package/public/utilities/stories/price/Price.stories.d.ts.map +1 -0
- package/public/utilities/stories/progressbar/ProgressBar.stories.d.ts +10 -0
- package/public/utilities/stories/progressbar/ProgressBar.stories.d.ts.map +1 -0
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts +6 -0
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -0
- package/public/utilities/stories/radio/Radio.stories.d.ts +8 -0
- package/public/utilities/stories/radio/Radio.stories.d.ts.map +1 -0
- package/public/utilities/stories/radio-group/Radio-group.stories.d.ts +6 -0
- package/public/utilities/stories/radio-group/Radio-group.stories.d.ts.map +1 -0
- package/public/utilities/stories/ratings/StarsInput.stories.d.ts +5 -0
- package/public/utilities/stories/ratings/StarsInput.stories.d.ts.map +1 -0
- package/public/utilities/stories/ratings/StarsResult.stories.d.ts +5 -0
- package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -0
- package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts +5 -0
- package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts.map +1 -0
- package/public/utilities/stories/select/Select.stories.d.ts +6 -0
- package/public/utilities/stories/select/Select.stories.d.ts.map +1 -0
- package/public/utilities/stories/sidebar/Sidebar.stories.d.ts +5 -0
- package/public/utilities/stories/sidebar/Sidebar.stories.d.ts.map +1 -0
- package/public/utilities/stories/stepper/Stepper.stories.d.ts +6 -0
- package/public/utilities/stories/stepper/Stepper.stories.d.ts.map +1 -0
- package/public/utilities/stories/stepperbar/StepperBar.stories.d.ts +7 -0
- package/public/utilities/stories/stepperbar/StepperBar.stories.d.ts.map +1 -0
- package/public/utilities/stories/tabs/Tabs.stories.d.ts +9 -0
- package/public/utilities/stories/tabs/Tabs.stories.d.ts.map +1 -0
- package/public/utilities/stories/tag/Tag.stories.d.ts +8 -0
- package/public/utilities/stories/tag/Tag.stories.d.ts.map +1 -0
- package/public/utilities/stories/taglist/Taglist.stories.d.ts +6 -0
- package/public/utilities/stories/taglist/Taglist.stories.d.ts.map +1 -0
- package/public/utilities/stories/textarea/Textarea.stories.d.ts +8 -0
- package/public/utilities/stories/textarea/Textarea.stories.d.ts.map +1 -0
- package/public/utilities/stories/textinput/Textinput.stories.d.ts +11 -0
- package/public/utilities/stories/textinput/Textinput.stories.d.ts.map +1 -0
- package/public/utilities/stories/toggle/Toggle.stories.d.ts +8 -0
- package/public/utilities/stories/toggle/Toggle.stories.d.ts.map +1 -0
- package/public/utilities/stories/tooltip/Tooltip.stories.d.ts +5 -0
- package/public/utilities/stories/tooltip/Tooltip.stories.d.ts.map +1 -0
- package/public/DataTableUtilities-f652653f.js +0 -2
- package/public/DataTableUtilities-f652653f.js.map +0 -1
- package/public/adeo/DataTableUtilities-f652653f.js +0 -2
- package/public/adeo/DataTableUtilities-f652653f.js.map +0 -1
- package/public/bricoman/DataTableUtilities-f652653f.js +0 -2
- package/public/bricoman/DataTableUtilities-f652653f.js.map +0 -1
- package/public/icons/SocialNetworkTwitter24.js +0 -2
- package/public/icons/SocialNetworkTwitter24.js.map +0 -1
- package/public/icons/SocialNetworkTwitter32.js +0 -2
- package/public/icons/SocialNetworkTwitter32.js.map +0 -1
- package/public/icons/SocialNetworkTwitter48.js +0 -2
- package/public/icons/SocialNetworkTwitter48.js.map +0 -1
- package/public/icons/SocialNetworkTwitter64.js +0 -2
- package/public/icons/SocialNetworkTwitter64.js.map +0 -1
|
@@ -73,8 +73,12 @@
|
|
|
73
73
|
</div>
|
|
74
74
|
{#if showItemsCount && !loading}
|
|
75
75
|
<div class="mc-datatable__count">
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
{#if totalItems > 0}
|
|
77
|
+
<strong>{firstItemOfPageNumber}-{lastItemOfPageNumber}</strong> /
|
|
78
|
+
<strong>{totalItems} {itemsLabel}</strong>
|
|
79
|
+
{:else}
|
|
80
|
+
<strong>{totalItems} {itemsLabel}</strong>
|
|
81
|
+
{/if}
|
|
78
82
|
</div>
|
|
79
83
|
{/if}
|
|
80
84
|
<div class="mc-datatable__pagination">
|
|
@@ -97,7 +101,7 @@
|
|
|
97
101
|
|
|
98
102
|
<div class="mc-pagination__field">
|
|
99
103
|
<select
|
|
100
|
-
disabled={loading}
|
|
104
|
+
disabled={currentPage === totalPages || loading}
|
|
101
105
|
bind:value={currentPage}
|
|
102
106
|
on:change={onPageSelect}
|
|
103
107
|
class="mc-select mc-pagination__select mc-select--s"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as e,i as t,a,b as l,f as i,s,J as r,K as n,c as o,e as c,d,t as m,D as g,n as p,h,k as x,L as u,j as w,l as b,E as f,m as $,M as v,A as y,y as M,z as k,o as I,N as _,p as A,q as z,F as D,O as E,r as C,v as j,w as S,x as N,P as T,Q as L,R as P,C as B,B as G,T as O}from"../../index-48da6c1f.js";import{E as Q}from"../../EventHandler-f7ee47ca.js";import{c as W}from"../../ClickOutside-63071e7a.js";import R from"../tag/Tag.nested.js";import Y from"../loader/Loader.nested.js";import H from"../listbox/Listbox.nested.js";function Z(e,t,a){const l=e.slice();return l[63]=t[a],l}function J(e,t,a){const l=e.slice();return l[63]=t[a],l[67]=a,l}function V(e){let t,a,l={id:e[1]?e[1]:`autocompleteTag-${e[31]}`,class:"mc-dropdown__tag",label:e[30](),size:"s",type:"removable",dark:!1,disabled:!1,href:"",name:"",selected:!1,value:""};return t=new R({props:l}),e[47](t),t.$on("tag-removed",e[32]),{c(){g(t.$$.fragment)},m(e,l){f(t,e,l),a=!0},p(e,a){const l={};2&a[0]&&(l.id=e[1]?e[1]:`autocompleteTag-${e[31]}`),1073741824&a[0]&&(l.label=e[30]()),t.$set(l)},i(e){a||(y(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(a){e[47](null),D(t,a)}}}function F(e){let t,a,i;return{c(){t=c("button"),t.innerHTML="<navigation-control-tag--cross-24px></navigation-control-tag--cross-24px>",h(t,"class","mc-dropdown__clear"),h(t,"type","button")},m(s,r){l(s,t,r),a||(i=$(t,"click",T(e[48])),a=!0)},p:p,d(e){e&&z(t),a=!1,i()}}}function X(e){let t,a;return t=new Y({props:{size:"s",theme:"primary",text:"",class:"mc-dropdown__loader"}}),{c(){g(t.$$.fragment)},m(e,l){f(t,e,l),a=!0},i(e){a||(y(t.$$.fragment,e),a=!0)},o(e){M(t.$$.fragment,e),a=!1},d(e){D(t,e)}}}function q(e){let t,a,i=e[27],s=[];for(let t=0;t<i.length;t+=1)s[t]=U(J(e,i,t));let r=e[20].length>e[16]&&ee(e);return{c(){t=c("div");for(let e=0;e<s.length;e+=1)s[e].c();a=d(),r&&r.c(),h(t,"class","tags-selected")},m(e,i){l(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null);b(t,a),r&&r.m(t,null)},p(e,l){if(134283264&l[0]|4&l[1]){let r;for(i=e[27],r=0;r<i.length;r+=1){const n=J(e,i,r);s[r]?s[r].p(n,l):(s[r]=U(n),s[r].c(),s[r].m(t,a))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}e[20].length>e[16]?r?r.p(e,l):(r=ee(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&z(t),L(s,e),r&&r.d()}}}function K(e){let t,a,i,s,r,n;function o(){return e[51](e[63])}return{c(){t=c("div"),a=c("m-tag"),B(a,"id",i=e[63].id),B(a,"label",s=e[63].label),B(a,"size","s"),B(a,"type","removable"),h(t,"class","tag-selected")},m(e,i){l(e,t,i),b(t,a),r||(n=$(a,"tag-removed",o),r=!0)},p(t,l){e=t,134217728&l[0]&&i!==(i=e[63].id)&&B(a,"id",i),134217728&l[0]&&s!==(s=e[63].label)&&B(a,"label",s)},d(e){e&&z(t),r=!1,n()}}}function U(e){let t,a=e[67]<e[16]&&K(e);return{c(){a&&a.c(),t=P()},m(e,i){a&&a.m(e,i),l(e,t,i)},p(e,l){e[67]<e[16]?a?a.p(e,l):(a=K(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&z(t)}}}function ee(e){let t,a,i,s,r;return{c(){t=c("div"),a=c("m-tag"),B(a,"id","id-tag"),B(a,"label",i="("+e[20].length+") "+e[15]+" "),B(a,"size","s"),B(a,"type","link"),h(t,"class","tag-selected")},m(i,n){l(i,t,n),b(t,a),s||(r=$(a,"tag-selected",e[52]),s=!0)},p(e,t){1081344&t[0]&&i!==(i="("+e[20].length+") "+e[15]+" ")&&B(a,"label",i)},d(e){e&&z(t),s=!1,r()}}}function te(e){let t,a,i,s,r,n,o=e[27],d=[];for(let t=0;t<o.length;t+=1)d[t]=ae(Z(e,o,t));return{c(){t=c("div"),a=c("m-layer"),i=c("small"),s=c("div");for(let e=0;e<d.length;e+=1)d[e].c();h(s,"class","tags-selected"),h(i,"slot","content"),B(a,"title",e[14]),B(a,"layertitletag","h3"),B(a,"isopen",e[28])},m(o,c){l(o,t,c),b(t,a),b(a,i),b(i,s);for(let e=0;e<d.length;e+=1)d[e]&&d[e].m(s,null);r||(n=$(a,"layer-closed",e[54]),r=!0)},p(e,t){if(134217728&t[0]|4&t[1]){let a;for(o=e[27],a=0;a<o.length;a+=1){const l=Z(e,o,a);d[a]?d[a].p(l,t):(d[a]=ae(l),d[a].c(),d[a].m(s,null))}for(;a<d.length;a+=1)d[a].d(1);d.length=o.length}16384&t[0]&&B(a,"title",e[14]),268435456&t[0]&&B(a,"isopen",e[28])},d(e){e&&z(t),L(d,e),r=!1,n()}}}function ae(e){let t,a,i,s,r,n,o;function m(){return e[53](e[63])}return{c(){t=c("div"),a=c("m-tag"),r=d(),B(a,"id",i=e[63].id),B(a,"label",s=e[63].label),B(a,"size","s"),B(a,"type","removable"),h(t,"class","tag-selected")},m(e,i){l(e,t,i),b(t,a),b(t,r),n||(o=$(a,"tag-removed",m),n=!0)},p(t,l){e=t,134217728&l[0]&&i!==(i=e[63].id)&&B(a,"id",i),134217728&l[0]&&s!==(s=e[63].label)&&B(a,"label",s)},d(e){e&&z(t),n=!1,o()}}}function le(e){let t,a,i,s,C,j,S,N,T,L,P,B,O,Q,R,Y,Z,J,K,U,ee,ae,le,se=(e[26]?e[26]:e[2])+"",re=e[9]&&e[20].length>0&&!e[17]&&V(e),ne=!e[9]&&e[26]&&e[13]&&F(e),oe=e[7]&&X();function ce(t){e[50](t)}let de={items:JSON.stringify(e[29]),open:e[21],name:e[8],multiple:e[9],isfiltered:ie,emptysearchlabel:e[10],maxwidth:e[0],datatextexpr:e[11],datavalueexpr:e[12],selectall:e[18],labelselectall:e[19]};void 0!==e[20]&&(de.value=e[20]),L=new H({props:de}),r.push((()=>n(L,"value",ce))),L.$on("change",e[37]),L.$on("scrollend",e[38]),L.$on("select-all",e[39]);let me=e[9]&&e[17]&&q(e),ge=e[9]&&e[17]&&te(e),pe=[{class:"mc-dropdown"},{style:U="--dropdown-tag-width: "+e[25]+"; --dropdown-width: "+e[0]+";"},e[22]],he={};for(let e=0;e<pe.length;e+=1)he=o(he,pe[e]);return{c(){t=c("div"),a=c("div"),re&&re.c(),i=d(),s=c("button"),C=m(se),j=d(),ne&&ne.c(),S=d(),N=c("div"),oe&&oe.c(),T=d(),g(L.$$.fragment),B=d(),me&&me.c(),O=d(),Q=c("span"),R=d(),Y=c("span"),Z=d(),J=c("span"),K=d(),ge&&ge.c(),this.c=p,h(s,"type","button"),h(s,"class","mc-select mc-dropdown__trigger"),s.disabled=e[3],x(s,"is-open",e[21]),x(s,"is-valid",e[5]),x(s,"is-invalid",e[6]),x(s,"mc-select--s","s"===e[4]),h(N,"class","mc-dropdown__tools"),h(a,"class","mc-dropdown__main"),h(Q,"class","mc-dropdown__tag"),u(Q,"display","none"),h(Y,"class","mc-dropdown__loader"),u(Y,"display","none"),h(J,"class","mc-text-input mc-dropdown__trigger"),u(J,"display","none"),w(t,he),x(t,"mc-dropdown--multi",e[9])},m(r,n){l(r,t,n),b(t,a),re&&re.m(a,null),b(a,i),b(a,s),b(s,C),b(s,j),ne&&ne.m(s,null),b(a,S),b(a,N),oe&&oe.m(N,null),b(t,T),f(L,t,null),b(t,B),me&&me.m(t,null),b(t,O),b(t,Q),b(t,R),b(t,Y),b(t,Z),b(t,J),b(t,K),ge&&ge.m(t,null),e[55](t),ee=!0,ae||(le=[$(s,"click",e[49]),v(W.call(null,t)),$(t,"outclick",e[36])],ae=!0)},p(e,l){e[9]&&e[20].length>0&&!e[17]?re?(re.p(e,l),1180160&l[0]&&y(re,1)):(re=V(e),re.c(),y(re,1),re.m(a,i)):re&&(G(),M(re,1,1,(()=>{re=null})),k()),(!ee||67108868&l[0])&&se!==(se=(e[26]?e[26]:e[2])+"")&&I(C,se),!e[9]&&e[26]&&e[13]?ne?ne.p(e,l):(ne=F(e),ne.c(),ne.m(s,null)):ne&&(ne.d(1),ne=null),(!ee||8&l[0])&&(s.disabled=e[3]),(!ee||2097152&l[0])&&x(s,"is-open",e[21]),(!ee||32&l[0])&&x(s,"is-valid",e[5]),(!ee||64&l[0])&&x(s,"is-invalid",e[6]),(!ee||16&l[0])&&x(s,"mc-select--s","s"===e[4]),e[7]?oe?128&l[0]&&y(oe,1):(oe=X(),oe.c(),y(oe,1),oe.m(N,null)):oe&&(G(),M(oe,1,1,(()=>{oe=null})),k());const r={};536870912&l[0]&&(r.items=JSON.stringify(e[29])),2097152&l[0]&&(r.open=e[21]),256&l[0]&&(r.name=e[8]),512&l[0]&&(r.multiple=e[9]),1024&l[0]&&(r.emptysearchlabel=e[10]),1&l[0]&&(r.maxwidth=e[0]),2048&l[0]&&(r.datatextexpr=e[11]),4096&l[0]&&(r.datavalueexpr=e[12]),262144&l[0]&&(r.selectall=e[18]),524288&l[0]&&(r.labelselectall=e[19]),!P&&1048576&l[0]&&(P=!0,r.value=e[20],_((()=>P=!1))),L.$set(r),e[9]&&e[17]?me?me.p(e,l):(me=q(e),me.c(),me.m(t,O)):me&&(me.d(1),me=null),e[9]&&e[17]?ge?ge.p(e,l):(ge=te(e),ge.c(),ge.m(t,null)):ge&&(ge.d(1),ge=null),w(t,he=A(pe,[{class:"mc-dropdown"},(!ee||33554433&l[0]&&U!==(U="--dropdown-tag-width: "+e[25]+"; --dropdown-width: "+e[0]+";"))&&{style:U},4194304&l[0]&&e[22]])),x(t,"mc-dropdown--multi",e[9])},i(e){ee||(y(re),y(oe),y(L.$$.fragment,e),ee=!0)},o(e){M(re),M(oe),M(L.$$.fragment,e),ee=!1},d(a){a&&z(t),re&&re.d(),ne&&ne.d(),oe&&oe.d(),D(L),me&&me.d(),ge&&ge.d(),e[55](null),ae=!1,E(le)}}}let ie=!1;function se(e,t,a){let l,i,s,n,c,d;const m=["maxwidth","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall"];let g,p=C(t,m),{maxwidth:h="100%"}=t,{tagid:x}=t,{taglabel:u=""}=t,{placeholder:w="-- Placeholder --"}=t,{disabled:b=!1}=t,{size:f="m"}=t,{isvalid:$}=t,{isinvalid:v}=t,{loading:y=!1}=t,{name:M}=t,{items:k}=t,{value:I}=t,{open:_=!1}=t,{multiple:A=!1}=t,{emptysearchlabel:z="No results found"}=t,{datatextexpr:D="label"}=t,{datavalueexpr:E="value"}=t,{nosort:T=!1}=t,{clearfield:L=!1}=t,{layertitle:P="Title layer"}=t,{showmoretagslabel:B="Show more"}=t,{maxnumbertoshowtags:G=12}=t,{alltags:W=!1}=t,{selectall:R=!1}=t,{labelselectall:Y="Select all"}=t;const H=Math.random();let Z,J,V,F,X=new Q(j(),S()),q="0px",K=[],U=null;function ee(){a(20,s=A?[]:""),ie(),X.dispatch("clear",!0)}function te(e){a(20,s=s.filter((t=>t!==e))),X.dispatch("onchange",s)}function ae(){a(28,U=!0)}function le(){a(28,U=null)}function ie(){a(21,c=!1),A&&!T?function(){F=l;const e=se();F.sort(((t,a)=>{const l=e.includes(t),i=e.includes(a);return l===i?t[E]-a[E]:l<i?1:-1})),a(29,i=F)}():a(29,i=l)}function se(e){const t=e||s;return l.filter((e=>A?t.includes(e[E]):t===e[E]))}return e.$$set=e=>{t=o(o({},t),N(e)),a(62,p=C(t,m)),"maxwidth"in e&&a(0,h=e.maxwidth),"tagid"in e&&a(1,x=e.tagid),"taglabel"in e&&a(40,u=e.taglabel),"placeholder"in e&&a(2,w=e.placeholder),"disabled"in e&&a(3,b=e.disabled),"size"in e&&a(4,f=e.size),"isvalid"in e&&a(5,$=e.isvalid),"isinvalid"in e&&a(6,v=e.isinvalid),"loading"in e&&a(7,y=e.loading),"name"in e&&a(8,M=e.name),"items"in e&&a(41,k=e.items),"value"in e&&a(42,I=e.value),"open"in e&&a(43,_=e.open),"multiple"in e&&a(9,A=e.multiple),"emptysearchlabel"in e&&a(10,z=e.emptysearchlabel),"datatextexpr"in e&&a(11,D=e.datatextexpr),"datavalueexpr"in e&&a(12,E=e.datavalueexpr),"nosort"in e&&a(44,T=e.nosort),"clearfield"in e&&a(13,L=e.clearfield),"layertitle"in e&&a(14,P=e.layertitle),"showmoretagslabel"in e&&a(15,B=e.showmoretagslabel),"maxnumbertoshowtags"in e&&a(16,G=e.maxnumbertoshowtags),"alltags"in e&&a(17,W=e.alltags),"selectall"in e&&a(18,R=e.selectall),"labelselectall"in e&&a(19,Y=e.labelselectall)},e.$$.update=()=>{if(1024&e.$$.dirty[1]&&a(46,l=k?JSON.parse(k):[]),32768&e.$$.dirty[1]&&a(29,i=l),512&e.$$.dirty[0]|2048&e.$$.dirty[1]&&a(20,s=!I&&A?[]:I?JSON.parse(I):I),1048576&e.$$.dirty[0]|512&e.$$.dirty[1]&&a(30,n=()=>s.length.toString()+" "+u),1048576&e.$$.dirty[0]&&async function(e){await O(),a(27,K=se(e));const t=K.map((e=>e[D]));a(26,V=t.join(", ")),A&&a(45,J=e)}(s),16384&e.$$.dirty[1]&&async function(e){var t,l;await O(),a(25,q=Z&&e&&e.length?`${null!==(l=null===(t=null==g?void 0:g.querySelector(".mc-tag-removable"))||void 0===t?void 0:t.clientWidth)&&void 0!==l?l:8}px`:"0px")}(J),4096&e.$$.dirty[1]&&a(21,c=_),2097152&e.$$.dirty[0]){const e=c?"open":"close";X.dispatch(e,c)}a(22,d=Object.assign({},p)),4194304&e.$$.dirty[0]&&delete d.class},[h,x,w,b,f,$,v,y,M,A,z,D,E,L,P,B,G,W,R,Y,s,c,d,g,Z,q,V,K,U,i,n,H,ee,te,ae,le,ie,function(){X.dispatch("onchange",s),A||ie()},function(){X.dispatch("scrollend",!0)},function(e){X.dispatch("select-all",e.detail)},u,k,I,_,T,J,l,function(e){r[e?"unshift":"push"]((()=>{Z=e,a(24,Z)}))},()=>{ee()},()=>a(21,c=!c),function(e){s=e,a(20,s),a(42,I),a(9,A)},e=>te(e.id),()=>ae(),e=>te(e.id),()=>le(),function(e){r[e?"unshift":"push"]((()=>{g=e,a(23,g)}))}]}class re extends e{constructor(e){super();const r=document.createElement("style");r.textContent=".mc-select{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px);background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\");background-color:#ffffff;background-repeat:no-repeat;background-size:1rem 1rem, 1.5rem 1.5rem;border:1px solid #808080;border-radius:4px;color:#333333;-webkit-transition:border-color 200ms ease, -webkit-box-shadow 200ms ease;transition:border-color 200ms ease, -webkit-box-shadow 200ms ease;transition:border-color 200ms ease, box-shadow 200ms ease;transition:border-color 200ms ease, box-shadow 200ms ease, -webkit-box-shadow 200ms ease;width:100%}.mc-select[type=number]::-webkit-inner-spin-button,.mc-select[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-select[type=number]{-moz-appearance:textfield}.mc-select[type=search]::-webkit-search-decoration:hover,.mc-select[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-select::-ms-expand{display:none}.mc-select.is-hover,.mc-select:hover{border-color:#191919}.mc-select.is-focus,.mc-select:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-select:disabled{background-color:#e6e6e6;border-color:#e6e6e6;color:#808080;cursor:not-allowed;opacity:1}.mc-select.is-invalid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\"), url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==\");border-color:#c61112}.mc-select.is-valid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\"), url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+\");border-color:#46a610}.mc-select--s{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}@media screen and (min-width: 680px){.mc-select--s\\@from-m{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-m{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1024px){.mc-select--s\\@from-l{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-l{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1280px){.mc-select--s\\@from-xl{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-xl{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1920px){.mc-select--s\\@from-xxl{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-xxl{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}.mc-dropdown{-ms-flex-item-align:start;align-self:start;position:relative;min-width:18rem;max-width:var(--dropdown-width, auto);width:100%}.mc-dropdown__tag,.mc-dropdown__tools{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.mc-dropdown__tag{left:0.75rem}.mc-dropdown__trigger{display:block;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.mc-dropdown__trigger.is-open{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M2 10.5a1 1 0 01.29-.71l5-5a1 1 0 011.42 0l5 5a1 1 0 01-1.42 1.42L8 6.91l-4.29 4.3a1 1 0 01-1.42 0A1 1 0 012 10.5z'/%3E%3C/svg%3E\")}.mc-dropdown__tools{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;right:2.5rem}.is-valid+.mc-dropdown__tools,.is-invalid+.mc-dropdown__tools{right:4.5rem}.mc-dropdown__clear{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;-webkit-transition:-webkit-box-shadow 150ms ease;transition:-webkit-box-shadow 150ms ease;transition:box-shadow 150ms ease;transition:box-shadow 150ms ease, -webkit-box-shadow 150ms ease;background:none;border-radius:50%}.mc-dropdown__clear:focus{-webkit-box-shadow:0 0 0 2px #0b96cc;box-shadow:0 0 0 2px #0b96cc}.mc-dropdown__clear,.mc-dropdown__clear-icon{height:1.5rem;width:1.5rem}.mc-dropdown__clear-icon{fill:#666666}.mc-dropdown__clear-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-dropdown--multi .mc-dropdown__trigger{padding-left:calc(0.75rem + var(--dropdown-tag-width, 0px))}.mc-dropdown{min-width:auto}.mc-dropdown__tag{position:absolute !important}.mc-dropdown--multi .mc-dropdown__trigger{padding-left:calc(0.75rem + var(--dropdown-tag-width)) !important}.tags-selected{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tag-selected{margin-top:1em;margin-left:5px;margin-right:5px}",this.shadowRoot.appendChild(r),t(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},se,le,s,{maxwidth:0,tagid:1,taglabel:40,placeholder:2,disabled:3,size:4,isvalid:5,isinvalid:6,loading:7,name:8,items:41,value:42,open:43,multiple:9,emptysearchlabel:10,datatextexpr:11,datavalueexpr:12,nosort:44,clearfield:13,layertitle:14,showmoretagslabel:15,maxnumbertoshowtags:16,alltags:17,selectall:18,labelselectall:19},null,[-1,-1,-1]),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),i()))}static get observedAttributes(){return["maxwidth","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall"]}get maxwidth(){return this.$$.ctx[0]}set maxwidth(e){this.$$set({maxwidth:e}),i()}get tagid(){return this.$$.ctx[1]}set tagid(e){this.$$set({tagid:e}),i()}get taglabel(){return this.$$.ctx[40]}set taglabel(e){this.$$set({taglabel:e}),i()}get placeholder(){return this.$$.ctx[2]}set placeholder(e){this.$$set({placeholder:e}),i()}get disabled(){return this.$$.ctx[3]}set disabled(e){this.$$set({disabled:e}),i()}get size(){return this.$$.ctx[4]}set size(e){this.$$set({size:e}),i()}get isvalid(){return this.$$.ctx[5]}set isvalid(e){this.$$set({isvalid:e}),i()}get isinvalid(){return this.$$.ctx[6]}set isinvalid(e){this.$$set({isinvalid:e}),i()}get loading(){return this.$$.ctx[7]}set loading(e){this.$$set({loading:e}),i()}get name(){return this.$$.ctx[8]}set name(e){this.$$set({name:e}),i()}get items(){return this.$$.ctx[41]}set items(e){this.$$set({items:e}),i()}get value(){return this.$$.ctx[42]}set value(e){this.$$set({value:e}),i()}get open(){return this.$$.ctx[43]}set open(e){this.$$set({open:e}),i()}get multiple(){return this.$$.ctx[9]}set multiple(e){this.$$set({multiple:e}),i()}get emptysearchlabel(){return this.$$.ctx[10]}set emptysearchlabel(e){this.$$set({emptysearchlabel:e}),i()}get datatextexpr(){return this.$$.ctx[11]}set datatextexpr(e){this.$$set({datatextexpr:e}),i()}get datavalueexpr(){return this.$$.ctx[12]}set datavalueexpr(e){this.$$set({datavalueexpr:e}),i()}get nosort(){return this.$$.ctx[44]}set nosort(e){this.$$set({nosort:e}),i()}get clearfield(){return this.$$.ctx[13]}set clearfield(e){this.$$set({clearfield:e}),i()}get layertitle(){return this.$$.ctx[14]}set layertitle(e){this.$$set({layertitle:e}),i()}get showmoretagslabel(){return this.$$.ctx[15]}set showmoretagslabel(e){this.$$set({showmoretagslabel:e}),i()}get maxnumbertoshowtags(){return this.$$.ctx[16]}set maxnumbertoshowtags(e){this.$$set({maxnumbertoshowtags:e}),i()}get alltags(){return this.$$.ctx[17]}set alltags(e){this.$$set({alltags:e}),i()}get selectall(){return this.$$.ctx[18]}set selectall(e){this.$$set({selectall:e}),i()}get labelselectall(){return this.$$.ctx[19]}set labelselectall(e){this.$$set({labelselectall:e}),i()}}export{re as default};
|
|
1
|
+
import{S as e,i as t,a,b as l,f as i,s,c as r,e as n,d as o,t as c,n as d,h as m,k as g,L as p,j as h,l as u,m as x,M as w,A as b,y as f,z as $,o as v,p as y,q as M,O as k,r as I,v as _,w as A,x as z,D,E,F as C,P as j,J as S,K as N,N as T,Q as L,R as P,C as B,B as G,T as O}from"../../index-48da6c1f.js";import{E as Q}from"../../EventHandler-f7ee47ca.js";import{c as W}from"../../ClickOutside-63071e7a.js";import R from"../tag/Tag.nested.js";import Y from"../loader/Loader.nested.js";import H from"../listbox/Listbox.nested.js";function Z(e,t,a){const l=e.slice();return l[63]=t[a],l}function J(e,t,a){const l=e.slice();return l[63]=t[a],l[67]=a,l}function V(e){let t,a,l={id:e[1]?e[1]:`autocompleteTag-${e[31]}`,class:"mc-dropdown__tag",label:e[30](),size:"s",type:"removable",dark:!1,disabled:!1,href:"",name:"",selected:!1,value:""};return t=new R({props:l}),e[47](t),t.$on("tag-removed",e[32]),{c(){D(t.$$.fragment)},m(e,l){E(t,e,l),a=!0},p(e,a){const l={};2&a[0]&&(l.id=e[1]?e[1]:`autocompleteTag-${e[31]}`),1073741824&a[0]&&(l.label=e[30]()),t.$set(l)},i(e){a||(b(t.$$.fragment,e),a=!0)},o(e){f(t.$$.fragment,e),a=!1},d(a){e[47](null),C(t,a)}}}function F(e){let t,a;return t=new Y({props:{size:"s",theme:"primary",text:"",class:"mc-dropdown__loader"}}),{c(){D(t.$$.fragment)},m(e,l){E(t,e,l),a=!0},i(e){a||(b(t.$$.fragment,e),a=!0)},o(e){f(t.$$.fragment,e),a=!1},d(e){C(t,e)}}}function X(e){let t,a,i;return{c(){t=n("button"),t.innerHTML="<navigation-control-tag--cross-24px></navigation-control-tag--cross-24px>",m(t,"class","mc-dropdown__clear"),m(t,"type","button")},m(s,r){l(s,t,r),a||(i=x(t,"click",j(e[49])),a=!0)},p:d,d(e){e&&M(t),a=!1,i()}}}function q(e){let t,a,l;function i(t){e[50](t)}let s={items:JSON.stringify(e[29]),name:e[8],multiple:e[9],isfiltered:se,emptysearchlabel:e[10],maxwidth:e[0],datatextexpr:e[11],datavalueexpr:e[12],selectall:e[18],labelselectall:e[19],overlay:!0,width:"100%"};return void 0!==e[20]&&(s.value=e[20]),t=new H({props:s}),S.push((()=>N(t,"value",i))),t.$on("change",e[37]),t.$on("scrollend",e[38]),t.$on("select-all",e[39]),{c(){D(t.$$.fragment)},m(e,a){E(t,e,a),l=!0},p(e,l){const i={};536870912&l[0]&&(i.items=JSON.stringify(e[29])),256&l[0]&&(i.name=e[8]),512&l[0]&&(i.multiple=e[9]),1024&l[0]&&(i.emptysearchlabel=e[10]),1&l[0]&&(i.maxwidth=e[0]),2048&l[0]&&(i.datatextexpr=e[11]),4096&l[0]&&(i.datavalueexpr=e[12]),262144&l[0]&&(i.selectall=e[18]),524288&l[0]&&(i.labelselectall=e[19]),!a&&1048576&l[0]&&(a=!0,i.value=e[20],T((()=>a=!1))),t.$set(i)},i(e){l||(b(t.$$.fragment,e),l=!0)},o(e){f(t.$$.fragment,e),l=!1},d(e){C(t,e)}}}function K(e){let t,a,i=e[27],s=[];for(let t=0;t<i.length;t+=1)s[t]=ee(J(e,i,t));let r=e[20].length>e[16]&&te(e);return{c(){t=n("div");for(let e=0;e<s.length;e+=1)s[e].c();a=o(),r&&r.c(),m(t,"class","tags-selected")},m(e,i){l(e,t,i);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,null);u(t,a),r&&r.m(t,null)},p(e,l){if(134283264&l[0]|4&l[1]){let r;for(i=e[27],r=0;r<i.length;r+=1){const n=J(e,i,r);s[r]?s[r].p(n,l):(s[r]=ee(n),s[r].c(),s[r].m(t,a))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}e[20].length>e[16]?r?r.p(e,l):(r=te(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&M(t),L(s,e),r&&r.d()}}}function U(e){let t,a,i,s,r,o;function c(){return e[51](e[63])}return{c(){t=n("div"),a=n("m-tag"),B(a,"id",i=e[63].id),B(a,"label",s=e[63].label),B(a,"size","s"),B(a,"type","removable"),m(t,"class","tag-selected")},m(e,i){l(e,t,i),u(t,a),r||(o=x(a,"tag-removed",c),r=!0)},p(t,l){e=t,134217728&l[0]&&i!==(i=e[63].id)&&B(a,"id",i),134217728&l[0]&&s!==(s=e[63].label)&&B(a,"label",s)},d(e){e&&M(t),r=!1,o()}}}function ee(e){let t,a=e[67]<e[16]&&U(e);return{c(){a&&a.c(),t=P()},m(e,i){a&&a.m(e,i),l(e,t,i)},p(e,l){e[67]<e[16]?a?a.p(e,l):(a=U(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},d(e){a&&a.d(e),e&&M(t)}}}function te(e){let t,a,i,s,r;return{c(){t=n("div"),a=n("m-tag"),B(a,"id","id-tag"),B(a,"label",i="("+e[20].length+") "+e[15]+" "),B(a,"size","s"),B(a,"type","link"),m(t,"class","tag-selected")},m(i,n){l(i,t,n),u(t,a),s||(r=x(a,"tag-selected",e[52]),s=!0)},p(e,t){1081344&t[0]&&i!==(i="("+e[20].length+") "+e[15]+" ")&&B(a,"label",i)},d(e){e&&M(t),s=!1,r()}}}function ae(e){let t,a,i,s,r,o,c=e[27],d=[];for(let t=0;t<c.length;t+=1)d[t]=le(Z(e,c,t));return{c(){t=n("div"),a=n("m-layer"),i=n("small"),s=n("div");for(let e=0;e<d.length;e+=1)d[e].c();m(s,"class","tags-selected"),m(i,"slot","content"),B(a,"title",e[14]),B(a,"layertitletag","h3"),B(a,"isopen",e[28])},m(n,c){l(n,t,c),u(t,a),u(a,i),u(i,s);for(let e=0;e<d.length;e+=1)d[e]&&d[e].m(s,null);r||(o=x(a,"layer-closed",e[54]),r=!0)},p(e,t){if(134217728&t[0]|4&t[1]){let a;for(c=e[27],a=0;a<c.length;a+=1){const l=Z(e,c,a);d[a]?d[a].p(l,t):(d[a]=le(l),d[a].c(),d[a].m(s,null))}for(;a<d.length;a+=1)d[a].d(1);d.length=c.length}16384&t[0]&&B(a,"title",e[14]),268435456&t[0]&&B(a,"isopen",e[28])},d(e){e&&M(t),L(d,e),r=!1,o()}}}function le(e){let t,a,i,s,r,c,d;function g(){return e[53](e[63])}return{c(){t=n("div"),a=n("m-tag"),r=o(),B(a,"id",i=e[63].id),B(a,"label",s=e[63].label),B(a,"size","s"),B(a,"type","removable"),m(t,"class","tag-selected")},m(e,i){l(e,t,i),u(t,a),u(t,r),c||(d=x(a,"tag-removed",g),c=!0)},p(t,l){e=t,134217728&l[0]&&i!==(i=e[63].id)&&B(a,"id",i),134217728&l[0]&&s!==(s=e[63].label)&&B(a,"label",s)},d(e){e&&M(t),c=!1,d()}}}function ie(e){let t,a,i,s,I,_,A,z,D,E,C,j,S,N,T,L,P,B,O,Q,R,Y=(e[26]?e[26]:e[2])+"",H=e[9]&&e[20].length>0&&!e[17]&&V(e),Z=e[7]&&F(),J=!e[9]&&e[26]&&e[13]&&X(e),U=e[21]&&q(e),ee=e[9]&&e[17]&&K(e),te=e[9]&&e[17]&&ae(e),le=[{class:"mc-dropdown"},{style:B="--dropdown-tag-width: "+e[25]+"; --dropdown-width: "+e[0]+";"},e[22]],ie={};for(let e=0;e<le.length;e+=1)ie=r(ie,le[e]);return{c(){t=n("div"),a=n("div"),H&&H.c(),i=o(),s=n("button"),I=c(Y),_=o(),A=n("div"),Z&&Z.c(),z=o(),J&&J.c(),D=o(),U&&U.c(),E=o(),ee&&ee.c(),C=o(),j=n("span"),S=o(),N=n("span"),T=o(),L=n("span"),P=o(),te&&te.c(),this.c=d,m(s,"type","button"),m(s,"class","mc-select mc-dropdown__trigger"),s.disabled=e[3],g(s,"is-open",e[21]),g(s,"is-valid",e[5]),g(s,"is-invalid",e[6]),g(s,"mc-select--s","s"===e[4]),m(A,"class","mc-dropdown__tools"),m(a,"class","mc-dropdown__main"),m(j,"class","mc-dropdown__tag"),p(j,"display","none"),m(N,"class","mc-dropdown__loader"),p(N,"display","none"),m(L,"class","mc-text-input mc-dropdown__trigger"),p(L,"display","none"),h(t,ie),g(t,"mc-dropdown--multi",e[9])},m(r,n){l(r,t,n),u(t,a),H&&H.m(a,null),u(a,i),u(a,s),u(s,I),u(a,_),u(a,A),Z&&Z.m(A,null),u(A,z),J&&J.m(A,null),u(t,D),U&&U.m(t,null),u(t,E),ee&&ee.m(t,null),u(t,C),u(t,j),u(t,S),u(t,N),u(t,T),u(t,L),u(t,P),te&&te.m(t,null),e[55](t),O=!0,Q||(R=[x(s,"click",e[48]),w(W.call(null,t)),x(t,"outclick",e[36])],Q=!0)},p(e,l){e[9]&&e[20].length>0&&!e[17]?H?(H.p(e,l),1180160&l[0]&&b(H,1)):(H=V(e),H.c(),b(H,1),H.m(a,i)):H&&(G(),f(H,1,1,(()=>{H=null})),$()),(!O||67108868&l[0])&&Y!==(Y=(e[26]?e[26]:e[2])+"")&&v(I,Y),(!O||8&l[0])&&(s.disabled=e[3]),(!O||2097152&l[0])&&g(s,"is-open",e[21]),(!O||32&l[0])&&g(s,"is-valid",e[5]),(!O||64&l[0])&&g(s,"is-invalid",e[6]),(!O||16&l[0])&&g(s,"mc-select--s","s"===e[4]),e[7]?Z?128&l[0]&&b(Z,1):(Z=F(),Z.c(),b(Z,1),Z.m(A,z)):Z&&(G(),f(Z,1,1,(()=>{Z=null})),$()),!e[9]&&e[26]&&e[13]?J?J.p(e,l):(J=X(e),J.c(),J.m(A,null)):J&&(J.d(1),J=null),e[21]?U?(U.p(e,l),2097152&l[0]&&b(U,1)):(U=q(e),U.c(),b(U,1),U.m(t,E)):U&&(G(),f(U,1,1,(()=>{U=null})),$()),e[9]&&e[17]?ee?ee.p(e,l):(ee=K(e),ee.c(),ee.m(t,C)):ee&&(ee.d(1),ee=null),e[9]&&e[17]?te?te.p(e,l):(te=ae(e),te.c(),te.m(t,null)):te&&(te.d(1),te=null),h(t,ie=y(le,[{class:"mc-dropdown"},(!O||33554433&l[0]&&B!==(B="--dropdown-tag-width: "+e[25]+"; --dropdown-width: "+e[0]+";"))&&{style:B},4194304&l[0]&&e[22]])),g(t,"mc-dropdown--multi",e[9])},i(e){O||(b(H),b(Z),b(U),O=!0)},o(e){f(H),f(Z),f(U),O=!1},d(a){a&&M(t),H&&H.d(),Z&&Z.d(),J&&J.d(),U&&U.d(),ee&&ee.d(),te&&te.d(),e[55](null),Q=!1,k(R)}}}let se=!1;function re(e,t,a){let l,i,s,n,o,c;const d=["maxwidth","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall"];let m,g=I(t,d),{maxwidth:p="100%"}=t,{tagid:h}=t,{taglabel:u=""}=t,{placeholder:x="-- Placeholder --"}=t,{disabled:w=!1}=t,{size:b="m"}=t,{isvalid:f}=t,{isinvalid:$}=t,{loading:v=!1}=t,{name:y}=t,{items:M}=t,{value:k}=t,{open:D=!1}=t,{multiple:E=!1}=t,{emptysearchlabel:C="No results found"}=t,{datatextexpr:j="label"}=t,{datavalueexpr:N="value"}=t,{nosort:T=!1}=t,{clearfield:L=!1}=t,{layertitle:P="Title layer"}=t,{showmoretagslabel:B="Show more"}=t,{maxnumbertoshowtags:G=12}=t,{alltags:W=!1}=t,{selectall:R=!1}=t,{labelselectall:Y="Select all"}=t;const H=Math.random();let Z,J,V,F,X=new Q(_(),A()),q="0px",K=[],U=null;function ee(){a(20,s=E?[]:""),ie(),X.dispatch("clear",!0)}function te(e){a(20,s=s.filter((t=>t!==e))),X.dispatch("onchange",s)}function ae(){a(28,U=!0)}function le(){a(28,U=null)}function ie(){a(21,o=!1),E&&!T?function(){F=l;const e=se();F.sort(((t,a)=>{const l=e.includes(t),i=e.includes(a);return l===i?t[N]-a[N]:l<i?1:-1})),a(29,i=F)}():a(29,i=l)}function se(e){const t=e||s;return l.filter((e=>E?t.includes(e[N]):t===e[N]))}return e.$$set=e=>{t=r(r({},t),z(e)),a(62,g=I(t,d)),"maxwidth"in e&&a(0,p=e.maxwidth),"tagid"in e&&a(1,h=e.tagid),"taglabel"in e&&a(40,u=e.taglabel),"placeholder"in e&&a(2,x=e.placeholder),"disabled"in e&&a(3,w=e.disabled),"size"in e&&a(4,b=e.size),"isvalid"in e&&a(5,f=e.isvalid),"isinvalid"in e&&a(6,$=e.isinvalid),"loading"in e&&a(7,v=e.loading),"name"in e&&a(8,y=e.name),"items"in e&&a(41,M=e.items),"value"in e&&a(42,k=e.value),"open"in e&&a(43,D=e.open),"multiple"in e&&a(9,E=e.multiple),"emptysearchlabel"in e&&a(10,C=e.emptysearchlabel),"datatextexpr"in e&&a(11,j=e.datatextexpr),"datavalueexpr"in e&&a(12,N=e.datavalueexpr),"nosort"in e&&a(44,T=e.nosort),"clearfield"in e&&a(13,L=e.clearfield),"layertitle"in e&&a(14,P=e.layertitle),"showmoretagslabel"in e&&a(15,B=e.showmoretagslabel),"maxnumbertoshowtags"in e&&a(16,G=e.maxnumbertoshowtags),"alltags"in e&&a(17,W=e.alltags),"selectall"in e&&a(18,R=e.selectall),"labelselectall"in e&&a(19,Y=e.labelselectall)},e.$$.update=()=>{if(1024&e.$$.dirty[1]&&a(46,l=M?JSON.parse(M):[]),32768&e.$$.dirty[1]&&a(29,i=l),512&e.$$.dirty[0]|2048&e.$$.dirty[1]&&a(20,s=!k&&E?[]:k?JSON.parse(k):k),1048576&e.$$.dirty[0]|512&e.$$.dirty[1]&&a(30,n=()=>s.length.toString()+" "+u),1048576&e.$$.dirty[0]&&async function(e){await O(),a(27,K=se(e));const t=K.map((e=>e[j]));a(26,V=t.join(", ")),E&&a(45,J=e)}(s),16384&e.$$.dirty[1]&&async function(e){var t,l;await O(),a(25,q=Z&&e&&e.length?`${null!==(l=null===(t=null==m?void 0:m.querySelector(".mc-tag-removable"))||void 0===t?void 0:t.clientWidth)&&void 0!==l?l:8}px`:"0px")}(J),4096&e.$$.dirty[1]&&a(21,o=D),2097152&e.$$.dirty[0]){const e=o?"open":"close";X.dispatch(e,o)}a(22,c=Object.assign({},g)),4194304&e.$$.dirty[0]&&delete c.class},[p,h,x,w,b,f,$,v,y,E,C,j,N,L,P,B,G,W,R,Y,s,o,c,m,Z,q,V,K,U,i,n,H,ee,te,ae,le,ie,function(){X.dispatch("onchange",s),E||ie()},function(){X.dispatch("scrollend",!0)},function(e){X.dispatch("select-all",e.detail)},u,M,k,D,T,J,l,function(e){S[e?"unshift":"push"]((()=>{Z=e,a(24,Z)}))},()=>a(21,o=!o),()=>{ee()},function(e){s=e,a(20,s),a(42,k),a(9,E)},e=>te(e.id),()=>ae(),e=>te(e.id),()=>le(),function(e){S[e?"unshift":"push"]((()=>{m=e,a(23,m)}))}]}class ne extends e{constructor(e){super();const r=document.createElement("style");r.textContent=".mc-select{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px);background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\");background-color:#ffffff;background-repeat:no-repeat;background-size:1rem 1rem, 1.5rem 1.5rem;border:1px solid #808080;border-radius:4px;color:#333333;-webkit-transition:border-color 200ms ease, -webkit-box-shadow 200ms ease;transition:border-color 200ms ease, -webkit-box-shadow 200ms ease;transition:border-color 200ms ease, box-shadow 200ms ease;transition:border-color 200ms ease, box-shadow 200ms ease, -webkit-box-shadow 200ms ease;width:100%}.mc-select[type=number]::-webkit-inner-spin-button,.mc-select[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-select[type=number]{-moz-appearance:textfield}.mc-select[type=search]::-webkit-search-decoration:hover,.mc-select[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-select::-ms-expand{display:none}.mc-select.is-hover,.mc-select:hover{border-color:#191919}.mc-select.is-focus,.mc-select:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-select:disabled{background-color:#e6e6e6;border-color:#e6e6e6;color:#808080;cursor:not-allowed;opacity:1}.mc-select.is-invalid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\"), url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==\");border-color:#c61112}.mc-select.is-valid{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23333333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E\"), url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+\");border-color:#46a610}.mc-select--s{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}@media screen and (min-width: 680px){.mc-select--s\\@from-m{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-m{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1024px){.mc-select--s\\@from-l{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-l{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1280px){.mc-select--s\\@from-xl{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-xl{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}@media screen and (min-width: 1920px){.mc-select--s\\@from-xxl{font-size:0.875rem;line-height:1.1428571429;background-position:right 0.5rem center, right 2rem center;padding:calc(0.5rem - 1px) 2rem calc(0.5rem - 1px) calc(0.5rem - 1px)}.mc-select--m\\@from-xxl{font-size:1rem;line-height:1.125;background-position:right 1rem center, right 2.5rem center;padding:calc(0.9375rem - 1px) 3rem calc(0.9375rem - 1px) calc(0.75rem - 1px)}}.mc-dropdown{-ms-flex-item-align:start;align-self:start;position:relative;min-width:18rem;max-width:var(--dropdown-width, auto);width:100%}.mc-dropdown__tag,.mc-dropdown__tools{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.mc-dropdown__tag{left:0.75rem}.mc-dropdown__trigger{display:block;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.mc-dropdown__trigger.is-open{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M2 10.5a1 1 0 01.29-.71l5-5a1 1 0 011.42 0l5 5a1 1 0 01-1.42 1.42L8 6.91l-4.29 4.3a1 1 0 01-1.42 0A1 1 0 012 10.5z'/%3E%3C/svg%3E\")}.mc-dropdown__tools{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;right:2.5rem}.is-valid+.mc-dropdown__tools,.is-invalid+.mc-dropdown__tools{right:4.5rem}.mc-dropdown__clear{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;-webkit-transition:-webkit-box-shadow 150ms ease;transition:-webkit-box-shadow 150ms ease;transition:box-shadow 150ms ease;transition:box-shadow 150ms ease, -webkit-box-shadow 150ms ease;background:none;border-radius:50%}.mc-dropdown__clear:focus{-webkit-box-shadow:0 0 0 2px #0b96cc;box-shadow:0 0 0 2px #0b96cc}.mc-dropdown__clear,.mc-dropdown__clear-icon{height:1.5rem;width:1.5rem}.mc-dropdown__clear-icon{fill:#666666}.mc-dropdown__clear-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-dropdown--multi .mc-dropdown__trigger{padding-left:calc(0.75rem + var(--dropdown-tag-width, 0px))}.mc-dropdown{min-width:auto}.mc-dropdown__tag{position:absolute !important}.mc-dropdown--multi .mc-dropdown__trigger{padding-left:calc(0.75rem + var(--dropdown-tag-width)) !important}.tags-selected{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tag-selected{margin-top:1em;margin-left:5px;margin-right:5px}",this.shadowRoot.appendChild(r),t(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},re,ie,s,{maxwidth:0,tagid:1,taglabel:40,placeholder:2,disabled:3,size:4,isvalid:5,isinvalid:6,loading:7,name:8,items:41,value:42,open:43,multiple:9,emptysearchlabel:10,datatextexpr:11,datavalueexpr:12,nosort:44,clearfield:13,layertitle:14,showmoretagslabel:15,maxnumbertoshowtags:16,alltags:17,selectall:18,labelselectall:19},null,[-1,-1,-1]),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),i()))}static get observedAttributes(){return["maxwidth","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall"]}get maxwidth(){return this.$$.ctx[0]}set maxwidth(e){this.$$set({maxwidth:e}),i()}get tagid(){return this.$$.ctx[1]}set tagid(e){this.$$set({tagid:e}),i()}get taglabel(){return this.$$.ctx[40]}set taglabel(e){this.$$set({taglabel:e}),i()}get placeholder(){return this.$$.ctx[2]}set placeholder(e){this.$$set({placeholder:e}),i()}get disabled(){return this.$$.ctx[3]}set disabled(e){this.$$set({disabled:e}),i()}get size(){return this.$$.ctx[4]}set size(e){this.$$set({size:e}),i()}get isvalid(){return this.$$.ctx[5]}set isvalid(e){this.$$set({isvalid:e}),i()}get isinvalid(){return this.$$.ctx[6]}set isinvalid(e){this.$$set({isinvalid:e}),i()}get loading(){return this.$$.ctx[7]}set loading(e){this.$$set({loading:e}),i()}get name(){return this.$$.ctx[8]}set name(e){this.$$set({name:e}),i()}get items(){return this.$$.ctx[41]}set items(e){this.$$set({items:e}),i()}get value(){return this.$$.ctx[42]}set value(e){this.$$set({value:e}),i()}get open(){return this.$$.ctx[43]}set open(e){this.$$set({open:e}),i()}get multiple(){return this.$$.ctx[9]}set multiple(e){this.$$set({multiple:e}),i()}get emptysearchlabel(){return this.$$.ctx[10]}set emptysearchlabel(e){this.$$set({emptysearchlabel:e}),i()}get datatextexpr(){return this.$$.ctx[11]}set datatextexpr(e){this.$$set({datatextexpr:e}),i()}get datavalueexpr(){return this.$$.ctx[12]}set datavalueexpr(e){this.$$set({datavalueexpr:e}),i()}get nosort(){return this.$$.ctx[44]}set nosort(e){this.$$set({nosort:e}),i()}get clearfield(){return this.$$.ctx[13]}set clearfield(e){this.$$set({clearfield:e}),i()}get layertitle(){return this.$$.ctx[14]}set layertitle(e){this.$$set({layertitle:e}),i()}get showmoretagslabel(){return this.$$.ctx[15]}set showmoretagslabel(e){this.$$set({showmoretagslabel:e}),i()}get maxnumbertoshowtags(){return this.$$.ctx[16]}set maxnumbertoshowtags(e){this.$$set({maxnumbertoshowtags:e}),i()}get alltags(){return this.$$.ctx[17]}set alltags(e){this.$$set({alltags:e}),i()}get selectall(){return this.$$.ctx[18]}set selectall(e){this.$$set({selectall:e}),i()}get labelselectall(){return this.$$.ctx[19]}set labelselectall(e){this.$$set({labelselectall:e}),i()}}export{ne as default};
|
|
2
2
|
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../../src/components/dropdown/Dropdown.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { tick } from 'svelte';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { clickOutside } from '../../utilities/ClickOutside';\n import type { ListboxItems } from '../listbox/listbox.types';\n import type { SelectSize } from '../select/select.types';\n\n import Tag from '../tag/Tag.nested.svelte';\n import Loader from '../loader/Loader.nested.svelte';\n import Listbox from '../listbox/Listbox.nested.svelte';\n\n export let maxwidth = '100%';\n export let tagid: string;\n export let taglabel = '';\n export let placeholder = '-- Placeholder --';\n export let disabled = false;\n export let size: SelectSize = 'm';\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let loading = false;\n export let name: string;\n export let items: string;\n export let value: any;\n export let open = false;\n export let multiple = false;\n export let emptysearchlabel = 'No results found';\n export let datatextexpr = 'label';\n export let datavalueexpr = 'value';\n export let nosort = false;\n export let clearfield = false;\n export let layertitle = 'Title layer';\n export let showmoretagslabel = 'Show more';\n export let maxnumbertoshowtags = 12;\n export let alltags = false;\n export let selectall = false;\n export let labelselectall = 'Select all';\n\n let component: HTMLDivElement;\n const uuid = Math.random();\n let eventHandler = new EventHandler(\n get_current_component(),\n createEventDispatcher(),\n );\n let tag: any;\n let tagWidth = '0px';\n let tagValue: any;\n let buttonvalue: string;\n let sortedListItems: any;\n let isfiltered = false;\n let selectedItems: ListboxItems[] = [];\n let openLayer: any = null;\n\n $: parsedItems = items ? (JSON.parse(items) as ListboxItems[]) : [];\n $: localItems = parsedItems;\n $: listboxValue = !value && multiple ? [] : value ? JSON.parse(value) : value;\n $: setTagLabel = () => {\n return listboxValue.length.toString() + ' ' + taglabel;\n };\n $: watchListboxValue(listboxValue);\n $: setTagWidth(tagValue);\n $: openState = open;\n $: {\n const eventName = openState ? 'open' : 'close';\n eventHandler.dispatch(eventName, openState);\n }\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n function clearListbox() {\n listboxValue = multiple ? [] : '';\n closeListBox();\n eventHandler.dispatch('clear', true);\n }\n\n function removeTagSelected(itemSelectedId: any) {\n listboxValue = listboxValue.filter(\n (value: any) => value !== itemSelectedId,\n );\n eventHandler.dispatch('onchange', listboxValue);\n }\n\n function openLayerFn() {\n openLayer = true;\n }\n\n function closeLayerFn() {\n openLayer = null;\n }\n\n function closeListBox() {\n openState = false;\n\n if (multiple && !nosort) {\n sortItems();\n } else {\n localItems = parsedItems;\n }\n }\n\n function onChange() {\n eventHandler.dispatch('onchange', listboxValue);\n\n if (!multiple) {\n closeListBox();\n }\n }\n\n function getSelectedItems(val?: any) {\n const value = val ? val : listboxValue;\n\n const selectedItems = parsedItems.filter((item: ListboxItems) => {\n return multiple\n ? value.includes(item[datavalueexpr])\n : value === item[datavalueexpr];\n });\n\n return selectedItems;\n }\n\n function sortItems() {\n sortedListItems = parsedItems;\n const selectedItems = getSelectedItems();\n\n sortedListItems.sort((a: any, b: any) => {\n const hasItemA = selectedItems.includes(a);\n const hasItemB = selectedItems.includes(b);\n\n if (hasItemA === hasItemB) {\n return a[datavalueexpr] - b[datavalueexpr];\n } else if (hasItemA < hasItemB) {\n return 1;\n } else {\n return -1;\n }\n });\n\n localItems = sortedListItems;\n }\n\n function onScrollEnd() {\n eventHandler.dispatch('scrollend', true);\n }\n\n function onSelectAll(e: CustomEvent) {\n eventHandler.dispatch('select-all', e.detail);\n }\n\n // Watch Functions\n async function watchListboxValue(value: any) {\n await tick();\n selectedItems = getSelectedItems(value);\n const seletedLabels = selectedItems.map((item) => item[datatextexpr]);\n\n buttonvalue = seletedLabels.join(', ');\n\n if (multiple) {\n tagValue = value;\n }\n }\n\n async function setTagWidth(tagValue: any) {\n await tick();\n\n tagWidth =\n tag && tagValue && tagValue.length\n ? `${\n component?.querySelector('.mc-tag-removable')?.clientWidth ?? 0 + 8\n }px`\n : '0px';\n }\n</script>\n\n<div\n class=\"mc-dropdown\"\n class:mc-dropdown--multi={multiple}\n style=\"--dropdown-tag-width: {tagWidth}; --dropdown-width: {maxwidth};\"\n use:clickOutside\n on:outclick={closeListBox}\n {...attributes}\n bind:this={component}\n>\n <div class=\"mc-dropdown__main\">\n <!-- TAG REMOVABLE -->\n {#if multiple && listboxValue.length > 0 && !alltags}\n <Tag\n id={tagid ? tagid : `autocompleteTag-${uuid}`}\n class=\"mc-dropdown__tag\"\n label={setTagLabel()}\n size=\"s\"\n type=\"removable\"\n dark={false}\n disabled={false}\n href=\"\"\n name=\"\"\n selected={false}\n value=\"\"\n bind:this={tag}\n on:tag-removed={clearListbox}\n />\n {/if}\n\n <!-- TRIGGER BUTTON -->\n <button\n type=\"button\"\n class=\"mc-select mc-dropdown__trigger\"\n class:is-open={openState}\n class:is-valid={isvalid}\n class:is-invalid={isinvalid}\n class:mc-select--s={size === 's'}\n {disabled}\n on:click={() => (openState = !openState)}\n >\n {buttonvalue ? buttonvalue : placeholder}\n {#if !multiple && buttonvalue && clearfield}\n <button\n class=\"mc-dropdown__clear\"\n type=\"button\"\n on:click|stopPropagation={() => {\n clearListbox();\n }}\n >\n <navigation-control-tag--cross-24px />\n </button>\n {/if}\n </button>\n\n <div class=\"mc-dropdown__tools\">\n <!-- LOADER -->\n {#if loading}\n <Loader size=\"s\" theme=\"primary\" text=\"\" class=\"mc-dropdown__loader\" />\n {/if}\n </div>\n </div>\n\n <!-- LISTBOX -->\n <Listbox\n items={JSON.stringify(localItems)}\n open={openState}\n {name}\n {multiple}\n {isfiltered}\n {emptysearchlabel}\n {maxwidth}\n {datatextexpr}\n {datavalueexpr}\n {selectall}\n {labelselectall}\n bind:value={listboxValue}\n on:change={onChange}\n on:scrollend={onScrollEnd}\n on:select-all={onSelectAll}\n />\n\n {#if multiple && alltags}\n <div class=\"tags-selected\">\n {#each selectedItems as selectedItem, index}\n {#if index < maxnumbertoshowtags}\n <div class=\"tag-selected\">\n <m-tag\n id={selectedItem.id}\n label={selectedItem.label}\n size=\"s\"\n type=\"removable\"\n on:tag-removed={() => removeTagSelected(selectedItem.id)}\n />\n </div>\n {/if}\n {/each}\n {#if listboxValue.length > maxnumbertoshowtags}\n <div class=\"tag-selected\">\n <m-tag\n id=\"id-tag\"\n label=\"({listboxValue.length}) {showmoretagslabel} \"\n size=\"s\"\n type=\"link\"\n on:tag-selected={() => openLayerFn()}\n />\n </div>\n {/if}\n </div>\n {/if}\n\n <span class=\"mc-dropdown__tag\" style=\"display:none;\" />\n <span class=\"mc-dropdown__loader\" style=\"display:none;\" />\n <span class=\"mc-text-input mc-dropdown__trigger\" style=\"display:none;\" />\n {#if multiple && alltags}\n <div>\n <m-layer\n title={layertitle}\n layertitletag=\"h3\"\n isopen={openLayer}\n on:layer-closed={() => closeLayerFn()}\n >\n <small slot=\"content\">\n <div class=\"tags-selected\">\n {#each selectedItems as selectedItem}\n <div class=\"tag-selected\">\n <m-tag\n id={selectedItem.id}\n label={selectedItem.label}\n size=\"s\"\n type=\"removable\"\n on:tag-removed={() => removeTagSelected(selectedItem.id)}\n />\n </div>\n {/each}\n </div>\n </small>\n </m-layer>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.select';\n @import '@mozaic-ds/styles/components/c.dropdown';\n\n // Dropdown\n // NOTE: These styles with the \"!important\" allow to overload the edge effects\n // due to the scoping applied by Svelte on the CSS selectors\n .mc-dropdown {\n min-width: auto;\n\n &__tag {\n position: absolute !important; // due to the Svelte CSS scope\n }\n\n &--multi {\n .mc-dropdown__trigger {\n padding-left: calc($mu075 + var(--dropdown-tag-width)) !important;\n }\n }\n }\n\n // Selected Tags\n .tags-selected {\n display: flex;\n flex-wrap: wrap;\n }\n\n .tag-selected {\n margin-top: 1em;\n margin-left: 5px;\n margin-right: 5px;\n }\n</style>\n"],"names":["ctx","insert","target","button","anchor","length","i","create_if_block_2","div","set_custom_element_data","m_tag","m_tag_id_value","id","m_tag_label_value","label","append","dirty","if_block","create_if_block_3","div1","m_layer","small","div0","if_block0","create_if_block_6","create_if_block_5","create_if_block_4","JSON","stringify","if_block3","create_if_block_1","if_block4","create_if_block","style","div2_style_value","toggle_class","div2","span0","span1","span2","set_data","t1","t1_value","current","isfiltered","component","maxwidth","$$props","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall","uuid","Math","random","tag","tagValue","buttonvalue","sortedListItems","eventHandler","EventHandler","get_current_component","createEventDispatcher","tagWidth","selectedItems","openLayer","clearListbox","listboxValue","closeListBox","dispatch","removeTagSelected","itemSelectedId","filter","openLayerFn","$$invalidate","closeLayerFn","openState","parsedItems","getSelectedItems","sort","a","b","hasItemA","includes","hasItemB","localItems","sortItems","val","item","parse","setTagLabel","toString","async","tick","seletedLabels","map","join","watchListboxValue","_b","_a","querySelector","clientWidth","setTagWidth","eventName","attributes","Object","assign","$$restProps","class","e","detail","$$value","value$1","selectedItem"],"mappings":"oqBA8LYA,EAAK,GAAGA,EAAK,sBAAsBA,EAAI,qCAEpCA,EAAW,sCAGZ,YACI,4BAGA,mEAGMA,EAAY,kFAZxBA,EAAK,GAAGA,EAAK,sBAAsBA,EAAI,iCAEpCA,EAAW,qTA2BlBC,EAQQC,EAAAC,EAAAC,mUAiCHJ,EAAa,yBAAlBK,OAAIC,GAAA,yBAaDN,EAAY,IAACK,OAASL,EAAmB,KAAAO,GAAAP,kHAdhDC,EAyBKC,EAAAM,EAAAJ,wHAxBIJ,EAAa,YAAlBK,OAAIC,GAAA,EAAA,8GAAJD,OAaGL,EAAY,IAACK,OAASL,EAAmB,gMATlCS,EAAAC,EAAA,KAAAC,EAAAX,MAAaY,IACVH,EAAAC,EAAA,QAAAG,EAAAb,MAAac,mFAHxBb,EAQKC,EAAAM,EAAAJ,GAPHW,EAMCP,EAAAE,gDALK,UAAAM,EAAA,IAAAL,KAAAA,EAAAX,MAAaY,iBACV,UAAAI,EAAA,IAAAH,KAAAA,EAAAb,MAAac,oEAJrBG,EAAAjB,MAAQA,EAAmB,KAAAkB,EAAAlB,kEAA3BA,MAAQA,EAAmB,oMAgBnBA,EAAY,IAACK,OAAM,KAAIL,EAAiB,IAAA,4EAHrDC,EAQKC,EAAAM,EAAAJ,GAPHW,EAMCP,EAAAE,0EAJUV,EAAY,IAACK,OAAM,KAAIL,EAAiB,IAAA,+EAuB1CA,EAAa,yBAAlBK,OAAIC,GAAA,qLAPHN,EAAU,4CAETA,EAAS,aAJrBC,EAuBKC,EAAAiB,EAAAf,GAtBHW,EAqBSI,EAAAC,GAfPL,EAcOK,EAAAC,GAbLN,EAYKM,EAAAC,wIAXItB,EAAa,YAAlBK,OAAIC,GAAA,EAAA,kHAAJD,+BAPCL,EAAU,kCAETA,EAAS,gJAQHS,EAAAC,EAAA,KAAAC,EAAAX,MAAaY,IACVH,EAAAC,EAAA,QAAAG,EAAAb,MAAac,mFAHxBb,EAQKC,EAAAM,EAAAJ,GAPHW,EAMCP,EAAAE,uDALK,UAAAM,EAAA,IAAAL,KAAAA,EAAAX,MAAaY,iBACV,UAAAI,EAAA,IAAAH,KAAAA,EAAAb,MAAac,wHAvF/Bd,EAAW,IAAGA,EAAW,IAAGA,EAAW,IAAA,GA7BrCuB,GAAAvB,MAAYA,EAAY,IAACK,OAAS,IAAML,EAAO,KAAAwB,EAAAxB,OA8B5CA,EAAQ,IAAIA,EAAW,KAAIA,EAAU,KAAAyB,EAAAzB,MAetCA,EAAO,IAAA0B,0CAQPC,KAAKC,UAAU5B,EAAU,UAC1BA,EAAS,iKAUS,IAAZA,EAAY,eAAZA,EAAY,sEACbA,EAAQ,uBACLA,EAAW,wBACVA,EAAW,KAGvB,IAAA6B,GAAA7B,MAAYA,EAAO,KAAA8B,EAAA9B,GAgCnB+B,GAAA/B,MAAYA,EAAO,KAAAgC,GAAAhC,8BA9GMiC,MAAAC,EAAA,yBAAAlC,6BAA8BA,EAAQ,GAAA,KAGhEA,EAAU,qYA2BKA,EAAS,oBACRA,EAAO,qBACLA,EAAS,IACPmC,EAAAhC,EAAA,eAAS,MAATH,iSAlCEA,EAAQ,YAFpCC,EA2IKC,EAAAkC,EAAAhC,GAlIHW,EAmDKqB,EAAAjB,2BA9BHJ,EAsBQI,EAAAhB,yCAERY,EAKKI,EAAAG,sEAmDPP,EAAsDqB,EAAAC,UACtDtB,EAAyDqB,EAAAE,UACzDvB,EAAwEqB,EAAAG,uGA3G3DvC,EAAY,qBAMlBA,MAAYA,EAAY,IAACK,OAAS,IAAML,EAAO,oJA6BjDA,EAAW,IAAGA,EAAW,IAAGA,EAAW,IAAA,KAAAwC,EAAAC,EAAAC,KAClC1C,EAAQ,IAAIA,EAAW,KAAIA,EAAU,yIAR5BA,EAAS,oCACRA,EAAO,qCACLA,EAAS,oBACPmC,EAAAhC,EAAA,eAAS,MAATH,MAoBfA,EAAO,yIAQP2B,KAAKC,UAAU5B,EAAU,4BAC1BA,EAAS,qSAUHA,EAAY,6BAMrBA,MAAYA,EAAO,kEAgCnBA,MAAYA,EAAO,2GA9GM2C,IAAA,SAAA3B,EAAA,IAAAkB,KAAAA,EAAA,yBAAAlC,6BAA8BA,EAAQ,GAAA,OAAA,CAAAiC,MAAAC,iBAGhElC,EAAU,gCAJYA,EAAQ,oMA7H9B,IAAA4C,IAAa,gWAXbC,YA1BOC,SAAAA,EAAW,QAAMC,SACjBC,GAAaD,GACbE,SAAAA,EAAW,IAAEF,GACbG,YAAAA,EAAc,qBAAmBH,GACjCI,SAAAA,GAAW,GAAKJ,GAChBK,KAAAA,EAAmB,KAAGL,WACtBM,GAAgBN,aAChBO,GAAkBP,GAClBQ,QAAAA,GAAU,GAAKR,QACfS,GAAYT,SACZU,GAAaV,SACbW,GAAUX,GACVY,KAAAA,GAAO,GAAKZ,GACZa,SAAAA,GAAW,GAAKb,GAChBc,iBAAAA,EAAmB,oBAAkBd,GACrCe,aAAAA,EAAe,SAAOf,GACtBgB,cAAAA,EAAgB,SAAOhB,GACvBiB,OAAAA,GAAS,GAAKjB,GACdkB,WAAAA,GAAa,GAAKlB,GAClBmB,WAAAA,EAAa,eAAanB,GAC1BoB,kBAAAA,EAAoB,aAAWpB,GAC/BqB,oBAAAA,EAAsB,IAAErB,GACxBsB,QAAAA,GAAU,GAAKtB,GACfuB,UAAAA,GAAY,GAAKvB,GACjBwB,eAAAA,EAAiB,cAAYxB,QAGlCyB,EAAOC,KAAKC,SACd,IAIAC,EAEAC,EACAC,EACAC,EARAC,EAAmB,IAAAC,EACrBC,IACAC,KAGEC,EAAW,MAKXC,EAAa,GACbC,EAAiB,cAiBZC,UACPC,EAAe3B,EAAQ,GAAQ,IAC/B4B,KACAT,EAAaU,SAAS,SAAS,GAGxB,SAAAC,GAAkBC,QACzBJ,EAAeA,EAAaK,QACzBlC,GAAeA,IAAUiC,KAE5BZ,EAAaU,SAAS,WAAYF,YAG3BM,KACPC,EAAA,GAAAT,GAAY,YAGLU,KACPD,EAAA,GAAAT,EAAY,eAGLG,KACPM,EAAA,GAAAE,GAAY,GAERpC,IAAaI,aA4BjBc,EAAkBmB,EACZ,MAAAb,EAAgBc,KAEtBpB,EAAgBqB,MAAM,CAAAC,EAAQC,KACtB,MAAAC,EAAWlB,EAAcmB,SAASH,GAClCI,EAAWpB,EAAcmB,SAASF,GAEpC,OAAAC,IAAaE,EACRJ,EAAErC,GAAiBsC,EAAEtC,GACnBuC,EAAWE,EACb,GAEC,KAIZV,EAAA,GAAAW,EAAa3B,GA3CX4B,GAEAZ,EAAA,GAAAW,EAAaR,GAYR,SAAAC,GAAiBS,GAClB,MAAAjD,EAAQiD,GAAYpB,SAEJU,EAAYL,QAAQgB,GACjChD,EACHF,EAAM6C,SAASK,EAAK7C,IACpBL,IAAUkD,EAAK7C,u/BA5DtB+B,EAAA,GAAEG,EAAcxC,EAAS9B,KAAKkF,MAAMpD,GAAK,yBACzCqC,EAAA,GAAEW,EAAaR,yCACbH,EAAA,GAAAP,GAAgB7B,GAASE,KAAgBF,EAAQ/B,KAAKkF,MAAMnD,GAASA,iDACrEoD,EAAW,IACLvB,EAAalF,OAAO0G,WAAa,IAAM9D,0BA2FjC+D,eAAkBtD,SACzBuD,SACN7B,EAAgBc,GAAiBxC,UAC3BwD,EAAgB9B,EAAc+B,KAAKP,GAASA,EAAK9C,KAEvDgC,EAAA,GAAAjB,EAAcqC,EAAcE,KAAK,OAE7BxD,GACFkC,EAAA,GAAAlB,EAAWlB,GAjGZ2D,CAAkB9B,wBAqGNyB,eAAYpC,iBACnBqC,IAENnB,EAAA,GAAAX,EACER,GAAOC,GAAYA,EAASvE,UAClC,QAAAiH,EAAA,QAAAC,EACY1E,eAAAA,EAAW2E,cAAc,4BADrC,IAAAD,SAAAA,EAC2DE,uBAD3DH,EAAAA,EAC0E,MAEhE,OA5GLI,CAAY9C,uBACdkB,EAAA,GAAEE,EAAYrC,yBACd,CACO,MAAAgE,EAAY3B,EAAY,OAAS,QACvCjB,EAAaU,SAASkC,EAAW3B,QAEhC4B,EAALC,OAAAC,UAAuBC,kCACXH,EAAWI,kGAiCnBjD,EAAaU,SAAS,WAAYF,GAE7B3B,GACH4B,iBAqCFT,EAAaU,SAAS,aAAa,IAG5B,SAAYwC,GACnBlD,EAAaU,SAAS,aAAcwC,EAAEC,+DAoDvBvD,EAAGwD,mBAsBV7C,IAAY,EARD,IAAAQ,EAAA,GAAAE,GAAaA,eAqCpBT,EAAY6C,6BAgBQ1C,GAAkB2C,EAAazH,QAYhCiF,QA2BKH,GAAkB2C,EAAazH,QAXxCmF,6CAhHlBlD,EAASsF"}
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../../src/components/dropdown/Dropdown.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { tick } from 'svelte';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { clickOutside } from '../../utilities/ClickOutside';\n import type { ListboxItems } from '../listbox/listbox.types';\n import type { SelectSize } from '../select/select.types';\n\n import Tag from '../tag/Tag.nested.svelte';\n import Loader from '../loader/Loader.nested.svelte';\n import Listbox from '../listbox/Listbox.nested.svelte';\n\n export let maxwidth = '100%';\n export let tagid: string;\n export let taglabel = '';\n export let placeholder = '-- Placeholder --';\n export let disabled = false;\n export let size: SelectSize = 'm';\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let loading = false;\n export let name: string;\n export let items: string;\n export let value: any;\n export let open = false;\n export let multiple = false;\n export let emptysearchlabel = 'No results found';\n export let datatextexpr = 'label';\n export let datavalueexpr = 'value';\n export let nosort = false;\n export let clearfield = false;\n export let layertitle = 'Title layer';\n export let showmoretagslabel = 'Show more';\n export let maxnumbertoshowtags = 12;\n export let alltags = false;\n export let selectall = false;\n export let labelselectall = 'Select all';\n\n let component: HTMLDivElement;\n const uuid = Math.random();\n let eventHandler = new EventHandler(\n get_current_component(),\n createEventDispatcher(),\n );\n let tag: any;\n let tagWidth = '0px';\n let tagValue: any;\n let buttonvalue: string;\n let sortedListItems: any;\n let isfiltered = false;\n let selectedItems: ListboxItems[] = [];\n let openLayer: any = null;\n\n $: parsedItems = items ? (JSON.parse(items) as ListboxItems[]) : [];\n $: localItems = parsedItems;\n $: listboxValue = !value && multiple ? [] : value ? JSON.parse(value) : value;\n $: setTagLabel = () => {\n return listboxValue.length.toString() + ' ' + taglabel;\n };\n $: watchListboxValue(listboxValue);\n $: setTagWidth(tagValue);\n $: openState = open;\n $: {\n const eventName = openState ? 'open' : 'close';\n eventHandler.dispatch(eventName, openState);\n }\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n function clearListbox() {\n listboxValue = multiple ? [] : '';\n closeListBox();\n eventHandler.dispatch('clear', true);\n }\n\n function removeTagSelected(itemSelectedId: any) {\n listboxValue = listboxValue.filter(\n (value: any) => value !== itemSelectedId,\n );\n eventHandler.dispatch('onchange', listboxValue);\n }\n\n function openLayerFn() {\n openLayer = true;\n }\n\n function closeLayerFn() {\n openLayer = null;\n }\n\n function closeListBox() {\n openState = false;\n\n if (multiple && !nosort) {\n sortItems();\n } else {\n localItems = parsedItems;\n }\n }\n\n function onChange() {\n eventHandler.dispatch('onchange', listboxValue);\n\n if (!multiple) {\n closeListBox();\n }\n }\n\n function getSelectedItems(val?: any) {\n const value = val ? val : listboxValue;\n\n const selectedItems = parsedItems.filter((item: ListboxItems) => {\n return multiple\n ? value.includes(item[datavalueexpr])\n : value === item[datavalueexpr];\n });\n\n return selectedItems;\n }\n\n function sortItems() {\n sortedListItems = parsedItems;\n const selectedItems = getSelectedItems();\n\n sortedListItems.sort((a: any, b: any) => {\n const hasItemA = selectedItems.includes(a);\n const hasItemB = selectedItems.includes(b);\n\n if (hasItemA === hasItemB) {\n return a[datavalueexpr] - b[datavalueexpr];\n } else if (hasItemA < hasItemB) {\n return 1;\n } else {\n return -1;\n }\n });\n\n localItems = sortedListItems;\n }\n\n function onScrollEnd() {\n eventHandler.dispatch('scrollend', true);\n }\n\n function onSelectAll(e: CustomEvent) {\n eventHandler.dispatch('select-all', e.detail);\n }\n\n // Watch Functions\n async function watchListboxValue(value: any) {\n await tick();\n selectedItems = getSelectedItems(value);\n const seletedLabels = selectedItems.map((item) => item[datatextexpr]);\n\n buttonvalue = seletedLabels.join(', ');\n\n if (multiple) {\n tagValue = value;\n }\n }\n\n async function setTagWidth(tagValue: any) {\n await tick();\n\n tagWidth =\n tag && tagValue && tagValue.length\n ? `${\n component?.querySelector('.mc-tag-removable')?.clientWidth ?? 0 + 8\n }px`\n : '0px';\n }\n</script>\n\n<div\n class=\"mc-dropdown\"\n class:mc-dropdown--multi={multiple}\n style=\"--dropdown-tag-width: {tagWidth}; --dropdown-width: {maxwidth};\"\n use:clickOutside\n on:outclick={closeListBox}\n {...attributes}\n bind:this={component}\n>\n <div class=\"mc-dropdown__main\">\n <!-- TAG REMOVABLE -->\n {#if multiple && listboxValue.length > 0 && !alltags}\n <Tag\n id={tagid ? tagid : `autocompleteTag-${uuid}`}\n class=\"mc-dropdown__tag\"\n label={setTagLabel()}\n size=\"s\"\n type=\"removable\"\n dark={false}\n disabled={false}\n href=\"\"\n name=\"\"\n selected={false}\n value=\"\"\n bind:this={tag}\n on:tag-removed={clearListbox}\n />\n {/if}\n\n <!-- TRIGGER BUTTON -->\n <button\n type=\"button\"\n class=\"mc-select mc-dropdown__trigger\"\n class:is-open={openState}\n class:is-valid={isvalid}\n class:is-invalid={isinvalid}\n class:mc-select--s={size === 's'}\n {disabled}\n on:click={() => (openState = !openState)}\n >\n {buttonvalue ? buttonvalue : placeholder}\n </button>\n \n <div class=\"mc-dropdown__tools\">\n <!-- LOADER -->\n {#if loading}\n <Loader size=\"s\" theme=\"primary\" text=\"\" class=\"mc-dropdown__loader\" />\n {/if}\n \n <!-- CLEAR BUTTON -->\n {#if !multiple && buttonvalue && clearfield}\n <button\n class=\"mc-dropdown__clear\"\n type=\"button\"\n on:click|stopPropagation={() => {\n clearListbox();\n }}\n >\n <navigation-control-tag--cross-24px />\n </button>\n {/if}\n </div>\n </div>\n\n <!-- LISTBOX -->\n {#if openState}\n <Listbox\n items={JSON.stringify(localItems)}\n {name}\n {multiple}\n {isfiltered}\n {emptysearchlabel}\n {maxwidth}\n {datatextexpr}\n {datavalueexpr}\n {selectall}\n {labelselectall}\n overlay={true}\n width=\"100%\"\n bind:value={listboxValue}\n on:change={onChange}\n on:scrollend={onScrollEnd}\n on:select-all={onSelectAll}\n />\n {/if}\n\n {#if multiple && alltags}\n <div class=\"tags-selected\">\n {#each selectedItems as selectedItem, index}\n {#if index < maxnumbertoshowtags}\n <div class=\"tag-selected\">\n <m-tag\n id={selectedItem.id}\n label={selectedItem.label}\n size=\"s\"\n type=\"removable\"\n on:tag-removed={() => removeTagSelected(selectedItem.id)}\n />\n </div>\n {/if}\n {/each}\n {#if listboxValue.length > maxnumbertoshowtags}\n <div class=\"tag-selected\">\n <m-tag\n id=\"id-tag\"\n label=\"({listboxValue.length}) {showmoretagslabel} \"\n size=\"s\"\n type=\"link\"\n on:tag-selected={() => openLayerFn()}\n />\n </div>\n {/if}\n </div>\n {/if}\n\n <span class=\"mc-dropdown__tag\" style=\"display:none;\" />\n <span class=\"mc-dropdown__loader\" style=\"display:none;\" />\n <span class=\"mc-text-input mc-dropdown__trigger\" style=\"display:none;\" />\n {#if multiple && alltags}\n <div>\n <m-layer\n title={layertitle}\n layertitletag=\"h3\"\n isopen={openLayer}\n on:layer-closed={() => closeLayerFn()}\n >\n <small slot=\"content\">\n <div class=\"tags-selected\">\n {#each selectedItems as selectedItem}\n <div class=\"tag-selected\">\n <m-tag\n id={selectedItem.id}\n label={selectedItem.label}\n size=\"s\"\n type=\"removable\"\n on:tag-removed={() => removeTagSelected(selectedItem.id)}\n />\n </div>\n {/each}\n </div>\n </small>\n </m-layer>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.select';\n @import '@mozaic-ds/styles/components/c.dropdown';\n\n // Dropdown\n // NOTE: These styles with the \"!important\" allow to overload the edge effects\n // due to the scoping applied by Svelte on the CSS selectors\n .mc-dropdown {\n min-width: auto;\n\n &__tag {\n position: absolute !important; // due to the Svelte CSS scope\n }\n\n &--multi {\n .mc-dropdown__trigger {\n padding-left: calc($mu075 + var(--dropdown-tag-width)) !important;\n }\n }\n }\n\n // Selected Tags\n .tags-selected {\n display: flex;\n flex-wrap: wrap;\n }\n\n .tag-selected {\n margin-top: 1em;\n margin-left: 5px;\n margin-right: 5px;\n }\n</style>\n"],"names":["ctx","insert","target","button","anchor","JSON","stringify","length","i","create_if_block_2","div","set_custom_element_data","m_tag","m_tag_id_value","id","m_tag_label_value","label","append","dirty","if_block","create_if_block_3","div1","m_layer","small","div0","if_block0","create_if_block_7","create_if_block_6","create_if_block_5","create_if_block_4","if_block4","create_if_block_1","if_block5","create_if_block","style","div2_style_value","toggle_class","div2","span0","span1","span2","set_data","t1","t1_value","current","isfiltered","component","maxwidth","$$props","tagid","taglabel","placeholder","disabled","size","isvalid","isinvalid","loading","name","items","value","open","multiple","emptysearchlabel","datatextexpr","datavalueexpr","nosort","clearfield","layertitle","showmoretagslabel","maxnumbertoshowtags","alltags","selectall","labelselectall","uuid","Math","random","tag","tagValue","buttonvalue","sortedListItems","eventHandler","EventHandler","get_current_component","createEventDispatcher","tagWidth","selectedItems","openLayer","clearListbox","listboxValue","closeListBox","dispatch","removeTagSelected","itemSelectedId","filter","openLayerFn","$$invalidate","closeLayerFn","openState","parsedItems","getSelectedItems","sort","a","b","hasItemA","includes","hasItemB","localItems","sortItems","val","item","parse","setTagLabel","toString","async","tick","seletedLabels","map","join","watchListboxValue","_b","_a","querySelector","clientWidth","setTagWidth","eventName","attributes","Object","assign","$$restProps","class","e","detail","$$value","value$1","selectedItem"],"mappings":"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"}
|
|
@@ -216,6 +216,15 @@
|
|
|
216
216
|
on:click={() => (openState = !openState)}
|
|
217
217
|
>
|
|
218
218
|
{buttonvalue ? buttonvalue : placeholder}
|
|
219
|
+
</button>
|
|
220
|
+
|
|
221
|
+
<div class="mc-dropdown__tools">
|
|
222
|
+
<!-- LOADER -->
|
|
223
|
+
{#if loading}
|
|
224
|
+
<Loader size="s" theme="primary" text="" class="mc-dropdown__loader" />
|
|
225
|
+
{/if}
|
|
226
|
+
|
|
227
|
+
<!-- CLEAR BUTTON -->
|
|
219
228
|
{#if !multiple && buttonvalue && clearfield}
|
|
220
229
|
<button
|
|
221
230
|
class="mc-dropdown__clear"
|
|
@@ -227,34 +236,30 @@
|
|
|
227
236
|
<navigation-control-tag--cross-24px />
|
|
228
237
|
</button>
|
|
229
238
|
{/if}
|
|
230
|
-
</button>
|
|
231
|
-
|
|
232
|
-
<div class="mc-dropdown__tools">
|
|
233
|
-
<!-- LOADER -->
|
|
234
|
-
{#if loading}
|
|
235
|
-
<Loader size="s" theme="primary" text="" class="mc-dropdown__loader" />
|
|
236
|
-
{/if}
|
|
237
239
|
</div>
|
|
238
240
|
</div>
|
|
239
241
|
|
|
240
242
|
<!-- LISTBOX -->
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
243
|
+
{#if openState}
|
|
244
|
+
<Listbox
|
|
245
|
+
items={JSON.stringify(localItems)}
|
|
246
|
+
{name}
|
|
247
|
+
{multiple}
|
|
248
|
+
{isfiltered}
|
|
249
|
+
{emptysearchlabel}
|
|
250
|
+
{maxwidth}
|
|
251
|
+
{datatextexpr}
|
|
252
|
+
{datavalueexpr}
|
|
253
|
+
{selectall}
|
|
254
|
+
{labelselectall}
|
|
255
|
+
overlay={true}
|
|
256
|
+
width="100%"
|
|
257
|
+
bind:value={listboxValue}
|
|
258
|
+
on:change={onChange}
|
|
259
|
+
on:scrollend={onScrollEnd}
|
|
260
|
+
on:select-all={onSelectAll}
|
|
261
|
+
/>
|
|
262
|
+
{/if}
|
|
258
263
|
|
|
259
264
|
{#if multiple && alltags}
|
|
260
265
|
<div class="tags-selected">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as e,i as t,a as i,b as o,f as c,s as a,c as l,e as r,n as s,j as n,k as m,M as d,p as h,q as b,r as p,v as u,w as x,x as f,U as _,$ as g,t as k,h as v,l as w,o as $,R as y,Q as E,d as C,a0 as z,m as M,O as j}from"../../index-48da6c1f.js";import{E as B}from"../../EventHandler-f7ee47ca.js";function H(e,t,i){const o=e.slice();return o[21]=t[i],o[23]=i,o}function O(e){let t,i,c;return{c(){t=r("li"),i=r("span"),c=k(e[4]),v(i,"class","mc-listbox__empty"),v(t,"class","mc-listbox__item")},m(e,a){o(e,t,a),w(t,i),w(i,c)},p(e,t){16&t&&$(c,e[4])},d(e){e&&b(t)}}}function L(e){let t,i=e[9],c=[];for(let t=0;t<i.length;t+=1)c[t]=Y(H(e,i,t));return{c(){for(let e=0;e<c.length;e+=1)c[e].c();t=y()},m(e,i){for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(e,i);o(e,t,i)},p(e,o){if(3685&o){let a;for(i=e[9],a=0;a<i.length;a+=1){const l=H(e,i,a);c[a]?c[a].p(l,o):(c[a]=Y(l),c[a].c(),c[a].m(t.parentNode,t))}for(;a<c.length;a+=1)c[a].d(1);c.length=i.length}},d(e){E(c,e),e&&b(t)}}}function N(e){let t,i,c,a,l,s,n=!1;return a=z(e[17][0]),{c(){t=r("input"),v(t,"id",e[11](e[23])),v(t,"class","mc-listbox__input mc-checkbox__input"),v(t,"type","checkbox"),t.__value=i=e[21][e[6]],t.value=t.__value,t.checked=c=e[0].includes(e[21][e[6]]),a.p(t)},m(i,c){o(i,t,c),t.checked=~(e[0]||[]).indexOf(t.__value),l||(s=[M(t,"change",e[18]),M(t,"change",e[15])],l=!0)},p(e,o){576&o&&i!==(i=e[21][e[6]])&&(t.__value=i,t.value=t.__value,n=!0),577&o&&c!==(c=e[0].includes(e[21][e[6]]))&&(t.checked=c),(n||513&o)&&(t.checked=~(e[0]||[]).indexOf(t.__value))},d(e){e&&b(t),a.r(),l=!1,j(s)}}}function R(e){let t,i,c,a,l,s=!1;return c=z(e[17][0]),{c(){t=r("input"),v(t,"id",e[11](e[23])),v(t,"class","mc-listbox__input"),v(t,"type","radio"),t.__value=i=e[21][e[6]],t.value=t.__value,v(t,"name",`listboxradio-${e[10]}`),c.p(t)},m(i,c){o(i,t,c),t.checked=t.__value===e[0],a||(l=[M(t,"change",e[16]),M(t,"change",e[14])],a=!0)},p(e,o){576&o&&i!==(i=e[21][e[6]])&&(t.__value=i,t.value=t.__value,s=!0),(s||513&o)&&(t.checked=t.__value===e[0])},d(e){e&&b(t),c.r(),a=!1,j(l)}}}function Y(e){let t,i,c,a,l,s=e[21][e[5]]+"";function n(e,t){return e[2]?N:R}let m=n(e),d=m(e);return{c(){t=r("li"),d.c(),i=C(),c=r("label"),a=k(s),l=C(),v(c,"for",e[11](e[23])),v(c,"class","mc-listbox__label"),v(t,"class","mc-listbox__item")},m(e,r){o(e,t,r),d.m(t,null),w(t,i),w(t,c),w(c,a),w(t,l)},p(e,o){m===(m=n(e))&&d?d.p(e,o):(d.d(1),d=m(e),d&&(d.c(),d.m(t,i))),544&o&&s!==(s=e[21][e[5]]+"")&&$(a,s)},d(e){e&&b(t),d.d()}}}function A(e){let t,i,c,a;function p(e,t){return e[3]?O:L}let u=p(e),x=u(e),f=[{role:"listbox"},{class:"mc-listbox"},{"aria-labelledby":"listbox"},{style:i="--listbox-width: "+e[7]+";"},e[8]],_={};for(let e=0;e<f.length;e+=1)_=l(_,f[e]);return{c(){t=r("ul"),x.c(),this.c=s,n(t,_),m(t,"is-open",e[1]),m(t,"mc-listbox--multi",e[2])},m(i,l){o(i,t,l),x.m(t,null),c||(a=d(e[12].call(null,t)),c=!0)},p(e,[o]){u===(u=p(e))&&x?x.p(e,o):(x.d(1),x=u(e),x&&(x.c(),x.m(t,null))),n(t,_=h(f,[{role:"listbox"},{class:"mc-listbox"},{"aria-labelledby":"listbox"},128&o&&i!==(i="--listbox-width: "+e[7]+";")&&{style:i},256&o&&e[8]])),m(t,"is-open",e[1]),m(t,"mc-listbox--multi",e[2])},i:s,o:s,d(e){e&&b(t),x.d(),c=!1,a()}}}function S(e,t,i){let o,c;const a=["items","value","open","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","maxwidth"];let r=p(t,a),{items:s}=t,{value:n}=t,{open:m}=t,{multiple:d}=t,{isfiltered:h}=t,{emptysearchlabel:b="No results found"}=t,{datatextexpr:k="label"}=t,{datavalueexpr:v="value"}=t,{maxwidth:w="100%"}=t;const $=Math.random();let y=new B(u(),x());const E=[[]];return e.$$set=e=>{t=l(l({},t),f(e)),i(20,r=p(t,a)),"items"in e&&i(13,s=e.items),"value"in e&&i(0,n=e.value),"open"in e&&i(1,m=e.open),"multiple"in e&&i(2,d=e.multiple),"isfiltered"in e&&i(3,h=e.isfiltered),"emptysearchlabel"in e&&i(4,b=e.emptysearchlabel),"datatextexpr"in e&&i(5,k=e.datatextexpr),"datavalueexpr"in e&&i(6,v=e.datavalueexpr),"maxwidth"in e&&i(7,w=e.maxwidth)},e.$$.update=()=>{8192&e.$$.dirty&&i(9,o=s?JSON.parse(s):[]),i(8,c=Object.assign({},r)),256&e.$$.dirty&&delete c.class},[n,m,d,h,b,k,v,w,c,o,$,function(e){return`listboxItem-${e+$}`},function(e){e.addEventListener("scroll",(()=>{e.offsetHeight+e.scrollTop>=e.scrollHeight&&y.dispatch("scrollend",{})}))},s,function(t){_.call(this,e,t)},function(t){_.call(this,e,t)},function(){n=this.__value,i(0,n)},E,function(){n=g(E[0],this.__value,this.checked),i(0,n)}]}class q extends e{constructor(e){super();const l=document.createElement("style");l.textContent=".mc-checkbox{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.mc-checkbox__label{font-size:1rem;line-height:1.125;cursor:pointer;margin-left:0.5rem;color:#000000}.mc-checkbox__input{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;min-width:20px;min-height:20px;width:1.25rem;height:1.25rem;border-radius:4px;border:2px solid #808080;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input[type=number]::-webkit-inner-spin-button,.mc-checkbox__input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-checkbox__input[type=number]{-moz-appearance:textfield}.mc-checkbox__input[type=search]::-webkit-search-decoration:hover,.mc-checkbox__input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-checkbox__input::-ms-check{background-color:#ffffff;border:2px solid #808080;border-radius:4px;color:#ffffff}.mc-checkbox__input.is-hover,.mc-checkbox__input:hover{border-color:#191919}.mc-checkbox__input.is-hover::-ms-check,.mc-checkbox__input:hover::-ms-check{border-color:#191919}.mc-checkbox__input.is-focus,.mc-checkbox__input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.is-focus::-ms-check,.mc-checkbox__input:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input:checked,.mc-checkbox__input:indeterminate{background-color:#ff5800;border-color:#ff5800;background-size:1rem 1rem}.mc-checkbox__input:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\");background-position:center center}.mc-checkbox__input:checked::-ms-check{background-color:#ff5800;border-color:#ff5800}.mc-checkbox__input:checked:hover:not(:disabled){border-color:#ff5800}.mc-checkbox__input:checked:hover:not(:disabled)::-ms-check{border-color:#ff5800}.mc-checkbox__input:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\")}.mc-checkbox__input:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input.is-invalid{border-color:#c61112}.mc-checkbox__input.is-invalid::-ms-check{border-color:#c61112}.mc-checkbox__input.is-invalid.is-hover,.mc-checkbox__input.is-invalid:hover{border-color:#530000}.mc-checkbox__input.is-invalid.is-hover::-ms-check,.mc-checkbox__input.is-invalid:hover::-ms-check{border-color:#530000}.mc-listbox{list-style:none;margin-left:0;padding-left:0;background-color:#ffffff;border:1px solid #666666;border-radius:3px;position:absolute;overflow-y:auto;margin-top:0.25rem;margin-bottom:0;max-height:13.8125rem;min-width:auto;opacity:0;visibility:hidden;max-width:var(--listbox-width, auto);width:100%}.mc-listbox.is-open{opacity:1;visibility:visible;z-index:10}.mc-listbox::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__item,.mc-listbox__tile{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;min-height:3rem;padding-left:0.75rem;padding-right:0.75rem;position:relative;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mc-listbox__item:not(:last-child),.mc-listbox__tile:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox__item:hover,.mc-listbox__tile:hover{background-color:#e6e6e6;-webkit-box-shadow:inset 9px 0 0 -7px #191919;box-shadow:inset 9px 0 0 -7px #191919}.mc-listbox__flag,.mc-listbox__icon{width:2rem;height:2rem}.mc-listbox__flag{font-size:1.5rem;line-height:1.3333333333;text-align:center}.mc-listbox__empty{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-listbox__label{cursor:pointer;margin-right:auto}.mc-listbox__label::after{content:\"\";position:absolute;inset:0;z-index:2}.mc-listbox__input{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox:not(.mc-listbox--multi) .mc-listbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-listbox:not(.mc-listbox--multi) .mc-listbox__input:checked+.mc-listbox__label::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;content:\"\";height:1.5rem;position:absolute;right:0.75rem;top:0;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:1.5rem}.mc-listbox--left{right:0}",this.shadowRoot.appendChild(l),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},S,A,a,{items:13,value:0,open:1,multiple:2,isfiltered:3,emptysearchlabel:4,datatextexpr:5,datavalueexpr:6,maxwidth:7},null),e&&(e.target&&o(e.target,this,e.anchor),e.props&&(this.$set(e.props),c()))}static get observedAttributes(){return["items","value","open","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","maxwidth"]}get items(){return this.$$.ctx[13]}set items(e){this.$$set({items:e}),c()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),c()}get open(){return this.$$.ctx[1]}set open(e){this.$$set({open:e}),c()}get multiple(){return this.$$.ctx[2]}set multiple(e){this.$$set({multiple:e}),c()}get isfiltered(){return this.$$.ctx[3]}set isfiltered(e){this.$$set({isfiltered:e}),c()}get emptysearchlabel(){return this.$$.ctx[4]}set emptysearchlabel(e){this.$$set({emptysearchlabel:e}),c()}get datatextexpr(){return this.$$.ctx[5]}set datatextexpr(e){this.$$set({datatextexpr:e}),c()}get datavalueexpr(){return this.$$.ctx[6]}set datavalueexpr(e){this.$$set({datavalueexpr:e}),c()}get maxwidth(){return this.$$.ctx[7]}set maxwidth(e){this.$$set({maxwidth:e}),c()}}export{q as default};
|
|
1
|
+
import{S as e,i as t,a as i,b as o,f as l,s,e as a,n as c,h as r,L as n,k as m,q as b,r as d,v as h,w as x,c as p,x as u,U as _,$ as f,t as g,l as w,o as v,j as k,M as y,p as $,Q as E,d as C,a0 as z,m as M,O as B}from"../../index-48da6c1f.js";import{E as j}from"../../EventHandler-f7ee47ca.js";function L(e,t,i){const o=e.slice();return o[23]=t[i],o[25]=i,o}function H(e){let t,i,l;return{c(){t=a("div"),i=a("span"),l=g(e[3]),r(i,"class","mc-listbox__label"),r(t,"class","mc-listbox__tile mc-listbox__tile--empty")},m(e,s){o(e,t,s),w(t,i),w(i,l)},p(e,t){8&t&&v(l,e[3])},d(e){e&&b(t)}}}function O(e){let t,i,l,s=e[11],c=[];for(let t=0;t<s.length;t+=1)c[t]=N(L(e,s,t));let r=[{role:"listbox"},{class:"mc-listbox__list"},{"aria-labelledby":"listbox"},e[10]],n={};for(let e=0;e<r.length;e+=1)n=p(n,r[e]);return{c(){t=a("ul");for(let e=0;e<c.length;e+=1)c[e].c();k(t,n)},m(s,a){o(s,t,a);for(let e=0;e<c.length;e+=1)c[e]&&c[e].m(t,null);i||(l=y(e[14].call(null,t)),i=!0)},p(e,i){if(14387&i){let o;for(s=e[11],o=0;o<s.length;o+=1){const l=L(e,s,o);c[o]?c[o].p(l,i):(c[o]=N(l),c[o].c(),c[o].m(t,null))}for(;o<c.length;o+=1)c[o].d(1);c.length=s.length}k(t,n=$(r,[{role:"listbox"},{class:"mc-listbox__list"},{"aria-labelledby":"listbox"},1024&i&&e[10]]))},d(e){e&&b(t),E(c,e),i=!1,l()}}}function A(e){let t,i,l,s,c,n,m=!1;return s=z(e[19][0]),{c(){t=a("input"),r(t,"id",e[13](e[25])),r(t,"class","mc-listbox__input mc-checkbox__input"),r(t,"type","checkbox"),t.__value=i=e[23][e[5]],t.value=t.__value,t.checked=l=e[0].includes(e[23][e[5]]),s.p(t)},m(i,l){o(i,t,l),t.checked=~(e[0]||[]).indexOf(t.__value),c||(n=[M(t,"change",e[20]),M(t,"change",e[17])],c=!0)},p(e,o){2080&o&&i!==(i=e[23][e[5]])&&(t.__value=i,t.value=t.__value,m=!0),2081&o&&l!==(l=e[0].includes(e[23][e[5]]))&&(t.checked=l),(m||2049&o)&&(t.checked=~(e[0]||[]).indexOf(t.__value))},d(e){e&&b(t),s.r(),c=!1,B(n)}}}function Y(e){let t,i,l,s,c,n=!1;return l=z(e[19][0]),{c(){t=a("input"),r(t,"id",e[13](e[25])),r(t,"class","mc-listbox__input"),r(t,"type","radio"),t.__value=i=e[23][e[5]],t.value=t.__value,r(t,"name",`listboxradio-${e[12]}`),l.p(t)},m(i,l){o(i,t,l),t.checked=t.__value===e[0],s||(c=[M(t,"change",e[18]),M(t,"change",e[16])],s=!0)},p(e,o){2080&o&&i!==(i=e[23][e[5]])&&(t.__value=i,t.value=t.__value,n=!0),(n||2049&o)&&(t.checked=t.__value===e[0])},d(e){e&&b(t),l.r(),s=!1,B(c)}}}function N(e){let t,i,l,s,c,n=e[23][e[4]]+"";function m(e,t){return e[1]?A:Y}let d=m(e),h=d(e);return{c(){t=a("li"),h.c(),i=C(),l=a("label"),s=g(n),c=C(),r(l,"for",e[13](e[25])),r(l,"class","mc-listbox__label"),r(t,"class","mc-listbox__tile")},m(e,a){o(e,t,a),h.m(t,null),w(t,i),w(t,l),w(l,s),w(t,c)},p(e,o){d===(d=m(e))&&h?h.p(e,o):(h.d(1),h=d(e),h&&(h.c(),h.m(t,i))),2064&o&&n!==(n=e[23][e[4]]+"")&&v(s,n)},d(e){e&&b(t),h.d()}}}function R(e){let t;function i(e,t){return e[2]?H:O}let l=i(e),s=l(e);return{c(){t=a("div"),s.c(),this.c=c,r(t,"class","mc-listbox"),n(t,"--listbox-maxwidth",e[6]),n(t,"--listbox-width",e[8]),m(t,"mc-listbox--options","options"===e[9]),m(t,"mc-listbox--multi",e[1]),m(t,"mc-listbox--overlay",e[7])},m(e,i){o(e,t,i),s.m(t,null)},p(e,[o]){l===(l=i(e))&&s?s.p(e,o):(s.d(1),s=l(e),s&&(s.c(),s.m(t,null))),64&o&&n(t,"--listbox-maxwidth",e[6]),256&o&&n(t,"--listbox-width",e[8]),512&o&&m(t,"mc-listbox--options","options"===e[9]),2&o&&m(t,"mc-listbox--multi",e[1]),128&o&&m(t,"mc-listbox--overlay",e[7])},i:c,o:c,d(e){e&&b(t),s.d()}}}function S(e,t,i){let o,l;const s=["items","value","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","maxwidth","overlay","width","type"];let a=d(t,s),{items:c}=t,{value:r}=t,{multiple:n}=t,{isfiltered:m}=t,{emptysearchlabel:b="No results found"}=t,{datatextexpr:g="label"}=t,{datavalueexpr:w="value"}=t,{maxwidth:v}=t,{overlay:k}=t,{width:y}=t,{type:$="options"}=t;const E=Math.random();let C=new j(h(),x());const z=[[]];return e.$$set=e=>{t=p(p({},t),u(e)),i(22,a=d(t,s)),"items"in e&&i(15,c=e.items),"value"in e&&i(0,r=e.value),"multiple"in e&&i(1,n=e.multiple),"isfiltered"in e&&i(2,m=e.isfiltered),"emptysearchlabel"in e&&i(3,b=e.emptysearchlabel),"datatextexpr"in e&&i(4,g=e.datatextexpr),"datavalueexpr"in e&&i(5,w=e.datavalueexpr),"maxwidth"in e&&i(6,v=e.maxwidth),"overlay"in e&&i(7,k=e.overlay),"width"in e&&i(8,y=e.width),"type"in e&&i(9,$=e.type)},e.$$.update=()=>{32768&e.$$.dirty&&i(11,o=c?JSON.parse(c):[]),i(10,l=Object.assign({},a)),1024&e.$$.dirty&&delete l.class},[r,n,m,b,g,w,v,k,y,$,l,o,E,function(e){return`listboxItem-${e+E}`},function(e){e.addEventListener("scroll",(()=>{e.offsetHeight+e.scrollTop>=e.scrollHeight&&C.dispatch("scrollend",{})}))},c,function(t){_.call(this,e,t)},function(t){_.call(this,e,t)},function(){r=this.__value,i(0,r)},z,function(){r=f(z[0],this.__value,this.checked),i(0,r)}]}class q extends e{constructor(e){super();const a=document.createElement("style");a.textContent=".mc-checkbox{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.mc-checkbox__label{font-size:1rem;line-height:1.125;cursor:pointer;margin-left:0.5rem;color:#000000}.mc-checkbox__input{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;min-width:20px;min-height:20px;width:1.25rem;height:1.25rem;border-radius:4px;border:2px solid #808080;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input[type=number]::-webkit-inner-spin-button,.mc-checkbox__input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-checkbox__input[type=number]{-moz-appearance:textfield}.mc-checkbox__input[type=search]::-webkit-search-decoration:hover,.mc-checkbox__input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-checkbox__input::-ms-check{background-color:#ffffff;border:2px solid #808080;border-radius:4px;color:#ffffff}.mc-checkbox__input.is-hover,.mc-checkbox__input:hover{border-color:#191919}.mc-checkbox__input.is-hover::-ms-check,.mc-checkbox__input:hover::-ms-check{border-color:#191919}.mc-checkbox__input.is-focus,.mc-checkbox__input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.is-focus::-ms-check,.mc-checkbox__input:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input:checked,.mc-checkbox__input:indeterminate{background-color:#ff5800;border-color:#ff5800;background-size:1rem 1rem}.mc-checkbox__input:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\");background-position:center center}.mc-checkbox__input:checked::-ms-check{background-color:#ff5800;border-color:#ff5800}.mc-checkbox__input:checked:hover:not(:disabled){border-color:#ff5800}.mc-checkbox__input:checked:hover:not(:disabled)::-ms-check{border-color:#ff5800}.mc-checkbox__input:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\")}.mc-checkbox__input:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input.is-invalid{border-color:#c61112}.mc-checkbox__input.is-invalid::-ms-check{border-color:#c61112}.mc-checkbox__input.is-invalid.is-hover,.mc-checkbox__input.is-invalid:hover{border-color:#530000}.mc-checkbox__input.is-invalid.is-hover::-ms-check,.mc-checkbox__input.is-invalid:hover::-ms-check{border-color:#530000}.mc-listbox{background-color:#ffffff;border:1px solid #666666;border-radius:3px;overflow-y:auto;max-width:var(--listbox-maxwidth, none);width:var(--listbox-width, auto)}.mc-listbox::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__list{list-style:none;margin-left:0;padding-left:0;margin-top:0;margin-right:0;margin-bottom:0}.mc-listbox__tile{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding-left:0.75rem;padding-right:0.75rem;position:relative}.mc-listbox__tile:not(.mc-listbox__tile--empty):not(.is-disabled):hover{background-color:#e6e6e6;-webkit-box-shadow:inset 9px 0 0 -7px #191919;box-shadow:inset 9px 0 0 -7px #191919}.mc-listbox__tile--danger,.mc-listbox__tile.is-danger{color:#c61112}.mc-listbox__tile--empty{color:#666666;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-listbox__tile--empty .mc-listbox__label{cursor:default}.mc-listbox__tile.is-disabled{-webkit-box-shadow:none;box-shadow:none;background-color:#cccccc;color:#666666;pointer-events:none}.mc-listbox__flag{font-size:1.5rem;line-height:1.3333333333;text-align:center}.mc-listbox__icon{fill:#666666}.mc-listbox__label{font-size:1rem;line-height:1.375;color:currentColor;cursor:pointer;white-space:nowrap}.mc-listbox__label::after{content:\"\";position:absolute;inset:0;z-index:2}.mc-listbox__input{margin-left:auto;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox--left{right:0}.mc-listbox:not(.mc-listbox--multi) .mc-listbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-listbox--options{max-height:13.8125rem;min-width:18rem}.mc-listbox--options .mc-listbox__flag,.mc-listbox--options .mc-listbox__icon,.mc-listbox--options .mc-listbox__logo{height:2rem;width:2rem}.mc-listbox--options .mc-listbox__tile{height:3rem}.mc-listbox--options .mc-listbox__tile:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox--options .mc-listbox__tile.is-selected .mc-listbox__label::before{visibility:visible}.mc-listbox--options .mc-listbox__tile.is-selected.is-disabled .mc-listbox__label::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\")}.mc-listbox--options .mc-listbox__input:checked+.mc-listbox__label::before{visibility:visible}.mc-listbox--options .mc-listbox__input:checked:disabled+.mc-listbox__label::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\")}.mc-listbox--options .mc-listbox__label::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23191919' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\");background-position:center;background-repeat:no-repeat;background-size:1.5rem;content:\"\";height:1.5rem;position:absolute;right:0.75rem;top:0;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:1.5rem;visibility:hidden}.mc-listbox--actions{min-width:17.375rem}.mc-listbox--actions.align-top{-webkit-transform:translate(0, calc(-100% - 1.5rem));-ms-transform:translate(0, calc(-100% - 1.5rem));transform:translate(0, calc(-100% - 1.5rem))}.mc-listbox--actions.align-right{-webkit-transform:translate(calc(-100% + 1.5rem), 0);-ms-transform:translate(calc(-100% + 1.5rem), 0);transform:translate(calc(-100% + 1.5rem), 0)}.mc-listbox--actions.align-right.align-top{-webkit-transform:translate(calc(-100% + 1.5rem), calc(-100% - 1.5rem));-ms-transform:translate(calc(-100% + 1.5rem), calc(-100% - 1.5rem));transform:translate(calc(-100% + 1.5rem), calc(-100% - 1.5rem))}.mc-listbox--actions .mc-listbox__tile{height:2.5rem}.mc-listbox--overlay{position:absolute;z-index:10}",this.shadowRoot.appendChild(a),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},S,R,s,{items:15,value:0,multiple:1,isfiltered:2,emptysearchlabel:3,datatextexpr:4,datavalueexpr:5,maxwidth:6,overlay:7,width:8,type:9},null),e&&(e.target&&o(e.target,this,e.anchor),e.props&&(this.$set(e.props),l()))}static get observedAttributes(){return["items","value","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","maxwidth","overlay","width","type"]}get items(){return this.$$.ctx[15]}set items(e){this.$$set({items:e}),l()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),l()}get multiple(){return this.$$.ctx[1]}set multiple(e){this.$$set({multiple:e}),l()}get isfiltered(){return this.$$.ctx[2]}set isfiltered(e){this.$$set({isfiltered:e}),l()}get emptysearchlabel(){return this.$$.ctx[3]}set emptysearchlabel(e){this.$$set({emptysearchlabel:e}),l()}get datatextexpr(){return this.$$.ctx[4]}set datatextexpr(e){this.$$set({datatextexpr:e}),l()}get datavalueexpr(){return this.$$.ctx[5]}set datavalueexpr(e){this.$$set({datavalueexpr:e}),l()}get maxwidth(){return this.$$.ctx[6]}set maxwidth(e){this.$$set({maxwidth:e}),l()}get overlay(){return this.$$.ctx[7]}set overlay(e){this.$$set({overlay:e}),l()}get width(){return this.$$.ctx[8]}set width(e){this.$$set({width:e}),l()}get type(){return this.$$.ctx[9]}set type(e){this.$$set({type:e}),l()}}export{q as default};
|
|
2
2
|
//# sourceMappingURL=Listbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/listbox/Listbox.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { ListboxItems } from './listbox.types';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n\n export let items: string;\n export let value: any;\n export let
|
|
1
|
+
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/listbox/Listbox.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { ListboxItems } from './listbox.types';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n\n export let items: string;\n export let value: any;\n export let multiple: boolean;\n export let isfiltered: boolean;\n export let emptysearchlabel = 'No results found';\n export let datatextexpr = 'label';\n export let datavalueexpr = 'value';\n export let maxwidth: string;\n export let overlay: boolean;\n export let width: string;\n export let type = 'options';\n\n const uuid = Math.random();\n let eventHandler = new EventHandler(\n get_current_component(),\n createEventDispatcher(),\n );\n\n $: parsedItems = items ? (JSON.parse(items) as ListboxItems[]) : [];\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function setItemId(index: number) {\n return `listboxItem-${index + uuid}`;\n }\n\n function scrollEnd(node: HTMLElement) {\n node.addEventListener('scroll', () => {\n if (node.offsetHeight + node.scrollTop >= node.scrollHeight) {\n eventHandler.dispatch('scrollend', {});\n }\n });\n }\n</script>\n\n<div\n class=\"mc-listbox\"\n class:mc-listbox--options={type === 'options'}\n class:mc-listbox--multi={multiple}\n class:mc-listbox--overlay={overlay}\n style=\"--listbox-maxwidth: {maxwidth}; --listbox-width: {width};\"\n>\n {#if !isfiltered}\n <ul\n role=\"listbox\"\n class=\"mc-listbox__list\"\n aria-labelledby=\"listbox\"\n use:scrollEnd\n {...attributes}\n >\n {#each parsedItems as item, index}\n <li class=\"mc-listbox__tile\">\n {#if !multiple}\n <input\n id={setItemId(index)}\n class=\"mc-listbox__input\"\n type=\"radio\"\n value={item[datavalueexpr]}\n name={`listboxradio-${uuid}`}\n bind:group={value}\n on:change\n />\n {:else}\n <input\n id={setItemId(index)}\n class=\"mc-listbox__input mc-checkbox__input\"\n type=\"checkbox\"\n value={item[datavalueexpr]}\n checked={value.includes(item[datavalueexpr])}\n bind:group={value}\n on:change\n />\n {/if}\n\n <label for={setItemId(index)} class=\"mc-listbox__label\">\n {item[datatextexpr]}\n </label>\n </li>\n {/each}\n </ul>\n {:else}\n <div class=\"mc-listbox__tile mc-listbox__tile--empty\">\n <span class=\"mc-listbox__label\">{emptysearchlabel}</span>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.checkbox';\n @import '@mozaic-ds/styles/components/c.listbox';\n</style>\n"],"names":["ctx","insert","target","div","anchor","append","span","length","i","ul","attr","input","__value","input_value_value","checked","input_checked_value","includes","indexOf","dirty","t1_value","create_if_block_1","label","li","set_data","t1","create_if_block","toggle_class","items","$$props","value","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","maxwidth","overlay","width","type","uuid","Math","random","eventHandler","EventHandler","get_current_component","createEventDispatcher","$$invalidate","parsedItems","JSON","parse","attributes","Object","assign","$$restProps","class","index","node","addEventListener","offsetHeight","scrollTop","scrollHeight","dispatch","this","get_binding_group_value","$$binding_groups"],"mappings":"oaA4FuCA,EAAgB,qGADnDC,EAEKC,EAAAC,EAAAC,GADHC,EAAwDF,EAAAG,2BAAvBN,EAAgB,8CAhC1CA,EAAW,yBAAhBO,OAAIC,GAAA,oGAFFR,EAAU,2HALhBC,EAoCIC,EAAAO,EAAAL,sHA7BKJ,EAAW,YAAhBO,OAAIC,GAAA,EAAA,iHAAJD,oGAFEP,EAAU,iHAgBFU,EAAAC,EAAA,KAAAX,MAAUA,EAAK,iFAGZW,EAAAC,QAAAC,EAAAb,MAAKA,EAAa,sBAChBW,EAAAG,QAAAC,EAAAf,EAAM,GAAAgB,SAAShB,MAAKA,EAAa,oBAL5CC,EAQCC,EAAAS,EAAAP,eAFaJ,EAAK,IAAA,IAAAiB,QAAAN,EAAAC,uEAFV,KAAAM,GAAAL,KAAAA,EAAAb,MAAKA,EAAa,2CAChB,KAAAkB,GAAAH,KAAAA,EAAAf,EAAM,GAAAgB,SAAShB,MAAKA,EAAa,+CAC9BA,EAAK,IAAA,IAAAiB,QAAAN,EAAAC,kHAfbF,EAAAC,EAAA,KAAAX,MAAUA,EAAK,2DAGZW,EAAAC,QAAAC,EAAAb,MAAKA,EAAa,iDACHA,EAAI,sBAL5BC,EAQCC,EAAAS,EAAAP,yBAFaJ,EAAK,iEAFV,KAAAkB,GAAAL,KAAAA,EAAAb,MAAKA,EAAa,+EAEbA,EAAK,gEAgBlBmB,EAAAnB,MAAKA,EAAY,IAAA,0BAvBdA,EAAQ,KAAAoB,+EAsBFV,EAAAW,EAAA,MAAArB,MAAUA,EAAK,+EAvB7BC,EA0BIC,EAAAoB,EAAAlB,sBAHFC,EAEOiB,EAAAD,sFADJ,KAAAH,GAAAC,KAAAA,EAAAnB,MAAKA,EAAY,IAAA,KAAAuB,EAAAC,EAAAL,oEAjCtBnB,EAAU,KAAAyB,4GAFYzB,EAAQ,0BAAqBA,EAAK,IAHnC0B,EAAAvB,EAAA,sBAAS,YAATH,8BACFA,EAAQ,8BACNA,EAAO,YAJpCC,EAkDKC,EAAAC,EAAAC,wHA7CyBJ,EAAQ,iCAAqBA,EAAK,WAHnC0B,EAAAvB,EAAA,sBAAS,YAATH,mCACFA,EAAQ,qCACNA,EAAO,wNAvCvB2B,GAAaC,SACbC,GAAUD,YACVE,GAAiBF,cACjBG,GAAmBH,GACnBI,iBAAAA,EAAmB,oBAAkBJ,GACrCK,aAAAA,EAAe,SAAOL,GACtBM,cAAAA,EAAgB,SAAON,YACvBO,GAAgBP,WAChBQ,GAAgBR,SAChBS,GAAaT,GACbU,KAAAA,EAAO,WAASV,QAErBW,EAAOC,KAAKC,SACd,IAAAC,EAAmB,IAAAC,EACrBC,IACAC,2eAGDC,EAAA,GAAEC,EAAcpB,EAASqB,KAAKC,MAAMtB,GAAK,SACvCuB,EAALC,OAAAC,UAAuBC,4BACXH,EAAWI,kCAEZ,SAAUC,GACK,MAAA,eAAAA,EAAQhB,KAGvB,SAAUiB,GACjBA,EAAKC,iBAAiB,UAAQ,KACxBD,EAAKE,aAAeF,EAAKG,WAAaH,EAAKI,cAC7ClB,EAAamB,SAAS,YAAW,CAAA,gFA8BfhC,EAAKiC,KAAAlD,6BAULiB,EAAKkC,EAAAC,EAAA,GAAAF,KAAAlD,QAAAkD,KAAAhD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e,i as l,s as t,H as o,e as s,h as i,L as a,k as c,b as n,M as r,n as d,q as m,v as b,w,U as v,$ as u,t as h,l as p,o as x,d as f,R as z,Q as g,m as q,O as _,a0 as k}from"../../index-48da6c1f.js";import{E as y}from"../../EventHandler-f7ee47ca.js";function E(e){o(e,"svelte-1qozwl6",".mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;min-width:20px;min-height:20px;width:1.25rem;height:1.25rem;border-radius:4px;border:2px solid #808080;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6::-ms-check{background-color:#ffffff;border:2px solid #808080;border-radius:4px;color:#ffffff}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:hover{border-color:#191919}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:hover::-ms-check{border-color:#191919}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:checked,.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:indeterminate{background-color:#ff5800;border-color:#ff5800;background-size:1rem 1rem}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\");background-position:center center}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:checked::-ms-check{background-color:#ff5800;border-color:#ff5800}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:checked:hover:not(:disabled){border-color:#ff5800}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:checked:hover:not(:disabled)::-ms-check{border-color:#ff5800}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\")}.mc-checkbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-listbox.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{list-style:none;margin-left:0;padding-left:0;background-color:#ffffff;border:1px solid #666666;border-radius:3px;position:absolute;overflow-y:auto;margin-top:0.25rem;margin-bottom:0;max-height:13.8125rem;min-width:auto;opacity:0;visibility:hidden;max-width:var(--listbox-width, auto);width:100%}.mc-listbox.is-open.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{opacity:1;visibility:visible;z-index:10}.mc-listbox.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__item.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;min-height:3rem;padding-left:0.75rem;padding-right:0.75rem;position:relative;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mc-listbox__item.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox__item.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6:hover{background-color:#e6e6e6;-webkit-box-shadow:inset 9px 0 0 -7px #191919;box-shadow:inset 9px 0 0 -7px #191919}.mc-listbox__empty.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-listbox__label.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{cursor:pointer;margin-right:auto}.mc-listbox__label.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6::after{content:\"\";position:absolute;inset:0;z-index:2}.mc-listbox__input.svelte-1qozwl6.svelte-1qozwl6.svelte-1qozwl6{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox.svelte-1qozwl6 .is-disabled.svelte-1qozwl6.svelte-1qozwl6{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;background-color:#cccccc;color:#666666;pointer-events:none}.mc-listbox.svelte-1qozwl6:not(.mc-listbox--multi) .mc-listbox__input.svelte-1qozwl6.svelte-1qozwl6{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-listbox.svelte-1qozwl6:not(.mc-listbox--multi) .mc-listbox__input.svelte-1qozwl6:checked+.mc-listbox__label.svelte-1qozwl6::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;content:\"\";height:1.5rem;position:absolute;right:0.75rem;top:0;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:1.5rem}")}function C(e,l,t){const o=e.slice();return o[28]=l[t],o[30]=t,o}function $(e){let l,t,o;return{c(){l=s("li"),t=s("span"),o=h(e[5]),i(t,"class","mc-listbox__empty svelte-1qozwl6"),i(l,"class","mc-listbox__item svelte-1qozwl6")},m(e,s){n(e,l,s),p(l,t),p(t,o)},p(e,l){32&l&&x(o,e[5])},d(e){e&&m(l)}}}function B(e){let l,t,o=e[3]&&e[10]&&M(e),s=e[12],i=[];for(let l=0;l<s.length;l+=1)i[l]=O(C(e,s,l));return{c(){o&&o.c(),l=f();for(let e=0;e<i.length;e+=1)i[e].c();t=z()},m(e,s){o&&o.m(e,s),n(e,l,s);for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(e,s);n(e,t,s)},p(e,a){if(e[3]&&e[10]?o?o.p(e,a):(o=M(e),o.c(),o.m(l.parentNode,l)):o&&(o.d(1),o=null),37323&a){let l;for(s=e[12],l=0;l<s.length;l+=1){const o=C(e,s,l);i[l]?i[l].p(o,a):(i[l]=O(o),i[l].c(),i[l].m(t.parentNode,t))}for(;l<i.length;l+=1)i[l].d(1);i.length=s.length}},d(e){o&&o.d(e),e&&m(l),g(i,e),e&&m(t)}}}function M(e){let l,t,o,a,c,r,d;return{c(){l=s("li"),t=s("input"),o=f(),a=s("label"),c=h(e[11]),i(t,"id","select-all"),i(t,"class","mc-listbox__input mc-checkbox__input svelte-1qozwl6"),i(t,"type","checkbox"),t.indeterminate=e[14],i(a,"for","select-all"),i(a,"class","mc-listbox__label svelte-1qozwl6"),i(l,"class","mc-listbox__item svelte-1qozwl6")},m(s,i){n(s,l,i),p(l,t),t.checked=e[13],p(l,o),p(l,a),p(a,c),r||(d=[q(t,"change",e[21]),q(t,"change",e[17])],r=!0)},p(e,l){16384&l&&(t.indeterminate=e[14]),8192&l&&(t.checked=e[13]),2048&l&&x(c,e[11])},d(e){e&&m(l),r=!1,_(d)}}}function H(e){let l,t,o,a,c,r,d,b=!1;return c=k(e[23][0]),{c(){l=s("input"),i(l,"id",e[15](e[30])),i(l,"class","mc-listbox__input mc-checkbox__input svelte-1qozwl6"),i(l,"type","checkbox"),l.__value=t=e[28][e[7]],l.value=l.__value,l.checked=o=e[0].includes(e[28][e[7]]),l.disabled=a=Boolean(e[28][e[8]]),c.p(l)},m(t,o){n(t,l,o),l.checked=~(e[0]||[]).indexOf(l.__value),r||(d=[q(l,"change",e[24]),q(l,"change",e[20])],r=!0)},p(e,s){4224&s&&t!==(t=e[28][e[7]])&&(l.__value=t,l.value=l.__value,b=!0),4225&s&&o!==(o=e[0].includes(e[28][e[7]]))&&(l.checked=o),4352&s&&a!==(a=Boolean(e[28][e[8]]))&&(l.disabled=a),(b||4097&s)&&(l.checked=~(e[0]||[]).indexOf(l.__value))},d(e){e&&m(l),c.r(),r=!1,_(d)}}}function j(e){let l,t,o,a,r,d,b=!1;return a=k(e[23][0]),{c(){l=s("input"),i(l,"id",e[15](e[30])),i(l,"class","mc-listbox__input svelte-1qozwl6"),i(l,"type","radio"),l.__value=t=e[28][e[7]],l.value=l.__value,i(l,"name",e[1]),l.disabled=o=Boolean(e[28][e[8]]),c(l,"is-disabled",e[28][e[8]]),a.p(l)},m(t,o){n(t,l,o),l.checked=l.__value===e[0],r||(d=[q(l,"change",e[22]),q(l,"change",e[19])],r=!0)},p(e,s){4224&s&&t!==(t=e[28][e[7]])&&(l.__value=t,l.value=l.__value,b=!0),2&s&&i(l,"name",e[1]),4352&s&&o!==(o=Boolean(e[28][e[8]]))&&(l.disabled=o),(b||4097&s)&&(l.checked=l.__value===e[0]),4352&s&&c(l,"is-disabled",e[28][e[8]])},d(e){e&&m(l),a.r(),r=!1,_(d)}}}function O(e){let l,t,o,a,r,d=e[28][e[6]]+"";function b(e,l){return e[3]?H:j}let w=b(e),v=w(e);return{c(){l=s("li"),v.c(),t=f(),o=s("label"),a=h(d),r=f(),i(o,"for",e[15](e[30])),i(o,"class","mc-listbox__label svelte-1qozwl6"),i(l,"class","mc-listbox__item svelte-1qozwl6"),c(l,"is-disabled",e[28][e[8]])},m(e,s){n(e,l,s),v.m(l,null),p(l,t),p(l,o),p(o,a),p(l,r)},p(e,o){w===(w=b(e))&&v?v.p(e,o):(v.d(1),v=w(e),v&&(v.c(),v.m(l,t))),4160&o&&d!==(d=e[28][e[6]]+"")&&x(a,d),4352&o&&c(l,"is-disabled",e[28][e[8]])},d(e){e&&m(l),v.d()}}}function L(e){let l,t,o;function b(e,l){return e[4]?$:B}let w=b(e),v=w(e);return{c(){l=s("ul"),v.c(),i(l,"role","listbox"),i(l,"class","mc-listbox svelte-1qozwl6"),i(l,"aria-labelledby","listbox"),a(l,"--listbox-width",e[9]),c(l,"is-open",e[2]),c(l,"mc-listbox--multi",e[3])},m(s,i){n(s,l,i),v.m(l,null),t||(o=r(e[16].call(null,l)),t=!0)},p(e,[t]){w===(w=b(e))&&v?v.p(e,t):(v.d(1),v=w(e),v&&(v.c(),v.m(l,null))),512&t&&a(l,"--listbox-width",e[9]),4&t&&c(l,"is-open",e[2]),8&t&&c(l,"mc-listbox--multi",e[3])},i:d,o:d,d(e){e&&m(l),v.d(),t=!1,o()}}}function N(e,l,t){let o,s,i;const a=Math.random();let{name:c=`listboxradio-${a}`}=l,{items:n}=l,{value:r}=l,{open:d}=l,{multiple:m}=l,{isfiltered:h}=l,{emptysearchlabel:p="No results found"}=l,{datatextexpr:x="label"}=l,{datavalueexpr:f="value"}=l,{datadisabledexpr:z="disabled"}=l,{maxwidth:g="100%"}=l,{selectall:q=!1}=l,{labelselectall:_="Select all"}=l,k=new y(b(),w());const E=[[]];return e.$$set=e=>{"name"in e&&t(1,c=e.name),"items"in e&&t(18,n=e.items),"value"in e&&t(0,r=e.value),"open"in e&&t(2,d=e.open),"multiple"in e&&t(3,m=e.multiple),"isfiltered"in e&&t(4,h=e.isfiltered),"emptysearchlabel"in e&&t(5,p=e.emptysearchlabel),"datatextexpr"in e&&t(6,x=e.datatextexpr),"datavalueexpr"in e&&t(7,f=e.datavalueexpr),"datadisabledexpr"in e&&t(8,z=e.datadisabledexpr),"maxwidth"in e&&t(9,g=e.maxwidth),"selectall"in e&&t(10,q=e.selectall),"labelselectall"in e&&t(11,_=e.labelselectall)},e.$$.update=()=>{1024&e.$$.dirty&&t(13,o=null!=q&&q),262144&e.$$.dirty&&t(12,s=n?JSON.parse(n):[]),1&e.$$.dirty&&t(0,r=r?(t(13,o=!1),t(14,i=!1),r&&0===r.length?(t(13,o=!1),t(14,i=!1)):r&&r.length<s.length?t(14,i=!0):r&&r.length===s.length&&t(13,o=!0),r):[])},t(14,i=!0),[r,c,d,m,h,p,x,f,z,g,q,_,s,o,i,function(e){return`listboxItem-${e+a}`},function(e){e.addEventListener("scroll",(()=>{e.offsetHeight+e.scrollTop>=e.scrollHeight&&k.dispatch("scrollend",{})}))},function(e){const l=e.target.checked;t(13,o=!!l),o?s.map((e=>{e[z]||-1!==r.indexOf(e[f])||r.push(e[f])})):t(0,r=[]),k.dispatch("select-all",r),t(0,r)},n,function(l){v.call(this,e,l)},function(l){v.call(this,e,l)},function(){o=this.checked,t(13,o),t(10,q)},function(){r=this.__value,t(0,r)},E,function(){r=u(E[0],this.__value,this.checked),t(0,r)}]}class Y extends e{constructor(e){super(),l(this,e,N,L,t,{name:1,items:18,value:0,open:2,multiple:3,isfiltered:4,emptysearchlabel:5,datatextexpr:6,datavalueexpr:7,datadisabledexpr:8,maxwidth:9,selectall:10,labelselectall:11},E)}}export{Y as default};
|
|
1
|
+
import{G as e,i as l,s as t,H as s,e as i,h as o,L as a,k as c,b as n,n as r,q as x,v as h,w as d,U as b,$ as m,t as v,l as p,o as u,d as f,M as _,Q as g,m as w,O as k,a0 as y}from"../../index-48da6c1f.js";import{E}from"../../EventHandler-f7ee47ca.js";function C(e){s(e,"svelte-2xlh05",".mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;min-width:20px;min-height:20px;width:1.25rem;height:1.25rem;border-radius:4px;border:2px solid #808080;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05::-ms-check{background-color:#ffffff;border:2px solid #808080;border-radius:4px;color:#ffffff}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:hover{border-color:#191919}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:hover::-ms-check{border-color:#191919}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:checked,.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:indeterminate{background-color:#ff5800;border-color:#ff5800;background-size:1rem 1rem}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\");background-position:center center}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:checked::-ms-check{background-color:#ff5800;border-color:#ff5800}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:checked:hover:not(:disabled){border-color:#ff5800}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:checked:hover:not(:disabled)::-ms-check{border-color:#ff5800}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E\")}.mc-checkbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23999999' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E\")}.mc-listbox.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{background-color:#ffffff;border:1px solid #666666;border-radius:3px;overflow-y:auto;max-width:var(--listbox-maxwidth, none);width:var(--listbox-width, auto)}.mc-listbox.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__list.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{list-style:none;margin-left:0;padding-left:0;margin-top:0;margin-right:0;margin-bottom:0}.mc-listbox__tile.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.5rem;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding-left:0.75rem;padding-right:0.75rem;position:relative}.mc-listbox__tile.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05:not(.mc-listbox__tile--empty):not(.is-disabled):hover{background-color:#e6e6e6;-webkit-box-shadow:inset 9px 0 0 -7px #191919;box-shadow:inset 9px 0 0 -7px #191919}.mc-listbox__tile--empty.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{color:#666666;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-listbox__tile--empty.svelte-2xlh05 .mc-listbox__label.svelte-2xlh05.svelte-2xlh05{cursor:default}.mc-listbox__tile.is-disabled.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{-webkit-box-shadow:none;box-shadow:none;background-color:#cccccc;color:#666666;pointer-events:none}.mc-listbox__label.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{font-size:1rem;line-height:1.375;color:currentColor;cursor:pointer;white-space:nowrap}.mc-listbox__label.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05::after{content:\"\";position:absolute;inset:0;z-index:2}.mc-listbox__input.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{margin-left:auto;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox.svelte-2xlh05:not(.mc-listbox--multi) .mc-listbox__input.svelte-2xlh05.svelte-2xlh05{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.mc-listbox--options.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{max-height:13.8125rem;min-width:18rem}.mc-listbox--options.svelte-2xlh05 .mc-listbox__tile.svelte-2xlh05.svelte-2xlh05{height:3rem}.mc-listbox--options.svelte-2xlh05 .mc-listbox__tile.svelte-2xlh05.svelte-2xlh05:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox--options.svelte-2xlh05 .mc-listbox__tile.is-selected .mc-listbox__label.svelte-2xlh05.svelte-2xlh05::before{visibility:visible}.mc-listbox--options.svelte-2xlh05 .mc-listbox__tile.is-selected.is-disabled .mc-listbox__label.svelte-2xlh05.svelte-2xlh05::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\")}.mc-listbox--options.svelte-2xlh05 .mc-listbox__input.svelte-2xlh05:checked+.mc-listbox__label.svelte-2xlh05::before{visibility:visible}.mc-listbox--options.svelte-2xlh05 .mc-listbox__input.svelte-2xlh05:checked:disabled+.mc-listbox__label.svelte-2xlh05::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\")}.mc-listbox--options.svelte-2xlh05 .mc-listbox__label.svelte-2xlh05.svelte-2xlh05::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23191919' height='1.5rem' width='1.5rem'%3E%3Cpath d='M10 18.68a1 1 0 01-.7-.29l-5-5A1 1 0 015.73 12L10 16.27 18.31 8a1 1 0 011.42 1.42l-9 9a1 1 0 01-.73.26z'/%3E%3C/svg%3E\");background-position:center;background-repeat:no-repeat;background-size:1.5rem;content:\"\";height:1.5rem;position:absolute;right:0.75rem;top:0;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:1.5rem;visibility:hidden}.mc-listbox--overlay.svelte-2xlh05.svelte-2xlh05.svelte-2xlh05{position:absolute;z-index:10}")}function z(e,l,t){const s=e.slice();return s[30]=l[t],s[32]=t,s}function $(e){let l,t,s;return{c(){l=i("div"),t=i("span"),s=v(e[4]),o(t,"class","mc-listbox__label svelte-2xlh05"),o(l,"class","mc-listbox__tile mc-listbox__tile--empty svelte-2xlh05")},m(e,i){n(e,l,i),p(l,t),p(t,s)},p(e,l){16&l[0]&&u(s,e[4])},d(e){e&&x(l)}}}function B(e){let l,t,s,a,c=e[2]&&e[9]&&M(e),r=e[14],h=[];for(let l=0;l<r.length;l+=1)h[l]=O(z(e,r,l));return{c(){l=i("ul"),c&&c.c(),t=f();for(let e=0;e<h.length;e+=1)h[e].c();o(l,"role","listbox"),o(l,"class","mc-listbox__list svelte-2xlh05"),o(l,"aria-labelledby","listbox")},m(i,o){n(i,l,o),c&&c.m(l,null),p(l,t);for(let e=0;e<h.length;e+=1)h[e]&&h[e].m(l,null);s||(a=_(e[18].call(null,l)),s=!0)},p(e,s){if(e[2]&&e[9]?c?c.p(e,s):(c=M(e),c.c(),c.m(l,t)):c&&(c.d(1),c=null),147687&s[0]){let t;for(r=e[14],t=0;t<r.length;t+=1){const i=z(e,r,t);h[t]?h[t].p(i,s):(h[t]=O(i),h[t].c(),h[t].m(l,null))}for(;t<h.length;t+=1)h[t].d(1);h.length=r.length}},d(e){e&&x(l),c&&c.d(),g(h,e),s=!1,a()}}}function M(e){let l,t,s,a,c,r,h;return{c(){l=i("li"),t=i("input"),s=f(),a=i("label"),c=v(e[10]),o(t,"id","select-all"),o(t,"class","mc-listbox__input mc-checkbox__input svelte-2xlh05"),o(t,"type","checkbox"),t.indeterminate=e[16],o(a,"for","select-all"),o(a,"class","mc-listbox__label svelte-2xlh05"),o(l,"class","mc-listbox__tile svelte-2xlh05")},m(i,o){n(i,l,o),p(l,t),t.checked=e[15],p(l,s),p(l,a),p(a,c),r||(h=[w(t,"change",e[23]),w(t,"change",e[19])],r=!0)},p(e,l){65536&l[0]&&(t.indeterminate=e[16]),32768&l[0]&&(t.checked=e[15]),1024&l[0]&&u(c,e[10])},d(e){e&&x(l),r=!1,k(h)}}}function H(e){let l,t,s,a,c,r,h,d=!1;return c=y(e[25][0]),{c(){l=i("input"),o(l,"id",e[17](e[32])),o(l,"class","mc-listbox__input mc-checkbox__input svelte-2xlh05"),o(l,"type","checkbox"),l.__value=t=e[30][e[6]],l.value=l.__value,l.checked=s=e[0].includes(e[30][e[6]]),l.disabled=a=Boolean(e[30][e[7]]),c.p(l)},m(t,s){n(t,l,s),l.checked=~(e[0]||[]).indexOf(l.__value),r||(h=[w(l,"change",e[26]),w(l,"change",e[22])],r=!0)},p(e,i){16448&i[0]&&t!==(t=e[30][e[6]])&&(l.__value=t,l.value=l.__value,d=!0),16449&i[0]&&s!==(s=e[0].includes(e[30][e[6]]))&&(l.checked=s),16512&i[0]&&a!==(a=Boolean(e[30][e[7]]))&&(l.disabled=a),(d||16385&i[0])&&(l.checked=~(e[0]||[]).indexOf(l.__value))},d(e){e&&x(l),c.r(),r=!1,k(h)}}}function L(e){let l,t,s,a,r,h,d=!1;return a=y(e[25][0]),{c(){l=i("input"),o(l,"id",e[17](e[32])),o(l,"class","mc-listbox__input svelte-2xlh05"),o(l,"type","radio"),l.__value=t=e[30][e[6]],l.value=l.__value,o(l,"name",e[1]),l.disabled=s=Boolean(e[30][e[7]]),c(l,"is-disabled",e[30][e[7]]),a.p(l)},m(t,s){n(t,l,s),l.checked=l.__value===e[0],r||(h=[w(l,"change",e[24]),w(l,"change",e[21])],r=!0)},p(e,i){16448&i[0]&&t!==(t=e[30][e[6]])&&(l.__value=t,l.value=l.__value,d=!0),2&i[0]&&o(l,"name",e[1]),16512&i[0]&&s!==(s=Boolean(e[30][e[7]]))&&(l.disabled=s),(d||16385&i[0])&&(l.checked=l.__value===e[0]),16512&i[0]&&c(l,"is-disabled",e[30][e[7]])},d(e){e&&x(l),a.r(),r=!1,k(h)}}}function O(e){let l,t,s,a,r,h=e[30][e[5]]+"";function d(e,l){return e[2]?H:L}let b=d(e),m=b(e);return{c(){l=i("li"),m.c(),t=f(),s=i("label"),a=v(h),r=f(),o(s,"for",e[17](e[32])),o(s,"class","mc-listbox__label svelte-2xlh05"),o(l,"class","mc-listbox__tile svelte-2xlh05"),c(l,"is-disabled",e[30][e[7]])},m(e,i){n(e,l,i),m.m(l,null),p(l,t),p(l,s),p(s,a),p(l,r)},p(e,s){b===(b=d(e))&&m?m.p(e,s):(m.d(1),m=b(e),m&&(m.c(),m.m(l,t))),16416&s[0]&&h!==(h=e[30][e[5]]+"")&&u(a,h),16512&s[0]&&c(l,"is-disabled",e[30][e[7]])},d(e){e&&x(l),m.d()}}}function j(e){let l;function t(e,l){return e[3]?$:B}let s=t(e),h=s(e);return{c(){l=i("div"),h.c(),o(l,"class","mc-listbox svelte-2xlh05"),a(l,"--listbox-maxwidth",e[8]),a(l,"--listbox-width",e[12]),c(l,"mc-listbox--options","options"===e[13]),c(l,"mc-listbox--multi",e[2]),c(l,"mc-listbox--overlay",e[11])},m(e,t){n(e,l,t),h.m(l,null)},p(e,i){s===(s=t(e))&&h?h.p(e,i):(h.d(1),h=s(e),h&&(h.c(),h.m(l,null))),256&i[0]&&a(l,"--listbox-maxwidth",e[8]),4096&i[0]&&a(l,"--listbox-width",e[12]),8192&i[0]&&c(l,"mc-listbox--options","options"===e[13]),4&i[0]&&c(l,"mc-listbox--multi",e[2]),2048&i[0]&&c(l,"mc-listbox--overlay",e[11])},i:r,o:r,d(e){e&&x(l),h.d()}}}function A(e,l,t){let s,i,o;const a=Math.random();let{name:c=`listboxradio-${a}`}=l,{items:n}=l,{value:r}=l,{multiple:x}=l,{isfiltered:v}=l,{emptysearchlabel:p="No results found"}=l,{datatextexpr:u="label"}=l,{datavalueexpr:f="value"}=l,{datadisabledexpr:_="disabled"}=l,{maxwidth:g}=l,{selectall:w=!1}=l,{labelselectall:k="Select all"}=l,{overlay:y}=l,{width:C}=l,{type:z="options"}=l,$=new E(h(),d());const B=[[]];return e.$$set=e=>{"name"in e&&t(1,c=e.name),"items"in e&&t(20,n=e.items),"value"in e&&t(0,r=e.value),"multiple"in e&&t(2,x=e.multiple),"isfiltered"in e&&t(3,v=e.isfiltered),"emptysearchlabel"in e&&t(4,p=e.emptysearchlabel),"datatextexpr"in e&&t(5,u=e.datatextexpr),"datavalueexpr"in e&&t(6,f=e.datavalueexpr),"datadisabledexpr"in e&&t(7,_=e.datadisabledexpr),"maxwidth"in e&&t(8,g=e.maxwidth),"selectall"in e&&t(9,w=e.selectall),"labelselectall"in e&&t(10,k=e.labelselectall),"overlay"in e&&t(11,y=e.overlay),"width"in e&&t(12,C=e.width),"type"in e&&t(13,z=e.type)},e.$$.update=()=>{512&e.$$.dirty[0]&&t(15,s=null!=w&&w),1048576&e.$$.dirty[0]&&t(14,i=n?JSON.parse(n):[]),1&e.$$.dirty[0]&&t(0,r=r?(t(15,s=!1),t(16,o=!1),r&&0===r.length?(t(15,s=!1),t(16,o=!1)):r&&r.length<i.length?t(16,o=!0):r&&r.length===i.length&&t(15,s=!0),r):[])},t(16,o=!0),[r,c,x,v,p,u,f,_,g,w,k,y,C,z,i,s,o,function(e){return`listboxItem-${e+a}`},function(e){e.addEventListener("scroll",(()=>{e.offsetHeight+e.scrollTop>=e.scrollHeight&&$.dispatch("scrollend",{})}))},function(e){const l=e.target.checked;t(15,s=!!l),s?i.map((e=>{e[_]||-1!==r.indexOf(e[f])||r.push(e[f])})):t(0,r=[]),$.dispatch("select-all",r),t(0,r)},n,function(l){b.call(this,e,l)},function(l){b.call(this,e,l)},function(){s=this.checked,t(15,s),t(9,w)},function(){r=this.__value,t(0,r)},B,function(){r=m(B[0],this.__value,this.checked),t(0,r)}]}class Y extends e{constructor(e){super(),l(this,e,A,j,t,{name:1,items:20,value:0,multiple:2,isfiltered:3,emptysearchlabel:4,datatextexpr:5,datavalueexpr:6,datadisabledexpr:7,maxwidth:8,selectall:9,labelselectall:10,overlay:11,width:12,type:13},C,[-1,-1])}}export{Y as default};
|
|
2
2
|
//# sourceMappingURL=Listbox.nested.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.nested.js","sources":["../../../../src/components/listbox/Listbox.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { ListboxItems } from './listbox.types';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n\n const uuid = Math.random();\n\n export let name: string = `listboxradio-${uuid}`;\n export let items: string;\n export let value: any;\n export let
|
|
1
|
+
{"version":3,"file":"Listbox.nested.js","sources":["../../../../src/components/listbox/Listbox.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { ListboxItems } from './listbox.types';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n get_current_component,\n createEventDispatcher,\n } from 'svelte/internal';\n\n const uuid = Math.random();\n\n export let name: string = `listboxradio-${uuid}`;\n export let items: string;\n export let value: any;\n export let multiple: boolean;\n export let isfiltered: boolean;\n export let emptysearchlabel = 'No results found';\n export let datatextexpr = 'label';\n export let datavalueexpr = 'value';\n export let datadisabledexpr = 'disabled';\n export let maxwidth: string;\n export let selectall = false;\n export let labelselectall = 'Select all';\n export let overlay: boolean;\n export let width: string;\n export let type = 'options';\n\n let eventHandler = new EventHandler(\n get_current_component(),\n createEventDispatcher(),\n );\n\n $: allSelected = selectall ?? false;\n $: parsedItems = items ? (JSON.parse(items) as ListboxItems[]) : [];\n $: value = value ? (determineSelectionState() as []) : [];\n $: selectAllIndeterminate = true;\n\n function determineSelectionState(): [] {\n allSelected = false;\n selectAllIndeterminate = false;\n if (value && value.length === 0) {\n allSelected = false;\n selectAllIndeterminate = false;\n } else if (value && value.length < parsedItems.length) {\n selectAllIndeterminate = true;\n } else if (value && value.length === parsedItems.length) {\n allSelected = true;\n }\n\n return value;\n }\n\n function setItemId(index: number) {\n return `listboxItem-${index + uuid}`;\n }\n\n function scrollEnd(node: HTMLElement) {\n node.addEventListener('scroll', () => {\n if (node.offsetHeight + node.scrollTop >= node.scrollHeight) {\n eventHandler.dispatch('scrollend', {});\n }\n });\n }\n\n function onSelectAll(e: Event) {\n const ischecked = (<HTMLInputElement>e.target).checked;\n allSelected = ischecked ? true : false;\n if (allSelected) {\n parsedItems.map((item) => {\n if (\n !item[datadisabledexpr] &&\n value.indexOf(item[datavalueexpr]) === -1\n )\n value.push(item[datavalueexpr]);\n });\n } else {\n value = [];\n }\n eventHandler.dispatch('select-all', value);\n value = value;\n }\n</script>\n\n<div\n class=\"mc-listbox\"\n class:mc-listbox--options={type === 'options'}\n class:mc-listbox--multi={multiple}\n class:mc-listbox--overlay={overlay}\n style=\"--listbox-maxwidth: {maxwidth}; --listbox-width: {width};\"\n>\n {#if !isfiltered}\n <ul\n role=\"listbox\"\n class=\"mc-listbox__list\"\n aria-labelledby=\"listbox\"\n use:scrollEnd\n >\n {#if multiple && selectall}\n <li class=\"mc-listbox__tile\">\n <input\n id=\"select-all\"\n class=\"mc-listbox__input mc-checkbox__input\"\n type=\"checkbox\"\n indeterminate={selectAllIndeterminate}\n bind:checked={allSelected}\n on:change={onSelectAll}\n />\n <label for=\"select-all\" class=\"mc-listbox__label\">\n {labelselectall}\n </label>\n </li>\n {/if}\n {#each parsedItems as item, index}\n <li class=\"mc-listbox__tile\" class:is-disabled={item[datadisabledexpr]}>\n {#if !multiple}\n <input\n id={setItemId(index)}\n class=\"mc-listbox__input\"\n class:is-disabled={item[datadisabledexpr]}\n type=\"radio\"\n value={item[datavalueexpr]}\n {name}\n disabled={Boolean(item[datadisabledexpr])}\n bind:group={value}\n on:change\n />\n {:else}\n <input\n id={setItemId(index)}\n class=\"mc-listbox__input mc-checkbox__input\"\n type=\"checkbox\"\n value={item[datavalueexpr]}\n checked={value.includes(item[datavalueexpr])}\n disabled={Boolean(item[datadisabledexpr])}\n bind:group={value}\n on:change\n />\n {/if}\n\n <label for={setItemId(index)} class=\"mc-listbox__label\">\n {item[datatextexpr]}\n </label>\n </li>\n {/each}\n </ul>\n {:else}\n <div class=\"mc-listbox__tile mc-listbox__tile--empty\">\n <span class=\"mc-listbox__label\">{emptysearchlabel}</span>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.checkbox';\n @import '@mozaic-ds/styles/components/c.listbox';\n</style>\n"],"names":["ctx","insert","target","div","anchor","append","span","if_block","create_if_block_2","length","i","ul","li","input","label","attr","__value","input_value_value","checked","input_checked_value","includes","Boolean","indexOf","dirty","toggle_class","t1_value","create_if_block_1","set_data","t1","create_if_block","uuid","Math","random","name","$$props","items","value","multiple","isfiltered","emptysearchlabel","datatextexpr","datavalueexpr","datadisabledexpr","maxwidth","selectall","labelselectall","overlay","width","type","eventHandler","EventHandler","get_current_component","createEventDispatcher","$$invalidate","allSelected","parsedItems","JSON","parse","selectAllIndeterminate","index","node","addEventListener","offsetHeight","scrollTop","scrollHeight","dispatch","e","ischecked","map","item","push","this","get_binding_group_value","$$binding_groups"],"mappings":"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"}
|