@deskhero/dh_ui 2.0.4 → 2.0.5

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
@@ -10875,7 +10875,7 @@ const _sfc_main$r = defineComponent({
10875
10875
  });
10876
10876
  const _hoisted_1$r = { class: "dp__options" };
10877
10877
  const _hoisted_2$p = { class: "dp__options_switch" };
10878
- const _hoisted_3$h = /* @__PURE__ */ createElementVNode("span", { class: "dp__options_slider" }, null, -1);
10878
+ const _hoisted_3$g = /* @__PURE__ */ createElementVNode("span", { class: "dp__options_slider" }, null, -1);
10879
10879
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
10880
10880
  return openBlock(), createElementBlock("label", _hoisted_1$r, [
10881
10881
  createElementVNode("span", null, toDisplayString(_ctx.label), 1),
@@ -10887,7 +10887,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
10887
10887
  }, null, 512), [
10888
10888
  [vModelCheckbox, _ctx.checkedValue]
10889
10889
  ]),
10890
- _hoisted_3$h
10890
+ _hoisted_3$g
10891
10891
  ])
10892
10892
  ]);
10893
10893
  }
@@ -23093,7 +23093,7 @@ const _sfc_main$q = {
23093
23093
  };
23094
23094
  const _hoisted_1$q = { class: "bar" };
23095
23095
  const _hoisted_2$o = ["min", "max", "step", "value"];
23096
- const _hoisted_3$g = { class: "caption" };
23096
+ const _hoisted_3$f = { class: "caption" };
23097
23097
  const _hoisted_4$c = { class: "min-caption" };
23098
23098
  const _hoisted_5$8 = { class: "bar-inner" };
23099
23099
  const _hoisted_6$8 = ["min", "max", "step", "value"];
@@ -23136,7 +23136,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
23136
23136
  onMousedown: _cache[2] || (_cache[2] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args)),
23137
23137
  onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.onLeftThumbMousedown && $options.onLeftThumbMousedown(...args))
23138
23138
  }, [
23139
- createElementVNode("div", _hoisted_3$g, [
23139
+ createElementVNode("div", _hoisted_3$f, [
23140
23140
  createElementVNode("span", _hoisted_4$c, toDisplayString($props.minCaption || $options.barMinVal), 1)
23141
23141
  ])
23142
23142
  ], 32),
@@ -23412,7 +23412,7 @@ const _sfc_main$p = defineComponent({
23412
23412
  });
23413
23413
  const _hoisted_1$p = { class: "dh-range-container" };
23414
23414
  const _hoisted_2$n = { class: "bar-chart" };
23415
- const _hoisted_3$f = {
23415
+ const _hoisted_3$e = {
23416
23416
  key: 0,
23417
23417
  class: "input-group-section"
23418
23418
  };
@@ -23448,7 +23448,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
23448
23448
  onInput: _ctx.updateBarChart
23449
23449
  }, null, 8, ["base-class-name", "max", "max-caption", "max-value", "min-caption", "min-value", "onInput"])
23450
23450
  ]),
