@esic-lab/data-core-ui 0.0.24 → 0.0.26
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.css +0 -7
- package/dist/index.d.mts +97 -526
- package/dist/index.d.ts +97 -526
- package/dist/index.js +508 -557
- package/dist/index.mjs +488 -538
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -311,6 +311,28 @@ var require_dayjs_min = __commonJS({
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
|
|
314
|
+
// node_modules/dayjs/plugin/buddhistEra.js
|
|
315
|
+
var require_buddhistEra = __commonJS({
|
|
316
|
+
"node_modules/dayjs/plugin/buddhistEra.js"(exports2, module2) {
|
|
317
|
+
"use strict";
|
|
318
|
+
!(function(t, e) {
|
|
319
|
+
"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();
|
|
320
|
+
})(exports2, (function() {
|
|
321
|
+
"use strict";
|
|
322
|
+
return function(t, e) {
|
|
323
|
+
var n = e.prototype, i = n.format;
|
|
324
|
+
n.format = function(t2) {
|
|
325
|
+
var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
|
|
326
|
+
var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
|
|
327
|
+
return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
|
|
328
|
+
}));
|
|
329
|
+
return i.bind(this)(n2);
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
}));
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
314
336
|
// node_modules/dayjs/locale/th.js
|
|
315
337
|
var require_th = __commonJS({
|
|
316
338
|
"node_modules/dayjs/locale/th.js"(exports2, module2) {
|
|
@@ -330,134 +352,6 @@ var require_th = __commonJS({
|
|
|
330
352
|
}
|
|
331
353
|
});
|
|
332
354
|
|
|
333
|
-
// node_modules/dayjs/plugin/customParseFormat.js
|
|
334
|
-
var require_customParseFormat = __commonJS({
|
|
335
|
-
"node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) {
|
|
336
|
-
"use strict";
|
|
337
|
-
!(function(e, t) {
|
|
338
|
-
"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();
|
|
339
|
-
})(exports2, (function() {
|
|
340
|
-
"use strict";
|
|
341
|
-
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) {
|
|
342
|
-
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
343
|
-
};
|
|
344
|
-
var f = function(e2) {
|
|
345
|
-
return function(t2) {
|
|
346
|
-
this[e2] = +t2;
|
|
347
|
-
};
|
|
348
|
-
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
349
|
-
(this.zone || (this.zone = {})).offset = (function(e3) {
|
|
350
|
-
if (!e3) return 0;
|
|
351
|
-
if ("Z" === e3) return 0;
|
|
352
|
-
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
353
|
-
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
354
|
-
})(e2);
|
|
355
|
-
}], u = function(e2) {
|
|
356
|
-
var t2 = s[e2];
|
|
357
|
-
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
358
|
-
}, d = function(e2, t2) {
|
|
359
|
-
var n2, r2 = s.meridiem;
|
|
360
|
-
if (r2) {
|
|
361
|
-
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
362
|
-
n2 = i2 > 12;
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
366
|
-
return n2;
|
|
367
|
-
}, c = { A: [o, function(e2) {
|
|
368
|
-
this.afternoon = d(e2, false);
|
|
369
|
-
}], a: [o, function(e2) {
|
|
370
|
-
this.afternoon = d(e2, true);
|
|
371
|
-
}], Q: [n, function(e2) {
|
|
372
|
-
this.month = 3 * (e2 - 1) + 1;
|
|
373
|
-
}], S: [n, function(e2) {
|
|
374
|
-
this.milliseconds = 100 * +e2;
|
|
375
|
-
}], SS: [r, function(e2) {
|
|
376
|
-
this.milliseconds = 10 * +e2;
|
|
377
|
-
}], SSS: [/\d{3}/, function(e2) {
|
|
378
|
-
this.milliseconds = +e2;
|
|
379
|
-
}], 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) {
|
|
380
|
-
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
381
|
-
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
382
|
-
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
383
|
-
var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
|
|
384
|
-
return e3.slice(0, 3);
|
|
385
|
-
}))).indexOf(e2) + 1;
|
|
386
|
-
if (n2 < 1) throw new Error();
|
|
387
|
-
this.month = n2 % 12 || n2;
|
|
388
|
-
}], MMMM: [o, function(e2) {
|
|
389
|
-
var t2 = u("months").indexOf(e2) + 1;
|
|
390
|
-
if (t2 < 1) throw new Error();
|
|
391
|
-
this.month = t2 % 12 || t2;
|
|
392
|
-
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
393
|
-
this.year = a(e2);
|
|
394
|
-
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
395
|
-
function l(n2) {
|
|
396
|
-
var r2, i2;
|
|
397
|
-
r2 = n2, i2 = s && s.formats;
|
|
398
|
-
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
|
|
399
|
-
var o3 = r3 && r3.toUpperCase();
|
|
400
|
-
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
|
|
401
|
-
return t3 || n4.slice(1);
|
|
402
|
-
}));
|
|
403
|
-
}))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
404
|
-
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
405
|
-
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
406
|
-
}
|
|
407
|
-
return function(e2) {
|
|
408
|
-
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
409
|
-
var i3 = o2[n3];
|
|
410
|
-
if ("string" == typeof i3) r3 += i3.length;
|
|
411
|
-
else {
|
|
412
|
-
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
413
|
-
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
return (function(e3) {
|
|
417
|
-
var t3 = e3.afternoon;
|
|
418
|
-
if (void 0 !== t3) {
|
|
419
|
-
var n4 = e3.hours;
|
|
420
|
-
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
421
|
-
}
|
|
422
|
-
})(t2), t2;
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
return function(e2, t2, n2) {
|
|
426
|
-
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
427
|
-
var r2 = t2.prototype, i2 = r2.parse;
|
|
428
|
-
r2.parse = function(e3) {
|
|
429
|
-
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
430
|
-
this.$u = r3;
|
|
431
|
-
var a2 = o2[1];
|
|
432
|
-
if ("string" == typeof a2) {
|
|
433
|
-
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
434
|
-
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) {
|
|
435
|
-
try {
|
|
436
|
-
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
437
|
-
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;
|
|
438
|
-
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
439
|
-
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
440
|
-
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);
|
|
441
|
-
} catch (e5) {
|
|
442
|
-
return /* @__PURE__ */ new Date("");
|
|
443
|
-
}
|
|
444
|
-
})(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 = {};
|
|
445
|
-
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
446
|
-
o2[1] = a2[m - 1];
|
|
447
|
-
var M = n2.apply(this, o2);
|
|
448
|
-
if (M.isValid()) {
|
|
449
|
-
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
450
|
-
break;
|
|
451
|
-
}
|
|
452
|
-
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
453
|
-
}
|
|
454
|
-
else i2.call(this, e3);
|
|
455
|
-
};
|
|
456
|
-
};
|
|
457
|
-
}));
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
|
|
461
355
|
// src/index.ts
|
|
462
356
|
var index_exports = {};
|
|
463
357
|
__export(index_exports, {
|
|
@@ -475,6 +369,7 @@ __export(index_exports, {
|
|
|
475
369
|
GhostButton: () => GhostButton,
|
|
476
370
|
HeadingPage: () => HeadingPage,
|
|
477
371
|
InputField: () => InputField,
|
|
372
|
+
InputFieldNumber: () => InputFieldNumber,
|
|
478
373
|
KpiSection: () => KpiSection,
|
|
479
374
|
Loader: () => Loader,
|
|
480
375
|
MenuNavBar: () => MenuNavBar,
|
|
@@ -1127,13 +1022,13 @@ function TextInput({
|
|
|
1127
1022
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
1128
1023
|
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1129
1024
|
label,
|
|
1130
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-red-
|
|
1025
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-red-500", children: "\xA0*" })
|
|
1131
1026
|
] }),
|
|
1132
1027
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1133
1028
|
"div",
|
|
1134
1029
|
{
|
|
1135
1030
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1136
|
-
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-
|
|
1031
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1137
1032
|
children: [
|
|
1138
1033
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1139
1034
|
"input",
|
|
@@ -1152,23 +1047,21 @@ function TextInput({
|
|
|
1152
1047
|
]
|
|
1153
1048
|
}
|
|
1154
1049
|
),
|
|
1155
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-red-
|
|
1050
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1156
1051
|
] });
|
|
1157
1052
|
}
|
|
1158
1053
|
|
|
1159
|
-
// src/InputField/InputField.tsx
|
|
1054
|
+
// src/Input/InputField/InputField.tsx
|
|
1160
1055
|
var import_antd2 = require("antd");
|
|
1161
1056
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1162
1057
|
function InputField({
|
|
1163
1058
|
value,
|
|
1164
1059
|
onChange,
|
|
1165
1060
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
bottomText,
|
|
1061
|
+
label,
|
|
1062
|
+
required,
|
|
1169
1063
|
disabled,
|
|
1170
|
-
|
|
1171
|
-
errorMessage,
|
|
1064
|
+
error,
|
|
1172
1065
|
addonBefore,
|
|
1173
1066
|
addonAfter,
|
|
1174
1067
|
defaultValue,
|
|
@@ -1185,9 +1078,9 @@ function InputField({
|
|
|
1185
1078
|
},
|
|
1186
1079
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "container-input", children: [
|
|
1187
1080
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1188
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "body-1", children:
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "body-1", children: label }),
|
|
1189
1082
|
" ",
|
|
1190
|
-
|
|
1083
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1191
1084
|
] }),
|
|
1192
1085
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1193
1086
|
import_antd2.Input,
|
|
@@ -1204,11 +1097,7 @@ function InputField({
|
|
|
1204
1097
|
onClear
|
|
1205
1098
|
}
|
|
1206
1099
|
),
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
1208
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1209
|
-
" ",
|
|
1210
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1211
|
-
] })
|
|
1100
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1212
1101
|
] })
|
|
1213
1102
|
}
|
|
1214
1103
|
);
|
|
@@ -1263,46 +1152,107 @@ function TextAreaInput({
|
|
|
1263
1152
|
disabled
|
|
1264
1153
|
}
|
|
1265
1154
|
),
|
|
1266
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-red-
|
|
1155
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1267
1156
|
] })
|
|
1268
1157
|
}
|
|
1269
1158
|
) });
|
|
1270
1159
|
}
|
|
1271
1160
|
|
|
1272
|
-
// src/
|
|
1161
|
+
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1273
1162
|
var import_antd4 = require("antd");
|
|
1274
1163
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1275
|
-
function
|
|
1164
|
+
function InputFieldNumber({
|
|
1276
1165
|
value,
|
|
1277
1166
|
onChange,
|
|
1278
|
-
|
|
1167
|
+
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1279
1168
|
title,
|
|
1280
|
-
|
|
1281
|
-
showError,
|
|
1282
|
-
errorMessage,
|
|
1169
|
+
required,
|
|
1283
1170
|
disabled,
|
|
1284
|
-
|
|
1285
|
-
|
|
1171
|
+
error,
|
|
1172
|
+
addonBefore,
|
|
1173
|
+
addonAfter,
|
|
1174
|
+
defaultValue,
|
|
1286
1175
|
className,
|
|
1287
|
-
|
|
1176
|
+
max,
|
|
1177
|
+
min,
|
|
1178
|
+
controls,
|
|
1179
|
+
size,
|
|
1180
|
+
changeOnWheel,
|
|
1181
|
+
formatter,
|
|
1182
|
+
parser
|
|
1288
1183
|
}) {
|
|
1289
1184
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1290
1185
|
import_antd4.ConfigProvider,
|
|
1291
1186
|
{
|
|
1292
1187
|
theme: {
|
|
1293
1188
|
token: {
|
|
1294
|
-
fontFamily: "Kanit"
|
|
1295
|
-
fontSize: 16
|
|
1189
|
+
fontFamily: "Kanit"
|
|
1296
1190
|
}
|
|
1297
1191
|
},
|
|
1298
1192
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "container-input", children: [
|
|
1299
1193
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
1300
1194
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "body-1", children: title }),
|
|
1301
1195
|
" ",
|
|
1302
|
-
|
|
1196
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1303
1197
|
] }),
|
|
1304
1198
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1305
|
-
import_antd4.
|
|
1199
|
+
import_antd4.InputNumber,
|
|
1200
|
+
{
|
|
1201
|
+
value: value ?? void 0,
|
|
1202
|
+
onChange: (val) => onChange(val),
|
|
1203
|
+
placeholder,
|
|
1204
|
+
disabled,
|
|
1205
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1206
|
+
addonBefore,
|
|
1207
|
+
addonAfter,
|
|
1208
|
+
defaultValue,
|
|
1209
|
+
max,
|
|
1210
|
+
min,
|
|
1211
|
+
controls,
|
|
1212
|
+
size,
|
|
1213
|
+
changeOnWheel,
|
|
1214
|
+
formatter,
|
|
1215
|
+
parser
|
|
1216
|
+
}
|
|
1217
|
+
),
|
|
1218
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1219
|
+
] })
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
// src/ColorPicker/ColorPicker.tsx
|
|
1225
|
+
var import_antd5 = require("antd");
|
|
1226
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1227
|
+
function ColorPickerBasic({
|
|
1228
|
+
value,
|
|
1229
|
+
onChange,
|
|
1230
|
+
required,
|
|
1231
|
+
label,
|
|
1232
|
+
error,
|
|
1233
|
+
disabled,
|
|
1234
|
+
allowClear,
|
|
1235
|
+
defaultFormat,
|
|
1236
|
+
className,
|
|
1237
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1238
|
+
}) {
|
|
1239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1240
|
+
import_antd5.ConfigProvider,
|
|
1241
|
+
{
|
|
1242
|
+
theme: {
|
|
1243
|
+
token: {
|
|
1244
|
+
fontFamily: "Kanit",
|
|
1245
|
+
fontSize: 16
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "container-input", children: [
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "body-1", children: label }),
|
|
1251
|
+
" ",
|
|
1252
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1253
|
+
] }),
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1255
|
+
import_antd5.ColorPicker,
|
|
1306
1256
|
{
|
|
1307
1257
|
defaultFormat,
|
|
1308
1258
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1313,9 +1263,9 @@ function ColorPickerBasic({
|
|
|
1313
1263
|
showText: (color) => {
|
|
1314
1264
|
const hex = color.toHexString();
|
|
1315
1265
|
if (!value) {
|
|
1316
|
-
return /* @__PURE__ */ (0,
|
|
1266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: placeholder });
|
|
1317
1267
|
}
|
|
1318
|
-
return /* @__PURE__ */ (0,
|
|
1268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
|
|
1319
1269
|
"(",
|
|
1320
1270
|
hex,
|
|
1321
1271
|
")"
|
|
@@ -1324,30 +1274,42 @@ function ColorPickerBasic({
|
|
|
1324
1274
|
disabled
|
|
1325
1275
|
}
|
|
1326
1276
|
),
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1329
|
-
" ",
|
|
1330
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1331
|
-
] })
|
|
1277
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1332
1278
|
] })
|
|
1333
1279
|
}
|
|
1334
1280
|
);
|
|
1335
1281
|
}
|
|
1336
1282
|
|
|
1337
1283
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1338
|
-
var
|
|
1284
|
+
var import_antd6 = require("antd");
|
|
1285
|
+
var import_th_TH2 = __toESM(require("antd/locale/th_TH"));
|
|
1339
1286
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1340
|
-
var
|
|
1341
|
-
var
|
|
1342
|
-
var
|
|
1287
|
+
var import_date_fns = require("date-fns");
|
|
1288
|
+
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
1289
|
+
var import_locale = require("date-fns/locale");
|
|
1290
|
+
|
|
1291
|
+
// src/DatePicker/convertToBuddhist.ts
|
|
1292
|
+
var import_th_TH = __toESM(require("antd/es/date-picker/locale/th_TH"));
|
|
1293
|
+
var buddhistLocale = {
|
|
1294
|
+
...import_th_TH.default,
|
|
1295
|
+
lang: {
|
|
1296
|
+
...import_th_TH.default.lang,
|
|
1297
|
+
fieldDateFormat: "BBBB-MM-DD",
|
|
1298
|
+
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1299
|
+
yearFormat: "BBBB",
|
|
1300
|
+
cellYearFormat: "BBBB"
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1305
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1306
|
+
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1343
1307
|
function DatePickerBasic({
|
|
1344
1308
|
value,
|
|
1345
1309
|
onChange,
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
showError,
|
|
1350
|
-
errorMessage,
|
|
1310
|
+
required,
|
|
1311
|
+
label,
|
|
1312
|
+
error,
|
|
1351
1313
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1352
1314
|
disabled,
|
|
1353
1315
|
defaultValue,
|
|
@@ -1357,68 +1319,67 @@ function DatePickerBasic({
|
|
|
1357
1319
|
className,
|
|
1358
1320
|
size
|
|
1359
1321
|
}) {
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1363
|
-
import_antd5.ConfigProvider,
|
|
1322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1323
|
+
import_antd6.ConfigProvider,
|
|
1364
1324
|
{
|
|
1365
|
-
locale:
|
|
1325
|
+
locale: import_th_TH2.default,
|
|
1366
1326
|
theme: {
|
|
1367
1327
|
token: {
|
|
1368
1328
|
fontFamily: "Kanit",
|
|
1369
1329
|
fontSize: 16
|
|
1370
1330
|
}
|
|
1371
1331
|
},
|
|
1372
|
-
children: /* @__PURE__ */ (0,
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
" ",
|
|
1376
|
-
require2 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "container-input", children: [
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "body-1", children: label }),
|
|
1335
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1377
1336
|
] }),
|
|
1378
|
-
/* @__PURE__ */ (0,
|
|
1379
|
-
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1338
|
+
import_antd6.DatePicker,
|
|
1380
1339
|
{
|
|
1381
1340
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1382
|
-
value,
|
|
1341
|
+
value: value ? (0, import_dayjs.default)(value) : null,
|
|
1383
1342
|
placeholder,
|
|
1384
|
-
onChange
|
|
1343
|
+
onChange: (date) => {
|
|
1344
|
+
onChange(date ? date.toDate() : null);
|
|
1345
|
+
},
|
|
1385
1346
|
allowClear: true,
|
|
1386
1347
|
disabled,
|
|
1387
|
-
format:
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1348
|
+
format: (date) => date ? (0, import_date_fns.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale.th }).replace(
|
|
1349
|
+
/\d{4}$/,
|
|
1350
|
+
(y) => String(parseInt(y) + 543)
|
|
1351
|
+
) : "",
|
|
1352
|
+
defaultValue: defaultValue ? (0, import_dayjs.default)(defaultValue) : null,
|
|
1353
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1354
|
+
minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
|
|
1355
|
+
maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
|
|
1356
|
+
size,
|
|
1357
|
+
locale: buddhistLocale
|
|
1393
1358
|
}
|
|
1394
1359
|
),
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1396
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1397
|
-
" ",
|
|
1398
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1399
|
-
] })
|
|
1360
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1400
1361
|
] })
|
|
1401
1362
|
}
|
|
1402
1363
|
);
|
|
1403
1364
|
}
|
|
1404
1365
|
|
|
1405
1366
|
// src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
|
|
1406
|
-
var
|
|
1407
|
-
var
|
|
1408
|
-
var
|
|
1409
|
-
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1367
|
+
var import_antd7 = require("antd");
|
|
1368
|
+
var import_th_TH3 = __toESM(require("antd/locale/th_TH"));
|
|
1369
|
+
var import_th2 = __toESM(require_th());
|
|
1410
1370
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1411
|
-
var
|
|
1412
|
-
|
|
1371
|
+
var import_buddhistEra2 = __toESM(require_buddhistEra());
|
|
1372
|
+
var import_date_fns2 = require("date-fns");
|
|
1373
|
+
var import_locale2 = require("date-fns/locale");
|
|
1374
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1375
|
+
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1413
1376
|
function DatePickerRangePicker({
|
|
1414
1377
|
value,
|
|
1415
1378
|
onChange,
|
|
1416
1379
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
showError,
|
|
1421
|
-
errorMessage,
|
|
1380
|
+
label,
|
|
1381
|
+
required,
|
|
1382
|
+
error,
|
|
1422
1383
|
disabled,
|
|
1423
1384
|
minDate,
|
|
1424
1385
|
maxDate,
|
|
@@ -1428,145 +1389,188 @@ function DatePickerRangePicker({
|
|
|
1428
1389
|
onOpenChange,
|
|
1429
1390
|
onCalendarChange
|
|
1430
1391
|
}) {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1434
|
-
import_antd6.ConfigProvider,
|
|
1392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1393
|
+
import_antd7.ConfigProvider,
|
|
1435
1394
|
{
|
|
1436
|
-
locale:
|
|
1395
|
+
locale: import_th_TH3.default,
|
|
1437
1396
|
theme: {
|
|
1438
1397
|
token: {
|
|
1439
1398
|
fontFamily: "Kanit",
|
|
1440
1399
|
fontSize: 16
|
|
1441
1400
|
}
|
|
1442
1401
|
},
|
|
1443
|
-
children: /* @__PURE__ */ (0,
|
|
1444
|
-
/* @__PURE__ */ (0,
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "container-input", children: [
|
|
1403
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "body-1", children: label }),
|
|
1446
1405
|
" ",
|
|
1447
|
-
|
|
1406
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1448
1407
|
] }),
|
|
1449
|
-
/* @__PURE__ */ (0,
|
|
1450
|
-
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1409
|
+
import_antd7.DatePicker.RangePicker,
|
|
1451
1410
|
{
|
|
1452
|
-
format:
|
|
1453
|
-
|
|
1411
|
+
format: (date) => date ? (0, import_date_fns2.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale2.th }).replace(
|
|
1412
|
+
/\d{4}$/,
|
|
1413
|
+
(y) => String(parseInt(y) + 543)
|
|
1414
|
+
) : "",
|
|
1415
|
+
value: value ? [
|
|
1416
|
+
value[0] ? (0, import_dayjs2.default)(value[0]) : null,
|
|
1417
|
+
value[1] ? (0, import_dayjs2.default)(value[1]) : null
|
|
1418
|
+
] : null,
|
|
1454
1419
|
placeholder,
|
|
1455
1420
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1456
|
-
onChange,
|
|
1421
|
+
onChange: (dates, dateStrings) => {
|
|
1422
|
+
if (!dates) {
|
|
1423
|
+
onChange(null);
|
|
1424
|
+
} else {
|
|
1425
|
+
onChange([
|
|
1426
|
+
dates[0] ? dates[0].toDate() : null,
|
|
1427
|
+
dates[1] ? dates[1].toDate() : null
|
|
1428
|
+
]);
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1457
1431
|
allowClear: true,
|
|
1458
1432
|
disabled,
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1433
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1434
|
+
minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
|
|
1435
|
+
maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
|
|
1462
1436
|
size,
|
|
1463
1437
|
onOpenChange,
|
|
1464
|
-
onCalendarChange
|
|
1438
|
+
onCalendarChange: (dates, dateStrings, info) => {
|
|
1439
|
+
if (!dates) {
|
|
1440
|
+
onCalendarChange?.([null, null], dateStrings, info);
|
|
1441
|
+
} else {
|
|
1442
|
+
onCalendarChange?.(
|
|
1443
|
+
[
|
|
1444
|
+
dates[0] ? dates[0].toDate() : null,
|
|
1445
|
+
dates[1] ? dates[1].toDate() : null
|
|
1446
|
+
],
|
|
1447
|
+
dateStrings,
|
|
1448
|
+
info
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
locale: buddhistLocale
|
|
1465
1453
|
}
|
|
1466
1454
|
),
|
|
1467
|
-
/* @__PURE__ */ (0,
|
|
1468
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1469
|
-
" ",
|
|
1470
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1471
|
-
] })
|
|
1455
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1472
1456
|
] })
|
|
1473
1457
|
}
|
|
1474
1458
|
);
|
|
1475
1459
|
}
|
|
1476
1460
|
|
|
1477
1461
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1478
|
-
var
|
|
1479
|
-
var
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1462
|
+
var import_antd8 = require("antd");
|
|
1463
|
+
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1464
|
+
var import_th_TH4 = __toESM(require("antd/locale/th_TH"));
|
|
1465
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1466
|
+
function TimePickerBasic({
|
|
1467
|
+
value,
|
|
1468
|
+
onChange,
|
|
1469
|
+
required,
|
|
1470
|
+
label,
|
|
1471
|
+
error,
|
|
1472
|
+
placeholder,
|
|
1473
|
+
disabled,
|
|
1474
|
+
className
|
|
1475
|
+
}) {
|
|
1476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1477
|
+
import_antd8.ConfigProvider,
|
|
1483
1478
|
{
|
|
1479
|
+
locale: import_th_TH4.default,
|
|
1484
1480
|
theme: {
|
|
1485
1481
|
token: {
|
|
1486
1482
|
fontFamily: "Kanit"
|
|
1487
1483
|
}
|
|
1488
1484
|
},
|
|
1489
|
-
children: /* @__PURE__ */ (0,
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1491
|
-
/* @__PURE__ */ (0,
|
|
1485
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
|
|
1486
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
|
|
1492
1488
|
" ",
|
|
1493
|
-
|
|
1489
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1494
1490
|
] }),
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1496
|
-
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1492
|
+
import_antd8.TimePicker,
|
|
1497
1493
|
{
|
|
1498
1494
|
format: "HH:mm",
|
|
1499
1495
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1500
|
-
value,
|
|
1496
|
+
value: value ? (0, import_dayjs3.default)(value) : null,
|
|
1501
1497
|
placeholder,
|
|
1502
|
-
onChange
|
|
1498
|
+
onChange: (time) => {
|
|
1499
|
+
onChange(time ? time.toDate() : null);
|
|
1500
|
+
},
|
|
1503
1501
|
allowClear: true,
|
|
1504
1502
|
disabled
|
|
1505
1503
|
}
|
|
1506
1504
|
),
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1509
|
-
" ",
|
|
1510
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1511
|
-
] })
|
|
1505
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1512
1506
|
] })
|
|
1513
1507
|
}
|
|
1514
1508
|
);
|
|
1515
1509
|
}
|
|
1516
1510
|
|
|
1517
1511
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1518
|
-
var
|
|
1519
|
-
var
|
|
1512
|
+
var import_antd9 = require("antd");
|
|
1513
|
+
var import_th_TH5 = __toESM(require("antd/locale/th_TH"));
|
|
1514
|
+
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1515
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1520
1516
|
function TimePickerRangePicker({
|
|
1521
1517
|
value,
|
|
1522
1518
|
onChange,
|
|
1523
1519
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
showError,
|
|
1528
|
-
errorMessage,
|
|
1520
|
+
label,
|
|
1521
|
+
required,
|
|
1522
|
+
error,
|
|
1529
1523
|
disabled,
|
|
1530
1524
|
className
|
|
1531
1525
|
}) {
|
|
1532
|
-
return /* @__PURE__ */ (0,
|
|
1533
|
-
|
|
1526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1527
|
+
import_antd9.ConfigProvider,
|
|
1534
1528
|
{
|
|
1529
|
+
locale: import_th_TH5.default,
|
|
1535
1530
|
theme: {
|
|
1536
1531
|
token: {
|
|
1537
1532
|
fontFamily: "Kanit"
|
|
1538
1533
|
}
|
|
1539
1534
|
},
|
|
1540
|
-
children: /* @__PURE__ */ (0,
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
1535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
1536
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
|
|
1543
1538
|
" ",
|
|
1544
|
-
|
|
1539
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1545
1540
|
] }),
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
1547
|
-
|
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1542
|
+
import_antd9.TimePicker.RangePicker,
|
|
1548
1543
|
{
|
|
1549
1544
|
format: "HH:mm",
|
|
1550
|
-
value
|
|
1545
|
+
value: value ? [
|
|
1546
|
+
value[0] ? (0, import_dayjs4.default)(value[0]) : null,
|
|
1547
|
+
value[1] ? (0, import_dayjs4.default)(value[1]) : null
|
|
1548
|
+
] : null,
|
|
1551
1549
|
placeholder,
|
|
1552
1550
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1553
|
-
onChange,
|
|
1551
|
+
onChange: (dates, dateStrings) => {
|
|
1552
|
+
if (!dates) {
|
|
1553
|
+
onChange(null);
|
|
1554
|
+
} else {
|
|
1555
|
+
onChange([
|
|
1556
|
+
dates[0] ? dates[0].toDate() : null,
|
|
1557
|
+
dates[1] ? dates[1].toDate() : null
|
|
1558
|
+
]);
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1554
1561
|
allowClear: true,
|
|
1555
|
-
disabled
|
|
1562
|
+
disabled,
|
|
1563
|
+
showNow: true
|
|
1556
1564
|
}
|
|
1557
1565
|
),
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1559
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1560
|
-
" ",
|
|
1561
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1562
|
-
] })
|
|
1566
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1563
1567
|
] })
|
|
1564
1568
|
}
|
|
1565
1569
|
);
|
|
1566
1570
|
}
|
|
1567
1571
|
|
|
1568
1572
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1569
|
-
var
|
|
1573
|
+
var import_antd10 = require("antd");
|
|
1570
1574
|
|
|
1571
1575
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1572
1576
|
function _typeof(o) {
|
|
@@ -2268,7 +2272,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2268
2272
|
greyDark.primary = greyDark[5];
|
|
2269
2273
|
|
|
2270
2274
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2271
|
-
var
|
|
2275
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2272
2276
|
function genPresets(presets = presetPalettes) {
|
|
2273
2277
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2274
2278
|
label,
|
|
@@ -2279,11 +2283,9 @@ function genPresets(presets = presetPalettes) {
|
|
|
2279
2283
|
function ColorPalettePickerBasic({
|
|
2280
2284
|
value,
|
|
2281
2285
|
onChange,
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
showError,
|
|
2286
|
-
errorMessage,
|
|
2286
|
+
required,
|
|
2287
|
+
label,
|
|
2288
|
+
error,
|
|
2287
2289
|
disabled,
|
|
2288
2290
|
allowClear,
|
|
2289
2291
|
defaultFormat,
|
|
@@ -2291,14 +2293,14 @@ function ColorPalettePickerBasic({
|
|
|
2291
2293
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",
|
|
2292
2294
|
onClear
|
|
2293
2295
|
}) {
|
|
2294
|
-
const { token } =
|
|
2296
|
+
const { token } = import_antd10.theme.useToken();
|
|
2295
2297
|
const presets = genPresets({
|
|
2296
2298
|
primary: generate(token.colorPrimary),
|
|
2297
2299
|
red,
|
|
2298
2300
|
green
|
|
2299
2301
|
});
|
|
2300
|
-
return /* @__PURE__ */ (0,
|
|
2301
|
-
|
|
2302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2303
|
+
import_antd10.ConfigProvider,
|
|
2302
2304
|
{
|
|
2303
2305
|
theme: {
|
|
2304
2306
|
token: {
|
|
@@ -2306,14 +2308,14 @@ function ColorPalettePickerBasic({
|
|
|
2306
2308
|
fontSize: 16
|
|
2307
2309
|
}
|
|
2308
2310
|
},
|
|
2309
|
-
children: /* @__PURE__ */ (0,
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
2311
|
-
/* @__PURE__ */ (0,
|
|
2311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
|
|
2312
2314
|
" ",
|
|
2313
|
-
|
|
2315
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2314
2316
|
] }),
|
|
2315
|
-
/* @__PURE__ */ (0,
|
|
2316
|
-
|
|
2317
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2318
|
+
import_antd10.ColorPicker,
|
|
2317
2319
|
{
|
|
2318
2320
|
defaultFormat,
|
|
2319
2321
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -2325,9 +2327,9 @@ function ColorPalettePickerBasic({
|
|
|
2325
2327
|
showText: (color) => {
|
|
2326
2328
|
const hex = color.toHexString();
|
|
2327
2329
|
if (!value) {
|
|
2328
|
-
return /* @__PURE__ */ (0,
|
|
2330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: placeholder });
|
|
2329
2331
|
}
|
|
2330
|
-
return /* @__PURE__ */ (0,
|
|
2332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { children: [
|
|
2331
2333
|
"(",
|
|
2332
2334
|
hex,
|
|
2333
2335
|
")"
|
|
@@ -2337,28 +2339,22 @@ function ColorPalettePickerBasic({
|
|
|
2337
2339
|
onClear
|
|
2338
2340
|
}
|
|
2339
2341
|
),
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2342
|
-
" ",
|
|
2343
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2344
|
-
] })
|
|
2342
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2345
2343
|
] })
|
|
2346
2344
|
}
|
|
2347
2345
|
);
|
|
2348
2346
|
}
|
|
2349
2347
|
|
|
2350
2348
|
// src/Select/SelectField/SelectField.tsx
|
|
2351
|
-
var
|
|
2352
|
-
var
|
|
2349
|
+
var import_antd11 = require("antd");
|
|
2350
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2353
2351
|
function SelectField({
|
|
2354
2352
|
value,
|
|
2355
2353
|
onChange,
|
|
2356
2354
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
showError,
|
|
2361
|
-
errorMessage,
|
|
2355
|
+
label,
|
|
2356
|
+
required,
|
|
2357
|
+
error,
|
|
2362
2358
|
disabled,
|
|
2363
2359
|
defaultValue,
|
|
2364
2360
|
options,
|
|
@@ -2369,8 +2365,8 @@ function SelectField({
|
|
|
2369
2365
|
className,
|
|
2370
2366
|
onClear
|
|
2371
2367
|
}) {
|
|
2372
|
-
return /* @__PURE__ */ (0,
|
|
2373
|
-
|
|
2368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2369
|
+
import_antd11.ConfigProvider,
|
|
2374
2370
|
{
|
|
2375
2371
|
theme: {
|
|
2376
2372
|
token: {
|
|
@@ -2378,14 +2374,14 @@ function SelectField({
|
|
|
2378
2374
|
fontSize: 16
|
|
2379
2375
|
}
|
|
2380
2376
|
},
|
|
2381
|
-
children: /* @__PURE__ */ (0,
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
|
|
2384
2380
|
" ",
|
|
2385
|
-
|
|
2381
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2386
2382
|
] }),
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2388
|
-
|
|
2383
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2384
|
+
import_antd11.Select,
|
|
2389
2385
|
{
|
|
2390
2386
|
showSearch: true,
|
|
2391
2387
|
value,
|
|
@@ -2399,33 +2395,27 @@ function SelectField({
|
|
|
2399
2395
|
options,
|
|
2400
2396
|
mode,
|
|
2401
2397
|
onSearch: handleSearch,
|
|
2402
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2398
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
|
|
2403
2399
|
allowClear: true,
|
|
2404
2400
|
onClear
|
|
2405
2401
|
}
|
|
2406
2402
|
),
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2408
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2409
|
-
" ",
|
|
2410
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2411
|
-
] })
|
|
2403
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2412
2404
|
] })
|
|
2413
2405
|
}
|
|
2414
2406
|
);
|
|
2415
2407
|
}
|
|
2416
2408
|
|
|
2417
2409
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2418
|
-
var
|
|
2419
|
-
var
|
|
2410
|
+
var import_antd12 = require("antd");
|
|
2411
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2420
2412
|
function SelectFieldGroup({
|
|
2421
2413
|
value,
|
|
2422
2414
|
onChange,
|
|
2423
2415
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
showError,
|
|
2428
|
-
errorMessage,
|
|
2416
|
+
label,
|
|
2417
|
+
required,
|
|
2418
|
+
error,
|
|
2429
2419
|
disabled,
|
|
2430
2420
|
defaultValue,
|
|
2431
2421
|
options,
|
|
@@ -2435,22 +2425,22 @@ function SelectFieldGroup({
|
|
|
2435
2425
|
handleSearch,
|
|
2436
2426
|
className
|
|
2437
2427
|
}) {
|
|
2438
|
-
return /* @__PURE__ */ (0,
|
|
2439
|
-
|
|
2428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2429
|
+
import_antd12.ConfigProvider,
|
|
2440
2430
|
{
|
|
2441
2431
|
theme: {
|
|
2442
2432
|
token: {
|
|
2443
2433
|
fontFamily: "Kanit"
|
|
2444
2434
|
}
|
|
2445
2435
|
},
|
|
2446
|
-
children: /* @__PURE__ */ (0,
|
|
2447
|
-
/* @__PURE__ */ (0,
|
|
2448
|
-
/* @__PURE__ */ (0,
|
|
2436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
|
|
2449
2439
|
" ",
|
|
2450
|
-
|
|
2440
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2451
2441
|
] }),
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2453
|
-
|
|
2442
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2443
|
+
import_antd12.Select,
|
|
2454
2444
|
{
|
|
2455
2445
|
showSearch: true,
|
|
2456
2446
|
value,
|
|
@@ -2464,7 +2454,7 @@ function SelectFieldGroup({
|
|
|
2464
2454
|
options,
|
|
2465
2455
|
mode,
|
|
2466
2456
|
onSearch: handleSearch,
|
|
2467
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2457
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2468
2458
|
"span",
|
|
2469
2459
|
{
|
|
2470
2460
|
style: {
|
|
@@ -2480,18 +2470,14 @@ function SelectFieldGroup({
|
|
|
2480
2470
|
allowClear: true
|
|
2481
2471
|
}
|
|
2482
2472
|
),
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2484
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2485
|
-
" ",
|
|
2486
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2487
|
-
] })
|
|
2473
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2488
2474
|
] })
|
|
2489
2475
|
}
|
|
2490
2476
|
);
|
|
2491
2477
|
}
|
|
2492
2478
|
|
|
2493
2479
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2494
|
-
var
|
|
2480
|
+
var import_antd13 = require("antd");
|
|
2495
2481
|
|
|
2496
2482
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2497
2483
|
var status = [
|
|
@@ -2504,23 +2490,21 @@ var status = [
|
|
|
2504
2490
|
|
|
2505
2491
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2506
2492
|
var import_icons = require("@ant-design/icons");
|
|
2507
|
-
var
|
|
2493
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2508
2494
|
function SelectFieldStatus({
|
|
2509
2495
|
value,
|
|
2510
2496
|
onChange,
|
|
2511
2497
|
placeholder,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
bottomText,
|
|
2498
|
+
label,
|
|
2499
|
+
required,
|
|
2515
2500
|
disabled,
|
|
2516
|
-
|
|
2517
|
-
errorMessage,
|
|
2501
|
+
error,
|
|
2518
2502
|
options,
|
|
2519
2503
|
className
|
|
2520
2504
|
}) {
|
|
2521
2505
|
const selectedItem = status.find((s) => s.value === value);
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
2523
|
-
|
|
2506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2507
|
+
import_antd13.ConfigProvider,
|
|
2524
2508
|
{
|
|
2525
2509
|
theme: {
|
|
2526
2510
|
components: {
|
|
@@ -2535,17 +2519,17 @@ function SelectFieldStatus({
|
|
|
2535
2519
|
fontFamily: "Kanit"
|
|
2536
2520
|
}
|
|
2537
2521
|
},
|
|
2538
|
-
children: /* @__PURE__ */ (0,
|
|
2539
|
-
/* @__PURE__ */ (0,
|
|
2540
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2524
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
|
|
2541
2525
|
" ",
|
|
2542
|
-
|
|
2526
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2543
2527
|
] }),
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2529
|
+
import_antd13.Select,
|
|
2546
2530
|
{
|
|
2547
2531
|
disabled,
|
|
2548
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2532
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2549
2533
|
value,
|
|
2550
2534
|
onChange,
|
|
2551
2535
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2556,18 +2540,14 @@ function SelectFieldStatus({
|
|
|
2556
2540
|
showSearch: true
|
|
2557
2541
|
}
|
|
2558
2542
|
),
|
|
2559
|
-
/* @__PURE__ */ (0,
|
|
2560
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2561
|
-
" ",
|
|
2562
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2563
|
-
] })
|
|
2543
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2564
2544
|
] })
|
|
2565
2545
|
}
|
|
2566
2546
|
);
|
|
2567
2547
|
}
|
|
2568
2548
|
|
|
2569
2549
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2570
|
-
var
|
|
2550
|
+
var import_antd14 = require("antd");
|
|
2571
2551
|
|
|
2572
2552
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2573
2553
|
var status2 = [
|
|
@@ -2577,23 +2557,21 @@ var status2 = [
|
|
|
2577
2557
|
|
|
2578
2558
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2579
2559
|
var import_icons2 = require("@ant-design/icons");
|
|
2580
|
-
var
|
|
2560
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2581
2561
|
function SelectFieldStatusReport({
|
|
2582
2562
|
value,
|
|
2583
2563
|
onChange,
|
|
2584
2564
|
placeholder,
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
bottomText,
|
|
2565
|
+
label,
|
|
2566
|
+
required,
|
|
2588
2567
|
disabled,
|
|
2589
|
-
|
|
2590
|
-
errorMessage,
|
|
2568
|
+
error,
|
|
2591
2569
|
className,
|
|
2592
2570
|
options
|
|
2593
2571
|
}) {
|
|
2594
2572
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2596
|
-
|
|
2573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2574
|
+
import_antd14.ConfigProvider,
|
|
2597
2575
|
{
|
|
2598
2576
|
theme: {
|
|
2599
2577
|
components: {
|
|
@@ -2608,17 +2586,17 @@ function SelectFieldStatusReport({
|
|
|
2608
2586
|
fontFamily: "Kanit"
|
|
2609
2587
|
}
|
|
2610
2588
|
},
|
|
2611
|
-
children: /* @__PURE__ */ (0,
|
|
2612
|
-
/* @__PURE__ */ (0,
|
|
2613
|
-
/* @__PURE__ */ (0,
|
|
2589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
|
|
2614
2592
|
" ",
|
|
2615
|
-
|
|
2593
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2616
2594
|
] }),
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2596
|
+
import_antd14.Select,
|
|
2619
2597
|
{
|
|
2620
2598
|
disabled,
|
|
2621
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2599
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2622
2600
|
value,
|
|
2623
2601
|
onChange,
|
|
2624
2602
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2629,28 +2607,22 @@ function SelectFieldStatusReport({
|
|
|
2629
2607
|
showSearch: true
|
|
2630
2608
|
}
|
|
2631
2609
|
),
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2633
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2634
|
-
" ",
|
|
2635
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2636
|
-
] })
|
|
2610
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2637
2611
|
] })
|
|
2638
2612
|
}
|
|
2639
2613
|
);
|
|
2640
2614
|
}
|
|
2641
2615
|
|
|
2642
2616
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2643
|
-
var
|
|
2617
|
+
var import_antd15 = require("antd");
|
|
2644
2618
|
var import_react8 = require("react");
|
|
2645
|
-
var
|
|
2619
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2646
2620
|
function SelectFieldTag({
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
bottomText,
|
|
2621
|
+
label,
|
|
2622
|
+
required,
|
|
2650
2623
|
placeholder,
|
|
2651
2624
|
options,
|
|
2652
|
-
|
|
2653
|
-
errorMessage,
|
|
2625
|
+
error,
|
|
2654
2626
|
value: controlledValue,
|
|
2655
2627
|
className,
|
|
2656
2628
|
onChange,
|
|
@@ -2677,22 +2649,22 @@ function SelectFieldTag({
|
|
|
2677
2649
|
}
|
|
2678
2650
|
onChange?.([]);
|
|
2679
2651
|
};
|
|
2680
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
-
|
|
2652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2653
|
+
import_antd15.ConfigProvider,
|
|
2682
2654
|
{
|
|
2683
2655
|
theme: {
|
|
2684
2656
|
token: {
|
|
2685
2657
|
fontFamily: "Kanit"
|
|
2686
2658
|
}
|
|
2687
2659
|
},
|
|
2688
|
-
children: /* @__PURE__ */ (0,
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2690
|
-
/* @__PURE__ */ (0,
|
|
2660
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
|
|
2661
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
2662
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: label }),
|
|
2691
2663
|
" ",
|
|
2692
|
-
|
|
2664
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2693
2665
|
] }),
|
|
2694
|
-
/* @__PURE__ */ (0,
|
|
2695
|
-
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2667
|
+
import_antd15.Select,
|
|
2696
2668
|
{
|
|
2697
2669
|
mode: "tags",
|
|
2698
2670
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2710,11 +2682,7 @@ function SelectFieldTag({
|
|
|
2710
2682
|
onClear
|
|
2711
2683
|
}
|
|
2712
2684
|
),
|
|
2713
|
-
/* @__PURE__ */ (0,
|
|
2714
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2715
|
-
" ",
|
|
2716
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2717
|
-
] })
|
|
2685
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2718
2686
|
] })
|
|
2719
2687
|
}
|
|
2720
2688
|
);
|
|
@@ -2722,18 +2690,16 @@ function SelectFieldTag({
|
|
|
2722
2690
|
|
|
2723
2691
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2724
2692
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2725
|
-
var
|
|
2693
|
+
var import_antd16 = require("antd");
|
|
2726
2694
|
var import_react9 = require("react");
|
|
2727
|
-
var
|
|
2695
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2728
2696
|
function SelectCustom({
|
|
2729
|
-
|
|
2697
|
+
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2730
2698
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
2731
2699
|
options,
|
|
2732
|
-
|
|
2700
|
+
required = false,
|
|
2733
2701
|
onChange,
|
|
2734
|
-
|
|
2735
|
-
showError,
|
|
2736
|
-
errorMessage,
|
|
2702
|
+
error,
|
|
2737
2703
|
onClear
|
|
2738
2704
|
}) {
|
|
2739
2705
|
const [value, setValue] = (0, import_react9.useState)([]);
|
|
@@ -2755,8 +2721,8 @@ function SelectCustom({
|
|
|
2755
2721
|
});
|
|
2756
2722
|
};
|
|
2757
2723
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2758
|
-
return /* @__PURE__ */ (0,
|
|
2759
|
-
|
|
2724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2725
|
+
import_antd16.ConfigProvider,
|
|
2760
2726
|
{
|
|
2761
2727
|
theme: {
|
|
2762
2728
|
token: {
|
|
@@ -2764,14 +2730,14 @@ function SelectCustom({
|
|
|
2764
2730
|
fontSize: 16
|
|
2765
2731
|
}
|
|
2766
2732
|
},
|
|
2767
|
-
children: /* @__PURE__ */ (0,
|
|
2768
|
-
/* @__PURE__ */ (0,
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "container-input", children: [
|
|
2734
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: label }),
|
|
2770
2736
|
" ",
|
|
2771
|
-
|
|
2737
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2772
2738
|
] }),
|
|
2773
|
-
/* @__PURE__ */ (0,
|
|
2774
|
-
|
|
2739
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2740
|
+
import_antd16.Select,
|
|
2775
2741
|
{
|
|
2776
2742
|
value,
|
|
2777
2743
|
onChange: handleChange,
|
|
@@ -2781,27 +2747,23 @@ function SelectCustom({
|
|
|
2781
2747
|
onClear
|
|
2782
2748
|
}
|
|
2783
2749
|
),
|
|
2784
|
-
/* @__PURE__ */ (0,
|
|
2785
|
-
|
|
2786
|
-
" ",
|
|
2787
|
-
showError && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
2788
|
-
] }),
|
|
2789
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-[500px] w-full p-[2px] overflow-y-auto mt-2", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2750
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-red-500 caption-1", children: error }),
|
|
2751
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2790
2752
|
"div",
|
|
2791
2753
|
{
|
|
2792
2754
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
2793
2755
|
children: [
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2795
|
-
/* @__PURE__ */ (0,
|
|
2756
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2757
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { children: [
|
|
2796
2758
|
index + 1,
|
|
2797
2759
|
"."
|
|
2798
2760
|
] }),
|
|
2799
|
-
/* @__PURE__ */ (0,
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { children: v })
|
|
2800
2762
|
] }),
|
|
2801
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2802
2764
|
import_icons_react8.IconTrash,
|
|
2803
2765
|
{
|
|
2804
|
-
className: "cursor-pointer
|
|
2766
|
+
className: "cursor-pointer",
|
|
2805
2767
|
onClick: () => handleDelete(v)
|
|
2806
2768
|
}
|
|
2807
2769
|
)
|
|
@@ -2815,7 +2777,7 @@ function SelectCustom({
|
|
|
2815
2777
|
}
|
|
2816
2778
|
|
|
2817
2779
|
// src/SortFilter/SortFilter.tsx
|
|
2818
|
-
var
|
|
2780
|
+
var import_antd17 = require("antd");
|
|
2819
2781
|
var import_icons3 = require("@ant-design/icons");
|
|
2820
2782
|
|
|
2821
2783
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2848,7 +2810,7 @@ var quarters = [
|
|
|
2848
2810
|
// src/SortFilter/SortFilter.tsx
|
|
2849
2811
|
var import_react10 = require("react");
|
|
2850
2812
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2851
|
-
var
|
|
2813
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2852
2814
|
function SortFilter({
|
|
2853
2815
|
showYear = true,
|
|
2854
2816
|
showQuarter = true,
|
|
@@ -2859,20 +2821,20 @@ function SortFilter({
|
|
|
2859
2821
|
const [yearValue, setYearValue] = (0, import_react10.useState)();
|
|
2860
2822
|
const [monthValue, setMonthValue] = (0, import_react10.useState)();
|
|
2861
2823
|
const [quarterValue, setQuartersValue] = (0, import_react10.useState)();
|
|
2862
|
-
return /* @__PURE__ */ (0,
|
|
2863
|
-
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2825
|
+
import_antd17.ConfigProvider,
|
|
2864
2826
|
{
|
|
2865
2827
|
theme: {
|
|
2866
2828
|
token: {
|
|
2867
2829
|
fontFamily: "Kanit"
|
|
2868
2830
|
}
|
|
2869
2831
|
},
|
|
2870
|
-
children: /* @__PURE__ */ (0,
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2872
|
-
showYear && /* @__PURE__ */ (0,
|
|
2832
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
2834
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2873
2835
|
SelectField,
|
|
2874
2836
|
{
|
|
2875
|
-
prefix: /* @__PURE__ */ (0,
|
|
2837
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2876
2838
|
onChange: setYearValue,
|
|
2877
2839
|
options: years.map((s) => ({
|
|
2878
2840
|
value: s.value,
|
|
@@ -2882,10 +2844,10 @@ function SortFilter({
|
|
|
2882
2844
|
value: yearValue
|
|
2883
2845
|
}
|
|
2884
2846
|
) }),
|
|
2885
|
-
showMonth && /* @__PURE__ */ (0,
|
|
2847
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2886
2848
|
SelectField,
|
|
2887
2849
|
{
|
|
2888
|
-
prefix: /* @__PURE__ */ (0,
|
|
2850
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2889
2851
|
onChange: setMonthValue,
|
|
2890
2852
|
options: months.map((s) => ({
|
|
2891
2853
|
value: s.value,
|
|
@@ -2895,10 +2857,10 @@ function SortFilter({
|
|
|
2895
2857
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2896
2858
|
}
|
|
2897
2859
|
) }),
|
|
2898
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
2860
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2899
2861
|
SelectField,
|
|
2900
2862
|
{
|
|
2901
|
-
prefix: /* @__PURE__ */ (0,
|
|
2863
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2902
2864
|
onChange: setQuartersValue,
|
|
2903
2865
|
options: quarters.map((s) => ({
|
|
2904
2866
|
value: s.value,
|
|
@@ -2909,8 +2871,8 @@ function SortFilter({
|
|
|
2909
2871
|
}
|
|
2910
2872
|
) })
|
|
2911
2873
|
] }),
|
|
2912
|
-
/* @__PURE__ */ (0,
|
|
2913
|
-
/* @__PURE__ */ (0,
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2914
2876
|
import_icons_react9.IconSortDescending,
|
|
2915
2877
|
{
|
|
2916
2878
|
size: 24,
|
|
@@ -2918,7 +2880,7 @@ function SortFilter({
|
|
|
2918
2880
|
onClick: onSortClick
|
|
2919
2881
|
}
|
|
2920
2882
|
),
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2922
2884
|
import_icons_react9.IconFilter,
|
|
2923
2885
|
{
|
|
2924
2886
|
size: 24,
|
|
@@ -2935,7 +2897,7 @@ function SortFilter({
|
|
|
2935
2897
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2936
2898
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
2937
2899
|
var import_react11 = require("react");
|
|
2938
|
-
var
|
|
2900
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2939
2901
|
function FileUploader({
|
|
2940
2902
|
onUpload,
|
|
2941
2903
|
onError,
|
|
@@ -2968,7 +2930,7 @@ function FileUploader({
|
|
|
2968
2930
|
const handleRemoveFile = async (index) => {
|
|
2969
2931
|
try {
|
|
2970
2932
|
if (onRemove) {
|
|
2971
|
-
await onRemove();
|
|
2933
|
+
await onRemove(index);
|
|
2972
2934
|
}
|
|
2973
2935
|
const updatedList = [...fileList];
|
|
2974
2936
|
updatedList.splice(index, 1);
|
|
@@ -3006,10 +2968,10 @@ function FileUploader({
|
|
|
3006
2968
|
}
|
|
3007
2969
|
if (inputRef.current) inputRef.current.value = "";
|
|
3008
2970
|
};
|
|
3009
|
-
return /* @__PURE__ */ (0,
|
|
3010
|
-
label && /* @__PURE__ */ (0,
|
|
3011
|
-
/* @__PURE__ */ (0,
|
|
3012
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
2971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full", children: [
|
|
2972
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "body-1", children: label }),
|
|
2973
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
2974
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3013
2975
|
"button",
|
|
3014
2976
|
{
|
|
3015
2977
|
type: "button",
|
|
@@ -3017,15 +2979,15 @@ function FileUploader({
|
|
|
3017
2979
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3018
2980
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3019
2981
|
disabled: disabled ? disabled : uploading,
|
|
3020
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
2982
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Loader, { size: 15 }),
|
|
3022
2984
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3023
|
-
] }) : /* @__PURE__ */ (0,
|
|
3024
|
-
/* @__PURE__ */ (0,
|
|
2985
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3025
2987
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3026
2988
|
] })
|
|
3027
2989
|
}
|
|
3028
|
-
) : /* @__PURE__ */ (0,
|
|
2990
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3029
2991
|
"div",
|
|
3030
2992
|
{
|
|
3031
2993
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3039,17 +3001,17 @@ function FileUploader({
|
|
|
3039
3001
|
},
|
|
3040
3002
|
onDragLeave: () => setDragActive(false),
|
|
3041
3003
|
onDrop: handleDrop,
|
|
3042
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3043
|
-
/* @__PURE__ */ (0,
|
|
3004
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Loader, { size: 15 }),
|
|
3044
3006
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3045
|
-
] }) : /* @__PURE__ */ (0,
|
|
3046
|
-
/* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3048
|
-
/* @__PURE__ */ (0,
|
|
3007
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconUpload, { size: 20 }),
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.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" }),
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.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" })
|
|
3049
3011
|
] })
|
|
3050
3012
|
}
|
|
3051
3013
|
),
|
|
3052
|
-
/* @__PURE__ */ (0,
|
|
3014
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3053
3015
|
"input",
|
|
3054
3016
|
{
|
|
3055
3017
|
type: "file",
|
|
@@ -3062,13 +3024,13 @@ function FileUploader({
|
|
|
3062
3024
|
}
|
|
3063
3025
|
)
|
|
3064
3026
|
] }),
|
|
3065
|
-
description && /* @__PURE__ */ (0,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
/* @__PURE__ */ (0,
|
|
3068
|
-
/* @__PURE__ */ (0,
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3027
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
3028
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
3029
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
3030
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: file.name })
|
|
3070
3032
|
] }),
|
|
3071
|
-
/* @__PURE__ */ (0,
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3072
3034
|
import_icons_react10.IconTrash,
|
|
3073
3035
|
{
|
|
3074
3036
|
size: 20,
|
|
@@ -3102,9 +3064,9 @@ function messageLoading(content, duration) {
|
|
|
3102
3064
|
}
|
|
3103
3065
|
|
|
3104
3066
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3105
|
-
var import_antd17 = require("antd");
|
|
3106
3067
|
var import_antd18 = require("antd");
|
|
3107
|
-
var
|
|
3068
|
+
var import_antd19 = require("antd");
|
|
3069
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3108
3070
|
function Breadcrumbs({
|
|
3109
3071
|
items,
|
|
3110
3072
|
separator,
|
|
@@ -3112,16 +3074,16 @@ function Breadcrumbs({
|
|
|
3112
3074
|
classname,
|
|
3113
3075
|
params
|
|
3114
3076
|
}) {
|
|
3115
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
-
|
|
3077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3078
|
+
import_antd18.ConfigProvider,
|
|
3117
3079
|
{
|
|
3118
3080
|
theme: {
|
|
3119
3081
|
token: {
|
|
3120
3082
|
fontFamily: "Kanit"
|
|
3121
3083
|
}
|
|
3122
3084
|
},
|
|
3123
|
-
children: /* @__PURE__ */ (0,
|
|
3124
|
-
|
|
3085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3086
|
+
import_antd19.Breadcrumb,
|
|
3125
3087
|
{
|
|
3126
3088
|
items,
|
|
3127
3089
|
separator,
|
|
@@ -3135,8 +3097,8 @@ function Breadcrumbs({
|
|
|
3135
3097
|
}
|
|
3136
3098
|
|
|
3137
3099
|
// src/HeadingPage/HeadingPage.tsx
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3100
|
+
var import_antd20 = require("antd");
|
|
3101
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3140
3102
|
function HeadingPage({ Heading }) {
|
|
3141
3103
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3142
3104
|
weekday: "long",
|
|
@@ -3144,17 +3106,17 @@ function HeadingPage({ Heading }) {
|
|
|
3144
3106
|
month: "long",
|
|
3145
3107
|
year: "numeric"
|
|
3146
3108
|
});
|
|
3147
|
-
return /* @__PURE__ */ (0,
|
|
3148
|
-
|
|
3109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3110
|
+
import_antd20.ConfigProvider,
|
|
3149
3111
|
{
|
|
3150
3112
|
theme: {
|
|
3151
3113
|
token: {
|
|
3152
3114
|
fontFamily: "Kanit"
|
|
3153
3115
|
}
|
|
3154
3116
|
},
|
|
3155
|
-
children: /* @__PURE__ */ (0,
|
|
3156
|
-
/* @__PURE__ */ (0,
|
|
3157
|
-
/* @__PURE__ */ (0,
|
|
3117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3118
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "headline-5", children: Heading }),
|
|
3119
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "body-1", children: [
|
|
3158
3120
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3159
3121
|
today
|
|
3160
3122
|
] })
|
|
@@ -3164,9 +3126,9 @@ function HeadingPage({ Heading }) {
|
|
|
3164
3126
|
}
|
|
3165
3127
|
|
|
3166
3128
|
// src/Progress/ProgressBar.tsx
|
|
3167
|
-
var
|
|
3129
|
+
var import_antd21 = require("antd");
|
|
3168
3130
|
var import_react12 = require("react");
|
|
3169
|
-
var
|
|
3131
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3170
3132
|
function ProgressBar({
|
|
3171
3133
|
percent = 0,
|
|
3172
3134
|
size = "default",
|
|
@@ -3199,17 +3161,17 @@ function ProgressBar({
|
|
|
3199
3161
|
observer.observe(inner);
|
|
3200
3162
|
return () => observer.disconnect();
|
|
3201
3163
|
}, []);
|
|
3202
|
-
return /* @__PURE__ */ (0,
|
|
3203
|
-
|
|
3164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3165
|
+
import_antd21.ConfigProvider,
|
|
3204
3166
|
{
|
|
3205
3167
|
theme: {
|
|
3206
3168
|
token: {
|
|
3207
3169
|
fontFamily: "Kanit"
|
|
3208
3170
|
}
|
|
3209
3171
|
},
|
|
3210
|
-
children: /* @__PURE__ */ (0,
|
|
3211
|
-
/* @__PURE__ */ (0,
|
|
3212
|
-
|
|
3172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3174
|
+
import_antd21.Progress,
|
|
3213
3175
|
{
|
|
3214
3176
|
className: "w-full",
|
|
3215
3177
|
percent,
|
|
@@ -3224,7 +3186,7 @@ function ProgressBar({
|
|
|
3224
3186
|
strokeColor
|
|
3225
3187
|
}
|
|
3226
3188
|
),
|
|
3227
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
3189
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3228
3190
|
"div",
|
|
3229
3191
|
{
|
|
3230
3192
|
className: "checkpoint absolute top-0",
|
|
@@ -3246,7 +3208,7 @@ function ProgressBar({
|
|
|
3246
3208
|
}
|
|
3247
3209
|
|
|
3248
3210
|
// src/KpiSection/KpiSection.tsx
|
|
3249
|
-
var
|
|
3211
|
+
var import_antd22 = require("antd");
|
|
3250
3212
|
var import_react14 = require("react");
|
|
3251
3213
|
|
|
3252
3214
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3397,7 +3359,7 @@ function useGetKpiSection() {
|
|
|
3397
3359
|
|
|
3398
3360
|
// src/KpiSection/KpiSection.tsx
|
|
3399
3361
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3400
|
-
var
|
|
3362
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3401
3363
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3402
3364
|
const {
|
|
3403
3365
|
handleAddKpi,
|
|
@@ -3417,7 +3379,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3417
3379
|
itemErrors,
|
|
3418
3380
|
setItemErrors
|
|
3419
3381
|
} = useGetKpiSection();
|
|
3420
|
-
const [messageApi2, messageContainer] =
|
|
3382
|
+
const [messageApi2, messageContainer] = import_antd22.message.useMessage();
|
|
3421
3383
|
const [hasShownError, setHasShownError] = (0, import_react14.useState)(false);
|
|
3422
3384
|
(0, import_react14.useEffect)(() => {
|
|
3423
3385
|
setMessageApi(messageApi2);
|
|
@@ -3427,8 +3389,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3427
3389
|
onChangeKpiList(kpiList);
|
|
3428
3390
|
}
|
|
3429
3391
|
}, [kpiList]);
|
|
3430
|
-
return /* @__PURE__ */ (0,
|
|
3431
|
-
|
|
3392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3393
|
+
import_antd22.ConfigProvider,
|
|
3432
3394
|
{
|
|
3433
3395
|
theme: {
|
|
3434
3396
|
token: {
|
|
@@ -3436,30 +3398,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3436
3398
|
fontSize: 16
|
|
3437
3399
|
}
|
|
3438
3400
|
},
|
|
3439
|
-
children: /* @__PURE__ */ (0,
|
|
3401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "container-input", children: [
|
|
3440
3402
|
messageContainer,
|
|
3441
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3442
|
-
/* @__PURE__ */ (0,
|
|
3443
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
type === "number" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-4", children: [
|
|
3404
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3405
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3444
3406
|
InputField,
|
|
3445
3407
|
{
|
|
3446
3408
|
value: nameKpi,
|
|
3447
|
-
|
|
3409
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3448
3410
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3449
|
-
require: true,
|
|
3450
3411
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3451
3412
|
className: "h-[32px]",
|
|
3452
|
-
|
|
3453
|
-
errorMessage: errors.nameKpi
|
|
3413
|
+
error: errors.nameKpi
|
|
3454
3414
|
}
|
|
3455
3415
|
),
|
|
3456
|
-
/* @__PURE__ */ (0,
|
|
3416
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3457
3417
|
InputField,
|
|
3458
3418
|
{
|
|
3459
3419
|
value: kpiValue,
|
|
3460
|
-
|
|
3420
|
+
label: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3461
3421
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3462
|
-
require: true,
|
|
3463
3422
|
onChange: (value) => {
|
|
3464
3423
|
if (value === void 0 || value === "") {
|
|
3465
3424
|
setKpiValue("");
|
|
@@ -3474,28 +3433,25 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3474
3433
|
}
|
|
3475
3434
|
}
|
|
3476
3435
|
},
|
|
3477
|
-
|
|
3478
|
-
errorMessage: errors.kpiValue
|
|
3436
|
+
error: errors.kpiValue
|
|
3479
3437
|
}
|
|
3480
3438
|
),
|
|
3481
|
-
/* @__PURE__ */ (0,
|
|
3439
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3482
3440
|
InputField,
|
|
3483
3441
|
{
|
|
3484
3442
|
value: unitValue,
|
|
3485
|
-
|
|
3443
|
+
label: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3486
3444
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3487
|
-
require: true,
|
|
3488
3445
|
onChange: (value) => setUnitValue(value ?? ""),
|
|
3489
3446
|
className: "h-[32px]",
|
|
3490
|
-
|
|
3491
|
-
errorMessage: errors.unitValue
|
|
3447
|
+
error: errors.unitValue
|
|
3492
3448
|
}
|
|
3493
3449
|
),
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3450
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3495
3451
|
"div",
|
|
3496
3452
|
{
|
|
3497
3453
|
className: `flex justify-end mt-[28px]`,
|
|
3498
|
-
children: /* @__PURE__ */ (0,
|
|
3454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3499
3455
|
import_icons_react11.IconCirclePlus,
|
|
3500
3456
|
{
|
|
3501
3457
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3506,17 +3462,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3506
3462
|
}
|
|
3507
3463
|
)
|
|
3508
3464
|
] }),
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3465
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3510
3466
|
"div",
|
|
3511
3467
|
{
|
|
3512
3468
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3513
3469
|
children: [
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3515
3471
|
index + 1,
|
|
3516
3472
|
"."
|
|
3517
3473
|
] }),
|
|
3518
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3519
|
-
/* @__PURE__ */ (0,
|
|
3474
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3520
3476
|
InputField,
|
|
3521
3477
|
{
|
|
3522
3478
|
value: kpi.name,
|
|
@@ -3525,11 +3481,10 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3525
3481
|
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3526
3482
|
)
|
|
3527
3483
|
),
|
|
3528
|
-
|
|
3529
|
-
errorMessage: itemErrors[kpi.id]?.name
|
|
3484
|
+
error: itemErrors[kpi.id]?.name
|
|
3530
3485
|
}
|
|
3531
3486
|
),
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3533
3488
|
InputField,
|
|
3534
3489
|
{
|
|
3535
3490
|
value: kpi.value?.toString(),
|
|
@@ -3555,11 +3510,10 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3555
3510
|
}
|
|
3556
3511
|
}
|
|
3557
3512
|
},
|
|
3558
|
-
|
|
3559
|
-
errorMessage: itemErrors[kpi.id]?.value
|
|
3513
|
+
error: itemErrors[kpi.id]?.value
|
|
3560
3514
|
}
|
|
3561
3515
|
),
|
|
3562
|
-
/* @__PURE__ */ (0,
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3563
3517
|
InputField,
|
|
3564
3518
|
{
|
|
3565
3519
|
value: kpi.unit,
|
|
@@ -3568,23 +3522,22 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3568
3522
|
(item) => item.id === kpi.id ? { ...item, unit: value ?? "" } : item
|
|
3569
3523
|
)
|
|
3570
3524
|
),
|
|
3571
|
-
|
|
3572
|
-
errorMessage: itemErrors[kpi.id]?.unit
|
|
3525
|
+
error: itemErrors[kpi.id]?.unit
|
|
3573
3526
|
}
|
|
3574
3527
|
),
|
|
3575
|
-
/* @__PURE__ */ (0,
|
|
3528
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3576
3529
|
"div",
|
|
3577
3530
|
{
|
|
3578
3531
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3579
3532
|
children: [
|
|
3580
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3581
3534
|
import_icons_react11.IconCheck,
|
|
3582
3535
|
{
|
|
3583
3536
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3584
3537
|
onClick: () => handleSave(kpi.id, type)
|
|
3585
3538
|
}
|
|
3586
3539
|
),
|
|
3587
|
-
/* @__PURE__ */ (0,
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3588
3541
|
import_icons_react11.IconX,
|
|
3589
3542
|
{
|
|
3590
3543
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3594,19 +3547,19 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3594
3547
|
]
|
|
3595
3548
|
}
|
|
3596
3549
|
)
|
|
3597
|
-
] }) : /* @__PURE__ */ (0,
|
|
3598
|
-
/* @__PURE__ */ (0,
|
|
3599
|
-
/* @__PURE__ */ (0,
|
|
3600
|
-
/* @__PURE__ */ (0,
|
|
3601
|
-
/* @__PURE__ */ (0,
|
|
3602
|
-
/* @__PURE__ */ (0,
|
|
3550
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.value }),
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.unit }),
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3603
3556
|
import_icons_react11.IconPencil,
|
|
3604
3557
|
{
|
|
3605
3558
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3606
3559
|
onClick: () => handleEdit(kpi.id)
|
|
3607
3560
|
}
|
|
3608
3561
|
),
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3562
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3610
3563
|
import_icons_react11.IconTrash,
|
|
3611
3564
|
{
|
|
3612
3565
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3620,26 +3573,24 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3620
3573
|
kpi.id
|
|
3621
3574
|
)) })
|
|
3622
3575
|
] }),
|
|
3623
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
type === "text" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-4", children: [
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3626
3579
|
InputField,
|
|
3627
3580
|
{
|
|
3628
3581
|
value: nameKpi,
|
|
3629
|
-
|
|
3582
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3630
3583
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3631
|
-
require: true,
|
|
3632
3584
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3633
3585
|
className: "h-[32px]",
|
|
3634
|
-
|
|
3635
|
-
errorMessage: errors.nameKpi
|
|
3586
|
+
error: errors.nameKpi
|
|
3636
3587
|
}
|
|
3637
3588
|
),
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3589
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3639
3590
|
"div",
|
|
3640
3591
|
{
|
|
3641
3592
|
className: `flex justify-end mt-[28px]`,
|
|
3642
|
-
children: /* @__PURE__ */ (0,
|
|
3593
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3643
3594
|
import_icons_react11.IconCirclePlus,
|
|
3644
3595
|
{
|
|
3645
3596
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3650,17 +3601,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3650
3601
|
}
|
|
3651
3602
|
)
|
|
3652
3603
|
] }),
|
|
3653
|
-
/* @__PURE__ */ (0,
|
|
3604
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3654
3605
|
"div",
|
|
3655
3606
|
{
|
|
3656
3607
|
className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]",
|
|
3657
3608
|
children: [
|
|
3658
|
-
/* @__PURE__ */ (0,
|
|
3609
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3659
3610
|
index + 1,
|
|
3660
3611
|
"."
|
|
3661
3612
|
] }),
|
|
3662
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3613
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3614
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3664
3615
|
InputField,
|
|
3665
3616
|
{
|
|
3666
3617
|
value: kpi.name,
|
|
@@ -3669,23 +3620,22 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3669
3620
|
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3670
3621
|
)
|
|
3671
3622
|
),
|
|
3672
|
-
|
|
3673
|
-
errorMessage: itemErrors[kpi.id]?.name
|
|
3623
|
+
error: itemErrors[kpi.id]?.name
|
|
3674
3624
|
}
|
|
3675
3625
|
),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3677
3627
|
"div",
|
|
3678
3628
|
{
|
|
3679
3629
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3680
3630
|
children: [
|
|
3681
|
-
/* @__PURE__ */ (0,
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3682
3632
|
import_icons_react11.IconCheck,
|
|
3683
3633
|
{
|
|
3684
3634
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3685
3635
|
onClick: () => handleSave(kpi.id, type)
|
|
3686
3636
|
}
|
|
3687
3637
|
),
|
|
3688
|
-
/* @__PURE__ */ (0,
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3689
3639
|
import_icons_react11.IconX,
|
|
3690
3640
|
{
|
|
3691
3641
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3695,17 +3645,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3695
3645
|
]
|
|
3696
3646
|
}
|
|
3697
3647
|
)
|
|
3698
|
-
] }) : /* @__PURE__ */ (0,
|
|
3699
|
-
/* @__PURE__ */ (0,
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3701
|
-
/* @__PURE__ */ (0,
|
|
3648
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3651
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3702
3652
|
import_icons_react11.IconPencil,
|
|
3703
3653
|
{
|
|
3704
3654
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3705
3655
|
onClick: () => handleEdit(kpi.id)
|
|
3706
3656
|
}
|
|
3707
3657
|
),
|
|
3708
|
-
/* @__PURE__ */ (0,
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3709
3659
|
import_icons_react11.IconTrash,
|
|
3710
3660
|
{
|
|
3711
3661
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3739,6 +3689,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3739
3689
|
GhostButton,
|
|
3740
3690
|
HeadingPage,
|
|
3741
3691
|
InputField,
|
|
3692
|
+
InputFieldNumber,
|
|
3742
3693
|
KpiSection,
|
|
3743
3694
|
Loader,
|
|
3744
3695
|
MenuNavBar,
|