@deskhero/dh_ui 1.33.2 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dh_ui.es.js CHANGED
@@ -1,129 +1,5 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createVNode, createCommentVNode, reactive, ref, useSlots, toRef, provide, computed, onMounted, onUnmounted, watch, normalizeClass, unref, mergeProps, isRef, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, Teleport, inject, withKeys, withModifiers, Transition, Fragment, normalizeStyle, resolveDynamicComponent, nextTick, withDirectives, vShow, onBeforeUpdate, getCurrentScope, onScopeDispose, shallowRef, onBeforeUnmount, toRaw, h, isProxy, vModelDynamic, vModelText, pushScopeId, popScopeId, vModelCheckbox, toRefs, getCurrentInstance } from "vue";
1
+ import { reactive, ref, defineComponent, useSlots, toRef, provide, computed, onMounted, onUnmounted, watch, openBlock, createElementBlock, normalizeClass, unref, createVNode, mergeProps, isRef, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, Teleport, createCommentVNode, inject, withKeys, withModifiers, Transition, createElementVNode, Fragment, normalizeStyle, createTextVNode, toDisplayString, resolveDynamicComponent, nextTick, withDirectives, vShow, onBeforeUpdate, getCurrentScope, onScopeDispose, vModelCheckbox, shallowRef, onBeforeUnmount, toRaw, h, isProxy, resolveComponent, vModelDynamic, vModelText, pushScopeId, popScopeId, toRefs, getCurrentInstance } from "vue";
2
2
  var main$1 = "";
3
- var _export_sfc = (sfc, props) => {
4
- const target = sfc.__vccOpts || sfc;
5
- for (const [key, val] of props) {
6
- target[key] = val;
7
- }
8
- return target;
9
- };
10
- const _sfc_main$k = defineComponent({
11
- components: { DhIcon },
12
- props: {
13
- mainText: {
14
- type: String,
15
- default: "Advanced"
16
- },
17
- filterMissingText: {
18
- type: String,
19
- default: "Filter Missing"
20
- },
21
- matchText: {
22
- type: String,
23
- default: "Match"
24
- },
25
- excludeText: {
26
- type: String,
27
- default: "Exclude"
28
- }
29
- },
30
- data() {
31
- return {
32
- activeFilter: false,
33
- isFilterMissing: false,
34
- isMatch: false,
35
- isExclude: false
36
- };
37
- },
38
- emits: ["match", "exclude", "filter_missing"],
39
- mounted() {
40
- this.isMatch = true;
41
- },
42
- methods: {
43
- toggleFilter() {
44
- this.activeFilter = !this.activeFilter;
45
- },
46
- matchFilter() {
47
- this.isMatch = true;
48
- this.isExclude = false;
49
- this.$emit("match", this.isMatch);
50
- },
51
- excludeFilter() {
52
- this.isMatch = false;
53
- this.isExclude = true;
54
- this.$emit("exclude", this.isExclude);
55
- },
56
- missingFilter() {
57
- this.isFilterMissing = !this.isFilterMissing;
58
- this.$emit("filter_missing", this.isFilterMissing);
59
- if (this.isFilterMissing && this.isMatch) {
60
- this.matchFilter();
61
- } else if (this.isFilterMissing && this.isExclude) {
62
- this.excludeFilter();
63
- }
64
- }
65
- }
66
- });
67
- const _hoisted_1$k = { class: "dh-advanced-filter-container" };
68
- const _hoisted_2$h = { class: "advance_section" };
69
- const _hoisted_3$c = {
70
- key: 0,
71
- class: "list-none"
72
- };
73
- const _hoisted_4$8 = ["checked"];
74
- const _hoisted_5$5 = ["checked"];
75
- const _hoisted_6$5 = ["checked"];
76
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
77
- const _component_dh_icon = resolveComponent("dh-icon");
78
- return openBlock(), createElementBlock("div", _hoisted_1$k, [
79
- createElementVNode("div", _hoisted_2$h, [
80
- createElementVNode("span", {
81
- class: "toggle-icon",
82
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleFilter())
83
- }, [
84
- createTextVNode(toDisplayString(_ctx.mainText) + " ", 1),
85
- createVNode(_component_dh_icon, {
86
- "icon-name": _ctx.activeFilter ? "arrow-up" : "arrow-down",
87
- size: 20
88
- }, null, 8, ["icon-name"])
89
- ]),
90
- _ctx.activeFilter ? (openBlock(), createElementBlock("ul", _hoisted_3$c, [
91
- createElementVNode("li", null, [
92
- createElementVNode("label", null, [
93
- createElementVNode("input", {
94
- checked: _ctx.isFilterMissing,
95
- name: "number_filter",
96
- type: "checkbox",
97
- onChange: _cache[1] || (_cache[1] = ($event) => _ctx.missingFilter())
98
- }, null, 40, _hoisted_4$8),
99
- createTextVNode(" " + toDisplayString(_ctx.filterMissingText), 1)
100
- ])
101
- ]),
102
- createElementVNode("li", null, [
103
- createElementVNode("label", null, [
104
- createElementVNode("input", {
105
- checked: _ctx.isMatch,
106
- name: "number_filter",
107
- type: "radio",
108
- onChange: _cache[2] || (_cache[2] = ($event) => _ctx.matchFilter())
109
- }, null, 40, _hoisted_5$5),
110
- createTextVNode(" " + toDisplayString(_ctx.matchText), 1)
111
- ]),
112
- createElementVNode("label", null, [
113
- createElementVNode("input", {
114
- checked: _ctx.isExclude,
115
- name: "number_filter",
116
- type: "radio",
117
- onChange: _cache[3] || (_cache[3] = ($event) => _ctx.excludeFilter())
118
- }, null, 40, _hoisted_6$5),
119
- createTextVNode(" " + toDisplayString(_ctx.excludeText), 1)
120
- ])
121
- ])
122
- ])) : createCommentVNode("", true)
123
- ])
124
- ]);
125
- }
126
- var DhAdvancedFilter = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$8]]);
127
3
  function toInteger(dirtyNumber) {
128
4
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
129
5
  return NaN;
@@ -347,6 +223,14 @@ function isValid(dirtyDate) {
347
223
  var date = toDate(dirtyDate);
348
224
  return !isNaN(Number(date));
349
225
  }
226
+ function endOfMonth(dirtyDate) {
227
+ requiredArgs(1, arguments);
228
+ var date = toDate(dirtyDate);
229
+ var month = date.getMonth();
230
+ date.setFullYear(date.getFullYear(), month + 1, 0);
231
+ date.setHours(23, 59, 59, 999);
232
+ return date;
233
+ }
350
234
  function eachDayOfInterval(dirtyInterval, options) {
351
235
  var _options$step;
352
236
  requiredArgs(1, arguments);
@@ -370,6 +254,29 @@ function eachDayOfInterval(dirtyInterval, options) {
370
254
  }
371
255
  return dates;
372
256
  }
257
+ function startOfMonth(dirtyDate) {
258
+ requiredArgs(1, arguments);
259
+ var date = toDate(dirtyDate);
260
+ date.setDate(1);
261
+ date.setHours(0, 0, 0, 0);
262
+ return date;
263
+ }
264
+ function endOfYear(dirtyDate) {
265
+ requiredArgs(1, arguments);
266
+ var date = toDate(dirtyDate);
267
+ var year = date.getFullYear();
268
+ date.setFullYear(year + 1, 0, 0);
269
+ date.setHours(23, 59, 59, 999);
270
+ return date;
271
+ }
272
+ function startOfYear(dirtyDate) {
273
+ requiredArgs(1, arguments);
274
+ var cleanDate = toDate(dirtyDate);
275
+ var date = new Date(0);
276
+ date.setFullYear(cleanDate.getFullYear(), 0, 1);
277
+ date.setHours(0, 0, 0, 0);
278
+ return date;
279
+ }
373
280
  function endOfWeek(dirtyDate, options) {
374
281
  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
375
282
  requiredArgs(1, arguments);
@@ -7394,6 +7301,36 @@ function subDays(dirtyDate, dirtyAmount) {
7394
7301
  var amount = toInteger(dirtyAmount);
7395
7302
  return addDays(dirtyDate, -amount);
7396
7303
  }
7304
+ function lastDayOfWeek(dirtyDate, options) {
7305
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
7306
+ requiredArgs(1, arguments);
7307
+ var defaultOptions2 = getDefaultOptions();
7308
+ var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
7309
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
7310
+ throw new RangeError("weekStartsOn must be between 0 and 6");
7311
+ }
7312
+ var date = toDate(dirtyDate);
7313
+ var day = date.getDay();
7314
+ var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
7315
+ date.setHours(0, 0, 0, 0);
7316
+ date.setDate(date.getDate() + diff);
7317
+ return date;
7318
+ }
7319
+ function nextDay(date, day) {
7320
+ requiredArgs(2, arguments);
7321
+ var delta = day - getDay(date);
7322
+ if (delta <= 0)
7323
+ delta += 7;
7324
+ return addDays(date, delta);
7325
+ }
7326
+ function nextSaturday(date) {
7327
+ requiredArgs(1, arguments);
7328
+ return nextDay(date, 6);
7329
+ }
7330
+ function nextSunday(date) {
7331
+ requiredArgs(1, arguments);
7332
+ return nextDay(date, 0);
7333
+ }
7397
7334
  function parseISO(argument, options) {
7398
7335
  var _options$additionalDi;
7399
7336
  requiredArgs(1, arguments);
@@ -7575,6 +7512,21 @@ function validateTime(hours, minutes, seconds) {
7575
7512
  function validateTimezone(_hours, minutes) {
7576
7513
  return minutes >= 0 && minutes <= 59;
7577
7514
  }
7515
+ function previousDay(date, day) {
7516
+ requiredArgs(2, arguments);
7517
+ var delta = getDay(date) - day;
7518
+ if (delta <= 0)
7519
+ delta += 7;
7520
+ return subDays(date, delta);
7521
+ }
7522
+ function previousSaturday(date) {
7523
+ requiredArgs(1, arguments);
7524
+ return previousDay(date, 6);
7525
+ }
7526
+ function previousSunday(date) {
7527
+ requiredArgs(1, arguments);
7528
+ return previousDay(date, 0);
7529
+ }
7578
7530
  function setMonth(dirtyDate, dirtyMonth) {
7579
7531
  requiredArgs(2, arguments);
7580
7532
  var date = toDate(dirtyDate);
@@ -10816,7 +10768,14 @@ var __glob_1_87 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQ
10816
10768
  var __glob_1_88 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI2NzkgM0MxMS4wMzc3IDEuNjY2NjcgMTIuOTYyMiAxLjY2NjY3IDEzLjczMiAzTDIyLjM5MjMgMThDMjMuMTYyMSAxOS4zMzMzIDIyLjE5OTkgMjEgMjAuNjYwMyAyMUgzLjMzOTc1QzEuODAwMTQgMjEgMC44Mzc4OTQgMTkuMzMzMyAxLjYwNzY5IDE4TDEwLjI2NzkgM1oiIGZpbGw9IiNGM0NDQTgiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiA4QzExLjQ0NzcgOCAxMSA4LjQ0NzcyIDExIDlWMTNDMTEgMTMuNTUyMyAxMS40NDc3IDE0IDEyIDE0QzEyLjU1MjMgMTQgMTMgMTMuNTUyMyAxMyAxM1Y5QzEzIDguNDQ3NzIgMTIuNTUyMyA4IDEyIDhaTTEyIDE1Ljc1QzExLjMwOTYgMTUuNzUgMTAuNzUgMTYuMzA5NiAxMC43NSAxN0MxMC43NSAxNy42OTA0IDExLjMwOTYgMTguMjUgMTIgMTguMjVIMTIuMDFDMTIuNzAwNCAxOC4yNSAxMy4yNiAxNy42OTA0IDEzLjI2IDE3QzEzLjI2IDE2LjMwOTYgMTIuNzAwNCAxNS43NSAxMi4wMSAxNS43NUgxMloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=";
10817
10769
  var __glob_1_89 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik04Ljc0OSA0LjAzOCAyLjU1MSAxNC4zODZhMS40NjQgMS40NjQgMCAwIDAgMS4yNTEgMi4xOTVoMTIuMzk3YTEuNDYzIDEuNDYzIDAgMCAwIDEuMjUxLTIuMTk1TDExLjI1MiA0LjAzOGExLjQ2NCAxLjQ2NCAwIDAgMC0yLjUwMyAwdjB6TTEwIDcuOHYyLjkyNiIgc3Ryb2tlPSIjRjI5OTRBIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik0xMCAxMy42NTRoLjAwNyIgc3Ryb2tlPSIjRjI5OTRBIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K";
10818
10770
  var Icon_vue_vue_type_style_index_0_scoped_true_lang = "";
10819
- const _sfc_main$j = defineComponent({
10771
+ var _export_sfc = (sfc, props) => {
10772
+ const target = sfc.__vccOpts || sfc;
10773
+ for (const [key, val] of props) {
10774
+ target[key] = val;
10775
+ }
10776
+ return target;
10777
+ };
10778
+ const _sfc_main$l = defineComponent({
10820
10779
  props: {
10821
10780
  iconName: {
10822
10781
  type: String,
@@ -10845,8 +10804,8 @@ const _sfc_main$j = defineComponent({
10845
10804
  }
10846
10805
  }
10847
10806
  });
10848
- const _hoisted_1$j = ["height", "src", "width"];
10849
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
10807
+ const _hoisted_1$l = ["height", "src", "width"];
10808
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
10850
10809
  return openBlock(), createElementBlock("img", {
10851
10810
  alt: "icon",
10852
10811
  class: normalizeClass({
@@ -10856,879 +10815,257 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
10856
10815
  height: _ctx.size,
10857
10816
  src: _ctx.getIconUrl(),
10858
10817
  width: _ctx.size
10859
- }, null, 10, _hoisted_1$j);
10818
+ }, null, 10, _hoisted_1$l);
10860
10819
  }
10861
- var DhIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$7], ["__scopeId", "data-v-201309a0"]]);
10862
- var main = "";
10863
- var DatePicker_vue_vue_type_style_index_0_lang = "";
10864
- const _hoisted_1$i = /* @__PURE__ */ createTextVNode(" Back ");
10865
- const _hoisted_2$g = /* @__PURE__ */ createElementVNode("div", null, "today", -1);
10866
- const _sfc_main$i = {
10867
- __name: "DatePicker",
10820
+ var DhIcon = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$8], ["__scopeId", "data-v-201309a0"]]);
10821
+ const _sfc_main$k = defineComponent({
10868
10822
  props: {
10869
- inline: {
10823
+ data: {
10870
10824
  type: Boolean,
10871
- default: true
10825
+ required: true,
10826
+ default: false
10827
+ },
10828
+ label: {
10829
+ type: String,
10830
+ default: "Label"
10872
10831
  }
10873
10832
  },
10874
- emits: ["update"],
10875
- setup(__props, { emit }) {
10876
- const date = ref();
10877
- const datePicker = ref(null);
10878
- const handleDate = (modelData) => {
10879
- date.value = modelData;
10880
- emit("update", date.value);
10833
+ data() {
10834
+ return {
10835
+ active: this.data
10881
10836
  };
10882
- const markers = ref([
10883
- {
10884
- date: addDays(new Date(), 0),
10885
- type: "dot",
10886
- tooltip: [{ text: "Dot with tooltip", color: "blue" }]
10837
+ },
10838
+ emits: ["change"],
10839
+ computed: {
10840
+ checkedValue: {
10841
+ get() {
10842
+ return this.data;
10843
+ },
10844
+ set(newValue) {
10845
+ this.active = newValue;
10846
+ this.$emit("change", newValue);
10887
10847
  }
10888
- ]);
10889
- return (_ctx, _cache) => {
10890
- return openBlock(), createElementBlock("div", null, [
10891
- createVNode(unref(ca), {
10892
- ref_key: "datePicker",
10893
- ref: datePicker,
10894
- modelValue: date.value,
10895
- "onUpdate:modelValue": [
10896
- _cache[0] || (_cache[0] = ($event) => date.value = $event),
10897
- handleDate
10898
- ],
10899
- "arrow-navigation": "",
10900
- "day-names": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
10901
- "enable-time-picker": false,
10902
- inline: __props.inline,
10903
- markers: markers.value,
10904
- "month-name-format": "short",
10905
- offset: 12,
10906
- placeholder: "MM/DD/YYYY",
10907
- "select-text": "Apply",
10908
- "text-input": "",
10909
- uid: "base"
10910
- }, {
10911
- "arrow-left": withCtx(() => [
10912
- createVNode(DhIcon, {
10913
- "icon-name": "previous",
10914
- size: 20
10915
- })
10916
- ]),
10917
- "arrow-right": withCtx(() => [
10918
- createVNode(DhIcon, {
10919
- "icon-name": "next",
10920
- size: 20
10921
- })
10922
- ]),
10923
- "calendar-icon": withCtx(() => [
10924
- _hoisted_1$i
10925
- ]),
10926
- "clear-icon": withCtx(() => []),
10927
- "action-preview": withCtx(() => []),
10928
- "marker-tooltip": withCtx(() => [
10929
- _hoisted_2$g
10930
- ]),
10931
- _: 1
10932
- }, 8, ["modelValue", "inline", "markers"])
10933
- ]);
10934
- };
10935
- }
10936
- };
10937
- var Error_vue_vue_type_style_index_0_lang = "";
10938
- const _hoisted_1$h = {
10939
- key: 0,
10940
- class: "invalid-feedback"
10941
- };
10942
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
10943
- __name: "Error",
10944
- props: {
10945
- errors: {
10946
- type: Object,
10947
- required: false,
10948
- default: void 0
10949
10848
  }
10950
- },
10951
- setup(__props) {
10952
- const props = __props;
10953
- return (_ctx, _cache) => {
10954
- var _a;
10955
- return unref(props).errors && ((_a = unref(props).errors) == null ? void 0 : _a.length) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
10956
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.errors, (error) => {
10957
- return openBlock(), createElementBlock("span", { key: error }, toDisplayString(error), 1);
10958
- }), 128))
10959
- ])) : createCommentVNode("", true);
10960
- };
10961
10849
  }
10962
10850
  });
