@esic-lab/data-core-ui 0.0.26 → 0.0.28
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/STO-logo-ADYYAPS3.svg +92 -0
- package/dist/index.css +9 -1
- package/dist/index.d.mts +490 -74
- package/dist/index.d.ts +490 -74
- package/dist/index.js +557 -584
- package/dist/index.mjs +539 -571
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -305,28 +305,6 @@ var require_dayjs_min = __commonJS({
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
|
|
308
|
-
// node_modules/dayjs/plugin/buddhistEra.js
|
|
309
|
-
var require_buddhistEra = __commonJS({
|
|
310
|
-
"node_modules/dayjs/plugin/buddhistEra.js"(exports, module) {
|
|
311
|
-
"use strict";
|
|
312
|
-
!(function(t, e) {
|
|
313
|
-
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
|
|
314
|
-
})(exports, (function() {
|
|
315
|
-
"use strict";
|
|
316
|
-
return function(t, e) {
|
|
317
|
-
var n = e.prototype, i = n.format;
|
|
318
|
-
n.format = function(t2) {
|
|
319
|
-
var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
|
|
320
|
-
var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
|
|
321
|
-
return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
|
|
322
|
-
}));
|
|
323
|
-
return i.bind(this)(n2);
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
}));
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
|
|
330
308
|
// node_modules/dayjs/locale/th.js
|
|
331
309
|
var require_th = __commonJS({
|
|
332
310
|
"node_modules/dayjs/locale/th.js"(exports, module) {
|
|
@@ -346,6 +324,134 @@ var require_th = __commonJS({
|
|
|
346
324
|
}
|
|
347
325
|
});
|
|
348
326
|
|
|
327
|
+
// node_modules/dayjs/plugin/customParseFormat.js
|
|
328
|
+
var require_customParseFormat = __commonJS({
|
|
329
|
+
"node_modules/dayjs/plugin/customParseFormat.js"(exports, module) {
|
|
330
|
+
"use strict";
|
|
331
|
+
!(function(e, t) {
|
|
332
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
|
|
333
|
+
})(exports, (function() {
|
|
334
|
+
"use strict";
|
|
335
|
+
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) {
|
|
336
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
337
|
+
};
|
|
338
|
+
var f = function(e2) {
|
|
339
|
+
return function(t2) {
|
|
340
|
+
this[e2] = +t2;
|
|
341
|
+
};
|
|
342
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
343
|
+
(this.zone || (this.zone = {})).offset = (function(e3) {
|
|
344
|
+
if (!e3) return 0;
|
|
345
|
+
if ("Z" === e3) return 0;
|
|
346
|
+
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
347
|
+
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
348
|
+
})(e2);
|
|
349
|
+
}], u = function(e2) {
|
|
350
|
+
var t2 = s[e2];
|
|
351
|
+
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
352
|
+
}, d = function(e2, t2) {
|
|
353
|
+
var n2, r2 = s.meridiem;
|
|
354
|
+
if (r2) {
|
|
355
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
356
|
+
n2 = i2 > 12;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
360
|
+
return n2;
|
|
361
|
+
}, c = { A: [o, function(e2) {
|
|
362
|
+
this.afternoon = d(e2, false);
|
|
363
|
+
}], a: [o, function(e2) {
|
|
364
|
+
this.afternoon = d(e2, true);
|
|
365
|
+
}], Q: [n, function(e2) {
|
|
366
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
367
|
+
}], S: [n, function(e2) {
|
|
368
|
+
this.milliseconds = 100 * +e2;
|
|
369
|
+
}], SS: [r, function(e2) {
|
|
370
|
+
this.milliseconds = 10 * +e2;
|
|
371
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
372
|
+
this.milliseconds = +e2;
|
|
373
|
+
}], 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) {
|
|
374
|
+
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
375
|
+
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
376
|
+
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
377
|
+
var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
|
|
378
|
+
return e3.slice(0, 3);
|
|
379
|
+
}))).indexOf(e2) + 1;
|
|
380
|
+
if (n2 < 1) throw new Error();
|
|
381
|
+
this.month = n2 % 12 || n2;
|
|
382
|
+
}], MMMM: [o, function(e2) {
|
|
383
|
+
var t2 = u("months").indexOf(e2) + 1;
|
|
384
|
+
if (t2 < 1) throw new Error();
|
|
385
|
+
this.month = t2 % 12 || t2;
|
|
386
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
387
|
+
this.year = a(e2);
|
|
388
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
389
|
+
function l(n2) {
|
|
390
|
+
var r2, i2;
|
|
391
|
+
r2 = n2, i2 = s && s.formats;
|
|
392
|
+
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
|
|
393
|
+
var o3 = r3 && r3.toUpperCase();
|
|
394
|
+
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
|
|
395
|
+
return t3 || n4.slice(1);
|
|
396
|
+
}));
|
|
397
|
+
}))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
398
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
399
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
400
|
+
}
|
|
401
|
+
return function(e2) {
|
|
402
|
+
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
403
|
+
var i3 = o2[n3];
|
|
404
|
+
if ("string" == typeof i3) r3 += i3.length;
|
|
405
|
+
else {
|
|
406
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
407
|
+
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return (function(e3) {
|
|
411
|
+
var t3 = e3.afternoon;
|
|
412
|
+
if (void 0 !== t3) {
|
|
413
|
+
var n4 = e3.hours;
|
|
414
|
+
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
415
|
+
}
|
|
416
|
+
})(t2), t2;
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
return function(e2, t2, n2) {
|
|
420
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
421
|
+
var r2 = t2.prototype, i2 = r2.parse;
|
|
422
|
+
r2.parse = function(e3) {
|
|
423
|
+
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
424
|
+
this.$u = r3;
|
|
425
|
+
var a2 = o2[1];
|
|
426
|
+
if ("string" == typeof a2) {
|
|
427
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
428
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) {
|
|
429
|
+
try {
|
|
430
|
+
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
431
|
+
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;
|
|
432
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
433
|
+
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
434
|
+
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);
|
|
435
|
+
} catch (e5) {
|
|
436
|
+
return /* @__PURE__ */ new Date("");
|
|
437
|
+
}
|
|
438
|
+
})(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 = {};
|
|
439
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
440
|
+
o2[1] = a2[m - 1];
|
|
441
|
+
var M = n2.apply(this, o2);
|
|
442
|
+
if (M.isValid()) {
|
|
443
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
447
|
+
}
|
|
448
|
+
else i2.call(this, e3);
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
}));
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
|
|
349
455
|
// src/Button/PrimaryButton/PrimaryButton.tsx
|
|
350
456
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
351
457
|
function PrimaryButton({
|
|
@@ -967,13 +1073,13 @@ function TextInput({
|
|
|
967
1073
|
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
968
1074
|
label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
|
|
969
1075
|
label,
|
|
970
|
-
required && /* @__PURE__ */ jsx17("span", { className: "text-red-
|
|
1076
|
+
required && /* @__PURE__ */ jsx17("span", { className: "text-red-600", children: "\xA0*" })
|
|
971
1077
|
] }),
|
|
972
1078
|
/* @__PURE__ */ jsxs13(
|
|
973
1079
|
"div",
|
|
974
1080
|
{
|
|
975
1081
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
976
|
-
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-
|
|
1082
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
|
|
977
1083
|
children: [
|
|
978
1084
|
/* @__PURE__ */ jsx17(
|
|
979
1085
|
"input",
|
|
@@ -992,19 +1098,20 @@ function TextInput({
|
|
|
992
1098
|
]
|
|
993
1099
|
}
|
|
994
1100
|
),
|
|
995
|
-
error && /* @__PURE__ */ jsx17("p", { className: "text-red-
|
|
1101
|
+
error && /* @__PURE__ */ jsx17("p", { className: "text-red-600 body-1", children: error })
|
|
996
1102
|
] });
|
|
997
1103
|
}
|
|
998
1104
|
|
|
999
|
-
// src/
|
|
1105
|
+
// src/InputField/InputField.tsx
|
|
1000
1106
|
import { ConfigProvider as ConfigProvider2, Input } from "antd";
|
|
1001
1107
|
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1002
1108
|
function InputField({
|
|
1003
1109
|
value,
|
|
1004
1110
|
onChange,
|
|
1005
1111
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1006
|
-
|
|
1112
|
+
title,
|
|
1007
1113
|
required,
|
|
1114
|
+
bottomText,
|
|
1008
1115
|
disabled,
|
|
1009
1116
|
error,
|
|
1010
1117
|
addonBefore,
|
|
@@ -1023,7 +1130,7 @@ function InputField({
|
|
|
1023
1130
|
},
|
|
1024
1131
|
children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
|
|
1025
1132
|
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1026
|
-
/* @__PURE__ */ jsx18("span", { className: "body-1", children:
|
|
1133
|
+
/* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
|
|
1027
1134
|
" ",
|
|
1028
1135
|
required && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
|
|
1029
1136
|
] }),
|
|
@@ -1042,7 +1149,11 @@ function InputField({
|
|
|
1042
1149
|
onClear
|
|
1043
1150
|
}
|
|
1044
1151
|
),
|
|
1045
|
-
|
|
1152
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1153
|
+
/* @__PURE__ */ jsx18("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1154
|
+
" ",
|
|
1155
|
+
error && /* @__PURE__ */ jsx18("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1156
|
+
] })
|
|
1046
1157
|
] })
|
|
1047
1158
|
}
|
|
1048
1159
|
);
|
|
@@ -1097,83 +1208,21 @@ function TextAreaInput({
|
|
|
1097
1208
|
disabled
|
|
1098
1209
|
}
|
|
1099
1210
|
),
|
|
1100
|
-
error && /* @__PURE__ */ jsx19("p", { className: "text-red-
|
|
1211
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
|
|
1101
1212
|
] })
|
|
1102
1213
|
}
|
|
1103
1214
|
) });
|
|
1104
1215
|
}
|
|
1105
1216
|
|
|
1106
|
-
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1107
|
-
import { ConfigProvider as ConfigProvider4, InputNumber } from "antd";
|
|
1108
|
-
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1109
|
-
function InputFieldNumber({
|
|
1110
|
-
value,
|
|
1111
|
-
onChange,
|
|
1112
|
-
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1113
|
-
title,
|
|
1114
|
-
required,
|
|
1115
|
-
disabled,
|
|
1116
|
-
error,
|
|
1117
|
-
addonBefore,
|
|
1118
|
-
addonAfter,
|
|
1119
|
-
defaultValue,
|
|
1120
|
-
className,
|
|
1121
|
-
max,
|
|
1122
|
-
min,
|
|
1123
|
-
controls,
|
|
1124
|
-
size,
|
|
1125
|
-
changeOnWheel,
|
|
1126
|
-
formatter,
|
|
1127
|
-
parser
|
|
1128
|
-
}) {
|
|
1129
|
-
return /* @__PURE__ */ jsx20(
|
|
1130
|
-
ConfigProvider4,
|
|
1131
|
-
{
|
|
1132
|
-
theme: {
|
|
1133
|
-
token: {
|
|
1134
|
-
fontFamily: "Kanit"
|
|
1135
|
-
}
|
|
1136
|
-
},
|
|
1137
|
-
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1138
|
-
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1139
|
-
/* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
|
|
1140
|
-
" ",
|
|
1141
|
-
required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
|
|
1142
|
-
] }),
|
|
1143
|
-
/* @__PURE__ */ jsx20(
|
|
1144
|
-
InputNumber,
|
|
1145
|
-
{
|
|
1146
|
-
value: value ?? void 0,
|
|
1147
|
-
onChange: (val) => onChange(val),
|
|
1148
|
-
placeholder,
|
|
1149
|
-
disabled,
|
|
1150
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1151
|
-
addonBefore,
|
|
1152
|
-
addonAfter,
|
|
1153
|
-
defaultValue,
|
|
1154
|
-
max,
|
|
1155
|
-
min,
|
|
1156
|
-
controls,
|
|
1157
|
-
size,
|
|
1158
|
-
changeOnWheel,
|
|
1159
|
-
formatter,
|
|
1160
|
-
parser
|
|
1161
|
-
}
|
|
1162
|
-
),
|
|
1163
|
-
error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 caption-1", children: error })
|
|
1164
|
-
] })
|
|
1165
|
-
}
|
|
1166
|
-
);
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
1217
|
// src/ColorPicker/ColorPicker.tsx
|
|
1170
|
-
import { ConfigProvider as
|
|
1171
|
-
import { jsx as
|
|
1218
|
+
import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
|
|
1219
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1172
1220
|
function ColorPickerBasic({
|
|
1173
1221
|
value,
|
|
1174
1222
|
onChange,
|
|
1175
1223
|
required,
|
|
1176
|
-
|
|
1224
|
+
title,
|
|
1225
|
+
bottomText,
|
|
1177
1226
|
error,
|
|
1178
1227
|
disabled,
|
|
1179
1228
|
allowClear,
|
|
@@ -1181,8 +1230,8 @@ function ColorPickerBasic({
|
|
|
1181
1230
|
className,
|
|
1182
1231
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1183
1232
|
}) {
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
|
|
1233
|
+
return /* @__PURE__ */ jsx20(
|
|
1234
|
+
ConfigProvider4,
|
|
1186
1235
|
{
|
|
1187
1236
|
theme: {
|
|
1188
1237
|
token: {
|
|
@@ -1190,13 +1239,13 @@ function ColorPickerBasic({
|
|
|
1190
1239
|
fontSize: 16
|
|
1191
1240
|
}
|
|
1192
1241
|
},
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
/* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1243
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1244
|
+
/* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
|
|
1196
1245
|
" ",
|
|
1197
|
-
required && /* @__PURE__ */
|
|
1246
|
+
required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
|
|
1198
1247
|
] }),
|
|
1199
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ jsx20(
|
|
1200
1249
|
ColorPicker,
|
|
1201
1250
|
{
|
|
1202
1251
|
defaultFormat,
|
|
@@ -1208,9 +1257,9 @@ function ColorPickerBasic({
|
|
|
1208
1257
|
showText: (color) => {
|
|
1209
1258
|
const hex = color.toHexString();
|
|
1210
1259
|
if (!value) {
|
|
1211
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ jsx20("span", { children: placeholder });
|
|
1212
1261
|
}
|
|
1213
|
-
return /* @__PURE__ */
|
|
1262
|
+
return /* @__PURE__ */ jsxs16("span", { children: [
|
|
1214
1263
|
"(",
|
|
1215
1264
|
hex,
|
|
1216
1265
|
")"
|
|
@@ -1219,7 +1268,11 @@ function ColorPickerBasic({
|
|
|
1219
1268
|
disabled
|
|
1220
1269
|
}
|
|
1221
1270
|
),
|
|
1222
|
-
|
|
1271
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1272
|
+
/* @__PURE__ */ jsx20("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1273
|
+
" ",
|
|
1274
|
+
error && /* @__PURE__ */ jsx20("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1275
|
+
] })
|
|
1223
1276
|
] })
|
|
1224
1277
|
}
|
|
1225
1278
|
);
|
|
@@ -1227,33 +1280,16 @@ function ColorPickerBasic({
|
|
|
1227
1280
|
|
|
1228
1281
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1229
1282
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1230
|
-
var
|
|
1231
|
-
import { ConfigProvider as
|
|
1283
|
+
var import_th2 = __toESM(require_th());
|
|
1284
|
+
import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
|
|
1232
1285
|
import thTH from "antd/locale/th_TH";
|
|
1233
|
-
import {
|
|
1234
|
-
import { th as thFns } from "date-fns/locale";
|
|
1235
|
-
|
|
1236
|
-
// src/DatePicker/convertToBuddhist.ts
|
|
1237
|
-
import th from "antd/es/date-picker/locale/th_TH";
|
|
1238
|
-
var buddhistLocale = {
|
|
1239
|
-
...th,
|
|
1240
|
-
lang: {
|
|
1241
|
-
...th.lang,
|
|
1242
|
-
fieldDateFormat: "BBBB-MM-DD",
|
|
1243
|
-
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1244
|
-
yearFormat: "BBBB",
|
|
1245
|
-
cellYearFormat: "BBBB"
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1250
|
-
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1251
|
-
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1286
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1252
1287
|
function DatePickerBasic({
|
|
1253
1288
|
value,
|
|
1254
1289
|
onChange,
|
|
1255
1290
|
required,
|
|
1256
|
-
|
|
1291
|
+
title,
|
|
1292
|
+
bottomText,
|
|
1257
1293
|
error,
|
|
1258
1294
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1259
1295
|
disabled,
|
|
@@ -1264,8 +1300,10 @@ function DatePickerBasic({
|
|
|
1264
1300
|
className,
|
|
1265
1301
|
size
|
|
1266
1302
|
}) {
|
|
1267
|
-
|
|
1268
|
-
|
|
1303
|
+
const dateFormat = "DD/MM/YYYY";
|
|
1304
|
+
import_dayjs.default.locale("th_TH");
|
|
1305
|
+
return /* @__PURE__ */ jsx21(
|
|
1306
|
+
ConfigProvider5,
|
|
1269
1307
|
{
|
|
1270
1308
|
locale: thTH,
|
|
1271
1309
|
theme: {
|
|
@@ -1274,56 +1312,54 @@ function DatePickerBasic({
|
|
|
1274
1312
|
fontSize: 16
|
|
1275
1313
|
}
|
|
1276
1314
|
},
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
|
|
1315
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
1316
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1317
|
+
/* @__PURE__ */ jsx21("span", { className: "body-1", children: title }),
|
|
1318
|
+
" ",
|
|
1319
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1281
1320
|
] }),
|
|
1282
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ jsx21(
|
|
1283
1322
|
DatePicker,
|
|
1284
1323
|
{
|
|
1285
1324
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1286
|
-
value
|
|
1325
|
+
value,
|
|
1287
1326
|
placeholder,
|
|
1288
|
-
onChange
|
|
1289
|
-
onChange(date ? date.toDate() : null);
|
|
1290
|
-
},
|
|
1327
|
+
onChange,
|
|
1291
1328
|
allowClear: true,
|
|
1292
1329
|
disabled,
|
|
1293
|
-
format:
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
|
|
1300
|
-
maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
|
|
1301
|
-
size,
|
|
1302
|
-
locale: buddhistLocale
|
|
1330
|
+
format: dateFormat,
|
|
1331
|
+
defaultValue,
|
|
1332
|
+
minDate,
|
|
1333
|
+
maxDate,
|
|
1334
|
+
disabledDate,
|
|
1335
|
+
size
|
|
1303
1336
|
}
|
|
1304
1337
|
),
|
|
1305
|
-
|
|
1338
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1339
|
+
/* @__PURE__ */ jsx21("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1340
|
+
" ",
|
|
1341
|
+
error && /* @__PURE__ */ jsx21("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1342
|
+
] })
|
|
1306
1343
|
] })
|
|
1307
1344
|
}
|
|
1308
1345
|
);
|
|
1309
1346
|
}
|
|
1310
1347
|
|
|
1311
1348
|
// src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
|
|
1312
|
-
var
|
|
1349
|
+
var import_th3 = __toESM(require_th());
|
|
1350
|
+
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1313
1351
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1314
|
-
|
|
1315
|
-
import { ConfigProvider as ConfigProvider7, DatePicker as DatePicker2 } from "antd";
|
|
1352
|
+
import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
|
|
1316
1353
|
import thTH2 from "antd/locale/th_TH";
|
|
1317
|
-
import {
|
|
1318
|
-
|
|
1319
|
-
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1320
|
-
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1354
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1355
|
+
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1321
1356
|
function DatePickerRangePicker({
|
|
1322
1357
|
value,
|
|
1323
1358
|
onChange,
|
|
1324
1359
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1325
|
-
|
|
1360
|
+
title,
|
|
1326
1361
|
required,
|
|
1362
|
+
bottomText,
|
|
1327
1363
|
error,
|
|
1328
1364
|
disabled,
|
|
1329
1365
|
minDate,
|
|
@@ -1334,8 +1370,10 @@ function DatePickerRangePicker({
|
|
|
1334
1370
|
onOpenChange,
|
|
1335
1371
|
onCalendarChange
|
|
1336
1372
|
}) {
|
|
1337
|
-
|
|
1338
|
-
|
|
1373
|
+
const dateFormat = "DD/MM/YYYY";
|
|
1374
|
+
import_dayjs2.default.locale("th_TH");
|
|
1375
|
+
return /* @__PURE__ */ jsx22(
|
|
1376
|
+
ConfigProvider6,
|
|
1339
1377
|
{
|
|
1340
1378
|
locale: thTH2,
|
|
1341
1379
|
theme: {
|
|
@@ -1344,178 +1382,142 @@ function DatePickerRangePicker({
|
|
|
1344
1382
|
fontSize: 16
|
|
1345
1383
|
}
|
|
1346
1384
|
},
|
|
1347
|
-
children: /* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1385
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
|
|
1386
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1387
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: title }),
|
|
1350
1388
|
" ",
|
|
1351
|
-
required && /* @__PURE__ */
|
|
1389
|
+
required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1352
1390
|
] }),
|
|
1353
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx22(
|
|
1354
1392
|
DatePicker2.RangePicker,
|
|
1355
1393
|
{
|
|
1356
|
-
format:
|
|
1357
|
-
|
|
1358
|
-
(y) => String(parseInt(y) + 543)
|
|
1359
|
-
) : "",
|
|
1360
|
-
value: value ? [
|
|
1361
|
-
value[0] ? (0, import_dayjs2.default)(value[0]) : null,
|
|
1362
|
-
value[1] ? (0, import_dayjs2.default)(value[1]) : null
|
|
1363
|
-
] : null,
|
|
1394
|
+
format: dateFormat,
|
|
1395
|
+
value,
|
|
1364
1396
|
placeholder,
|
|
1365
1397
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1366
|
-
onChange
|
|
1367
|
-
if (!dates) {
|
|
1368
|
-
onChange(null);
|
|
1369
|
-
} else {
|
|
1370
|
-
onChange([
|
|
1371
|
-
dates[0] ? dates[0].toDate() : null,
|
|
1372
|
-
dates[1] ? dates[1].toDate() : null
|
|
1373
|
-
]);
|
|
1374
|
-
}
|
|
1375
|
-
},
|
|
1398
|
+
onChange,
|
|
1376
1399
|
allowClear: true,
|
|
1377
1400
|
disabled,
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1401
|
+
minDate,
|
|
1402
|
+
maxDate,
|
|
1403
|
+
disabledDate,
|
|
1381
1404
|
size,
|
|
1382
1405
|
onOpenChange,
|
|
1383
|
-
onCalendarChange
|
|
1384
|
-
if (!dates) {
|
|
1385
|
-
onCalendarChange?.([null, null], dateStrings, info);
|
|
1386
|
-
} else {
|
|
1387
|
-
onCalendarChange?.(
|
|
1388
|
-
[
|
|
1389
|
-
dates[0] ? dates[0].toDate() : null,
|
|
1390
|
-
dates[1] ? dates[1].toDate() : null
|
|
1391
|
-
],
|
|
1392
|
-
dateStrings,
|
|
1393
|
-
info
|
|
1394
|
-
);
|
|
1395
|
-
}
|
|
1396
|
-
},
|
|
1397
|
-
locale: buddhistLocale
|
|
1406
|
+
onCalendarChange
|
|
1398
1407
|
}
|
|
1399
1408
|
),
|
|
1400
|
-
|
|
1409
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1410
|
+
/* @__PURE__ */ jsx22("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1411
|
+
" ",
|
|
1412
|
+
error && /* @__PURE__ */ jsx22("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1413
|
+
] })
|
|
1401
1414
|
] })
|
|
1402
1415
|
}
|
|
1403
1416
|
);
|
|
1404
1417
|
}
|
|
1405
1418
|
|
|
1406
1419
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1407
|
-
|
|
1408
|
-
import {
|
|
1409
|
-
import thTH3 from "antd/locale/th_TH";
|
|
1410
|
-
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1420
|
+
import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
|
|
1421
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1411
1422
|
function TimePickerBasic({
|
|
1412
1423
|
value,
|
|
1413
1424
|
onChange,
|
|
1414
1425
|
required,
|
|
1415
|
-
|
|
1426
|
+
title,
|
|
1427
|
+
bottomText,
|
|
1416
1428
|
error,
|
|
1417
1429
|
placeholder,
|
|
1418
1430
|
disabled,
|
|
1419
1431
|
className
|
|
1420
1432
|
}) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1422
|
-
|
|
1433
|
+
return /* @__PURE__ */ jsx23(
|
|
1434
|
+
ConfigProvider7,
|
|
1423
1435
|
{
|
|
1424
|
-
locale: thTH3,
|
|
1425
1436
|
theme: {
|
|
1426
1437
|
token: {
|
|
1427
1438
|
fontFamily: "Kanit"
|
|
1428
1439
|
}
|
|
1429
1440
|
},
|
|
1430
|
-
children: /* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1432
|
-
/* @__PURE__ */
|
|
1441
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1442
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1443
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: title }),
|
|
1433
1444
|
" ",
|
|
1434
|
-
required && /* @__PURE__ */
|
|
1445
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1435
1446
|
] }),
|
|
1436
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ jsx23(
|
|
1437
1448
|
TimePicker,
|
|
1438
1449
|
{
|
|
1439
1450
|
format: "HH:mm",
|
|
1440
1451
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1441
|
-
value
|
|
1452
|
+
value,
|
|
1442
1453
|
placeholder,
|
|
1443
|
-
onChange
|
|
1444
|
-
onChange(time ? time.toDate() : null);
|
|
1445
|
-
},
|
|
1454
|
+
onChange,
|
|
1446
1455
|
allowClear: true,
|
|
1447
1456
|
disabled
|
|
1448
1457
|
}
|
|
1449
1458
|
),
|
|
1450
|
-
|
|
1459
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1460
|
+
/* @__PURE__ */ jsx23("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1461
|
+
" ",
|
|
1462
|
+
error && /* @__PURE__ */ jsx23("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1463
|
+
] })
|
|
1451
1464
|
] })
|
|
1452
1465
|
}
|
|
1453
1466
|
);
|
|
1454
1467
|
}
|
|
1455
1468
|
|
|
1456
1469
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1457
|
-
|
|
1458
|
-
import {
|
|
1459
|
-
import thTH4 from "antd/locale/th_TH";
|
|
1460
|
-
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1470
|
+
import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
|
|
1471
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1461
1472
|
function TimePickerRangePicker({
|
|
1462
1473
|
value,
|
|
1463
1474
|
onChange,
|
|
1464
1475
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1465
|
-
|
|
1476
|
+
title,
|
|
1466
1477
|
required,
|
|
1478
|
+
bottomText,
|
|
1467
1479
|
error,
|
|
1468
1480
|
disabled,
|
|
1469
1481
|
className
|
|
1470
1482
|
}) {
|
|
1471
|
-
return /* @__PURE__ */
|
|
1472
|
-
|
|
1483
|
+
return /* @__PURE__ */ jsx24(
|
|
1484
|
+
ConfigProvider8,
|
|
1473
1485
|
{
|
|
1474
|
-
locale: thTH4,
|
|
1475
1486
|
theme: {
|
|
1476
1487
|
token: {
|
|
1477
1488
|
fontFamily: "Kanit"
|
|
1478
1489
|
}
|
|
1479
1490
|
},
|
|
1480
|
-
children: /* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1491
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
1492
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1493
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: title }),
|
|
1483
1494
|
" ",
|
|
1484
|
-
required && /* @__PURE__ */
|
|
1495
|
+
required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
|
|
1485
1496
|
] }),
|
|
1486
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ jsx24(
|
|
1487
1498
|
TimePicker2.RangePicker,
|
|
1488
1499
|
{
|
|
1489
1500
|
format: "HH:mm",
|
|
1490
|
-
value
|
|
1491
|
-
value[0] ? (0, import_dayjs4.default)(value[0]) : null,
|
|
1492
|
-
value[1] ? (0, import_dayjs4.default)(value[1]) : null
|
|
1493
|
-
] : null,
|
|
1501
|
+
value,
|
|
1494
1502
|
placeholder,
|
|
1495
1503
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1496
|
-
onChange
|
|
1497
|
-
if (!dates) {
|
|
1498
|
-
onChange(null);
|
|
1499
|
-
} else {
|
|
1500
|
-
onChange([
|
|
1501
|
-
dates[0] ? dates[0].toDate() : null,
|
|
1502
|
-
dates[1] ? dates[1].toDate() : null
|
|
1503
|
-
]);
|
|
1504
|
-
}
|
|
1505
|
-
},
|
|
1504
|
+
onChange,
|
|
1506
1505
|
allowClear: true,
|
|
1507
|
-
disabled
|
|
1508
|
-
showNow: true
|
|
1506
|
+
disabled
|
|
1509
1507
|
}
|
|
1510
1508
|
),
|
|
1511
|
-
|
|
1509
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1510
|
+
/* @__PURE__ */ jsx24("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1511
|
+
" ",
|
|
1512
|
+
error && /* @__PURE__ */ jsx24("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1513
|
+
] })
|
|
1512
1514
|
] })
|
|
1513
1515
|
}
|
|
1514
1516
|
);
|
|
1515
1517
|
}
|
|
1516
1518
|
|
|
1517
1519
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1518
|
-
import { ConfigProvider as
|
|
1520
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1519
1521
|
|
|
1520
1522
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1521
1523
|
function _typeof(o) {
|
|
@@ -2217,7 +2219,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2217
2219
|
greyDark.primary = greyDark[5];
|
|
2218
2220
|
|
|
2219
2221
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2220
|
-
import { jsx as
|
|
2222
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2221
2223
|
function genPresets(presets = presetPalettes) {
|
|
2222
2224
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2223
2225
|
label,
|
|
@@ -2229,7 +2231,8 @@ function ColorPalettePickerBasic({
|
|
|
2229
2231
|
value,
|
|
2230
2232
|
onChange,
|
|
2231
2233
|
required,
|
|
2232
|
-
|
|
2234
|
+
title,
|
|
2235
|
+
bottomText,
|
|
2233
2236
|
error,
|
|
2234
2237
|
disabled,
|
|
2235
2238
|
allowClear,
|
|
@@ -2244,8 +2247,8 @@ function ColorPalettePickerBasic({
|
|
|
2244
2247
|
red,
|
|
2245
2248
|
green
|
|
2246
2249
|
});
|
|
2247
|
-
return /* @__PURE__ */
|
|
2248
|
-
|
|
2250
|
+
return /* @__PURE__ */ jsx25(
|
|
2251
|
+
ConfigProvider9,
|
|
2249
2252
|
{
|
|
2250
2253
|
theme: {
|
|
2251
2254
|
token: {
|
|
@@ -2253,13 +2256,13 @@ function ColorPalettePickerBasic({
|
|
|
2253
2256
|
fontSize: 16
|
|
2254
2257
|
}
|
|
2255
2258
|
},
|
|
2256
|
-
children: /* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
2260
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2261
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
|
|
2259
2262
|
" ",
|
|
2260
|
-
required && /* @__PURE__ */
|
|
2263
|
+
required && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
2261
2264
|
] }),
|
|
2262
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx25(
|
|
2263
2266
|
ColorPicker2,
|
|
2264
2267
|
{
|
|
2265
2268
|
defaultFormat,
|
|
@@ -2272,9 +2275,9 @@ function ColorPalettePickerBasic({
|
|
|
2272
2275
|
showText: (color) => {
|
|
2273
2276
|
const hex = color.toHexString();
|
|
2274
2277
|
if (!value) {
|
|
2275
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ jsx25("span", { children: placeholder });
|
|
2276
2279
|
}
|
|
2277
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsxs21("span", { children: [
|
|
2278
2281
|
"(",
|
|
2279
2282
|
hex,
|
|
2280
2283
|
")"
|
|
@@ -2284,21 +2287,26 @@ function ColorPalettePickerBasic({
|
|
|
2284
2287
|
onClear
|
|
2285
2288
|
}
|
|
2286
2289
|
),
|
|
2287
|
-
|
|
2290
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2291
|
+
/* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2292
|
+
" ",
|
|
2293
|
+
error && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2294
|
+
] })
|
|
2288
2295
|
] })
|
|
2289
2296
|
}
|
|
2290
2297
|
);
|
|
2291
2298
|
}
|
|
2292
2299
|
|
|
2293
2300
|
// src/Select/SelectField/SelectField.tsx
|
|
2294
|
-
import { Select, ConfigProvider as
|
|
2295
|
-
import { jsx as
|
|
2301
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
2302
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2296
2303
|
function SelectField({
|
|
2297
2304
|
value,
|
|
2298
2305
|
onChange,
|
|
2299
2306
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2300
|
-
|
|
2307
|
+
title,
|
|
2301
2308
|
required,
|
|
2309
|
+
bottomText,
|
|
2302
2310
|
error,
|
|
2303
2311
|
disabled,
|
|
2304
2312
|
defaultValue,
|
|
@@ -2310,8 +2318,8 @@ function SelectField({
|
|
|
2310
2318
|
className,
|
|
2311
2319
|
onClear
|
|
2312
2320
|
}) {
|
|
2313
|
-
return /* @__PURE__ */
|
|
2314
|
-
|
|
2321
|
+
return /* @__PURE__ */ jsx26(
|
|
2322
|
+
ConfigProvider10,
|
|
2315
2323
|
{
|
|
2316
2324
|
theme: {
|
|
2317
2325
|
token: {
|
|
@@ -2319,13 +2327,13 @@ function SelectField({
|
|
|
2319
2327
|
fontSize: 16
|
|
2320
2328
|
}
|
|
2321
2329
|
},
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
/* @__PURE__ */
|
|
2330
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
2331
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2332
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
|
|
2325
2333
|
" ",
|
|
2326
|
-
required && /* @__PURE__ */
|
|
2334
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
2327
2335
|
] }),
|
|
2328
|
-
/* @__PURE__ */
|
|
2336
|
+
/* @__PURE__ */ jsx26(
|
|
2329
2337
|
Select,
|
|
2330
2338
|
{
|
|
2331
2339
|
showSearch: true,
|
|
@@ -2340,26 +2348,43 @@ function SelectField({
|
|
|
2340
2348
|
options,
|
|
2341
2349
|
mode,
|
|
2342
2350
|
onSearch: handleSearch,
|
|
2343
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2351
|
+
prefix: prefix ? /* @__PURE__ */ jsx26(
|
|
2352
|
+
"span",
|
|
2353
|
+
{
|
|
2354
|
+
style: {
|
|
2355
|
+
width: prefixSize,
|
|
2356
|
+
height: prefixSize,
|
|
2357
|
+
display: "flex",
|
|
2358
|
+
alignItems: "center",
|
|
2359
|
+
justifyContent: "center"
|
|
2360
|
+
},
|
|
2361
|
+
children: prefix
|
|
2362
|
+
}
|
|
2363
|
+
) : void 0,
|
|
2344
2364
|
allowClear: true,
|
|
2345
2365
|
onClear
|
|
2346
2366
|
}
|
|
2347
2367
|
),
|
|
2348
|
-
|
|
2368
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2369
|
+
/* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2370
|
+
" ",
|
|
2371
|
+
error && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2372
|
+
] })
|
|
2349
2373
|
] })
|
|
2350
2374
|
}
|
|
2351
2375
|
);
|
|
2352
2376
|
}
|
|
2353
2377
|
|
|
2354
2378
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2355
|
-
import { Select as Select2, ConfigProvider as
|
|
2356
|
-
import { jsx as
|
|
2379
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2380
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2357
2381
|
function SelectFieldGroup({
|
|
2358
2382
|
value,
|
|
2359
2383
|
onChange,
|
|
2360
2384
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2361
|
-
|
|
2385
|
+
title,
|
|
2362
2386
|
required,
|
|
2387
|
+
bottomText,
|
|
2363
2388
|
error,
|
|
2364
2389
|
disabled,
|
|
2365
2390
|
defaultValue,
|
|
@@ -2370,21 +2395,21 @@ function SelectFieldGroup({
|
|
|
2370
2395
|
handleSearch,
|
|
2371
2396
|
className
|
|
2372
2397
|
}) {
|
|
2373
|
-
return /* @__PURE__ */
|
|
2374
|
-
|
|
2398
|
+
return /* @__PURE__ */ jsx27(
|
|
2399
|
+
ConfigProvider11,
|
|
2375
2400
|
{
|
|
2376
2401
|
theme: {
|
|
2377
2402
|
token: {
|
|
2378
2403
|
fontFamily: "Kanit"
|
|
2379
2404
|
}
|
|
2380
2405
|
},
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */
|
|
2406
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
2407
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2408
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
|
|
2384
2409
|
" ",
|
|
2385
|
-
required && /* @__PURE__ */
|
|
2410
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
2386
2411
|
] }),
|
|
2387
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx27(
|
|
2388
2413
|
Select2,
|
|
2389
2414
|
{
|
|
2390
2415
|
showSearch: true,
|
|
@@ -2399,7 +2424,7 @@ function SelectFieldGroup({
|
|
|
2399
2424
|
options,
|
|
2400
2425
|
mode,
|
|
2401
2426
|
onSearch: handleSearch,
|
|
2402
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2427
|
+
prefix: prefix ? /* @__PURE__ */ jsx27(
|
|
2403
2428
|
"span",
|
|
2404
2429
|
{
|
|
2405
2430
|
style: {
|
|
@@ -2415,14 +2440,18 @@ function SelectFieldGroup({
|
|
|
2415
2440
|
allowClear: true
|
|
2416
2441
|
}
|
|
2417
2442
|
),
|
|
2418
|
-
|
|
2443
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2444
|
+
/* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2445
|
+
" ",
|
|
2446
|
+
error && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2447
|
+
] })
|
|
2419
2448
|
] })
|
|
2420
2449
|
}
|
|
2421
2450
|
);
|
|
2422
2451
|
}
|
|
2423
2452
|
|
|
2424
2453
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2425
|
-
import { Select as Select3, ConfigProvider as
|
|
2454
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2426
2455
|
|
|
2427
2456
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2428
2457
|
var status = [
|
|
@@ -2435,21 +2464,22 @@ var status = [
|
|
|
2435
2464
|
|
|
2436
2465
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2437
2466
|
import { DownOutlined } from "@ant-design/icons";
|
|
2438
|
-
import { jsx as
|
|
2467
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2439
2468
|
function SelectFieldStatus({
|
|
2440
2469
|
value,
|
|
2441
2470
|
onChange,
|
|
2442
2471
|
placeholder,
|
|
2443
|
-
|
|
2472
|
+
title,
|
|
2444
2473
|
required,
|
|
2474
|
+
bottomText,
|
|
2445
2475
|
disabled,
|
|
2446
2476
|
error,
|
|
2447
2477
|
options,
|
|
2448
2478
|
className
|
|
2449
2479
|
}) {
|
|
2450
2480
|
const selectedItem = status.find((s) => s.value === value);
|
|
2451
|
-
return /* @__PURE__ */
|
|
2452
|
-
|
|
2481
|
+
return /* @__PURE__ */ jsx28(
|
|
2482
|
+
ConfigProvider12,
|
|
2453
2483
|
{
|
|
2454
2484
|
theme: {
|
|
2455
2485
|
components: {
|
|
@@ -2464,17 +2494,17 @@ function SelectFieldStatus({
|
|
|
2464
2494
|
fontFamily: "Kanit"
|
|
2465
2495
|
}
|
|
2466
2496
|
},
|
|
2467
|
-
children: /* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2469
|
-
/* @__PURE__ */
|
|
2497
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2498
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2499
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
|
|
2470
2500
|
" ",
|
|
2471
|
-
required && /* @__PURE__ */
|
|
2501
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2472
2502
|
] }),
|
|
2473
|
-
/* @__PURE__ */
|
|
2503
|
+
/* @__PURE__ */ jsx28(
|
|
2474
2504
|
Select3,
|
|
2475
2505
|
{
|
|
2476
2506
|
disabled,
|
|
2477
|
-
suffixIcon: /* @__PURE__ */
|
|
2507
|
+
suffixIcon: /* @__PURE__ */ jsx28(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2478
2508
|
value,
|
|
2479
2509
|
onChange,
|
|
2480
2510
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2485,14 +2515,18 @@ function SelectFieldStatus({
|
|
|
2485
2515
|
showSearch: true
|
|
2486
2516
|
}
|
|
2487
2517
|
),
|
|
2488
|
-
|
|
2518
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2519
|
+
/* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2520
|
+
" ",
|
|
2521
|
+
error && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2522
|
+
] })
|
|
2489
2523
|
] })
|
|
2490
2524
|
}
|
|
2491
2525
|
);
|
|
2492
2526
|
}
|
|
2493
2527
|
|
|
2494
2528
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2495
|
-
import { Select as Select4, ConfigProvider as
|
|
2529
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
2496
2530
|
|
|
2497
2531
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2498
2532
|
var status2 = [
|
|
@@ -2502,21 +2536,22 @@ var status2 = [
|
|
|
2502
2536
|
|
|
2503
2537
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2504
2538
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2505
|
-
import { jsx as
|
|
2539
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2506
2540
|
function SelectFieldStatusReport({
|
|
2507
2541
|
value,
|
|
2508
2542
|
onChange,
|
|
2509
2543
|
placeholder,
|
|
2510
|
-
|
|
2544
|
+
title,
|
|
2511
2545
|
required,
|
|
2546
|
+
bottomText,
|
|
2512
2547
|
disabled,
|
|
2513
2548
|
error,
|
|
2514
2549
|
className,
|
|
2515
2550
|
options
|
|
2516
2551
|
}) {
|
|
2517
2552
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2518
|
-
return /* @__PURE__ */
|
|
2519
|
-
|
|
2553
|
+
return /* @__PURE__ */ jsx29(
|
|
2554
|
+
ConfigProvider13,
|
|
2520
2555
|
{
|
|
2521
2556
|
theme: {
|
|
2522
2557
|
components: {
|
|
@@ -2531,17 +2566,17 @@ function SelectFieldStatusReport({
|
|
|
2531
2566
|
fontFamily: "Kanit"
|
|
2532
2567
|
}
|
|
2533
2568
|
},
|
|
2534
|
-
children: /* @__PURE__ */
|
|
2535
|
-
/* @__PURE__ */
|
|
2536
|
-
/* @__PURE__ */
|
|
2569
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2570
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2571
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
|
|
2537
2572
|
" ",
|
|
2538
|
-
required && /* @__PURE__ */
|
|
2573
|
+
required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2539
2574
|
] }),
|
|
2540
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ jsx29(
|
|
2541
2576
|
Select4,
|
|
2542
2577
|
{
|
|
2543
2578
|
disabled,
|
|
2544
|
-
suffixIcon: /* @__PURE__ */
|
|
2579
|
+
suffixIcon: /* @__PURE__ */ jsx29(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2545
2580
|
value,
|
|
2546
2581
|
onChange,
|
|
2547
2582
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2552,19 +2587,24 @@ function SelectFieldStatusReport({
|
|
|
2552
2587
|
showSearch: true
|
|
2553
2588
|
}
|
|
2554
2589
|
),
|
|
2555
|
-
|
|
2590
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2591
|
+
/* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2592
|
+
" ",
|
|
2593
|
+
error && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2594
|
+
] })
|
|
2556
2595
|
] })
|
|
2557
2596
|
}
|
|
2558
2597
|
);
|
|
2559
2598
|
}
|
|
2560
2599
|
|
|
2561
2600
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2562
|
-
import { Select as Select5, ConfigProvider as
|
|
2601
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
2563
2602
|
import { useState as useState6 } from "react";
|
|
2564
|
-
import { jsx as
|
|
2603
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2565
2604
|
function SelectFieldTag({
|
|
2566
|
-
|
|
2605
|
+
title,
|
|
2567
2606
|
required,
|
|
2607
|
+
bottomText,
|
|
2568
2608
|
placeholder,
|
|
2569
2609
|
options,
|
|
2570
2610
|
error,
|
|
@@ -2594,21 +2634,21 @@ function SelectFieldTag({
|
|
|
2594
2634
|
}
|
|
2595
2635
|
onChange?.([]);
|
|
2596
2636
|
};
|
|
2597
|
-
return /* @__PURE__ */
|
|
2598
|
-
|
|
2637
|
+
return /* @__PURE__ */ jsx30(
|
|
2638
|
+
ConfigProvider14,
|
|
2599
2639
|
{
|
|
2600
2640
|
theme: {
|
|
2601
2641
|
token: {
|
|
2602
2642
|
fontFamily: "Kanit"
|
|
2603
2643
|
}
|
|
2604
2644
|
},
|
|
2605
|
-
children: /* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
2645
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2646
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2647
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: title }),
|
|
2608
2648
|
" ",
|
|
2609
|
-
required && /* @__PURE__ */
|
|
2649
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2610
2650
|
] }),
|
|
2611
|
-
/* @__PURE__ */
|
|
2651
|
+
/* @__PURE__ */ jsx30(
|
|
2612
2652
|
Select5,
|
|
2613
2653
|
{
|
|
2614
2654
|
mode: "tags",
|
|
@@ -2627,7 +2667,11 @@ function SelectFieldTag({
|
|
|
2627
2667
|
onClear
|
|
2628
2668
|
}
|
|
2629
2669
|
),
|
|
2630
|
-
|
|
2670
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2671
|
+
/* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2672
|
+
" ",
|
|
2673
|
+
error && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2674
|
+
] })
|
|
2631
2675
|
] })
|
|
2632
2676
|
}
|
|
2633
2677
|
);
|
|
@@ -2635,15 +2679,16 @@ function SelectFieldTag({
|
|
|
2635
2679
|
|
|
2636
2680
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2637
2681
|
import { IconTrash } from "@tabler/icons-react";
|
|
2638
|
-
import { Select as Select6, ConfigProvider as
|
|
2682
|
+
import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
|
|
2639
2683
|
import { useState as useState7 } from "react";
|
|
2640
|
-
import { jsx as
|
|
2684
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2641
2685
|
function SelectCustom({
|
|
2642
|
-
|
|
2686
|
+
title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2643
2687
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
2644
2688
|
options,
|
|
2645
2689
|
required = false,
|
|
2646
2690
|
onChange,
|
|
2691
|
+
bottomText,
|
|
2647
2692
|
error,
|
|
2648
2693
|
onClear
|
|
2649
2694
|
}) {
|
|
@@ -2666,8 +2711,8 @@ function SelectCustom({
|
|
|
2666
2711
|
});
|
|
2667
2712
|
};
|
|
2668
2713
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2669
|
-
return /* @__PURE__ */
|
|
2670
|
-
|
|
2714
|
+
return /* @__PURE__ */ jsx31(
|
|
2715
|
+
ConfigProvider15,
|
|
2671
2716
|
{
|
|
2672
2717
|
theme: {
|
|
2673
2718
|
token: {
|
|
@@ -2675,13 +2720,13 @@ function SelectCustom({
|
|
|
2675
2720
|
fontSize: 16
|
|
2676
2721
|
}
|
|
2677
2722
|
},
|
|
2678
|
-
children: /* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2723
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
|
|
2724
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
2725
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: title }),
|
|
2681
2726
|
" ",
|
|
2682
|
-
required && /* @__PURE__ */
|
|
2727
|
+
required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2683
2728
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
2729
|
+
/* @__PURE__ */ jsx31(
|
|
2685
2730
|
Select6,
|
|
2686
2731
|
{
|
|
2687
2732
|
value,
|
|
@@ -2692,37 +2737,28 @@ function SelectCustom({
|
|
|
2692
2737
|
onClear
|
|
2693
2738
|
}
|
|
2694
2739
|
),
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
"
|
|
2698
|
-
{
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
{
|
|
2711
|
-
className: "cursor-pointer",
|
|
2712
|
-
onClick: () => handleDelete(v)
|
|
2713
|
-
}
|
|
2714
|
-
)
|
|
2715
|
-
]
|
|
2716
|
-
},
|
|
2717
|
-
index
|
|
2718
|
-
)) })
|
|
2740
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
2741
|
+
/* @__PURE__ */ jsx31("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2742
|
+
" ",
|
|
2743
|
+
error && /* @__PURE__ */ jsx31("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2744
|
+
] }),
|
|
2745
|
+
/* @__PURE__ */ jsx31("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs27("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2746
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2747
|
+
/* @__PURE__ */ jsxs27("p", { children: [
|
|
2748
|
+
index + 1,
|
|
2749
|
+
"."
|
|
2750
|
+
] }),
|
|
2751
|
+
/* @__PURE__ */ jsx31("p", { children: v })
|
|
2752
|
+
] }),
|
|
2753
|
+
/* @__PURE__ */ jsx31(IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2754
|
+
] }, index)) })
|
|
2719
2755
|
] })
|
|
2720
2756
|
}
|
|
2721
2757
|
);
|
|
2722
2758
|
}
|
|
2723
2759
|
|
|
2724
2760
|
// src/SortFilter/SortFilter.tsx
|
|
2725
|
-
import { ConfigProvider as
|
|
2761
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2726
2762
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
2727
2763
|
|
|
2728
2764
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2755,7 +2791,7 @@ var quarters = [
|
|
|
2755
2791
|
// src/SortFilter/SortFilter.tsx
|
|
2756
2792
|
import { useState as useState8 } from "react";
|
|
2757
2793
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
2758
|
-
import { jsx as
|
|
2794
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2759
2795
|
function SortFilter({
|
|
2760
2796
|
showYear = true,
|
|
2761
2797
|
showQuarter = true,
|
|
@@ -2766,20 +2802,20 @@ function SortFilter({
|
|
|
2766
2802
|
const [yearValue, setYearValue] = useState8();
|
|
2767
2803
|
const [monthValue, setMonthValue] = useState8();
|
|
2768
2804
|
const [quarterValue, setQuartersValue] = useState8();
|
|
2769
|
-
return /* @__PURE__ */
|
|
2770
|
-
|
|
2805
|
+
return /* @__PURE__ */ jsx32(
|
|
2806
|
+
ConfigProvider16,
|
|
2771
2807
|
{
|
|
2772
2808
|
theme: {
|
|
2773
2809
|
token: {
|
|
2774
2810
|
fontFamily: "Kanit"
|
|
2775
2811
|
}
|
|
2776
2812
|
},
|
|
2777
|
-
children: /* @__PURE__ */
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
showYear && /* @__PURE__ */
|
|
2813
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "w-full flex items-center justify-between", children: [
|
|
2814
|
+
/* @__PURE__ */ jsxs28("div", { className: "w-full flex gap-[10px]", children: [
|
|
2815
|
+
showYear && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2780
2816
|
SelectField,
|
|
2781
2817
|
{
|
|
2782
|
-
prefix: /* @__PURE__ */
|
|
2818
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2783
2819
|
onChange: setYearValue,
|
|
2784
2820
|
options: years.map((s) => ({
|
|
2785
2821
|
value: s.value,
|
|
@@ -2789,10 +2825,10 @@ function SortFilter({
|
|
|
2789
2825
|
value: yearValue
|
|
2790
2826
|
}
|
|
2791
2827
|
) }),
|
|
2792
|
-
showMonth && /* @__PURE__ */
|
|
2828
|
+
showMonth && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2793
2829
|
SelectField,
|
|
2794
2830
|
{
|
|
2795
|
-
prefix: /* @__PURE__ */
|
|
2831
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2796
2832
|
onChange: setMonthValue,
|
|
2797
2833
|
options: months.map((s) => ({
|
|
2798
2834
|
value: s.value,
|
|
@@ -2802,10 +2838,10 @@ function SortFilter({
|
|
|
2802
2838
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2803
2839
|
}
|
|
2804
2840
|
) }),
|
|
2805
|
-
showQuarter && /* @__PURE__ */
|
|
2841
|
+
showQuarter && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2806
2842
|
SelectField,
|
|
2807
2843
|
{
|
|
2808
|
-
prefix: /* @__PURE__ */
|
|
2844
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2809
2845
|
onChange: setQuartersValue,
|
|
2810
2846
|
options: quarters.map((s) => ({
|
|
2811
2847
|
value: s.value,
|
|
@@ -2816,8 +2852,8 @@ function SortFilter({
|
|
|
2816
2852
|
}
|
|
2817
2853
|
) })
|
|
2818
2854
|
] }),
|
|
2819
|
-
/* @__PURE__ */
|
|
2820
|
-
/* @__PURE__ */
|
|
2855
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex gap-[10px]", children: [
|
|
2856
|
+
/* @__PURE__ */ jsx32(
|
|
2821
2857
|
IconSortDescending2,
|
|
2822
2858
|
{
|
|
2823
2859
|
size: 24,
|
|
@@ -2825,7 +2861,7 @@ function SortFilter({
|
|
|
2825
2861
|
onClick: onSortClick
|
|
2826
2862
|
}
|
|
2827
2863
|
),
|
|
2828
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ jsx32(
|
|
2829
2865
|
IconFilter,
|
|
2830
2866
|
{
|
|
2831
2867
|
size: 24,
|
|
@@ -2842,7 +2878,7 @@ function SortFilter({
|
|
|
2842
2878
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2843
2879
|
import { IconPaperclip, IconUpload, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
2844
2880
|
import { useRef as useRef2, useState as useState9 } from "react";
|
|
2845
|
-
import { Fragment as Fragment5, jsx as
|
|
2881
|
+
import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2846
2882
|
function FileUploader({
|
|
2847
2883
|
onUpload,
|
|
2848
2884
|
onError,
|
|
@@ -2875,7 +2911,7 @@ function FileUploader({
|
|
|
2875
2911
|
const handleRemoveFile = async (index) => {
|
|
2876
2912
|
try {
|
|
2877
2913
|
if (onRemove) {
|
|
2878
|
-
await onRemove(
|
|
2914
|
+
await onRemove();
|
|
2879
2915
|
}
|
|
2880
2916
|
const updatedList = [...fileList];
|
|
2881
2917
|
updatedList.splice(index, 1);
|
|
@@ -2913,10 +2949,10 @@ function FileUploader({
|
|
|
2913
2949
|
}
|
|
2914
2950
|
if (inputRef.current) inputRef.current.value = "";
|
|
2915
2951
|
};
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
label && /* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
mode === "upload" ? /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ jsxs29("div", { className: "w-full", children: [
|
|
2953
|
+
label && /* @__PURE__ */ jsx33("p", { className: "body-1", children: label }),
|
|
2954
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
2955
|
+
mode === "upload" ? /* @__PURE__ */ jsx33(
|
|
2920
2956
|
"button",
|
|
2921
2957
|
{
|
|
2922
2958
|
type: "button",
|
|
@@ -2924,15 +2960,15 @@ function FileUploader({
|
|
|
2924
2960
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2925
2961
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2926
2962
|
disabled: disabled ? disabled : uploading,
|
|
2927
|
-
children: uploading ? /* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2963
|
+
children: uploading ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
2964
|
+
/* @__PURE__ */ jsx33(Loader, { size: 15 }),
|
|
2929
2965
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2930
|
-
] }) : /* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
2966
|
+
] }) : /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
2967
|
+
/* @__PURE__ */ jsx33(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2932
2968
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2933
2969
|
] })
|
|
2934
2970
|
}
|
|
2935
|
-
) : /* @__PURE__ */
|
|
2971
|
+
) : /* @__PURE__ */ jsx33(
|
|
2936
2972
|
"div",
|
|
2937
2973
|
{
|
|
2938
2974
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -2946,17 +2982,17 @@ function FileUploader({
|
|
|
2946
2982
|
},
|
|
2947
2983
|
onDragLeave: () => setDragActive(false),
|
|
2948
2984
|
onDrop: handleDrop,
|
|
2949
|
-
children: uploading ? /* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
2985
|
+
children: uploading ? /* @__PURE__ */ jsxs29("div", { className: "flex justify-center items-center gap-2", children: [
|
|
2986
|
+
/* @__PURE__ */ jsx33(Loader, { size: 15 }),
|
|
2951
2987
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2952
|
-
] }) : /* @__PURE__ */
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2988
|
+
] }) : /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2989
|
+
/* @__PURE__ */ jsx33(IconUpload, { size: 20 }),
|
|
2990
|
+
/* @__PURE__ */ jsx33("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" }),
|
|
2991
|
+
/* @__PURE__ */ jsx33("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" })
|
|
2956
2992
|
] })
|
|
2957
2993
|
}
|
|
2958
2994
|
),
|
|
2959
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ jsx33(
|
|
2960
2996
|
"input",
|
|
2961
2997
|
{
|
|
2962
2998
|
type: "file",
|
|
@@ -2969,13 +3005,13 @@ function FileUploader({
|
|
|
2969
3005
|
}
|
|
2970
3006
|
)
|
|
2971
3007
|
] }),
|
|
2972
|
-
description && /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
3008
|
+
description && /* @__PURE__ */ jsx33("p", { className: "text-gray-400 body-4", children: description }),
|
|
3009
|
+
/* @__PURE__ */ jsx33("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
3010
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
3011
|
+
/* @__PURE__ */ jsx33("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx33(IconPaperclip, { size: 15 }) }),
|
|
3012
|
+
/* @__PURE__ */ jsx33("span", { className: "truncate", children: file.name })
|
|
2977
3013
|
] }),
|
|
2978
|
-
/* @__PURE__ */
|
|
3014
|
+
/* @__PURE__ */ jsx33(
|
|
2979
3015
|
IconTrash2,
|
|
2980
3016
|
{
|
|
2981
3017
|
size: 20,
|
|
@@ -3009,9 +3045,9 @@ function messageLoading(content, duration) {
|
|
|
3009
3045
|
}
|
|
3010
3046
|
|
|
3011
3047
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3012
|
-
import { ConfigProvider as
|
|
3048
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
3013
3049
|
import { Breadcrumb } from "antd";
|
|
3014
|
-
import { jsx as
|
|
3050
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3015
3051
|
function Breadcrumbs({
|
|
3016
3052
|
items,
|
|
3017
3053
|
separator,
|
|
@@ -3019,15 +3055,15 @@ function Breadcrumbs({
|
|
|
3019
3055
|
classname,
|
|
3020
3056
|
params
|
|
3021
3057
|
}) {
|
|
3022
|
-
return /* @__PURE__ */
|
|
3023
|
-
|
|
3058
|
+
return /* @__PURE__ */ jsx34(
|
|
3059
|
+
ConfigProvider17,
|
|
3024
3060
|
{
|
|
3025
3061
|
theme: {
|
|
3026
3062
|
token: {
|
|
3027
3063
|
fontFamily: "Kanit"
|
|
3028
3064
|
}
|
|
3029
3065
|
},
|
|
3030
|
-
children: /* @__PURE__ */
|
|
3066
|
+
children: /* @__PURE__ */ jsx34(
|
|
3031
3067
|
Breadcrumb,
|
|
3032
3068
|
{
|
|
3033
3069
|
items,
|
|
@@ -3042,8 +3078,8 @@ function Breadcrumbs({
|
|
|
3042
3078
|
}
|
|
3043
3079
|
|
|
3044
3080
|
// src/HeadingPage/HeadingPage.tsx
|
|
3045
|
-
import { ConfigProvider as
|
|
3046
|
-
import { jsx as
|
|
3081
|
+
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
3082
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3047
3083
|
function HeadingPage({ Heading }) {
|
|
3048
3084
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3049
3085
|
weekday: "long",
|
|
@@ -3051,17 +3087,17 @@ function HeadingPage({ Heading }) {
|
|
|
3051
3087
|
month: "long",
|
|
3052
3088
|
year: "numeric"
|
|
3053
3089
|
});
|
|
3054
|
-
return /* @__PURE__ */
|
|
3055
|
-
|
|
3090
|
+
return /* @__PURE__ */ jsx35(
|
|
3091
|
+
ConfigProvider18,
|
|
3056
3092
|
{
|
|
3057
3093
|
theme: {
|
|
3058
3094
|
token: {
|
|
3059
3095
|
fontFamily: "Kanit"
|
|
3060
3096
|
}
|
|
3061
3097
|
},
|
|
3062
|
-
children: /* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3098
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3099
|
+
/* @__PURE__ */ jsx35("p", { className: "headline-5", children: Heading }),
|
|
3100
|
+
/* @__PURE__ */ jsxs30("p", { className: "body-1", children: [
|
|
3065
3101
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3066
3102
|
today
|
|
3067
3103
|
] })
|
|
@@ -3071,9 +3107,9 @@ function HeadingPage({ Heading }) {
|
|
|
3071
3107
|
}
|
|
3072
3108
|
|
|
3073
3109
|
// src/Progress/ProgressBar.tsx
|
|
3074
|
-
import { ConfigProvider as
|
|
3110
|
+
import { ConfigProvider as ConfigProvider19, Progress } from "antd";
|
|
3075
3111
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState10 } from "react";
|
|
3076
|
-
import { jsx as
|
|
3112
|
+
import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3077
3113
|
function ProgressBar({
|
|
3078
3114
|
percent = 0,
|
|
3079
3115
|
size = "default",
|
|
@@ -3106,16 +3142,16 @@ function ProgressBar({
|
|
|
3106
3142
|
observer.observe(inner);
|
|
3107
3143
|
return () => observer.disconnect();
|
|
3108
3144
|
}, []);
|
|
3109
|
-
return /* @__PURE__ */
|
|
3110
|
-
|
|
3145
|
+
return /* @__PURE__ */ jsx36(
|
|
3146
|
+
ConfigProvider19,
|
|
3111
3147
|
{
|
|
3112
3148
|
theme: {
|
|
3113
3149
|
token: {
|
|
3114
3150
|
fontFamily: "Kanit"
|
|
3115
3151
|
}
|
|
3116
3152
|
},
|
|
3117
|
-
children: /* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3153
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3154
|
+
/* @__PURE__ */ jsx36(
|
|
3119
3155
|
Progress,
|
|
3120
3156
|
{
|
|
3121
3157
|
className: "w-full",
|
|
@@ -3131,7 +3167,7 @@ function ProgressBar({
|
|
|
3131
3167
|
strokeColor
|
|
3132
3168
|
}
|
|
3133
3169
|
),
|
|
3134
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3170
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx36(
|
|
3135
3171
|
"div",
|
|
3136
3172
|
{
|
|
3137
3173
|
className: "checkpoint absolute top-0",
|
|
@@ -3153,7 +3189,7 @@ function ProgressBar({
|
|
|
3153
3189
|
}
|
|
3154
3190
|
|
|
3155
3191
|
// src/KpiSection/KpiSection.tsx
|
|
3156
|
-
import { ConfigProvider as
|
|
3192
|
+
import { ConfigProvider as ConfigProvider20, message } from "antd";
|
|
3157
3193
|
import { useEffect as useEffect3, useState as useState12 } from "react";
|
|
3158
3194
|
|
|
3159
3195
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3303,14 +3339,8 @@ function useGetKpiSection() {
|
|
|
3303
3339
|
}
|
|
3304
3340
|
|
|
3305
3341
|
// src/KpiSection/KpiSection.tsx
|
|
3306
|
-
import {
|
|
3307
|
-
|
|
3308
|
-
IconCirclePlus,
|
|
3309
|
-
IconPencil,
|
|
3310
|
-
IconTrash as IconTrash3,
|
|
3311
|
-
IconX as IconX2
|
|
3312
|
-
} from "@tabler/icons-react";
|
|
3313
|
-
import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3342
|
+
import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
|
|
3343
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3314
3344
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3315
3345
|
const {
|
|
3316
3346
|
handleAddKpi,
|
|
@@ -3340,8 +3370,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3340
3370
|
onChangeKpiList(kpiList);
|
|
3341
3371
|
}
|
|
3342
3372
|
}, [kpiList]);
|
|
3343
|
-
return /* @__PURE__ */
|
|
3344
|
-
|
|
3373
|
+
return /* @__PURE__ */ jsx37(
|
|
3374
|
+
ConfigProvider20,
|
|
3345
3375
|
{
|
|
3346
3376
|
theme: {
|
|
3347
3377
|
token: {
|
|
@@ -3349,27 +3379,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3349
3379
|
fontSize: 16
|
|
3350
3380
|
}
|
|
3351
3381
|
},
|
|
3352
|
-
children: /* @__PURE__ */
|
|
3382
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "container-input", children: [
|
|
3353
3383
|
messageContainer,
|
|
3354
|
-
type === "number" && /* @__PURE__ */
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
/* @__PURE__ */
|
|
3384
|
+
type === "number" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
|
|
3385
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3386
|
+
/* @__PURE__ */ jsx37(
|
|
3357
3387
|
InputField,
|
|
3358
3388
|
{
|
|
3359
3389
|
value: nameKpi,
|
|
3360
|
-
|
|
3390
|
+
title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3361
3391
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3392
|
+
required: true,
|
|
3362
3393
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3363
3394
|
className: "h-[32px]",
|
|
3364
3395
|
error: errors.nameKpi
|
|
3365
3396
|
}
|
|
3366
3397
|
),
|
|
3367
|
-
/* @__PURE__ */
|
|
3398
|
+
/* @__PURE__ */ jsx37(
|
|
3368
3399
|
InputField,
|
|
3369
3400
|
{
|
|
3370
3401
|
value: kpiValue,
|
|
3371
|
-
|
|
3402
|
+
title: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3372
3403
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3404
|
+
required: true,
|
|
3373
3405
|
onChange: (value) => {
|
|
3374
3406
|
if (value === void 0 || value === "") {
|
|
3375
3407
|
setKpiValue("");
|
|
@@ -3387,71 +3419,60 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3387
3419
|
error: errors.kpiValue
|
|
3388
3420
|
}
|
|
3389
3421
|
),
|
|
3390
|
-
/* @__PURE__ */
|
|
3422
|
+
/* @__PURE__ */ jsx37(
|
|
3391
3423
|
InputField,
|
|
3392
3424
|
{
|
|
3393
3425
|
value: unitValue,
|
|
3394
|
-
|
|
3426
|
+
title: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3395
3427
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3428
|
+
required: true,
|
|
3396
3429
|
onChange: (value) => setUnitValue(value ?? ""),
|
|
3397
3430
|
className: "h-[32px]",
|
|
3398
3431
|
error: errors.unitValue
|
|
3399
3432
|
}
|
|
3400
3433
|
),
|
|
3401
|
-
/* @__PURE__ */
|
|
3402
|
-
|
|
3434
|
+
/* @__PURE__ */ jsx37("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx37(
|
|
3435
|
+
IconCirclePlus,
|
|
3403
3436
|
{
|
|
3404
|
-
className:
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
{
|
|
3408
|
-
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
3409
|
-
stroke: 1,
|
|
3410
|
-
onClick: () => handleAddKpi(type)
|
|
3411
|
-
}
|
|
3412
|
-
)
|
|
3437
|
+
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
3438
|
+
stroke: 1,
|
|
3439
|
+
onClick: () => handleAddKpi(type)
|
|
3413
3440
|
}
|
|
3414
|
-
)
|
|
3441
|
+
) })
|
|
3415
3442
|
] }),
|
|
3416
|
-
/* @__PURE__ */
|
|
3443
|
+
/* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
|
|
3417
3444
|
"div",
|
|
3418
3445
|
{
|
|
3419
3446
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3420
3447
|
children: [
|
|
3421
|
-
/* @__PURE__ */
|
|
3448
|
+
/* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3422
3449
|
index + 1,
|
|
3423
3450
|
"."
|
|
3424
3451
|
] }),
|
|
3425
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
3452
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
3453
|
+
/* @__PURE__ */ jsx37(
|
|
3427
3454
|
InputField,
|
|
3428
3455
|
{
|
|
3429
3456
|
value: kpi.name,
|
|
3430
3457
|
onChange: (value) => setKpiList(
|
|
3431
|
-
(prev) => prev.map(
|
|
3432
|
-
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3433
|
-
)
|
|
3458
|
+
(prev) => prev.map((item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item)
|
|
3434
3459
|
),
|
|
3435
3460
|
error: itemErrors[kpi.id]?.name
|
|
3436
3461
|
}
|
|
3437
3462
|
),
|
|
3438
|
-
/* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ jsx37(
|
|
3439
3464
|
InputField,
|
|
3440
3465
|
{
|
|
3441
3466
|
value: kpi.value?.toString(),
|
|
3442
3467
|
onChange: (value) => {
|
|
3443
3468
|
if (value === void 0 || value === "") {
|
|
3444
3469
|
setKpiList(
|
|
3445
|
-
(prev) => prev.map(
|
|
3446
|
-
(item) => item.id === kpi.id ? { ...item, value: "" } : item
|
|
3447
|
-
)
|
|
3470
|
+
(prev) => prev.map((item) => item.id === kpi.id ? { ...item, value: "" } : item)
|
|
3448
3471
|
);
|
|
3449
3472
|
setHasShownError(false);
|
|
3450
3473
|
} else if (/^\d*\.?\d*$/.test(value)) {
|
|
3451
3474
|
setKpiList(
|
|
3452
|
-
(prev) => prev.map(
|
|
3453
|
-
(item) => item.id === kpi.id ? { ...item, value } : item
|
|
3454
|
-
)
|
|
3475
|
+
(prev) => prev.map((item) => item.id === kpi.id ? { ...item, value } : item)
|
|
3455
3476
|
);
|
|
3456
3477
|
setHasShownError(false);
|
|
3457
3478
|
} else {
|
|
@@ -3464,59 +3485,39 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3464
3485
|
error: itemErrors[kpi.id]?.value
|
|
3465
3486
|
}
|
|
3466
3487
|
),
|
|
3467
|
-
/* @__PURE__ */
|
|
3488
|
+
/* @__PURE__ */ jsx37(
|
|
3468
3489
|
InputField,
|
|
3469
3490
|
{
|
|
3470
3491
|
value: kpi.unit,
|
|
3471
3492
|
onChange: (value) => setKpiList(
|
|
3472
|
-
(prev) => prev.map(
|
|
3473
|
-
(item) => item.id === kpi.id ? { ...item, unit: value ?? "" } : item
|
|
3474
|
-
)
|
|
3493
|
+
(prev) => prev.map((item) => item.id === kpi.id ? { ...item, unit: value ?? "" } : item)
|
|
3475
3494
|
),
|
|
3476
3495
|
error: itemErrors[kpi.id]?.unit
|
|
3477
3496
|
}
|
|
3478
3497
|
),
|
|
3479
|
-
/* @__PURE__ */
|
|
3498
|
+
/* @__PURE__ */ jsxs32(
|
|
3480
3499
|
"div",
|
|
3481
3500
|
{
|
|
3482
3501
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3483
3502
|
children: [
|
|
3484
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ jsx37(
|
|
3485
3504
|
IconCheck2,
|
|
3486
3505
|
{
|
|
3487
3506
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3488
3507
|
onClick: () => handleSave(kpi.id, type)
|
|
3489
3508
|
}
|
|
3490
3509
|
),
|
|
3491
|
-
/* @__PURE__ */
|
|
3492
|
-
IconX2,
|
|
3493
|
-
{
|
|
3494
|
-
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3495
|
-
onClick: () => handleCancel(kpi.id)
|
|
3496
|
-
}
|
|
3497
|
-
)
|
|
3510
|
+
/* @__PURE__ */ jsx37(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3498
3511
|
]
|
|
3499
3512
|
}
|
|
3500
3513
|
)
|
|
3501
|
-
] }) : /* @__PURE__ */
|
|
3502
|
-
/* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
/* @__PURE__ */
|
|
3506
|
-
/* @__PURE__ */
|
|
3507
|
-
|
|
3508
|
-
{
|
|
3509
|
-
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3510
|
-
onClick: () => handleEdit(kpi.id)
|
|
3511
|
-
}
|
|
3512
|
-
),
|
|
3513
|
-
/* @__PURE__ */ jsx38(
|
|
3514
|
-
IconTrash3,
|
|
3515
|
-
{
|
|
3516
|
-
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3517
|
-
onClick: () => handleDelete(kpi.id)
|
|
3518
|
-
}
|
|
3519
|
-
)
|
|
3514
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
3515
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
|
|
3516
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.value }),
|
|
3517
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.unit }),
|
|
3518
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
|
|
3519
|
+
/* @__PURE__ */ jsx37(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3520
|
+
/* @__PURE__ */ jsx37(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3520
3521
|
] })
|
|
3521
3522
|
] })
|
|
3522
3523
|
]
|
|
@@ -3524,101 +3525,69 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3524
3525
|
kpi.id
|
|
3525
3526
|
)) })
|
|
3526
3527
|
] }),
|
|
3527
|
-
type === "text" && /* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3528
|
+
type === "text" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
|
|
3529
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3530
|
+
/* @__PURE__ */ jsx37(
|
|
3530
3531
|
InputField,
|
|
3531
3532
|
{
|
|
3532
3533
|
value: nameKpi,
|
|
3533
|
-
|
|
3534
|
+
title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3534
3535
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3536
|
+
required: true,
|
|
3535
3537
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3536
3538
|
className: "h-[32px]",
|
|
3537
3539
|
error: errors.nameKpi
|
|
3538
3540
|
}
|
|
3539
3541
|
),
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
|
|
3542
|
+
/* @__PURE__ */ jsx37("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx37(
|
|
3543
|
+
IconCirclePlus,
|
|
3542
3544
|
{
|
|
3543
|
-
className:
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
{
|
|
3547
|
-
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
3548
|
-
stroke: 1,
|
|
3549
|
-
onClick: () => handleAddKpi(type)
|
|
3550
|
-
}
|
|
3551
|
-
)
|
|
3545
|
+
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
3546
|
+
stroke: 1,
|
|
3547
|
+
onClick: () => handleAddKpi(type)
|
|
3552
3548
|
}
|
|
3553
|
-
)
|
|
3549
|
+
) })
|
|
3554
3550
|
] }),
|
|
3555
|
-
/* @__PURE__ */
|
|
3556
|
-
"
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
{
|
|
3568
|
-
value: kpi.name,
|
|
3569
|
-
onChange: (value) => setKpiList(
|
|
3570
|
-
(prev) => prev.map(
|
|
3571
|
-
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3572
|
-
)
|
|
3573
|
-
),
|
|
3574
|
-
error: itemErrors[kpi.id]?.name
|
|
3575
|
-
}
|
|
3551
|
+
/* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3552
|
+
/* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3553
|
+
index + 1,
|
|
3554
|
+
"."
|
|
3555
|
+
] }),
|
|
3556
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
3557
|
+
/* @__PURE__ */ jsx37(
|
|
3558
|
+
InputField,
|
|
3559
|
+
{
|
|
3560
|
+
value: kpi.name,
|
|
3561
|
+
onChange: (value) => setKpiList(
|
|
3562
|
+
(prev) => prev.map((item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item)
|
|
3576
3563
|
),
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
}
|
|
3588
|
-
),
|
|
3589
|
-
/* @__PURE__ */ jsx38(
|
|
3590
|
-
IconX2,
|
|
3591
|
-
{
|
|
3592
|
-
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3593
|
-
onClick: () => handleCancel(kpi.id)
|
|
3594
|
-
}
|
|
3595
|
-
)
|
|
3596
|
-
]
|
|
3597
|
-
}
|
|
3598
|
-
)
|
|
3599
|
-
] }) : /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
3600
|
-
/* @__PURE__ */ jsx38("p", { className: "body-1", children: kpi.name }),
|
|
3601
|
-
/* @__PURE__ */ jsxs33("div", { className: "flex gap-3 justify-end", children: [
|
|
3602
|
-
/* @__PURE__ */ jsx38(
|
|
3603
|
-
IconPencil,
|
|
3564
|
+
error: itemErrors[kpi.id]?.name
|
|
3565
|
+
}
|
|
3566
|
+
),
|
|
3567
|
+
/* @__PURE__ */ jsxs32(
|
|
3568
|
+
"div",
|
|
3569
|
+
{
|
|
3570
|
+
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3571
|
+
children: [
|
|
3572
|
+
/* @__PURE__ */ jsx37(
|
|
3573
|
+
IconCheck2,
|
|
3604
3574
|
{
|
|
3605
3575
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3606
|
-
onClick: () =>
|
|
3576
|
+
onClick: () => handleSave(kpi.id, type)
|
|
3607
3577
|
}
|
|
3608
3578
|
),
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
] })
|
|
3618
|
-
]
|
|
3619
|
-
}
|
|
3620
|
-
|
|
3621
|
-
)) })
|
|
3579
|
+
/* @__PURE__ */ jsx37(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3580
|
+
]
|
|
3581
|
+
}
|
|
3582
|
+
)
|
|
3583
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
3584
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
|
|
3585
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
|
|
3586
|
+
/* @__PURE__ */ jsx37(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3587
|
+
/* @__PURE__ */ jsx37(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3588
|
+
] })
|
|
3589
|
+
] })
|
|
3590
|
+
] }, kpi.id)) })
|
|
3622
3591
|
] })
|
|
3623
3592
|
] })
|
|
3624
3593
|
}
|
|
@@ -3639,7 +3608,6 @@ export {
|
|
|
3639
3608
|
GhostButton,
|
|
3640
3609
|
HeadingPage,
|
|
3641
3610
|
InputField,
|
|
3642
|
-
InputFieldNumber,
|
|
3643
3611
|
KpiSection,
|
|
3644
3612
|
Loader,
|
|
3645
3613
|
MenuNavBar,
|