@fewangsit/wangsvue-fats 1.0.1-alpha.67 → 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 +30 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +116 -100
- package/assets/lottiejs/loading-page-dark.es.js +4 -0
- package/assets/lottiejs/loading-table-dark.es.js +4 -0
- package/assets/lottiejs/no-data-dark.es.js +4 -0
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttoncopy/index.es.js +8 -8
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +48 -48
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/carousel/index.es.js +24 -24
- package/checkbox/index.es.js +5 -5
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +15 -11
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +520 -509
- package/datepicker/index.es.js +24 -24
- package/daypicker/index.es.js +29 -29
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +100 -100
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +106 -103
- package/dialogform/index.es.js +25 -25
- package/dialogfulltransferlog/index.es.js +98 -98
- package/dialoglinkedasset/index.es.js +61 -61
- package/dialogprintqr/index.es.js +78 -80
- 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 +17 -17
- 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 +3 -3
- 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/editor/index.es.js +51 -48
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +44 -40
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +36 -35
- package/imagecompressor/index.es.js +155 -155
- 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 +27 -27
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +47 -39
- package/loading-page-dark-e0SrRAHc.js +4 -0
- package/loading-page-dark-mz8tLHZ3.js +1 -0
- package/loading-table-dark-BGh0tAPM.js +4 -0
- package/loading-table-dark-Cky7AB_C.js +1 -0
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +17 -16
- package/multiselect/index.es.js +86 -83
- package/no-data-dark-DERIJ8Ml.js +1 -0
- package/no-data-dark-nK4e4RAM.js +4 -0
- package/package.json +1 -1
- package/plugins/WangsVue.es.js +11 -9
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +35 -32
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +15 -15
- package/username/index.es.js +37 -37
- 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 +22487 -21781
- package/wangsvue-fats.system.js +72 -71
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as xe, mergeModels as ee, useModel as be, ref as c, computed as te, watch as _e, createBlock as p, openBlock as
|
|
1
|
+
import { defineComponent as xe, mergeModels as ee, useModel as be, ref as c, computed as te, watch as _e, createBlock as p, openBlock as i, withCtx as v, createElementVNode as a, createVNode as d, createCommentVNode as x, toDisplayString as o, createElementBlock as ae, unref as se, Fragment as he, createTextVNode as ye, normalizeClass as b } from "vue";
|
|
2
2
|
import { t as we } from "../vendor/single-spa/lib/es2015/esm/single-spa.min.es.js";
|
|
3
3
|
import { DamageServices as De } from "@tagsamurai/fats-api-services";
|
|
4
|
-
import { u as
|
|
5
|
-
import { a as
|
|
6
|
-
import { f as
|
|
7
|
-
import { u as
|
|
4
|
+
import { u as ke } from "../assetinfo/index.es.js";
|
|
5
|
+
import { a as $e } from "../utils/role.util.es.js";
|
|
6
|
+
import { f as Ie } from "../utils/date.util.es.js";
|
|
7
|
+
import { u as qe } from "../utils/toast.util.es.js";
|
|
8
8
|
import { _ as f } from "../badge/index.es.js";
|
|
9
|
-
import { _ as
|
|
9
|
+
import { _ as Re } from "../dialog/index.es.js";
|
|
10
10
|
import { _ as oe } from "../image/index.es.js";
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
15
|
-
class: "text-body-medium text-general-400",
|
|
11
|
+
import { _ as Ne } from "../tabmenu/index.es.js";
|
|
12
|
+
import { _ as Ce } from "../tagtype/index.es.js";
|
|
13
|
+
import { _ as Le } from "../timeline/index.es.js";
|
|
14
|
+
const Se = { class: "w-full flex items-center justify-between" }, Te = { class: "!text-base font-bold" }, Be = { class: "flex items-center gap-2" }, Me = ["disabled"], Pe = ["disabled"], Ve = { class: "flex items-start gap-[18px]" }, Ae = { class: "flex flex-col w-full" }, je = { class: "w-full flex items-center justify-between" }, Ee = { class: "text-body-medium !font-bold" }, ze = { class: "flex items-center gap-[6px] text-general-400 dark:text-general-200" }, Fe = { class: "flex gap-3 w-full mt-[6px]" }, Ge = { class: "flex flex-col justify-between items-start self-stretch" }, Ue = { class: "flex flex-col gap-1 items-start self-stretch" }, Ke = { class: "flex gap-2" }, We = ["data-wv-section"], He = {
|
|
15
|
+
class: "text-body-medium text-general-400 dark:text-general-200",
|
|
16
16
|
"data-wv-section": "key"
|
|
17
|
-
},
|
|
17
|
+
}, Je = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "text-body-medium"
|
|
20
|
-
},
|
|
20
|
+
}, it = /* @__PURE__ */ xe({
|
|
21
21
|
__name: "DialogDamageLog",
|
|
22
22
|
props: /* @__PURE__ */ ee({
|
|
23
23
|
id: {},
|
|
@@ -27,14 +27,14 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
27
27
|
modelModifiers: {}
|
|
28
28
|
}),
|
|
29
29
|
emits: /* @__PURE__ */ ee(["prev", "next"], ["update:modelValue"]),
|
|
30
|
-
setup(_, { emit:
|
|
31
|
-
const
|
|
30
|
+
setup(_, { emit: re }) {
|
|
31
|
+
const h = _, y = re, w = be(_, "modelValue"), le = qe(), { setLoading: D } = ke(), s = c(), l = c(0), k = c(0), u = te(() => h.listId), ne = [
|
|
32
32
|
{
|
|
33
33
|
label: "Damage Log"
|
|
34
34
|
}
|
|
35
35
|
], g = c([]), ie = te(() => {
|
|
36
|
-
var
|
|
37
|
-
switch ((e = (
|
|
36
|
+
var t, e;
|
|
37
|
+
switch ((e = (t = s.value) == null ? void 0 : t.request) == null ? void 0 : e.status) {
|
|
38
38
|
case "Damaged":
|
|
39
39
|
return "danger";
|
|
40
40
|
case "Repaired":
|
|
@@ -42,24 +42,24 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
42
42
|
default:
|
|
43
43
|
return "dark";
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), de = async (t) => (pe(t), await $(l.value)), $ = async (t) => {
|
|
46
46
|
var e;
|
|
47
47
|
try {
|
|
48
48
|
D(!0);
|
|
49
|
-
const { data:
|
|
50
|
-
|
|
49
|
+
const { data: r } = await De.getDamageReportDetail(
|
|
50
|
+
u.value[t]
|
|
51
51
|
);
|
|
52
|
-
|
|
53
|
-
} catch (
|
|
54
|
-
|
|
55
|
-
error:
|
|
52
|
+
s.value = r.data, g.value = ce((e = s.value) == null ? void 0 : e.logs), k.value++;
|
|
53
|
+
} catch (r) {
|
|
54
|
+
le.add({
|
|
55
|
+
error: r,
|
|
56
56
|
message: "Error, failed to fetch damage detail."
|
|
57
57
|
});
|
|
58
58
|
} finally {
|
|
59
59
|
D(!1);
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
switch (
|
|
61
|
+
}, ue = (t) => {
|
|
62
|
+
switch (t) {
|
|
63
63
|
case "Reported Damaged":
|
|
64
64
|
return "Reported damaged by";
|
|
65
65
|
case "Reported Disposal":
|
|
@@ -75,8 +75,8 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
75
75
|
default:
|
|
76
76
|
return "";
|
|
77
77
|
}
|
|
78
|
-
}, me = (
|
|
79
|
-
switch (
|
|
78
|
+
}, me = (t, e) => {
|
|
79
|
+
switch (t) {
|
|
80
80
|
case "Reported Damaged":
|
|
81
81
|
return {
|
|
82
82
|
Note: (e == null ? void 0 : e.notes) ?? "-",
|
|
@@ -88,111 +88,114 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
88
88
|
Note: (e == null ? void 0 : e.notes) ?? "-"
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
}, ce = (
|
|
91
|
+
}, ce = (t) => t.map((e) => ({
|
|
92
92
|
_id: e._id,
|
|
93
|
-
action:
|
|
93
|
+
action: ue(e.action),
|
|
94
94
|
date: e.createdAt,
|
|
95
95
|
username: e.userFullName,
|
|
96
96
|
danger: !1,
|
|
97
97
|
detail: me(e.action, e.detail),
|
|
98
98
|
createdAt: e.createdAt
|
|
99
|
-
})), pe = (
|
|
100
|
-
var
|
|
101
|
-
const e = (
|
|
99
|
+
})), pe = (t) => {
|
|
100
|
+
var r;
|
|
101
|
+
const e = (r = h.listId) == null ? void 0 : r.findIndex((m) => m === t);
|
|
102
102
|
l.value = e;
|
|
103
103
|
}, ve = () => {
|
|
104
|
-
l.value++,
|
|
104
|
+
l.value++, y("next", l.value);
|
|
105
105
|
}, fe = () => {
|
|
106
|
-
l.value--,
|
|
106
|
+
l.value--, y("prev", l.value);
|
|
107
107
|
}, ge = () => {
|
|
108
|
-
var
|
|
109
|
-
we(`/assets/detail/${(e = (
|
|
108
|
+
var t, e;
|
|
109
|
+
we(`/assets/detail/${(e = (t = s.value) == null ? void 0 : t.request) == null ? void 0 : e.asset}`);
|
|
110
110
|
};
|
|
111
111
|
return _e(
|
|
112
112
|
() => l.value,
|
|
113
|
-
(
|
|
114
|
-
|
|
113
|
+
(t) => {
|
|
114
|
+
$(t);
|
|
115
115
|
}
|
|
116
|
-
), (
|
|
116
|
+
), (t, e) => (i(), p(Re, {
|
|
117
117
|
visible: w.value,
|
|
118
|
-
"onUpdate:visible": e[0] || (e[0] = (
|
|
119
|
-
onShow: e[1] || (e[1] = (
|
|
118
|
+
"onUpdate:visible": e[0] || (e[0] = (r) => w.value = r),
|
|
119
|
+
onShow: e[1] || (e[1] = (r) => de(t.id)),
|
|
120
120
|
class: "w-[600px]",
|
|
121
121
|
modal: ""
|
|
122
122
|
}, {
|
|
123
123
|
header: v(() => [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class: b([
|
|
124
|
+
a("div", Se, [
|
|
125
|
+
a("h1", Te, o(t.$t("Damage Log")), 1),
|
|
126
|
+
a("div", Be, [
|
|
127
|
+
a("button", {
|
|
128
|
+
class: b([
|
|
129
|
+
l.value === 0 ? "text-general-100 dark:text-general-400" : "text-primary-500 dark:text-primary-300",
|
|
130
|
+
"text-xs font-medium"
|
|
131
|
+
]),
|
|
129
132
|
disabled: l.value === 0,
|
|
130
133
|
onClick: fe,
|
|
131
134
|
"data-wv-section": "prev-button"
|
|
132
|
-
}, " <
|
|
133
|
-
|
|
135
|
+
}, " <" + o(t.$t("Prev")), 11, Me),
|
|
136
|
+
a("button", {
|
|
134
137
|
class: b([
|
|
135
|
-
l.value ===
|
|
138
|
+
l.value === u.value.length - 1 || u.value.length === 1 ? "text-general-100 dark:text-general-400" : "text-primary-500 dark:text-primary-300",
|
|
136
139
|
"text-xs font-medium"
|
|
137
140
|
]),
|
|
138
|
-
disabled: l.value ===
|
|
141
|
+
disabled: l.value === u.value.length - 1 || u.value.length === 1,
|
|
139
142
|
onClick: ve,
|
|
140
143
|
"data-wv-section": "next-button"
|
|
141
|
-
}, "
|
|
144
|
+
}, o(t.$t("Next")) + "> ", 11, Pe)
|
|
142
145
|
])
|
|
143
146
|
])
|
|
144
147
|
]),
|
|
145
148
|
default: v(() => {
|
|
146
|
-
var
|
|
149
|
+
var r, m, I, q, R, N, C, L, S, T, B, M, P, V, A, j, E, z, F, G, U, K, W, H, J, O, Q, X, Y;
|
|
147
150
|
return [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
src: (m = (
|
|
151
|
+
a("div", Ve, [
|
|
152
|
+
d(oe, {
|
|
153
|
+
src: (m = (r = s.value) == null ? void 0 : r.request) == null ? void 0 : m.assetImage,
|
|
151
154
|
size: "big"
|
|
152
155
|
}, null, 8, ["src"]),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
a("div", Ae, [
|
|
157
|
+
a("div", je, [
|
|
158
|
+
a("p", Ee, o((R = (q = (I = s.value) == null ? void 0 : I.request) == null ? void 0 : q.assetName) == null ? void 0 : R.nameWithSequence), 1),
|
|
159
|
+
a("button", {
|
|
157
160
|
onClick: ge,
|
|
158
|
-
class: "!text-xs font-medium !text-primary-500",
|
|
161
|
+
class: "!text-xs font-medium !text-primary-500 dark:!text-primary-300",
|
|
159
162
|
"data-wv-section": "detail-button"
|
|
160
|
-
}, "
|
|
163
|
+
}, o(t.$t("Asset Detail")) + " > ", 1)
|
|
161
164
|
]),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
e[
|
|
166
|
-
(j = (A =
|
|
165
|
+
a("div", ze, [
|
|
166
|
+
a("p", null, o(((C = (N = s.value) == null ? void 0 : N.request) == null ? void 0 : C.assetId) ?? "-") + " " + o((B = (T = (S = (L = s.value) == null ? void 0 : L.request) == null ? void 0 : S.assetName) == null ? void 0 : T.aliasCode) != null && B.length ? `(${(V = (P = (M = s.value) == null ? void 0 : M.request) == null ? void 0 : P.assetName) == null ? void 0 : V.aliasCode})` : ""), 1),
|
|
167
|
+
se($e)() === "Enterprise" ? (i(), ae(he, { key: 0 }, [
|
|
168
|
+
e[2] || (e[2] = a("div", { class: "w-[6px] h-[6px] bg-general-100 dark:bg-general-400 rounded" }, null, -1)),
|
|
169
|
+
(j = (A = s.value) == null ? void 0 : A.request) != null && j.tagType ? (i(), p(Ce, {
|
|
167
170
|
key: 0,
|
|
168
|
-
type: (z = (E =
|
|
171
|
+
type: (z = (E = s.value) == null ? void 0 : E.request) == null ? void 0 : z.tagType
|
|
169
172
|
}, null, 8, ["type"])) : x("", !0)
|
|
170
173
|
], 64)) : x("", !0)
|
|
171
174
|
]),
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
]
|
|
178
|
-
e[
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
a("div", Fe, [
|
|
176
|
+
a("div", Ge, [
|
|
177
|
+
a("p", null, o(t.$t("Brand")), 1),
|
|
178
|
+
a("p", null, o(t.$t("Model/Type")), 1),
|
|
179
|
+
a("p", null, o(t.$t("Group")), 1)
|
|
180
|
+
]),
|
|
181
|
+
e[3] || (e[3] = a("div", { class: "flex flex-col justify-between items-start self-stretch" }, [
|
|
182
|
+
a("p", null, ":"),
|
|
183
|
+
a("p", null, ":"),
|
|
184
|
+
a("p", null, ":")
|
|
182
185
|
], -1)),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
label: (U = (G = (F =
|
|
186
|
+
a("div", Ue, [
|
|
187
|
+
d(f, {
|
|
188
|
+
label: (U = (G = (F = s.value) == null ? void 0 : F.request) == null ? void 0 : G.assetBrand) == null ? void 0 : U.name,
|
|
186
189
|
format: "nowrap",
|
|
187
190
|
severity: "dark"
|
|
188
191
|
}, null, 8, ["label"]),
|
|
189
|
-
|
|
190
|
-
label: (H = (W = (K =
|
|
192
|
+
d(f, {
|
|
193
|
+
label: (H = (W = (K = s.value) == null ? void 0 : K.request) == null ? void 0 : W.assetModel) == null ? void 0 : H.name,
|
|
191
194
|
format: "nowrap",
|
|
192
195
|
severity: "dark"
|
|
193
196
|
}, null, 8, ["label"]),
|
|
194
|
-
|
|
195
|
-
label: (Q = (O = (J =
|
|
197
|
+
d(f, {
|
|
198
|
+
label: (Q = (O = (J = s.value) == null ? void 0 : J.request) == null ? void 0 : O.assetGroup) == null ? void 0 : Q.name,
|
|
196
199
|
format: "nowrap",
|
|
197
200
|
severity: "primary"
|
|
198
201
|
}, null, 8, ["label"])
|
|
@@ -200,41 +203,41 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
200
203
|
])
|
|
201
204
|
])
|
|
202
205
|
]),
|
|
203
|
-
|
|
204
|
-
e[
|
|
205
|
-
|
|
206
|
-
label: (Y = (X =
|
|
206
|
+
a("div", Ke, [
|
|
207
|
+
e[4] || (e[4] = a("p", { class: "text-xs font-medium tracking-tight" }, "Status:", -1)),
|
|
208
|
+
d(f, {
|
|
209
|
+
label: (Y = (X = s.value) == null ? void 0 : X.request) == null ? void 0 : Y.status,
|
|
207
210
|
severity: ie.value,
|
|
208
211
|
format: "nowrap"
|
|
209
212
|
}, null, 8, ["label", "severity"])
|
|
210
213
|
]),
|
|
211
|
-
|
|
214
|
+
d(Ne, {
|
|
212
215
|
"active-index": 0,
|
|
213
216
|
menu: ne,
|
|
214
217
|
type: "tab"
|
|
215
218
|
}),
|
|
216
|
-
g.value.length ? (
|
|
217
|
-
key:
|
|
219
|
+
g.value.length ? (i(), p(Le, {
|
|
220
|
+
key: k.value,
|
|
218
221
|
value: g.value
|
|
219
222
|
}, {
|
|
220
|
-
detail: v(({ key:
|
|
221
|
-
|
|
223
|
+
detail: v(({ key: n, value: Z }) => [
|
|
224
|
+
a("div", {
|
|
222
225
|
class: b([
|
|
223
226
|
"flex gap-1 items-baseline",
|
|
224
|
-
{ "flex-col":
|
|
227
|
+
{ "flex-col": n === "Damaged Photo" }
|
|
225
228
|
]),
|
|
226
|
-
"data-wv-section":
|
|
229
|
+
"data-wv-section": n
|
|
227
230
|
}, [
|
|
228
|
-
|
|
229
|
-
|
|
231
|
+
a("span", He, o(n) + ": ", 1),
|
|
232
|
+
n === "Damaged Photo" ? (i(), p(oe, {
|
|
230
233
|
key: 0,
|
|
231
234
|
src: Z,
|
|
232
235
|
width: 36
|
|
233
|
-
}, null, 8, ["src"])) : (
|
|
234
|
-
], 10,
|
|
236
|
+
}, null, 8, ["src"])) : (i(), ae("span", Je, o(Z), 1))
|
|
237
|
+
], 10, We)
|
|
235
238
|
]),
|
|
236
|
-
date: v(({ date:
|
|
237
|
-
|
|
239
|
+
date: v(({ date: n }) => [
|
|
240
|
+
ye(o(t.$t(se(Ie)(new Date(n), { showTime: !0 }))), 1)
|
|
238
241
|
]),
|
|
239
242
|
_: 1
|
|
240
243
|
}, 8, ["value"])) : x("", !0)
|
|
@@ -245,5 +248,5 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
245
248
|
}
|
|
246
249
|
});
|
|
247
250
|
export {
|
|
248
|
-
|
|
251
|
+
it as _
|
|
249
252
|
};
|
package/dialogform/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as oe, useSlots as ie, inject as G, ref as D, shallowRef as P, computed as re, createBlock as m, openBlock as n, unref as t, mergeProps as i, withCtx as J, createElementVNode as
|
|
1
|
+
import { defineComponent as oe, useSlots as ie, inject as G, ref as D, shallowRef as P, computed as re, createBlock as m, openBlock as n, unref as t, mergeProps as i, withCtx as J, createElementVNode as k, normalizeProps as p, guardReactiveProps as $, createElementBlock as Q, createCommentVNode as d, createVNode as X, renderSlot as S, toDisplayString as ne, withDirectives as ue, vShow as de } from "vue";
|
|
2
2
|
import { u as me } from "../plugins/WangsVue.es.js";
|
|
3
|
-
import { s as
|
|
3
|
+
import { s as be } from "../vendor/primevue/dialog/dialog.esm.es.js";
|
|
4
4
|
import { _ as w } from "../button/index.es.js";
|
|
5
|
-
import { _ as
|
|
5
|
+
import { _ as ce } from "../checkbox/index.es.js";
|
|
6
6
|
import { _ as ve } from "../form/index.es.js";
|
|
7
7
|
import { _ as fe } from "../icon/index.es.js";
|
|
8
8
|
import { _ as pe } from "../validatormessage/index.es.js";
|
|
@@ -42,11 +42,11 @@ const Le = /* @__PURE__ */ oe({
|
|
|
42
42
|
},
|
|
43
43
|
emits: ["clear", "close", "hide", "show", "submit", "update:visible"],
|
|
44
44
|
setup(Y, { expose: Z, emit: x }) {
|
|
45
|
-
const s = Y, r = x, L = ie(), { locale:
|
|
45
|
+
const s = Y, r = x, L = ie(), { locale: b } = me("DialogForm"), _ = G("preset", {}).dialog, l = G("preset", {}).dialogform, o = D(), ee = D(), te = P(0), V = P(!1), c = P(!1), C = D({
|
|
46
46
|
stayAfterSubmit: !1,
|
|
47
47
|
formValues: {}
|
|
48
48
|
}), ae = re(() => {
|
|
49
|
-
const e = L["aside-right"] &&
|
|
49
|
+
const e = L["aside-right"] && c.value ? s.asideRightWidth : 0;
|
|
50
50
|
return `calc(${{
|
|
51
51
|
small: 400,
|
|
52
52
|
medium: 500,
|
|
@@ -91,14 +91,14 @@ const Le = /* @__PURE__ */ oe({
|
|
|
91
91
|
}
|
|
92
92
|
}), (e, a) => {
|
|
93
93
|
var v, y, T, E;
|
|
94
|
-
return n(), m(t(
|
|
94
|
+
return n(), m(t(be), i({
|
|
95
95
|
ref_key: "dialogForm",
|
|
96
96
|
ref: ee
|
|
97
97
|
}, (v = t(l)) == null ? void 0 : v.root, {
|
|
98
98
|
class: s.class,
|
|
99
99
|
closable: e.closable,
|
|
100
100
|
draggable: !1,
|
|
101
|
-
header: e.header,
|
|
101
|
+
header: e.$t(e.header),
|
|
102
102
|
pt: {
|
|
103
103
|
root: {
|
|
104
104
|
class: [
|
|
@@ -117,27 +117,27 @@ const Le = /* @__PURE__ */ oe({
|
|
|
117
117
|
container: J(() => {
|
|
118
118
|
var f, M, I, H, N, O, U, j, z, K;
|
|
119
119
|
return [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
k("div", p($((f = t(l)) == null ? void 0 : f.container(c.value))), [
|
|
121
|
+
k("section", i((M = t(l)) == null ? void 0 : M.mainsection, { id: "main" }), [
|
|
122
|
+
k("div", p($((I = t(l)) == null ? void 0 : I.header)), [
|
|
123
123
|
S(e.$slots, "header", {}, () => {
|
|
124
|
-
var u, h, g,
|
|
124
|
+
var u, h, g, B;
|
|
125
125
|
return [
|
|
126
126
|
e.headerIcon ? (n(), m(fe, i({ key: 0 }, (u = t(l)) == null ? void 0 : u.headericon, {
|
|
127
127
|
icon: e.headerIcon,
|
|
128
128
|
severity: e.severity,
|
|
129
129
|
"aria-label": "Header Icon"
|
|
130
130
|
}), null, 16, ["icon", "severity"])) : d("", !0),
|
|
131
|
-
|
|
131
|
+
k("h3", p($((h = t(l)) == null ? void 0 : h.headertitle)), ne(e.$t(e.header)), 17),
|
|
132
132
|
e.$slots["aside-right"] ? (n(), m(w, i({ key: 1 }, (g = t(l)) == null ? void 0 : g.expandasidebutton, {
|
|
133
|
-
label:
|
|
134
|
-
onClick: a[0] || (a[0] = (R) =>
|
|
133
|
+
label: c.value ? t(b).asideRightExpandedButtonLabel : t(b).asideRightCollapsedButtonLabel,
|
|
134
|
+
onClick: a[0] || (a[0] = (R) => c.value = !c.value),
|
|
135
135
|
text: ""
|
|
136
136
|
}), null, 16, ["label"])) : d("", !0),
|
|
137
137
|
e.closable ? (n(), m(w, i({
|
|
138
138
|
key: 2,
|
|
139
139
|
onClick: le
|
|
140
|
-
}, (
|
|
140
|
+
}, (B = t(l)) == null ? void 0 : B.closedialog, {
|
|
141
141
|
icon: "close",
|
|
142
142
|
"icon-class": "w-[22px] h-[22px]",
|
|
143
143
|
rounded: "",
|
|
@@ -169,9 +169,9 @@ const Le = /* @__PURE__ */ oe({
|
|
|
169
169
|
submit: A,
|
|
170
170
|
visible: V.value
|
|
171
171
|
}),
|
|
172
|
-
|
|
173
|
-
e.showStayCheckbox ? (n(), m(
|
|
174
|
-
label: e.stayCheckboxLabel ?? t(
|
|
172
|
+
k("div", p($((N = t(l)) == null ? void 0 : N.footer)), [
|
|
173
|
+
e.showStayCheckbox ? (n(), m(ce, i({ key: 0 }, (O = t(l)) == null ? void 0 : O.staycheckbox, {
|
|
174
|
+
label: e.stayCheckboxLabel ?? t(b).stayCheckboxLabel,
|
|
175
175
|
"model-value": (U = o.value) == null ? void 0 : U.stayAfterSubmit,
|
|
176
176
|
"onUpdate:modelValue": a[1] || (a[1] = (u) => o.value && (o.value.stayAfterSubmit = u))
|
|
177
177
|
}), null, 16, ["label", "model-value"])) : d("", !0),
|
|
@@ -183,22 +183,22 @@ const Le = /* @__PURE__ */ oe({
|
|
|
183
183
|
]),
|
|
184
184
|
s.buttonsTemplate.length ? (n(), Q("div", p(i({ key: 1 }, (z = t(l)) == null ? void 0 : z.footerbutton)), [
|
|
185
185
|
S(e.$slots, "actionButtons", { submit: W }, () => {
|
|
186
|
-
var u, h, g,
|
|
186
|
+
var u, h, g, B, R, q;
|
|
187
187
|
return [
|
|
188
188
|
(u = s.buttonsTemplate) != null && u.includes("cancel") ? (n(), m(w, i({ key: 0 }, (h = t(l)) == null ? void 0 : h.cancelbtn, {
|
|
189
|
-
label: e.cancelBtnLabel ?? t(
|
|
189
|
+
label: e.cancelBtnLabel ?? t(b).cancelBtnLabel,
|
|
190
190
|
onClick: a[2] || (a[2] = (ye) => (r("close"), r("update:visible", !1))),
|
|
191
|
-
severity: "
|
|
191
|
+
severity: "secondary",
|
|
192
192
|
text: ""
|
|
193
193
|
}), null, 16, ["label"])) : d("", !0),
|
|
194
|
-
(g = s.buttonsTemplate) != null && g.includes("clear") ? (n(), m(w, i({ key: 1 }, (
|
|
195
|
-
label: e.clearBtnLabel ?? t(
|
|
194
|
+
(g = s.buttonsTemplate) != null && g.includes("clear") ? (n(), m(w, i({ key: 1 }, (B = t(l)) == null ? void 0 : B.clearfield, {
|
|
195
|
+
label: e.clearBtnLabel ?? t(b).clearBtnLabel,
|
|
196
196
|
onClick: F,
|
|
197
197
|
class: "whitespace-nowrap",
|
|
198
198
|
text: ""
|
|
199
199
|
}), null, 16, ["label"])) : d("", !0),
|
|
200
200
|
(R = s.buttonsTemplate) != null && R.includes("submit") ? (n(), m(w, i({ key: 2 }, (q = t(l)) == null ? void 0 : q.savesubmitbutton, {
|
|
201
|
-
label: e.submitBtnLabel ?? t(
|
|
201
|
+
label: e.submitBtnLabel ?? t(b).submitBtnLabel,
|
|
202
202
|
severity: s.severity === "primary" ? void 0 : s.severity ?? "success",
|
|
203
203
|
onClick: W
|
|
204
204
|
}), null, 16, ["label", "severity"])) : d("", !0)
|
|
@@ -207,7 +207,7 @@ const Le = /* @__PURE__ */ oe({
|
|
|
207
207
|
], 16)) : d("", !0)
|
|
208
208
|
], 16)
|
|
209
209
|
], 16),
|
|
210
|
-
e.$slots["aside-right"] ? (n(), Q("aside", p(i({ key: 0 }, (K = t(l)) == null ? void 0 : K.asidesection(
|
|
210
|
+
e.$slots["aside-right"] ? (n(), Q("aside", p(i({ key: 0 }, (K = t(l)) == null ? void 0 : K.asidesection(c.value, e.asideRightWidth))), [
|
|
211
211
|
S(e.$slots, "aside-right")
|
|
212
212
|
], 16)) : d("", !0)
|
|
213
213
|
], 16)
|