10963
- var FileUpload_vue_vue_type_style_index_0_lang = "";
10964
- const _hoisted_1$g = /* @__PURE__ */ createElementVNode("label", { for: "upload_pdf" }, [
10965
- /* @__PURE__ */ createTextVNode(" Drag and drop file or "),
10966
- /* @__PURE__ */ createElementVNode("span", { id: "upload" }, "browse")
10967
- ], -1);
10968
- const _hoisted_2$f = {
10969
- key: 1,
10970
- class: "file__upload_items"
10971
- };
10972
- const _hoisted_3$b = { class: "file__upload_list_item" };
10973
- const _hoisted_4$7 = { class: "file__upload_list_item_label" };
10974
- const _hoisted_5$4 = ["title"];
10975
- const _hoisted_6$4 = {
10976
- key: 0,
10977
- class: "label__antivirus"
10978
- };
10979
- const _hoisted_7$3 = {
10980
- key: 1,
10981
- class: "label__antivirus label__antivirus--failed"
10982
- };
10983
- const _hoisted_8$2 = {
10984
- key: 2,
10985
- class: "label__antivirus label__antivirus--detected"
10986
- };
10987
- const _hoisted_9$2 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
10988
- const _hoisted_10$2 = { key: 3 };
10989
- const _hoisted_11$2 = { key: 4 };
10990
- const _hoisted_12$1 = { key: 0 };
10991
- const _hoisted_13$1 = ["value"];
10992
- const _hoisted_14$1 = ["href"];
10993
- const _hoisted_15$1 = {
10994
- key: 2,
10995
- class: "file__upload_placeholder"
10996
- };
10997
- const _hoisted_16$1 = {
10998
- key: 3,
10999
- class: "file__upload_action"
11000
- };
11001
- const _hoisted_17$1 = /* @__PURE__ */ createElementVNode("button", { class: "file__upload_action_cancel" }, "Cancel", -1);
11002
- const _sfc_main$g = {
11003
- __name: "FileUpload",
11004
- props: {
11005
- uploadProgress: {
11006
- type: Array,
11007
- required: true
11008
- },
11009
- modelValue: {
11010
- type: FileList,
11011
- required: true
11012
- },
11013
- inline: {
11014
- type: Boolean,
11015
- default: false
11016
- },
11017
- errorOccured: {
11018
- type: Array,
11019
- required: true
11020
- },
11021
- errorMessage: {
11022
- type: String,
11023
- default: "an error occured while uploading"
11024
- },
11025
- fileSaved: {
11026
- type: Boolean,
11027
- default: false
11028
- },
11029
- virusCheck: {
11030
- type: Array,
11031
- required: true
11032
- },
11033
- virusCheckText: {
11034
- type: String,
11035
- default: "Antivirus check ..."
11036
- },
11037
- virusCheckFailedText: {
11038
- type: String,
11039
- default: "Antivirus check failed"
11040
- },
11041
- virusDetectedText: {
11042
- type: String,
11043
- default: "Virus detected"
11044
- },
11045
- deleteConfirmationText: {
11046
- type: String,
11047
- default: "Are you sure you want to delete it permanently? this action will be irreversible"
11048
- },
11049
- zIndex: {
11050
- type: Number,
11051
- default: 99
11052
- }
11053
- },
11054
- emits: ["update:modelValue", "save:modelValue", "reload"],
11055
- setup(__props, { emit }) {
11056
- const props = __props;
11057
- const upload = ref(null);
11058
- const fileSelected = ref(false);
11059
- const files = ref([]);
11060
- const standardFormats = ref([
11061
- ".pdf",
11062
- ".csv",
11063
- ".doc",
11064
- ".jpeg",
11065
- ".mp4",
11066
- ".png",
11067
- ".txt",
11068
- ".xls"
11069
- ]);
11070
- function formatBytes(bytes, decimals = 2) {
11071
- if (!+bytes)
11072
- return "0 Bytes";
11073
- const k2 = 1024;
11074
- const dm = decimals < 0 ? 0 : decimals;
11075
- const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
11076
- const i2 = Math.floor(Math.log(bytes) / Math.log(k2));
11077
- return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm))} ${sizes[i2]}`;
11078
- }
11079
- function iconName(x2) {
11080
- return standardFormats.value.includes(getExtension(x2)) ? getExtension(x2).slice(1) : "unknown";
11081
- }
11082
- function getName(n) {
11083
- const index = n.lastIndexOf(".");
11084
- let str = n.slice(0, index);
11085
- return str.length <= 15 ? str : str.slice(0, 15) + `... `;
11086
- }
11087
- function getExtension(s3) {
11088
- return s3.replace(/.*(?=\.)/g, "");
11089
- }
11090
- function uploadFile(e2) {
11091
- e2.stopPropagation();
11092
- files.value = upload.value.files;
11093
- if (files.value) {
11094
- fileSelected.value = true;
11095
- }
11096
- emit("update:modelValue", files.value);
11097
- }
11098
- function dragFile(e2) {
11099
- e2.stopPropagation();
11100
- e2.dataTransfer.dropEffect = "copy";
11101
- }
11102
- function dropFile(e2) {
11103
- e2.stopPropagation();
11104
- fileSelected.value = true;
11105
- files.value = e2.dataTransfer.files;
11106
- emit("update:modelValue", files.value);
11107
- }
11108
- function deleteFile(index) {
11109
- if (window.confirm(props.deleteConfirmationText)) {
11110
- removeFile(index);
11111
- }
11112
- }
11113
- function removeFile(index) {
11114
- const dt = new DataTransfer();
11115
- for (let i2 = 0; i2 < files.value.length; i2++) {
11116
- const file = files.value[i2];
11117
- if (index !== i2)
11118
- dt.items.add(file);
10851
+ const _hoisted_1$k = { class: "dp__options" };
10852
+ const _hoisted_2$i = { class: "dp__options_switch" };
10853
+ const _hoisted_3$d = /* @__PURE__ */ createElementVNode("span", { class: "dp__options_slider" }, null, -1);
10854
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
10855
+ return openBlock(), createElementBlock("label", _hoisted_1$k, [
10856
+ createElementVNode("span", null, toDisplayString(_ctx.label), 1),
10857
+ createElementVNode("div", _hoisted_2$i, [
10858
+ withDirectives(createElementVNode("input", {
10859
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.checkedValue = $event),
10860
+ name: "switch",
10861
+ type: "checkbox"
10862
+ }, null, 512), [
10863
+ [vModelCheckbox, _ctx.checkedValue]
10864
+ ]),
10865
+ _hoisted_3$d
10866
+ ])
10867
+ ]);
10868
+ }
10869
+ var DhSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$7]]);
10870
+ /*!
10871
+ * Chart.js v3.9.1
10872
+ * https://www.chartjs.org
10873
+ * (c) 2022 Chart.js Contributors
10874
+ * Released under the MIT License
10875
+ */
10876
+ function noop() {
10877
+ }
10878
+ const uid = function() {
10879
+ let id = 0;
10880
+ return function() {
10881
+ return id++;
10882
+ };
10883
+ }();
10884
+ function isNullOrUndef(value) {
10885
+ return value === null || typeof value === "undefined";
10886
+ }
10887
+ function isArray(value) {
10888
+ if (Array.isArray && Array.isArray(value)) {
10889
+ return true;
10890
+ }
10891
+ const type = Object.prototype.toString.call(value);
10892
+ if (type.slice(0, 7) === "[object" && type.slice(-6) === "Array]") {
10893
+ return true;
10894
+ }
10895
+ return false;
10896
+ }
10897
+ function isObject$1(value) {
10898
+ return value !== null && Object.prototype.toString.call(value) === "[object Object]";
10899
+ }
10900
+ const isNumberFinite = (value) => (typeof value === "number" || value instanceof Number) && isFinite(+value);
10901
+ function finiteOrDefault(value, defaultValue) {
10902
+ return isNumberFinite(value) ? value : defaultValue;
10903
+ }
10904
+ function valueOrDefault(value, defaultValue) {
10905
+ return typeof value === "undefined" ? defaultValue : value;
10906
+ }
10907
+ const toPercentage = (value, dimension) => typeof value === "string" && value.endsWith("%") ? parseFloat(value) / 100 : value / dimension;
10908
+ const toDimension = (value, dimension) => typeof value === "string" && value.endsWith("%") ? parseFloat(value) / 100 * dimension : +value;
10909
+ function callback(fn, args, thisArg) {
10910
+ if (fn && typeof fn.call === "function") {
10911
+ return fn.apply(thisArg, args);
10912
+ }
10913
+ }
10914
+ function each(loopable, fn, thisArg, reverse) {
10915
+ let i2, len, keys;
10916
+ if (isArray(loopable)) {
10917
+ len = loopable.length;
10918
+ if (reverse) {
10919
+ for (i2 = len - 1; i2 >= 0; i2--) {
10920
+ fn.call(thisArg, loopable[i2], i2);
11119
10921
  }
11120
- files.value = dt.files;
11121
- if (files.value.length == 0) {
11122
- fileSelected.value = false;
10922
+ } else {
10923
+ for (i2 = 0; i2 < len; i2++) {
10924
+ fn.call(thisArg, loopable[i2], i2);
11123
10925
  }
11124
10926
  }
11125
- function saveFile() {
11126
- emit("save:modelValue", files.value);
10927
+ } else if (isObject$1(loopable)) {
10928
+ keys = Object.keys(loopable);
10929
+ len = keys.length;
10930
+ for (i2 = 0; i2 < len; i2++) {
10931
+ fn.call(thisArg, loopable[keys[i2]], keys[i2]);
11127
10932
  }
11128
- function generateLink(file) {
11129
- return URL.createObjectURL(file);
10933
+ }
10934
+ }
10935
+ function _elementsEqual(a0, a1) {
10936
+ let i2, ilen, v0, v1;
10937
+ if (!a0 || !a1 || a0.length !== a1.length) {
10938
+ return false;
10939
+ }
10940
+ for (i2 = 0, ilen = a0.length; i2 < ilen; ++i2) {
10941
+ v0 = a0[i2];
10942
+ v1 = a1[i2];
10943
+ if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
10944
+ return false;
11130
10945
  }
11131
- function reload(e2) {
11132
- e2.preventDefault();
11133
- emit("reload");
10946
+ }
10947
+ return true;
10948
+ }
10949
+ function clone$1(source) {
10950
+ if (isArray(source)) {
10951
+ return source.map(clone$1);
10952
+ }
10953
+ if (isObject$1(source)) {
10954
+ const target = /* @__PURE__ */ Object.create(null);
10955
+ const keys = Object.keys(source);
10956
+ const klen = keys.length;
10957
+ let k2 = 0;
10958
+ for (; k2 < klen; ++k2) {
10959
+ target[keys[k2]] = clone$1(source[keys[k2]]);
11134
10960
  }
11135
- return (_ctx, _cache) => {
11136
- return openBlock(), createElementBlock("div", {
11137
- class: normalizeClass(["file__upload", __props.inline ? "" : "file__upload_box"])
11138
- }, [
11139
- !__props.fileSaved ? (openBlock(), createElementBlock("div", {
11140
- key: 0,
11141
- class: "file__upload_btn",
11142
- onDragover: _cache[1] || (_cache[1] = withModifiers(($event) => dragFile($event), ["prevent"])),
11143
- onDrop: _cache[2] || (_cache[2] = withModifiers(($event) => dropFile($event), ["prevent"]))
11144
- }, [
11145
- createVNode(DhIcon, {
11146
- class: "file__upload_btn_icon",
11147
- "icon-name": "upload",
11148
- size: 24
11149
- }),
11150
- _hoisted_1$g,
11151
- createElementVNode("input", {
11152
- id: "upload_pdf",
11153
- ref_key: "upload",
11154
- ref: upload,
11155
- multiple: "",
11156
- name: "file",
11157
- type: "file",
11158
- onInput: _cache[0] || (_cache[0] = ($event) => uploadFile($event))
11159
- }, null, 544)
11160
- ], 32)) : createCommentVNode("", true),
11161
- fileSelected.value ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
11162
- (openBlock(true), createElementBlock(Fragment, null, renderList(files.value, (file, id) => {
11163
- return openBlock(), createElementBlock("div", {
11164
- key: id,
11165
- class: normalizeClass(["file__upload_list", __props.inline ? "" : "file__upload_list_box"])
11166
- }, [
11167
- createVNode(DhIcon, {
11168
- class: normalizeClass(__props.errorOccured[id] ? "file__upload_list_icon" : ""),
11169
- "icon-name": `file-` + iconName(file.name),
11170
- size: 40
11171
- }, null, 8, ["class", "icon-name"]),
11172
- props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createBlock(DhIcon, {
11173
- key: 0,
11174
- class: "file__upload_list_icon_sub file__upload_list_icon_sub--loading",
11175
- "icon-name": "states",
11176
- size: 20,
11177
- style: normalizeStyle({ "z-index": props.zIndex })
11178
- }, null, 8, ["style"])) : createCommentVNode("", true),
11179
- props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "failed" ? (openBlock(), createBlock(DhIcon, {
11180
- key: 1,
11181
- class: "file__upload_list_icon_sub",
11182
- "icon-name": "warning-filled",
11183
- size: 20,
11184
- style: normalizeStyle({ "z-index": props.zIndex })
11185
- }, null, 8, ["style"])) : createCommentVNode("", true),
11186
- props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "detected" ? (openBlock(), createBlock(DhIcon, {
11187
- key: 2,
11188
- class: "file__upload_list_icon_sub",
11189
- "icon-name": "danger",
11190
- size: 20,
11191
- style: normalizeStyle({ "z-index": props.zIndex })
11192
- }, null, 8, ["style"])) : createCommentVNode("", true),
11193
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createBlock(DhIcon, {
11194
- key: 3,
11195
- class: "file__upload_list_icon_sub",
11196
- "icon-name": "error",
11197
- size: 20,
11198
- style: normalizeStyle({ "z-index": props.zIndex })
11199
- }, null, 8, ["style"])) : createCommentVNode("", true),
11200
- createElementVNode("div", _hoisted_3$b, [
11201
- createElementVNode("div", _hoisted_4$7, [
11202
- createElementVNode("div", null, [
11203
- createElementVNode("span", {
11204
- title: file.name
11205
- }, toDisplayString(getName(file.name)) + toDisplayString(getExtension(file.name)), 9, _hoisted_5$4),
11206
- props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createElementBlock("span", _hoisted_6$4, [
11207
- createTextVNode(toDisplayString(__props.virusCheckText) + " ", 1),
11208
- createVNode(DhIcon, {
11209
- class: "file__upload_list_icon_sub--loading",
11210
- "icon-name": "processing",
11211
- size: 18
11212
- })
11213
- ])) : createCommentVNode("", true),
11214
- props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "failed" ? (openBlock(), createElementBlock("span", _hoisted_7$3, toDisplayString(__props.virusCheckFailedText), 1)) : createCommentVNode("", true),
11215
- props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "detected" ? (openBlock(), createElementBlock("span", _hoisted_8$2, toDisplayString(__props.virusDetectedText), 1)) : createCommentVNode("", true),
11216
- _hoisted_9$2,
11217
- __props.fileSaved && !__props.errorOccured[id] || !__props.errorOccured[id] && __props.virusCheck[id] ? (openBlock(), createElementBlock("span", _hoisted_10$2, toDisplayString(formatBytes(file.size)), 1)) : createCommentVNode("", true),
11218
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("span", _hoisted_11$2, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
11219
- ]),
11220
- !__props.fileSaved ? (openBlock(), createElementBlock("span", _hoisted_12$1, toDisplayString(props.uploadProgress[id]) + "%", 1)) : createCommentVNode("", true)
11221
- ]),
11222
- !__props.fileSaved ? (openBlock(), createElementBlock("progress", {
11223
- key: 0,
11224
- id: "file",
11225
- max: "100",
11226
- value: props.uploadProgress[id]
11227
- }, toDisplayString(props.uploadProgress[id]) + "% ", 9, _hoisted_13$1)) : createCommentVNode("", true)
11228
- ]),
11229
- __props.fileSaved && !__props.virusCheck[id] && !__props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
11230
- key: 4,
11231
- class: "file__upload_list_download",
11232
- download: "",
11233
- href: generateLink(file)
11234
- }, [
11235
- createVNode(DhIcon, {
11236
- class: "file__upload_list_download_icon",
11237
- "icon-name": "download",
11238
- size: 24
11239
- })
11240
- ], 8, _hoisted_14$1)) : createCommentVNode("", true),
11241
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
11242
- key: 5,
11243
- class: "file__upload_list_retry",
11244
- onClick: _cache[3] || (_cache[3] = ($event) => reload($event))
11245
- }, [
11246
- createVNode(DhIcon, {
11247
- class: "file__upload_list_retry_icon",
11248
- "icon-name": "retry",
11249
- size: 24
11250
- })
11251
- ])) : createCommentVNode("", true),
11252
- props.uploadProgress[id] !== 100 ? (openBlock(), createBlock(DhIcon, {
11253
- key: 6,
11254
- class: "file__upload_list_delete",
11255
- "icon-name": "close",
11256
- size: 24,
11257
- onClick: ($event) => removeFile(id)
11258
- }, null, 8, ["onClick"])) : (openBlock(), createBlock(DhIcon, {
11259
- key: 7,
11260
- class: "file__upload_list_delete",
11261
- "icon-name": "delete",
11262
- size: 24,
11263
- onClick: ($event) => deleteFile(id)
11264
- }, null, 8, ["onClick"]))
11265
- ], 2);
11266
- }), 128))
11267
- ])) : createCommentVNode("", true),
11268
- !fileSelected.value && !__props.inline ? (openBlock(), createElementBlock("div", _hoisted_15$1, " No file selected ")) : createCommentVNode("", true),
11269
- !__props.inline && !__props.fileSaved ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
11270
- _hoisted_17$1,
11271
- createElementVNode("button", {
11272
- class: normalizeClass([
11273
- "file__upload_action_done",
11274
- fileSelected.value && !__props.fileSaved ? "file__upload_action_done--active" : ""
11275
- ]),
11276
- onClick: saveFile
11277
- }, " Done ", 2)
11278
- ])) : createCommentVNode("", true)
11279
- ], 2);
11280
- };
10961
+ return target;
11281
10962
  }
11282
- };
11283
- const _sfc_main$f = defineComponent({
11284
- components: { DhIcon },
11285
- props: {
11286
- hasCloseButton: {
11287
- type: Boolean,
11288
- default: true
11289
- },
11290
- hasSideBar: {
11291
- type: Boolean,
11292
- default: true
11293
- },
11294
- hasSideBarButtonBottom: {
11295
- type: Boolean,
11296
- default: true
11297
- },
11298
- hasHeader: {
11299
- type: Boolean,
11300
- default: true
11301
- },
11302
- hasFooter: {
11303
- type: Boolean,
11304
- default: true
11305
- },
11306
- hasFooterButtonRight: {
11307
- type: Boolean,
11308
- default: true
11309
- },
11310
- sideBarPosition: {
11311
- type: String,
11312
- default: "left"
11313
- },
11314
- hasCloseConfirmation: {
11315
- type: Boolean,
11316
- default: false
11317
- },
11318
- bodyClass: {
11319
- type: String,
11320
- default: ""
10963
+ return source;
10964
+ }
10965
+ function isValidKey(key) {
10966
+ return ["__proto__", "prototype", "constructor"].indexOf(key) === -1;
10967
+ }
10968
+ function _merger(key, target, source, options) {
10969
+ if (!isValidKey(key)) {
10970
+ return;
10971
+ }
10972
+ const tval = target[key];
10973
+ const sval = source[key];
10974
+ if (isObject$1(tval) && isObject$1(sval)) {
10975
+ merge(tval, sval, options);
10976
+ } else {
10977
+ target[key] = clone$1(sval);
10978
+ }
10979
+ }
10980
+ function merge(target, source, options) {
10981
+ const sources = isArray(source) ? source : [source];
10982
+ const ilen = sources.length;
10983
+ if (!isObject$1(target)) {
10984
+ return target;
10985
+ }
10986
+ options = options || {};
10987
+ const merger = options.merger || _merger;
10988
+ for (let i2 = 0; i2 < ilen; ++i2) {
10989
+ source = sources[i2];
10990
+ if (!isObject$1(source)) {
10991
+ continue;
11321
10992
  }
11322
- },
11323
- emits: ["close"],
11324
- methods: {
11325
- closed() {
11326
- this.$emit("close", this.hasCloseConfirmation);
10993
+ const keys = Object.keys(source);
10994
+ for (let k2 = 0, klen = keys.length; k2 < klen; ++k2) {
10995
+ merger(keys[k2], target, source, options);
11327
10996
  }
11328
10997
  }
11329
- });
11330
- const _hoisted_1$f = {
11331
- key: 1,
11332
- id: "modal-sidebar",
11333
- class: "modal-sidebar"
11334
- };
11335
- const _hoisted_2$e = {
11336
- key: 0,
11337
- id: "modalTitle",
11338
- class: "modal-header"
10998
+ return target;
10999
+ }
11000
+ function mergeIf(target, source) {
11001
+ return merge(target, source, { merger: _mergerIf });
11002
+ }
11003
+ function _mergerIf(key, target, source) {
11004
+ if (!isValidKey(key)) {
11005
+ return;
11006
+ }
11007
+ const tval = target[key];
11008
+ const sval = source[key];
11009
+ if (isObject$1(tval) && isObject$1(sval)) {
11010
+ mergeIf(tval, sval);
11011
+ } else if (!Object.prototype.hasOwnProperty.call(target, key)) {
11012
+ target[key] = clone$1(sval);
11013
+ }
11014
+ }
11015
+ const keyResolvers = {
11016
+ "": (v) => v,
11017
+ x: (o) => o.x,
11018
+ y: (o) => o.y
11339
11019
  };
11340
- const _hoisted_3$a = { class: "modal-footer" };
11341
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
11342
- const _component_dh_icon = resolveComponent("dh-icon");
11343
- return openBlock(), createBlock(Transition, { name: "modal-fade" }, {
11344
- default: withCtx(() => [
11345
- createElementVNode("div", {
11346
- class: "modal-backdrop",
11347
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closed && _ctx.closed(...args))
11348
- }, [
11349
- createElementVNode("div", {
11350
- "aria-describedby": "modalDescription",
11351
- "aria-labelledby": "modalTitle",
11352
- class: normalizeClass(`modal ${_ctx.hasSideBar ? _ctx.sideBarPosition : ""}`),
11353
- role: "dialog",
11354
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
11355
- }, ["stop"]))
11356
- }, [
11357
- _ctx.hasCloseButton ? (openBlock(), createElementBlock("button", {
11358
- key: 0,
11359
- "aria-label": "Close modal",
11360
- class: "btn-close",
11361
- type: "button",
11362
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closed && _ctx.closed(...args))
11363
- }, [
11364
- createVNode(_component_dh_icon, {
11365
- class: "icon",
11366
- "icon-name": "close",
11367
- size: 24
11368
- })
11369
- ])) : createCommentVNode("", true),
11370
- _ctx.hasSideBar ? (openBlock(), createElementBlock("aside", _hoisted_1$f, [
11371
- renderSlot(_ctx.$slots, "sidebar"),
11372
- _ctx.hasSideBarButtonBottom ? renderSlot(_ctx.$slots, "sidebar-button-bottom", { key: 0 }) : createCommentVNode("", true)
11373
- ])) : createCommentVNode("", true),
11374
- createElementVNode("section", {
11375
- class: normalizeClass(`right-section ${_ctx.hasSideBar ? "" : "full"}`)
11376
- }, [
11377
- _ctx.hasHeader ? (openBlock(), createElementBlock("header", _hoisted_2$e, [
11378
- renderSlot(_ctx.$slots, "header")
11379
- ])) : createCommentVNode("", true),
11380
- createElementVNode("section", {
11381
- id: "modalDescription",
11382
- class: normalizeClass(["modal-body", _ctx.bodyClass])
11383
- }, [
11384
- renderSlot(_ctx.$slots, "body")
11385
- ], 2),
11386
- createElementVNode("footer", _hoisted_3$a, [
11387
- _ctx.hasFooter ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : createCommentVNode("", true),
11388
- _ctx.hasFooterButtonRight ? renderSlot(_ctx.$slots, "footer-button-right", { key: 1 }) : createCommentVNode("", true)
11389
- ])
11390
- ], 2)
11391
- ], 2)
11392
- ])
11393
- ]),
11394
- _: 3
11395
- });
11020
+ function resolveObjectKey(obj, key) {
11021
+ const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));
11022
+ return resolver(obj);
11396
11023
  }
11397
- var Modal = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$6]]);
11398
- var __glob_1_0 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTIgMy41YTguNSA4LjUgMCAxIDAgMCAxNyA4LjUgOC41IDAgMCAwIDAtMTd6TTIuNSAxMmE5LjUgOS41IDAgMSAxIDE5IDAgOS41IDkuNSAwIDAgMS0xOSAweiIgZmlsbD0iI0MzMkYyNyIvPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiA3LjVhLjUuNSAwIDAgMSAuNS41djRhLjUuNSAwIDAgMS0xIDBWOGEuNS41IDAgMCAxIC41LS41ek0xMS4yNSAxNmEuNzUuNzUgMCAwIDEgLjc1LS43NWguMDFhLjc1Ljc1IDAgMCAxIDAgMS41SDEyYS43NS43NSAwIDAgMS0uNzUtLjc1eiIgZmlsbD0iI0MzMkYyNyIvPgo8L3N2Zz4K";
11399
- var __glob_1_1 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xNy40NTIgMTkuMTg5SDYuNTU4QTIuNTYgMi41NiAwIDAgMSA0IDE2LjYzMVYxNmMwLTEgLjQxNS0xLjk1OSAxLjEzOC0yLjY0NS40MzMtLjQxLjY3OC0uOTc3LjY3OC0xLjU3MlY5LjE4NEE2LjE5MSA2LjE5MSAwIDAgMSAxMiAzYTYuMTkxIDYuMTkxIDAgMCAxIDYuMTg0IDYuMTg0djIuNmMwIC41OTQuMjQ1IDEuMTY1LjY3OCAxLjU3QTMuNjM2IDMuNjM2IDAgMCAxIDIwIDE2di42MzFhMi41NDcgMi41NDcgMCAwIDEtMi41NDkgMi41NTh6bS01LjQ0Ny0xNC43MmE0LjcxOCA0LjcxOCAwIDAgMC00LjcxIDQuNzF2Mi42YzAgMS0uNDE0IDEuOTU4LTEuMTM4IDIuNjQ1LS40MzMuNDEtLjY3Ny45NzctLjY3NyAxLjU3MXYuNjMyYzAgLjU5OS40ODQgMS4wNzggMS4wODMgMS4wODJoMTAuODk0Yy41OTQgMCAxLjA3OC0uNDgzIDEuMDgzLTEuMDgydi0uNjMyYzAtLjU5NC0uMjQ0LTEuMTY2LS42NzgtMS41NzFhMy42MzYgMy42MzYgMCAwIDEtMS4xMzgtMi42NDZWOS4xNzVhNC43MjUgNC43MjUgMCAwIDAtNC43MTktNC43MDV6TTEzLjkwNCAyMS40NjZoLTMuNzk4YS43NC43NCAwIDAgMS0uNzM3LS43MzguNzQuNzQgMCAwIDEgLjczNy0uNzM3aDMuNzk4YS43MzcuNzM3IDAgMSAxIDAgMS40NzV6IiBmaWxsPSIjQkZCRkJGIi8+Cjwvc3ZnPgo=";
11400
- var __glob_1_2 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTkuNDI3IDYuMjUzYTEgMSAwIDAgMSAwIDEuNDE0bC05LjI0IDkuMjRhMSAxIDAgMCAxLTEuNDE0IDBsLTQuMi00LjJhMSAxIDAgMSAxIDEuNDE0LTEuNDE0bDMuNDkzIDMuNDkzIDguNTMzLTguNTMzYTEgMSAwIDAgMSAxLjQxNCAweiIgZmlsbD0iIzNDQTA2NCIvPgo8L3N2Zz4K";
11401
- var __glob_1_3 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTAuODkzIDMuNzlhMi4yNTYgMi4yNTYgMCAwIDEgMy4wMzYuNzk2bC4wMDIuMDAzIDcuNDQyIDEyLjQyNGEyLjI1NyAyLjI1NyAwIDAgMS0xLjkzIDMuMzg0SDQuNTU3YTIuMjU3IDIuMjU3IDAgMCAxLTEuOTI5LTMuMzg0bC4wMDQtLjAwN0wxMC4wNyA0LjU4OWwuMDAyLS4wMDNjLjIwMS0uMzMxLjQ4NC0uNjA2LjgyMi0uNzk2ek0xMiA0LjVhMS4yNTYgMS4yNTYgMCAwIDAtMS4wNzMuNjA0aC0uMDAxTDMuNDkgMTcuNTE3YTEuMjU2IDEuMjU2IDAgMCAwIDEuMDc0IDEuODgxaDE0Ljg3YTEuMjU2IDEuMjU2IDAgMCAwIDEuMDc0LTEuODgxTDEzLjA3NCA1LjEwNXYtLjAwMUExLjI1NyAxLjI1NyAwIDAgMCAxMiA0LjV6IiBmaWxsPSIjRjI5OTRBIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyIDguODZhLjUuNSAwIDAgMSAuNS41djMuNTEyYS41LjUgMCAxIDEtMSAwVjkuMzU5YS41LjUgMCAwIDEgLjUtLjV6TTExLjI1IDE2LjM4NWEuNzUuNzUgMCAwIDEgLjc1LS43NWguMDA5YS43NS43NSAwIDEgMSAwIDEuNUgxMmEuNzUuNzUgMCAwIDEtLjc1LS43NXoiIGZpbGw9IiNGMjk5NEEiLz4KPC9zdmc+Cg==";
11402
- const _sfc_main$e = defineComponent({
11403
- props: {
11404
- notificationType: {
11405
- type: String,
11406
- required: true,
11407
- default: "toast"
11408
- },
11409
- status: {
11410
- type: String,
11411
- required: true,
11412
- default: "info"
11413
- },
11414
- title: {
11415
- type: String,
11416
- required: false,
11417
- default: ""
11418
- },
11419
- message: {
11420
- type: String,
11421
- required: false,
11422
- default: ""
11423
- },
11424
- dismissible: {
11425
- type: Boolean,
11426
- required: false,
11427
- default: true
11428
- },
11429
- notificationButton: {
11430
- type: String,
11431
- default: "Action"
11432
- },
11433
- buttonAction: {
11434
- type: String,
11435
- default: "void"
11436
- },
11437
- buttonDismiss: {
11438
- type: String,
11439
- default: "Dismiss"
11440
- }
11441
- },
11442
- data() {
11443
- return {
11444
- show: true
11445
- };
11446
- },
11447
- mounted() {
11448
- if (this.dismissible && ["toast", "bottom-message"].includes(this.notificationType)) {
11449
- setTimeout(() => {
11450
- this.close();
11451
- }, 3e3);
11452
- }
11453
- },
11454
- methods: {
11455
- getIconUrl() {
11456
- return new URL({ "../assets/icon-danger.svg": __glob_1_0, "../assets/icon-info.svg": __glob_1_1, "../assets/icon-success.svg": __glob_1_2, "../assets/icon-warning.svg": __glob_1_3 }[`../assets/icon-${this.status}.svg`], self.location).href;
11457
- },
11458
- close() {
11459
- this.show = false;
11460
- },
11461
- limitTitle(_title, _type) {
11462
- if (["toast", "actionable"].includes(_type) && _title.length >= 60) {
11463
- return `${_title.substring(0, 60)}..`;
11464
- } else if (["bottom-message"].includes(_type) && _title.length >= 40) {
11465
- return `${_title.substring(0, 40)}..`;
11466
- } else if (["modal"].includes(_type) && _title.length >= 80) {
11467
- return `${_title.substring(0, 80)}..`;
11024
+ function _getKeyResolver(key) {
11025
+ const keys = _splitKey(key);
11026
+ return (obj) => {
11027
+ for (const k2 of keys) {
11028
+ if (k2 === "") {
11029
+ break;
11468
11030
  }
11469
- return _title;
11031
+ obj = obj && obj[k2];
11470
11032
  }
11471
- }
11472
- });
11473
- const _hoisted_1$e = /* @__PURE__ */ createElementVNode("img", {
11474
- alt: "icon",
11475
- class: "close-icon",
11476
- src: _imports_0$1
11477
- }, null, -1);
11478
- const _hoisted_2$d = [
11479
- _hoisted_1$e
11480
- ];
11481
- const _hoisted_3$9 = ["src"];
11482
- const _hoisted_4$6 = { class: "additional-text" };
11483
- const _hoisted_5$3 = {
11484
- key: 0,
11485
- class: "descriptions"
11486
- };
11487
- const _hoisted_6$3 = { class: "btn btn-normal btn-primary" };
11488
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
11489
- return openBlock(), createElementBlock("div", {
11490
- class: normalizeClass(`dh-notification-container ${_ctx.notificationType}`)
11491
- }, [
11492
- _ctx.show ? (openBlock(), createElementBlock("div", {
11493
- key: 0,
11494
- class: normalizeClass(["bottom-message"].includes(_ctx.notificationType) ? `notification-up status status-${_ctx.notificationType}` : `notification-enter status status-${_ctx.notificationType}`)
11495
- }, [
11496
- !["modal", "bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("button", {
11497
- key: 0,
11498
- class: "close-notification",
11499
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]))
11500
- }, _hoisted_2$d)) : createCommentVNode("", true),
11501
- createElementVNode("div", {
11502
- class: normalizeClass(`content content- ${_ctx.notificationType}`)
11503
- }, [
11504
- createElementVNode("div", {
11505
- class: normalizeClass(`ellipse ellipse-${_ctx.status} ellipse-${_ctx.notificationType}`)
11506
- }, [
11507
- createElementVNode("img", {
11508
- class: normalizeClass(`icons icons-${_ctx.status} icons-${_ctx.status}-${_ctx.notificationType}`),
11509
- src: _ctx.getIconUrl()
11510
- }, null, 10, _hoisted_3$9)
11511
- ], 2),
11512
- createElementVNode("div", _hoisted_4$6, [
11513
- createElementVNode("div", {
11514
- class: normalizeClass(`title title-${_ctx.notificationType}`)
11515
- }, toDisplayString(_ctx.limitTitle(_ctx.title, _ctx.notificationType)), 3),
11516
- !["bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("div", _hoisted_5$3, toDisplayString(_ctx.message.length >= 280 ? `${_ctx.message.substring(0, 280)}..` : _ctx.message), 1)) : createCommentVNode("", true)
11517
- ]),
11518
- !["toast", "bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("div", {
11519
- key: 0,
11520
- class: normalizeClass(`buttons ${_ctx.notificationType}`)
11521
- }, [
11522
- createElementVNode("button", _hoisted_6$3, toDisplayString(_ctx.notificationButton), 1),
11523
- createElementVNode("button", {
11524
- class: "btn btn-normal btn-secondary dismiss",
11525
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]))
11526
- }, toDisplayString(_ctx.buttonDismiss), 1)
11527
- ], 2)) : createCommentVNode("", true)
11528
- ], 2)
11529
- ], 2)) : createCommentVNode("", true)
11530
- ], 2);
11531
- }
11532
- var Notification = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$5]]);
11533
- /*!
11534
- * Chart.js v3.9.1
11535
- * https://www.chartjs.org
11536
- * (c) 2022 Chart.js Contributors
11537
- * Released under the MIT License
11538
- */
11539
- function noop() {
11540
- }
11541
- const uid = function() {
11542
- let id = 0;
11543
- return function() {
11544
- return id++;
11033
+ return obj;
11545
11034
  };
11546
- }();
11547
- function isNullOrUndef(value) {
11548
- return value === null || typeof value === "undefined";
11549
- }
11550
- function isArray(value) {
11551
- if (Array.isArray && Array.isArray(value)) {
11552
- return true;
11553
- }
11554
- const type = Object.prototype.toString.call(value);
11555
- if (type.slice(0, 7) === "[object" && type.slice(-6) === "Array]") {
11556
- return true;
11557
- }
11558
- return false;
11559
- }
11560
- function isObject$1(value) {
11561
- return value !== null && Object.prototype.toString.call(value) === "[object Object]";
11562
- }
11563
- const isNumberFinite = (value) => (typeof value === "number" || value instanceof Number) && isFinite(+value);
11564
- function finiteOrDefault(value, defaultValue) {
11565
- return isNumberFinite(value) ? value : defaultValue;
11566
- }
11567
- function valueOrDefault(value, defaultValue) {
11568
- return typeof value === "undefined" ? defaultValue : value;
11569
- }
11570
- const toPercentage = (value, dimension) => typeof value === "string" && value.endsWith("%") ? parseFloat(value) / 100 : value / dimension;
11571
- const toDimension = (value, dimension) => typeof value === "string" && value.endsWith("%") ? parseFloat(value) / 100 * dimension : +value;
11572
- function callback(fn, args, thisArg) {
11573
- if (fn && typeof fn.call === "function") {
11574
- return fn.apply(thisArg, args);
11575
- }
11576
11035
  }
11577
- function each(loopable, fn, thisArg, reverse) {
11578
- let i2, len, keys;
11579
- if (isArray(loopable)) {
11580
- len = loopable.length;
11581
- if (reverse) {
11582
- for (i2 = len - 1; i2 >= 0; i2--) {
11583
- fn.call(thisArg, loopable[i2], i2);
11584
- }
11036
+ function _splitKey(key) {
11037
+ const parts = key.split(".");
11038
+ const keys = [];
11039
+ let tmp = "";
11040
+ for (const part of parts) {
11041
+ tmp += part;
11042
+ if (tmp.endsWith("\\")) {
11043
+ tmp = tmp.slice(0, -1) + ".";
11585
11044
  } else {
11586
- for (i2 = 0; i2 < len; i2++) {
11587
- fn.call(thisArg, loopable[i2], i2);
11588
- }
11589
- }
11590
- } else if (isObject$1(loopable)) {
11591
- keys = Object.keys(loopable);
11592
- len = keys.length;
11593
- for (i2 = 0; i2 < len; i2++) {
11594
- fn.call(thisArg, loopable[keys[i2]], keys[i2]);
11045
+ keys.push(tmp);
11046
+ tmp = "";
11595
11047
  }
11596
11048
  }
11049
+ return keys;
11597
11050
  }
11598
- function _elementsEqual(a0, a1) {
11599
- let i2, ilen, v0, v1;
11600
- if (!a0 || !a1 || a0.length !== a1.length) {
11051
+ function _capitalize(str) {
11052
+ return str.charAt(0).toUpperCase() + str.slice(1);
11053
+ }
11054
+ const defined = (value) => typeof value !== "undefined";
11055
+ const isFunction = (value) => typeof value === "function";
11056
+ const setsEqual = (a3, b2) => {
11057
+ if (a3.size !== b2.size) {
11601
11058
  return false;
11602
11059
  }
11603
- for (i2 = 0, ilen = a0.length; i2 < ilen; ++i2) {
11604
- v0 = a0[i2];
11605
- v1 = a1[i2];
11606
- if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
11060
+ for (const item of a3) {
11061
+ if (!b2.has(item)) {
11607
11062
  return false;
11608
11063
  }
11609
11064
  }
11610
11065
  return true;
11611
- }
11612
- function clone$1(source) {
11613
- if (isArray(source)) {
11614
- return source.map(clone$1);
11615
- }
11616
- if (isObject$1(source)) {
11617
- const target = /* @__PURE__ */ Object.create(null);
11618
- const keys = Object.keys(source);
11619
- const klen = keys.length;
11620
- let k2 = 0;
11621
- for (; k2 < klen; ++k2) {
11622
- target[keys[k2]] = clone$1(source[keys[k2]]);
11623
- }
11624
- return target;
11625
- }
11626
- return source;
11627
- }
11628
- function isValidKey(key) {
11629
- return ["__proto__", "prototype", "constructor"].indexOf(key) === -1;
11630
- }
11631
- function _merger(key, target, source, options) {
11632
- if (!isValidKey(key)) {
11633
- return;
11634
- }
11635
- const tval = target[key];
11636
- const sval = source[key];
11637
- if (isObject$1(tval) && isObject$1(sval)) {
11638
- merge(tval, sval, options);
11639
- } else {
11640
- target[key] = clone$1(sval);
11641
- }
11642
- }
11643
- function merge(target, source, options) {
11644
- const sources = isArray(source) ? source : [source];
11645
- const ilen = sources.length;
11646
- if (!isObject$1(target)) {
11647
- return target;
11648
- }
11649
- options = options || {};
11650
- const merger = options.merger || _merger;
11651
- for (let i2 = 0; i2 < ilen; ++i2) {
11652
- source = sources[i2];
11653
- if (!isObject$1(source)) {
11654
- continue;
11655
- }
11656
- const keys = Object.keys(source);
11657
- for (let k2 = 0, klen = keys.length; k2 < klen; ++k2) {
11658
- merger(keys[k2], target, source, options);
11659
- }
11660
- }
11661
- return target;
11662
- }
11663
- function mergeIf(target, source) {
11664
- return merge(target, source, { merger: _mergerIf });
11665
- }
11666
- function _mergerIf(key, target, source) {
11667
- if (!isValidKey(key)) {
11668
- return;
11669
- }
11670
- const tval = target[key];
11671
- const sval = source[key];
11672
- if (isObject$1(tval) && isObject$1(sval)) {
11673
- mergeIf(tval, sval);
11674
- } else if (!Object.prototype.hasOwnProperty.call(target, key)) {
11675
- target[key] = clone$1(sval);
11676
- }
11677
- }
11678
- const keyResolvers = {
11679
- "": (v) => v,
11680
- x: (o) => o.x,
11681
- y: (o) => o.y
11682
- };
11683
- function resolveObjectKey(obj, key) {
11684
- const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));
11685
- return resolver(obj);
11686
- }
11687
- function _getKeyResolver(key) {
11688
- const keys = _splitKey(key);
11689
- return (obj) => {
11690
- for (const k2 of keys) {
11691
- if (k2 === "") {
11692
- break;
11693
- }
11694
- obj = obj && obj[k2];
11695
- }
11696
- return obj;
11697
- };
11698
- }
11699
- function _splitKey(key) {
11700
- const parts = key.split(".");
11701
- const keys = [];
11702
- let tmp = "";
11703
- for (const part of parts) {
11704
- tmp += part;
11705
- if (tmp.endsWith("\\")) {
11706
- tmp = tmp.slice(0, -1) + ".";
11707
- } else {
11708
- keys.push(tmp);
11709
- tmp = "";
11710
- }
11711
- }
11712
- return keys;
11713
- }
11714
- function _capitalize(str) {
11715
- return str.charAt(0).toUpperCase() + str.slice(1);
11716
- }
11717
- const defined = (value) => typeof value !== "undefined";
11718
- const isFunction = (value) => typeof value === "function";
11719
- const setsEqual = (a3, b2) => {
11720
- if (a3.size !== b2.size) {
11721
- return false;
11722
- }
11723
- for (const item of a3) {
11724
- if (!b2.has(item)) {
11725
- return false;
11726
- }
11727
- }
11728
- return true;
11729
- };
11730
- function _isClickEvent(e2) {
11731
- return e2.type === "mouseup" || e2.type === "click" || e2.type === "contextmenu";
11066
+ };
11067
+ function _isClickEvent(e2) {
11068
+ return e2.type === "mouseup" || e2.type === "click" || e2.type === "contextmenu";
11732
11069
  }
11733
11070
  const PI = Math.PI;
11734
11071
  const TAU = 2 * PI;
@@ -23282,909 +22619,1957 @@ function compareData(newData, oldData) {
23282
22619
  });
23283
22620
  return oldData.datasets.length === newData.datasets.length && newDatasetLabels.every((value, index) => value === oldDatasetLabels[index]);
23284
22621
  }
23285
- const templateError = "Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components";
23286
- const chartUpdateError = "Update ERROR: chart instance not found";
23287
- const generateChart = (chartId, chartType, chartController) => {
23288
- return defineComponent({
23289
- props: {
23290
- chartData: {
23291
- type: Object,
23292
- required: true
23293
- },
23294
- chartOptions: {
23295
- type: Object,
23296
- default: () => {
23297
- }
22622
+ const templateError = "Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components";
22623
+ const chartUpdateError = "Update ERROR: chart instance not found";
22624
+ const generateChart = (chartId, chartType, chartController) => {
22625
+ return defineComponent({
22626
+ props: {
22627
+ chartData: {
22628
+ type: Object,
22629
+ required: true
22630
+ },
22631
+ chartOptions: {
22632
+ type: Object,
22633
+ default: () => {
22634
+ }
22635
+ },
22636
+ datasetIdKey: {
22637
+ type: String,
22638
+ default: "label"
22639
+ },
22640
+ chartId: {
22641
+ type: String,
22642
+ default: chartId
22643
+ },
22644
+ width: {
22645
+ type: Number,
22646
+ default: 400
22647
+ },
22648
+ height: {
22649
+ type: Number,
22650
+ default: 400
22651
+ },
22652
+ cssClasses: {
22653
+ type: String,
22654
+ default: ""
22655
+ },
22656
+ styles: {
22657
+ type: Object,
22658
+ default: () => {
22659
+ }
22660
+ },
22661
+ plugins: {
22662
+ type: Array,
22663
+ default: () => []
22664
+ }
22665
+ },
22666
+ setup(props, context) {
22667
+ Chart.register(chartController);
22668
+ const _chart = shallowRef(null);
22669
+ const canvasEl = ref(null);
22670
+ function renderChart(data, options) {
22671
+ if (_chart.value !== null) {
22672
+ chartDestroy(toRaw(_chart.value), context);
22673
+ }
22674
+ if (canvasEl.value === null) {
22675
+ throw new Error(templateError);
22676
+ } else {
22677
+ const chartData = getChartData(data, props.datasetIdKey);
22678
+ const canvasEl2DContext = canvasEl.value.getContext("2d");
22679
+ if (canvasEl2DContext !== null) {
22680
+ _chart.value = new Chart(canvasEl2DContext, {
22681
+ type: chartType,
22682
+ data: isProxy(data) ? new Proxy(chartData, {}) : chartData,
22683
+ options,
22684
+ plugins: props.plugins
22685
+ });
22686
+ }
22687
+ }
22688
+ }
22689
+ function chartDataHandler(newValue, oldValue) {
22690
+ const newData = isProxy(newValue) ? toRaw(newValue) : {
22691
+ ...newValue
22692
+ };
22693
+ const oldData = isProxy(oldValue) ? toRaw(oldValue) : {
22694
+ ...oldValue
22695
+ };
22696
+ if (Object.keys(oldData).length > 0) {
22697
+ const chart = toRaw(_chart.value);
22698
+ const isEqualLabelsAndDatasetsLength = compareData(newData, oldData);
22699
+ if (isEqualLabelsAndDatasetsLength && chart !== null) {
22700
+ setChartDatasets(chart === null || chart === void 0 ? void 0 : chart.data, newData, props.datasetIdKey);
22701
+ if (newData.labels !== void 0) {
22702
+ setChartLabels(chart, newData.labels, context);
22703
+ }
22704
+ updateChart();
22705
+ } else {
22706
+ if (chart !== null) {
22707
+ chartDestroy(chart, context);
22708
+ }
22709
+ chartCreate(renderChart, props.chartData, props.chartOptions, context);
22710
+ }
22711
+ } else {
22712
+ if (_chart.value !== null) {
22713
+ chartDestroy(toRaw(_chart.value), context);
22714
+ }
22715
+ chartCreate(renderChart, props.chartData, props.chartOptions, context);
22716
+ }
22717
+ }
22718
+ function chartOptionsHandler(options) {
22719
+ const chart = toRaw(_chart.value);
22720
+ if (chart !== null) {
22721
+ setChartOptions(chart, options);
22722
+ updateChart();
22723
+ } else {
22724
+ chartCreate(renderChart, props.chartData, props.chartOptions, context);
22725
+ }
22726
+ }
22727
+ function updateChart() {
22728
+ const chart = toRaw(_chart.value);
22729
+ if (chart !== null) {
22730
+ chartUpdate(chart, context);
22731
+ } else {
22732
+ console.error(chartUpdateError);
22733
+ }
22734
+ }
22735
+ watch(() => props.chartData, (newValue, oldValue) => chartDataHandler(newValue, oldValue), {
22736
+ deep: true
22737
+ });
22738
+ watch(() => props.chartOptions, (newValue) => chartOptionsHandler(newValue), {
22739
+ deep: true
22740
+ });
22741
+ onMounted(() => {
22742
+ if ("datasets" in props.chartData && props.chartData.datasets.length > 0) {
22743
+ chartCreate(renderChart, props.chartData, props.chartOptions, context);
22744
+ }
22745
+ });
22746
+ onBeforeUnmount(() => {
22747
+ if (_chart.value !== null) {
22748
+ chartDestroy(toRaw(_chart.value), context);
22749
+ }
22750
+ });
22751
+ context.expose({
22752
+ chart: _chart,
22753
+ updateChart
22754
+ });
22755
+ return () => h("div", {
22756
+ style: props.styles,
22757
+ class: props.cssClasses
22758
+ }, [
22759
+ h("canvas", {
22760
+ id: props.chartId,
22761
+ width: props.width,
22762
+ height: props.height,
22763
+ ref: canvasEl
22764
+ })
22765
+ ]);
22766
+ }
22767
+ });
22768
+ };
22769
+ const Bar = /* @__PURE__ */ generateChart("bar-chart", "bar", BarController);
22770
+ var MultiRangeSlider_vue_vue_type_style_index_0_lang = "";
22771
+ const _sfc_main$j = {
22772
+ name: "MultiRangeSlider",
22773
+ props: {
22774
+ baseClassName: {
22775
+ type: String,
22776
+ default: "multi-range-slider"
22777
+ },
22778
+ min: { type: Number },
22779
+ max: { type: Number },
22780
+ minValue: { type: Number },
22781
+ maxValue: { type: Number },
22782
+ step: { type: Number, default: 1 },
22783
+ preventWheel: { type: Boolean, default: false },
22784
+ ruler: { type: Boolean, default: true },
22785
+ label: { type: Boolean, default: true },
22786
+ labels: { type: Array },
22787
+ minCaption: { type: String },
22788
+ maxCaption: { type: String },
22789
+ rangeMargin: { type: Number }
22790
+ },
22791
+ data() {
22792
+ let _labels = this.labels || [];
22793
+ let _minimum = this.min === void 0 ? 0 : this.min;
22794
+ let max = _labels.length ? _labels.length - 1 : 100;
22795
+ let _maximum = this.max === void 0 ? max : this.max;
22796
+ let _minValue = this.minValue === void 0 ? 25 : this.minValue;
22797
+ if (_labels.length && this.minValue === void 0) {
22798
+ _minValue = 1;
22799
+ }
22800
+ let _maxValue = this.maxValue || 75;
22801
+ if (_labels.length && this.maxValue === void 0) {
22802
+ _maxValue = _labels.length - 2;
22803
+ }
22804
+ if (_maximum <= _minimum) {
22805
+ throw new Error("Invalid props min or max");
22806
+ }
22807
+ if (_minValue > _maxValue) {
22808
+ throw new Error("Invalid props minValue or maxValue");
22809
+ }
22810
+ let _rangeMargin = this.rangeMargin === void 0 ? this.step : this.rangeMargin;
22811
+ let m3 = _rangeMargin % this.step;
22812
+ m3 && (_rangeMargin = _rangeMargin + this.step - m3);
22813
+ return {
22814
+ valueMin: _minValue < _minimum ? _minimum : _minValue,
22815
+ valueMax: _maxValue > _maximum ? _maximum : _maxValue,
22816
+ interVal: null,
22817
+ startX: null,
22818
+ mouseMoveCounter: null,
22819
+ barBox: null,
22820
+ barValue: 0,
22821
+ rangeMarginValue: _rangeMargin
22822
+ };
22823
+ },
22824
+ methods: {
22825
+ onBarLeftClick() {
22826
+ if (this.valueMin - this.step >= this.minimum) {
22827
+ this.valueMin -= this.step;
22828
+ } else {
22829
+ this.valueMin = this.minimum;
22830
+ }
22831
+ },
22832
+ onInnerBarLeftClick() {
22833
+ if (this.valueMin + this.rangeMarginValue < this.valueMax) {
22834
+ this.valueMin += this.step;
22835
+ }
22836
+ },
22837
+ onBarRightClick() {
22838
+ if (this.valueMax + this.step <= this.maximum) {
22839
+ this.valueMax += this.step;
22840
+ } else {
22841
+ this.valueMax = this.maximum;
22842
+ }
22843
+ },
22844
+ onInnerBarRightClick() {
22845
+ if (this.valueMax - this.rangeMarginValue > this.valueMin) {
22846
+ this.valueMax -= this.step;
22847
+ }
22848
+ },
22849
+ onInputMinChange(e2) {
22850
+ let val = parseFloat(e2.target.value);
22851
+ if (val <= this.valueMax - this.rangeMarginValue && val >= this.minimum) {
22852
+ this.valueMin = val;
22853
+ } else {
22854
+ e2.target.value = this.valueMin;
22855
+ }
22856
+ },
22857
+ onInputMaxChange(e2) {
22858
+ let val = parseFloat(e2.target.value);
22859
+ if (val >= this.valueMin + this.rangeMarginValue && val <= this.maximum) {
22860
+ this.valueMax = val;
22861
+ } else {
22862
+ e2.target.value = this.valueMax;
22863
+ }
22864
+ },
22865
+ onLeftThumbMousedown(e2) {
22866
+ e2.preventDefault();
22867
+ this.startX = e2.clientX;
22868
+ if (e2.type === "touchstart") {
22869
+ if (e2.touches.length === 1) {
22870
+ this.startX = e2.touches[0].clientX;
22871
+ } else {
22872
+ return;
22873
+ }
22874
+ }
22875
+ this.mouseMoveCounter = 0;
22876
+ this.barValue = this.valueMin;
22877
+ this.barBox = e2.target.parentNode.getBoundingClientRect();
22878
+ document.addEventListener("mousemove", this.onLeftThumbMousemove);
22879
+ document.addEventListener("mouseup", this.onLeftThumbMouseup);
22880
+ document.addEventListener("touchmove", this.onLeftThumbMousemove);
22881
+ document.addEventListener("touchend", this.onLeftThumbMouseup);
22882
+ },
22883
+ onLeftThumbMousemove(e2) {
22884
+ this.mouseMoveCounter++;
22885
+ let clientX = e2.clientX;
22886
+ if (e2.type === "touchmove") {
22887
+ clientX = e2.touches[0].clientX;
22888
+ }
22889
+ let dx = clientX - this.startX;
22890
+ let per = dx / this.barBox.width;
22891
+ let val = this.barValue + (this.maximum - this.minimum) * per;
22892
+ let mod = val % this.step;
22893
+ val -= mod;
22894
+ if (val < this.minimum) {
22895
+ val = this.minimum;
22896
+ } else if (val > this.valueMax - this.rangeMarginValue) {
22897
+ val = this.valueMax - this.rangeMarginValue;
22898
+ }
22899
+ this.valueMin = val;
22900
+ },
22901
+ onLeftThumbMouseup() {
22902
+ document.removeEventListener("mousemove", this.onLeftThumbMousemove);
22903
+ document.removeEventListener("mouseup", this.onLeftThumbMouseup);
22904
+ document.removeEventListener("touchmove", this.onLeftThumbMousemove);
22905
+ document.removeEventListener("touchend", this.onLeftThumbMouseup);
22906
+ },
22907
+ onRightThumbMousedown(e2) {
22908
+ e2.preventDefault();
22909
+ this.startX = e2.clientX;
22910
+ if (e2.type === "touchstart") {
22911
+ if (e2.touches.length === 1) {
22912
+ this.startX = e2.touches[0].clientX;
22913
+ } else {
22914
+ return;
22915
+ }
22916
+ }
22917
+ this.mouseMoveCounter = 0;
22918
+ this.barValue = this.valueMax;
22919
+ this.barBox = e2.target.parentNode.getBoundingClientRect();
22920
+ document.addEventListener("mousemove", this.onRightThumbMousemove);
22921
+ document.addEventListener("mouseup", this.onRightThumbMouseup);
22922
+ document.addEventListener("touchmove", this.onRightThumbMousemove);
22923
+ document.addEventListener("touchend", this.onRightThumbMouseup);
22924
+ },
22925
+ onRightThumbMousemove(e2) {
22926
+ this.mouseMoveCounter++;
22927
+ let clientX = e2.clientX;
22928
+ if (e2.type === "touchmove") {
22929
+ clientX = e2.touches[0].clientX;
22930
+ }
22931
+ let dx = clientX - this.startX;
22932
+ let per = dx / this.barBox.width;
22933
+ let val = this.barValue + (this.maximum - this.minimum) * per;
22934
+ let mod = val % this.step;
22935
+ val -= mod;
22936
+ if (val < this.valueMin + this.rangeMarginValue) {
22937
+ val = this.valueMin + this.rangeMarginValue;
22938
+ } else if (val > this.maximum) {
22939
+ val = this.maximum;
22940
+ }
22941
+ this.valueMax = val;
22942
+ },
22943
+ onRightThumbMouseup() {
22944
+ document.removeEventListener("mousemove", this.onRightThumbMousemove);
22945
+ document.removeEventListener("mouseup", this.onRightThumbMouseup);
22946
+ document.removeEventListener("touchmove", this.onRightThumbMousemove);
22947
+ document.removeEventListener("touchend", this.onRightThumbMouseup);
22948
+ },
22949
+ onMouseWheel(e2) {
22950
+ if (this.preventWheel === true) {
22951
+ return;
22952
+ }
22953
+ if (!e2.shiftKey && !e2.ctrlKey) {
22954
+ return;
22955
+ }
22956
+ let val = this.step;
22957
+ if (e2.deltaY < 0) {
22958
+ val = -val;
22959
+ }
22960
+ if (e2.shiftKey && e2.ctrlKey) {
22961
+ if (this.valueMin + val >= this.minimum && this.valueMax + val <= this.maximum) {
22962
+ this.valueMin = this.valueMin + val;
22963
+ this.valueMax = this.valueMax + val;
22964
+ }
22965
+ } else if (e2.ctrlKey) {
22966
+ val = this.valueMax + val;
22967
+ if (val < this.valueMin + this.rangeMarginValue) {
22968
+ val = this.valueMin + this.rangeMarginValue;
22969
+ } else if (val > this.maximum) {
22970
+ val = this.maximum;
22971
+ }
22972
+ this.valueMax = val;
22973
+ } else if (e2.shiftKey) {
22974
+ val = this.valueMin + val;
22975
+ if (val < this.minimum) {
22976
+ val = this.minimum;
22977
+ } else if (val > this.valueMax - this.rangeMarginValue) {
22978
+ val = this.valueMax - this.rangeMarginValue;
22979
+ }
22980
+ this.valueMin = val;
22981
+ }
22982
+ },
22983
+ triggerInput() {
22984
+ let fixed = 0;
22985
+ if (this.step.toString().includes(".")) {
22986
+ fixed = 2;
22987
+ }
22988
+ let retObj = {
22989
+ min: this.minimum,
22990
+ max: this.maximum,
22991
+ minValue: parseFloat(this.valueMin.toFixed(fixed)),
22992
+ maxValue: parseFloat(this.valueMax.toFixed(fixed))
22993
+ };
22994
+ this.$emit("input", retObj);
22995
+ }
22996
+ },
22997
+ computed: {
22998
+ minimum() {
22999
+ return this.min === void 0 ? 0 : this.min;
23000
+ },
23001
+ maximum() {
23002
+ let _labels = this.labels || [];
23003
+ let max = _labels.length ? _labels.length - 1 : 100;
23004
+ return this.max === void 0 ? max : this.max;
23005
+ },
23006
+ stepCount() {
23007
+ let _labels = this.labels || [];
23008
+ if (_labels.length) {
23009
+ return _labels.length - 1;
23010
+ }
23011
+ return Math.floor((this.maximum - this.minimum) / this.step);
23012
+ },
23013
+ subStepCount() {
23014
+ let _labels = this.labels || [];
23015
+ if (_labels.length && this.step > 1) {
23016
+ return (this.maximum - this.minimum) / this.step;
23017
+ }
23018
+ return 0;
23019
+ },
23020
+ barMin() {
23021
+ let per = (this.valueMin - this.minimum) / (this.maximum - this.minimum) * 100;
23022
+ return per;
23023
+ },
23024
+ barMax() {
23025
+ let per = 100 - (this.valueMax - this.minimum) / (this.maximum - this.minimum) * 100;
23026
+ return per;
23027
+ },
23028
+ barMinVal() {
23029
+ let fixed = 0;
23030
+ if (this.step.toString().includes(".")) {
23031
+ fixed = 2;
23032
+ }
23033
+ return (this.valueMin || 0).toFixed(fixed);
23034
+ },
23035
+ barMaxVal() {
23036
+ let fixed = 0;
23037
+ if (this.step.toString().includes(".")) {
23038
+ fixed = 2;
23039
+ }
23040
+ return (this.valueMax || 100).toFixed(fixed);
23041
+ },
23042
+ scaleLabels() {
23043
+ let _labels = this.labels || [];
23044
+ if (_labels.length === 0) {
23045
+ _labels = [];
23046
+ _labels.push(this.minimum);
23047
+ _labels.push(this.maximum);
23048
+ }
23049
+ return _labels;
23050
+ }
23051
+ },
23052
+ watch: {
23053
+ valueMin() {
23054
+ this.triggerInput();
23055
+ },
23056
+ valueMax() {
23057
+ this.triggerInput();
23058
+ },
23059
+ minValue(newValue) {
23060
+ this.valueMin = newValue < this.minimum ? this.minimum : newValue;
23061
+ },
23062
+ maxValue(newValue) {
23063
+ this.valueMax = newValue > this.maximum ? this.maximum : newValue;
23064
+ }
23065
+ },
23066
+ mounted() {
23067
+ }
23068
+ };
23069
+ const _hoisted_1$j = { class: "bar" };
23070
+ const _hoisted_2$h = ["min", "max", "step", "value"];
23071
+ const _hoisted_3$c = { class: "caption" };
23072
+ const _hoisted_4$9 = { class: "min-caption" };
23073
+ const _hoisted_5$6 = { class: "bar-inner" };
23074
+ const _hoisted_6$6 = ["min", "max", "step", "value"];
23075
+ const _hoisted_7$5 = { class: "caption" };
23076
+ const _hoisted_8$3 = { class: "max-caption" };
23077
+ const _hoisted_9$3 = {
23078
+ key: 0,
23079
+ class: "ruler"
23080
+ };
23081
+ const _hoisted_10$3 = {
23082
+ key: 1,
23083
+ class: "sub-ruler"
23084
+ };
23085
+ const _hoisted_11$3 = {
23086
+ key: 2,
23087
+ class: "labels"
23088
+ };
23089
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
23090
+ return openBlock(), createElementBlock("div", {
23091
+ class: normalizeClass([$props.baseClassName, $data.rangeMarginValue === 0 ? "zero-ranage-margin" : ""]),
23092
+ onMousewheel: _cache[10] || (_cache[10] = withModifiers((...args) => $options.onMouseWheel && $options.onMouseWheel(...args), ["prevent", "stop"]))
23093
+ }, [
23094
+ createElementVNode("div", _hoisted_1$j, [
23095
+ createElementVNode("div", {
23096
+ class: "bar-left",
23097
+ style: normalizeStyle({ width: $options.barMin + "%" }),
23098
+ onClick: _cache[0] || (_cache[0] = (...args) => $options.onBarLeftClick && $options.onBarLeftClick(...args))
23099
+ }, null, 4),
23100
+ createElementVNode("input", {
23101
+ class: "input-type-range input-type-range-min",
23102
+ type: "range",
23103
+ min: $options.minimum,
23104
+ max: $options.maximum,
23105
+ step: $props.step,
23106
+ value: $data.valueMin,
23107
+ onInput: _cache[1] || (_cache[1] = withModifiers((...args) => $options.onInputMinChange && $options.onInputMinChange(...args), ["stop", "prevent"]))
23108
+ }, null, 40, _hoisted_2$h),
23109
+ createElementVNode("div", {
23110
+ class: "thumb thumb-left",
23111
+ onMousedown: _cache[2] || (_cache[2] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args)),
23112
+ onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args))
23113
+ }, [
23114
+ createElementVNode("div", _hoisted_3$c, [
23115
+ createElementVNode("span", _hoisted_4$9, toDisplayString($props.minCaption || $options.barMinVal), 1)
23116
+ ])
23117
+ ], 32),
23118
+ createElementVNode("div", _hoisted_5$6, [
23119
+ createElementVNode("div", {
23120
+ class: "bar-inner-left",
23121
+ onClick: _cache[4] || (_cache[4] = (...args) => $options.onInnerBarLeftClick && $options.onInnerBarLeftClick(...args))
23122
+ }),
23123
+ createElementVNode("div", {
23124
+ class: "bar-inner-right",
23125
+ onClick: _cache[5] || (_cache[5] = (...args) => $options.onInnerBarRightClick && $options.onInnerBarRightClick(...args))
23126
+ })
23127
+ ]),
23128
+ createElementVNode("input", {
23129
+ class: "input-type-range input-type-range-max",
23130
+ type: "range",
23131
+ min: $options.minimum,
23132
+ max: $options.maximum,
23133
+ step: $props.step,
23134
+ value: $data.valueMax,
23135
+ onInput: _cache[6] || (_cache[6] = withModifiers((...args) => $options.onInputMaxChange && $options.onInputMaxChange(...args), ["stop", "prevent"]))
23136
+ }, null, 40, _hoisted_6$6),
23137
+ createElementVNode("div", {
23138
+ class: "thumb thumb-right",
23139
+ onMousedown: _cache[7] || (_cache[7] = (...args) => $options.onRightThumbMousedown && $options.onRightThumbMousedown(...args)),
23140
+ onTouchstart: _cache[8] || (_cache[8] = (...args) => $options.onRightThumbMousedown && $options.onRightThumbMousedown(...args))
23141
+ }, [
23142
+ createElementVNode("div", _hoisted_7$5, [
23143
+ createElementVNode("span", _hoisted_8$3, toDisplayString($props.maxCaption || $options.barMaxVal), 1)
23144
+ ])
23145
+ ], 32),
23146
+ createElementVNode("div", {
23147
+ class: "bar-right",
23148
+ style: normalizeStyle({ width: $options.barMax + "%" }),
23149
+ onClick: _cache[9] || (_cache[9] = (...args) => $options.onBarRightClick && $options.onBarRightClick(...args))
23150
+ }, null, 4)
23151
+ ]),
23152
+ $props.ruler ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
23153
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.stepCount, (n) => {
23154
+ return openBlock(), createElementBlock("div", {
23155
+ key: n,
23156
+ class: "ruler-rule"
23157
+ });
23158
+ }), 128))
23159
+ ])) : createCommentVNode("", true),
23160
+ $options.subStepCount ? (openBlock(), createElementBlock("div", _hoisted_10$3, [
23161
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.subStepCount, (n) => {
23162
+ return openBlock(), createElementBlock("div", {
23163
+ key: n,
23164
+ class: "ruler-sub-rule"
23165
+ });
23166
+ }), 128))
23167
+ ])) : createCommentVNode("", true),
23168
+ $props.label ? (openBlock(), createElementBlock("div", _hoisted_11$3, [
23169
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.scaleLabels, (label) => {
23170
+ return openBlock(), createElementBlock("div", {
23171
+ class: "label",
23172
+ key: label
23173
+ }, toDisplayString(label), 1);
23174
+ }), 128))
23175
+ ])) : createCommentVNode("", true)
23176
+ ], 34);
23177
+ }
23178
+ var MultiRangeSlider = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$6]]);
23179
+ const _sfc_main$i = defineComponent({
23180
+ components: { DhIcon },
23181
+ props: {
23182
+ mainText: {
23183
+ type: String,
23184
+ default: "Advanced"
23185
+ },
23186
+ filterMissingText: {
23187
+ type: String,
23188
+ default: "Filter Missing"
23189
+ },
23190
+ matchText: {
23191
+ type: String,
23192
+ default: "Match"
23193
+ },
23194
+ excludeText: {
23195
+ type: String,
23196
+ default: "Exclude"
23197
+ }
23198
+ },
23199
+ data() {
23200
+ return {
23201
+ activeFilter: false,
23202
+ isFilterMissing: false,
23203
+ isMatch: false,
23204
+ isExclude: false
23205
+ };
23206
+ },
23207
+ emits: ["match", "exclude", "filter_missing"],
23208
+ mounted() {
23209
+ this.isMatch = true;
23210
+ },
23211
+ methods: {
23212
+ toggleFilter() {
23213
+ this.activeFilter = !this.activeFilter;
23214
+ },
23215
+ matchFilter() {
23216
+ this.isMatch = true;
23217
+ this.isExclude = false;
23218
+ this.$emit("match", this.isMatch);
23219
+ },
23220
+ excludeFilter() {
23221
+ this.isMatch = false;
23222
+ this.isExclude = true;
23223
+ this.$emit("exclude", this.isExclude);
23224
+ },
23225
+ missingFilter() {
23226
+ this.isFilterMissing = !this.isFilterMissing;
23227
+ this.$emit("filter_missing", this.isFilterMissing);
23228
+ if (this.isFilterMissing && this.isMatch) {
23229
+ this.matchFilter();
23230
+ } else if (this.isFilterMissing && this.isExclude) {
23231
+ this.excludeFilter();
23232
+ }
23233
+ }
23234
+ }
23235
+ });
23236
+ const _hoisted_1$i = { class: "dh-advanced-filter-container" };
23237
+ const _hoisted_2$g = { class: "advance_section" };
23238
+ const _hoisted_3$b = { key: 0 };
23239
+ const _hoisted_4$8 = { class: "list-none" };
23240
+ const _hoisted_5$5 = ["checked"];
23241
+ const _hoisted_6$5 = ["checked"];
23242
+ const _hoisted_7$4 = ["checked"];
23243
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
23244
+ const _component_dh_icon = resolveComponent("dh-icon");
23245
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
23246
+ createElementVNode("div", _hoisted_2$g, [
23247
+ createElementVNode("span", {
23248
+ class: "toggle-icon",
23249
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleFilter())
23250
+ }, [
23251
+ createTextVNode(toDisplayString(_ctx.mainText) + " ", 1),
23252
+ createVNode(_component_dh_icon, {
23253
+ "icon-name": _ctx.activeFilter ? "arrow-up" : "arrow-down",
23254
+ size: 20
23255
+ }, null, 8, ["icon-name"])
23256
+ ]),
23257
+ _ctx.activeFilter ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
23258
+ renderSlot(_ctx.$slots, "default"),
23259
+ createElementVNode("ul", _hoisted_4$8, [
23260
+ createElementVNode("li", null, [
23261
+ createElementVNode("label", null, [
23262
+ createElementVNode("input", {
23263
+ checked: _ctx.isFilterMissing,
23264
+ name: "number_filter",
23265
+ type: "checkbox",
23266
+ onChange: _cache[1] || (_cache[1] = ($event) => _ctx.missingFilter())
23267
+ }, null, 40, _hoisted_5$5),
23268
+ createTextVNode(" " + toDisplayString(_ctx.filterMissingText), 1)
23269
+ ])
23270
+ ]),
23271
+ createElementVNode("li", null, [
23272
+ createElementVNode("label", null, [
23273
+ createElementVNode("input", {
23274
+ checked: _ctx.isMatch,
23275
+ name: "number_filter",
23276
+ type: "radio",
23277
+ onChange: _cache[2] || (_cache[2] = ($event) => _ctx.matchFilter())
23278
+ }, null, 40, _hoisted_6$5),
23279
+ createTextVNode(" " + toDisplayString(_ctx.matchText), 1)
23280
+ ]),
23281
+ createElementVNode("label", null, [
23282
+ createElementVNode("input", {
23283
+ checked: _ctx.isExclude,
23284
+ name: "number_filter",
23285
+ type: "radio",
23286
+ onChange: _cache[3] || (_cache[3] = ($event) => _ctx.excludeFilter())
23287
+ }, null, 40, _hoisted_7$4),
23288
+ createTextVNode(" " + toDisplayString(_ctx.excludeText), 1)
23289
+ ])
23290
+ ])
23291
+ ])
23292
+ ])) : createCommentVNode("", true)
23293
+ ])
23294
+ ]);
23295
+ }
23296
+ var DhAdvancedFilter = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$5]]);
23297
+ var MultiRangeSliderBarOnly = "";
23298
+ Chart.register(plugin_tooltip, BarElement, CategoryScale, LinearScale);
23299
+ const _sfc_main$h = defineComponent({
23300
+ components: { Bar, MultiRangeSlider, DhAdvancedFilter },
23301
+ props: {
23302
+ numberRange: {
23303
+ type: Array,
23304
+ default: () => [{ key: 1, count: 10 }]
23305
+ },
23306
+ width: {
23307
+ type: Number,
23308
+ default: 200
23309
+ },
23310
+ height: {
23311
+ type: Number,
23312
+ default: 50
23313
+ },
23314
+ chartId: {
23315
+ type: String,
23316
+ default: "bar-chart"
23317
+ },
23318
+ datasetIdKey: {
23319
+ type: String,
23320
+ default: "label"
23321
+ },
23322
+ steps: {
23323
+ type: Number,
23324
+ default: 1
23325
+ },
23326
+ includeForm: {
23327
+ type: Boolean,
23328
+ default: false
23329
+ }
23330
+ },
23331
+ data() {
23332
+ return {
23333
+ chartData: {
23334
+ labels: [],
23335
+ datasets: [
23336
+ {
23337
+ labels: "",
23338
+ data: [],
23339
+ backgroundColor: ["#5ea9e5"],
23340
+ borderRadius: 1,
23341
+ hoverBackgroundColor: "#e0e0e0"
23342
+ }
23343
+ ]
23344
+ },
23345
+ chartOptions: {
23346
+ responsive: true,
23347
+ plugins: {
23348
+ legend: {
23349
+ display: false
23350
+ },
23351
+ tooltip: {
23352
+ enabled: false
23353
+ }
23354
+ },
23355
+ scales: {
23356
+ x: {
23357
+ display: false,
23358
+ grid: {
23359
+ display: false
23360
+ },
23361
+ ticks: {
23362
+ display: true
23363
+ }
23364
+ },
23365
+ y: {
23366
+ display: false,
23367
+ grid: {
23368
+ display: false
23369
+ },
23370
+ ticks: {
23371
+ display: false
23372
+ }
23373
+ }
23374
+ }
23375
+ },
23376
+ chartLines: {},
23377
+ min: "1",
23378
+ max: this.maxNumber(this.numberRange),
23379
+ rangeMax: this.numberRange.length,
23380
+ chart_dta: [],
23381
+ BarMinValue: 1,
23382
+ BarMaxValue: this.numberRange.length,
23383
+ activeFilter: false,
23384
+ validated: false,
23385
+ isMatch: false,
23386
+ isExclude: false,
23387
+ isDisable: false,
23388
+ labels: []
23389
+ };
23390
+ },
23391
+ mounted() {
23392
+ this.isMatch = true;
23393
+ this.setChartData(this.numberRange);
23394
+ this.highlightChart();
23395
+ this.labels = [this.BarMinValue, this.max];
23396
+ },
23397
+ methods: {
23398
+ matchFilter() {
23399
+ if (!this.isDisable) {
23400
+ this.isMatch = true;
23401
+ this.isExclude = false;
23402
+ var data = this.chartData.datasets[0].data;
23403
+ this.chartLines = this.chartData.datasets[0];
23404
+ this.chartData.datasets[0].backgroundColor = [];
23405
+ for (let i2 = 0; i2 <= data.length; i2++) {
23406
+ if (data[i2] >= this.min && data[i2] <= this.max) {
23407
+ this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
23408
+ } else {
23409
+ this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23410
+ }
23411
+ }
23412
+ }
23413
+ },
23414
+ excludeFilter() {
23415
+ if (!this.isDisable) {
23416
+ this.isMatch = false;
23417
+ this.isExclude = true;
23418
+ var data = this.chartData.datasets[0].data;
23419
+ this.chartLines = this.chartData.datasets[0];
23420
+ this.chartData.datasets[0].backgroundColor = [];
23421
+ for (let i2 = 0; i2 < data.length; i2++) {
23422
+ if (data[i2] >= this.min && data[i2] <= this.max) {
23423
+ this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23424
+ } else {
23425
+ this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
23426
+ }
23427
+ }
23428
+ }
23429
+ },
23430
+ missingFilter() {
23431
+ this.isDisable = !this.isDisable;
23432
+ this.validated = !this.validated;
23433
+ var data = this.chartData.datasets[0].data;
23434
+ this.chartLines = this.chartData.datasets[0];
23435
+ this.chartData.datasets[0].backgroundColor = [];
23436
+ if (this.validated) {
23437
+ for (let i2 = 1; i2 <= data.length; i2++) {
23438
+ this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23439
+ }
23440
+ } else {
23441
+ if (this.isMatch) {
23442
+ this.matchFilter();
23443
+ }
23444
+ if (this.isExclude) {
23445
+ this.excludeFilter();
23446
+ }
23447
+ }
23448
+ },
23449
+ changeMin(e2) {
23450
+ let minValue = e2.target.value;
23451
+ this.min = minValue ? minValue : "1";
23452
+ this.BarMinValue = minValue ? this.getFirstIndex(parseInt(minValue)) : 1;
23453
+ if (this.isMatch && !this.isDisable) {
23454
+ this.matchFilter();
23455
+ }
23456
+ if (this.isExclude && !this.isDisable) {
23457
+ this.excludeFilter();
23458
+ }
23459
+ },
23460
+ changeMax(e2) {
23461
+ let maxValue = e2.target.value;
23462
+ this.BarMaxValue = maxValue && maxValue > this.maxNumber(this.numberRange) ? this.numberRange.length : this.getLastIndex(parseInt(maxValue));
23463
+ this.max = maxValue && maxValue > this.maxNumber(this.numberRange) ? this.maxNumber(this.numberRange) : maxValue;
23464
+ if (this.isMatch && !this.isDisable) {
23465
+ this.matchFilter();
23466
+ }
23467
+ if (this.isExclude && !this.isDisable) {
23468
+ this.excludeFilter();
23469
+ }
23470
+ },
23471
+ setChartData(chart_data) {
23472
+ chart_data = this.sortData(chart_data);
23473
+ this.removeChartData();
23474
+ let key = this.chartData.labels;
23475
+ for (let j = 0; j < chart_data.length; j++) {
23476
+ key.push(chart_data[j].key);
23477
+ this.chart_dta.push(chart_data[j].count);
23478
+ }
23479
+ this.chartData.datasets[0].data = this.chart_dta;
23480
+ },
23481
+ highlightChart() {
23482
+ var data = this.chartData.datasets[0].data;
23483
+ this.chartLines = this.chartData.datasets[0];
23484
+ this.chartData.datasets[0].backgroundColor = [];
23485
+ for (let i2 = 0; i2 <= data.length; i2++) {
23486
+ if (data[i2] >= this.min && data[i2] <= this.max) {
23487
+ this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
23488
+ } else {
23489
+ this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23490
+ }
23491
+ }
23492
+ },
23493
+ updateBarChart(e2) {
23494
+ const { minValue, maxValue } = e2;
23495
+ this.BarMinValue = minValue;
23496
+ this.BarMaxValue = maxValue;
23497
+ var data = this.chartData.datasets[0].data;
23498
+ this.min = data[this.BarMinValue] ? data[this.BarMinValue] : "1";
23499
+ this.max = data[this.BarMaxValue] ? data[this.BarMaxValue] : this.max;
23500
+ if (this.isMatch && !this.isDisable) {
23501
+ this.matchFilter();
23502
+ }
23503
+ if (this.isExclude && !this.isDisable) {
23504
+ this.excludeFilter();
23505
+ }
23506
+ },
23507
+ toggleFilter() {
23508
+ this.activeFilter = !this.activeFilter;
23509
+ },
23510
+ removeChartData() {
23511
+ this.chartData.labels = [];
23512
+ this.chartData.datasets[0].data = [];
23513
+ this.chart_dta = [];
23514
+ },
23515
+ sortData(arr) {
23516
+ return arr.slice().sort(function(a3, b2) {
23517
+ return a3.count - b2.count;
23518
+ });
23519
+ },
23520
+ maxNumber(arr) {
23521
+ if (arr.length == 0)
23522
+ return;
23523
+ return arr.reduce((acc, shot) => acc = acc > shot.count ? acc : shot.count, 0);
23524
+ },
23525
+ getLastIndex(index) {
23526
+ let data = this.chartData.datasets[0].data;
23527
+ let indexVal = 0;
23528
+ for (let i2 = index; i2 >= 0; i2--) {
23529
+ if (data.lastIndexOf(i2) !== -1) {
23530
+ indexVal = data.lastIndexOf(i2);
23531
+ break;
23532
+ } else {
23533
+ continue;
23534
+ }
23535
+ }
23536
+ return indexVal;
23537
+ },
23538
+ getFirstIndex(index) {
23539
+ let data = this.chartData.datasets[0].data;
23540
+ let indexVal = 0;
23541
+ for (let i2 = index; i2 <= this.max; i2++) {
23542
+ if (data.lastIndexOf(i2) !== -1) {
23543
+ indexVal = data.lastIndexOf(i2);
23544
+ break;
23545
+ } else {
23546
+ continue;
23547
+ }
23548
+ }
23549
+ return indexVal;
23550
+ }
23551
+ }
23552
+ });
23553
+ const _hoisted_1$h = { class: "dh-range-container" };
23554
+ const _hoisted_2$f = { class: "bar-chart" };
23555
+ const _hoisted_3$a = {
23556
+ key: 0,
23557
+ class: "input-group-section"
23558
+ };
23559
+ const _hoisted_4$7 = { class: "input-group sb-input" };
23560
+ const _hoisted_5$4 = ["disabled", "max", "value"];
23561
+ const _hoisted_6$4 = { class: "input-group sb-input" };
23562
+ const _hoisted_7$3 = ["disabled", "max", "min", "value"];
23563
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
23564
+ const _component_Bar = resolveComponent("Bar");
23565
+ const _component_MultiRangeSlider = resolveComponent("MultiRangeSlider");
23566
+ const _component_dh_advanced_filter = resolveComponent("dh-advanced-filter");
23567
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
23568
+ createElementVNode("div", _hoisted_2$f, [
23569
+ createVNode(_component_Bar, {
23570
+ "chart-data": _ctx.chartData,
23571
+ "chart-id": _ctx.chartId,
23572
+ "chart-options": _ctx.chartOptions,
23573
+ "dataset-id-key": _ctx.datasetIdKey,
23574
+ height: _ctx.height,
23575
+ width: _ctx.width
23576
+ }, null, 8, ["chart-data", "chart-id", "chart-options", "dataset-id-key", "height", "width"]),
23577
+ createVNode(_component_MultiRangeSlider, {
23578
+ "base-class-name": `multi-range-slider range-slider ${_ctx.isDisable}`,
23579
+ label: true,
23580
+ labels: _ctx.labels,
23581
+ max: _ctx.rangeMax,
23582
+ "max-caption": `${_ctx.max}`,
23583
+ "max-value": _ctx.BarMaxValue,
23584
+ min: 1,
23585
+ "min-caption": `${_ctx.min}`,
23586
+ "min-value": _ctx.BarMinValue,
23587
+ "range-margin": 0,
23588
+ ruler: false,
23589
+ step: _ctx.steps,
23590
+ onInput: _ctx.updateBarChart
23591
+ }, null, 8, ["base-class-name", "labels", "max", "max-caption", "max-value", "min-caption", "min-value", "step", "onInput"])
23592
+ ]),
23593
+ _ctx.includeForm ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
23594
+ createElementVNode("div", _hoisted_4$7, [
23595
+ createElementVNode("label", {
23596
+ class: normalizeClass(`text-2 input-to ${_ctx.validated ? "disable" : ""}`)
23597
+ }, " From ", 2),
23598
+ createElementVNode("input", {
23599
+ class: "form-input text",
23600
+ disabled: _ctx.validated ? true : false,
23601
+ max: `${_ctx.max}`,
23602
+ min: "1",
23603
+ placeholder: "From",
23604
+ type: "number",
23605
+ value: `${_ctx.min}`,
23606
+ onInput: _cache[0] || (_cache[0] = ($event) => _ctx.changeMin($event))
23607
+ }, null, 40, _hoisted_5$4)
23608
+ ]),
23609
+ createElementVNode("div", _hoisted_6$4, [
23610
+ createElementVNode("label", {
23611
+ class: normalizeClass(`text-2 input-to ${_ctx.validated ? "disable" : ""}`)
23612
+ }, " To ", 2),
23613
+ createElementVNode("input", {
23614
+ class: "form-input text",
23615
+ disabled: _ctx.validated ? true : false,
23616
+ max: `${_ctx.maxNumber(_ctx.numberRange)}`,
23617
+ min: `${_ctx.min}`,
23618
+ placeholder: "To",
23619
+ type: "number",
23620
+ value: `${_ctx.max}`,
23621
+ onInput: _cache[1] || (_cache[1] = ($event) => _ctx.changeMax($event))
23622
+ }, null, 40, _hoisted_7$3)
23623
+ ])
23624
+ ])) : createCommentVNode("", true),
23625
+ renderSlot(_ctx.$slots, "input"),
23626
+ createVNode(_component_dh_advanced_filter, {
23627
+ onExclude: _ctx.excludeFilter,
23628
+ onFilter_missing: _ctx.missingFilter,
23629
+ onMatch: _ctx.matchFilter
23630
+ }, {
23631
+ default: withCtx(() => [
23632
+ renderSlot(_ctx.$slots, "filter")
23633
+ ]),
23634
+ _: 3
23635
+ }, 8, ["onExclude", "onFilter_missing", "onMatch"])
23636
+ ]);
23637
+ }
23638
+ var DhNumberRange = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$4]]);
23639
+ var main = "";
23640
+ var AdvancedDatePicker_vue_vue_type_style_index_0_lang = "";
23641
+ const _hoisted_1$g = { id: "dp-container" };
23642
+ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("div", { class: "dp__calendar_range" }, [
23643
+ /* @__PURE__ */ createElementVNode("p", null, "From"),
23644
+ /* @__PURE__ */ createElementVNode("p", null, "To")
23645
+ ], -1);
23646
+ const _hoisted_3$9 = { class: "dp__multi" };
23647
+ const _hoisted_4$6 = ["value"];
23648
+ const _hoisted_5$3 = ["value"];
23649
+ const _hoisted_6$3 = /* @__PURE__ */ createTextVNode(" Back ");
23650
+ const _hoisted_7$2 = ["onClick"];
23651
+ const _hoisted_8$2 = ["onClick"];
23652
+ const _hoisted_9$2 = ["onClick"];
23653
+ const _hoisted_10$2 = ["onClick"];
23654
+ const _hoisted_11$2 = ["onClick"];
23655
+ const _hoisted_12$2 = ["onClick"];
23656
+ const _hoisted_13$2 = ["onClick"];
23657
+ const _hoisted_14$2 = ["onClick"];
23658
+ const _hoisted_15$2 = /* @__PURE__ */ createElementVNode("div", {
23659
+ id: "tags",
23660
+ class: "dp__calendar_tags"
23661
+ }, null, -1);
23662
+ const _sfc_main$g = {
23663
+ __name: "AdvancedDatePicker",
23664
+ props: {
23665
+ numberRange: {
23666
+ type: Array,
23667
+ required: true
23668
+ }
23669
+ },
23670
+ emits: ["update"],
23671
+ setup(__props, { emit }) {
23672
+ const date = ref(["", ""]);
23673
+ const maxDate = ref(null);
23674
+ const minDate = ref(null);
23675
+ const datePicker = ref(null);
23676
+ const time = ref(false);
23677
+ const presetRanges = ref([
23678
+ { label: "Today", range: [new Date(), new Date()], slot: "today" },
23679
+ {
23680
+ label: "Previous week",
23681
+ range: [
23682
+ previousSunday(previousSaturday(new Date())),
23683
+ previousSaturday(new Date())
23684
+ ],
23685
+ slot: "previousWeek"
23298
23686
  },
23299
- datasetIdKey: {
23300
- type: String,
23301
- default: "label"
23687
+ {
23688
+ label: "This week",
23689
+ range: [previousSunday(new Date()), lastDayOfWeek(new Date())],
23690
+ slot: "week"
23302
23691
  },
23303
- chartId: {
23304
- type: String,
23305
- default: chartId
23692
+ {
23693
+ label: "Next week",
23694
+ range: [
23695
+ nextSunday(new Date()),
23696
+ nextSaturday(new Date().setDate(new Date().getDate() + 7))
23697
+ ],
23698
+ slot: "nextWeek"
23306
23699
  },
23307
- width: {
23308
- type: Number,
23309
- default: 400
23700
+ {
23701
+ label: "This month",
23702
+ range: [startOfMonth(new Date()), endOfMonth(new Date())],
23703
+ slot: "currentMonth"
23310
23704
  },
23311
- height: {
23312
- type: Number,
23313
- default: 400
23705
+ {
23706
+ label: "Previous month",
23707
+ range: [
23708
+ startOfMonth(subMonths(new Date(), 1)),
23709
+ endOfMonth(subMonths(new Date(), 1))
23710
+ ],
23711
+ slot: "previousMonth"
23314
23712
  },
23315
- cssClasses: {
23316
- type: String,
23317
- default: ""
23713
+ {
23714
+ label: "Last 3 months",
23715
+ range: [
23716
+ startOfMonth(subMonths(new Date(), 3)),
23717
+ endOfMonth(subMonths(new Date(), 1))
23718
+ ],
23719
+ slot: "threeMonths"
23318
23720
  },
23319
- styles: {
23320
- type: Object,
23321
- default: () => {
23322
- }
23721
+ {
23722
+ label: "Last 6 months",
23723
+ range: [
23724
+ startOfMonth(subMonths(new Date(), 6)),
23725
+ endOfMonth(subMonths(new Date(), 1))
23726
+ ],
23727
+ slot: "sixMonths"
23323
23728
  },
23324
- plugins: {
23325
- type: Array,
23326
- default: () => []
23327
- }
23328
- },
23329
- setup(props, context) {
23330
- Chart.register(chartController);
23331
- const _chart = shallowRef(null);
23332
- const canvasEl = ref(null);
23333
- function renderChart(data, options) {
23334
- if (_chart.value !== null) {
23335
- chartDestroy(toRaw(_chart.value), context);
23336
- }
23337
- if (canvasEl.value === null) {
23338
- throw new Error(templateError);
23339
- } else {
23340
- const chartData = getChartData(data, props.datasetIdKey);
23341
- const canvasEl2DContext = canvasEl.value.getContext("2d");
23342
- if (canvasEl2DContext !== null) {
23343
- _chart.value = new Chart(canvasEl2DContext, {
23344
- type: chartType,
23345
- data: isProxy(data) ? new Proxy(chartData, {}) : chartData,
23346
- options,
23347
- plugins: props.plugins
23348
- });
23349
- }
23350
- }
23351
- }
23352
- function chartDataHandler(newValue, oldValue) {
23353
- const newData = isProxy(newValue) ? toRaw(newValue) : {
23354
- ...newValue
23355
- };
23356
- const oldData = isProxy(oldValue) ? toRaw(oldValue) : {
23357
- ...oldValue
23358
- };
23359
- if (Object.keys(oldData).length > 0) {
23360
- const chart = toRaw(_chart.value);
23361
- const isEqualLabelsAndDatasetsLength = compareData(newData, oldData);
23362
- if (isEqualLabelsAndDatasetsLength && chart !== null) {
23363
- setChartDatasets(chart === null || chart === void 0 ? void 0 : chart.data, newData, props.datasetIdKey);
23364
- if (newData.labels !== void 0) {
23365
- setChartLabels(chart, newData.labels, context);
23366
- }
23367
- updateChart();
23368
- } else {
23369
- if (chart !== null) {
23370
- chartDestroy(chart, context);
23371
- }
23372
- chartCreate(renderChart, props.chartData, props.chartOptions, context);
23373
- }
23374
- } else {
23375
- if (_chart.value !== null) {
23376
- chartDestroy(toRaw(_chart.value), context);
23377
- }
23378
- chartCreate(renderChart, props.chartData, props.chartOptions, context);
23379
- }
23380
- }
23381
- function chartOptionsHandler(options) {
23382
- const chart = toRaw(_chart.value);
23383
- if (chart !== null) {
23384
- setChartOptions(chart, options);
23385
- updateChart();
23386
- } else {
23387
- chartCreate(renderChart, props.chartData, props.chartOptions, context);
23388
- }
23389
- }
23390
- function updateChart() {
23391
- const chart = toRaw(_chart.value);
23392
- if (chart !== null) {
23393
- chartUpdate(chart, context);
23394
- } else {
23395
- console.error(chartUpdateError);
23396
- }
23729
+ {
23730
+ label: "Last year",
23731
+ range: [startOfYear(new Date()), endOfYear(new Date())],
23732
+ slot: "yearly"
23397
23733
  }
23398
- watch(() => props.chartData, (newValue, oldValue) => chartDataHandler(newValue, oldValue), {
23399
- deep: true
23400
- });
23401
- watch(() => props.chartOptions, (newValue) => chartOptionsHandler(newValue), {
23402
- deep: true
23403
- });
23404
- onMounted(() => {
23405
- if ("datasets" in props.chartData && props.chartData.datasets.length > 0) {
23406
- chartCreate(renderChart, props.chartData, props.chartOptions, context);
23407
- }
23408
- });
23409
- onBeforeUnmount(() => {
23410
- if (_chart.value !== null) {
23411
- chartDestroy(toRaw(_chart.value), context);
23412
- }
23413
- });
23414
- context.expose({
23415
- chart: _chart,
23416
- updateChart
23417
- });
23418
- return () => h("div", {
23419
- style: props.styles,
23420
- class: props.cssClasses
23421
- }, [
23422
- h("canvas", {
23423
- id: props.chartId,
23424
- width: props.width,
23425
- height: props.height,
23426
- ref: canvasEl
23427
- })
23428
- ]);
23734
+ ]);
23735
+ const handleDate = (modelData) => {
23736
+ date.value = modelData;
23737
+ console.log(date.value);
23738
+ emit("update", date.value);
23739
+ };
23740
+ function changeFirstDate(e2) {
23741
+ minDate.value = e2.target.value;
23742
+ date.value = [e2.target.value, maxDate.value];
23429
23743
  }
23430
- });
23744
+ function changeSecondDate(e2) {
23745
+ maxDate.value = e2.target.value;
23746
+ date.value = [minDate.value, e2.target.value];
23747
+ }
23748
+ onMounted(() => {
23749
+ datePicker.value.openMenu();
23750
+ });
23751
+ function reOpen() {
23752
+ datePicker.value.openMenu();
23753
+ }
23754
+ return (_ctx, _cache) => {
23755
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
23756
+ _hoisted_2$e,
23757
+ createVNode(unref(ca), {
23758
+ ref_key: "datePicker",
23759
+ ref: datePicker,
23760
+ modelValue: date.value,
23761
+ "onUpdate:modelValue": [
23762
+ _cache[2] || (_cache[2] = ($event) => date.value = $event),
23763
+ handleDate
23764
+ ],
23765
+ "auto-apply": "",
23766
+ "day-names": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
23767
+ "enable-time-picker": false,
23768
+ "multi-calendars": "",
23769
+ "multi-calendars-solo": "",
23770
+ "multi-static": false,
23771
+ offset: 12,
23772
+ position: "left",
23773
+ "preset-ranges": presetRanges.value,
23774
+ range: "",
23775
+ "select-text": "Apply",
23776
+ "text-input": "",
23777
+ uid: "advanced",
23778
+ onClosed: reOpen
23779
+ }, {
23780
+ "dp-input": withCtx(() => [
23781
+ createElementVNode("div", _hoisted_3$9, [
23782
+ createElementVNode("input", {
23783
+ class: "dp__input dp__multi_input",
23784
+ placeholder: "MM/DD/YYYY",
23785
+ type: "text",
23786
+ value: minDate.value ? minDate.value : date.value[0],
23787
+ onInput: _cache[0] || (_cache[0] = ($event) => changeFirstDate($event))
23788
+ }, null, 40, _hoisted_4$6),
23789
+ createElementVNode("input", {
23790
+ class: "dp__input dp__multi_input",
23791
+ placeholder: "MM/DD/YYYY",
23792
+ type: "text",
23793
+ value: maxDate.value ? maxDate.value : date.value[1],
23794
+ onInput: _cache[1] || (_cache[1] = ($event) => changeSecondDate($event))
23795
+ }, null, 40, _hoisted_5$3)
23796
+ ])
23797
+ ]),
23798
+ "arrow-left": withCtx(() => [
23799
+ createVNode(DhIcon, {
23800
+ "icon-name": "previous",
23801
+ size: 20
23802
+ })
23803
+ ]),
23804
+ "arrow-right": withCtx(() => [
23805
+ createVNode(DhIcon, {
23806
+ "icon-name": "next",
23807
+ size: 20
23808
+ })
23809
+ ]),
23810
+ "calendar-icon": withCtx(() => [
23811
+ _hoisted_6$3
23812
+ ]),
23813
+ "clear-icon": withCtx(() => []),
23814
+ "action-preview": withCtx(() => []),
23815
+ "action-select": withCtx(() => []),
23816
+ previousWeek: withCtx(({ label, range, presetDateRange }) => [
23817
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23818
+ createElementVNode("span", {
23819
+ onClick: ($event) => presetDateRange(range)
23820
+ }, toDisplayString(label), 9, _hoisted_7$2)
23821
+ ]))
23822
+ ]),
23823
+ week: withCtx(({ label, range, presetDateRange }) => [
23824
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23825
+ createElementVNode("span", {
23826
+ onClick: ($event) => presetDateRange(range)
23827
+ }, toDisplayString(label), 9, _hoisted_8$2)
23828
+ ]))
23829
+ ]),
23830
+ nextWeek: withCtx(({ label, range, presetDateRange }) => [
23831
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23832
+ createElementVNode("span", {
23833
+ onClick: ($event) => presetDateRange(range)
23834
+ }, toDisplayString(label), 9, _hoisted_9$2)
23835
+ ]))
23836
+ ]),
23837
+ currentMonth: withCtx(({ label, range, presetDateRange }) => [
23838
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23839
+ createElementVNode("span", {
23840
+ onClick: ($event) => presetDateRange(range)
23841
+ }, toDisplayString(label), 9, _hoisted_10$2)
23842
+ ]))
23843
+ ]),
23844
+ previousMonth: withCtx(({ label, range, presetDateRange }) => [
23845
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23846
+ createElementVNode("span", {
23847
+ onClick: ($event) => presetDateRange(range)
23848
+ }, toDisplayString(label), 9, _hoisted_11$2)
23849
+ ]))
23850
+ ]),
23851
+ threeMonths: withCtx(({ label, range, presetDateRange }) => [
23852
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23853
+ createElementVNode("span", {
23854
+ onClick: ($event) => presetDateRange(range)
23855
+ }, toDisplayString(label), 9, _hoisted_12$2)
23856
+ ]))
23857
+ ]),
23858
+ sixMonths: withCtx(({ label, range, presetDateRange }) => [
23859
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23860
+ createElementVNode("span", {
23861
+ onClick: ($event) => presetDateRange(range)
23862
+ }, toDisplayString(label), 9, _hoisted_13$2)
23863
+ ]))
23864
+ ]),
23865
+ yearly: withCtx(({ label, range, presetDateRange }) => [
23866
+ (openBlock(), createBlock(Teleport, { to: "#tags" }, [
23867
+ createElementVNode("span", {
23868
+ onClick: ($event) => presetDateRange(range)
23869
+ }, toDisplayString(label), 9, _hoisted_14$2)
23870
+ ]))
23871
+ ]),
23872
+ _: 1
23873
+ }, 8, ["modelValue", "preset-ranges"]),
23874
+ createVNode(DhNumberRange, {
23875
+ class: "dp__calendar_range_number",
23876
+ "number-range": __props.numberRange,
23877
+ steps: 1
23878
+ }, {
23879
+ input: withCtx(() => [
23880
+ _hoisted_15$2
23881
+ ]),
23882
+ filter: withCtx(() => [
23883
+ createVNode(DhSwitch, {
23884
+ data: time.value,
23885
+ label: "Include time",
23886
+ onChange: _cache[3] || (_cache[3] = (val) => time.value = val)
23887
+ }, null, 8, ["data"])
23888
+ ]),
23889
+ _: 1
23890
+ }, 8, ["number-range"])
23891
+ ]);
23892
+ };
23893
+ }
23431
23894
  };
23432
- const Bar = /* @__PURE__ */ generateChart("bar-chart", "bar", BarController);
23433
- var MultiRangeSlider_vue_vue_type_style_index_0_lang = "";
23434
- const _sfc_main$d = {
23435
- name: "MultiRangeSlider",
23895
+ var DatePicker_vue_vue_type_style_index_0_lang = "";
23896
+ const _hoisted_1$f = /* @__PURE__ */ createTextVNode(" Back ");
23897
+ const _hoisted_2$d = /* @__PURE__ */ createElementVNode("div", null, "today", -1);
23898
+ const _sfc_main$f = {
23899
+ __name: "DatePicker",
23436
23900
  props: {
23437
- baseClassName: {
23438
- type: String,
23439
- default: "multi-range-slider"
23440
- },
23441
- min: { type: Number },
23442
- max: { type: Number },
23443
- minValue: { type: Number },
23444
- maxValue: { type: Number },
23445
- step: { type: Number, default: 1 },
23446
- preventWheel: { type: Boolean, default: false },
23447
- ruler: { type: Boolean, default: true },
23448
- label: { type: Boolean, default: true },
23449
- labels: { type: Array },
23450
- minCaption: { type: String },
23451
- maxCaption: { type: String },
23452
- rangeMargin: { type: Number }
23453
- },
23454
- data() {
23455
- let _labels = this.labels || [];
23456
- let _minimum = this.min === void 0 ? 0 : this.min;
23457
- let max = _labels.length ? _labels.length - 1 : 100;
23458
- let _maximum = this.max === void 0 ? max : this.max;
23459
- let _minValue = this.minValue === void 0 ? 25 : this.minValue;
23460
- if (_labels.length && this.minValue === void 0) {
23461
- _minValue = 1;
23462
- }
23463
- let _maxValue = this.maxValue || 75;
23464
- if (_labels.length && this.maxValue === void 0) {
23465
- _maxValue = _labels.length - 2;
23466
- }
23467
- if (_maximum <= _minimum) {
23468
- throw new Error("Invalid props min or max");
23469
- }
23470
- if (_minValue > _maxValue) {
23471
- throw new Error("Invalid props minValue or maxValue");
23901
+ inline: {
23902
+ type: Boolean,
23903
+ default: true
23472
23904
  }
23473
- let _rangeMargin = this.rangeMargin === void 0 ? this.step : this.rangeMargin;
23474
- let m3 = _rangeMargin % this.step;
23475
- m3 && (_rangeMargin = _rangeMargin + this.step - m3);
23476
- return {
23477
- valueMin: _minValue < _minimum ? _minimum : _minValue,
23478
- valueMax: _maxValue > _maximum ? _maximum : _maxValue,
23479
- interVal: null,
23480
- startX: null,
23481
- mouseMoveCounter: null,
23482
- barBox: null,
23483
- barValue: 0,
23484
- rangeMarginValue: _rangeMargin
23485
- };
23486
23905
  },
23487
- methods: {
23488
- onBarLeftClick() {
23489
- if (this.valueMin - this.step >= this.minimum) {
23490
- this.valueMin -= this.step;
23491
- } else {
23492
- this.valueMin = this.minimum;
23493
- }
23494
- },
23495
- onInnerBarLeftClick() {
23496
- if (this.valueMin + this.rangeMarginValue < this.valueMax) {
23497
- this.valueMin += this.step;
23498
- }
23499
- },
23500
- onBarRightClick() {
23501
- if (this.valueMax + this.step <= this.maximum) {
23502
- this.valueMax += this.step;
23503
- } else {
23504
- this.valueMax = this.maximum;
23505
- }
23506
- },
23507
- onInnerBarRightClick() {
23508
- if (this.valueMax - this.rangeMarginValue > this.valueMin) {
23509
- this.valueMax -= this.step;
23510
- }
23511
- },
23512
- onInputMinChange(e2) {
23513
- let val = parseFloat(e2.target.value);
23514
- if (val <= this.valueMax - this.rangeMarginValue && val >= this.minimum) {
23515
- this.valueMin = val;
23516
- } else {
23517
- e2.target.value = this.valueMin;
23518
- }
23519
- },
23520
- onInputMaxChange(e2) {
23521
- let val = parseFloat(e2.target.value);
23522
- if (val >= this.valueMin + this.rangeMarginValue && val <= this.maximum) {
23523
- this.valueMax = val;
23524
- } else {
23525
- e2.target.value = this.valueMax;
23526
- }
23527
- },
23528
- onLeftThumbMousedown(e2) {
23529
- e2.preventDefault();
23530
- this.startX = e2.clientX;
23531
- if (e2.type === "touchstart") {
23532
- if (e2.touches.length === 1) {
23533
- this.startX = e2.touches[0].clientX;
23534
- } else {
23535
- return;
23536
- }
23537
- }
23538
- this.mouseMoveCounter = 0;
23539
- this.barValue = this.valueMin;
23540
- this.barBox = e2.target.parentNode.getBoundingClientRect();
23541
- document.addEventListener("mousemove", this.onLeftThumbMousemove);
23542
- document.addEventListener("mouseup", this.onLeftThumbMouseup);
23543
- document.addEventListener("touchmove", this.onLeftThumbMousemove);
23544
- document.addEventListener("touchend", this.onLeftThumbMouseup);
23545
- },
23546
- onLeftThumbMousemove(e2) {
23547
- this.mouseMoveCounter++;
23548
- let clientX = e2.clientX;
23549
- if (e2.type === "touchmove") {
23550
- clientX = e2.touches[0].clientX;
23551
- }
23552
- let dx = clientX - this.startX;
23553
- let per = dx / this.barBox.width;
23554
- let val = this.barValue + (this.maximum - this.minimum) * per;
23555
- let mod = val % this.step;
23556
- val -= mod;
23557
- if (val < this.minimum) {
23558
- val = this.minimum;
23559
- } else if (val > this.valueMax - this.rangeMarginValue) {
23560
- val = this.valueMax - this.rangeMarginValue;
23906
+ emits: ["update"],
23907
+ setup(__props, { emit }) {
23908
+ const date = ref();
23909
+ const datePicker = ref(null);
23910
+ const handleDate = (modelData) => {
23911
+ date.value = modelData;
23912
+ emit("update", date.value);
23913
+ };
23914
+ const markers = ref([
23915
+ {
23916
+ date: addDays(new Date(), 0),
23917
+ type: "dot",
23918
+ tooltip: [{ text: "Dot with tooltip", color: "blue" }]
23561
23919
  }
23562
- this.valueMin = val;
23563
- },
23564
- onLeftThumbMouseup() {
23565
- document.removeEventListener("mousemove", this.onLeftThumbMousemove);
23566
- document.removeEventListener("mouseup", this.onLeftThumbMouseup);
23567
- document.removeEventListener("touchmove", this.onLeftThumbMousemove);
23568
- document.removeEventListener("touchend", this.onLeftThumbMouseup);
23920
+ ]);
23921
+ return (_ctx, _cache) => {
23922
+ return openBlock(), createElementBlock("div", null, [
23923
+ createVNode(unref(ca), {
23924
+ ref_key: "datePicker",
23925
+ ref: datePicker,
23926
+ modelValue: date.value,
23927
+ "onUpdate:modelValue": [
23928
+ _cache[0] || (_cache[0] = ($event) => date.value = $event),
23929
+ handleDate
23930
+ ],
23931
+ "day-names": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
23932
+ "enable-time-picker": false,
23933
+ inline: __props.inline,
23934
+ markers: markers.value,
23935
+ "month-name-format": "short",
23936
+ offset: 12,
23937
+ placeholder: "MM/DD/YYYY",
23938
+ "select-text": "Apply",
23939
+ "text-input": "",
23940
+ uid: "base"
23941
+ }, {
23942
+ "arrow-left": withCtx(() => [
23943
+ createVNode(DhIcon, {
23944
+ "icon-name": "previous",
23945
+ size: 20
23946
+ })
23947
+ ]),
23948
+ "arrow-right": withCtx(() => [
23949
+ createVNode(DhIcon, {
23950
+ "icon-name": "next",
23951
+ size: 20
23952
+ })
23953
+ ]),
23954
+ "calendar-icon": withCtx(() => [
23955
+ _hoisted_1$f
23956
+ ]),
23957
+ "clear-icon": withCtx(() => []),
23958
+ "action-preview": withCtx(() => []),
23959
+ "marker-tooltip": withCtx(() => [
23960
+ _hoisted_2$d
23961
+ ]),
23962
+ _: 1
23963
+ }, 8, ["modelValue", "inline", "markers"])
23964
+ ]);
23965
+ };
23966
+ }
23967
+ };
23968
+ var Error_vue_vue_type_style_index_0_lang = "";
23969
+ const _hoisted_1$e = {
23970
+ key: 0,
23971
+ class: "invalid-feedback"
23972
+ };
23973
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
23974
+ __name: "Error",
23975
+ props: {
23976
+ errors: {
23977
+ type: Object,
23978
+ required: false,
23979
+ default: void 0
23980
+ }
23981
+ },
23982
+ setup(__props) {
23983
+ const props = __props;
23984
+ return (_ctx, _cache) => {
23985
+ var _a;
23986
+ return unref(props).errors && ((_a = unref(props).errors) == null ? void 0 : _a.length) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
23987
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.errors, (error) => {
23988
+ return openBlock(), createElementBlock("span", { key: error }, toDisplayString(error), 1);
23989
+ }), 128))
23990
+ ])) : createCommentVNode("", true);
23991
+ };
23992
+ }
23993
+ });
23994
+ var FileUpload_vue_vue_type_style_index_0_lang = "";
23995
+ const _hoisted_1$d = /* @__PURE__ */ createElementVNode("label", { for: "upload_pdf" }, [
23996
+ /* @__PURE__ */ createTextVNode(" Drag and drop file or "),
23997
+ /* @__PURE__ */ createElementVNode("span", { id: "upload" }, "browse")
23998
+ ], -1);
23999
+ const _hoisted_2$c = {
24000
+ key: 1,
24001
+ class: "file__upload_items"
24002
+ };
24003
+ const _hoisted_3$8 = { class: "file__upload_list_item" };
24004
+ const _hoisted_4$5 = { class: "file__upload_list_item_label" };
24005
+ const _hoisted_5$2 = ["title"];
24006
+ const _hoisted_6$2 = {
24007
+ key: 0,
24008
+ class: "label__antivirus"
24009
+ };
24010
+ const _hoisted_7$1 = {
24011
+ key: 1,
24012
+ class: "label__antivirus label__antivirus--failed"
24013
+ };
24014
+ const _hoisted_8$1 = {
24015
+ key: 2,
24016
+ class: "label__antivirus label__antivirus--detected"
24017
+ };
24018
+ const _hoisted_9$1 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
24019
+ const _hoisted_10$1 = { key: 3 };
24020
+ const _hoisted_11$1 = { key: 4 };
24021
+ const _hoisted_12$1 = { key: 0 };
24022
+ const _hoisted_13$1 = ["value"];
24023
+ const _hoisted_14$1 = ["href"];
24024
+ const _hoisted_15$1 = {
24025
+ key: 2,
24026
+ class: "file__upload_placeholder"
24027
+ };
24028
+ const _hoisted_16$1 = {
24029
+ key: 3,
24030
+ class: "file__upload_action"
24031
+ };
24032
+ const _hoisted_17$1 = /* @__PURE__ */ createElementVNode("button", { class: "file__upload_action_cancel" }, "Cancel", -1);
24033
+ const _sfc_main$d = {
24034
+ __name: "FileUpload",
24035
+ props: {
24036
+ uploadProgress: {
24037
+ type: Array,
24038
+ required: true
23569
24039
  },
23570
- onRightThumbMousedown(e2) {
23571
- e2.preventDefault();
23572
- this.startX = e2.clientX;
23573
- if (e2.type === "touchstart") {
23574
- if (e2.touches.length === 1) {
23575
- this.startX = e2.touches[0].clientX;
23576
- } else {
23577
- return;
23578
- }
23579
- }
23580
- this.mouseMoveCounter = 0;
23581
- this.barValue = this.valueMax;
23582
- this.barBox = e2.target.parentNode.getBoundingClientRect();
23583
- document.addEventListener("mousemove", this.onRightThumbMousemove);
23584
- document.addEventListener("mouseup", this.onRightThumbMouseup);
23585
- document.addEventListener("touchmove", this.onRightThumbMousemove);
23586
- document.addEventListener("touchend", this.onRightThumbMouseup);
24040
+ modelValue: {
24041
+ type: FileList,
24042
+ required: true
23587
24043
  },
23588
- onRightThumbMousemove(e2) {
23589
- this.mouseMoveCounter++;
23590
- let clientX = e2.clientX;
23591
- if (e2.type === "touchmove") {
23592
- clientX = e2.touches[0].clientX;
23593
- }
23594
- let dx = clientX - this.startX;
23595
- let per = dx / this.barBox.width;
23596
- let val = this.barValue + (this.maximum - this.minimum) * per;
23597
- let mod = val % this.step;
23598
- val -= mod;
23599
- if (val < this.valueMin + this.rangeMarginValue) {
23600
- val = this.valueMin + this.rangeMarginValue;
23601
- } else if (val > this.maximum) {
23602
- val = this.maximum;
23603
- }
23604
- this.valueMax = val;
24044
+ inline: {
24045
+ type: Boolean,
24046
+ default: false
23605
24047
  },
23606
- onRightThumbMouseup() {
23607
- document.removeEventListener("mousemove", this.onRightThumbMousemove);
23608
- document.removeEventListener("mouseup", this.onRightThumbMouseup);
23609
- document.removeEventListener("touchmove", this.onRightThumbMousemove);
23610
- document.removeEventListener("touchend", this.onRightThumbMouseup);
24048
+ errorOccured: {
24049
+ type: Array,
24050
+ required: true
23611
24051
  },
23612
- onMouseWheel(e2) {
23613
- if (this.preventWheel === true) {
23614
- return;
23615
- }
23616
- if (!e2.shiftKey && !e2.ctrlKey) {
23617
- return;
23618
- }
23619
- let val = this.step;
23620
- if (e2.deltaY < 0) {
23621
- val = -val;
23622
- }
23623
- if (e2.shiftKey && e2.ctrlKey) {
23624
- if (this.valueMin + val >= this.minimum && this.valueMax + val <= this.maximum) {
23625
- this.valueMin = this.valueMin + val;
23626
- this.valueMax = this.valueMax + val;
23627
- }
23628
- } else if (e2.ctrlKey) {
23629
- val = this.valueMax + val;
23630
- if (val < this.valueMin + this.rangeMarginValue) {
23631
- val = this.valueMin + this.rangeMarginValue;
23632
- } else if (val > this.maximum) {
23633
- val = this.maximum;
23634
- }
23635
- this.valueMax = val;
23636
- } else if (e2.shiftKey) {
23637
- val = this.valueMin + val;
23638
- if (val < this.minimum) {
23639
- val = this.minimum;
23640
- } else if (val > this.valueMax - this.rangeMarginValue) {
23641
- val = this.valueMax - this.rangeMarginValue;
23642
- }
23643
- this.valueMin = val;
23644
- }
24052
+ errorMessage: {
24053
+ type: String,
24054
+ default: "an error occured while uploading"
23645
24055
  },
23646
- triggerInput() {
23647
- let fixed = 0;
23648
- if (this.step.toString().includes(".")) {
23649
- fixed = 2;
23650
- }
23651
- let retObj = {
23652
- min: this.minimum,
23653
- max: this.maximum,
23654
- minValue: parseFloat(this.valueMin.toFixed(fixed)),
23655
- maxValue: parseFloat(this.valueMax.toFixed(fixed))
23656
- };
23657
- this.$emit("input", retObj);
23658
- }
23659
- },
23660
- computed: {
23661
- minimum() {
23662
- return this.min === void 0 ? 0 : this.min;
24056
+ fileSaved: {
24057
+ type: Boolean,
24058
+ default: false
23663
24059
  },
23664
- maximum() {
23665
- let _labels = this.labels || [];
23666
- let max = _labels.length ? _labels.length - 1 : 100;
23667
- return this.max === void 0 ? max : this.max;
24060
+ virusCheck: {
24061
+ type: Array,
24062
+ required: true
23668
24063
  },
23669
- stepCount() {
23670
- let _labels = this.labels || [];
23671
- if (_labels.length) {
23672
- return _labels.length - 1;
23673
- }
23674
- return Math.floor((this.maximum - this.minimum) / this.step);
24064
+ virusCheckText: {
24065
+ type: String,
24066
+ default: "Antivirus check ..."
23675
24067
  },
23676
- subStepCount() {
23677
- let _labels = this.labels || [];
23678
- if (_labels.length && this.step > 1) {
23679
- return (this.maximum - this.minimum) / this.step;
23680
- }
23681
- return 0;
24068
+ virusCheckFailedText: {
24069
+ type: String,
24070
+ default: "Antivirus check failed"
23682
24071
  },
23683
- barMin() {
23684
- let per = (this.valueMin - this.minimum) / (this.maximum - this.minimum) * 100;
23685
- return per;
24072
+ virusDetectedText: {
24073
+ type: String,
24074
+ default: "Virus detected"
23686
24075
  },
23687
- barMax() {
23688
- let per = 100 - (this.valueMax - this.minimum) / (this.maximum - this.minimum) * 100;
23689
- return per;
24076
+ deleteConfirmationText: {
24077
+ type: String,
24078
+ default: "Are you sure you want to delete it permanently? this action will be irreversible"
23690
24079
  },
23691
- barMinVal() {
23692
- let fixed = 0;
23693
- if (this.step.toString().includes(".")) {
23694
- fixed = 2;
24080
+ zIndex: {
24081
+ type: Number,
24082
+ default: 99
24083
+ }
24084
+ },
24085
+ emits: ["update:modelValue", "save:modelValue", "reload"],
24086
+ setup(__props, { emit }) {
24087
+ const props = __props;
24088
+ const upload = ref(null);
24089
+ const fileSelected = ref(false);
24090
+ const files = ref([]);
24091
+ const standardFormats = ref([
24092
+ ".pdf",
24093
+ ".csv",
24094
+ ".doc",
24095
+ ".jpeg",
24096
+ ".mp4",
24097
+ ".png",
24098
+ ".txt",
24099
+ ".xls"
24100
+ ]);
24101
+ function formatBytes(bytes, decimals = 2) {
24102
+ if (!+bytes)
24103
+ return "0 Bytes";
24104
+ const k2 = 1024;
24105
+ const dm = decimals < 0 ? 0 : decimals;
24106
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
24107
+ const i2 = Math.floor(Math.log(bytes) / Math.log(k2));
24108
+ return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm))} ${sizes[i2]}`;
24109
+ }
24110
+ function iconName(x2) {
24111
+ return standardFormats.value.includes(getExtension(x2)) ? getExtension(x2).slice(1) : "unknown";
24112
+ }
24113
+ function getName(n) {
24114
+ const index = n.lastIndexOf(".");
24115
+ let str = n.slice(0, index);
24116
+ return str.length <= 15 ? str : str.slice(0, 15) + `... `;
24117
+ }
24118
+ function getExtension(s3) {
24119
+ return s3.replace(/.*(?=\.)/g, "");
24120
+ }
24121
+ function uploadFile(e2) {
24122
+ e2.stopPropagation();
24123
+ files.value = upload.value.files;
24124
+ if (files.value) {
24125
+ fileSelected.value = true;
23695
24126
  }
23696
- return (this.valueMin || 0).toFixed(fixed);
23697
- },
23698
- barMaxVal() {
23699
- let fixed = 0;
23700
- if (this.step.toString().includes(".")) {
23701
- fixed = 2;
24127
+ emit("update:modelValue", files.value);
24128
+ }
24129
+ function dragFile(e2) {
24130
+ e2.stopPropagation();
24131
+ e2.dataTransfer.dropEffect = "copy";
24132
+ }
24133
+ function dropFile(e2) {
24134
+ e2.stopPropagation();
24135
+ fileSelected.value = true;
24136
+ files.value = e2.dataTransfer.files;
24137
+ emit("update:modelValue", files.value);
24138
+ }
24139
+ function deleteFile(index) {
24140
+ if (window.confirm(props.deleteConfirmationText)) {
24141
+ removeFile(index);
23702
24142
  }
23703
- return (this.valueMax || 100).toFixed(fixed);
23704
- },
23705
- scaleLabels() {
23706
- let _labels = this.labels || [];
23707
- if (_labels.length === 0) {
23708
- _labels = [];
23709
- _labels.push(this.minimum);
23710
- _labels.push(this.maximum);
24143
+ }
24144
+ function removeFile(index) {
24145
+ const dt = new DataTransfer();
24146
+ for (let i2 = 0; i2 < files.value.length; i2++) {
24147
+ const file = files.value[i2];
24148
+ if (index !== i2)
24149
+ dt.items.add(file);
24150
+ }
24151
+ files.value = dt.files;
24152
+ if (files.value.length == 0) {
24153
+ fileSelected.value = false;
23711
24154
  }
23712
- return _labels;
23713
24155
  }
23714
- },
23715
- watch: {
23716
- valueMin() {
23717
- this.triggerInput();
23718
- },
23719
- valueMax() {
23720
- this.triggerInput();
23721
- },
23722
- minValue(newValue) {
23723
- this.valueMin = newValue < this.minimum ? this.minimum : newValue;
23724
- },
23725
- maxValue(newValue) {
23726
- this.valueMax = newValue > this.maximum ? this.maximum : newValue;
24156
+ function saveFile() {
24157
+ emit("save:modelValue", files.value);
23727
24158
  }
23728
- },
23729
- mounted() {
24159
+ function generateLink(file) {
24160
+ return URL.createObjectURL(file);
24161
+ }
24162
+ function reload(e2) {
24163
+ e2.preventDefault();
24164
+ emit("reload");
24165
+ }
24166
+ return (_ctx, _cache) => {
24167
+ return openBlock(), createElementBlock("div", {
24168
+ class: normalizeClass(["file__upload", __props.inline ? "" : "file__upload_box"])
24169
+ }, [
24170
+ !__props.fileSaved ? (openBlock(), createElementBlock("div", {
24171
+ key: 0,
24172
+ class: "file__upload_btn",
24173
+ onDragover: _cache[1] || (_cache[1] = withModifiers(($event) => dragFile($event), ["prevent"])),
24174
+ onDrop: _cache[2] || (_cache[2] = withModifiers(($event) => dropFile($event), ["prevent"]))
24175
+ }, [
24176
+ createVNode(DhIcon, {
24177
+ class: "file__upload_btn_icon",
24178
+ "icon-name": "upload",
24179
+ size: 24
24180
+ }),
24181
+ _hoisted_1$d,
24182
+ createElementVNode("input", {
24183
+ id: "upload_pdf",
24184
+ ref_key: "upload",
24185
+ ref: upload,
24186
+ multiple: "",
24187
+ name: "file",
24188
+ type: "file",
24189
+ onInput: _cache[0] || (_cache[0] = ($event) => uploadFile($event))
24190
+ }, null, 544)
24191
+ ], 32)) : createCommentVNode("", true),
24192
+ fileSelected.value ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
24193
+ (openBlock(true), createElementBlock(Fragment, null, renderList(files.value, (file, id) => {
24194
+ return openBlock(), createElementBlock("div", {
24195
+ key: id,
24196
+ class: normalizeClass(["file__upload_list", __props.inline ? "" : "file__upload_list_box"])
24197
+ }, [
24198
+ createVNode(DhIcon, {
24199
+ class: normalizeClass(__props.errorOccured[id] ? "file__upload_list_icon" : ""),
24200
+ "icon-name": `file-` + iconName(file.name),
24201
+ size: 40
24202
+ }, null, 8, ["class", "icon-name"]),
24203
+ props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createBlock(DhIcon, {
24204
+ key: 0,
24205
+ class: "file__upload_list_icon_sub file__upload_list_icon_sub--loading",
24206
+ "icon-name": "states",
24207
+ size: 20,
24208
+ style: normalizeStyle({ "z-index": props.zIndex })
24209
+ }, null, 8, ["style"])) : createCommentVNode("", true),
24210
+ props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "failed" ? (openBlock(), createBlock(DhIcon, {
24211
+ key: 1,
24212
+ class: "file__upload_list_icon_sub",
24213
+ "icon-name": "warning-filled",
24214
+ size: 20,
24215
+ style: normalizeStyle({ "z-index": props.zIndex })
24216
+ }, null, 8, ["style"])) : createCommentVNode("", true),
24217
+ props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "detected" ? (openBlock(), createBlock(DhIcon, {
24218
+ key: 2,
24219
+ class: "file__upload_list_icon_sub",
24220
+ "icon-name": "danger",
24221
+ size: 20,
24222
+ style: normalizeStyle({ "z-index": props.zIndex })
24223
+ }, null, 8, ["style"])) : createCommentVNode("", true),
24224
+ __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createBlock(DhIcon, {
24225
+ key: 3,
24226
+ class: "file__upload_list_icon_sub",
24227
+ "icon-name": "error",
24228
+ size: 20,
24229
+ style: normalizeStyle({ "z-index": props.zIndex })
24230
+ }, null, 8, ["style"])) : createCommentVNode("", true),
24231
+ createElementVNode("div", _hoisted_3$8, [
24232
+ createElementVNode("div", _hoisted_4$5, [
24233
+ createElementVNode("div", null, [
24234
+ createElementVNode("span", {
24235
+ title: file.name
24236
+ }, toDisplayString(getName(file.name)) + toDisplayString(getExtension(file.name)), 9, _hoisted_5$2),
24237
+ props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createElementBlock("span", _hoisted_6$2, [
24238
+ createTextVNode(toDisplayString(__props.virusCheckText) + " ", 1),
24239
+ createVNode(DhIcon, {
24240
+ class: "file__upload_list_icon_sub--loading",
24241
+ "icon-name": "processing",
24242
+ size: 18
24243
+ })
24244
+ ])) : createCommentVNode("", true),
24245
+ props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "failed" ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(__props.virusCheckFailedText), 1)) : createCommentVNode("", true),
24246
+ props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "detected" ? (openBlock(), createElementBlock("span", _hoisted_8$1, toDisplayString(__props.virusDetectedText), 1)) : createCommentVNode("", true),
24247
+ _hoisted_9$1,
24248
+ __props.fileSaved && !__props.errorOccured[id] || !__props.errorOccured[id] && __props.virusCheck[id] ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(formatBytes(file.size)), 1)) : createCommentVNode("", true),
24249
+ __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
24250
+ ]),
24251
+ !__props.fileSaved ? (openBlock(), createElementBlock("span", _hoisted_12$1, toDisplayString(props.uploadProgress[id]) + "%", 1)) : createCommentVNode("", true)
24252
+ ]),
24253
+ !__props.fileSaved ? (openBlock(), createElementBlock("progress", {
24254
+ key: 0,
24255
+ id: "file",
24256
+ max: "100",
24257
+ value: props.uploadProgress[id]
24258
+ }, toDisplayString(props.uploadProgress[id]) + "% ", 9, _hoisted_13$1)) : createCommentVNode("", true)
24259
+ ]),
24260
+ __props.fileSaved && !__props.virusCheck[id] && !__props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
24261
+ key: 4,
24262
+ class: "file__upload_list_download",
24263
+ download: "",
24264
+ href: generateLink(file)
24265
+ }, [
24266
+ createVNode(DhIcon, {
24267
+ class: "file__upload_list_download_icon",
24268
+ "icon-name": "download",
24269
+ size: 24
24270
+ })
24271
+ ], 8, _hoisted_14$1)) : createCommentVNode("", true),
24272
+ __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
24273
+ key: 5,
24274
+ class: "file__upload_list_retry",
24275
+ onClick: _cache[3] || (_cache[3] = ($event) => reload($event))
24276
+ }, [
24277
+ createVNode(DhIcon, {
24278
+ class: "file__upload_list_retry_icon",
24279
+ "icon-name": "retry",
24280
+ size: 24
24281
+ })
24282
+ ])) : createCommentVNode("", true),
24283
+ props.uploadProgress[id] !== 100 ? (openBlock(), createBlock(DhIcon, {
24284
+ key: 6,
24285
+ class: "file__upload_list_delete",
24286
+ "icon-name": "close",
24287
+ size: 24,
24288
+ onClick: ($event) => removeFile(id)
24289
+ }, null, 8, ["onClick"])) : (openBlock(), createBlock(DhIcon, {
24290
+ key: 7,
24291
+ class: "file__upload_list_delete",
24292
+ "icon-name": "delete",
24293
+ size: 24,
24294
+ onClick: ($event) => deleteFile(id)
24295
+ }, null, 8, ["onClick"]))
24296
+ ], 2);
24297
+ }), 128))
24298
+ ])) : createCommentVNode("", true),
24299
+ !fileSelected.value && !__props.inline ? (openBlock(), createElementBlock("div", _hoisted_15$1, " No file selected ")) : createCommentVNode("", true),
24300
+ !__props.inline && !__props.fileSaved ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
24301
+ _hoisted_17$1,
24302
+ createElementVNode("button", {
24303
+ class: normalizeClass([
24304
+ "file__upload_action_done",
24305
+ fileSelected.value && !__props.fileSaved ? "file__upload_action_done--active" : ""
24306
+ ]),
24307
+ onClick: saveFile
24308
+ }, " Done ", 2)
24309
+ ])) : createCommentVNode("", true)
24310
+ ], 2);
24311
+ };
23730
24312
  }
