wave-ui 1.44.2 → 1.45.3

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.
@@ -4,8 +4,6 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __reflectGet = Reflect.get;
8
- var __reflectSet = Reflect.set;
9
7
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
8
  var __spreadValues = (a, b) => {
11
9
  for (var prop in b || (b = {}))
@@ -4838,7 +4836,7 @@ var render$d = function() {
4838
4836
  var _vm = this;
4839
4837
  var _h = _vm.$createElement;
4840
4838
  var _c = _vm._self._c || _h;
4841
- return _c("div", { staticClass: "w-table-wrap", class: _vm.wrapClasses }, [_c("table", { staticClass: "w-table", class: _vm.classes, on: { "mousedown": _vm.onMouseDown, "mouseover": _vm.onMouseOver, "mouseout": _vm.onMouseOut } }, [_c("colgroup", _vm._l(_vm.headers, function(header, i) {
4839
+ return _c("div", { staticClass: "w-table-wrap", class: _vm.wrapClasses }, [_c("table", { staticClass: "w-table", class: _vm.classes, on: { "mousedown": _vm.onMouseDown, "mouseover": _vm.onMouseOver, "mouseout": _vm.onMouseOut } }, [_c("colgroup", { ref: "colgroup" }, _vm._l(_vm.headers, function(header, i) {
4842
4840
  return _c("col", { key: i, staticClass: "w-table__col", attrs: { "width": header.width || null } });
4843
4841
  }), 0), !_vm.noHeaders ? _c("thead", [_c("tr", _vm._l(_vm.headers, function(header, i) {
4844
4842
  return _c("th", { key: i, staticClass: "w-table__header", class: _vm.headerClasses(header), on: { "click": function($event) {
@@ -4850,16 +4848,16 @@ var render$d = function() {
4850
4848
  } } }) : _vm._e()], 2);
4851
4849
  }), 0)]) : _vm._e(), _c("tbody", [_vm.loading ? _c("tr", { staticClass: "w-table__progress-bar" }, [_c("td", { attrs: { "colspan": _vm.headers.length } }, [_c("w-progress", { attrs: { "tile": "" } }), _c("div", { staticClass: "w-table__loading-text" }, [_vm._t("loading", function() {
4852
4850
  return [_vm._v("Loading...")];
4853
- })], 2)], 1)]) : _vm._e(), !_vm.tableItems.length ? _c("tr", { staticClass: "no-data" }, [_c("td", { staticClass: "w-table__cell text-center", attrs: { "colspan": _vm.headers.length } }, [_vm._t("no-data", function() {
4851
+ })], 2)], 1)]) : !_vm.tableItems.length ? _c("tr", { staticClass: "no-data" }, [_c("td", { staticClass: "w-table__cell text-center", attrs: { "colspan": _vm.headers.length } }, [_vm._t("no-data", function() {
4854
4852
  return [_vm._v("No data to show.")];
4855
4853
  })], 2)]) : [_vm._l(_vm.sortedItems, function(item, i) {
4856
4854
  return [_vm.$scopedSlots["item"] ? _vm._t("item", null, { "item": item, "index": i + 1, "select": function() {
4857
4855
  return _vm.doSelectRow(item, i);
4858
- }, "classes": { "w-table__row": true, "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--has-expanded": _vm.expandedRowsByUid[item._uid] !== void 0 } }) : _c("tr", { key: i, staticClass: "w-table__row", class: { "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--has-expanded": _vm.expandedRowsByUid[item._uid] !== void 0 }, on: { "click": function($event) {
4856
+ }, "classes": { "w-table__row": true, "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": _vm.expandedRowsByUid[item._uid] !== void 0 } }) : _c("tr", { key: i, staticClass: "w-table__row", class: { "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": _vm.expandedRowsByUid[item._uid] !== void 0 }, on: { "click": function($event) {
4859
4857
  return _vm.doSelectRow(item, i);
4860
4858
  } } }, [_vm._l(_vm.headers, function(header, j) {
4861
4859
  return [_vm.$scopedSlots["item-cell." + header.key] || _vm.$scopedSlots["item-cell." + (j + 1)] || _vm.$scopedSlots["item-cell"] ? _c("td", { key: j + "-a", staticClass: "w-table__cell", class: "text-" + (header.align || "left"), attrs: { "data-label": header.label } }, [_vm.$scopedSlots["item-cell." + header.key] ? _vm._t("item-cell." + header.key, null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm.$scopedSlots["item-cell." + (j + 1)] ? _vm._t("item-cell." + (j + 1), null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm.$scopedSlots["item-cell"] ? _vm._t("item-cell", null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm._e(), j < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === j, "w-table__col-resizer--active": _vm.colResizing.columnIndex === j } }) : _vm._e()], 2) : _c("td", { key: j + "-b", staticClass: "w-table__cell", class: "text-" + (header.align || "left"), attrs: { "data-label": header.label } }, [_c("div", { domProps: { "innerHTML": _vm._s(item[header.key] || "") } }), j < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === j, "w-table__col-resizer--active": _vm.colResizing.columnIndex === j } }) : _vm._e()])];
4862
- })], 2), _vm.expandedRowsByUid[item._uid] ? _c("tr", { staticClass: "w-table__row w-table__row--expanded" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_vm.expandedRowsByUid[item._uid] ? _c("div", [_vm._t("expanded-row", null, { "item": item, "index": i + 1 })], 2) : _vm._e(), _vm.j < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === _vm.j, "w-table__col-resizer--active": _vm.colResizing.columnIndex === _vm.j } }) : _vm._e()])]) : _vm._e()];
4860
+ })], 2), _vm.expandedRowsByUid[item._uid] ? _c("tr", { staticClass: "w-table__row w-table__row--expansion" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_c("w-transition-expand", { attrs: { "y": "" } }, [_vm.expandedRowsByUid[item._uid] ? _c("div", [_vm._t("row-expansion", null, { "item": item, "index": i + 1 })], 2) : _vm._e(), i < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === i, "w-table__col-resizer--active": _vm.colResizing.columnIndex === _vm.j } }) : _vm._e()])], 1)]) : _vm._e()];
4863
4861
  })]], 2)])]);
