@deskhero/dh_ui 1.36.2 → 1.36.4

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,4 +1,4 @@
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, toRefs, getCurrentInstance, vModelDynamic, vModelText, pushScopeId, popScopeId } 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, toRefs, getCurrentInstance, useCssVars, vModelDynamic, vModelText, pushScopeId, popScopeId } from "vue";
2
2
  var main$1 = "";
3
3
  function toInteger(dirtyNumber) {
4
4
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
@@ -23070,7 +23070,7 @@ const _hoisted_1$k = { class: "bar" };
23070
23070
  const _hoisted_2$j = ["min", "max", "step", "value"];
23071
23071
  const _hoisted_3$d = { class: "caption" };
23072
23072
  const _hoisted_4$a = { class: "min-caption" };
23073
- const _hoisted_5$7 = { class: "bar-inner" };
23073
+ const _hoisted_5$8 = { class: "bar-inner" };
23074
23074
  const _hoisted_6$7 = ["min", "max", "step", "value"];
23075
23075
  const _hoisted_7$6 = { class: "caption" };
23076
23076
  const _hoisted_8$3 = { class: "max-caption" };
@@ -23115,7 +23115,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
23115
23115
  createElementVNode("span", _hoisted_4$a, toDisplayString($props.minCaption || $options.barMinVal), 1)
23116
23116
  ])
23117
23117
  ], 32),
23118
- createElementVNode("div", _hoisted_5$7, [
23118
+ createElementVNode("div", _hoisted_5$8, [
23119
23119
  createElementVNode("div", {
23120
23120
  class: "bar-inner-left",
23121
23121
  onClick: _cache[4] || (_cache[4] = (...args) => $options.onInnerBarLeftClick && $options.onInnerBarLeftClick(...args))
@@ -23237,7 +23237,7 @@ const _hoisted_1$j = { class: "dh-advanced-filter-container" };
23237
23237
  const _hoisted_2$i = { class: "advance_section" };
23238
23238
  const _hoisted_3$c = { key: 0 };
23239
23239
  const _hoisted_4$9 = { class: "list-none" };
23240
- const _hoisted_5$6 = ["checked"];
23240
+ const _hoisted_5$7 = ["checked"];
23241
23241
  const _hoisted_6$6 = ["checked"];
23242
23242
  const _hoisted_7$5 = ["checked"];
23243
23243
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
@@ -23264,7 +23264,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
23264
23264
  name: "number_filter",
23265
23265
  type: "checkbox",
23266
23266
  onChange: _cache[1] || (_cache[1] = ($event) => _ctx.missingFilter())
23267
- }, null, 40, _hoisted_5$6),
23267
+ }, null, 40, _hoisted_5$7),
23268
23268
  createTextVNode(" " + toDisplayString(_ctx.filterMissingText), 1)
23269
23269
  ])
23270
23270
  ]),
@@ -23557,7 +23557,7 @@ const _hoisted_3$b = {
23557
23557
  class: "input-group-section"
23558
23558
  };
23559
23559
  const _hoisted_4$8 = { class: "input-group sb-input" };
23560
- const _hoisted_5$5 = ["disabled", "max", "value"];
23560
+ const _hoisted_5$6 = ["disabled", "max", "value"];
23561
23561
  const _hoisted_6$5 = { class: "input-group sb-input" };
23562
23562
  const _hoisted_7$4 = ["disabled", "max", "min", "value"];
23563
23563
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
@@ -23604,7 +23604,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
23604
23604
  type: "number",
23605
23605
  value: `${_ctx.min}`,
23606
23606
  onInput: _cache[0] || (_cache[0] = ($event) => _ctx.changeMin($event))
23607
- }, null, 40, _hoisted_5$5)
23607
+ }, null, 40, _hoisted_5$6)
23608
23608
  ]),
23609
23609
  createElementVNode("div", _hoisted_6$5, [
23610
23610
  createElementVNode("label", {
@@ -23645,7 +23645,7 @@ const _hoisted_2$g = /* @__PURE__ */ createElementVNode("div", { class: "dp__cal
23645
23645
  ], -1);
23646
23646
  const _hoisted_3$a = { class: "dp__multi" };
23647
23647
  const _hoisted_4$7 = ["value"];
23648
- const _hoisted_5$4 = ["value"];
23648
+ const _hoisted_5$5 = ["value"];
23649
23649
  const _hoisted_6$4 = /* @__PURE__ */ createTextVNode(" Back ");
23650
23650
  const _hoisted_7$3 = ["onClick"];
23651
23651
  const _hoisted_8$2 = ["onClick"];
@@ -23792,7 +23792,7 @@ const _sfc_main$h = {
23792
23792
  type: "text",
23793
23793
  value: maxDate.value ? maxDate.value : date.value[1],
23794
23794
  onInput: _cache[1] || (_cache[1] = ($event) => changeSecondDate($event))
23795
- }, null, 40, _hoisted_5$4)
23795
+ }, null, 40, _hoisted_5$5)
23796
23796
  ])
