wave-ui 1.45.10 → 1.45.14

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