@esic-lab/data-core-ui 0.0.35 → 0.0.37
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/index.cjs +4084 -0
- package/dist/index.d.cts +573 -0
- package/dist/index.d.mts +1 -63
- package/dist/index.d.ts +1 -63
- package/dist/index.js +242 -988
- package/dist/index.mjs +225 -990
- package/package.json +2 -10
package/dist/index.js
CHANGED
|
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
8
|
var __export = (target, all) => {
|
|
12
9
|
for (var name in all)
|
|
13
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -30,456 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
27
|
));
|
|
31
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
29
|
|
|
33
|
-
// node_modules/dayjs/dayjs.min.js
|
|
34
|
-
var require_dayjs_min = __commonJS({
|
|
35
|
-
"node_modules/dayjs/dayjs.min.js"(exports2, module2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
!(function(t, e) {
|
|
38
|
-
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
|
|
39
|
-
})(exports2, (function() {
|
|
40
|
-
"use strict";
|
|
41
|
-
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
42
|
-
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
43
|
-
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
44
|
-
} }, m = function(t2, e2, n2) {
|
|
45
|
-
var r2 = String(t2);
|
|
46
|
-
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
47
|
-
}, v = { s: m, z: function(t2) {
|
|
48
|
-
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
49
|
-
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
50
|
-
}, m: function t2(e2, n2) {
|
|
51
|
-
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
52
|
-
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
53
|
-
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
54
|
-
}, a: function(t2) {
|
|
55
|
-
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
56
|
-
}, p: function(t2) {
|
|
57
|
-
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
58
|
-
}, u: function(t2) {
|
|
59
|
-
return void 0 === t2;
|
|
60
|
-
} }, g = "en", D = {};
|
|
61
|
-
D[g] = M;
|
|
62
|
-
var p = "$isDayjsObject", S = function(t2) {
|
|
63
|
-
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
64
|
-
}, w = function t2(e2, n2, r2) {
|
|
65
|
-
var i2;
|
|
66
|
-
if (!e2) return g;
|
|
67
|
-
if ("string" == typeof e2) {
|
|
68
|
-
var s2 = e2.toLowerCase();
|
|
69
|
-
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
70
|
-
var u2 = e2.split("-");
|
|
71
|
-
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
72
|
-
} else {
|
|
73
|
-
var a2 = e2.name;
|
|
74
|
-
D[a2] = e2, i2 = a2;
|
|
75
|
-
}
|
|
76
|
-
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
77
|
-
}, O = function(t2, e2) {
|
|
78
|
-
if (S(t2)) return t2.clone();
|
|
79
|
-
var n2 = "object" == typeof e2 ? e2 : {};
|
|
80
|
-
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
81
|
-
}, b = v;
|
|
82
|
-
b.l = w, b.i = S, b.w = function(t2, e2) {
|
|
83
|
-
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
84
|
-
};
|
|
85
|
-
var _ = (function() {
|
|
86
|
-
function M2(t2) {
|
|
87
|
-
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
88
|
-
}
|
|
89
|
-
var m2 = M2.prototype;
|
|
90
|
-
return m2.parse = function(t2) {
|
|
91
|
-
this.$d = (function(t3) {
|
|
92
|
-
var e2 = t3.date, n2 = t3.utc;
|
|
93
|
-
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
94
|
-
if (b.u(e2)) return /* @__PURE__ */ new Date();
|
|
95
|
-
if (e2 instanceof Date) return new Date(e2);
|
|
96
|
-
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
97
|
-
var r2 = e2.match($);
|
|
98
|
-
if (r2) {
|
|
99
|
-
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
100
|
-
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return new Date(e2);
|
|
104
|
-
})(t2), this.init();
|
|
105
|
-
}, m2.init = function() {
|
|
106
|
-
var t2 = this.$d;
|
|
107
|
-
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
108
|
-
}, m2.$utils = function() {
|
|
109
|
-
return b;
|
|
110
|
-
}, m2.isValid = function() {
|
|
111
|
-
return !(this.$d.toString() === l);
|
|
112
|
-
}, m2.isSame = function(t2, e2) {
|
|
113
|
-
var n2 = O(t2);
|
|
114
|
-
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
115
|
-
}, m2.isAfter = function(t2, e2) {
|
|
116
|
-
return O(t2) < this.startOf(e2);
|
|
117
|
-
}, m2.isBefore = function(t2, e2) {
|
|
118
|
-
return this.endOf(e2) < O(t2);
|
|
119
|
-
}, m2.$g = function(t2, e2, n2) {
|
|
120
|
-
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
121
|
-
}, m2.unix = function() {
|
|
122
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
123
|
-
}, m2.valueOf = function() {
|
|
124
|
-
return this.$d.getTime();
|
|
125
|
-
}, m2.startOf = function(t2, e2) {
|
|
126
|
-
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
|
|
127
|
-
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
128
|
-
return r2 ? i2 : i2.endOf(a);
|
|
129
|
-
}, $2 = function(t3, e3) {
|
|
130
|
-
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
131
|
-
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
132
|
-
switch (f2) {
|
|
133
|
-
case h:
|
|
134
|
-
return r2 ? l2(1, 0) : l2(31, 11);
|
|
135
|
-
case c:
|
|
136
|
-
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
137
|
-
case o:
|
|
138
|
-
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
139
|
-
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
140
|
-
case a:
|
|
141
|
-
case d:
|
|
142
|
-
return $2(v2 + "Hours", 0);
|
|
143
|
-
case u:
|
|
144
|
-
return $2(v2 + "Minutes", 1);
|
|
145
|
-
case s:
|
|
146
|
-
return $2(v2 + "Seconds", 2);
|
|
147
|
-
case i:
|
|
148
|
-
return $2(v2 + "Milliseconds", 3);
|
|
149
|
-
default:
|
|
150
|
-
return this.clone();
|
|
151
|
-
}
|
|
152
|
-
}, m2.endOf = function(t2) {
|
|
153
|
-
return this.startOf(t2, false);
|
|
154
|
-
}, m2.$set = function(t2, e2) {
|
|
155
|
-
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
156
|
-
if (o2 === c || o2 === h) {
|
|
157
|
-
var y2 = this.clone().set(d, 1);
|
|
158
|
-
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
159
|
-
} else l2 && this.$d[l2]($2);
|
|
160
|
-
return this.init(), this;
|
|
161
|
-
}, m2.set = function(t2, e2) {
|
|
162
|
-
return this.clone().$set(t2, e2);
|
|
163
|
-
}, m2.get = function(t2) {
|
|
164
|
-
return this[b.p(t2)]();
|
|
165
|
-
}, m2.add = function(r2, f2) {
|
|
166
|
-
var d2, l2 = this;
|
|
167
|
-
r2 = Number(r2);
|
|
168
|
-
var $2 = b.p(f2), y2 = function(t2) {
|
|
169
|
-
var e2 = O(l2);
|
|
170
|
-
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
171
|
-
};
|
|
172
|
-
if ($2 === c) return this.set(c, this.$M + r2);
|
|
173
|
-
if ($2 === h) return this.set(h, this.$y + r2);
|
|
174
|
-
if ($2 === a) return y2(1);
|
|
175
|
-
if ($2 === o) return y2(7);
|
|
176
|
-
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
177
|
-
return b.w(m3, this);
|
|
178
|
-
}, m2.subtract = function(t2, e2) {
|
|
179
|
-
return this.add(-1 * t2, e2);
|
|
180
|
-
}, m2.format = function(t2) {
|
|
181
|
-
var e2 = this, n2 = this.$locale();
|
|
182
|
-
if (!this.isValid()) return n2.invalidDate || l;
|
|
183
|
-
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
|
|
184
|
-
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
185
|
-
}, d2 = function(t3) {
|
|
186
|
-
return b.s(s2 % 12 || 12, t3, "0");
|
|
187
|
-
}, $2 = f2 || function(t3, e3, n3) {
|
|
188
|
-
var r3 = t3 < 12 ? "AM" : "PM";
|
|
189
|
-
return n3 ? r3.toLowerCase() : r3;
|
|
190
|
-
};
|
|
191
|
-
return r2.replace(y, (function(t3, r3) {
|
|
192
|
-
return r3 || (function(t4) {
|
|
193
|
-
switch (t4) {
|
|
194
|
-
case "YY":
|
|
195
|
-
return String(e2.$y).slice(-2);
|
|
196
|
-
case "YYYY":
|
|
197
|
-
return b.s(e2.$y, 4, "0");
|
|
198
|
-
case "M":
|
|
199
|
-
return a2 + 1;
|
|
200
|
-
case "MM":
|
|
201
|
-
return b.s(a2 + 1, 2, "0");
|
|
202
|
-
case "MMM":
|
|
203
|
-
return h2(n2.monthsShort, a2, c2, 3);
|
|
204
|
-
case "MMMM":
|
|
205
|
-
return h2(c2, a2);
|
|
206
|
-
case "D":
|
|
207
|
-
return e2.$D;
|
|
208
|
-
case "DD":
|
|
209
|
-
return b.s(e2.$D, 2, "0");
|
|
210
|
-
case "d":
|
|
211
|
-
return String(e2.$W);
|
|
212
|
-
case "dd":
|
|
213
|
-
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
214
|
-
case "ddd":
|
|
215
|
-
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
216
|
-
case "dddd":
|
|
217
|
-
return o2[e2.$W];
|
|
218
|
-
case "H":
|
|
219
|
-
return String(s2);
|
|
220
|
-
case "HH":
|
|
221
|
-
return b.s(s2, 2, "0");
|
|
222
|
-
case "h":
|
|
223
|
-
return d2(1);
|
|
224
|
-
case "hh":
|
|
225
|
-
return d2(2);
|
|
226
|
-
case "a":
|
|
227
|
-
return $2(s2, u2, true);
|
|
228
|
-
case "A":
|
|
229
|
-
return $2(s2, u2, false);
|
|
230
|
-
case "m":
|
|
231
|
-
return String(u2);
|
|
232
|
-
case "mm":
|
|
233
|
-
return b.s(u2, 2, "0");
|
|
234
|
-
case "s":
|
|
235
|
-
return String(e2.$s);
|
|
236
|
-
case "ss":
|
|
237
|
-
return b.s(e2.$s, 2, "0");
|
|
238
|
-
case "SSS":
|
|
239
|
-
return b.s(e2.$ms, 3, "0");
|
|
240
|
-
case "Z":
|
|
241
|
-
return i2;
|
|
242
|
-
}
|
|
243
|
-
return null;
|
|
244
|
-
})(t3) || i2.replace(":", "");
|
|
245
|
-
}));
|
|
246
|
-
}, m2.utcOffset = function() {
|
|
247
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
248
|
-
}, m2.diff = function(r2, d2, l2) {
|
|
249
|
-
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
250
|
-
return b.m(y2, m3);
|
|
251
|
-
};
|
|
252
|
-
switch (M3) {
|
|
253
|
-
case h:
|
|
254
|
-
$2 = D2() / 12;
|
|
255
|
-
break;
|
|
256
|
-
case c:
|
|
257
|
-
$2 = D2();
|
|
258
|
-
break;
|
|
259
|
-
case f:
|
|
260
|
-
$2 = D2() / 3;
|
|
261
|
-
break;
|
|
262
|
-
case o:
|
|
263
|
-
$2 = (g2 - v2) / 6048e5;
|
|
264
|
-
break;
|
|
265
|
-
case a:
|
|
266
|
-
$2 = (g2 - v2) / 864e5;
|
|
267
|
-
break;
|
|
268
|
-
case u:
|
|
269
|
-
$2 = g2 / n;
|
|
270
|
-
break;
|
|
271
|
-
case s:
|
|
272
|
-
$2 = g2 / e;
|
|
273
|
-
break;
|
|
274
|
-
case i:
|
|
275
|
-
$2 = g2 / t;
|
|
276
|
-
break;
|
|
277
|
-
default:
|
|
278
|
-
$2 = g2;
|
|
279
|
-
}
|
|
280
|
-
return l2 ? $2 : b.a($2);
|
|
281
|
-
}, m2.daysInMonth = function() {
|
|
282
|
-
return this.endOf(c).$D;
|
|
283
|
-
}, m2.$locale = function() {
|
|
284
|
-
return D[this.$L];
|
|
285
|
-
}, m2.locale = function(t2, e2) {
|
|
286
|
-
if (!t2) return this.$L;
|
|
287
|
-
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
288
|
-
return r2 && (n2.$L = r2), n2;
|
|
289
|
-
}, m2.clone = function() {
|
|
290
|
-
return b.w(this.$d, this);
|
|
291
|
-
}, m2.toDate = function() {
|
|
292
|
-
return new Date(this.valueOf());
|
|
293
|
-
}, m2.toJSON = function() {
|
|
294
|
-
return this.isValid() ? this.toISOString() : null;
|
|
295
|
-
}, m2.toISOString = function() {
|
|
296
|
-
return this.$d.toISOString();
|
|
297
|
-
}, m2.toString = function() {
|
|
298
|
-
return this.$d.toUTCString();
|
|
299
|
-
}, M2;
|
|
300
|
-
})(), k = _.prototype;
|
|
301
|
-
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
|
|
302
|
-
k[t2[1]] = function(e2) {
|
|
303
|
-
return this.$g(e2, t2[0], t2[1]);
|
|
304
|
-
};
|
|
305
|
-
})), O.extend = function(t2, e2) {
|
|
306
|
-
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
|
|
307
|
-
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
308
|
-
return O(1e3 * t2);
|
|
309
|
-
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
310
|
-
}));
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
// node_modules/dayjs/locale/th.js
|
|
315
|
-
var require_th = __commonJS({
|
|
316
|
-
"node_modules/dayjs/locale/th.js"(exports2, module2) {
|
|
317
|
-
"use strict";
|
|
318
|
-
!(function(_, e) {
|
|
319
|
-
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e(require_dayjs_min()) : "function" == typeof define && define.amd ? define(["dayjs"], e) : (_ = "undefined" != typeof globalThis ? globalThis : _ || self).dayjs_locale_th = e(_.dayjs);
|
|
320
|
-
})(exports2, (function(_) {
|
|
321
|
-
"use strict";
|
|
322
|
-
function e(_2) {
|
|
323
|
-
return _2 && "object" == typeof _2 && "default" in _2 ? _2 : { default: _2 };
|
|
324
|
-
}
|
|
325
|
-
var t = e(_), d = { name: "th", weekdays: "\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A\u0E1A\u0E14\u0E35_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"), weekdaysShort: "\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"), weekdaysMin: "\u0E2D\u0E32._\u0E08._\u0E2D._\u0E1E._\u0E1E\u0E24._\u0E28._\u0E2A.".split("_"), months: "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21_\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C_\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21_\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19_\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21_\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19_\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21_\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21_\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19_\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21_\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19_\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21".split("_"), monthsShort: "\u0E21.\u0E04._\u0E01.\u0E1E._\u0E21\u0E35.\u0E04._\u0E40\u0E21.\u0E22._\u0E1E.\u0E04._\u0E21\u0E34.\u0E22._\u0E01.\u0E04._\u0E2A.\u0E04._\u0E01.\u0E22._\u0E15.\u0E04._\u0E1E.\u0E22._\u0E18.\u0E04.".split("_"), formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm", LLLL: "\u0E27\u0E31\u0E19dddd\u0E17\u0E35\u0E48 D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm" }, relativeTime: { future: "\u0E2D\u0E35\u0E01 %s", past: "%s\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27", s: "\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35", m: "1 \u0E19\u0E32\u0E17\u0E35", mm: "%d \u0E19\u0E32\u0E17\u0E35", h: "1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07", hh: "%d \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07", d: "1 \u0E27\u0E31\u0E19", dd: "%d \u0E27\u0E31\u0E19", M: "1 \u0E40\u0E14\u0E37\u0E2D\u0E19", MM: "%d \u0E40\u0E14\u0E37\u0E2D\u0E19", y: "1 \u0E1B\u0E35", yy: "%d \u0E1B\u0E35" }, ordinal: function(_2) {
|
|
326
|
-
return _2 + ".";
|
|
327
|
-
} };
|
|
328
|
-
return t.default.locale(d, null, true), d;
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
// node_modules/dayjs/plugin/buddhistEra.js
|
|
334
|
-
var require_buddhistEra = __commonJS({
|
|
335
|
-
"node_modules/dayjs/plugin/buddhistEra.js"(exports2, module2) {
|
|
336
|
-
"use strict";
|
|
337
|
-
!(function(t, e) {
|
|
338
|
-
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
|
|
339
|
-
})(exports2, (function() {
|
|
340
|
-
"use strict";
|
|
341
|
-
return function(t, e) {
|
|
342
|
-
var n = e.prototype, i = n.format;
|
|
343
|
-
n.format = function(t2) {
|
|
344
|
-
var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
|
|
345
|
-
var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
|
|
346
|
-
return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
|
|
347
|
-
}));
|
|
348
|
-
return i.bind(this)(n2);
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
}));
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
// node_modules/dayjs/plugin/customParseFormat.js
|
|
356
|
-
var require_customParseFormat = __commonJS({
|
|
357
|
-
"node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) {
|
|
358
|
-
"use strict";
|
|
359
|
-
!(function(e, t) {
|
|
360
|
-
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
|
|
361
|
-
})(exports2, (function() {
|
|
362
|
-
"use strict";
|
|
363
|
-
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
364
|
-
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
365
|
-
};
|
|
366
|
-
var f = function(e2) {
|
|
367
|
-
return function(t2) {
|
|
368
|
-
this[e2] = +t2;
|
|
369
|
-
};
|
|
370
|
-
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
371
|
-
(this.zone || (this.zone = {})).offset = (function(e3) {
|
|
372
|
-
if (!e3) return 0;
|
|
373
|
-
if ("Z" === e3) return 0;
|
|
374
|
-
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
375
|
-
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
376
|
-
})(e2);
|
|
377
|
-
}], u = function(e2) {
|
|
378
|
-
var t2 = s[e2];
|
|
379
|
-
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
380
|
-
}, d = function(e2, t2) {
|
|
381
|
-
var n2, r2 = s.meridiem;
|
|
382
|
-
if (r2) {
|
|
383
|
-
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
384
|
-
n2 = i2 > 12;
|
|
385
|
-
break;
|
|
386
|
-
}
|
|
387
|
-
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
388
|
-
return n2;
|
|
389
|
-
}, c = { A: [o, function(e2) {
|
|
390
|
-
this.afternoon = d(e2, false);
|
|
391
|
-
}], a: [o, function(e2) {
|
|
392
|
-
this.afternoon = d(e2, true);
|
|
393
|
-
}], Q: [n, function(e2) {
|
|
394
|
-
this.month = 3 * (e2 - 1) + 1;
|
|
395
|
-
}], S: [n, function(e2) {
|
|
396
|
-
this.milliseconds = 100 * +e2;
|
|
397
|
-
}], SS: [r, function(e2) {
|
|
398
|
-
this.milliseconds = 10 * +e2;
|
|
399
|
-
}], SSS: [/\d{3}/, function(e2) {
|
|
400
|
-
this.milliseconds = +e2;
|
|
401
|
-
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
402
|
-
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
403
|
-
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
404
|
-
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
405
|
-
var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
|
|
406
|
-
return e3.slice(0, 3);
|
|
407
|
-
}))).indexOf(e2) + 1;
|
|
408
|
-
if (n2 < 1) throw new Error();
|
|
409
|
-
this.month = n2 % 12 || n2;
|
|
410
|
-
}], MMMM: [o, function(e2) {
|
|
411
|
-
var t2 = u("months").indexOf(e2) + 1;
|
|
412
|
-
if (t2 < 1) throw new Error();
|
|
413
|
-
this.month = t2 % 12 || t2;
|
|
414
|
-
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
415
|
-
this.year = a(e2);
|
|
416
|
-
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
417
|
-
function l(n2) {
|
|
418
|
-
var r2, i2;
|
|
419
|
-
r2 = n2, i2 = s && s.formats;
|
|
420
|
-
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
|
|
421
|
-
var o3 = r3 && r3.toUpperCase();
|
|
422
|
-
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
|
|
423
|
-
return t3 || n4.slice(1);
|
|
424
|
-
}));
|
|
425
|
-
}))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
426
|
-
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
427
|
-
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
428
|
-
}
|
|
429
|
-
return function(e2) {
|
|
430
|
-
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
431
|
-
var i3 = o2[n3];
|
|
432
|
-
if ("string" == typeof i3) r3 += i3.length;
|
|
433
|
-
else {
|
|
434
|
-
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
435
|
-
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return (function(e3) {
|
|
439
|
-
var t3 = e3.afternoon;
|
|
440
|
-
if (void 0 !== t3) {
|
|
441
|
-
var n4 = e3.hours;
|
|
442
|
-
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
443
|
-
}
|
|
444
|
-
})(t2), t2;
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
return function(e2, t2, n2) {
|
|
448
|
-
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
449
|
-
var r2 = t2.prototype, i2 = r2.parse;
|
|
450
|
-
r2.parse = function(e3) {
|
|
451
|
-
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
452
|
-
this.$u = r3;
|
|
453
|
-
var a2 = o2[1];
|
|
454
|
-
if ("string" == typeof a2) {
|
|
455
|
-
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
456
|
-
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) {
|
|
457
|
-
try {
|
|
458
|
-
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
459
|
-
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
460
|
-
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
461
|
-
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
462
|
-
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
463
|
-
} catch (e5) {
|
|
464
|
-
return /* @__PURE__ */ new Date("");
|
|
465
|
-
}
|
|
466
|
-
})(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
467
|
-
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
468
|
-
o2[1] = a2[m - 1];
|
|
469
|
-
var M = n2.apply(this, o2);
|
|
470
|
-
if (M.isValid()) {
|
|
471
|
-
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
472
|
-
break;
|
|
473
|
-
}
|
|
474
|
-
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
475
|
-
}
|
|
476
|
-
else i2.call(this, e3);
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
}));
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
|
|
483
30
|
// src/index.ts
|
|
484
31
|
var index_exports = {};
|
|
485
32
|
__export(index_exports, {
|
|
@@ -492,8 +39,6 @@ __export(index_exports, {
|
|
|
492
39
|
ColorPalettePickerBasic: () => ColorPalettePickerBasic,
|
|
493
40
|
ColorPickerBasic: () => ColorPickerBasic,
|
|
494
41
|
DataTable: () => DataTable,
|
|
495
|
-
DatePickerBasic: () => DatePickerBasic,
|
|
496
|
-
DatePickerRangePicker: () => DatePickerRangePicker,
|
|
497
42
|
FileUploader: () => FileUploader,
|
|
498
43
|
FilterPopUp: () => FilterPopUp,
|
|
499
44
|
GhostButton: () => GhostButton,
|
|
@@ -522,8 +67,6 @@ __export(index_exports, {
|
|
|
522
67
|
TabSelectionButton: () => TabSelectionButton,
|
|
523
68
|
TextAreaInput: () => TextAreaInput,
|
|
524
69
|
TextInput: () => TextInput,
|
|
525
|
-
TimePickerBasic: () => TimePickerBasic,
|
|
526
|
-
TimePickerRangePicker: () => TimePickerRangePicker,
|
|
527
70
|
TopNavBar: () => TopNavBar,
|
|
528
71
|
messageError: () => messageError,
|
|
529
72
|
messageInfo: () => messageInfo,
|
|
@@ -1415,48 +958,24 @@ function InputFieldNumber({
|
|
|
1415
958
|
);
|
|
1416
959
|
}
|
|
1417
960
|
|
|
1418
|
-
// src/
|
|
961
|
+
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1419
962
|
var import_antd5 = require("antd");
|
|
1420
|
-
var import_dayjs = __toESM(require_dayjs_min());
|
|
1421
|
-
var import_th_TH = __toESM(require("antd/es/date-picker/locale/th_TH.js"));
|
|
1422
|
-
var import_th_TH2 = __toESM(require("antd/locale/th_TH.js"));
|
|
1423
|
-
var import_th2 = __toESM(require_th());
|
|
1424
|
-
var import_locale = require("date-fns/locale");
|
|
1425
|
-
var import_date_fns = require("date-fns");
|
|
1426
|
-
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
1427
963
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1428
|
-
|
|
1429
|
-
function DatePickerBasic({
|
|
964
|
+
function ColorPickerBasic({
|
|
1430
965
|
value,
|
|
1431
966
|
onChange,
|
|
1432
967
|
required,
|
|
1433
968
|
label,
|
|
1434
969
|
error,
|
|
1435
|
-
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1436
970
|
disabled,
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
maxDate,
|
|
1440
|
-
disabledDate,
|
|
971
|
+
allowClear,
|
|
972
|
+
defaultFormat,
|
|
1441
973
|
className,
|
|
1442
|
-
|
|
974
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1443
975
|
}) {
|
|
1444
|
-
const dateFormat = "DD/MM/YYYY";
|
|
1445
|
-
import_dayjs.default.locale("th_TH");
|
|
1446
|
-
const buddhistLocale = {
|
|
1447
|
-
...import_th_TH.default,
|
|
1448
|
-
lang: {
|
|
1449
|
-
...import_th_TH.default.lang,
|
|
1450
|
-
fieldDateFormat: "BBBB-MM-DD",
|
|
1451
|
-
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1452
|
-
yearFormat: "BBBB",
|
|
1453
|
-
cellYearFormat: "BBBB"
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
976
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1457
977
|
import_antd5.ConfigProvider,
|
|
1458
978
|
{
|
|
1459
|
-
locale: import_th_TH2.default,
|
|
1460
979
|
theme: {
|
|
1461
980
|
token: {
|
|
1462
981
|
fontFamily: "Kanit",
|
|
@@ -1470,268 +989,7 @@ function DatePickerBasic({
|
|
|
1470
989
|
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1471
990
|
] }),
|
|
1472
991
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1473
|
-
import_antd5.
|
|
1474
|
-
{
|
|
1475
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1476
|
-
value,
|
|
1477
|
-
placeholder,
|
|
1478
|
-
onChange,
|
|
1479
|
-
allowClear: true,
|
|
1480
|
-
disabled,
|
|
1481
|
-
format: (date) => date ? (0, import_date_fns.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale.th }).replace(
|
|
1482
|
-
/\d{4}$/,
|
|
1483
|
-
(y) => String(parseInt(y) + 543)
|
|
1484
|
-
) : "",
|
|
1485
|
-
defaultValue,
|
|
1486
|
-
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1487
|
-
minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
|
|
1488
|
-
maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
|
|
1489
|
-
size,
|
|
1490
|
-
locale: buddhistLocale
|
|
1491
|
-
}
|
|
1492
|
-
),
|
|
1493
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1494
|
-
] })
|
|
1495
|
-
}
|
|
1496
|
-
);
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
// src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
|
|
1500
|
-
var import_antd6 = require("antd");
|
|
1501
|
-
var import_th_TH3 = __toESM(require("antd/locale/th_TH.js"));
|
|
1502
|
-
var import_th3 = __toESM(require_th());
|
|
1503
|
-
var import_th_TH4 = __toESM(require("antd/es/date-picker/locale/th_TH.js"));
|
|
1504
|
-
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1505
|
-
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1506
|
-
var import_date_fns2 = require("date-fns");
|
|
1507
|
-
var import_locale2 = require("date-fns/locale");
|
|
1508
|
-
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1509
|
-
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1510
|
-
function DatePickerRangePicker({
|
|
1511
|
-
value,
|
|
1512
|
-
onChange,
|
|
1513
|
-
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1514
|
-
label,
|
|
1515
|
-
required,
|
|
1516
|
-
error,
|
|
1517
|
-
disabled,
|
|
1518
|
-
minDate,
|
|
1519
|
-
maxDate,
|
|
1520
|
-
disabledDate,
|
|
1521
|
-
size = "middle",
|
|
1522
|
-
className,
|
|
1523
|
-
onOpenChange,
|
|
1524
|
-
onCalendarChange
|
|
1525
|
-
}) {
|
|
1526
|
-
const dateFormat = "DD/MM/YYYY";
|
|
1527
|
-
import_dayjs2.default.locale("th_TH");
|
|
1528
|
-
const buddhistLocale = {
|
|
1529
|
-
...import_th_TH4.default,
|
|
1530
|
-
lang: {
|
|
1531
|
-
...import_th_TH4.default.lang,
|
|
1532
|
-
fieldDateFormat: "BBBB-MM-DD",
|
|
1533
|
-
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1534
|
-
yearFormat: "BBBB",
|
|
1535
|
-
cellYearFormat: "BBBB"
|
|
1536
|
-
}
|
|
1537
|
-
};
|
|
1538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1539
|
-
import_antd6.ConfigProvider,
|
|
1540
|
-
{
|
|
1541
|
-
locale: import_th_TH3.default,
|
|
1542
|
-
theme: {
|
|
1543
|
-
token: {
|
|
1544
|
-
fontFamily: "Kanit",
|
|
1545
|
-
fontSize: 16
|
|
1546
|
-
}
|
|
1547
|
-
},
|
|
1548
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
|
|
1549
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1550
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
|
|
1551
|
-
" ",
|
|
1552
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1553
|
-
] }),
|
|
1554
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1555
|
-
import_antd6.DatePicker.RangePicker,
|
|
1556
|
-
{
|
|
1557
|
-
format: (date) => date ? (0, import_date_fns2.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale2.th }).replace(
|
|
1558
|
-
/\d{4}$/,
|
|
1559
|
-
(y) => String(parseInt(y) + 543)
|
|
1560
|
-
) : "",
|
|
1561
|
-
value: value ? [value[0] ? (0, import_dayjs2.default)(value[0]) : null, value[1] ? (0, import_dayjs2.default)(value[1]) : null] : null,
|
|
1562
|
-
placeholder,
|
|
1563
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1564
|
-
onChange: (dates, dateStrings) => {
|
|
1565
|
-
if (!dates) {
|
|
1566
|
-
onChange(null);
|
|
1567
|
-
} else {
|
|
1568
|
-
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1569
|
-
}
|
|
1570
|
-
},
|
|
1571
|
-
allowClear: true,
|
|
1572
|
-
disabled,
|
|
1573
|
-
minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
|
|
1574
|
-
maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
|
|
1575
|
-
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1576
|
-
size,
|
|
1577
|
-
onOpenChange,
|
|
1578
|
-
onCalendarChange: (dates, dateStrings, info) => {
|
|
1579
|
-
if (!dates) {
|
|
1580
|
-
onCalendarChange?.([null, null], dateStrings, info);
|
|
1581
|
-
} else {
|
|
1582
|
-
onCalendarChange?.(
|
|
1583
|
-
[dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null],
|
|
1584
|
-
dateStrings,
|
|
1585
|
-
info
|
|
1586
|
-
);
|
|
1587
|
-
}
|
|
1588
|
-
},
|
|
1589
|
-
locale: buddhistLocale
|
|
1590
|
-
}
|
|
1591
|
-
),
|
|
1592
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1593
|
-
] })
|
|
1594
|
-
}
|
|
1595
|
-
);
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1599
|
-
var import_antd7 = require("antd");
|
|
1600
|
-
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1601
|
-
var import_th_TH5 = __toESM(require("antd/locale/th_TH.js"));
|
|
1602
|
-
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1603
|
-
function TimePickerBasic({
|
|
1604
|
-
value,
|
|
1605
|
-
onChange,
|
|
1606
|
-
required,
|
|
1607
|
-
label,
|
|
1608
|
-
error,
|
|
1609
|
-
placeholder,
|
|
1610
|
-
disabled,
|
|
1611
|
-
className
|
|
1612
|
-
}) {
|
|
1613
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1614
|
-
import_antd7.ConfigProvider,
|
|
1615
|
-
{
|
|
1616
|
-
locale: import_th_TH5.default,
|
|
1617
|
-
theme: {
|
|
1618
|
-
token: {
|
|
1619
|
-
fontFamily: "Kanit"
|
|
1620
|
-
}
|
|
1621
|
-
},
|
|
1622
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
1623
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1624
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
|
|
1625
|
-
" ",
|
|
1626
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1627
|
-
] }),
|
|
1628
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1629
|
-
import_antd7.TimePicker,
|
|
1630
|
-
{
|
|
1631
|
-
format: "HH:mm",
|
|
1632
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1633
|
-
value: value ? (0, import_dayjs3.default)(value) : null,
|
|
1634
|
-
placeholder,
|
|
1635
|
-
onChange: (time) => {
|
|
1636
|
-
onChange(time ? time.toDate() : null);
|
|
1637
|
-
},
|
|
1638
|
-
allowClear: true,
|
|
1639
|
-
disabled
|
|
1640
|
-
}
|
|
1641
|
-
),
|
|
1642
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1643
|
-
] })
|
|
1644
|
-
}
|
|
1645
|
-
);
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1649
|
-
var import_antd8 = require("antd");
|
|
1650
|
-
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1651
|
-
var import_th_TH6 = __toESM(require("antd/locale/th_TH.js"));
|
|
1652
|
-
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1653
|
-
function TimePickerRangePicker({
|
|
1654
|
-
value,
|
|
1655
|
-
onChange,
|
|
1656
|
-
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1657
|
-
label,
|
|
1658
|
-
required,
|
|
1659
|
-
error,
|
|
1660
|
-
disabled,
|
|
1661
|
-
className
|
|
1662
|
-
}) {
|
|
1663
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1664
|
-
import_antd8.ConfigProvider,
|
|
1665
|
-
{
|
|
1666
|
-
locale: import_th_TH6.default,
|
|
1667
|
-
theme: {
|
|
1668
|
-
token: {
|
|
1669
|
-
fontFamily: "Kanit"
|
|
1670
|
-
}
|
|
1671
|
-
},
|
|
1672
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
1673
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1674
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
|
|
1675
|
-
" ",
|
|
1676
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1677
|
-
] }),
|
|
1678
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1679
|
-
import_antd8.TimePicker.RangePicker,
|
|
1680
|
-
{
|
|
1681
|
-
format: "HH:mm",
|
|
1682
|
-
value: value ? [value[0] ? (0, import_dayjs4.default)(value[0]) : null, value[1] ? (0, import_dayjs4.default)(value[1]) : null] : null,
|
|
1683
|
-
placeholder,
|
|
1684
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1685
|
-
onChange: (dates, dateStrings) => {
|
|
1686
|
-
if (!dates) {
|
|
1687
|
-
onChange(null);
|
|
1688
|
-
} else {
|
|
1689
|
-
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1690
|
-
}
|
|
1691
|
-
},
|
|
1692
|
-
allowClear: true,
|
|
1693
|
-
disabled,
|
|
1694
|
-
showNow: true
|
|
1695
|
-
}
|
|
1696
|
-
),
|
|
1697
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1698
|
-
] })
|
|
1699
|
-
}
|
|
1700
|
-
);
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1704
|
-
var import_antd9 = require("antd");
|
|
1705
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1706
|
-
function ColorPickerBasic({
|
|
1707
|
-
value,
|
|
1708
|
-
onChange,
|
|
1709
|
-
required,
|
|
1710
|
-
label,
|
|
1711
|
-
error,
|
|
1712
|
-
disabled,
|
|
1713
|
-
allowClear,
|
|
1714
|
-
defaultFormat,
|
|
1715
|
-
className,
|
|
1716
|
-
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1717
|
-
}) {
|
|
1718
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1719
|
-
import_antd9.ConfigProvider,
|
|
1720
|
-
{
|
|
1721
|
-
theme: {
|
|
1722
|
-
token: {
|
|
1723
|
-
fontFamily: "Kanit",
|
|
1724
|
-
fontSize: 16
|
|
1725
|
-
}
|
|
1726
|
-
},
|
|
1727
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
1728
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
1729
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
|
|
1730
|
-
" ",
|
|
1731
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1732
|
-
] }),
|
|
1733
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1734
|
-
import_antd9.ColorPicker,
|
|
992
|
+
import_antd5.ColorPicker,
|
|
1735
993
|
{
|
|
1736
994
|
defaultFormat,
|
|
1737
995
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1742,9 +1000,9 @@ function ColorPickerBasic({
|
|
|
1742
1000
|
showText: (color) => {
|
|
1743
1001
|
const hex = color.toHexString();
|
|
1744
1002
|
if (!value) {
|
|
1745
|
-
return /* @__PURE__ */ (0,
|
|
1003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: placeholder });
|
|
1746
1004
|
}
|
|
1747
|
-
return /* @__PURE__ */ (0,
|
|
1005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
|
|
1748
1006
|
"(",
|
|
1749
1007
|
hex,
|
|
1750
1008
|
")"
|
|
@@ -1753,14 +1011,14 @@ function ColorPickerBasic({
|
|
|
1753
1011
|
disabled
|
|
1754
1012
|
}
|
|
1755
1013
|
),
|
|
1756
|
-
error && /* @__PURE__ */ (0,
|
|
1014
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1757
1015
|
] })
|
|
1758
1016
|
}
|
|
1759
1017
|
);
|
|
1760
1018
|
}
|
|
1761
1019
|
|
|
1762
1020
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1763
|
-
var
|
|
1021
|
+
var import_antd6 = require("antd");
|
|
1764
1022
|
|
|
1765
1023
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1766
1024
|
function _typeof(o) {
|
|
@@ -2462,7 +1720,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2462
1720
|
greyDark.primary = greyDark[5];
|
|
2463
1721
|
|
|
2464
1722
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2465
|
-
var
|
|
1723
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2466
1724
|
function genPresets(presets = presetPalettes) {
|
|
2467
1725
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2468
1726
|
label,
|
|
@@ -2483,14 +1741,14 @@ function ColorPalettePickerBasic({
|
|
|
2483
1741
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",
|
|
2484
1742
|
onClear
|
|
2485
1743
|
}) {
|
|
2486
|
-
const { token } =
|
|
1744
|
+
const { token } = import_antd6.theme.useToken();
|
|
2487
1745
|
const presets = genPresets({
|
|
2488
1746
|
primary: generate(token.colorPrimary),
|
|
2489
1747
|
red,
|
|
2490
1748
|
green
|
|
2491
1749
|
});
|
|
2492
|
-
return /* @__PURE__ */ (0,
|
|
2493
|
-
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1751
|
+
import_antd6.ConfigProvider,
|
|
2494
1752
|
{
|
|
2495
1753
|
theme: {
|
|
2496
1754
|
token: {
|
|
@@ -2498,14 +1756,14 @@ function ColorPalettePickerBasic({
|
|
|
2498
1756
|
fontSize: 16
|
|
2499
1757
|
}
|
|
2500
1758
|
},
|
|
2501
|
-
children: /* @__PURE__ */ (0,
|
|
2502
|
-
/* @__PURE__ */ (0,
|
|
2503
|
-
/* @__PURE__ */ (0,
|
|
1759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
|
|
2504
1762
|
" ",
|
|
2505
|
-
required && /* @__PURE__ */ (0,
|
|
1763
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2506
1764
|
] }),
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2508
|
-
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1766
|
+
import_antd6.ColorPicker,
|
|
2509
1767
|
{
|
|
2510
1768
|
defaultFormat,
|
|
2511
1769
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -2517,9 +1775,9 @@ function ColorPalettePickerBasic({
|
|
|
2517
1775
|
showText: (color) => {
|
|
2518
1776
|
const hex = color.toHexString();
|
|
2519
1777
|
if (!value) {
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
1778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: placeholder });
|
|
2521
1779
|
}
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
1780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { children: [
|
|
2523
1781
|
"(",
|
|
2524
1782
|
hex,
|
|
2525
1783
|
")"
|
|
@@ -2529,15 +1787,15 @@ function ColorPalettePickerBasic({
|
|
|
2529
1787
|
onClear
|
|
2530
1788
|
}
|
|
2531
1789
|
),
|
|
2532
|
-
error && /* @__PURE__ */ (0,
|
|
1790
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2533
1791
|
] })
|
|
2534
1792
|
}
|
|
2535
1793
|
);
|
|
2536
1794
|
}
|
|
2537
1795
|
|
|
2538
1796
|
// src/Select/SelectField/SelectField.tsx
|
|
2539
|
-
var
|
|
2540
|
-
var
|
|
1797
|
+
var import_antd7 = require("antd");
|
|
1798
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2541
1799
|
function SelectField({
|
|
2542
1800
|
value,
|
|
2543
1801
|
onChange,
|
|
@@ -2555,8 +1813,8 @@ function SelectField({
|
|
|
2555
1813
|
className,
|
|
2556
1814
|
onClear
|
|
2557
1815
|
}) {
|
|
2558
|
-
return /* @__PURE__ */ (0,
|
|
2559
|
-
|
|
1816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1817
|
+
import_antd7.ConfigProvider,
|
|
2560
1818
|
{
|
|
2561
1819
|
theme: {
|
|
2562
1820
|
token: {
|
|
@@ -2564,14 +1822,14 @@ function SelectField({
|
|
|
2564
1822
|
fontSize: 16
|
|
2565
1823
|
}
|
|
2566
1824
|
},
|
|
2567
|
-
children: /* @__PURE__ */ (0,
|
|
2568
|
-
/* @__PURE__ */ (0,
|
|
2569
|
-
/* @__PURE__ */ (0,
|
|
1825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
|
|
2570
1828
|
" ",
|
|
2571
|
-
required && /* @__PURE__ */ (0,
|
|
1829
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2572
1830
|
] }),
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
2574
|
-
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1832
|
+
import_antd7.Select,
|
|
2575
1833
|
{
|
|
2576
1834
|
showSearch: true,
|
|
2577
1835
|
value,
|
|
@@ -2585,7 +1843,7 @@ function SelectField({
|
|
|
2585
1843
|
options,
|
|
2586
1844
|
mode,
|
|
2587
1845
|
onSearch: handleSearch,
|
|
2588
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
1846
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2589
1847
|
"span",
|
|
2590
1848
|
{
|
|
2591
1849
|
style: {
|
|
@@ -2602,15 +1860,15 @@ function SelectField({
|
|
|
2602
1860
|
onClear
|
|
2603
1861
|
}
|
|
2604
1862
|
),
|
|
2605
|
-
error && /* @__PURE__ */ (0,
|
|
1863
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2606
1864
|
] })
|
|
2607
1865
|
}
|
|
2608
1866
|
);
|
|
2609
1867
|
}
|
|
2610
1868
|
|
|
2611
1869
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2612
|
-
var
|
|
2613
|
-
var
|
|
1870
|
+
var import_antd8 = require("antd");
|
|
1871
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2614
1872
|
function SelectFieldGroup({
|
|
2615
1873
|
value,
|
|
2616
1874
|
onChange,
|
|
@@ -2627,22 +1885,22 @@ function SelectFieldGroup({
|
|
|
2627
1885
|
handleSearch,
|
|
2628
1886
|
className
|
|
2629
1887
|
}) {
|
|
2630
|
-
return /* @__PURE__ */ (0,
|
|
2631
|
-
|
|
1888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1889
|
+
import_antd8.ConfigProvider,
|
|
2632
1890
|
{
|
|
2633
1891
|
theme: {
|
|
2634
1892
|
token: {
|
|
2635
1893
|
fontFamily: "Kanit"
|
|
2636
1894
|
}
|
|
2637
1895
|
},
|
|
2638
|
-
children: /* @__PURE__ */ (0,
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
1897
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
|
|
2641
1899
|
" ",
|
|
2642
|
-
required && /* @__PURE__ */ (0,
|
|
1900
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2643
1901
|
] }),
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1903
|
+
import_antd8.Select,
|
|
2646
1904
|
{
|
|
2647
1905
|
showSearch: true,
|
|
2648
1906
|
value,
|
|
@@ -2656,7 +1914,7 @@ function SelectFieldGroup({
|
|
|
2656
1914
|
options,
|
|
2657
1915
|
mode,
|
|
2658
1916
|
onSearch: handleSearch,
|
|
2659
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
1917
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2660
1918
|
"span",
|
|
2661
1919
|
{
|
|
2662
1920
|
style: {
|
|
@@ -2672,14 +1930,14 @@ function SelectFieldGroup({
|
|
|
2672
1930
|
allowClear: true
|
|
2673
1931
|
}
|
|
2674
1932
|
),
|
|
2675
|
-
error && /* @__PURE__ */ (0,
|
|
1933
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2676
1934
|
] })
|
|
2677
1935
|
}
|
|
2678
1936
|
);
|
|
2679
1937
|
}
|
|
2680
1938
|
|
|
2681
1939
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2682
|
-
var
|
|
1940
|
+
var import_antd9 = require("antd");
|
|
2683
1941
|
|
|
2684
1942
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2685
1943
|
var status = [
|
|
@@ -2692,7 +1950,7 @@ var status = [
|
|
|
2692
1950
|
|
|
2693
1951
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2694
1952
|
var import_icons = require("@ant-design/icons");
|
|
2695
|
-
var
|
|
1953
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2696
1954
|
function SelectFieldStatus({
|
|
2697
1955
|
value,
|
|
2698
1956
|
onChange,
|
|
@@ -2705,8 +1963,8 @@ function SelectFieldStatus({
|
|
|
2705
1963
|
className
|
|
2706
1964
|
}) {
|
|
2707
1965
|
const selectedItem = status.find((s) => s.value === value);
|
|
2708
|
-
return /* @__PURE__ */ (0,
|
|
2709
|
-
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1967
|
+
import_antd9.ConfigProvider,
|
|
2710
1968
|
{
|
|
2711
1969
|
theme: {
|
|
2712
1970
|
components: {
|
|
@@ -2721,17 +1979,17 @@ function SelectFieldStatus({
|
|
|
2721
1979
|
fontFamily: "Kanit"
|
|
2722
1980
|
}
|
|
2723
1981
|
},
|
|
2724
|
-
children: /* @__PURE__ */ (0,
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
1982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
|
|
2727
1985
|
" ",
|
|
2728
|
-
required && /* @__PURE__ */ (0,
|
|
1986
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2729
1987
|
] }),
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2731
|
-
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1989
|
+
import_antd9.Select,
|
|
2732
1990
|
{
|
|
2733
1991
|
disabled,
|
|
2734
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
1992
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2735
1993
|
value,
|
|
2736
1994
|
onChange,
|
|
2737
1995
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2742,14 +2000,14 @@ function SelectFieldStatus({
|
|
|
2742
2000
|
showSearch: true
|
|
2743
2001
|
}
|
|
2744
2002
|
),
|
|
2745
|
-
error && /* @__PURE__ */ (0,
|
|
2003
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2746
2004
|
] })
|
|
2747
2005
|
}
|
|
2748
2006
|
);
|
|
2749
2007
|
}
|
|
2750
2008
|
|
|
2751
2009
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2752
|
-
var
|
|
2010
|
+
var import_antd10 = require("antd");
|
|
2753
2011
|
|
|
2754
2012
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2755
2013
|
var status2 = [
|
|
@@ -2759,7 +2017,7 @@ var status2 = [
|
|
|
2759
2017
|
|
|
2760
2018
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2761
2019
|
var import_icons2 = require("@ant-design/icons");
|
|
2762
|
-
var
|
|
2020
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2763
2021
|
function SelectFieldStatusReport({
|
|
2764
2022
|
value,
|
|
2765
2023
|
onChange,
|
|
@@ -2772,8 +2030,8 @@ function SelectFieldStatusReport({
|
|
|
2772
2030
|
options
|
|
2773
2031
|
}) {
|
|
2774
2032
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2775
|
-
return /* @__PURE__ */ (0,
|
|
2776
|
-
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2034
|
+
import_antd10.ConfigProvider,
|
|
2777
2035
|
{
|
|
2778
2036
|
theme: {
|
|
2779
2037
|
components: {
|
|
@@ -2788,17 +2046,17 @@ function SelectFieldStatusReport({
|
|
|
2788
2046
|
fontFamily: "Kanit"
|
|
2789
2047
|
}
|
|
2790
2048
|
},
|
|
2791
|
-
children: /* @__PURE__ */ (0,
|
|
2792
|
-
/* @__PURE__ */ (0,
|
|
2793
|
-
/* @__PURE__ */ (0,
|
|
2049
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
|
|
2794
2052
|
" ",
|
|
2795
|
-
required && /* @__PURE__ */ (0,
|
|
2053
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2796
2054
|
] }),
|
|
2797
|
-
/* @__PURE__ */ (0,
|
|
2798
|
-
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2056
|
+
import_antd10.Select,
|
|
2799
2057
|
{
|
|
2800
2058
|
disabled,
|
|
2801
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2059
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2802
2060
|
value,
|
|
2803
2061
|
onChange,
|
|
2804
2062
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2809,16 +2067,16 @@ function SelectFieldStatusReport({
|
|
|
2809
2067
|
showSearch: true
|
|
2810
2068
|
}
|
|
2811
2069
|
),
|
|
2812
|
-
error && /* @__PURE__ */ (0,
|
|
2070
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2813
2071
|
] })
|
|
2814
2072
|
}
|
|
2815
2073
|
);
|
|
2816
2074
|
}
|
|
2817
2075
|
|
|
2818
2076
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2819
|
-
var
|
|
2077
|
+
var import_antd11 = require("antd");
|
|
2820
2078
|
var import_react8 = require("react");
|
|
2821
|
-
var
|
|
2079
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2822
2080
|
function SelectFieldTag({
|
|
2823
2081
|
label,
|
|
2824
2082
|
required,
|
|
@@ -2851,22 +2109,22 @@ function SelectFieldTag({
|
|
|
2851
2109
|
}
|
|
2852
2110
|
onChange?.([]);
|
|
2853
2111
|
};
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
2855
|
-
|
|
2112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2113
|
+
import_antd11.ConfigProvider,
|
|
2856
2114
|
{
|
|
2857
2115
|
theme: {
|
|
2858
2116
|
token: {
|
|
2859
2117
|
fontFamily: "Kanit"
|
|
2860
2118
|
}
|
|
2861
2119
|
},
|
|
2862
|
-
children: /* @__PURE__ */ (0,
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
|
|
2865
2123
|
" ",
|
|
2866
|
-
required && /* @__PURE__ */ (0,
|
|
2124
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2867
2125
|
] }),
|
|
2868
|
-
/* @__PURE__ */ (0,
|
|
2869
|
-
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2127
|
+
import_antd11.Select,
|
|
2870
2128
|
{
|
|
2871
2129
|
mode: "tags",
|
|
2872
2130
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2884,7 +2142,7 @@ function SelectFieldTag({
|
|
|
2884
2142
|
onClear
|
|
2885
2143
|
}
|
|
2886
2144
|
),
|
|
2887
|
-
error && /* @__PURE__ */ (0,
|
|
2145
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2888
2146
|
] })
|
|
2889
2147
|
}
|
|
2890
2148
|
);
|
|
@@ -2892,9 +2150,9 @@ function SelectFieldTag({
|
|
|
2892
2150
|
|
|
2893
2151
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2894
2152
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2895
|
-
var
|
|
2153
|
+
var import_antd12 = require("antd");
|
|
2896
2154
|
var import_react9 = require("react");
|
|
2897
|
-
var
|
|
2155
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2898
2156
|
function SelectCustom({
|
|
2899
2157
|
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2900
2158
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2923,8 +2181,8 @@ function SelectCustom({
|
|
|
2923
2181
|
});
|
|
2924
2182
|
};
|
|
2925
2183
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2926
|
-
return /* @__PURE__ */ (0,
|
|
2927
|
-
|
|
2184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2185
|
+
import_antd12.ConfigProvider,
|
|
2928
2186
|
{
|
|
2929
2187
|
theme: {
|
|
2930
2188
|
token: {
|
|
@@ -2932,14 +2190,14 @@ function SelectCustom({
|
|
|
2932
2190
|
fontSize: 16
|
|
2933
2191
|
}
|
|
2934
2192
|
},
|
|
2935
|
-
children: /* @__PURE__ */ (0,
|
|
2936
|
-
/* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
2193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
|
|
2938
2196
|
" ",
|
|
2939
|
-
required && /* @__PURE__ */ (0,
|
|
2197
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2940
2198
|
] }),
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
2942
|
-
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2200
|
+
import_antd12.Select,
|
|
2943
2201
|
{
|
|
2944
2202
|
value,
|
|
2945
2203
|
onChange: handleChange,
|
|
@@ -2949,16 +2207,16 @@ function SelectCustom({
|
|
|
2949
2207
|
onClear
|
|
2950
2208
|
}
|
|
2951
2209
|
),
|
|
2952
|
-
error && /* @__PURE__ */ (0,
|
|
2953
|
-
/* @__PURE__ */ (0,
|
|
2954
|
-
/* @__PURE__ */ (0,
|
|
2955
|
-
/* @__PURE__ */ (0,
|
|
2210
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error }),
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { children: [
|
|
2956
2214
|
index + 1,
|
|
2957
2215
|
"."
|
|
2958
2216
|
] }),
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
2217
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { children: v })
|
|
2960
2218
|
] }),
|
|
2961
|
-
/* @__PURE__ */ (0,
|
|
2219
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2962
2220
|
] }, index)) })
|
|
2963
2221
|
] })
|
|
2964
2222
|
}
|
|
@@ -2966,7 +2224,7 @@ function SelectCustom({
|
|
|
2966
2224
|
}
|
|
2967
2225
|
|
|
2968
2226
|
// src/SortFilter/SortFilter.tsx
|
|
2969
|
-
var
|
|
2227
|
+
var import_antd13 = require("antd");
|
|
2970
2228
|
var import_icons3 = require("@ant-design/icons");
|
|
2971
2229
|
|
|
2972
2230
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2999,7 +2257,7 @@ var quarters = [
|
|
|
2999
2257
|
// src/SortFilter/SortFilter.tsx
|
|
3000
2258
|
var import_react10 = require("react");
|
|
3001
2259
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
3002
|
-
var
|
|
2260
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3003
2261
|
function SortFilter({
|
|
3004
2262
|
showYear = true,
|
|
3005
2263
|
showQuarter = true,
|
|
@@ -3010,20 +2268,20 @@ function SortFilter({
|
|
|
3010
2268
|
const [yearValue, setYearValue] = (0, import_react10.useState)();
|
|
3011
2269
|
const [monthValue, setMonthValue] = (0, import_react10.useState)();
|
|
3012
2270
|
const [quarterValue, setQuartersValue] = (0, import_react10.useState)();
|
|
3013
|
-
return /* @__PURE__ */ (0,
|
|
3014
|
-
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2272
|
+
import_antd13.ConfigProvider,
|
|
3015
2273
|
{
|
|
3016
2274
|
theme: {
|
|
3017
2275
|
token: {
|
|
3018
2276
|
fontFamily: "Kanit"
|
|
3019
2277
|
}
|
|
3020
2278
|
},
|
|
3021
|
-
children: /* @__PURE__ */ (0,
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3023
|
-
showYear && /* @__PURE__ */ (0,
|
|
2279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
2281
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3024
2282
|
SelectField,
|
|
3025
2283
|
{
|
|
3026
|
-
prefix: /* @__PURE__ */ (0,
|
|
2284
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
3027
2285
|
onChange: setYearValue,
|
|
3028
2286
|
options: years.map((s) => ({
|
|
3029
2287
|
value: s.value,
|
|
@@ -3033,10 +2291,10 @@ function SortFilter({
|
|
|
3033
2291
|
value: yearValue
|
|
3034
2292
|
}
|
|
3035
2293
|
) }),
|
|
3036
|
-
showMonth && /* @__PURE__ */ (0,
|
|
2294
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3037
2295
|
SelectField,
|
|
3038
2296
|
{
|
|
3039
|
-
prefix: /* @__PURE__ */ (0,
|
|
2297
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
3040
2298
|
onChange: setMonthValue,
|
|
3041
2299
|
options: months.map((s) => ({
|
|
3042
2300
|
value: s.value,
|
|
@@ -3046,10 +2304,10 @@ function SortFilter({
|
|
|
3046
2304
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
3047
2305
|
}
|
|
3048
2306
|
) }),
|
|
3049
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
2307
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3050
2308
|
SelectField,
|
|
3051
2309
|
{
|
|
3052
|
-
prefix: /* @__PURE__ */ (0,
|
|
2310
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons3.CalendarOutlined, {}),
|
|
3053
2311
|
onChange: setQuartersValue,
|
|
3054
2312
|
options: quarters.map((s) => ({
|
|
3055
2313
|
value: s.value,
|
|
@@ -3060,8 +2318,8 @@ function SortFilter({
|
|
|
3060
2318
|
}
|
|
3061
2319
|
) })
|
|
3062
2320
|
] }),
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
2322
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3065
2323
|
import_icons_react9.IconSortDescending,
|
|
3066
2324
|
{
|
|
3067
2325
|
size: 24,
|
|
@@ -3069,7 +2327,7 @@ function SortFilter({
|
|
|
3069
2327
|
onClick: onSortClick
|
|
3070
2328
|
}
|
|
3071
2329
|
),
|
|
3072
|
-
/* @__PURE__ */ (0,
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3073
2331
|
import_icons_react9.IconFilter,
|
|
3074
2332
|
{
|
|
3075
2333
|
size: 24,
|
|
@@ -3086,7 +2344,7 @@ function SortFilter({
|
|
|
3086
2344
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
3087
2345
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
3088
2346
|
var import_react11 = require("react");
|
|
3089
|
-
var
|
|
2347
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3090
2348
|
function FileUploader({
|
|
3091
2349
|
onUpload,
|
|
3092
2350
|
onError,
|
|
@@ -3157,10 +2415,10 @@ function FileUploader({
|
|
|
3157
2415
|
}
|
|
3158
2416
|
if (inputRef.current) inputRef.current.value = "";
|
|
3159
2417
|
};
|
|
3160
|
-
return /* @__PURE__ */ (0,
|
|
3161
|
-
label && /* @__PURE__ */ (0,
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3163
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
2418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-full", children: [
|
|
2419
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "body-1", children: label }),
|
|
2420
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2421
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3164
2422
|
"button",
|
|
3165
2423
|
{
|
|
3166
2424
|
type: "button",
|
|
@@ -3168,15 +2426,15 @@ function FileUploader({
|
|
|
3168
2426
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3169
2427
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3170
2428
|
disabled: disabled ? disabled : uploading,
|
|
3171
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3172
|
-
/* @__PURE__ */ (0,
|
|
2429
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Loader, { size: 15 }),
|
|
3173
2431
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3174
|
-
] }) : /* @__PURE__ */ (0,
|
|
3175
|
-
/* @__PURE__ */ (0,
|
|
2432
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3176
2434
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3177
2435
|
] })
|
|
3178
2436
|
}
|
|
3179
|
-
) : /* @__PURE__ */ (0,
|
|
2437
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3180
2438
|
"div",
|
|
3181
2439
|
{
|
|
3182
2440
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3190,17 +2448,17 @@ function FileUploader({
|
|
|
3190
2448
|
},
|
|
3191
2449
|
onDragLeave: () => setDragActive(false),
|
|
3192
2450
|
onDrop: handleDrop,
|
|
3193
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3194
|
-
/* @__PURE__ */ (0,
|
|
2451
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
2452
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Loader, { size: 15 }),
|
|
3195
2453
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3196
|
-
] }) : /* @__PURE__ */ (0,
|
|
3197
|
-
/* @__PURE__ */ (0,
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
3199
|
-
/* @__PURE__ */ (0,
|
|
2454
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react10.IconUpload, { size: 20 }),
|
|
2456
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
|
|
3200
2458
|
] })
|
|
3201
2459
|
}
|
|
3202
2460
|
),
|
|
3203
|
-
/* @__PURE__ */ (0,
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3204
2462
|
"input",
|
|
3205
2463
|
{
|
|
3206
2464
|
type: "file",
|
|
@@ -3213,13 +2471,13 @@ function FileUploader({
|
|
|
3213
2471
|
}
|
|
3214
2472
|
)
|
|
3215
2473
|
] }),
|
|
3216
|
-
description && /* @__PURE__ */ (0,
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3219
|
-
/* @__PURE__ */ (0,
|
|
3220
|
-
/* @__PURE__ */ (0,
|
|
2474
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: file.name })
|
|
3221
2479
|
] }),
|
|
3222
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3223
2481
|
import_icons_react10.IconTrash,
|
|
3224
2482
|
{
|
|
3225
2483
|
size: 20,
|
|
@@ -3253,9 +2511,9 @@ function messageLoading(content, duration) {
|
|
|
3253
2511
|
}
|
|
3254
2512
|
|
|
3255
2513
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3256
|
-
var
|
|
3257
|
-
var
|
|
3258
|
-
var
|
|
2514
|
+
var import_antd14 = require("antd");
|
|
2515
|
+
var import_antd15 = require("antd");
|
|
2516
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3259
2517
|
function Breadcrumbs({
|
|
3260
2518
|
items,
|
|
3261
2519
|
separator,
|
|
@@ -3263,16 +2521,16 @@ function Breadcrumbs({
|
|
|
3263
2521
|
classname,
|
|
3264
2522
|
params
|
|
3265
2523
|
}) {
|
|
3266
|
-
return /* @__PURE__ */ (0,
|
|
3267
|
-
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2525
|
+
import_antd14.ConfigProvider,
|
|
3268
2526
|
{
|
|
3269
2527
|
theme: {
|
|
3270
2528
|
token: {
|
|
3271
2529
|
fontFamily: "Kanit"
|
|
3272
2530
|
}
|
|
3273
2531
|
},
|
|
3274
|
-
children: /* @__PURE__ */ (0,
|
|
3275
|
-
|
|
2532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2533
|
+
import_antd15.Breadcrumb,
|
|
3276
2534
|
{
|
|
3277
2535
|
items,
|
|
3278
2536
|
separator,
|
|
@@ -3286,8 +2544,8 @@ function Breadcrumbs({
|
|
|
3286
2544
|
}
|
|
3287
2545
|
|
|
3288
2546
|
// src/HeadingPage/HeadingPage.tsx
|
|
3289
|
-
var
|
|
3290
|
-
var
|
|
2547
|
+
var import_antd16 = require("antd");
|
|
2548
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3291
2549
|
function HeadingPage({ Heading }) {
|
|
3292
2550
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3293
2551
|
weekday: "long",
|
|
@@ -3295,17 +2553,17 @@ function HeadingPage({ Heading }) {
|
|
|
3295
2553
|
month: "long",
|
|
3296
2554
|
year: "numeric"
|
|
3297
2555
|
});
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
-
|
|
2556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2557
|
+
import_antd16.ConfigProvider,
|
|
3300
2558
|
{
|
|
3301
2559
|
theme: {
|
|
3302
2560
|
token: {
|
|
3303
2561
|
fontFamily: "Kanit"
|
|
3304
2562
|
}
|
|
3305
2563
|
},
|
|
3306
|
-
children: /* @__PURE__ */ (0,
|
|
3307
|
-
/* @__PURE__ */ (0,
|
|
3308
|
-
/* @__PURE__ */ (0,
|
|
2564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "headline-5", children: Heading }),
|
|
2566
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "body-1", children: [
|
|
3309
2567
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3310
2568
|
today
|
|
3311
2569
|
] })
|
|
@@ -3315,9 +2573,9 @@ function HeadingPage({ Heading }) {
|
|
|
3315
2573
|
}
|
|
3316
2574
|
|
|
3317
2575
|
// src/Progress/ProgressBar.tsx
|
|
3318
|
-
var
|
|
2576
|
+
var import_antd17 = require("antd");
|
|
3319
2577
|
var import_react12 = require("react");
|
|
3320
|
-
var
|
|
2578
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3321
2579
|
function ProgressBar({
|
|
3322
2580
|
percent = 0,
|
|
3323
2581
|
size = "default",
|
|
@@ -3348,17 +2606,17 @@ function ProgressBar({
|
|
|
3348
2606
|
observer.observe(inner);
|
|
3349
2607
|
return () => observer.disconnect();
|
|
3350
2608
|
}, []);
|
|
3351
|
-
return /* @__PURE__ */ (0,
|
|
3352
|
-
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2610
|
+
import_antd17.ConfigProvider,
|
|
3353
2611
|
{
|
|
3354
2612
|
theme: {
|
|
3355
2613
|
token: {
|
|
3356
2614
|
fontFamily: "Kanit"
|
|
3357
2615
|
}
|
|
3358
2616
|
},
|
|
3359
|
-
children: /* @__PURE__ */ (0,
|
|
3360
|
-
/* @__PURE__ */ (0,
|
|
3361
|
-
|
|
2617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2619
|
+
import_antd17.Progress,
|
|
3362
2620
|
{
|
|
3363
2621
|
className: "w-full",
|
|
3364
2622
|
percent,
|
|
@@ -3373,7 +2631,7 @@ function ProgressBar({
|
|
|
3373
2631
|
strokeColor
|
|
3374
2632
|
}
|
|
3375
2633
|
),
|
|
3376
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
2634
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3377
2635
|
"div",
|
|
3378
2636
|
{
|
|
3379
2637
|
className: "checkpoint absolute top-0",
|
|
@@ -3395,7 +2653,7 @@ function ProgressBar({
|
|
|
3395
2653
|
}
|
|
3396
2654
|
|
|
3397
2655
|
// src/KpiSection/KpiSection.tsx
|
|
3398
|
-
var
|
|
2656
|
+
var import_antd18 = require("antd");
|
|
3399
2657
|
var import_react14 = require("react");
|
|
3400
2658
|
|
|
3401
2659
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3546,7 +2804,7 @@ function useGetKpiSection() {
|
|
|
3546
2804
|
|
|
3547
2805
|
// src/KpiSection/KpiSection.tsx
|
|
3548
2806
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3549
|
-
var
|
|
2807
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3550
2808
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3551
2809
|
const {
|
|
3552
2810
|
handleAddKpi,
|
|
@@ -3566,7 +2824,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3566
2824
|
itemErrors,
|
|
3567
2825
|
setItemErrors
|
|
3568
2826
|
} = useGetKpiSection();
|
|
3569
|
-
const [messageApi2, messageContainer] =
|
|
2827
|
+
const [messageApi2, messageContainer] = import_antd18.message.useMessage();
|
|
3570
2828
|
const [hasShownError, setHasShownError] = (0, import_react14.useState)(false);
|
|
3571
2829
|
(0, import_react14.useEffect)(() => {
|
|
3572
2830
|
setMessageApi(messageApi2);
|
|
@@ -3576,8 +2834,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3576
2834
|
onChangeKpiList(kpiList);
|
|
3577
2835
|
}
|
|
3578
2836
|
}, [kpiList]);
|
|
3579
|
-
return /* @__PURE__ */ (0,
|
|
3580
|
-
|
|
2837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2838
|
+
import_antd18.ConfigProvider,
|
|
3581
2839
|
{
|
|
3582
2840
|
theme: {
|
|
3583
2841
|
token: {
|
|
@@ -3585,11 +2843,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3585
2843
|
fontSize: 16
|
|
3586
2844
|
}
|
|
3587
2845
|
},
|
|
3588
|
-
children: /* @__PURE__ */ (0,
|
|
2846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "container-input", children: [
|
|
3589
2847
|
messageContainer,
|
|
3590
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3591
|
-
/* @__PURE__ */ (0,
|
|
3592
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
type === "number" && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-4", children: [
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3593
2851
|
InputField,
|
|
3594
2852
|
{
|
|
3595
2853
|
value: nameKpi,
|
|
@@ -3601,7 +2859,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3601
2859
|
error: errors.nameKpi
|
|
3602
2860
|
}
|
|
3603
2861
|
),
|
|
3604
|
-
/* @__PURE__ */ (0,
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3605
2863
|
InputField,
|
|
3606
2864
|
{
|
|
3607
2865
|
value: kpiValue,
|
|
@@ -3625,7 +2883,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3625
2883
|
error: errors.kpiValue
|
|
3626
2884
|
}
|
|
3627
2885
|
),
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3629
2887
|
InputField,
|
|
3630
2888
|
{
|
|
3631
2889
|
value: unitValue,
|
|
@@ -3637,7 +2895,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3637
2895
|
error: errors.unitValue
|
|
3638
2896
|
}
|
|
3639
2897
|
),
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3641
2899
|
import_icons_react11.IconCirclePlus,
|
|
3642
2900
|
{
|
|
3643
2901
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3646,17 +2904,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3646
2904
|
}
|
|
3647
2905
|
) })
|
|
3648
2906
|
] }),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3650
2908
|
"div",
|
|
3651
2909
|
{
|
|
3652
2910
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3653
2911
|
children: [
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3655
2913
|
index + 1,
|
|
3656
2914
|
"."
|
|
3657
2915
|
] }),
|
|
3658
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3659
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3660
2918
|
InputField,
|
|
3661
2919
|
{
|
|
3662
2920
|
value: kpi.name,
|
|
@@ -3666,7 +2924,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3666
2924
|
error: itemErrors[kpi.id]?.name
|
|
3667
2925
|
}
|
|
3668
2926
|
),
|
|
3669
|
-
/* @__PURE__ */ (0,
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3670
2928
|
InputField,
|
|
3671
2929
|
{
|
|
3672
2930
|
value: kpi.value?.toString(),
|
|
@@ -3691,7 +2949,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3691
2949
|
error: itemErrors[kpi.id]?.value
|
|
3692
2950
|
}
|
|
3693
2951
|
),
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
2952
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3695
2953
|
InputField,
|
|
3696
2954
|
{
|
|
3697
2955
|
value: kpi.unit,
|
|
@@ -3701,29 +2959,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3701
2959
|
error: itemErrors[kpi.id]?.unit
|
|
3702
2960
|
}
|
|
3703
2961
|
),
|
|
3704
|
-
/* @__PURE__ */ (0,
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3705
2963
|
"div",
|
|
3706
2964
|
{
|
|
3707
2965
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3708
2966
|
children: [
|
|
3709
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3710
2968
|
import_icons_react11.IconCheck,
|
|
3711
2969
|
{
|
|
3712
2970
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3713
2971
|
onClick: () => handleSave(kpi.id, type)
|
|
3714
2972
|
}
|
|
3715
2973
|
),
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
2974
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3717
2975
|
]
|
|
3718
2976
|
}
|
|
3719
2977
|
)
|
|
3720
|
-
] }) : /* @__PURE__ */ (0,
|
|
3721
|
-
/* @__PURE__ */ (0,
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3723
|
-
/* @__PURE__ */ (0,
|
|
3724
|
-
/* @__PURE__ */ (0,
|
|
3725
|
-
/* @__PURE__ */ (0,
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
2978
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "body-1", children: kpi.value }),
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "body-1", children: kpi.unit }),
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
2984
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3727
2985
|
] })
|
|
3728
2986
|
] })
|
|
3729
2987
|
]
|
|
@@ -3731,9 +2989,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3731
2989
|
kpi.id
|
|
3732
2990
|
)) })
|
|
3733
2991
|
] }),
|
|
3734
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3736
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
type === "text" && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-4", children: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3737
2995
|
InputField,
|
|
3738
2996
|
{
|
|
3739
2997
|
value: nameKpi,
|
|
@@ -3745,7 +3003,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3745
3003
|
error: errors.nameKpi
|
|
3746
3004
|
}
|
|
3747
3005
|
),
|
|
3748
|
-
/* @__PURE__ */ (0,
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3749
3007
|
import_icons_react11.IconCirclePlus,
|
|
3750
3008
|
{
|
|
3751
3009
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3754,13 +3012,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3754
3012
|
}
|
|
3755
3013
|
) })
|
|
3756
3014
|
] }),
|
|
3757
|
-
/* @__PURE__ */ (0,
|
|
3758
|
-
/* @__PURE__ */ (0,
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3759
3017
|
index + 1,
|
|
3760
3018
|
"."
|
|
3761
3019
|
] }),
|
|
3762
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3020
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3764
3022
|
InputField,
|
|
3765
3023
|
{
|
|
3766
3024
|
value: kpi.name,
|
|
@@ -3770,27 +3028,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3770
3028
|
error: itemErrors[kpi.id]?.name
|
|
3771
3029
|
}
|
|
3772
3030
|
),
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3774
3032
|
"div",
|
|
3775
3033
|
{
|
|
3776
3034
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3777
3035
|
children: [
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3779
3037
|
import_icons_react11.IconCheck,
|
|
3780
3038
|
{
|
|
3781
3039
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3782
3040
|
onClick: () => handleSave(kpi.id, type)
|
|
3783
3041
|
}
|
|
3784
3042
|
),
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3043
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3786
3044
|
]
|
|
3787
3045
|
}
|
|
3788
3046
|
)
|
|
3789
|
-
] }) : /* @__PURE__ */ (0,
|
|
3790
|
-
/* @__PURE__ */ (0,
|
|
3791
|
-
/* @__PURE__ */ (0,
|
|
3792
|
-
/* @__PURE__ */ (0,
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3047
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3048
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3794
3052
|
] })
|
|
3795
3053
|
] })
|
|
3796
3054
|
] }, kpi.id)) })
|
|
@@ -3801,17 +3059,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3801
3059
|
}
|
|
3802
3060
|
|
|
3803
3061
|
// src/Modal/Modal/Modal.tsx
|
|
3804
|
-
var
|
|
3805
|
-
var
|
|
3062
|
+
var import_antd19 = require("antd");
|
|
3063
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3806
3064
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3807
|
-
return /* @__PURE__ */ (0,
|
|
3065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_antd19.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children }) }) });
|
|
3808
3066
|
}
|
|
3809
3067
|
|
|
3810
3068
|
// src/Indicator/Indicator/Indicator.tsx
|
|
3811
3069
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
3812
3070
|
var import_react15 = require("react");
|
|
3813
|
-
var
|
|
3814
|
-
var
|
|
3071
|
+
var import_antd20 = require("antd");
|
|
3072
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3815
3073
|
function Indicator({
|
|
3816
3074
|
option = [
|
|
3817
3075
|
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
@@ -3893,14 +3151,14 @@ function Indicator({
|
|
|
3893
3151
|
}));
|
|
3894
3152
|
console.log(cacheEditData);
|
|
3895
3153
|
};
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3897
|
-
/* @__PURE__ */ (0,
|
|
3154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-full", children: [
|
|
3155
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3898
3156
|
"div",
|
|
3899
3157
|
{
|
|
3900
3158
|
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3901
3159
|
children: [
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3903
|
-
/* @__PURE__ */ (0,
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
|
|
3161
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3904
3162
|
InputField,
|
|
3905
3163
|
{
|
|
3906
3164
|
label: `\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
@@ -3911,8 +3169,8 @@ function Indicator({
|
|
|
3911
3169
|
required: true
|
|
3912
3170
|
}
|
|
3913
3171
|
),
|
|
3914
|
-
valueSwitch === "NUMBER" && /* @__PURE__ */ (0,
|
|
3915
|
-
/* @__PURE__ */ (0,
|
|
3172
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3916
3174
|
InputFieldNumber,
|
|
3917
3175
|
{
|
|
3918
3176
|
label: `\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
@@ -3923,7 +3181,7 @@ function Indicator({
|
|
|
3923
3181
|
required: true
|
|
3924
3182
|
}
|
|
3925
3183
|
),
|
|
3926
|
-
/* @__PURE__ */ (0,
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3927
3185
|
InputField,
|
|
3928
3186
|
{
|
|
3929
3187
|
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
@@ -3935,18 +3193,18 @@ function Indicator({
|
|
|
3935
3193
|
}
|
|
3936
3194
|
)
|
|
3937
3195
|
] }),
|
|
3938
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react12.IconCirclePlus, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
|
|
3939
3197
|
]
|
|
3940
3198
|
}
|
|
3941
3199
|
),
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: arrayData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3943
3201
|
"div",
|
|
3944
3202
|
{
|
|
3945
3203
|
className: `space-y-4 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3946
3204
|
children: [
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
3948
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
3949
|
-
|
|
3205
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
3206
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3207
|
+
import_antd20.Input,
|
|
3950
3208
|
{
|
|
3951
3209
|
className: "body-1 mt-2",
|
|
3952
3210
|
variant: "underlined",
|
|
@@ -3954,10 +3212,10 @@ function Indicator({
|
|
|
3954
3212
|
name: "textValue",
|
|
3955
3213
|
onChange: (e) => handleChangeEditCashData(e)
|
|
3956
3214
|
}
|
|
3957
|
-
) : /* @__PURE__ */ (0,
|
|
3958
|
-
item.inputType === "NUMBER" && /* @__PURE__ */ (0,
|
|
3959
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
3960
|
-
|
|
3215
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
3216
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3217
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3218
|
+
import_antd20.Input,
|
|
3961
3219
|
{
|
|
3962
3220
|
className: "body-1 mt-2",
|
|
3963
3221
|
variant: "underlined",
|
|
@@ -3965,9 +3223,9 @@ function Indicator({
|
|
|
3965
3223
|
name: "numberValue",
|
|
3966
3224
|
onChange: (e) => handleChangeEditCashData(e)
|
|
3967
3225
|
}
|
|
3968
|
-
) : /* @__PURE__ */ (0,
|
|
3969
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
3970
|
-
|
|
3226
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
3227
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3228
|
+
import_antd20.Input,
|
|
3971
3229
|
{
|
|
3972
3230
|
className: "body-1 mt-2",
|
|
3973
3231
|
variant: "underlined",
|
|
@@ -3975,19 +3233,19 @@ function Indicator({
|
|
|
3975
3233
|
name: "unit",
|
|
3976
3234
|
onChange: (e) => handleChangeEditCashData(e)
|
|
3977
3235
|
}
|
|
3978
|
-
) : /* @__PURE__ */ (0,
|
|
3236
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2", children: item.unit })
|
|
3979
3237
|
] }),
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
3981
|
-
/* @__PURE__ */ (0,
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex", children: [
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3982
3240
|
import_icons_react12.IconCheck,
|
|
3983
3241
|
{
|
|
3984
3242
|
className: "cursor-pointer text-green-600",
|
|
3985
3243
|
onClick: () => handleConfirmEditIndicator(index)
|
|
3986
3244
|
}
|
|
3987
3245
|
),
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
3989
|
-
] }) : void 0 : /* @__PURE__ */ (0,
|
|
3990
|
-
/* @__PURE__ */ (0,
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react12.IconX, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
|
|
3247
|
+
] }) : void 0 : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react12.IconPencil, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_react12.IconTrash, { onClick: () => handleDeleteIndicator(index) }) })
|
|
3991
3249
|
]
|
|
3992
3250
|
}
|
|
3993
3251
|
)) })
|
|
@@ -3997,7 +3255,7 @@ function Indicator({
|
|
|
3997
3255
|
// src/FilterPopUp/FilterPopUp.tsx
|
|
3998
3256
|
var import_icons_react13 = require("@tabler/icons-react");
|
|
3999
3257
|
var import_react16 = require("react");
|
|
4000
|
-
var
|
|
3258
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4001
3259
|
var FilterPopUp = (filter) => {
|
|
4002
3260
|
const [isAction, setIsAction] = (0, import_react16.useState)(true);
|
|
4003
3261
|
const [filterArray, setFilterArray] = (0, import_react16.useState)([""]);
|
|
@@ -4007,20 +3265,20 @@ var FilterPopUp = (filter) => {
|
|
|
4007
3265
|
const handleSubmitFilter = () => {
|
|
4008
3266
|
filter.handleSearch(filterArray);
|
|
4009
3267
|
};
|
|
4010
|
-
return /* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
3268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative", children: [
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
3270
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react13.IconFilter, {}),
|
|
4013
3271
|
"filter"
|
|
4014
3272
|
] }),
|
|
4015
|
-
isAction ? /* @__PURE__ */ (0,
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
4017
|
-
/* @__PURE__ */ (0,
|
|
4018
|
-
/* @__PURE__ */ (0,
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
3273
|
+
isAction ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
3274
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-end", children: [
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react13.IconCheck, {}) }),
|
|
3277
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react13.IconTrash, {}) })
|
|
4020
3278
|
] }),
|
|
4021
3279
|
""
|
|
4022
3280
|
] }),
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
3281
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4024
3282
|
SelectCustom,
|
|
4025
3283
|
{
|
|
4026
3284
|
options: filter.selectionFilter,
|
|
@@ -4042,8 +3300,6 @@ var FilterPopUp = (filter) => {
|
|
|
4042
3300
|
ColorPalettePickerBasic,
|
|
4043
3301
|
ColorPickerBasic,
|
|
4044
3302
|
DataTable,
|
|
4045
|
-
DatePickerBasic,
|
|
4046
|
-
DatePickerRangePicker,
|
|
4047
3303
|
FileUploader,
|
|
4048
3304
|
FilterPopUp,
|
|
4049
3305
|
GhostButton,
|
|
@@ -4072,8 +3328,6 @@ var FilterPopUp = (filter) => {
|
|
|
4072
3328
|
TabSelectionButton,
|
|
4073
3329
|
TextAreaInput,
|
|
4074
3330
|
TextInput,
|
|
4075
|
-
TimePickerBasic,
|
|
4076
|
-
TimePickerRangePicker,
|
|
4077
3331
|
TopNavBar,
|
|
4078
3332
|
messageError,
|
|
4079
3333
|
messageInfo,
|