wave-ui 2.27.0 → 2.28.0
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/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +69 -60
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +2 -2
- package/src/wave-ui/components/w-table.vue +17 -13
- package/src/wave-ui/scss/_base.scss +0 -21
- package/src/wave-ui/scss/_variables.scss +4 -0
- package/src/wave-ui/scss/index.scss +0 -1
package/dist/wave-ui.es.js
CHANGED
|
@@ -5595,7 +5595,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5595
5595
|
}, {
|
|
5596
5596
|
default: withCtx(() => [
|
|
5597
5597
|
(openBlock(), createBlock(KeepAlive, null, [
|
|
5598
|
-
|
|
5598
|
+
(openBlock(), createBlock(_component_tab_content, {
|
|
5599
5599
|
key: $options.activeTab._index,
|
|
5600
5600
|
class: normalizeClass($props.contentClass)
|
|
5601
5601
|
}, {
|
|
@@ -5617,7 +5617,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5617
5617
|
])
|
|
5618
5618
|
]),
|
|
5619
5619
|
_: 3
|
|
5620
|
-
}, 8, ["class"])
|
|
5620
|
+
}, 8, ["class"]))
|
|
5621
5621
|
], 1024))
|
|
5622
5622
|
]),
|
|
5623
5623
|
_: 3
|
|
@@ -5784,38 +5784,40 @@ const _sfc_main$e = {
|
|
|
5784
5784
|
}
|
|
5785
5785
|
};
|
|
5786
5786
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", render$e]]);
|
|
5787
|
-
const _hoisted_1$3 =
|
|
5788
|
-
const _hoisted_2$2 =
|
|
5789
|
-
const _hoisted_3$2 =
|
|
5790
|
-
const _hoisted_4$1 =
|
|
5791
|
-
const _hoisted_5$1 =
|
|
5792
|
-
const _hoisted_6$1 =
|
|
5793
|
-
const _hoisted_7$1 =
|
|
5787
|
+
const _hoisted_1$3 = { ref: "colgroup" };
|
|
5788
|
+
const _hoisted_2$2 = ["width"];
|
|
5789
|
+
const _hoisted_3$2 = { key: 0 };
|
|
5790
|
+
const _hoisted_4$1 = ["onClick"];
|
|
5791
|
+
const _hoisted_5$1 = /* @__PURE__ */ createTextVNode("wi-arrow-down");
|
|
5792
|
+
const _hoisted_6$1 = ["innerHTML"];
|
|
5793
|
+
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("wi-arrow-down");
|
|
5794
|
+
const _hoisted_8 = {
|
|
5794
5795
|
key: 0,
|
|
5795
5796
|
class: "w-table__progress-bar"
|
|
5796
5797
|
};
|
|
5797
|
-
const
|
|
5798
|
-
const
|
|
5799
|
-
const
|
|
5800
|
-
const
|
|
5798
|
+
const _hoisted_9 = ["colspan"];
|
|
5799
|
+
const _hoisted_10 = { class: "w-table__loading-text" };
|
|
5800
|
+
const _hoisted_11 = /* @__PURE__ */ createTextVNode("Loading...");
|
|
5801
|
+
const _hoisted_12 = {
|
|
5801
5802
|
key: 1,
|
|
5802
5803
|
class: "no-data"
|
|
5803
5804
|
};
|
|
5804
|
-
const
|
|
5805
|
-
const
|
|
5806
|
-
const
|
|
5807
|
-
const _hoisted_15 = ["data-label"];
|
|
5805
|
+
const _hoisted_13 = ["colspan"];
|
|
5806
|
+
const _hoisted_14 = /* @__PURE__ */ createTextVNode("No data to show.");
|
|
5807
|
+
const _hoisted_15 = ["onClick"];
|
|
5808
5808
|
const _hoisted_16 = ["data-label"];
|
|
5809
|
-
const _hoisted_17 = ["
|
|
5810
|
-
const _hoisted_18 =
|
|
5809
|
+
const _hoisted_17 = ["data-label"];
|
|
5810
|
+
const _hoisted_18 = ["innerHTML"];
|
|
5811
|
+
const _hoisted_19 = {
|
|
5811
5812
|
key: 2,
|
|
5812
|
-
class: "w-table__row w-table__row--
|
|
5813
|
+
class: "w-table__row w-table__row--expansion"
|
|
5813
5814
|
};
|
|
5814
|
-
const
|
|
5815
|
-
const
|
|
5815
|
+
const _hoisted_20 = ["colspan"];
|
|
5816
|
+
const _hoisted_21 = { key: 0 };
|
|
5816
5817
|
function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5817
5818
|
const _component_w_icon = resolveComponent("w-icon");
|
|
5818
5819
|
const _component_w_progress = resolveComponent("w-progress");
|
|
5820
|
+
const _component_w_transition_expand = resolveComponent("w-transition-expand");
|
|
5819
5821
|
return openBlock(), createElementBlock("div", {
|
|
5820
5822
|
class: normalizeClass(["w-table-wrap", $options.wrapClasses])
|
|
5821
5823
|
}, [
|
|
@@ -5825,16 +5827,16 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5825
5827
|
onMouseover: _cache[2] || (_cache[2] = (...args) => $options.onMouseOver && $options.onMouseOver(...args)),
|
|
5826
5828
|
onMouseout: _cache[3] || (_cache[3] = (...args) => $options.onMouseOut && $options.onMouseOut(...args))
|
|
5827
5829
|
}, [
|
|
5828
|
-
createElementVNode("colgroup",
|
|
5830
|
+
createElementVNode("colgroup", _hoisted_1$3, [
|
|
5829
5831
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, i) => {
|
|
5830
5832
|
return openBlock(), createElementBlock("col", {
|
|
5831
5833
|
class: "w-table__col",
|
|
5832
5834
|
key: i,
|
|
5833
5835
|
width: header.width || null
|
|
5834
|
-
}, null, 8,
|
|
5836
|
+
}, null, 8, _hoisted_2$2);
|
|
5835
5837
|
}), 128))
|
|
5836
|
-
]),
|
|
5837
|
-
!$props.noHeaders ? (openBlock(), createElementBlock("thead",
|
|
5838
|
+
], 512),
|
|
5839
|
+
!$props.noHeaders ? (openBlock(), createElementBlock("thead", _hoisted_3$2, [
|
|
5838
5840
|
createElementVNode("tr", null, [
|
|
5839
5841
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, i) => {
|
|
5840
5842
|
return openBlock(), createElementBlock("th", {
|
|
@@ -5847,7 +5849,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5847
5849
|
class: normalizeClass(["w-table__header-sort", $options.headerSortClasses(header)])
|
|
5848
5850
|
}, {
|
|
5849
5851
|
default: withCtx(() => [
|
|
5850
|
-
|
|
5852
|
+
_hoisted_5$1
|
|
5851
5853
|
]),
|
|
5852
5854
|
_: 2
|
|
5853
5855
|
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
@@ -5862,14 +5864,14 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5862
5864
|
]) : (openBlock(), createElementBlock("span", {
|
|
5863
5865
|
key: 1,
|
|
5864
5866
|
innerHTML: header.label || ""
|
|
5865
|
-
}, null, 8,
|
|
5867
|
+
}, null, 8, _hoisted_6$1))
|
|
5866
5868
|
], 64)) : createCommentVNode("", true),
|
|
5867
5869
|
header.sortable !== false && header.align !== "right" ? (openBlock(), createBlock(_component_w_icon, {
|
|
5868
5870
|
key: 2,
|
|
5869
5871
|
class: normalizeClass(["w-table__header-sort", $options.headerSortClasses(header)])
|
|
5870
5872
|
}, {
|
|
5871
5873
|
default: withCtx(() => [
|
|
5872
|
-
|
|
5874
|
+
_hoisted_7$1
|
|
5873
5875
|
]),
|
|
5874
5876
|
_: 2
|
|
5875
5877
|
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
@@ -5879,32 +5881,31 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5879
5881
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
5880
5882
|
}, ["stop"]))
|
|
5881
5883
|
}, null, 2)) : createCommentVNode("", true)
|
|
5882
|
-
], 10,
|
|
5884
|
+
], 10, _hoisted_4$1);
|
|
5883
5885
|
}), 128))
|
|
5884
5886
|
])
|
|
5885
5887
|
])) : createCommentVNode("", true),
|
|
5886
5888
|
createElementVNode("tbody", null, [
|
|
5887
|
-
$props.loading ? (openBlock(), createElementBlock("tr",
|
|
5889
|
+
$props.loading ? (openBlock(), createElementBlock("tr", _hoisted_8, [
|
|
5888
5890
|
createElementVNode("td", {
|
|
5889
5891
|
colspan: $props.headers.length
|
|
5890
5892
|
}, [
|
|
5891
5893
|
createVNode(_component_w_progress, { tile: "" }),
|
|
5892
|
-
createElementVNode("div",
|
|
5894
|
+
createElementVNode("div", _hoisted_10, [
|
|
5893
5895
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
5894
|
-
|
|
5896
|
+
_hoisted_11
|
|
5895
5897
|
])
|
|
5896
5898
|
])
|
|
5897
|
-
], 8,
|
|
5898
|
-
])) :
|
|
5899
|
-
!$options.tableItems.length ? (openBlock(), createElementBlock("tr", _hoisted_11, [
|
|
5899
|
+
], 8, _hoisted_9)
|
|
5900
|
+
])) : !$options.tableItems.length ? (openBlock(), createElementBlock("tr", _hoisted_12, [
|
|
5900
5901
|
createElementVNode("td", {
|
|
5901
5902
|
class: "w-table__cell text-center",
|
|
5902
5903
|
colspan: $props.headers.length
|
|
5903
5904
|
}, [
|
|
5904
5905
|
renderSlot(_ctx.$slots, "no-data", {}, () => [
|
|
5905
|
-
|
|
5906
|
+
_hoisted_14
|
|
5906
5907
|
])
|
|
5907
|
-
], 8,
|
|
5908
|
+
], 8, _hoisted_13)
|
|
5908
5909
|
])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList($options.sortedItems, (item, i) => {
|
|
5909
5910
|
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
5910
5911
|
_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
@@ -5912,10 +5913,10 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5912
5913
|
item,
|
|
5913
5914
|
index: i + 1,
|
|
5914
5915
|
select: () => $options.doSelectRow(item, i),
|
|
5915
|
-
classes: { "w-table__row": true, "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--
|
|
5916
|
+
classes: { "w-table__row": true, "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": $options.expandedRowsByUid[item._uid] !== void 0 }
|
|
5916
5917
|
}) : (openBlock(), createElementBlock("tr", {
|
|
5917
5918
|
key: 1,
|
|
5918
|
-
class: normalizeClass(["w-table__row", { "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--
|
|
5919
|
+
class: normalizeClass(["w-table__row", { "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": $options.expandedRowsByUid[item._uid] !== void 0 }]),
|
|
5919
5920
|
onClick: ($event) => $options.doSelectRow(item, i)
|
|
5920
5921
|
}, [
|
|
5921
5922
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, j) => {
|
|
@@ -5948,38 +5949,43 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5948
5949
|
key: 3,
|
|
5949
5950
|
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === j, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === j }])
|
|
5950
5951
|
}, null, 2)) : createCommentVNode("", true)
|
|
5951
|
-
], 10,
|
|
5952
|
+
], 10, _hoisted_16)) : (openBlock(), createElementBlock("td", {
|
|
5952
5953
|
class: normalizeClass(["w-table__cell", `text-${header.align || "left"}`]),
|
|
5953
5954
|
key: `${j}-b`,
|
|
5954
5955
|
"data-label": header.label
|
|
5955
5956
|
}, [
|
|
5956
5957
|
createElementVNode("div", {
|
|
5957
5958
|
innerHTML: item[header.key] || ""
|
|
5958
|
-
}, null, 8,
|
|
5959
|
+
}, null, 8, _hoisted_18),
|
|
5959
5960
|
j < $props.headers.length - 1 && $props.resizableColumns ? (openBlock(), createElementBlock("span", {
|
|
5960
5961
|
key: 0,
|
|
5961
5962
|
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === j, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === j }])
|
|
5962
5963
|
}, null, 2)) : createCommentVNode("", true)
|
|
5963
|
-
], 10,
|
|
5964
|
+
], 10, _hoisted_17))
|
|
5964
5965
|
], 64);
|
|
5965
5966
|
}), 256))
|
|
5966
|
-
], 10,
|
|
5967
|
-
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("tr",
|
|
5967
|
+
], 10, _hoisted_15)),
|
|
5968
|
+
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("tr", _hoisted_19, [
|
|
5968
5969
|
createElementVNode("td", {
|
|
5969
5970
|
class: "w-table__cell",
|
|
5970
5971
|
colspan: $props.headers.length
|
|
5971
5972
|
}, [
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
item,
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5973
|
+
createVNode(_component_w_transition_expand, { y: "" }, {
|
|
5974
|
+
default: withCtx(() => [
|
|
5975
|
+
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("div", _hoisted_21, [
|
|
5976
|
+
renderSlot(_ctx.$slots, "row-expansion", {
|
|
5977
|
+
item,
|
|
5978
|
+
index: i + 1
|
|
5979
|
+
})
|
|
5980
|
+
])) : createCommentVNode("", true),
|
|
5981
|
+
i < $props.headers.length - 1 && $props.resizableColumns ? (openBlock(), createElementBlock("span", {
|
|
5982
|
+
key: 1,
|
|
5983
|
+
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === i, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === _ctx.j }])
|
|
5984
|
+
}, null, 2)) : createCommentVNode("", true)
|
|
5985
|
+
]),
|
|
5986
|
+
_: 2
|
|
5987
|
+
}, 1024)
|
|
5988
|
+
], 8, _hoisted_20)
|
|
5983
5989
|
])) : createCommentVNode("", true)
|
|
5984
5990
|
], 64);
|
|
5985
5991
|
}), 128))
|
|
@@ -6022,7 +6028,7 @@ const _sfc_main$d = {
|
|
|
6022
6028
|
mobileBreakpoint: { type: Number, default: 0 },
|
|
6023
6029
|
resizableColumns: { type: Boolean }
|
|
6024
6030
|
},
|
|
6025
|
-
emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows"],
|
|
6031
|
+
emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows", "column-resize"],
|
|
6026
6032
|
data: () => ({
|
|
6027
6033
|
activeSorting: [],
|
|
6028
6034
|
selectedRowsInternal: [],
|
|
@@ -6046,9 +6052,7 @@ const _sfc_main$d = {
|
|
|
6046
6052
|
});
|
|
6047
6053
|
},
|
|
6048
6054
|
filteredItems() {
|
|
6049
|
-
|
|
6050
|
-
return this.tableItems.filter(this.filter);
|
|
6051
|
-
return this.tableItems;
|
|
6055
|
+
return typeof this.filter === "function" ? this.tableItems.filter(this.filter) : this.tableItems;
|
|
6052
6056
|
},
|
|
6053
6057
|
sortedItems() {
|
|
6054
6058
|
if (!this.activeSorting.length)
|
|
@@ -6208,6 +6212,11 @@ const _sfc_main$d = {
|
|
|
6208
6212
|
document.removeEventListener("mousemove", this.onResizerMouseMove);
|
|
6209
6213
|
document.removeEventListener("mouseup", this.onResizerMouseUp);
|
|
6210
6214
|
setTimeout(() => {
|
|
6215
|
+
const widths = [...this.$refs.colgroup.childNodes].map((column) => {
|
|
6216
|
+
var _a;
|
|
6217
|
+
return ((_a = column.style) == null ? void 0 : _a.width) || column.offsetWidth;
|
|
6218
|
+
});
|
|
6219
|
+
this.$emit("column-resize", { index: this.colResizing.columnIndex, widths });
|
|
6211
6220
|
this.colResizing.dragging = false;
|
|
6212
6221
|
this.colResizing.columnIndex = null;
|
|
6213
6222
|
this.colResizing.startCursorX = null;
|