@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,746 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, e as element, d as space, T as svg_element, n as noop, y as set_style, g as attr, o as detach, J as destroy_each, a1 as onMount, t as text, j as append, k as set_data, K as empty, v as binding_callbacks, Z as HtmlTag } from '../../index-c33b3772.js';
|
|
2
|
+
import { s as select } from '../../transform-15d69d5d.js';
|
|
3
|
+
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
4
|
+
import { c as constant, a as array } from '../../array-5b770a93.js';
|
|
5
|
+
import { a as axisBottom, b as axisLeft } from '../../axis-fbc0f7b5.js';
|
|
6
|
+
import { b as band } from '../../band-d7a07d2c.js';
|
|
7
|
+
import { l as linear } from '../../linear-f46d7e9e.js';
|
|
8
|
+
|
|
9
|
+
function none$1(series, order) {
|
|
10
|
+
if (!((n = series.length) > 1)) return;
|
|
11
|
+
for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
|
|
12
|
+
s0 = s1, s1 = series[order[i]];
|
|
13
|
+
for (j = 0; j < m; ++j) {
|
|
14
|
+
s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function none(series) {
|
|
20
|
+
var n = series.length, o = new Array(n);
|
|
21
|
+
while (--n >= 0) o[n] = n;
|
|
22
|
+
return o;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function stackValue(d, key) {
|
|
26
|
+
return d[key];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function stackSeries(key) {
|
|
30
|
+
const series = [];
|
|
31
|
+
series.key = key;
|
|
32
|
+
return series;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function stack() {
|
|
36
|
+
var keys = constant([]),
|
|
37
|
+
order = none,
|
|
38
|
+
offset = none$1,
|
|
39
|
+
value = stackValue;
|
|
40
|
+
|
|
41
|
+
function stack(data) {
|
|
42
|
+
var sz = Array.from(keys.apply(this, arguments), stackSeries),
|
|
43
|
+
i, n = sz.length, j = -1,
|
|
44
|
+
oz;
|
|
45
|
+
|
|
46
|
+
for (const d of data) {
|
|
47
|
+
for (i = 0, ++j; i < n; ++i) {
|
|
48
|
+
(sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
for (i = 0, oz = array(order(sz)); i < n; ++i) {
|
|
53
|
+
sz[oz[i]].index = i;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
offset(sz, oz);
|
|
57
|
+
return sz;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
stack.keys = function(_) {
|
|
61
|
+
return arguments.length ? (keys = typeof _ === "function" ? _ : constant(Array.from(_)), stack) : keys;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
stack.value = function(_) {
|
|
65
|
+
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), stack) : value;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
stack.order = function(_) {
|
|
69
|
+
return arguments.length ? (order = _ == null ? none : typeof _ === "function" ? _ : constant(Array.from(_)), stack) : order;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
stack.offset = function(_) {
|
|
73
|
+
return arguments.length ? (offset = _ == null ? none$1 : _, stack) : offset;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return stack;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* src/components/chart/StackedBarChart.svelte generated by Svelte v3.58.0 */
|
|
80
|
+
|
|
81
|
+
function get_each_context(ctx, list, i) {
|
|
82
|
+
const child_ctx = ctx.slice();
|
|
83
|
+
child_ctx[6] = list[i];
|
|
84
|
+
return child_ctx;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function get_each_context_1(ctx, list, i) {
|
|
88
|
+
const child_ctx = ctx.slice();
|
|
89
|
+
child_ctx[32] = list[i];
|
|
90
|
+
return child_ctx;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// (197:0) {#if tooltipData.show}
|
|
94
|
+
function create_if_block(ctx) {
|
|
95
|
+
let div;
|
|
96
|
+
let t_value = /*tooltipData*/ ctx[3].text + "";
|
|
97
|
+
let t;
|
|
98
|
+
let div_style_value;
|
|
99
|
+
|
|
100
|
+
return {
|
|
101
|
+
c() {
|
|
102
|
+
div = element("div");
|
|
103
|
+
t = text(t_value);
|
|
104
|
+
attr(div, "class", "tooltip");
|
|
105
|
+
attr(div, "style", div_style_value = `top: ${/*tooltipData*/ ctx[3].top}px; left: ${/*tooltipData*/ ctx[3].left}px; width: ${/*tooltipData*/ ctx[3].width}px;`);
|
|
106
|
+
},
|
|
107
|
+
m(target, anchor) {
|
|
108
|
+
insert(target, div, anchor);
|
|
109
|
+
append(div, t);
|
|
110
|
+
},
|
|
111
|
+
p(ctx, dirty) {
|
|
112
|
+
if (dirty[0] & /*tooltipData*/ 8 && t_value !== (t_value = /*tooltipData*/ ctx[3].text + "")) set_data(t, t_value);
|
|
113
|
+
|
|
114
|
+
if (dirty[0] & /*tooltipData*/ 8 && div_style_value !== (div_style_value = `top: ${/*tooltipData*/ ctx[3].top}px; left: ${/*tooltipData*/ ctx[3].left}px; width: ${/*tooltipData*/ ctx[3].width}px;`)) {
|
|
115
|
+
attr(div, "style", div_style_value);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
d(detaching) {
|
|
119
|
+
if (detaching) detach(div);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// (207:2) {#each subgroups as subgroup}
|
|
125
|
+
function create_each_block_1(ctx) {
|
|
126
|
+
let div;
|
|
127
|
+
let svg_1;
|
|
128
|
+
let rect;
|
|
129
|
+
let rect_fill_value;
|
|
130
|
+
let t0;
|
|
131
|
+
let span;
|
|
132
|
+
let t1_value = /*subgroup*/ ctx[32] + "";
|
|
133
|
+
let t1;
|
|
134
|
+
let t2;
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
c() {
|
|
138
|
+
div = element("div");
|
|
139
|
+
svg_1 = svg_element("svg");
|
|
140
|
+
rect = svg_element("rect");
|
|
141
|
+
t0 = space();
|
|
142
|
+
span = element("span");
|
|
143
|
+
t1 = text(t1_value);
|
|
144
|
+
t2 = space();
|
|
145
|
+
attr(rect, "x", "0");
|
|
146
|
+
attr(rect, "y", "0");
|
|
147
|
+
attr(rect, "width", "24");
|
|
148
|
+
attr(rect, "height", "16");
|
|
149
|
+
attr(rect, "fill", rect_fill_value = /*parsedColor*/ ctx[1][/*subgroup*/ ctx[32]]);
|
|
150
|
+
attr(svg_1, "class", "legend__box");
|
|
151
|
+
attr(span, "class", "legend__title");
|
|
152
|
+
attr(div, "class", "legend__item");
|
|
153
|
+
},
|
|
154
|
+
m(target, anchor) {
|
|
155
|
+
insert(target, div, anchor);
|
|
156
|
+
append(div, svg_1);
|
|
157
|
+
append(svg_1, rect);
|
|
158
|
+
append(div, t0);
|
|
159
|
+
append(div, span);
|
|
160
|
+
append(span, t1);
|
|
161
|
+
append(div, t2);
|
|
162
|
+
},
|
|
163
|
+
p(ctx, dirty) {
|
|
164
|
+
if (dirty[0] & /*parsedColor, subgroups*/ 18 && rect_fill_value !== (rect_fill_value = /*parsedColor*/ ctx[1][/*subgroup*/ ctx[32]])) {
|
|
165
|
+
attr(rect, "fill", rect_fill_value);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (dirty[0] & /*subgroups*/ 16 && t1_value !== (t1_value = /*subgroup*/ ctx[32] + "")) set_data(t1, t1_value);
|
|
169
|
+
},
|
|
170
|
+
d(detaching) {
|
|
171
|
+
if (detaching) detach(div);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// (218:2) {#each parsedSvgs as svg}
|
|
177
|
+
function create_each_block(ctx) {
|
|
178
|
+
let html_tag;
|
|
179
|
+
let raw_value = /*svg*/ ctx[6] + "";
|
|
180
|
+
let html_anchor;
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
c() {
|
|
184
|
+
html_tag = new HtmlTag(false);
|
|
185
|
+
html_anchor = empty();
|
|
186
|
+
html_tag.a = html_anchor;
|
|
187
|
+
},
|
|
188
|
+
m(target, anchor) {
|
|
189
|
+
html_tag.m(raw_value, target, anchor);
|
|
190
|
+
insert(target, html_anchor, anchor);
|
|
191
|
+
},
|
|
192
|
+
p(ctx, dirty) {
|
|
193
|
+
if (dirty[0] & /*parsedSvgs*/ 32 && raw_value !== (raw_value = /*svg*/ ctx[6] + "")) html_tag.p(raw_value);
|
|
194
|
+
},
|
|
195
|
+
d(detaching) {
|
|
196
|
+
if (detaching) detach(html_anchor);
|
|
197
|
+
if (detaching) html_tag.d();
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function create_fragment(ctx) {
|
|
203
|
+
let div0;
|
|
204
|
+
let t0;
|
|
205
|
+
let t1;
|
|
206
|
+
let div1;
|
|
207
|
+
let t2;
|
|
208
|
+
let div2;
|
|
209
|
+
let t3;
|
|
210
|
+
let text_1;
|
|
211
|
+
let if_block = /*tooltipData*/ ctx[3].show && create_if_block(ctx);
|
|
212
|
+
let each_value_1 = /*subgroups*/ ctx[4];
|
|
213
|
+
let each_blocks_1 = [];
|
|
214
|
+
|
|
215
|
+
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
216
|
+
each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
let each_value = /*parsedSvgs*/ ctx[5];
|
|
220
|
+
let each_blocks = [];
|
|
221
|
+
|
|
222
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
223
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
c() {
|
|
228
|
+
div0 = element("div");
|
|
229
|
+
t0 = space();
|
|
230
|
+
if (if_block) if_block.c();
|
|
231
|
+
t1 = space();
|
|
232
|
+
div1 = element("div");
|
|
233
|
+
|
|
234
|
+
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
235
|
+
each_blocks_1[i].c();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
t2 = space();
|
|
239
|
+
div2 = element("div");
|
|
240
|
+
|
|
241
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
242
|
+
each_blocks[i].c();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
t3 = space();
|
|
246
|
+
text_1 = svg_element("text");
|
|
247
|
+
this.c = noop;
|
|
248
|
+
set_style(div0, "background-color", /*backgroundcolor*/ ctx[0]);
|
|
249
|
+
attr(div1, "class", "legend");
|
|
250
|
+
set_style(div2, "height", "0");
|
|
251
|
+
set_style(div2, "width", "0");
|
|
252
|
+
attr(div2, "class", "pattern");
|
|
253
|
+
},
|
|
254
|
+
m(target, anchor) {
|
|
255
|
+
insert(target, div0, anchor);
|
|
256
|
+
/*div0_binding*/ ctx[19](div0);
|
|
257
|
+
insert(target, t0, anchor);
|
|
258
|
+
if (if_block) if_block.m(target, anchor);
|
|
259
|
+
insert(target, t1, anchor);
|
|
260
|
+
insert(target, div1, anchor);
|
|
261
|
+
|
|
262
|
+
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
263
|
+
if (each_blocks_1[i]) {
|
|
264
|
+
each_blocks_1[i].m(div1, null);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
insert(target, t2, anchor);
|
|
269
|
+
insert(target, div2, anchor);
|
|
270
|
+
|
|
271
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
272
|
+
if (each_blocks[i]) {
|
|
273
|
+
each_blocks[i].m(div2, null);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
insert(target, t3, anchor);
|
|
278
|
+
insert(target, text_1, anchor);
|
|
279
|
+
},
|
|
280
|
+
p(ctx, dirty) {
|
|
281
|
+
if (dirty[0] & /*backgroundcolor*/ 1) {
|
|
282
|
+
set_style(div0, "background-color", /*backgroundcolor*/ ctx[0]);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (/*tooltipData*/ ctx[3].show) {
|
|
286
|
+
if (if_block) {
|
|
287
|
+
if_block.p(ctx, dirty);
|
|
288
|
+
} else {
|
|
289
|
+
if_block = create_if_block(ctx);
|
|
290
|
+
if_block.c();
|
|
291
|
+
if_block.m(t1.parentNode, t1);
|
|
292
|
+
}
|
|
293
|
+
} else if (if_block) {
|
|
294
|
+
if_block.d(1);
|
|
295
|
+
if_block = null;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (dirty[0] & /*subgroups, parsedColor*/ 18) {
|
|
299
|
+
each_value_1 = /*subgroups*/ ctx[4];
|
|
300
|
+
let i;
|
|
301
|
+
|
|
302
|
+
for (i = 0; i < each_value_1.length; i += 1) {
|
|
303
|
+
const child_ctx = get_each_context_1(ctx, each_value_1, i);
|
|
304
|
+
|
|
305
|
+
if (each_blocks_1[i]) {
|
|
306
|
+
each_blocks_1[i].p(child_ctx, dirty);
|
|
307
|
+
} else {
|
|
308
|
+
each_blocks_1[i] = create_each_block_1(child_ctx);
|
|
309
|
+
each_blocks_1[i].c();
|
|
310
|
+
each_blocks_1[i].m(div1, null);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
for (; i < each_blocks_1.length; i += 1) {
|
|
315
|
+
each_blocks_1[i].d(1);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
each_blocks_1.length = each_value_1.length;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (dirty[0] & /*parsedSvgs*/ 32) {
|
|
322
|
+
each_value = /*parsedSvgs*/ ctx[5];
|
|
323
|
+
let i;
|
|
324
|
+
|
|
325
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
326
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
327
|
+
|
|
328
|
+
if (each_blocks[i]) {
|
|
329
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
330
|
+
} else {
|
|
331
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
332
|
+
each_blocks[i].c();
|
|
333
|
+
each_blocks[i].m(div2, null);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
for (; i < each_blocks.length; i += 1) {
|
|
338
|
+
each_blocks[i].d(1);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
each_blocks.length = each_value.length;
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
i: noop,
|
|
345
|
+
o: noop,
|
|
346
|
+
d(detaching) {
|
|
347
|
+
if (detaching) detach(div0);
|
|
348
|
+
/*div0_binding*/ ctx[19](null);
|
|
349
|
+
if (detaching) detach(t0);
|
|
350
|
+
if (if_block) if_block.d(detaching);
|
|
351
|
+
if (detaching) detach(t1);
|
|
352
|
+
if (detaching) detach(div1);
|
|
353
|
+
destroy_each(each_blocks_1, detaching);
|
|
354
|
+
if (detaching) detach(t2);
|
|
355
|
+
if (detaching) detach(div2);
|
|
356
|
+
destroy_each(each_blocks, detaching);
|
|
357
|
+
if (detaching) detach(t3);
|
|
358
|
+
if (detaching) detach(text_1);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function getParsedMargins(margins) {
|
|
364
|
+
if (margins) return JSON.parse(margins); else return {
|
|
365
|
+
top: 10,
|
|
366
|
+
right: 40,
|
|
367
|
+
bottom: 20,
|
|
368
|
+
left: 60,
|
|
369
|
+
xAxis: 20
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function instance($$self, $$props, $$invalidate) {
|
|
374
|
+
let parsedData;
|
|
375
|
+
let groups;
|
|
376
|
+
let subgroups;
|
|
377
|
+
let height;
|
|
378
|
+
let parsedSvgs;
|
|
379
|
+
let { data = '' } = $$props;
|
|
380
|
+
let { chartheight = '300' } = $$props;
|
|
381
|
+
let { backgroundcolor = '#fff' } = $$props;
|
|
382
|
+
let { scalemax = 50 } = $$props;
|
|
383
|
+
let { ticknumbers = 4 } = $$props;
|
|
384
|
+
let { tickleftformat = d => `${Number(d)}` } = $$props;
|
|
385
|
+
let { tickbottomformat = d => `${Number(d)}` } = $$props;
|
|
386
|
+
let { margins } = $$props;
|
|
387
|
+
let { svgs } = $$props;
|
|
388
|
+
let { colors } = $$props;
|
|
389
|
+
let parsedColor;
|
|
390
|
+
let _data;
|
|
391
|
+
let chart;
|
|
392
|
+
let svg;
|
|
393
|
+
let hasMounted = false;
|
|
394
|
+
|
|
395
|
+
let tooltipData = {
|
|
396
|
+
show: false,
|
|
397
|
+
text: '',
|
|
398
|
+
top: 0,
|
|
399
|
+
left: 0,
|
|
400
|
+
width: 0
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
let eventHandler = new EventHandler();
|
|
404
|
+
|
|
405
|
+
function getChartWidth() {
|
|
406
|
+
let chartWidth = select(chart).style('width');
|
|
407
|
+
|
|
408
|
+
if (chartWidth === '' || !chartWidth) {
|
|
409
|
+
chartWidth = `${window.innerWidth / 2}`;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return parseInt(chartWidth);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function getAxes(width) {
|
|
416
|
+
const x = band().domain(groups).range([
|
|
417
|
+
0,
|
|
418
|
+
width - (getParsedMargins(margins).left / 2 + getParsedMargins(margins).right / 2)
|
|
419
|
+
]).padding(0.2);
|
|
420
|
+
|
|
421
|
+
const y = linear().domain([0, scalemax]).range([height, 0]);
|
|
422
|
+
return { x, y };
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function addRectandles(x, y) {
|
|
426
|
+
const stackedData = stack().keys(subgroups)(parsedData);
|
|
427
|
+
|
|
428
|
+
svg.append('g').selectAll('g').data(stackedData).enter().append('g').attr('fill', d => parsedColor[d.key] || 'black').attr('class', 'bar').selectAll('rect').data(d => d).enter().append('rect').attr('x', d => x(d.data.group.toString())).attr('y', d => y(d[1])).attr('width', x.bandwidth()).attr('height', d => y(d[0]) - y(d[1])).style('cursor', 'pointer').on('mouseout', (_e, chartEvent) => {
|
|
429
|
+
const others = svg.selectAll('rect').filter(function (arc) {
|
|
430
|
+
return arc != chartEvent;
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
others.style('opacity', 1);
|
|
434
|
+
$$invalidate(3, tooltipData.show = false, tooltipData);
|
|
435
|
+
}).on('mouseover', (e, chartEvent) => {
|
|
436
|
+
const others = svg.selectAll('rect').filter(function (arc) {
|
|
437
|
+
return arc != chartEvent;
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
others.style('opacity', 0.7);
|
|
441
|
+
const { left, top, width } = e.target.getBoundingClientRect();
|
|
442
|
+
|
|
443
|
+
$$invalidate(3, tooltipData = {
|
|
444
|
+
show: true,
|
|
445
|
+
text: chartEvent.data.customtooltip
|
|
446
|
+
? chartEvent.data.customtooltip
|
|
447
|
+
: `${chartEvent[1] - chartEvent[0]}`,
|
|
448
|
+
left,
|
|
449
|
+
top: top - 50,
|
|
450
|
+
width
|
|
451
|
+
});
|
|
452
|
+
}).on('click', (_e, chartEvent) => {
|
|
453
|
+
eventHandler.dispatch('bar-clicked', chartEvent);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function updateAxes(x, y) {
|
|
458
|
+
svg.select('.x-axis').call(axisBottom(x).tickFormat(tickbottomformat));
|
|
459
|
+
svg.select('.y-axis').call(axisLeft(y).ticks(ticknumbers).tickFormat(tickleftformat));
|
|
460
|
+
const width = getChartWidth();
|
|
461
|
+
svg.selectAll('.y-axis .tick line').attr('stroke', '#EEEDEA').attr('stroke-width', '1px').attr('x2', width);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function render() {
|
|
465
|
+
const width = getChartWidth();
|
|
466
|
+
const { x, y } = getAxes(width);
|
|
467
|
+
$$invalidate(6, svg = select(chart).append('svg').attr('width', width).attr('height', Number(height) + Number(getParsedMargins(margins).top) + Number(getParsedMargins(margins).bottom) + Number(getParsedMargins(margins).xAxis)).attr('id', 'svg-chart').append('g').attr('transform', `translate(${getParsedMargins(margins).left / 2 + getParsedMargins(margins).right / 2},${getParsedMargins(margins).top})`));
|
|
468
|
+
svg.append('g').attr('transform', `translate(0, ${Number(height) + Number(getParsedMargins(margins).xAxis)})`).call(axisBottom(x)).attr('class', 'x-axis').attr('stroke-width', '0');
|
|
469
|
+
svg.append('g').call(axisLeft(y).ticks(ticknumbers).tickFormat(tickleftformat)).attr('class', 'y-axis').attr('stroke-width', '0');
|
|
470
|
+
addRectandles(x, y);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
function update() {
|
|
474
|
+
var _a;
|
|
475
|
+
const width = getChartWidth();
|
|
476
|
+
|
|
477
|
+
(_a = chart.querySelector('#svg-chart')) === null || _a === void 0
|
|
478
|
+
? void 0
|
|
479
|
+
: _a.setAttribute('width', `${width}px`);
|
|
480
|
+
|
|
481
|
+
const { x, y } = getAxes(width);
|
|
482
|
+
updateAxes(x, y);
|
|
483
|
+
svg.selectAll('.bar').remove();
|
|
484
|
+
addRectandles(x, y);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function resize() {
|
|
488
|
+
var _a;
|
|
489
|
+
|
|
490
|
+
if (_data) {
|
|
491
|
+
const width = getChartWidth();
|
|
492
|
+
|
|
493
|
+
(_a = chart.querySelector('#svg-chart')) === null || _a === void 0
|
|
494
|
+
? void 0
|
|
495
|
+
: _a.setAttribute('width', `${width}px`);
|
|
496
|
+
|
|
497
|
+
const { x, y } = getAxes(width);
|
|
498
|
+
updateAxes(x, y);
|
|
499
|
+
const stackedData = stack().keys(subgroups)(parsedData);
|
|
500
|
+
svg.selectAll('.bar').data(stackedData).selectAll('rect').data(d => d).attr('x', d => x(d.data.group.toString())).attr('y', d => y(d[1])).attr('width', x.bandwidth()).attr('height', d => y(d[0]) - y(d[1]));
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
onMount(() => {
|
|
505
|
+
const resizeObserver = new ResizeObserver(resize);
|
|
506
|
+
resizeObserver.observe(chart);
|
|
507
|
+
$$invalidate(17, hasMounted = true);
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
function div0_binding($$value) {
|
|
511
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
512
|
+
chart = $$value;
|
|
513
|
+
$$invalidate(2, chart);
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
$$self.$$set = $$props => {
|
|
518
|
+
if ('data' in $$props) $$invalidate(7, data = $$props.data);
|
|
519
|
+
if ('chartheight' in $$props) $$invalidate(8, chartheight = $$props.chartheight);
|
|
520
|
+
if ('backgroundcolor' in $$props) $$invalidate(0, backgroundcolor = $$props.backgroundcolor);
|
|
521
|
+
if ('scalemax' in $$props) $$invalidate(9, scalemax = $$props.scalemax);
|
|
522
|
+
if ('ticknumbers' in $$props) $$invalidate(10, ticknumbers = $$props.ticknumbers);
|
|
523
|
+
if ('tickleftformat' in $$props) $$invalidate(11, tickleftformat = $$props.tickleftformat);
|
|
524
|
+
if ('tickbottomformat' in $$props) $$invalidate(12, tickbottomformat = $$props.tickbottomformat);
|
|
525
|
+
if ('margins' in $$props) $$invalidate(13, margins = $$props.margins);
|
|
526
|
+
if ('svgs' in $$props) $$invalidate(14, svgs = $$props.svgs);
|
|
527
|
+
if ('colors' in $$props) $$invalidate(15, colors = $$props.colors);
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
$$self.$$.update = () => {
|
|
531
|
+
if ($$self.$$.dirty[0] & /*data*/ 128) {
|
|
532
|
+
$$invalidate(18, parsedData = data ? JSON.parse(data) : []);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if ($$self.$$.dirty[0] & /*parsedData*/ 262144) {
|
|
536
|
+
groups = parsedData.map(d => d.group);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
if ($$self.$$.dirty[0] & /*parsedData*/ 262144) {
|
|
540
|
+
$$invalidate(4, subgroups = parsedData[0]
|
|
541
|
+
? Object.keys(parsedData[0]).filter(d => d !== 'group')
|
|
542
|
+
: []);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if ($$self.$$.dirty[0] & /*chartheight*/ 256) {
|
|
546
|
+
height = parseInt(chartheight, 10);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if ($$self.$$.dirty[0] & /*svgs*/ 16384) {
|
|
550
|
+
$$invalidate(5, parsedSvgs = svgs ? JSON.parse(svgs) : []);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if ($$self.$$.dirty[0] & /*colors*/ 32768) {
|
|
554
|
+
$$invalidate(1, parsedColor = colors ? JSON.parse(colors) : {});
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
if ($$self.$$.dirty[0] & /*data, hasMounted, _data*/ 196736) {
|
|
558
|
+
if (data.length > 0 && hasMounted) {
|
|
559
|
+
if (!_data) {
|
|
560
|
+
render();
|
|
561
|
+
$$invalidate(16, _data = data);
|
|
562
|
+
} else if (data !== _data) {
|
|
563
|
+
update();
|
|
564
|
+
$$invalidate(16, _data = data);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
return [
|
|
571
|
+
backgroundcolor,
|
|
572
|
+
parsedColor,
|
|
573
|
+
chart,
|
|
574
|
+
tooltipData,
|
|
575
|
+
subgroups,
|
|
576
|
+
parsedSvgs,
|
|
577
|
+
svg,
|
|
578
|
+
data,
|
|
579
|
+
chartheight,
|
|
580
|
+
scalemax,
|
|
581
|
+
ticknumbers,
|
|
582
|
+
tickleftformat,
|
|
583
|
+
tickbottomformat,
|
|
584
|
+
margins,
|
|
585
|
+
svgs,
|
|
586
|
+
colors,
|
|
587
|
+
_data,
|
|
588
|
+
hasMounted,
|
|
589
|
+
parsedData,
|
|
590
|
+
div0_binding
|
|
591
|
+
];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
class StackedBarChart extends SvelteElement {
|
|
595
|
+
constructor(options) {
|
|
596
|
+
super();
|
|
597
|
+
const style = document.createElement('style');
|
|
598
|
+
style.textContent = `.legend{margin-top:1rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 1.5rem;height:100%;color:#000000;gap:1rem}.legend__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:0.875rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.legend__title{white-space:nowrap;margin:0}.legend__box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:0.25rem;height:16px;width:24px}.tooltip{height:auto;background-color:#4d4d4d;border-radius:4px;color:#ffffff;text-align:center;padding:0.5rem 0;position:absolute}.pattern{z-index:-1;position:relative}text{font-family:"LeroyMerlin", sans-serif;font-size:0.875rem;color:#4d4d4d}`;
|
|
599
|
+
this.shadowRoot.appendChild(style);
|
|
600
|
+
|
|
601
|
+
init(
|
|
602
|
+
this,
|
|
603
|
+
{
|
|
604
|
+
target: this.shadowRoot,
|
|
605
|
+
props: attribute_to_object(this.attributes),
|
|
606
|
+
customElement: true
|
|
607
|
+
},
|
|
608
|
+
instance,
|
|
609
|
+
create_fragment,
|
|
610
|
+
safe_not_equal,
|
|
611
|
+
{
|
|
612
|
+
data: 7,
|
|
613
|
+
chartheight: 8,
|
|
614
|
+
backgroundcolor: 0,
|
|
615
|
+
scalemax: 9,
|
|
616
|
+
ticknumbers: 10,
|
|
617
|
+
tickleftformat: 11,
|
|
618
|
+
tickbottomformat: 12,
|
|
619
|
+
margins: 13,
|
|
620
|
+
svgs: 14,
|
|
621
|
+
colors: 15
|
|
622
|
+
},
|
|
623
|
+
null,
|
|
624
|
+
[-1, -1]
|
|
625
|
+
);
|
|
626
|
+
|
|
627
|
+
if (options) {
|
|
628
|
+
if (options.target) {
|
|
629
|
+
insert(options.target, this, options.anchor);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (options.props) {
|
|
633
|
+
this.$set(options.props);
|
|
634
|
+
flush();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
static get observedAttributes() {
|
|
640
|
+
return [
|
|
641
|
+
"data",
|
|
642
|
+
"chartheight",
|
|
643
|
+
"backgroundcolor",
|
|
644
|
+
"scalemax",
|
|
645
|
+
"ticknumbers",
|
|
646
|
+
"tickleftformat",
|
|
647
|
+
"tickbottomformat",
|
|
648
|
+
"margins",
|
|
649
|
+
"svgs",
|
|
650
|
+
"colors"
|
|
651
|
+
];
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
get data() {
|
|
655
|
+
return this.$$.ctx[7];
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
set data(data) {
|
|
659
|
+
this.$$set({ data });
|
|
660
|
+
flush();
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
get chartheight() {
|
|
664
|
+
return this.$$.ctx[8];
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
set chartheight(chartheight) {
|
|
668
|
+
this.$$set({ chartheight });
|
|
669
|
+
flush();
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
get backgroundcolor() {
|
|
673
|
+
return this.$$.ctx[0];
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
set backgroundcolor(backgroundcolor) {
|
|
677
|
+
this.$$set({ backgroundcolor });
|
|
678
|
+
flush();
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
get scalemax() {
|
|
682
|
+
return this.$$.ctx[9];
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
set scalemax(scalemax) {
|
|
686
|
+
this.$$set({ scalemax });
|
|
687
|
+
flush();
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
get ticknumbers() {
|
|
691
|
+
return this.$$.ctx[10];
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
set ticknumbers(ticknumbers) {
|
|
695
|
+
this.$$set({ ticknumbers });
|
|
696
|
+
flush();
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
get tickleftformat() {
|
|
700
|
+
return this.$$.ctx[11];
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
set tickleftformat(tickleftformat) {
|
|
704
|
+
this.$$set({ tickleftformat });
|
|
705
|
+
flush();
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
get tickbottomformat() {
|
|
709
|
+
return this.$$.ctx[12];
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
set tickbottomformat(tickbottomformat) {
|
|
713
|
+
this.$$set({ tickbottomformat });
|
|
714
|
+
flush();
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
get margins() {
|
|
718
|
+
return this.$$.ctx[13];
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
set margins(margins) {
|
|
722
|
+
this.$$set({ margins });
|
|
723
|
+
flush();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
get svgs() {
|
|
727
|
+
return this.$$.ctx[14];
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
set svgs(svgs) {
|
|
731
|
+
this.$$set({ svgs });
|
|
732
|
+
flush();
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
get colors() {
|
|
736
|
+
return this.$$.ctx[15];
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
set colors(colors) {
|
|
740
|
+
this.$$set({ colors });
|
|
741
|
+
flush();
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export { StackedBarChart as default };
|
|
2
746
|
//# sourceMappingURL=StackedBarChart.js.map
|