23797
23797
  ]),
23798
23798
  "arrow-left": withCtx(() => [
@@ -24224,7 +24224,7 @@ const _hoisted_2$b = {
24224
24224
  };
24225
24225
  const _hoisted_3$9 = { class: "file__upload_list_item" };
24226
24226
  const _hoisted_4$6 = { class: "file__upload_list_item_label" };
24227
- const _hoisted_5$3 = ["title"];
24227
+ const _hoisted_5$4 = ["title"];
24228
24228
  const _hoisted_6$3 = {
24229
24229
  key: 0,
24230
24230
  class: "label__antivirus"
@@ -24261,19 +24261,22 @@ const _sfc_main$b = {
24261
24261
  },
24262
24262
  modelValue: {
24263
24263
  type: FileList,
24264
- required: true
24264
+ required: false,
24265
+ default: void 0
24265
24266
  },
24266
24267
  inline: {
24267
24268
  type: Boolean,
24269
+ required: false,
24268
24270
  default: false
24269
24271
  },
24270
- errorOccured: {
24272
+ errorOccurred: {
24271
24273
  type: Array,
24272
24274
  required: true
24273
24275
  },
24274
24276
  errorMessage: {
24275
24277
  type: String,
24276
- default: "an error occured while uploading"
24278
+ required: false,
24279
+ default: "an error occurred while uploading"
24277
24280
  },
24278
24281
  fileSaved: {
24279
24282
  type: Boolean,
@@ -24285,22 +24288,27 @@ const _sfc_main$b = {
24285
24288
  },
24286
24289
  virusCheckText: {
24287
24290
  type: String,
24291
+ required: false,
24288
24292
  default: "Antivirus check ..."
24289
24293
  },
24290
24294
  virusCheckFailedText: {
24291
24295
  type: String,
24296
+ required: false,
24292
24297
  default: "Antivirus check failed"
24293
24298
  },
24294
24299
  virusDetectedText: {
24295
24300
  type: String,
24301
+ required: false,
24296
24302
  default: "Virus detected"
24297
24303
  },
24298
24304
  deleteConfirmationText: {
24299
24305
  type: String,
24306
+ required: false,
24300
24307
  default: "Are you sure you want to delete it permanently? this action will be irreversible"
24301
24308
  },
24302
24309
  zIndex: {
24303
24310
  type: Number,
24311
+ required: false,
24304
24312
  default: 99
24305
24313
  }
24306
24314
  },
@@ -24418,11 +24426,11 @@ const _sfc_main$b = {
24418
24426
  class: normalizeClass(["file__upload_list", __props.inline ? "" : "file__upload_list_box"])
24419
24427
  }, [
24420
24428
  createVNode(DhIcon, {
24421
- class: normalizeClass(__props.errorOccured[id] ? "file__upload_list_icon" : ""),
24429
+ class: normalizeClass(__props.errorOccurred[id] ? "file__upload_list_icon" : ""),
24422
24430
  "icon-name": `file-` + iconName(file.name),
24423
24431
  size: 40
24424
24432
  }, null, 8, ["class", "icon-name"]),
24425
- props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createBlock(DhIcon, {
24433
+ props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccurred[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createBlock(DhIcon, {
24426
24434
  key: 0,
24427
24435
  class: "file__upload_list_icon_sub file__upload_list_icon_sub--loading",
24428
24436
  "icon-name": "states",
@@ -24443,7 +24451,7 @@ const _sfc_main$b = {
24443
24451
  size: 20,
24444
24452
  style: normalizeStyle({ "z-index": props.zIndex })
24445
24453
  }, null, 8, ["style"])) : createCommentVNode("", true),
24446
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createBlock(DhIcon, {
24454
+ __props.fileSaved && __props.errorOccurred[id] ? (openBlock(), createBlock(DhIcon, {
24447
24455
  key: 3,
24448
24456
  class: "file__upload_list_icon_sub",
24449
24457
  "icon-name": "error",
@@ -24455,8 +24463,8 @@ const _sfc_main$b = {
24455
24463
  createElementVNode("div", null, [
24456
24464
  createElementVNode("span", {
24457
24465
  title: file.name
24458
- }, toDisplayString(getName(file.name)) + toDisplayString(getExtension(file.name)), 9, _hoisted_5$3),
24459
- props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccured[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createElementBlock("span", _hoisted_6$3, [
24466
+ }, toDisplayString(getName(file.name)) + toDisplayString(getExtension(file.name)), 9, _hoisted_5$4),
24467
+ props.uploadProgress[id] == 100 && __props.fileSaved && !__props.errorOccurred[id] && __props.virusCheck[id] == "loading" ? (openBlock(), createElementBlock("span", _hoisted_6$3, [
24460
24468
  createTextVNode(toDisplayString(__props.virusCheckText) + " ", 1),
24461
24469
  createVNode(DhIcon, {
24462
24470
  class: "file__upload_list_icon_sub--loading",
@@ -24467,8 +24475,8 @@ const _sfc_main$b = {
24467
24475
  props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "failed" ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString(__props.virusCheckFailedText), 1)) : createCommentVNode("", true),
24468
24476
  props.uploadProgress[id] == 100 && __props.fileSaved && __props.virusCheck[id] == "detected" ? (openBlock(), createElementBlock("span", _hoisted_8$1, toDisplayString(__props.virusDetectedText), 1)) : createCommentVNode("", true),
24469
24477
  _hoisted_9$1,
24470
- __props.fileSaved && !__props.errorOccured[id] || !__props.errorOccured[id] && __props.virusCheck[id] ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(formatBytes(file.size)), 1)) : createCommentVNode("", true),
24471
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
24478
+ __props.fileSaved && !__props.errorOccurred[id] || !__props.errorOccurred[id] && __props.virusCheck[id] ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(formatBytes(file.size)), 1)) : createCommentVNode("", true),
24479
+ __props.fileSaved && __props.errorOccurred[id] ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
24472
24480
  ]),
24473
24481
  !__props.fileSaved ? (openBlock(), createElementBlock("span", _hoisted_12$1, toDisplayString(props.uploadProgress[id]) + "%", 1)) : createCommentVNode("", true)
24474
24482
  ]),
@@ -24479,7 +24487,7 @@ const _sfc_main$b = {
24479
24487
  value: props.uploadProgress[id]
24480
24488
  }, toDisplayString(props.uploadProgress[id]) + "% ", 9, _hoisted_13$1)) : createCommentVNode("", true)
24481
24489
  ]),
24482
- __props.fileSaved && !__props.virusCheck[id] && !__props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
24490
+ __props.fileSaved && !__props.virusCheck[id] && !__props.errorOccurred[id] ? (openBlock(), createElementBlock("a", {
24483
24491
  key: 4,
24484
24492
  class: "file__upload_list_download",
24485
24493
  download: "",
@@ -24491,7 +24499,7 @@ const _sfc_main$b = {
24491
24499
  size: 24
24492
24500
  })
24493
24501
  ], 8, _hoisted_14$1)) : createCommentVNode("", true),
24494
- __props.fileSaved && __props.errorOccured[id] ? (openBlock(), createElementBlock("a", {
24502
+ __props.fileSaved && __props.errorOccurred[id] ? (openBlock(), createElementBlock("a", {
24495
24503
  key: 5,
24496
24504
  class: "file__upload_list_retry",
24497
24505
  onClick: _cache[3] || (_cache[3] = ($event) => reload($event))
@@ -24538,6 +24546,7 @@ const _hoisted_1$a = { class: "input__dropdown" };
24538
24546
  const _hoisted_2$a = { class: "input__dropdown_second" };
24539
24547
  const _hoisted_3$8 = ["tabindex"];
24540
24548
  const _hoisted_4$5 = ["onClick"];
24549
+ const _hoisted_5$3 = ["onClick"];
24541
24550
  const _sfc_main$a = {
24542
24551
  __name: "InputDropdown",
24543
24552
  props: {
@@ -24545,14 +24554,17 @@ const _sfc_main$a = {
24545
24554
  type: Array,
24546
24555
  required: true
24547
24556
  },
24557
+ labelProp: {
24558
+ type: String,
24559
+ default: "label"
24560
+ },
24548
24561
  icon: {
24549
24562
  type: String,
24550
24563
  required: true
24551
24564
  },
24552
- default: {
24565
+ placeholder: {
24553
24566
  type: String,
24554
- required: false,
24555
- default: null
24567
+ default: "select from menu"
24556
24568
  },
24557
24569
  tabindex: {
24558
24570
  type: Number,
@@ -24563,7 +24575,7 @@ const _sfc_main$a = {
24563
24575
  emits: ["update"],
24564
24576
  setup(__props, { emit }) {
24565
24577
  const props = __props;
24566
- const selected = ref(props.default ? props.default : props.list.length > 0 ? props.list[0] : null);
24578
+ const selected = ref(props.placeholder);
24567
24579
  const open = ref(false);
24568
24580
  const name = ref(null);
24569
24581
  onMounted(() => {
@@ -24595,20 +24607,36 @@ const _sfc_main$a = {
24595
24607
  class: normalizeClass(["custom__select_selected", { "custom__select--open": open.value }]),
24596
24608
  onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
24597
24609
  }, toDisplayString(selected.value), 3),
24598
- createElementVNode("div", {
24610
+ typeof __props.list[0] === "object" ? (openBlock(), createElementBlock("div", {
24611
+ key: 0,
24599
24612
  class: normalizeClass(["custom__select_items", { "custom__select--hide": !open.value }])
24600
24613
  }, [
24601
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (option, i2) => {
24614
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (option, index) => {
24602
24615
  return openBlock(), createElementBlock("div", {
24603
- key: i2,
24616
+ key: index,
24617
+ onClick: ($event) => {
24618
+ selected.value = option[__props.labelProp];
24619
+ open.value = false;
24620
+ update();
24621
+ }
24622
+ }, toDisplayString(option[__props.labelProp]), 9, _hoisted_4$5);
24623
+ }), 128))
24624
+ ], 2)) : createCommentVNode("", true),
24625
+ typeof __props.list[0] === "string" ? (openBlock(), createElementBlock("div", {
24626
+ key: 1,
24627
+ class: normalizeClass(["custom__select_items", { "custom__select--hide": !open.value }])
24628
+ }, [
24629
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (option, index) => {
24630
+ return openBlock(), createElementBlock("div", {
24631
+ key: index,
24604
24632
  onClick: ($event) => {
24605
24633
  selected.value = option;
24606
24634
  open.value = false;
24607
24635
  update();
24608
24636
  }
24609
- }, toDisplayString(option), 9, _hoisted_4$5);
24637
+ }, toDisplayString(option), 9, _hoisted_5$3);
24610
24638
  }), 128))
24611
- ], 2)
24639
+ ], 2)) : createCommentVNode("", true)
24612
24640
  ], 40, _hoisted_3$8)
24613
24641
  ])
24614
24642
  ]);
@@ -26811,7 +26839,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
26811
26839
  }
26812
26840
  script.render = render;
26813
26841
  script.__file = "src/Multiselect.vue";
26814
- var default_css_vue_type_style_index_0_src_14e9ea27_lang = "";
26842
+ var default_css_vue_type_style_index_0_src_11864558_lang = "";
26815
26843
  var InputList_vue_vue_type_style_index_1_lang = "";
26816
26844
  const _hoisted_1$8 = /* @__PURE__ */ createElementVNode("img", {
26817
26845
  alt: "",
@@ -26826,19 +26854,38 @@ const _sfc_main$9 = {
26826
26854
  list: {
26827
26855
  type: Array,
26828
26856
  required: true
26857
+ },
26858
+ maxHeight: {
26859
+ type: String,
26860
+ default: "200px"
26861
+ },
26862
+ labelProp: {
26863
+ type: String,
26864
+ default: "label"
26865
+ },
26866
+ idProp: {
26867
+ type: String,
26868
+ default: "id"
26829
26869
  }
26830
26870
  },
26831
26871
  setup(__props) {
26872
+ useCssVars((_ctx) => ({
26873
+ "6113b1b3": __props.maxHeight
26874
+ }));
26832
26875
  const value = ref(null);
26833
26876
  return (_ctx, _cache) => {
26834
26877
  return openBlock(), createElementBlock(Fragment, null, [
26835
26878
  createVNode(unref(script), {
26836
26879
  modelValue: value.value,
26837
26880
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
26881
+ label: __props.labelProp,
26838
26882
  mode: "tags",
26883
+ native: false,
26884
+ object: true,
26839
26885
  options: __props.list,
26840
26886
  placeholder: "Start typing a name",
26841
- searchable: true
26887
+ searchable: true,
26888
+ "value-prop": __props.idProp
26842
26889
  }, {
26843
26890
  tag: withCtx(({ option, handleTagRemove, disabled }) => [
26844
26891
  (openBlock(), createBlock(Teleport, { to: "#list" }, [
@@ -26846,7 +26893,7 @@ const _sfc_main$9 = {
26846
26893
  class: normalizeClass(["list__item", { "is-disabled": disabled }])
26847
26894
  }, [
26848
26895
  _hoisted_1$8,
26849
- createElementVNode("p", _hoisted_2$8, toDisplayString(option.value), 1),
26896
+ createElementVNode("p", _hoisted_2$8, toDisplayString(option[__props.labelProp]), 1),
26850
26897
  createVNode(DhIcon, {
26851
26898
  class: "list__item_icon",
26852
26899
  "icon-name": "delete",
@@ -26858,7 +26905,7 @@ const _sfc_main$9 = {
26858
26905
  ]))
26859
26906
  ]),
26860
26907
  _: 3
26861
- }, 8, ["modelValue", "options"]),
26908
+ }, 8, ["modelValue", "label", "options", "value-prop"]),
26862
26909
  _hoisted_3$6
26863
26910
  ], 64);
26864
26911
  };