23731
24313
  };
23732
- const _hoisted_1$d = { class: "bar" };
23733
- const _hoisted_2$c = ["min", "max", "step", "value"];
23734
- const _hoisted_3$8 = { class: "caption" };
23735
- const _hoisted_4$5 = { class: "min-caption" };
23736
- const _hoisted_5$2 = { class: "bar-inner" };
23737
- const _hoisted_6$2 = ["min", "max", "step", "value"];
23738
- const _hoisted_7$2 = { class: "caption" };
23739
- const _hoisted_8$1 = { class: "max-caption" };
23740
- const _hoisted_9$1 = {
23741
- key: 0,
23742
- class: "ruler"
23743
- };
23744
- const _hoisted_10$1 = {
23745
- key: 1,
23746
- class: "sub-ruler"
23747
- };
23748
- const _hoisted_11$1 = {
23749
- key: 2,
23750
- class: "labels"
23751
- };
23752
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
23753
- return openBlock(), createElementBlock("div", {
23754
- class: normalizeClass([$props.baseClassName, $data.rangeMarginValue === 0 ? "zero-ranage-margin" : ""]),
23755
- onMousewheel: _cache[10] || (_cache[10] = withModifiers((...args) => $options.onMouseWheel && $options.onMouseWheel(...args), ["prevent", "stop"]))
23756
- }, [
23757
- createElementVNode("div", _hoisted_1$d, [
23758
- createElementVNode("div", {
23759
- class: "bar-left",
23760
- style: normalizeStyle({ width: $options.barMin + "%" }),
23761
- onClick: _cache[0] || (_cache[0] = (...args) => $options.onBarLeftClick && $options.onBarLeftClick(...args))
23762
- }, null, 4),
23763
- createElementVNode("input", {
23764
- class: "input-type-range input-type-range-min",
23765
- type: "range",
23766
- min: $options.minimum,
23767
- max: $options.maximum,
23768
- step: $props.step,
23769
- value: $data.valueMin,
23770
- onInput: _cache[1] || (_cache[1] = withModifiers((...args) => $options.onInputMinChange && $options.onInputMinChange(...args), ["stop", "prevent"]))
23771
- }, null, 40, _hoisted_2$c),
23772
- createElementVNode("div", {
23773
- class: "thumb thumb-left",
23774
- onMousedown: _cache[2] || (_cache[2] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args)),
23775
- onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args))
23776
- }, [
23777
- createElementVNode("div", _hoisted_3$8, [
23778
- createElementVNode("span", _hoisted_4$5, toDisplayString($props.minCaption || $options.barMinVal), 1)
23779
- ])
23780
- ], 32),
23781
- createElementVNode("div", _hoisted_5$2, [
23782
- createElementVNode("div", {
23783
- class: "bar-inner-left",
23784
- onClick: _cache[4] || (_cache[4] = (...args) => $options.onInnerBarLeftClick && $options.onInnerBarLeftClick(...args))
23785
- }),
23786
- createElementVNode("div", {
23787
- class: "bar-inner-right",
23788
- onClick: _cache[5] || (_cache[5] = (...args) => $options.onInnerBarRightClick && $options.onInnerBarRightClick(...args))
23789
- })
23790
- ]),
23791
- createElementVNode("input", {
23792
- class: "input-type-range input-type-range-max",
23793
- type: "range",
23794
- min: $options.minimum,
23795
- max: $options.maximum,
23796
- step: $props.step,
23797
- value: $data.valueMax,
23798
- onInput: _cache[6] || (_cache[6] = withModifiers((...args) => $options.onInputMaxChange && $options.onInputMaxChange(...args), ["stop", "prevent"]))
23799
- }, null, 40, _hoisted_6$2),
23800
- createElementVNode("div", {
23801
- class: "thumb thumb-right",
23802
- onMousedown: _cache[7] || (_cache[7] = (...args) => $options.onRightThumbMousedown && $options.onRightThumbMousedown(...args)),
23803
- onTouchstart: _cache[8] || (_cache[8] = (...args) => $options.onRightThumbMousedown && $options.onRightThumbMousedown(...args))
23804
- }, [
23805
- createElementVNode("div", _hoisted_7$2, [
23806
- createElementVNode("span", _hoisted_8$1, toDisplayString($props.maxCaption || $options.barMaxVal), 1)
23807
- ])
23808
- ], 32),
23809
- createElementVNode("div", {
23810
- class: "bar-right",
23811
- style: normalizeStyle({ width: $options.barMax + "%" }),
23812
- onClick: _cache[9] || (_cache[9] = (...args) => $options.onBarRightClick && $options.onBarRightClick(...args))
23813
- }, null, 4)
23814
- ]),
23815
- $props.ruler ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
23816
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.stepCount, (n) => {
23817
- return openBlock(), createElementBlock("div", {
23818
- key: n,
23819
- class: "ruler-rule"
23820
- });
23821
- }), 128))
23822
- ])) : createCommentVNode("", true),
23823
- $options.subStepCount ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
23824
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.subStepCount, (n) => {
23825
- return openBlock(), createElementBlock("div", {
23826
- key: n,
23827
- class: "ruler-sub-rule"
23828
- });
23829
- }), 128))
23830
- ])) : createCommentVNode("", true),
23831
- $props.label ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
23832
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.scaleLabels, (label) => {
23833
- return openBlock(), createElementBlock("div", {
23834
- class: "label",
23835
- key: label
23836
- }, toDisplayString(label), 1);
23837
- }), 128))
23838
- ])) : createCommentVNode("", true)
23839
- ], 34);
23840
- }
23841
- var MultiRangeSlider = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$4]]);
23842
- var MultiRangeSliderBarOnly = "";
23843
- Chart.register(plugin_tooltip, BarElement, CategoryScale, LinearScale);
23844
24314
  const _sfc_main$c = defineComponent({
23845
- components: { Bar, MultiRangeSlider, DhAdvancedFilter },
24315
+ components: { DhIcon },
23846
24316
  props: {
23847
- numberRange: {
23848
- type: Array,
23849
- default: () => [{ key: 1, count: 10 }]
24317
+ hasCloseButton: {
24318
+ type: Boolean,
24319
+ default: true
23850
24320
  },
23851
- width: {
23852
- type: Number,
23853
- default: 200
24321
+ hasSideBar: {
24322
+ type: Boolean,
24323
+ default: true
23854
24324
  },
23855
- height: {
23856
- type: Number,
23857
- default: 50
24325
+ hasSideBarButtonBottom: {
24326
+ type: Boolean,
24327
+ default: true
23858
24328
  },
23859
- chartId: {
23860
- type: String,
23861
- default: "bar-chart"
24329
+ hasHeader: {
24330
+ type: Boolean,
24331
+ default: true
24332
+ },
24333
+ hasFooter: {
24334
+ type: Boolean,
24335
+ default: true
24336
+ },
24337
+ hasFooterButtonRight: {
24338
+ type: Boolean,
24339
+ default: true
23862
24340
  },
23863
- datasetIdKey: {
24341
+ sideBarPosition: {
23864
24342
  type: String,
23865
- default: "label"
23866
- },
23867
- steps: {
23868
- type: Number,
23869
- default: 1
24343
+ default: "left"
23870
24344
  },
23871
- includeForm: {
24345
+ hasCloseConfirmation: {
23872
24346
  type: Boolean,
23873
24347
  default: false
24348
+ },
24349
+ bodyClass: {
24350
+ type: String,
24351
+ default: ""
23874
24352
  }
23875
24353
  },
23876
- data() {
23877
- return {
23878
- chartData: {
23879
- labels: [],
23880
- datasets: [
23881
- {
23882
- labels: "",
23883
- data: [],
23884
- backgroundColor: ["#5ea9e5"],
23885
- borderRadius: 1,
23886
- hoverBackgroundColor: "#e0e0e0"
23887
- }
23888
- ]
23889
- },
23890
- chartOptions: {
23891
- responsive: true,
23892
- plugins: {
23893
- legend: {
23894
- display: false
23895
- },
23896
- tooltip: {
23897
- enabled: false
23898
- }
23899
- },
23900
- scales: {
23901
- x: {
23902
- display: false,
23903
- grid: {
23904
- display: false
23905
- },
23906
- ticks: {
23907
- display: true
23908
- }
23909
- },
23910
- y: {
23911
- display: false,
23912
- grid: {
23913
- display: false
23914
- },
23915
- ticks: {
23916
- display: false
23917
- }
23918
- }
23919
- }
23920
- },
23921
- chartLines: {},
23922
- min: "1",
23923
- max: this.maxNumber(this.numberRange),
23924
- rangeMax: this.numberRange.length,
23925
- chart_dta: [],
23926
- BarMinValue: 1,
23927
- BarMaxValue: this.numberRange.length,
23928
- activeFilter: false,
23929
- validated: false,
23930
- isMatch: false,
23931
- isExclude: false,
23932
- isDisable: false,
23933
- labels: []
23934
- };
23935
- },
23936
- mounted() {
23937
- this.isMatch = true;
23938
- this.setChartData(this.numberRange);
23939
- this.highlightChart();
23940
- this.labels = [this.BarMinValue, this.max];
23941
- },
24354
+ emits: ["close"],
23942
24355
  methods: {
23943
- matchFilter() {
23944
- if (!this.isDisable) {
23945
- this.isMatch = true;
23946
- this.isExclude = false;
23947
- var data = this.chartData.datasets[0].data;
23948
- this.chartLines = this.chartData.datasets[0];
23949
- this.chartData.datasets[0].backgroundColor = [];
23950
- for (let i2 = 0; i2 <= data.length; i2++) {
23951
- if (data[i2] >= this.min && data[i2] <= this.max) {
23952
- this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
23953
- } else {
23954
- this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23955
- }
23956
- }
23957
- }
23958
- },
23959
- excludeFilter() {
23960
- if (!this.isDisable) {
23961
- this.isMatch = false;
23962
- this.isExclude = true;
23963
- var data = this.chartData.datasets[0].data;
23964
- this.chartLines = this.chartData.datasets[0];
23965
- this.chartData.datasets[0].backgroundColor = [];
23966
- for (let i2 = 0; i2 < data.length; i2++) {
23967
- if (data[i2] >= this.min && data[i2] <= this.max) {
23968
- this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23969
- } else {
23970
- this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
23971
- }
23972
- }
23973
- }
23974
- },
23975
- missingFilter() {
23976
- this.isDisable = !this.isDisable;
23977
- this.validated = !this.validated;
23978
- var data = this.chartData.datasets[0].data;
23979
- this.chartLines = this.chartData.datasets[0];
23980
- this.chartData.datasets[0].backgroundColor = [];
23981
- if (this.validated) {
23982
- for (let i2 = 1; i2 <= data.length; i2++) {
23983
- this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
23984
- }
23985
- } else {
23986
- if (this.isMatch) {
23987
- this.matchFilter();
23988
- }
23989
- if (this.isExclude) {
23990
- this.excludeFilter();
23991
- }
23992
- }
23993
- },
23994
- changeMin(e2) {
23995
- let minValue = e2.target.value;
23996
- this.min = minValue ? minValue : "1";
23997
- this.BarMinValue = minValue ? this.getFirstIndex(parseInt(minValue)) : 1;
23998
- if (this.isMatch && !this.isDisable) {
23999
- this.matchFilter();
24000
- }
24001
- if (this.isExclude && !this.isDisable) {
24002
- this.excludeFilter();
24003
- }
24004
- },
24005
- changeMax(e2) {
24006
- let maxValue = e2.target.value;
24007
- this.BarMaxValue = maxValue && maxValue > this.maxNumber(this.numberRange) ? this.numberRange.length : this.getLastIndex(parseInt(maxValue));
24008
- this.max = maxValue && maxValue > this.maxNumber(this.numberRange) ? this.maxNumber(this.numberRange) : maxValue;
24009
- if (this.isMatch && !this.isDisable) {
24010
- this.matchFilter();
24011
- }
24012
- if (this.isExclude && !this.isDisable) {
24013
- this.excludeFilter();
24014
- }
24015
- },
24016
- setChartData(chart_data) {
24017
- chart_data = this.sortData(chart_data);
24018
- this.removeChartData();
24019
- let key = this.chartData.labels;
24020
- for (let j = 0; j < chart_data.length; j++) {
24021
- key.push(chart_data[j].key);
24022
- this.chart_dta.push(chart_data[j].count);
24023
- }
24024
- this.chartData.datasets[0].data = this.chart_dta;
24356
+ closed() {
24357
+ this.$emit("close", this.hasCloseConfirmation);
24358
+ }
24359
+ }
24360
+ });
24361
+ const _hoisted_1$c = {
24362
+ key: 1,
24363
+ id: "modal-sidebar",
24364
+ class: "modal-sidebar"
24365
+ };
24366
+ const _hoisted_2$b = {
24367
+ key: 0,
24368
+ id: "modalTitle",
24369
+ class: "modal-header"
24370
+ };
24371
+ const _hoisted_3$7 = { class: "modal-footer" };
24372
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
24373
+ const _component_dh_icon = resolveComponent("dh-icon");
24374
+ return openBlock(), createBlock(Transition, { name: "modal-fade" }, {
24375
+ default: withCtx(() => [
24376
+ createElementVNode("div", {
24377
+ class: "modal-backdrop",
24378
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closed && _ctx.closed(...args))
24379
+ }, [
24380
+ createElementVNode("div", {
24381
+ "aria-describedby": "modalDescription",
24382
+ "aria-labelledby": "modalTitle",
24383
+ class: normalizeClass(`modal ${_ctx.hasSideBar ? _ctx.sideBarPosition : ""}`),
24384
+ role: "dialog",
24385
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
24386
+ }, ["stop"]))
24387
+ }, [
24388
+ _ctx.hasCloseButton ? (openBlock(), createElementBlock("button", {
24389
+ key: 0,
24390
+ "aria-label": "Close modal",
24391
+ class: "btn-close",
24392
+ type: "button",
24393
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closed && _ctx.closed(...args))
24394
+ }, [
24395
+ createVNode(_component_dh_icon, {
24396
+ class: "icon",
24397
+ "icon-name": "close",
24398
+ size: 24
24399
+ })
24400
+ ])) : createCommentVNode("", true),
24401
+ _ctx.hasSideBar ? (openBlock(), createElementBlock("aside", _hoisted_1$c, [
24402
+ renderSlot(_ctx.$slots, "sidebar"),
24403
+ _ctx.hasSideBarButtonBottom ? renderSlot(_ctx.$slots, "sidebar-button-bottom", { key: 0 }) : createCommentVNode("", true)
24404
+ ])) : createCommentVNode("", true),
24405
+ createElementVNode("section", {
24406
+ class: normalizeClass(`right-section ${_ctx.hasSideBar ? "" : "full"}`)
24407
+ }, [
24408
+ _ctx.hasHeader ? (openBlock(), createElementBlock("header", _hoisted_2$b, [
24409
+ renderSlot(_ctx.$slots, "header")
24410
+ ])) : createCommentVNode("", true),
24411
+ createElementVNode("section", {
24412
+ id: "modalDescription",
24413
+ class: normalizeClass(["modal-body", _ctx.bodyClass])
24414
+ }, [
24415
+ renderSlot(_ctx.$slots, "body")
24416
+ ], 2),
24417
+ createElementVNode("footer", _hoisted_3$7, [
24418
+ _ctx.hasFooter ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : createCommentVNode("", true),
24419
+ _ctx.hasFooterButtonRight ? renderSlot(_ctx.$slots, "footer-button-right", { key: 1 }) : createCommentVNode("", true)
24420
+ ])
24421
+ ], 2)
24422
+ ], 2)
24423
+ ])
24424
+ ]),
24425
+ _: 3
24426
+ });
24427
+ }
24428
+ var Modal = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$3]]);
24429
+ var __glob_1_0 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTIgMy41YTguNSA4LjUgMCAxIDAgMCAxNyA4LjUgOC41IDAgMCAwIDAtMTd6TTIuNSAxMmE5LjUgOS41IDAgMSAxIDE5IDAgOS41IDkuNSAwIDAgMS0xOSAweiIgZmlsbD0iI0MzMkYyNyIvPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMiA3LjVhLjUuNSAwIDAgMSAuNS41djRhLjUuNSAwIDAgMS0xIDBWOGEuNS41IDAgMCAxIC41LS41ek0xMS4yNSAxNmEuNzUuNzUgMCAwIDEgLjc1LS43NWguMDFhLjc1Ljc1IDAgMCAxIDAgMS41SDEyYS43NS43NSAwIDAgMS0uNzUtLjc1eiIgZmlsbD0iI0MzMkYyNyIvPgo8L3N2Zz4K";
24430
+ var __glob_1_1 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xNy40NTIgMTkuMTg5SDYuNTU4QTIuNTYgMi41NiAwIDAgMSA0IDE2LjYzMVYxNmMwLTEgLjQxNS0xLjk1OSAxLjEzOC0yLjY0NS40MzMtLjQxLjY3OC0uOTc3LjY3OC0xLjU3MlY5LjE4NEE2LjE5MSA2LjE5MSAwIDAgMSAxMiAzYTYuMTkxIDYuMTkxIDAgMCAxIDYuMTg0IDYuMTg0djIuNmMwIC41OTQuMjQ1IDEuMTY1LjY3OCAxLjU3QTMuNjM2IDMuNjM2IDAgMCAxIDIwIDE2di42MzFhMi41NDcgMi41NDcgMCAwIDEtMi41NDkgMi41NTh6bS01LjQ0Ny0xNC43MmE0LjcxOCA0LjcxOCAwIDAgMC00LjcxIDQuNzF2Mi42YzAgMS0uNDE0IDEuOTU4LTEuMTM4IDIuNjQ1LS40MzMuNDEtLjY3Ny45NzctLjY3NyAxLjU3MXYuNjMyYzAgLjU5OS40ODQgMS4wNzggMS4wODMgMS4wODJoMTAuODk0Yy41OTQgMCAxLjA3OC0uNDgzIDEuMDgzLTEuMDgydi0uNjMyYzAtLjU5NC0uMjQ0LTEuMTY2LS42NzgtMS41NzFhMy42MzYgMy42MzYgMCAwIDEtMS4xMzgtMi42NDZWOS4xNzVhNC43MjUgNC43MjUgMCAwIDAtNC43MTktNC43MDV6TTEzLjkwNCAyMS40NjZoLTMuNzk4YS43NC43NCAwIDAgMS0uNzM3LS43MzguNzQuNzQgMCAwIDEgLjczNy0uNzM3aDMuNzk4YS43MzcuNzM3IDAgMSAxIDAgMS40NzV6IiBmaWxsPSIjQkZCRkJGIi8+Cjwvc3ZnPgo=";
24431
+ var __glob_1_2 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTkuNDI3IDYuMjUzYTEgMSAwIDAgMSAwIDEuNDE0bC05LjI0IDkuMjRhMSAxIDAgMCAxLTEuNDE0IDBsLTQuMi00LjJhMSAxIDAgMSAxIDEuNDE0LTEuNDE0bDMuNDkzIDMuNDkzIDguNTMzLTguNTMzYTEgMSAwIDAgMSAxLjQxNCAweiIgZmlsbD0iIzNDQTA2NCIvPgo8L3N2Zz4K";
24432
+ var __glob_1_3 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTAuODkzIDMuNzlhMi4yNTYgMi4yNTYgMCAwIDEgMy4wMzYuNzk2bC4wMDIuMDAzIDcuNDQyIDEyLjQyNGEyLjI1NyAyLjI1NyAwIDAgMS0xLjkzIDMuMzg0SDQuNTU3YTIuMjU3IDIuMjU3IDAgMCAxLTEuOTI5LTMuMzg0bC4wMDQtLjAwN0wxMC4wNyA0LjU4OWwuMDAyLS4wMDNjLjIwMS0uMzMxLjQ4NC0uNjA2LjgyMi0uNzk2ek0xMiA0LjVhMS4yNTYgMS4yNTYgMCAwIDAtMS4wNzMuNjA0aC0uMDAxTDMuNDkgMTcuNTE3YTEuMjU2IDEuMjU2IDAgMCAwIDEuMDc0IDEuODgxaDE0Ljg3YTEuMjU2IDEuMjU2IDAgMCAwIDEuMDc0LTEuODgxTDEzLjA3NCA1LjEwNXYtLjAwMUExLjI1NyAxLjI1NyAwIDAgMCAxMiA0LjV6IiBmaWxsPSIjRjI5OTRBIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyIDguODZhLjUuNSAwIDAgMSAuNS41djMuNTEyYS41LjUgMCAxIDEtMSAwVjkuMzU5YS41LjUgMCAwIDEgLjUtLjV6TTExLjI1IDE2LjM4NWEuNzUuNzUgMCAwIDEgLjc1LS43NWguMDA5YS43NS43NSAwIDEgMSAwIDEuNUgxMmEuNzUuNzUgMCAwIDEtLjc1LS43NXoiIGZpbGw9IiNGMjk5NEEiLz4KPC9zdmc+Cg==";
24433
+ const _sfc_main$b = defineComponent({
24434
+ props: {
24435
+ notificationType: {
24436
+ type: String,
24437
+ required: true,
24438
+ default: "toast"
24025
24439
  },
24026
- highlightChart() {
24027
- var data = this.chartData.datasets[0].data;
24028
- this.chartLines = this.chartData.datasets[0];
24029
- this.chartData.datasets[0].backgroundColor = [];
24030
- for (let i2 = 0; i2 <= data.length; i2++) {
24031
- if (data[i2] >= this.min && data[i2] <= this.max) {
24032
- this.chartData.datasets[0].backgroundColor.push("#5ea9e5");
24033
- } else {
24034
- this.chartData.datasets[0].backgroundColor.push("#e0e0e0");
24035
- }
24036
- }
24440
+ status: {
24441
+ type: String,
24442
+ required: true,
24443
+ default: "info"
24037
24444
  },
24038
- updateBarChart(e2) {
24039
- const { minValue, maxValue } = e2;
24040
- this.BarMinValue = minValue;
24041
- this.BarMaxValue = maxValue;
24042
- var data = this.chartData.datasets[0].data;
24043
- this.min = data[this.BarMinValue] ? data[this.BarMinValue] : "1";
24044
- this.max = data[this.BarMaxValue] ? data[this.BarMaxValue] : this.max;
24045
- if (this.isMatch && !this.isDisable) {
24046
- this.matchFilter();
24047
- }
24048
- if (this.isExclude && !this.isDisable) {
24049
- this.excludeFilter();
24050
- }
24445
+ title: {
24446
+ type: String,
24447
+ required: false,
24448
+ default: ""
24051
24449
  },
24052
- toggleFilter() {
24053
- this.activeFilter = !this.activeFilter;
24450
+ message: {
24451
+ type: String,
24452
+ required: false,
24453
+ default: ""
24054
24454
  },
24055
- removeChartData() {
24056
- this.chartData.labels = [];
24057
- this.chartData.datasets[0].data = [];
24058
- this.chart_dta = [];
24455
+ dismissible: {
24456
+ type: Boolean,
24457
+ required: false,
24458
+ default: true
24059
24459
  },
24060
- sortData(arr) {
24061
- return arr.slice().sort(function(a3, b2) {
24062
- return a3.count - b2.count;
24063
- });
24460
+ notificationButton: {
24461
+ type: String,
24462
+ default: "Action"
24064
24463
  },
24065
- maxNumber(arr) {
24066
- if (arr.length == 0)
24067
- return;
24068
- return arr.reduce((acc, shot) => acc = acc > shot.count ? acc : shot.count, 0);
24464
+ buttonAction: {
24465
+ type: String,
24466
+ default: "void"
24069
24467
  },
24070
- getLastIndex(index) {
24071
- let data = this.chartData.datasets[0].data;
24072
- let indexVal = 0;
24073
- for (let i2 = index; i2 >= 0; i2--) {
24074
- if (data.lastIndexOf(i2) !== -1) {
24075
- indexVal = data.lastIndexOf(i2);
24076
- break;
24077
- } else {
24078
- continue;
24079
- }
24080
- }
24081
- return indexVal;
24468
+ buttonDismiss: {
24469
+ type: String,
24470
+ default: "Dismiss"
24471
+ }
24472
+ },
24473
+ data() {
24474
+ return {
24475
+ show: true
24476
+ };
24477
+ },
24478
+ mounted() {
24479
+ if (this.dismissible && ["toast", "bottom-message"].includes(this.notificationType)) {
24480
+ setTimeout(() => {
24481
+ this.close();
24482
+ }, 3e3);
24483
+ }
24484
+ },
24485
+ methods: {
24486
+ getIconUrl() {
24487
+ return new URL({ "../assets/icon-danger.svg": __glob_1_0, "../assets/icon-info.svg": __glob_1_1, "../assets/icon-success.svg": __glob_1_2, "../assets/icon-warning.svg": __glob_1_3 }[`../assets/icon-${this.status}.svg`], self.location).href;
24082
24488
  },
24083
- getFirstIndex(index) {
24084
- let data = this.chartData.datasets[0].data;
24085
- let indexVal = 0;
24086
- for (let i2 = index; i2 <= this.max; i2++) {
24087
- if (data.lastIndexOf(i2) !== -1) {
24088
- indexVal = data.lastIndexOf(i2);
24089
- break;
24090
- } else {
24091
- continue;
24092
- }
24489
+ close() {
24490
+ this.show = false;
24491
+ },
24492
+ limitTitle(_title, _type) {
24493
+ if (["toast", "actionable"].includes(_type) && _title.length >= 60) {
24494
+ return `${_title.substring(0, 60)}..`;
24495
+ } else if (["bottom-message"].includes(_type) && _title.length >= 40) {
24496
+ return `${_title.substring(0, 40)}..`;
24497
+ } else if (["modal"].includes(_type) && _title.length >= 80) {
24498
+ return `${_title.substring(0, 80)}..`;
24093
24499
  }
24094
- return indexVal;
24500
+ return _title;
24095
24501
  }
24096
24502
  }
24097
24503
  });
24098
- const _hoisted_1$c = { class: "dh-range-container" };
24099
- const _hoisted_2$b = { class: "bar-chart" };
24100
- const _hoisted_3$7 = {
24504
+ const _hoisted_1$b = /* @__PURE__ */ createElementVNode("img", {
24505
+ alt: "icon",
24506
+ class: "close-icon",
24507
+ src: _imports_0$1
24508
+ }, null, -1);
24509
+ const _hoisted_2$a = [
24510
+ _hoisted_1$b
24511
+ ];
24512
+ const _hoisted_3$6 = ["src"];
24513
+ const _hoisted_4$4 = { class: "additional-text" };
24514
+ const _hoisted_5$1 = {
24101
24515
  key: 0,
24102
- class: "input-group-section"
24516
+ class: "descriptions"
24103
24517
  };
24104
- const _hoisted_4$4 = { class: "input-group sb-input" };
24105
- const _hoisted_5$1 = ["disabled", "max", "value"];
24106
- const _hoisted_6$1 = { class: "input-group sb-input" };
24107
- const _hoisted_7$1 = ["disabled", "max", "min", "value"];
24108
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
24109
- const _component_Bar = resolveComponent("Bar");
24110
- const _component_MultiRangeSlider = resolveComponent("MultiRangeSlider");
24111
- const _component_dh_advanced_filter = resolveComponent("dh-advanced-filter");
24112
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
24113
- createElementVNode("div", _hoisted_2$b, [
24114
- createVNode(_component_Bar, {
24115
- "chart-data": _ctx.chartData,
24116
- "chart-id": _ctx.chartId,
24117
- "chart-options": _ctx.chartOptions,
24118
- "dataset-id-key": _ctx.datasetIdKey,
24119
- height: _ctx.height,
24120
- width: _ctx.width
24121
- }, null, 8, ["chart-data", "chart-id", "chart-options", "dataset-id-key", "height", "width"]),
24122
- createVNode(_component_MultiRangeSlider, {
24123
- "base-class-name": `multi-range-slider range-slider ${_ctx.isDisable}`,
24124
- label: true,
24125
- labels: _ctx.labels,
24126
- max: _ctx.rangeMax,
24127
- "max-caption": `${_ctx.max}`,
24128
- "max-value": _ctx.BarMaxValue,
24129
- min: 1,
24130
- "min-caption": `${_ctx.min}`,
24131
- "min-value": _ctx.BarMinValue,
24132
- "range-margin": 0,
24133
- ruler: false,
24134
- step: _ctx.steps,
24135
- onInput: _ctx.updateBarChart
24136
- }, null, 8, ["base-class-name", "labels", "max", "max-caption", "max-value", "min-caption", "min-value", "step", "onInput"])
24137
- ]),
24138
- _ctx.includeForm ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
24139
- createElementVNode("div", _hoisted_4$4, [
24140
- createElementVNode("label", {
24141
- class: normalizeClass(`text-2 input-to ${_ctx.validated ? "disable" : ""}`)
24142
- }, " From ", 2),
24143
- createElementVNode("input", {
24144
- class: "form-input text",
24145
- disabled: _ctx.validated ? true : false,
24146
- max: `${_ctx.max}`,
24147
- min: "1",
24148
- placeholder: "From",
24149
- type: "number",
24150
- value: `${_ctx.min}`,
24151
- onInput: _cache[0] || (_cache[0] = ($event) => _ctx.changeMin($event))
24152
- }, null, 40, _hoisted_5$1)
24153
- ]),
24154
- createElementVNode("div", _hoisted_6$1, [
24155
- createElementVNode("label", {
24156
- class: normalizeClass(`text-2 input-to ${_ctx.validated ? "disable" : ""}`)
24157
- }, " To ", 2),
24158
- createElementVNode("input", {
24159
- class: "form-input text",
24160
- disabled: _ctx.validated ? true : false,
24161
- max: `${_ctx.maxNumber(_ctx.numberRange)}`,
24162
- min: `${_ctx.min}`,
24163
- placeholder: "To",
24164
- type: "number",
24165
- value: `${_ctx.max}`,
24166
- onInput: _cache[1] || (_cache[1] = ($event) => _ctx.changeMax($event))
24167
- }, null, 40, _hoisted_7$1)
24168
- ])
24169
- ])) : createCommentVNode("", true),
24170
- renderSlot(_ctx.$slots, "default"),
24171
- createVNode(_component_dh_advanced_filter, {
24172
- onExclude: _ctx.excludeFilter,
24173
- onFilter_missing: _ctx.missingFilter,
24174
- onMatch: _ctx.matchFilter
24175
- }, null, 8, ["onExclude", "onFilter_missing", "onMatch"])
24176
- ]);
24518
+ const _hoisted_6$1 = { class: "btn btn-normal btn-primary" };
24519
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
24520
+ return openBlock(), createElementBlock("div", {
24521
+ class: normalizeClass(`dh-notification-container ${_ctx.notificationType}`)
24522
+ }, [
24523
+ _ctx.show ? (openBlock(), createElementBlock("div", {
24524
+ key: 0,
24525
+ class: normalizeClass(["bottom-message"].includes(_ctx.notificationType) ? `notification-up status status-${_ctx.notificationType}` : `notification-enter status status-${_ctx.notificationType}`)
24526
+ }, [
24527
+ !["modal", "bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("button", {
24528
+ key: 0,
24529
+ class: "close-notification",
24530
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]))
24531
+ }, _hoisted_2$a)) : createCommentVNode("", true),
24532
+ createElementVNode("div", {
24533
+ class: normalizeClass(`content content- ${_ctx.notificationType}`)
24534
+ }, [
24535
+ createElementVNode("div", {
24536
+ class: normalizeClass(`ellipse ellipse-${_ctx.status} ellipse-${_ctx.notificationType}`)
24537
+ }, [
24538
+ createElementVNode("img", {
24539
+ class: normalizeClass(`icons icons-${_ctx.status} icons-${_ctx.status}-${_ctx.notificationType}`),
24540
+ src: _ctx.getIconUrl()
24541
+ }, null, 10, _hoisted_3$6)
24542
+ ], 2),
24543
+ createElementVNode("div", _hoisted_4$4, [
24544
+ createElementVNode("div", {
24545
+ class: normalizeClass(`title title-${_ctx.notificationType}`)
24546
+ }, toDisplayString(_ctx.limitTitle(_ctx.title, _ctx.notificationType)), 3),
24547
+ !["bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString(_ctx.message.length >= 280 ? `${_ctx.message.substring(0, 280)}..` : _ctx.message), 1)) : createCommentVNode("", true)
24548
+ ]),
24549
+ !["toast", "bottom-message"].includes(_ctx.notificationType) ? (openBlock(), createElementBlock("div", {
24550
+ key: 0,
24551
+ class: normalizeClass(`buttons ${_ctx.notificationType}`)
24552
+ }, [
24553
+ createElementVNode("button", _hoisted_6$1, toDisplayString(_ctx.notificationButton), 1),
24554
+ createElementVNode("button", {
24555
+ class: "btn btn-normal btn-secondary dismiss",
24556
+ onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.close && _ctx.close(...args), ["prevent"]))
24557
+ }, toDisplayString(_ctx.buttonDismiss), 1)
24558
+ ], 2)) : createCommentVNode("", true)
24559
+ ], 2)
24560
+ ], 2)) : createCommentVNode("", true)
24561
+ ], 2);
24177
24562
  }
