wave-ui 2.40.4 → 2.42.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 +107 -101
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +14 -15
- package/src/wave-ui/components/w-table.vue +48 -4
- package/src/wave-ui/components/w-tabs/index.vue +1 -0
- package/src/wave-ui/core.js +7 -3
- package/src/wave-ui/index.js +1 -1
package/dist/wave-ui.es.js
CHANGED
|
@@ -1,39 +1,10 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
3
|
var __publicField = (obj, key, value) => {
|
|
33
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
5
|
return value;
|
|
35
6
|
};
|
|
36
|
-
import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, withDirectives, createSlots, vShow, vModelText, vModelDynamic, resolveDirective, KeepAlive } from "vue";
|
|
7
|
+
import { reactive, inject, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, withDirectives, createSlots, vShow, vModelText, vModelDynamic, resolveDirective, KeepAlive } from "vue";
|
|
37
8
|
const config = reactive({
|
|
38
9
|
breakpoints: {
|
|
39
10
|
xs: 600,
|
|
@@ -92,16 +63,17 @@ const _NotificationManager$1 = class {
|
|
|
92
63
|
};
|
|
93
64
|
}
|
|
94
65
|
notify(...args) {
|
|
95
|
-
let notification =
|
|
66
|
+
let notification = { ...this._notificationDefaults, _uid: this._uid++ };
|
|
96
67
|
if (typeof args[0] === "object")
|
|
97
|
-
notification =
|
|
68
|
+
notification = { ...notification, ...args[0] };
|
|
98
69
|
else {
|
|
99
70
|
const [message, type, timeout] = args;
|
|
100
|
-
notification =
|
|
71
|
+
notification = {
|
|
72
|
+
...notification,
|
|
101
73
|
message: message || "",
|
|
102
74
|
[type === void 0 ? "info" : type]: true,
|
|
103
75
|
timeout: timeout || timeout === 0 ? parseFloat(timeout) : 4e3
|
|
104
|
-
}
|
|
76
|
+
};
|
|
105
77
|
}
|
|
106
78
|
this.notifications.push(notification);
|
|
107
79
|
if (~~notification.timeout !== 0)
|
|
@@ -437,7 +409,7 @@ const _WaveUI = class {
|
|
|
437
409
|
obj[color.label] = color.color;
|
|
438
410
|
color.shades.forEach((shade) => obj[shade.label] = shade.color);
|
|
439
411
|
return obj;
|
|
440
|
-
},
|
|
412
|
+
}, { ...config.colors, black: "#000", white: "#fff", transparent: "transparent", inherit: "inherit" }));
|
|
441
413
|
__publicField(this, "config", {});
|
|
442
414
|
if (_WaveUI.instance)
|
|
443
415
|
return _WaveUI.instance;
|
|
@@ -465,9 +437,10 @@ const _WaveUI = class {
|
|
|
465
437
|
}
|
|
466
438
|
}
|
|
467
439
|
this.config = config;
|
|
468
|
-
this.notify = notificationManager.notify;
|
|
440
|
+
this.notify = (...args) => notificationManager.notify(...args);
|
|
469
441
|
_WaveUI.instance = this;
|
|
470
442
|
app.config.globalProperties.$waveui = reactive(this);
|
|
443
|
+
app.provide("$waveui", _WaveUI.instance);
|
|
471
444
|
}
|
|
472
445
|
}
|
|
473
446
|
static install(app, options = {}) {
|
|
@@ -497,7 +470,7 @@ const _WaveUI = class {
|
|
|
497
470
|
let WaveUI = _WaveUI;
|
|
498
471
|
__publicField(WaveUI, "instance", null);
|
|
499
472
|
__publicField(WaveUI, "vueInstance", null);
|
|
500
|
-
|
|
473
|
+
const useWaveUI = () => inject("$waveui");
|
|
501
474
|
const _hoisted_1$r = ["aria-expanded"];
|
|
502
475
|
const _hoisted_2$d = ["onClick", "onFocus", "onKeypress", "tabindex"];
|
|
503
476
|
const _hoisted_3$b = ["innerHTML"];
|
|
@@ -663,7 +636,8 @@ const _sfc_main$P = {
|
|
|
663
636
|
},
|
|
664
637
|
updateItems() {
|
|
665
638
|
const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
|
|
666
|
-
this.accordionItems = items.map((item, _index) =>
|
|
639
|
+
this.accordionItems = items.map((item, _index) => ({
|
|
640
|
+
...item,
|
|
667
641
|
_index,
|
|
668
642
|
_expanded: this.modelValue && this.modelValue[_index],
|
|
669
643
|
_disabled: !!item.disabled
|
|
@@ -854,7 +828,7 @@ const _sfc_main$N = {
|
|
|
854
828
|
},
|
|
855
829
|
methods: {
|
|
856
830
|
notifProps(notif) {
|
|
857
|
-
const
|
|
831
|
+
const { _value, _uid, message, timeout, ...props } = notif;
|
|
858
832
|
return props;
|
|
859
833
|
}
|
|
860
834
|
},
|
|
@@ -874,7 +848,7 @@ const cssVars = {
|
|
|
874
848
|
const generateColors = (config2) => {
|
|
875
849
|
let styles = "";
|
|
876
850
|
const { cssScope } = cssVars;
|
|
877
|
-
const
|
|
851
|
+
const { info, warning, success, error, ...colors2 } = config2.colors;
|
|
878
852
|
for (const color in colors2) {
|
|
879
853
|
styles += `${cssScope} .${color}--bg{background-color:${config2.colors[color]}}${cssScope} .${color}{color:${config2.colors[color]}}`;
|
|
880
854
|
}
|
|
@@ -1337,7 +1311,8 @@ const _sfc_main$J = {
|
|
|
1337
1311
|
return this.hasRouter ? this.$router.resolve(this.route).href : this.route;
|
|
1338
1312
|
},
|
|
1339
1313
|
listeners() {
|
|
1340
|
-
return this.route && this.hasRouter && !this.forceLink && !this.externalLink ?
|
|
1314
|
+
return this.route && this.hasRouter && !this.forceLink && !this.externalLink ? {
|
|
1315
|
+
...this.$attrs,
|
|
1341
1316
|
click: (e) => {
|
|
1342
1317
|
if (this.$attrs.click)
|
|
1343
1318
|
this.$attrs.click(e);
|
|
@@ -1345,7 +1320,7 @@ const _sfc_main$J = {
|
|
|
1345
1320
|
e.stopPropagation();
|
|
1346
1321
|
e.preventDefault();
|
|
1347
1322
|
}
|
|
1348
|
-
}
|
|
1323
|
+
} : this.$attrs;
|
|
1349
1324
|
},
|
|
1350
1325
|
size() {
|
|
1351
1326
|
return this.xs && "xs" || this.sm && "sm" || this.lg && "lg" || this.xl && "xl" || "md";
|
|
@@ -1403,7 +1378,7 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1403
1378
|
}, [
|
|
1404
1379
|
_ctx.$slots.title || $props.title ? (openBlock(), createElementBlock("div", {
|
|
1405
1380
|
key: 0,
|
|
1406
|
-
class: normalizeClass(["w-card__title",
|
|
1381
|
+
class: normalizeClass(["w-card__title", { "w-card__title--has-toolbar": _ctx.$slots.title && $options.titleHasToolbar, ...$options.titleClasses }])
|
|
1407
1382
|
}, [
|
|
1408
1383
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1409
1384
|
createTextVNode(toDisplayString($props.title), 1)
|
|
@@ -1464,10 +1439,11 @@ const _sfc_main$I = {
|
|
|
1464
1439
|
return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1465
1440
|
},
|
|
1466
1441
|
imgProps() {
|
|
1467
|
-
return
|
|
1442
|
+
return {
|
|
1468
1443
|
tag: "div",
|
|
1469
|
-
ratio: 1 / 2
|
|
1470
|
-
|
|
1444
|
+
ratio: 1 / 2,
|
|
1445
|
+
...this.imageProps
|
|
1446
|
+
};
|
|
1471
1447
|
},
|
|
1472
1448
|
classes() {
|
|
1473
1449
|
return {
|
|
@@ -1734,13 +1710,14 @@ const _sfc_main$G = {
|
|
|
1734
1710
|
checkboxItems() {
|
|
1735
1711
|
return (this.items || []).map((item, i) => {
|
|
1736
1712
|
const itemValue = item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey];
|
|
1737
|
-
return reactive(
|
|
1713
|
+
return reactive({
|
|
1714
|
+
...item,
|
|
1738
1715
|
label: item[this.itemLabelKey],
|
|
1739
1716
|
_index: i,
|
|
1740
1717
|
value: itemValue,
|
|
1741
1718
|
color: item[this.itemColorKey] || this.color,
|
|
1742
1719
|
_isChecked: this.modelValue && this.modelValue.includes(itemValue)
|
|
1743
|
-
})
|
|
1720
|
+
});
|
|
1744
1721
|
});
|
|
1745
1722
|
},
|
|
1746
1723
|
classes() {
|
|
@@ -1779,7 +1756,7 @@ function render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1779
1756
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event)
|
|
1780
1757
|
}, $options.wMenuProps), {
|
|
1781
1758
|
activator: withCtx(({ on }) => [
|
|
1782
|
-
createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" },
|
|
1759
|
+
createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, { ..._ctx.$attrs, ...$options.buttonProps, ...on }), {
|
|
1783
1760
|
default: withCtx(() => [
|
|
1784
1761
|
renderSlot(_ctx.$slots, "default")
|
|
1785
1762
|
]),
|
|
@@ -1871,7 +1848,7 @@ const _sfc_main$F = {
|
|
|
1871
1848
|
return button;
|
|
1872
1849
|
},
|
|
1873
1850
|
cancelButtonProps() {
|
|
1874
|
-
const
|
|
1851
|
+
const { label, ...props } = this.cancelButton;
|
|
1875
1852
|
return props;
|
|
1876
1853
|
},
|
|
1877
1854
|
confirmButton() {
|
|
@@ -1881,11 +1858,11 @@ const _sfc_main$F = {
|
|
|
1881
1858
|
return button;
|
|
1882
1859
|
},
|
|
1883
1860
|
confirmButtonProps() {
|
|
1884
|
-
const
|
|
1861
|
+
const { label, ...props } = this.confirmButton;
|
|
1885
1862
|
return props;
|
|
1886
1863
|
},
|
|
1887
1864
|
wMenuProps() {
|
|
1888
|
-
return
|
|
1865
|
+
return {
|
|
1889
1866
|
top: this.top,
|
|
1890
1867
|
bottom: this.bottom,
|
|
1891
1868
|
left: this.left,
|
|
@@ -1896,15 +1873,17 @@ const _sfc_main$F = {
|
|
|
1896
1873
|
alignLeft: this.alignLeft,
|
|
1897
1874
|
alignRight: this.alignRight,
|
|
1898
1875
|
persistent: this.persistent,
|
|
1899
|
-
transition: this.transition
|
|
1900
|
-
|
|
1876
|
+
transition: this.transition,
|
|
1877
|
+
...this.menu
|
|
1878
|
+
};
|
|
1901
1879
|
},
|
|
1902
1880
|
buttonProps() {
|
|
1903
|
-
return
|
|
1881
|
+
return {
|
|
1904
1882
|
bgColor: this.bgColor,
|
|
1905
1883
|
color: this.color,
|
|
1906
|
-
icon: this.icon
|
|
1907
|
-
|
|
1884
|
+
icon: this.icon,
|
|
1885
|
+
...this.mainButton
|
|
1886
|
+
};
|
|
1908
1887
|
}
|
|
1909
1888
|
},
|
|
1910
1889
|
methods: {
|
|
@@ -2668,7 +2647,10 @@ const _sfc_main$x = {
|
|
|
2668
2647
|
return obj;
|
|
2669
2648
|
}, {});
|
|
2670
2649
|
}
|
|
2671
|
-
return
|
|
2650
|
+
return {
|
|
2651
|
+
...breakpointsColumns || { [`columns${this.columns}`]: this.columns },
|
|
2652
|
+
...breakpointsGap || { [`gap${this.gap}`]: this.gap }
|
|
2653
|
+
};
|
|
2672
2654
|
}
|
|
2673
2655
|
}
|
|
2674
2656
|
};
|
|
@@ -3179,15 +3161,15 @@ const _sfc_main$u = {
|
|
|
3179
3161
|
},
|
|
3180
3162
|
computed: {
|
|
3181
3163
|
attrs() {
|
|
3182
|
-
const
|
|
3164
|
+
const { class: classes, ...attrs } = this.$attrs;
|
|
3183
3165
|
return attrs;
|
|
3184
3166
|
},
|
|
3185
3167
|
listeners() {
|
|
3186
|
-
const
|
|
3168
|
+
const { input, focus, blur, ...listeners } = this.$attrs;
|
|
3187
3169
|
return listeners;
|
|
3188
3170
|
},
|
|
3189
3171
|
attrs() {
|
|
3190
|
-
const
|
|
3172
|
+
const { class: Class, ...htmlAttrs } = this.$attrs;
|
|
3191
3173
|
return htmlAttrs;
|
|
3192
3174
|
},
|
|
3193
3175
|
hasValue() {
|
|
@@ -3603,7 +3585,7 @@ const _sfc_main$t = {
|
|
|
3603
3585
|
const items = this.selectedItems.map((item) => {
|
|
3604
3586
|
if (!this.returnObject)
|
|
3605
3587
|
return item._value;
|
|
3606
|
-
const
|
|
3588
|
+
const { _value, _selected, ...Item } = item;
|
|
3607
3589
|
return Item;
|
|
3608
3590
|
});
|
|
3609
3591
|
const selection = this.isMultipleSelect ? items : items[0] !== void 0 ? items[0] : null;
|
|
@@ -3618,12 +3600,13 @@ const _sfc_main$t = {
|
|
|
3618
3600
|
this.$el.querySelector(`#${this.listId}_item-${index2 + 1}`).focus();
|
|
3619
3601
|
},
|
|
3620
3602
|
cleanLi(li) {
|
|
3621
|
-
const
|
|
3603
|
+
const { _index, _value, _label, _selected, _focused, ...cleanLi } = li;
|
|
3622
3604
|
return cleanLi;
|
|
3623
3605
|
},
|
|
3624
3606
|
refreshListItems() {
|
|
3625
3607
|
const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
|
|
3626
|
-
this.listItems = items.map((item, i) =>
|
|
3608
|
+
this.listItems = items.map((item, i) => ({
|
|
3609
|
+
...item,
|
|
3627
3610
|
_index: i,
|
|
3628
3611
|
_value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
|
|
3629
3612
|
_selected: item._selected || false,
|
|
@@ -3771,10 +3754,11 @@ var DetachableMixin = {
|
|
|
3771
3754
|
if (!this.fixed) {
|
|
3772
3755
|
const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
|
|
3773
3756
|
const computedStyles = window.getComputedStyle(this.detachableParentEl, null);
|
|
3774
|
-
coords =
|
|
3757
|
+
coords = {
|
|
3758
|
+
...coords,
|
|
3775
3759
|
top: top - targetTop + this.detachableParentEl.scrollTop - parseInt(computedStyles.getPropertyValue("border-top-width")),
|
|
3776
3760
|
left: left - targetLeft + this.detachableParentEl.scrollLeft - parseInt(computedStyles.getPropertyValue("border-left-width"))
|
|
3777
|
-
}
|
|
3761
|
+
};
|
|
3778
3762
|
}
|
|
3779
3763
|
return coords;
|
|
3780
3764
|
},
|
|
@@ -4051,15 +4035,16 @@ const _sfc_main$s = {
|
|
|
4051
4035
|
return objectifyClasses(this.contentClass);
|
|
4052
4036
|
},
|
|
4053
4037
|
overlayClasses() {
|
|
4054
|
-
return
|
|
4038
|
+
return {
|
|
4039
|
+
...objectifyClasses(this.overlayClass),
|
|
4055
4040
|
"w-overlay--no-pointer-event": this.showOnHover
|
|
4056
|
-
}
|
|
4041
|
+
};
|
|
4057
4042
|
},
|
|
4058
4043
|
classes() {
|
|
4059
|
-
return
|
|
4044
|
+
return {
|
|
4060
4045
|
[this.color]: this.color,
|
|
4061
|
-
[`${this.bgColor}--bg`]: this.bgColor
|
|
4062
|
-
|
|
4046
|
+
[`${this.bgColor}--bg`]: this.bgColor,
|
|
4047
|
+
...this.menuClasses,
|
|
4063
4048
|
[`w-menu--${this.position}`]: !this.noPosition,
|
|
4064
4049
|
[`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
|
|
4065
4050
|
"w-menu--tile": this.tile,
|
|
@@ -4068,7 +4053,7 @@ const _sfc_main$s = {
|
|
|
4068
4053
|
"w-menu--arrow": this.arrow,
|
|
4069
4054
|
"w-menu--shadow": this.shadow,
|
|
4070
4055
|
"w-menu--fixed": this.fixed
|
|
4071
|
-
}
|
|
4056
|
+
};
|
|
4072
4057
|
},
|
|
4073
4058
|
styles() {
|
|
4074
4059
|
return {
|
|
@@ -4743,7 +4728,8 @@ const _sfc_main$m = {
|
|
|
4743
4728
|
}),
|
|
4744
4729
|
computed: {
|
|
4745
4730
|
radioItems() {
|
|
4746
|
-
return (this.items || []).map((item, i) =>
|
|
4731
|
+
return (this.items || []).map((item, i) => ({
|
|
4732
|
+
...item,
|
|
4747
4733
|
_index: i,
|
|
4748
4734
|
label: item[this.itemLabelKey],
|
|
4749
4735
|
value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
|
|
@@ -5148,7 +5134,7 @@ const _sfc_main$k = {
|
|
|
5148
5134
|
computed: {
|
|
5149
5135
|
selectItems() {
|
|
5150
5136
|
return this.items.map((item, i) => {
|
|
5151
|
-
const obj =
|
|
5137
|
+
const obj = { ...item };
|
|
5152
5138
|
obj.value = obj[this.itemValueKey] === void 0 ? obj[this.itemLabelKey] || i : obj[this.itemValueKey];
|
|
5153
5139
|
obj.index = i;
|
|
5154
5140
|
return obj;
|
|
@@ -5164,7 +5150,9 @@ const _sfc_main$k = {
|
|
|
5164
5150
|
return !this.staticLabel || !this.hasValue && !this.placeholder;
|
|
5165
5151
|
},
|
|
5166
5152
|
selectionString() {
|
|
5167
|
-
return this.inputValue && this.inputValue.map(
|
|
5153
|
+
return this.inputValue && this.inputValue.map(
|
|
5154
|
+
(item) => item[this.itemValueKey] !== void 0 ? item[this.itemLabelKey] : item[this.itemLabelKey] !== void 0 ? item[this.itemLabelKey] : item
|
|
5155
|
+
).join(", ");
|
|
5168
5156
|
},
|
|
5169
5157
|
classes() {
|
|
5170
5158
|
return {
|
|
@@ -5944,10 +5932,11 @@ const _sfc_main$e = {
|
|
|
5944
5932
|
},
|
|
5945
5933
|
tabsItems() {
|
|
5946
5934
|
const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items;
|
|
5947
|
-
return items.map((item, _index) => reactive(
|
|
5935
|
+
return items.map((item, _index) => reactive({
|
|
5936
|
+
...item,
|
|
5948
5937
|
_index,
|
|
5949
5938
|
_disabled: !!item.disabled
|
|
5950
|
-
}))
|
|
5939
|
+
}));
|
|
5951
5940
|
},
|
|
5952
5941
|
activeTab() {
|
|
5953
5942
|
return this.tabsItems[this.activeTabIndex] || this.tabsItems[0] || {};
|
|
@@ -6216,7 +6205,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6216
6205
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, j) => {
|
|
6217
6206
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
6218
6207
|
_ctx.$slots[`item-cell.${header.key}`] || _ctx.$slots[`item-cell.${j + 1}`] || _ctx.$slots["item-cell"] ? (openBlock(), createElementBlock("td", {
|
|
6219
|
-
class: normalizeClass(["w-table__cell", `text-${header.align || "left"}`]),
|
|
6208
|
+
class: normalizeClass(["w-table__cell", { [`text-${header.align || "left"}`]: true, "w-table__cell--sticky": header.sticky }]),
|
|
6220
6209
|
key: `${j}-a`,
|
|
6221
6210
|
"data-label": header.label
|
|
6222
6211
|
}, [
|
|
@@ -6244,7 +6233,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6244
6233
|
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === j, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === j }])
|
|
6245
6234
|
}, null, 2)) : createCommentVNode("", true)
|
|
6246
6235
|
], 10, _hoisted_16)) : (openBlock(), createElementBlock("td", {
|
|
6247
|
-
class: normalizeClass(["w-table__cell", `text-${header.align || "left"}`]),
|
|
6236
|
+
class: normalizeClass(["w-table__cell", { [`text-${header.align || "left"}`]: true, "w-table__cell--sticky": header.sticky }]),
|
|
6248
6237
|
key: `${j}-b`,
|
|
6249
6238
|
"data-label": header.label
|
|
6250
6239
|
}, [
|
|
@@ -6308,6 +6297,7 @@ const _sfc_main$d = {
|
|
|
6308
6297
|
items: { type: Array, required: true },
|
|
6309
6298
|
headers: { type: Array, required: true },
|
|
6310
6299
|
noHeaders: { type: Boolean },
|
|
6300
|
+
fixedLayout: { type: Boolean },
|
|
6311
6301
|
fixedHeaders: { type: Boolean },
|
|
6312
6302
|
fixedFooter: { type: Boolean },
|
|
6313
6303
|
loading: { type: Boolean },
|
|
@@ -6315,7 +6305,9 @@ const _sfc_main$d = {
|
|
|
6315
6305
|
expandableRows: {
|
|
6316
6306
|
validator: (value) => {
|
|
6317
6307
|
if (![void 0, true, false, 1, "1", ""].includes(value)) {
|
|
6318
|
-
consoleError(
|
|
6308
|
+
consoleError(
|
|
6309
|
+
`Wrong value for the w-table's \`expandableRows\` prop. Given: "${value}", expected one of: [undefined, true, false, 1, '1', ''].`
|
|
6310
|
+
);
|
|
6319
6311
|
}
|
|
6320
6312
|
return true;
|
|
6321
6313
|
}
|
|
@@ -6324,7 +6316,9 @@ const _sfc_main$d = {
|
|
|
6324
6316
|
selectableRows: {
|
|
6325
6317
|
validator: (value) => {
|
|
6326
6318
|
if (![void 0, true, false, 1, "1", ""].includes(value)) {
|
|
6327
|
-
consoleError(
|
|
6319
|
+
consoleError(
|
|
6320
|
+
`Wrong value for the w-table's \`selectableRows\` prop. Given: "${value}", expected one of: [undefined, true, false, 1, '1', ''].`
|
|
6321
|
+
);
|
|
6328
6322
|
}
|
|
6329
6323
|
return true;
|
|
6330
6324
|
}
|
|
@@ -6398,16 +6392,21 @@ const _sfc_main$d = {
|
|
|
6398
6392
|
},
|
|
6399
6393
|
classes() {
|
|
6400
6394
|
return {
|
|
6395
|
+
"w-table--fixed-layout": this.fixedLayout || this.resizableColumns || this.hasStickyColumn,
|
|
6401
6396
|
"w-table--mobile": this.isMobile || null,
|
|
6402
6397
|
"w-table--resizable-cols": this.resizableColumns || null,
|
|
6403
6398
|
"w-table--resizing": this.colResizing.dragging,
|
|
6404
6399
|
"w-table--fixed-header": this.fixedHeaders,
|
|
6405
|
-
"w-table--fixed-footer": this.fixedFooter
|
|
6400
|
+
"w-table--fixed-footer": this.fixedFooter,
|
|
6401
|
+
"w-table--sticky-column": this.hasStickyColumn
|
|
6406
6402
|
};
|
|
6407
6403
|
},
|
|
6408
6404
|
isMobile() {
|
|
6409
6405
|
return ~~this.mobileBreakpoint && this.$waveui.breakpoint.width <= ~~this.mobileBreakpoint;
|
|
6410
6406
|
},
|
|
6407
|
+
hasStickyColumn() {
|
|
6408
|
+
return this.headers.find((header) => header.sticky);
|
|
6409
|
+
},
|
|
6411
6410
|
selectedRowsByUid() {
|
|
6412
6411
|
return this.selectedRowsInternal.reduce((obj, uid) => (obj[uid] = true) && obj, {});
|
|
6413
6412
|
},
|
|
@@ -6419,6 +6418,7 @@ const _sfc_main$d = {
|
|
|
6419
6418
|
headerClasses(header) {
|
|
6420
6419
|
return {
|
|
6421
6420
|
"w-table__header--sortable": header.sortable !== false,
|
|
6421
|
+
"w-table__header--sticky": header.sticky,
|
|
6422
6422
|
"w-table__header--resizable": !!this.resizableColumns,
|
|
6423
6423
|
[`text-${header.align || "left"}`]: true
|
|
6424
6424
|
};
|
|
@@ -6452,12 +6452,15 @@ const _sfc_main$d = {
|
|
|
6452
6452
|
this.expandedRowsInternal.push(item._uid);
|
|
6453
6453
|
} else
|
|
6454
6454
|
this.expandedRowsInternal = this.expandedRowsInternal.filter((uid) => uid !== item._uid);
|
|
6455
|
-
this.$emit(
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6455
|
+
this.$emit(
|
|
6456
|
+
"row-expand",
|
|
6457
|
+
{
|
|
6458
|
+
item,
|
|
6459
|
+
index: index2,
|
|
6460
|
+
expanded: isExpanding,
|
|
6461
|
+
expandedRows: this.expandedRowsInternal.map((uid) => this.filteredItems[uid])
|
|
6462
|
+
}
|
|
6463
|
+
);
|
|
6461
6464
|
this.$emit("update:expanded-rows", this.expandedRowsInternal);
|
|
6462
6465
|
} else if (selectable) {
|
|
6463
6466
|
let updated = false;
|
|
@@ -6473,12 +6476,15 @@ const _sfc_main$d = {
|
|
|
6473
6476
|
updated = true;
|
|
6474
6477
|
}
|
|
6475
6478
|
if (updated) {
|
|
6476
|
-
this.$emit(
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6479
|
+
this.$emit(
|
|
6480
|
+
"row-select",
|
|
6481
|
+
{
|
|
6482
|
+
item,
|
|
6483
|
+
index: index2,
|
|
6484
|
+
selected: isSelecting,
|
|
6485
|
+
selectedRows: this.selectedRowsInternal.map((uid) => this.filteredItems[uid])
|
|
6486
|
+
}
|
|
6487
|
+
);
|
|
6482
6488
|
this.$emit("update:selected-rows", this.selectedRowsInternal);
|
|
6483
6489
|
}
|
|
6484
6490
|
}
|
|
@@ -6801,7 +6807,7 @@ const _sfc_main$b = {
|
|
|
6801
6807
|
},
|
|
6802
6808
|
computed: {
|
|
6803
6809
|
listeners() {
|
|
6804
|
-
const
|
|
6810
|
+
const { input, focus, blur, ...listeners } = this.$attrs;
|
|
6805
6811
|
return listeners;
|
|
6806
6812
|
},
|
|
6807
6813
|
hasValue() {
|
|
@@ -7072,10 +7078,10 @@ const _sfc_main$8 = {
|
|
|
7072
7078
|
return this.transition || `w-tooltip-slide-fade-${direction}`;
|
|
7073
7079
|
},
|
|
7074
7080
|
classes() {
|
|
7075
|
-
return
|
|
7081
|
+
return {
|
|
7076
7082
|
[this.color]: this.color,
|
|
7077
|
-
[`${this.bgColor}--bg`]: this.bgColor
|
|
7078
|
-
|
|
7083
|
+
[`${this.bgColor}--bg`]: this.bgColor,
|
|
7084
|
+
...this.tooltipClasses,
|
|
7079
7085
|
[`w-tooltip--${this.position}`]: !this.noPosition,
|
|
7080
7086
|
[`w-tooltip--align-${this.alignment}`]: !this.noPosition && this.alignment,
|
|
7081
7087
|
"w-tooltip--tile": this.tile,
|
|
@@ -7084,7 +7090,7 @@ const _sfc_main$8 = {
|
|
|
7084
7090
|
"w-tooltip--fixed": this.fixed,
|
|
7085
7091
|
"w-tooltip--no-border": this.noBorder || this.bgColor,
|
|
7086
7092
|
"w-tooltip--custom-transition": this.transition
|
|
7087
|
-
}
|
|
7093
|
+
};
|
|
7088
7094
|
},
|
|
7089
7095
|
styles() {
|
|
7090
7096
|
return {
|
|
@@ -7524,5 +7530,5 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
7524
7530
|
WTransitionTwist: wTransitionTwist
|
|
7525
7531
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7526
7532
|
const install = WaveUI.install;
|
|
7527
|
-
WaveUI.install = (app, options = {}) => install.call(WaveUI, app,
|
|
7528
|
-
export { WaveUI as default };
|
|
7533
|
+
WaveUI.install = (app, options = {}) => install.call(WaveUI, app, { components, ...options });
|
|
7534
|
+
export { WaveUI as default, useWaveUI };
|