@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,395 @@
|
|
|
1
|
-
import{P as
|
|
1
|
+
import { P as SvelteComponent, i as init, s as safe_not_equal, Q as append_styles, K as empty, b as insert, C as transition_in, D as transition_out, E as check_outros, o as detach, ab as component_subscribe, e as element, d as space, g as attr, R as null_to_empty, j as append, M as group_outros, J as destroy_each, x as create_component, A as mount_component, l as listen, G as destroy_component } from '../../index-c33b3772.js';
|
|
2
|
+
import Sidebar_feature_group_nested from './sidebar-feature-group.nested.js';
|
|
3
|
+
import Sidebar_sub_features_nested from './sidebar-sub-features.nested.js';
|
|
4
|
+
import { t as toggleSidebar, i as isSidebarOpen } from '../../sidebar-service-275bf9ef.js';
|
|
5
|
+
import './sidebar-feature.nested.js';
|
|
6
|
+
import '../../EventHandler-02058705.js';
|
|
7
|
+
|
|
8
|
+
/* src/components/sidebar/sidebar-section.nested.svelte generated by Svelte v3.58.0 */
|
|
9
|
+
|
|
10
|
+
function add_css(target) {
|
|
11
|
+
append_styles(target, "svelte-10lx8df", ".mc-sidebar-section.svelte-10lx8df.svelte-10lx8df{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;min-height:38px;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;padding:1px 0px;scrollbar-color:#8f94a3 #b3b3b3;scrollbar-width:thin}.mc-sidebar-section.svelte-10lx8df ul.svelte-10lx8df,.mc-sidebar-section.svelte-10lx8df li.svelte-10lx8df{list-style-type:none;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.mc-sidebar-section.svelte-10lx8df ul.svelte-10lx8df{-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-sidebar-section.svelte-10lx8df ul li.svelte-10lx8df{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;margin:4px 0px}.mc-sidebar-section.svelte-10lx8df ul li.svelte-10lx8df:first-child{margin-top:0}.mc-sidebar-section.svelte-10lx8df ul li.svelte-10lx8df:last-child{margin-bottom:0}.mc-sidebar-section.svelte-10lx8df ul.is-hidden.svelte-10lx8df{-o-transition:margin-left 300ms ease-in-out;-webkit-transition:margin-left 300ms ease-in-out;transition:margin-left 300ms ease-in-out;margin-left:-320px;opacity:0}.mc-sidebar-section.svelte-10lx8df ul.is-visible.svelte-10lx8df{-o-transition:margin-left 300ms ease-in-out;-webkit-transition:margin-left 300ms ease-in-out;transition:margin-left 300ms ease-in-out;margin-left:0}.mc-sidebar-section.svelte-10lx8df.svelte-10lx8df::-webkit-scrollbar{width:5px;height:10px;background:#b3b3b3}.mc-sidebar-section.svelte-10lx8df.svelte-10lx8df::-webkit-scrollbar-thumb{background:#8f94a3}");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function get_each_context(ctx, list, i) {
|
|
15
|
+
const child_ctx = ctx.slice();
|
|
16
|
+
child_ctx[10] = list[i];
|
|
17
|
+
return child_ctx;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// (37:0) {#if data?.length}
|
|
21
|
+
function create_if_block(ctx) {
|
|
22
|
+
let div;
|
|
23
|
+
let ul;
|
|
24
|
+
let ul_class_value;
|
|
25
|
+
let ul_aria_hidden_value;
|
|
26
|
+
let t;
|
|
27
|
+
let current;
|
|
28
|
+
let each_value = /*data*/ ctx[0];
|
|
29
|
+
let each_blocks = [];
|
|
30
|
+
|
|
31
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
32
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
36
|
+
each_blocks[i] = null;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
let if_block = /*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4] && create_if_block_1(ctx);
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
c() {
|
|
43
|
+
div = element("div");
|
|
44
|
+
ul = element("ul");
|
|
45
|
+
|
|
46
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
47
|
+
each_blocks[i].c();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
t = space();
|
|
51
|
+
if (if_block) if_block.c();
|
|
52
|
+
|
|
53
|
+
attr(ul, "class", ul_class_value = "" + (null_to_empty(/*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4]
|
|
54
|
+
? 'is-hidden'
|
|
55
|
+
: 'is-visible') + " svelte-10lx8df"));
|
|
56
|
+
|
|
57
|
+
attr(ul, "aria-hidden", ul_aria_hidden_value = /*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4]);
|
|
58
|
+
attr(div, "class", "mc-sidebar-section svelte-10lx8df");
|
|
59
|
+
},
|
|
60
|
+
m(target, anchor) {
|
|
61
|
+
insert(target, div, anchor);
|
|
62
|
+
append(div, ul);
|
|
63
|
+
|
|
64
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
65
|
+
if (each_blocks[i]) {
|
|
66
|
+
each_blocks[i].m(ul, null);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
append(div, t);
|
|
71
|
+
if (if_block) if_block.m(div, null);
|
|
72
|
+
current = true;
|
|
73
|
+
},
|
|
74
|
+
p(ctx, dirty) {
|
|
75
|
+
if (dirty & /*handleGroupClick, data, expandedGroup, a11yLabels, handleFeatureClick*/ 103) {
|
|
76
|
+
each_value = /*data*/ ctx[0];
|
|
77
|
+
let i;
|
|
78
|
+
|
|
79
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
80
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
81
|
+
|
|
82
|
+
if (each_blocks[i]) {
|
|
83
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
84
|
+
transition_in(each_blocks[i], 1);
|
|
85
|
+
} else {
|
|
86
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
87
|
+
each_blocks[i].c();
|
|
88
|
+
transition_in(each_blocks[i], 1);
|
|
89
|
+
each_blocks[i].m(ul, null);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
group_outros();
|
|
94
|
+
|
|
95
|
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
96
|
+
out(i);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
check_outros();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (!current || dirty & /*expandedSubGroup, $isSidebarOpen*/ 24 && ul_class_value !== (ul_class_value = "" + (null_to_empty(/*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4]
|
|
103
|
+
? 'is-hidden'
|
|
104
|
+
: 'is-visible') + " svelte-10lx8df"))) {
|
|
105
|
+
attr(ul, "class", ul_class_value);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!current || dirty & /*expandedSubGroup, $isSidebarOpen*/ 24 && ul_aria_hidden_value !== (ul_aria_hidden_value = /*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4])) {
|
|
109
|
+
attr(ul, "aria-hidden", ul_aria_hidden_value);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (/*expandedSubGroup*/ ctx[3] && /*$isSidebarOpen*/ ctx[4]) {
|
|
113
|
+
if (if_block) {
|
|
114
|
+
if_block.p(ctx, dirty);
|
|
115
|
+
|
|
116
|
+
if (dirty & /*expandedSubGroup, $isSidebarOpen*/ 24) {
|
|
117
|
+
transition_in(if_block, 1);
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
if_block = create_if_block_1(ctx);
|
|
121
|
+
if_block.c();
|
|
122
|
+
transition_in(if_block, 1);
|
|
123
|
+
if_block.m(div, null);
|
|
124
|
+
}
|
|
125
|
+
} else if (if_block) {
|
|
126
|
+
group_outros();
|
|
127
|
+
|
|
128
|
+
transition_out(if_block, 1, 1, () => {
|
|
129
|
+
if_block = null;
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
check_outros();
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
i(local) {
|
|
136
|
+
if (current) return;
|
|
137
|
+
|
|
138
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
139
|
+
transition_in(each_blocks[i]);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
transition_in(if_block);
|
|
143
|
+
current = true;
|
|
144
|
+
},
|
|
145
|
+
o(local) {
|
|
146
|
+
each_blocks = each_blocks.filter(Boolean);
|
|
147
|
+
|
|
148
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
149
|
+
transition_out(each_blocks[i]);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
transition_out(if_block);
|
|
153
|
+
current = false;
|
|
154
|
+
},
|
|
155
|
+
d(detaching) {
|
|
156
|
+
if (detaching) detach(div);
|
|
157
|
+
destroy_each(each_blocks, detaching);
|
|
158
|
+
if (if_block) if_block.d();
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// (43:6) {#each data as featureGroup}
|
|
164
|
+
function create_each_block(ctx) {
|
|
165
|
+
let li;
|
|
166
|
+
let featuregroupcomponent;
|
|
167
|
+
let t;
|
|
168
|
+
let current;
|
|
169
|
+
let mounted;
|
|
170
|
+
let dispose;
|
|
171
|
+
|
|
172
|
+
featuregroupcomponent = new Sidebar_feature_group_nested({
|
|
173
|
+
props: {
|
|
174
|
+
featureGroup: /*featureGroup*/ ctx[10],
|
|
175
|
+
expand: /*expandedGroup*/ ctx[2] === /*featureGroup*/ ctx[10].code,
|
|
176
|
+
a11yLabels: /*a11yLabels*/ ctx[1]
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
featuregroupcomponent.$on("feature-click", /*feature_click_handler*/ ctx[7]);
|
|
181
|
+
|
|
182
|
+
function click_handler() {
|
|
183
|
+
return /*click_handler*/ ctx[8](/*featureGroup*/ ctx[10]);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
c() {
|
|
188
|
+
li = element("li");
|
|
189
|
+
create_component(featuregroupcomponent.$$.fragment);
|
|
190
|
+
t = space();
|
|
191
|
+
attr(li, "class", "svelte-10lx8df");
|
|
192
|
+
},
|
|
193
|
+
m(target, anchor) {
|
|
194
|
+
insert(target, li, anchor);
|
|
195
|
+
mount_component(featuregroupcomponent, li, null);
|
|
196
|
+
append(li, t);
|
|
197
|
+
current = true;
|
|
198
|
+
|
|
199
|
+
if (!mounted) {
|
|
200
|
+
dispose = listen(li, "click", click_handler);
|
|
201
|
+
mounted = true;
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
p(new_ctx, dirty) {
|
|
205
|
+
ctx = new_ctx;
|
|
206
|
+
const featuregroupcomponent_changes = {};
|
|
207
|
+
if (dirty & /*data*/ 1) featuregroupcomponent_changes.featureGroup = /*featureGroup*/ ctx[10];
|
|
208
|
+
if (dirty & /*expandedGroup, data*/ 5) featuregroupcomponent_changes.expand = /*expandedGroup*/ ctx[2] === /*featureGroup*/ ctx[10].code;
|
|
209
|
+
if (dirty & /*a11yLabels*/ 2) featuregroupcomponent_changes.a11yLabels = /*a11yLabels*/ ctx[1];
|
|
210
|
+
featuregroupcomponent.$set(featuregroupcomponent_changes);
|
|
211
|
+
},
|
|
212
|
+
i(local) {
|
|
213
|
+
if (current) return;
|
|
214
|
+
transition_in(featuregroupcomponent.$$.fragment, local);
|
|
215
|
+
current = true;
|
|
216
|
+
},
|
|
217
|
+
o(local) {
|
|
218
|
+
transition_out(featuregroupcomponent.$$.fragment, local);
|
|
219
|
+
current = false;
|
|
220
|
+
},
|
|
221
|
+
d(detaching) {
|
|
222
|
+
if (detaching) detach(li);
|
|
223
|
+
destroy_component(featuregroupcomponent);
|
|
224
|
+
mounted = false;
|
|
225
|
+
dispose();
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// (54:4) {#if expandedSubGroup && $isSidebarOpen}
|
|
231
|
+
function create_if_block_1(ctx) {
|
|
232
|
+
let subfeaturescomponent;
|
|
233
|
+
let current;
|
|
234
|
+
|
|
235
|
+
subfeaturescomponent = new Sidebar_sub_features_nested({
|
|
236
|
+
props: {
|
|
237
|
+
data: /*expandedSubGroup*/ ctx[3],
|
|
238
|
+
a11yLabels: /*a11yLabels*/ ctx[1]
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
subfeaturescomponent.$on("back-click", /*back_click_handler*/ ctx[9]);
|
|
243
|
+
|
|
244
|
+
return {
|
|
245
|
+
c() {
|
|
246
|
+
create_component(subfeaturescomponent.$$.fragment);
|
|
247
|
+
},
|
|
248
|
+
m(target, anchor) {
|
|
249
|
+
mount_component(subfeaturescomponent, target, anchor);
|
|
250
|
+
current = true;
|
|
251
|
+
},
|
|
252
|
+
p(ctx, dirty) {
|
|
253
|
+
const subfeaturescomponent_changes = {};
|
|
254
|
+
if (dirty & /*expandedSubGroup*/ 8) subfeaturescomponent_changes.data = /*expandedSubGroup*/ ctx[3];
|
|
255
|
+
if (dirty & /*a11yLabels*/ 2) subfeaturescomponent_changes.a11yLabels = /*a11yLabels*/ ctx[1];
|
|
256
|
+
subfeaturescomponent.$set(subfeaturescomponent_changes);
|
|
257
|
+
},
|
|
258
|
+
i(local) {
|
|
259
|
+
if (current) return;
|
|
260
|
+
transition_in(subfeaturescomponent.$$.fragment, local);
|
|
261
|
+
current = true;
|
|
262
|
+
},
|
|
263
|
+
o(local) {
|
|
264
|
+
transition_out(subfeaturescomponent.$$.fragment, local);
|
|
265
|
+
current = false;
|
|
266
|
+
},
|
|
267
|
+
d(detaching) {
|
|
268
|
+
destroy_component(subfeaturescomponent, detaching);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function create_fragment(ctx) {
|
|
274
|
+
let if_block_anchor;
|
|
275
|
+
let current;
|
|
276
|
+
let if_block = /*data*/ ctx[0]?.length && create_if_block(ctx);
|
|
277
|
+
|
|
278
|
+
return {
|
|
279
|
+
c() {
|
|
280
|
+
if (if_block) if_block.c();
|
|
281
|
+
if_block_anchor = empty();
|
|
282
|
+
},
|
|
283
|
+
m(target, anchor) {
|
|
284
|
+
if (if_block) if_block.m(target, anchor);
|
|
285
|
+
insert(target, if_block_anchor, anchor);
|
|
286
|
+
current = true;
|
|
287
|
+
},
|
|
288
|
+
p(ctx, [dirty]) {
|
|
289
|
+
if (/*data*/ ctx[0]?.length) {
|
|
290
|
+
if (if_block) {
|
|
291
|
+
if_block.p(ctx, dirty);
|
|
292
|
+
|
|
293
|
+
if (dirty & /*data*/ 1) {
|
|
294
|
+
transition_in(if_block, 1);
|
|
295
|
+
}
|
|
296
|
+
} else {
|
|
297
|
+
if_block = create_if_block(ctx);
|
|
298
|
+
if_block.c();
|
|
299
|
+
transition_in(if_block, 1);
|
|
300
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
301
|
+
}
|
|
302
|
+
} else if (if_block) {
|
|
303
|
+
group_outros();
|
|
304
|
+
|
|
305
|
+
transition_out(if_block, 1, 1, () => {
|
|
306
|
+
if_block = null;
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
check_outros();
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
i(local) {
|
|
313
|
+
if (current) return;
|
|
314
|
+
transition_in(if_block);
|
|
315
|
+
current = true;
|
|
316
|
+
},
|
|
317
|
+
o(local) {
|
|
318
|
+
transition_out(if_block);
|
|
319
|
+
current = false;
|
|
320
|
+
},
|
|
321
|
+
d(detaching) {
|
|
322
|
+
if (if_block) if_block.d(detaching);
|
|
323
|
+
if (detaching) detach(if_block_anchor);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function instance($$self, $$props, $$invalidate) {
|
|
329
|
+
let $isSidebarOpen;
|
|
330
|
+
component_subscribe($$self, isSidebarOpen, $$value => $$invalidate(4, $isSidebarOpen = $$value));
|
|
331
|
+
let { data = [] } = $$props;
|
|
332
|
+
let { a11yLabels } = $$props;
|
|
333
|
+
let expandedGroup;
|
|
334
|
+
let expandedSubGroup;
|
|
335
|
+
|
|
336
|
+
function handleGroupClick(code) {
|
|
337
|
+
const open = $isSidebarOpen;
|
|
338
|
+
|
|
339
|
+
if (!open) {
|
|
340
|
+
toggleSidebar();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (open && expandedGroup === code) {
|
|
344
|
+
$$invalidate(2, expandedGroup = undefined);
|
|
345
|
+
} else {
|
|
346
|
+
$$invalidate(2, expandedGroup = code);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function handleFeatureClick(event) {
|
|
351
|
+
if (event === null || event === void 0
|
|
352
|
+
? void 0
|
|
353
|
+
: event.detail) {
|
|
354
|
+
if (expandedSubGroup && expandedSubGroup.code === event.detail.code) {
|
|
355
|
+
$$invalidate(3, expandedSubGroup = undefined);
|
|
356
|
+
} else {
|
|
357
|
+
$$invalidate(3, expandedSubGroup = event.detail);
|
|
358
|
+
}
|
|
359
|
+
} else {
|
|
360
|
+
$$invalidate(3, expandedSubGroup = undefined);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const feature_click_handler = event => handleFeatureClick(event);
|
|
365
|
+
const click_handler = featureGroup => handleGroupClick(featureGroup.code);
|
|
366
|
+
const back_click_handler = () => handleFeatureClick();
|
|
367
|
+
|
|
368
|
+
$$self.$$set = $$props => {
|
|
369
|
+
if ('data' in $$props) $$invalidate(0, data = $$props.data);
|
|
370
|
+
if ('a11yLabels' in $$props) $$invalidate(1, a11yLabels = $$props.a11yLabels);
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
return [
|
|
374
|
+
data,
|
|
375
|
+
a11yLabels,
|
|
376
|
+
expandedGroup,
|
|
377
|
+
expandedSubGroup,
|
|
378
|
+
$isSidebarOpen,
|
|
379
|
+
handleGroupClick,
|
|
380
|
+
handleFeatureClick,
|
|
381
|
+
feature_click_handler,
|
|
382
|
+
click_handler,
|
|
383
|
+
back_click_handler
|
|
384
|
+
];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
class Sidebar_section_nested extends SvelteComponent {
|
|
388
|
+
constructor(options) {
|
|
389
|
+
super();
|
|
390
|
+
init(this, options, instance, create_fragment, safe_not_equal, { data: 0, a11yLabels: 1 }, add_css);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export { Sidebar_section_nested as default };
|
|
2
395
|
//# sourceMappingURL=sidebar-section.nested.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-section.nested.js","sources":["../../../src/components/sidebar/sidebar-section.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { A11yLabels, Feature, FeatureGroup } from './sidebar.types';\n import FeatureGroupComponent from './sidebar-feature-group.nested.svelte';\n import SubFeaturesComponent from './sidebar-sub-features.nested.svelte';\n import { isSidebarOpen, toggleSidebar } from './sidebar-service';\n\n export let data: FeatureGroup[] = [];\n export let a11yLabels: A11yLabels;\n\n let expandedGroup: string | undefined;\n let expandedSubGroup: Feature | undefined;\n\n function handleGroupClick(code: string) {\n // opens the menu if at the time of the click on a FeatureGroup this one was closed\n const open = $isSidebarOpen;\n if (!open) {\n toggleSidebar();\n }\n\n if (open && expandedGroup === code) {\n expandedGroup = undefined;\n } else {\n expandedGroup = code;\n }\n }\n\n function handleFeatureClick(event?: CustomEvent<Feature>) {\n if (event?.detail) {\n if (expandedSubGroup && expandedSubGroup.code === event.detail.code) {\n expandedSubGroup = undefined;\n } else {\n expandedSubGroup = event.detail;\n }\n } else {\n expandedSubGroup = undefined;\n }\n }\n</script>\n\n{#if data?.length}\n <div class=\"mc-sidebar-section\">\n <ul\n class={expandedSubGroup && $isSidebarOpen ? 'is-hidden' : 'is-visible'}\n aria-hidden={expandedSubGroup && $isSidebarOpen}\n >\n {#each data as featureGroup}\n <li on:click={() => handleGroupClick(featureGroup.code)}>\n <FeatureGroupComponent\n {featureGroup}\n expand={expandedGroup === featureGroup.code}\n {a11yLabels}\n on:feature-click={(event) => handleFeatureClick(event)}\n />\n </li>\n {/each}\n </ul>\n {#if expandedSubGroup && $isSidebarOpen}\n <SubFeaturesComponent\n data={expandedSubGroup}\n {a11yLabels}\n on:back-click={() => handleFeatureClick()}\n />\n {/if}\n </div>\n{/if}\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-sidebar-section {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: flex-start;\n min-height: 38px;\n overflow-x: hidden;\n overflow-y: auto;\n overflow-y: overlay;\n padding: 1px 0px;\n scrollbar-color: $color-primary-02-400 $color-sidebar-divider-background;\n scrollbar-width: thin;\n\n ul,\n li {\n list-style-type: none;\n margin: 0;\n padding: 0;\n display: flex;\n width: 100%;\n }\n\n ul {\n align-items: start;\n flex-direction: column;\n justify-content: center;\n\n li {\n flex-direction: column;\n box-sizing: border-box;\n margin: 4px 0px;\n\n &:first-child {\n margin-top: 0;\n }\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n &.is-hidden {\n @include transition(margin-left 300ms ease-in-out);\n margin-left: -320px;\n opacity: 0;\n }\n\n &.is-visible {\n @include transition(margin-left 300ms ease-in-out);\n margin-left: 0;\n }\n }\n\n &::-webkit-scrollbar {\n width: 5px;\n height: 10px;\n background: $color-sidebar-scroll-background;\n\n &-thumb {\n background: $color-sidebar-scroll-color;\n }\n }\n }\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"sidebar-section.nested.js","sources":["../../../src/components/sidebar/sidebar-section.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { A11yLabels, Feature, FeatureGroup } from './sidebar.types';\n import FeatureGroupComponent from './sidebar-feature-group.nested.svelte';\n import SubFeaturesComponent from './sidebar-sub-features.nested.svelte';\n import { isSidebarOpen, toggleSidebar } from './sidebar-service';\n\n export let data: FeatureGroup[] = [];\n export let a11yLabels: A11yLabels;\n\n let expandedGroup: string | undefined;\n let expandedSubGroup: Feature | undefined;\n\n function handleGroupClick(code: string) {\n // opens the menu if at the time of the click on a FeatureGroup this one was closed\n const open = $isSidebarOpen;\n if (!open) {\n toggleSidebar();\n }\n\n if (open && expandedGroup === code) {\n expandedGroup = undefined;\n } else {\n expandedGroup = code;\n }\n }\n\n function handleFeatureClick(event?: CustomEvent<Feature>) {\n if (event?.detail) {\n if (expandedSubGroup && expandedSubGroup.code === event.detail.code) {\n expandedSubGroup = undefined;\n } else {\n expandedSubGroup = event.detail;\n }\n } else {\n expandedSubGroup = undefined;\n }\n }\n</script>\n\n{#if data?.length}\n <div class=\"mc-sidebar-section\">\n <ul\n class={expandedSubGroup && $isSidebarOpen ? 'is-hidden' : 'is-visible'}\n aria-hidden={expandedSubGroup && $isSidebarOpen}\n >\n {#each data as featureGroup}\n <li on:click={() => handleGroupClick(featureGroup.code)}>\n <FeatureGroupComponent\n {featureGroup}\n expand={expandedGroup === featureGroup.code}\n {a11yLabels}\n on:feature-click={(event) => handleFeatureClick(event)}\n />\n </li>\n {/each}\n </ul>\n {#if expandedSubGroup && $isSidebarOpen}\n <SubFeaturesComponent\n data={expandedSubGroup}\n {a11yLabels}\n on:back-click={() => handleFeatureClick()}\n />\n {/if}\n </div>\n{/if}\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-sidebar-section {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: flex-start;\n min-height: 38px;\n overflow-x: hidden;\n overflow-y: auto;\n overflow-y: overlay;\n padding: 1px 0px;\n scrollbar-color: $color-primary-02-400 $color-sidebar-divider-background;\n scrollbar-width: thin;\n\n ul,\n li {\n list-style-type: none;\n margin: 0;\n padding: 0;\n display: flex;\n width: 100%;\n }\n\n ul {\n align-items: start;\n flex-direction: column;\n justify-content: center;\n\n li {\n flex-direction: column;\n box-sizing: border-box;\n margin: 4px 0px;\n\n &:first-child {\n margin-top: 0;\n }\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n &.is-hidden {\n @include transition(margin-left 300ms ease-in-out);\n margin-left: -320px;\n opacity: 0;\n }\n\n &.is-visible {\n @include transition(margin-left 300ms ease-in-out);\n margin-left: 0;\n }\n }\n\n &::-webkit-scrollbar {\n width: 5px;\n height: 10px;\n background: $color-sidebar-scroll-background;\n\n &-thumb {\n background: $color-sidebar-scroll-color;\n }\n }\n }\n</style>\n"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,201 @@
|
|
|
1
|
-
import{P as
|
|
1
|
+
import { P as SvelteComponent, i as init, s as safe_not_equal, Q as append_styles, K as empty, b as insert, n as noop, o as detach, ab as component_subscribe, e as element, d as space, t as text, g as attr, j as append, l as listen, k as set_data, Z as HtmlTag } from '../../index-c33b3772.js';
|
|
2
|
+
import { a as selectFeature, s as selectedFeature, i as isSidebarOpen } from '../../sidebar-service-275bf9ef.js';
|
|
3
|
+
|
|
4
|
+
/* src/components/sidebar/sidebar-segment.nested.svelte generated by Svelte v3.58.0 */
|
|
5
|
+
|
|
6
|
+
function add_css(target) {
|
|
7
|
+
append_styles(target, "svelte-e1egjc", ".mc-sidebar-segment.svelte-e1egjc.svelte-e1egjc{cursor:pointer;-webkit-box-flex:0;-ms-flex:0;flex:0;text-decoration:none;color:#191919;line-height:22px;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;min-height:40px}.mc-sidebar-segment__icon.svelte-e1egjc.svelte-e1egjc{fill:#191919}.mc-sidebar-segment.svelte-e1egjc span.svelte-e1egjc{width:200px;min-width:200px}.mc-sidebar-segment__container.svelte-e1egjc.svelte-e1egjc{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:8px 0px}.mc-sidebar-segment__text.svelte-e1egjc.svelte-e1egjc{margin-left:10px}.mc-sidebar-segment.is-selected.svelte-e1egjc.svelte-e1egjc{background:#cfd2d8}.mc-sidebar-segment.svelte-e1egjc .svelte-e1egjc:last-child{margin-left:10px}.mc-sidebar-segment.svelte-e1egjc.svelte-e1egjc:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-sidebar-segment.svelte-e1egjc:focus-visible .mc-sidebar-segment__container.svelte-e1egjc{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}.mc-sidebar-segment.svelte-e1egjc.svelte-e1egjc:hover{background:#b3b7c1}.mc-sidebar-segment.is-close.svelte-e1egjc .mc-sidebar-segment__container.svelte-e1egjc{-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out;margin:0 20px;width:24px}.mc-sidebar-segment.is-close.svelte-e1egjc .mc-sidebar-segment__text.svelte-e1egjc{opacity:0}.mc-sidebar-segment.is-open.svelte-e1egjc .mc-sidebar-segment__container.svelte-e1egjc{-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out;margin:0 32px}.mc-sidebar-segment.is-open.svelte-e1egjc .mc-sidebar-segment__text.svelte-e1egjc{opacity:1}");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// (14:0) {#if data}
|
|
11
|
+
function create_if_block(ctx) {
|
|
12
|
+
let a;
|
|
13
|
+
let div;
|
|
14
|
+
let t0;
|
|
15
|
+
let span;
|
|
16
|
+
let t1_value = /*data*/ ctx[0].label + "";
|
|
17
|
+
let t1;
|
|
18
|
+
let span_aria_hidden_value;
|
|
19
|
+
let a_aria_label_value;
|
|
20
|
+
let a_class_value;
|
|
21
|
+
let a_href_value;
|
|
22
|
+
let a_id_value;
|
|
23
|
+
let mounted;
|
|
24
|
+
let dispose;
|
|
25
|
+
let if_block = /*data*/ ctx[0].icon && create_if_block_1(ctx);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
c() {
|
|
29
|
+
a = element("a");
|
|
30
|
+
div = element("div");
|
|
31
|
+
if (if_block) if_block.c();
|
|
32
|
+
t0 = space();
|
|
33
|
+
span = element("span");
|
|
34
|
+
t1 = text(t1_value);
|
|
35
|
+
attr(span, "aria-hidden", span_aria_hidden_value = !/*$isSidebarOpen*/ ctx[2]);
|
|
36
|
+
attr(span, "class", "mc-sidebar-segment__text svelte-e1egjc");
|
|
37
|
+
attr(div, "class", "mc-sidebar-segment__container mc-sidebar-segment__icon svelte-e1egjc");
|
|
38
|
+
attr(a, "aria-label", a_aria_label_value = /*data*/ ctx[0].label);
|
|
39
|
+
|
|
40
|
+
attr(a, "class", a_class_value = "mc-sidebar-segment " + (/*data*/ ctx[0].code === /*$selectedFeature*/ ctx[1]?.lv0?.code
|
|
41
|
+
? 'is-selected'
|
|
42
|
+
: '') + " " + (/*$isSidebarOpen*/ ctx[2] ? 'is-open' : 'is-close') + " svelte-e1egjc");
|
|
43
|
+
|
|
44
|
+
attr(a, "href", a_href_value = /*data*/ ctx[0].href ?? 'javascript:void(null)');
|
|
45
|
+
attr(a, "id", a_id_value = /*data*/ ctx[0].code);
|
|
46
|
+
},
|
|
47
|
+
m(target, anchor) {
|
|
48
|
+
insert(target, a, anchor);
|
|
49
|
+
append(a, div);
|
|
50
|
+
if (if_block) if_block.m(div, null);
|
|
51
|
+
append(div, t0);
|
|
52
|
+
append(div, span);
|
|
53
|
+
append(span, t1);
|
|
54
|
+
|
|
55
|
+
if (!mounted) {
|
|
56
|
+
dispose = listen(a, "click", /*handleClick*/ ctx[3]);
|
|
57
|
+
mounted = true;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
p(ctx, dirty) {
|
|
61
|
+
if (/*data*/ ctx[0].icon) {
|
|
62
|
+
if (if_block) {
|
|
63
|
+
if_block.p(ctx, dirty);
|
|
64
|
+
} else {
|
|
65
|
+
if_block = create_if_block_1(ctx);
|
|
66
|
+
if_block.c();
|
|
67
|
+
if_block.m(div, t0);
|
|
68
|
+
}
|
|
69
|
+
} else if (if_block) {
|
|
70
|
+
if_block.d(1);
|
|
71
|
+
if_block = null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].label + "")) set_data(t1, t1_value);
|
|
75
|
+
|
|
76
|
+
if (dirty & /*$isSidebarOpen*/ 4 && span_aria_hidden_value !== (span_aria_hidden_value = !/*$isSidebarOpen*/ ctx[2])) {
|
|
77
|
+
attr(span, "aria-hidden", span_aria_hidden_value);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (dirty & /*data*/ 1 && a_aria_label_value !== (a_aria_label_value = /*data*/ ctx[0].label)) {
|
|
81
|
+
attr(a, "aria-label", a_aria_label_value);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (dirty & /*data, $selectedFeature, $isSidebarOpen*/ 7 && a_class_value !== (a_class_value = "mc-sidebar-segment " + (/*data*/ ctx[0].code === /*$selectedFeature*/ ctx[1]?.lv0?.code
|
|
85
|
+
? 'is-selected'
|
|
86
|
+
: '') + " " + (/*$isSidebarOpen*/ ctx[2] ? 'is-open' : 'is-close') + " svelte-e1egjc")) {
|
|
87
|
+
attr(a, "class", a_class_value);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (dirty & /*data*/ 1 && a_href_value !== (a_href_value = /*data*/ ctx[0].href ?? 'javascript:void(null)')) {
|
|
91
|
+
attr(a, "href", a_href_value);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (dirty & /*data*/ 1 && a_id_value !== (a_id_value = /*data*/ ctx[0].code)) {
|
|
95
|
+
attr(a, "id", a_id_value);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
d(detaching) {
|
|
99
|
+
if (detaching) detach(a);
|
|
100
|
+
if (if_block) if_block.d();
|
|
101
|
+
mounted = false;
|
|
102
|
+
dispose();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// (25:6) {#if data.icon}
|
|
108
|
+
function create_if_block_1(ctx) {
|
|
109
|
+
let html_tag;
|
|
110
|
+
let raw_value = `<${generateIcon(/*data*/ ctx[0].icon)} class="mc-sidebar-segment__icon" style="${mediumIconStyle}" />` + "";
|
|
111
|
+
let html_anchor;
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
c() {
|
|
115
|
+
html_tag = new HtmlTag(false);
|
|
116
|
+
html_anchor = empty();
|
|
117
|
+
html_tag.a = html_anchor;
|
|
118
|
+
},
|
|
119
|
+
m(target, anchor) {
|
|
120
|
+
html_tag.m(raw_value, target, anchor);
|
|
121
|
+
insert(target, html_anchor, anchor);
|
|
122
|
+
},
|
|
123
|
+
p(ctx, dirty) {
|
|
124
|
+
if (dirty & /*data*/ 1 && raw_value !== (raw_value = `<${generateIcon(/*data*/ ctx[0].icon)} class="mc-sidebar-segment__icon" style="${mediumIconStyle}" />` + "")) html_tag.p(raw_value);
|
|
125
|
+
},
|
|
126
|
+
d(detaching) {
|
|
127
|
+
if (detaching) detach(html_anchor);
|
|
128
|
+
if (detaching) html_tag.d();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function create_fragment(ctx) {
|
|
134
|
+
let if_block_anchor;
|
|
135
|
+
let if_block = /*data*/ ctx[0] && create_if_block(ctx);
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
c() {
|
|
139
|
+
if (if_block) if_block.c();
|
|
140
|
+
if_block_anchor = empty();
|
|
141
|
+
},
|
|
142
|
+
m(target, anchor) {
|
|
143
|
+
if (if_block) if_block.m(target, anchor);
|
|
144
|
+
insert(target, if_block_anchor, anchor);
|
|
145
|
+
},
|
|
146
|
+
p(ctx, [dirty]) {
|
|
147
|
+
if (/*data*/ ctx[0]) {
|
|
148
|
+
if (if_block) {
|
|
149
|
+
if_block.p(ctx, dirty);
|
|
150
|
+
} else {
|
|
151
|
+
if_block = create_if_block(ctx);
|
|
152
|
+
if_block.c();
|
|
153
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
154
|
+
}
|
|
155
|
+
} else if (if_block) {
|
|
156
|
+
if_block.d(1);
|
|
157
|
+
if_block = null;
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
i: noop,
|
|
161
|
+
o: noop,
|
|
162
|
+
d(detaching) {
|
|
163
|
+
if (if_block) if_block.d(detaching);
|
|
164
|
+
if (detaching) detach(if_block_anchor);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const mediumIconStyle = 'width: 24px; height: 24px;';
|
|
170
|
+
|
|
171
|
+
function generateIcon(iconname) {
|
|
172
|
+
return `${iconname} size="2rem"`;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function instance($$self, $$props, $$invalidate) {
|
|
176
|
+
let $selectedFeature;
|
|
177
|
+
let $isSidebarOpen;
|
|
178
|
+
component_subscribe($$self, selectedFeature, $$value => $$invalidate(1, $selectedFeature = $$value));
|
|
179
|
+
component_subscribe($$self, isSidebarOpen, $$value => $$invalidate(2, $isSidebarOpen = $$value));
|
|
180
|
+
let { data } = $$props;
|
|
181
|
+
|
|
182
|
+
function handleClick() {
|
|
183
|
+
selectFeature(data.code);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
$$self.$$set = $$props => {
|
|
187
|
+
if ('data' in $$props) $$invalidate(0, data = $$props.data);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
return [data, $selectedFeature, $isSidebarOpen, handleClick];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
class Sidebar_segment_nested extends SvelteComponent {
|
|
194
|
+
constructor(options) {
|
|
195
|
+
super();
|
|
196
|
+
init(this, options, instance, create_fragment, safe_not_equal, { data: 0 }, add_css);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export { Sidebar_segment_nested as default };
|
|
2
201
|
//# sourceMappingURL=sidebar-segment.nested.js.map
|