@esic-lab/data-core-ui 0.0.26 → 0.0.27
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 +56 -64
- package/dist/index.d.ts +56 -64
- package/dist/index.js +2361 -373
- package/dist/index.mjs +2354 -365
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -967,13 +967,13 @@ function TextInput({
|
|
|
967
967
|
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
968
968
|
label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
|
|
969
969
|
label,
|
|
970
|
-
required && /* @__PURE__ */ jsx17("span", { className: "text-red-
|
|
970
|
+
required && /* @__PURE__ */ jsx17("span", { className: "text-red-600", children: "\xA0*" })
|
|
971
971
|
] }),
|
|
972
972
|
/* @__PURE__ */ jsxs13(
|
|
973
973
|
"div",
|
|
974
974
|
{
|
|
975
975
|
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-
|
|
976
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-600" : ""}`,
|
|
977
977
|
children: [
|
|
978
978
|
/* @__PURE__ */ jsx17(
|
|
979
979
|
"input",
|
|
@@ -992,21 +992,23 @@ function TextInput({
|
|
|
992
992
|
]
|
|
993
993
|
}
|
|
994
994
|
),
|
|
995
|
-
error && /* @__PURE__ */ jsx17("p", { className: "text-red-
|
|
995
|
+
error && /* @__PURE__ */ jsx17("p", { className: "text-red-600 body-1", children: error })
|
|
996
996
|
] });
|
|
997
997
|
}
|
|
998
998
|
|
|
999
|
-
// src/
|
|
999
|
+
// src/InputField/InputField.tsx
|
|
1000
1000
|
import { ConfigProvider as ConfigProvider2, Input } from "antd";
|
|
1001
1001
|
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1002
1002
|
function InputField({
|
|
1003
1003
|
value,
|
|
1004
1004
|
onChange,
|
|
1005
1005
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
title,
|
|
1007
|
+
require: require2,
|
|
1008
|
+
bottomText,
|
|
1008
1009
|
disabled,
|
|
1009
|
-
|
|
1010
|
+
showError,
|
|
1011
|
+
errorMessage,
|
|
1010
1012
|
addonBefore,
|
|
1011
1013
|
addonAfter,
|
|
1012
1014
|
defaultValue,
|
|
@@ -1023,9 +1025,9 @@ function InputField({
|
|
|
1023
1025
|
},
|
|
1024
1026
|
children: /* @__PURE__ */ jsxs14("div", { className: "container-input", children: [
|
|
1025
1027
|
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1026
|
-
/* @__PURE__ */ jsx18("span", { className: "body-1", children:
|
|
1028
|
+
/* @__PURE__ */ jsx18("span", { className: "body-1", children: title }),
|
|
1027
1029
|
" ",
|
|
1028
|
-
|
|
1030
|
+
require2 && /* @__PURE__ */ jsx18("span", { className: "text-red-500", children: "*" })
|
|
1029
1031
|
] }),
|
|
1030
1032
|
/* @__PURE__ */ jsx18(
|
|
1031
1033
|
Input,
|
|
@@ -1042,7 +1044,11 @@ function InputField({
|
|
|
1042
1044
|
onClear
|
|
1043
1045
|
}
|
|
1044
1046
|
),
|
|
1045
|
-
|
|
1047
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
1048
|
+
/* @__PURE__ */ jsx18("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1049
|
+
" ",
|
|
1050
|
+
showError && /* @__PURE__ */ jsx18("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1051
|
+
] })
|
|
1046
1052
|
] })
|
|
1047
1053
|
}
|
|
1048
1054
|
);
|
|
@@ -1097,106 +1103,45 @@ function TextAreaInput({
|
|
|
1097
1103
|
disabled
|
|
1098
1104
|
}
|
|
1099
1105
|
),
|
|
1100
|
-
error && /* @__PURE__ */ jsx19("p", { className: "text-red-
|
|
1106
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-red-600 body-1", children: error })
|
|
1101
1107
|
] })
|
|
1102
1108
|
}
|
|
1103
1109
|
) });
|
|
1104
1110
|
}
|
|
1105
1111
|
|
|
1106
|
-
// src/
|
|
1107
|
-
import { ConfigProvider as ConfigProvider4,
|
|
1112
|
+
// src/ColorPicker/ColorPicker.tsx
|
|
1113
|
+
import { ConfigProvider as ConfigProvider4, ColorPicker } from "antd";
|
|
1108
1114
|
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1109
|
-
function
|
|
1115
|
+
function ColorPickerBasic({
|
|
1110
1116
|
value,
|
|
1111
1117
|
onChange,
|
|
1112
|
-
|
|
1118
|
+
require: require2,
|
|
1113
1119
|
title,
|
|
1114
|
-
|
|
1120
|
+
bottomText,
|
|
1121
|
+
showError,
|
|
1122
|
+
errorMessage,
|
|
1115
1123
|
disabled,
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
addonAfter,
|
|
1119
|
-
defaultValue,
|
|
1124
|
+
allowClear,
|
|
1125
|
+
defaultFormat,
|
|
1120
1126
|
className,
|
|
1121
|
-
|
|
1122
|
-
min,
|
|
1123
|
-
controls,
|
|
1124
|
-
size,
|
|
1125
|
-
changeOnWheel,
|
|
1126
|
-
formatter,
|
|
1127
|
-
parser
|
|
1127
|
+
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1128
1128
|
}) {
|
|
1129
1129
|
return /* @__PURE__ */ jsx20(
|
|
1130
1130
|
ConfigProvider4,
|
|
1131
1131
|
{
|
|
1132
1132
|
theme: {
|
|
1133
1133
|
token: {
|
|
1134
|
-
fontFamily: "Kanit"
|
|
1134
|
+
fontFamily: "Kanit",
|
|
1135
|
+
fontSize: 16
|
|
1135
1136
|
}
|
|
1136
1137
|
},
|
|
1137
1138
|
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1138
1139
|
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1139
1140
|
/* @__PURE__ */ jsx20("span", { className: "body-1", children: title }),
|
|
1140
1141
|
" ",
|
|
1141
|
-
|
|
1142
|
+
require2 && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "*" })
|
|
1142
1143
|
] }),
|
|
1143
1144
|
/* @__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
|
-
// src/ColorPicker/ColorPicker.tsx
|
|
1170
|
-
import { ConfigProvider as ConfigProvider5, ColorPicker } from "antd";
|
|
1171
|
-
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1172
|
-
function ColorPickerBasic({
|
|
1173
|
-
value,
|
|
1174
|
-
onChange,
|
|
1175
|
-
required,
|
|
1176
|
-
label,
|
|
1177
|
-
error,
|
|
1178
|
-
disabled,
|
|
1179
|
-
allowClear,
|
|
1180
|
-
defaultFormat,
|
|
1181
|
-
className,
|
|
1182
|
-
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1183
|
-
}) {
|
|
1184
|
-
return /* @__PURE__ */ jsx21(
|
|
1185
|
-
ConfigProvider5,
|
|
1186
|
-
{
|
|
1187
|
-
theme: {
|
|
1188
|
-
token: {
|
|
1189
|
-
fontFamily: "Kanit",
|
|
1190
|
-
fontSize: 16
|
|
1191
|
-
}
|
|
1192
|
-
},
|
|
1193
|
-
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
1194
|
-
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1195
|
-
/* @__PURE__ */ jsx21("span", { className: "body-1", children: label }),
|
|
1196
|
-
" ",
|
|
1197
|
-
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1198
|
-
] }),
|
|
1199
|
-
/* @__PURE__ */ jsx21(
|
|
1200
1145
|
ColorPicker,
|
|
1201
1146
|
{
|
|
1202
1147
|
defaultFormat,
|
|
@@ -1208,9 +1153,9 @@ function ColorPickerBasic({
|
|
|
1208
1153
|
showText: (color) => {
|
|
1209
1154
|
const hex = color.toHexString();
|
|
1210
1155
|
if (!value) {
|
|
1211
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ jsx20("span", { children: placeholder });
|
|
1212
1157
|
}
|
|
1213
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsxs16("span", { children: [
|
|
1214
1159
|
"(",
|
|
1215
1160
|
hex,
|
|
1216
1161
|
")"
|
|
@@ -1219,26 +1164,2019 @@ function ColorPickerBasic({
|
|
|
1219
1164
|
disabled
|
|
1220
1165
|
}
|
|
1221
1166
|
),
|
|
1222
|
-
|
|
1167
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1168
|
+
/* @__PURE__ */ jsx20("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1169
|
+
" ",
|
|
1170
|
+
showError && /* @__PURE__ */ jsx20("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
1171
|
+
] })
|
|
1223
1172
|
] })
|
|
1224
1173
|
}
|
|
1225
1174
|
);
|
|
1226
1175
|
}
|
|
1227
1176
|
|
|
1228
|
-
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1229
|
-
var import_dayjs = __toESM(require_dayjs_min());
|
|
1230
|
-
|
|
1231
|
-
import
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1177
|
+
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1178
|
+
var import_dayjs = __toESM(require_dayjs_min());
|
|
1179
|
+
import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
|
|
1180
|
+
import thTH from "antd/locale/th_TH";
|
|
1181
|
+
|
|
1182
|
+
// node_modules/date-fns/constants.js
|
|
1183
|
+
var daysInYear = 365.2425;
|
|
1184
|
+
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
1185
|
+
var minTime = -maxTime;
|
|
1186
|
+
var millisecondsInWeek = 6048e5;
|
|
1187
|
+
var millisecondsInDay = 864e5;
|
|
1188
|
+
var secondsInHour = 3600;
|
|
1189
|
+
var secondsInDay = secondsInHour * 24;
|
|
1190
|
+
var secondsInWeek = secondsInDay * 7;
|
|
1191
|
+
var secondsInYear = secondsInDay * daysInYear;
|
|
1192
|
+
var secondsInMonth = secondsInYear / 12;
|
|
1193
|
+
var secondsInQuarter = secondsInMonth * 3;
|
|
1194
|
+
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
1195
|
+
|
|
1196
|
+
// node_modules/date-fns/constructFrom.js
|
|
1197
|
+
function constructFrom(date, value) {
|
|
1198
|
+
if (typeof date === "function") return date(value);
|
|
1199
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
1200
|
+
return date[constructFromSymbol](value);
|
|
1201
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
1202
|
+
return new Date(value);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// node_modules/date-fns/toDate.js
|
|
1206
|
+
function toDate(argument, context) {
|
|
1207
|
+
return constructFrom(context || argument, argument);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
// node_modules/date-fns/_lib/defaultOptions.js
|
|
1211
|
+
var defaultOptions = {};
|
|
1212
|
+
function getDefaultOptions() {
|
|
1213
|
+
return defaultOptions;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
// node_modules/date-fns/startOfWeek.js
|
|
1217
|
+
function startOfWeek(date, options) {
|
|
1218
|
+
const defaultOptions2 = getDefaultOptions();
|
|
1219
|
+
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
1220
|
+
const _date = toDate(date, options?.in);
|
|
1221
|
+
const day = _date.getDay();
|
|
1222
|
+
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
1223
|
+
_date.setDate(_date.getDate() - diff);
|
|
1224
|
+
_date.setHours(0, 0, 0, 0);
|
|
1225
|
+
return _date;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
// node_modules/date-fns/startOfISOWeek.js
|
|
1229
|
+
function startOfISOWeek(date, options) {
|
|
1230
|
+
return startOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
// node_modules/date-fns/getISOWeekYear.js
|
|
1234
|
+
function getISOWeekYear(date, options) {
|
|
1235
|
+
const _date = toDate(date, options?.in);
|
|
1236
|
+
const year = _date.getFullYear();
|
|
1237
|
+
const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
1238
|
+
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
1239
|
+
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
1240
|
+
const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
1241
|
+
const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
1242
|
+
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
1243
|
+
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
1244
|
+
const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
1245
|
+
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
1246
|
+
return year + 1;
|
|
1247
|
+
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
1248
|
+
return year;
|
|
1249
|
+
} else {
|
|
1250
|
+
return year - 1;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
1255
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
1256
|
+
const _date = toDate(date);
|
|
1257
|
+
const utcDate = new Date(
|
|
1258
|
+
Date.UTC(
|
|
1259
|
+
_date.getFullYear(),
|
|
1260
|
+
_date.getMonth(),
|
|
1261
|
+
_date.getDate(),
|
|
1262
|
+
_date.getHours(),
|
|
1263
|
+
_date.getMinutes(),
|
|
1264
|
+
_date.getSeconds(),
|
|
1265
|
+
_date.getMilliseconds()
|
|
1266
|
+
)
|
|
1267
|
+
);
|
|
1268
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
1269
|
+
return +date - +utcDate;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// node_modules/date-fns/_lib/normalizeDates.js
|
|
1273
|
+
function normalizeDates(context, ...dates) {
|
|
1274
|
+
const normalize = constructFrom.bind(
|
|
1275
|
+
null,
|
|
1276
|
+
context || dates.find((date) => typeof date === "object")
|
|
1277
|
+
);
|
|
1278
|
+
return dates.map(normalize);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
// node_modules/date-fns/startOfDay.js
|
|
1282
|
+
function startOfDay(date, options) {
|
|
1283
|
+
const _date = toDate(date, options?.in);
|
|
1284
|
+
_date.setHours(0, 0, 0, 0);
|
|
1285
|
+
return _date;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
// node_modules/date-fns/differenceInCalendarDays.js
|
|
1289
|
+
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
1290
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1291
|
+
options?.in,
|
|
1292
|
+
laterDate,
|
|
1293
|
+
earlierDate
|
|
1294
|
+
);
|
|
1295
|
+
const laterStartOfDay = startOfDay(laterDate_);
|
|
1296
|
+
const earlierStartOfDay = startOfDay(earlierDate_);
|
|
1297
|
+
const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
1298
|
+
const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
1299
|
+
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
// node_modules/date-fns/startOfISOWeekYear.js
|
|
1303
|
+
function startOfISOWeekYear(date, options) {
|
|
1304
|
+
const year = getISOWeekYear(date, options);
|
|
1305
|
+
const fourthOfJanuary = constructFrom(options?.in || date, 0);
|
|
1306
|
+
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
1307
|
+
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
1308
|
+
return startOfISOWeek(fourthOfJanuary);
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
// node_modules/date-fns/isDate.js
|
|
1312
|
+
function isDate(value) {
|
|
1313
|
+
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// node_modules/date-fns/isValid.js
|
|
1317
|
+
function isValid(date) {
|
|
1318
|
+
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
// node_modules/date-fns/startOfYear.js
|
|
1322
|
+
function startOfYear(date, options) {
|
|
1323
|
+
const date_ = toDate(date, options?.in);
|
|
1324
|
+
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
1325
|
+
date_.setHours(0, 0, 0, 0);
|
|
1326
|
+
return date_;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
// node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
1330
|
+
var formatDistanceLocale = {
|
|
1331
|
+
lessThanXSeconds: {
|
|
1332
|
+
one: "less than a second",
|
|
1333
|
+
other: "less than {{count}} seconds"
|
|
1334
|
+
},
|
|
1335
|
+
xSeconds: {
|
|
1336
|
+
one: "1 second",
|
|
1337
|
+
other: "{{count}} seconds"
|
|
1338
|
+
},
|
|
1339
|
+
halfAMinute: "half a minute",
|
|
1340
|
+
lessThanXMinutes: {
|
|
1341
|
+
one: "less than a minute",
|
|
1342
|
+
other: "less than {{count}} minutes"
|
|
1343
|
+
},
|
|
1344
|
+
xMinutes: {
|
|
1345
|
+
one: "1 minute",
|
|
1346
|
+
other: "{{count}} minutes"
|
|
1347
|
+
},
|
|
1348
|
+
aboutXHours: {
|
|
1349
|
+
one: "about 1 hour",
|
|
1350
|
+
other: "about {{count}} hours"
|
|
1351
|
+
},
|
|
1352
|
+
xHours: {
|
|
1353
|
+
one: "1 hour",
|
|
1354
|
+
other: "{{count}} hours"
|
|
1355
|
+
},
|
|
1356
|
+
xDays: {
|
|
1357
|
+
one: "1 day",
|
|
1358
|
+
other: "{{count}} days"
|
|
1359
|
+
},
|
|
1360
|
+
aboutXWeeks: {
|
|
1361
|
+
one: "about 1 week",
|
|
1362
|
+
other: "about {{count}} weeks"
|
|
1363
|
+
},
|
|
1364
|
+
xWeeks: {
|
|
1365
|
+
one: "1 week",
|
|
1366
|
+
other: "{{count}} weeks"
|
|
1367
|
+
},
|
|
1368
|
+
aboutXMonths: {
|
|
1369
|
+
one: "about 1 month",
|
|
1370
|
+
other: "about {{count}} months"
|
|
1371
|
+
},
|
|
1372
|
+
xMonths: {
|
|
1373
|
+
one: "1 month",
|
|
1374
|
+
other: "{{count}} months"
|
|
1375
|
+
},
|
|
1376
|
+
aboutXYears: {
|
|
1377
|
+
one: "about 1 year",
|
|
1378
|
+
other: "about {{count}} years"
|
|
1379
|
+
},
|
|
1380
|
+
xYears: {
|
|
1381
|
+
one: "1 year",
|
|
1382
|
+
other: "{{count}} years"
|
|
1383
|
+
},
|
|
1384
|
+
overXYears: {
|
|
1385
|
+
one: "over 1 year",
|
|
1386
|
+
other: "over {{count}} years"
|
|
1387
|
+
},
|
|
1388
|
+
almostXYears: {
|
|
1389
|
+
one: "almost 1 year",
|
|
1390
|
+
other: "almost {{count}} years"
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
var formatDistance = (token, count, options) => {
|
|
1394
|
+
let result;
|
|
1395
|
+
const tokenValue = formatDistanceLocale[token];
|
|
1396
|
+
if (typeof tokenValue === "string") {
|
|
1397
|
+
result = tokenValue;
|
|
1398
|
+
} else if (count === 1) {
|
|
1399
|
+
result = tokenValue.one;
|
|
1400
|
+
} else {
|
|
1401
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
1402
|
+
}
|
|
1403
|
+
if (options?.addSuffix) {
|
|
1404
|
+
if (options.comparison && options.comparison > 0) {
|
|
1405
|
+
return "in " + result;
|
|
1406
|
+
} else {
|
|
1407
|
+
return result + " ago";
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
return result;
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
// node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
1414
|
+
function buildFormatLongFn(args) {
|
|
1415
|
+
return (options = {}) => {
|
|
1416
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
1417
|
+
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
1418
|
+
return format2;
|
|
1419
|
+
};
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
// node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
1423
|
+
var dateFormats = {
|
|
1424
|
+
full: "EEEE, MMMM do, y",
|
|
1425
|
+
long: "MMMM do, y",
|
|
1426
|
+
medium: "MMM d, y",
|
|
1427
|
+
short: "MM/dd/yyyy"
|
|
1428
|
+
};
|
|
1429
|
+
var timeFormats = {
|
|
1430
|
+
full: "h:mm:ss a zzzz",
|
|
1431
|
+
long: "h:mm:ss a z",
|
|
1432
|
+
medium: "h:mm:ss a",
|
|
1433
|
+
short: "h:mm a"
|
|
1434
|
+
};
|
|
1435
|
+
var dateTimeFormats = {
|
|
1436
|
+
full: "{{date}} 'at' {{time}}",
|
|
1437
|
+
long: "{{date}} 'at' {{time}}",
|
|
1438
|
+
medium: "{{date}}, {{time}}",
|
|
1439
|
+
short: "{{date}}, {{time}}"
|
|
1440
|
+
};
|
|
1441
|
+
var formatLong = {
|
|
1442
|
+
date: buildFormatLongFn({
|
|
1443
|
+
formats: dateFormats,
|
|
1444
|
+
defaultWidth: "full"
|
|
1445
|
+
}),
|
|
1446
|
+
time: buildFormatLongFn({
|
|
1447
|
+
formats: timeFormats,
|
|
1448
|
+
defaultWidth: "full"
|
|
1449
|
+
}),
|
|
1450
|
+
dateTime: buildFormatLongFn({
|
|
1451
|
+
formats: dateTimeFormats,
|
|
1452
|
+
defaultWidth: "full"
|
|
1453
|
+
})
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1456
|
+
// node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
1457
|
+
var formatRelativeLocale = {
|
|
1458
|
+
lastWeek: "'last' eeee 'at' p",
|
|
1459
|
+
yesterday: "'yesterday at' p",
|
|
1460
|
+
today: "'today at' p",
|
|
1461
|
+
tomorrow: "'tomorrow at' p",
|
|
1462
|
+
nextWeek: "eeee 'at' p",
|
|
1463
|
+
other: "P"
|
|
1464
|
+
};
|
|
1465
|
+
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
1466
|
+
|
|
1467
|
+
// node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
1468
|
+
function buildLocalizeFn(args) {
|
|
1469
|
+
return (value, options) => {
|
|
1470
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
1471
|
+
let valuesArray;
|
|
1472
|
+
if (context === "formatting" && args.formattingValues) {
|
|
1473
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
1474
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
1475
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
1476
|
+
} else {
|
|
1477
|
+
const defaultWidth = args.defaultWidth;
|
|
1478
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
1479
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
1480
|
+
}
|
|
1481
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
1482
|
+
return valuesArray[index];
|
|
1483
|
+
};
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
// node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
1487
|
+
var eraValues = {
|
|
1488
|
+
narrow: ["B", "A"],
|
|
1489
|
+
abbreviated: ["BC", "AD"],
|
|
1490
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
1491
|
+
};
|
|
1492
|
+
var quarterValues = {
|
|
1493
|
+
narrow: ["1", "2", "3", "4"],
|
|
1494
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1495
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1496
|
+
};
|
|
1497
|
+
var monthValues = {
|
|
1498
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1499
|
+
abbreviated: [
|
|
1500
|
+
"Jan",
|
|
1501
|
+
"Feb",
|
|
1502
|
+
"Mar",
|
|
1503
|
+
"Apr",
|
|
1504
|
+
"May",
|
|
1505
|
+
"Jun",
|
|
1506
|
+
"Jul",
|
|
1507
|
+
"Aug",
|
|
1508
|
+
"Sep",
|
|
1509
|
+
"Oct",
|
|
1510
|
+
"Nov",
|
|
1511
|
+
"Dec"
|
|
1512
|
+
],
|
|
1513
|
+
wide: [
|
|
1514
|
+
"January",
|
|
1515
|
+
"February",
|
|
1516
|
+
"March",
|
|
1517
|
+
"April",
|
|
1518
|
+
"May",
|
|
1519
|
+
"June",
|
|
1520
|
+
"July",
|
|
1521
|
+
"August",
|
|
1522
|
+
"September",
|
|
1523
|
+
"October",
|
|
1524
|
+
"November",
|
|
1525
|
+
"December"
|
|
1526
|
+
]
|
|
1527
|
+
};
|
|
1528
|
+
var dayValues = {
|
|
1529
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1530
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1531
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1532
|
+
wide: [
|
|
1533
|
+
"Sunday",
|
|
1534
|
+
"Monday",
|
|
1535
|
+
"Tuesday",
|
|
1536
|
+
"Wednesday",
|
|
1537
|
+
"Thursday",
|
|
1538
|
+
"Friday",
|
|
1539
|
+
"Saturday"
|
|
1540
|
+
]
|
|
1541
|
+
};
|
|
1542
|
+
var dayPeriodValues = {
|
|
1543
|
+
narrow: {
|
|
1544
|
+
am: "a",
|
|
1545
|
+
pm: "p",
|
|
1546
|
+
midnight: "mi",
|
|
1547
|
+
noon: "n",
|
|
1548
|
+
morning: "morning",
|
|
1549
|
+
afternoon: "afternoon",
|
|
1550
|
+
evening: "evening",
|
|
1551
|
+
night: "night"
|
|
1552
|
+
},
|
|
1553
|
+
abbreviated: {
|
|
1554
|
+
am: "AM",
|
|
1555
|
+
pm: "PM",
|
|
1556
|
+
midnight: "midnight",
|
|
1557
|
+
noon: "noon",
|
|
1558
|
+
morning: "morning",
|
|
1559
|
+
afternoon: "afternoon",
|
|
1560
|
+
evening: "evening",
|
|
1561
|
+
night: "night"
|
|
1562
|
+
},
|
|
1563
|
+
wide: {
|
|
1564
|
+
am: "a.m.",
|
|
1565
|
+
pm: "p.m.",
|
|
1566
|
+
midnight: "midnight",
|
|
1567
|
+
noon: "noon",
|
|
1568
|
+
morning: "morning",
|
|
1569
|
+
afternoon: "afternoon",
|
|
1570
|
+
evening: "evening",
|
|
1571
|
+
night: "night"
|
|
1572
|
+
}
|
|
1573
|
+
};
|
|
1574
|
+
var formattingDayPeriodValues = {
|
|
1575
|
+
narrow: {
|
|
1576
|
+
am: "a",
|
|
1577
|
+
pm: "p",
|
|
1578
|
+
midnight: "mi",
|
|
1579
|
+
noon: "n",
|
|
1580
|
+
morning: "in the morning",
|
|
1581
|
+
afternoon: "in the afternoon",
|
|
1582
|
+
evening: "in the evening",
|
|
1583
|
+
night: "at night"
|
|
1584
|
+
},
|
|
1585
|
+
abbreviated: {
|
|
1586
|
+
am: "AM",
|
|
1587
|
+
pm: "PM",
|
|
1588
|
+
midnight: "midnight",
|
|
1589
|
+
noon: "noon",
|
|
1590
|
+
morning: "in the morning",
|
|
1591
|
+
afternoon: "in the afternoon",
|
|
1592
|
+
evening: "in the evening",
|
|
1593
|
+
night: "at night"
|
|
1594
|
+
},
|
|
1595
|
+
wide: {
|
|
1596
|
+
am: "a.m.",
|
|
1597
|
+
pm: "p.m.",
|
|
1598
|
+
midnight: "midnight",
|
|
1599
|
+
noon: "noon",
|
|
1600
|
+
morning: "in the morning",
|
|
1601
|
+
afternoon: "in the afternoon",
|
|
1602
|
+
evening: "in the evening",
|
|
1603
|
+
night: "at night"
|
|
1604
|
+
}
|
|
1605
|
+
};
|
|
1606
|
+
var ordinalNumber = (dirtyNumber, _options) => {
|
|
1607
|
+
const number = Number(dirtyNumber);
|
|
1608
|
+
const rem100 = number % 100;
|
|
1609
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
1610
|
+
switch (rem100 % 10) {
|
|
1611
|
+
case 1:
|
|
1612
|
+
return number + "st";
|
|
1613
|
+
case 2:
|
|
1614
|
+
return number + "nd";
|
|
1615
|
+
case 3:
|
|
1616
|
+
return number + "rd";
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
return number + "th";
|
|
1620
|
+
};
|
|
1621
|
+
var localize = {
|
|
1622
|
+
ordinalNumber,
|
|
1623
|
+
era: buildLocalizeFn({
|
|
1624
|
+
values: eraValues,
|
|
1625
|
+
defaultWidth: "wide"
|
|
1626
|
+
}),
|
|
1627
|
+
quarter: buildLocalizeFn({
|
|
1628
|
+
values: quarterValues,
|
|
1629
|
+
defaultWidth: "wide",
|
|
1630
|
+
argumentCallback: (quarter) => quarter - 1
|
|
1631
|
+
}),
|
|
1632
|
+
month: buildLocalizeFn({
|
|
1633
|
+
values: monthValues,
|
|
1634
|
+
defaultWidth: "wide"
|
|
1635
|
+
}),
|
|
1636
|
+
day: buildLocalizeFn({
|
|
1637
|
+
values: dayValues,
|
|
1638
|
+
defaultWidth: "wide"
|
|
1639
|
+
}),
|
|
1640
|
+
dayPeriod: buildLocalizeFn({
|
|
1641
|
+
values: dayPeriodValues,
|
|
1642
|
+
defaultWidth: "wide",
|
|
1643
|
+
formattingValues: formattingDayPeriodValues,
|
|
1644
|
+
defaultFormattingWidth: "wide"
|
|
1645
|
+
})
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
// node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
1649
|
+
function buildMatchFn(args) {
|
|
1650
|
+
return (string, options = {}) => {
|
|
1651
|
+
const width = options.width;
|
|
1652
|
+
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
1653
|
+
const matchResult = string.match(matchPattern);
|
|
1654
|
+
if (!matchResult) {
|
|
1655
|
+
return null;
|
|
1656
|
+
}
|
|
1657
|
+
const matchedString = matchResult[0];
|
|
1658
|
+
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
1659
|
+
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
1660
|
+
// [TODO] -- I challenge you to fix the type
|
|
1661
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
1662
|
+
);
|
|
1663
|
+
let value;
|
|
1664
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
1665
|
+
value = options.valueCallback ? (
|
|
1666
|
+
// [TODO] -- I challenge you to fix the type
|
|
1667
|
+
options.valueCallback(value)
|
|
1668
|
+
) : value;
|
|
1669
|
+
const rest = string.slice(matchedString.length);
|
|
1670
|
+
return { value, rest };
|
|
1671
|
+
};
|
|
1672
|
+
}
|
|
1673
|
+
function findKey(object, predicate) {
|
|
1674
|
+
for (const key in object) {
|
|
1675
|
+
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
1676
|
+
return key;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
return void 0;
|
|
1680
|
+
}
|
|
1681
|
+
function findIndex(array, predicate) {
|
|
1682
|
+
for (let key = 0; key < array.length; key++) {
|
|
1683
|
+
if (predicate(array[key])) {
|
|
1684
|
+
return key;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
return void 0;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
1691
|
+
function buildMatchPatternFn(args) {
|
|
1692
|
+
return (string, options = {}) => {
|
|
1693
|
+
const matchResult = string.match(args.matchPattern);
|
|
1694
|
+
if (!matchResult) return null;
|
|
1695
|
+
const matchedString = matchResult[0];
|
|
1696
|
+
const parseResult = string.match(args.parsePattern);
|
|
1697
|
+
if (!parseResult) return null;
|
|
1698
|
+
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
1699
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
1700
|
+
const rest = string.slice(matchedString.length);
|
|
1701
|
+
return { value, rest };
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
// node_modules/date-fns/locale/en-US/_lib/match.js
|
|
1706
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1707
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
1708
|
+
var matchEraPatterns = {
|
|
1709
|
+
narrow: /^(b|a)/i,
|
|
1710
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1711
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1712
|
+
};
|
|
1713
|
+
var parseEraPatterns = {
|
|
1714
|
+
any: [/^b/i, /^(a|c)/i]
|
|
1715
|
+
};
|
|
1716
|
+
var matchQuarterPatterns = {
|
|
1717
|
+
narrow: /^[1234]/i,
|
|
1718
|
+
abbreviated: /^q[1234]/i,
|
|
1719
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1720
|
+
};
|
|
1721
|
+
var parseQuarterPatterns = {
|
|
1722
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1723
|
+
};
|
|
1724
|
+
var matchMonthPatterns = {
|
|
1725
|
+
narrow: /^[jfmasond]/i,
|
|
1726
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1727
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1728
|
+
};
|
|
1729
|
+
var parseMonthPatterns = {
|
|
1730
|
+
narrow: [
|
|
1731
|
+
/^j/i,
|
|
1732
|
+
/^f/i,
|
|
1733
|
+
/^m/i,
|
|
1734
|
+
/^a/i,
|
|
1735
|
+
/^m/i,
|
|
1736
|
+
/^j/i,
|
|
1737
|
+
/^j/i,
|
|
1738
|
+
/^a/i,
|
|
1739
|
+
/^s/i,
|
|
1740
|
+
/^o/i,
|
|
1741
|
+
/^n/i,
|
|
1742
|
+
/^d/i
|
|
1743
|
+
],
|
|
1744
|
+
any: [
|
|
1745
|
+
/^ja/i,
|
|
1746
|
+
/^f/i,
|
|
1747
|
+
/^mar/i,
|
|
1748
|
+
/^ap/i,
|
|
1749
|
+
/^may/i,
|
|
1750
|
+
/^jun/i,
|
|
1751
|
+
/^jul/i,
|
|
1752
|
+
/^au/i,
|
|
1753
|
+
/^s/i,
|
|
1754
|
+
/^o/i,
|
|
1755
|
+
/^n/i,
|
|
1756
|
+
/^d/i
|
|
1757
|
+
]
|
|
1758
|
+
};
|
|
1759
|
+
var matchDayPatterns = {
|
|
1760
|
+
narrow: /^[smtwf]/i,
|
|
1761
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1762
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1763
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1764
|
+
};
|
|
1765
|
+
var parseDayPatterns = {
|
|
1766
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1767
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1768
|
+
};
|
|
1769
|
+
var matchDayPeriodPatterns = {
|
|
1770
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1771
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1772
|
+
};
|
|
1773
|
+
var parseDayPeriodPatterns = {
|
|
1774
|
+
any: {
|
|
1775
|
+
am: /^a/i,
|
|
1776
|
+
pm: /^p/i,
|
|
1777
|
+
midnight: /^mi/i,
|
|
1778
|
+
noon: /^no/i,
|
|
1779
|
+
morning: /morning/i,
|
|
1780
|
+
afternoon: /afternoon/i,
|
|
1781
|
+
evening: /evening/i,
|
|
1782
|
+
night: /night/i
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
var match = {
|
|
1786
|
+
ordinalNumber: buildMatchPatternFn({
|
|
1787
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
1788
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
1789
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
1790
|
+
}),
|
|
1791
|
+
era: buildMatchFn({
|
|
1792
|
+
matchPatterns: matchEraPatterns,
|
|
1793
|
+
defaultMatchWidth: "wide",
|
|
1794
|
+
parsePatterns: parseEraPatterns,
|
|
1795
|
+
defaultParseWidth: "any"
|
|
1796
|
+
}),
|
|
1797
|
+
quarter: buildMatchFn({
|
|
1798
|
+
matchPatterns: matchQuarterPatterns,
|
|
1799
|
+
defaultMatchWidth: "wide",
|
|
1800
|
+
parsePatterns: parseQuarterPatterns,
|
|
1801
|
+
defaultParseWidth: "any",
|
|
1802
|
+
valueCallback: (index) => index + 1
|
|
1803
|
+
}),
|
|
1804
|
+
month: buildMatchFn({
|
|
1805
|
+
matchPatterns: matchMonthPatterns,
|
|
1806
|
+
defaultMatchWidth: "wide",
|
|
1807
|
+
parsePatterns: parseMonthPatterns,
|
|
1808
|
+
defaultParseWidth: "any"
|
|
1809
|
+
}),
|
|
1810
|
+
day: buildMatchFn({
|
|
1811
|
+
matchPatterns: matchDayPatterns,
|
|
1812
|
+
defaultMatchWidth: "wide",
|
|
1813
|
+
parsePatterns: parseDayPatterns,
|
|
1814
|
+
defaultParseWidth: "any"
|
|
1815
|
+
}),
|
|
1816
|
+
dayPeriod: buildMatchFn({
|
|
1817
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
1818
|
+
defaultMatchWidth: "any",
|
|
1819
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
1820
|
+
defaultParseWidth: "any"
|
|
1821
|
+
})
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
// node_modules/date-fns/locale/en-US.js
|
|
1825
|
+
var enUS = {
|
|
1826
|
+
code: "en-US",
|
|
1827
|
+
formatDistance,
|
|
1828
|
+
formatLong,
|
|
1829
|
+
formatRelative,
|
|
1830
|
+
localize,
|
|
1831
|
+
match,
|
|
1832
|
+
options: {
|
|
1833
|
+
weekStartsOn: 0,
|
|
1834
|
+
firstWeekContainsDate: 1
|
|
1835
|
+
}
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
// node_modules/date-fns/getDayOfYear.js
|
|
1839
|
+
function getDayOfYear(date, options) {
|
|
1840
|
+
const _date = toDate(date, options?.in);
|
|
1841
|
+
const diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
1842
|
+
const dayOfYear = diff + 1;
|
|
1843
|
+
return dayOfYear;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
// node_modules/date-fns/getISOWeek.js
|
|
1847
|
+
function getISOWeek(date, options) {
|
|
1848
|
+
const _date = toDate(date, options?.in);
|
|
1849
|
+
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
1850
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
// node_modules/date-fns/getWeekYear.js
|
|
1854
|
+
function getWeekYear(date, options) {
|
|
1855
|
+
const _date = toDate(date, options?.in);
|
|
1856
|
+
const year = _date.getFullYear();
|
|
1857
|
+
const defaultOptions2 = getDefaultOptions();
|
|
1858
|
+
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
1859
|
+
const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
|
|
1860
|
+
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
1861
|
+
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
1862
|
+
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
1863
|
+
const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
|
|
1864
|
+
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
1865
|
+
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
1866
|
+
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
1867
|
+
if (+_date >= +startOfNextYear) {
|
|
1868
|
+
return year + 1;
|
|
1869
|
+
} else if (+_date >= +startOfThisYear) {
|
|
1870
|
+
return year;
|
|
1871
|
+
} else {
|
|
1872
|
+
return year - 1;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
// node_modules/date-fns/startOfWeekYear.js
|
|
1877
|
+
function startOfWeekYear(date, options) {
|
|
1878
|
+
const defaultOptions2 = getDefaultOptions();
|
|
1879
|
+
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
1880
|
+
const year = getWeekYear(date, options);
|
|
1881
|
+
const firstWeek = constructFrom(options?.in || date, 0);
|
|
1882
|
+
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
1883
|
+
firstWeek.setHours(0, 0, 0, 0);
|
|
1884
|
+
const _date = startOfWeek(firstWeek, options);
|
|
1885
|
+
return _date;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
// node_modules/date-fns/getWeek.js
|
|
1889
|
+
function getWeek(date, options) {
|
|
1890
|
+
const _date = toDate(date, options?.in);
|
|
1891
|
+
const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
1892
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
// node_modules/date-fns/_lib/addLeadingZeros.js
|
|
1896
|
+
function addLeadingZeros(number, targetLength) {
|
|
1897
|
+
const sign = number < 0 ? "-" : "";
|
|
1898
|
+
const output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
1899
|
+
return sign + output;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
// node_modules/date-fns/_lib/format/lightFormatters.js
|
|
1903
|
+
var lightFormatters = {
|
|
1904
|
+
// Year
|
|
1905
|
+
y(date, token) {
|
|
1906
|
+
const signedYear = date.getFullYear();
|
|
1907
|
+
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1908
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
1909
|
+
},
|
|
1910
|
+
// Month
|
|
1911
|
+
M(date, token) {
|
|
1912
|
+
const month = date.getMonth();
|
|
1913
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
1914
|
+
},
|
|
1915
|
+
// Day of the month
|
|
1916
|
+
d(date, token) {
|
|
1917
|
+
return addLeadingZeros(date.getDate(), token.length);
|
|
1918
|
+
},
|
|
1919
|
+
// AM or PM
|
|
1920
|
+
a(date, token) {
|
|
1921
|
+
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1922
|
+
switch (token) {
|
|
1923
|
+
case "a":
|
|
1924
|
+
case "aa":
|
|
1925
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
1926
|
+
case "aaa":
|
|
1927
|
+
return dayPeriodEnumValue;
|
|
1928
|
+
case "aaaaa":
|
|
1929
|
+
return dayPeriodEnumValue[0];
|
|
1930
|
+
case "aaaa":
|
|
1931
|
+
default:
|
|
1932
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
// Hour [1-12]
|
|
1936
|
+
h(date, token) {
|
|
1937
|
+
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
1938
|
+
},
|
|
1939
|
+
// Hour [0-23]
|
|
1940
|
+
H(date, token) {
|
|
1941
|
+
return addLeadingZeros(date.getHours(), token.length);
|
|
1942
|
+
},
|
|
1943
|
+
// Minute
|
|
1944
|
+
m(date, token) {
|
|
1945
|
+
return addLeadingZeros(date.getMinutes(), token.length);
|
|
1946
|
+
},
|
|
1947
|
+
// Second
|
|
1948
|
+
s(date, token) {
|
|
1949
|
+
return addLeadingZeros(date.getSeconds(), token.length);
|
|
1950
|
+
},
|
|
1951
|
+
// Fraction of second
|
|
1952
|
+
S(date, token) {
|
|
1953
|
+
const numberOfDigits = token.length;
|
|
1954
|
+
const milliseconds = date.getMilliseconds();
|
|
1955
|
+
const fractionalSeconds = Math.trunc(
|
|
1956
|
+
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
1957
|
+
);
|
|
1958
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
1959
|
+
}
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
// node_modules/date-fns/_lib/format/formatters.js
|
|
1963
|
+
var dayPeriodEnum = {
|
|
1964
|
+
am: "am",
|
|
1965
|
+
pm: "pm",
|
|
1966
|
+
midnight: "midnight",
|
|
1967
|
+
noon: "noon",
|
|
1968
|
+
morning: "morning",
|
|
1969
|
+
afternoon: "afternoon",
|
|
1970
|
+
evening: "evening",
|
|
1971
|
+
night: "night"
|
|
1972
|
+
};
|
|
1973
|
+
var formatters = {
|
|
1974
|
+
// Era
|
|
1975
|
+
G: function(date, token, localize3) {
|
|
1976
|
+
const era = date.getFullYear() > 0 ? 1 : 0;
|
|
1977
|
+
switch (token) {
|
|
1978
|
+
// AD, BC
|
|
1979
|
+
case "G":
|
|
1980
|
+
case "GG":
|
|
1981
|
+
case "GGG":
|
|
1982
|
+
return localize3.era(era, { width: "abbreviated" });
|
|
1983
|
+
// A, B
|
|
1984
|
+
case "GGGGG":
|
|
1985
|
+
return localize3.era(era, { width: "narrow" });
|
|
1986
|
+
// Anno Domini, Before Christ
|
|
1987
|
+
case "GGGG":
|
|
1988
|
+
default:
|
|
1989
|
+
return localize3.era(era, { width: "wide" });
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
// Year
|
|
1993
|
+
y: function(date, token, localize3) {
|
|
1994
|
+
if (token === "yo") {
|
|
1995
|
+
const signedYear = date.getFullYear();
|
|
1996
|
+
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1997
|
+
return localize3.ordinalNumber(year, { unit: "year" });
|
|
1998
|
+
}
|
|
1999
|
+
return lightFormatters.y(date, token);
|
|
2000
|
+
},
|
|
2001
|
+
// Local week-numbering year
|
|
2002
|
+
Y: function(date, token, localize3, options) {
|
|
2003
|
+
const signedWeekYear = getWeekYear(date, options);
|
|
2004
|
+
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
2005
|
+
if (token === "YY") {
|
|
2006
|
+
const twoDigitYear = weekYear % 100;
|
|
2007
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
2008
|
+
}
|
|
2009
|
+
if (token === "Yo") {
|
|
2010
|
+
return localize3.ordinalNumber(weekYear, { unit: "year" });
|
|
2011
|
+
}
|
|
2012
|
+
return addLeadingZeros(weekYear, token.length);
|
|
2013
|
+
},
|
|
2014
|
+
// ISO week-numbering year
|
|
2015
|
+
R: function(date, token) {
|
|
2016
|
+
const isoWeekYear = getISOWeekYear(date);
|
|
2017
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
2018
|
+
},
|
|
2019
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
2020
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
2021
|
+
// | Year | `y` | `u` |
|
|
2022
|
+
// |------|-----|-----|
|
|
2023
|
+
// | AC 1 | 1 | 1 |
|
|
2024
|
+
// | BC 1 | 1 | 0 |
|
|
2025
|
+
// | BC 2 | 2 | -1 |
|
|
2026
|
+
// Also `yy` always returns the last two digits of a year,
|
|
2027
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
2028
|
+
u: function(date, token) {
|
|
2029
|
+
const year = date.getFullYear();
|
|
2030
|
+
return addLeadingZeros(year, token.length);
|
|
2031
|
+
},
|
|
2032
|
+
// Quarter
|
|
2033
|
+
Q: function(date, token, localize3) {
|
|
2034
|
+
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
2035
|
+
switch (token) {
|
|
2036
|
+
// 1, 2, 3, 4
|
|
2037
|
+
case "Q":
|
|
2038
|
+
return String(quarter);
|
|
2039
|
+
// 01, 02, 03, 04
|
|
2040
|
+
case "QQ":
|
|
2041
|
+
return addLeadingZeros(quarter, 2);
|
|
2042
|
+
// 1st, 2nd, 3rd, 4th
|
|
2043
|
+
case "Qo":
|
|
2044
|
+
return localize3.ordinalNumber(quarter, { unit: "quarter" });
|
|
2045
|
+
// Q1, Q2, Q3, Q4
|
|
2046
|
+
case "QQQ":
|
|
2047
|
+
return localize3.quarter(quarter, {
|
|
2048
|
+
width: "abbreviated",
|
|
2049
|
+
context: "formatting"
|
|
2050
|
+
});
|
|
2051
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
2052
|
+
case "QQQQQ":
|
|
2053
|
+
return localize3.quarter(quarter, {
|
|
2054
|
+
width: "narrow",
|
|
2055
|
+
context: "formatting"
|
|
2056
|
+
});
|
|
2057
|
+
// 1st quarter, 2nd quarter, ...
|
|
2058
|
+
case "QQQQ":
|
|
2059
|
+
default:
|
|
2060
|
+
return localize3.quarter(quarter, {
|
|
2061
|
+
width: "wide",
|
|
2062
|
+
context: "formatting"
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
// Stand-alone quarter
|
|
2067
|
+
q: function(date, token, localize3) {
|
|
2068
|
+
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
2069
|
+
switch (token) {
|
|
2070
|
+
// 1, 2, 3, 4
|
|
2071
|
+
case "q":
|
|
2072
|
+
return String(quarter);
|
|
2073
|
+
// 01, 02, 03, 04
|
|
2074
|
+
case "qq":
|
|
2075
|
+
return addLeadingZeros(quarter, 2);
|
|
2076
|
+
// 1st, 2nd, 3rd, 4th
|
|
2077
|
+
case "qo":
|
|
2078
|
+
return localize3.ordinalNumber(quarter, { unit: "quarter" });
|
|
2079
|
+
// Q1, Q2, Q3, Q4
|
|
2080
|
+
case "qqq":
|
|
2081
|
+
return localize3.quarter(quarter, {
|
|
2082
|
+
width: "abbreviated",
|
|
2083
|
+
context: "standalone"
|
|
2084
|
+
});
|
|
2085
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
2086
|
+
case "qqqqq":
|
|
2087
|
+
return localize3.quarter(quarter, {
|
|
2088
|
+
width: "narrow",
|
|
2089
|
+
context: "standalone"
|
|
2090
|
+
});
|
|
2091
|
+
// 1st quarter, 2nd quarter, ...
|
|
2092
|
+
case "qqqq":
|
|
2093
|
+
default:
|
|
2094
|
+
return localize3.quarter(quarter, {
|
|
2095
|
+
width: "wide",
|
|
2096
|
+
context: "standalone"
|
|
2097
|
+
});
|
|
2098
|
+
}
|
|
2099
|
+
},
|
|
2100
|
+
// Month
|
|
2101
|
+
M: function(date, token, localize3) {
|
|
2102
|
+
const month = date.getMonth();
|
|
2103
|
+
switch (token) {
|
|
2104
|
+
case "M":
|
|
2105
|
+
case "MM":
|
|
2106
|
+
return lightFormatters.M(date, token);
|
|
2107
|
+
// 1st, 2nd, ..., 12th
|
|
2108
|
+
case "Mo":
|
|
2109
|
+
return localize3.ordinalNumber(month + 1, { unit: "month" });
|
|
2110
|
+
// Jan, Feb, ..., Dec
|
|
2111
|
+
case "MMM":
|
|
2112
|
+
return localize3.month(month, {
|
|
2113
|
+
width: "abbreviated",
|
|
2114
|
+
context: "formatting"
|
|
2115
|
+
});
|
|
2116
|
+
// J, F, ..., D
|
|
2117
|
+
case "MMMMM":
|
|
2118
|
+
return localize3.month(month, {
|
|
2119
|
+
width: "narrow",
|
|
2120
|
+
context: "formatting"
|
|
2121
|
+
});
|
|
2122
|
+
// January, February, ..., December
|
|
2123
|
+
case "MMMM":
|
|
2124
|
+
default:
|
|
2125
|
+
return localize3.month(month, { width: "wide", context: "formatting" });
|
|
2126
|
+
}
|
|
2127
|
+
},
|
|
2128
|
+
// Stand-alone month
|
|
2129
|
+
L: function(date, token, localize3) {
|
|
2130
|
+
const month = date.getMonth();
|
|
2131
|
+
switch (token) {
|
|
2132
|
+
// 1, 2, ..., 12
|
|
2133
|
+
case "L":
|
|
2134
|
+
return String(month + 1);
|
|
2135
|
+
// 01, 02, ..., 12
|
|
2136
|
+
case "LL":
|
|
2137
|
+
return addLeadingZeros(month + 1, 2);
|
|
2138
|
+
// 1st, 2nd, ..., 12th
|
|
2139
|
+
case "Lo":
|
|
2140
|
+
return localize3.ordinalNumber(month + 1, { unit: "month" });
|
|
2141
|
+
// Jan, Feb, ..., Dec
|
|
2142
|
+
case "LLL":
|
|
2143
|
+
return localize3.month(month, {
|
|
2144
|
+
width: "abbreviated",
|
|
2145
|
+
context: "standalone"
|
|
2146
|
+
});
|
|
2147
|
+
// J, F, ..., D
|
|
2148
|
+
case "LLLLL":
|
|
2149
|
+
return localize3.month(month, {
|
|
2150
|
+
width: "narrow",
|
|
2151
|
+
context: "standalone"
|
|
2152
|
+
});
|
|
2153
|
+
// January, February, ..., December
|
|
2154
|
+
case "LLLL":
|
|
2155
|
+
default:
|
|
2156
|
+
return localize3.month(month, { width: "wide", context: "standalone" });
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
// Local week of year
|
|
2160
|
+
w: function(date, token, localize3, options) {
|
|
2161
|
+
const week = getWeek(date, options);
|
|
2162
|
+
if (token === "wo") {
|
|
2163
|
+
return localize3.ordinalNumber(week, { unit: "week" });
|
|
2164
|
+
}
|
|
2165
|
+
return addLeadingZeros(week, token.length);
|
|
2166
|
+
},
|
|
2167
|
+
// ISO week of year
|
|
2168
|
+
I: function(date, token, localize3) {
|
|
2169
|
+
const isoWeek = getISOWeek(date);
|
|
2170
|
+
if (token === "Io") {
|
|
2171
|
+
return localize3.ordinalNumber(isoWeek, { unit: "week" });
|
|
2172
|
+
}
|
|
2173
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
2174
|
+
},
|
|
2175
|
+
// Day of the month
|
|
2176
|
+
d: function(date, token, localize3) {
|
|
2177
|
+
if (token === "do") {
|
|
2178
|
+
return localize3.ordinalNumber(date.getDate(), { unit: "date" });
|
|
2179
|
+
}
|
|
2180
|
+
return lightFormatters.d(date, token);
|
|
2181
|
+
},
|
|
2182
|
+
// Day of year
|
|
2183
|
+
D: function(date, token, localize3) {
|
|
2184
|
+
const dayOfYear = getDayOfYear(date);
|
|
2185
|
+
if (token === "Do") {
|
|
2186
|
+
return localize3.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
2187
|
+
}
|
|
2188
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
2189
|
+
},
|
|
2190
|
+
// Day of week
|
|
2191
|
+
E: function(date, token, localize3) {
|
|
2192
|
+
const dayOfWeek = date.getDay();
|
|
2193
|
+
switch (token) {
|
|
2194
|
+
// Tue
|
|
2195
|
+
case "E":
|
|
2196
|
+
case "EE":
|
|
2197
|
+
case "EEE":
|
|
2198
|
+
return localize3.day(dayOfWeek, {
|
|
2199
|
+
width: "abbreviated",
|
|
2200
|
+
context: "formatting"
|
|
2201
|
+
});
|
|
2202
|
+
// T
|
|
2203
|
+
case "EEEEE":
|
|
2204
|
+
return localize3.day(dayOfWeek, {
|
|
2205
|
+
width: "narrow",
|
|
2206
|
+
context: "formatting"
|
|
2207
|
+
});
|
|
2208
|
+
// Tu
|
|
2209
|
+
case "EEEEEE":
|
|
2210
|
+
return localize3.day(dayOfWeek, {
|
|
2211
|
+
width: "short",
|
|
2212
|
+
context: "formatting"
|
|
2213
|
+
});
|
|
2214
|
+
// Tuesday
|
|
2215
|
+
case "EEEE":
|
|
2216
|
+
default:
|
|
2217
|
+
return localize3.day(dayOfWeek, {
|
|
2218
|
+
width: "wide",
|
|
2219
|
+
context: "formatting"
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
// Local day of week
|
|
2224
|
+
e: function(date, token, localize3, options) {
|
|
2225
|
+
const dayOfWeek = date.getDay();
|
|
2226
|
+
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
2227
|
+
switch (token) {
|
|
2228
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
2229
|
+
case "e":
|
|
2230
|
+
return String(localDayOfWeek);
|
|
2231
|
+
// Padded numerical value
|
|
2232
|
+
case "ee":
|
|
2233
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
2234
|
+
// 1st, 2nd, ..., 7th
|
|
2235
|
+
case "eo":
|
|
2236
|
+
return localize3.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
2237
|
+
case "eee":
|
|
2238
|
+
return localize3.day(dayOfWeek, {
|
|
2239
|
+
width: "abbreviated",
|
|
2240
|
+
context: "formatting"
|
|
2241
|
+
});
|
|
2242
|
+
// T
|
|
2243
|
+
case "eeeee":
|
|
2244
|
+
return localize3.day(dayOfWeek, {
|
|
2245
|
+
width: "narrow",
|
|
2246
|
+
context: "formatting"
|
|
2247
|
+
});
|
|
2248
|
+
// Tu
|
|
2249
|
+
case "eeeeee":
|
|
2250
|
+
return localize3.day(dayOfWeek, {
|
|
2251
|
+
width: "short",
|
|
2252
|
+
context: "formatting"
|
|
2253
|
+
});
|
|
2254
|
+
// Tuesday
|
|
2255
|
+
case "eeee":
|
|
2256
|
+
default:
|
|
2257
|
+
return localize3.day(dayOfWeek, {
|
|
2258
|
+
width: "wide",
|
|
2259
|
+
context: "formatting"
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
// Stand-alone local day of week
|
|
2264
|
+
c: function(date, token, localize3, options) {
|
|
2265
|
+
const dayOfWeek = date.getDay();
|
|
2266
|
+
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
2267
|
+
switch (token) {
|
|
2268
|
+
// Numerical value (same as in `e`)
|
|
2269
|
+
case "c":
|
|
2270
|
+
return String(localDayOfWeek);
|
|
2271
|
+
// Padded numerical value
|
|
2272
|
+
case "cc":
|
|
2273
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
2274
|
+
// 1st, 2nd, ..., 7th
|
|
2275
|
+
case "co":
|
|
2276
|
+
return localize3.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
2277
|
+
case "ccc":
|
|
2278
|
+
return localize3.day(dayOfWeek, {
|
|
2279
|
+
width: "abbreviated",
|
|
2280
|
+
context: "standalone"
|
|
2281
|
+
});
|
|
2282
|
+
// T
|
|
2283
|
+
case "ccccc":
|
|
2284
|
+
return localize3.day(dayOfWeek, {
|
|
2285
|
+
width: "narrow",
|
|
2286
|
+
context: "standalone"
|
|
2287
|
+
});
|
|
2288
|
+
// Tu
|
|
2289
|
+
case "cccccc":
|
|
2290
|
+
return localize3.day(dayOfWeek, {
|
|
2291
|
+
width: "short",
|
|
2292
|
+
context: "standalone"
|
|
2293
|
+
});
|
|
2294
|
+
// Tuesday
|
|
2295
|
+
case "cccc":
|
|
2296
|
+
default:
|
|
2297
|
+
return localize3.day(dayOfWeek, {
|
|
2298
|
+
width: "wide",
|
|
2299
|
+
context: "standalone"
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
},
|
|
2303
|
+
// ISO day of week
|
|
2304
|
+
i: function(date, token, localize3) {
|
|
2305
|
+
const dayOfWeek = date.getDay();
|
|
2306
|
+
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
2307
|
+
switch (token) {
|
|
2308
|
+
// 2
|
|
2309
|
+
case "i":
|
|
2310
|
+
return String(isoDayOfWeek);
|
|
2311
|
+
// 02
|
|
2312
|
+
case "ii":
|
|
2313
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
2314
|
+
// 2nd
|
|
2315
|
+
case "io":
|
|
2316
|
+
return localize3.ordinalNumber(isoDayOfWeek, { unit: "day" });
|
|
2317
|
+
// Tue
|
|
2318
|
+
case "iii":
|
|
2319
|
+
return localize3.day(dayOfWeek, {
|
|
2320
|
+
width: "abbreviated",
|
|
2321
|
+
context: "formatting"
|
|
2322
|
+
});
|
|
2323
|
+
// T
|
|
2324
|
+
case "iiiii":
|
|
2325
|
+
return localize3.day(dayOfWeek, {
|
|
2326
|
+
width: "narrow",
|
|
2327
|
+
context: "formatting"
|
|
2328
|
+
});
|
|
2329
|
+
// Tu
|
|
2330
|
+
case "iiiiii":
|
|
2331
|
+
return localize3.day(dayOfWeek, {
|
|
2332
|
+
width: "short",
|
|
2333
|
+
context: "formatting"
|
|
2334
|
+
});
|
|
2335
|
+
// Tuesday
|
|
2336
|
+
case "iiii":
|
|
2337
|
+
default:
|
|
2338
|
+
return localize3.day(dayOfWeek, {
|
|
2339
|
+
width: "wide",
|
|
2340
|
+
context: "formatting"
|
|
2341
|
+
});
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
// AM or PM
|
|
2345
|
+
a: function(date, token, localize3) {
|
|
2346
|
+
const hours = date.getHours();
|
|
2347
|
+
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
2348
|
+
switch (token) {
|
|
2349
|
+
case "a":
|
|
2350
|
+
case "aa":
|
|
2351
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2352
|
+
width: "abbreviated",
|
|
2353
|
+
context: "formatting"
|
|
2354
|
+
});
|
|
2355
|
+
case "aaa":
|
|
2356
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2357
|
+
width: "abbreviated",
|
|
2358
|
+
context: "formatting"
|
|
2359
|
+
}).toLowerCase();
|
|
2360
|
+
case "aaaaa":
|
|
2361
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2362
|
+
width: "narrow",
|
|
2363
|
+
context: "formatting"
|
|
2364
|
+
});
|
|
2365
|
+
case "aaaa":
|
|
2366
|
+
default:
|
|
2367
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2368
|
+
width: "wide",
|
|
2369
|
+
context: "formatting"
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
// AM, PM, midnight, noon
|
|
2374
|
+
b: function(date, token, localize3) {
|
|
2375
|
+
const hours = date.getHours();
|
|
2376
|
+
let dayPeriodEnumValue;
|
|
2377
|
+
if (hours === 12) {
|
|
2378
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
2379
|
+
} else if (hours === 0) {
|
|
2380
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
2381
|
+
} else {
|
|
2382
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
2383
|
+
}
|
|
2384
|
+
switch (token) {
|
|
2385
|
+
case "b":
|
|
2386
|
+
case "bb":
|
|
2387
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2388
|
+
width: "abbreviated",
|
|
2389
|
+
context: "formatting"
|
|
2390
|
+
});
|
|
2391
|
+
case "bbb":
|
|
2392
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2393
|
+
width: "abbreviated",
|
|
2394
|
+
context: "formatting"
|
|
2395
|
+
}).toLowerCase();
|
|
2396
|
+
case "bbbbb":
|
|
2397
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2398
|
+
width: "narrow",
|
|
2399
|
+
context: "formatting"
|
|
2400
|
+
});
|
|
2401
|
+
case "bbbb":
|
|
2402
|
+
default:
|
|
2403
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2404
|
+
width: "wide",
|
|
2405
|
+
context: "formatting"
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
2410
|
+
B: function(date, token, localize3) {
|
|
2411
|
+
const hours = date.getHours();
|
|
2412
|
+
let dayPeriodEnumValue;
|
|
2413
|
+
if (hours >= 17) {
|
|
2414
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
2415
|
+
} else if (hours >= 12) {
|
|
2416
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
2417
|
+
} else if (hours >= 4) {
|
|
2418
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
2419
|
+
} else {
|
|
2420
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
2421
|
+
}
|
|
2422
|
+
switch (token) {
|
|
2423
|
+
case "B":
|
|
2424
|
+
case "BB":
|
|
2425
|
+
case "BBB":
|
|
2426
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2427
|
+
width: "abbreviated",
|
|
2428
|
+
context: "formatting"
|
|
2429
|
+
});
|
|
2430
|
+
case "BBBBB":
|
|
2431
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2432
|
+
width: "narrow",
|
|
2433
|
+
context: "formatting"
|
|
2434
|
+
});
|
|
2435
|
+
case "BBBB":
|
|
2436
|
+
default:
|
|
2437
|
+
return localize3.dayPeriod(dayPeriodEnumValue, {
|
|
2438
|
+
width: "wide",
|
|
2439
|
+
context: "formatting"
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
},
|
|
2443
|
+
// Hour [1-12]
|
|
2444
|
+
h: function(date, token, localize3) {
|
|
2445
|
+
if (token === "ho") {
|
|
2446
|
+
let hours = date.getHours() % 12;
|
|
2447
|
+
if (hours === 0) hours = 12;
|
|
2448
|
+
return localize3.ordinalNumber(hours, { unit: "hour" });
|
|
2449
|
+
}
|
|
2450
|
+
return lightFormatters.h(date, token);
|
|
2451
|
+
},
|
|
2452
|
+
// Hour [0-23]
|
|
2453
|
+
H: function(date, token, localize3) {
|
|
2454
|
+
if (token === "Ho") {
|
|
2455
|
+
return localize3.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
2456
|
+
}
|
|
2457
|
+
return lightFormatters.H(date, token);
|
|
2458
|
+
},
|
|
2459
|
+
// Hour [0-11]
|
|
2460
|
+
K: function(date, token, localize3) {
|
|
2461
|
+
const hours = date.getHours() % 12;
|
|
2462
|
+
if (token === "Ko") {
|
|
2463
|
+
return localize3.ordinalNumber(hours, { unit: "hour" });
|
|
2464
|
+
}
|
|
2465
|
+
return addLeadingZeros(hours, token.length);
|
|
2466
|
+
},
|
|
2467
|
+
// Hour [1-24]
|
|
2468
|
+
k: function(date, token, localize3) {
|
|
2469
|
+
let hours = date.getHours();
|
|
2470
|
+
if (hours === 0) hours = 24;
|
|
2471
|
+
if (token === "ko") {
|
|
2472
|
+
return localize3.ordinalNumber(hours, { unit: "hour" });
|
|
2473
|
+
}
|
|
2474
|
+
return addLeadingZeros(hours, token.length);
|
|
2475
|
+
},
|
|
2476
|
+
// Minute
|
|
2477
|
+
m: function(date, token, localize3) {
|
|
2478
|
+
if (token === "mo") {
|
|
2479
|
+
return localize3.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
2480
|
+
}
|
|
2481
|
+
return lightFormatters.m(date, token);
|
|
2482
|
+
},
|
|
2483
|
+
// Second
|
|
2484
|
+
s: function(date, token, localize3) {
|
|
2485
|
+
if (token === "so") {
|
|
2486
|
+
return localize3.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
2487
|
+
}
|
|
2488
|
+
return lightFormatters.s(date, token);
|
|
2489
|
+
},
|
|
2490
|
+
// Fraction of second
|
|
2491
|
+
S: function(date, token) {
|
|
2492
|
+
return lightFormatters.S(date, token);
|
|
2493
|
+
},
|
|
2494
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2495
|
+
X: function(date, token, _localize) {
|
|
2496
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
2497
|
+
if (timezoneOffset === 0) {
|
|
2498
|
+
return "Z";
|
|
2499
|
+
}
|
|
2500
|
+
switch (token) {
|
|
2501
|
+
// Hours and optional minutes
|
|
2502
|
+
case "X":
|
|
2503
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2504
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
2505
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2506
|
+
// so this token always has the same output as `XX`
|
|
2507
|
+
case "XXXX":
|
|
2508
|
+
case "XX":
|
|
2509
|
+
return formatTimezone(timezoneOffset);
|
|
2510
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
2511
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2512
|
+
// so this token always has the same output as `XXX`
|
|
2513
|
+
case "XXXXX":
|
|
2514
|
+
case "XXX":
|
|
2515
|
+
// Hours and minutes with `:` delimiter
|
|
2516
|
+
default:
|
|
2517
|
+
return formatTimezone(timezoneOffset, ":");
|
|
2518
|
+
}
|
|
2519
|
+
},
|
|
2520
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2521
|
+
x: function(date, token, _localize) {
|
|
2522
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
2523
|
+
switch (token) {
|
|
2524
|
+
// Hours and optional minutes
|
|
2525
|
+
case "x":
|
|
2526
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2527
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
2528
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2529
|
+
// so this token always has the same output as `xx`
|
|
2530
|
+
case "xxxx":
|
|
2531
|
+
case "xx":
|
|
2532
|
+
return formatTimezone(timezoneOffset);
|
|
2533
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
2534
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2535
|
+
// so this token always has the same output as `xxx`
|
|
2536
|
+
case "xxxxx":
|
|
2537
|
+
case "xxx":
|
|
2538
|
+
// Hours and minutes with `:` delimiter
|
|
2539
|
+
default:
|
|
2540
|
+
return formatTimezone(timezoneOffset, ":");
|
|
2541
|
+
}
|
|
2542
|
+
},
|
|
2543
|
+
// Timezone (GMT)
|
|
2544
|
+
O: function(date, token, _localize) {
|
|
2545
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
2546
|
+
switch (token) {
|
|
2547
|
+
// Short
|
|
2548
|
+
case "O":
|
|
2549
|
+
case "OO":
|
|
2550
|
+
case "OOO":
|
|
2551
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2552
|
+
// Long
|
|
2553
|
+
case "OOOO":
|
|
2554
|
+
default:
|
|
2555
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
// Timezone (specific non-location)
|
|
2559
|
+
z: function(date, token, _localize) {
|
|
2560
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
2561
|
+
switch (token) {
|
|
2562
|
+
// Short
|
|
2563
|
+
case "z":
|
|
2564
|
+
case "zz":
|
|
2565
|
+
case "zzz":
|
|
2566
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2567
|
+
// Long
|
|
2568
|
+
case "zzzz":
|
|
2569
|
+
default:
|
|
2570
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2571
|
+
}
|
|
2572
|
+
},
|
|
2573
|
+
// Seconds timestamp
|
|
2574
|
+
t: function(date, token, _localize) {
|
|
2575
|
+
const timestamp = Math.trunc(+date / 1e3);
|
|
2576
|
+
return addLeadingZeros(timestamp, token.length);
|
|
2577
|
+
},
|
|
2578
|
+
// Milliseconds timestamp
|
|
2579
|
+
T: function(date, token, _localize) {
|
|
2580
|
+
return addLeadingZeros(+date, token.length);
|
|
2581
|
+
}
|
|
2582
|
+
};
|
|
2583
|
+
function formatTimezoneShort(offset, delimiter = "") {
|
|
2584
|
+
const sign = offset > 0 ? "-" : "+";
|
|
2585
|
+
const absOffset = Math.abs(offset);
|
|
2586
|
+
const hours = Math.trunc(absOffset / 60);
|
|
2587
|
+
const minutes = absOffset % 60;
|
|
2588
|
+
if (minutes === 0) {
|
|
2589
|
+
return sign + String(hours);
|
|
2590
|
+
}
|
|
2591
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
2592
|
+
}
|
|
2593
|
+
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
2594
|
+
if (offset % 60 === 0) {
|
|
2595
|
+
const sign = offset > 0 ? "-" : "+";
|
|
2596
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
2597
|
+
}
|
|
2598
|
+
return formatTimezone(offset, delimiter);
|
|
2599
|
+
}
|
|
2600
|
+
function formatTimezone(offset, delimiter = "") {
|
|
2601
|
+
const sign = offset > 0 ? "-" : "+";
|
|
2602
|
+
const absOffset = Math.abs(offset);
|
|
2603
|
+
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
2604
|
+
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
2605
|
+
return sign + hours + delimiter + minutes;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
// node_modules/date-fns/_lib/format/longFormatters.js
|
|
2609
|
+
var dateLongFormatter = (pattern, formatLong3) => {
|
|
2610
|
+
switch (pattern) {
|
|
2611
|
+
case "P":
|
|
2612
|
+
return formatLong3.date({ width: "short" });
|
|
2613
|
+
case "PP":
|
|
2614
|
+
return formatLong3.date({ width: "medium" });
|
|
2615
|
+
case "PPP":
|
|
2616
|
+
return formatLong3.date({ width: "long" });
|
|
2617
|
+
case "PPPP":
|
|
2618
|
+
default:
|
|
2619
|
+
return formatLong3.date({ width: "full" });
|
|
2620
|
+
}
|
|
2621
|
+
};
|
|
2622
|
+
var timeLongFormatter = (pattern, formatLong3) => {
|
|
2623
|
+
switch (pattern) {
|
|
2624
|
+
case "p":
|
|
2625
|
+
return formatLong3.time({ width: "short" });
|
|
2626
|
+
case "pp":
|
|
2627
|
+
return formatLong3.time({ width: "medium" });
|
|
2628
|
+
case "ppp":
|
|
2629
|
+
return formatLong3.time({ width: "long" });
|
|
2630
|
+
case "pppp":
|
|
2631
|
+
default:
|
|
2632
|
+
return formatLong3.time({ width: "full" });
|
|
2633
|
+
}
|
|
2634
|
+
};
|
|
2635
|
+
var dateTimeLongFormatter = (pattern, formatLong3) => {
|
|
2636
|
+
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
2637
|
+
const datePattern = matchResult[1];
|
|
2638
|
+
const timePattern = matchResult[2];
|
|
2639
|
+
if (!timePattern) {
|
|
2640
|
+
return dateLongFormatter(pattern, formatLong3);
|
|
2641
|
+
}
|
|
2642
|
+
let dateTimeFormat;
|
|
2643
|
+
switch (datePattern) {
|
|
2644
|
+
case "P":
|
|
2645
|
+
dateTimeFormat = formatLong3.dateTime({ width: "short" });
|
|
2646
|
+
break;
|
|
2647
|
+
case "PP":
|
|
2648
|
+
dateTimeFormat = formatLong3.dateTime({ width: "medium" });
|
|
2649
|
+
break;
|
|
2650
|
+
case "PPP":
|
|
2651
|
+
dateTimeFormat = formatLong3.dateTime({ width: "long" });
|
|
2652
|
+
break;
|
|
2653
|
+
case "PPPP":
|
|
2654
|
+
default:
|
|
2655
|
+
dateTimeFormat = formatLong3.dateTime({ width: "full" });
|
|
2656
|
+
break;
|
|
2657
|
+
}
|
|
2658
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong3)).replace("{{time}}", timeLongFormatter(timePattern, formatLong3));
|
|
2659
|
+
};
|
|
2660
|
+
var longFormatters = {
|
|
2661
|
+
p: timeLongFormatter,
|
|
2662
|
+
P: dateTimeLongFormatter
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
// node_modules/date-fns/_lib/protectedTokens.js
|
|
2666
|
+
var dayOfYearTokenRE = /^D+$/;
|
|
2667
|
+
var weekYearTokenRE = /^Y+$/;
|
|
2668
|
+
var throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
2669
|
+
function isProtectedDayOfYearToken(token) {
|
|
2670
|
+
return dayOfYearTokenRE.test(token);
|
|
2671
|
+
}
|
|
2672
|
+
function isProtectedWeekYearToken(token) {
|
|
2673
|
+
return weekYearTokenRE.test(token);
|
|
2674
|
+
}
|
|
2675
|
+
function warnOrThrowProtectedError(token, format2, input) {
|
|
2676
|
+
const _message = message(token, format2, input);
|
|
2677
|
+
console.warn(_message);
|
|
2678
|
+
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
2679
|
+
}
|
|
2680
|
+
function message(token, format2, input) {
|
|
2681
|
+
const subject = token[0] === "Y" ? "years" : "days of the month";
|
|
2682
|
+
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
// node_modules/date-fns/format.js
|
|
2686
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
2687
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
2688
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
2689
|
+
var doubleQuoteRegExp = /''/g;
|
|
2690
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
2691
|
+
function format(date, formatStr, options) {
|
|
2692
|
+
const defaultOptions2 = getDefaultOptions();
|
|
2693
|
+
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
2694
|
+
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
2695
|
+
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
2696
|
+
const originalDate = toDate(date, options?.in);
|
|
2697
|
+
if (!isValid(originalDate)) {
|
|
2698
|
+
throw new RangeError("Invalid time value");
|
|
2699
|
+
}
|
|
2700
|
+
let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
|
|
2701
|
+
const firstCharacter = substring[0];
|
|
2702
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
2703
|
+
const longFormatter = longFormatters[firstCharacter];
|
|
2704
|
+
return longFormatter(substring, locale.formatLong);
|
|
2705
|
+
}
|
|
2706
|
+
return substring;
|
|
2707
|
+
}).join("").match(formattingTokensRegExp).map((substring) => {
|
|
2708
|
+
if (substring === "''") {
|
|
2709
|
+
return { isToken: false, value: "'" };
|
|
2710
|
+
}
|
|
2711
|
+
const firstCharacter = substring[0];
|
|
2712
|
+
if (firstCharacter === "'") {
|
|
2713
|
+
return { isToken: false, value: cleanEscapedString(substring) };
|
|
2714
|
+
}
|
|
2715
|
+
if (formatters[firstCharacter]) {
|
|
2716
|
+
return { isToken: true, value: substring };
|
|
2717
|
+
}
|
|
2718
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2719
|
+
throw new RangeError(
|
|
2720
|
+
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
|
|
2721
|
+
);
|
|
2722
|
+
}
|
|
2723
|
+
return { isToken: false, value: substring };
|
|
2724
|
+
});
|
|
2725
|
+
if (locale.localize.preprocessor) {
|
|
2726
|
+
parts = locale.localize.preprocessor(originalDate, parts);
|
|
2727
|
+
}
|
|
2728
|
+
const formatterOptions = {
|
|
2729
|
+
firstWeekContainsDate,
|
|
2730
|
+
weekStartsOn,
|
|
2731
|
+
locale
|
|
2732
|
+
};
|
|
2733
|
+
return parts.map((part) => {
|
|
2734
|
+
if (!part.isToken) return part.value;
|
|
2735
|
+
const token = part.value;
|
|
2736
|
+
if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
|
|
2737
|
+
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
2738
|
+
}
|
|
2739
|
+
const formatter = formatters[token[0]];
|
|
2740
|
+
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
2741
|
+
}).join("");
|
|
2742
|
+
}
|
|
2743
|
+
function cleanEscapedString(input) {
|
|
2744
|
+
const matched = input.match(escapedStringRegExp);
|
|
2745
|
+
if (!matched) {
|
|
2746
|
+
return input;
|
|
2747
|
+
}
|
|
2748
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
2752
|
+
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
2753
|
+
|
|
2754
|
+
// node_modules/date-fns/locale/th/_lib/formatDistance.js
|
|
2755
|
+
var formatDistanceLocale2 = {
|
|
2756
|
+
lessThanXSeconds: {
|
|
2757
|
+
one: "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 1 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
|
|
2758
|
+
other: "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{count}} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
|
|
2759
|
+
},
|
|
2760
|
+
xSeconds: {
|
|
2761
|
+
one: "1 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
|
|
2762
|
+
other: "{{count}} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
|
|
2763
|
+
},
|
|
2764
|
+
halfAMinute: "\u0E04\u0E23\u0E36\u0E48\u0E07\u0E19\u0E32\u0E17\u0E35",
|
|
2765
|
+
lessThanXMinutes: {
|
|
2766
|
+
one: "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 1 \u0E19\u0E32\u0E17\u0E35",
|
|
2767
|
+
other: "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{count}} \u0E19\u0E32\u0E17\u0E35"
|
|
2768
|
+
},
|
|
2769
|
+
xMinutes: {
|
|
2770
|
+
one: "1 \u0E19\u0E32\u0E17\u0E35",
|
|
2771
|
+
other: "{{count}} \u0E19\u0E32\u0E17\u0E35"
|
|
2772
|
+
},
|
|
2773
|
+
aboutXHours: {
|
|
2774
|
+
one: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",
|
|
2775
|
+
other: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 {{count}} \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"
|
|
2776
|
+
},
|
|
2777
|
+
xHours: {
|
|
2778
|
+
one: "1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",
|
|
2779
|
+
other: "{{count}} \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"
|
|
2780
|
+
},
|
|
2781
|
+
xDays: {
|
|
2782
|
+
one: "1 \u0E27\u0E31\u0E19",
|
|
2783
|
+
other: "{{count}} \u0E27\u0E31\u0E19"
|
|
2784
|
+
},
|
|
2785
|
+
aboutXWeeks: {
|
|
2786
|
+
one: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 1 \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",
|
|
2787
|
+
other: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 {{count}} \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"
|
|
2788
|
+
},
|
|
2789
|
+
xWeeks: {
|
|
2790
|
+
one: "1 \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",
|
|
2791
|
+
other: "{{count}} \u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"
|
|
2792
|
+
},
|
|
2793
|
+
aboutXMonths: {
|
|
2794
|
+
one: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 1 \u0E40\u0E14\u0E37\u0E2D\u0E19",
|
|
2795
|
+
other: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 {{count}} \u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2796
|
+
},
|
|
2797
|
+
xMonths: {
|
|
2798
|
+
one: "1 \u0E40\u0E14\u0E37\u0E2D\u0E19",
|
|
2799
|
+
other: "{{count}} \u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2800
|
+
},
|
|
2801
|
+
aboutXYears: {
|
|
2802
|
+
one: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 1 \u0E1B\u0E35",
|
|
2803
|
+
other: "\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 {{count}} \u0E1B\u0E35"
|
|
2804
|
+
},
|
|
2805
|
+
xYears: {
|
|
2806
|
+
one: "1 \u0E1B\u0E35",
|
|
2807
|
+
other: "{{count}} \u0E1B\u0E35"
|
|
2808
|
+
},
|
|
2809
|
+
overXYears: {
|
|
2810
|
+
one: "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 1 \u0E1B\u0E35",
|
|
2811
|
+
other: "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 {{count}} \u0E1B\u0E35"
|
|
2812
|
+
},
|
|
2813
|
+
almostXYears: {
|
|
2814
|
+
one: "\u0E40\u0E01\u0E37\u0E2D\u0E1A 1 \u0E1B\u0E35",
|
|
2815
|
+
other: "\u0E40\u0E01\u0E37\u0E2D\u0E1A {{count}} \u0E1B\u0E35"
|
|
2816
|
+
}
|
|
2817
|
+
};
|
|
2818
|
+
var formatDistance2 = (token, count, options) => {
|
|
2819
|
+
let result;
|
|
2820
|
+
const tokenValue = formatDistanceLocale2[token];
|
|
2821
|
+
if (typeof tokenValue === "string") {
|
|
2822
|
+
result = tokenValue;
|
|
2823
|
+
} else if (count === 1) {
|
|
2824
|
+
result = tokenValue.one;
|
|
2825
|
+
} else {
|
|
2826
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
2827
|
+
}
|
|
2828
|
+
if (options?.addSuffix) {
|
|
2829
|
+
if (options.comparison && options.comparison > 0) {
|
|
2830
|
+
if (token === "halfAMinute") {
|
|
2831
|
+
return "\u0E43\u0E19" + result;
|
|
2832
|
+
} else {
|
|
2833
|
+
return "\u0E43\u0E19 " + result;
|
|
2834
|
+
}
|
|
2835
|
+
} else {
|
|
2836
|
+
return result + "\u0E17\u0E35\u0E48\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32";
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
return result;
|
|
2840
|
+
};
|
|
2841
|
+
|
|
2842
|
+
// node_modules/date-fns/locale/th/_lib/formatLong.js
|
|
2843
|
+
var dateFormats2 = {
|
|
2844
|
+
full: "\u0E27\u0E31\u0E19EEEE\u0E17\u0E35\u0E48 do MMMM y",
|
|
2845
|
+
long: "do MMMM y",
|
|
2846
|
+
medium: "d MMM y",
|
|
2847
|
+
short: "dd/MM/yyyy"
|
|
2848
|
+
};
|
|
2849
|
+
var timeFormats2 = {
|
|
2850
|
+
full: "H:mm:ss \u0E19. zzzz",
|
|
2851
|
+
long: "H:mm:ss \u0E19. z",
|
|
2852
|
+
medium: "H:mm:ss \u0E19.",
|
|
2853
|
+
short: "H:mm \u0E19."
|
|
2854
|
+
};
|
|
2855
|
+
var dateTimeFormats2 = {
|
|
2856
|
+
full: "{{date}} '\u0E40\u0E27\u0E25\u0E32' {{time}}",
|
|
2857
|
+
long: "{{date}} '\u0E40\u0E27\u0E25\u0E32' {{time}}",
|
|
2858
|
+
medium: "{{date}}, {{time}}",
|
|
2859
|
+
short: "{{date}}, {{time}}"
|
|
2860
|
+
};
|
|
2861
|
+
var formatLong2 = {
|
|
2862
|
+
date: buildFormatLongFn({
|
|
2863
|
+
formats: dateFormats2,
|
|
2864
|
+
defaultWidth: "full"
|
|
2865
|
+
}),
|
|
2866
|
+
time: buildFormatLongFn({
|
|
2867
|
+
formats: timeFormats2,
|
|
2868
|
+
defaultWidth: "medium"
|
|
2869
|
+
}),
|
|
2870
|
+
dateTime: buildFormatLongFn({
|
|
2871
|
+
formats: dateTimeFormats2,
|
|
2872
|
+
defaultWidth: "full"
|
|
2873
|
+
})
|
|
2874
|
+
};
|
|
2875
|
+
|
|
2876
|
+
// node_modules/date-fns/locale/th/_lib/formatRelative.js
|
|
2877
|
+
var formatRelativeLocale2 = {
|
|
2878
|
+
lastWeek: "eeee'\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27\u0E40\u0E27\u0E25\u0E32' p",
|
|
2879
|
+
yesterday: "'\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E27\u0E32\u0E19\u0E19\u0E35\u0E49\u0E40\u0E27\u0E25\u0E32' p",
|
|
2880
|
+
today: "'\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49\u0E40\u0E27\u0E25\u0E32' p",
|
|
2881
|
+
tomorrow: "'\u0E1E\u0E23\u0E38\u0E48\u0E07\u0E19\u0E35\u0E49\u0E40\u0E27\u0E25\u0E32' p",
|
|
2882
|
+
nextWeek: "eeee '\u0E40\u0E27\u0E25\u0E32' p",
|
|
2883
|
+
other: "P"
|
|
2884
|
+
};
|
|
2885
|
+
var formatRelative2 = (token, _date, _baseDate, _options) => formatRelativeLocale2[token];
|
|
2886
|
+
|
|
2887
|
+
// node_modules/date-fns/locale/th/_lib/localize.js
|
|
2888
|
+
var eraValues2 = {
|
|
2889
|
+
narrow: ["B", "\u0E04\u0E28"],
|
|
2890
|
+
abbreviated: ["BC", "\u0E04.\u0E28."],
|
|
2891
|
+
wide: ["\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E04\u0E23\u0E34\u0E2A\u0E15\u0E01\u0E32\u0E25", "\u0E04\u0E23\u0E34\u0E2A\u0E15\u0E4C\u0E28\u0E31\u0E01\u0E23\u0E32\u0E0A"]
|
|
2892
|
+
};
|
|
2893
|
+
var quarterValues2 = {
|
|
2894
|
+
narrow: ["1", "2", "3", "4"],
|
|
2895
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2896
|
+
wide: ["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E41\u0E23\u0E01", "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48\u0E2A\u0E2D\u0E07", "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21", "\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48\u0E2A\u0E35\u0E48"]
|
|
2897
|
+
};
|
|
2898
|
+
var dayValues2 = {
|
|
2899
|
+
narrow: ["\u0E2D\u0E32.", "\u0E08.", "\u0E2D.", "\u0E1E.", "\u0E1E\u0E24.", "\u0E28.", "\u0E2A."],
|
|
2900
|
+
short: ["\u0E2D\u0E32.", "\u0E08.", "\u0E2D.", "\u0E1E.", "\u0E1E\u0E24.", "\u0E28.", "\u0E2A."],
|
|
2901
|
+
abbreviated: ["\u0E2D\u0E32.", "\u0E08.", "\u0E2D.", "\u0E1E.", "\u0E1E\u0E24.", "\u0E28.", "\u0E2A."],
|
|
2902
|
+
wide: ["\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C", "\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C", "\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23", "\u0E1E\u0E38\u0E18", "\u0E1E\u0E24\u0E2B\u0E31\u0E2A\u0E1A\u0E14\u0E35", "\u0E28\u0E38\u0E01\u0E23\u0E4C", "\u0E40\u0E2A\u0E32\u0E23\u0E4C"]
|
|
2903
|
+
};
|
|
2904
|
+
var monthValues2 = {
|
|
2905
|
+
narrow: [
|
|
2906
|
+
"\u0E21.\u0E04.",
|
|
2907
|
+
"\u0E01.\u0E1E.",
|
|
2908
|
+
"\u0E21\u0E35.\u0E04.",
|
|
2909
|
+
"\u0E40\u0E21.\u0E22.",
|
|
2910
|
+
"\u0E1E.\u0E04.",
|
|
2911
|
+
"\u0E21\u0E34.\u0E22.",
|
|
2912
|
+
"\u0E01.\u0E04.",
|
|
2913
|
+
"\u0E2A.\u0E04.",
|
|
2914
|
+
"\u0E01.\u0E22.",
|
|
2915
|
+
"\u0E15.\u0E04.",
|
|
2916
|
+
"\u0E1E.\u0E22.",
|
|
2917
|
+
"\u0E18.\u0E04."
|
|
2918
|
+
],
|
|
2919
|
+
abbreviated: [
|
|
2920
|
+
"\u0E21.\u0E04.",
|
|
2921
|
+
"\u0E01.\u0E1E.",
|
|
2922
|
+
"\u0E21\u0E35.\u0E04.",
|
|
2923
|
+
"\u0E40\u0E21.\u0E22.",
|
|
2924
|
+
"\u0E1E.\u0E04.",
|
|
2925
|
+
"\u0E21\u0E34.\u0E22.",
|
|
2926
|
+
"\u0E01.\u0E04.",
|
|
2927
|
+
"\u0E2A.\u0E04.",
|
|
2928
|
+
"\u0E01.\u0E22.",
|
|
2929
|
+
"\u0E15.\u0E04.",
|
|
2930
|
+
"\u0E1E.\u0E22.",
|
|
2931
|
+
"\u0E18.\u0E04."
|
|
2932
|
+
],
|
|
2933
|
+
wide: [
|
|
2934
|
+
"\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21",
|
|
2935
|
+
"\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C",
|
|
2936
|
+
"\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21",
|
|
2937
|
+
"\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19",
|
|
2938
|
+
"\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21",
|
|
2939
|
+
"\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19",
|
|
2940
|
+
"\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21",
|
|
2941
|
+
"\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21",
|
|
2942
|
+
"\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19",
|
|
2943
|
+
"\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21",
|
|
2944
|
+
"\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19",
|
|
2945
|
+
"\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21"
|
|
2946
|
+
]
|
|
2947
|
+
};
|
|
2948
|
+
var dayPeriodValues2 = {
|
|
2949
|
+
narrow: {
|
|
2950
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2951
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2952
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
2953
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2954
|
+
morning: "\u0E40\u0E0A\u0E49\u0E32",
|
|
2955
|
+
afternoon: "\u0E1A\u0E48\u0E32\u0E22",
|
|
2956
|
+
evening: "\u0E40\u0E22\u0E47\u0E19",
|
|
2957
|
+
night: "\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
2958
|
+
},
|
|
2959
|
+
abbreviated: {
|
|
2960
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2961
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2962
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
2963
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2964
|
+
morning: "\u0E40\u0E0A\u0E49\u0E32",
|
|
2965
|
+
afternoon: "\u0E1A\u0E48\u0E32\u0E22",
|
|
2966
|
+
evening: "\u0E40\u0E22\u0E47\u0E19",
|
|
2967
|
+
night: "\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
2968
|
+
},
|
|
2969
|
+
wide: {
|
|
2970
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2971
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2972
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
2973
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2974
|
+
morning: "\u0E40\u0E0A\u0E49\u0E32",
|
|
2975
|
+
afternoon: "\u0E1A\u0E48\u0E32\u0E22",
|
|
2976
|
+
evening: "\u0E40\u0E22\u0E47\u0E19",
|
|
2977
|
+
night: "\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
2978
|
+
}
|
|
2979
|
+
};
|
|
2980
|
+
var formattingDayPeriodValues2 = {
|
|
2981
|
+
narrow: {
|
|
2982
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2983
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2984
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
2985
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2986
|
+
morning: "\u0E15\u0E2D\u0E19\u0E40\u0E0A\u0E49\u0E32",
|
|
2987
|
+
afternoon: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E27\u0E31\u0E19",
|
|
2988
|
+
evening: "\u0E15\u0E2D\u0E19\u0E40\u0E22\u0E47\u0E19",
|
|
2989
|
+
night: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
2990
|
+
},
|
|
2991
|
+
abbreviated: {
|
|
2992
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2993
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2994
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
2995
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
2996
|
+
morning: "\u0E15\u0E2D\u0E19\u0E40\u0E0A\u0E49\u0E32",
|
|
2997
|
+
afternoon: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E27\u0E31\u0E19",
|
|
2998
|
+
evening: "\u0E15\u0E2D\u0E19\u0E40\u0E22\u0E47\u0E19",
|
|
2999
|
+
night: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
3000
|
+
},
|
|
3001
|
+
wide: {
|
|
3002
|
+
am: "\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
3003
|
+
pm: "\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
3004
|
+
midnight: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07\u0E04\u0E37\u0E19",
|
|
3005
|
+
noon: "\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",
|
|
3006
|
+
morning: "\u0E15\u0E2D\u0E19\u0E40\u0E0A\u0E49\u0E32",
|
|
3007
|
+
afternoon: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E27\u0E31\u0E19",
|
|
3008
|
+
evening: "\u0E15\u0E2D\u0E19\u0E40\u0E22\u0E47\u0E19",
|
|
3009
|
+
night: "\u0E15\u0E2D\u0E19\u0E01\u0E25\u0E32\u0E07\u0E04\u0E37\u0E19"
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
3012
|
+
var ordinalNumber2 = (dirtyNumber, _options) => {
|
|
3013
|
+
return String(dirtyNumber);
|
|
3014
|
+
};
|
|
3015
|
+
var localize2 = {
|
|
3016
|
+
ordinalNumber: ordinalNumber2,
|
|
3017
|
+
era: buildLocalizeFn({
|
|
3018
|
+
values: eraValues2,
|
|
3019
|
+
defaultWidth: "wide"
|
|
3020
|
+
}),
|
|
3021
|
+
quarter: buildLocalizeFn({
|
|
3022
|
+
values: quarterValues2,
|
|
3023
|
+
defaultWidth: "wide",
|
|
3024
|
+
argumentCallback: (quarter) => quarter - 1
|
|
3025
|
+
}),
|
|
3026
|
+
month: buildLocalizeFn({
|
|
3027
|
+
values: monthValues2,
|
|
3028
|
+
defaultWidth: "wide"
|
|
3029
|
+
}),
|
|
3030
|
+
day: buildLocalizeFn({
|
|
3031
|
+
values: dayValues2,
|
|
3032
|
+
defaultWidth: "wide"
|
|
3033
|
+
}),
|
|
3034
|
+
dayPeriod: buildLocalizeFn({
|
|
3035
|
+
values: dayPeriodValues2,
|
|
3036
|
+
defaultWidth: "wide",
|
|
3037
|
+
formattingValues: formattingDayPeriodValues2,
|
|
3038
|
+
defaultFormattingWidth: "wide"
|
|
3039
|
+
})
|
|
3040
|
+
};
|
|
3041
|
+
|
|
3042
|
+
// node_modules/date-fns/locale/th/_lib/match.js
|
|
3043
|
+
var matchOrdinalNumberPattern2 = /^\d+/i;
|
|
3044
|
+
var parseOrdinalNumberPattern2 = /\d+/i;
|
|
3045
|
+
var matchEraPatterns2 = {
|
|
3046
|
+
narrow: /^([bB]|[aA]|คศ)/i,
|
|
3047
|
+
abbreviated: /^([bB]\.?\s?[cC]\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?|ค\.?ศ\.?)/i,
|
|
3048
|
+
wide: /^(ก่อนคริสตกาล|คริสต์ศักราช|คริสตกาล)/i
|
|
3049
|
+
};
|
|
3050
|
+
var parseEraPatterns2 = {
|
|
3051
|
+
any: [/^[bB]/i, /^(^[aA]|ค\.?ศ\.?|คริสตกาล|คริสต์ศักราช|)/i]
|
|
3052
|
+
};
|
|
3053
|
+
var matchQuarterPatterns2 = {
|
|
3054
|
+
narrow: /^[1234]/i,
|
|
3055
|
+
abbreviated: /^q[1234]/i,
|
|
3056
|
+
wide: /^ไตรมาส(ที่)? ?[1234]/i
|
|
3057
|
+
};
|
|
3058
|
+
var parseQuarterPatterns2 = {
|
|
3059
|
+
any: [/(1|แรก|หนึ่ง)/i, /(2|สอง)/i, /(3|สาม)/i, /(4|สี่)/i]
|
|
3060
|
+
};
|
|
3061
|
+
var matchMonthPatterns2 = {
|
|
3062
|
+
narrow: /^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?)/i,
|
|
3063
|
+
abbreviated: /^(ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?')/i,
|
|
3064
|
+
wide: /^(มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม)/i
|
|
3065
|
+
};
|
|
3066
|
+
var parseMonthPatterns2 = {
|
|
3067
|
+
wide: [
|
|
3068
|
+
/^มก/i,
|
|
3069
|
+
/^กุม/i,
|
|
3070
|
+
/^มี/i,
|
|
3071
|
+
/^เม/i,
|
|
3072
|
+
/^พฤษ/i,
|
|
3073
|
+
/^มิ/i,
|
|
3074
|
+
/^กรก/i,
|
|
3075
|
+
/^ส/i,
|
|
3076
|
+
/^กัน/i,
|
|
3077
|
+
/^ต/i,
|
|
3078
|
+
/^พฤศ/i,
|
|
3079
|
+
/^ธ/i
|
|
3080
|
+
],
|
|
3081
|
+
any: [
|
|
3082
|
+
/^ม\.?ค\.?/i,
|
|
3083
|
+
/^ก\.?พ\.?/i,
|
|
3084
|
+
/^มี\.?ค\.?/i,
|
|
3085
|
+
/^เม\.?ย\.?/i,
|
|
3086
|
+
/^พ\.?ค\.?/i,
|
|
3087
|
+
/^มิ\.?ย\.?/i,
|
|
3088
|
+
/^ก\.?ค\.?/i,
|
|
3089
|
+
/^ส\.?ค\.?/i,
|
|
3090
|
+
/^ก\.?ย\.?/i,
|
|
3091
|
+
/^ต\.?ค\.?/i,
|
|
3092
|
+
/^พ\.?ย\.?/i,
|
|
3093
|
+
/^ธ\.?ค\.?/i
|
|
3094
|
+
]
|
|
3095
|
+
};
|
|
3096
|
+
var matchDayPatterns2 = {
|
|
3097
|
+
narrow: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
|
|
3098
|
+
short: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
|
|
3099
|
+
abbreviated: /^(อา\.?|จ\.?|อ\.?|พฤ\.?|พ\.?|ศ\.?|ส\.?)/i,
|
|
3100
|
+
wide: /^(อาทิตย์|จันทร์|อังคาร|พุธ|พฤหัสบดี|ศุกร์|เสาร์)/i
|
|
3101
|
+
};
|
|
3102
|
+
var parseDayPatterns2 = {
|
|
3103
|
+
wide: [/^อา/i, /^จั/i, /^อั/i, /^พุธ/i, /^พฤ/i, /^ศ/i, /^เส/i],
|
|
3104
|
+
any: [/^อา/i, /^จ/i, /^อ/i, /^พ(?!ฤ)/i, /^พฤ/i, /^ศ/i, /^ส/i]
|
|
3105
|
+
};
|
|
3106
|
+
var matchDayPeriodPatterns2 = {
|
|
3107
|
+
any: /^(ก่อนเที่ยง|หลังเที่ยง|เที่ยงคืน|เที่ยง|(ตอน.*?)?.*(เที่ยง|เช้า|บ่าย|เย็น|กลางคืน))/i
|
|
3108
|
+
};
|
|
3109
|
+
var parseDayPeriodPatterns2 = {
|
|
3110
|
+
any: {
|
|
3111
|
+
am: /^ก่อนเที่ยง/i,
|
|
3112
|
+
pm: /^หลังเที่ยง/i,
|
|
3113
|
+
midnight: /^เที่ยงคืน/i,
|
|
3114
|
+
noon: /^เที่ยง/i,
|
|
3115
|
+
morning: /เช้า/i,
|
|
3116
|
+
afternoon: /บ่าย/i,
|
|
3117
|
+
evening: /เย็น/i,
|
|
3118
|
+
night: /กลางคืน/i
|
|
3119
|
+
}
|
|
3120
|
+
};
|
|
3121
|
+
var match2 = {
|
|
3122
|
+
ordinalNumber: buildMatchPatternFn({
|
|
3123
|
+
matchPattern: matchOrdinalNumberPattern2,
|
|
3124
|
+
parsePattern: parseOrdinalNumberPattern2,
|
|
3125
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
3126
|
+
}),
|
|
3127
|
+
era: buildMatchFn({
|
|
3128
|
+
matchPatterns: matchEraPatterns2,
|
|
3129
|
+
defaultMatchWidth: "wide",
|
|
3130
|
+
parsePatterns: parseEraPatterns2,
|
|
3131
|
+
defaultParseWidth: "any"
|
|
3132
|
+
}),
|
|
3133
|
+
quarter: buildMatchFn({
|
|
3134
|
+
matchPatterns: matchQuarterPatterns2,
|
|
3135
|
+
defaultMatchWidth: "wide",
|
|
3136
|
+
parsePatterns: parseQuarterPatterns2,
|
|
3137
|
+
defaultParseWidth: "any",
|
|
3138
|
+
valueCallback: (index) => index + 1
|
|
3139
|
+
}),
|
|
3140
|
+
month: buildMatchFn({
|
|
3141
|
+
matchPatterns: matchMonthPatterns2,
|
|
3142
|
+
defaultMatchWidth: "wide",
|
|
3143
|
+
parsePatterns: parseMonthPatterns2,
|
|
3144
|
+
defaultParseWidth: "any"
|
|
3145
|
+
}),
|
|
3146
|
+
day: buildMatchFn({
|
|
3147
|
+
matchPatterns: matchDayPatterns2,
|
|
3148
|
+
defaultMatchWidth: "wide",
|
|
3149
|
+
parsePatterns: parseDayPatterns2,
|
|
3150
|
+
defaultParseWidth: "any"
|
|
3151
|
+
}),
|
|
3152
|
+
dayPeriod: buildMatchFn({
|
|
3153
|
+
matchPatterns: matchDayPeriodPatterns2,
|
|
3154
|
+
defaultMatchWidth: "any",
|
|
3155
|
+
parsePatterns: parseDayPeriodPatterns2,
|
|
3156
|
+
defaultParseWidth: "any"
|
|
3157
|
+
})
|
|
3158
|
+
};
|
|
3159
|
+
|
|
3160
|
+
// node_modules/date-fns/locale/th.js
|
|
3161
|
+
var th = {
|
|
3162
|
+
code: "th",
|
|
3163
|
+
formatDistance: formatDistance2,
|
|
3164
|
+
formatLong: formatLong2,
|
|
3165
|
+
formatRelative: formatRelative2,
|
|
3166
|
+
localize: localize2,
|
|
3167
|
+
match: match2,
|
|
3168
|
+
options: {
|
|
3169
|
+
weekStartsOn: 0,
|
|
3170
|
+
firstWeekContainsDate: 1
|
|
3171
|
+
}
|
|
3172
|
+
};
|
|
1235
3173
|
|
|
1236
3174
|
// src/DatePicker/convertToBuddhist.ts
|
|
1237
|
-
import
|
|
3175
|
+
import th2 from "antd/es/date-picker/locale/th_TH";
|
|
1238
3176
|
var buddhistLocale = {
|
|
1239
|
-
...
|
|
3177
|
+
...th2,
|
|
1240
3178
|
lang: {
|
|
1241
|
-
...
|
|
3179
|
+
...th2.lang,
|
|
1242
3180
|
fieldDateFormat: "BBBB-MM-DD",
|
|
1243
3181
|
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1244
3182
|
yearFormat: "BBBB",
|
|
@@ -1247,7 +3185,7 @@ var buddhistLocale = {
|
|
|
1247
3185
|
};
|
|
1248
3186
|
|
|
1249
3187
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1250
|
-
import { jsx as
|
|
3188
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1251
3189
|
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1252
3190
|
function DatePickerBasic({
|
|
1253
3191
|
value,
|
|
@@ -1264,8 +3202,8 @@ function DatePickerBasic({
|
|
|
1264
3202
|
className,
|
|
1265
3203
|
size
|
|
1266
3204
|
}) {
|
|
1267
|
-
return /* @__PURE__ */
|
|
1268
|
-
|
|
3205
|
+
return /* @__PURE__ */ jsx21(
|
|
3206
|
+
ConfigProvider5,
|
|
1269
3207
|
{
|
|
1270
3208
|
locale: thTH,
|
|
1271
3209
|
theme: {
|
|
@@ -1274,12 +3212,12 @@ function DatePickerBasic({
|
|
|
1274
3212
|
fontSize: 16
|
|
1275
3213
|
}
|
|
1276
3214
|
},
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
required && /* @__PURE__ */
|
|
3215
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
3216
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
3217
|
+
/* @__PURE__ */ jsx21("span", { className: "body-1", children: label }),
|
|
3218
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1281
3219
|
] }),
|
|
1282
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ jsx21(
|
|
1283
3221
|
DatePicker,
|
|
1284
3222
|
{
|
|
1285
3223
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1290,7 +3228,7 @@ function DatePickerBasic({
|
|
|
1290
3228
|
},
|
|
1291
3229
|
allowClear: true,
|
|
1292
3230
|
disabled,
|
|
1293
|
-
format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale:
|
|
3231
|
+
format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale: th }).replace(
|
|
1294
3232
|
/\d{4}$/,
|
|
1295
3233
|
(y) => String(parseInt(y) + 543)
|
|
1296
3234
|
) : "",
|
|
@@ -1302,7 +3240,7 @@ function DatePickerBasic({
|
|
|
1302
3240
|
locale: buddhistLocale
|
|
1303
3241
|
}
|
|
1304
3242
|
),
|
|
1305
|
-
error && /* @__PURE__ */
|
|
3243
|
+
error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 caption-1", children: error })
|
|
1306
3244
|
] })
|
|
1307
3245
|
}
|
|
1308
3246
|
);
|
|
@@ -1312,11 +3250,9 @@ function DatePickerBasic({
|
|
|
1312
3250
|
var import_th2 = __toESM(require_th());
|
|
1313
3251
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1314
3252
|
var import_buddhistEra2 = __toESM(require_buddhistEra());
|
|
1315
|
-
import { ConfigProvider as
|
|
3253
|
+
import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
|
|
1316
3254
|
import thTH2 from "antd/locale/th_TH";
|
|
1317
|
-
import {
|
|
1318
|
-
import { th as thFns2 } from "date-fns/locale";
|
|
1319
|
-
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3255
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1320
3256
|
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1321
3257
|
function DatePickerRangePicker({
|
|
1322
3258
|
value,
|
|
@@ -1334,8 +3270,8 @@ function DatePickerRangePicker({
|
|
|
1334
3270
|
onOpenChange,
|
|
1335
3271
|
onCalendarChange
|
|
1336
3272
|
}) {
|
|
1337
|
-
return /* @__PURE__ */
|
|
1338
|
-
|
|
3273
|
+
return /* @__PURE__ */ jsx22(
|
|
3274
|
+
ConfigProvider6,
|
|
1339
3275
|
{
|
|
1340
3276
|
locale: thTH2,
|
|
1341
3277
|
theme: {
|
|
@@ -1344,16 +3280,16 @@ function DatePickerRangePicker({
|
|
|
1344
3280
|
fontSize: 16
|
|
1345
3281
|
}
|
|
1346
3282
|
},
|
|
1347
|
-
children: /* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
3283
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
|
|
3284
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
3285
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
|
|
1350
3286
|
" ",
|
|
1351
|
-
required && /* @__PURE__ */
|
|
3287
|
+
required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1352
3288
|
] }),
|
|
1353
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsx22(
|
|
1354
3290
|
DatePicker2.RangePicker,
|
|
1355
3291
|
{
|
|
1356
|
-
format: (date) => date ?
|
|
3292
|
+
format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale: th }).replace(
|
|
1357
3293
|
/\d{4}$/,
|
|
1358
3294
|
(y) => String(parseInt(y) + 543)
|
|
1359
3295
|
) : "",
|
|
@@ -1397,7 +3333,7 @@ function DatePickerRangePicker({
|
|
|
1397
3333
|
locale: buddhistLocale
|
|
1398
3334
|
}
|
|
1399
3335
|
),
|
|
1400
|
-
error && /* @__PURE__ */
|
|
3336
|
+
error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
|
|
1401
3337
|
] })
|
|
1402
3338
|
}
|
|
1403
3339
|
);
|
|
@@ -1405,9 +3341,9 @@ function DatePickerRangePicker({
|
|
|
1405
3341
|
|
|
1406
3342
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1407
3343
|
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1408
|
-
import { ConfigProvider as
|
|
3344
|
+
import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
|
|
1409
3345
|
import thTH3 from "antd/locale/th_TH";
|
|
1410
|
-
import { jsx as
|
|
3346
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1411
3347
|
function TimePickerBasic({
|
|
1412
3348
|
value,
|
|
1413
3349
|
onChange,
|
|
@@ -1418,8 +3354,8 @@ function TimePickerBasic({
|
|
|
1418
3354
|
disabled,
|
|
1419
3355
|
className
|
|
1420
3356
|
}) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1422
|
-
|
|
3357
|
+
return /* @__PURE__ */ jsx23(
|
|
3358
|
+
ConfigProvider7,
|
|
1423
3359
|
{
|
|
1424
3360
|
locale: thTH3,
|
|
1425
3361
|
theme: {
|
|
@@ -1427,13 +3363,13 @@ function TimePickerBasic({
|
|
|
1427
3363
|
fontFamily: "Kanit"
|
|
1428
3364
|
}
|
|
1429
3365
|
},
|
|
1430
|
-
children: /* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1432
|
-
/* @__PURE__ */
|
|
3366
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
3367
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
3368
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
|
|
1433
3369
|
" ",
|
|
1434
|
-
required && /* @__PURE__ */
|
|
3370
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1435
3371
|
] }),
|
|
1436
|
-
/* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ jsx23(
|
|
1437
3373
|
TimePicker,
|
|
1438
3374
|
{
|
|
1439
3375
|
format: "HH:mm",
|
|
@@ -1447,7 +3383,7 @@ function TimePickerBasic({
|
|
|
1447
3383
|
disabled
|
|
1448
3384
|
}
|
|
1449
3385
|
),
|
|
1450
|
-
error && /* @__PURE__ */
|
|
3386
|
+
error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
|
|
1451
3387
|
] })
|
|
1452
3388
|
}
|
|
1453
3389
|
);
|
|
@@ -1455,9 +3391,9 @@ function TimePickerBasic({
|
|
|
1455
3391
|
|
|
1456
3392
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1457
3393
|
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1458
|
-
import { ConfigProvider as
|
|
3394
|
+
import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
|
|
1459
3395
|
import thTH4 from "antd/locale/th_TH";
|
|
1460
|
-
import { jsx as
|
|
3396
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1461
3397
|
function TimePickerRangePicker({
|
|
1462
3398
|
value,
|
|
1463
3399
|
onChange,
|
|
@@ -1468,8 +3404,8 @@ function TimePickerRangePicker({
|
|
|
1468
3404
|
disabled,
|
|
1469
3405
|
className
|
|
1470
3406
|
}) {
|
|
1471
|
-
return /* @__PURE__ */
|
|
1472
|
-
|
|
3407
|
+
return /* @__PURE__ */ jsx24(
|
|
3408
|
+
ConfigProvider8,
|
|
1473
3409
|
{
|
|
1474
3410
|
locale: thTH4,
|
|
1475
3411
|
theme: {
|
|
@@ -1477,13 +3413,13 @@ function TimePickerRangePicker({
|
|
|
1477
3413
|
fontFamily: "Kanit"
|
|
1478
3414
|
}
|
|
1479
3415
|
},
|
|
1480
|
-
children: /* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
3416
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
3417
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
3418
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
|
|
1483
3419
|
" ",
|
|
1484
|
-
required && /* @__PURE__ */
|
|
3420
|
+
required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
|
|
1485
3421
|
] }),
|
|
1486
|
-
/* @__PURE__ */
|
|
3422
|
+
/* @__PURE__ */ jsx24(
|
|
1487
3423
|
TimePicker2.RangePicker,
|
|
1488
3424
|
{
|
|
1489
3425
|
format: "HH:mm",
|
|
@@ -1508,14 +3444,14 @@ function TimePickerRangePicker({
|
|
|
1508
3444
|
showNow: true
|
|
1509
3445
|
}
|
|
1510
3446
|
),
|
|
1511
|
-
error && /* @__PURE__ */
|
|
3447
|
+
error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 caption-1", children: error })
|
|
1512
3448
|
] })
|
|
1513
3449
|
}
|
|
1514
3450
|
);
|
|
1515
3451
|
}
|
|
1516
3452
|
|
|
1517
3453
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1518
|
-
import { ConfigProvider as
|
|
3454
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1519
3455
|
|
|
1520
3456
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1521
3457
|
function _typeof(o) {
|
|
@@ -1558,13 +3494,13 @@ function _defineProperty(e, r, t) {
|
|
|
1558
3494
|
// node_modules/@ant-design/fast-color/es/FastColor.js
|
|
1559
3495
|
var round = Math.round;
|
|
1560
3496
|
function splitColorStr(str, parseNum) {
|
|
1561
|
-
const
|
|
1562
|
-
const numList =
|
|
3497
|
+
const match3 = str.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [];
|
|
3498
|
+
const numList = match3.map((item) => parseFloat(item));
|
|
1563
3499
|
for (let i = 0; i < 3; i += 1) {
|
|
1564
|
-
numList[i] = parseNum(numList[i] || 0,
|
|
3500
|
+
numList[i] = parseNum(numList[i] || 0, match3[i] || "", i);
|
|
1565
3501
|
}
|
|
1566
|
-
if (
|
|
1567
|
-
numList[3] =
|
|
3502
|
+
if (match3[3]) {
|
|
3503
|
+
numList[3] = match3[3].includes("%") ? numList[3] / 100 : numList[3];
|
|
1568
3504
|
} else {
|
|
1569
3505
|
numList[3] = 1;
|
|
1570
3506
|
}
|
|
@@ -2217,7 +4153,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2217
4153
|
greyDark.primary = greyDark[5];
|
|
2218
4154
|
|
|
2219
4155
|
// src/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2220
|
-
import { jsx as
|
|
4156
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2221
4157
|
function genPresets(presets = presetPalettes) {
|
|
2222
4158
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2223
4159
|
label,
|
|
@@ -2228,9 +4164,11 @@ function genPresets(presets = presetPalettes) {
|
|
|
2228
4164
|
function ColorPalettePickerBasic({
|
|
2229
4165
|
value,
|
|
2230
4166
|
onChange,
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
4167
|
+
require: require2,
|
|
4168
|
+
title,
|
|
4169
|
+
bottomText,
|
|
4170
|
+
showError,
|
|
4171
|
+
errorMessage,
|
|
2234
4172
|
disabled,
|
|
2235
4173
|
allowClear,
|
|
2236
4174
|
defaultFormat,
|
|
@@ -2244,8 +4182,8 @@ function ColorPalettePickerBasic({
|
|
|
2244
4182
|
red,
|
|
2245
4183
|
green
|
|
2246
4184
|
});
|
|
2247
|
-
return /* @__PURE__ */
|
|
2248
|
-
|
|
4185
|
+
return /* @__PURE__ */ jsx25(
|
|
4186
|
+
ConfigProvider9,
|
|
2249
4187
|
{
|
|
2250
4188
|
theme: {
|
|
2251
4189
|
token: {
|
|
@@ -2253,13 +4191,13 @@ function ColorPalettePickerBasic({
|
|
|
2253
4191
|
fontSize: 16
|
|
2254
4192
|
}
|
|
2255
4193
|
},
|
|
2256
|
-
children: /* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
4194
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
4195
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
4196
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: title }),
|
|
2259
4197
|
" ",
|
|
2260
|
-
|
|
4198
|
+
require2 && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
2261
4199
|
] }),
|
|
2262
|
-
/* @__PURE__ */
|
|
4200
|
+
/* @__PURE__ */ jsx25(
|
|
2263
4201
|
ColorPicker2,
|
|
2264
4202
|
{
|
|
2265
4203
|
defaultFormat,
|
|
@@ -2272,9 +4210,9 @@ function ColorPalettePickerBasic({
|
|
|
2272
4210
|
showText: (color) => {
|
|
2273
4211
|
const hex = color.toHexString();
|
|
2274
4212
|
if (!value) {
|
|
2275
|
-
return /* @__PURE__ */
|
|
4213
|
+
return /* @__PURE__ */ jsx25("span", { children: placeholder });
|
|
2276
4214
|
}
|
|
2277
|
-
return /* @__PURE__ */
|
|
4215
|
+
return /* @__PURE__ */ jsxs21("span", { children: [
|
|
2278
4216
|
"(",
|
|
2279
4217
|
hex,
|
|
2280
4218
|
")"
|
|
@@ -2284,22 +4222,28 @@ function ColorPalettePickerBasic({
|
|
|
2284
4222
|
onClear
|
|
2285
4223
|
}
|
|
2286
4224
|
),
|
|
2287
|
-
|
|
4225
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
4226
|
+
/* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4227
|
+
" ",
|
|
4228
|
+
showError && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4229
|
+
] })
|
|
2288
4230
|
] })
|
|
2289
4231
|
}
|
|
2290
4232
|
);
|
|
2291
4233
|
}
|
|
2292
4234
|
|
|
2293
4235
|
// src/Select/SelectField/SelectField.tsx
|
|
2294
|
-
import { Select, ConfigProvider as
|
|
2295
|
-
import { jsx as
|
|
4236
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
4237
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2296
4238
|
function SelectField({
|
|
2297
4239
|
value,
|
|
2298
4240
|
onChange,
|
|
2299
4241
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
4242
|
+
title,
|
|
4243
|
+
require: require2,
|
|
4244
|
+
bottomText,
|
|
4245
|
+
showError,
|
|
4246
|
+
errorMessage,
|
|
2303
4247
|
disabled,
|
|
2304
4248
|
defaultValue,
|
|
2305
4249
|
options,
|
|
@@ -2310,8 +4254,8 @@ function SelectField({
|
|
|
2310
4254
|
className,
|
|
2311
4255
|
onClear
|
|
2312
4256
|
}) {
|
|
2313
|
-
return /* @__PURE__ */
|
|
2314
|
-
|
|
4257
|
+
return /* @__PURE__ */ jsx26(
|
|
4258
|
+
ConfigProvider10,
|
|
2315
4259
|
{
|
|
2316
4260
|
theme: {
|
|
2317
4261
|
token: {
|
|
@@ -2319,13 +4263,13 @@ function SelectField({
|
|
|
2319
4263
|
fontSize: 16
|
|
2320
4264
|
}
|
|
2321
4265
|
},
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
/* @__PURE__ */
|
|
4266
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
4267
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
4268
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: title }),
|
|
2325
4269
|
" ",
|
|
2326
|
-
|
|
4270
|
+
require2 && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
2327
4271
|
] }),
|
|
2328
|
-
/* @__PURE__ */
|
|
4272
|
+
/* @__PURE__ */ jsx26(
|
|
2329
4273
|
Select,
|
|
2330
4274
|
{
|
|
2331
4275
|
showSearch: true,
|
|
@@ -2340,27 +4284,33 @@ function SelectField({
|
|
|
2340
4284
|
options,
|
|
2341
4285
|
mode,
|
|
2342
4286
|
onSearch: handleSearch,
|
|
2343
|
-
prefix: prefix ? /* @__PURE__ */
|
|
4287
|
+
prefix: prefix ? /* @__PURE__ */ jsx26("span", { style: { width: prefixSize, height: prefixSize, display: "flex", alignItems: "center", justifyContent: "center" }, children: prefix }) : void 0,
|
|
2344
4288
|
allowClear: true,
|
|
2345
4289
|
onClear
|
|
2346
4290
|
}
|
|
2347
4291
|
),
|
|
2348
|
-
|
|
4292
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
4293
|
+
/* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4294
|
+
" ",
|
|
4295
|
+
showError && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4296
|
+
] })
|
|
2349
4297
|
] })
|
|
2350
4298
|
}
|
|
2351
4299
|
);
|
|
2352
4300
|
}
|
|
2353
4301
|
|
|
2354
4302
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2355
|
-
import { Select as Select2, ConfigProvider as
|
|
2356
|
-
import { jsx as
|
|
4303
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
4304
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2357
4305
|
function SelectFieldGroup({
|
|
2358
4306
|
value,
|
|
2359
4307
|
onChange,
|
|
2360
4308
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
4309
|
+
title,
|
|
4310
|
+
require: require2,
|
|
4311
|
+
bottomText,
|
|
4312
|
+
showError,
|
|
4313
|
+
errorMessage,
|
|
2364
4314
|
disabled,
|
|
2365
4315
|
defaultValue,
|
|
2366
4316
|
options,
|
|
@@ -2370,21 +4320,21 @@ function SelectFieldGroup({
|
|
|
2370
4320
|
handleSearch,
|
|
2371
4321
|
className
|
|
2372
4322
|
}) {
|
|
2373
|
-
return /* @__PURE__ */
|
|
2374
|
-
|
|
4323
|
+
return /* @__PURE__ */ jsx27(
|
|
4324
|
+
ConfigProvider11,
|
|
2375
4325
|
{
|
|
2376
4326
|
theme: {
|
|
2377
4327
|
token: {
|
|
2378
4328
|
fontFamily: "Kanit"
|
|
2379
4329
|
}
|
|
2380
4330
|
},
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */
|
|
4331
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
4332
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
4333
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: title }),
|
|
2384
4334
|
" ",
|
|
2385
|
-
|
|
4335
|
+
require2 && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
2386
4336
|
] }),
|
|
2387
|
-
/* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ jsx27(
|
|
2388
4338
|
Select2,
|
|
2389
4339
|
{
|
|
2390
4340
|
showSearch: true,
|
|
@@ -2399,7 +4349,7 @@ function SelectFieldGroup({
|
|
|
2399
4349
|
options,
|
|
2400
4350
|
mode,
|
|
2401
4351
|
onSearch: handleSearch,
|
|
2402
|
-
prefix: prefix ? /* @__PURE__ */
|
|
4352
|
+
prefix: prefix ? /* @__PURE__ */ jsx27(
|
|
2403
4353
|
"span",
|
|
2404
4354
|
{
|
|
2405
4355
|
style: {
|
|
@@ -2415,14 +4365,18 @@ function SelectFieldGroup({
|
|
|
2415
4365
|
allowClear: true
|
|
2416
4366
|
}
|
|
2417
4367
|
),
|
|
2418
|
-
|
|
4368
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
4369
|
+
/* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4370
|
+
" ",
|
|
4371
|
+
showError && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4372
|
+
] })
|
|
2419
4373
|
] })
|
|
2420
4374
|
}
|
|
2421
4375
|
);
|
|
2422
4376
|
}
|
|
2423
4377
|
|
|
2424
4378
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2425
|
-
import { Select as Select3, ConfigProvider as
|
|
4379
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2426
4380
|
|
|
2427
4381
|
// src/Select/SelectFieldStatus/StatusMockup.ts
|
|
2428
4382
|
var status = [
|
|
@@ -2435,21 +4389,23 @@ var status = [
|
|
|
2435
4389
|
|
|
2436
4390
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2437
4391
|
import { DownOutlined } from "@ant-design/icons";
|
|
2438
|
-
import { jsx as
|
|
4392
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2439
4393
|
function SelectFieldStatus({
|
|
2440
4394
|
value,
|
|
2441
4395
|
onChange,
|
|
2442
4396
|
placeholder,
|
|
2443
|
-
|
|
2444
|
-
|
|
4397
|
+
title,
|
|
4398
|
+
require: require2,
|
|
4399
|
+
bottomText,
|
|
2445
4400
|
disabled,
|
|
2446
|
-
|
|
4401
|
+
showError,
|
|
4402
|
+
errorMessage,
|
|
2447
4403
|
options,
|
|
2448
4404
|
className
|
|
2449
4405
|
}) {
|
|
2450
4406
|
const selectedItem = status.find((s) => s.value === value);
|
|
2451
|
-
return /* @__PURE__ */
|
|
2452
|
-
|
|
4407
|
+
return /* @__PURE__ */ jsx28(
|
|
4408
|
+
ConfigProvider12,
|
|
2453
4409
|
{
|
|
2454
4410
|
theme: {
|
|
2455
4411
|
components: {
|
|
@@ -2464,17 +4420,17 @@ function SelectFieldStatus({
|
|
|
2464
4420
|
fontFamily: "Kanit"
|
|
2465
4421
|
}
|
|
2466
4422
|
},
|
|
2467
|
-
children: /* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2469
|
-
/* @__PURE__ */
|
|
4423
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
4424
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
4425
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: title }),
|
|
2470
4426
|
" ",
|
|
2471
|
-
|
|
4427
|
+
require2 && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2472
4428
|
] }),
|
|
2473
|
-
/* @__PURE__ */
|
|
4429
|
+
/* @__PURE__ */ jsx28(
|
|
2474
4430
|
Select3,
|
|
2475
4431
|
{
|
|
2476
4432
|
disabled,
|
|
2477
|
-
suffixIcon: /* @__PURE__ */
|
|
4433
|
+
suffixIcon: /* @__PURE__ */ jsx28(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2478
4434
|
value,
|
|
2479
4435
|
onChange,
|
|
2480
4436
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2485,14 +4441,18 @@ function SelectFieldStatus({
|
|
|
2485
4441
|
showSearch: true
|
|
2486
4442
|
}
|
|
2487
4443
|
),
|
|
2488
|
-
|
|
4444
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
4445
|
+
/* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4446
|
+
" ",
|
|
4447
|
+
showError && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4448
|
+
] })
|
|
2489
4449
|
] })
|
|
2490
4450
|
}
|
|
2491
4451
|
);
|
|
2492
4452
|
}
|
|
2493
4453
|
|
|
2494
4454
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2495
|
-
import { Select as Select4, ConfigProvider as
|
|
4455
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
2496
4456
|
|
|
2497
4457
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2498
4458
|
var status2 = [
|
|
@@ -2502,21 +4462,23 @@ var status2 = [
|
|
|
2502
4462
|
|
|
2503
4463
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2504
4464
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2505
|
-
import { jsx as
|
|
4465
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2506
4466
|
function SelectFieldStatusReport({
|
|
2507
4467
|
value,
|
|
2508
4468
|
onChange,
|
|
2509
4469
|
placeholder,
|
|
2510
|
-
|
|
2511
|
-
|
|
4470
|
+
title,
|
|
4471
|
+
require: require2,
|
|
4472
|
+
bottomText,
|
|
2512
4473
|
disabled,
|
|
2513
|
-
|
|
4474
|
+
showError,
|
|
4475
|
+
errorMessage,
|
|
2514
4476
|
className,
|
|
2515
4477
|
options
|
|
2516
4478
|
}) {
|
|
2517
4479
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2518
|
-
return /* @__PURE__ */
|
|
2519
|
-
|
|
4480
|
+
return /* @__PURE__ */ jsx29(
|
|
4481
|
+
ConfigProvider13,
|
|
2520
4482
|
{
|
|
2521
4483
|
theme: {
|
|
2522
4484
|
components: {
|
|
@@ -2531,17 +4493,17 @@ function SelectFieldStatusReport({
|
|
|
2531
4493
|
fontFamily: "Kanit"
|
|
2532
4494
|
}
|
|
2533
4495
|
},
|
|
2534
|
-
children: /* @__PURE__ */
|
|
2535
|
-
/* @__PURE__ */
|
|
2536
|
-
/* @__PURE__ */
|
|
4496
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
4497
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
4498
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: title }),
|
|
2537
4499
|
" ",
|
|
2538
|
-
|
|
4500
|
+
require2 && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2539
4501
|
] }),
|
|
2540
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsx29(
|
|
2541
4503
|
Select4,
|
|
2542
4504
|
{
|
|
2543
4505
|
disabled,
|
|
2544
|
-
suffixIcon: /* @__PURE__ */
|
|
4506
|
+
suffixIcon: /* @__PURE__ */ jsx29(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2545
4507
|
value,
|
|
2546
4508
|
onChange,
|
|
2547
4509
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2552,22 +4514,28 @@ function SelectFieldStatusReport({
|
|
|
2552
4514
|
showSearch: true
|
|
2553
4515
|
}
|
|
2554
4516
|
),
|
|
2555
|
-
|
|
4517
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
4518
|
+
/* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4519
|
+
" ",
|
|
4520
|
+
showError && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4521
|
+
] })
|
|
2556
4522
|
] })
|
|
2557
4523
|
}
|
|
2558
4524
|
);
|
|
2559
4525
|
}
|
|
2560
4526
|
|
|
2561
4527
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2562
|
-
import { Select as Select5, ConfigProvider as
|
|
4528
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
2563
4529
|
import { useState as useState6 } from "react";
|
|
2564
|
-
import { jsx as
|
|
4530
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2565
4531
|
function SelectFieldTag({
|
|
2566
|
-
|
|
2567
|
-
|
|
4532
|
+
title,
|
|
4533
|
+
require: require2,
|
|
4534
|
+
bottomText,
|
|
2568
4535
|
placeholder,
|
|
2569
4536
|
options,
|
|
2570
|
-
|
|
4537
|
+
showError,
|
|
4538
|
+
errorMessage,
|
|
2571
4539
|
value: controlledValue,
|
|
2572
4540
|
className,
|
|
2573
4541
|
onChange,
|
|
@@ -2594,21 +4562,21 @@ function SelectFieldTag({
|
|
|
2594
4562
|
}
|
|
2595
4563
|
onChange?.([]);
|
|
2596
4564
|
};
|
|
2597
|
-
return /* @__PURE__ */
|
|
2598
|
-
|
|
4565
|
+
return /* @__PURE__ */ jsx30(
|
|
4566
|
+
ConfigProvider14,
|
|
2599
4567
|
{
|
|
2600
4568
|
theme: {
|
|
2601
4569
|
token: {
|
|
2602
4570
|
fontFamily: "Kanit"
|
|
2603
4571
|
}
|
|
2604
4572
|
},
|
|
2605
|
-
children: /* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
4573
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
4574
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
4575
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: title }),
|
|
2608
4576
|
" ",
|
|
2609
|
-
|
|
4577
|
+
require2 && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2610
4578
|
] }),
|
|
2611
|
-
/* @__PURE__ */
|
|
4579
|
+
/* @__PURE__ */ jsx30(
|
|
2612
4580
|
Select5,
|
|
2613
4581
|
{
|
|
2614
4582
|
mode: "tags",
|
|
@@ -2627,7 +4595,11 @@ function SelectFieldTag({
|
|
|
2627
4595
|
onClear
|
|
2628
4596
|
}
|
|
2629
4597
|
),
|
|
2630
|
-
|
|
4598
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
4599
|
+
/* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4600
|
+
" ",
|
|
4601
|
+
showError && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4602
|
+
] })
|
|
2631
4603
|
] })
|
|
2632
4604
|
}
|
|
2633
4605
|
);
|
|
@@ -2635,16 +4607,18 @@ function SelectFieldTag({
|
|
|
2635
4607
|
|
|
2636
4608
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2637
4609
|
import { IconTrash } from "@tabler/icons-react";
|
|
2638
|
-
import { Select as Select6, ConfigProvider as
|
|
4610
|
+
import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
|
|
2639
4611
|
import { useState as useState7 } from "react";
|
|
2640
|
-
import { jsx as
|
|
4612
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2641
4613
|
function SelectCustom({
|
|
2642
|
-
|
|
4614
|
+
title = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2643
4615
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
2644
4616
|
options,
|
|
2645
|
-
|
|
4617
|
+
require: require2 = false,
|
|
2646
4618
|
onChange,
|
|
2647
|
-
|
|
4619
|
+
bottomText,
|
|
4620
|
+
showError,
|
|
4621
|
+
errorMessage,
|
|
2648
4622
|
onClear
|
|
2649
4623
|
}) {
|
|
2650
4624
|
const [value, setValue] = useState7([]);
|
|
@@ -2666,8 +4640,8 @@ function SelectCustom({
|
|
|
2666
4640
|
});
|
|
2667
4641
|
};
|
|
2668
4642
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2669
|
-
return /* @__PURE__ */
|
|
2670
|
-
|
|
4643
|
+
return /* @__PURE__ */ jsx31(
|
|
4644
|
+
ConfigProvider15,
|
|
2671
4645
|
{
|
|
2672
4646
|
theme: {
|
|
2673
4647
|
token: {
|
|
@@ -2675,13 +4649,13 @@ function SelectCustom({
|
|
|
2675
4649
|
fontSize: 16
|
|
2676
4650
|
}
|
|
2677
4651
|
},
|
|
2678
|
-
children: /* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
4652
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
|
|
4653
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
4654
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: title }),
|
|
2681
4655
|
" ",
|
|
2682
|
-
|
|
4656
|
+
require2 && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2683
4657
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
4658
|
+
/* @__PURE__ */ jsx31(
|
|
2685
4659
|
Select6,
|
|
2686
4660
|
{
|
|
2687
4661
|
value,
|
|
@@ -2692,20 +4666,24 @@ function SelectCustom({
|
|
|
2692
4666
|
onClear
|
|
2693
4667
|
}
|
|
2694
4668
|
),
|
|
2695
|
-
|
|
2696
|
-
|
|
4669
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
4670
|
+
/* @__PURE__ */ jsx31("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
4671
|
+
" ",
|
|
4672
|
+
showError && /* @__PURE__ */ jsx31("p", { className: "caption-1 text-red-500 ", children: errorMessage })
|
|
4673
|
+
] }),
|
|
4674
|
+
/* @__PURE__ */ jsx31("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs27(
|
|
2697
4675
|
"div",
|
|
2698
4676
|
{
|
|
2699
4677
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
2700
4678
|
children: [
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
4679
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-row gap-[8px]", children: [
|
|
4680
|
+
/* @__PURE__ */ jsxs27("p", { children: [
|
|
2703
4681
|
index + 1,
|
|
2704
4682
|
"."
|
|
2705
4683
|
] }),
|
|
2706
|
-
/* @__PURE__ */
|
|
4684
|
+
/* @__PURE__ */ jsx31("p", { children: v })
|
|
2707
4685
|
] }),
|
|
2708
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsx31(
|
|
2709
4687
|
IconTrash,
|
|
2710
4688
|
{
|
|
2711
4689
|
className: "cursor-pointer",
|
|
@@ -2722,7 +4700,7 @@ function SelectCustom({
|
|
|
2722
4700
|
}
|
|
2723
4701
|
|
|
2724
4702
|
// src/SortFilter/SortFilter.tsx
|
|
2725
|
-
import { ConfigProvider as
|
|
4703
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2726
4704
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
2727
4705
|
|
|
2728
4706
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2755,7 +4733,7 @@ var quarters = [
|
|
|
2755
4733
|
// src/SortFilter/SortFilter.tsx
|
|
2756
4734
|
import { useState as useState8 } from "react";
|
|
2757
4735
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
2758
|
-
import { jsx as
|
|
4736
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2759
4737
|
function SortFilter({
|
|
2760
4738
|
showYear = true,
|
|
2761
4739
|
showQuarter = true,
|
|
@@ -2766,20 +4744,20 @@ function SortFilter({
|
|
|
2766
4744
|
const [yearValue, setYearValue] = useState8();
|
|
2767
4745
|
const [monthValue, setMonthValue] = useState8();
|
|
2768
4746
|
const [quarterValue, setQuartersValue] = useState8();
|
|
2769
|
-
return /* @__PURE__ */
|
|
2770
|
-
|
|
4747
|
+
return /* @__PURE__ */ jsx32(
|
|
4748
|
+
ConfigProvider16,
|
|
2771
4749
|
{
|
|
2772
4750
|
theme: {
|
|
2773
4751
|
token: {
|
|
2774
4752
|
fontFamily: "Kanit"
|
|
2775
4753
|
}
|
|
2776
4754
|
},
|
|
2777
|
-
children: /* @__PURE__ */
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
showYear && /* @__PURE__ */
|
|
4755
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "w-full flex items-center justify-between", children: [
|
|
4756
|
+
/* @__PURE__ */ jsxs28("div", { className: "w-full flex gap-[10px]", children: [
|
|
4757
|
+
showYear && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2780
4758
|
SelectField,
|
|
2781
4759
|
{
|
|
2782
|
-
prefix: /* @__PURE__ */
|
|
4760
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2783
4761
|
onChange: setYearValue,
|
|
2784
4762
|
options: years.map((s) => ({
|
|
2785
4763
|
value: s.value,
|
|
@@ -2789,10 +4767,10 @@ function SortFilter({
|
|
|
2789
4767
|
value: yearValue
|
|
2790
4768
|
}
|
|
2791
4769
|
) }),
|
|
2792
|
-
showMonth && /* @__PURE__ */
|
|
4770
|
+
showMonth && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2793
4771
|
SelectField,
|
|
2794
4772
|
{
|
|
2795
|
-
prefix: /* @__PURE__ */
|
|
4773
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2796
4774
|
onChange: setMonthValue,
|
|
2797
4775
|
options: months.map((s) => ({
|
|
2798
4776
|
value: s.value,
|
|
@@ -2802,10 +4780,10 @@ function SortFilter({
|
|
|
2802
4780
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2803
4781
|
}
|
|
2804
4782
|
) }),
|
|
2805
|
-
showQuarter && /* @__PURE__ */
|
|
4783
|
+
showQuarter && /* @__PURE__ */ jsx32("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx32(
|
|
2806
4784
|
SelectField,
|
|
2807
4785
|
{
|
|
2808
|
-
prefix: /* @__PURE__ */
|
|
4786
|
+
prefix: /* @__PURE__ */ jsx32(CalendarOutlined, {}),
|
|
2809
4787
|
onChange: setQuartersValue,
|
|
2810
4788
|
options: quarters.map((s) => ({
|
|
2811
4789
|
value: s.value,
|
|
@@ -2816,8 +4794,8 @@ function SortFilter({
|
|
|
2816
4794
|
}
|
|
2817
4795
|
) })
|
|
2818
4796
|
] }),
|
|
2819
|
-
/* @__PURE__ */
|
|
2820
|
-
/* @__PURE__ */
|
|
4797
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex gap-[10px]", children: [
|
|
4798
|
+
/* @__PURE__ */ jsx32(
|
|
2821
4799
|
IconSortDescending2,
|
|
2822
4800
|
{
|
|
2823
4801
|
size: 24,
|
|
@@ -2825,7 +4803,7 @@ function SortFilter({
|
|
|
2825
4803
|
onClick: onSortClick
|
|
2826
4804
|
}
|
|
2827
4805
|
),
|
|
2828
|
-
/* @__PURE__ */
|
|
4806
|
+
/* @__PURE__ */ jsx32(
|
|
2829
4807
|
IconFilter,
|
|
2830
4808
|
{
|
|
2831
4809
|
size: 24,
|
|
@@ -2842,7 +4820,7 @@ function SortFilter({
|
|
|
2842
4820
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2843
4821
|
import { IconPaperclip, IconUpload, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
2844
4822
|
import { useRef as useRef2, useState as useState9 } from "react";
|
|
2845
|
-
import { Fragment as Fragment5, jsx as
|
|
4823
|
+
import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2846
4824
|
function FileUploader({
|
|
2847
4825
|
onUpload,
|
|
2848
4826
|
onError,
|
|
@@ -2875,7 +4853,7 @@ function FileUploader({
|
|
|
2875
4853
|
const handleRemoveFile = async (index) => {
|
|
2876
4854
|
try {
|
|
2877
4855
|
if (onRemove) {
|
|
2878
|
-
await onRemove(
|
|
4856
|
+
await onRemove();
|
|
2879
4857
|
}
|
|
2880
4858
|
const updatedList = [...fileList];
|
|
2881
4859
|
updatedList.splice(index, 1);
|
|
@@ -2913,10 +4891,10 @@ function FileUploader({
|
|
|
2913
4891
|
}
|
|
2914
4892
|
if (inputRef.current) inputRef.current.value = "";
|
|
2915
4893
|
};
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
label && /* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
mode === "upload" ? /* @__PURE__ */
|
|
4894
|
+
return /* @__PURE__ */ jsxs29("div", { className: "w-full", children: [
|
|
4895
|
+
label && /* @__PURE__ */ jsx33("p", { className: "body-1", children: label }),
|
|
4896
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
4897
|
+
mode === "upload" ? /* @__PURE__ */ jsx33(
|
|
2920
4898
|
"button",
|
|
2921
4899
|
{
|
|
2922
4900
|
type: "button",
|
|
@@ -2924,15 +4902,15 @@ function FileUploader({
|
|
|
2924
4902
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
2925
4903
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
2926
4904
|
disabled: disabled ? disabled : uploading,
|
|
2927
|
-
children: uploading ? /* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
4905
|
+
children: uploading ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
4906
|
+
/* @__PURE__ */ jsx33(Loader, { size: 15 }),
|
|
2929
4907
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2930
|
-
] }) : /* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
4908
|
+
] }) : /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
4909
|
+
/* @__PURE__ */ jsx33(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
2932
4910
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
2933
4911
|
] })
|
|
2934
4912
|
}
|
|
2935
|
-
) : /* @__PURE__ */
|
|
4913
|
+
) : /* @__PURE__ */ jsx33(
|
|
2936
4914
|
"div",
|
|
2937
4915
|
{
|
|
2938
4916
|
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 +4924,17 @@ function FileUploader({
|
|
|
2946
4924
|
},
|
|
2947
4925
|
onDragLeave: () => setDragActive(false),
|
|
2948
4926
|
onDrop: handleDrop,
|
|
2949
|
-
children: uploading ? /* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
4927
|
+
children: uploading ? /* @__PURE__ */ jsxs29("div", { className: "flex justify-center items-center gap-2", children: [
|
|
4928
|
+
/* @__PURE__ */ jsx33(Loader, { size: 15 }),
|
|
2951
4929
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
2952
|
-
] }) : /* @__PURE__ */
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
4930
|
+
] }) : /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4931
|
+
/* @__PURE__ */ jsx33(IconUpload, { size: 20 }),
|
|
4932
|
+
/* @__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" }),
|
|
4933
|
+
/* @__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
4934
|
] })
|
|
2957
4935
|
}
|
|
2958
4936
|
),
|
|
2959
|
-
/* @__PURE__ */
|
|
4937
|
+
/* @__PURE__ */ jsx33(
|
|
2960
4938
|
"input",
|
|
2961
4939
|
{
|
|
2962
4940
|
type: "file",
|
|
@@ -2969,13 +4947,13 @@ function FileUploader({
|
|
|
2969
4947
|
}
|
|
2970
4948
|
)
|
|
2971
4949
|
] }),
|
|
2972
|
-
description && /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
4950
|
+
description && /* @__PURE__ */ jsx33("p", { className: "text-gray-400 body-4", children: description }),
|
|
4951
|
+
/* @__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: [
|
|
4952
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
4953
|
+
/* @__PURE__ */ jsx33("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx33(IconPaperclip, { size: 15 }) }),
|
|
4954
|
+
/* @__PURE__ */ jsx33("span", { className: "truncate", children: file.name })
|
|
2977
4955
|
] }),
|
|
2978
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ jsx33(
|
|
2979
4957
|
IconTrash2,
|
|
2980
4958
|
{
|
|
2981
4959
|
size: 20,
|
|
@@ -3009,9 +4987,9 @@ function messageLoading(content, duration) {
|
|
|
3009
4987
|
}
|
|
3010
4988
|
|
|
3011
4989
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3012
|
-
import { ConfigProvider as
|
|
4990
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
3013
4991
|
import { Breadcrumb } from "antd";
|
|
3014
|
-
import { jsx as
|
|
4992
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3015
4993
|
function Breadcrumbs({
|
|
3016
4994
|
items,
|
|
3017
4995
|
separator,
|
|
@@ -3019,15 +4997,15 @@ function Breadcrumbs({
|
|
|
3019
4997
|
classname,
|
|
3020
4998
|
params
|
|
3021
4999
|
}) {
|
|
3022
|
-
return /* @__PURE__ */
|
|
3023
|
-
|
|
5000
|
+
return /* @__PURE__ */ jsx34(
|
|
5001
|
+
ConfigProvider17,
|
|
3024
5002
|
{
|
|
3025
5003
|
theme: {
|
|
3026
5004
|
token: {
|
|
3027
5005
|
fontFamily: "Kanit"
|
|
3028
5006
|
}
|
|
3029
5007
|
},
|
|
3030
|
-
children: /* @__PURE__ */
|
|
5008
|
+
children: /* @__PURE__ */ jsx34(
|
|
3031
5009
|
Breadcrumb,
|
|
3032
5010
|
{
|
|
3033
5011
|
items,
|
|
@@ -3042,8 +5020,8 @@ function Breadcrumbs({
|
|
|
3042
5020
|
}
|
|
3043
5021
|
|
|
3044
5022
|
// src/HeadingPage/HeadingPage.tsx
|
|
3045
|
-
import { ConfigProvider as
|
|
3046
|
-
import { jsx as
|
|
5023
|
+
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
5024
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3047
5025
|
function HeadingPage({ Heading }) {
|
|
3048
5026
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3049
5027
|
weekday: "long",
|
|
@@ -3051,17 +5029,17 @@ function HeadingPage({ Heading }) {
|
|
|
3051
5029
|
month: "long",
|
|
3052
5030
|
year: "numeric"
|
|
3053
5031
|
});
|
|
3054
|
-
return /* @__PURE__ */
|
|
3055
|
-
|
|
5032
|
+
return /* @__PURE__ */ jsx35(
|
|
5033
|
+
ConfigProvider18,
|
|
3056
5034
|
{
|
|
3057
5035
|
theme: {
|
|
3058
5036
|
token: {
|
|
3059
5037
|
fontFamily: "Kanit"
|
|
3060
5038
|
}
|
|
3061
5039
|
},
|
|
3062
|
-
children: /* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
5040
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
5041
|
+
/* @__PURE__ */ jsx35("p", { className: "headline-5", children: Heading }),
|
|
5042
|
+
/* @__PURE__ */ jsxs30("p", { className: "body-1", children: [
|
|
3065
5043
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3066
5044
|
today
|
|
3067
5045
|
] })
|
|
@@ -3071,9 +5049,9 @@ function HeadingPage({ Heading }) {
|
|
|
3071
5049
|
}
|
|
3072
5050
|
|
|
3073
5051
|
// src/Progress/ProgressBar.tsx
|
|
3074
|
-
import { ConfigProvider as
|
|
5052
|
+
import { ConfigProvider as ConfigProvider19, Progress } from "antd";
|
|
3075
5053
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState10 } from "react";
|
|
3076
|
-
import { jsx as
|
|
5054
|
+
import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3077
5055
|
function ProgressBar({
|
|
3078
5056
|
percent = 0,
|
|
3079
5057
|
size = "default",
|
|
@@ -3106,16 +5084,16 @@ function ProgressBar({
|
|
|
3106
5084
|
observer.observe(inner);
|
|
3107
5085
|
return () => observer.disconnect();
|
|
3108
5086
|
}, []);
|
|
3109
|
-
return /* @__PURE__ */
|
|
3110
|
-
|
|
5087
|
+
return /* @__PURE__ */ jsx36(
|
|
5088
|
+
ConfigProvider19,
|
|
3111
5089
|
{
|
|
3112
5090
|
theme: {
|
|
3113
5091
|
token: {
|
|
3114
5092
|
fontFamily: "Kanit"
|
|
3115
5093
|
}
|
|
3116
5094
|
},
|
|
3117
|
-
children: /* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
5095
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "relative w-full", ref: progressRef, children: [
|
|
5096
|
+
/* @__PURE__ */ jsx36(
|
|
3119
5097
|
Progress,
|
|
3120
5098
|
{
|
|
3121
5099
|
className: "w-full",
|
|
@@ -3131,7 +5109,7 @@ function ProgressBar({
|
|
|
3131
5109
|
strokeColor
|
|
3132
5110
|
}
|
|
3133
5111
|
),
|
|
3134
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
5112
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx36(
|
|
3135
5113
|
"div",
|
|
3136
5114
|
{
|
|
3137
5115
|
className: "checkpoint absolute top-0",
|
|
@@ -3153,7 +5131,7 @@ function ProgressBar({
|
|
|
3153
5131
|
}
|
|
3154
5132
|
|
|
3155
5133
|
// src/KpiSection/KpiSection.tsx
|
|
3156
|
-
import { ConfigProvider as
|
|
5134
|
+
import { ConfigProvider as ConfigProvider20, message as message2 } from "antd";
|
|
3157
5135
|
import { useEffect as useEffect3, useState as useState12 } from "react";
|
|
3158
5136
|
|
|
3159
5137
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3310,7 +5288,7 @@ import {
|
|
|
3310
5288
|
IconTrash as IconTrash3,
|
|
3311
5289
|
IconX as IconX2
|
|
3312
5290
|
} from "@tabler/icons-react";
|
|
3313
|
-
import { Fragment as Fragment6, jsx as
|
|
5291
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3314
5292
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3315
5293
|
const {
|
|
3316
5294
|
handleAddKpi,
|
|
@@ -3330,7 +5308,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3330
5308
|
itemErrors,
|
|
3331
5309
|
setItemErrors
|
|
3332
5310
|
} = useGetKpiSection();
|
|
3333
|
-
const [messageApi2, messageContainer] =
|
|
5311
|
+
const [messageApi2, messageContainer] = message2.useMessage();
|
|
3334
5312
|
const [hasShownError, setHasShownError] = useState12(false);
|
|
3335
5313
|
useEffect3(() => {
|
|
3336
5314
|
setMessageApi(messageApi2);
|
|
@@ -3340,8 +5318,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3340
5318
|
onChangeKpiList(kpiList);
|
|
3341
5319
|
}
|
|
3342
5320
|
}, [kpiList]);
|
|
3343
|
-
return /* @__PURE__ */
|
|
3344
|
-
|
|
5321
|
+
return /* @__PURE__ */ jsx37(
|
|
5322
|
+
ConfigProvider20,
|
|
3345
5323
|
{
|
|
3346
5324
|
theme: {
|
|
3347
5325
|
token: {
|
|
@@ -3349,27 +5327,30 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3349
5327
|
fontSize: 16
|
|
3350
5328
|
}
|
|
3351
5329
|
},
|
|
3352
|
-
children: /* @__PURE__ */
|
|
5330
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "container-input", children: [
|
|
3353
5331
|
messageContainer,
|
|
3354
|
-
type === "number" && /* @__PURE__ */
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
/* @__PURE__ */
|
|
5332
|
+
type === "number" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
|
|
5333
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
5334
|
+
/* @__PURE__ */ jsx37(
|
|
3357
5335
|
InputField,
|
|
3358
5336
|
{
|
|
3359
5337
|
value: nameKpi,
|
|
3360
|
-
|
|
5338
|
+
title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3361
5339
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
5340
|
+
require: true,
|
|
3362
5341
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3363
5342
|
className: "h-[32px]",
|
|
3364
|
-
|
|
5343
|
+
showError: !!errors.nameKpi,
|
|
5344
|
+
errorMessage: errors.nameKpi
|
|
3365
5345
|
}
|
|
3366
5346
|
),
|
|
3367
|
-
/* @__PURE__ */
|
|
5347
|
+
/* @__PURE__ */ jsx37(
|
|
3368
5348
|
InputField,
|
|
3369
5349
|
{
|
|
3370
5350
|
value: kpiValue,
|
|
3371
|
-
|
|
5351
|
+
title: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3372
5352
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
5353
|
+
require: true,
|
|
3373
5354
|
onChange: (value) => {
|
|
3374
5355
|
if (value === void 0 || value === "") {
|
|
3375
5356
|
setKpiValue("");
|
|
@@ -3384,25 +5365,28 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3384
5365
|
}
|
|
3385
5366
|
}
|
|
3386
5367
|
},
|
|
3387
|
-
|
|
5368
|
+
showError: !!errors.kpiValue,
|
|
5369
|
+
errorMessage: errors.kpiValue
|
|
3388
5370
|
}
|
|
3389
5371
|
),
|
|
3390
|
-
/* @__PURE__ */
|
|
5372
|
+
/* @__PURE__ */ jsx37(
|
|
3391
5373
|
InputField,
|
|
3392
5374
|
{
|
|
3393
5375
|
value: unitValue,
|
|
3394
|
-
|
|
5376
|
+
title: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3395
5377
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
5378
|
+
require: true,
|
|
3396
5379
|
onChange: (value) => setUnitValue(value ?? ""),
|
|
3397
5380
|
className: "h-[32px]",
|
|
3398
|
-
|
|
5381
|
+
showError: !!errors.unitValue,
|
|
5382
|
+
errorMessage: errors.unitValue
|
|
3399
5383
|
}
|
|
3400
5384
|
),
|
|
3401
|
-
/* @__PURE__ */
|
|
5385
|
+
/* @__PURE__ */ jsx37(
|
|
3402
5386
|
"div",
|
|
3403
5387
|
{
|
|
3404
5388
|
className: `flex justify-end mt-[28px]`,
|
|
3405
|
-
children: /* @__PURE__ */
|
|
5389
|
+
children: /* @__PURE__ */ jsx37(
|
|
3406
5390
|
IconCirclePlus,
|
|
3407
5391
|
{
|
|
3408
5392
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3413,17 +5397,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3413
5397
|
}
|
|
3414
5398
|
)
|
|
3415
5399
|
] }),
|
|
3416
|
-
/* @__PURE__ */
|
|
5400
|
+
/* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
|
|
3417
5401
|
"div",
|
|
3418
5402
|
{
|
|
3419
5403
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3420
5404
|
children: [
|
|
3421
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3422
5406
|
index + 1,
|
|
3423
5407
|
"."
|
|
3424
5408
|
] }),
|
|
3425
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
5409
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
5410
|
+
/* @__PURE__ */ jsx37(
|
|
3427
5411
|
InputField,
|
|
3428
5412
|
{
|
|
3429
5413
|
value: kpi.name,
|
|
@@ -3432,10 +5416,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3432
5416
|
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3433
5417
|
)
|
|
3434
5418
|
),
|
|
3435
|
-
|
|
5419
|
+
showError: !!itemErrors[kpi.id]?.name,
|
|
5420
|
+
errorMessage: itemErrors[kpi.id]?.name
|
|
3436
5421
|
}
|
|
3437
5422
|
),
|
|
3438
|
-
/* @__PURE__ */
|
|
5423
|
+
/* @__PURE__ */ jsx37(
|
|
3439
5424
|
InputField,
|
|
3440
5425
|
{
|
|
3441
5426
|
value: kpi.value?.toString(),
|
|
@@ -3461,10 +5446,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3461
5446
|
}
|
|
3462
5447
|
}
|
|
3463
5448
|
},
|
|
3464
|
-
|
|
5449
|
+
showError: !!itemErrors[kpi.id]?.value,
|
|
5450
|
+
errorMessage: itemErrors[kpi.id]?.value
|
|
3465
5451
|
}
|
|
3466
5452
|
),
|
|
3467
|
-
/* @__PURE__ */
|
|
5453
|
+
/* @__PURE__ */ jsx37(
|
|
3468
5454
|
InputField,
|
|
3469
5455
|
{
|
|
3470
5456
|
value: kpi.unit,
|
|
@@ -3473,22 +5459,23 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3473
5459
|
(item) => item.id === kpi.id ? { ...item, unit: value ?? "" } : item
|
|
3474
5460
|
)
|
|
3475
5461
|
),
|
|
3476
|
-
|
|
5462
|
+
showError: !!itemErrors[kpi.id]?.unit,
|
|
5463
|
+
errorMessage: itemErrors[kpi.id]?.unit
|
|
3477
5464
|
}
|
|
3478
5465
|
),
|
|
3479
|
-
/* @__PURE__ */
|
|
5466
|
+
/* @__PURE__ */ jsxs32(
|
|
3480
5467
|
"div",
|
|
3481
5468
|
{
|
|
3482
5469
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3483
5470
|
children: [
|
|
3484
|
-
/* @__PURE__ */
|
|
5471
|
+
/* @__PURE__ */ jsx37(
|
|
3485
5472
|
IconCheck2,
|
|
3486
5473
|
{
|
|
3487
5474
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3488
5475
|
onClick: () => handleSave(kpi.id, type)
|
|
3489
5476
|
}
|
|
3490
5477
|
),
|
|
3491
|
-
/* @__PURE__ */
|
|
5478
|
+
/* @__PURE__ */ jsx37(
|
|
3492
5479
|
IconX2,
|
|
3493
5480
|
{
|
|
3494
5481
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3498,19 +5485,19 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3498
5485
|
]
|
|
3499
5486
|
}
|
|
3500
5487
|
)
|
|
3501
|
-
] }) : /* @__PURE__ */
|
|
3502
|
-
/* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
/* @__PURE__ */
|
|
3506
|
-
/* @__PURE__ */
|
|
5488
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
5489
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
|
|
5490
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.value }),
|
|
5491
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.unit }),
|
|
5492
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
|
|
5493
|
+
/* @__PURE__ */ jsx37(
|
|
3507
5494
|
IconPencil,
|
|
3508
5495
|
{
|
|
3509
5496
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3510
5497
|
onClick: () => handleEdit(kpi.id)
|
|
3511
5498
|
}
|
|
3512
5499
|
),
|
|
3513
|
-
/* @__PURE__ */
|
|
5500
|
+
/* @__PURE__ */ jsx37(
|
|
3514
5501
|
IconTrash3,
|
|
3515
5502
|
{
|
|
3516
5503
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3524,24 +5511,26 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3524
5511
|
kpi.id
|
|
3525
5512
|
)) })
|
|
3526
5513
|
] }),
|
|
3527
|
-
type === "text" && /* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
5514
|
+
type === "text" && /* @__PURE__ */ jsxs32("div", { className: "space-y-4", children: [
|
|
5515
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
5516
|
+
/* @__PURE__ */ jsx37(
|
|
3530
5517
|
InputField,
|
|
3531
5518
|
{
|
|
3532
5519
|
value: nameKpi,
|
|
3533
|
-
|
|
5520
|
+
title: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3534
5521
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
5522
|
+
require: true,
|
|
3535
5523
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
3536
5524
|
className: "h-[32px]",
|
|
3537
|
-
|
|
5525
|
+
showError: !!errors.nameKpi,
|
|
5526
|
+
errorMessage: errors.nameKpi
|
|
3538
5527
|
}
|
|
3539
5528
|
),
|
|
3540
|
-
/* @__PURE__ */
|
|
5529
|
+
/* @__PURE__ */ jsx37(
|
|
3541
5530
|
"div",
|
|
3542
5531
|
{
|
|
3543
5532
|
className: `flex justify-end mt-[28px]`,
|
|
3544
|
-
children: /* @__PURE__ */
|
|
5533
|
+
children: /* @__PURE__ */ jsx37(
|
|
3545
5534
|
IconCirclePlus,
|
|
3546
5535
|
{
|
|
3547
5536
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3552,17 +5541,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3552
5541
|
}
|
|
3553
5542
|
)
|
|
3554
5543
|
] }),
|
|
3555
|
-
/* @__PURE__ */
|
|
5544
|
+
/* @__PURE__ */ jsx37("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs32(
|
|
3556
5545
|
"div",
|
|
3557
5546
|
{
|
|
3558
5547
|
className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]",
|
|
3559
5548
|
children: [
|
|
3560
|
-
/* @__PURE__ */
|
|
5549
|
+
/* @__PURE__ */ jsxs32("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3561
5550
|
index + 1,
|
|
3562
5551
|
"."
|
|
3563
5552
|
] }),
|
|
3564
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
5553
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
5554
|
+
/* @__PURE__ */ jsx37(
|
|
3566
5555
|
InputField,
|
|
3567
5556
|
{
|
|
3568
5557
|
value: kpi.name,
|
|
@@ -3571,22 +5560,23 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3571
5560
|
(item) => item.id === kpi.id ? { ...item, name: value ?? "" } : item
|
|
3572
5561
|
)
|
|
3573
5562
|
),
|
|
3574
|
-
|
|
5563
|
+
showError: !!itemErrors[kpi.id]?.name,
|
|
5564
|
+
errorMessage: itemErrors[kpi.id]?.name
|
|
3575
5565
|
}
|
|
3576
5566
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
5567
|
+
/* @__PURE__ */ jsxs32(
|
|
3578
5568
|
"div",
|
|
3579
5569
|
{
|
|
3580
5570
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3581
5571
|
children: [
|
|
3582
|
-
/* @__PURE__ */
|
|
5572
|
+
/* @__PURE__ */ jsx37(
|
|
3583
5573
|
IconCheck2,
|
|
3584
5574
|
{
|
|
3585
5575
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3586
5576
|
onClick: () => handleSave(kpi.id, type)
|
|
3587
5577
|
}
|
|
3588
5578
|
),
|
|
3589
|
-
/* @__PURE__ */
|
|
5579
|
+
/* @__PURE__ */ jsx37(
|
|
3590
5580
|
IconX2,
|
|
3591
5581
|
{
|
|
3592
5582
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3596,17 +5586,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3596
5586
|
]
|
|
3597
5587
|
}
|
|
3598
5588
|
)
|
|
3599
|
-
] }) : /* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
/* @__PURE__ */
|
|
5589
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment6, { children: [
|
|
5590
|
+
/* @__PURE__ */ jsx37("p", { className: "body-1", children: kpi.name }),
|
|
5591
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-3 justify-end", children: [
|
|
5592
|
+
/* @__PURE__ */ jsx37(
|
|
3603
5593
|
IconPencil,
|
|
3604
5594
|
{
|
|
3605
5595
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3606
5596
|
onClick: () => handleEdit(kpi.id)
|
|
3607
5597
|
}
|
|
3608
5598
|
),
|
|
3609
|
-
/* @__PURE__ */
|
|
5599
|
+
/* @__PURE__ */ jsx37(
|
|
3610
5600
|
IconTrash3,
|
|
3611
5601
|
{
|
|
3612
5602
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
@@ -3639,7 +5629,6 @@ export {
|
|
|
3639
5629
|
GhostButton,
|
|
3640
5630
|
HeadingPage,
|
|
3641
5631
|
InputField,
|
|
3642
|
-
InputFieldNumber,
|
|
3643
5632
|
KpiSection,
|
|
3644
5633
|
Loader,
|
|
3645
5634
|
MenuNavBar,
|