@fewangsit/wangsvue-fats 1.0.1-alpha.68 → 1.0.1-alpha.69
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/animation/index.es.js +9 -8
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +113 -97
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +1 -1
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/checkbox/index.es.js +5 -5
- package/config/defaultProps.es.js +3 -4
- package/datatable/index.es.js +470 -465
- package/datepicker/index.es.js +17 -17
- package/daypicker/index.es.js +21 -21
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +89 -89
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +89 -89
- package/dialogform/index.es.js +16 -16
- package/dialogfulltransferlog/index.es.js +96 -96
- package/dialoglinkedasset/index.es.js +48 -48
- package/dialogprintqr/index.es.js +70 -70
- package/dialogreportdamage/index.es.js +57 -57
- package/dialogreportmissing/index.es.js +94 -86
- package/dialogselecttree/index.es.js +18 -16
- package/dialogselectuser/index.es.js +16 -16
- package/directives/index.d.ts +1 -0
- package/directives/index.es.js +1 -0
- package/directives/safeHtml.d.ts +16 -0
- package/directives/safeHtml.es.js +12 -0
- package/disposalreport/index.es.js +1 -1
- package/disposalreportbulkaction/index.es.js +40 -41
- package/disposalreportdialogselectasset/index.es.js +72 -72
- package/disposalreporttable/index.es.js +108 -108
- package/disposalreporttablefilter/index.es.js +16 -17
- package/dropdown/index.es.js +120 -117
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +35 -31
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +26 -25
- package/imagecompressor/index.es.js +143 -143
- package/imageinputinfo/index.es.js +13 -13
- package/inlinemessage/index.es.js +12 -12
- package/inputbadge/index.es.js +42 -43
- package/inputnumber/index.es.js +7 -7
- package/inputpassword/index.es.js +9 -9
- package/inputrangenumber/index.es.js +16 -16
- package/inputsearch/index.es.js +18 -18
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +48 -40
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +16 -16
- package/multiselect/index.es.js +86 -83
- package/package.json +1 -1
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/style.css +1 -1
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +33 -30
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/treesearchinput/index.es.js +11 -11
- package/username/index.es.js +39 -39
- package/utils/baseToast.util.es.js +23 -22
- package/utils/index.es.js +1 -2
- package/utils/textFormatter.util.d.ts +32 -0
- package/utils/textFormatter.util.es.js +38 -10
- package/validatormessage/index.es.js +1 -1
- package/vendor/dompurify/dist/purify.es.es.js +553 -0
- package/wangsvue-fats.d.ts +2 -1
- package/wangsvue-fats.es.js +190 -186
- package/wangsvue-fats.esm.browser.js +17750 -17086
- package/wangsvue-fats.system.js +73 -72
package/inputtext/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as Y, inject as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as Y, inject as $, reactive as q, computed as y, shallowRef as V, onMounted as J, onBeforeUnmount as Q, watch as x, createBlock as c, openBlock as d, withCtx as f, createVNode as X, createElementBlock as ee, normalizeClass as M, createCommentVNode as k, unref as m, renderSlot as R, mergeProps as ae, toDisplayString as te, nextTick as le } from "vue";
|
|
2
|
+
import { u as se } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { u as E } from "../plugins/WangsVue.es.js";
|
|
4
|
-
import { m as
|
|
4
|
+
import { m as ne } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
5
5
|
import { s as A } from "../vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js";
|
|
6
|
-
import { s as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { d as
|
|
11
|
-
const g = "Checking availability...",
|
|
6
|
+
import { s as re } from "../vendor/primevue/inputtext/inputtext.esm.es.js";
|
|
7
|
+
import { _ as oe } from "../fieldwrapper/index.es.js";
|
|
8
|
+
import { _ as ie } from "../inputgroup/index.es.js";
|
|
9
|
+
import { _ as de } from "../validatormessage/index.es.js";
|
|
10
|
+
import { d as ue } from "../vendor/lodash-es/debounce.es.js";
|
|
11
|
+
const g = "Checking availability...", Me = /* @__PURE__ */ Y({
|
|
12
12
|
__name: "InputText",
|
|
13
13
|
props: {
|
|
14
14
|
allowedCharacters: {},
|
|
@@ -46,21 +46,21 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
46
46
|
const a = O, h = w, { defaultProps: T } = E(
|
|
47
47
|
// eslint-disable-next-line no-nested-ternary
|
|
48
48
|
a.type === "email" ? "InputEmail" : a.type === "url" ? "InputURL" : "InputText"
|
|
49
|
-
), { locale: r } = E("InputText"), o =
|
|
49
|
+
), { locale: r } = E("InputText"), o = ne(a, T), z = $(
|
|
50
50
|
"preset",
|
|
51
51
|
{}
|
|
52
52
|
).inputgroupaddon, l = q({
|
|
53
53
|
value: void 0
|
|
54
|
-
}), v =
|
|
54
|
+
}), v = $(
|
|
55
55
|
"isSubmitting"
|
|
56
|
-
), C = y(() => a.invalid || !!l.errorMessage), b =
|
|
56
|
+
), C = y(() => a.invalid || !!l.errorMessage), b = V(0), s = V(
|
|
57
57
|
a.value || a.modelValue
|
|
58
58
|
);
|
|
59
59
|
J(() => {
|
|
60
60
|
var e;
|
|
61
61
|
a.useValidator && (Object.assign(
|
|
62
62
|
l,
|
|
63
|
-
|
|
63
|
+
se(a.fieldName ?? "textInput", (t) => le(() => S(t == null ? void 0 : t.trim())))
|
|
64
64
|
), a.value != null && B(a.value)), a.modelValue != null && (l.value = (e = a.modelValue) == null ? void 0 : e.trim()), a.invalid && a.useValidator && l.validate();
|
|
65
65
|
}), Q(() => {
|
|
66
66
|
a.useValidator && l.handleReset();
|
|
@@ -76,12 +76,12 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
76
76
|
), I = y(() => {
|
|
77
77
|
var e, t;
|
|
78
78
|
return typeof a.validatorMessage == "object" && "exist" in a.validatorMessage ? (e = a.validatorMessage) == null ? void 0 : e.exist : (t = r.alreadyExistInvalidText) == null ? void 0 : t.replace("{label}", a.label);
|
|
79
|
-
}),
|
|
79
|
+
}), S = (e) => {
|
|
80
80
|
var t, n, i, u;
|
|
81
81
|
if (typeof a.validatorMessage == "string" && a.invalid)
|
|
82
82
|
return a.validatorMessage;
|
|
83
83
|
if (typeof a.validatorMessage != "string") {
|
|
84
|
-
const { invalidFormat:
|
|
84
|
+
const { invalidFormat: p, empty: W, exceed: Z } = a.validatorMessage ?? {};
|
|
85
85
|
if (!e && a.mandatory)
|
|
86
86
|
return W ?? r.emptyInvalidText.replace("{label}", a.label);
|
|
87
87
|
if ((e == null ? void 0 : e.length) > o.maxLength)
|
|
@@ -92,12 +92,12 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
92
92
|
if ((n = (a.existingValues ?? []).filter((H) => H != a.value)) != null && n.includes(e))
|
|
93
93
|
return ((i = a.validatorMessage) == null ? void 0 : i.exist) ?? ((u = r.alreadyExistInvalidText) == null ? void 0 : u.replace("{label}", a.label));
|
|
94
94
|
if (e && a.type === "email")
|
|
95
|
-
return
|
|
95
|
+
return _(
|
|
96
96
|
e,
|
|
97
|
-
|
|
97
|
+
p ?? r.emailFormatInvalidText
|
|
98
98
|
);
|
|
99
99
|
if (e && a.type === "url")
|
|
100
|
-
return U(e,
|
|
100
|
+
return U(e, p ?? r.urlFormatInvalidText);
|
|
101
101
|
} else if (!a.allowSpecialCharacters)
|
|
102
102
|
return /[^A-Za-z0-9 ]/.test(e) ? r.includeSpecialCharsInvalidText : !0;
|
|
103
103
|
return a.checkAvailability ? L() : !0;
|
|
@@ -108,7 +108,7 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
108
108
|
"i"
|
|
109
109
|
);
|
|
110
110
|
return t == null || n.test(e) ? !0 : t;
|
|
111
|
-
},
|
|
111
|
+
}, _ = (e, t) => {
|
|
112
112
|
const n = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
|
|
113
113
|
return t == null || n.test(e) ? !a.checkAvailability || !!a.checkAvailability && L() : t;
|
|
114
114
|
}, G = () => {
|
|
@@ -118,20 +118,20 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
118
118
|
const t = o.maxLength && o.maxLength === ((i = s.value) == null ? void 0 : i.length);
|
|
119
119
|
(a.allowedCharacters && !a.allowedCharacters.test(e.key) || t && (a.preventInputOnMaxLength || a.blurOnReachMaxLength)) && (e.preventDefault(), a.blurOnReachMaxLength && t && b.value++);
|
|
120
120
|
}, N = (e) => {
|
|
121
|
-
var i, u,
|
|
122
|
-
const t = (i = e.clipboardData) == null ? void 0 : i.getData("text"), n = o.maxLength && o.maxLength === ((u = s.value) == null ? void 0 : u.length) || ((
|
|
121
|
+
var i, u, p;
|
|
122
|
+
const t = (i = e.clipboardData) == null ? void 0 : i.getData("text"), n = o.maxLength && o.maxLength === ((u = s.value) == null ? void 0 : u.length) || ((p = s.value) == null ? void 0 : p.length) + (t == null ? void 0 : t.length) > o.maxLength || (t == null ? void 0 : t.length) > o.maxLength;
|
|
123
123
|
(a.allowedCharacters && !a.allowedCharacters.test(t) || n && (a.preventInputOnMaxLength || a.blurOnReachMaxLength)) && (e.preventDefault(), a.blurOnReachMaxLength && n && b.value++);
|
|
124
124
|
}, j = (e) => {
|
|
125
125
|
e === "" && (e = void 0), a.autoUppercase && e && (e = e.replace(/[a-z]/g, (t) => t.toUpperCase())), s.value = e, (!a.validateOnBlur && a.useValidator || !a.useValidator) && (l.value = s.value), h("update:modelValue", s.value);
|
|
126
|
-
},
|
|
126
|
+
}, D = (e) => {
|
|
127
127
|
h("input", e.target.value || void 0);
|
|
128
128
|
}, L = () => {
|
|
129
129
|
if (v != null && v.value) {
|
|
130
130
|
if (l.errorMessage === I.value || l.errorMessage === g)
|
|
131
131
|
return l.errorMessage;
|
|
132
|
-
} else return
|
|
132
|
+
} else return F(), g;
|
|
133
133
|
return !0;
|
|
134
|
-
},
|
|
134
|
+
}, F = ue(async () => {
|
|
135
135
|
var e;
|
|
136
136
|
if (l.value != a.value && (e = l.value) != null && e.length && !await a.checkAvailability(l.value))
|
|
137
137
|
return l.setErrors(I.value);
|
|
@@ -156,14 +156,14 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
156
156
|
var e;
|
|
157
157
|
(e = l.validate) == null || e.call(l);
|
|
158
158
|
}
|
|
159
|
-
), (e, t) => (d(),
|
|
159
|
+
), (e, t) => (d(), c(oe, {
|
|
160
160
|
info: e.fieldInfo,
|
|
161
161
|
label: a.label,
|
|
162
162
|
"label-class": a.labelClass,
|
|
163
163
|
mandatory: a.mandatory
|
|
164
164
|
}, {
|
|
165
165
|
default: f(() => [
|
|
166
|
-
X(
|
|
166
|
+
X(ie, {
|
|
167
167
|
class: M(
|
|
168
168
|
a.inputContainerClass ?? [
|
|
169
169
|
"grid ",
|
|
@@ -179,7 +179,7 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
179
179
|
"use-input-group": e.useInputGroup
|
|
180
180
|
}, {
|
|
181
181
|
default: f(() => [
|
|
182
|
-
e.$slots["addon-left"] ? (d(),
|
|
182
|
+
e.$slots["addon-left"] ? (d(), c(m(A), {
|
|
183
183
|
key: 0,
|
|
184
184
|
disabled: a.disabled
|
|
185
185
|
}, {
|
|
@@ -188,21 +188,21 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
188
188
|
]),
|
|
189
189
|
_: 3
|
|
190
190
|
}, 8, ["disabled"])) : k("", !0),
|
|
191
|
-
(d(),
|
|
191
|
+
(d(), c(m(re), {
|
|
192
192
|
id: e.inputId,
|
|
193
193
|
key: b.value,
|
|
194
194
|
class: M(e.inputClass),
|
|
195
195
|
disabled: e.disabled,
|
|
196
196
|
invalid: C.value,
|
|
197
197
|
"model-value": l.value,
|
|
198
|
-
placeholder: P.value,
|
|
198
|
+
placeholder: e.$t(P.value),
|
|
199
199
|
onBlur: G,
|
|
200
|
-
onInput:
|
|
200
|
+
onInput: D,
|
|
201
201
|
onKeypress: K,
|
|
202
202
|
onPaste: N,
|
|
203
203
|
"onUpdate:modelValue": j
|
|
204
204
|
}, null, 8, ["id", "class", "disabled", "invalid", "model-value", "placeholder"])),
|
|
205
|
-
e.$slots["addon-right"] ? (d(),
|
|
205
|
+
e.$slots["addon-right"] ? (d(), c(m(A), {
|
|
206
206
|
key: 1,
|
|
207
207
|
pt: {
|
|
208
208
|
root: m(z).root({
|
|
@@ -227,7 +227,7 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
227
227
|
l.errorMessage == g ? (d(), ee("span", ae({ key: 0 }, e.$preset.validatormessage.root, {
|
|
228
228
|
class: "text-general-800",
|
|
229
229
|
"data-wv-section": "checking-availability"
|
|
230
|
-
}), "
|
|
230
|
+
}), te(e.$t("Checking availability...")), 17)) : (d(), c(de, {
|
|
231
231
|
key: 1,
|
|
232
232
|
class: M(e.validatorMessageClass),
|
|
233
233
|
message: l.errorMessage
|
|
@@ -238,5 +238,5 @@ const g = "Checking availability...", xe = /* @__PURE__ */ Y({
|
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
export {
|
|
241
|
-
|
|
241
|
+
Me as _
|
|
242
242
|
};
|
package/litedropdown/index.es.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as h, mergeModels as f, inject as y, useModel as V, shallowRef as b, computed as v, createBlock as $, openBlock as x, withCtx as a, createVNode as r, unref as c, mergeProps as B, createSlots as k, normalizeClass as S, renderSlot as C } from "vue";
|
|
2
|
+
import { u as P } from "../plugins/basei18n.es.js";
|
|
3
|
+
import { s as j } from "../vendor/primevue/dropdown/dropdown.esm.es.js";
|
|
4
|
+
import { _ as L } from "../fieldwrapper/index.es.js";
|
|
4
5
|
import { _ as s } from "../icon/index.es.js";
|
|
5
|
-
const
|
|
6
|
+
const z = /* @__PURE__ */ h({
|
|
6
7
|
__name: "LiteDropdown",
|
|
7
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ f({
|
|
8
9
|
modelValue: { type: [String, Number, Boolean, Object] },
|
|
9
10
|
options: {},
|
|
10
11
|
optionLabel: {},
|
|
@@ -19,84 +20,91 @@ const M = /* @__PURE__ */ g({
|
|
|
19
20
|
modelValue: { type: [String, Number, Boolean, Object], required: !0 },
|
|
20
21
|
modelModifiers: {}
|
|
21
22
|
}),
|
|
22
|
-
emits: /* @__PURE__ */
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
emits: /* @__PURE__ */ f(["update:modelValue", "show", "change"], ["update:modelValue"]),
|
|
24
|
+
setup(i) {
|
|
25
|
+
const g = y("preset", {}).dropdown, d = V(i, "modelValue"), l = i, { t: p } = P(), n = b(!1), w = v(
|
|
26
|
+
() => {
|
|
27
|
+
var t;
|
|
28
|
+
return (t = l.options) == null ? void 0 : t.map((e) => typeof e == "string" ? p(e) : { ...e, label: p(e.label) });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
return (t, e) => (x(), $(L, {
|
|
32
|
+
mandatory: l.mandatory
|
|
27
33
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
|
|
30
|
-
modelValue:
|
|
31
|
-
"onUpdate:modelValue":
|
|
32
|
-
placeholder
|
|
34
|
+
default: a(() => [
|
|
35
|
+
r(c(j), B(l, {
|
|
36
|
+
modelValue: d.value,
|
|
37
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => d.value = o),
|
|
38
|
+
"filter-placeholder": t.$t(l.filterPlaceholder),
|
|
39
|
+
options: w.value,
|
|
40
|
+
placeholder: t.$t(l.loading ? "Loading..." : l.placeholder),
|
|
33
41
|
pt: {
|
|
34
|
-
root: ({ state:
|
|
35
|
-
var
|
|
42
|
+
root: ({ state: o, props: m }) => {
|
|
43
|
+
var u;
|
|
36
44
|
return {
|
|
37
45
|
class: [
|
|
38
|
-
...(
|
|
46
|
+
...(u = c(g)) == null ? void 0 : u.root({ state: o, props: m }).class,
|
|
39
47
|
"text-base",
|
|
40
48
|
{
|
|
41
|
-
"cursor-pointer": !
|
|
49
|
+
"cursor-pointer": !m.disabled
|
|
42
50
|
}
|
|
43
51
|
],
|
|
44
52
|
"data-wv-name": "litedropdown"
|
|
45
53
|
};
|
|
46
54
|
},
|
|
47
|
-
input: ({ props:
|
|
55
|
+
input: ({ props: o }) => ({
|
|
48
56
|
class: [
|
|
49
57
|
"!font-semibold",
|
|
50
58
|
{
|
|
51
|
-
"!text-general-200 dark:!text-general-600":
|
|
52
|
-
"!text-grayscale-900 dark:!text-general-50":
|
|
59
|
+
"!text-general-200 dark:!text-general-600": o.modelValue == null,
|
|
60
|
+
"!text-grayscale-900 dark:!text-general-50": o.modelValue != null
|
|
53
61
|
}
|
|
54
62
|
]
|
|
55
63
|
})
|
|
56
64
|
},
|
|
57
|
-
onChange:
|
|
58
|
-
onHide:
|
|
59
|
-
onShow:
|
|
60
|
-
|
|
65
|
+
onChange: e[1] || (e[1] = (o) => t.$emit("change", o)),
|
|
66
|
+
onHide: e[2] || (e[2] = (o) => n.value = !1),
|
|
67
|
+
onShow: e[3] || (e[3] = () => {
|
|
68
|
+
t.$emit("show"), n.value = !0;
|
|
61
69
|
}),
|
|
62
70
|
class: "!w-fit"
|
|
63
|
-
}),
|
|
64
|
-
dropdownicon:
|
|
65
|
-
|
|
66
|
-
class:
|
|
71
|
+
}), k({
|
|
72
|
+
dropdownicon: a(() => [
|
|
73
|
+
r(s, {
|
|
74
|
+
class: S([
|
|
67
75
|
"!w-6 !h-6 !transition-transform !text-general-500 dark:!text-general-100",
|
|
68
|
-
{ "rotate-180":
|
|
76
|
+
{ "rotate-180": n.value }
|
|
69
77
|
]),
|
|
70
78
|
icon: "arrow-drop-down"
|
|
71
79
|
}, null, 8, ["class"])
|
|
72
80
|
]),
|
|
73
|
-
loadingicon:
|
|
74
|
-
|
|
81
|
+
loadingicon: a(() => [
|
|
82
|
+
r(s, {
|
|
75
83
|
class: "text-xs animate-spin duration-200",
|
|
76
84
|
icon: "spinner"
|
|
77
85
|
})
|
|
78
86
|
]),
|
|
79
|
-
filtericon:
|
|
80
|
-
|
|
87
|
+
filtericon: a(() => [
|
|
88
|
+
r(s, {
|
|
81
89
|
class: "text-xs w-6 h-6",
|
|
82
90
|
icon: "search-line"
|
|
83
91
|
})
|
|
84
92
|
]),
|
|
85
93
|
_: 2
|
|
86
94
|
}, [
|
|
87
|
-
|
|
95
|
+
t.$slots.option ? {
|
|
88
96
|
name: "option",
|
|
89
|
-
fn:
|
|
90
|
-
|
|
97
|
+
fn: a(({ option: o }) => [
|
|
98
|
+
C(t.$slots, "option", { option: o })
|
|
91
99
|
]),
|
|
92
100
|
key: "0"
|
|
93
101
|
} : void 0
|
|
94
|
-
]), 1040, ["modelValue", "placeholder", "pt"])
|
|
102
|
+
]), 1040, ["modelValue", "filter-placeholder", "options", "placeholder", "pt"])
|
|
95
103
|
]),
|
|
96
104
|
_: 3
|
|
97
105
|
}, 8, ["mandatory"]));
|
|
98
106
|
}
|
|
99
107
|
});
|
|
100
108
|
export {
|
|
101
|
-
|
|
109
|
+
z as _
|
|
102
110
|
};
|
package/menuitem/index.es.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineComponent as M, computed as N, resolveComponent as V, createBlock as n, createElementBlock as b, openBlock as r, withCtx as $, createElementVNode as i, mergeProps as t, createCommentVNode as s, normalizeProps as h, guardReactiveProps as C, toDisplayString as m, withModifiers as z } from "vue";
|
|
2
|
+
import { u as D } from "../plugins/basei18n.es.js";
|
|
3
|
+
import { _ as c } from "../icon/index.es.js";
|
|
4
|
+
const L = ["href", "onClick"], R = ["href", "target"], A = /* @__PURE__ */ M({
|
|
4
5
|
__name: "MenuItem",
|
|
5
6
|
props: {
|
|
6
7
|
item: {},
|
|
7
8
|
routerProps: {}
|
|
8
9
|
},
|
|
9
10
|
setup(_) {
|
|
10
|
-
const e = _;
|
|
11
|
-
return (o,
|
|
12
|
-
var p,
|
|
13
|
-
const
|
|
14
|
-
return e.item.route ? (r(),
|
|
11
|
+
const e = _, { t: B } = D(), a = N(() => B(e.item.label));
|
|
12
|
+
return (o, l) => {
|
|
13
|
+
var p, u, d, k, P, f;
|
|
14
|
+
const w = V("router-link");
|
|
15
|
+
return e.item.route ? (r(), n(w, {
|
|
15
16
|
key: 0,
|
|
16
17
|
to: e.item.route,
|
|
17
18
|
custom: ""
|
|
18
19
|
}, {
|
|
19
|
-
default:
|
|
20
|
-
var
|
|
20
|
+
default: $(({ href: E, navigate: I }) => {
|
|
21
|
+
var g, y, v;
|
|
21
22
|
return [
|
|
22
|
-
|
|
23
|
-
e.item.icon ? (r(),
|
|
23
|
+
i("a", t({ href: E }, (g = o.routerProps) == null ? void 0 : g.action, { onClick: I }), [
|
|
24
|
+
e.item.icon ? (r(), n(c, t({ key: 0 }, (y = o.routerProps) == null ? void 0 : y.icon, {
|
|
24
25
|
icon: e.item.icon
|
|
25
|
-
}), null, 16, ["icon"])) :
|
|
26
|
-
|
|
27
|
-
], 16,
|
|
26
|
+
}), null, 16, ["icon"])) : s("", !0),
|
|
27
|
+
i("span", h(C((v = o.routerProps) == null ? void 0 : v.label)), m(a.value), 17)
|
|
28
|
+
], 16, L)
|
|
28
29
|
];
|
|
29
30
|
}),
|
|
30
31
|
_: 1
|
|
@@ -33,33 +34,33 @@ const $ = ["href", "onClick"], z = ["href", "target"], R = /* @__PURE__ */ E({
|
|
|
33
34
|
href: e.item.url,
|
|
34
35
|
target: e.item.target
|
|
35
36
|
}, (p = o.routerProps) == null ? void 0 : p.action, {
|
|
36
|
-
onClick:
|
|
37
|
+
onClick: l[0] || (l[0] = z(() => {
|
|
37
38
|
}, ["stop"]))
|
|
38
39
|
}), [
|
|
39
|
-
e.item.icon ? (r(),
|
|
40
|
+
e.item.icon ? (r(), n(c, t({ key: 0 }, (u = o.routerProps) == null ? void 0 : u.icon, {
|
|
40
41
|
icon: e.item.icon
|
|
41
|
-
}), null, 16, ["icon"])) :
|
|
42
|
-
|
|
43
|
-
], 16,
|
|
42
|
+
}), null, 16, ["icon"])) : s("", !0),
|
|
43
|
+
i("span", h(C((d = o.routerProps) == null ? void 0 : d.label)), m(a.value), 17)
|
|
44
|
+
], 16, R)) : (r(), b("a", t({ key: 2 }, (k = o.routerProps) == null ? void 0 : k.action, {
|
|
44
45
|
"aria-hidden": "true",
|
|
45
46
|
"data-pc-section": "action",
|
|
46
47
|
tabindex: "-1"
|
|
47
48
|
}), [
|
|
48
|
-
e.item.icon ? (r(),
|
|
49
|
+
e.item.icon ? (r(), n(c, t({
|
|
49
50
|
key: 0,
|
|
50
51
|
icon: e.item.icon,
|
|
51
52
|
severity: e.item.danger ? "danger" : void 0
|
|
52
|
-
}, (
|
|
53
|
-
|
|
54
|
-
(
|
|
53
|
+
}, (P = o.routerProps) == null ? void 0 : P.icon), null, 16, ["icon", "severity"])) : s("", !0),
|
|
54
|
+
i("span", t(
|
|
55
|
+
(f = o.$preset.menu) == null ? void 0 : f.label({
|
|
55
56
|
props: { danger: e.item.danger }
|
|
56
57
|
}),
|
|
57
58
|
{ "data-pc-section": "label" }
|
|
58
|
-
),
|
|
59
|
+
), m(a.value), 17)
|
|
59
60
|
], 16));
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
A as _
|
|
65
66
|
};
|
package/multirow/index.es.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as C, inject as f, createElementBlock as n, openBlock as o, normalizeProps as k, guardReactiveProps as v, unref as
|
|
1
|
+
import { defineComponent as C, inject as f, createElementBlock as n, openBlock as o, normalizeProps as k, guardReactiveProps as v, unref as m, Fragment as a, renderList as w, mergeProps as c, createBlock as V, resolveDynamicComponent as _, toHandlers as b, withModifiers as g, createTextVNode as P, toDisplayString as B } from "vue";
|
|
2
2
|
const D = /* @__PURE__ */ C({
|
|
3
3
|
__name: "MultiRow",
|
|
4
4
|
props: {
|
|
5
5
|
attributes: {}
|
|
6
6
|
},
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
return (
|
|
10
|
-
var
|
|
11
|
-
return o(), n("div", k(v((
|
|
12
|
-
(o(!0), n(
|
|
13
|
-
var
|
|
14
|
-
return o(), n("span",
|
|
7
|
+
setup(i) {
|
|
8
|
+
const y = i, s = f("preset", {}).datatable;
|
|
9
|
+
return (l, r) => {
|
|
10
|
+
var d;
|
|
11
|
+
return o(), n("div", k(v((d = m(s)) == null ? void 0 : d.multirowcontainer({ props: y }))), [
|
|
12
|
+
(o(!0), n(a, null, w(l.attributes, (e, t) => {
|
|
13
|
+
var p;
|
|
14
|
+
return o(), n("span", c(
|
|
15
15
|
{
|
|
16
|
-
key:
|
|
16
|
+
key: t,
|
|
17
17
|
ref_for: !0
|
|
18
18
|
},
|
|
19
|
-
(
|
|
19
|
+
(p = m(s)) == null ? void 0 : p.multirow({
|
|
20
20
|
context: {
|
|
21
|
-
firstIndex:
|
|
21
|
+
firstIndex: t === 0
|
|
22
22
|
}
|
|
23
23
|
}),
|
|
24
24
|
{
|
|
@@ -26,7 +26,7 @@ const D = /* @__PURE__ */ C({
|
|
|
26
26
|
"data-wv-section": "multi-row"
|
|
27
27
|
}
|
|
28
28
|
), [
|
|
29
|
-
e.bodyComponent ? (o(), _(
|
|
29
|
+
e.bodyComponent ? (o(), V(_(e.bodyComponent.component), c({
|
|
30
30
|
key: 0,
|
|
31
31
|
modelValue: e.bodyComponent.model,
|
|
32
32
|
"onUpdate:modelValue": (u) => e.bodyComponent.model = u,
|
|
@@ -37,10 +37,10 @@ const D = /* @__PURE__ */ C({
|
|
|
37
37
|
}, b(
|
|
38
38
|
e.bodyComponent.events ? e.bodyComponent.events : {}
|
|
39
39
|
), {
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: r[0] || (r[0] = g(() => {
|
|
41
41
|
}, ["stop"]))
|
|
42
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "class", "disabled"])) : (o(), n(
|
|
43
|
-
P(
|
|
42
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "class", "disabled"])) : (o(), n(a, { key: 1 }, [
|
|
43
|
+
P(B(l.$t(e.value)), 1)
|
|
44
44
|
], 64))
|
|
45
45
|
], 16);
|
|
46
46
|
}), 128))
|