24178
- var NumberRange = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$3]]);
24563
+ var Notification = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$2]]);
24179
24564
  var PasswordField_vue_vue_type_style_index_0_scoped_true_lang = "";
24180
- const _hoisted_1$b = { class: "password__panel" };
24181
- const _hoisted_2$a = ["placeholder", "type"];
24182
- const _hoisted_3$6 = { class: "icon is-right" };
24565
+ const _hoisted_1$a = { class: "password__panel" };
24566
+ const _hoisted_2$9 = ["placeholder", "type"];
24567
+ const _hoisted_3$5 = { class: "icon is-right" };
24183
24568
  const _hoisted_4$3 = {
24184
24569
  key: 0,
24185
24570
  class: "password__tooltip"
24186
24571
  };
24187
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
24572
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
24188
24573
  __name: "PasswordField",
24189
24574
  props: {
24190
24575
  modelValue: {
@@ -24240,7 +24625,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
24240
24625
  onMounted(() => () => password.value = props.modelValue || "");
24241
24626
  watch(props, () => (password.value = props.modelValue || "", hasMinimumLength.value = password.value.length > 11, hasNumber.value = /\d/.test(password.value), hasSpecial.value = /[!@#$%^&*)(+=._-]/.test(password.value)));
24242
24627
  return (_ctx, _cache) => {
24243
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
24628
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
24244
24629
  withDirectives(createElementVNode("input", {
24245
24630
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => password.value = $event),
24246
24631
  class: "form__input password__panel_input",
@@ -24250,7 +24635,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
24250
24635
  onFocus,
24251
24636
  onFocusout: outFocus,
24252
24637
  onKeyup: emitChanged
24253
- }, null, 40, _hoisted_2$a), [
24638
+ }, null, 40, _hoisted_2$9), [
24254
24639
  [vModelDynamic, password.value]
24255
24640
  ]),
24256
24641
  createElementVNode("button", {
@@ -24258,7 +24643,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
24258
24643
  type: "button",
24259
24644
  onClick: toggleShow
24260
24645
  }, [
24261
- createElementVNode("span", _hoisted_3$6, [
24646
+ createElementVNode("span", _hoisted_3$5, [
24262
24647
  createVNode(DhIcon, {
24263
24648
  active: isActive.value,
24264
24649
  "icon-name": showPassword.value ? "invisible" : "visible",
@@ -24302,13 +24687,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
24302
24687
  };
24303
24688
  }
24304
24689
  });
24305
- var PasswordField = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3ae35090"]]);
24690
+ var PasswordField = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-3ae35090"]]);
24306
24691
  var RadioBox_vue_vue_type_style_index_0_scoped_true_lang = "";
24307
- const _hoisted_1$a = { class: "radio" };
24308
- const _hoisted_2$9 = ["for"];
24309
- const _hoisted_3$5 = ["id", "type", "value"];
24692
+ const _hoisted_1$9 = { class: "radio" };
24693
+ const _hoisted_2$8 = ["for"];
24694
+ const _hoisted_3$4 = ["id", "type", "value"];
24310
24695
  const _hoisted_4$2 = { class: "radio__label_txt" };
24311
- const _sfc_main$a = {
24696
+ const _sfc_main$9 = {
24312
24697
  __name: "RadioBox",
24313
24698
  props: {
24314
24699
  type: {
@@ -24327,7 +24712,7 @@ const _sfc_main$a = {
24327
24712
  emits: ["clickBox"],
24328
24713
  setup(__props, { emit }) {
24329
24714
  return (_ctx, _cache) => {
24330
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
24715
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
24331
24716
  createElementVNode("label", {
24332
24717
  class: "radio__label",
24333
24718
  for: __props.value
@@ -24339,16 +24724,16 @@ const _sfc_main$a = {
24339
24724
  type: __props.type,
24340
24725
  value: __props.value,
24341
24726
  onClick: _cache[0] || (_cache[0] = ($event) => emit("clickBox"))
24342
- }, null, 8, _hoisted_3$5),
24727
+ }, null, 8, _hoisted_3$4),
24343
24728
  createElementVNode("span", _hoisted_4$2, toDisplayString(__props.label), 1)
24344
- ], 8, _hoisted_2$9)
24729
+ ], 8, _hoisted_2$8)
24345
24730
  ]);
24346
24731
  };
24347
24732
  }
24348
24733
  };
24349
- var DhRadioBox = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-29696bd5"]]);
24734
+ var DhRadioBox = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-29696bd5"]]);
24350
24735
  var RadioBoxGroup_vue_vue_type_style_index_0_lang = "";
24351
- const _sfc_main$9 = {
24736
+ const _sfc_main$8 = {
24352
24737
  __name: "RadioBoxGroup",
24353
24738
  props: {
24354
24739
  orientation: {
@@ -24400,9 +24785,9 @@ const _sfc_main$9 = {
24400
24785
  }
24401
24786
  };
24402
24787
  var SearchInput_vue_vue_type_style_index_0_scoped_true_lang = "";
24403
- const _hoisted_1$9 = { class: "search-panel" };
24404
- const _hoisted_2$8 = ["placeholder"];
24405
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24788
+ const _hoisted_1$8 = { class: "search-panel" };
24789
+ const _hoisted_2$7 = ["placeholder"];
24790
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
24406
24791
  __name: "SearchInput",
24407
24792
  props: {
24408
24793
  modelValue: {
@@ -24430,14 +24815,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24430
24815
  onMounted(() => () => search.value = props.modelValue || "");
24431
24816
  watch(props, () => search.value = props.modelValue || "");
24432
24817
  return (_ctx, _cache) => {
24433
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
24818
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
24434
24819
  withDirectives(createElementVNode("input", {
24435
24820
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
24436
24821
  class: "form-input search-panel-input",
24437
24822
  "data-e2e": "search-input",
24438
24823
  placeholder: props.placeholder,
24439
24824
  onKeyup: emitChanged
24440
- }, null, 40, _hoisted_2$8), [
24825
+ }, null, 40, _hoisted_2$7), [
24441
24826
  [vModelText, search.value]
24442
24827
  ]),
24443
24828
  !search.value ? (openBlock(), createElementBlock("button", {
@@ -24468,12 +24853,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24468
24853
  };
24469
24854
  }
24470
24855
  });
24471
- var SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-562faa14"]]);
24856
+ var SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-562faa14"]]);
24472
24857
  var Stepper_vue_vue_type_style_index_0_scoped_true_lang = "";
24473
24858
  const _withScopeId = (n) => (pushScopeId("data-v-0213b522"), n = n(), popScopeId(), n);
24474
- const _hoisted_1$8 = { class: "stepper" };
24475
- const _hoisted_2$7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("hr", { class: "solid" }, null, -1));
24476
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
24859
+ const _hoisted_1$7 = { class: "stepper" };
24860
+ const _hoisted_2$6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("hr", { class: "solid" }, null, -1));
24861
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
24477
24862
  __name: "Stepper",
24478
24863
  props: {
24479
24864
  maxSteps: {
@@ -24491,7 +24876,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
24491
24876
  return Array.from(Array(props.maxSteps || 0).keys());
24492
24877
  }
24493
24878
  return (_ctx, _cache) => {
24494
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
24879
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
24495
24880
  (openBlock(true), createElementBlock(Fragment, null, renderList(getSteps(), (step, id) => {
24496
24881
  return openBlock(), createElementBlock("div", {
24497
24882
  key: id,
@@ -24500,63 +24885,14 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
24500
24885
  createElementVNode("span", {
24501
24886
  class: normalizeClass(["step-number", { active: step === __props.currentStep }])
24502
24887
  }, toDisplayString(step + 1), 3),
24503
- _hoisted_2$7
24888
+ _hoisted_2$6
24504
24889
  ]);
24505
24890
  }), 128))
24506
24891
  ]);
24507
24892
  };
24508
24893
  }
24509
24894
  });
24510
- var Stepper = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-0213b522"]]);
24511
- const _sfc_main$6 = defineComponent({
24512
- props: {
24513
- data: {
24514
- type: Boolean,
24515
- required: true,
24516
- default: false
24517
- },
24518
- label: {
24519
- type: String,
24520
- default: "Label"
24521
- }
24522
- },
24523
- data() {
24524
- return {
24525
- active: this.data
24526
- };
24527
- },
24528
- emits: ["change"],
24529
- computed: {
24530
- checkedValue: {
24531
- get() {
24532
- return this.data;
24533
- },
24534
- set(newValue) {
24535
- this.active = newValue;
24536
- this.$emit("change", newValue);
24537
- }
24538
- }
24539
- }
24540
- });
24541
- const _hoisted_1$7 = { class: "dp__options" };
24542
- const _hoisted_2$6 = { class: "dp__options_switch" };
24543
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("span", { class: "dp__options_slider" }, null, -1);
24544
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
24545
- return openBlock(), createElementBlock("label", _hoisted_1$7, [
24546
- createElementVNode("span", null, toDisplayString(_ctx.label), 1),
24547
- createElementVNode("div", _hoisted_2$6, [
24548
- withDirectives(createElementVNode("input", {
24549
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.checkedValue = $event),
24550
- name: "switch",
24551
- type: "checkbox"
24552
- }, null, 512), [
24553
- [vModelCheckbox, _ctx.checkedValue]
24554
- ]),
24555
- _hoisted_3$4
24556
- ])
24557
- ]);
24558
- }
24559
- var Switch = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$2]]);
24895
+ var Stepper = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-0213b522"]]);
24560
24896
  const _sfc_main$5 = defineComponent({
24561
24897
  props: {
24562
24898
  target: { type: String, required: true },
@@ -27325,4 +27661,4 @@ const _sfc_main = {
27325
27661
  };
27326
27662
  }
27327
27663
  };
27328
- export { DhAdvancedFilter, _sfc_main$i as DhDatePicker, DropdownMenu as DhDropdownMenu, _sfc_main$h as DhError, ExpansionPanel as DhExpansionPanel, _sfc_main$g as DhFileUpload, DhIcon, _sfc_main$1 as DhInputDropdown, _sfc_main as DhInputList, Modal as DhModal, Notification as DhNotification, NumberRange as DhNumberRange, PasswordField as DhPasswordField, DhRadioBox, _sfc_main$9 as DhRadioBoxGroup, SearchInput as DhSearchInput, Stepper as DhStepper, Switch as DhSwitch, Tooltip as DhTooltip, VerificationCode as DhVerificationCode };
27664
+ export { _sfc_main$g as DhAdvancedDatePicker, DhAdvancedFilter, _sfc_main$f as DhDatePicker, DropdownMenu as DhDropdownMenu, _sfc_main$e as DhError, ExpansionPanel as DhExpansionPanel, _sfc_main$d as DhFileUpload, DhIcon, _sfc_main$1 as DhInputDropdown, _sfc_main as DhInputList, Modal as DhModal, Notification as DhNotification, DhNumberRange, PasswordField as DhPasswordField, DhRadioBox, _sfc_main$8 as DhRadioBoxGroup, SearchInput as DhSearchInput, Stepper as DhStepper, DhSwitch, Tooltip as DhTooltip, VerificationCode as DhVerificationCode };