4864
4862
  };
4865
4863
  var staticRenderFns$d = [];
@@ -4898,7 +4896,7 @@ const __vue2_script$d = {
4898
4896
  mobileBreakpoint: { type: Number, default: 0 },
4899
4897
  resizableColumns: { type: Boolean }
4900
4898
  },
4901
- emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows"],
4899
+ emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows", "column-resize"],
4902
4900
  data: () => ({
4903
4901
  activeSorting: [],
4904
4902
  selectedRowsInternal: [],
@@ -4922,9 +4920,7 @@ const __vue2_script$d = {
4922
4920
  });
4923
4921
  },
4924
4922
  filteredItems() {
4925
- if (typeof this.filter === "function")
4926
- return this.tableItems.filter(this.filter);
4927
- return this.tableItems;
4923
+ return typeof this.filter === "function" ? this.tableItems.filter(this.filter) : this.tableItems;
4928
4924
  },
4929
4925
  sortedItems() {
4930
4926
  if (!this.activeSorting.length)
@@ -5084,6 +5080,11 @@ const __vue2_script$d = {
5084
5080
  document.removeEventListener("mousemove", this.onResizerMouseMove);
5085
5081
  document.removeEventListener("mouseup", this.onResizerMouseUp);
5086
5082
  setTimeout(() => {
5083
+ const widths = [...this.$refs.colgroup.childNodes].map((column) => {
5084
+ var _a;
5085
+ return ((_a = column.style) == null ? void 0 : _a.width) || column.offsetWidth;
5086
+ });
5087
+ this.$emit("column-resize", { index: this.colResizing.columnIndex, widths });
5087
5088
  this.colResizing.dragging = false;
5088
5089
  this.colResizing.columnIndex = null;
5089
5090
  this.colResizing.startCursorX = null;
@@ -5480,7 +5481,7 @@ var render$8 = function() {
5480
5481
  var _vm = this;
5481
5482
  var _h = _vm.$createElement;
5482
5483
  var _c = _vm._self._c || _h;
5483
- return _c("div", { ref: "wrapper", staticClass: "w-tooltip-wrap", class: { "w-tooltip-wrap--attached": !_vm.detachTo } }, [_vm._t("activator", null, { "on": _vm.eventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTooltip, expression: "showTooltip" }], ref: "tooltip", staticClass: "w-tooltip", class: _vm.classes, style: _vm.styles }, [_vm.bgColor ? _c("div", { class: _vm.color }, [_vm._t("default")], 2) : _vm._t("default")], 2)])], 2);
5484
+ return _c("div", { staticClass: "w-tooltip-wrap", class: { "w-tooltip-wrap--attached": !_vm.detachTo } }, [_vm._t("activator", null, { "on": _vm.eventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTooltip, expression: "showTooltip" }], ref: "tooltip", staticClass: "w-tooltip", class: _vm.classes, style: _vm.styles }, [_vm._t("default")], 2)])], 2);
5484
5485
  };
