wave-ui 1.44.1 → 1.45.2

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;