@mozaic-ds/web-components 0.7.0 → 0.9.0-beta
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 +1 -1
- package/public/ClickOutside-63071e7a.js +15 -1
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-c37a5d51.js +762 -0
- package/public/DataTableDefaultAction.nested-c37a5d51.js.map +1 -0
- package/public/DataTableUtilities-313a448d.js +386 -0
- package/public/DataTableUtilities-313a448d.js.map +1 -0
- package/public/EventForward-8492ff62.js +109 -1
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +15 -1
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/{DataTableDefaultAction.nested-90536fe3.js → DataTableDefaultAction.nested-ac2e3dbe.js} +2 -2
- package/public/adeo/{DataTableDefaultAction.nested-90536fe3.js.map → DataTableDefaultAction.nested-ac2e3dbe.js.map} +1 -1
- package/public/adeo/DataTableUtilities-313a448d.js +2 -0
- package/public/adeo/DataTableUtilities-313a448d.js.map +1 -0
- package/public/adeo/bundle.js +5 -0
- package/public/adeo/components/barchart/BarChart.svelte +3 -4
- package/public/adeo/components/chart/BarChart.js +1 -1
- package/public/adeo/components/chart/BarChart.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 +12 -0
- package/public/adeo/components/datatable/DataTableDefaultAction.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableFooter.nested.js +1 -1
- package/public/adeo/components/datatable/data.d.ts.map +1 -1
- package/public/adeo/components/datatable/datatable.types.d.ts +9 -2
- package/public/adeo/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/adeo/components/header/Header.js +1 -1
- package/public/adeo/components/header/Header.js.map +1 -1
- package/public/adeo/components/header/Header.svelte +2 -2
- package/public/adeo/components/kpi/Kpi.js +2 -0
- package/public/adeo/components/kpi/Kpi.js.map +1 -0
- package/public/adeo/components/kpi/Kpi.svelte +232 -0
- package/public/adeo/components/sidebar/Sidebar.js +1 -1
- package/public/adeo/components/sidebar/Sidebar.js.map +1 -1
- package/public/adeo/components/sidebar/Sidebar.svelte +1 -1
- package/public/adeo/icons-storybook.js +16 -0
- package/public/adeo/main.d.ts +1 -0
- package/public/adeo/main.d.ts.map +1 -1
- package/public/adeo/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/adeo/utilities/DataTableUtilities.ts +22 -2
- package/public/array-5b770a93.js +13 -1
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +174 -1
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +186 -1
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/{DataTableDefaultAction.nested-928e5e2d.js → DataTableDefaultAction.nested-bcc599d1.js} +2 -2
- package/public/bricoman/{DataTableDefaultAction.nested-928e5e2d.js.map → DataTableDefaultAction.nested-bcc599d1.js.map} +1 -1
- package/public/bricoman/DataTableUtilities-313a448d.js +2 -0
- package/public/bricoman/DataTableUtilities-313a448d.js.map +1 -0
- package/public/bricoman/bundle.js +5 -0
- package/public/bricoman/components/barchart/BarChart.svelte +3 -4
- package/public/bricoman/components/chart/BarChart.js +1 -1
- package/public/bricoman/components/chart/BarChart.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 +12 -0
- package/public/bricoman/components/datatable/DataTableDefaultAction.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableFooter.nested.js +1 -1
- package/public/bricoman/components/datatable/data.d.ts.map +1 -1
- package/public/bricoman/components/datatable/datatable.types.d.ts +9 -2
- package/public/bricoman/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/header/Header.js.map +1 -1
- package/public/bricoman/components/header/Header.svelte +2 -2
- package/public/bricoman/components/kpi/Kpi.js +2 -0
- package/public/bricoman/components/kpi/Kpi.js.map +1 -0
- package/public/bricoman/components/kpi/Kpi.svelte +232 -0
- package/public/bricoman/components/sidebar/Sidebar.js +1 -1
- package/public/bricoman/components/sidebar/Sidebar.js.map +1 -1
- package/public/bricoman/components/sidebar/Sidebar.svelte +1 -1
- package/public/bricoman/icons-storybook.js +16 -0
- package/public/bricoman/main.d.ts +1 -0
- package/public/bricoman/main.d.ts.map +1 -1
- package/public/bricoman/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/bricoman/utilities/DataTableUtilities.ts +22 -2
- package/public/bundle.js +5 -0
- package/public/components/accordion/Accordion.js +365 -1
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1515 -1
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/badge/Badge.js +155 -1
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +101 -1
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/barchart/BarChart.svelte +3 -4
- package/public/components/breadcrumb/Breadcrumb.js +372 -1
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1138 -1
- package/public/components/button/Button.js.map +1 -1
- package/public/components/card/Card.js +369 -1
- package/public/components/card/Card.js.map +1 -1
- package/public/components/chart/BarChart.js +583 -1
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1189 -1
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +750 -1
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1731 -1
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +729 -1
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +745 -1
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +307 -1
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js +404 -1
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/datatable/DataTable.js +3098 -1
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +12 -0
- package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +637 -1
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/datatable/data.d.ts.map +1 -1
- package/public/components/datatable/datatable.types.d.ts +9 -2
- package/public/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/components/dropdown/Dropdown.js +1426 -1
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +375 -1
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +603 -1
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/ResultFile.nested.js +344 -1
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +174 -1
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +918 -1
- package/public/components/header/Header.js.map +1 -1
- package/public/components/header/Header.svelte +2 -2
- package/public/components/hero/Hero.js +271 -1
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/kpi/Kpi.js +405 -0
- package/public/components/kpi/Kpi.js.map +1 -0
- package/public/components/kpi/Kpi.svelte +232 -0
- package/public/components/layer/Layer.js +471 -1
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/link/Link.js +380 -1
- package/public/components/link/Link.js.map +1 -1
- package/public/components/listbox/Listbox.js +595 -1
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +629 -1
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +246 -1
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +176 -1
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +395 -1
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +458 -1
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +316 -1
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +104 -1
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +151 -1
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +613 -1
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/passwordinput/PasswordInput.js +291 -1
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +6894 -1
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/price/Price.js +768 -1
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +278 -1
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +397 -1
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/radio/Radio.js +273 -1
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +414 -1
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/ratings/StarsInput.js +292 -1
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +246 -1
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/select/Select.js +451 -1
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +784 -1
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/Sidebar.svelte +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +594 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +402 -1
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +394 -1
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +200 -1
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +49 -1
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +733 -1
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/stepper/Stepper.js +371 -1
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +615 -1
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +472 -1
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +665 -1
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +554 -1
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/taglist/TagList.js +475 -1
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +303 -1
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +497 -1
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +320 -1
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +278 -1
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +173 -1
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/icons-storybook.js +16 -0
- package/public/index-c33b3772.js +873 -1
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +700 -1
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/main.d.ts +1 -0
- package/public/main.d.ts.map +1 -1
- package/public/path-1b5da959.js +186 -1
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +129 -1
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/symbol-b05a6e2b.js +169 -1
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +2743 -1
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/utilities/DataTableUtilities.ts +22 -2
- package/public/utilities/EventForward.js +136 -1
- package/public/utilities/EventForward.js.map +1 -1
- package/public/utilities/EventHandler.js +36 -1
- package/public/utilities/EventHandler.js.map +1 -1
- package/public/utilities/components/datatable/data.d.ts.map +1 -1
- package/public/utilities/components/datatable/datatable.types.d.ts +9 -2
- package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/utilities/main.d.ts +1 -0
- package/public/utilities/main.d.ts.map +1 -1
- package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
- package/public/utilities/stories/header/Header.stories.d.ts.map +1 -1
- 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/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/DataTableDefaultAction.nested-483f8bb0.js +0 -2
- package/public/DataTableDefaultAction.nested-483f8bb0.js.map +0 -1
- package/public/DataTableUtilities-60220c78.js +0 -2
- package/public/DataTableUtilities-60220c78.js.map +0 -1
- package/public/adeo/DataTableUtilities-60220c78.js +0 -2
- package/public/adeo/DataTableUtilities-60220c78.js.map +0 -1
- package/public/bricoman/DataTableUtilities-60220c78.js +0 -2
- package/public/bricoman/DataTableUtilities-60220c78.js.map +0 -1
|
@@ -1,2 +1,630 @@
|
|
|
1
|
-
import{P as e,i,s as t,Q as l,e as s,g as o,y as c,z as a,b as n,B as r,n as d,o as g,O as b,V as m,t as k,j as v,k as u,d as x,K as p,J as h,l as f,H as _,W as M}from"../../index-c33b3772.js";import{E as w}from"../../EventHandler-02058705.js";function I(e){l(e,"svelte-1gek1i1",'.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{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 #666666;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-ms-check{background-color:#ffffff;border:2px solid #666666;border-radius:4px;color:#ffffff}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:hover{border-color:#191919}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:hover::-ms-check{border-color:#191919}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1: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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked,.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:indeterminate{background-color:#46a610;border-color:#46a610;background-size:1rem 1rem}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiNmZmZmZmYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTcuNjMgMTEuMjFhMSAxIDAgMCAxLTEuMzggMGwtMi45Mi0yLjZhMSAxIDAgMSAxIDEuMzQtMS40OGwyLjIyIDIgNC40MS00LjM0YTEgMSAwIDEgMSAxLjQgMS40MnoiLz48L3N2Zz4=");background-position:center center}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked::-ms-check{background-color:#46a610;border-color:#46a610}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked:hover:not(:disabled){border-color:#035010}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked:hover:not(:disabled)::-ms-check{border-color:#035010}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:indeterminate{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiNmZmZmZmYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTEyIDlINGExIDEgMCAwMTAtMmg4YTEgMSAwIDAxMCAyeiIvPjwvc3ZnPg==")}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled:checked{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiM5OTk5OTkiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTcuNjMgMTEuMjFhMSAxIDAgMCAxLTEuMzggMGwtMi45Mi0yLjZhMSAxIDAgMSAxIDEuMzQtMS40OGwyLjIyIDIgNC40MS00LjM0YTEgMSAwIDEgMSAxLjQgMS40MnoiLz48L3N2Zz4=")}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled:indeterminate{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiM5OTk5OTkiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTEyIDlINGExIDEgMCAwMTAtMmg4YTEgMSAwIDAxMCAyeiIvPjwvc3ZnPg==")}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{opacity:1;visibility:visible;z-index:10}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__item.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{-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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox__item.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1: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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-listbox__label.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{cursor:pointer;margin-right:auto}.mc-listbox__label.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::after{content:"";position:absolute;inset:0;z-index:2}.mc-listbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox.svelte-1gek1i1 .is-disabled.svelte-1gek1i1.svelte-1gek1i1{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;background-color:#cccccc;color:#666666;pointer-events:none}.mc-listbox.svelte-1gek1i1:not(.mc-listbox--multi) .mc-listbox__input.svelte-1gek1i1.svelte-1gek1i1{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-1gek1i1:not(.mc-listbox--multi) .mc-listbox__input.svelte-1gek1i1:checked+.mc-listbox__label.svelte-1gek1i1::before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwIDE4LjY4YTEgMSAwIDAxLS43LS4yOWwtNS01QTEgMSAwIDAxNS43MyAxMkwxMCAxNi4yNyAxOC4zMSA4YTEgMSAwIDAxMS40MiAxLjQybC05IDlhMSAxIDAgMDEtLjczLjI2eiIvPjwvc3ZnPg==");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 y(e,i,t){const l=e.slice();return l[27]=i[t],l[29]=t,l}function A(e){let i,t,l;return{c(){i=s("li"),t=s("span"),l=k(e[4]),o(t,"class","mc-listbox__empty svelte-1gek1i1"),o(i,"class","mc-listbox__item svelte-1gek1i1")},m(e,s){n(e,i,s),v(i,t),v(t,l)},p(e,i){16&i&&u(l,e[4])},d(e){e&&g(i)}}}function Z(e){let i,t,l=e[2]&&e[9]&&j(e),s=e[11],o=[];for(let i=0;i<s.length;i+=1)o[i]=N(y(e,s,i));return{c(){l&&l.c(),i=x();for(let e=0;e<o.length;e+=1)o[e].c();t=p()},m(e,s){l&&l.m(e,s),n(e,i,s);for(let i=0;i<o.length;i+=1)o[i]&&o[i].m(e,s);n(e,t,s)},p(e,c){if(e[2]&&e[9]?l?l.p(e,c):(l=j(e),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null),51429&c){let i;for(s=e[11],i=0;i<s.length;i+=1){const l=y(e,s,i);o[i]?o[i].p(l,c):(o[i]=N(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=s.length}},d(e){l&&l.d(e),e&&g(i),h(o,e),e&&g(t)}}}function j(e){let i,t,l,c,a,r,d;return{c(){i=s("li"),t=s("input"),l=x(),c=s("label"),a=k(e[10]),o(t,"id","select-all"),o(t,"class","mc-listbox__input mc-checkbox__input svelte-1gek1i1"),o(t,"type","checkbox"),t.indeterminate=e[13],o(c,"for","select-all"),o(c,"class","mc-listbox__label svelte-1gek1i1"),o(i,"class","mc-listbox__item svelte-1gek1i1")},m(s,o){n(s,i,o),v(i,t),t.checked=e[12],v(i,l),v(i,c),v(c,a),r||(d=[f(t,"change",e[21]),f(t,"change",e[17])],r=!0)},p(e,i){8192&i&&(t.indeterminate=e[13]),4096&i&&(t.checked=e[12]),1024&i&&u(a,e[10])},d(e){e&&g(i),r=!1,_(d)}}}function D(e){let i,t,l,c,a,r,d,b=!1;return a=M(e[23][0]),{c(){i=s("input"),o(i,"id",e[15](e[29])),o(i,"class","mc-listbox__input mc-checkbox__input svelte-1gek1i1"),o(i,"type","checkbox"),i.__value=t=e[27][e[6]],i.value=i.__value,i.checked=l=e[0].includes(e[27][e[6]]),i.disabled=c=Boolean(e[27][e[7]]),a.p(i)},m(t,l){n(t,i,l),i.checked=~(e[0]||[]).indexOf(i.__value),r||(d=[f(i,"change",e[24]),f(i,"change",e[20])],r=!0)},p(e,s){2112&s&&t!==(t=e[27][e[6]])&&(i.__value=t,i.value=i.__value,b=!0),2113&s&&l!==(l=e[0].includes(e[27][e[6]]))&&(i.checked=l),2176&s&&c!==(c=Boolean(e[27][e[7]]))&&(i.disabled=c),(b||2049&s)&&(i.checked=~(e[0]||[]).indexOf(i.__value))},d(e){e&&g(i),a.r(),r=!1,_(d)}}}function S(e){let i,t,l,c,r,d,b=!1;return c=M(e[23][0]),{c(){i=s("input"),o(i,"id",e[15](e[29])),o(i,"class","mc-listbox__input svelte-1gek1i1"),o(i,"type","radio"),i.__value=t=e[27][e[6]],i.value=i.__value,o(i,"name",`listboxradio-${e[14]}`),i.disabled=l=Boolean(e[27][e[7]]),a(i,"is-disabled",e[27][e[7]]),c.p(i)},m(t,l){n(t,i,l),i.checked=i.__value===e[0],r||(d=[f(i,"change",e[22]),f(i,"change",e[19])],r=!0)},p(e,s){2112&s&&t!==(t=e[27][e[6]])&&(i.__value=t,i.value=i.__value,b=!0),2176&s&&l!==(l=Boolean(e[27][e[7]]))&&(i.disabled=l),(b||2049&s)&&(i.checked=i.__value===e[0]),2176&s&&a(i,"is-disabled",e[27][e[7]])},d(e){e&&g(i),c.r(),r=!1,_(d)}}}function N(e){let i,t,l,c,r,d=e[27][e[5]]+"";function b(e,i){return e[2]?D:S}let m=b(e),p=m(e);return{c(){i=s("li"),p.c(),t=x(),l=s("label"),c=k(d),r=x(),o(l,"for",e[15](e[29])),o(l,"class","mc-listbox__label svelte-1gek1i1"),o(i,"class","mc-listbox__item svelte-1gek1i1"),a(i,"is-disabled",e[27][e[7]])},m(e,s){n(e,i,s),p.m(i,null),v(i,t),v(i,l),v(l,c),v(i,r)},p(e,l){m===(m=b(e))&&p?p.p(e,l):(p.d(1),p=m(e),p&&(p.c(),p.m(i,t))),2080&l&&d!==(d=e[27][e[5]]+"")&&u(c,d),2176&l&&a(i,"is-disabled",e[27][e[7]])},d(e){e&&g(i),p.d()}}}function z(e){let i,t,l;function b(e,i){return e[3]?A:Z}let m=b(e),k=m(e);return{c(){i=s("ul"),k.c(),o(i,"role","listbox"),o(i,"class","mc-listbox svelte-1gek1i1"),o(i,"aria-labelledby","listbox"),c(i,"--listbox-width",e[8]),a(i,"is-open",e[1]),a(i,"mc-listbox--multi",e[2])},m(s,o){n(s,i,o),k.m(i,null),t||(l=r(e[16].call(null,i)),t=!0)},p(e,[t]){m===(m=b(e))&&k?k.p(e,t):(k.d(1),k=m(e),k&&(k.c(),k.m(i,null))),256&t&&c(i,"--listbox-width",e[8]),2&t&&a(i,"is-open",e[1]),4&t&&a(i,"mc-listbox--multi",e[2])},i:d,o:d,d(e){e&&g(i),k.d(),t=!1,l()}}}function C(e,i,t){let l,s,o,{items:c}=i,{value:a}=i,{open:n}=i,{multiple:r}=i,{isfiltered:d}=i,{emptysearchlabel:g="No results found"}=i,{datatextexpr:k="label"}=i,{datavalueexpr:v="value"}=i,{datadisabledexpr:u="disabled"}=i,{maxwidth:x="100%"}=i,{selectall:p=!1}=i,{labelselectall:h="Select all"}=i;const f=Math.random();let _=new w;const M=[[]];return e.$$set=e=>{"items"in e&&t(18,c=e.items),"value"in e&&t(0,a=e.value),"open"in e&&t(1,n=e.open),"multiple"in e&&t(2,r=e.multiple),"isfiltered"in e&&t(3,d=e.isfiltered),"emptysearchlabel"in e&&t(4,g=e.emptysearchlabel),"datatextexpr"in e&&t(5,k=e.datatextexpr),"datavalueexpr"in e&&t(6,v=e.datavalueexpr),"datadisabledexpr"in e&&t(7,u=e.datadisabledexpr),"maxwidth"in e&&t(8,x=e.maxwidth),"selectall"in e&&t(9,p=e.selectall),"labelselectall"in e&&t(10,h=e.labelselectall)},e.$$.update=()=>{512&e.$$.dirty&&t(12,l=null!=p&&p),262144&e.$$.dirty&&t(11,s=c?JSON.parse(c):[]),1&e.$$.dirty&&t(0,a=a?(t(12,l=!1),t(13,o=!1),a&&0===a.length?(t(12,l=!1),t(13,o=!1)):a&&a.length<s.length?t(13,o=!0):a&&a.length===s.length&&t(12,l=!0),a):[])},t(13,o=!0),[a,n,r,d,g,k,v,u,x,p,h,s,l,o,f,function(e){return`listboxItem-${e+f}`},function(e){e.addEventListener("scroll",(()=>{e.offsetHeight+e.scrollTop>=e.scrollHeight&&_.dispatch("scrollend",{})}))},function(e){const i=e.target.checked;t(12,l=!!i),l?s.map((e=>{e[u]||-1!==a.indexOf(e[v])||a.push(e[v])})):t(0,a=[]),_.dispatch("select-all",a),t(0,a)},c,function(i){b.call(this,e,i)},function(i){b.call(this,e,i)},function(){l=this.checked,t(12,l),t(9,p)},function(){a=this.__value,t(0,a)},M,function(){a=m(M[0],this.__value,this.checked),t(0,a)}]}class T extends e{constructor(e){super(),i(this,e,C,z,t,{items:18,value:0,open:1,multiple:2,isfiltered:3,emptysearchlabel:4,datatextexpr:5,datavalueexpr:6,datadisabledexpr:7,maxwidth:8,selectall:9,labelselectall:10},I)}}export{T as default};
|
|
1
|
+
import { P as SvelteComponent, i as init, s as safe_not_equal, Q as append_styles, e as element, g as attr, y as set_style, z as toggle_class, b as insert, B as action_destroyer, n as noop, o as detach, O as bubble, V as get_binding_group_value, t as text, j as append, k as set_data, d as space, K as empty, J as destroy_each, l as listen, H as run_all, W as init_binding_group } from '../../index-c33b3772.js';
|
|
2
|
+
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
3
|
+
|
|
4
|
+
/* src/components/listbox/Listbox.nested.svelte generated by Svelte v3.58.0 */
|
|
5
|
+
|
|
6
|
+
function add_css(target) {
|
|
7
|
+
append_styles(target, "svelte-1gek1i1", ".mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{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 #666666;background-color:#ffffff;position:relative;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;cursor:pointer}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-ms-check{background-color:#ffffff;border:2px solid #666666;border-radius:4px;color:#ffffff}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:hover{border-color:#191919}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:hover::-ms-check{border-color:#191919}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1: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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:focus::-ms-check{box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked,.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:indeterminate{background-color:#46a610;border-color:#46a610;background-size:1rem 1rem}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiNmZmZmZmYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTcuNjMgMTEuMjFhMSAxIDAgMCAxLTEuMzggMGwtMi45Mi0yLjZhMSAxIDAgMSAxIDEuMzQtMS40OGwyLjIyIDIgNC40MS00LjM0YTEgMSAwIDEgMSAxLjQgMS40MnoiLz48L3N2Zz4=\");background-position:center center}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked::-ms-check{background-color:#46a610;border-color:#46a610}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked:hover:not(:disabled){border-color:#035010}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:checked:hover:not(:disabled)::-ms-check{border-color:#035010}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:indeterminate{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiNmZmZmZmYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTEyIDlINGExIDEgMCAwMTAtMmg4YTEgMSAwIDAxMCAyeiIvPjwvc3ZnPg==\")}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled{background-color:#e6e6e6;border-color:#e6e6e6;cursor:not-allowed}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled::-ms-check{background-color:#e6e6e6;border-color:#e6e6e6}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled:checked{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiM5OTk5OTkiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTcuNjMgMTEuMjFhMSAxIDAgMCAxLTEuMzggMGwtMi45Mi0yLjZhMSAxIDAgMSAxIDEuMzQtMS40OGwyLjIyIDIgNC40MS00LjM0YTEgMSAwIDEgMSAxLjQgMS40MnoiLz48L3N2Zz4=\")}.mc-checkbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:disabled:indeterminate{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMXJlbSIgd2lkdGg9IjFyZW0iIGZpbGw9IiM5OTk5OTkiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTEyIDlINGExIDEgMCAwMTAtMmg4YTEgMSAwIDAxMCAyeiIvPjwvc3ZnPg==\")}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{opacity:1;visibility:visible;z-index:10}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-listbox.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::-webkit-scrollbar-thumb{background:#666666}.mc-listbox__item.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{-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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1:not(:last-child){border-bottom:1px solid #b3b3b3}.mc-listbox__item.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1: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-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-listbox__label.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{cursor:pointer;margin-right:auto}.mc-listbox__label.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1::after{content:\"\";position:absolute;inset:0;z-index:2}.mc-listbox__input.svelte-1gek1i1.svelte-1gek1i1.svelte-1gek1i1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.mc-listbox.svelte-1gek1i1 .is-disabled.svelte-1gek1i1.svelte-1gek1i1{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;background-color:#cccccc;color:#666666;pointer-events:none}.mc-listbox.svelte-1gek1i1:not(.mc-listbox--multi) .mc-listbox__input.svelte-1gek1i1.svelte-1gek1i1{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-1gek1i1:not(.mc-listbox--multi) .mc-listbox__input.svelte-1gek1i1:checked+.mc-listbox__label.svelte-1gek1i1::before{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwIDE4LjY4YTEgMSAwIDAxLS43LS4yOWwtNS01QTEgMSAwIDAxNS43MyAxMkwxMCAxNi4yNyAxOC4zMSA4YTEgMSAwIDAxMS40MiAxLjQybC05IDlhMSAxIDAgMDEtLjczLjI2eiIvPjwvc3ZnPg==\");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}");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function get_each_context(ctx, list, i) {
|
|
11
|
+
const child_ctx = ctx.slice();
|
|
12
|
+
child_ctx[27] = list[i];
|
|
13
|
+
child_ctx[29] = i;
|
|
14
|
+
return child_ctx;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// (122:2) {:else}
|
|
18
|
+
function create_else_block_1(ctx) {
|
|
19
|
+
let li;
|
|
20
|
+
let span;
|
|
21
|
+
let t;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
c() {
|
|
25
|
+
li = element("li");
|
|
26
|
+
span = element("span");
|
|
27
|
+
t = text(/*emptysearchlabel*/ ctx[4]);
|
|
28
|
+
attr(span, "class", "mc-listbox__empty svelte-1gek1i1");
|
|
29
|
+
attr(li, "class", "mc-listbox__item svelte-1gek1i1");
|
|
30
|
+
},
|
|
31
|
+
m(target, anchor) {
|
|
32
|
+
insert(target, li, anchor);
|
|
33
|
+
append(li, span);
|
|
34
|
+
append(span, t);
|
|
35
|
+
},
|
|
36
|
+
p(ctx, dirty) {
|
|
37
|
+
if (dirty & /*emptysearchlabel*/ 16) set_data(t, /*emptysearchlabel*/ ctx[4]);
|
|
38
|
+
},
|
|
39
|
+
d(detaching) {
|
|
40
|
+
if (detaching) detach(li);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// (74:2) {#if !isfiltered}
|
|
46
|
+
function create_if_block(ctx) {
|
|
47
|
+
let t;
|
|
48
|
+
let each_1_anchor;
|
|
49
|
+
let if_block = /*multiple*/ ctx[2] && /*selectall*/ ctx[9] && create_if_block_2(ctx);
|
|
50
|
+
let each_value = /*parsedItems*/ ctx[11];
|
|
51
|
+
let each_blocks = [];
|
|
52
|
+
|
|
53
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
54
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
c() {
|
|
59
|
+
if (if_block) if_block.c();
|
|
60
|
+
t = space();
|
|
61
|
+
|
|
62
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
63
|
+
each_blocks[i].c();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
each_1_anchor = empty();
|
|
67
|
+
},
|
|
68
|
+
m(target, anchor) {
|
|
69
|
+
if (if_block) if_block.m(target, anchor);
|
|
70
|
+
insert(target, t, anchor);
|
|
71
|
+
|
|
72
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
73
|
+
if (each_blocks[i]) {
|
|
74
|
+
each_blocks[i].m(target, anchor);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
insert(target, each_1_anchor, anchor);
|
|
79
|
+
},
|
|
80
|
+
p(ctx, dirty) {
|
|
81
|
+
if (/*multiple*/ ctx[2] && /*selectall*/ ctx[9]) {
|
|
82
|
+
if (if_block) {
|
|
83
|
+
if_block.p(ctx, dirty);
|
|
84
|
+
} else {
|
|
85
|
+
if_block = create_if_block_2(ctx);
|
|
86
|
+
if_block.c();
|
|
87
|
+
if_block.m(t.parentNode, t);
|
|
88
|
+
}
|
|
89
|
+
} else if (if_block) {
|
|
90
|
+
if_block.d(1);
|
|
91
|
+
if_block = null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (dirty & /*parsedItems, datadisabledexpr, setItemId, datatextexpr, datavalueexpr, uuid, Boolean, value, multiple*/ 51429) {
|
|
95
|
+
each_value = /*parsedItems*/ ctx[11];
|
|
96
|
+
let i;
|
|
97
|
+
|
|
98
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
99
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
100
|
+
|
|
101
|
+
if (each_blocks[i]) {
|
|
102
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
103
|
+
} else {
|
|
104
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
105
|
+
each_blocks[i].c();
|
|
106
|
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
for (; i < each_blocks.length; i += 1) {
|
|
111
|
+
each_blocks[i].d(1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
each_blocks.length = each_value.length;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
d(detaching) {
|
|
118
|
+
if (if_block) if_block.d(detaching);
|
|
119
|
+
if (detaching) detach(t);
|
|
120
|
+
destroy_each(each_blocks, detaching);
|
|
121
|
+
if (detaching) detach(each_1_anchor);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// (75:4) {#if multiple && selectall}
|
|
127
|
+
function create_if_block_2(ctx) {
|
|
128
|
+
let li;
|
|
129
|
+
let input;
|
|
130
|
+
let t0;
|
|
131
|
+
let label;
|
|
132
|
+
let t1;
|
|
133
|
+
let mounted;
|
|
134
|
+
let dispose;
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
c() {
|
|
138
|
+
li = element("li");
|
|
139
|
+
input = element("input");
|
|
140
|
+
t0 = space();
|
|
141
|
+
label = element("label");
|
|
142
|
+
t1 = text(/*labelselectall*/ ctx[10]);
|
|
143
|
+
attr(input, "id", "select-all");
|
|
144
|
+
attr(input, "class", "mc-listbox__input mc-checkbox__input svelte-1gek1i1");
|
|
145
|
+
attr(input, "type", "checkbox");
|
|
146
|
+
input.indeterminate = /*selectAllIndeterminate*/ ctx[13];
|
|
147
|
+
attr(label, "for", "select-all");
|
|
148
|
+
attr(label, "class", "mc-listbox__label svelte-1gek1i1");
|
|
149
|
+
attr(li, "class", "mc-listbox__item svelte-1gek1i1");
|
|
150
|
+
},
|
|
151
|
+
m(target, anchor) {
|
|
152
|
+
insert(target, li, anchor);
|
|
153
|
+
append(li, input);
|
|
154
|
+
input.checked = /*allSelected*/ ctx[12];
|
|
155
|
+
append(li, t0);
|
|
156
|
+
append(li, label);
|
|
157
|
+
append(label, t1);
|
|
158
|
+
|
|
159
|
+
if (!mounted) {
|
|
160
|
+
dispose = [
|
|
161
|
+
listen(input, "change", /*input_change_handler*/ ctx[21]),
|
|
162
|
+
listen(input, "change", /*onSelectAll*/ ctx[17])
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
mounted = true;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
p(ctx, dirty) {
|
|
169
|
+
if (dirty & /*selectAllIndeterminate*/ 8192) {
|
|
170
|
+
input.indeterminate = /*selectAllIndeterminate*/ ctx[13];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (dirty & /*allSelected*/ 4096) {
|
|
174
|
+
input.checked = /*allSelected*/ ctx[12];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (dirty & /*labelselectall*/ 1024) set_data(t1, /*labelselectall*/ ctx[10]);
|
|
178
|
+
},
|
|
179
|
+
d(detaching) {
|
|
180
|
+
if (detaching) detach(li);
|
|
181
|
+
mounted = false;
|
|
182
|
+
run_all(dispose);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// (104:8) {:else}
|
|
188
|
+
function create_else_block(ctx) {
|
|
189
|
+
let input;
|
|
190
|
+
let input_value_value;
|
|
191
|
+
let value_has_changed = false;
|
|
192
|
+
let input_checked_value;
|
|
193
|
+
let input_disabled_value;
|
|
194
|
+
let binding_group;
|
|
195
|
+
let mounted;
|
|
196
|
+
let dispose;
|
|
197
|
+
binding_group = init_binding_group(/*$$binding_groups*/ ctx[23][0]);
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
c() {
|
|
201
|
+
input = element("input");
|
|
202
|
+
attr(input, "id", /*setItemId*/ ctx[15](/*index*/ ctx[29]));
|
|
203
|
+
attr(input, "class", "mc-listbox__input mc-checkbox__input svelte-1gek1i1");
|
|
204
|
+
attr(input, "type", "checkbox");
|
|
205
|
+
input.__value = input_value_value = /*item*/ ctx[27][/*datavalueexpr*/ ctx[6]];
|
|
206
|
+
input.value = input.__value;
|
|
207
|
+
input.checked = input_checked_value = /*value*/ ctx[0].includes(/*item*/ ctx[27][/*datavalueexpr*/ ctx[6]]);
|
|
208
|
+
input.disabled = input_disabled_value = Boolean(/*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
209
|
+
binding_group.p(input);
|
|
210
|
+
},
|
|
211
|
+
m(target, anchor) {
|
|
212
|
+
insert(target, input, anchor);
|
|
213
|
+
input.checked = ~(/*value*/ ctx[0] || []).indexOf(input.__value);
|
|
214
|
+
|
|
215
|
+
if (!mounted) {
|
|
216
|
+
dispose = [
|
|
217
|
+
listen(input, "change", /*input_change_handler_2*/ ctx[24]),
|
|
218
|
+
listen(input, "change", /*change_handler_1*/ ctx[20])
|
|
219
|
+
];
|
|
220
|
+
|
|
221
|
+
mounted = true;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
p(ctx, dirty) {
|
|
225
|
+
if (dirty & /*parsedItems, datavalueexpr*/ 2112 && input_value_value !== (input_value_value = /*item*/ ctx[27][/*datavalueexpr*/ ctx[6]])) {
|
|
226
|
+
input.__value = input_value_value;
|
|
227
|
+
input.value = input.__value;
|
|
228
|
+
value_has_changed = true;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (dirty & /*value, parsedItems, datavalueexpr*/ 2113 && input_checked_value !== (input_checked_value = /*value*/ ctx[0].includes(/*item*/ ctx[27][/*datavalueexpr*/ ctx[6]]))) {
|
|
232
|
+
input.checked = input_checked_value;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (dirty & /*parsedItems, datadisabledexpr*/ 2176 && input_disabled_value !== (input_disabled_value = Boolean(/*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]))) {
|
|
236
|
+
input.disabled = input_disabled_value;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (value_has_changed || dirty & /*value, parsedItems*/ 2049) {
|
|
240
|
+
input.checked = ~(/*value*/ ctx[0] || []).indexOf(input.__value);
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
d(detaching) {
|
|
244
|
+
if (detaching) detach(input);
|
|
245
|
+
binding_group.r();
|
|
246
|
+
mounted = false;
|
|
247
|
+
run_all(dispose);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// (92:8) {#if !multiple}
|
|
253
|
+
function create_if_block_1(ctx) {
|
|
254
|
+
let input;
|
|
255
|
+
let input_value_value;
|
|
256
|
+
let value_has_changed = false;
|
|
257
|
+
let input_disabled_value;
|
|
258
|
+
let binding_group;
|
|
259
|
+
let mounted;
|
|
260
|
+
let dispose;
|
|
261
|
+
binding_group = init_binding_group(/*$$binding_groups*/ ctx[23][0]);
|
|
262
|
+
|
|
263
|
+
return {
|
|
264
|
+
c() {
|
|
265
|
+
input = element("input");
|
|
266
|
+
attr(input, "id", /*setItemId*/ ctx[15](/*index*/ ctx[29]));
|
|
267
|
+
attr(input, "class", "mc-listbox__input svelte-1gek1i1");
|
|
268
|
+
attr(input, "type", "radio");
|
|
269
|
+
input.__value = input_value_value = /*item*/ ctx[27][/*datavalueexpr*/ ctx[6]];
|
|
270
|
+
input.value = input.__value;
|
|
271
|
+
attr(input, "name", `listboxradio-${/*uuid*/ ctx[14]}`);
|
|
272
|
+
input.disabled = input_disabled_value = Boolean(/*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
273
|
+
toggle_class(input, "is-disabled", /*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
274
|
+
binding_group.p(input);
|
|
275
|
+
},
|
|
276
|
+
m(target, anchor) {
|
|
277
|
+
insert(target, input, anchor);
|
|
278
|
+
input.checked = input.__value === /*value*/ ctx[0];
|
|
279
|
+
|
|
280
|
+
if (!mounted) {
|
|
281
|
+
dispose = [
|
|
282
|
+
listen(input, "change", /*input_change_handler_1*/ ctx[22]),
|
|
283
|
+
listen(input, "change", /*change_handler*/ ctx[19])
|
|
284
|
+
];
|
|
285
|
+
|
|
286
|
+
mounted = true;
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
p(ctx, dirty) {
|
|
290
|
+
if (dirty & /*parsedItems, datavalueexpr*/ 2112 && input_value_value !== (input_value_value = /*item*/ ctx[27][/*datavalueexpr*/ ctx[6]])) {
|
|
291
|
+
input.__value = input_value_value;
|
|
292
|
+
input.value = input.__value;
|
|
293
|
+
value_has_changed = true;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (dirty & /*parsedItems, datadisabledexpr*/ 2176 && input_disabled_value !== (input_disabled_value = Boolean(/*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]))) {
|
|
297
|
+
input.disabled = input_disabled_value;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (value_has_changed || dirty & /*value, parsedItems*/ 2049) {
|
|
301
|
+
input.checked = input.__value === /*value*/ ctx[0];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (dirty & /*parsedItems, datadisabledexpr*/ 2176) {
|
|
305
|
+
toggle_class(input, "is-disabled", /*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
d(detaching) {
|
|
309
|
+
if (detaching) detach(input);
|
|
310
|
+
binding_group.r();
|
|
311
|
+
mounted = false;
|
|
312
|
+
run_all(dispose);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// (90:4) {#each parsedItems as item, index}
|
|
318
|
+
function create_each_block(ctx) {
|
|
319
|
+
let li;
|
|
320
|
+
let t0;
|
|
321
|
+
let label;
|
|
322
|
+
let t1_value = /*item*/ ctx[27][/*datatextexpr*/ ctx[5]] + "";
|
|
323
|
+
let t1;
|
|
324
|
+
let t2;
|
|
325
|
+
|
|
326
|
+
function select_block_type_1(ctx, dirty) {
|
|
327
|
+
if (!/*multiple*/ ctx[2]) return create_if_block_1;
|
|
328
|
+
return create_else_block;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
let current_block_type = select_block_type_1(ctx);
|
|
332
|
+
let if_block = current_block_type(ctx);
|
|
333
|
+
|
|
334
|
+
return {
|
|
335
|
+
c() {
|
|
336
|
+
li = element("li");
|
|
337
|
+
if_block.c();
|
|
338
|
+
t0 = space();
|
|
339
|
+
label = element("label");
|
|
340
|
+
t1 = text(t1_value);
|
|
341
|
+
t2 = space();
|
|
342
|
+
attr(label, "for", /*setItemId*/ ctx[15](/*index*/ ctx[29]));
|
|
343
|
+
attr(label, "class", "mc-listbox__label svelte-1gek1i1");
|
|
344
|
+
attr(li, "class", "mc-listbox__item svelte-1gek1i1");
|
|
345
|
+
toggle_class(li, "is-disabled", /*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
346
|
+
},
|
|
347
|
+
m(target, anchor) {
|
|
348
|
+
insert(target, li, anchor);
|
|
349
|
+
if_block.m(li, null);
|
|
350
|
+
append(li, t0);
|
|
351
|
+
append(li, label);
|
|
352
|
+
append(label, t1);
|
|
353
|
+
append(li, t2);
|
|
354
|
+
},
|
|
355
|
+
p(ctx, dirty) {
|
|
356
|
+
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) {
|
|
357
|
+
if_block.p(ctx, dirty);
|
|
358
|
+
} else {
|
|
359
|
+
if_block.d(1);
|
|
360
|
+
if_block = current_block_type(ctx);
|
|
361
|
+
|
|
362
|
+
if (if_block) {
|
|
363
|
+
if_block.c();
|
|
364
|
+
if_block.m(li, t0);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (dirty & /*parsedItems, datatextexpr*/ 2080 && t1_value !== (t1_value = /*item*/ ctx[27][/*datatextexpr*/ ctx[5]] + "")) set_data(t1, t1_value);
|
|
369
|
+
|
|
370
|
+
if (dirty & /*parsedItems, datadisabledexpr*/ 2176) {
|
|
371
|
+
toggle_class(li, "is-disabled", /*item*/ ctx[27][/*datadisabledexpr*/ ctx[7]]);
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
d(detaching) {
|
|
375
|
+
if (detaching) detach(li);
|
|
376
|
+
if_block.d();
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function create_fragment(ctx) {
|
|
382
|
+
let ul;
|
|
383
|
+
let mounted;
|
|
384
|
+
let dispose;
|
|
385
|
+
|
|
386
|
+
function select_block_type(ctx, dirty) {
|
|
387
|
+
if (!/*isfiltered*/ ctx[3]) return create_if_block;
|
|
388
|
+
return create_else_block_1;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
let current_block_type = select_block_type(ctx);
|
|
392
|
+
let if_block = current_block_type(ctx);
|
|
393
|
+
|
|
394
|
+
return {
|
|
395
|
+
c() {
|
|
396
|
+
ul = element("ul");
|
|
397
|
+
if_block.c();
|
|
398
|
+
attr(ul, "role", "listbox");
|
|
399
|
+
attr(ul, "class", "mc-listbox svelte-1gek1i1");
|
|
400
|
+
attr(ul, "aria-labelledby", "listbox");
|
|
401
|
+
set_style(ul, "--listbox-width", /*maxwidth*/ ctx[8]);
|
|
402
|
+
toggle_class(ul, "is-open", /*open*/ ctx[1]);
|
|
403
|
+
toggle_class(ul, "mc-listbox--multi", /*multiple*/ ctx[2]);
|
|
404
|
+
},
|
|
405
|
+
m(target, anchor) {
|
|
406
|
+
insert(target, ul, anchor);
|
|
407
|
+
if_block.m(ul, null);
|
|
408
|
+
|
|
409
|
+
if (!mounted) {
|
|
410
|
+
dispose = action_destroyer(/*scrollEnd*/ ctx[16].call(null, ul));
|
|
411
|
+
mounted = true;
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
p(ctx, [dirty]) {
|
|
415
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
416
|
+
if_block.p(ctx, dirty);
|
|
417
|
+
} else {
|
|
418
|
+
if_block.d(1);
|
|
419
|
+
if_block = current_block_type(ctx);
|
|
420
|
+
|
|
421
|
+
if (if_block) {
|
|
422
|
+
if_block.c();
|
|
423
|
+
if_block.m(ul, null);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (dirty & /*maxwidth*/ 256) {
|
|
428
|
+
set_style(ul, "--listbox-width", /*maxwidth*/ ctx[8]);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (dirty & /*open*/ 2) {
|
|
432
|
+
toggle_class(ul, "is-open", /*open*/ ctx[1]);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (dirty & /*multiple*/ 4) {
|
|
436
|
+
toggle_class(ul, "mc-listbox--multi", /*multiple*/ ctx[2]);
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
i: noop,
|
|
440
|
+
o: noop,
|
|
441
|
+
d(detaching) {
|
|
442
|
+
if (detaching) detach(ul);
|
|
443
|
+
if_block.d();
|
|
444
|
+
mounted = false;
|
|
445
|
+
dispose();
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function instance($$self, $$props, $$invalidate) {
|
|
451
|
+
let allSelected;
|
|
452
|
+
let parsedItems;
|
|
453
|
+
let selectAllIndeterminate;
|
|
454
|
+
let { items } = $$props;
|
|
455
|
+
let { value } = $$props;
|
|
456
|
+
let { open } = $$props;
|
|
457
|
+
let { multiple } = $$props;
|
|
458
|
+
let { isfiltered } = $$props;
|
|
459
|
+
let { emptysearchlabel = 'No results found' } = $$props;
|
|
460
|
+
let { datatextexpr = 'label' } = $$props;
|
|
461
|
+
let { datavalueexpr = 'value' } = $$props;
|
|
462
|
+
let { datadisabledexpr = 'disabled' } = $$props;
|
|
463
|
+
let { maxwidth = '100%' } = $$props;
|
|
464
|
+
let { selectall = false } = $$props;
|
|
465
|
+
let { labelselectall = 'Select all' } = $$props;
|
|
466
|
+
const uuid = Math.random();
|
|
467
|
+
let eventHandler = new EventHandler();
|
|
468
|
+
|
|
469
|
+
function determineSelectionState() {
|
|
470
|
+
$$invalidate(12, allSelected = false);
|
|
471
|
+
$$invalidate(13, selectAllIndeterminate = false);
|
|
472
|
+
|
|
473
|
+
if (value && value.length === 0) {
|
|
474
|
+
$$invalidate(12, allSelected = false);
|
|
475
|
+
$$invalidate(13, selectAllIndeterminate = false);
|
|
476
|
+
} else if (value && value.length < parsedItems.length) {
|
|
477
|
+
$$invalidate(13, selectAllIndeterminate = true);
|
|
478
|
+
} else if (value && value.length === parsedItems.length) {
|
|
479
|
+
$$invalidate(12, allSelected = true);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
return value;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function setItemId(index) {
|
|
486
|
+
return `listboxItem-${index + uuid}`;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function scrollEnd(node) {
|
|
490
|
+
node.addEventListener('scroll', () => {
|
|
491
|
+
if (node.offsetHeight + node.scrollTop >= node.scrollHeight) {
|
|
492
|
+
eventHandler.dispatch('scrollend', {});
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
function onSelectAll(e) {
|
|
498
|
+
const ischecked = e.target.checked;
|
|
499
|
+
$$invalidate(12, allSelected = ischecked ? true : false);
|
|
500
|
+
|
|
501
|
+
if (allSelected) {
|
|
502
|
+
parsedItems.map(item => {
|
|
503
|
+
if (!item[datadisabledexpr] && value.indexOf(item[datavalueexpr]) === -1) value.push(item[datavalueexpr]);
|
|
504
|
+
});
|
|
505
|
+
} else {
|
|
506
|
+
$$invalidate(0, value = []);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
eventHandler.dispatch('select-all', value);
|
|
510
|
+
$$invalidate(0, value);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const $$binding_groups = [[]];
|
|
514
|
+
|
|
515
|
+
function change_handler(event) {
|
|
516
|
+
bubble.call(this, $$self, event);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function change_handler_1(event) {
|
|
520
|
+
bubble.call(this, $$self, event);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function input_change_handler() {
|
|
524
|
+
allSelected = this.checked;
|
|
525
|
+
($$invalidate(12, allSelected), $$invalidate(9, selectall));
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
function input_change_handler_1() {
|
|
529
|
+
value = this.__value;
|
|
530
|
+
$$invalidate(0, value);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function input_change_handler_2() {
|
|
534
|
+
value = get_binding_group_value($$binding_groups[0], this.__value, this.checked);
|
|
535
|
+
$$invalidate(0, value);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
$$self.$$set = $$props => {
|
|
539
|
+
if ('items' in $$props) $$invalidate(18, items = $$props.items);
|
|
540
|
+
if ('value' in $$props) $$invalidate(0, value = $$props.value);
|
|
541
|
+
if ('open' in $$props) $$invalidate(1, open = $$props.open);
|
|
542
|
+
if ('multiple' in $$props) $$invalidate(2, multiple = $$props.multiple);
|
|
543
|
+
if ('isfiltered' in $$props) $$invalidate(3, isfiltered = $$props.isfiltered);
|
|
544
|
+
if ('emptysearchlabel' in $$props) $$invalidate(4, emptysearchlabel = $$props.emptysearchlabel);
|
|
545
|
+
if ('datatextexpr' in $$props) $$invalidate(5, datatextexpr = $$props.datatextexpr);
|
|
546
|
+
if ('datavalueexpr' in $$props) $$invalidate(6, datavalueexpr = $$props.datavalueexpr);
|
|
547
|
+
if ('datadisabledexpr' in $$props) $$invalidate(7, datadisabledexpr = $$props.datadisabledexpr);
|
|
548
|
+
if ('maxwidth' in $$props) $$invalidate(8, maxwidth = $$props.maxwidth);
|
|
549
|
+
if ('selectall' in $$props) $$invalidate(9, selectall = $$props.selectall);
|
|
550
|
+
if ('labelselectall' in $$props) $$invalidate(10, labelselectall = $$props.labelselectall);
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
$$self.$$.update = () => {
|
|
554
|
+
if ($$self.$$.dirty & /*selectall*/ 512) {
|
|
555
|
+
$$invalidate(12, allSelected = selectall !== null && selectall !== void 0
|
|
556
|
+
? selectall
|
|
557
|
+
: false);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if ($$self.$$.dirty & /*items*/ 262144) {
|
|
561
|
+
$$invalidate(11, parsedItems = items ? JSON.parse(items) : []);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if ($$self.$$.dirty & /*value*/ 1) {
|
|
565
|
+
$$invalidate(0, value = value ? determineSelectionState() : []);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
$$invalidate(13, selectAllIndeterminate = true);
|
|
570
|
+
|
|
571
|
+
return [
|
|
572
|
+
value,
|
|
573
|
+
open,
|
|
574
|
+
multiple,
|
|
575
|
+
isfiltered,
|
|
576
|
+
emptysearchlabel,
|
|
577
|
+
datatextexpr,
|
|
578
|
+
datavalueexpr,
|
|
579
|
+
datadisabledexpr,
|
|
580
|
+
maxwidth,
|
|
581
|
+
selectall,
|
|
582
|
+
labelselectall,
|
|
583
|
+
parsedItems,
|
|
584
|
+
allSelected,
|
|
585
|
+
selectAllIndeterminate,
|
|
586
|
+
uuid,
|
|
587
|
+
setItemId,
|
|
588
|
+
scrollEnd,
|
|
589
|
+
onSelectAll,
|
|
590
|
+
items,
|
|
591
|
+
change_handler,
|
|
592
|
+
change_handler_1,
|
|
593
|
+
input_change_handler,
|
|
594
|
+
input_change_handler_1,
|
|
595
|
+
$$binding_groups,
|
|
596
|
+
input_change_handler_2
|
|
597
|
+
];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
class Listbox_nested extends SvelteComponent {
|
|
601
|
+
constructor(options) {
|
|
602
|
+
super();
|
|
603
|
+
|
|
604
|
+
init(
|
|
605
|
+
this,
|
|
606
|
+
options,
|
|
607
|
+
instance,
|
|
608
|
+
create_fragment,
|
|
609
|
+
safe_not_equal,
|
|
610
|
+
{
|
|
611
|
+
items: 18,
|
|
612
|
+
value: 0,
|
|
613
|
+
open: 1,
|
|
614
|
+
multiple: 2,
|
|
615
|
+
isfiltered: 3,
|
|
616
|
+
emptysearchlabel: 4,
|
|
617
|
+
datatextexpr: 5,
|
|
618
|
+
datavalueexpr: 6,
|
|
619
|
+
datadisabledexpr: 7,
|
|
620
|
+
maxwidth: 8,
|
|
621
|
+
selectall: 9,
|
|
622
|
+
labelselectall: 10
|
|
623
|
+
},
|
|
624
|
+
add_css
|
|
625
|
+
);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export { Listbox_nested as default };
|
|
2
630
|
//# sourceMappingURL=Listbox.nested.js.map
|