wave-ui 2.26.0 → 2.29.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 +525 -297
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +16 -16
- package/src/wave-ui/components/index.js +2 -1
- package/src/wave-ui/components/w-accordion.vue +6 -4
- package/src/wave-ui/components/w-app.vue +42 -2
- package/src/wave-ui/components/w-card.vue +19 -5
- package/src/wave-ui/components/w-confirm.vue +103 -0
- package/src/wave-ui/components/w-flex.vue +2 -0
- package/src/wave-ui/components/w-icon.vue +1 -3
- package/src/wave-ui/components/w-input.vue +19 -3
- package/src/wave-ui/components/w-menu.vue +110 -57
- package/src/wave-ui/components/w-notification-manager.vue +1 -1
- package/src/wave-ui/components/w-table.vue +58 -29
- package/src/wave-ui/components/w-tabs/index.vue +2 -1
- package/src/wave-ui/components/w-textarea.vue +1 -1
- package/src/wave-ui/components/w-tooltip.vue +42 -110
- package/src/wave-ui/scss/_base.scss +0 -21
- package/src/wave-ui/scss/_mixins.scss +100 -0
- package/src/wave-ui/scss/_variables.scss +4 -9
- package/src/wave-ui/utils/index.js +11 -0
package/dist/wave-ui.es.js
CHANGED
|
@@ -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 = {}))
|
|
@@ -35,7 +33,7 @@ var __publicField = (obj, key, value) => {
|
|
|
35
33
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
36
34
|
return value;
|
|
37
35
|
};
|
|
38
|
-
import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, createSlots, withDirectives, vModelText, vModelDynamic,
|
|
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, createSlots, withDirectives, vModelText, vModelDynamic, resolveDirective, KeepAlive, vShow } from "vue";
|
|
39
37
|
const config = reactive({
|
|
40
38
|
breakpoints: {
|
|
41
39
|
xs: 600,
|
|
@@ -502,11 +500,11 @@ let WaveUI = _WaveUI;
|
|
|
502
500
|
__publicField(WaveUI, "instance", null);
|
|
503
501
|
__publicField(WaveUI, "vueInstance", null);
|
|
504
502
|
WaveUI.version = "__VERSION__";
|
|
505
|
-
const _hoisted_1$
|
|
506
|
-
const _hoisted_2$
|
|
507
|
-
const _hoisted_3$
|
|
508
|
-
const _hoisted_4$
|
|
509
|
-
function render$
|
|
503
|
+
const _hoisted_1$s = ["aria-expanded"];
|
|
504
|
+
const _hoisted_2$f = ["onClick", "onFocus", "onKeypress", "tabindex"];
|
|
505
|
+
const _hoisted_3$c = ["innerHTML"];
|
|
506
|
+
const _hoisted_4$b = ["innerHTML"];
|
|
507
|
+
function render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
510
508
|
const _component_w_button = resolveComponent("w-button");
|
|
511
509
|
const _component_w_transition_expand = resolveComponent("w-transition-expand");
|
|
512
510
|
return openBlock(), createElementBlock("div", {
|
|
@@ -527,7 +525,7 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
527
525
|
}, [
|
|
528
526
|
$props.expandIcon && !$props.expandIconRight ? (openBlock(), createBlock(_component_w_button, {
|
|
529
527
|
key: 0,
|
|
530
|
-
class: "w-accordion__expand-icon",
|
|
528
|
+
class: normalizeClass(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded": item._expanded }]),
|
|
531
529
|
icon: item._expanded && $props.collapseIcon || $props.expandIcon,
|
|
532
530
|
disabled: item._disabled || null,
|
|
533
531
|
tabindex: -1,
|
|
@@ -535,7 +533,7 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
535
533
|
onKeypress: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
536
534
|
}, ["stop"])),
|
|
537
535
|
onClick: withModifiers(($event) => !item._disabled && $options.toggleItem(item, $event), ["stop"])
|
|
538
|
-
}, null, 8, ["icon", "disabled", "onClick"])) : createCommentVNode("", true),
|
|
536
|
+
}, null, 8, ["icon", "disabled", "onClick", "class"])) : createCommentVNode("", true),
|
|
539
537
|
_ctx.$slots[`item-title.${item.id || i + 1}`] ? renderSlot(_ctx.$slots, `item-title.${item.id || i + 1}`, {
|
|
540
538
|
key: 1,
|
|
541
539
|
item: $options.getOriginalItem(item),
|
|
@@ -550,18 +548,18 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
550
548
|
createElementVNode("div", {
|
|
551
549
|
class: "grow",
|
|
552
550
|
innerHTML: item[$props.itemTitleKey]
|
|
553
|
-
}, null, 8, _hoisted_3$
|
|
551
|
+
}, null, 8, _hoisted_3$c)
|
|
554
552
|
]),
|
|
555
553
|
$props.expandIcon && $props.expandIconRight ? (openBlock(), createBlock(_component_w_button, {
|
|
556
554
|
key: 3,
|
|
557
|
-
class: "w-accordion__expand-icon",
|
|
555
|
+
class: normalizeClass(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded": item._expanded }]),
|
|
558
556
|
icon: item._expanded && $props.collapseIcon || $props.expandIcon,
|
|
559
557
|
text: "",
|
|
560
558
|
onKeypress: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
561
559
|
}, ["stop"])),
|
|
562
560
|
onClick: withModifiers(($event) => !item._disabled && $options.toggleItem(item, $event), ["stop"])
|
|
563
|
-
}, null, 8, ["icon", "onClick"])) : createCommentVNode("", true)
|
|
564
|
-
], 42, _hoisted_2$
|
|
561
|
+
}, null, 8, ["icon", "onClick", "class"])) : createCommentVNode("", true)
|
|
562
|
+
], 42, _hoisted_2$f),
|
|
565
563
|
createVNode(_component_w_transition_expand, { y: "" }, {
|
|
566
564
|
default: withCtx(() => [
|
|
567
565
|
item._expanded ? (openBlock(), createElementBlock("div", {
|
|
@@ -581,24 +579,25 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
581
579
|
}, () => [
|
|
582
580
|
createElementVNode("div", {
|
|
583
581
|
innerHTML: item[$props.itemContentKey]
|
|
584
|
-
}, null, 8, _hoisted_4$
|
|
582
|
+
}, null, 8, _hoisted_4$b)
|
|
585
583
|
])
|
|
586
584
|
], 2)) : createCommentVNode("", true)
|
|
587
585
|
]),
|
|
588
586
|
_: 2
|
|
589
587
|
}, 1024)
|
|
590
|
-
], 10, _hoisted_1$
|
|
588
|
+
], 10, _hoisted_1$s);
|
|
591
589
|
}), 128))
|
|
592
590
|
], 2);
|
|
593
591
|
}
|
|
594
592
|
var wAccordion_vue_vue_type_style_index_0_lang = "";
|
|
595
593
|
var _export_sfc = (sfc, props) => {
|
|
594
|
+
const target = sfc.__vccOpts || sfc;
|
|
596
595
|
for (const [key, val] of props) {
|
|
597
|
-
|
|
596
|
+
target[key] = val;
|
|
598
597
|
}
|
|
599
|
-
return
|
|
598
|
+
return target;
|
|
600
599
|
};
|
|
601
|
-
const _sfc_main$
|
|
600
|
+
const _sfc_main$O = {
|
|
602
601
|
name: "w-accordion",
|
|
603
602
|
props: {
|
|
604
603
|
modelValue: { type: Array },
|
|
@@ -670,9 +669,9 @@ const _sfc_main$N = {
|
|
|
670
669
|
}
|
|
671
670
|
}
|
|
672
671
|
};
|
|
673
|
-
var wAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
674
|
-
const _hoisted_1$
|
|
675
|
-
function render$
|
|
672
|
+
var wAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", render$O]]);
|
|
673
|
+
const _hoisted_1$r = { class: "w-alert__content" };
|
|
674
|
+
function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
676
675
|
const _component_w_icon = resolveComponent("w-icon");
|
|
677
676
|
const _component_w_button = resolveComponent("w-button");
|
|
678
677
|
return $data.show ? (openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -689,7 +688,7 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
689
688
|
]),
|
|
690
689
|
_: 1
|
|
691
690
|
})) : createCommentVNode("", true),
|
|
692
|
-
createElementVNode("div", _hoisted_1$
|
|
691
|
+
createElementVNode("div", _hoisted_1$r, [
|
|
693
692
|
renderSlot(_ctx.$slots, "default")
|
|
694
693
|
]),
|
|
695
694
|
$props.dismiss ? (openBlock(), createBlock(_component_w_button, {
|
|
@@ -709,7 +708,7 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
709
708
|
], 16)) : createCommentVNode("", true);
|
|
710
709
|
}
|
|
711
710
|
var wAlert_vue_vue_type_style_index_0_lang = "";
|
|
712
|
-
const _sfc_main$
|
|
711
|
+
const _sfc_main$N = {
|
|
713
712
|
name: "w-alert",
|
|
714
713
|
props: {
|
|
715
714
|
modelValue: { default: true },
|
|
@@ -785,8 +784,8 @@ const _sfc_main$M = {
|
|
|
785
784
|
}
|
|
786
785
|
}
|
|
787
786
|
};
|
|
788
|
-
var wAlert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
789
|
-
function render$
|
|
787
|
+
var wAlert = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", render$N]]);
|
|
788
|
+
function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
790
789
|
const _component_w_alert = resolveComponent("w-alert");
|
|
791
790
|
return openBlock(), createBlock(TransitionGroup, {
|
|
792
791
|
class: normalizeClass(["w-notification-manager", { "w-notification-manager--left": $options.conf.align === "left" }]),
|
|
@@ -817,7 +816,7 @@ function render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
817
816
|
}, 8, ["class", "name"]);
|
|
818
817
|
}
|
|
819
818
|
var wNotificationManager_vue_vue_type_style_index_0_lang = "";
|
|
820
|
-
const _sfc_main$
|
|
819
|
+
const _sfc_main$M = {
|
|
821
820
|
name: "w-notification-manager",
|
|
822
821
|
data: () => ({
|
|
823
822
|
notifManager: null
|
|
@@ -842,7 +841,7 @@ const _sfc_main$L = {
|
|
|
842
841
|
delete this.notifManager;
|
|
843
842
|
}
|
|
844
843
|
};
|
|
845
|
-
var NotificationManager = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
844
|
+
var NotificationManager = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", render$M]]);
|
|
846
845
|
const { css: cssConfig } = config;
|
|
847
846
|
const entries = Object.entries(config.breakpoints);
|
|
848
847
|
const breakpoints = entries.map(([label, max], i) => {
|
|
@@ -956,10 +955,10 @@ var DynamicCSS = () => {
|
|
|
956
955
|
styles += genBreakpointLayoutClasses();
|
|
957
956
|
return styles;
|
|
958
957
|
};
|
|
959
|
-
function render$
|
|
958
|
+
function render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
960
959
|
const _component_notification_manager = resolveComponent("notification-manager");
|
|
961
960
|
return openBlock(), createElementBlock("div", {
|
|
962
|
-
class: normalizeClass(["w-app",
|
|
961
|
+
class: normalizeClass(["w-app", $options.classes])
|
|
963
962
|
}, [
|
|
964
963
|
renderSlot(_ctx.$slots, "default"),
|
|
965
964
|
createVNode(_component_notification_manager)
|
|
@@ -968,17 +967,45 @@ function render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
968
967
|
var wApp_vue_vue_type_style_index_0_lang = "";
|
|
969
968
|
const breakpointsNames = Object.keys(config.breakpoints);
|
|
970
969
|
const breakpointsValues = Object.values(config.breakpoints);
|
|
971
|
-
const _sfc_main$
|
|
970
|
+
const _sfc_main$L = {
|
|
972
971
|
name: "w-app",
|
|
973
972
|
props: {
|
|
974
973
|
dark: { type: Boolean },
|
|
975
|
-
block: { type: Boolean }
|
|
974
|
+
block: { type: Boolean },
|
|
975
|
+
row: { type: Boolean },
|
|
976
|
+
alignCenter: { type: Boolean },
|
|
977
|
+
alignEnd: { type: Boolean },
|
|
978
|
+
justifyCenter: { type: Boolean },
|
|
979
|
+
justifyEnd: { type: Boolean },
|
|
980
|
+
justifySpaceBetween: { type: Boolean },
|
|
981
|
+
justifySpaceAround: { type: Boolean },
|
|
982
|
+
justifySpaceEvenly: { type: Boolean },
|
|
983
|
+
textCenter: { type: Boolean },
|
|
984
|
+
textRight: { type: Boolean }
|
|
976
985
|
},
|
|
977
986
|
components: { NotificationManager },
|
|
978
987
|
data: () => ({
|
|
979
988
|
currentBreakpoint: null,
|
|
980
989
|
notifManager: null
|
|
981
990
|
}),
|
|
991
|
+
computed: {
|
|
992
|
+
classes() {
|
|
993
|
+
return {
|
|
994
|
+
"d-block": this.block,
|
|
995
|
+
row: this.row,
|
|
996
|
+
"align-center": this.alignCenter,
|
|
997
|
+
"align-end": this.alignEnd,
|
|
998
|
+
"justify-center": this.justifyCenter,
|
|
999
|
+
"justify-end": this.justifyEnd,
|
|
1000
|
+
"justify-space-between": this.justifySpaceBetween,
|
|
1001
|
+
"justify-space-around": this.justifySpaceAround,
|
|
1002
|
+
"justify-space-evenly": this.justifySpaceEvenly,
|
|
1003
|
+
"text-center": this.textCenter,
|
|
1004
|
+
"text-right": this.textRight,
|
|
1005
|
+
"theme--dark": this.dark
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
982
1009
|
methods: {
|
|
983
1010
|
getBreakpoint() {
|
|
984
1011
|
const width = window.innerWidth;
|
|
@@ -1018,8 +1045,8 @@ const _sfc_main$K = {
|
|
|
1018
1045
|
window.removeEventListener("resize", this.getBreakpoint);
|
|
1019
1046
|
}
|
|
1020
1047
|
};
|
|
1021
|
-
var wApp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1022
|
-
function render$
|
|
1048
|
+
var wApp = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", render$L]]);
|
|
1049
|
+
function render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1023
1050
|
return openBlock(), createElementBlock("div", mergeProps({ class: "w-badge-wrap" }, toHandlers(_ctx.$attrs)), [
|
|
1024
1051
|
renderSlot(_ctx.$slots, "default"),
|
|
1025
1052
|
createVNode(Transition, {
|
|
@@ -1045,7 +1072,7 @@ function render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1045
1072
|
], 16);
|
|
1046
1073
|
}
|
|
1047
1074
|
var wBadge_vue_vue_type_style_index_0_lang = "";
|
|
1048
|
-
const _sfc_main$
|
|
1075
|
+
const _sfc_main$K = {
|
|
1049
1076
|
name: "w-badge",
|
|
1050
1077
|
props: {
|
|
1051
1078
|
modelValue: { default: true },
|
|
@@ -1107,9 +1134,9 @@ const _sfc_main$J = {
|
|
|
1107
1134
|
}
|
|
1108
1135
|
}
|
|
1109
1136
|
};
|
|
1110
|
-
var wBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1111
|
-
const _hoisted_1$
|
|
1112
|
-
function render$
|
|
1137
|
+
var wBadge = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", render$K]]);
|
|
1138
|
+
const _hoisted_1$q = ["innerHTML"];
|
|
1139
|
+
function render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1113
1140
|
const _component_w_icon = resolveComponent("w-icon");
|
|
1114
1141
|
return openBlock(), createElementBlock("div", {
|
|
1115
1142
|
class: normalizeClass(["w-breadcrumbs", $options.classes])
|
|
@@ -1160,13 +1187,13 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1160
1187
|
}) : (openBlock(), createElementBlock("span", {
|
|
1161
1188
|
key: `${i}f`,
|
|
1162
1189
|
innerHTML: item[$props.itemLabelKey]
|
|
1163
|
-
}, null, 8, _hoisted_1$
|
|
1190
|
+
}, null, 8, _hoisted_1$q))
|
|
1164
1191
|
], 64);
|
|
1165
1192
|
}), 256))
|
|
1166
1193
|
], 2);
|
|
1167
1194
|
}
|
|
1168
1195
|
var wBreadcrumbs_vue_vue_type_style_index_0_lang = "";
|
|
1169
|
-
const _sfc_main$
|
|
1196
|
+
const _sfc_main$J = {
|
|
1170
1197
|
name: "w-breadcrumbs",
|
|
1171
1198
|
props: {
|
|
1172
1199
|
items: { type: Array, required: true },
|
|
@@ -1197,12 +1224,12 @@ const _sfc_main$I = {
|
|
|
1197
1224
|
}
|
|
1198
1225
|
}
|
|
1199
1226
|
};
|
|
1200
|
-
var wBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1201
|
-
const _hoisted_1$
|
|
1227
|
+
var wBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", render$J]]);
|
|
1228
|
+
const _hoisted_1$p = {
|
|
1202
1229
|
key: 0,
|
|
1203
1230
|
class: "w-button__loader"
|
|
1204
1231
|
};
|
|
1205
|
-
const _hoisted_2$
|
|
1232
|
+
const _hoisted_2$e = /* @__PURE__ */ createElementVNode("svg", { viewBox: "0 0 40 40" }, [
|
|
1206
1233
|
/* @__PURE__ */ createElementVNode("circle", {
|
|
1207
1234
|
cx: "20",
|
|
1208
1235
|
cy: "20",
|
|
@@ -1213,7 +1240,7 @@ const _hoisted_2$d = /* @__PURE__ */ createElementVNode("svg", { viewBox: "0 0 4
|
|
|
1213
1240
|
"stroke-linecap": "round"
|
|
1214
1241
|
})
|
|
1215
1242
|
], -1);
|
|
1216
|
-
function render$
|
|
1243
|
+
function render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1217
1244
|
const _component_w_icon = resolveComponent("w-icon");
|
|
1218
1245
|
return openBlock(), createBlock(resolveDynamicComponent($props.route ? "a" : "button"), mergeProps({
|
|
1219
1246
|
class: ["w-button", $options.classes],
|
|
@@ -1230,9 +1257,9 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1230
1257
|
})) : renderSlot(_ctx.$slots, "default", { key: 1 }),
|
|
1231
1258
|
createVNode(Transition, { name: "scale-fade" }, {
|
|
1232
1259
|
default: withCtx(() => [
|
|
1233
|
-
$props.loading ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1260
|
+
$props.loading ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
1234
1261
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
1235
|
-
_hoisted_2$
|
|
1262
|
+
_hoisted_2$e
|
|
1236
1263
|
])
|
|
1237
1264
|
])) : createCommentVNode("", true)
|
|
1238
1265
|
]),
|
|
@@ -1243,7 +1270,7 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1243
1270
|
}, 16, ["type", "href", "class", "disabled", "style"]);
|
|
1244
1271
|
}
|
|
1245
1272
|
var wButton_vue_vue_type_style_index_0_lang = "";
|
|
1246
|
-
const _sfc_main$
|
|
1273
|
+
const _sfc_main$I = {
|
|
1247
1274
|
name: "w-button",
|
|
1248
1275
|
props: {
|
|
1249
1276
|
color: { type: String },
|
|
@@ -1335,7 +1362,106 @@ const _sfc_main$H = {
|
|
|
1335
1362
|
}
|
|
1336
1363
|
}
|
|
1337
1364
|
};
|
|
1338
|
-
var wButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1365
|
+
var wButton = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", render$I]]);
|
|
1366
|
+
const objectifyClasses = (classes = {}) => {
|
|
1367
|
+
if (typeof classes === "string")
|
|
1368
|
+
classes = { [classes]: true };
|
|
1369
|
+
else if (Array.isArray(classes))
|
|
1370
|
+
classes = { [classes.join(" ")]: true };
|
|
1371
|
+
return classes;
|
|
1372
|
+
};
|
|
1373
|
+
const _hoisted_1$o = ["innerHTML"];
|
|
1374
|
+
function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1375
|
+
const _component_w_image = resolveComponent("w-image");
|
|
1376
|
+
return openBlock(), createElementBlock("div", {
|
|
1377
|
+
class: normalizeClass(["w-card", $options.classes]),
|
|
1378
|
+
style: normalizeStyle($options.styles)
|
|
1379
|
+
}, [
|
|
1380
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
1381
|
+
key: 0,
|
|
1382
|
+
class: normalizeClass(["w-card__title", __spreadValues({ "w-card__title--has-toolbar": $options.titleHasToolbar }, $options.titleClasses)])
|
|
1383
|
+
}, [
|
|
1384
|
+
renderSlot(_ctx.$slots, "title")
|
|
1385
|
+
], 2)) : $props.title ? (openBlock(), createElementBlock("div", {
|
|
1386
|
+
key: 1,
|
|
1387
|
+
class: normalizeClass(["w-card__title", $options.titleClasses]),
|
|
1388
|
+
innerHTML: $props.title
|
|
1389
|
+
}, null, 10, _hoisted_1$o)) : createCommentVNode("", true),
|
|
1390
|
+
$props.image ? (openBlock(), createBlock(_component_w_image, mergeProps({
|
|
1391
|
+
key: 2,
|
|
1392
|
+
class: "w-card__image",
|
|
1393
|
+
src: $props.image
|
|
1394
|
+
}, $options.imgProps), {
|
|
1395
|
+
default: withCtx(() => [
|
|
1396
|
+
renderSlot(_ctx.$slots, "image-content")
|
|
1397
|
+
]),
|
|
1398
|
+
_: 3
|
|
1399
|
+
}, 16, ["src"])) : createCommentVNode("", true),
|
|
1400
|
+
createElementVNode("div", {
|
|
1401
|
+
class: normalizeClass(["w-card__content", $options.contentClasses])
|
|
1402
|
+
}, [
|
|
1403
|
+
renderSlot(_ctx.$slots, "default")
|
|
1404
|
+
], 2),
|
|
1405
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", {
|
|
1406
|
+
key: 3,
|
|
1407
|
+
class: normalizeClass(["w-card__actions", { "w-card__actions--has-toolbar": $options.actionsHasToolbar }])
|
|
1408
|
+
}, [
|
|
1409
|
+
renderSlot(_ctx.$slots, "actions")
|
|
1410
|
+
], 2)) : createCommentVNode("", true)
|
|
1411
|
+
], 6);
|
|
1412
|
+
}
|
|
1413
|
+
var wCard_vue_vue_type_style_index_0_lang = "";
|
|
1414
|
+
const _sfc_main$H = {
|
|
1415
|
+
name: "w-card",
|
|
1416
|
+
props: {
|
|
1417
|
+
color: { type: String },
|
|
1418
|
+
bgColor: { type: String },
|
|
1419
|
+
shadow: { type: Boolean },
|
|
1420
|
+
noBorder: { type: Boolean },
|
|
1421
|
+
tile: { type: Boolean },
|
|
1422
|
+
title: { type: String },
|
|
1423
|
+
image: { type: String },
|
|
1424
|
+
imageProps: { type: Object },
|
|
1425
|
+
titleClass: { type: [String, Object, Array] },
|
|
1426
|
+
contentClass: { type: [String, Object, Array] }
|
|
1427
|
+
},
|
|
1428
|
+
emits: [],
|
|
1429
|
+
computed: {
|
|
1430
|
+
titleClasses() {
|
|
1431
|
+
return objectifyClasses(this.titleClass);
|
|
1432
|
+
},
|
|
1433
|
+
contentClasses() {
|
|
1434
|
+
return objectifyClasses(this.contentClass);
|
|
1435
|
+
},
|
|
1436
|
+
titleHasToolbar() {
|
|
1437
|
+
const { title } = this.$slots;
|
|
1438
|
+
return title && title().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1439
|
+
},
|
|
1440
|
+
actionsHasToolbar() {
|
|
1441
|
+
const { actions } = this.$slots;
|
|
1442
|
+
return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1443
|
+
},
|
|
1444
|
+
imgProps() {
|
|
1445
|
+
return __spreadValues({
|
|
1446
|
+
tag: "div",
|
|
1447
|
+
ratio: 1 / 2
|
|
1448
|
+
}, this.imageProps);
|
|
1449
|
+
},
|
|
1450
|
+
classes() {
|
|
1451
|
+
return {
|
|
1452
|
+
[this.color]: this.color,
|
|
1453
|
+
[`${this.bgColor}--bg`]: this.bgColor,
|
|
1454
|
+
"w-card--no-border": this.noBorder,
|
|
1455
|
+
"w-card--tile": this.tile,
|
|
1456
|
+
"w-card--shadow": this.shadow
|
|
1457
|
+
};
|
|
1458
|
+
},
|
|
1459
|
+
styles() {
|
|
1460
|
+
return false;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
var wCard = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", render$H]]);
|
|
1339
1465
|
var FormElementMixin = {
|
|
1340
1466
|
inject: {
|
|
1341
1467
|
formRegister: { default: null },
|
|
@@ -1370,9 +1496,9 @@ var FormElementMixin = {
|
|
|
1370
1496
|
}
|
|
1371
1497
|
};
|
|
1372
1498
|
const _hoisted_1$n = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"];
|
|
1373
|
-
const _hoisted_2$
|
|
1374
|
-
const _hoisted_3$
|
|
1375
|
-
const _hoisted_4$
|
|
1499
|
+
const _hoisted_2$d = ["for"];
|
|
1500
|
+
const _hoisted_3$b = ["for", "innerHTML"];
|
|
1501
|
+
const _hoisted_4$a = /* @__PURE__ */ createElementVNode("svg", {
|
|
1376
1502
|
width: "11px",
|
|
1377
1503
|
height: "9px",
|
|
1378
1504
|
viewbox: "0 0 12 9"
|
|
@@ -1380,7 +1506,7 @@ const _hoisted_4$9 = /* @__PURE__ */ createElementVNode("svg", {
|
|
|
1380
1506
|
/* @__PURE__ */ createElementVNode("polyline", { points: "1 5 4 8 10 2" })
|
|
1381
1507
|
], -1);
|
|
1382
1508
|
const _hoisted_5$8 = [
|
|
1383
|
-
_hoisted_4$
|
|
1509
|
+
_hoisted_4$a
|
|
1384
1510
|
];
|
|
1385
1511
|
const _hoisted_6$5 = ["for"];
|
|
1386
1512
|
const _hoisted_7$5 = ["for", "innerHTML"];
|
|
@@ -1418,12 +1544,12 @@ function render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1418
1544
|
for: `w-checkbox--${_ctx._.uid}`
|
|
1419
1545
|
}, [
|
|
1420
1546
|
renderSlot(_ctx.$slots, "default")
|
|
1421
|
-
], 8, _hoisted_2$
|
|
1547
|
+
], 8, _hoisted_2$d)) : $props.label ? (openBlock(), createElementBlock("label", {
|
|
1422
1548
|
key: 1,
|
|
1423
1549
|
class: "w-checkbox__label w-form-el-shakable pr2",
|
|
1424
1550
|
for: `w-checkbox--${_ctx._.uid}`,
|
|
1425
1551
|
innerHTML: $props.label
|
|
1426
|
-
}, null, 8, _hoisted_3$
|
|
1552
|
+
}, null, 8, _hoisted_3$b)) : createCommentVNode("", true)
|
|
1427
1553
|
], 64)) : createCommentVNode("", true),
|
|
1428
1554
|
createElementVNode("div", {
|
|
1429
1555
|
class: normalizeClass(["w-checkbox__input", this.color]),
|
|
@@ -1629,92 +1755,140 @@ const _sfc_main$F = {
|
|
|
1629
1755
|
}
|
|
1630
1756
|
};
|
|
1631
1757
|
var wCheckboxes = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", render$F]]);
|
|
1632
|
-
const _hoisted_1$l =
|
|
1758
|
+
const _hoisted_1$l = { class: "w-confirm" };
|
|
1759
|
+
const _hoisted_2$c = /* @__PURE__ */ createTextVNode("Are you sure?");
|
|
1760
|
+
const _hoisted_3$a = /* @__PURE__ */ createTextVNode("Cancel");
|
|
1761
|
+
const _hoisted_4$9 = /* @__PURE__ */ createTextVNode("Confirm");
|
|
1633
1762
|
function render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
key: 2,
|
|
1651
|
-
class: "w-card__image",
|
|
1652
|
-
src: $props.image
|
|
1653
|
-
}, $options.imgProps), {
|
|
1763
|
+
const _component_w_button = resolveComponent("w-button");
|
|
1764
|
+
const _component_w_flex = resolveComponent("w-flex");
|
|
1765
|
+
const _component_w_menu = resolveComponent("w-menu");
|
|
1766
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
1767
|
+
createVNode(_component_w_menu, mergeProps({
|
|
1768
|
+
modelValue: _ctx.showPopup,
|
|
1769
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event)
|
|
1770
|
+
}, $options.wMenuProps), {
|
|
1771
|
+
activator: withCtx(({ on }) => [
|
|
1772
|
+
createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, toHandlers(on), $options.buttonProps), {
|
|
1773
|
+
default: withCtx(() => [
|
|
1774
|
+
renderSlot(_ctx.$slots, "default")
|
|
1775
|
+
]),
|
|
1776
|
+
_: 2
|
|
1777
|
+
}, 1040)
|
|
1778
|
+
]),
|
|
1654
1779
|
default: withCtx(() => [
|
|
1655
|
-
|
|
1780
|
+
createVNode(_component_w_flex, {
|
|
1781
|
+
column: !$props.inline,
|
|
1782
|
+
"align-center": ""
|
|
1783
|
+
}, {
|
|
1784
|
+
default: withCtx(() => [
|
|
1785
|
+
createElementVNode("div", null, [
|
|
1786
|
+
renderSlot(_ctx.$slots, "question", {}, () => [
|
|
1787
|
+
_hoisted_2$c
|
|
1788
|
+
])
|
|
1789
|
+
]),
|
|
1790
|
+
createElementVNode("div", {
|
|
1791
|
+
class: normalizeClass(["w-flex justify-end", $props.inline ? "ml2" : "mt2"])
|
|
1792
|
+
}, [
|
|
1793
|
+
!$props.noCancel ? (openBlock(), createBlock(_component_w_button, mergeProps({
|
|
1794
|
+
key: 0,
|
|
1795
|
+
class: "mr2"
|
|
1796
|
+
}, $props.cancelButton, {
|
|
1797
|
+
"bg-color": ($props.cancelButton || {}).bgColor || "error",
|
|
1798
|
+
onClick: $options.onCancel
|
|
1799
|
+
}), {
|
|
1800
|
+
default: withCtx(() => [
|
|
1801
|
+
renderSlot(_ctx.$slots, "cancel", {}, () => [
|
|
1802
|
+
_hoisted_3$a
|
|
1803
|
+
])
|
|
1804
|
+
]),
|
|
1805
|
+
_: 3
|
|
1806
|
+
}, 16, ["bg-color", "onClick"])) : createCommentVNode("", true),
|
|
1807
|
+
createVNode(_component_w_button, mergeProps($props.confirmButton, {
|
|
1808
|
+
"bg-color": ($props.confirmButton || {}).bgColor || "success",
|
|
1809
|
+
onClick: $options.onConfirm
|
|
1810
|
+
}), {
|
|
1811
|
+
default: withCtx(() => [
|
|
1812
|
+
renderSlot(_ctx.$slots, "confirm", {}, () => [
|
|
1813
|
+
_hoisted_4$9
|
|
1814
|
+
])
|
|
1815
|
+
]),
|
|
1816
|
+
_: 3
|
|
1817
|
+
}, 16, ["bg-color", "onClick"])
|
|
1818
|
+
], 2)
|
|
1819
|
+
]),
|
|
1820
|
+
_: 3
|
|
1821
|
+
}, 8, ["column"])
|
|
1656
1822
|
]),
|
|
1657
1823
|
_: 3
|
|
1658
|
-
}, 16, ["
|
|
1659
|
-
|
|
1660
|
-
class: normalizeClass(["w-card__content", $props.contentClass || false])
|
|
1661
|
-
}, [
|
|
1662
|
-
renderSlot(_ctx.$slots, "default")
|
|
1663
|
-
], 2),
|
|
1664
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", {
|
|
1665
|
-
key: 3,
|
|
1666
|
-
class: normalizeClass(["w-card__actions", { "w-card__actions--has-toolbar": $options.actionsHasToolbar }])
|
|
1667
|
-
}, [
|
|
1668
|
-
renderSlot(_ctx.$slots, "actions")
|
|
1669
|
-
], 2)) : createCommentVNode("", true)
|
|
1670
|
-
], 6);
|
|
1824
|
+
}, 16, ["modelValue"])
|
|
1825
|
+
]);
|
|
1671
1826
|
}
|
|
1672
|
-
var wCard_vue_vue_type_style_index_0_lang = "";
|
|
1673
1827
|
const _sfc_main$E = {
|
|
1674
|
-
name: "w-
|
|
1828
|
+
name: "w-confirm",
|
|
1675
1829
|
props: {
|
|
1676
|
-
color: { type: String },
|
|
1677
1830
|
bgColor: { type: String },
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1831
|
+
color: { type: String },
|
|
1832
|
+
icon: { type: String },
|
|
1833
|
+
mainButton: { type: Object },
|
|
1834
|
+
noCancel: { type: Boolean },
|
|
1835
|
+
cancelButton: { type: [Boolean, Object] },
|
|
1836
|
+
confirmButton: { type: Object },
|
|
1837
|
+
inline: { type: Boolean },
|
|
1838
|
+
menu: { type: Object },
|
|
1839
|
+
noArrow: { type: Boolean },
|
|
1840
|
+
top: { type: Boolean },
|
|
1841
|
+
bottom: { type: Boolean },
|
|
1842
|
+
left: { type: Boolean },
|
|
1843
|
+
right: { type: Boolean },
|
|
1844
|
+
alignTop: { type: Boolean },
|
|
1845
|
+
alignBottom: { type: Boolean },
|
|
1846
|
+
alignLeft: { type: Boolean },
|
|
1847
|
+
alignRight: { type: Boolean },
|
|
1848
|
+
persistent: { type: Boolean },
|
|
1849
|
+
transition: { type: String }
|
|
1686
1850
|
},
|
|
1687
|
-
emits: [],
|
|
1851
|
+
emits: ["cancel", "confirm"],
|
|
1852
|
+
data: () => ({
|
|
1853
|
+
showPopup: false,
|
|
1854
|
+
props: []
|
|
1855
|
+
}),
|
|
1688
1856
|
computed: {
|
|
1689
|
-
|
|
1690
|
-
const { title } = this.$slots;
|
|
1691
|
-
return title && title().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1692
|
-
},
|
|
1693
|
-
actionsHasToolbar() {
|
|
1694
|
-
const { actions } = this.$slots;
|
|
1695
|
-
return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1696
|
-
},
|
|
1697
|
-
imgProps() {
|
|
1857
|
+
wMenuProps() {
|
|
1698
1858
|
return __spreadValues({
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
};
|
|
1859
|
+
top: this.top,
|
|
1860
|
+
bottom: this.bottom,
|
|
1861
|
+
left: this.left,
|
|
1862
|
+
right: this.right,
|
|
1863
|
+
arrow: !this.noArrow,
|
|
1864
|
+
alignTop: this.alignTop,
|
|
1865
|
+
alignBottom: this.alignBottom,
|
|
1866
|
+
alignLeft: this.alignLeft,
|
|
1867
|
+
alignRight: this.alignRight,
|
|
1868
|
+
persistent: this.persistent,
|
|
1869
|
+
transition: this.transition
|
|
1870
|
+
}, this.menu);
|
|
1871
|
+
},
|
|
1872
|
+
buttonProps() {
|
|
1873
|
+
return __spreadValues({
|
|
1874
|
+
bgColor: this.bgColor,
|
|
1875
|
+
color: this.color,
|
|
1876
|
+
icon: this.icon
|
|
1877
|
+
}, this.mainButton);
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
methods: {
|
|
1881
|
+
onCancel() {
|
|
1882
|
+
this.$emit("cancel");
|
|
1883
|
+
this.showPopup = false;
|
|
1711
1884
|
},
|
|
1712
|
-
|
|
1713
|
-
|
|
1885
|
+
onConfirm() {
|
|
1886
|
+
this.$emit("confirm");
|
|
1887
|
+
this.showPopup = false;
|
|
1714
1888
|
}
|
|
1715
1889
|
}
|
|
1716
1890
|
};
|
|
1717
|
-
var
|
|
1891
|
+
var wConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", render$E]]);
|
|
1718
1892
|
function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1719
1893
|
return openBlock(), createElementBlock("div", {
|
|
1720
1894
|
class: normalizeClass(["w-date-picker", $options.classes]),
|
|
@@ -2110,6 +2284,7 @@ const _sfc_main$z = {
|
|
|
2110
2284
|
justifyEnd: { type: Boolean },
|
|
2111
2285
|
justifySpaceBetween: { type: Boolean },
|
|
2112
2286
|
justifySpaceAround: { type: Boolean },
|
|
2287
|
+
justifySpaceEvenly: { type: Boolean },
|
|
2113
2288
|
basisZero: { type: Boolean },
|
|
2114
2289
|
gap: { type: Number, default: 0 }
|
|
2115
2290
|
},
|
|
@@ -2131,6 +2306,7 @@ const _sfc_main$z = {
|
|
|
2131
2306
|
"justify-end": this.justifyEnd,
|
|
2132
2307
|
"justify-space-between": this.justifySpaceBetween,
|
|
2133
2308
|
"justify-space-around": this.justifySpaceAround,
|
|
2309
|
+
"justify-space-evenly": this.justifySpaceEvenly,
|
|
2134
2310
|
"basis-zero": this.basisZero,
|
|
2135
2311
|
[`w-flex--gap${this.gap}`]: this.gap
|
|
2136
2312
|
};
|
|
@@ -2716,6 +2892,7 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2716
2892
|
$props.type !== "file" ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
2717
2893
|
key: 1,
|
|
2718
2894
|
class: "w-input__input",
|
|
2895
|
+
ref: "input",
|
|
2719
2896
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.inputValue = $event)
|
|
2720
2897
|
}, toHandlers($options.listeners), {
|
|
2721
2898
|
onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
|
|
@@ -2737,9 +2914,9 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2737
2914
|
tabindex: _ctx.tabindex || null
|
|
2738
2915
|
}, $options.attrs), null, 16, _hoisted_4$8)), [
|
|
2739
2916
|
[vModelDynamic, $data.inputValue]
|
|
2740
|
-
]) :
|
|
2741
|
-
$props.type === "file" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2917
|
+
]) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2742
2918
|
createElementVNode("input", mergeProps({
|
|
2919
|
+
ref: "input",
|
|
2743
2920
|
id: `w-input--${_ctx._.uid}`,
|
|
2744
2921
|
type: "file",
|
|
2745
2922
|
name: _ctx.name || null,
|
|
@@ -2777,7 +2954,7 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2777
2954
|
]),
|
|
2778
2955
|
_: 3
|
|
2779
2956
|
}, 8, ["for"])
|
|
2780
|
-
], 64))
|
|
2957
|
+
], 64)),
|
|
2781
2958
|
$props.labelPosition === "inside" && $options.showLabelInside ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
2782
2959
|
_ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
2783
2960
|
key: 0,
|
|
@@ -2889,7 +3066,8 @@ const _sfc_main$u = {
|
|
|
2889
3066
|
inputNumberError: false,
|
|
2890
3067
|
isFocused: false,
|
|
2891
3068
|
inputFiles: [],
|
|
2892
|
-
fileReader: null
|
|
3069
|
+
fileReader: null,
|
|
3070
|
+
isAutofilled: false
|
|
2893
3071
|
};
|
|
2894
3072
|
},
|
|
2895
3073
|
computed: {
|
|
@@ -2906,7 +3084,7 @@ const _sfc_main$u = {
|
|
|
2906
3084
|
return htmlAttrs;
|
|
2907
3085
|
},
|
|
2908
3086
|
hasValue() {
|
|
2909
|
-
return this.inputValue || ["date", "time"].includes(this.type) || this.type === "number" && this.inputNumberError || this.type === "file" && this.inputFiles.length;
|
|
3087
|
+
return this.inputValue || this.inputValue === 0 || ["date", "time"].includes(this.type) || this.type === "number" && this.inputNumberError || this.type === "file" && this.inputFiles.length;
|
|
2910
3088
|
},
|
|
2911
3089
|
hasLabel() {
|
|
2912
3090
|
return this.label || this.$slots.default;
|
|
@@ -2920,7 +3098,7 @@ const _sfc_main$u = {
|
|
|
2920
3098
|
"w-input--file": this.type === "file",
|
|
2921
3099
|
"w-input--disabled": this.isDisabled,
|
|
2922
3100
|
"w-input--readonly": this.isReadonly,
|
|
2923
|
-
[`w-input--${this.hasValue ? "filled" : "empty"}`]: true,
|
|
3101
|
+
[`w-input--${this.hasValue || this.isAutofilled ? "filled" : "empty"}`]: true,
|
|
2924
3102
|
"w-input--focused": this.isFocused && !this.isReadonly,
|
|
2925
3103
|
"w-input--dark": this.dark,
|
|
2926
3104
|
"w-input--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
|
|
@@ -2991,9 +3169,17 @@ const _sfc_main$u = {
|
|
|
2991
3169
|
reader.readAsDataURL(original);
|
|
2992
3170
|
}
|
|
2993
3171
|
},
|
|
3172
|
+
mounted() {
|
|
3173
|
+
setTimeout(() => {
|
|
3174
|
+
if (this.$refs.input.matches(":-webkit-autofill"))
|
|
3175
|
+
this.isAutofilled = true;
|
|
3176
|
+
}, 400);
|
|
3177
|
+
},
|
|
2994
3178
|
watch: {
|
|
2995
3179
|
modelValue(value) {
|
|
2996
3180
|
this.inputValue = value;
|
|
3181
|
+
if (!value && value !== 0)
|
|
3182
|
+
this.isAutofilled = false;
|
|
2997
3183
|
}
|
|
2998
3184
|
}
|
|
2999
3185
|
};
|
|
@@ -3330,18 +3516,18 @@ const _sfc_main$t = {
|
|
|
3330
3516
|
}
|
|
3331
3517
|
};
|
|
3332
3518
|
var wList = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", render$t]]);
|
|
3333
|
-
const _hoisted_1$g = {
|
|
3334
|
-
class: "w-menu-wrap",
|
|
3335
|
-
ref: "wrapper"
|
|
3336
|
-
};
|
|
3519
|
+
const _hoisted_1$g = { class: "w-menu-wrap" };
|
|
3337
3520
|
function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3338
3521
|
const _component_w_card = resolveComponent("w-card");
|
|
3339
3522
|
const _component_w_overlay = resolveComponent("w-overlay");
|
|
3340
3523
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
3341
3524
|
renderSlot(_ctx.$slots, "activator", { on: $options.activatorEventHandlers }),
|
|
3342
|
-
createVNode(Transition, {
|
|
3525
|
+
createVNode(Transition, {
|
|
3526
|
+
name: $options.transitionName,
|
|
3527
|
+
appear: ""
|
|
3528
|
+
}, {
|
|
3343
3529
|
default: withCtx(() => [
|
|
3344
|
-
$props.custom ?
|
|
3530
|
+
$props.custom && _ctx.menuVisible ? (openBlock(), createElementBlock("div", {
|
|
3345
3531
|
key: 0,
|
|
3346
3532
|
class: normalizeClass(["w-menu", $options.classes]),
|
|
3347
3533
|
ref: "menu",
|
|
@@ -3351,9 +3537,7 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3351
3537
|
style: normalizeStyle($options.styles)
|
|
3352
3538
|
}, [
|
|
3353
3539
|
renderSlot(_ctx.$slots, "default")
|
|
3354
|
-
], 38)),
|
|
3355
|
-
[vShow, _ctx.showMenu]
|
|
3356
|
-
]) : withDirectives((openBlock(), createBlock(_component_w_card, {
|
|
3540
|
+
], 38)) : _ctx.menuVisible ? (openBlock(), createBlock(_component_w_card, {
|
|
3357
3541
|
key: 1,
|
|
3358
3542
|
class: normalizeClass(["w-menu", $options.classes]),
|
|
3359
3543
|
ref: "menu",
|
|
@@ -3361,8 +3545,8 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3361
3545
|
onMouseenter: _cache[4] || (_cache[4] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
|
|
3362
3546
|
onMouseleave: _cache[5] || (_cache[5] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.closeMenu())),
|
|
3363
3547
|
tile: $props.tile,
|
|
3364
|
-
"title-class": $
|
|
3365
|
-
"content-class": $
|
|
3548
|
+
"title-class": $options.titleClasses,
|
|
3549
|
+
"content-class": $options.contentClasses,
|
|
3366
3550
|
shadow: $props.shadow,
|
|
3367
3551
|
"no-border": $props.noBorder,
|
|
3368
3552
|
style: normalizeStyle($options.styles)
|
|
@@ -3384,23 +3568,21 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3384
3568
|
renderSlot(_ctx.$slots, "actions")
|
|
3385
3569
|
])
|
|
3386
3570
|
} : void 0
|
|
3387
|
-
]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])),
|
|
3388
|
-
[vShow, _ctx.showMenu]
|
|
3389
|
-
])
|
|
3571
|
+
]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
|
|
3390
3572
|
]),
|
|
3391
3573
|
_: 3
|
|
3392
3574
|
}, 8, ["name"]),
|
|
3393
3575
|
$props.overlay ? (openBlock(), createBlock(_component_w_overlay, mergeProps({
|
|
3394
3576
|
key: 0,
|
|
3395
3577
|
ref: "overlay",
|
|
3396
|
-
"model-value": _ctx.
|
|
3578
|
+
"model-value": _ctx.menuVisible,
|
|
3397
3579
|
persistent: $props.persistent,
|
|
3398
|
-
class: $
|
|
3580
|
+
class: $options.overlayClasses
|
|
3399
3581
|
}, $props.overlayProps, {
|
|
3400
3582
|
"z-index": ($props.zIndex || 200) - 1,
|
|
3401
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.
|
|
3583
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.menuVisible = false)
|
|
3402
3584
|
}), null, 16, ["model-value", "persistent", "class", "z-index"])) : createCommentVNode("", true)
|
|
3403
|
-
]
|
|
3585
|
+
]);
|
|
3404
3586
|
}
|
|
3405
3587
|
var wMenu_vue_vue_type_style_index_0_lang = "";
|
|
3406
3588
|
const _sfc_main$s = {
|
|
@@ -3417,9 +3599,10 @@ const _sfc_main$s = {
|
|
|
3417
3599
|
round: { type: Boolean },
|
|
3418
3600
|
noBorder: { type: Boolean },
|
|
3419
3601
|
transition: { type: String },
|
|
3420
|
-
menuClass: { type: String },
|
|
3421
|
-
titleClass: { type: String },
|
|
3422
|
-
contentClass: { type: String },
|
|
3602
|
+
menuClass: { type: [String, Object, Array] },
|
|
3603
|
+
titleClass: { type: [String, Object, Array] },
|
|
3604
|
+
contentClass: { type: [String, Object, Array] },
|
|
3605
|
+
arrow: { type: Boolean },
|
|
3423
3606
|
detachTo: { type: [String, Boolean, Object] },
|
|
3424
3607
|
fixed: { type: Boolean },
|
|
3425
3608
|
top: { type: Boolean },
|
|
@@ -3433,14 +3616,14 @@ const _sfc_main$s = {
|
|
|
3433
3616
|
zIndex: { type: [Number, String, Boolean] },
|
|
3434
3617
|
minWidth: { type: [Number, String] },
|
|
3435
3618
|
overlay: { type: Boolean },
|
|
3436
|
-
overlayClass: { type: String },
|
|
3619
|
+
overlayClass: { type: [String, Object, Array] },
|
|
3437
3620
|
overlayProps: { type: Object },
|
|
3438
3621
|
persistent: { type: Boolean },
|
|
3439
3622
|
noPosition: { type: Boolean }
|
|
3440
3623
|
},
|
|
3441
3624
|
emits: ["input", "update:modelValue", "open", "close"],
|
|
3442
3625
|
data: () => ({
|
|
3443
|
-
|
|
3626
|
+
menuVisible: false,
|
|
3444
3627
|
hoveringActivator: false,
|
|
3445
3628
|
hoveringMenu: false,
|
|
3446
3629
|
menuCoordinates: {
|
|
@@ -3457,20 +3640,21 @@ const _sfc_main$s = {
|
|
|
3457
3640
|
return this.transition || "scale-fade";
|
|
3458
3641
|
},
|
|
3459
3642
|
detachToTarget() {
|
|
3460
|
-
|
|
3643
|
+
const defaultTarget = ".w-app";
|
|
3644
|
+
let target = this.detachTo || defaultTarget;
|
|
3461
3645
|
if (target === true)
|
|
3462
|
-
target =
|
|
3646
|
+
target = defaultTarget;
|
|
3463
3647
|
else if (target && !["object", "string"].includes(typeof target))
|
|
3464
|
-
target =
|
|
3648
|
+
target = defaultTarget;
|
|
3465
3649
|
else if (typeof target === "object" && !target.nodeType) {
|
|
3466
|
-
target =
|
|
3650
|
+
target = defaultTarget;
|
|
3467
3651
|
consoleWarn("Invalid node provided in w-menu `detach-to`. Falling back to .w-app.");
|
|
3468
3652
|
}
|
|
3469
3653
|
if (typeof target === "string")
|
|
3470
3654
|
target = document.querySelector(target);
|
|
3471
3655
|
if (!target) {
|
|
3472
|
-
consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` :
|
|
3473
|
-
target = document.querySelector(
|
|
3656
|
+
consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : defaultTarget}`);
|
|
3657
|
+
target = document.querySelector(defaultTarget);
|
|
3474
3658
|
}
|
|
3475
3659
|
return target;
|
|
3476
3660
|
},
|
|
@@ -3489,26 +3673,40 @@ const _sfc_main$s = {
|
|
|
3489
3673
|
alignment() {
|
|
3490
3674
|
return (this.top || this.bottom) && this.alignLeft && "left" || (this.top || this.bottom) && this.alignRight && "right" || (this.left || this.right) && this.alignTop && "top" || (this.left || this.right) && this.alignBottom && "bottom" || "";
|
|
3491
3675
|
},
|
|
3676
|
+
menuClasses() {
|
|
3677
|
+
return objectifyClasses(this.menuClass);
|
|
3678
|
+
},
|
|
3679
|
+
titleClasses() {
|
|
3680
|
+
return objectifyClasses(this.titleClass);
|
|
3681
|
+
},
|
|
3682
|
+
contentClasses() {
|
|
3683
|
+
return objectifyClasses(this.contentClass);
|
|
3684
|
+
},
|
|
3685
|
+
overlayClasses() {
|
|
3686
|
+
return objectifyClasses(this.overlayClass);
|
|
3687
|
+
},
|
|
3492
3688
|
classes() {
|
|
3493
|
-
return {
|
|
3689
|
+
return __spreadProps(__spreadValues({
|
|
3494
3690
|
[this.color]: this.color,
|
|
3495
|
-
[`${this.bgColor}--bg`]: this.bgColor
|
|
3496
|
-
|
|
3497
|
-
[`w-menu--${this.position}`]:
|
|
3498
|
-
[`w-menu--align-${this.alignment}`]: this.alignment,
|
|
3691
|
+
[`${this.bgColor}--bg`]: this.bgColor
|
|
3692
|
+
}, this.menuClasses), {
|
|
3693
|
+
[`w-menu--${this.position}`]: !this.noPosition,
|
|
3694
|
+
[`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
|
|
3499
3695
|
"w-menu--tile": this.tile,
|
|
3500
3696
|
"w-menu--card": !this.custom,
|
|
3501
3697
|
"w-menu--round": this.round,
|
|
3698
|
+
"w-menu--arrow": this.arrow,
|
|
3502
3699
|
"w-menu--shadow": this.shadow,
|
|
3503
3700
|
"w-menu--fixed": this.fixed
|
|
3504
|
-
};
|
|
3701
|
+
});
|
|
3505
3702
|
},
|
|
3506
3703
|
styles() {
|
|
3507
3704
|
return {
|
|
3508
3705
|
zIndex: this.zIndex || this.zIndex === 0 || this.overlay && !this.zIndex && 200 || null,
|
|
3509
3706
|
top: this.menuCoordinates.top && `${~~this.menuCoordinates.top}px` || null,
|
|
3510
3707
|
left: this.menuCoordinates.left && `${~~this.menuCoordinates.left}px` || null,
|
|
3511
|
-
minWidth: this.minWidth && this.menuMinWidth || null
|
|
3708
|
+
minWidth: this.minWidth && this.menuMinWidth || null,
|
|
3709
|
+
"--w-menu-bg-color": this.arrow && this.$waveui.colors[this.bgColor || "white"]
|
|
3512
3710
|
};
|
|
3513
3711
|
},
|
|
3514
3712
|
activatorEventHandlers() {
|
|
@@ -3529,8 +3727,9 @@ const _sfc_main$s = {
|
|
|
3529
3727
|
}, 10);
|
|
3530
3728
|
}
|
|
3531
3729
|
};
|
|
3532
|
-
if ("ontouchstart" in window)
|
|
3730
|
+
if (typeof window !== "undefined" && "ontouchstart" in window) {
|
|
3533
3731
|
handlers.click = this.toggleMenu;
|
|
3732
|
+
}
|
|
3534
3733
|
} else
|
|
3535
3734
|
handlers = { click: this.toggleMenu };
|
|
3536
3735
|
return handlers;
|
|
@@ -3538,7 +3737,7 @@ const _sfc_main$s = {
|
|
|
3538
3737
|
},
|
|
3539
3738
|
methods: {
|
|
3540
3739
|
toggleMenu(e) {
|
|
3541
|
-
let shouldShowMenu = this.
|
|
3740
|
+
let shouldShowMenu = this.menuVisible;
|
|
3542
3741
|
if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
|
|
3543
3742
|
shouldShowMenu = !shouldShowMenu;
|
|
3544
3743
|
} else if (e.type === "click" && !this.showOnHover)
|
|
@@ -3551,35 +3750,40 @@ const _sfc_main$s = {
|
|
|
3551
3750
|
shouldShowMenu = false;
|
|
3552
3751
|
}
|
|
3553
3752
|
this.timeoutId = clearTimeout(this.timeoutId);
|
|
3554
|
-
if (shouldShowMenu)
|
|
3753
|
+
if (shouldShowMenu) {
|
|
3754
|
+
this.$emit("update:modelValue", this.menuVisible = true);
|
|
3755
|
+
this.$emit("input", true);
|
|
3756
|
+
this.$emit("open");
|
|
3555
3757
|
this.openMenu(e);
|
|
3556
|
-
else
|
|
3758
|
+
} else
|
|
3557
3759
|
this.closeMenu();
|
|
3558
3760
|
},
|
|
3559
|
-
openMenu(e) {
|
|
3761
|
+
async openMenu(e) {
|
|
3762
|
+
this.menuVisible = true;
|
|
3763
|
+
await this.insertMenu();
|
|
3560
3764
|
if (this.minWidth === "activator")
|
|
3561
3765
|
this.activatorWidth = this.activatorEl.offsetWidth;
|
|
3562
3766
|
if (!this.noPosition)
|
|
3563
3767
|
this.computeMenuPosition(e);
|
|
3564
3768
|
this.timeoutId = setTimeout(() => {
|
|
3565
|
-
this.$emit("update:modelValue",
|
|
3769
|
+
this.$emit("update:modelValue", true);
|
|
3566
3770
|
this.$emit("input", true);
|
|
3567
3771
|
this.$emit("open");
|
|
3568
|
-
},
|
|
3772
|
+
}, 0);
|
|
3569
3773
|
if (!this.persistent)
|
|
3570
3774
|
document.addEventListener("mousedown", this.onOutsideMousedown);
|
|
3571
3775
|
if (!this.noPosition)
|
|
3572
3776
|
window.addEventListener("resize", this.onResize);
|
|
3573
3777
|
},
|
|
3574
3778
|
async closeMenu(force = false) {
|
|
3575
|
-
if (!this.
|
|
3779
|
+
if (!this.menuVisible)
|
|
3576
3780
|
return;
|
|
3577
3781
|
if (this.showOnHover && !force) {
|
|
3578
3782
|
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
3579
3783
|
if (this.showOnHover && (this.hoveringMenu || this.hoveringActivator))
|
|
3580
3784
|
return;
|
|
3581
3785
|
}
|
|
3582
|
-
this.$emit("update:modelValue", this.
|
|
3786
|
+
this.$emit("update:modelValue", this.menuVisible = false);
|
|
3583
3787
|
this.$emit("input", false);
|
|
3584
3788
|
this.$emit("close");
|
|
3585
3789
|
document.removeEventListener("mousedown", this.onOutsideMousedown);
|
|
@@ -3587,7 +3791,7 @@ const _sfc_main$s = {
|
|
|
3587
3791
|
},
|
|
3588
3792
|
onOutsideMousedown(e) {
|
|
3589
3793
|
if (!this.menuEl.contains(e.target) && !this.activatorEl.contains(e.target)) {
|
|
3590
|
-
this.$emit("update:modelValue", this.
|
|
3794
|
+
this.$emit("update:modelValue", this.menuVisible = false);
|
|
3591
3795
|
this.$emit("input", false);
|
|
3592
3796
|
this.$emit("close");
|
|
3593
3797
|
document.removeEventListener("mousedown", this.onOutsideMousedown);
|
|
@@ -3653,40 +3857,47 @@ const _sfc_main$s = {
|
|
|
3653
3857
|
}
|
|
3654
3858
|
}
|
|
3655
3859
|
this.menuEl.style.visibility = null;
|
|
3656
|
-
if (!this.
|
|
3860
|
+
if (!this.menuVisible)
|
|
3657
3861
|
this.menuEl.style.display = "none";
|
|
3658
3862
|
this.menuCoordinates = { top, left };
|
|
3659
3863
|
},
|
|
3660
3864
|
insertMenu() {
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3865
|
+
return new Promise((resolve) => {
|
|
3866
|
+
this.$nextTick(() => {
|
|
3867
|
+
var _a;
|
|
3868
|
+
this.menuEl = ((_a = this.$refs.menu) == null ? void 0 : _a.$el) || this.$refs.menu;
|
|
3869
|
+
this.detachToTarget.appendChild(this.menuEl);
|
|
3870
|
+
resolve();
|
|
3871
|
+
});
|
|
3872
|
+
});
|
|
3667
3873
|
},
|
|
3668
3874
|
removeMenu() {
|
|
3669
3875
|
if (this.menuEl && this.menuEl.parentNode)
|
|
3670
|
-
this.menuEl.
|
|
3876
|
+
this.menuEl.remove();
|
|
3671
3877
|
}
|
|
3672
3878
|
},
|
|
3673
3879
|
mounted() {
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
this.
|
|
3880
|
+
var _a;
|
|
3881
|
+
const wrapper = this.$el;
|
|
3882
|
+
this.activatorEl = wrapper.firstElementChild;
|
|
3883
|
+
wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
|
|
3884
|
+
if (this.overlay) {
|
|
3885
|
+
this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
|
|
3886
|
+
wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
|
|
3887
|
+
}
|
|
3677
3888
|
if (this.modelValue)
|
|
3678
3889
|
this.toggleMenu({ type: "click", target: this.activatorEl });
|
|
3679
3890
|
},
|
|
3680
3891
|
beforeUnmount() {
|
|
3681
3892
|
this.removeMenu();
|
|
3682
3893
|
if (this.overlay && this.overlayEl.parentNode)
|
|
3683
|
-
this.overlayEl.
|
|
3894
|
+
this.overlayEl.remove();
|
|
3684
3895
|
if (this.activatorEl && this.activatorEl.parentNode)
|
|
3685
|
-
this.activatorEl.
|
|
3896
|
+
this.activatorEl.remove();
|
|
3686
3897
|
},
|
|
3687
3898
|
watch: {
|
|
3688
3899
|
modelValue(bool) {
|
|
3689
|
-
if (!!bool !== this.
|
|
3900
|
+
if (!!bool !== this.menuVisible)
|
|
3690
3901
|
this.toggleMenu({ type: "click", target: this.activatorEl });
|
|
3691
3902
|
},
|
|
3692
3903
|
detachTo() {
|
|
@@ -5399,7 +5610,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5399
5610
|
}, {
|
|
5400
5611
|
default: withCtx(() => [
|
|
5401
5612
|
(openBlock(), createBlock(KeepAlive, null, [
|
|
5402
|
-
|
|
5613
|
+
(openBlock(), createBlock(_component_tab_content, {
|
|
5403
5614
|
key: $options.activeTab._index,
|
|
5404
5615
|
class: normalizeClass($props.contentClass)
|
|
5405
5616
|
}, {
|
|
@@ -5421,7 +5632,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5421
5632
|
])
|
|
5422
5633
|
]),
|
|
5423
5634
|
_: 3
|
|
5424
|
-
}, 8, ["class"])
|
|
5635
|
+
}, 8, ["class"]))
|
|
5425
5636
|
], 1024))
|
|
5426
5637
|
]),
|
|
5427
5638
|
_: 3
|
|
@@ -5529,7 +5740,8 @@ const _sfc_main$e = {
|
|
|
5529
5740
|
},
|
|
5530
5741
|
updateSlider(domLookup = true) {
|
|
5531
5742
|
if (domLookup) {
|
|
5532
|
-
|
|
5743
|
+
const ref = this.$refs["tabs-bar"];
|
|
5744
|
+
this.activeTabEl = ref && ref.querySelector(".w-tabs__bar-item--active");
|
|
5533
5745
|
}
|
|
5534
5746
|
if (!this.fillBar && this.activeTabEl) {
|
|
5535
5747
|
const { left, width } = this.activeTabEl.getBoundingClientRect();
|
|
@@ -5588,38 +5800,40 @@ const _sfc_main$e = {
|
|
|
5588
5800
|
}
|
|
5589
5801
|
};
|
|
5590
5802
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", render$e]]);
|
|
5591
|
-
const _hoisted_1$3 =
|
|
5592
|
-
const _hoisted_2$2 =
|
|
5593
|
-
const _hoisted_3$2 =
|
|
5594
|
-
const _hoisted_4$1 =
|
|
5595
|
-
const _hoisted_5$1 =
|
|
5596
|
-
const _hoisted_6$1 =
|
|
5597
|
-
const _hoisted_7$1 =
|
|
5803
|
+
const _hoisted_1$3 = { ref: "colgroup" };
|
|
5804
|
+
const _hoisted_2$2 = ["width"];
|
|
5805
|
+
const _hoisted_3$2 = { key: 0 };
|
|
5806
|
+
const _hoisted_4$1 = ["onClick"];
|
|
5807
|
+
const _hoisted_5$1 = /* @__PURE__ */ createTextVNode("wi-arrow-down");
|
|
5808
|
+
const _hoisted_6$1 = ["innerHTML"];
|
|
5809
|
+
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("wi-arrow-down");
|
|
5810
|
+
const _hoisted_8 = {
|
|
5598
5811
|
key: 0,
|
|
5599
5812
|
class: "w-table__progress-bar"
|
|
5600
5813
|
};
|
|
5601
|
-
const
|
|
5602
|
-
const
|
|
5603
|
-
const
|
|
5604
|
-
const
|
|
5814
|
+
const _hoisted_9 = ["colspan"];
|
|
5815
|
+
const _hoisted_10 = { class: "w-table__loading-text" };
|
|
5816
|
+
const _hoisted_11 = /* @__PURE__ */ createTextVNode("Loading...");
|
|
5817
|
+
const _hoisted_12 = {
|
|
5605
5818
|
key: 1,
|
|
5606
5819
|
class: "no-data"
|
|
5607
5820
|
};
|
|
5608
|
-
const
|
|
5609
|
-
const
|
|
5610
|
-
const
|
|
5611
|
-
const _hoisted_15 = ["data-label"];
|
|
5821
|
+
const _hoisted_13 = ["colspan"];
|
|
5822
|
+
const _hoisted_14 = /* @__PURE__ */ createTextVNode("No data to show.");
|
|
5823
|
+
const _hoisted_15 = ["onClick"];
|
|
5612
5824
|
const _hoisted_16 = ["data-label"];
|
|
5613
|
-
const _hoisted_17 = ["
|
|
5614
|
-
const _hoisted_18 =
|
|
5825
|
+
const _hoisted_17 = ["data-label"];
|
|
5826
|
+
const _hoisted_18 = ["innerHTML"];
|
|
5827
|
+
const _hoisted_19 = {
|
|
5615
5828
|
key: 2,
|
|
5616
|
-
class: "w-table__row w-table__row--
|
|
5829
|
+
class: "w-table__row w-table__row--expansion"
|
|
5617
5830
|
};
|
|
5618
|
-
const
|
|
5619
|
-
const
|
|
5831
|
+
const _hoisted_20 = ["colspan"];
|
|
5832
|
+
const _hoisted_21 = { key: 0 };
|
|
5620
5833
|
function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5621
5834
|
const _component_w_icon = resolveComponent("w-icon");
|
|
5622
5835
|
const _component_w_progress = resolveComponent("w-progress");
|
|
5836
|
+
const _component_w_transition_expand = resolveComponent("w-transition-expand");
|
|
5623
5837
|
return openBlock(), createElementBlock("div", {
|
|
5624
5838
|
class: normalizeClass(["w-table-wrap", $options.wrapClasses])
|
|
5625
5839
|
}, [
|
|
@@ -5629,29 +5843,29 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5629
5843
|
onMouseover: _cache[2] || (_cache[2] = (...args) => $options.onMouseOver && $options.onMouseOver(...args)),
|
|
5630
5844
|
onMouseout: _cache[3] || (_cache[3] = (...args) => $options.onMouseOut && $options.onMouseOut(...args))
|
|
5631
5845
|
}, [
|
|
5632
|
-
createElementVNode("colgroup",
|
|
5846
|
+
createElementVNode("colgroup", _hoisted_1$3, [
|
|
5633
5847
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, i) => {
|
|
5634
5848
|
return openBlock(), createElementBlock("col", {
|
|
5635
5849
|
class: "w-table__col",
|
|
5636
5850
|
key: i,
|
|
5637
5851
|
width: header.width || null
|
|
5638
|
-
}, null, 8,
|
|
5852
|
+
}, null, 8, _hoisted_2$2);
|
|
5639
5853
|
}), 128))
|
|
5640
|
-
]),
|
|
5641
|
-
!$props.noHeaders ? (openBlock(), createElementBlock("thead",
|
|
5854
|
+
], 512),
|
|
5855
|
+
!$props.noHeaders ? (openBlock(), createElementBlock("thead", _hoisted_3$2, [
|
|
5642
5856
|
createElementVNode("tr", null, [
|
|
5643
5857
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, i) => {
|
|
5644
5858
|
return openBlock(), createElementBlock("th", {
|
|
5645
5859
|
class: normalizeClass(["w-table__header", $options.headerClasses(header)]),
|
|
5646
5860
|
key: i,
|
|
5647
|
-
onClick: ($event) => header.sortable !== false && $options.sortTable(header)
|
|
5861
|
+
onClick: ($event) => !_ctx.colResizing.dragging && header.sortable !== false && $options.sortTable(header)
|
|
5648
5862
|
}, [
|
|
5649
5863
|
header.sortable !== false && header.align === "right" ? (openBlock(), createBlock(_component_w_icon, {
|
|
5650
5864
|
key: 0,
|
|
5651
5865
|
class: normalizeClass(["w-table__header-sort", $options.headerSortClasses(header)])
|
|
5652
5866
|
}, {
|
|
5653
5867
|
default: withCtx(() => [
|
|
5654
|
-
|
|
5868
|
+
_hoisted_5$1
|
|
5655
5869
|
]),
|
|
5656
5870
|
_: 2
|
|
5657
5871
|
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
@@ -5666,14 +5880,14 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5666
5880
|
]) : (openBlock(), createElementBlock("span", {
|
|
5667
5881
|
key: 1,
|
|
5668
5882
|
innerHTML: header.label || ""
|
|
5669
|
-
}, null, 8,
|
|
5883
|
+
}, null, 8, _hoisted_6$1))
|
|
5670
5884
|
], 64)) : createCommentVNode("", true),
|
|
5671
5885
|
header.sortable !== false && header.align !== "right" ? (openBlock(), createBlock(_component_w_icon, {
|
|
5672
5886
|
key: 2,
|
|
5673
5887
|
class: normalizeClass(["w-table__header-sort", $options.headerSortClasses(header)])
|
|
5674
5888
|
}, {
|
|
5675
5889
|
default: withCtx(() => [
|
|
5676
|
-
|
|
5890
|
+
_hoisted_7$1
|
|
5677
5891
|
]),
|
|
5678
5892
|
_: 2
|
|
5679
5893
|
}, 1032, ["class"])) : createCommentVNode("", true),
|
|
@@ -5683,32 +5897,31 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5683
5897
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
5684
5898
|
}, ["stop"]))
|
|
5685
5899
|
}, null, 2)) : createCommentVNode("", true)
|
|
5686
|
-
], 10,
|
|
5900
|
+
], 10, _hoisted_4$1);
|
|
5687
5901
|
}), 128))
|
|
5688
5902
|
])
|
|
5689
5903
|
])) : createCommentVNode("", true),
|
|
5690
5904
|
createElementVNode("tbody", null, [
|
|
5691
|
-
$props.loading ? (openBlock(), createElementBlock("tr",
|
|
5905
|
+
$props.loading ? (openBlock(), createElementBlock("tr", _hoisted_8, [
|
|
5692
5906
|
createElementVNode("td", {
|
|
5693
5907
|
colspan: $props.headers.length
|
|
5694
5908
|
}, [
|
|
5695
5909
|
createVNode(_component_w_progress, { tile: "" }),
|
|
5696
|
-
createElementVNode("div",
|
|
5910
|
+
createElementVNode("div", _hoisted_10, [
|
|
5697
5911
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
5698
|
-
|
|
5912
|
+
_hoisted_11
|
|
5699
5913
|
])
|
|
5700
5914
|
])
|
|
5701
|
-
], 8,
|
|
5702
|
-
])) :
|
|
5703
|
-
!$options.tableItems.length ? (openBlock(), createElementBlock("tr", _hoisted_11, [
|
|
5915
|
+
], 8, _hoisted_9)
|
|
5916
|
+
])) : !$options.tableItems.length ? (openBlock(), createElementBlock("tr", _hoisted_12, [
|
|
5704
5917
|
createElementVNode("td", {
|
|
5705
5918
|
class: "w-table__cell text-center",
|
|
5706
5919
|
colspan: $props.headers.length
|
|
5707
5920
|
}, [
|
|
5708
5921
|
renderSlot(_ctx.$slots, "no-data", {}, () => [
|
|
5709
|
-
|
|
5922
|
+
_hoisted_14
|
|
5710
5923
|
])
|
|
5711
|
-
], 8,
|
|
5924
|
+
], 8, _hoisted_13)
|
|
5712
5925
|
])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList($options.sortedItems, (item, i) => {
|
|
5713
5926
|
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
5714
5927
|
_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
@@ -5716,10 +5929,10 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5716
5929
|
item,
|
|
5717
5930
|
index: i + 1,
|
|
5718
5931
|
select: () => $options.doSelectRow(item, i),
|
|
5719
|
-
classes: { "w-table__row": true, "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--
|
|
5932
|
+
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 }
|
|
5720
5933
|
}) : (openBlock(), createElementBlock("tr", {
|
|
5721
5934
|
key: 1,
|
|
5722
|
-
class: normalizeClass(["w-table__row", { "w-table__row--selected": $options.selectedRowsByUid[item._uid] !== void 0, "w-table__row--
|
|
5935
|
+
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 }]),
|
|
5723
5936
|
onClick: ($event) => $options.doSelectRow(item, i)
|
|
5724
5937
|
}, [
|
|
5725
5938
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (header, j) => {
|
|
@@ -5752,38 +5965,43 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5752
5965
|
key: 3,
|
|
5753
5966
|
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === j, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === j }])
|
|
5754
5967
|
}, null, 2)) : createCommentVNode("", true)
|
|
5755
|
-
], 10,
|
|
5968
|
+
], 10, _hoisted_16)) : (openBlock(), createElementBlock("td", {
|
|
5756
5969
|
class: normalizeClass(["w-table__cell", `text-${header.align || "left"}`]),
|
|
5757
5970
|
key: `${j}-b`,
|
|
5758
5971
|
"data-label": header.label
|
|
5759
5972
|
}, [
|
|
5760
5973
|
createElementVNode("div", {
|
|
5761
5974
|
innerHTML: item[header.key] || ""
|
|
5762
|
-
}, null, 8,
|
|
5975
|
+
}, null, 8, _hoisted_18),
|
|
5763
5976
|
j < $props.headers.length - 1 && $props.resizableColumns ? (openBlock(), createElementBlock("span", {
|
|
5764
5977
|
key: 0,
|
|
5765
5978
|
class: normalizeClass(["w-table__col-resizer", { "w-table__col-resizer--hover": _ctx.colResizing.hover === j, "w-table__col-resizer--active": _ctx.colResizing.columnIndex === j }])
|
|
5766
5979
|
}, null, 2)) : createCommentVNode("", true)
|
|
5767
|
-
], 10,
|
|
5980
|
+
], 10, _hoisted_17))
|
|
5768
5981
|
], 64);
|
|
5769
5982
|
}), 256))
|
|
5770
|
-
], 10,
|
|
5771
|
-
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("tr",
|
|
5983
|
+
], 10, _hoisted_15)),
|
|
5984
|
+
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("tr", _hoisted_19, [
|
|
5772
5985
|
createElementVNode("td", {
|
|
5773
5986
|
class: "w-table__cell",
|
|
5774
5987
|
colspan: $props.headers.length
|
|
5775
5988
|
}, [
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
item,
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5989
|
+
createVNode(_component_w_transition_expand, { y: "" }, {
|
|
5990
|
+
default: withCtx(() => [
|
|
5991
|
+
$options.expandedRowsByUid[item._uid] ? (openBlock(), createElementBlock("div", _hoisted_21, [
|
|
5992
|
+
renderSlot(_ctx.$slots, "row-expansion", {
|
|
5993
|
+
item,
|
|
5994
|
+
index: i + 1
|
|
5995
|
+
})
|
|
5996
|
+
])) : createCommentVNode("", true),
|
|
5997
|
+
i < $props.headers.length - 1 && $props.resizableColumns ? (openBlock(), createElementBlock("span", {
|
|
5998
|
+
key: 1,
|
|
5999
|
+
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 }])
|
|
6000
|
+
}, null, 2)) : createCommentVNode("", true)
|
|
6001
|
+
]),
|
|
6002
|
+
_: 2
|
|
6003
|
+
}, 1024)
|
|
6004
|
+
], 8, _hoisted_20)
|
|
5787
6005
|
])) : createCommentVNode("", true)
|
|
5788
6006
|
], 64);
|
|
5789
6007
|
}), 128))
|
|
@@ -5792,6 +6010,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5792
6010
|
], 2);
|
|
5793
6011
|
}
|
|
5794
6012
|
var wTable_vue_vue_type_style_index_0_lang = "";
|
|
6013
|
+
const minColumnWidth = 15;
|
|
5795
6014
|
const _sfc_main$d = {
|
|
5796
6015
|
name: "w-table",
|
|
5797
6016
|
props: {
|
|
@@ -5825,7 +6044,7 @@ const _sfc_main$d = {
|
|
|
5825
6044
|
mobileBreakpoint: { type: Number, default: 0 },
|
|
5826
6045
|
resizableColumns: { type: Boolean }
|
|
5827
6046
|
},
|
|
5828
|
-
emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows"],
|
|
6047
|
+
emits: ["row-select", "row-expand", "row-click", "update:sort", "update:selected-rows", "update:expanded-rows", "column-resize"],
|
|
5829
6048
|
data: () => ({
|
|
5830
6049
|
activeSorting: [],
|
|
5831
6050
|
selectedRowsInternal: [],
|
|
@@ -5849,9 +6068,7 @@ const _sfc_main$d = {
|
|
|
5849
6068
|
});
|
|
5850
6069
|
},
|
|
5851
6070
|
filteredItems() {
|
|
5852
|
-
|
|
5853
|
-
return this.tableItems.filter(this.filter);
|
|
5854
|
-
return this.tableItems;
|
|
6071
|
+
return typeof this.filter === "function" ? this.tableItems.filter(this.filter) : this.tableItems;
|
|
5855
6072
|
},
|
|
5856
6073
|
sortedItems() {
|
|
5857
6074
|
if (!this.activeSorting.length)
|
|
@@ -5996,26 +6213,34 @@ const _sfc_main$d = {
|
|
|
5996
6213
|
const newNextColWidth = nextColWidth - deltaX;
|
|
5997
6214
|
columnEl.style.width = colWidth + deltaX + "px";
|
|
5998
6215
|
nextColumnEl.style.width = nextColWidth - deltaX + "px";
|
|
5999
|
-
const minWidthReached = deltaX < 0 && columnEl.offsetWidth > newColWidth;
|
|
6216
|
+
const minWidthReached = deltaX < 0 && columnEl.offsetWidth > newColWidth || columnEl.offsetWidth <= minColumnWidth;
|
|
6000
6217
|
const maxWidthReached = deltaX > 0 && nextColumnEl.offsetWidth > newNextColWidth;
|
|
6001
6218
|
if (minWidthReached) {
|
|
6002
|
-
|
|
6003
|
-
|
|
6219
|
+
const newWidth = Math.max(columnEl.offsetWidth, minColumnWidth);
|
|
6220
|
+
columnEl.style.width = newWidth + "px";
|
|
6221
|
+
nextColumnEl.style.width = maxWidth - newWidth + "px";
|
|
6004
6222
|
} else if (maxWidthReached) {
|
|
6005
6223
|
columnEl.style.width = maxWidth - nextColumnEl.offsetWidth + "px";
|
|
6006
6224
|
nextColumnEl.style.width = nextColumnEl.offsetWidth + "px";
|
|
6007
6225
|
}
|
|
6008
6226
|
},
|
|
6009
|
-
onResizerMouseUp(
|
|
6227
|
+
onResizerMouseUp() {
|
|
6010
6228
|
document.removeEventListener("mousemove", this.onResizerMouseMove);
|
|
6011
6229
|
document.removeEventListener("mouseup", this.onResizerMouseUp);
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6230
|
+
setTimeout(() => {
|
|
6231
|
+
const widths = [...this.$refs.colgroup.childNodes].map((column) => {
|
|
6232
|
+
var _a;
|
|
6233
|
+
return ((_a = column.style) == null ? void 0 : _a.width) || column.offsetWidth;
|
|
6234
|
+
});
|
|
6235
|
+
this.$emit("column-resize", { index: this.colResizing.columnIndex, widths });
|
|
6236
|
+
this.colResizing.dragging = false;
|
|
6237
|
+
this.colResizing.columnIndex = null;
|
|
6238
|
+
this.colResizing.startCursorX = null;
|
|
6239
|
+
this.colResizing.columnEl = null;
|
|
6240
|
+
this.colResizing.nextColumnEl = null;
|
|
6241
|
+
this.colResizing.colWidth = null;
|
|
6242
|
+
this.colResizing.nextColWidth = null;
|
|
6243
|
+
}, 0);
|
|
6019
6244
|
}
|
|
6020
6245
|
},
|
|
6021
6246
|
created() {
|
|
@@ -6290,7 +6515,7 @@ const _sfc_main$b = {
|
|
|
6290
6515
|
return listeners;
|
|
6291
6516
|
},
|
|
6292
6517
|
hasValue() {
|
|
6293
|
-
return this.inputValue;
|
|
6518
|
+
return this.inputValue || this.inputValue === 0;
|
|
6294
6519
|
},
|
|
6295
6520
|
hasLabel() {
|
|
6296
6521
|
return this.label || this.$slots.default;
|
|
@@ -6488,11 +6713,13 @@ const _sfc_main$9 = {
|
|
|
6488
6713
|
var wToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$9]]);
|
|
6489
6714
|
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6490
6715
|
return openBlock(), createElementBlock("div", {
|
|
6491
|
-
class: normalizeClass(["w-tooltip-wrap", { "w-tooltip-wrap--attached": !$props.detachTo }])
|
|
6492
|
-
ref: "wrapper"
|
|
6716
|
+
class: normalizeClass(["w-tooltip-wrap", { "w-tooltip-wrap--attached": !$props.detachTo }])
|
|
6493
6717
|
}, [
|
|
6494
6718
|
renderSlot(_ctx.$slots, "activator", { on: $options.eventHandlers }),
|
|
6495
|
-
createVNode(Transition, {
|
|
6719
|
+
createVNode(Transition, {
|
|
6720
|
+
name: $options.transitionName,
|
|
6721
|
+
appear: ""
|
|
6722
|
+
}, {
|
|
6496
6723
|
default: withCtx(() => [
|
|
6497
6724
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
6498
6725
|
class: normalizeClass(["w-tooltip", $options.classes]),
|
|
@@ -6500,12 +6727,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6500
6727
|
key: _ctx._.uid,
|
|
6501
6728
|
style: normalizeStyle($options.styles)
|
|
6502
6729
|
}, [
|
|
6503
|
-
|
|
6504
|
-
key: 0,
|
|
6505
|
-
class: normalizeClass($props.color)
|
|
6506
|
-
}, [
|
|
6507
|
-
renderSlot(_ctx.$slots, "default")
|
|
6508
|
-
], 2)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
6730
|
+
renderSlot(_ctx.$slots, "default")
|
|
6509
6731
|
], 6)), [
|
|
6510
6732
|
[vShow, _ctx.showTooltip]
|
|
6511
6733
|
])
|
|
@@ -6527,8 +6749,8 @@ const _sfc_main$8 = {
|
|
|
6527
6749
|
shadow: { type: Boolean },
|
|
6528
6750
|
tile: { type: Boolean },
|
|
6529
6751
|
round: { type: Boolean },
|
|
6530
|
-
transition: { type: String
|
|
6531
|
-
tooltipClass: { type: String },
|
|
6752
|
+
transition: { type: String },
|
|
6753
|
+
tooltipClass: { type: [String, Object, Array] },
|
|
6532
6754
|
detachTo: {},
|
|
6533
6755
|
fixed: { type: Boolean },
|
|
6534
6756
|
top: { type: Boolean },
|
|
@@ -6551,30 +6773,34 @@ const _sfc_main$8 = {
|
|
|
6551
6773
|
timeoutId: null
|
|
6552
6774
|
}),
|
|
6553
6775
|
computed: {
|
|
6776
|
+
tooltipClasses() {
|
|
6777
|
+
return objectifyClasses(this.tooltipClass);
|
|
6778
|
+
},
|
|
6554
6779
|
transitionName() {
|
|
6555
6780
|
const direction = this.position.replace(/top|bottom/, (m) => ({ top: "up", bottom: "down" })[m]);
|
|
6556
6781
|
return this.transition || `w-tooltip-slide-fade-${direction}`;
|
|
6557
6782
|
},
|
|
6558
6783
|
detachToTarget() {
|
|
6559
|
-
|
|
6784
|
+
const defaultTarget = ".w-app";
|
|
6785
|
+
let target = this.detachTo || defaultTarget;
|
|
6560
6786
|
if (target === true)
|
|
6561
|
-
target =
|
|
6787
|
+
target = defaultTarget;
|
|
6562
6788
|
else if (target && !["object", "string"].includes(typeof target))
|
|
6563
|
-
target =
|
|
6789
|
+
target = defaultTarget;
|
|
6564
6790
|
else if (typeof target === "object" && !target.nodeType) {
|
|
6565
|
-
target =
|
|
6791
|
+
target = defaultTarget;
|
|
6566
6792
|
consoleWarn("Invalid node provided in w-tooltip `attach-to`. Falling back to .w-app.");
|
|
6567
6793
|
}
|
|
6568
6794
|
if (typeof target === "string")
|
|
6569
6795
|
target = document.querySelector(target);
|
|
6570
6796
|
if (!target) {
|
|
6571
|
-
consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` :
|
|
6572
|
-
target = document.querySelector(
|
|
6797
|
+
consoleWarn(`Unable to locate ${this.detachTo ? `target ${this.detachTo}` : defaultTarget}`);
|
|
6798
|
+
target = document.querySelector(defaultTarget);
|
|
6573
6799
|
}
|
|
6574
6800
|
return target;
|
|
6575
6801
|
},
|
|
6576
6802
|
tooltipParentEl() {
|
|
6577
|
-
return this.detachTo ? this.detachToTarget : this.$
|
|
6803
|
+
return this.detachTo ? this.detachToTarget : this.$el;
|
|
6578
6804
|
},
|
|
6579
6805
|
position() {
|
|
6580
6806
|
return this.top && "top" || this.bottom && "bottom" || this.left && "left" || this.right && "right" || "bottom";
|
|
@@ -6607,10 +6833,10 @@ const _sfc_main$8 = {
|
|
|
6607
6833
|
return coords;
|
|
6608
6834
|
},
|
|
6609
6835
|
classes() {
|
|
6610
|
-
return {
|
|
6611
|
-
[this.color]:
|
|
6612
|
-
[`${this.bgColor}
|
|
6613
|
-
|
|
6836
|
+
return __spreadProps(__spreadValues({
|
|
6837
|
+
[this.color]: this.color,
|
|
6838
|
+
[`${this.bgColor}--bg`]: this.bgColor
|
|
6839
|
+
}, this.tooltipClasses), {
|
|
6614
6840
|
[`w-tooltip--${this.position}`]: true,
|
|
6615
6841
|
"w-tooltip--tile": this.tile,
|
|
6616
6842
|
"w-tooltip--round": this.round,
|
|
@@ -6619,13 +6845,14 @@ const _sfc_main$8 = {
|
|
|
6619
6845
|
"w-tooltip--active": this.showTooltip,
|
|
6620
6846
|
"w-tooltip--no-border": this.noBorder || this.bgColor,
|
|
6621
6847
|
"w-tooltip--custom-transition": this.transition
|
|
6622
|
-
};
|
|
6848
|
+
});
|
|
6623
6849
|
},
|
|
6624
6850
|
styles() {
|
|
6625
6851
|
return {
|
|
6626
6852
|
zIndex: this.zIndex || this.zIndex === 0 || null,
|
|
6627
|
-
top: `${~~this.tooltipCoordinates.top}px
|
|
6628
|
-
left: `${~~this.tooltipCoordinates.left}px`
|
|
6853
|
+
top: this.tooltipCoordinates.top && `${~~this.tooltipCoordinates.top}px` || null,
|
|
6854
|
+
left: this.tooltipCoordinates.left && `${~~this.tooltipCoordinates.left}px` || null,
|
|
6855
|
+
"--w-tooltip-bg-color": this.$waveui.colors[this.bgColor || "white"]
|
|
6629
6856
|
};
|
|
6630
6857
|
},
|
|
6631
6858
|
eventHandlers() {
|
|
@@ -6639,7 +6866,7 @@ const _sfc_main$8 = {
|
|
|
6639
6866
|
mouseenter: this.toggle,
|
|
6640
6867
|
mouseleave: this.toggle
|
|
6641
6868
|
};
|
|
6642
|
-
if ("ontouchstart" in window)
|
|
6869
|
+
if (typeof window !== "undefined" && "ontouchstart" in window)
|
|
6643
6870
|
handlers.click = this.toggle;
|
|
6644
6871
|
}
|
|
6645
6872
|
return handlers;
|
|
@@ -6648,7 +6875,7 @@ const _sfc_main$8 = {
|
|
|
6648
6875
|
methods: {
|
|
6649
6876
|
toggle(e) {
|
|
6650
6877
|
let shouldShowTooltip = this.showTooltip;
|
|
6651
|
-
if ("ontouchstart" in window) {
|
|
6878
|
+
if (typeof window !== "undefined" && "ontouchstart" in window) {
|
|
6652
6879
|
if (e.type === "click")
|
|
6653
6880
|
shouldShowTooltip = !shouldShowTooltip;
|
|
6654
6881
|
} else if (e.type === "click" && this.showOnClick)
|
|
@@ -6712,17 +6939,17 @@ const _sfc_main$8 = {
|
|
|
6712
6939
|
return coords;
|
|
6713
6940
|
},
|
|
6714
6941
|
insertTooltip() {
|
|
6715
|
-
const wrapper = this.$
|
|
6942
|
+
const wrapper = this.$el;
|
|
6716
6943
|
wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
|
|
6717
6944
|
this.detachToTarget.appendChild(this.tooltipEl);
|
|
6718
6945
|
},
|
|
6719
6946
|
removeTooltip() {
|
|
6720
6947
|
if (this.tooltipEl && this.tooltipEl.parentNode)
|
|
6721
|
-
this.tooltipEl.
|
|
6948
|
+
this.tooltipEl.remove();
|
|
6722
6949
|
}
|
|
6723
6950
|
},
|
|
6724
6951
|
mounted() {
|
|
6725
|
-
this.activatorEl = this.$
|
|
6952
|
+
this.activatorEl = this.$el.firstElementChild;
|
|
6726
6953
|
if (this.detachTo)
|
|
6727
6954
|
this.insertTooltip();
|
|
6728
6955
|
if (this.modelValue)
|
|
@@ -6731,7 +6958,7 @@ const _sfc_main$8 = {
|
|
|
6731
6958
|
beforeUnmount() {
|
|
6732
6959
|
this.removeTooltip();
|
|
6733
6960
|
if (this.activatorEl && this.activatorEl.parentNode)
|
|
6734
|
-
this.activatorEl.
|
|
6961
|
+
this.activatorEl.remove();
|
|
6735
6962
|
},
|
|
6736
6963
|
watch: {
|
|
6737
6964
|
modelValue(bool) {
|
|
@@ -7082,9 +7309,10 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
7082
7309
|
WBadge: wBadge,
|
|
7083
7310
|
WBreadcrumbs: wBreadcrumbs,
|
|
7084
7311
|
WButton: wButton,
|
|
7312
|
+
WCard: wCard,
|
|
7085
7313
|
WCheckbox: wCheckbox,
|
|
7086
7314
|
WCheckboxes: wCheckboxes,
|
|
7087
|
-
|
|
7315
|
+
WConfirm: wConfirm,
|
|
7088
7316
|
WDatePicker: wDatePicker,
|
|
7089
7317
|
WDialog: wDialog,
|
|
7090
7318
|
WDivider: wDivider,
|