5485
5486
  var staticRenderFns$8 = [];
5486
5487
  var wTooltip_vue_vue_type_style_index_0_lang = "";
@@ -5546,7 +5547,7 @@ const __vue2_script$8 = {
5546
5547
  return target;
5547
5548
  },
5548
5549
  tooltipParentEl() {
5549
- return this.detachTo ? this.detachToTarget : this.$refs.wrapper;
5550
+ return this.detachTo ? this.detachToTarget : this.$el;
5550
5551
  },
5551
5552
  position() {
5552
5553
  return this.top && "top" || this.bottom && "bottom" || this.left && "left" || this.right && "right" || "bottom";
@@ -5580,8 +5581,8 @@ const __vue2_script$8 = {
5580
5581
  },
5581
5582
  classes() {
5582
5583
  return __spreadProps(__spreadValues({
5583
- [this.color]: !this.bgColor,
5584
- [`${this.bgColor} ${this.bgColor}--bg`]: this.bgColor
5584
+ [this.color]: this.color,
5585
+ [`${this.bgColor}--bg`]: this.bgColor
5585
5586
  }, this.tooltipClasses), {
5586
5587
  [`w-tooltip--${this.position}`]: true,
5587
5588
  "w-tooltip--tile": this.tile,
@@ -5596,8 +5597,9 @@ const __vue2_script$8 = {
5596
5597
  styles() {
5597
5598
  return {
5598
5599
  zIndex: this.zIndex || this.zIndex === 0 || null,
5599
- top: `${~~this.tooltipCoordinates.top}px`,
5600
- left: `${~~this.tooltipCoordinates.left}px`
5600
+ top: this.tooltipCoordinates.top && `${~~this.tooltipCoordinates.top}px` || null,
5601
+ left: this.tooltipCoordinates.left && `${~~this.tooltipCoordinates.left}px` || null,
5602
+ "--w-tooltip-bg-color": this.$waveui.colors[this.bgColor || "white"]
5601
5603
  };
5602
5604
  },
5603
5605
  eventHandlers() {
@@ -5684,7 +5686,7 @@ const __vue2_script$8 = {
5684
5686
  return coords;
5685
5687
  },
5686
5688
  insertTooltip() {
5687
- const wrapper = this.$refs.wrapper;
5689
+ const wrapper = this.$el;
5688
5690
  this.tooltipEl = this.$refs.tooltip.$el || this.$refs.tooltip;
5689
5691
  wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
5690
5692
  this.detachToTarget.appendChild(this.$refs.tooltip);
@@ -5695,7 +5697,7 @@ const __vue2_script$8 = {
5695
5697
  }
5696
5698
  },
5697
5699
  mounted() {
5698
- this.activatorEl = this.$refs.wrapper.firstElementChild;
5700
+ this.activatorEl = this.$el.firstElementChild;
5699
5701
  if (this.detachTo)
5700
5702
  this.insertTooltip();
5701
5703
  if (this.value)