@fewangsit/wangsvue-fats 1.0.1-alpha.40 → 1.0.1-alpha.42
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.d.ts +13 -1
- package/animation/index.es.js +11 -9
- package/assets/lottiejs/scan-qr.es.js +4 -0
- package/badge/index.d.ts +11 -1
- package/badge/index.es.js +55 -53
- package/badgegroup/index.es.js +16 -14
- package/buttonbulkaction/index.es.js +15 -14
- package/datatable/index.d.ts +41 -0
- package/datatable/index.es.js +471 -435
- package/disposalreporttable/index.es.js +56 -55
- package/dropdown/index.d.ts +1 -0
- package/dropdown/index.es.js +82 -72
- package/headercell/index.es.js +40 -0
- package/inputbadge/index.d.ts +33 -0
- package/inputbadge/index.es.js +108 -94
- package/inputcurrency/index.es.js +2 -1
- package/package.json +2 -1
- package/scan-qr-C6V4afHJ.js +4 -0
- package/scan-qr-ER7xYaNh.js +1 -0
- package/stats.html +1 -1
- package/style.css +1 -1
- package/wangsvue-fats.esm.browser.js +11705 -11603
- package/wangsvue-fats.system.js +69 -69
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as E, onMounted as I, shallowRef as i, ref as M, createElementBlock as N, openBlock as F, Fragment as L, createElementVNode as d, createVNode as a, mergeProps as P, unref as l, withCtx as U, toDisplayString as _ } from "vue";
|
|
2
2
|
import { AssetServices as V, DisposalServices as q } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as z } from "../assetinfo/index.es.js";
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
4
|
+
import { u as H } from "../plugins/basei18n.es.js";
|
|
5
|
+
import { u as O } from "../utils/toast.util.es.js";
|
|
6
6
|
import { _ as g } from "../badge/index.es.js";
|
|
7
7
|
import { _ as w } from "../button/index.es.js";
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
8
|
+
import { _ as W } from "../buttonfilter/index.es.js";
|
|
9
|
+
import { _ as j } from "../buttonsearch/index.es.js";
|
|
10
10
|
import { D as K } from "../datatable/index.es.js";
|
|
11
11
|
import { _ as R } from "../dialogconfirm/index.es.js";
|
|
12
12
|
import { _ as G } from "../image/index.es.js";
|
|
@@ -23,6 +23,7 @@ const Y = {
|
|
|
23
23
|
childTableProps: {},
|
|
24
24
|
tableName: {},
|
|
25
25
|
tableTitle: {},
|
|
26
|
+
parentHeaders: {},
|
|
26
27
|
useOption: { type: Boolean },
|
|
27
28
|
data: {},
|
|
28
29
|
disableKey: {},
|
|
@@ -62,7 +63,7 @@ const Y = {
|
|
|
62
63
|
I(() => {
|
|
63
64
|
S();
|
|
64
65
|
});
|
|
65
|
-
const p =
|
|
66
|
+
const p = O(), { t: s } = H(), { setLoading: m } = z(), c = i(!1), f = i(!1), D = i(0), y = i([]), b = i(), r = i([]), n = M(
|
|
66
67
|
/* @__PURE__ */ new Map()
|
|
67
68
|
), C = [
|
|
68
69
|
{
|
|
@@ -72,10 +73,10 @@ const Y = {
|
|
|
72
73
|
fixed: !0,
|
|
73
74
|
sortable: !0,
|
|
74
75
|
excluded: !0,
|
|
75
|
-
bodyComponent: (
|
|
76
|
+
bodyComponent: (t) => ({
|
|
76
77
|
component: G,
|
|
77
78
|
props: {
|
|
78
|
-
src:
|
|
79
|
+
src: t.assetImageBig,
|
|
79
80
|
description: "asset-report-photo",
|
|
80
81
|
size: "small"
|
|
81
82
|
}
|
|
@@ -86,9 +87,9 @@ const Y = {
|
|
|
86
87
|
field: "name.nameWithSequence",
|
|
87
88
|
sortable: !0,
|
|
88
89
|
fixed: !0,
|
|
89
|
-
bodyTemplate: (
|
|
90
|
+
bodyTemplate: (t) => {
|
|
90
91
|
var e;
|
|
91
|
-
return ((e =
|
|
92
|
+
return ((e = t.name) == null ? void 0 : e.nameWithSequence) ?? "-";
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
{
|
|
@@ -96,12 +97,12 @@ const Y = {
|
|
|
96
97
|
field: "brand.name",
|
|
97
98
|
sortable: !0,
|
|
98
99
|
fixed: !1,
|
|
99
|
-
bodyComponent: (
|
|
100
|
+
bodyComponent: (t) => {
|
|
100
101
|
var e;
|
|
101
102
|
return {
|
|
102
103
|
component: g,
|
|
103
104
|
props: {
|
|
104
|
-
label: (e =
|
|
105
|
+
label: (e = t.brand) == null ? void 0 : e.name,
|
|
105
106
|
severity: "dark",
|
|
106
107
|
format: "nowrap"
|
|
107
108
|
}
|
|
@@ -113,12 +114,12 @@ const Y = {
|
|
|
113
114
|
field: "model.name",
|
|
114
115
|
sortable: !0,
|
|
115
116
|
fixed: !1,
|
|
116
|
-
bodyComponent: (
|
|
117
|
+
bodyComponent: (t) => {
|
|
117
118
|
var e;
|
|
118
119
|
return {
|
|
119
120
|
component: g,
|
|
120
121
|
props: {
|
|
121
|
-
label: (e =
|
|
122
|
+
label: (e = t.model) == null ? void 0 : e.name,
|
|
122
123
|
severity: "dark",
|
|
123
124
|
format: "nowrap"
|
|
124
125
|
}
|
|
@@ -130,12 +131,12 @@ const Y = {
|
|
|
130
131
|
field: "group.name",
|
|
131
132
|
sortable: !0,
|
|
132
133
|
fixed: !1,
|
|
133
|
-
bodyComponent: (
|
|
134
|
+
bodyComponent: (t) => {
|
|
134
135
|
var e;
|
|
135
136
|
return {
|
|
136
137
|
component: g,
|
|
137
138
|
props: {
|
|
138
|
-
label: (e =
|
|
139
|
+
label: (e = t.group) == null ? void 0 : e.name,
|
|
139
140
|
format: "nowrap"
|
|
140
141
|
}
|
|
141
142
|
};
|
|
@@ -145,21 +146,21 @@ const Y = {
|
|
|
145
146
|
header: "Note",
|
|
146
147
|
field: "note",
|
|
147
148
|
fixed: !0,
|
|
148
|
-
bodyComponent: (
|
|
149
|
+
bodyComponent: (t) => ({
|
|
149
150
|
component: Q,
|
|
150
151
|
props: {
|
|
151
|
-
modelValue: n.value.get(
|
|
152
|
+
modelValue: n.value.get(t._id ?? "assetId").notes,
|
|
152
153
|
placeholder: s("Enter note"),
|
|
153
154
|
rows: 1,
|
|
154
155
|
maxlength: 30
|
|
155
156
|
},
|
|
156
157
|
events: {
|
|
157
158
|
"update:modelValue": (e) => {
|
|
158
|
-
const
|
|
159
|
-
n.value.set(
|
|
160
|
-
...
|
|
159
|
+
const o = n.value.get(t._id ?? "assetId");
|
|
160
|
+
n.value.set(t._id ?? "assetId", {
|
|
161
|
+
...o,
|
|
161
162
|
notes: e
|
|
162
|
-
}),
|
|
163
|
+
}), t.note = e;
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
})
|
|
@@ -167,16 +168,16 @@ const Y = {
|
|
|
167
168
|
], S = async () => {
|
|
168
169
|
try {
|
|
169
170
|
m(!0);
|
|
170
|
-
const
|
|
171
|
-
e.data.data.forEach((
|
|
172
|
-
n.value.set(
|
|
171
|
+
const t = sessionStorage.getItem("assetsDisposalReport") ?? "[]", { data: e } = await V.getAllAssets({ _id: t });
|
|
172
|
+
e.data.data.forEach((o) => {
|
|
173
|
+
n.value.set(o._id ?? "", {
|
|
173
174
|
notes: null,
|
|
174
|
-
reason: ["Damaged", "Missing"].includes(
|
|
175
|
+
reason: ["Damaged", "Missing"].includes(o.status) ? o.status : u.reason
|
|
175
176
|
});
|
|
176
177
|
}), r.value = e.data.data, D.value = e.data.totalRecords;
|
|
177
|
-
} catch (
|
|
178
|
-
console.error(
|
|
179
|
-
error:
|
|
178
|
+
} catch (t) {
|
|
179
|
+
console.error(t), p.add({
|
|
180
|
+
error: t,
|
|
180
181
|
message: "Error, failed to get assets. "
|
|
181
182
|
});
|
|
182
183
|
} finally {
|
|
@@ -191,39 +192,39 @@ const Y = {
|
|
|
191
192
|
c.value = !0;
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
|
-
], h = (
|
|
195
|
+
], h = (t) => {
|
|
195
196
|
r.value = r.value.filter(
|
|
196
|
-
(e) => !
|
|
197
|
-
), T(
|
|
198
|
-
}, T = (
|
|
199
|
-
|
|
197
|
+
(e) => !t.some((o) => e._id === o._id)
|
|
198
|
+
), T(t);
|
|
199
|
+
}, T = (t) => {
|
|
200
|
+
t.forEach((e) => {
|
|
200
201
|
n.value.delete(e._id ?? "");
|
|
201
202
|
}), r.value.length || v(), p.add({
|
|
202
203
|
message: s("Success, asset has been removed from the list."),
|
|
203
204
|
severity: "success"
|
|
204
205
|
});
|
|
205
|
-
}, $ = (
|
|
206
|
-
|
|
207
|
-
n.value.set(
|
|
206
|
+
}, $ = (t, e) => {
|
|
207
|
+
t.forEach((o) => {
|
|
208
|
+
n.value.set(o._id ?? "", {
|
|
208
209
|
notes: e ?? null,
|
|
209
|
-
reason: ["Damaged", "Missing"].includes(
|
|
210
|
+
reason: ["Damaged", "Missing"].includes(o.status) ? o.status : u.reason
|
|
210
211
|
});
|
|
211
212
|
});
|
|
212
213
|
}, v = () => {
|
|
213
|
-
const
|
|
214
|
+
const t = window.location.pathname, e = t.slice(0, t.lastIndexOf("/"));
|
|
214
215
|
u.router.replace(e), sessionStorage.removeItem("assetsDisposalReport");
|
|
215
216
|
}, A = async () => {
|
|
216
|
-
const
|
|
217
|
-
n.value.forEach((e,
|
|
217
|
+
const t = [];
|
|
218
|
+
n.value.forEach((e, o) => {
|
|
218
219
|
const k = {
|
|
219
|
-
asset:
|
|
220
|
+
asset: o,
|
|
220
221
|
notes: e.notes,
|
|
221
222
|
reason: e.reason
|
|
222
223
|
};
|
|
223
|
-
|
|
224
|
+
t.push(k);
|
|
224
225
|
});
|
|
225
226
|
try {
|
|
226
|
-
m(!0), await q.postReportDisposal({ data:
|
|
227
|
+
m(!0), await q.postReportDisposal({ data: t }), p.add({
|
|
227
228
|
message: s("Success, disposal report has been submitted.")
|
|
228
229
|
}), v();
|
|
229
230
|
} catch (e) {
|
|
@@ -235,35 +236,35 @@ const Y = {
|
|
|
235
236
|
m(!1);
|
|
236
237
|
}
|
|
237
238
|
};
|
|
238
|
-
return (
|
|
239
|
+
return (t, e) => (F(), N(L, null, [
|
|
239
240
|
d("div", Y, [
|
|
240
241
|
d("div", Z, [
|
|
241
242
|
a(J, {
|
|
242
243
|
"assets-to-report": r.value,
|
|
243
|
-
"onUpdate:assetsToReport": e[0] || (e[0] = (
|
|
244
|
+
"onUpdate:assetsToReport": e[0] || (e[0] = (o) => r.value = o),
|
|
244
245
|
"selected-data": y.value,
|
|
245
|
-
"onUpdate:selectedData": e[1] || (e[1] = (
|
|
246
|
+
"onUpdate:selectedData": e[1] || (e[1] = (o) => y.value = o),
|
|
246
247
|
onNoted: $,
|
|
247
|
-
onRemoved: e[2] || (e[2] = (
|
|
248
|
+
onRemoved: e[2] || (e[2] = (o) => h(o)),
|
|
248
249
|
"table-name": "disposal-report-page-table"
|
|
249
250
|
}, null, 8, ["assets-to-report", "selected-data"]),
|
|
250
|
-
a(
|
|
251
|
+
a(j, {
|
|
251
252
|
class: "ml-auto",
|
|
252
253
|
"table-name": "disposal-report-page-table"
|
|
253
254
|
}),
|
|
254
|
-
a(
|
|
255
|
+
a(W, { "table-name": "disposal-report-page-table" })
|
|
255
256
|
]),
|
|
256
257
|
a(X, {
|
|
257
258
|
assets: r.value,
|
|
258
259
|
"table-name": "disposal-report-page-table"
|
|
259
260
|
}, null, 8, ["assets"]),
|
|
260
|
-
a(K, P(
|
|
261
|
+
a(K, P(t.$props, {
|
|
261
262
|
columns: C,
|
|
262
263
|
data: r.value,
|
|
263
264
|
lazy: !1,
|
|
264
265
|
options: B,
|
|
265
266
|
rows: 10,
|
|
266
|
-
onToggleOption: e[3] || (e[3] = (
|
|
267
|
+
onToggleOption: e[3] || (e[3] = (o) => b.value = o),
|
|
267
268
|
"data-key": "_id",
|
|
268
269
|
"rounded-header": "",
|
|
269
270
|
"selection-type": "checkbox",
|
|
@@ -274,18 +275,18 @@ const Y = {
|
|
|
274
275
|
]),
|
|
275
276
|
a(R, {
|
|
276
277
|
visible: c.value,
|
|
277
|
-
"onUpdate:visible": e[4] || (e[4] = (
|
|
278
|
+
"onUpdate:visible": e[4] || (e[4] = (o) => c.value = o),
|
|
278
279
|
body: l(s)("Are you sure you want to remove it?"),
|
|
279
280
|
"confirm-label": l(s)("Remove"),
|
|
280
281
|
header: l(s)("Remove from List"),
|
|
281
282
|
lists: [b.value],
|
|
282
|
-
onConfirm: e[5] || (e[5] = (
|
|
283
|
+
onConfirm: e[5] || (e[5] = (o) => h([b.value])),
|
|
283
284
|
"list-label": "name.nameWithSequence",
|
|
284
285
|
severity: "danger"
|
|
285
286
|
}, null, 8, ["visible", "body", "confirm-label", "header", "lists"]),
|
|
286
287
|
a(R, {
|
|
287
288
|
visible: f.value,
|
|
288
|
-
"onUpdate:visible": e[6] || (e[6] = (
|
|
289
|
+
"onUpdate:visible": e[6] || (e[6] = (o) => f.value = o),
|
|
289
290
|
"confirm-label": l(s)("Continue"),
|
|
290
291
|
header: l(s)("Cancel Report"),
|
|
291
292
|
onConfirm: v,
|
|
@@ -300,7 +301,7 @@ const Y = {
|
|
|
300
301
|
d("div", ee, [
|
|
301
302
|
a(w, {
|
|
302
303
|
label: l(s)("Cancel"),
|
|
303
|
-
onClick: e[7] || (e[7] = (
|
|
304
|
+
onClick: e[7] || (e[7] = (o) => f.value = !0),
|
|
304
305
|
severity: "dark",
|
|
305
306
|
text: ""
|
|
306
307
|
}, null, 8, ["label"]),
|
package/dropdown/index.d.ts
CHANGED
|
@@ -237,6 +237,7 @@ export interface DropdownProps {
|
|
|
237
237
|
export interface DropdownSlots {
|
|
238
238
|
'value': Slot<{ value: string; originalValue: any }>;
|
|
239
239
|
'option': Slot<{ option: Option }>;
|
|
240
|
+
'footer': Slot<{ options: Option[]; value: OptionValue }>;
|
|
240
241
|
'addon-left': Slot;
|
|
241
242
|
'addon-right': Slot;
|
|
242
243
|
}
|
package/dropdown/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { f as
|
|
5
|
-
import { m as
|
|
6
|
-
import { a as
|
|
7
|
-
import { s as
|
|
1
|
+
import { defineComponent as ee, onMounted as le, computed as u, inject as N, ref as oe, shallowRef as I, reactive as ae, watch as $, createBlock as m, openBlock as s, withCtx as r, createVNode as d, normalizeClass as te, createCommentVNode as T, unref as i, renderSlot as p, mergeProps as j, createSlots as ie, normalizeProps as v, guardReactiveProps as c, createElementVNode as re, toDisplayString as k, createElementBlock as D, Fragment as E, createTextVNode as R, nextTick as ne } from "vue";
|
|
2
|
+
import { u as se } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
+
import { u as de } from "../plugins/WangsVue.es.js";
|
|
4
|
+
import { f as ue } from "../utils/filterOptions.util.es.js";
|
|
5
|
+
import { m as pe } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
6
|
+
import { a as fe } from "../utils/textFormatter.util.es.js";
|
|
7
|
+
import { s as me } from "../vendor/primevue/dropdown/dropdown.esm.es.js";
|
|
8
8
|
import { s as K } from "../vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js";
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
9
|
+
import { _ as ve } from "../badge/index.es.js";
|
|
10
|
+
import { _ as ce } from "../fieldwrapper/index.es.js";
|
|
11
11
|
import { _ as B } from "../icon/index.es.js";
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
12
|
+
import { _ as ge } from "../inputgroup/index.es.js";
|
|
13
|
+
import { _ as ye } from "../validatormessage/index.es.js";
|
|
14
14
|
import { i as z } from "../vendor/lodash-es/isEqual.es.js";
|
|
15
15
|
import { c as F } from "../vendor/lodash-es/cloneDeep.es.js";
|
|
16
|
-
const
|
|
16
|
+
const Te = /* @__PURE__ */ ee({
|
|
17
17
|
__name: "Dropdown",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: { type: [String, Number, Boolean, Object], default: void 0 },
|
|
@@ -46,78 +46,78 @@ const Ie = /* @__PURE__ */ x({
|
|
|
46
46
|
emits: ["update:modelValue", "show", "fieldInfoClick"],
|
|
47
47
|
setup(W, { expose: q, emit: A }) {
|
|
48
48
|
const e = W, O = A;
|
|
49
|
-
|
|
49
|
+
le(() => {
|
|
50
50
|
X();
|
|
51
51
|
});
|
|
52
|
-
const { locale:
|
|
52
|
+
const { locale: f, defaultProps: G } = de("Dropdown"), H = u(() => pe(e, G)), n = N("preset", {}).dropdown, U = N(
|
|
53
53
|
"preset",
|
|
54
54
|
{}
|
|
55
|
-
).inputgroupaddon, g =
|
|
55
|
+
).inputgroupaddon, g = oe(), y = I(!1), b = I(!1), M = u(() => e.invalid || !!o.errorMessage), o = ae({
|
|
56
56
|
value: e.initialValue !== void 0 ? e.initialValue : e.modelValue
|
|
57
57
|
}), J = u(() => {
|
|
58
58
|
var l;
|
|
59
|
-
return
|
|
59
|
+
return f.emptySelectionErrorMessage.replace("{label}", e.label).replace(
|
|
60
60
|
"{formattedLabel}",
|
|
61
|
-
(l =
|
|
61
|
+
(l = fe(e.label)) == null ? void 0 : l.toLowerCase()
|
|
62
62
|
);
|
|
63
|
-
}), V = u(() =>
|
|
63
|
+
}), V = u(() => ue(e.options)), Q = u(() => {
|
|
64
64
|
var l;
|
|
65
|
-
return e.loading ?
|
|
65
|
+
return e.loading ? f.loadingPlaceholder : e.placeholder ?? ((l = f.inputPlaceholder) == null ? void 0 : l.replace("{label}", e.label ?? "").replace("{lowercaseLabel}", (e.label ?? "").toLowerCase()));
|
|
66
66
|
}), X = () => {
|
|
67
67
|
e.useValidator && (Object.assign(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
), e.initialValue !== void 0 && (
|
|
68
|
+
o,
|
|
69
|
+
se(e.fieldName ?? "dropdown", (l) => !(l != null && l !== "") && e.mandatory ? typeof e.validatorMessage == "object" && "empty" in e.validatorMessage ? e.validatorMessage.empty : e.validatorMessage ?? J.value : ne(Y))
|
|
70
|
+
), e.initialValue !== void 0 && (o.value = e.initialValue), e.invalid && o.validate());
|
|
71
71
|
}, Y = () => e.validatorMessage && e.invalid ? e.validatorMessage : !0, Z = (l) => {
|
|
72
|
-
const { value:
|
|
73
|
-
e.unselectOnReselect ? b.value = !0 : O("update:modelValue",
|
|
72
|
+
const { value: a } = l;
|
|
73
|
+
e.unselectOnReselect ? b.value = !0 : O("update:modelValue", a);
|
|
74
74
|
}, h = () => {
|
|
75
75
|
if (e.optionValue) {
|
|
76
|
-
const l = V.value.find((
|
|
77
|
-
if (typeof
|
|
78
|
-
return e.dataKey ?
|
|
79
|
-
F(
|
|
80
|
-
F(
|
|
76
|
+
const l = V.value.find((a) => {
|
|
77
|
+
if (typeof a != "string")
|
|
78
|
+
return e.dataKey ? o.value[e.dataKey] === a[e.optionValue ?? ""][e.dataKey] : z(
|
|
79
|
+
F(a[e.optionValue ?? ""]),
|
|
80
|
+
F(o.value)
|
|
81
81
|
);
|
|
82
82
|
});
|
|
83
83
|
if (l && typeof l != "string")
|
|
84
84
|
return l[e.optionLabel ?? ""];
|
|
85
|
-
} else if (
|
|
86
|
-
return
|
|
87
|
-
return
|
|
85
|
+
} else if (o.value && typeof o.value == "object" && e.optionLabel && e.optionLabel in o.value)
|
|
86
|
+
return o.value[e.optionLabel];
|
|
87
|
+
return o.value;
|
|
88
88
|
}, _ = () => {
|
|
89
89
|
g.value && g.value.show();
|
|
90
90
|
};
|
|
91
91
|
return $(
|
|
92
92
|
() => e.initialValue,
|
|
93
93
|
(l) => {
|
|
94
|
-
|
|
94
|
+
o.value = l;
|
|
95
95
|
},
|
|
96
96
|
{ once: !0 }
|
|
97
97
|
), $(
|
|
98
98
|
() => e.modelValue,
|
|
99
99
|
(l) => {
|
|
100
|
-
|
|
100
|
+
o.value = l;
|
|
101
101
|
}
|
|
102
102
|
), $(
|
|
103
|
-
() =>
|
|
104
|
-
(l,
|
|
103
|
+
() => o.value,
|
|
104
|
+
(l, a) => {
|
|
105
105
|
setTimeout(() => {
|
|
106
|
-
e.unselectOnReselect && b.value && (z(l,
|
|
106
|
+
e.unselectOnReselect && b.value && (z(l, a) && l !== void 0 && (o.value = void 0), b.value = !1, O("update:modelValue", o.value));
|
|
107
107
|
}, 0);
|
|
108
108
|
}
|
|
109
109
|
), q({
|
|
110
110
|
showOverlay: _
|
|
111
|
-
}), (l,
|
|
111
|
+
}), (l, a) => (s(), m(ce, {
|
|
112
112
|
info: l.fieldInfo,
|
|
113
113
|
label: e.label,
|
|
114
114
|
mandatory: e.mandatory,
|
|
115
115
|
"show-optional-text": l.showOptionalText,
|
|
116
|
-
onInfoClick:
|
|
116
|
+
onInfoClick: a[3] || (a[3] = (w) => l.$emit("fieldInfoClick"))
|
|
117
117
|
}, {
|
|
118
118
|
default: r(() => [
|
|
119
|
-
d(
|
|
120
|
-
class:
|
|
119
|
+
d(ge, {
|
|
120
|
+
class: te([
|
|
121
121
|
{
|
|
122
122
|
"grid grid-cols-[max-content,1fr,max-content]": l.$slots["addon-left"] && l.$slots["addon-right"],
|
|
123
123
|
"grid grid-cols-[1fr,max-content]": !l.$slots["addon-left"] && l.$slots["addon-right"],
|
|
@@ -131,85 +131,95 @@ const Ie = /* @__PURE__ */ x({
|
|
|
131
131
|
default: r(() => {
|
|
132
132
|
var w, C, S, P, L;
|
|
133
133
|
return [
|
|
134
|
-
l.$slots["addon-left"] ? (s(),
|
|
134
|
+
l.$slots["addon-left"] ? (s(), m(i(K), {
|
|
135
135
|
key: 0,
|
|
136
136
|
disabled: e.disabled
|
|
137
137
|
}, {
|
|
138
138
|
default: r(() => [
|
|
139
|
-
|
|
139
|
+
p(l.$slots, "addon-left")
|
|
140
140
|
]),
|
|
141
141
|
_: 3
|
|
142
142
|
}, 8, ["disabled"])) : T("", !0),
|
|
143
|
-
d(
|
|
143
|
+
d(i(me), j({
|
|
144
144
|
ref_key: "dropdown",
|
|
145
145
|
ref: g
|
|
146
146
|
}, e, {
|
|
147
|
-
modelValue:
|
|
148
|
-
"onUpdate:modelValue":
|
|
147
|
+
modelValue: o.value,
|
|
148
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => o.value = t),
|
|
149
149
|
"aria-describedby": e.label + "error",
|
|
150
|
-
"filter-placeholder": e.filterPlaceholder ||
|
|
150
|
+
"filter-placeholder": e.filterPlaceholder || i(f).filterPlaceholder,
|
|
151
151
|
invalid: M.value,
|
|
152
152
|
options: V.value,
|
|
153
153
|
placeholder: Q.value,
|
|
154
154
|
pt: {
|
|
155
|
-
list: (w =
|
|
156
|
-
panel: (C =
|
|
157
|
-
virtualScroller: (S =
|
|
158
|
-
wrapper: (P =
|
|
155
|
+
list: (w = i(n)) == null ? void 0 : w.list({ props: e }),
|
|
156
|
+
panel: (C = i(n)) == null ? void 0 : C.panel({ props: e }),
|
|
157
|
+
virtualScroller: (S = i(n)) == null ? void 0 : S.virtualScroller({ props: e }),
|
|
158
|
+
wrapper: (P = i(n)) == null ? void 0 : P.wrapper({ props: e })
|
|
159
159
|
},
|
|
160
160
|
"virtual-scroller-options": ((L = V.value) == null ? void 0 : L.length) > 10 ? { itemSize: 32 } : void 0,
|
|
161
161
|
onChange: Z,
|
|
162
|
-
onHide:
|
|
163
|
-
onShow:
|
|
164
|
-
}),
|
|
162
|
+
onHide: a[1] || (a[1] = (t) => y.value = !1),
|
|
163
|
+
onShow: a[2] || (a[2] = (t) => (l.$emit("show"), y.value = !0))
|
|
164
|
+
}), ie({
|
|
165
165
|
dropdownicon: r(() => [
|
|
166
|
-
d(B, v(c(
|
|
166
|
+
d(B, v(c(i(n).dropdownicon({ state: { isShowOverlay: y.value } }))), null, 16)
|
|
167
167
|
]),
|
|
168
168
|
loadingicon: r(() => [
|
|
169
|
-
d(B, v(c(
|
|
169
|
+
d(B, v(c(i(n).loadingicon)), null, 16)
|
|
170
170
|
]),
|
|
171
171
|
filtericon: r(() => [
|
|
172
|
-
d(B, v(c(
|
|
172
|
+
d(B, v(c(i(n).filtericon)), null, 16)
|
|
173
173
|
]),
|
|
174
174
|
_: 2
|
|
175
175
|
}, [
|
|
176
176
|
l.loading ? {
|
|
177
177
|
name: "value",
|
|
178
|
-
fn: r(({ placeholder:
|
|
179
|
-
|
|
178
|
+
fn: r(({ placeholder: t }) => [
|
|
179
|
+
re("span", v(c(i(n).loadingplaceholder)), k(t), 17)
|
|
180
180
|
]),
|
|
181
181
|
key: "0"
|
|
182
182
|
} : {
|
|
183
183
|
name: "value",
|
|
184
|
-
fn: r((
|
|
185
|
-
(H.value.allowNullOption ?
|
|
184
|
+
fn: r((t) => [
|
|
185
|
+
(H.value.allowNullOption ? t.value !== void 0 : t.value != null) ? p(l.$slots, "value", {
|
|
186
186
|
key: 0,
|
|
187
|
-
originalValue:
|
|
187
|
+
originalValue: t.value,
|
|
188
188
|
value: h()
|
|
189
189
|
}, () => [
|
|
190
|
-
l.valueType === "badge" ? (s(),
|
|
190
|
+
l.valueType === "badge" ? (s(), m(ve, j({ key: 0 }, l.badgeValueProps, {
|
|
191
191
|
label: h()
|
|
192
192
|
}), null, 16, ["label"])) : (s(), D(E, { key: 1 }, [
|
|
193
193
|
R(k(h()), 1)
|
|
194
194
|
], 64))
|
|
195
195
|
]) : (s(), D(E, { key: 1 }, [
|
|
196
|
-
R(k(
|
|
196
|
+
R(k(t.placeholder), 1)
|
|
197
197
|
], 64))
|
|
198
198
|
]),
|
|
199
199
|
key: "1"
|
|
200
200
|
},
|
|
201
201
|
l.$slots.option ? {
|
|
202
202
|
name: "option",
|
|
203
|
-
fn: r(({ option:
|
|
204
|
-
|
|
203
|
+
fn: r(({ option: t }) => [
|
|
204
|
+
p(l.$slots, "option", { option: t })
|
|
205
205
|
]),
|
|
206
206
|
key: "2"
|
|
207
|
+
} : void 0,
|
|
208
|
+
l.$slots.footer ? {
|
|
209
|
+
name: "footer",
|
|
210
|
+
fn: r(({ value: t, options: x }) => [
|
|
211
|
+
p(l.$slots, "footer", {
|
|
212
|
+
options: x,
|
|
213
|
+
value: t
|
|
214
|
+
})
|
|
215
|
+
]),
|
|
216
|
+
key: "3"
|
|
207
217
|
} : void 0
|
|
208
218
|
]), 1040, ["modelValue", "aria-describedby", "filter-placeholder", "invalid", "options", "placeholder", "pt", "virtual-scroller-options"]),
|
|
209
|
-
l.$slots["addon-right"] ? (s(),
|
|
219
|
+
l.$slots["addon-right"] ? (s(), m(i(K), {
|
|
210
220
|
key: 1,
|
|
211
221
|
pt: {
|
|
212
|
-
root:
|
|
222
|
+
root: i(U).root({
|
|
213
223
|
props: {
|
|
214
224
|
class: [
|
|
215
225
|
{
|
|
@@ -221,7 +231,7 @@ const Ie = /* @__PURE__ */ x({
|
|
|
221
231
|
}
|
|
222
232
|
}, {
|
|
223
233
|
default: r(() => [
|
|
224
|
-
|
|
234
|
+
p(l.$slots, "addon-right")
|
|
225
235
|
]),
|
|
226
236
|
_: 3
|
|
227
237
|
}, 8, ["pt"])) : T("", !0)
|
|
@@ -229,9 +239,9 @@ const Ie = /* @__PURE__ */ x({
|
|
|
229
239
|
}),
|
|
230
240
|
_: 3
|
|
231
241
|
}, 8, ["class", "disabled", "invalid", "ring"]),
|
|
232
|
-
d(
|
|
242
|
+
d(ye, {
|
|
233
243
|
id: e.label + "error",
|
|
234
|
-
message:
|
|
244
|
+
message: o.errorMessage
|
|
235
245
|
}, null, 8, ["id", "message"])
|
|
236
246
|
]),
|
|
237
247
|
_: 3
|
|
@@ -239,5 +249,5 @@ const Ie = /* @__PURE__ */ x({
|
|
|
239
249
|
}
|
|
240
250
|
});
|
|
241
251
|
export {
|
|
242
|
-
|
|
252
|
+
Te as _
|
|
243
253
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as n, createElementBlock as t, openBlock as o, normalizeClass as c, createElementVNode as r, normalizeProps as p, guardReactiveProps as i, createBlock as s, createCommentVNode as a, createTextVNode as d, toDisplayString as f } from "vue";
|
|
2
|
+
import { _ as l } from "../icon/index.es.js";
|
|
3
|
+
const m = ["colspan", "rowspan"], u = { class: "flex" }, k = /* @__PURE__ */ n({
|
|
4
|
+
__name: "HeaderCell",
|
|
5
|
+
props: {
|
|
6
|
+
col: {},
|
|
7
|
+
defaultHeaderRowSpan: {},
|
|
8
|
+
sortBy: {},
|
|
9
|
+
sortOrder: {},
|
|
10
|
+
preset: {}
|
|
11
|
+
},
|
|
12
|
+
setup(y) {
|
|
13
|
+
return (e, h) => (o(), t("th", {
|
|
14
|
+
class: c([e.col.headerClass, e.col.class]),
|
|
15
|
+
colspan: e.col.colspan,
|
|
16
|
+
rowspan: e.col.rowspan ?? e.defaultHeaderRowSpan
|
|
17
|
+
}, [
|
|
18
|
+
r("span", p(i(e.preset.headercellcontent)), [
|
|
19
|
+
r("span", u, [
|
|
20
|
+
d(f(e.col.header) + " ", 1),
|
|
21
|
+
e.col.info ? (o(), s(l, {
|
|
22
|
+
key: 0,
|
|
23
|
+
info: e.col.info,
|
|
24
|
+
severity: e.col.infoSeverity,
|
|
25
|
+
class: "w-[10px] h-[10px]",
|
|
26
|
+
icon: "info"
|
|
27
|
+
}, null, 8, ["info", "severity"])) : a("", !0)
|
|
28
|
+
]),
|
|
29
|
+
e.col.sortable ? (o(), s(l, {
|
|
30
|
+
key: 0,
|
|
31
|
+
icon: !e.sortBy || e.sortBy != e.col.field ? "arrow-up-down" : e.sortOrder == 1 ? "sort-asc" : "sort-desc",
|
|
32
|
+
class: "text-base"
|
|
33
|
+
}, null, 8, ["icon"])) : a("", !0)
|
|
34
|
+
], 16)
|
|
35
|
+
], 10, m));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
k as _
|
|
40
|
+
};
|