@fctc/sme-widget-ui 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +929 -684
- package/dist/index.mjs +848 -604
- package/dist/widgets.d.mts +3 -1
- package/dist/widgets.d.ts +3 -1
- package/dist/widgets.js +929 -684
- package/dist/widgets.mjs +848 -604
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17237,8 +17237,251 @@ var CharField = (props) => {
|
|
|
17237
17237
|
);
|
|
17238
17238
|
};
|
|
17239
17239
|
|
|
17240
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17241
|
+
import { useEffect as useEffect12, useMemo as useMemo5, useState as useState11 } from "react";
|
|
17242
|
+
|
|
17243
|
+
// src/icons/eye-hidden-icon.tsx
|
|
17244
|
+
import { jsx as jsx79, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
17245
|
+
var EyeHiddenIcon = () => {
|
|
17246
|
+
return /* @__PURE__ */ jsxs52(
|
|
17247
|
+
"svg",
|
|
17248
|
+
{
|
|
17249
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17250
|
+
width: "16",
|
|
17251
|
+
height: "16",
|
|
17252
|
+
viewBox: "0 0 16 16",
|
|
17253
|
+
fill: "none",
|
|
17254
|
+
children: [
|
|
17255
|
+
/* @__PURE__ */ jsx79(
|
|
17256
|
+
"path",
|
|
17257
|
+
{
|
|
17258
|
+
d: "M9.68661 6.31328L6.31328 9.68661C5.87995 9.25328 5.61328 8.65995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C8.65995 5.61328 9.25328 5.87995 9.68661 6.31328Z",
|
|
17259
|
+
stroke: "#576071",
|
|
17260
|
+
strokeWidth: "1.5",
|
|
17261
|
+
strokeLinecap: "round",
|
|
17262
|
+
strokeLinejoin: "round"
|
|
17263
|
+
}
|
|
17264
|
+
),
|
|
17265
|
+
/* @__PURE__ */ jsx79(
|
|
17266
|
+
"path",
|
|
17267
|
+
{
|
|
17268
|
+
d: "M11.8799 3.8473C10.7132 2.9673 9.3799 2.4873 7.9999 2.4873C5.64656 2.4873 3.45323 3.87397 1.92656 6.27397C1.32656 7.21397 1.32656 8.79397 1.92656 9.73397C2.45323 10.5606 3.06656 11.274 3.73323 11.8473",
|
|
17269
|
+
stroke: "#576071",
|
|
17270
|
+
strokeWidth: "1.5",
|
|
17271
|
+
strokeLinecap: "round",
|
|
17272
|
+
strokeLinejoin: "round"
|
|
17273
|
+
}
|
|
17274
|
+
),
|
|
17275
|
+
/* @__PURE__ */ jsx79(
|
|
17276
|
+
"path",
|
|
17277
|
+
{
|
|
17278
|
+
d: "M5.61328 13.0195C6.37328 13.3395 7.17995 13.5128 7.99995 13.5128C10.3533 13.5128 12.5466 12.1261 14.0733 9.72613C14.6733 8.78613 14.6733 7.20613 14.0733 6.26613C13.8533 5.91947 13.6133 5.5928 13.3666 5.28613",
|
|
17279
|
+
stroke: "#576071",
|
|
17280
|
+
strokeWidth: "1.5",
|
|
17281
|
+
strokeLinecap: "round",
|
|
17282
|
+
strokeLinejoin: "round"
|
|
17283
|
+
}
|
|
17284
|
+
),
|
|
17285
|
+
/* @__PURE__ */ jsx79(
|
|
17286
|
+
"path",
|
|
17287
|
+
{
|
|
17288
|
+
d: "M10.3409 8.4668C10.1676 9.4068 9.40094 10.1735 8.46094 10.3468",
|
|
17289
|
+
stroke: "#576071",
|
|
17290
|
+
strokeWidth: "1.5",
|
|
17291
|
+
strokeLinecap: "round",
|
|
17292
|
+
strokeLinejoin: "round"
|
|
17293
|
+
}
|
|
17294
|
+
),
|
|
17295
|
+
/* @__PURE__ */ jsx79(
|
|
17296
|
+
"path",
|
|
17297
|
+
{
|
|
17298
|
+
d: "M6.31203 9.68652L1.33203 14.6665",
|
|
17299
|
+
stroke: "#576071",
|
|
17300
|
+
strokeWidth: "1.5",
|
|
17301
|
+
strokeLinecap: "round",
|
|
17302
|
+
strokeLinejoin: "round"
|
|
17303
|
+
}
|
|
17304
|
+
),
|
|
17305
|
+
/* @__PURE__ */ jsx79(
|
|
17306
|
+
"path",
|
|
17307
|
+
{
|
|
17308
|
+
d: "M14.6675 1.33301L9.6875 6.31301",
|
|
17309
|
+
stroke: "#576071",
|
|
17310
|
+
strokeWidth: "1.5",
|
|
17311
|
+
strokeLinecap: "round",
|
|
17312
|
+
strokeLinejoin: "round"
|
|
17313
|
+
}
|
|
17314
|
+
)
|
|
17315
|
+
]
|
|
17316
|
+
}
|
|
17317
|
+
);
|
|
17318
|
+
};
|
|
17319
|
+
|
|
17320
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17321
|
+
import { jsx as jsx80, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
17322
|
+
function isSensitive(widget) {
|
|
17323
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
17324
|
+
}
|
|
17325
|
+
function EyeIconComponent({ open }) {
|
|
17326
|
+
return open ? /* @__PURE__ */ jsx80(EyeIcon, {}) : /* @__PURE__ */ jsx80(EyeHiddenIcon, {});
|
|
17327
|
+
}
|
|
17328
|
+
var SecureField = (props) => {
|
|
17329
|
+
const {
|
|
17330
|
+
name: name2,
|
|
17331
|
+
readonly,
|
|
17332
|
+
placeholder,
|
|
17333
|
+
required,
|
|
17334
|
+
invisible,
|
|
17335
|
+
methods,
|
|
17336
|
+
onChange: onChange2,
|
|
17337
|
+
string = name2,
|
|
17338
|
+
widget,
|
|
17339
|
+
min: min3,
|
|
17340
|
+
max: max3,
|
|
17341
|
+
special,
|
|
17342
|
+
upcase,
|
|
17343
|
+
digit,
|
|
17344
|
+
regex,
|
|
17345
|
+
className,
|
|
17346
|
+
value,
|
|
17347
|
+
defaultValue,
|
|
17348
|
+
isForm,
|
|
17349
|
+
isEditTable
|
|
17350
|
+
} = props;
|
|
17351
|
+
const { t: t3 } = useI18n();
|
|
17352
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
17353
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
17354
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
17355
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
17356
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
17357
|
+
return message2;
|
|
17358
|
+
};
|
|
17359
|
+
if (!isForm && !isEditTable) {
|
|
17360
|
+
const propValue = value || defaultValue;
|
|
17361
|
+
return /* @__PURE__ */ jsx80("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
17362
|
+
}
|
|
17363
|
+
return /* @__PURE__ */ jsx80(
|
|
17364
|
+
Controller,
|
|
17365
|
+
{
|
|
17366
|
+
name: String(name2),
|
|
17367
|
+
control: methods.control,
|
|
17368
|
+
rules: {
|
|
17369
|
+
...required && !invisible ? {
|
|
17370
|
+
required: {
|
|
17371
|
+
value: true,
|
|
17372
|
+
message: `${string} ${t3("must_required")}`
|
|
17373
|
+
}
|
|
17374
|
+
} : {},
|
|
17375
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
17376
|
+
pattern: {
|
|
17377
|
+
value: new RegExp(regex),
|
|
17378
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
17379
|
+
}
|
|
17380
|
+
} : {}
|
|
17381
|
+
},
|
|
17382
|
+
render: ({
|
|
17383
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
17384
|
+
fieldState: { error: error2 }
|
|
17385
|
+
}) => {
|
|
17386
|
+
const { setError, clearErrors } = methods;
|
|
17387
|
+
const [showPlain, setShowPlain] = useState11(false);
|
|
17388
|
+
const realValue = useMemo5(
|
|
17389
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
17390
|
+
[value2]
|
|
17391
|
+
);
|
|
17392
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
17393
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
17394
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
17395
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
17396
|
+
useEffect12(() => {
|
|
17397
|
+
if (canToggle) setShowPlain(false);
|
|
17398
|
+
}, [canToggle]);
|
|
17399
|
+
useEffect12(() => {
|
|
17400
|
+
if (value2) clearErrors(name2);
|
|
17401
|
+
}, [value2, clearErrors, name2]);
|
|
17402
|
+
return /* @__PURE__ */ jsxs53("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
17403
|
+
isCappedToken && shouldMask && /* @__PURE__ */ jsx80(
|
|
17404
|
+
"div",
|
|
17405
|
+
{
|
|
17406
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
17407
|
+
"aria-hidden": "true",
|
|
17408
|
+
children: maskedDisplay
|
|
17409
|
+
}
|
|
17410
|
+
),
|
|
17411
|
+
/* @__PURE__ */ jsx80(
|
|
17412
|
+
"input",
|
|
17413
|
+
{
|
|
17414
|
+
value: realValue,
|
|
17415
|
+
onChange: (e3) => {
|
|
17416
|
+
if (readonly) return;
|
|
17417
|
+
const inputValue = e3.target.value ?? "";
|
|
17418
|
+
fieldOnchange(inputValue);
|
|
17419
|
+
clearErrors(name2);
|
|
17420
|
+
},
|
|
17421
|
+
onBlur: (e3) => {
|
|
17422
|
+
if (readonly) return;
|
|
17423
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
17424
|
+
if (!inputValue && required && !invisible) {
|
|
17425
|
+
setError(name2, {
|
|
17426
|
+
type: "required",
|
|
17427
|
+
message: `${string} ${t3("must_required")}`
|
|
17428
|
+
});
|
|
17429
|
+
return;
|
|
17430
|
+
}
|
|
17431
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
17432
|
+
setError(name2, {
|
|
17433
|
+
type: "pattern",
|
|
17434
|
+
message: getPasswordMessage2(
|
|
17435
|
+
min3,
|
|
17436
|
+
max3,
|
|
17437
|
+
upcase,
|
|
17438
|
+
digit,
|
|
17439
|
+
special
|
|
17440
|
+
)
|
|
17441
|
+
});
|
|
17442
|
+
return;
|
|
17443
|
+
}
|
|
17444
|
+
fieldOnchange(inputValue);
|
|
17445
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
17446
|
+
clearErrors(name2);
|
|
17447
|
+
},
|
|
17448
|
+
readOnly: readonly,
|
|
17449
|
+
disabled: readonly,
|
|
17450
|
+
placeholder,
|
|
17451
|
+
required: !invisible && required,
|
|
17452
|
+
style: {
|
|
17453
|
+
...isCappedToken && shouldMask ? {
|
|
17454
|
+
WebkitTextSecurity: "none",
|
|
17455
|
+
color: "transparent",
|
|
17456
|
+
caretColor: void 0
|
|
17457
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
17458
|
+
},
|
|
17459
|
+
onCopy: (e3) => {
|
|
17460
|
+
if (shouldMask) e3.preventDefault();
|
|
17461
|
+
},
|
|
17462
|
+
className: `${!isCappedToken ? "w-full" : "w-[200px]"} min-h-[44px] ring-0 outline-0 p-3 text-sm font-normal leading-[1.5] resize-none overflow-hidden field-sizing-content
|
|
17463
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
17464
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
17465
|
+
}
|
|
17466
|
+
),
|
|
17467
|
+
canToggle && !isCappedToken && /* @__PURE__ */ jsx80(
|
|
17468
|
+
"button",
|
|
17469
|
+
{
|
|
17470
|
+
type: "button",
|
|
17471
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
17472
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
17473
|
+
children: /* @__PURE__ */ jsx80(EyeIconComponent, { open: showPlain })
|
|
17474
|
+
}
|
|
17475
|
+
),
|
|
17476
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx80("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17477
|
+
] });
|
|
17478
|
+
}
|
|
17479
|
+
}
|
|
17480
|
+
);
|
|
17481
|
+
};
|
|
17482
|
+
|
|
17240
17483
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17241
|
-
import { jsx as
|
|
17484
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
17242
17485
|
var CheckboxField = (props) => {
|
|
17243
17486
|
const {
|
|
17244
17487
|
name: name2,
|
|
@@ -17253,9 +17496,9 @@ var CheckboxField = (props) => {
|
|
|
17253
17496
|
} = props;
|
|
17254
17497
|
if (!isForm) {
|
|
17255
17498
|
if (name2 === "is_active" || name2 === "active") {
|
|
17256
|
-
return /* @__PURE__ */
|
|
17499
|
+
return /* @__PURE__ */ jsx81(ActiveBadgeField, { type: value });
|
|
17257
17500
|
} else {
|
|
17258
|
-
return /* @__PURE__ */
|
|
17501
|
+
return /* @__PURE__ */ jsx81(
|
|
17259
17502
|
"input",
|
|
17260
17503
|
{
|
|
17261
17504
|
type: "checkbox",
|
|
@@ -17266,12 +17509,12 @@ var CheckboxField = (props) => {
|
|
|
17266
17509
|
);
|
|
17267
17510
|
}
|
|
17268
17511
|
}
|
|
17269
|
-
return /* @__PURE__ */
|
|
17512
|
+
return /* @__PURE__ */ jsx81(
|
|
17270
17513
|
Controller,
|
|
17271
17514
|
{
|
|
17272
17515
|
name: name2 ?? "",
|
|
17273
17516
|
control: methods?.control,
|
|
17274
|
-
render: ({ field }) => /* @__PURE__ */
|
|
17517
|
+
render: ({ field }) => /* @__PURE__ */ jsx81(
|
|
17275
17518
|
"div",
|
|
17276
17519
|
{
|
|
17277
17520
|
className: "flex items-center gap-2",
|
|
@@ -17284,7 +17527,7 @@ var CheckboxField = (props) => {
|
|
|
17284
17527
|
onChange2(name2 ?? "", checked);
|
|
17285
17528
|
}
|
|
17286
17529
|
},
|
|
17287
|
-
children: /* @__PURE__ */
|
|
17530
|
+
children: /* @__PURE__ */ jsx81(
|
|
17288
17531
|
"input",
|
|
17289
17532
|
{
|
|
17290
17533
|
...field,
|
|
@@ -17311,21 +17554,21 @@ var CheckboxField = (props) => {
|
|
|
17311
17554
|
};
|
|
17312
17555
|
|
|
17313
17556
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17314
|
-
import { useEffect as
|
|
17315
|
-
import { Fragment as Fragment19, jsx as
|
|
17557
|
+
import { useEffect as useEffect13, useRef as useRef6, useState as useState12 } from "react";
|
|
17558
|
+
import { Fragment as Fragment19, jsx as jsx82, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
17316
17559
|
var ColorWrapper = (props) => {
|
|
17317
17560
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
17318
17561
|
const { t: t3 } = useI18n();
|
|
17319
|
-
const [selectedColor, setSelectedColor] =
|
|
17320
|
-
const [showFullColors, setIsShowFullColor] =
|
|
17562
|
+
const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
|
|
17563
|
+
const [showFullColors, setIsShowFullColor] = useState12(false);
|
|
17321
17564
|
const pickColorsRef = useRef6(null);
|
|
17322
|
-
|
|
17565
|
+
useEffect13(() => {
|
|
17323
17566
|
setSelectedColor(colors2[defaultColor]);
|
|
17324
17567
|
}, [defaultColor]);
|
|
17325
17568
|
const handleShowFullColors = () => {
|
|
17326
17569
|
setIsShowFullColor(!showFullColors);
|
|
17327
17570
|
};
|
|
17328
|
-
|
|
17571
|
+
useEffect13(() => {
|
|
17329
17572
|
const handleClickOutside = (event) => {
|
|
17330
17573
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17331
17574
|
setIsShowFullColor(false);
|
|
@@ -17336,8 +17579,8 @@ var ColorWrapper = (props) => {
|
|
|
17336
17579
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17337
17580
|
};
|
|
17338
17581
|
}, []);
|
|
17339
|
-
return /* @__PURE__ */
|
|
17340
|
-
/* @__PURE__ */
|
|
17582
|
+
return /* @__PURE__ */ jsx82("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx82("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs54("div", { children: [
|
|
17583
|
+
/* @__PURE__ */ jsx82(
|
|
17341
17584
|
"button",
|
|
17342
17585
|
{
|
|
17343
17586
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17351,7 +17594,7 @@ var ColorWrapper = (props) => {
|
|
|
17351
17594
|
}
|
|
17352
17595
|
}
|
|
17353
17596
|
),
|
|
17354
|
-
/* @__PURE__ */
|
|
17597
|
+
/* @__PURE__ */ jsx82(
|
|
17355
17598
|
M,
|
|
17356
17599
|
{
|
|
17357
17600
|
className: "",
|
|
@@ -17360,8 +17603,8 @@ var ColorWrapper = (props) => {
|
|
|
17360
17603
|
content: t3(color?.name)
|
|
17361
17604
|
}
|
|
17362
17605
|
)
|
|
17363
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17364
|
-
/* @__PURE__ */
|
|
17606
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs54(Fragment19, { children: [
|
|
17607
|
+
/* @__PURE__ */ jsx82(
|
|
17365
17608
|
"button",
|
|
17366
17609
|
{
|
|
17367
17610
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17374,7 +17617,7 @@ var ColorWrapper = (props) => {
|
|
|
17374
17617
|
style: { backgroundColor: selectedColor?.color }
|
|
17375
17618
|
}
|
|
17376
17619
|
),
|
|
17377
|
-
/* @__PURE__ */
|
|
17620
|
+
/* @__PURE__ */ jsx82(
|
|
17378
17621
|
M,
|
|
17379
17622
|
{
|
|
17380
17623
|
place: "top",
|
|
@@ -17386,13 +17629,13 @@ var ColorWrapper = (props) => {
|
|
|
17386
17629
|
};
|
|
17387
17630
|
|
|
17388
17631
|
// src/widgets/basic/color-field/color.tsx
|
|
17389
|
-
import { jsx as
|
|
17632
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
17390
17633
|
var ColorField = (props) => {
|
|
17391
17634
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17392
17635
|
if (!isForm) {
|
|
17393
|
-
return /* @__PURE__ */
|
|
17636
|
+
return /* @__PURE__ */ jsx83(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17394
17637
|
}
|
|
17395
|
-
return /* @__PURE__ */
|
|
17638
|
+
return /* @__PURE__ */ jsx83(
|
|
17396
17639
|
Controller,
|
|
17397
17640
|
{
|
|
17398
17641
|
name: name2 ?? "",
|
|
@@ -17402,7 +17645,7 @@ var ColorField = (props) => {
|
|
|
17402
17645
|
field.onChange(color?.id);
|
|
17403
17646
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17404
17647
|
};
|
|
17405
|
-
return /* @__PURE__ */
|
|
17648
|
+
return /* @__PURE__ */ jsx83(
|
|
17406
17649
|
ColorWrapper,
|
|
17407
17650
|
{
|
|
17408
17651
|
savePickColor: handlePickColorChange,
|
|
@@ -17416,8 +17659,8 @@ var ColorField = (props) => {
|
|
|
17416
17659
|
};
|
|
17417
17660
|
|
|
17418
17661
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17419
|
-
import { useEffect as
|
|
17420
|
-
import { jsx as
|
|
17662
|
+
import { useEffect as useEffect14 } from "react";
|
|
17663
|
+
import { jsx as jsx84, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17421
17664
|
var CopyLinkButtonField = (props) => {
|
|
17422
17665
|
const {
|
|
17423
17666
|
isForm,
|
|
@@ -17436,9 +17679,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17436
17679
|
} = props;
|
|
17437
17680
|
const { t: t3 } = useI18n();
|
|
17438
17681
|
if (!isForm) {
|
|
17439
|
-
return /* @__PURE__ */
|
|
17682
|
+
return /* @__PURE__ */ jsx84("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17440
17683
|
}
|
|
17441
|
-
return /* @__PURE__ */
|
|
17684
|
+
return /* @__PURE__ */ jsx84(
|
|
17442
17685
|
Controller,
|
|
17443
17686
|
{
|
|
17444
17687
|
name: name2 ?? "",
|
|
@@ -17451,13 +17694,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17451
17694
|
fieldState: { error: error2 }
|
|
17452
17695
|
}) => {
|
|
17453
17696
|
const { setError, clearErrors } = methods;
|
|
17454
|
-
|
|
17697
|
+
useEffect14(() => {
|
|
17455
17698
|
if (value) {
|
|
17456
17699
|
clearErrors(name2);
|
|
17457
17700
|
}
|
|
17458
17701
|
}, [value]);
|
|
17459
|
-
return /* @__PURE__ */
|
|
17460
|
-
/* @__PURE__ */
|
|
17702
|
+
return /* @__PURE__ */ jsxs55("div", { className: "relative", children: [
|
|
17703
|
+
/* @__PURE__ */ jsxs55(
|
|
17461
17704
|
"div",
|
|
17462
17705
|
{
|
|
17463
17706
|
"aria-disabled": readonly,
|
|
@@ -17466,7 +17709,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17466
17709
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17467
17710
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17468
17711
|
children: [
|
|
17469
|
-
/* @__PURE__ */
|
|
17712
|
+
/* @__PURE__ */ jsx84(
|
|
17470
17713
|
"input",
|
|
17471
17714
|
{
|
|
17472
17715
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17507,19 +17750,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17507
17750
|
`
|
|
17508
17751
|
}
|
|
17509
17752
|
),
|
|
17510
|
-
readonly && value && /* @__PURE__ */
|
|
17753
|
+
readonly && value && /* @__PURE__ */ jsx84(
|
|
17511
17754
|
"button",
|
|
17512
17755
|
{
|
|
17513
17756
|
className: "cursor-pointer",
|
|
17514
17757
|
type: "button",
|
|
17515
17758
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17516
|
-
children: isCopied ? /* @__PURE__ */
|
|
17759
|
+
children: isCopied ? /* @__PURE__ */ jsx84(CheckIcon, {}) : /* @__PURE__ */ jsx84(CopyIcon, {})
|
|
17517
17760
|
}
|
|
17518
17761
|
)
|
|
17519
17762
|
]
|
|
17520
17763
|
}
|
|
17521
17764
|
),
|
|
17522
|
-
error2 && /* @__PURE__ */
|
|
17765
|
+
error2 && /* @__PURE__ */ jsx84("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17523
17766
|
] });
|
|
17524
17767
|
}
|
|
17525
17768
|
}
|
|
@@ -17527,10 +17770,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17527
17770
|
};
|
|
17528
17771
|
|
|
17529
17772
|
// src/widgets/basic/date-field/date.tsx
|
|
17530
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
17773
|
+
import { forwardRef as forwardRef6, useEffect as useEffect18 } from "react";
|
|
17531
17774
|
|
|
17532
17775
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17533
|
-
import
|
|
17776
|
+
import React10, { useRef as useRef10, useCallback as useCallback5, useEffect as useEffect16, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
17534
17777
|
|
|
17535
17778
|
// node_modules/date-fns/constants.js
|
|
17536
17779
|
var daysInYear = 365.2425;
|
|
@@ -21428,22 +21671,22 @@ function subYears(date, amount, options2) {
|
|
|
21428
21671
|
}
|
|
21429
21672
|
|
|
21430
21673
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21431
|
-
import * as
|
|
21674
|
+
import * as React9 from "react";
|
|
21432
21675
|
|
|
21433
21676
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
21434
|
-
import * as
|
|
21677
|
+
import * as React7 from "react";
|
|
21435
21678
|
import { useLayoutEffect } from "react";
|
|
21436
21679
|
var isClient = typeof document !== "undefined";
|
|
21437
21680
|
var noop2 = function noop3() {
|
|
21438
21681
|
};
|
|
21439
21682
|
var index = isClient ? useLayoutEffect : noop2;
|
|
21440
21683
|
var SafeReact = {
|
|
21441
|
-
...
|
|
21684
|
+
...React7
|
|
21442
21685
|
};
|
|
21443
21686
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
21444
21687
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
21445
21688
|
function useEffectEvent(callback) {
|
|
21446
|
-
const ref =
|
|
21689
|
+
const ref = React7.useRef(() => {
|
|
21447
21690
|
if (process.env.NODE_ENV !== "production") {
|
|
21448
21691
|
throw new Error("Cannot call an event handler while rendering.");
|
|
21449
21692
|
}
|
|
@@ -21451,7 +21694,7 @@ function useEffectEvent(callback) {
|
|
|
21451
21694
|
useSafeInsertionEffect(() => {
|
|
21452
21695
|
ref.current = callback;
|
|
21453
21696
|
});
|
|
21454
|
-
return
|
|
21697
|
+
return React7.useCallback(function() {
|
|
21455
21698
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21456
21699
|
args[_key] = arguments[_key];
|
|
21457
21700
|
}
|
|
@@ -21460,11 +21703,11 @@ function useEffectEvent(callback) {
|
|
|
21460
21703
|
}
|
|
21461
21704
|
|
|
21462
21705
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21463
|
-
import { jsx as
|
|
21706
|
+
import { jsx as jsx85, jsxs as jsxs56, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
21464
21707
|
import * as ReactDOM2 from "react-dom";
|
|
21465
21708
|
|
|
21466
21709
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
21467
|
-
import * as
|
|
21710
|
+
import * as React8 from "react";
|
|
21468
21711
|
import { useLayoutEffect as useLayoutEffect2 } from "react";
|
|
21469
21712
|
import * as ReactDOM from "react-dom";
|
|
21470
21713
|
var isClient2 = typeof document !== "undefined";
|
|
@@ -21530,7 +21773,7 @@ function roundByDPR(element, value) {
|
|
|
21530
21773
|
return Math.round(value * dpr) / dpr;
|
|
21531
21774
|
}
|
|
21532
21775
|
function useLatestRef(value) {
|
|
21533
|
-
const ref =
|
|
21776
|
+
const ref = React8.useRef(value);
|
|
21534
21777
|
index2(() => {
|
|
21535
21778
|
ref.current = value;
|
|
21536
21779
|
});
|
|
@@ -21553,7 +21796,7 @@ function useFloating(options2) {
|
|
|
21553
21796
|
whileElementsMounted,
|
|
21554
21797
|
open
|
|
21555
21798
|
} = options2;
|
|
21556
|
-
const [data, setData] =
|
|
21799
|
+
const [data, setData] = React8.useState({
|
|
21557
21800
|
x: 0,
|
|
21558
21801
|
y: 0,
|
|
21559
21802
|
strategy,
|
|
@@ -21561,19 +21804,19 @@ function useFloating(options2) {
|
|
|
21561
21804
|
middlewareData: {},
|
|
21562
21805
|
isPositioned: false
|
|
21563
21806
|
});
|
|
21564
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21807
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
21565
21808
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
21566
21809
|
setLatestMiddleware(middleware2);
|
|
21567
21810
|
}
|
|
21568
|
-
const [_reference, _setReference] =
|
|
21569
|
-
const [_floating, _setFloating] =
|
|
21570
|
-
const setReference =
|
|
21811
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21812
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21813
|
+
const setReference = React8.useCallback((node2) => {
|
|
21571
21814
|
if (node2 !== referenceRef.current) {
|
|
21572
21815
|
referenceRef.current = node2;
|
|
21573
21816
|
_setReference(node2);
|
|
21574
21817
|
}
|
|
21575
21818
|
}, []);
|
|
21576
|
-
const setFloating =
|
|
21819
|
+
const setFloating = React8.useCallback((node2) => {
|
|
21577
21820
|
if (node2 !== floatingRef.current) {
|
|
21578
21821
|
floatingRef.current = node2;
|
|
21579
21822
|
_setFloating(node2);
|
|
@@ -21581,14 +21824,14 @@ function useFloating(options2) {
|
|
|
21581
21824
|
}, []);
|
|
21582
21825
|
const referenceEl = externalReference || _reference;
|
|
21583
21826
|
const floatingEl = externalFloating || _floating;
|
|
21584
|
-
const referenceRef =
|
|
21585
|
-
const floatingRef =
|
|
21586
|
-
const dataRef =
|
|
21827
|
+
const referenceRef = React8.useRef(null);
|
|
21828
|
+
const floatingRef = React8.useRef(null);
|
|
21829
|
+
const dataRef = React8.useRef(data);
|
|
21587
21830
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
21588
21831
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
21589
21832
|
const platformRef = useLatestRef(platform2);
|
|
21590
21833
|
const openRef = useLatestRef(open);
|
|
21591
|
-
const update =
|
|
21834
|
+
const update = React8.useCallback(() => {
|
|
21592
21835
|
if (!referenceRef.current || !floatingRef.current) {
|
|
21593
21836
|
return;
|
|
21594
21837
|
}
|
|
@@ -21626,7 +21869,7 @@ function useFloating(options2) {
|
|
|
21626
21869
|
}));
|
|
21627
21870
|
}
|
|
21628
21871
|
}, [open]);
|
|
21629
|
-
const isMountedRef =
|
|
21872
|
+
const isMountedRef = React8.useRef(false);
|
|
21630
21873
|
index2(() => {
|
|
21631
21874
|
isMountedRef.current = true;
|
|
21632
21875
|
return () => {
|
|
@@ -21643,17 +21886,17 @@ function useFloating(options2) {
|
|
|
21643
21886
|
update();
|
|
21644
21887
|
}
|
|
21645
21888
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21646
|
-
const refs =
|
|
21889
|
+
const refs = React8.useMemo(() => ({
|
|
21647
21890
|
reference: referenceRef,
|
|
21648
21891
|
floating: floatingRef,
|
|
21649
21892
|
setReference,
|
|
21650
21893
|
setFloating
|
|
21651
21894
|
}), [setReference, setFloating]);
|
|
21652
|
-
const elements =
|
|
21895
|
+
const elements = React8.useMemo(() => ({
|
|
21653
21896
|
reference: referenceEl,
|
|
21654
21897
|
floating: floatingEl
|
|
21655
21898
|
}), [referenceEl, floatingEl]);
|
|
21656
|
-
const floatingStyles =
|
|
21899
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21657
21900
|
const initialStyles = {
|
|
21658
21901
|
position: strategy,
|
|
21659
21902
|
left: 0,
|
|
@@ -21679,7 +21922,7 @@ function useFloating(options2) {
|
|
|
21679
21922
|
top: y3
|
|
21680
21923
|
};
|
|
21681
21924
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21682
|
-
return
|
|
21925
|
+
return React8.useMemo(() => ({
|
|
21683
21926
|
...data,
|
|
21684
21927
|
update,
|
|
21685
21928
|
refs,
|
|
@@ -21740,7 +21983,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21740
21983
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21741
21984
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21742
21985
|
var SafeReact2 = {
|
|
21743
|
-
...
|
|
21986
|
+
...React9
|
|
21744
21987
|
};
|
|
21745
21988
|
var serverHandoffComplete = false;
|
|
21746
21989
|
var count = 0;
|
|
@@ -21750,13 +21993,13 @@ var genId = () => (
|
|
|
21750
21993
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21751
21994
|
);
|
|
21752
21995
|
function useFloatingId() {
|
|
21753
|
-
const [id, setId] =
|
|
21996
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21754
21997
|
index(() => {
|
|
21755
21998
|
if (id == null) {
|
|
21756
21999
|
setId(genId());
|
|
21757
22000
|
}
|
|
21758
22001
|
}, []);
|
|
21759
|
-
|
|
22002
|
+
React9.useEffect(() => {
|
|
21760
22003
|
serverHandoffComplete = true;
|
|
21761
22004
|
}, []);
|
|
21762
22005
|
return id;
|
|
@@ -21791,7 +22034,7 @@ function error() {
|
|
|
21791
22034
|
console.error(message2);
|
|
21792
22035
|
}
|
|
21793
22036
|
}
|
|
21794
|
-
var FloatingArrow = /* @__PURE__ */
|
|
22037
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21795
22038
|
const {
|
|
21796
22039
|
context: {
|
|
21797
22040
|
placement,
|
|
@@ -21822,7 +22065,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21822
22065
|
}
|
|
21823
22066
|
}
|
|
21824
22067
|
const clipPathId = useId();
|
|
21825
|
-
const [isRTL2, setIsRTL] =
|
|
22068
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21826
22069
|
index(() => {
|
|
21827
22070
|
if (!floating) return;
|
|
21828
22071
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21858,7 +22101,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21858
22101
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21859
22102
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21860
22103
|
}[side];
|
|
21861
|
-
return /* @__PURE__ */
|
|
22104
|
+
return /* @__PURE__ */ jsxs56("svg", {
|
|
21862
22105
|
...rest,
|
|
21863
22106
|
"aria-hidden": true,
|
|
21864
22107
|
ref,
|
|
@@ -21874,18 +22117,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21874
22117
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21875
22118
|
...restStyle
|
|
21876
22119
|
},
|
|
21877
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
22120
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx85("path", {
|
|
21878
22121
|
clipPath: "url(#" + clipPathId + ")",
|
|
21879
22122
|
fill: "none",
|
|
21880
22123
|
stroke,
|
|
21881
22124
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21882
22125
|
d: dValue
|
|
21883
|
-
}), /* @__PURE__ */
|
|
22126
|
+
}), /* @__PURE__ */ jsx85("path", {
|
|
21884
22127
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21885
22128
|
d: dValue
|
|
21886
|
-
}), /* @__PURE__ */
|
|
22129
|
+
}), /* @__PURE__ */ jsx85("clipPath", {
|
|
21887
22130
|
id: clipPathId,
|
|
21888
|
-
children: /* @__PURE__ */
|
|
22131
|
+
children: /* @__PURE__ */ jsx85("rect", {
|
|
21889
22132
|
x: -halfStrokeWidth,
|
|
21890
22133
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21891
22134
|
width: width + computedStrokeWidth,
|
|
@@ -21913,13 +22156,13 @@ function createEventEmitter() {
|
|
|
21913
22156
|
}
|
|
21914
22157
|
};
|
|
21915
22158
|
}
|
|
21916
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
21917
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
22159
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22160
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21918
22161
|
var useFloatingParentNodeId = () => {
|
|
21919
22162
|
var _React$useContext;
|
|
21920
|
-
return ((_React$useContext =
|
|
22163
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
21921
22164
|
};
|
|
21922
|
-
var useFloatingTree = () =>
|
|
22165
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
21923
22166
|
function useFloatingRootContext(options2) {
|
|
21924
22167
|
const {
|
|
21925
22168
|
open = false,
|
|
@@ -21927,8 +22170,8 @@ function useFloatingRootContext(options2) {
|
|
|
21927
22170
|
elements: elementsProp
|
|
21928
22171
|
} = options2;
|
|
21929
22172
|
const floatingId = useId();
|
|
21930
|
-
const dataRef =
|
|
21931
|
-
const [events] =
|
|
22173
|
+
const dataRef = React9.useRef({});
|
|
22174
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
21932
22175
|
const nested = useFloatingParentNodeId() != null;
|
|
21933
22176
|
if (process.env.NODE_ENV !== "production") {
|
|
21934
22177
|
const optionDomReference = elementsProp.reference;
|
|
@@ -21936,7 +22179,7 @@ function useFloatingRootContext(options2) {
|
|
|
21936
22179
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
21937
22180
|
}
|
|
21938
22181
|
}
|
|
21939
|
-
const [positionReference, setPositionReference] =
|
|
22182
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
21940
22183
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
21941
22184
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
21942
22185
|
events.emit("openchange", {
|
|
@@ -21947,15 +22190,15 @@ function useFloatingRootContext(options2) {
|
|
|
21947
22190
|
});
|
|
21948
22191
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
21949
22192
|
});
|
|
21950
|
-
const refs =
|
|
22193
|
+
const refs = React9.useMemo(() => ({
|
|
21951
22194
|
setPositionReference
|
|
21952
22195
|
}), []);
|
|
21953
|
-
const elements =
|
|
22196
|
+
const elements = React9.useMemo(() => ({
|
|
21954
22197
|
reference: positionReference || elementsProp.reference || null,
|
|
21955
22198
|
floating: elementsProp.floating || null,
|
|
21956
22199
|
domReference: elementsProp.reference
|
|
21957
22200
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
21958
|
-
return
|
|
22201
|
+
return React9.useMemo(() => ({
|
|
21959
22202
|
dataRef,
|
|
21960
22203
|
open,
|
|
21961
22204
|
onOpenChange,
|
|
@@ -21982,11 +22225,11 @@ function useFloating2(options2) {
|
|
|
21982
22225
|
});
|
|
21983
22226
|
const rootContext = options2.rootContext || internalRootContext;
|
|
21984
22227
|
const computedElements = rootContext.elements;
|
|
21985
|
-
const [_domReference, setDomReference] =
|
|
21986
|
-
const [positionReference, _setPositionReference] =
|
|
22228
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
22229
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
21987
22230
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
21988
22231
|
const domReference = optionDomReference || _domReference;
|
|
21989
|
-
const domReferenceRef =
|
|
22232
|
+
const domReferenceRef = React9.useRef(null);
|
|
21990
22233
|
const tree = useFloatingTree();
|
|
21991
22234
|
index(() => {
|
|
21992
22235
|
if (domReference) {
|
|
@@ -22002,7 +22245,7 @@ function useFloating2(options2) {
|
|
|
22002
22245
|
}
|
|
22003
22246
|
}
|
|
22004
22247
|
});
|
|
22005
|
-
const setPositionReference =
|
|
22248
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
22006
22249
|
const computedPositionReference = isElement(node2) ? {
|
|
22007
22250
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
22008
22251
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -22011,7 +22254,7 @@ function useFloating2(options2) {
|
|
|
22011
22254
|
_setPositionReference(computedPositionReference);
|
|
22012
22255
|
position2.refs.setReference(computedPositionReference);
|
|
22013
22256
|
}, [position2.refs]);
|
|
22014
|
-
const setReference =
|
|
22257
|
+
const setReference = React9.useCallback((node2) => {
|
|
22015
22258
|
if (isElement(node2) || node2 === null) {
|
|
22016
22259
|
domReferenceRef.current = node2;
|
|
22017
22260
|
setDomReference(node2);
|
|
@@ -22023,17 +22266,17 @@ function useFloating2(options2) {
|
|
|
22023
22266
|
position2.refs.setReference(node2);
|
|
22024
22267
|
}
|
|
22025
22268
|
}, [position2.refs]);
|
|
22026
|
-
const refs =
|
|
22269
|
+
const refs = React9.useMemo(() => ({
|
|
22027
22270
|
...position2.refs,
|
|
22028
22271
|
setReference,
|
|
22029
22272
|
setPositionReference,
|
|
22030
22273
|
domReference: domReferenceRef
|
|
22031
22274
|
}), [position2.refs, setReference, setPositionReference]);
|
|
22032
|
-
const elements =
|
|
22275
|
+
const elements = React9.useMemo(() => ({
|
|
22033
22276
|
...position2.elements,
|
|
22034
22277
|
domReference
|
|
22035
22278
|
}), [position2.elements, domReference]);
|
|
22036
|
-
const context =
|
|
22279
|
+
const context = React9.useMemo(() => ({
|
|
22037
22280
|
...position2,
|
|
22038
22281
|
...rootContext,
|
|
22039
22282
|
refs,
|
|
@@ -22047,7 +22290,7 @@ function useFloating2(options2) {
|
|
|
22047
22290
|
node2.context = context;
|
|
22048
22291
|
}
|
|
22049
22292
|
});
|
|
22050
|
-
return
|
|
22293
|
+
return React9.useMemo(() => ({
|
|
22051
22294
|
...position2,
|
|
22052
22295
|
context,
|
|
22053
22296
|
refs,
|
|
@@ -22097,7 +22340,7 @@ function __spreadArray(to2, from2, pack) {
|
|
|
22097
22340
|
var CalendarContainer = function(_a2) {
|
|
22098
22341
|
var _b = _a2.showTimeSelectOnly, showTimeSelectOnly = _b === void 0 ? false : _b, _c = _a2.showTime, showTime = _c === void 0 ? false : _c, className = _a2.className, children = _a2.children;
|
|
22099
22342
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
22100
|
-
return
|
|
22343
|
+
return React10.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22101
22344
|
};
|
|
22102
22345
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22103
22346
|
var ref = useRef10(null);
|
|
@@ -22114,7 +22357,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22114
22357
|
}
|
|
22115
22358
|
}
|
|
22116
22359
|
}, [ignoreClass]);
|
|
22117
|
-
|
|
22360
|
+
useEffect16(function() {
|
|
22118
22361
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22119
22362
|
return function() {
|
|
22120
22363
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -22125,7 +22368,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22125
22368
|
var ClickOutsideWrapper = function(_a2) {
|
|
22126
22369
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
22127
22370
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
22128
|
-
return
|
|
22371
|
+
return React10.createElement("div", { className, style, ref: function(node2) {
|
|
22129
22372
|
detectRef.current = node2;
|
|
22130
22373
|
if (containerRef) {
|
|
22131
22374
|
containerRef.current = node2;
|
|
@@ -22721,7 +22964,7 @@ var InputTime = (
|
|
|
22721
22964
|
__extends(InputTime2, _super);
|
|
22722
22965
|
function InputTime2(props) {
|
|
22723
22966
|
var _this = _super.call(this, props) || this;
|
|
22724
|
-
_this.inputRef =
|
|
22967
|
+
_this.inputRef = React10.createRef();
|
|
22725
22968
|
_this.onTimeChange = function(time) {
|
|
22726
22969
|
var _a2, _b;
|
|
22727
22970
|
_this.setState({ time });
|
|
@@ -22745,7 +22988,7 @@ var InputTime = (
|
|
|
22745
22988
|
onChange: _this.onTimeChange
|
|
22746
22989
|
});
|
|
22747
22990
|
}
|
|
22748
|
-
return
|
|
22991
|
+
return React10.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22749
22992
|
var _a3;
|
|
22750
22993
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22751
22994
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22766,14 +23009,14 @@ var InputTime = (
|
|
|
22766
23009
|
return null;
|
|
22767
23010
|
};
|
|
22768
23011
|
InputTime2.prototype.render = function() {
|
|
22769
|
-
return
|
|
23012
|
+
return React10.createElement(
|
|
22770
23013
|
"div",
|
|
22771
23014
|
{ className: "react-datepicker__input-time-container" },
|
|
22772
|
-
|
|
22773
|
-
|
|
23015
|
+
React10.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
23016
|
+
React10.createElement(
|
|
22774
23017
|
"div",
|
|
22775
23018
|
{ className: "react-datepicker-time__input-container" },
|
|
22776
|
-
|
|
23019
|
+
React10.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22777
23020
|
)
|
|
22778
23021
|
);
|
|
22779
23022
|
};
|
|
@@ -23021,11 +23264,11 @@ var Day = (
|
|
|
23021
23264
|
_this.render = function() {
|
|
23022
23265
|
return (
|
|
23023
23266
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
23024
|
-
|
|
23267
|
+
React10.createElement(
|
|
23025
23268
|
"div",
|
|
23026
23269
|
{ ref: _this.dayEl, className: _this.getClassNames(_this.props.day), onKeyDown: _this.handleOnKeyDown, onClick: _this.handleClick, onMouseEnter: !_this.props.usePointerEvent ? _this.handleMouseEnter : void 0, onPointerEnter: _this.props.usePointerEvent ? _this.handleMouseEnter : void 0, tabIndex: _this.getTabIndex(), "aria-label": _this.getAriaLabel(), role: "option", title: _this.getTitle(), "aria-disabled": _this.isDisabled(), "aria-current": _this.isCurrentDay() ? "date" : void 0, "aria-selected": _this.isSelected() || _this.isInRange() },
|
|
23027
23270
|
_this.renderDayContents(),
|
|
23028
|
-
_this.getTitle() !== "" &&
|
|
23271
|
+
_this.getTitle() !== "" && React10.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
23029
23272
|
)
|
|
23030
23273
|
);
|
|
23031
23274
|
};
|
|
@@ -23134,7 +23377,7 @@ var WeekNumber = (
|
|
|
23134
23377
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
23135
23378
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
23136
23379
|
};
|
|
23137
|
-
return
|
|
23380
|
+
return React10.createElement("div", { ref: this.weekNumberEl, className: clsx(weekNumberClasses), "aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex() }, weekNumber);
|
|
23138
23381
|
};
|
|
23139
23382
|
return WeekNumber2;
|
|
23140
23383
|
}(Component)
|
|
@@ -23211,11 +23454,11 @@ var Week = (
|
|
|
23211
23454
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
23212
23455
|
if (_this.props.showWeekNumber) {
|
|
23213
23456
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
23214
|
-
days.push(
|
|
23457
|
+
days.push(React10.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
23215
23458
|
}
|
|
23216
23459
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
23217
23460
|
var day = addDays(startOfWeek2, offset4);
|
|
23218
|
-
return
|
|
23461
|
+
return React10.createElement(Day, _assign({}, Week2.defaultProps, _this.props, { ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix, key: day.valueOf(), day, onClick: _this.handleDayClick.bind(_this, day), onMouseEnter: _this.handleDayMouseEnter.bind(_this, day) }));
|
|
23219
23462
|
}));
|
|
23220
23463
|
};
|
|
23221
23464
|
_this.startOfWeek = function() {
|
|
@@ -23241,7 +23484,7 @@ var Week = (
|
|
|
23241
23484
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
23242
23485
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
23243
23486
|
};
|
|
23244
|
-
return
|
|
23487
|
+
return React10.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
23245
23488
|
};
|
|
23246
23489
|
return Week2;
|
|
23247
23490
|
}(Component)
|
|
@@ -23469,7 +23712,7 @@ var Month = (
|
|
|
23469
23712
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
23470
23713
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
23471
23714
|
while (true) {
|
|
23472
|
-
weeks.push(
|
|
23715
|
+
weeks.push(React10.createElement(Week, _assign({}, _this.props, { ariaLabelPrefix: _this.props.weekAriaLabelPrefix, key: i3, day: currentWeekStart, month: getMonth(_this.props.day), onDayClick: _this.handleDayClick, onDayMouseEnter: _this.handleDayMouseEnter, selected, preSelection, showWeekNumber: _this.props.showWeekNumbers })));
|
|
23473
23716
|
if (breakAfterNextPush)
|
|
23474
23717
|
break;
|
|
23475
23718
|
i3++;
|
|
@@ -23738,8 +23981,8 @@ var Month = (
|
|
|
23738
23981
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23739
23982
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23740
23983
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23741
|
-
return
|
|
23742
|
-
return
|
|
23984
|
+
return React10.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23985
|
+
return React10.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23743
23986
|
_this.onMonthClick(event, m);
|
|
23744
23987
|
}, onKeyDown: function(event) {
|
|
23745
23988
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23758,8 +24001,8 @@ var Month = (
|
|
|
23758
24001
|
_this.renderQuarters = function() {
|
|
23759
24002
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23760
24003
|
var quarters = [1, 2, 3, 4];
|
|
23761
|
-
return
|
|
23762
|
-
return
|
|
24004
|
+
return React10.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
24005
|
+
return React10.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23763
24006
|
_this.onQuarterClick(event, q3);
|
|
23764
24007
|
}, onKeyDown: function(event) {
|
|
23765
24008
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23791,7 +24034,7 @@ var Month = (
|
|
|
23791
24034
|
Month2.prototype.render = function() {
|
|
23792
24035
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23793
24036
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23794
|
-
return
|
|
24037
|
+
return React10.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : void 0, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : void 0, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
23795
24038
|
};
|
|
23796
24039
|
return Month2;
|
|
23797
24040
|
}(Component)
|
|
@@ -23807,10 +24050,10 @@ var MonthDropdownOptions = (
|
|
|
23807
24050
|
};
|
|
23808
24051
|
_this.renderOptions = function() {
|
|
23809
24052
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23810
|
-
return
|
|
24053
|
+
return React10.createElement(
|
|
23811
24054
|
"div",
|
|
23812
24055
|
{ className: _this.isSelectedMonth(i3) ? "react-datepicker__month-option react-datepicker__month-option--selected_month" : "react-datepicker__month-option", key: month, onClick: _this.onChange.bind(_this, i3), "aria-selected": _this.isSelectedMonth(i3) ? "true" : void 0 },
|
|
23813
|
-
_this.isSelectedMonth(i3) ?
|
|
24056
|
+
_this.isSelectedMonth(i3) ? React10.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23814
24057
|
month
|
|
23815
24058
|
);
|
|
23816
24059
|
});
|
|
@@ -23824,7 +24067,7 @@ var MonthDropdownOptions = (
|
|
|
23824
24067
|
return _this;
|
|
23825
24068
|
}
|
|
23826
24069
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23827
|
-
return
|
|
24070
|
+
return React10.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23828
24071
|
};
|
|
23829
24072
|
return MonthDropdownOptions2;
|
|
23830
24073
|
}(Component)
|
|
@@ -23840,24 +24083,24 @@ var MonthDropdown = (
|
|
|
23840
24083
|
};
|
|
23841
24084
|
_this.renderSelectOptions = function(monthNames) {
|
|
23842
24085
|
return monthNames.map(function(m, i3) {
|
|
23843
|
-
return
|
|
24086
|
+
return React10.createElement("option", { key: m, value: i3 }, m);
|
|
23844
24087
|
});
|
|
23845
24088
|
};
|
|
23846
24089
|
_this.renderSelectMode = function(monthNames) {
|
|
23847
|
-
return
|
|
24090
|
+
return React10.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23848
24091
|
return _this.onChange(parseInt(e3.target.value));
|
|
23849
24092
|
} }, _this.renderSelectOptions(monthNames));
|
|
23850
24093
|
};
|
|
23851
24094
|
_this.renderReadView = function(visible, monthNames) {
|
|
23852
|
-
return
|
|
24095
|
+
return React10.createElement(
|
|
23853
24096
|
"div",
|
|
23854
24097
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23855
|
-
|
|
23856
|
-
|
|
24098
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
24099
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23857
24100
|
);
|
|
23858
24101
|
};
|
|
23859
24102
|
_this.renderDropdown = function(monthNames) {
|
|
23860
|
-
return
|
|
24103
|
+
return React10.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23861
24104
|
};
|
|
23862
24105
|
_this.renderScrollMode = function(monthNames) {
|
|
23863
24106
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23896,7 +24139,7 @@ var MonthDropdown = (
|
|
|
23896
24139
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
23897
24140
|
break;
|
|
23898
24141
|
}
|
|
23899
|
-
return
|
|
24142
|
+
return React10.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23900
24143
|
};
|
|
23901
24144
|
return MonthDropdown2;
|
|
23902
24145
|
}(Component)
|
|
@@ -23921,10 +24164,10 @@ var MonthYearDropdownOptions = (
|
|
|
23921
24164
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
23922
24165
|
var monthYearPoint = getTime(monthYear);
|
|
23923
24166
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
23924
|
-
return
|
|
24167
|
+
return React10.createElement(
|
|
23925
24168
|
"div",
|
|
23926
24169
|
{ className: isSameMonthYear ? "react-datepicker__month-year-option--selected_month-year" : "react-datepicker__month-year-option", key: monthYearPoint, onClick: _this.onChange.bind(_this, monthYearPoint), "aria-selected": isSameMonthYear ? "true" : void 0 },
|
|
23927
|
-
isSameMonthYear ?
|
|
24170
|
+
isSameMonthYear ? React10.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
23928
24171
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
23929
24172
|
);
|
|
23930
24173
|
});
|
|
@@ -23945,7 +24188,7 @@ var MonthYearDropdownOptions = (
|
|
|
23945
24188
|
"react-datepicker__month-year-dropdown": true,
|
|
23946
24189
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
23947
24190
|
});
|
|
23948
|
-
return
|
|
24191
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23949
24192
|
};
|
|
23950
24193
|
return MonthYearDropdownOptions2;
|
|
23951
24194
|
}(Component)
|
|
@@ -23965,7 +24208,7 @@ var MonthYearDropdown = (
|
|
|
23965
24208
|
var options2 = [];
|
|
23966
24209
|
while (!isAfter(currDate, lastDate)) {
|
|
23967
24210
|
var timePoint = getTime(currDate);
|
|
23968
|
-
options2.push(
|
|
24211
|
+
options2.push(React10.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
23969
24212
|
currDate = addMonths(currDate, 1);
|
|
23970
24213
|
}
|
|
23971
24214
|
return options2;
|
|
@@ -23974,19 +24217,19 @@ var MonthYearDropdown = (
|
|
|
23974
24217
|
_this.onChange(parseInt(event.target.value));
|
|
23975
24218
|
};
|
|
23976
24219
|
_this.renderSelectMode = function() {
|
|
23977
|
-
return
|
|
24220
|
+
return React10.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23978
24221
|
};
|
|
23979
24222
|
_this.renderReadView = function(visible) {
|
|
23980
24223
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
23981
|
-
return
|
|
24224
|
+
return React10.createElement(
|
|
23982
24225
|
"div",
|
|
23983
24226
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
23984
|
-
|
|
23985
|
-
|
|
24227
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
24228
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
23986
24229
|
);
|
|
23987
24230
|
};
|
|
23988
24231
|
_this.renderDropdown = function() {
|
|
23989
|
-
return
|
|
24232
|
+
return React10.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23990
24233
|
};
|
|
23991
24234
|
_this.renderScrollMode = function() {
|
|
23992
24235
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24021,7 +24264,7 @@ var MonthYearDropdown = (
|
|
|
24021
24264
|
renderedDropdown = this.renderSelectMode();
|
|
24022
24265
|
break;
|
|
24023
24266
|
}
|
|
24024
|
-
return
|
|
24267
|
+
return React10.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24025
24268
|
};
|
|
24026
24269
|
return MonthYearDropdown2;
|
|
24027
24270
|
}(Component)
|
|
@@ -24119,7 +24362,7 @@ var Time = (
|
|
|
24119
24362
|
return prev2;
|
|
24120
24363
|
}, times[0]);
|
|
24121
24364
|
return times.map(function(time) {
|
|
24122
|
-
return
|
|
24365
|
+
return React10.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
24123
24366
|
if (time === timeToFocus) {
|
|
24124
24367
|
_this.centerLi = li;
|
|
24125
24368
|
}
|
|
@@ -24130,14 +24373,14 @@ var Time = (
|
|
|
24130
24373
|
};
|
|
24131
24374
|
_this.renderTimeCaption = function() {
|
|
24132
24375
|
if (_this.props.showTimeCaption === false) {
|
|
24133
|
-
return
|
|
24376
|
+
return React10.createElement(React10.Fragment, null);
|
|
24134
24377
|
}
|
|
24135
|
-
return
|
|
24378
|
+
return React10.createElement(
|
|
24136
24379
|
"div",
|
|
24137
24380
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
24138
24381
|
_this.header = header;
|
|
24139
24382
|
} },
|
|
24140
|
-
|
|
24383
|
+
React10.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
24141
24384
|
);
|
|
24142
24385
|
};
|
|
24143
24386
|
return _this;
|
|
@@ -24184,17 +24427,17 @@ var Time = (
|
|
|
24184
24427
|
var _this = this;
|
|
24185
24428
|
var _a2;
|
|
24186
24429
|
var height = this.state.height;
|
|
24187
|
-
return
|
|
24430
|
+
return React10.createElement(
|
|
24188
24431
|
"div",
|
|
24189
24432
|
{ className: "react-datepicker__time-container ".concat(((_a2 = this.props.todayButton) !== null && _a2 !== void 0 ? _a2 : Time2.defaultProps.todayButton) ? "react-datepicker__time-container--with-today-button" : "") },
|
|
24190
24433
|
this.renderTimeCaption(),
|
|
24191
|
-
|
|
24434
|
+
React10.createElement(
|
|
24192
24435
|
"div",
|
|
24193
24436
|
{ className: "react-datepicker__time" },
|
|
24194
|
-
|
|
24437
|
+
React10.createElement(
|
|
24195
24438
|
"div",
|
|
24196
24439
|
{ className: "react-datepicker__time-box" },
|
|
24197
|
-
|
|
24440
|
+
React10.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
24198
24441
|
_this.list = list;
|
|
24199
24442
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
24200
24443
|
)
|
|
@@ -24452,7 +24695,7 @@ var Year = (
|
|
|
24452
24695
|
}
|
|
24453
24696
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
24454
24697
|
var _loop_1 = function(y4) {
|
|
24455
|
-
yearsList.push(
|
|
24698
|
+
yearsList.push(React10.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
24456
24699
|
_this.onYearClick(event, y4);
|
|
24457
24700
|
}, onKeyDown: function(event) {
|
|
24458
24701
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24474,10 +24717,10 @@ var Year = (
|
|
|
24474
24717
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
24475
24718
|
_loop_1(y3);
|
|
24476
24719
|
}
|
|
24477
|
-
return
|
|
24720
|
+
return React10.createElement(
|
|
24478
24721
|
"div",
|
|
24479
24722
|
{ className: "react-datepicker__year" },
|
|
24480
|
-
|
|
24723
|
+
React10.createElement("div", { className: "react-datepicker__year-wrapper", onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : void 0, onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : void 0 }, yearsList)
|
|
24481
24724
|
);
|
|
24482
24725
|
};
|
|
24483
24726
|
return Year2;
|
|
@@ -24509,10 +24752,10 @@ var YearDropdownOptions = (
|
|
|
24509
24752
|
_this.renderOptions = function() {
|
|
24510
24753
|
var selectedYear = _this.props.year;
|
|
24511
24754
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
24512
|
-
return
|
|
24755
|
+
return React10.createElement(
|
|
24513
24756
|
"div",
|
|
24514
24757
|
{ className: selectedYear === year ? "react-datepicker__year-option react-datepicker__year-option--selected_year" : "react-datepicker__year-option", key: year, onClick: _this.onChange.bind(_this, year), "aria-selected": selectedYear === year ? "true" : void 0 },
|
|
24515
|
-
selectedYear === year ?
|
|
24758
|
+
selectedYear === year ? React10.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
24516
24759
|
year
|
|
24517
24760
|
);
|
|
24518
24761
|
});
|
|
@@ -24521,19 +24764,19 @@ var YearDropdownOptions = (
|
|
|
24521
24764
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
24522
24765
|
return year === maxYear;
|
|
24523
24766
|
})) {
|
|
24524
|
-
options2.unshift(
|
|
24767
|
+
options2.unshift(React10.createElement(
|
|
24525
24768
|
"div",
|
|
24526
24769
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
24527
|
-
|
|
24770
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
24528
24771
|
));
|
|
24529
24772
|
}
|
|
24530
24773
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
24531
24774
|
return year === minYear;
|
|
24532
24775
|
})) {
|
|
24533
|
-
options2.push(
|
|
24776
|
+
options2.push(React10.createElement(
|
|
24534
24777
|
"div",
|
|
24535
24778
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
24536
|
-
|
|
24779
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
24537
24780
|
));
|
|
24538
24781
|
}
|
|
24539
24782
|
return options2;
|
|
@@ -24581,7 +24824,7 @@ var YearDropdownOptions = (
|
|
|
24581
24824
|
"react-datepicker__year-dropdown": true,
|
|
24582
24825
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
24583
24826
|
});
|
|
24584
|
-
return
|
|
24827
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24585
24828
|
};
|
|
24586
24829
|
return YearDropdownOptions2;
|
|
24587
24830
|
}(Component)
|
|
@@ -24600,7 +24843,7 @@ var YearDropdown = (
|
|
|
24600
24843
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
24601
24844
|
var options2 = [];
|
|
24602
24845
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
24603
|
-
options2.push(
|
|
24846
|
+
options2.push(React10.createElement("option", { key: i3, value: i3 }, i3));
|
|
24604
24847
|
}
|
|
24605
24848
|
return options2;
|
|
24606
24849
|
};
|
|
@@ -24608,20 +24851,20 @@ var YearDropdown = (
|
|
|
24608
24851
|
_this.onChange(parseInt(event.target.value));
|
|
24609
24852
|
};
|
|
24610
24853
|
_this.renderSelectMode = function() {
|
|
24611
|
-
return
|
|
24854
|
+
return React10.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24612
24855
|
};
|
|
24613
24856
|
_this.renderReadView = function(visible) {
|
|
24614
|
-
return
|
|
24857
|
+
return React10.createElement(
|
|
24615
24858
|
"div",
|
|
24616
24859
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
24617
24860
|
return _this.toggleDropdown(event);
|
|
24618
24861
|
} },
|
|
24619
|
-
|
|
24620
|
-
|
|
24862
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24863
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
24621
24864
|
);
|
|
24622
24865
|
};
|
|
24623
24866
|
_this.renderDropdown = function() {
|
|
24624
|
-
return
|
|
24867
|
+
return React10.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24625
24868
|
};
|
|
24626
24869
|
_this.renderScrollMode = function() {
|
|
24627
24870
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24671,7 +24914,7 @@ var YearDropdown = (
|
|
|
24671
24914
|
renderedDropdown = this.renderSelectMode();
|
|
24672
24915
|
break;
|
|
24673
24916
|
}
|
|
24674
|
-
return
|
|
24917
|
+
return React10.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24675
24918
|
};
|
|
24676
24919
|
return YearDropdown2;
|
|
24677
24920
|
}(Component)
|
|
@@ -24845,13 +25088,13 @@ var Calendar = (
|
|
|
24845
25088
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24846
25089
|
var dayNames = [];
|
|
24847
25090
|
if (_this.props.showWeekNumbers) {
|
|
24848
|
-
dayNames.push(
|
|
25091
|
+
dayNames.push(React10.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24849
25092
|
}
|
|
24850
25093
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24851
25094
|
var day = addDays(startOfWeek2, offset4);
|
|
24852
25095
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24853
25096
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24854
|
-
return
|
|
25097
|
+
return React10.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
24855
25098
|
}));
|
|
24856
25099
|
};
|
|
24857
25100
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -24920,10 +25163,10 @@ var Calendar = (
|
|
|
24920
25163
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24921
25164
|
var _d = _this.props, _e = _d.previousMonthButtonLabel, previousMonthButtonLabel = _e === void 0 ? Calendar2.defaultProps.previousMonthButtonLabel : _e, _f = _d.previousYearButtonLabel, previousYearButtonLabel = _f === void 0 ? Calendar2.defaultProps.previousYearButtonLabel : _f;
|
|
24922
25165
|
var _g = _this.props, _h = _g.previousMonthAriaLabel, previousMonthAriaLabel = _h === void 0 ? typeof previousMonthButtonLabel === "string" ? previousMonthButtonLabel : "Previous Month" : _h, _j = _g.previousYearAriaLabel, previousYearAriaLabel = _j === void 0 ? typeof previousYearButtonLabel === "string" ? previousYearButtonLabel : "Previous Year" : _j;
|
|
24923
|
-
return
|
|
25166
|
+
return React10.createElement(
|
|
24924
25167
|
"button",
|
|
24925
25168
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
24926
|
-
|
|
25169
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
24927
25170
|
);
|
|
24928
25171
|
};
|
|
24929
25172
|
_this.increaseYear = function() {
|
|
@@ -24985,10 +25228,10 @@ var Calendar = (
|
|
|
24985
25228
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24986
25229
|
var _b = _this.props, _c = _b.nextMonthButtonLabel, nextMonthButtonLabel = _c === void 0 ? Calendar2.defaultProps.nextMonthButtonLabel : _c, _d = _b.nextYearButtonLabel, nextYearButtonLabel = _d === void 0 ? Calendar2.defaultProps.nextYearButtonLabel : _d;
|
|
24987
25230
|
var _e = _this.props, _f = _e.nextMonthAriaLabel, nextMonthAriaLabel = _f === void 0 ? typeof nextMonthButtonLabel === "string" ? nextMonthButtonLabel : "Next Month" : _f, _g = _e.nextYearAriaLabel, nextYearAriaLabel = _g === void 0 ? typeof nextYearButtonLabel === "string" ? nextYearButtonLabel : "Next Year" : _g;
|
|
24988
|
-
return
|
|
25231
|
+
return React10.createElement(
|
|
24989
25232
|
"button",
|
|
24990
25233
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
24991
|
-
|
|
25234
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
24992
25235
|
);
|
|
24993
25236
|
};
|
|
24994
25237
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -25005,7 +25248,7 @@ var Calendar = (
|
|
|
25005
25248
|
if (_this.props.showMonthYearDropdown) {
|
|
25006
25249
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
25007
25250
|
}
|
|
25008
|
-
return
|
|
25251
|
+
return React10.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
25009
25252
|
};
|
|
25010
25253
|
_this.renderYearDropdown = function(overrideHide) {
|
|
25011
25254
|
if (overrideHide === void 0) {
|
|
@@ -25014,7 +25257,7 @@ var Calendar = (
|
|
|
25014
25257
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
25015
25258
|
return;
|
|
25016
25259
|
}
|
|
25017
|
-
return
|
|
25260
|
+
return React10.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
25018
25261
|
};
|
|
25019
25262
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
25020
25263
|
if (overrideHide === void 0) {
|
|
@@ -25023,7 +25266,7 @@ var Calendar = (
|
|
|
25023
25266
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
25024
25267
|
return;
|
|
25025
25268
|
}
|
|
25026
|
-
return
|
|
25269
|
+
return React10.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
25027
25270
|
};
|
|
25028
25271
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
25029
25272
|
if (overrideHide === void 0) {
|
|
@@ -25032,7 +25275,7 @@ var Calendar = (
|
|
|
25032
25275
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
25033
25276
|
return;
|
|
25034
25277
|
}
|
|
25035
|
-
return
|
|
25278
|
+
return React10.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
25036
25279
|
};
|
|
25037
25280
|
_this.handleTodayButtonClick = function(event) {
|
|
25038
25281
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -25042,22 +25285,22 @@ var Calendar = (
|
|
|
25042
25285
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
25043
25286
|
return;
|
|
25044
25287
|
}
|
|
25045
|
-
return
|
|
25288
|
+
return React10.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
25046
25289
|
};
|
|
25047
25290
|
_this.renderDefaultHeader = function(_a2) {
|
|
25048
25291
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
25049
|
-
return
|
|
25292
|
+
return React10.createElement(
|
|
25050
25293
|
"div",
|
|
25051
25294
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
25052
25295
|
_this.renderCurrentMonth(monthDate),
|
|
25053
|
-
|
|
25296
|
+
React10.createElement(
|
|
25054
25297
|
"div",
|
|
25055
25298
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
25056
25299
|
_this.renderMonthDropdown(i3 !== 0),
|
|
25057
25300
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
25058
25301
|
_this.renderYearDropdown(i3 !== 0)
|
|
25059
25302
|
),
|
|
25060
|
-
|
|
25303
|
+
React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25061
25304
|
);
|
|
25062
25305
|
};
|
|
25063
25306
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -25071,18 +25314,18 @@ var Calendar = (
|
|
|
25071
25314
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
25072
25315
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
25073
25316
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
25074
|
-
return
|
|
25317
|
+
return React10.createElement(
|
|
25075
25318
|
"div",
|
|
25076
25319
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
25077
25320
|
(_b = (_a2 = _this.props).renderCustomHeader) === null || _b === void 0 ? void 0 : _b.call(_a2, _assign(_assign({}, _this.state), { customHeaderCount: i3, monthDate, changeMonth: _this.changeMonth, changeYear: _this.changeYear, decreaseMonth: _this.decreaseMonth, increaseMonth: _this.increaseMonth, decreaseYear: _this.decreaseYear, increaseYear: _this.increaseYear, prevMonthButtonDisabled, nextMonthButtonDisabled, prevYearButtonDisabled, nextYearButtonDisabled })),
|
|
25078
|
-
showDayNames &&
|
|
25321
|
+
showDayNames && React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25079
25322
|
);
|
|
25080
25323
|
};
|
|
25081
25324
|
_this.renderYearHeader = function(_a2) {
|
|
25082
25325
|
var monthDate = _a2.monthDate;
|
|
25083
25326
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
25084
25327
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
25085
|
-
return
|
|
25328
|
+
return React10.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
25086
25329
|
};
|
|
25087
25330
|
_this.renderHeader = function(_a2) {
|
|
25088
25331
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -25112,13 +25355,13 @@ var Calendar = (
|
|
|
25112
25355
|
var monthKey = "month-".concat(i3);
|
|
25113
25356
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
25114
25357
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
25115
|
-
monthList.push(
|
|
25358
|
+
monthList.push(React10.createElement(
|
|
25116
25359
|
"div",
|
|
25117
25360
|
{ key: monthKey, ref: function(div) {
|
|
25118
25361
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
25119
25362
|
}, className: "react-datepicker__month-container" },
|
|
25120
25363
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
25121
|
-
|
|
25364
|
+
React10.createElement(Month, _assign({}, Calendar2.defaultProps, _this.props, { containerRef: _this.containerRef, ariaLabelPrefix: _this.props.monthAriaLabelPrefix, day: monthDate, onDayClick: _this.handleDayClick, handleOnKeyDown: _this.props.handleOnDayKeyDown, handleOnMonthKeyDown: _this.props.handleOnKeyDown, onDayMouseEnter: _this.handleDayMouseEnter, onMouseLeave: _this.handleMonthMouseLeave, orderInDisplay: i3, selectingDate: _this.state.selectingDate, monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart }))
|
|
25122
25365
|
));
|
|
25123
25366
|
}
|
|
25124
25367
|
return monthList;
|
|
@@ -25128,18 +25371,18 @@ var Calendar = (
|
|
|
25128
25371
|
return;
|
|
25129
25372
|
}
|
|
25130
25373
|
if (_this.props.showYearPicker) {
|
|
25131
|
-
return
|
|
25374
|
+
return React10.createElement(
|
|
25132
25375
|
"div",
|
|
25133
25376
|
{ className: "react-datepicker__year--container" },
|
|
25134
25377
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
25135
|
-
|
|
25378
|
+
React10.createElement(Year, _assign({}, Calendar2.defaultProps, _this.props, { selectingDate: _this.state.selectingDate, date: _this.state.date, onDayClick: _this.handleDayClick, clearSelectingDate: _this.clearSelectingDate, onYearMouseEnter: _this.handleYearMouseEnter, onYearMouseLeave: _this.handleYearMouseLeave }))
|
|
25136
25379
|
);
|
|
25137
25380
|
}
|
|
25138
25381
|
return;
|
|
25139
25382
|
};
|
|
25140
25383
|
_this.renderTimeSection = function() {
|
|
25141
25384
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
25142
|
-
return
|
|
25385
|
+
return React10.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
25143
25386
|
}
|
|
25144
25387
|
return;
|
|
25145
25388
|
};
|
|
@@ -25148,7 +25391,7 @@ var Calendar = (
|
|
|
25148
25391
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
25149
25392
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
25150
25393
|
if (_this.props.showTimeInput) {
|
|
25151
|
-
return
|
|
25394
|
+
return React10.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
25152
25395
|
}
|
|
25153
25396
|
return;
|
|
25154
25397
|
};
|
|
@@ -25163,11 +25406,11 @@ var Calendar = (
|
|
|
25163
25406
|
} else {
|
|
25164
25407
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
25165
25408
|
}
|
|
25166
|
-
return
|
|
25409
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
25167
25410
|
};
|
|
25168
25411
|
_this.renderChildren = function() {
|
|
25169
25412
|
if (_this.props.children) {
|
|
25170
|
-
return
|
|
25413
|
+
return React10.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
25171
25414
|
}
|
|
25172
25415
|
return;
|
|
25173
25416
|
};
|
|
@@ -25221,13 +25464,13 @@ var Calendar = (
|
|
|
25221
25464
|
};
|
|
25222
25465
|
Calendar2.prototype.render = function() {
|
|
25223
25466
|
var Container = this.props.container || CalendarContainer;
|
|
25224
|
-
return
|
|
25467
|
+
return React10.createElement(
|
|
25225
25468
|
ClickOutsideWrapper,
|
|
25226
25469
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
25227
|
-
|
|
25470
|
+
React10.createElement(
|
|
25228
25471
|
"div",
|
|
25229
25472
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
25230
|
-
|
|
25473
|
+
React10.createElement(
|
|
25231
25474
|
Container,
|
|
25232
25475
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
25233
25476
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -25252,11 +25495,11 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25252
25495
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
25253
25496
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
25254
25497
|
if (typeof icon === "string") {
|
|
25255
|
-
return
|
|
25498
|
+
return React10.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
25256
25499
|
}
|
|
25257
|
-
if (
|
|
25500
|
+
if (React10.isValidElement(icon)) {
|
|
25258
25501
|
var iconElement_1 = icon;
|
|
25259
|
-
return
|
|
25502
|
+
return React10.cloneElement(iconElement_1, {
|
|
25260
25503
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
25261
25504
|
onClick: function(event) {
|
|
25262
25505
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -25268,10 +25511,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25268
25511
|
}
|
|
25269
25512
|
});
|
|
25270
25513
|
}
|
|
25271
|
-
return
|
|
25514
|
+
return React10.createElement(
|
|
25272
25515
|
"svg",
|
|
25273
25516
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
25274
|
-
|
|
25517
|
+
React10.createElement("path", { d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z" })
|
|
25275
25518
|
);
|
|
25276
25519
|
};
|
|
25277
25520
|
var Portal = (
|
|
@@ -25337,12 +25580,12 @@ var TabLoop = (
|
|
|
25337
25580
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
25338
25581
|
return this.props.children;
|
|
25339
25582
|
}
|
|
25340
|
-
return
|
|
25583
|
+
return React10.createElement(
|
|
25341
25584
|
"div",
|
|
25342
25585
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
25343
|
-
|
|
25586
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
25344
25587
|
this.props.children,
|
|
25345
|
-
|
|
25588
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
25346
25589
|
);
|
|
25347
25590
|
};
|
|
25348
25591
|
TabLoop2.defaultProps = {
|
|
@@ -25362,7 +25605,7 @@ function withFloating(Component3) {
|
|
|
25362
25605
|
arrow3({ element: arrowRef })
|
|
25363
25606
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
25364
25607
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
25365
|
-
return
|
|
25608
|
+
return React10.createElement(Component3, _assign({}, componentProps));
|
|
25366
25609
|
};
|
|
25367
25610
|
return WithFloating;
|
|
25368
25611
|
}
|
|
@@ -25387,14 +25630,14 @@ var PopperComponent = (
|
|
|
25387
25630
|
var popper = void 0;
|
|
25388
25631
|
if (!hidePopper) {
|
|
25389
25632
|
var classes = clsx("react-datepicker-popper", className);
|
|
25390
|
-
popper =
|
|
25633
|
+
popper = React10.createElement(
|
|
25391
25634
|
TabLoop,
|
|
25392
25635
|
{ enableTabLoop },
|
|
25393
|
-
|
|
25636
|
+
React10.createElement(
|
|
25394
25637
|
"div",
|
|
25395
25638
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
25396
25639
|
popperComponent,
|
|
25397
|
-
showArrow &&
|
|
25640
|
+
showArrow && React10.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
25398
25641
|
)
|
|
25399
25642
|
);
|
|
25400
25643
|
}
|
|
@@ -25402,13 +25645,13 @@ var PopperComponent = (
|
|
|
25402
25645
|
popper = createElement5(this.props.popperContainer, {}, popper);
|
|
25403
25646
|
}
|
|
25404
25647
|
if (portalId && !hidePopper) {
|
|
25405
|
-
popper =
|
|
25648
|
+
popper = React10.createElement(Portal, { portalId, portalHost }, popper);
|
|
25406
25649
|
}
|
|
25407
25650
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
25408
|
-
return
|
|
25409
|
-
|
|
25651
|
+
return React10.createElement(
|
|
25652
|
+
React10.Fragment,
|
|
25410
25653
|
null,
|
|
25411
|
-
|
|
25654
|
+
React10.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
25412
25655
|
popper
|
|
25413
25656
|
);
|
|
25414
25657
|
};
|
|
@@ -26027,7 +26270,7 @@ var DatePicker = (
|
|
|
26027
26270
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
26028
26271
|
return null;
|
|
26029
26272
|
}
|
|
26030
|
-
return
|
|
26273
|
+
return React10.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
26031
26274
|
_this.calendar = elem;
|
|
26032
26275
|
} }, _this.props, _this.state, { setOpen: _this.setOpen, dateFormat: (_a2 = _this.props.dateFormatCalendar) !== null && _a2 !== void 0 ? _a2 : DatePicker2.defaultProps.dateFormatCalendar, onSelect: _this.handleSelect, onClickOutside: _this.handleCalendarClickOutside, holidays: getHolidaysMap(_this.modifyHolidays()), outsideClickIgnoreClass, onDropdownFocus: _this.handleDropdownFocus, onTimeChange: _this.handleTimeChange, className: _this.props.calendarClassName, container: _this.props.calendarContainer, handleOnKeyDown: _this.props.onKeyDown, handleOnDayKeyDown: _this.onDayKeyDown, setPreSelection: _this.setPreSelection, dropdownMode: (_b = _this.props.dropdownMode) !== null && _b !== void 0 ? _b : DatePicker2.defaultProps.dropdownMode }), _this.props.children);
|
|
26033
26276
|
};
|
|
@@ -26063,13 +26306,13 @@ var DatePicker = (
|
|
|
26063
26306
|
}));
|
|
26064
26307
|
}
|
|
26065
26308
|
}
|
|
26066
|
-
return
|
|
26309
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
26067
26310
|
};
|
|
26068
26311
|
_this.renderDateInput = function() {
|
|
26069
26312
|
var _a2, _b;
|
|
26070
26313
|
var _c;
|
|
26071
26314
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
26072
|
-
var customInput = _this.props.customInput ||
|
|
26315
|
+
var customInput = _this.props.customInput || React10.createElement("input", { type: "text" });
|
|
26073
26316
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
26074
26317
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
26075
26318
|
var inputValue = typeof _this.props.value === "string" ? _this.props.value : typeof _this.state.inputValue === "string" ? _this.state.inputValue : _this.props.selectsRange ? safeDateRangeFormat(_this.props.startDate, _this.props.endDate, {
|
|
@@ -26089,7 +26332,7 @@ var DatePicker = (
|
|
|
26089
26332
|
_this.renderClearButton = function() {
|
|
26090
26333
|
var _a2 = _this.props, isClearable = _a2.isClearable, disabled = _a2.disabled, selected = _a2.selected, startDate = _a2.startDate, endDate = _a2.endDate, clearButtonTitle = _a2.clearButtonTitle, _b = _a2.clearButtonClassName, clearButtonClassName = _b === void 0 ? "" : _b, _c = _a2.ariaLabelClose, ariaLabelClose = _c === void 0 ? "Close" : _c, selectedDates = _a2.selectedDates, readOnly = _a2.readOnly;
|
|
26091
26334
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
26092
|
-
return
|
|
26335
|
+
return React10.createElement("button", { type: "button", className: clsx("react-datepicker__close-icon", clearButtonClassName, { "react-datepicker__close-icon--disabled": disabled }), disabled, "aria-label": ariaLabelClose, onClick: _this.onClearClick, title: clearButtonTitle, tabIndex: -1 });
|
|
26093
26336
|
} else {
|
|
26094
26337
|
return null;
|
|
26095
26338
|
}
|
|
@@ -26190,10 +26433,10 @@ var DatePicker = (
|
|
|
26190
26433
|
if (calendarIconClassname) {
|
|
26191
26434
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
26192
26435
|
}
|
|
26193
|
-
return
|
|
26436
|
+
return React10.createElement(
|
|
26194
26437
|
"div",
|
|
26195
26438
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
26196
|
-
showIcon &&
|
|
26439
|
+
showIcon && React10.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
26197
26440
|
onClick: this.toggleCalendar
|
|
26198
26441
|
} : null)),
|
|
26199
26442
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -26206,22 +26449,22 @@ var DatePicker = (
|
|
|
26206
26449
|
if (this.props.inline)
|
|
26207
26450
|
return calendar;
|
|
26208
26451
|
if (this.props.withPortal) {
|
|
26209
|
-
var portalContainer = this.state.open ?
|
|
26452
|
+
var portalContainer = this.state.open ? React10.createElement(
|
|
26210
26453
|
TabLoop,
|
|
26211
26454
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
26212
|
-
|
|
26455
|
+
React10.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
26213
26456
|
) : null;
|
|
26214
26457
|
if (this.state.open && this.props.portalId) {
|
|
26215
|
-
portalContainer =
|
|
26458
|
+
portalContainer = React10.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
26216
26459
|
}
|
|
26217
|
-
return
|
|
26460
|
+
return React10.createElement(
|
|
26218
26461
|
"div",
|
|
26219
26462
|
null,
|
|
26220
26463
|
this.renderInputContainer(),
|
|
26221
26464
|
portalContainer
|
|
26222
26465
|
);
|
|
26223
26466
|
}
|
|
26224
|
-
return
|
|
26467
|
+
return React10.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
26225
26468
|
};
|
|
26226
26469
|
return DatePicker2;
|
|
26227
26470
|
}(Component)
|
|
@@ -26367,13 +26610,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26367
26610
|
}
|
|
26368
26611
|
|
|
26369
26612
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26370
|
-
import { useState as
|
|
26613
|
+
import { useState as useState15, useCallback as useCallback6 } from "react";
|
|
26371
26614
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26372
26615
|
function useStateManager(_ref3) {
|
|
26373
26616
|
var _ref$defaultInputValu = _ref3.defaultInputValue, defaultInputValue = _ref$defaultInputValu === void 0 ? "" : _ref$defaultInputValu, _ref$defaultMenuIsOpe = _ref3.defaultMenuIsOpen, defaultMenuIsOpen = _ref$defaultMenuIsOpe === void 0 ? false : _ref$defaultMenuIsOpe, _ref$defaultValue = _ref3.defaultValue, defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue, propsInputValue = _ref3.inputValue, propsMenuIsOpen = _ref3.menuIsOpen, propsOnChange = _ref3.onChange, propsOnInputChange = _ref3.onInputChange, propsOnMenuClose = _ref3.onMenuClose, propsOnMenuOpen = _ref3.onMenuOpen, propsValue = _ref3.value, restSelectProps = _objectWithoutProperties(_ref3, _excluded);
|
|
26374
|
-
var _useState =
|
|
26375
|
-
var _useState3 =
|
|
26376
|
-
var _useState5 =
|
|
26617
|
+
var _useState = useState15(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26618
|
+
var _useState3 = useState15(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26619
|
+
var _useState5 = useState15(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26377
26620
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
26378
26621
|
if (typeof propsOnChange === "function") {
|
|
26379
26622
|
propsOnChange(value2, actionMeta);
|
|
@@ -26425,8 +26668,8 @@ function _extends() {
|
|
|
26425
26668
|
}
|
|
26426
26669
|
|
|
26427
26670
|
// node_modules/react-select/dist/react-select.esm.js
|
|
26428
|
-
import * as
|
|
26429
|
-
import { forwardRef as forwardRef5, useMemo as
|
|
26671
|
+
import * as React15 from "react";
|
|
26672
|
+
import { forwardRef as forwardRef5, useMemo as useMemo10 } from "react";
|
|
26430
26673
|
|
|
26431
26674
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
26432
26675
|
function _classCallCheck(a2, n4) {
|
|
@@ -26533,11 +26776,11 @@ function _toConsumableArray(r4) {
|
|
|
26533
26776
|
}
|
|
26534
26777
|
|
|
26535
26778
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26536
|
-
import * as
|
|
26537
|
-
import { useMemo as
|
|
26779
|
+
import * as React14 from "react";
|
|
26780
|
+
import { useMemo as useMemo9, Fragment as Fragment23, useRef as useRef13, useCallback as useCallback8, useEffect as useEffect17, Component as Component2 } from "react";
|
|
26538
26781
|
|
|
26539
26782
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26540
|
-
import * as
|
|
26783
|
+
import * as React12 from "react";
|
|
26541
26784
|
import { useContext as useContext7, forwardRef as forwardRef4 } from "react";
|
|
26542
26785
|
|
|
26543
26786
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
@@ -27702,18 +27945,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27702
27945
|
}
|
|
27703
27946
|
|
|
27704
27947
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27705
|
-
import * as
|
|
27948
|
+
import * as React11 from "react";
|
|
27706
27949
|
var isBrowser3 = typeof document !== "undefined";
|
|
27707
27950
|
var syncFallback = function syncFallback2(create) {
|
|
27708
27951
|
return create();
|
|
27709
27952
|
};
|
|
27710
|
-
var useInsertionEffect3 =
|
|
27953
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27711
27954
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27712
27955
|
|
|
27713
27956
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27714
27957
|
var isDevelopment3 = false;
|
|
27715
27958
|
var isBrowser4 = typeof document !== "undefined";
|
|
27716
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
27959
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27717
27960
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27718
27961
|
// because this module is primarily intended for the browser and node
|
|
27719
27962
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27739,7 +27982,7 @@ if (!isBrowser4) {
|
|
|
27739
27982
|
cache = createCache({
|
|
27740
27983
|
key: "css"
|
|
27741
27984
|
});
|
|
27742
|
-
return /* @__PURE__ */
|
|
27985
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27743
27986
|
value: cache
|
|
27744
27987
|
}, func(props, cache));
|
|
27745
27988
|
} else {
|
|
@@ -27748,7 +27991,7 @@ if (!isBrowser4) {
|
|
|
27748
27991
|
};
|
|
27749
27992
|
};
|
|
27750
27993
|
}
|
|
27751
|
-
var ThemeContext = /* @__PURE__ */
|
|
27994
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27752
27995
|
var hasOwn = {}.hasOwnProperty;
|
|
27753
27996
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27754
27997
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27775,7 +28018,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27775
28018
|
serializedNames += " " + next2.name;
|
|
27776
28019
|
next2 = next2.next;
|
|
27777
28020
|
}
|
|
27778
|
-
return /* @__PURE__ */
|
|
28021
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27779
28022
|
__html: rules
|
|
27780
28023
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27781
28024
|
}
|
|
@@ -27794,7 +28037,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27794
28037
|
} else if (props.className != null) {
|
|
27795
28038
|
className = props.className + " ";
|
|
27796
28039
|
}
|
|
27797
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
28040
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27798
28041
|
className += cache.key + "-" + serialized.name;
|
|
27799
28042
|
var newProps = {};
|
|
27800
28043
|
for (var _key2 in props) {
|
|
@@ -27806,22 +28049,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27806
28049
|
if (ref) {
|
|
27807
28050
|
newProps.ref = ref;
|
|
27808
28051
|
}
|
|
27809
|
-
return /* @__PURE__ */
|
|
28052
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27810
28053
|
cache,
|
|
27811
28054
|
serialized,
|
|
27812
28055
|
isStringTag: typeof WrappedComponent === "string"
|
|
27813
|
-
}), /* @__PURE__ */
|
|
28056
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27814
28057
|
});
|
|
27815
28058
|
var Emotion$1 = Emotion;
|
|
27816
28059
|
|
|
27817
28060
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27818
|
-
import * as
|
|
28061
|
+
import * as React13 from "react";
|
|
27819
28062
|
var import_extends2 = __toESM(require_extends());
|
|
27820
28063
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27821
|
-
var
|
|
28064
|
+
var jsx86 = function jsx87(type, props) {
|
|
27822
28065
|
var args = arguments;
|
|
27823
28066
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27824
|
-
return
|
|
28067
|
+
return React13.createElement.apply(void 0, args);
|
|
27825
28068
|
}
|
|
27826
28069
|
var argsLength = args.length;
|
|
27827
28070
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27830,13 +28073,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27830
28073
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27831
28074
|
createElementArgArray[i3] = args[i3];
|
|
27832
28075
|
}
|
|
27833
|
-
return
|
|
28076
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27834
28077
|
};
|
|
27835
28078
|
(function(_jsx) {
|
|
27836
28079
|
var JSX;
|
|
27837
28080
|
/* @__PURE__ */ (function(_JSX) {
|
|
27838
28081
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27839
|
-
})(
|
|
28082
|
+
})(jsx86 || (jsx86 = {}));
|
|
27840
28083
|
function css() {
|
|
27841
28084
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27842
28085
|
args[_key] = arguments[_key];
|
|
@@ -27866,7 +28109,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27866
28109
|
}
|
|
27867
28110
|
|
|
27868
28111
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27869
|
-
import { useContext as useContext9, useRef as useRef12, useState as
|
|
28112
|
+
import { useContext as useContext9, useRef as useRef12, useState as useState16, useMemo as useMemo8, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
27870
28113
|
import { createPortal as createPortal4 } from "react-dom";
|
|
27871
28114
|
|
|
27872
28115
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
@@ -28213,8 +28456,8 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28213
28456
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28214
28457
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28215
28458
|
var ref = useRef12(null);
|
|
28216
|
-
var _useState =
|
|
28217
|
-
var _useState3 =
|
|
28459
|
+
var _useState = useState16(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28460
|
+
var _useState3 = useState16(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28218
28461
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28219
28462
|
index3(function() {
|
|
28220
28463
|
var menuEl = ref.current;
|
|
@@ -28244,7 +28487,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28244
28487
|
};
|
|
28245
28488
|
var Menu = function Menu2(props) {
|
|
28246
28489
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28247
|
-
return
|
|
28490
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
28248
28491
|
menu: true
|
|
28249
28492
|
}), {
|
|
28250
28493
|
ref: innerRef
|
|
@@ -28266,7 +28509,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28266
28509
|
};
|
|
28267
28510
|
var MenuList = function MenuList2(props) {
|
|
28268
28511
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28269
|
-
return
|
|
28512
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28270
28513
|
"menu-list": true,
|
|
28271
28514
|
"menu-list--is-multi": isMulti
|
|
28272
28515
|
}), {
|
|
@@ -28286,7 +28529,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28286
28529
|
var loadingMessageCSS = noticeCSS;
|
|
28287
28530
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28288
28531
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28289
|
-
return
|
|
28532
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28290
28533
|
children,
|
|
28291
28534
|
innerProps
|
|
28292
28535
|
}), "noOptionsMessage", {
|
|
@@ -28296,7 +28539,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28296
28539
|
};
|
|
28297
28540
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28298
28541
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28299
|
-
return
|
|
28542
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28300
28543
|
children,
|
|
28301
28544
|
innerProps
|
|
28302
28545
|
}), "loadingMessage", {
|
|
@@ -28318,13 +28561,13 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28318
28561
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28319
28562
|
var menuPortalRef = useRef12(null);
|
|
28320
28563
|
var cleanupRef = useRef12(null);
|
|
28321
|
-
var _useState5 =
|
|
28322
|
-
var portalPlacementContext =
|
|
28564
|
+
var _useState5 = useState16(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28565
|
+
var portalPlacementContext = useMemo8(function() {
|
|
28323
28566
|
return {
|
|
28324
28567
|
setPortalPlacement
|
|
28325
28568
|
};
|
|
28326
28569
|
}, []);
|
|
28327
|
-
var _useState7 =
|
|
28570
|
+
var _useState7 = useState16(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28328
28571
|
var updateComputedPosition = useCallback7(function() {
|
|
28329
28572
|
if (!controlElement) return;
|
|
28330
28573
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -28359,7 +28602,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28359
28602
|
runAutoUpdate();
|
|
28360
28603
|
}, [runAutoUpdate]);
|
|
28361
28604
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28362
|
-
var menuWrapper =
|
|
28605
|
+
var menuWrapper = jsx86("div", _extends({
|
|
28363
28606
|
ref: setMenuPortalElement
|
|
28364
28607
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28365
28608
|
offset: computedPosition.offset,
|
|
@@ -28368,7 +28611,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28368
28611
|
}), "menuPortal", {
|
|
28369
28612
|
"menu-portal": true
|
|
28370
28613
|
}), innerProps), children);
|
|
28371
|
-
return
|
|
28614
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
28372
28615
|
value: portalPlacementContext
|
|
28373
28616
|
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
28374
28617
|
};
|
|
@@ -28384,7 +28627,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28384
28627
|
};
|
|
28385
28628
|
var SelectContainer = function SelectContainer2(props) {
|
|
28386
28629
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28387
|
-
return
|
|
28630
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
28388
28631
|
"--is-disabled": isDisabled,
|
|
28389
28632
|
"--is-rtl": isRtl
|
|
28390
28633
|
}), innerProps), children);
|
|
@@ -28405,7 +28648,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28405
28648
|
};
|
|
28406
28649
|
var ValueContainer = function ValueContainer2(props) {
|
|
28407
28650
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28408
|
-
return
|
|
28651
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28409
28652
|
"value-container": true,
|
|
28410
28653
|
"value-container--is-multi": isMulti,
|
|
28411
28654
|
"value-container--has-value": hasValue
|
|
@@ -28421,7 +28664,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28421
28664
|
};
|
|
28422
28665
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28423
28666
|
var children = props.children, innerProps = props.innerProps;
|
|
28424
|
-
return
|
|
28667
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28425
28668
|
indicators: true
|
|
28426
28669
|
}), innerProps), children);
|
|
28427
28670
|
};
|
|
@@ -28442,7 +28685,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28442
28685
|
};
|
|
28443
28686
|
var Svg = function Svg2(_ref3) {
|
|
28444
28687
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28445
|
-
return
|
|
28688
|
+
return jsx86("svg", _extends({
|
|
28446
28689
|
height: size4,
|
|
28447
28690
|
width: size4,
|
|
28448
28691
|
viewBox: "0 0 20 20",
|
|
@@ -28452,16 +28695,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28452
28695
|
}, props));
|
|
28453
28696
|
};
|
|
28454
28697
|
var CrossIcon = function CrossIcon2(props) {
|
|
28455
|
-
return
|
|
28698
|
+
return jsx86(Svg, _extends({
|
|
28456
28699
|
size: 20
|
|
28457
|
-
}, props),
|
|
28700
|
+
}, props), jsx86("path", {
|
|
28458
28701
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
28459
28702
|
}));
|
|
28460
28703
|
};
|
|
28461
28704
|
var DownChevron = function DownChevron2(props) {
|
|
28462
|
-
return
|
|
28705
|
+
return jsx86(Svg, _extends({
|
|
28463
28706
|
size: 20
|
|
28464
|
-
}, props),
|
|
28707
|
+
}, props), jsx86("path", {
|
|
28465
28708
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
28466
28709
|
}));
|
|
28467
28710
|
};
|
|
@@ -28482,18 +28725,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28482
28725
|
var dropdownIndicatorCSS = baseCSS;
|
|
28483
28726
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28484
28727
|
var children = props.children, innerProps = props.innerProps;
|
|
28485
|
-
return
|
|
28728
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28486
28729
|
indicator: true,
|
|
28487
28730
|
"dropdown-indicator": true
|
|
28488
|
-
}), innerProps), children ||
|
|
28731
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
28489
28732
|
};
|
|
28490
28733
|
var clearIndicatorCSS = baseCSS;
|
|
28491
28734
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28492
28735
|
var children = props.children, innerProps = props.innerProps;
|
|
28493
|
-
return
|
|
28736
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28494
28737
|
indicator: true,
|
|
28495
28738
|
"clear-indicator": true
|
|
28496
|
-
}), innerProps), children ||
|
|
28739
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
28497
28740
|
};
|
|
28498
28741
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28499
28742
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28509,7 +28752,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28509
28752
|
};
|
|
28510
28753
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28511
28754
|
var innerProps = props.innerProps;
|
|
28512
|
-
return
|
|
28755
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28513
28756
|
"indicator-separator": true
|
|
28514
28757
|
})));
|
|
28515
28758
|
};
|
|
@@ -28533,7 +28776,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28533
28776
|
};
|
|
28534
28777
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28535
28778
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28536
|
-
return
|
|
28779
|
+
return jsx86("span", {
|
|
28537
28780
|
css: /* @__PURE__ */ css({
|
|
28538
28781
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28539
28782
|
backgroundColor: "currentColor",
|
|
@@ -28548,20 +28791,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28548
28791
|
};
|
|
28549
28792
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28550
28793
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28551
|
-
return
|
|
28794
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28552
28795
|
innerProps,
|
|
28553
28796
|
isRtl,
|
|
28554
28797
|
size: size4
|
|
28555
28798
|
}), "loadingIndicator", {
|
|
28556
28799
|
indicator: true,
|
|
28557
28800
|
"loading-indicator": true
|
|
28558
|
-
}), innerProps),
|
|
28801
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
28559
28802
|
delay: 0,
|
|
28560
28803
|
offset: isRtl
|
|
28561
|
-
}),
|
|
28804
|
+
}), jsx86(LoadingDot, {
|
|
28562
28805
|
delay: 160,
|
|
28563
28806
|
offset: true
|
|
28564
|
-
}),
|
|
28807
|
+
}), jsx86(LoadingDot, {
|
|
28565
28808
|
delay: 320,
|
|
28566
28809
|
offset: !isRtl
|
|
28567
28810
|
}));
|
|
@@ -28593,7 +28836,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28593
28836
|
};
|
|
28594
28837
|
var Control = function Control2(props) {
|
|
28595
28838
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28596
|
-
return
|
|
28839
|
+
return jsx86("div", _extends({
|
|
28597
28840
|
ref: innerRef
|
|
28598
28841
|
}, getStyleProps(props, "control", {
|
|
28599
28842
|
control: true,
|
|
@@ -28615,15 +28858,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28615
28858
|
};
|
|
28616
28859
|
var Group = function Group2(props) {
|
|
28617
28860
|
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames = props.getClassNames, Heading = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
28618
|
-
return
|
|
28861
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
28619
28862
|
group: true
|
|
28620
|
-
}), innerProps),
|
|
28863
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
28621
28864
|
selectProps,
|
|
28622
28865
|
theme,
|
|
28623
28866
|
getStyles,
|
|
28624
28867
|
getClassNames,
|
|
28625
28868
|
cx
|
|
28626
|
-
}), label),
|
|
28869
|
+
}), label), jsx86("div", null, children));
|
|
28627
28870
|
};
|
|
28628
28871
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28629
28872
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28645,7 +28888,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28645
28888
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28646
28889
|
_cleanCommonProps.data;
|
|
28647
28890
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28648
|
-
return
|
|
28891
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28649
28892
|
"group-heading": true
|
|
28650
28893
|
}), innerProps));
|
|
28651
28894
|
};
|
|
@@ -28697,11 +28940,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28697
28940
|
var Input = function Input2(props) {
|
|
28698
28941
|
var cx = props.cx, value = props.value;
|
|
28699
28942
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28700
|
-
return
|
|
28943
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28701
28944
|
"input-container": true
|
|
28702
28945
|
}), {
|
|
28703
28946
|
"data-value": value || ""
|
|
28704
|
-
}),
|
|
28947
|
+
}), jsx86("input", _extends({
|
|
28705
28948
|
className: cx({
|
|
28706
28949
|
input: true
|
|
28707
28950
|
}, inputClassName),
|
|
@@ -28755,35 +28998,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28755
28998
|
};
|
|
28756
28999
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28757
29000
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28758
|
-
return
|
|
29001
|
+
return jsx86("div", innerProps, children);
|
|
28759
29002
|
};
|
|
28760
29003
|
var MultiValueContainer = MultiValueGeneric;
|
|
28761
29004
|
var MultiValueLabel = MultiValueGeneric;
|
|
28762
29005
|
function MultiValueRemove(_ref5) {
|
|
28763
29006
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28764
|
-
return
|
|
29007
|
+
return jsx86("div", _extends({
|
|
28765
29008
|
role: "button"
|
|
28766
|
-
}, innerProps), children ||
|
|
29009
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28767
29010
|
size: 14
|
|
28768
29011
|
}));
|
|
28769
29012
|
}
|
|
28770
29013
|
var MultiValue = function MultiValue2(props) {
|
|
28771
29014
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28772
29015
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28773
|
-
return
|
|
29016
|
+
return jsx86(Container, {
|
|
28774
29017
|
data,
|
|
28775
29018
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28776
29019
|
"multi-value": true,
|
|
28777
29020
|
"multi-value--is-disabled": isDisabled
|
|
28778
29021
|
})), innerProps),
|
|
28779
29022
|
selectProps
|
|
28780
|
-
},
|
|
29023
|
+
}, jsx86(Label, {
|
|
28781
29024
|
data,
|
|
28782
29025
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28783
29026
|
"multi-value__label": true
|
|
28784
29027
|
})),
|
|
28785
29028
|
selectProps
|
|
28786
|
-
}, children),
|
|
29029
|
+
}, children), jsx86(Remove, {
|
|
28787
29030
|
data,
|
|
28788
29031
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28789
29032
|
"multi-value__remove": true
|
|
@@ -28816,7 +29059,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28816
29059
|
};
|
|
28817
29060
|
var Option = function Option2(props) {
|
|
28818
29061
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28819
|
-
return
|
|
29062
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28820
29063
|
option: true,
|
|
28821
29064
|
"option--is-disabled": isDisabled,
|
|
28822
29065
|
"option--is-focused": isFocused,
|
|
@@ -28840,7 +29083,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28840
29083
|
};
|
|
28841
29084
|
var Placeholder = function Placeholder2(props) {
|
|
28842
29085
|
var children = props.children, innerProps = props.innerProps;
|
|
28843
|
-
return
|
|
29086
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28844
29087
|
placeholder: true
|
|
28845
29088
|
}), innerProps), children);
|
|
28846
29089
|
};
|
|
@@ -28862,7 +29105,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28862
29105
|
};
|
|
28863
29106
|
var SingleValue = function SingleValue2(props) {
|
|
28864
29107
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28865
|
-
return
|
|
29108
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28866
29109
|
"single-value": true,
|
|
28867
29110
|
"single-value--is-disabled": isDisabled
|
|
28868
29111
|
}), innerProps), children);
|
|
@@ -28964,7 +29207,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28964
29207
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28965
29208
|
};
|
|
28966
29209
|
var A11yText = function A11yText2(props) {
|
|
28967
|
-
return
|
|
29210
|
+
return jsx86("span", _extends({
|
|
28968
29211
|
css: _ref
|
|
28969
29212
|
}, props));
|
|
28970
29213
|
};
|
|
@@ -29025,10 +29268,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29025
29268
|
var ariaLiveMessages = selectProps.ariaLiveMessages, getOptionLabel4 = selectProps.getOptionLabel, inputValue = selectProps.inputValue, isMulti = selectProps.isMulti, isOptionDisabled3 = selectProps.isOptionDisabled, isSearchable = selectProps.isSearchable, menuIsOpen = selectProps.menuIsOpen, options2 = selectProps.options, screenReaderStatus2 = selectProps.screenReaderStatus, tabSelectsValue = selectProps.tabSelectsValue, isLoading = selectProps.isLoading;
|
|
29026
29269
|
var ariaLabel = selectProps["aria-label"];
|
|
29027
29270
|
var ariaLive = selectProps["aria-live"];
|
|
29028
|
-
var messages =
|
|
29271
|
+
var messages = useMemo9(function() {
|
|
29029
29272
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
29030
29273
|
}, [ariaLiveMessages]);
|
|
29031
|
-
var ariaSelected =
|
|
29274
|
+
var ariaSelected = useMemo9(function() {
|
|
29032
29275
|
var message2 = "";
|
|
29033
29276
|
if (ariaSelection && messages.onChange) {
|
|
29034
29277
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -29050,7 +29293,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29050
29293
|
}
|
|
29051
29294
|
return message2;
|
|
29052
29295
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
29053
|
-
var ariaFocused =
|
|
29296
|
+
var ariaFocused = useMemo9(function() {
|
|
29054
29297
|
var focusMsg = "";
|
|
29055
29298
|
var focused = focusedOption || focusedValue;
|
|
29056
29299
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -29069,7 +29312,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29069
29312
|
}
|
|
29070
29313
|
return focusMsg;
|
|
29071
29314
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
29072
|
-
var ariaResults =
|
|
29315
|
+
var ariaResults = useMemo9(function() {
|
|
29073
29316
|
var resultsMsg = "";
|
|
29074
29317
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
29075
29318
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -29083,7 +29326,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29083
29326
|
return resultsMsg;
|
|
29084
29327
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
29085
29328
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
29086
|
-
var ariaGuidance =
|
|
29329
|
+
var ariaGuidance = useMemo9(function() {
|
|
29087
29330
|
var guidanceMsg = "";
|
|
29088
29331
|
if (messages.guidance) {
|
|
29089
29332
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -29099,18 +29342,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29099
29342
|
}
|
|
29100
29343
|
return guidanceMsg;
|
|
29101
29344
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29102
|
-
var ScreenReaderText =
|
|
29345
|
+
var ScreenReaderText = jsx86(Fragment23, null, jsx86("span", {
|
|
29103
29346
|
id: "aria-selection"
|
|
29104
|
-
}, ariaSelected),
|
|
29347
|
+
}, ariaSelected), jsx86("span", {
|
|
29105
29348
|
id: "aria-focused"
|
|
29106
|
-
}, ariaFocused),
|
|
29349
|
+
}, ariaFocused), jsx86("span", {
|
|
29107
29350
|
id: "aria-results"
|
|
29108
|
-
}, ariaResults),
|
|
29351
|
+
}, ariaResults), jsx86("span", {
|
|
29109
29352
|
id: "aria-guidance"
|
|
29110
29353
|
}, ariaGuidance));
|
|
29111
|
-
return
|
|
29354
|
+
return jsx86(Fragment23, null, jsx86(A11yText$1, {
|
|
29112
29355
|
id
|
|
29113
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29356
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
29114
29357
|
"aria-live": ariaLive,
|
|
29115
29358
|
"aria-atomic": "false",
|
|
29116
29359
|
"aria-relevant": "additions text",
|
|
@@ -29423,7 +29666,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29423
29666
|
function DummyInput(_ref3) {
|
|
29424
29667
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29425
29668
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29426
|
-
return
|
|
29669
|
+
return jsx86("input", _extends({
|
|
29427
29670
|
ref: innerRef
|
|
29428
29671
|
}, filteredProps, {
|
|
29429
29672
|
css: /* @__PURE__ */ css({
|
|
@@ -29518,7 +29761,7 @@ function useScrollCapture(_ref3) {
|
|
|
29518
29761
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29519
29762
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29520
29763
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29521
|
-
|
|
29764
|
+
useEffect17(function() {
|
|
29522
29765
|
if (!isEnabled) return;
|
|
29523
29766
|
var element = scrollTarget.current;
|
|
29524
29767
|
startListening(element);
|
|
@@ -29621,7 +29864,7 @@ function useScrollLock(_ref3) {
|
|
|
29621
29864
|
}
|
|
29622
29865
|
}
|
|
29623
29866
|
}, [accountForScrollbars]);
|
|
29624
|
-
|
|
29867
|
+
useEffect17(function() {
|
|
29625
29868
|
if (!isEnabled) return;
|
|
29626
29869
|
var element = scrollTarget.current;
|
|
29627
29870
|
addScrollLock(element);
|
|
@@ -29665,7 +29908,7 @@ function ScrollManager(_ref3) {
|
|
|
29665
29908
|
setScrollCaptureTarget(element);
|
|
29666
29909
|
setScrollLockTarget(element);
|
|
29667
29910
|
};
|
|
29668
|
-
return
|
|
29911
|
+
return jsx86(Fragment23, null, lockEnabled && jsx86("div", {
|
|
29669
29912
|
onClick: blurSelectInput,
|
|
29670
29913
|
css: _ref2$1
|
|
29671
29914
|
}), children(targetRef));
|
|
@@ -29684,7 +29927,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29684
29927
|
};
|
|
29685
29928
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29686
29929
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29687
|
-
return
|
|
29930
|
+
return jsx86("input", {
|
|
29688
29931
|
required: true,
|
|
29689
29932
|
name: name2,
|
|
29690
29933
|
tabIndex: -1,
|
|
@@ -30825,7 +31068,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30825
31068
|
"aria-describedby": this.getElementId("placeholder")
|
|
30826
31069
|
});
|
|
30827
31070
|
if (!isSearchable) {
|
|
30828
|
-
return /* @__PURE__ */
|
|
31071
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30829
31072
|
id,
|
|
30830
31073
|
innerRef: this.getInputRef,
|
|
30831
31074
|
onBlur: this.onInputBlur,
|
|
@@ -30838,7 +31081,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30838
31081
|
value: ""
|
|
30839
31082
|
}, ariaAttributes));
|
|
30840
31083
|
}
|
|
30841
|
-
return /* @__PURE__ */
|
|
31084
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30842
31085
|
autoCapitalize: "none",
|
|
30843
31086
|
autoComplete: "off",
|
|
30844
31087
|
autoCorrect: "off",
|
|
@@ -30866,7 +31109,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30866
31109
|
var _this$props9 = this.props, controlShouldRenderValue = _this$props9.controlShouldRenderValue, isDisabled = _this$props9.isDisabled, isMulti = _this$props9.isMulti, inputValue = _this$props9.inputValue, placeholder = _this$props9.placeholder;
|
|
30867
31110
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30868
31111
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30869
|
-
return inputValue ? null : /* @__PURE__ */
|
|
31112
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30870
31113
|
key: "placeholder",
|
|
30871
31114
|
isDisabled,
|
|
30872
31115
|
isFocused,
|
|
@@ -30879,7 +31122,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30879
31122
|
return selectValue.map(function(opt, index4) {
|
|
30880
31123
|
var isOptionFocused = opt === focusedValue;
|
|
30881
31124
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
30882
|
-
return /* @__PURE__ */
|
|
31125
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
30883
31126
|
components: {
|
|
30884
31127
|
Container: MultiValueContainer2,
|
|
30885
31128
|
Label: MultiValueLabel2,
|
|
@@ -30908,7 +31151,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30908
31151
|
return null;
|
|
30909
31152
|
}
|
|
30910
31153
|
var singleValue = selectValue[0];
|
|
30911
|
-
return /* @__PURE__ */
|
|
31154
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
30912
31155
|
data: singleValue,
|
|
30913
31156
|
isDisabled
|
|
30914
31157
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -30928,7 +31171,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30928
31171
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
30929
31172
|
"aria-hidden": "true"
|
|
30930
31173
|
};
|
|
30931
|
-
return /* @__PURE__ */
|
|
31174
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
30932
31175
|
innerProps,
|
|
30933
31176
|
isFocused
|
|
30934
31177
|
}));
|
|
@@ -30944,7 +31187,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30944
31187
|
var innerProps = {
|
|
30945
31188
|
"aria-hidden": "true"
|
|
30946
31189
|
};
|
|
30947
|
-
return /* @__PURE__ */
|
|
31190
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
30948
31191
|
innerProps,
|
|
30949
31192
|
isDisabled,
|
|
30950
31193
|
isFocused
|
|
@@ -30958,7 +31201,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30958
31201
|
var commonProps = this.commonProps;
|
|
30959
31202
|
var isDisabled = this.props.isDisabled;
|
|
30960
31203
|
var isFocused = this.state.isFocused;
|
|
30961
|
-
return /* @__PURE__ */
|
|
31204
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
30962
31205
|
isDisabled,
|
|
30963
31206
|
isFocused
|
|
30964
31207
|
}));
|
|
@@ -30976,7 +31219,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30976
31219
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
30977
31220
|
"aria-hidden": "true"
|
|
30978
31221
|
};
|
|
30979
|
-
return /* @__PURE__ */
|
|
31222
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
30980
31223
|
innerProps,
|
|
30981
31224
|
isDisabled,
|
|
30982
31225
|
isFocused
|
|
@@ -31011,7 +31254,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31011
31254
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
31012
31255
|
// is not supported on Apple devices
|
|
31013
31256
|
};
|
|
31014
|
-
return /* @__PURE__ */
|
|
31257
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
31015
31258
|
innerProps,
|
|
31016
31259
|
data,
|
|
31017
31260
|
isDisabled,
|
|
@@ -31031,7 +31274,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31031
31274
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
31032
31275
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
31033
31276
|
var headingId = "".concat(groupId, "-heading");
|
|
31034
|
-
return /* @__PURE__ */
|
|
31277
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
31035
31278
|
key: groupId,
|
|
31036
31279
|
data: _data,
|
|
31037
31280
|
options: options2,
|
|
@@ -31053,13 +31296,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31053
31296
|
inputValue
|
|
31054
31297
|
});
|
|
31055
31298
|
if (message2 === null) return null;
|
|
31056
|
-
menuUI = /* @__PURE__ */
|
|
31299
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
31057
31300
|
} else {
|
|
31058
31301
|
var _message = noOptionsMessage2({
|
|
31059
31302
|
inputValue
|
|
31060
31303
|
});
|
|
31061
31304
|
if (_message === null) return null;
|
|
31062
|
-
menuUI = /* @__PURE__ */
|
|
31305
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
31063
31306
|
}
|
|
31064
31307
|
var menuPlacementProps = {
|
|
31065
31308
|
minMenuHeight,
|
|
@@ -31068,9 +31311,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31068
31311
|
menuPosition,
|
|
31069
31312
|
menuShouldScrollIntoView
|
|
31070
31313
|
};
|
|
31071
|
-
var menuElement = /* @__PURE__ */
|
|
31314
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
31072
31315
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
31073
|
-
return /* @__PURE__ */
|
|
31316
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
31074
31317
|
innerRef: ref,
|
|
31075
31318
|
innerProps: {
|
|
31076
31319
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -31078,13 +31321,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31078
31321
|
},
|
|
31079
31322
|
isLoading,
|
|
31080
31323
|
placement
|
|
31081
|
-
}), /* @__PURE__ */
|
|
31324
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
31082
31325
|
captureEnabled: captureMenuScroll,
|
|
31083
31326
|
onTopArrive: onMenuScrollToTop,
|
|
31084
31327
|
onBottomArrive: onMenuScrollToBottom,
|
|
31085
31328
|
lockEnabled: menuShouldBlockScroll
|
|
31086
31329
|
}, function(scrollTargetRef) {
|
|
31087
|
-
return /* @__PURE__ */
|
|
31330
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
31088
31331
|
innerRef: function innerRef(instance2) {
|
|
31089
31332
|
_this4.getMenuListRef(instance2);
|
|
31090
31333
|
scrollTargetRef(instance2);
|
|
@@ -31100,7 +31343,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31100
31343
|
}), menuUI);
|
|
31101
31344
|
}));
|
|
31102
31345
|
});
|
|
31103
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
31346
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
31104
31347
|
appendTo: menuPortalTarget,
|
|
31105
31348
|
controlElement: this.controlRef,
|
|
31106
31349
|
menuPlacement,
|
|
@@ -31114,7 +31357,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31114
31357
|
var _this$props13 = this.props, delimiter2 = _this$props13.delimiter, isDisabled = _this$props13.isDisabled, isMulti = _this$props13.isMulti, name2 = _this$props13.name, required = _this$props13.required;
|
|
31115
31358
|
var selectValue = this.state.selectValue;
|
|
31116
31359
|
if (required && !this.hasValue() && !isDisabled) {
|
|
31117
|
-
return /* @__PURE__ */
|
|
31360
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
31118
31361
|
name: name2,
|
|
31119
31362
|
onFocus: this.onValueInputFocus
|
|
31120
31363
|
});
|
|
@@ -31125,29 +31368,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31125
31368
|
var value = selectValue.map(function(opt) {
|
|
31126
31369
|
return _this5.getOptionValue(opt);
|
|
31127
31370
|
}).join(delimiter2);
|
|
31128
|
-
return /* @__PURE__ */
|
|
31371
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31129
31372
|
name: name2,
|
|
31130
31373
|
type: "hidden",
|
|
31131
31374
|
value
|
|
31132
31375
|
});
|
|
31133
31376
|
} else {
|
|
31134
31377
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
31135
|
-
return /* @__PURE__ */
|
|
31378
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31136
31379
|
key: "i-".concat(i3),
|
|
31137
31380
|
name: name2,
|
|
31138
31381
|
type: "hidden",
|
|
31139
31382
|
value: _this5.getOptionValue(opt)
|
|
31140
31383
|
});
|
|
31141
|
-
}) : /* @__PURE__ */
|
|
31384
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
31142
31385
|
name: name2,
|
|
31143
31386
|
type: "hidden",
|
|
31144
31387
|
value: ""
|
|
31145
31388
|
});
|
|
31146
|
-
return /* @__PURE__ */
|
|
31389
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
31147
31390
|
}
|
|
31148
31391
|
} else {
|
|
31149
31392
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
31150
|
-
return /* @__PURE__ */
|
|
31393
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31151
31394
|
name: name2,
|
|
31152
31395
|
type: "hidden",
|
|
31153
31396
|
value: _value
|
|
@@ -31160,7 +31403,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31160
31403
|
var commonProps = this.commonProps;
|
|
31161
31404
|
var _this$state6 = this.state, ariaSelection = _this$state6.ariaSelection, focusedOption = _this$state6.focusedOption, focusedValue = _this$state6.focusedValue, isFocused = _this$state6.isFocused, selectValue = _this$state6.selectValue;
|
|
31162
31405
|
var focusableOptions = this.getFocusableOptions();
|
|
31163
|
-
return /* @__PURE__ */
|
|
31406
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
31164
31407
|
id: this.getElementId("live-region"),
|
|
31165
31408
|
ariaSelection,
|
|
31166
31409
|
focusedOption,
|
|
@@ -31178,7 +31421,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31178
31421
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
31179
31422
|
var isFocused = this.state.isFocused;
|
|
31180
31423
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
31181
|
-
return /* @__PURE__ */
|
|
31424
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
31182
31425
|
className,
|
|
31183
31426
|
innerProps: {
|
|
31184
31427
|
id,
|
|
@@ -31186,7 +31429,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31186
31429
|
},
|
|
31187
31430
|
isDisabled,
|
|
31188
31431
|
isFocused
|
|
31189
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
31432
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
31190
31433
|
innerRef: this.getControlRef,
|
|
31191
31434
|
innerProps: {
|
|
31192
31435
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -31195,9 +31438,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31195
31438
|
isDisabled,
|
|
31196
31439
|
isFocused,
|
|
31197
31440
|
menuIsOpen
|
|
31198
|
-
}), /* @__PURE__ */
|
|
31441
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
31199
31442
|
isDisabled
|
|
31200
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
31443
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
31201
31444
|
isDisabled
|
|
31202
31445
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
31203
31446
|
}
|
|
@@ -31266,7 +31509,7 @@ var import_defineProperty3 = __toESM(require_defineProperty());
|
|
|
31266
31509
|
import "react-dom";
|
|
31267
31510
|
var StateManagedSelect = /* @__PURE__ */ forwardRef5(function(props, ref) {
|
|
31268
31511
|
var baseSelectProps = useStateManager(props);
|
|
31269
|
-
return /* @__PURE__ */
|
|
31512
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
31270
31513
|
ref
|
|
31271
31514
|
}, baseSelectProps));
|
|
31272
31515
|
});
|
|
@@ -31274,7 +31517,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31274
31517
|
|
|
31275
31518
|
// src/widgets/basic/date-field/date.tsx
|
|
31276
31519
|
var import_moment2 = __toESM(require_moment());
|
|
31277
|
-
import { Fragment as Fragment24, jsx as
|
|
31520
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31278
31521
|
var DateField = (props) => {
|
|
31279
31522
|
const {
|
|
31280
31523
|
name: name2,
|
|
@@ -31302,8 +31545,8 @@ var DateField = (props) => {
|
|
|
31302
31545
|
} = props;
|
|
31303
31546
|
const { t: t3 } = useI18n();
|
|
31304
31547
|
const InputDateCustom = forwardRef6(
|
|
31305
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
31306
|
-
/* @__PURE__ */
|
|
31548
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs57("label", { className: `flex ${className}`, children: [
|
|
31549
|
+
/* @__PURE__ */ jsx88(
|
|
31307
31550
|
"input",
|
|
31308
31551
|
{
|
|
31309
31552
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31317,13 +31560,13 @@ var DateField = (props) => {
|
|
|
31317
31560
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31318
31561
|
}
|
|
31319
31562
|
),
|
|
31320
|
-
isForm2 && /* @__PURE__ */
|
|
31563
|
+
isForm2 && /* @__PURE__ */ jsx88(CalendarIcon, {})
|
|
31321
31564
|
] })
|
|
31322
31565
|
);
|
|
31323
31566
|
if (!isForm && !isEditTable) {
|
|
31324
|
-
return /* @__PURE__ */
|
|
31567
|
+
return /* @__PURE__ */ jsx88("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31325
31568
|
} else {
|
|
31326
|
-
return /* @__PURE__ */
|
|
31569
|
+
return /* @__PURE__ */ jsx88(
|
|
31327
31570
|
Controller,
|
|
31328
31571
|
{
|
|
31329
31572
|
name: name2 || "",
|
|
@@ -31339,14 +31582,14 @@ var DateField = (props) => {
|
|
|
31339
31582
|
},
|
|
31340
31583
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31341
31584
|
const { setError, clearErrors } = methods;
|
|
31342
|
-
|
|
31585
|
+
useEffect18(() => {
|
|
31343
31586
|
if (value) {
|
|
31344
31587
|
clearErrors(name2);
|
|
31345
31588
|
}
|
|
31346
31589
|
}, [value, clearErrors, name2]);
|
|
31347
31590
|
const selectedDate = !methods ? value && (0, import_moment2.default)(value, formatDateParse).isValid() ? (0, import_moment2.default)(value, formatDateParse).add(7, "hours").toDate() : null : field?.value && (0, import_moment2.default)(field.value, formatDateParse).isValid() ? (0, import_moment2.default)(field.value, formatDateParse).add(7, "hours").toDate() : null;
|
|
31348
|
-
return /* @__PURE__ */
|
|
31349
|
-
/* @__PURE__ */
|
|
31591
|
+
return /* @__PURE__ */ jsxs57(Fragment24, { children: [
|
|
31592
|
+
/* @__PURE__ */ jsx88(
|
|
31350
31593
|
DatePicker,
|
|
31351
31594
|
{
|
|
31352
31595
|
selected: selectedDate,
|
|
@@ -31394,7 +31637,7 @@ var DateField = (props) => {
|
|
|
31394
31637
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31395
31638
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31396
31639
|
showTimeInput: showTime,
|
|
31397
|
-
customInput: /* @__PURE__ */
|
|
31640
|
+
customInput: /* @__PURE__ */ jsx88(
|
|
31398
31641
|
InputDateCustom,
|
|
31399
31642
|
{
|
|
31400
31643
|
isForm,
|
|
@@ -31412,7 +31655,7 @@ var DateField = (props) => {
|
|
|
31412
31655
|
increaseMonth,
|
|
31413
31656
|
prevMonthButtonDisabled,
|
|
31414
31657
|
nextMonthButtonDisabled
|
|
31415
|
-
}) => /* @__PURE__ */
|
|
31658
|
+
}) => /* @__PURE__ */ jsxs57(
|
|
31416
31659
|
"div",
|
|
31417
31660
|
{
|
|
31418
31661
|
style: {
|
|
@@ -31421,7 +31664,7 @@ var DateField = (props) => {
|
|
|
31421
31664
|
justifyContent: "center"
|
|
31422
31665
|
},
|
|
31423
31666
|
children: [
|
|
31424
|
-
/* @__PURE__ */
|
|
31667
|
+
/* @__PURE__ */ jsx88(
|
|
31425
31668
|
"button",
|
|
31426
31669
|
{
|
|
31427
31670
|
onClick: decreaseMonth,
|
|
@@ -31429,7 +31672,7 @@ var DateField = (props) => {
|
|
|
31429
31672
|
children: "<"
|
|
31430
31673
|
}
|
|
31431
31674
|
),
|
|
31432
|
-
/* @__PURE__ */
|
|
31675
|
+
/* @__PURE__ */ jsx88(
|
|
31433
31676
|
StateManagedSelect$1,
|
|
31434
31677
|
{
|
|
31435
31678
|
classNames: {
|
|
@@ -31455,7 +31698,7 @@ var DateField = (props) => {
|
|
|
31455
31698
|
autoFocus: true
|
|
31456
31699
|
}
|
|
31457
31700
|
),
|
|
31458
|
-
/* @__PURE__ */
|
|
31701
|
+
/* @__PURE__ */ jsx88(
|
|
31459
31702
|
StateManagedSelect$1,
|
|
31460
31703
|
{
|
|
31461
31704
|
classNames: {
|
|
@@ -31483,7 +31726,7 @@ var DateField = (props) => {
|
|
|
31483
31726
|
}))
|
|
31484
31727
|
}
|
|
31485
31728
|
),
|
|
31486
|
-
/* @__PURE__ */
|
|
31729
|
+
/* @__PURE__ */ jsx88(
|
|
31487
31730
|
"button",
|
|
31488
31731
|
{
|
|
31489
31732
|
onClick: increaseMonth,
|
|
@@ -31496,7 +31739,7 @@ var DateField = (props) => {
|
|
|
31496
31739
|
)
|
|
31497
31740
|
}
|
|
31498
31741
|
),
|
|
31499
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31742
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx88("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31500
31743
|
] });
|
|
31501
31744
|
}
|
|
31502
31745
|
}
|
|
@@ -31505,26 +31748,26 @@ var DateField = (props) => {
|
|
|
31505
31748
|
};
|
|
31506
31749
|
|
|
31507
31750
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31508
|
-
import { jsx as
|
|
31751
|
+
import { jsx as jsx89, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31509
31752
|
var DownLoadBinaryField = (props) => {
|
|
31510
31753
|
const { handleFileDownload } = props;
|
|
31511
31754
|
const { t: t3 } = useI18n();
|
|
31512
|
-
return /* @__PURE__ */
|
|
31755
|
+
return /* @__PURE__ */ jsxs58(
|
|
31513
31756
|
"button",
|
|
31514
31757
|
{
|
|
31515
31758
|
type: "button",
|
|
31516
31759
|
onClick: handleFileDownload,
|
|
31517
31760
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31518
31761
|
children: [
|
|
31519
|
-
/* @__PURE__ */
|
|
31520
|
-
/* @__PURE__ */
|
|
31762
|
+
/* @__PURE__ */ jsx89(DownloadIcon, {}),
|
|
31763
|
+
/* @__PURE__ */ jsx89("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31521
31764
|
]
|
|
31522
31765
|
}
|
|
31523
31766
|
);
|
|
31524
31767
|
};
|
|
31525
31768
|
|
|
31526
31769
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31527
|
-
import { jsx as
|
|
31770
|
+
import { jsx as jsx90, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31528
31771
|
var DownloadFileField = (props) => {
|
|
31529
31772
|
const {
|
|
31530
31773
|
readonly,
|
|
@@ -31536,15 +31779,15 @@ var DownloadFileField = (props) => {
|
|
|
31536
31779
|
handleFileChange,
|
|
31537
31780
|
handleFileDownload
|
|
31538
31781
|
} = props;
|
|
31539
|
-
return /* @__PURE__ */
|
|
31540
|
-
/* @__PURE__ */
|
|
31782
|
+
return /* @__PURE__ */ jsxs59("div", { className: "", children: [
|
|
31783
|
+
/* @__PURE__ */ jsxs59(
|
|
31541
31784
|
"label",
|
|
31542
31785
|
{
|
|
31543
31786
|
htmlFor: inputId,
|
|
31544
31787
|
className: "flex cursor-pointer items-center justify-center rounded-lg border-2 border-gray-300 bg-white px-3 py-2 transition-colors duration-300 hover:bg-gray-200",
|
|
31545
31788
|
children: [
|
|
31546
|
-
file ? /* @__PURE__ */
|
|
31547
|
-
/* @__PURE__ */
|
|
31789
|
+
file ? /* @__PURE__ */ jsx90("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31790
|
+
/* @__PURE__ */ jsx90(
|
|
31548
31791
|
"input",
|
|
31549
31792
|
{
|
|
31550
31793
|
id: inputId,
|
|
@@ -31558,7 +31801,7 @@ var DownloadFileField = (props) => {
|
|
|
31558
31801
|
]
|
|
31559
31802
|
}
|
|
31560
31803
|
),
|
|
31561
|
-
file && /* @__PURE__ */
|
|
31804
|
+
file && /* @__PURE__ */ jsx90(
|
|
31562
31805
|
"button",
|
|
31563
31806
|
{
|
|
31564
31807
|
onClick: handleFileDownload,
|
|
@@ -31571,8 +31814,8 @@ var DownloadFileField = (props) => {
|
|
|
31571
31814
|
};
|
|
31572
31815
|
|
|
31573
31816
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31574
|
-
import { useState as
|
|
31575
|
-
import { jsx as
|
|
31817
|
+
import { useState as useState17 } from "react";
|
|
31818
|
+
import { jsx as jsx91, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
31576
31819
|
var DropdownField = (props) => {
|
|
31577
31820
|
const {
|
|
31578
31821
|
options: options2,
|
|
@@ -31584,32 +31827,32 @@ var DropdownField = (props) => {
|
|
|
31584
31827
|
dropdownClassName = "",
|
|
31585
31828
|
useClickOutside: useClickOutside2
|
|
31586
31829
|
} = props;
|
|
31587
|
-
const [open, setOpen] =
|
|
31830
|
+
const [open, setOpen] = useState17(false);
|
|
31588
31831
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31589
|
-
return /* @__PURE__ */
|
|
31832
|
+
return /* @__PURE__ */ jsxs60(
|
|
31590
31833
|
"div",
|
|
31591
31834
|
{
|
|
31592
31835
|
ref: dropdownRef,
|
|
31593
31836
|
className: `relative ${className}`,
|
|
31594
31837
|
onClick: () => setOpen(!open),
|
|
31595
31838
|
children: [
|
|
31596
|
-
/* @__PURE__ */
|
|
31839
|
+
/* @__PURE__ */ jsxs60(
|
|
31597
31840
|
"div",
|
|
31598
31841
|
{
|
|
31599
31842
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31600
31843
|
children: [
|
|
31601
31844
|
selectedValue?.icon,
|
|
31602
|
-
/* @__PURE__ */
|
|
31603
|
-
/* @__PURE__ */
|
|
31845
|
+
/* @__PURE__ */ jsx91("span", { children: selectedValue?.label }),
|
|
31846
|
+
/* @__PURE__ */ jsx91(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31604
31847
|
]
|
|
31605
31848
|
}
|
|
31606
31849
|
),
|
|
31607
|
-
open && /* @__PURE__ */
|
|
31850
|
+
open && /* @__PURE__ */ jsx91(
|
|
31608
31851
|
"div",
|
|
31609
31852
|
{
|
|
31610
31853
|
className: `absolute left-0 top-[calc(100%_+_4px)] z-50 bg-white overflow-hidden rounded-lg border border-[#dbe0e6] shadow-md text-sub-600 h-auto !min-h-fit text-xs !leading-5 !font-bold ${dropdownClassName}`,
|
|
31611
31854
|
onClick: (e3) => e3.stopPropagation(),
|
|
31612
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31855
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx91(
|
|
31613
31856
|
"div",
|
|
31614
31857
|
{
|
|
31615
31858
|
onClick: () => {
|
|
@@ -31629,7 +31872,7 @@ var DropdownField = (props) => {
|
|
|
31629
31872
|
};
|
|
31630
31873
|
|
|
31631
31874
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31632
|
-
import { Fragment as Fragment25, jsx as
|
|
31875
|
+
import { Fragment as Fragment25, jsx as jsx92, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31633
31876
|
var FeeField = (props) => {
|
|
31634
31877
|
const { value, formValues } = props;
|
|
31635
31878
|
const { t: t3 } = useI18n();
|
|
@@ -31640,27 +31883,27 @@ var FeeField = (props) => {
|
|
|
31640
31883
|
)
|
|
31641
31884
|
) + " VND";
|
|
31642
31885
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31643
|
-
return /* @__PURE__ */
|
|
31886
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
31644
31887
|
value?.subtotals?.map((sub) => {
|
|
31645
31888
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31646
|
-
return /* @__PURE__ */
|
|
31647
|
-
/* @__PURE__ */
|
|
31648
|
-
/* @__PURE__ */
|
|
31889
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
31890
|
+
/* @__PURE__ */ jsxs61("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31891
|
+
/* @__PURE__ */ jsxs61("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31649
31892
|
sub?.name,
|
|
31650
31893
|
":"
|
|
31651
31894
|
] }),
|
|
31652
|
-
/* @__PURE__ */
|
|
31895
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31653
31896
|
] }),
|
|
31654
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31897
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs61(
|
|
31655
31898
|
"div",
|
|
31656
31899
|
{
|
|
31657
31900
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31658
31901
|
children: [
|
|
31659
|
-
/* @__PURE__ */
|
|
31902
|
+
/* @__PURE__ */ jsxs61("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31660
31903
|
group?.group_name,
|
|
31661
31904
|
":"
|
|
31662
31905
|
] }),
|
|
31663
|
-
/* @__PURE__ */
|
|
31906
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31664
31907
|
]
|
|
31665
31908
|
},
|
|
31666
31909
|
`tax_groups_${group?.id}`
|
|
@@ -31668,33 +31911,33 @@ var FeeField = (props) => {
|
|
|
31668
31911
|
] });
|
|
31669
31912
|
}
|
|
31670
31913
|
}),
|
|
31671
|
-
/* @__PURE__ */
|
|
31672
|
-
/* @__PURE__ */
|
|
31914
|
+
/* @__PURE__ */ jsxs61("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31915
|
+
/* @__PURE__ */ jsxs61("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31673
31916
|
t3("total"),
|
|
31674
31917
|
":"
|
|
31675
31918
|
] }),
|
|
31676
|
-
/* @__PURE__ */
|
|
31919
|
+
/* @__PURE__ */ jsx92("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31677
31920
|
] }),
|
|
31678
|
-
/* @__PURE__ */
|
|
31679
|
-
/* @__PURE__ */
|
|
31921
|
+
/* @__PURE__ */ jsxs61("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31922
|
+
/* @__PURE__ */ jsxs61("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31680
31923
|
t3("paid_amount"),
|
|
31681
31924
|
":"
|
|
31682
31925
|
] }),
|
|
31683
|
-
/* @__PURE__ */
|
|
31926
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31684
31927
|
] }),
|
|
31685
|
-
/* @__PURE__ */
|
|
31686
|
-
/* @__PURE__ */
|
|
31928
|
+
/* @__PURE__ */ jsxs61("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31929
|
+
/* @__PURE__ */ jsxs61("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31687
31930
|
t3("remanining_amount"),
|
|
31688
31931
|
":"
|
|
31689
31932
|
] }),
|
|
31690
|
-
/* @__PURE__ */
|
|
31933
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31691
31934
|
] })
|
|
31692
31935
|
] });
|
|
31693
31936
|
};
|
|
31694
31937
|
|
|
31695
31938
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31696
|
-
import { useEffect as
|
|
31697
|
-
import { jsx as
|
|
31939
|
+
import { useEffect as useEffect19, useRef as useRef14, useState as useState18 } from "react";
|
|
31940
|
+
import { jsx as jsx93, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31698
31941
|
var RenderFile = ({
|
|
31699
31942
|
file,
|
|
31700
31943
|
onDelete,
|
|
@@ -31704,16 +31947,16 @@ var RenderFile = ({
|
|
|
31704
31947
|
readAs: "all"
|
|
31705
31948
|
});
|
|
31706
31949
|
const fileTypeIcon = {
|
|
31707
|
-
"application/pdf": /* @__PURE__ */
|
|
31708
|
-
"application/zip": /* @__PURE__ */
|
|
31709
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31710
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31711
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31950
|
+
"application/pdf": /* @__PURE__ */ jsx93(PdfIcon, {}),
|
|
31951
|
+
"application/zip": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31952
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31953
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx93(ExcelIcon, {}),
|
|
31954
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx93(ExcelIcon, {})
|
|
31712
31955
|
};
|
|
31713
|
-
return /* @__PURE__ */
|
|
31714
|
-
/* @__PURE__ */
|
|
31715
|
-
/* @__PURE__ */
|
|
31716
|
-
/* @__PURE__ */
|
|
31956
|
+
return /* @__PURE__ */ jsxs62("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31957
|
+
/* @__PURE__ */ jsx93("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31958
|
+
/* @__PURE__ */ jsxs62("div", { children: [
|
|
31959
|
+
/* @__PURE__ */ jsx93(
|
|
31717
31960
|
"div",
|
|
31718
31961
|
{
|
|
31719
31962
|
style: {
|
|
@@ -31723,20 +31966,20 @@ var RenderFile = ({
|
|
|
31723
31966
|
children: file?.name || file?.display_name || info?.name
|
|
31724
31967
|
}
|
|
31725
31968
|
),
|
|
31726
|
-
/* @__PURE__ */
|
|
31969
|
+
/* @__PURE__ */ jsx93("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31727
31970
|
] }),
|
|
31728
|
-
/* @__PURE__ */
|
|
31729
|
-
/* @__PURE__ */
|
|
31971
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31972
|
+
/* @__PURE__ */ jsx93(
|
|
31730
31973
|
"span",
|
|
31731
31974
|
{
|
|
31732
31975
|
onClick: () => onDownload && onDownload(
|
|
31733
31976
|
file?.data,
|
|
31734
31977
|
file?.name || file?.display_name || info?.name
|
|
31735
31978
|
),
|
|
31736
|
-
children: /* @__PURE__ */
|
|
31979
|
+
children: /* @__PURE__ */ jsx93(DownloadIcon, {})
|
|
31737
31980
|
}
|
|
31738
31981
|
),
|
|
31739
|
-
/* @__PURE__ */
|
|
31982
|
+
/* @__PURE__ */ jsx93("span", { onClick: onDelete, children: /* @__PURE__ */ jsx93(DeleteIconDanger, {}) })
|
|
31740
31983
|
] })
|
|
31741
31984
|
] });
|
|
31742
31985
|
};
|
|
@@ -31759,9 +32002,9 @@ var FileUploadField = (props) => {
|
|
|
31759
32002
|
} = props;
|
|
31760
32003
|
const { t: t3 } = useI18n();
|
|
31761
32004
|
const fileInputRef = useRef14(null);
|
|
31762
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31763
|
-
const [uploadError, setUploadError] =
|
|
31764
|
-
|
|
32005
|
+
const [selectedFiles, setSelectedFiles] = useState18([]);
|
|
32006
|
+
const [uploadError, setUploadError] = useState18();
|
|
32007
|
+
useEffect19(() => {
|
|
31765
32008
|
if (selectedFiles?.length === 0 && value) {
|
|
31766
32009
|
setSelectedFiles([
|
|
31767
32010
|
{
|
|
@@ -31770,7 +32013,7 @@ var FileUploadField = (props) => {
|
|
|
31770
32013
|
]);
|
|
31771
32014
|
}
|
|
31772
32015
|
}, [value]);
|
|
31773
|
-
return /* @__PURE__ */
|
|
32016
|
+
return /* @__PURE__ */ jsx93(
|
|
31774
32017
|
Controller,
|
|
31775
32018
|
{
|
|
31776
32019
|
name: name2 || "",
|
|
@@ -31779,7 +32022,7 @@ var FileUploadField = (props) => {
|
|
|
31779
32022
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31780
32023
|
},
|
|
31781
32024
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31782
|
-
|
|
32025
|
+
useEffect19(() => {
|
|
31783
32026
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31784
32027
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31785
32028
|
data = data.split(",")[1];
|
|
@@ -31795,8 +32038,8 @@ var FileUploadField = (props) => {
|
|
|
31795
32038
|
);
|
|
31796
32039
|
}
|
|
31797
32040
|
}, [selectedFiles]);
|
|
31798
|
-
return /* @__PURE__ */
|
|
31799
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
32041
|
+
return /* @__PURE__ */ jsxs62("div", { children: [
|
|
32042
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx93(
|
|
31800
32043
|
RenderFile,
|
|
31801
32044
|
{
|
|
31802
32045
|
file: fileItem,
|
|
@@ -31811,8 +32054,8 @@ var FileUploadField = (props) => {
|
|
|
31811
32054
|
}
|
|
31812
32055
|
}
|
|
31813
32056
|
)),
|
|
31814
|
-
uploadError && /* @__PURE__ */
|
|
31815
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
32057
|
+
uploadError && /* @__PURE__ */ jsx93("div", { className: "text-[#de4747]", children: uploadError }),
|
|
32058
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx93(
|
|
31816
32059
|
ButtonSelectFiles,
|
|
31817
32060
|
{
|
|
31818
32061
|
fileInputRef,
|
|
@@ -31827,7 +32070,7 @@ var FileUploadField = (props) => {
|
|
|
31827
32070
|
useUploadFile
|
|
31828
32071
|
}
|
|
31829
32072
|
),
|
|
31830
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32073
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx93("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31831
32074
|
] });
|
|
31832
32075
|
}
|
|
31833
32076
|
}
|
|
@@ -31835,8 +32078,8 @@ var FileUploadField = (props) => {
|
|
|
31835
32078
|
};
|
|
31836
32079
|
|
|
31837
32080
|
// src/widgets/basic/float-field/float.tsx
|
|
31838
|
-
import { useEffect as
|
|
31839
|
-
import { Fragment as Fragment26, jsx as
|
|
32081
|
+
import { useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
|
|
32082
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
31840
32083
|
var FloatField = (props) => {
|
|
31841
32084
|
const {
|
|
31842
32085
|
name: name2,
|
|
@@ -31854,9 +32097,9 @@ var FloatField = (props) => {
|
|
|
31854
32097
|
} = props;
|
|
31855
32098
|
const { t: t3 } = useI18n();
|
|
31856
32099
|
if (!isForm && !isEditTable) {
|
|
31857
|
-
return /* @__PURE__ */
|
|
32100
|
+
return /* @__PURE__ */ jsx94("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31858
32101
|
}
|
|
31859
|
-
return /* @__PURE__ */
|
|
32102
|
+
return /* @__PURE__ */ jsx94(
|
|
31860
32103
|
Controller,
|
|
31861
32104
|
{
|
|
31862
32105
|
name: name2 ?? "",
|
|
@@ -31867,12 +32110,12 @@ var FloatField = (props) => {
|
|
|
31867
32110
|
},
|
|
31868
32111
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31869
32112
|
const { setError, clearErrors } = methods;
|
|
31870
|
-
const [inputValue, setInputValue] =
|
|
32113
|
+
const [inputValue, setInputValue] = useState19(
|
|
31871
32114
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31872
32115
|
);
|
|
31873
32116
|
const isDirtyRef = useRef15(false);
|
|
31874
32117
|
const lastCommittedValueRef = useRef15(null);
|
|
31875
|
-
|
|
32118
|
+
useEffect20(() => {
|
|
31876
32119
|
if (isDirtyRef.current) return;
|
|
31877
32120
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31878
32121
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -31950,8 +32193,8 @@ var FloatField = (props) => {
|
|
|
31950
32193
|
}
|
|
31951
32194
|
isDirtyRef.current = false;
|
|
31952
32195
|
};
|
|
31953
|
-
return /* @__PURE__ */
|
|
31954
|
-
/* @__PURE__ */
|
|
32196
|
+
return /* @__PURE__ */ jsxs63(Fragment26, { children: [
|
|
32197
|
+
/* @__PURE__ */ jsx94(
|
|
31955
32198
|
"input",
|
|
31956
32199
|
{
|
|
31957
32200
|
value: inputValue,
|
|
@@ -31970,7 +32213,7 @@ var FloatField = (props) => {
|
|
|
31970
32213
|
`
|
|
31971
32214
|
}
|
|
31972
32215
|
),
|
|
31973
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32216
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx94("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31974
32217
|
] });
|
|
31975
32218
|
}
|
|
31976
32219
|
}
|
|
@@ -31978,8 +32221,8 @@ var FloatField = (props) => {
|
|
|
31978
32221
|
};
|
|
31979
32222
|
|
|
31980
32223
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31981
|
-
import { useState as
|
|
31982
|
-
import { Fragment as Fragment27, jsx as
|
|
32224
|
+
import { useState as useState20 } from "react";
|
|
32225
|
+
import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
31983
32226
|
var FloatTimeField = (props) => {
|
|
31984
32227
|
const {
|
|
31985
32228
|
name: name2,
|
|
@@ -31995,9 +32238,9 @@ var FloatTimeField = (props) => {
|
|
|
31995
32238
|
const { t: t3 } = useI18n();
|
|
31996
32239
|
if (!isForm) {
|
|
31997
32240
|
const formatValue = value ?? 0;
|
|
31998
|
-
return /* @__PURE__ */
|
|
32241
|
+
return /* @__PURE__ */ jsx95("span", { children: convertFloatToTime(formatValue) });
|
|
31999
32242
|
}
|
|
32000
|
-
return /* @__PURE__ */
|
|
32243
|
+
return /* @__PURE__ */ jsx95(
|
|
32001
32244
|
Controller,
|
|
32002
32245
|
{
|
|
32003
32246
|
name: name2 ?? "",
|
|
@@ -32010,11 +32253,11 @@ var FloatTimeField = (props) => {
|
|
|
32010
32253
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32011
32254
|
fieldState: { error: error2, isDirty }
|
|
32012
32255
|
}) => {
|
|
32013
|
-
const [input, setInput] =
|
|
32256
|
+
const [input, setInput] = useState20(
|
|
32014
32257
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32015
32258
|
);
|
|
32016
|
-
const [formattedTime, setFormattedTime] =
|
|
32017
|
-
const [errors, setErrors] =
|
|
32259
|
+
const [formattedTime, setFormattedTime] = useState20("");
|
|
32260
|
+
const [errors, setErrors] = useState20("");
|
|
32018
32261
|
const handleInputChange = (e3) => {
|
|
32019
32262
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32020
32263
|
setInput(raw);
|
|
@@ -32059,8 +32302,8 @@ var FloatTimeField = (props) => {
|
|
|
32059
32302
|
}
|
|
32060
32303
|
onBlur();
|
|
32061
32304
|
};
|
|
32062
|
-
return /* @__PURE__ */
|
|
32063
|
-
/* @__PURE__ */
|
|
32305
|
+
return /* @__PURE__ */ jsxs64(Fragment27, { children: [
|
|
32306
|
+
/* @__PURE__ */ jsx95(
|
|
32064
32307
|
"input",
|
|
32065
32308
|
{
|
|
32066
32309
|
type: "text",
|
|
@@ -32092,7 +32335,7 @@ var FloatTimeField = (props) => {
|
|
|
32092
32335
|
readOnly: readonly
|
|
32093
32336
|
}
|
|
32094
32337
|
),
|
|
32095
|
-
(error2 || errors) && /* @__PURE__ */
|
|
32338
|
+
(error2 || errors) && /* @__PURE__ */ jsx95("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32096
32339
|
] });
|
|
32097
32340
|
}
|
|
32098
32341
|
}
|
|
@@ -32100,8 +32343,8 @@ var FloatTimeField = (props) => {
|
|
|
32100
32343
|
};
|
|
32101
32344
|
|
|
32102
32345
|
// src/widgets/basic/html-field/html.tsx
|
|
32103
|
-
import { useEffect as
|
|
32104
|
-
import { jsx as
|
|
32346
|
+
import { useEffect as useEffect21, useRef as useRef16 } from "react";
|
|
32347
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
32105
32348
|
var HtmlField = (props) => {
|
|
32106
32349
|
const {
|
|
32107
32350
|
name: name2,
|
|
@@ -32115,16 +32358,16 @@ var HtmlField = (props) => {
|
|
|
32115
32358
|
} = props;
|
|
32116
32359
|
const divRef = useRef16(null);
|
|
32117
32360
|
if (!isForm && !isEditTable) {
|
|
32118
|
-
return /* @__PURE__ */
|
|
32361
|
+
return /* @__PURE__ */ jsx96("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32119
32362
|
}
|
|
32120
|
-
return /* @__PURE__ */
|
|
32363
|
+
return /* @__PURE__ */ jsx96(
|
|
32121
32364
|
Controller,
|
|
32122
32365
|
{
|
|
32123
32366
|
name: name2 ?? "",
|
|
32124
32367
|
control: methods?.control,
|
|
32125
32368
|
defaultValue,
|
|
32126
32369
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32127
|
-
|
|
32370
|
+
useEffect21(() => {
|
|
32128
32371
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32129
32372
|
divRef.current.innerHTML = value2 || "";
|
|
32130
32373
|
}
|
|
@@ -32136,7 +32379,7 @@ var HtmlField = (props) => {
|
|
|
32136
32379
|
onChange2(newValue, "");
|
|
32137
32380
|
}
|
|
32138
32381
|
};
|
|
32139
|
-
return /* @__PURE__ */
|
|
32382
|
+
return /* @__PURE__ */ jsx96(
|
|
32140
32383
|
"div",
|
|
32141
32384
|
{
|
|
32142
32385
|
ref: divRef,
|
|
@@ -32155,28 +32398,28 @@ var HtmlField = (props) => {
|
|
|
32155
32398
|
};
|
|
32156
32399
|
|
|
32157
32400
|
// src/widgets/basic/image-field/image.tsx
|
|
32158
|
-
import { jsx as
|
|
32401
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
32159
32402
|
var ImageField = (props) => {
|
|
32160
32403
|
const { value, type, name: name2, baseURL } = props;
|
|
32161
32404
|
if (!value) return null;
|
|
32162
32405
|
if (type === "url") {
|
|
32163
|
-
return /* @__PURE__ */
|
|
32406
|
+
return /* @__PURE__ */ jsx97("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32164
32407
|
}
|
|
32165
|
-
return /* @__PURE__ */
|
|
32408
|
+
return /* @__PURE__ */ jsx97("div", { id: "qr-code", children: /* @__PURE__ */ jsx97("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32166
32409
|
};
|
|
32167
32410
|
|
|
32168
32411
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32169
|
-
import
|
|
32412
|
+
import React17, { useEffect as useEffect22, useMemo as useMemo11 } from "react";
|
|
32170
32413
|
|
|
32171
32414
|
// src/widgets/basic/information-field/information.tsx
|
|
32172
|
-
import { Fragment as Fragment28, jsx as
|
|
32415
|
+
import { Fragment as Fragment28, jsx as jsx98, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32173
32416
|
var InfomationField = (props) => {
|
|
32174
32417
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32175
32418
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32176
|
-
return /* @__PURE__ */
|
|
32419
|
+
return /* @__PURE__ */ jsx98(Fragment28, {});
|
|
32177
32420
|
}
|
|
32178
32421
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32179
|
-
return /* @__PURE__ */
|
|
32422
|
+
return /* @__PURE__ */ jsx98("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx98(
|
|
32180
32423
|
AvatarField,
|
|
32181
32424
|
{
|
|
32182
32425
|
id: item.id,
|
|
@@ -32185,8 +32428,8 @@ var InfomationField = (props) => {
|
|
|
32185
32428
|
stringToColor
|
|
32186
32429
|
},
|
|
32187
32430
|
item.id
|
|
32188
|
-
)) : /* @__PURE__ */
|
|
32189
|
-
/* @__PURE__ */
|
|
32431
|
+
)) : /* @__PURE__ */ jsxs65("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32432
|
+
/* @__PURE__ */ jsx98(
|
|
32190
32433
|
AvatarField,
|
|
32191
32434
|
{
|
|
32192
32435
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32196,12 +32439,12 @@ var InfomationField = (props) => {
|
|
|
32196
32439
|
stringToColor
|
|
32197
32440
|
}
|
|
32198
32441
|
),
|
|
32199
|
-
showName && /* @__PURE__ */
|
|
32442
|
+
showName && /* @__PURE__ */ jsx98("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32200
32443
|
] }) });
|
|
32201
32444
|
};
|
|
32202
32445
|
|
|
32203
32446
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32204
|
-
import { jsx as
|
|
32447
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32205
32448
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32206
32449
|
const { selectProps, data, menuList } = props;
|
|
32207
32450
|
const { relation } = selectProps;
|
|
@@ -32210,8 +32453,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32210
32453
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32211
32454
|
)
|
|
32212
32455
|
)?.[0]?.action?.id;
|
|
32213
|
-
return /* @__PURE__ */
|
|
32214
|
-
/* @__PURE__ */
|
|
32456
|
+
return /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32457
|
+
/* @__PURE__ */ jsx99(
|
|
32215
32458
|
AvatarField,
|
|
32216
32459
|
{
|
|
32217
32460
|
id: data?.id,
|
|
@@ -32223,8 +32466,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32223
32466
|
stringToColor
|
|
32224
32467
|
}
|
|
32225
32468
|
),
|
|
32226
|
-
/* @__PURE__ */
|
|
32227
|
-
/* @__PURE__ */
|
|
32469
|
+
/* @__PURE__ */ jsx99("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32470
|
+
/* @__PURE__ */ jsx99(
|
|
32228
32471
|
"span",
|
|
32229
32472
|
{
|
|
32230
32473
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32232,7 +32475,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32232
32475
|
e3.stopPropagation();
|
|
32233
32476
|
props.removeProps.onClick();
|
|
32234
32477
|
},
|
|
32235
|
-
children: /* @__PURE__ */
|
|
32478
|
+
children: /* @__PURE__ */ jsx99(CloseIcon, {})
|
|
32236
32479
|
}
|
|
32237
32480
|
)
|
|
32238
32481
|
] });
|
|
@@ -32241,10 +32484,10 @@ var CustomMenuList = (props) => {
|
|
|
32241
32484
|
const { options: options2, children, selectProps } = props;
|
|
32242
32485
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32243
32486
|
const { t: t3 } = useI18n();
|
|
32244
|
-
const limitedChildren =
|
|
32245
|
-
return /* @__PURE__ */
|
|
32487
|
+
const limitedChildren = React17.Children.toArray(children).slice(0, 10);
|
|
32488
|
+
return /* @__PURE__ */ jsxs66(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32246
32489
|
limitedChildren,
|
|
32247
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32490
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs66(
|
|
32248
32491
|
"button",
|
|
32249
32492
|
{
|
|
32250
32493
|
type: "button",
|
|
@@ -32289,7 +32532,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32289
32532
|
value: item.id,
|
|
32290
32533
|
label: item.name ?? item.display_name
|
|
32291
32534
|
})) : [];
|
|
32292
|
-
return /* @__PURE__ */
|
|
32535
|
+
return /* @__PURE__ */ jsx99(
|
|
32293
32536
|
InfomationField,
|
|
32294
32537
|
{
|
|
32295
32538
|
value: optionValue || null,
|
|
@@ -32298,7 +32541,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32298
32541
|
}
|
|
32299
32542
|
);
|
|
32300
32543
|
}
|
|
32301
|
-
return /* @__PURE__ */
|
|
32544
|
+
return /* @__PURE__ */ jsx99(
|
|
32302
32545
|
Controller,
|
|
32303
32546
|
{
|
|
32304
32547
|
name: name2 ?? "",
|
|
@@ -32308,12 +32551,12 @@ var Many2ManyTagField = (props) => {
|
|
|
32308
32551
|
},
|
|
32309
32552
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32310
32553
|
const { clearErrors } = methods;
|
|
32311
|
-
|
|
32554
|
+
useEffect22(() => {
|
|
32312
32555
|
if (field.value) {
|
|
32313
32556
|
clearErrors(name2);
|
|
32314
32557
|
}
|
|
32315
32558
|
}, [field.value]);
|
|
32316
|
-
const filteredValue =
|
|
32559
|
+
const filteredValue = useMemo11(() => {
|
|
32317
32560
|
if (!Array.isArray(field?.value)) return null;
|
|
32318
32561
|
const fieldValueMapped = field.value.map((v) => ({
|
|
32319
32562
|
value: v?.id,
|
|
@@ -32334,8 +32577,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32334
32577
|
onChange2?.(name2 ?? "", newValue);
|
|
32335
32578
|
clearErrors(name2);
|
|
32336
32579
|
};
|
|
32337
|
-
return /* @__PURE__ */
|
|
32338
|
-
/* @__PURE__ */
|
|
32580
|
+
return /* @__PURE__ */ jsxs66("div", { className: "group h-full overflow-y-auto", children: [
|
|
32581
|
+
/* @__PURE__ */ jsx99(
|
|
32339
32582
|
StateManagedSelect$1,
|
|
32340
32583
|
{
|
|
32341
32584
|
options: options2,
|
|
@@ -32414,7 +32657,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32414
32657
|
})
|
|
32415
32658
|
},
|
|
32416
32659
|
components: isUser ? {
|
|
32417
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
32660
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx99(
|
|
32418
32661
|
CustomMultiValue,
|
|
32419
32662
|
{
|
|
32420
32663
|
...multiValueProps,
|
|
@@ -32423,7 +32666,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32423
32666
|
),
|
|
32424
32667
|
IndicatorSeparator: () => null
|
|
32425
32668
|
} : {
|
|
32426
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
32669
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx99(
|
|
32427
32670
|
CustomMenuList,
|
|
32428
32671
|
{
|
|
32429
32672
|
...menuListProps,
|
|
@@ -32434,13 +32677,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32434
32677
|
}
|
|
32435
32678
|
),
|
|
32436
32679
|
IndicatorSeparator: () => null,
|
|
32437
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32438
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32680
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.DropdownIndicator, { ...props2 }),
|
|
32681
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.ClearIndicator, { ...props2 })
|
|
32439
32682
|
},
|
|
32440
32683
|
required: !invisible && required
|
|
32441
32684
|
}
|
|
32442
32685
|
),
|
|
32443
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32686
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx99("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32444
32687
|
] });
|
|
32445
32688
|
}
|
|
32446
32689
|
}
|
|
@@ -32448,8 +32691,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32448
32691
|
};
|
|
32449
32692
|
|
|
32450
32693
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32451
|
-
import { useEffect as
|
|
32452
|
-
import { Fragment as Fragment29, jsx as
|
|
32694
|
+
import { useEffect as useEffect23 } from "react";
|
|
32695
|
+
import { Fragment as Fragment29, jsx as jsx100, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
32453
32696
|
var MonetaryField = (props) => {
|
|
32454
32697
|
const { t: t3 } = useI18n();
|
|
32455
32698
|
const {
|
|
@@ -32470,26 +32713,26 @@ var MonetaryField = (props) => {
|
|
|
32470
32713
|
symbol = "VND"
|
|
32471
32714
|
} = props;
|
|
32472
32715
|
if (isForm && name2 === "amount_residual") {
|
|
32473
|
-
return /* @__PURE__ */
|
|
32474
|
-
/* @__PURE__ */
|
|
32716
|
+
return /* @__PURE__ */ jsxs67("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32717
|
+
/* @__PURE__ */ jsxs67("span", { className: "font-semibold", children: [
|
|
32475
32718
|
string,
|
|
32476
32719
|
":"
|
|
32477
32720
|
] }),
|
|
32478
|
-
/* @__PURE__ */
|
|
32721
|
+
/* @__PURE__ */ jsx100("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} ${symbol}` })
|
|
32479
32722
|
] });
|
|
32480
32723
|
}
|
|
32481
32724
|
if (!isForm) {
|
|
32482
32725
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
32483
32726
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32484
|
-
return /* @__PURE__ */
|
|
32727
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
32485
32728
|
parseFloat(String(value ?? defaultValue))
|
|
32486
32729
|
)} ${symbol}` });
|
|
32487
32730
|
}
|
|
32488
|
-
return /* @__PURE__ */
|
|
32731
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
32489
32732
|
parseFloat(value ?? defaultValue)
|
|
32490
32733
|
)} ${currencySymbol}` });
|
|
32491
32734
|
}
|
|
32492
|
-
return /* @__PURE__ */
|
|
32735
|
+
return /* @__PURE__ */ jsx100(
|
|
32493
32736
|
Controller,
|
|
32494
32737
|
{
|
|
32495
32738
|
name: name2 ?? "",
|
|
@@ -32503,13 +32746,13 @@ var MonetaryField = (props) => {
|
|
|
32503
32746
|
fieldState: { error: error2 }
|
|
32504
32747
|
}) => {
|
|
32505
32748
|
const { setError, clearErrors } = methods;
|
|
32506
|
-
|
|
32749
|
+
useEffect23(() => {
|
|
32507
32750
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32508
32751
|
clearErrors(name2);
|
|
32509
32752
|
}
|
|
32510
32753
|
}, [value2]);
|
|
32511
|
-
return /* @__PURE__ */
|
|
32512
|
-
/* @__PURE__ */
|
|
32754
|
+
return /* @__PURE__ */ jsxs67(Fragment29, { children: [
|
|
32755
|
+
/* @__PURE__ */ jsx100(
|
|
32513
32756
|
"input",
|
|
32514
32757
|
{
|
|
32515
32758
|
value: formatNumberOnly(value2),
|
|
@@ -32547,7 +32790,7 @@ var MonetaryField = (props) => {
|
|
|
32547
32790
|
`
|
|
32548
32791
|
}
|
|
32549
32792
|
),
|
|
32550
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32793
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx100("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32551
32794
|
] });
|
|
32552
32795
|
}
|
|
32553
32796
|
}
|
|
@@ -32555,14 +32798,14 @@ var MonetaryField = (props) => {
|
|
|
32555
32798
|
};
|
|
32556
32799
|
|
|
32557
32800
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32558
|
-
import { jsx as
|
|
32801
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
32559
32802
|
var PaidBadgedField = () => {
|
|
32560
|
-
return /* @__PURE__ */
|
|
32803
|
+
return /* @__PURE__ */ jsx101("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx101(PaidIcon, {}) });
|
|
32561
32804
|
};
|
|
32562
32805
|
|
|
32563
32806
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32564
|
-
import
|
|
32565
|
-
import { jsx as
|
|
32807
|
+
import React18, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
32808
|
+
import { jsx as jsx102, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32566
32809
|
var RatingStarField = (props) => {
|
|
32567
32810
|
const {
|
|
32568
32811
|
label,
|
|
@@ -32571,9 +32814,9 @@ var RatingStarField = (props) => {
|
|
|
32571
32814
|
onSelectPriority,
|
|
32572
32815
|
id
|
|
32573
32816
|
} = props;
|
|
32574
|
-
const [rating, setRating] =
|
|
32575
|
-
const [hover, setHover] =
|
|
32576
|
-
|
|
32817
|
+
const [rating, setRating] = useState21(defaultValue);
|
|
32818
|
+
const [hover, setHover] = useState21(0);
|
|
32819
|
+
useEffect24(() => {
|
|
32577
32820
|
setRating(defaultValue);
|
|
32578
32821
|
}, [defaultValue]);
|
|
32579
32822
|
const handleClick = (value) => {
|
|
@@ -32597,7 +32840,7 @@ var RatingStarField = (props) => {
|
|
|
32597
32840
|
setHover(0);
|
|
32598
32841
|
setRating(0);
|
|
32599
32842
|
};
|
|
32600
|
-
return /* @__PURE__ */
|
|
32843
|
+
return /* @__PURE__ */ jsx102(
|
|
32601
32844
|
"div",
|
|
32602
32845
|
{
|
|
32603
32846
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32607,17 +32850,17 @@ var RatingStarField = (props) => {
|
|
|
32607
32850
|
const starValue = index4 + 1;
|
|
32608
32851
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32609
32852
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32610
|
-
return /* @__PURE__ */
|
|
32611
|
-
/* @__PURE__ */
|
|
32853
|
+
return /* @__PURE__ */ jsxs68(React18.Fragment, { children: [
|
|
32854
|
+
/* @__PURE__ */ jsx102(
|
|
32612
32855
|
"div",
|
|
32613
32856
|
{
|
|
32614
32857
|
onMouseEnter: () => handleHover(starValue),
|
|
32615
32858
|
onClick: () => handleClick(starValue),
|
|
32616
32859
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32617
|
-
children: /* @__PURE__ */
|
|
32860
|
+
children: /* @__PURE__ */ jsx102(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32618
32861
|
}
|
|
32619
32862
|
),
|
|
32620
|
-
/* @__PURE__ */
|
|
32863
|
+
/* @__PURE__ */ jsx102(
|
|
32621
32864
|
M,
|
|
32622
32865
|
{
|
|
32623
32866
|
className: "z-50",
|
|
@@ -32633,7 +32876,7 @@ var RatingStarField = (props) => {
|
|
|
32633
32876
|
};
|
|
32634
32877
|
|
|
32635
32878
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32636
|
-
import { jsx as
|
|
32879
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
32637
32880
|
var PriorityField = (props) => {
|
|
32638
32881
|
const {
|
|
32639
32882
|
isForm,
|
|
@@ -32649,7 +32892,7 @@ var PriorityField = (props) => {
|
|
|
32649
32892
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32650
32893
|
const defaultPriority = parseInt(value) + 1;
|
|
32651
32894
|
if (!isForm) {
|
|
32652
|
-
return /* @__PURE__ */
|
|
32895
|
+
return /* @__PURE__ */ jsx103(
|
|
32653
32896
|
RatingStarField,
|
|
32654
32897
|
{
|
|
32655
32898
|
label,
|
|
@@ -32660,7 +32903,7 @@ var PriorityField = (props) => {
|
|
|
32660
32903
|
}
|
|
32661
32904
|
);
|
|
32662
32905
|
}
|
|
32663
|
-
return /* @__PURE__ */
|
|
32906
|
+
return /* @__PURE__ */ jsx103(
|
|
32664
32907
|
Controller,
|
|
32665
32908
|
{
|
|
32666
32909
|
name: name ?? "",
|
|
@@ -32670,7 +32913,7 @@ var PriorityField = (props) => {
|
|
|
32670
32913
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32671
32914
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32672
32915
|
};
|
|
32673
|
-
return /* @__PURE__ */
|
|
32916
|
+
return /* @__PURE__ */ jsx103(
|
|
32674
32917
|
RatingStarField,
|
|
32675
32918
|
{
|
|
32676
32919
|
label,
|
|
@@ -32686,8 +32929,8 @@ var PriorityField = (props) => {
|
|
|
32686
32929
|
};
|
|
32687
32930
|
|
|
32688
32931
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32689
|
-
import { useEffect as
|
|
32690
|
-
import { jsx as
|
|
32932
|
+
import { useEffect as useEffect25 } from "react";
|
|
32933
|
+
import { jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
32691
32934
|
var RadioGroupField = (props) => {
|
|
32692
32935
|
const {
|
|
32693
32936
|
name: name2,
|
|
@@ -32700,19 +32943,19 @@ var RadioGroupField = (props) => {
|
|
|
32700
32943
|
onChange: onChange2,
|
|
32701
32944
|
setValue
|
|
32702
32945
|
} = props;
|
|
32703
|
-
|
|
32946
|
+
useEffect25(() => {
|
|
32704
32947
|
if (selection?.length > 0) {
|
|
32705
32948
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32706
32949
|
}
|
|
32707
32950
|
}, [selection, name2, setValue]);
|
|
32708
32951
|
if (!methods) return null;
|
|
32709
|
-
return /* @__PURE__ */
|
|
32952
|
+
return /* @__PURE__ */ jsx104(
|
|
32710
32953
|
Controller,
|
|
32711
32954
|
{
|
|
32712
32955
|
name: name2 ?? "",
|
|
32713
32956
|
control: methods.control,
|
|
32714
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32715
|
-
/* @__PURE__ */
|
|
32957
|
+
render: ({ field }) => /* @__PURE__ */ jsx104("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs69("div", { className: "flex items-center gap-1", children: [
|
|
32958
|
+
/* @__PURE__ */ jsx104(
|
|
32716
32959
|
"input",
|
|
32717
32960
|
{
|
|
32718
32961
|
type: "radio",
|
|
@@ -32731,7 +32974,7 @@ var RadioGroupField = (props) => {
|
|
|
32731
32974
|
className: "custom-radio"
|
|
32732
32975
|
}
|
|
32733
32976
|
),
|
|
32734
|
-
/* @__PURE__ */
|
|
32977
|
+
/* @__PURE__ */ jsx104("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32735
32978
|
] }, select[0])) })
|
|
32736
32979
|
}
|
|
32737
32980
|
);
|
|
@@ -32739,7 +32982,7 @@ var RadioGroupField = (props) => {
|
|
|
32739
32982
|
|
|
32740
32983
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32741
32984
|
var import_moment3 = __toESM(require_moment());
|
|
32742
|
-
import { jsx as
|
|
32985
|
+
import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
32743
32986
|
var RemainingDaysField = (props) => {
|
|
32744
32987
|
const {
|
|
32745
32988
|
value,
|
|
@@ -32750,14 +32993,14 @@ var RemainingDaysField = (props) => {
|
|
|
32750
32993
|
if (!value) return null;
|
|
32751
32994
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32752
32995
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32753
|
-
return /* @__PURE__ */
|
|
32754
|
-
/* @__PURE__ */
|
|
32755
|
-
/* @__PURE__ */
|
|
32996
|
+
return /* @__PURE__ */ jsxs70("div", { className: isForm ? "mb-4" : "", children: [
|
|
32997
|
+
/* @__PURE__ */ jsx105(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32998
|
+
/* @__PURE__ */ jsx105(
|
|
32756
32999
|
"div",
|
|
32757
33000
|
{
|
|
32758
33001
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32759
33002
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32760
|
-
children: /* @__PURE__ */
|
|
33003
|
+
children: /* @__PURE__ */ jsx105(
|
|
32761
33004
|
"div",
|
|
32762
33005
|
{
|
|
32763
33006
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32770,7 +33013,7 @@ var RemainingDaysField = (props) => {
|
|
|
32770
33013
|
};
|
|
32771
33014
|
|
|
32772
33015
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32773
|
-
import { Fragment as Fragment30, jsx as
|
|
33016
|
+
import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
32774
33017
|
var SelectDropdownField = (props) => {
|
|
32775
33018
|
const { t: t3 } = useI18n();
|
|
32776
33019
|
const {
|
|
@@ -32792,9 +33035,9 @@ var SelectDropdownField = (props) => {
|
|
|
32792
33035
|
label: val[1]
|
|
32793
33036
|
})) : [];
|
|
32794
33037
|
if (!isForm && !isEditTable) {
|
|
32795
|
-
return /* @__PURE__ */
|
|
33038
|
+
return /* @__PURE__ */ jsx106("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32796
33039
|
} else {
|
|
32797
|
-
return /* @__PURE__ */
|
|
33040
|
+
return /* @__PURE__ */ jsx106(
|
|
32798
33041
|
Controller,
|
|
32799
33042
|
{
|
|
32800
33043
|
name: name2 || "",
|
|
@@ -32821,8 +33064,8 @@ var SelectDropdownField = (props) => {
|
|
|
32821
33064
|
value: defaultValue || null,
|
|
32822
33065
|
required: !invisible && required
|
|
32823
33066
|
};
|
|
32824
|
-
return /* @__PURE__ */
|
|
32825
|
-
/* @__PURE__ */
|
|
33067
|
+
return /* @__PURE__ */ jsxs71(Fragment30, { children: [
|
|
33068
|
+
/* @__PURE__ */ jsx106("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ jsx106(
|
|
32826
33069
|
StateManagedSelect$1,
|
|
32827
33070
|
{
|
|
32828
33071
|
...commonProps,
|
|
@@ -32879,12 +33122,12 @@ var SelectDropdownField = (props) => {
|
|
|
32879
33122
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32880
33123
|
components: {
|
|
32881
33124
|
IndicatorSeparator: () => null,
|
|
32882
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
33125
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx106(components.DropdownIndicator, { ...props2 })
|
|
32883
33126
|
},
|
|
32884
33127
|
noOptionsMessage: () => t3("no-available")
|
|
32885
33128
|
}
|
|
32886
33129
|
) }),
|
|
32887
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33130
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32888
33131
|
] });
|
|
32889
33132
|
}
|
|
32890
33133
|
}
|
|
@@ -32893,7 +33136,7 @@ var SelectDropdownField = (props) => {
|
|
|
32893
33136
|
};
|
|
32894
33137
|
|
|
32895
33138
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32896
|
-
import { jsx as
|
|
33139
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
32897
33140
|
var TextAreaField = (props) => {
|
|
32898
33141
|
const {
|
|
32899
33142
|
methods,
|
|
@@ -32917,9 +33160,9 @@ var TextAreaField = (props) => {
|
|
|
32917
33160
|
}
|
|
32918
33161
|
}) : {};
|
|
32919
33162
|
if (!isForm) {
|
|
32920
|
-
return /* @__PURE__ */
|
|
33163
|
+
return /* @__PURE__ */ jsx107("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32921
33164
|
}
|
|
32922
|
-
return /* @__PURE__ */
|
|
33165
|
+
return /* @__PURE__ */ jsx107(
|
|
32923
33166
|
"textarea",
|
|
32924
33167
|
{
|
|
32925
33168
|
...formProps,
|
|
@@ -32935,7 +33178,7 @@ var TextAreaField = (props) => {
|
|
|
32935
33178
|
};
|
|
32936
33179
|
|
|
32937
33180
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32938
|
-
import { jsx as
|
|
33181
|
+
import { jsx as jsx108, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
32939
33182
|
var ToggleButtonField = (props) => {
|
|
32940
33183
|
const {
|
|
32941
33184
|
name: name2,
|
|
@@ -32945,13 +33188,13 @@ var ToggleButtonField = (props) => {
|
|
|
32945
33188
|
onChange: onChange2,
|
|
32946
33189
|
methods
|
|
32947
33190
|
} = props;
|
|
32948
|
-
return /* @__PURE__ */
|
|
33191
|
+
return /* @__PURE__ */ jsx108(
|
|
32949
33192
|
Controller,
|
|
32950
33193
|
{
|
|
32951
33194
|
name: name2 ?? "",
|
|
32952
33195
|
control: methods?.control,
|
|
32953
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32954
|
-
/* @__PURE__ */
|
|
33196
|
+
render: ({ field }) => /* @__PURE__ */ jsx108("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs72("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
33197
|
+
/* @__PURE__ */ jsx108(
|
|
32955
33198
|
"input",
|
|
32956
33199
|
{
|
|
32957
33200
|
...field,
|
|
@@ -32970,7 +33213,7 @@ var ToggleButtonField = (props) => {
|
|
|
32970
33213
|
checked: field.value ?? false
|
|
32971
33214
|
}
|
|
32972
33215
|
),
|
|
32973
|
-
/* @__PURE__ */
|
|
33216
|
+
/* @__PURE__ */ jsx108(
|
|
32974
33217
|
"span",
|
|
32975
33218
|
{
|
|
32976
33219
|
style: {
|
|
@@ -32980,7 +33223,7 @@ var ToggleButtonField = (props) => {
|
|
|
32980
33223
|
},
|
|
32981
33224
|
className: `rounded-full transition duration-300
|
|
32982
33225
|
`,
|
|
32983
|
-
children: /* @__PURE__ */
|
|
33226
|
+
children: /* @__PURE__ */ jsx108(
|
|
32984
33227
|
"span",
|
|
32985
33228
|
{
|
|
32986
33229
|
style: {
|
|
@@ -33004,8 +33247,8 @@ var ToggleButtonField = (props) => {
|
|
|
33004
33247
|
};
|
|
33005
33248
|
|
|
33006
33249
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33007
|
-
import { useEffect as
|
|
33008
|
-
import { Fragment as Fragment31, jsx as
|
|
33250
|
+
import { useEffect as useEffect26, useRef as useRef17, useState as useState22 } from "react";
|
|
33251
|
+
import { Fragment as Fragment31, jsx as jsx109, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33009
33252
|
var IntegerField = (props) => {
|
|
33010
33253
|
const {
|
|
33011
33254
|
name: name2,
|
|
@@ -33024,9 +33267,9 @@ var IntegerField = (props) => {
|
|
|
33024
33267
|
const { t: t3 } = useI18n();
|
|
33025
33268
|
if (!isForm && !isEditTable) {
|
|
33026
33269
|
const displayValue = value ?? defaultValue;
|
|
33027
|
-
return /* @__PURE__ */
|
|
33270
|
+
return /* @__PURE__ */ jsx109("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33028
33271
|
}
|
|
33029
|
-
return /* @__PURE__ */
|
|
33272
|
+
return /* @__PURE__ */ jsx109(
|
|
33030
33273
|
Controller,
|
|
33031
33274
|
{
|
|
33032
33275
|
name: name2 || "",
|
|
@@ -33043,10 +33286,10 @@ var IntegerField = (props) => {
|
|
|
33043
33286
|
const isDirtyRef = useRef17(false);
|
|
33044
33287
|
const inputRef = useRef17(null);
|
|
33045
33288
|
const lastCommittedValueRef = useRef17(null);
|
|
33046
|
-
const [inputValue, setInputValue] =
|
|
33289
|
+
const [inputValue, setInputValue] = useState22(
|
|
33047
33290
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33048
33291
|
);
|
|
33049
|
-
|
|
33292
|
+
useEffect26(() => {
|
|
33050
33293
|
if (value2 !== void 0 && value2 !== null) {
|
|
33051
33294
|
setInputValue(String(value2));
|
|
33052
33295
|
clearErrors(name2);
|
|
@@ -33104,8 +33347,8 @@ var IntegerField = (props) => {
|
|
|
33104
33347
|
inputRef.current?.blur();
|
|
33105
33348
|
clearErrors(name2);
|
|
33106
33349
|
};
|
|
33107
|
-
return /* @__PURE__ */
|
|
33108
|
-
/* @__PURE__ */
|
|
33350
|
+
return /* @__PURE__ */ jsxs73(Fragment31, { children: [
|
|
33351
|
+
/* @__PURE__ */ jsx109(
|
|
33109
33352
|
"input",
|
|
33110
33353
|
{
|
|
33111
33354
|
ref: inputRef,
|
|
@@ -33140,7 +33383,7 @@ var IntegerField = (props) => {
|
|
|
33140
33383
|
`
|
|
33141
33384
|
}
|
|
33142
33385
|
),
|
|
33143
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
33386
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx109("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33144
33387
|
] });
|
|
33145
33388
|
}
|
|
33146
33389
|
}
|
|
@@ -33148,7 +33391,7 @@ var IntegerField = (props) => {
|
|
|
33148
33391
|
};
|
|
33149
33392
|
|
|
33150
33393
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33151
|
-
import { jsx as
|
|
33394
|
+
import { jsx as jsx110, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
33152
33395
|
var StatusDropdownField = (props) => {
|
|
33153
33396
|
const {
|
|
33154
33397
|
buttonRef,
|
|
@@ -33160,13 +33403,13 @@ var StatusDropdownField = (props) => {
|
|
|
33160
33403
|
handleClick,
|
|
33161
33404
|
colors: colors2
|
|
33162
33405
|
} = props;
|
|
33163
|
-
return /* @__PURE__ */
|
|
33406
|
+
return /* @__PURE__ */ jsxs74(
|
|
33164
33407
|
"div",
|
|
33165
33408
|
{
|
|
33166
33409
|
ref: buttonRef,
|
|
33167
33410
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33168
33411
|
children: [
|
|
33169
|
-
/* @__PURE__ */
|
|
33412
|
+
/* @__PURE__ */ jsx110(
|
|
33170
33413
|
"button",
|
|
33171
33414
|
{
|
|
33172
33415
|
type: "button",
|
|
@@ -33174,23 +33417,23 @@ var StatusDropdownField = (props) => {
|
|
|
33174
33417
|
className: `transition-all rounded-full size-5 cursor-pointer shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] focus:!shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-[#dbe0e6] ${state == "normal" ? "bg-[#e9ecef]" : state == "done" ? "bg-primary" : "bg-red-500"}`
|
|
33175
33418
|
}
|
|
33176
33419
|
),
|
|
33177
|
-
isOpen && /* @__PURE__ */
|
|
33420
|
+
isOpen && /* @__PURE__ */ jsx110("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
33178
33421
|
const isActive = item[0] == state;
|
|
33179
|
-
return /* @__PURE__ */
|
|
33422
|
+
return /* @__PURE__ */ jsxs74(
|
|
33180
33423
|
"div",
|
|
33181
33424
|
{
|
|
33182
33425
|
className: `cursor-pointer relative hover:bg-gray-200 pl-[12px] pr-[20px] py-[5px] flex items-center justify-start gap-2 ${isActive ? "bg-gray-100" : ""}`,
|
|
33183
33426
|
onClick: () => handleClick(item[0]),
|
|
33184
33427
|
children: [
|
|
33185
|
-
/* @__PURE__ */
|
|
33186
|
-
/* @__PURE__ */
|
|
33187
|
-
/* @__PURE__ */
|
|
33428
|
+
/* @__PURE__ */ jsx110("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx110(CheckIcon, {}) }),
|
|
33429
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2", children: [
|
|
33430
|
+
/* @__PURE__ */ jsx110(
|
|
33188
33431
|
"div",
|
|
33189
33432
|
{
|
|
33190
33433
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33191
33434
|
}
|
|
33192
33435
|
),
|
|
33193
|
-
/* @__PURE__ */
|
|
33436
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm", children: item[1] })
|
|
33194
33437
|
] })
|
|
33195
33438
|
]
|
|
33196
33439
|
},
|
|
@@ -33204,8 +33447,8 @@ var StatusDropdownField = (props) => {
|
|
|
33204
33447
|
|
|
33205
33448
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33206
33449
|
import { createPortal as createPortal5 } from "react-dom";
|
|
33207
|
-
import { useEffect as
|
|
33208
|
-
import { jsx as
|
|
33450
|
+
import { useEffect as useEffect27 } from "react";
|
|
33451
|
+
import { jsx as jsx111, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
33209
33452
|
var Many2ManyField = (props) => {
|
|
33210
33453
|
const { t: t3 } = useI18n();
|
|
33211
33454
|
const {
|
|
@@ -33264,7 +33507,7 @@ var Many2ManyField = (props) => {
|
|
|
33264
33507
|
clearSearch
|
|
33265
33508
|
} = searchController;
|
|
33266
33509
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33267
|
-
|
|
33510
|
+
useEffect27(() => {
|
|
33268
33511
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33269
33512
|
if (groupItems?.length > 0) {
|
|
33270
33513
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33279,7 +33522,7 @@ var Many2ManyField = (props) => {
|
|
|
33279
33522
|
};
|
|
33280
33523
|
}, [selectedTags]);
|
|
33281
33524
|
return createPortal5(
|
|
33282
|
-
/* @__PURE__ */
|
|
33525
|
+
/* @__PURE__ */ jsxs75(
|
|
33283
33526
|
"div",
|
|
33284
33527
|
{
|
|
33285
33528
|
style: {
|
|
@@ -33287,8 +33530,8 @@ var Many2ManyField = (props) => {
|
|
|
33287
33530
|
},
|
|
33288
33531
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33289
33532
|
children: [
|
|
33290
|
-
/* @__PURE__ */
|
|
33291
|
-
/* @__PURE__ */
|
|
33533
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33534
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs75(
|
|
33292
33535
|
"div",
|
|
33293
33536
|
{
|
|
33294
33537
|
style: {
|
|
@@ -33296,12 +33539,12 @@ var Many2ManyField = (props) => {
|
|
|
33296
33539
|
},
|
|
33297
33540
|
className: "relative p-4 flex flex-col gap-2 max-w-full lg:max-w-[1000px] lg:min-w-[1000px] transform rounded-3xl bg-[#FFF] min-h-[90%] max-h-[90%] h-fit",
|
|
33298
33541
|
children: [
|
|
33299
|
-
/* @__PURE__ */
|
|
33300
|
-
/* @__PURE__ */
|
|
33301
|
-
/* @__PURE__ */
|
|
33542
|
+
/* @__PURE__ */ jsxs75("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33543
|
+
/* @__PURE__ */ jsx111("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33544
|
+
/* @__PURE__ */ jsx111("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx111(CloseIcon, {}) })
|
|
33302
33545
|
] }),
|
|
33303
|
-
/* @__PURE__ */
|
|
33304
|
-
/* @__PURE__ */
|
|
33546
|
+
/* @__PURE__ */ jsxs75("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33547
|
+
/* @__PURE__ */ jsx111("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ jsx111(
|
|
33305
33548
|
Search,
|
|
33306
33549
|
{
|
|
33307
33550
|
removeSearchItems,
|
|
@@ -33335,7 +33578,7 @@ var Many2ManyField = (props) => {
|
|
|
33335
33578
|
groupByList
|
|
33336
33579
|
}
|
|
33337
33580
|
) }),
|
|
33338
|
-
/* @__PURE__ */
|
|
33581
|
+
/* @__PURE__ */ jsx111(
|
|
33339
33582
|
PaginationView,
|
|
33340
33583
|
{
|
|
33341
33584
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -33352,20 +33595,20 @@ var Many2ManyField = (props) => {
|
|
|
33352
33595
|
}
|
|
33353
33596
|
)
|
|
33354
33597
|
] }),
|
|
33355
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
33598
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx111("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx111("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx111(
|
|
33356
33599
|
"div",
|
|
33357
33600
|
{
|
|
33358
33601
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33359
|
-
children: /* @__PURE__ */
|
|
33602
|
+
children: /* @__PURE__ */ jsx111("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx111("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx111(
|
|
33360
33603
|
"div",
|
|
33361
33604
|
{
|
|
33362
33605
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33363
|
-
children: /* @__PURE__ */
|
|
33606
|
+
children: /* @__PURE__ */ jsx111("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs75(
|
|
33364
33607
|
"table",
|
|
33365
33608
|
{
|
|
33366
33609
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33367
33610
|
children: [
|
|
33368
|
-
/* @__PURE__ */
|
|
33611
|
+
/* @__PURE__ */ jsx111(
|
|
33369
33612
|
TableHead,
|
|
33370
33613
|
{
|
|
33371
33614
|
columns,
|
|
@@ -33375,7 +33618,7 @@ var Many2ManyField = (props) => {
|
|
|
33375
33618
|
handleCheckBoxAll
|
|
33376
33619
|
}
|
|
33377
33620
|
),
|
|
33378
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
33621
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx111(
|
|
33379
33622
|
TableBody,
|
|
33380
33623
|
{
|
|
33381
33624
|
tableGroupController,
|
|
@@ -33415,16 +33658,16 @@ var Many2ManyField = (props) => {
|
|
|
33415
33658
|
checkedAll,
|
|
33416
33659
|
context
|
|
33417
33660
|
}
|
|
33418
|
-
) : /* @__PURE__ */
|
|
33661
|
+
) : /* @__PURE__ */ jsx111("tr", { children: /* @__PURE__ */ jsx111(
|
|
33419
33662
|
"td",
|
|
33420
33663
|
{
|
|
33421
33664
|
className: "w-full",
|
|
33422
33665
|
colSpan: columns?.length + 2,
|
|
33423
|
-
children: /* @__PURE__ */
|
|
33666
|
+
children: /* @__PURE__ */ jsx111(
|
|
33424
33667
|
"div",
|
|
33425
33668
|
{
|
|
33426
33669
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33427
|
-
children: /* @__PURE__ */
|
|
33670
|
+
children: /* @__PURE__ */ jsx111(EmptyTable, {})
|
|
33428
33671
|
}
|
|
33429
33672
|
)
|
|
33430
33673
|
}
|
|
@@ -33435,9 +33678,9 @@ var Many2ManyField = (props) => {
|
|
|
33435
33678
|
}
|
|
33436
33679
|
) }) })
|
|
33437
33680
|
}
|
|
33438
|
-
) }) }) : /* @__PURE__ */
|
|
33439
|
-
/* @__PURE__ */
|
|
33440
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
33681
|
+
) }) }) : /* @__PURE__ */ jsx111(LayerLoading, {}),
|
|
33682
|
+
/* @__PURE__ */ jsxs75("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33683
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx111(
|
|
33441
33684
|
"button",
|
|
33442
33685
|
{
|
|
33443
33686
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33447,7 +33690,7 @@ var Many2ManyField = (props) => {
|
|
|
33447
33690
|
children: t3("choose")
|
|
33448
33691
|
}
|
|
33449
33692
|
),
|
|
33450
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
33693
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx111(
|
|
33451
33694
|
"button",
|
|
33452
33695
|
{
|
|
33453
33696
|
type: "button",
|
|
@@ -33463,7 +33706,7 @@ var Many2ManyField = (props) => {
|
|
|
33463
33706
|
children: t3("new")
|
|
33464
33707
|
}
|
|
33465
33708
|
),
|
|
33466
|
-
/* @__PURE__ */
|
|
33709
|
+
/* @__PURE__ */ jsx111(
|
|
33467
33710
|
"button",
|
|
33468
33711
|
{
|
|
33469
33712
|
type: "button",
|
|
@@ -33484,16 +33727,16 @@ var Many2ManyField = (props) => {
|
|
|
33484
33727
|
};
|
|
33485
33728
|
|
|
33486
33729
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33487
|
-
import
|
|
33488
|
-
import { Fragment as Fragment32, jsx as
|
|
33730
|
+
import React19, { useEffect as useEffect28 } from "react";
|
|
33731
|
+
import { Fragment as Fragment32, jsx as jsx112, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
33489
33732
|
var CustomMenuList2 = (props) => {
|
|
33490
33733
|
const { t: t3 } = useI18n();
|
|
33491
33734
|
const { options: options2, children, selectProps } = props;
|
|
33492
33735
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33493
|
-
const limitedChildren =
|
|
33494
|
-
return /* @__PURE__ */
|
|
33736
|
+
const limitedChildren = React19.Children.toArray(children).slice(0, 10);
|
|
33737
|
+
return /* @__PURE__ */ jsxs76(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33495
33738
|
limitedChildren,
|
|
33496
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33739
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs76(
|
|
33497
33740
|
"button",
|
|
33498
33741
|
{
|
|
33499
33742
|
type: "button",
|
|
@@ -33536,14 +33779,14 @@ var Many2OneField = (props) => {
|
|
|
33536
33779
|
const { t: t3 } = useI18n();
|
|
33537
33780
|
if (!isForm && !isEditTable) {
|
|
33538
33781
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33539
|
-
return /* @__PURE__ */
|
|
33782
|
+
return /* @__PURE__ */ jsxs76(Fragment32, { children: [
|
|
33540
33783
|
allowShowDetail && renderDetail({
|
|
33541
33784
|
idToolTip: String(name2) + Number(index4),
|
|
33542
33785
|
model: options2?.model ?? relation,
|
|
33543
33786
|
context: contextObject,
|
|
33544
33787
|
idForm: id
|
|
33545
33788
|
}),
|
|
33546
|
-
/* @__PURE__ */
|
|
33789
|
+
/* @__PURE__ */ jsx112(
|
|
33547
33790
|
"span",
|
|
33548
33791
|
{
|
|
33549
33792
|
className: "cursor-pointer",
|
|
@@ -33554,20 +33797,20 @@ var Many2OneField = (props) => {
|
|
|
33554
33797
|
)
|
|
33555
33798
|
] });
|
|
33556
33799
|
}
|
|
33557
|
-
return /* @__PURE__ */
|
|
33800
|
+
return /* @__PURE__ */ jsxs76(Fragment32, { children: [
|
|
33558
33801
|
allowShowDetail && renderDetail({
|
|
33559
33802
|
idToolTip: String(name2),
|
|
33560
33803
|
model: options2?.model ?? relation,
|
|
33561
33804
|
context: contextObject,
|
|
33562
33805
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33563
33806
|
}),
|
|
33564
|
-
/* @__PURE__ */
|
|
33807
|
+
/* @__PURE__ */ jsx112(
|
|
33565
33808
|
"div",
|
|
33566
33809
|
{
|
|
33567
33810
|
id: name2,
|
|
33568
33811
|
"data-tooltip-id": name2,
|
|
33569
33812
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33570
|
-
children: /* @__PURE__ */
|
|
33813
|
+
children: /* @__PURE__ */ jsx112(
|
|
33571
33814
|
Controller,
|
|
33572
33815
|
{
|
|
33573
33816
|
name: name2 ?? "",
|
|
@@ -33587,13 +33830,13 @@ var Many2OneField = (props) => {
|
|
|
33587
33830
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33588
33831
|
(option) => option.value === tempSelectedOption?.value
|
|
33589
33832
|
) : currentValue ? currentValue : null;
|
|
33590
|
-
|
|
33833
|
+
useEffect28(() => {
|
|
33591
33834
|
if (error2 && selectedOption) {
|
|
33592
33835
|
methods?.clearErrors(name2);
|
|
33593
33836
|
}
|
|
33594
33837
|
}, [selectedOption]);
|
|
33595
|
-
return /* @__PURE__ */
|
|
33596
|
-
/* @__PURE__ */
|
|
33838
|
+
return /* @__PURE__ */ jsxs76("div", { className: "h-full", children: [
|
|
33839
|
+
/* @__PURE__ */ jsx112(
|
|
33597
33840
|
StateManagedSelect$1,
|
|
33598
33841
|
{
|
|
33599
33842
|
menuShouldScrollIntoView: false,
|
|
@@ -33670,7 +33913,7 @@ var Many2OneField = (props) => {
|
|
|
33670
33913
|
})
|
|
33671
33914
|
},
|
|
33672
33915
|
components: {
|
|
33673
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33916
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx112(
|
|
33674
33917
|
CustomMenuList2,
|
|
33675
33918
|
{
|
|
33676
33919
|
...menuListProps,
|
|
@@ -33681,13 +33924,13 @@ var Many2OneField = (props) => {
|
|
|
33681
33924
|
}
|
|
33682
33925
|
),
|
|
33683
33926
|
IndicatorSeparator: () => null,
|
|
33684
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33927
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx112(components.DropdownIndicator, { ...props2 })
|
|
33685
33928
|
},
|
|
33686
33929
|
isDisabled: readonly,
|
|
33687
33930
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33688
33931
|
}
|
|
33689
33932
|
),
|
|
33690
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33933
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx112("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33691
33934
|
] });
|
|
33692
33935
|
}
|
|
33693
33936
|
}
|
|
@@ -33698,7 +33941,7 @@ var Many2OneField = (props) => {
|
|
|
33698
33941
|
};
|
|
33699
33942
|
|
|
33700
33943
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33701
|
-
import { jsx as
|
|
33944
|
+
import { jsx as jsx113, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
33702
33945
|
var StatusbarDurationField = (props) => {
|
|
33703
33946
|
const {
|
|
33704
33947
|
disabled,
|
|
@@ -33708,14 +33951,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33708
33951
|
defaultValue,
|
|
33709
33952
|
setModalStatus
|
|
33710
33953
|
} = props;
|
|
33711
|
-
return /* @__PURE__ */
|
|
33954
|
+
return /* @__PURE__ */ jsx113(
|
|
33712
33955
|
"div",
|
|
33713
33956
|
{
|
|
33714
33957
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33715
|
-
children: /* @__PURE__ */
|
|
33716
|
-
/* @__PURE__ */
|
|
33958
|
+
children: /* @__PURE__ */ jsxs77("div", { className: "flex items-center gap-[24px]", children: [
|
|
33959
|
+
/* @__PURE__ */ jsx113("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33717
33960
|
const value = option?.id === defaultValue;
|
|
33718
|
-
return /* @__PURE__ */
|
|
33961
|
+
return /* @__PURE__ */ jsxs77(
|
|
33719
33962
|
"label",
|
|
33720
33963
|
{
|
|
33721
33964
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33725,7 +33968,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33725
33968
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33726
33969
|
`,
|
|
33727
33970
|
children: [
|
|
33728
|
-
/* @__PURE__ */
|
|
33971
|
+
/* @__PURE__ */ jsx113(
|
|
33729
33972
|
"input",
|
|
33730
33973
|
{
|
|
33731
33974
|
type: "radio",
|
|
@@ -33735,7 +33978,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33735
33978
|
}
|
|
33736
33979
|
),
|
|
33737
33980
|
option?.name,
|
|
33738
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33981
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx113(
|
|
33739
33982
|
"div",
|
|
33740
33983
|
{
|
|
33741
33984
|
className: `absolute top-[5px] bg-[#dee2e6] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45 group-hover:bg-[#ced4da]
|
|
@@ -33750,14 +33993,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33750
33993
|
}) }),
|
|
33751
33994
|
dataResponse?.records?.some(
|
|
33752
33995
|
(item) => item?.fold && item.id !== defaultValue
|
|
33753
|
-
) && /* @__PURE__ */
|
|
33996
|
+
) && /* @__PURE__ */ jsxs77(
|
|
33754
33997
|
"div",
|
|
33755
33998
|
{
|
|
33756
33999
|
onClick: () => setModalStatus(!modelStatus),
|
|
33757
34000
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33758
34001
|
children: [
|
|
33759
|
-
/* @__PURE__ */
|
|
33760
|
-
modelStatus && /* @__PURE__ */
|
|
34002
|
+
/* @__PURE__ */ jsx113(MoreIcon, {}),
|
|
34003
|
+
modelStatus && /* @__PURE__ */ jsx113(
|
|
33761
34004
|
"div",
|
|
33762
34005
|
{
|
|
33763
34006
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33766,7 +34009,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33766
34009
|
(item) => item?.fold && item.id !== defaultValue
|
|
33767
34010
|
)?.map((option) => {
|
|
33768
34011
|
const value = option?.id === defaultValue;
|
|
33769
|
-
return /* @__PURE__ */
|
|
34012
|
+
return /* @__PURE__ */ jsx113(
|
|
33770
34013
|
"div",
|
|
33771
34014
|
{
|
|
33772
34015
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33787,15 +34030,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33787
34030
|
};
|
|
33788
34031
|
|
|
33789
34032
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33790
|
-
import { useMemo as
|
|
33791
|
-
import { Fragment as Fragment33, jsx as
|
|
34033
|
+
import { useMemo as useMemo12 } from "react";
|
|
34034
|
+
import { Fragment as Fragment33, jsx as jsx114, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
33792
34035
|
var StatusBarOptionField = (props) => {
|
|
33793
34036
|
const { selection, defaultValue } = props;
|
|
33794
|
-
const memoizedStatusOptions =
|
|
34037
|
+
const memoizedStatusOptions = useMemo12(() => selection, [selection]);
|
|
33795
34038
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33796
34039
|
(option) => option?.[0] === defaultValue
|
|
33797
34040
|
);
|
|
33798
|
-
return /* @__PURE__ */
|
|
34041
|
+
return /* @__PURE__ */ jsx114(
|
|
33799
34042
|
"div",
|
|
33800
34043
|
{
|
|
33801
34044
|
style: {
|
|
@@ -33804,8 +34047,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33804
34047
|
flexWrap: "wrap"
|
|
33805
34048
|
},
|
|
33806
34049
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33807
|
-
return /* @__PURE__ */
|
|
33808
|
-
/* @__PURE__ */
|
|
34050
|
+
return /* @__PURE__ */ jsxs78(Fragment33, { children: [
|
|
34051
|
+
/* @__PURE__ */ jsxs78(
|
|
33809
34052
|
"div",
|
|
33810
34053
|
{
|
|
33811
34054
|
style: {
|
|
@@ -33823,7 +34066,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33823
34066
|
boxShadow: index4 === indexInProgress ? "0 1px 2px 0 rgba(51, 51, 51, 0.04), 0 2px 4px 0 rgba(51, 51, 51, 0.04), 0 4px 8px -2px rgba(51, 51, 51, 0.06), 0 0 0 1px rgba(51, 51, 51, 0.04), 0 -1px 1px -0.5px rgba(51, 51, 51, 0.06) inset" : ""
|
|
33824
34067
|
},
|
|
33825
34068
|
children: [
|
|
33826
|
-
/* @__PURE__ */
|
|
34069
|
+
/* @__PURE__ */ jsx114(
|
|
33827
34070
|
"span",
|
|
33828
34071
|
{
|
|
33829
34072
|
style: {
|
|
@@ -33835,10 +34078,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33835
34078
|
alignItems: "center",
|
|
33836
34079
|
borderRadius: "100%"
|
|
33837
34080
|
},
|
|
33838
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
34081
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx114(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx114(ICCircle, {}) : /* @__PURE__ */ jsx114(ICMinus, {})
|
|
33839
34082
|
}
|
|
33840
34083
|
),
|
|
33841
|
-
/* @__PURE__ */
|
|
34084
|
+
/* @__PURE__ */ jsx114(
|
|
33842
34085
|
"span",
|
|
33843
34086
|
{
|
|
33844
34087
|
style: {
|
|
@@ -33851,7 +34094,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33851
34094
|
},
|
|
33852
34095
|
option?.[0]
|
|
33853
34096
|
),
|
|
33854
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
34097
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx114(
|
|
33855
34098
|
"div",
|
|
33856
34099
|
{
|
|
33857
34100
|
style: {
|
|
@@ -33867,7 +34110,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33867
34110
|
);
|
|
33868
34111
|
};
|
|
33869
34112
|
var ICMinus = () => {
|
|
33870
|
-
return /* @__PURE__ */
|
|
34113
|
+
return /* @__PURE__ */ jsx114(
|
|
33871
34114
|
"svg",
|
|
33872
34115
|
{
|
|
33873
34116
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33875,7 +34118,7 @@ var ICMinus = () => {
|
|
|
33875
34118
|
height: "16",
|
|
33876
34119
|
viewBox: "0 0 16 16",
|
|
33877
34120
|
fill: "none",
|
|
33878
|
-
children: /* @__PURE__ */
|
|
34121
|
+
children: /* @__PURE__ */ jsx114(
|
|
33879
34122
|
"path",
|
|
33880
34123
|
{
|
|
33881
34124
|
d: "M4 8H12",
|
|
@@ -33889,7 +34132,7 @@ var ICMinus = () => {
|
|
|
33889
34132
|
);
|
|
33890
34133
|
};
|
|
33891
34134
|
var ICCircle = () => {
|
|
33892
|
-
return /* @__PURE__ */
|
|
34135
|
+
return /* @__PURE__ */ jsx114(
|
|
33893
34136
|
"svg",
|
|
33894
34137
|
{
|
|
33895
34138
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33897,12 +34140,12 @@ var ICCircle = () => {
|
|
|
33897
34140
|
height: "8",
|
|
33898
34141
|
viewBox: "0 0 8 8",
|
|
33899
34142
|
fill: "none",
|
|
33900
|
-
children: /* @__PURE__ */
|
|
34143
|
+
children: /* @__PURE__ */ jsx114("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33901
34144
|
}
|
|
33902
34145
|
);
|
|
33903
34146
|
};
|
|
33904
34147
|
var ICCheck = () => {
|
|
33905
|
-
return /* @__PURE__ */
|
|
34148
|
+
return /* @__PURE__ */ jsx114(
|
|
33906
34149
|
"svg",
|
|
33907
34150
|
{
|
|
33908
34151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33910,7 +34153,7 @@ var ICCheck = () => {
|
|
|
33910
34153
|
height: "16",
|
|
33911
34154
|
viewBox: "0 0 16 16",
|
|
33912
34155
|
fill: "none",
|
|
33913
|
-
children: /* @__PURE__ */
|
|
34156
|
+
children: /* @__PURE__ */ jsx114(
|
|
33914
34157
|
"path",
|
|
33915
34158
|
{
|
|
33916
34159
|
d: "M13.3408 5.23535L13.252 5.32324L6.88867 11.6875L6.7998 11.7764L6.71191 11.6875L2.89258 7.86914L2.80469 7.78125L2.89258 7.69238L3.74121 6.84375L3.83008 6.75586L6.7998 9.72559L12.2266 4.29785L12.3154 4.20996L13.3408 5.23535Z",
|
|
@@ -33924,7 +34167,7 @@ var ICCheck = () => {
|
|
|
33924
34167
|
};
|
|
33925
34168
|
|
|
33926
34169
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33927
|
-
import { jsx as
|
|
34170
|
+
import { jsx as jsx115, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
33928
34171
|
var DateOptionField = (props) => {
|
|
33929
34172
|
const {
|
|
33930
34173
|
name: name2,
|
|
@@ -33935,19 +34178,19 @@ var DateOptionField = (props) => {
|
|
|
33935
34178
|
string,
|
|
33936
34179
|
onChange: onChange2
|
|
33937
34180
|
} = props;
|
|
33938
|
-
return /* @__PURE__ */
|
|
34181
|
+
return /* @__PURE__ */ jsx115(
|
|
33939
34182
|
Controller,
|
|
33940
34183
|
{
|
|
33941
34184
|
name: name2 ?? "",
|
|
33942
34185
|
control: methods?.control,
|
|
33943
|
-
render: ({ field }) => /* @__PURE__ */
|
|
34186
|
+
render: ({ field }) => /* @__PURE__ */ jsxs79(
|
|
33944
34187
|
"label",
|
|
33945
34188
|
{
|
|
33946
34189
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33947
34190
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33948
34191
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33949
34192
|
children: [
|
|
33950
|
-
/* @__PURE__ */
|
|
34193
|
+
/* @__PURE__ */ jsx115(
|
|
33951
34194
|
"input",
|
|
33952
34195
|
{
|
|
33953
34196
|
type: "checkbox",
|
|
@@ -34055,6 +34298,7 @@ export {
|
|
|
34055
34298
|
Search,
|
|
34056
34299
|
SearchIcon,
|
|
34057
34300
|
SearchType,
|
|
34301
|
+
SecureField,
|
|
34058
34302
|
SelectDropdownField,
|
|
34059
34303
|
SettingIcon,
|
|
34060
34304
|
StarIcon,
|