23451
- _ctx.includeForm ? (openBlock(), createElementBlock("div", _hoisted_3$f, [
23451
+ _ctx.includeForm ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
23452
23452
  createElementVNode("div", _hoisted_4$b, [
23453
23453
  createElementVNode("label", {
23454
23454
  class: normalizeClass(`dh-body-2 input-to ${_ctx.validated ? "disable" : ""}`)
@@ -23496,7 +23496,7 @@ const _hoisted_2$m = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
23496
23496
  /* @__PURE__ */ createElementVNode("p", null, "From"),
23497
23497
  /* @__PURE__ */ createElementVNode("p", null, "To")
23498
23498
  ], -1));
23499
- const _hoisted_3$e = { class: "dp__multi" };
23499
+ const _hoisted_3$d = { class: "dp__multi" };
23500
23500
  const _hoisted_4$a = ["value"];
23501
23501
  const _hoisted_5$6 = ["value"];
23502
23502
  const _hoisted_6$6 = /* @__PURE__ */ createTextVNode(" Back ");
@@ -23632,7 +23632,7 @@ const _sfc_main$o = {
23632
23632
  onClosed: reOpen
23633
23633
  }, {
23634
23634
  "dp-input": withCtx(() => [
23635
- createElementVNode("div", _hoisted_3$e, [
23635
+ createElementVNode("div", _hoisted_3$d, [
23636
23636
  createElementVNode("input", {
23637
23637
  class: "dp__input dp__multi_input",
23638
23638
  placeholder: "MM/DD/YYYY",
@@ -23806,7 +23806,7 @@ const _sfc_main$n = defineComponent({
23806
23806
  });
23807
23807
  const _hoisted_1$n = { class: "dh-advanced-filter-container" };
23808
23808
  const _hoisted_2$l = { class: "advance_section" };
23809
- const _hoisted_3$d = { key: 0 };
23809
+ const _hoisted_3$c = { key: 0 };
23810
23810
  const _hoisted_4$9 = { class: "list-none" };
23811
23811
  const _hoisted_5$5 = ["checked"];
23812
23812
  const _hoisted_6$5 = ["checked"];
@@ -23825,7 +23825,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
23825
23825
  size: 20
23826
23826
  }, null, 8, ["icon-name"])
23827
23827
  ]),
23828
- _ctx.activeFilter ? (openBlock(), createElementBlock("div", _hoisted_3$d, [
23828
+ _ctx.activeFilter ? (openBlock(), createElementBlock("div", _hoisted_3$c, [
23829
23829
  renderSlot(_ctx.$slots, "default"),
23830
23830
  createElementVNode("ul", _hoisted_4$9, [
23831
23831
  createElementVNode("li", null, [
@@ -23871,7 +23871,7 @@ const _hoisted_2$k = {
23871
23871
  key: 1,
23872
23872
  class: "prepend-icon"
23873
23873
  };
23874
- const _hoisted_3$c = { class: "append-icon" };
23874
+ const _hoisted_3$b = { class: "append-icon" };
23875
23875
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
23876
23876
  __name: "Button",
23877
23877
  props: {
@@ -23959,7 +23959,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23959
23959
  "icon-name": __props.icon,
23960
23960
  size: 24
23961
23961
  }, null, 8, ["icon-name"])) : createCommentVNode("", true),
23962
- createElementVNode("div", _hoisted_3$c, [
23962
+ createElementVNode("div", _hoisted_3$b, [
23963
23963
  renderSlot(_ctx.$slots, "append-icon", {}, void 0, true)
23964
23964
  ])
23965
23965
  ], 10, _hoisted_1$m);
@@ -23998,7 +23998,7 @@ const _sfc_main$l = defineComponent({
23998
23998
  });
23999
23999
  const _hoisted_1$l = ["placement", "target", "tooltipText", "trigger"];
24000
24000
  const _hoisted_2$j = ["id"];
24001
- const _hoisted_3$b = { class: "text" };
24001
+ const _hoisted_3$a = { class: "text" };
24002
24002
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
24003
24003
  return openBlock(), createElementBlock("div", {
24004
24004
  id: "main-contain",
@@ -24017,7 +24017,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
24017
24017
  ref: _ctx.target,
24018
24018
  class: normalizeClass(`tooltiptext ${_ctx.show}`)
24019
24019
  }, [
24020
- createElementVNode("span", _hoisted_3$b, toDisplayString(_ctx.tooltipText), 1)
24020
+ createElementVNode("span", _hoisted_3$a, toDisplayString(_ctx.tooltipText), 1)
24021
24021
  ], 10, _hoisted_2$j)
24022
24022
  ], 40, _hoisted_1$l);
24023
24023
  }
@@ -24435,7 +24435,7 @@ const _hoisted_2$e = {
24435
24435
  key: 0,
24436
24436
  class: "file__upload_items"
24437
24437
  };
24438
- const _hoisted_3$a = { class: "file__upload_list_item" };
24438
+ const _hoisted_3$9 = { class: "file__upload_list_item" };
24439
24439
  const _hoisted_4$8 = { class: "file__upload_list_item_label" };
24440
24440
  const _hoisted_5$4 = ["title"];
24441
24441
  const _hoisted_6$4 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
@@ -24718,7 +24718,7 @@ const _sfc_main$e = {
24718
24718
  "icon-name": `file-` + iconName(file.label),
24719
24719
  size: 40
24720
24720
  }, null, 8, ["icon-name"]),
24721
- createElementVNode("div", _hoisted_3$a, [
24721
+ createElementVNode("div", _hoisted_3$9, [
24722
24722
  createElementVNode("div", _hoisted_4$8, [
24723
24723
  createElementVNode("div", null, [
24724
24724
  createElementVNode("span", {
@@ -24874,7 +24874,7 @@ const _sfc_main$e = {
24874
24874
  var InputDropdown_vue_vue_type_style_index_0_lang = "";
24875
24875
  const _hoisted_1$d = { class: "input__dropdown" };
24876
24876
  const _hoisted_2$d = ["placeholder", "value"];
24877
- const _hoisted_3$9 = { class: "input__dropdown_second" };
24877
+ const _hoisted_3$8 = { class: "input__dropdown_second" };
24878
24878
  const _hoisted_4$7 = ["tabindex"];
24879
24879
  const _hoisted_5$3 = ["onClick"];
24880
24880
  const _hoisted_6$3 = ["onClick"];
@@ -24988,7 +24988,7 @@ const _sfc_main$d = {
24988
24988
  value: __props.inputValue,
24989
24989
  onInput: update
24990
24990
  }, null, 44, _hoisted_2$d),
24991
- createElementVNode("div", _hoisted_3$9, [
24991
+ createElementVNode("div", _hoisted_3$8, [
24992
24992
  createVNode(DhIcon, {
24993
24993
  "icon-name": __props.icon,
24994
24994
  size: 18
@@ -25157,7 +25157,7 @@ const _hoisted_2$b = {
25157
25157
  key: 1,
25158
25158
  class: "input__group"
25159
25159
  };
25160
- const _hoisted_3$8 = ["placeholder", "type", "value"];
25160
+ const _hoisted_3$7 = ["placeholder", "type", "value"];
25161
25161
  const _sfc_main$b = {
25162
25162
  __name: "InputGroup",
25163
25163
  props: {
@@ -25234,7 +25234,7 @@ const _sfc_main$b = {
25234
25234
  type: __props.inputType,
25235
25235
  value: __props.modelValue,
25236
25236
  onInput: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", $event.target.value))
25237
- }, null, 40, _hoisted_3$8),
25237
+ }, null, 40, _hoisted_3$7),
25238
25238
  createVNode(DhIcon, {
25239
25239
  class: "input__group_icon",
25240
25240
  "icon-name": __props.iconName
@@ -27090,7 +27090,7 @@ var script = {
27090
27090
  };
27091
27091
  const _hoisted_1$a = ["id", "dir"];
27092
27092
  const _hoisted_2$a = ["tabindex", "aria-controls", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable", "role"];
27093
- const _hoisted_3$7 = ["type", "modelValue", "value", "autocomplete", "id", "aria-controls", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"];
27093
+ const _hoisted_3$6 = ["type", "modelValue", "value", "autocomplete", "id", "aria-controls", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"];
27094
27094
  const _hoisted_4$6 = ["onKeyup", "aria-label"];
27095
27095
  const _hoisted_5$2 = ["onClick"];
27096
27096
  const _hoisted_6$2 = ["type", "modelValue", "value", "id", "autocomplete", "aria-controls", "aria-placeholder", "aria-expanded", "aria-activedescendant", "aria-multiselectable"];
@@ -27153,7 +27153,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
27153
27153
  }, {
27154
27154
  ...$props.attrs,
27155
27155
  ..._ctx.arias
27156
- }), null, 16, _hoisted_3$7)) : createCommentVNode("v-if", true),
27156
+ }), null, 16, _hoisted_3$6)) : createCommentVNode("v-if", true),
27157
27157
  createCommentVNode(" Tags (with search) "),
27158
27158
  $props.mode == "tags" ? (openBlock(), createElementBlock("div", {
27159
27159
  key: 1,
@@ -27439,7 +27439,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
27439
27439
  }
27440
27440
  script.render = render$1;
27441
27441
  script.__file = "src/Multiselect.vue";
27442
- var default_css_vue_type_style_index_0_src_af046b06_lang = "";
27442
+ var default_css_vue_type_style_index_0_src_9d166d1a_lang = "";
27443
27443
  var InputList_vue_vue_type_style_index_1_lang = "";
27444
27444
  const _hoisted_1$9 = /* @__PURE__ */ createElementVNode("img", {
27445
27445
  alt: "",
@@ -27447,7 +27447,6 @@ const _hoisted_1$9 = /* @__PURE__ */ createElementVNode("img", {
27447
27447
  src: _imports_0
27448
27448
  }, null, -1);
27449
27449
  const _hoisted_2$9 = { class: "list__item_text" };
27450
- const _hoisted_3$6 = ["id"];
27451
27450
  const _sfc_main$a = {
27452
27451
  __name: "InputList",
27453
27452
  props: {
@@ -27463,13 +27462,9 @@ const _sfc_main$a = {
27463
27462
  type: String,
27464
27463
  default: "label"
27465
27464
  },
27466
- idProp: {
27465
+ valueProp: {
27467
27466
  type: String,
27468
- default: "value"
27469
- },
27470
- selectItems: {
27471
- type: Array,
27472
- required: true
27467
+ default: "id"
27473
27468
  },
27474
27469
  canClear: {
27475
27470
  type: Boolean,
@@ -27480,16 +27475,26 @@ const _sfc_main$a = {
27480
27475
  type: String,
27481
27476
  required: false,
27482
27477
  default: "Start typing..."
27478
+ },
27479
+ modelValue: {
27480
+ type: [Object, Array],
27481
+ required: false,
27482
+ default: null
27483
27483
  }
27484
27484
  },
27485
27485
  emits: ["update", "select", "deselect", "clear"],
27486
27486
  setup(__props, { emit }) {
27487
27487
  const props = __props;
27488
27488
  useCssVars((_ctx) => ({
27489
- "07bf1a7a": __props.maxHeight
27489
+ "7445a9c7": __props.maxHeight
27490
27490
  }));
27491
- const inputVal = ref([]);
27492
- const uniqueId = ref("");
27491
+ const computedValue = computed({
27492
+ get() {
27493
+ return props.modelValue;
27494
+ },
27495
+ set() {
27496
+ }
27497
+ });
27493
27498
  function select(v) {
27494
27499
  emit("select", v);
27495
27500
  }
@@ -27502,70 +27507,41 @@ const _sfc_main$a = {
27502
27507
  function clear2() {
27503
27508
  emit("clear");
27504
27509
  }
27505
- function generateUniqueId() {
27506
- const timestamp = Date.now().toString(36);
27507
- const randomNum = Math.random().toString(36).substring(2, 9);
27508
- return timestamp + randomNum;
27509
- }
27510
- onMounted(() => {
27511
- uniqueId.value = generateUniqueId();
27512
- });
27513
- watch(() => props.selectItems, (oldValue, newValue) => {
27514
- if (!oldValue) {
27515
- return;
27516
- }
27517
- const selected = props.list.filter((item) => oldValue.includes(item[props.idProp]));
27518
- if (JSON.stringify(selected) !== JSON.stringify(inputVal.value)) {
27519
- inputVal.value = [...inputVal.value, ...selected];
27520
- inputVal.value = [...new Set(inputVal.value)];
27521
- }
27522
- if (newValue.length > oldValue.length) {
27523
- const difference = newValue.filter((x2) => !oldValue.includes(x2));
27524
- inputVal.value = inputVal.value.filter((item) => !difference.includes(item[props.idProp]));
27525
- }
27526
- });
27527
27510
  return (_ctx, _cache) => {
27528
- return openBlock(), createElementBlock(Fragment, null, [
27529
- createVNode(unref(script), {
27530
- modelValue: inputVal.value,
27531
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event),
27532
- label: __props.labelProp,
27533
- mode: "tags",
27534
- canClear: props.canClear,
27535
- native: false,
27536
- object: true,
27537
- options: __props.list,
27538
- placeholder: props.placeholder,
27539
- searchable: true,
27540
- "value-prop": __props.idProp,
27541
- onChange: _cache[1] || (_cache[1] = (v) => update(v)),
27542
- onDeselect: _cache[2] || (_cache[2] = (v) => deselect(v)),
27543
- onSelect: _cache[3] || (_cache[3] = (v) => select(v)),
27544
- onClear: _cache[4] || (_cache[4] = ($event) => clear2())
27545
- }, {
27546
- tag: withCtx(({ option, handleTagRemove, disabled }) => [
27547
- (openBlock(), createBlock(Teleport, {
27548
- to: "#" + uniqueId.value
27549
- }, [
27550
- createElementVNode("div", {
27551
- class: normalizeClass(["list__item", { "is-disabled": disabled }])
27552
- }, [
27553
- _hoisted_1$9,
27554
- createElementVNode("p", _hoisted_2$9, toDisplayString(option[__props.labelProp]), 1),
27555
- createVNode(DhIcon, {
27556
- class: "list__item_icon",
27557
- "icon-name": "delete",
27558
- size: 24,
27559
- onClick: ($event) => handleTagRemove(option, $event)
27560
- }, null, 8, ["onClick"]),
27561
- renderSlot(_ctx.$slots, "default")
27562
- ], 2)
27563
- ], 8, ["to"]))
27564
- ]),
27565
- _: 3
27566
- }, 8, ["modelValue", "label", "canClear", "options", "placeholder", "value-prop"]),
27567
- createElementVNode("div", { id: uniqueId.value }, null, 8, _hoisted_3$6)
27568
- ], 64);
27511
+ return openBlock(), createBlock(unref(script), {
27512
+ modelValue: unref(computedValue),
27513
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(computedValue) ? computedValue.value = $event : null),
27514
+ label: __props.labelProp,
27515
+ mode: "tags",
27516
+ canClear: props.canClear,
27517
+ native: false,
27518
+ object: true,
27519
+ options: __props.list,
27520
+ placeholder: props.placeholder,
27521
+ searchable: true,
27522
+ "value-prop": __props.valueProp,
27523
+ onChange: _cache[1] || (_cache[1] = (v) => update(v)),
27524
+ onDeselect: _cache[2] || (_cache[2] = (v) => deselect(v)),
27525
+ onSelect: _cache[3] || (_cache[3] = (v) => select(v)),
27526
+ onClear: _cache[4] || (_cache[4] = ($event) => clear2())
27527
+ }, {
27528
+ tag: withCtx(({ option, handleTagRemove, disabled }) => [
27529
+ createElementVNode("div", {
27530
+ class: normalizeClass(["list__item", { "is-disabled": disabled }])
27531
+ }, [
27532
+ _hoisted_1$9,
27533
+ createElementVNode("p", _hoisted_2$9, toDisplayString(option[__props.labelProp]), 1),
27534
+ createVNode(DhIcon, {
27535
+ class: "list__item_icon",
27536
+ "icon-name": "delete",
27537
+ size: 24,
27538
+ onMousedown: withModifiers(($event) => handleTagRemove(option, $event), ["prevent"])
27539
+ }, null, 8, ["onMousedown"]),
27540
+ renderSlot(_ctx.$slots, "default")
27541
+ ], 2)
27542
+ ]),
27543
+ _: 3
27544
+ }, 8, ["modelValue", "label", "canClear", "options", "placeholder", "value-prop"]);
27569
27545
  };
27570
27546
  }
27571
27547
  };