wave-ui 1.45.11 → 1.45.15

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.
@@ -2678,6 +2678,8 @@ const __vue2_script$u = {
2678
2678
  return file;
2679
2679
  }));
2680
2680
  this.$emit("update:modelValue", this.inputFiles);
2681
+ this.$emit("input", this.inputFiles);
2682
+ this.$emit("change", this.inputFiles);
2681
2683
  },
2682
2684
  filePreview(original, file) {
2683
2685
  const reader = new FileReader();
@@ -2696,9 +2698,9 @@ const __vue2_script$u = {
2696
2698
  },
2697
2699
  mounted() {
2698
2700
  setTimeout(() => {
2699
- if (this.$refs.input.value)
2701
+ if (this.$refs.input && this.$refs.input.matches(":-webkit-autofill"))
2700
2702
  this.isAutofilled = true;
2701
- }, 350);
2703
+ }, 400);
2702
2704
  },
2703
2705
  watch: {
2704
2706
  value(value) {
@@ -3093,20 +3095,21 @@ const __vue2_script$s = {
3093
3095
  return this.transition || "scale-fade";
3094
3096
  },
3095
3097
  detachToTarget() {
3096
- let target = this.detachTo || ".w-app";
3098
+ const defaultTarget = ".w-app";
3099
+ let target = this.detachTo || defaultTarget;
3097
3100
  if (target === true)
3098
- target = ".w-app";
3101
+ target = defaultTarget;
3099
3102
  else if (target && !["object", "string"].includes(typeof target))
3100
- target = ".w-app";
3103
+ target = defaultTarget;
3101
3104
  else if (typeof target === "object" && !target.nodeType) {
3102
- target = ".w-app";
3105
+ target = defaultTarget;
3103
3106
  consoleWarn("Invalid node provided in w-menu `detach-to`. Falling back to .w-app.");
3104
3107
  }
3105
3108
  if (typeof target === "string")
3106
3109
  target = document.querySelector(target);
3107
3110
  if (!target) {
3108
- consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : ".w-app"}`);
3109
- target = document.querySelector(".w-app");
3111
+ consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : defaultTarget}`);
3112
+ target = document.querySelector(defaultTarget);
3110
3113
  }
3111
3114
  return target;
3112
3115
  },
@@ -3179,8 +3182,9 @@ const __vue2_script$s = {
3179
3182
  }, 10);
3180
3183
  }
3181
3184
  };
3182
- if ("ontouchstart" in window)
3185
+ if (typeof window !== "undefined" && "ontouchstart" in window) {
3183
3186
  handlers.click = this.toggleMenu;
3187
+ }
3184
3188
  } else
3185
3189
  handlers = { click: this.toggleMenu };
3186
3190
  return handlers;
@@ -5539,20 +5543,21 @@ const __vue2_script$8 = {
5539
5543
  return this.transition || `w-tooltip-slide-fade-${direction}`;
5540
5544
  },
5541
5545
  detachToTarget() {
5542
- let target = this.detachTo || ".w-app";
5546
+ const defaultTarget = ".w-app";
5547
+ let target = this.detachTo || defaultTarget;
5543
5548
  if (target === true)
5544
- target = ".w-app";
5549
+ target = defaultTarget;
5545
5550
  else if (target && !["object", "string"].includes(typeof target))
5546
- target = ".w-app";
5551
+ target = defaultTarget;
5547
5552
  else if (typeof target === "object" && !target.nodeType) {
5548
- target = ".w-app";
5553
+ target = defaultTarget;
5549
5554
  consoleWarn("Invalid node provided in w-tooltip `attach-to`. Falling back to .w-app.");
5550
5555
  }
5551
5556
  if (typeof target === "string")
5552
5557
  target = document.querySelector(target);
5553
5558
  if (!target) {
5554
- consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : ".w-app"}`);
5555
- target = document.querySelector(".w-app");
5559
+ consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : defaultTarget}`);
5560
+ target = document.querySelector(defaultTarget);
5556
5561
  }
5557
5562
  return target;
5558
5563
  },
@@ -5623,7 +5628,7 @@ const __vue2_script$8 = {
5623
5628
  mouseenter: this.toggle,
5624
5629
  mouseleave: this.toggle
5625
5630
  };
5626
- if ("ontouchstart" in window)
5631
+ if (typeof window !== "undefined" && "ontouchstart" in window)
5627
5632
  handlers.click = this.toggle;
5628
5633
  }
5629
5634
  return handlers;
@@ -5632,7 +5637,7 @@ const __vue2_script$8 = {
5632
5637
  methods: {
5633
5638
  toggle(e) {
5634
5639
  let shouldShowTooltip = this.showTooltip;
5635
- if ("ontouchstart" in window) {
5640
+ if (typeof window !== "undefined" && "ontouchstart" in window) {
5636
5641
  if (e.type === "click")
5637
5642
  shouldShowTooltip = !shouldShowTooltip;
5638
5643
  } else if (e.type === "click" && this.showOnClick)