@fctc/sme-widget-ui 2.3.3 → 2.3.5
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/icons.js +14 -10
- package/dist/icons.mjs +14 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +888 -694
- package/dist/index.mjs +807 -614
- package/dist/widgets.d.mts +3 -1
- package/dist/widgets.d.ts +3 -1
- package/dist/widgets.js +888 -694
- package/dist/widgets.mjs +807 -614
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5020,6 +5020,7 @@ __export(index_exports, {
|
|
|
5020
5020
|
Search: () => Search,
|
|
5021
5021
|
SearchIcon: () => SearchIcon,
|
|
5022
5022
|
SearchType: () => SearchType,
|
|
5023
|
+
SecureField: () => SecureField,
|
|
5023
5024
|
SelectDropdownField: () => SelectDropdownField,
|
|
5024
5025
|
SettingIcon: () => SettingIcon,
|
|
5025
5026
|
StarIcon: () => StarIcon,
|
|
@@ -5762,26 +5763,30 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
5762
5763
|
var EyeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5763
5764
|
"svg",
|
|
5764
5765
|
{
|
|
5765
|
-
width: "20",
|
|
5766
|
-
height: "21",
|
|
5767
|
-
viewBox: "0 0 20 21",
|
|
5768
|
-
fill: "none",
|
|
5769
5766
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5767
|
+
width: "16",
|
|
5768
|
+
height: "16",
|
|
5769
|
+
viewBox: "0 0 16 16",
|
|
5770
|
+
fill: "none",
|
|
5770
5771
|
children: [
|
|
5771
5772
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5772
5773
|
"path",
|
|
5773
5774
|
{
|
|
5774
|
-
d: "
|
|
5775
|
-
stroke: "#
|
|
5776
|
-
strokeWidth: "1.5"
|
|
5775
|
+
d: "M10.3866 7.99995C10.3866 9.31995 9.31995 10.3866 7.99995 10.3866C6.67995 10.3866 5.61328 9.31995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C9.31995 5.61328 10.3866 6.67995 10.3866 7.99995Z",
|
|
5776
|
+
stroke: "#646566",
|
|
5777
|
+
strokeWidth: "1.5",
|
|
5778
|
+
strokeLinecap: "round",
|
|
5779
|
+
strokeLinejoin: "round"
|
|
5777
5780
|
}
|
|
5778
5781
|
),
|
|
5779
5782
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5780
5783
|
"path",
|
|
5781
5784
|
{
|
|
5782
|
-
d: "
|
|
5783
|
-
stroke: "#
|
|
5784
|
-
strokeWidth: "1.5"
|
|
5785
|
+
d: "M7.9999 13.5138C10.3532 13.5138 12.5466 12.1271 14.0732 9.72714C14.6732 8.78714 14.6732 7.20714 14.0732 6.26714C12.5466 3.86714 10.3532 2.48047 7.9999 2.48047C5.64656 2.48047 3.45323 3.86714 1.92656 6.26714C1.32656 7.20714 1.32656 8.78714 1.92656 9.72714C3.45323 12.1271 5.64656 13.5138 7.9999 13.5138Z",
|
|
5786
|
+
stroke: "#646566",
|
|
5787
|
+
strokeWidth: "1.5",
|
|
5788
|
+
strokeLinecap: "round",
|
|
5789
|
+
strokeLinejoin: "round"
|
|
5785
5790
|
}
|
|
5786
5791
|
)
|
|
5787
5792
|
]
|
|
@@ -17363,8 +17368,196 @@ var CharField = (props) => {
|
|
|
17363
17368
|
);
|
|
17364
17369
|
};
|
|
17365
17370
|
|
|
17366
|
-
// src/widgets/basic/
|
|
17371
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17372
|
+
var import_react41 = require("react");
|
|
17373
|
+
|
|
17374
|
+
// src/icons/eye-hidden-icon.tsx
|
|
17367
17375
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
17376
|
+
var EyeHiddenIcon = () => {
|
|
17377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17378
|
+
"svg",
|
|
17379
|
+
{
|
|
17380
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17381
|
+
width: "16",
|
|
17382
|
+
height: "16",
|
|
17383
|
+
viewBox: "0 0 16 16",
|
|
17384
|
+
fill: "none",
|
|
17385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17386
|
+
"path",
|
|
17387
|
+
{
|
|
17388
|
+
d: "M2.02273 4.37106C1.85957 3.99034 1.41866 3.81398 1.03793 3.97715C0.657212 4.14031 0.480849 4.58122 0.644015 4.96194L1.33337 4.6665L2.02273 4.37106ZM10.3915 8.88564L10.1168 8.18775L10.1168 8.18775L10.3915 8.88564ZM6.23722 9.29468C6.46313 8.94749 6.36481 8.48291 6.01762 8.257C5.67043 8.03109 5.20585 8.12941 4.97994 8.4766L5.60858 8.88564L6.23722 9.29468ZM4.03807 9.92413C3.81216 10.2713 3.91048 10.7359 4.25767 10.9618C4.60486 11.1877 5.06944 11.0894 5.29535 10.7422L4.66671 10.3332L4.03807 9.92413ZM15.3561 4.96194C15.5192 4.58122 15.3429 4.14031 14.9621 3.97715C14.5814 3.81398 14.1405 3.99034 13.9773 4.37106L14.6667 4.6665L15.3561 4.96194ZM12.6667 7.41906L12.1534 6.87221H12.1534L12.6667 7.41906ZM13.1364 8.94939C13.4293 9.24229 13.9041 9.24229 14.197 8.94939C14.4899 8.6565 14.4899 8.18163 14.197 7.88873L13.6667 8.41906L13.1364 8.94939ZM7.25004 10.9998C7.25004 11.4141 7.58583 11.7498 8.00004 11.7498C8.41425 11.7498 8.75004 11.4141 8.75004 10.9998H8.00004H7.25004ZM10.7047 10.7422C10.9306 11.0894 11.3952 11.1877 11.7424 10.9618C12.0896 10.7359 12.1879 10.2713 11.962 9.92413L11.3334 10.3332L10.7047 10.7422ZM3.8637 7.94939C4.1566 7.6565 4.1566 7.18163 3.8637 6.88873C3.57081 6.59584 3.09594 6.59584 2.80304 6.88873L3.33337 7.41906L3.8637 7.94939ZM1.80304 7.88873C1.51015 8.18163 1.51015 8.6565 1.80304 8.94939C2.09594 9.24229 2.57081 9.24229 2.8637 8.94939L2.33337 8.41906L1.80304 7.88873ZM8.00004 9.33317V8.58317C5.94282 8.58317 4.46137 7.56111 3.4663 6.4895C2.96899 5.95393 2.60371 5.41601 2.36326 5.01206C2.24346 4.81079 2.15582 4.64476 2.09925 4.53161C2.07099 4.4751 2.05057 4.43196 2.03785 4.40441C2.03149 4.39065 2.02706 4.3808 2.02455 4.37514C2.02329 4.37231 2.02251 4.37054 2.02221 4.36984C2.02206 4.3695 2.02203 4.36942 2.02211 4.36963C2.02216 4.36973 2.02223 4.3699 2.02233 4.37014C2.02239 4.37026 2.02249 4.37049 2.02251 4.37055C2.02262 4.3708 2.02273 4.37106 1.33337 4.6665C0.644015 4.96194 0.644145 4.96225 0.644283 4.96257C0.644339 4.9627 0.644484 4.96304 0.644597 4.9633C0.644822 4.96382 0.645079 4.96442 0.645367 4.96508C0.645943 4.96641 0.646645 4.96803 0.647473 4.96993C0.64913 4.97372 0.651291 4.97864 0.65396 4.98464C0.659298 4.99664 0.666671 5.013 0.6761 5.03341C0.694953 5.07423 0.722061 5.13135 0.757606 5.20243C0.828639 5.3445 0.933705 5.54305 1.07432 5.77928C1.35471 6.25033 1.78109 6.87907 2.36711 7.51018C3.53871 8.7719 5.3906 10.0832 8.00004 10.0832V9.33317ZM10.3915 8.88564L10.1168 8.18775C9.49772 8.43143 8.7951 8.58317 8.00004 8.58317V9.33317V10.0832C8.9916 10.0832 9.88017 9.89291 10.6662 9.58352L10.3915 8.88564ZM5.60858 8.88564L4.97994 8.4766L4.03807 9.92413L4.66671 10.3332L5.29535 10.7422L6.23722 9.29468L5.60858 8.88564ZM14.6667 4.6665C13.9773 4.37106 13.9774 4.37091 13.9775 4.37076C13.9775 4.37072 13.9776 4.37058 13.9776 4.37049C13.9777 4.37032 13.9777 4.37018 13.9778 4.37005C13.9779 4.3698 13.978 4.36964 13.978 4.36957C13.9781 4.36941 13.978 4.36961 13.9777 4.37014C13.9773 4.37121 13.9762 4.37363 13.9745 4.37736C13.9712 4.38483 13.9655 4.39752 13.9573 4.41503C13.941 4.45007 13.915 4.50434 13.8791 4.5747C13.8072 4.71559 13.6963 4.91998 13.5448 5.1631C13.2405 5.65149 12.7799 6.28423 12.1534 6.87221L12.6667 7.41906L13.18 7.96591C13.9259 7.26575 14.4653 6.52221 14.8179 5.95636C14.9949 5.67235 15.1266 5.43013 15.2153 5.25619C15.2597 5.16913 15.2935 5.09893 15.3168 5.04886C15.3285 5.02381 15.3376 5.00378 15.3441 4.98916C15.3474 4.98186 15.35 4.9759 15.352 4.97135C15.353 4.96907 15.3538 4.96714 15.3545 4.96557C15.3548 4.96479 15.3551 4.96409 15.3554 4.96349C15.3555 4.96319 15.3557 4.96291 15.3558 4.96265C15.3558 4.96252 15.3559 4.96234 15.3559 4.96228C15.356 4.96211 15.3561 4.96194 14.6667 4.6665ZM12.6667 7.41906L12.1534 6.87221C11.5987 7.39287 10.9224 7.87068 10.1168 8.18775L10.3915 8.88564L10.6662 9.58352C11.684 9.18292 12.5176 8.58764 13.18 7.96591L12.6667 7.41906ZM12.6667 7.41906L12.1364 7.94939L13.1364 8.94939L13.6667 8.41906L14.197 7.88873L13.197 6.88873L12.6667 7.41906ZM8.00004 9.33317H7.25004V10.9998H8.00004H8.75004V9.33317H8.00004ZM10.3915 8.88564L9.76286 9.29468L10.7047 10.7422L11.3334 10.3332L11.962 9.92413L11.0201 8.4766L10.3915 8.88564ZM3.33337 7.41906L2.80304 6.88873L1.80304 7.88873L2.33337 8.41906L2.8637 8.94939L3.8637 7.94939L3.33337 7.41906Z",
|
|
17389
|
+
fill: "#646566"
|
|
17390
|
+
}
|
|
17391
|
+
)
|
|
17392
|
+
}
|
|
17393
|
+
);
|
|
17394
|
+
};
|
|
17395
|
+
|
|
17396
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17397
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
17398
|
+
function isSensitive(widget) {
|
|
17399
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
17400
|
+
}
|
|
17401
|
+
function EyeIconComponent({ open }) {
|
|
17402
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeHiddenIcon, {});
|
|
17403
|
+
}
|
|
17404
|
+
var SecureField = (props) => {
|
|
17405
|
+
const {
|
|
17406
|
+
name: name2,
|
|
17407
|
+
readonly,
|
|
17408
|
+
placeholder,
|
|
17409
|
+
required,
|
|
17410
|
+
invisible,
|
|
17411
|
+
methods,
|
|
17412
|
+
onChange: onChange2,
|
|
17413
|
+
string = name2,
|
|
17414
|
+
widget,
|
|
17415
|
+
min: min3,
|
|
17416
|
+
max: max3,
|
|
17417
|
+
special,
|
|
17418
|
+
upcase,
|
|
17419
|
+
digit,
|
|
17420
|
+
regex,
|
|
17421
|
+
className,
|
|
17422
|
+
value,
|
|
17423
|
+
defaultValue,
|
|
17424
|
+
isForm,
|
|
17425
|
+
isEditTable
|
|
17426
|
+
} = props;
|
|
17427
|
+
const { t: t3 } = useI18n();
|
|
17428
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
17429
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
17430
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
17431
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
17432
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
17433
|
+
return message2;
|
|
17434
|
+
};
|
|
17435
|
+
if (!isForm && !isEditTable) {
|
|
17436
|
+
const propValue = value || defaultValue;
|
|
17437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
17438
|
+
}
|
|
17439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17440
|
+
Controller,
|
|
17441
|
+
{
|
|
17442
|
+
name: String(name2),
|
|
17443
|
+
control: methods.control,
|
|
17444
|
+
rules: {
|
|
17445
|
+
...required && !invisible ? {
|
|
17446
|
+
required: {
|
|
17447
|
+
value: true,
|
|
17448
|
+
message: `${string} ${t3("must_required")}`
|
|
17449
|
+
}
|
|
17450
|
+
} : {},
|
|
17451
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
17452
|
+
pattern: {
|
|
17453
|
+
value: new RegExp(regex),
|
|
17454
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
17455
|
+
}
|
|
17456
|
+
} : {}
|
|
17457
|
+
},
|
|
17458
|
+
render: ({
|
|
17459
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
17460
|
+
fieldState: { error: error2 }
|
|
17461
|
+
}) => {
|
|
17462
|
+
const { setError, clearErrors } = methods;
|
|
17463
|
+
const [showPlain, setShowPlain] = (0, import_react41.useState)(false);
|
|
17464
|
+
const realValue = (0, import_react41.useMemo)(
|
|
17465
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
17466
|
+
[value2]
|
|
17467
|
+
);
|
|
17468
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
17469
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
17470
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
17471
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
17472
|
+
(0, import_react41.useEffect)(() => {
|
|
17473
|
+
if (canToggle) setShowPlain(false);
|
|
17474
|
+
}, [canToggle]);
|
|
17475
|
+
(0, import_react41.useEffect)(() => {
|
|
17476
|
+
if (value2) clearErrors(name2);
|
|
17477
|
+
}, [value2, clearErrors, name2]);
|
|
17478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
17479
|
+
isCappedToken && shouldMask && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17480
|
+
"div",
|
|
17481
|
+
{
|
|
17482
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
17483
|
+
"aria-hidden": "true",
|
|
17484
|
+
children: maskedDisplay
|
|
17485
|
+
}
|
|
17486
|
+
),
|
|
17487
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17488
|
+
"input",
|
|
17489
|
+
{
|
|
17490
|
+
value: realValue,
|
|
17491
|
+
onChange: (e3) => {
|
|
17492
|
+
if (readonly) return;
|
|
17493
|
+
const inputValue = e3.target.value ?? "";
|
|
17494
|
+
fieldOnchange(inputValue);
|
|
17495
|
+
clearErrors(name2);
|
|
17496
|
+
},
|
|
17497
|
+
onBlur: (e3) => {
|
|
17498
|
+
if (readonly) return;
|
|
17499
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
17500
|
+
if (!inputValue && required && !invisible) {
|
|
17501
|
+
setError(name2, {
|
|
17502
|
+
type: "required",
|
|
17503
|
+
message: `${string} ${t3("must_required")}`
|
|
17504
|
+
});
|
|
17505
|
+
return;
|
|
17506
|
+
}
|
|
17507
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
17508
|
+
setError(name2, {
|
|
17509
|
+
type: "pattern",
|
|
17510
|
+
message: getPasswordMessage2(
|
|
17511
|
+
min3,
|
|
17512
|
+
max3,
|
|
17513
|
+
upcase,
|
|
17514
|
+
digit,
|
|
17515
|
+
special
|
|
17516
|
+
)
|
|
17517
|
+
});
|
|
17518
|
+
return;
|
|
17519
|
+
}
|
|
17520
|
+
fieldOnchange(inputValue);
|
|
17521
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
17522
|
+
clearErrors(name2);
|
|
17523
|
+
},
|
|
17524
|
+
readOnly: readonly,
|
|
17525
|
+
disabled: readonly,
|
|
17526
|
+
placeholder,
|
|
17527
|
+
required: !invisible && required,
|
|
17528
|
+
style: {
|
|
17529
|
+
...isCappedToken && shouldMask ? {
|
|
17530
|
+
WebkitTextSecurity: "none",
|
|
17531
|
+
color: "transparent",
|
|
17532
|
+
caretColor: void 0
|
|
17533
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
17534
|
+
},
|
|
17535
|
+
onCopy: (e3) => {
|
|
17536
|
+
if (shouldMask) e3.preventDefault();
|
|
17537
|
+
},
|
|
17538
|
+
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
|
|
17539
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
17540
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
17541
|
+
}
|
|
17542
|
+
),
|
|
17543
|
+
canToggle && !isCappedToken && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17544
|
+
"button",
|
|
17545
|
+
{
|
|
17546
|
+
type: "button",
|
|
17547
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
17548
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
17549
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIconComponent, { open: showPlain })
|
|
17550
|
+
}
|
|
17551
|
+
),
|
|
17552
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17553
|
+
] });
|
|
17554
|
+
}
|
|
17555
|
+
}
|
|
17556
|
+
);
|
|
17557
|
+
};
|
|
17558
|
+
|
|
17559
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17560
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
17368
17561
|
var CheckboxField = (props) => {
|
|
17369
17562
|
const {
|
|
17370
17563
|
name: name2,
|
|
@@ -17379,9 +17572,9 @@ var CheckboxField = (props) => {
|
|
|
17379
17572
|
} = props;
|
|
17380
17573
|
if (!isForm) {
|
|
17381
17574
|
if (name2 === "is_active" || name2 === "active") {
|
|
17382
|
-
return /* @__PURE__ */ (0,
|
|
17575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ActiveBadgeField, { type: value });
|
|
17383
17576
|
} else {
|
|
17384
|
-
return /* @__PURE__ */ (0,
|
|
17577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17385
17578
|
"input",
|
|
17386
17579
|
{
|
|
17387
17580
|
type: "checkbox",
|
|
@@ -17392,12 +17585,12 @@ var CheckboxField = (props) => {
|
|
|
17392
17585
|
);
|
|
17393
17586
|
}
|
|
17394
17587
|
}
|
|
17395
|
-
return /* @__PURE__ */ (0,
|
|
17588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17396
17589
|
Controller,
|
|
17397
17590
|
{
|
|
17398
17591
|
name: name2 ?? "",
|
|
17399
17592
|
control: methods?.control,
|
|
17400
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
17593
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17401
17594
|
"div",
|
|
17402
17595
|
{
|
|
17403
17596
|
className: "flex items-center gap-2",
|
|
@@ -17410,7 +17603,7 @@ var CheckboxField = (props) => {
|
|
|
17410
17603
|
onChange2(name2 ?? "", checked);
|
|
17411
17604
|
}
|
|
17412
17605
|
},
|
|
17413
|
-
children: /* @__PURE__ */ (0,
|
|
17606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17414
17607
|
"input",
|
|
17415
17608
|
{
|
|
17416
17609
|
...field,
|
|
@@ -17437,21 +17630,21 @@ var CheckboxField = (props) => {
|
|
|
17437
17630
|
};
|
|
17438
17631
|
|
|
17439
17632
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17440
|
-
var
|
|
17441
|
-
var
|
|
17633
|
+
var import_react42 = require("react");
|
|
17634
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
17442
17635
|
var ColorWrapper = (props) => {
|
|
17443
17636
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
17444
17637
|
const { t: t3 } = useI18n();
|
|
17445
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
17446
|
-
const [showFullColors, setIsShowFullColor] = (0,
|
|
17447
|
-
const pickColorsRef = (0,
|
|
17448
|
-
(0,
|
|
17638
|
+
const [selectedColor, setSelectedColor] = (0, import_react42.useState)(colors2[defaultColor]);
|
|
17639
|
+
const [showFullColors, setIsShowFullColor] = (0, import_react42.useState)(false);
|
|
17640
|
+
const pickColorsRef = (0, import_react42.useRef)(null);
|
|
17641
|
+
(0, import_react42.useEffect)(() => {
|
|
17449
17642
|
setSelectedColor(colors2[defaultColor]);
|
|
17450
17643
|
}, [defaultColor]);
|
|
17451
17644
|
const handleShowFullColors = () => {
|
|
17452
17645
|
setIsShowFullColor(!showFullColors);
|
|
17453
17646
|
};
|
|
17454
|
-
(0,
|
|
17647
|
+
(0, import_react42.useEffect)(() => {
|
|
17455
17648
|
const handleClickOutside = (event) => {
|
|
17456
17649
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17457
17650
|
setIsShowFullColor(false);
|
|
@@ -17462,8 +17655,8 @@ var ColorWrapper = (props) => {
|
|
|
17462
17655
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17463
17656
|
};
|
|
17464
17657
|
}, []);
|
|
17465
|
-
return /* @__PURE__ */ (0,
|
|
17466
|
-
/* @__PURE__ */ (0,
|
|
17658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
|
|
17659
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17467
17660
|
"button",
|
|
17468
17661
|
{
|
|
17469
17662
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17477,7 +17670,7 @@ var ColorWrapper = (props) => {
|
|
|
17477
17670
|
}
|
|
17478
17671
|
}
|
|
17479
17672
|
),
|
|
17480
|
-
/* @__PURE__ */ (0,
|
|
17673
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17481
17674
|
M,
|
|
17482
17675
|
{
|
|
17483
17676
|
className: "",
|
|
@@ -17486,8 +17679,8 @@ var ColorWrapper = (props) => {
|
|
|
17486
17679
|
content: t3(color?.name)
|
|
17487
17680
|
}
|
|
17488
17681
|
)
|
|
17489
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
17490
|
-
/* @__PURE__ */ (0,
|
|
17682
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
17683
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17491
17684
|
"button",
|
|
17492
17685
|
{
|
|
17493
17686
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17500,7 +17693,7 @@ var ColorWrapper = (props) => {
|
|
|
17500
17693
|
style: { backgroundColor: selectedColor?.color }
|
|
17501
17694
|
}
|
|
17502
17695
|
),
|
|
17503
|
-
/* @__PURE__ */ (0,
|
|
17696
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17504
17697
|
M,
|
|
17505
17698
|
{
|
|
17506
17699
|
place: "top",
|
|
@@ -17512,13 +17705,13 @@ var ColorWrapper = (props) => {
|
|
|
17512
17705
|
};
|
|
17513
17706
|
|
|
17514
17707
|
// src/widgets/basic/color-field/color.tsx
|
|
17515
|
-
var
|
|
17708
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
17516
17709
|
var ColorField = (props) => {
|
|
17517
17710
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17518
17711
|
if (!isForm) {
|
|
17519
|
-
return /* @__PURE__ */ (0,
|
|
17712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17520
17713
|
}
|
|
17521
|
-
return /* @__PURE__ */ (0,
|
|
17714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
17522
17715
|
Controller,
|
|
17523
17716
|
{
|
|
17524
17717
|
name: name2 ?? "",
|
|
@@ -17528,7 +17721,7 @@ var ColorField = (props) => {
|
|
|
17528
17721
|
field.onChange(color?.id);
|
|
17529
17722
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17530
17723
|
};
|
|
17531
|
-
return /* @__PURE__ */ (0,
|
|
17724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
17532
17725
|
ColorWrapper,
|
|
17533
17726
|
{
|
|
17534
17727
|
savePickColor: handlePickColorChange,
|
|
@@ -17542,8 +17735,8 @@ var ColorField = (props) => {
|
|
|
17542
17735
|
};
|
|
17543
17736
|
|
|
17544
17737
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17545
|
-
var
|
|
17546
|
-
var
|
|
17738
|
+
var import_react43 = require("react");
|
|
17739
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
17547
17740
|
var CopyLinkButtonField = (props) => {
|
|
17548
17741
|
const {
|
|
17549
17742
|
isForm,
|
|
@@ -17562,9 +17755,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17562
17755
|
} = props;
|
|
17563
17756
|
const { t: t3 } = useI18n();
|
|
17564
17757
|
if (!isForm) {
|
|
17565
|
-
return /* @__PURE__ */ (0,
|
|
17758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17566
17759
|
}
|
|
17567
|
-
return /* @__PURE__ */ (0,
|
|
17760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17568
17761
|
Controller,
|
|
17569
17762
|
{
|
|
17570
17763
|
name: name2 ?? "",
|
|
@@ -17577,13 +17770,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17577
17770
|
fieldState: { error: error2 }
|
|
17578
17771
|
}) => {
|
|
17579
17772
|
const { setError, clearErrors } = methods;
|
|
17580
|
-
(0,
|
|
17773
|
+
(0, import_react43.useEffect)(() => {
|
|
17581
17774
|
if (value) {
|
|
17582
17775
|
clearErrors(name2);
|
|
17583
17776
|
}
|
|
17584
17777
|
}, [value]);
|
|
17585
|
-
return /* @__PURE__ */ (0,
|
|
17586
|
-
/* @__PURE__ */ (0,
|
|
17778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "relative", children: [
|
|
17779
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
17587
17780
|
"div",
|
|
17588
17781
|
{
|
|
17589
17782
|
"aria-disabled": readonly,
|
|
@@ -17592,7 +17785,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17592
17785
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17593
17786
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17594
17787
|
children: [
|
|
17595
|
-
/* @__PURE__ */ (0,
|
|
17788
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17596
17789
|
"input",
|
|
17597
17790
|
{
|
|
17598
17791
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17633,19 +17826,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17633
17826
|
`
|
|
17634
17827
|
}
|
|
17635
17828
|
),
|
|
17636
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17829
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17637
17830
|
"button",
|
|
17638
17831
|
{
|
|
17639
17832
|
className: "cursor-pointer",
|
|
17640
17833
|
type: "button",
|
|
17641
17834
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17642
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17835
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, {})
|
|
17643
17836
|
}
|
|
17644
17837
|
)
|
|
17645
17838
|
]
|
|
17646
17839
|
}
|
|
17647
17840
|
),
|
|
17648
|
-
error2 && /* @__PURE__ */ (0,
|
|
17841
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17649
17842
|
] });
|
|
17650
17843
|
}
|
|
17651
17844
|
}
|
|
@@ -17653,10 +17846,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17653
17846
|
};
|
|
17654
17847
|
|
|
17655
17848
|
// src/widgets/basic/date-field/date.tsx
|
|
17656
|
-
var
|
|
17849
|
+
var import_react56 = require("react");
|
|
17657
17850
|
|
|
17658
17851
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17659
|
-
var
|
|
17852
|
+
var import_react46 = __toESM(require("react"));
|
|
17660
17853
|
|
|
17661
17854
|
// node_modules/date-fns/constants.js
|
|
17662
17855
|
var daysInYear = 365.2425;
|
|
@@ -21554,22 +21747,22 @@ function subYears(date, amount, options2) {
|
|
|
21554
21747
|
}
|
|
21555
21748
|
|
|
21556
21749
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21557
|
-
var
|
|
21750
|
+
var React9 = __toESM(require("react"), 1);
|
|
21558
21751
|
|
|
21559
21752
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
21560
|
-
var
|
|
21561
|
-
var
|
|
21753
|
+
var React7 = __toESM(require("react"), 1);
|
|
21754
|
+
var import_react44 = require("react");
|
|
21562
21755
|
var isClient = typeof document !== "undefined";
|
|
21563
21756
|
var noop2 = function noop3() {
|
|
21564
21757
|
};
|
|
21565
|
-
var index = isClient ?
|
|
21758
|
+
var index = isClient ? import_react44.useLayoutEffect : noop2;
|
|
21566
21759
|
var SafeReact = {
|
|
21567
|
-
...
|
|
21760
|
+
...React7
|
|
21568
21761
|
};
|
|
21569
21762
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
21570
21763
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
21571
21764
|
function useEffectEvent(callback) {
|
|
21572
|
-
const ref =
|
|
21765
|
+
const ref = React7.useRef(() => {
|
|
21573
21766
|
if (process.env.NODE_ENV !== "production") {
|
|
21574
21767
|
throw new Error("Cannot call an event handler while rendering.");
|
|
21575
21768
|
}
|
|
@@ -21577,7 +21770,7 @@ function useEffectEvent(callback) {
|
|
|
21577
21770
|
useSafeInsertionEffect(() => {
|
|
21578
21771
|
ref.current = callback;
|
|
21579
21772
|
});
|
|
21580
|
-
return
|
|
21773
|
+
return React7.useCallback(function() {
|
|
21581
21774
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21582
21775
|
args[_key] = arguments[_key];
|
|
21583
21776
|
}
|
|
@@ -21586,17 +21779,17 @@ function useEffectEvent(callback) {
|
|
|
21586
21779
|
}
|
|
21587
21780
|
|
|
21588
21781
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21589
|
-
var
|
|
21782
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
21590
21783
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
21591
21784
|
|
|
21592
21785
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
21593
|
-
var
|
|
21594
|
-
var
|
|
21786
|
+
var React8 = __toESM(require("react"), 1);
|
|
21787
|
+
var import_react45 = require("react");
|
|
21595
21788
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
21596
21789
|
var isClient2 = typeof document !== "undefined";
|
|
21597
21790
|
var noop4 = function noop5() {
|
|
21598
21791
|
};
|
|
21599
|
-
var index2 = isClient2 ?
|
|
21792
|
+
var index2 = isClient2 ? import_react45.useLayoutEffect : noop4;
|
|
21600
21793
|
function deepEqual2(a2, b2) {
|
|
21601
21794
|
if (a2 === b2) {
|
|
21602
21795
|
return true;
|
|
@@ -21656,7 +21849,7 @@ function roundByDPR(element, value) {
|
|
|
21656
21849
|
return Math.round(value * dpr) / dpr;
|
|
21657
21850
|
}
|
|
21658
21851
|
function useLatestRef(value) {
|
|
21659
|
-
const ref =
|
|
21852
|
+
const ref = React8.useRef(value);
|
|
21660
21853
|
index2(() => {
|
|
21661
21854
|
ref.current = value;
|
|
21662
21855
|
});
|
|
@@ -21679,7 +21872,7 @@ function useFloating(options2) {
|
|
|
21679
21872
|
whileElementsMounted,
|
|
21680
21873
|
open
|
|
21681
21874
|
} = options2;
|
|
21682
|
-
const [data, setData] =
|
|
21875
|
+
const [data, setData] = React8.useState({
|
|
21683
21876
|
x: 0,
|
|
21684
21877
|
y: 0,
|
|
21685
21878
|
strategy,
|
|
@@ -21687,19 +21880,19 @@ function useFloating(options2) {
|
|
|
21687
21880
|
middlewareData: {},
|
|
21688
21881
|
isPositioned: false
|
|
21689
21882
|
});
|
|
21690
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21883
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
21691
21884
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
21692
21885
|
setLatestMiddleware(middleware2);
|
|
21693
21886
|
}
|
|
21694
|
-
const [_reference, _setReference] =
|
|
21695
|
-
const [_floating, _setFloating] =
|
|
21696
|
-
const setReference =
|
|
21887
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21888
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21889
|
+
const setReference = React8.useCallback((node2) => {
|
|
21697
21890
|
if (node2 !== referenceRef.current) {
|
|
21698
21891
|
referenceRef.current = node2;
|
|
21699
21892
|
_setReference(node2);
|
|
21700
21893
|
}
|
|
21701
21894
|
}, []);
|
|
21702
|
-
const setFloating =
|
|
21895
|
+
const setFloating = React8.useCallback((node2) => {
|
|
21703
21896
|
if (node2 !== floatingRef.current) {
|
|
21704
21897
|
floatingRef.current = node2;
|
|
21705
21898
|
_setFloating(node2);
|
|
@@ -21707,14 +21900,14 @@ function useFloating(options2) {
|
|
|
21707
21900
|
}, []);
|
|
21708
21901
|
const referenceEl = externalReference || _reference;
|
|
21709
21902
|
const floatingEl = externalFloating || _floating;
|
|
21710
|
-
const referenceRef =
|
|
21711
|
-
const floatingRef =
|
|
21712
|
-
const dataRef =
|
|
21903
|
+
const referenceRef = React8.useRef(null);
|
|
21904
|
+
const floatingRef = React8.useRef(null);
|
|
21905
|
+
const dataRef = React8.useRef(data);
|
|
21713
21906
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
21714
21907
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
21715
21908
|
const platformRef = useLatestRef(platform2);
|
|
21716
21909
|
const openRef = useLatestRef(open);
|
|
21717
|
-
const update =
|
|
21910
|
+
const update = React8.useCallback(() => {
|
|
21718
21911
|
if (!referenceRef.current || !floatingRef.current) {
|
|
21719
21912
|
return;
|
|
21720
21913
|
}
|
|
@@ -21752,7 +21945,7 @@ function useFloating(options2) {
|
|
|
21752
21945
|
}));
|
|
21753
21946
|
}
|
|
21754
21947
|
}, [open]);
|
|
21755
|
-
const isMountedRef =
|
|
21948
|
+
const isMountedRef = React8.useRef(false);
|
|
21756
21949
|
index2(() => {
|
|
21757
21950
|
isMountedRef.current = true;
|
|
21758
21951
|
return () => {
|
|
@@ -21769,17 +21962,17 @@ function useFloating(options2) {
|
|
|
21769
21962
|
update();
|
|
21770
21963
|
}
|
|
21771
21964
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21772
|
-
const refs =
|
|
21965
|
+
const refs = React8.useMemo(() => ({
|
|
21773
21966
|
reference: referenceRef,
|
|
21774
21967
|
floating: floatingRef,
|
|
21775
21968
|
setReference,
|
|
21776
21969
|
setFloating
|
|
21777
21970
|
}), [setReference, setFloating]);
|
|
21778
|
-
const elements =
|
|
21971
|
+
const elements = React8.useMemo(() => ({
|
|
21779
21972
|
reference: referenceEl,
|
|
21780
21973
|
floating: floatingEl
|
|
21781
21974
|
}), [referenceEl, floatingEl]);
|
|
21782
|
-
const floatingStyles =
|
|
21975
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21783
21976
|
const initialStyles = {
|
|
21784
21977
|
position: strategy,
|
|
21785
21978
|
left: 0,
|
|
@@ -21805,7 +21998,7 @@ function useFloating(options2) {
|
|
|
21805
21998
|
top: y3
|
|
21806
21999
|
};
|
|
21807
22000
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21808
|
-
return
|
|
22001
|
+
return React8.useMemo(() => ({
|
|
21809
22002
|
...data,
|
|
21810
22003
|
update,
|
|
21811
22004
|
refs,
|
|
@@ -21866,7 +22059,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21866
22059
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21867
22060
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21868
22061
|
var SafeReact2 = {
|
|
21869
|
-
...
|
|
22062
|
+
...React9
|
|
21870
22063
|
};
|
|
21871
22064
|
var serverHandoffComplete = false;
|
|
21872
22065
|
var count = 0;
|
|
@@ -21876,13 +22069,13 @@ var genId = () => (
|
|
|
21876
22069
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21877
22070
|
);
|
|
21878
22071
|
function useFloatingId() {
|
|
21879
|
-
const [id, setId] =
|
|
22072
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21880
22073
|
index(() => {
|
|
21881
22074
|
if (id == null) {
|
|
21882
22075
|
setId(genId());
|
|
21883
22076
|
}
|
|
21884
22077
|
}, []);
|
|
21885
|
-
|
|
22078
|
+
React9.useEffect(() => {
|
|
21886
22079
|
serverHandoffComplete = true;
|
|
21887
22080
|
}, []);
|
|
21888
22081
|
return id;
|
|
@@ -21917,7 +22110,7 @@ function error() {
|
|
|
21917
22110
|
console.error(message2);
|
|
21918
22111
|
}
|
|
21919
22112
|
}
|
|
21920
|
-
var FloatingArrow = /* @__PURE__ */
|
|
22113
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21921
22114
|
const {
|
|
21922
22115
|
context: {
|
|
21923
22116
|
placement,
|
|
@@ -21948,7 +22141,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21948
22141
|
}
|
|
21949
22142
|
}
|
|
21950
22143
|
const clipPathId = useId();
|
|
21951
|
-
const [isRTL2, setIsRTL] =
|
|
22144
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21952
22145
|
index(() => {
|
|
21953
22146
|
if (!floating) return;
|
|
21954
22147
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21984,7 +22177,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21984
22177
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21985
22178
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21986
22179
|
}[side];
|
|
21987
|
-
return /* @__PURE__ */ (0,
|
|
22180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("svg", {
|
|
21988
22181
|
...rest,
|
|
21989
22182
|
"aria-hidden": true,
|
|
21990
22183
|
ref,
|
|
@@ -22000,18 +22193,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22000
22193
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
22001
22194
|
...restStyle
|
|
22002
22195
|
},
|
|
22003
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
22196
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
22004
22197
|
clipPath: "url(#" + clipPathId + ")",
|
|
22005
22198
|
fill: "none",
|
|
22006
22199
|
stroke,
|
|
22007
22200
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
22008
22201
|
d: dValue
|
|
22009
|
-
}), /* @__PURE__ */ (0,
|
|
22202
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
22010
22203
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
22011
22204
|
d: dValue
|
|
22012
|
-
}), /* @__PURE__ */ (0,
|
|
22205
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("clipPath", {
|
|
22013
22206
|
id: clipPathId,
|
|
22014
|
-
children: /* @__PURE__ */ (0,
|
|
22207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("rect", {
|
|
22015
22208
|
x: -halfStrokeWidth,
|
|
22016
22209
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
22017
22210
|
width: width + computedStrokeWidth,
|
|
@@ -22039,13 +22232,13 @@ function createEventEmitter() {
|
|
|
22039
22232
|
}
|
|
22040
22233
|
};
|
|
22041
22234
|
}
|
|
22042
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
22043
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
22235
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22236
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22044
22237
|
var useFloatingParentNodeId = () => {
|
|
22045
22238
|
var _React$useContext;
|
|
22046
|
-
return ((_React$useContext =
|
|
22239
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
22047
22240
|
};
|
|
22048
|
-
var useFloatingTree = () =>
|
|
22241
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
22049
22242
|
function useFloatingRootContext(options2) {
|
|
22050
22243
|
const {
|
|
22051
22244
|
open = false,
|
|
@@ -22053,8 +22246,8 @@ function useFloatingRootContext(options2) {
|
|
|
22053
22246
|
elements: elementsProp
|
|
22054
22247
|
} = options2;
|
|
22055
22248
|
const floatingId = useId();
|
|
22056
|
-
const dataRef =
|
|
22057
|
-
const [events] =
|
|
22249
|
+
const dataRef = React9.useRef({});
|
|
22250
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
22058
22251
|
const nested = useFloatingParentNodeId() != null;
|
|
22059
22252
|
if (process.env.NODE_ENV !== "production") {
|
|
22060
22253
|
const optionDomReference = elementsProp.reference;
|
|
@@ -22062,7 +22255,7 @@ function useFloatingRootContext(options2) {
|
|
|
22062
22255
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
22063
22256
|
}
|
|
22064
22257
|
}
|
|
22065
|
-
const [positionReference, setPositionReference] =
|
|
22258
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
22066
22259
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
22067
22260
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
22068
22261
|
events.emit("openchange", {
|
|
@@ -22073,15 +22266,15 @@ function useFloatingRootContext(options2) {
|
|
|
22073
22266
|
});
|
|
22074
22267
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
22075
22268
|
});
|
|
22076
|
-
const refs =
|
|
22269
|
+
const refs = React9.useMemo(() => ({
|
|
22077
22270
|
setPositionReference
|
|
22078
22271
|
}), []);
|
|
22079
|
-
const elements =
|
|
22272
|
+
const elements = React9.useMemo(() => ({
|
|
22080
22273
|
reference: positionReference || elementsProp.reference || null,
|
|
22081
22274
|
floating: elementsProp.floating || null,
|
|
22082
22275
|
domReference: elementsProp.reference
|
|
22083
22276
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
22084
|
-
return
|
|
22277
|
+
return React9.useMemo(() => ({
|
|
22085
22278
|
dataRef,
|
|
22086
22279
|
open,
|
|
22087
22280
|
onOpenChange,
|
|
@@ -22108,11 +22301,11 @@ function useFloating2(options2) {
|
|
|
22108
22301
|
});
|
|
22109
22302
|
const rootContext = options2.rootContext || internalRootContext;
|
|
22110
22303
|
const computedElements = rootContext.elements;
|
|
22111
|
-
const [_domReference, setDomReference] =
|
|
22112
|
-
const [positionReference, _setPositionReference] =
|
|
22304
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
22305
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
22113
22306
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
22114
22307
|
const domReference = optionDomReference || _domReference;
|
|
22115
|
-
const domReferenceRef =
|
|
22308
|
+
const domReferenceRef = React9.useRef(null);
|
|
22116
22309
|
const tree = useFloatingTree();
|
|
22117
22310
|
index(() => {
|
|
22118
22311
|
if (domReference) {
|
|
@@ -22128,7 +22321,7 @@ function useFloating2(options2) {
|
|
|
22128
22321
|
}
|
|
22129
22322
|
}
|
|
22130
22323
|
});
|
|
22131
|
-
const setPositionReference =
|
|
22324
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
22132
22325
|
const computedPositionReference = isElement(node2) ? {
|
|
22133
22326
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
22134
22327
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -22137,7 +22330,7 @@ function useFloating2(options2) {
|
|
|
22137
22330
|
_setPositionReference(computedPositionReference);
|
|
22138
22331
|
position2.refs.setReference(computedPositionReference);
|
|
22139
22332
|
}, [position2.refs]);
|
|
22140
|
-
const setReference =
|
|
22333
|
+
const setReference = React9.useCallback((node2) => {
|
|
22141
22334
|
if (isElement(node2) || node2 === null) {
|
|
22142
22335
|
domReferenceRef.current = node2;
|
|
22143
22336
|
setDomReference(node2);
|
|
@@ -22149,17 +22342,17 @@ function useFloating2(options2) {
|
|
|
22149
22342
|
position2.refs.setReference(node2);
|
|
22150
22343
|
}
|
|
22151
22344
|
}, [position2.refs]);
|
|
22152
|
-
const refs =
|
|
22345
|
+
const refs = React9.useMemo(() => ({
|
|
22153
22346
|
...position2.refs,
|
|
22154
22347
|
setReference,
|
|
22155
22348
|
setPositionReference,
|
|
22156
22349
|
domReference: domReferenceRef
|
|
22157
22350
|
}), [position2.refs, setReference, setPositionReference]);
|
|
22158
|
-
const elements =
|
|
22351
|
+
const elements = React9.useMemo(() => ({
|
|
22159
22352
|
...position2.elements,
|
|
22160
22353
|
domReference
|
|
22161
22354
|
}), [position2.elements, domReference]);
|
|
22162
|
-
const context =
|
|
22355
|
+
const context = React9.useMemo(() => ({
|
|
22163
22356
|
...position2,
|
|
22164
22357
|
...rootContext,
|
|
22165
22358
|
refs,
|
|
@@ -22173,7 +22366,7 @@ function useFloating2(options2) {
|
|
|
22173
22366
|
node2.context = context;
|
|
22174
22367
|
}
|
|
22175
22368
|
});
|
|
22176
|
-
return
|
|
22369
|
+
return React9.useMemo(() => ({
|
|
22177
22370
|
...position2,
|
|
22178
22371
|
context,
|
|
22179
22372
|
refs,
|
|
@@ -22223,13 +22416,13 @@ function __spreadArray(to2, from2, pack) {
|
|
|
22223
22416
|
var CalendarContainer = function(_a2) {
|
|
22224
22417
|
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;
|
|
22225
22418
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
22226
|
-
return
|
|
22419
|
+
return import_react46.default.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22227
22420
|
};
|
|
22228
22421
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22229
|
-
var ref = (0,
|
|
22230
|
-
var onClickOutsideRef = (0,
|
|
22422
|
+
var ref = (0, import_react46.useRef)(null);
|
|
22423
|
+
var onClickOutsideRef = (0, import_react46.useRef)(onClickOutside);
|
|
22231
22424
|
onClickOutsideRef.current = onClickOutside;
|
|
22232
|
-
var handleClickOutside = (0,
|
|
22425
|
+
var handleClickOutside = (0, import_react46.useCallback)(function(event) {
|
|
22233
22426
|
var _a2;
|
|
22234
22427
|
var target = event.composed && event.composedPath && event.composedPath().find(function(eventTarget) {
|
|
22235
22428
|
return eventTarget instanceof Node;
|
|
@@ -22240,7 +22433,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22240
22433
|
}
|
|
22241
22434
|
}
|
|
22242
22435
|
}, [ignoreClass]);
|
|
22243
|
-
(0,
|
|
22436
|
+
(0, import_react46.useEffect)(function() {
|
|
22244
22437
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22245
22438
|
return function() {
|
|
22246
22439
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -22251,7 +22444,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22251
22444
|
var ClickOutsideWrapper = function(_a2) {
|
|
22252
22445
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
22253
22446
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
22254
|
-
return
|
|
22447
|
+
return import_react46.default.createElement("div", { className, style, ref: function(node2) {
|
|
22255
22448
|
detectRef.current = node2;
|
|
22256
22449
|
if (containerRef) {
|
|
22257
22450
|
containerRef.current = node2;
|
|
@@ -22847,7 +23040,7 @@ var InputTime = (
|
|
|
22847
23040
|
__extends(InputTime2, _super);
|
|
22848
23041
|
function InputTime2(props) {
|
|
22849
23042
|
var _this = _super.call(this, props) || this;
|
|
22850
|
-
_this.inputRef =
|
|
23043
|
+
_this.inputRef = import_react46.default.createRef();
|
|
22851
23044
|
_this.onTimeChange = function(time) {
|
|
22852
23045
|
var _a2, _b;
|
|
22853
23046
|
_this.setState({ time });
|
|
@@ -22865,13 +23058,13 @@ var InputTime = (
|
|
|
22865
23058
|
var time = _this.state.time;
|
|
22866
23059
|
var _a2 = _this.props, date = _a2.date, timeString = _a2.timeString, customTimeInput = _a2.customTimeInput;
|
|
22867
23060
|
if (customTimeInput) {
|
|
22868
|
-
return (0,
|
|
23061
|
+
return (0, import_react46.cloneElement)(customTimeInput, {
|
|
22869
23062
|
date,
|
|
22870
23063
|
value: time,
|
|
22871
23064
|
onChange: _this.onTimeChange
|
|
22872
23065
|
});
|
|
22873
23066
|
}
|
|
22874
|
-
return
|
|
23067
|
+
return import_react46.default.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22875
23068
|
var _a3;
|
|
22876
23069
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22877
23070
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22892,19 +23085,19 @@ var InputTime = (
|
|
|
22892
23085
|
return null;
|
|
22893
23086
|
};
|
|
22894
23087
|
InputTime2.prototype.render = function() {
|
|
22895
|
-
return
|
|
23088
|
+
return import_react46.default.createElement(
|
|
22896
23089
|
"div",
|
|
22897
23090
|
{ className: "react-datepicker__input-time-container" },
|
|
22898
|
-
|
|
22899
|
-
|
|
23091
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
23092
|
+
import_react46.default.createElement(
|
|
22900
23093
|
"div",
|
|
22901
23094
|
{ className: "react-datepicker-time__input-container" },
|
|
22902
|
-
|
|
23095
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22903
23096
|
)
|
|
22904
23097
|
);
|
|
22905
23098
|
};
|
|
22906
23099
|
return InputTime2;
|
|
22907
|
-
}(
|
|
23100
|
+
}(import_react46.Component)
|
|
22908
23101
|
);
|
|
22909
23102
|
var Day = (
|
|
22910
23103
|
/** @class */
|
|
@@ -22912,7 +23105,7 @@ var Day = (
|
|
|
22912
23105
|
__extends(Day2, _super);
|
|
22913
23106
|
function Day2() {
|
|
22914
23107
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22915
|
-
_this.dayEl = (0,
|
|
23108
|
+
_this.dayEl = (0, import_react46.createRef)();
|
|
22916
23109
|
_this.handleClick = function(event) {
|
|
22917
23110
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
22918
23111
|
_this.props.onClick(event);
|
|
@@ -23147,11 +23340,11 @@ var Day = (
|
|
|
23147
23340
|
_this.render = function() {
|
|
23148
23341
|
return (
|
|
23149
23342
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
23150
|
-
|
|
23343
|
+
import_react46.default.createElement(
|
|
23151
23344
|
"div",
|
|
23152
23345
|
{ 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() },
|
|
23153
23346
|
_this.renderDayContents(),
|
|
23154
|
-
_this.getTitle() !== "" &&
|
|
23347
|
+
_this.getTitle() !== "" && import_react46.default.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
23155
23348
|
)
|
|
23156
23349
|
);
|
|
23157
23350
|
};
|
|
@@ -23192,7 +23385,7 @@ var Day = (
|
|
|
23192
23385
|
);
|
|
23193
23386
|
};
|
|
23194
23387
|
return Day2;
|
|
23195
|
-
}(
|
|
23388
|
+
}(import_react46.Component)
|
|
23196
23389
|
);
|
|
23197
23390
|
var WeekNumber = (
|
|
23198
23391
|
/** @class */
|
|
@@ -23200,7 +23393,7 @@ var WeekNumber = (
|
|
|
23200
23393
|
__extends(WeekNumber2, _super);
|
|
23201
23394
|
function WeekNumber2() {
|
|
23202
23395
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23203
|
-
_this.weekNumberEl = (0,
|
|
23396
|
+
_this.weekNumberEl = (0, import_react46.createRef)();
|
|
23204
23397
|
_this.handleClick = function(event) {
|
|
23205
23398
|
if (_this.props.onClick) {
|
|
23206
23399
|
_this.props.onClick(event);
|
|
@@ -23260,10 +23453,10 @@ var WeekNumber = (
|
|
|
23260
23453
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
23261
23454
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
23262
23455
|
};
|
|
23263
|
-
return
|
|
23456
|
+
return import_react46.default.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);
|
|
23264
23457
|
};
|
|
23265
23458
|
return WeekNumber2;
|
|
23266
|
-
}(
|
|
23459
|
+
}(import_react46.Component)
|
|
23267
23460
|
);
|
|
23268
23461
|
var Week = (
|
|
23269
23462
|
/** @class */
|
|
@@ -23337,11 +23530,11 @@ var Week = (
|
|
|
23337
23530
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
23338
23531
|
if (_this.props.showWeekNumber) {
|
|
23339
23532
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
23340
|
-
days.push(
|
|
23533
|
+
days.push(import_react46.default.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
23341
23534
|
}
|
|
23342
23535
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
23343
23536
|
var day = addDays(startOfWeek2, offset4);
|
|
23344
|
-
return
|
|
23537
|
+
return import_react46.default.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) }));
|
|
23345
23538
|
}));
|
|
23346
23539
|
};
|
|
23347
23540
|
_this.startOfWeek = function() {
|
|
@@ -23367,10 +23560,10 @@ var Week = (
|
|
|
23367
23560
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
23368
23561
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
23369
23562
|
};
|
|
23370
|
-
return
|
|
23563
|
+
return import_react46.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
23371
23564
|
};
|
|
23372
23565
|
return Week2;
|
|
23373
|
-
}(
|
|
23566
|
+
}(import_react46.Component)
|
|
23374
23567
|
);
|
|
23375
23568
|
var _a;
|
|
23376
23569
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
@@ -23422,10 +23615,10 @@ var Month = (
|
|
|
23422
23615
|
function Month2() {
|
|
23423
23616
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23424
23617
|
_this.MONTH_REFS = __spreadArray([], Array(12), true).map(function() {
|
|
23425
|
-
return (0,
|
|
23618
|
+
return (0, import_react46.createRef)();
|
|
23426
23619
|
});
|
|
23427
23620
|
_this.QUARTER_REFS = __spreadArray([], Array(4), true).map(function() {
|
|
23428
|
-
return (0,
|
|
23621
|
+
return (0, import_react46.createRef)();
|
|
23429
23622
|
});
|
|
23430
23623
|
_this.isDisabled = function(day) {
|
|
23431
23624
|
return isDayDisabled(day, {
|
|
@@ -23595,7 +23788,7 @@ var Month = (
|
|
|
23595
23788
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
23596
23789
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
23597
23790
|
while (true) {
|
|
23598
|
-
weeks.push(
|
|
23791
|
+
weeks.push(import_react46.default.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 })));
|
|
23599
23792
|
if (breakAfterNextPush)
|
|
23600
23793
|
break;
|
|
23601
23794
|
i3++;
|
|
@@ -23864,8 +24057,8 @@ var Month = (
|
|
|
23864
24057
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23865
24058
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23866
24059
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23867
|
-
return
|
|
23868
|
-
return
|
|
24060
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
24061
|
+
return import_react46.default.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23869
24062
|
_this.onMonthClick(event, m);
|
|
23870
24063
|
}, onKeyDown: function(event) {
|
|
23871
24064
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23884,8 +24077,8 @@ var Month = (
|
|
|
23884
24077
|
_this.renderQuarters = function() {
|
|
23885
24078
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23886
24079
|
var quarters = [1, 2, 3, 4];
|
|
23887
|
-
return
|
|
23888
|
-
return
|
|
24080
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
24081
|
+
return import_react46.default.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23889
24082
|
_this.onQuarterClick(event, q3);
|
|
23890
24083
|
}, onKeyDown: function(event) {
|
|
23891
24084
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23917,10 +24110,10 @@ var Month = (
|
|
|
23917
24110
|
Month2.prototype.render = function() {
|
|
23918
24111
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23919
24112
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23920
|
-
return
|
|
24113
|
+
return import_react46.default.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());
|
|
23921
24114
|
};
|
|
23922
24115
|
return Month2;
|
|
23923
|
-
}(
|
|
24116
|
+
}(import_react46.Component)
|
|
23924
24117
|
);
|
|
23925
24118
|
var MonthDropdownOptions = (
|
|
23926
24119
|
/** @class */
|
|
@@ -23933,10 +24126,10 @@ var MonthDropdownOptions = (
|
|
|
23933
24126
|
};
|
|
23934
24127
|
_this.renderOptions = function() {
|
|
23935
24128
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23936
|
-
return
|
|
24129
|
+
return import_react46.default.createElement(
|
|
23937
24130
|
"div",
|
|
23938
24131
|
{ 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 },
|
|
23939
|
-
_this.isSelectedMonth(i3) ?
|
|
24132
|
+
_this.isSelectedMonth(i3) ? import_react46.default.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23940
24133
|
month
|
|
23941
24134
|
);
|
|
23942
24135
|
});
|
|
@@ -23950,10 +24143,10 @@ var MonthDropdownOptions = (
|
|
|
23950
24143
|
return _this;
|
|
23951
24144
|
}
|
|
23952
24145
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23953
|
-
return
|
|
24146
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23954
24147
|
};
|
|
23955
24148
|
return MonthDropdownOptions2;
|
|
23956
|
-
}(
|
|
24149
|
+
}(import_react46.Component)
|
|
23957
24150
|
);
|
|
23958
24151
|
var MonthDropdown = (
|
|
23959
24152
|
/** @class */
|
|
@@ -23966,24 +24159,24 @@ var MonthDropdown = (
|
|
|
23966
24159
|
};
|
|
23967
24160
|
_this.renderSelectOptions = function(monthNames) {
|
|
23968
24161
|
return monthNames.map(function(m, i3) {
|
|
23969
|
-
return
|
|
24162
|
+
return import_react46.default.createElement("option", { key: m, value: i3 }, m);
|
|
23970
24163
|
});
|
|
23971
24164
|
};
|
|
23972
24165
|
_this.renderSelectMode = function(monthNames) {
|
|
23973
|
-
return
|
|
24166
|
+
return import_react46.default.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23974
24167
|
return _this.onChange(parseInt(e3.target.value));
|
|
23975
24168
|
} }, _this.renderSelectOptions(monthNames));
|
|
23976
24169
|
};
|
|
23977
24170
|
_this.renderReadView = function(visible, monthNames) {
|
|
23978
|
-
return
|
|
24171
|
+
return import_react46.default.createElement(
|
|
23979
24172
|
"div",
|
|
23980
24173
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23981
|
-
|
|
23982
|
-
|
|
24174
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
24175
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23983
24176
|
);
|
|
23984
24177
|
};
|
|
23985
24178
|
_this.renderDropdown = function(monthNames) {
|
|
23986
|
-
return
|
|
24179
|
+
return import_react46.default.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23987
24180
|
};
|
|
23988
24181
|
_this.renderScrollMode = function(monthNames) {
|
|
23989
24182
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24022,10 +24215,10 @@ var MonthDropdown = (
|
|
|
24022
24215
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
24023
24216
|
break;
|
|
24024
24217
|
}
|
|
24025
|
-
return
|
|
24218
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24026
24219
|
};
|
|
24027
24220
|
return MonthDropdown2;
|
|
24028
|
-
}(
|
|
24221
|
+
}(import_react46.Component)
|
|
24029
24222
|
);
|
|
24030
24223
|
function generateMonthYears(minDate, maxDate) {
|
|
24031
24224
|
var list = [];
|
|
@@ -24047,10 +24240,10 @@ var MonthYearDropdownOptions = (
|
|
|
24047
24240
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
24048
24241
|
var monthYearPoint = getTime(monthYear);
|
|
24049
24242
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
24050
|
-
return
|
|
24243
|
+
return import_react46.default.createElement(
|
|
24051
24244
|
"div",
|
|
24052
24245
|
{ 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 },
|
|
24053
|
-
isSameMonthYear ?
|
|
24246
|
+
isSameMonthYear ? import_react46.default.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
24054
24247
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
24055
24248
|
);
|
|
24056
24249
|
});
|
|
@@ -24071,10 +24264,10 @@ var MonthYearDropdownOptions = (
|
|
|
24071
24264
|
"react-datepicker__month-year-dropdown": true,
|
|
24072
24265
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
24073
24266
|
});
|
|
24074
|
-
return
|
|
24267
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24075
24268
|
};
|
|
24076
24269
|
return MonthYearDropdownOptions2;
|
|
24077
|
-
}(
|
|
24270
|
+
}(import_react46.Component)
|
|
24078
24271
|
);
|
|
24079
24272
|
var MonthYearDropdown = (
|
|
24080
24273
|
/** @class */
|
|
@@ -24091,7 +24284,7 @@ var MonthYearDropdown = (
|
|
|
24091
24284
|
var options2 = [];
|
|
24092
24285
|
while (!isAfter(currDate, lastDate)) {
|
|
24093
24286
|
var timePoint = getTime(currDate);
|
|
24094
|
-
options2.push(
|
|
24287
|
+
options2.push(import_react46.default.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
24095
24288
|
currDate = addMonths(currDate, 1);
|
|
24096
24289
|
}
|
|
24097
24290
|
return options2;
|
|
@@ -24100,19 +24293,19 @@ var MonthYearDropdown = (
|
|
|
24100
24293
|
_this.onChange(parseInt(event.target.value));
|
|
24101
24294
|
};
|
|
24102
24295
|
_this.renderSelectMode = function() {
|
|
24103
|
-
return
|
|
24296
|
+
return import_react46.default.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24104
24297
|
};
|
|
24105
24298
|
_this.renderReadView = function(visible) {
|
|
24106
24299
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
24107
|
-
return
|
|
24300
|
+
return import_react46.default.createElement(
|
|
24108
24301
|
"div",
|
|
24109
24302
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
24110
|
-
|
|
24111
|
-
|
|
24303
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
24304
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
24112
24305
|
);
|
|
24113
24306
|
};
|
|
24114
24307
|
_this.renderDropdown = function() {
|
|
24115
|
-
return
|
|
24308
|
+
return import_react46.default.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24116
24309
|
};
|
|
24117
24310
|
_this.renderScrollMode = function() {
|
|
24118
24311
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24147,10 +24340,10 @@ var MonthYearDropdown = (
|
|
|
24147
24340
|
renderedDropdown = this.renderSelectMode();
|
|
24148
24341
|
break;
|
|
24149
24342
|
}
|
|
24150
|
-
return
|
|
24343
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24151
24344
|
};
|
|
24152
24345
|
return MonthYearDropdown2;
|
|
24153
|
-
}(
|
|
24346
|
+
}(import_react46.Component)
|
|
24154
24347
|
);
|
|
24155
24348
|
var Time = (
|
|
24156
24349
|
/** @class */
|
|
@@ -24245,7 +24438,7 @@ var Time = (
|
|
|
24245
24438
|
return prev2;
|
|
24246
24439
|
}, times[0]);
|
|
24247
24440
|
return times.map(function(time) {
|
|
24248
|
-
return
|
|
24441
|
+
return import_react46.default.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
24249
24442
|
if (time === timeToFocus) {
|
|
24250
24443
|
_this.centerLi = li;
|
|
24251
24444
|
}
|
|
@@ -24256,14 +24449,14 @@ var Time = (
|
|
|
24256
24449
|
};
|
|
24257
24450
|
_this.renderTimeCaption = function() {
|
|
24258
24451
|
if (_this.props.showTimeCaption === false) {
|
|
24259
|
-
return
|
|
24452
|
+
return import_react46.default.createElement(import_react46.default.Fragment, null);
|
|
24260
24453
|
}
|
|
24261
|
-
return
|
|
24454
|
+
return import_react46.default.createElement(
|
|
24262
24455
|
"div",
|
|
24263
24456
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
24264
24457
|
_this.header = header;
|
|
24265
24458
|
} },
|
|
24266
|
-
|
|
24459
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
24267
24460
|
);
|
|
24268
24461
|
};
|
|
24269
24462
|
return _this;
|
|
@@ -24310,17 +24503,17 @@ var Time = (
|
|
|
24310
24503
|
var _this = this;
|
|
24311
24504
|
var _a2;
|
|
24312
24505
|
var height = this.state.height;
|
|
24313
|
-
return
|
|
24506
|
+
return import_react46.default.createElement(
|
|
24314
24507
|
"div",
|
|
24315
24508
|
{ 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" : "") },
|
|
24316
24509
|
this.renderTimeCaption(),
|
|
24317
|
-
|
|
24510
|
+
import_react46.default.createElement(
|
|
24318
24511
|
"div",
|
|
24319
24512
|
{ className: "react-datepicker__time" },
|
|
24320
|
-
|
|
24513
|
+
import_react46.default.createElement(
|
|
24321
24514
|
"div",
|
|
24322
24515
|
{ className: "react-datepicker__time-box" },
|
|
24323
|
-
|
|
24516
|
+
import_react46.default.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
24324
24517
|
_this.list = list;
|
|
24325
24518
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
24326
24519
|
)
|
|
@@ -24331,7 +24524,7 @@ var Time = (
|
|
|
24331
24524
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
24332
24525
|
};
|
|
24333
24526
|
return Time2;
|
|
24334
|
-
}(
|
|
24527
|
+
}(import_react46.Component)
|
|
24335
24528
|
);
|
|
24336
24529
|
var VERTICAL_NAVIGATION_OFFSET = 3;
|
|
24337
24530
|
var Year = (
|
|
@@ -24341,7 +24534,7 @@ var Year = (
|
|
|
24341
24534
|
function Year2(props) {
|
|
24342
24535
|
var _this = _super.call(this, props) || this;
|
|
24343
24536
|
_this.YEAR_REFS = __spreadArray([], Array(_this.props.yearItemNumber), true).map(function() {
|
|
24344
|
-
return (0,
|
|
24537
|
+
return (0, import_react46.createRef)();
|
|
24345
24538
|
});
|
|
24346
24539
|
_this.isDisabled = function(date) {
|
|
24347
24540
|
return isDayDisabled(date, {
|
|
@@ -24578,7 +24771,7 @@ var Year = (
|
|
|
24578
24771
|
}
|
|
24579
24772
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
24580
24773
|
var _loop_1 = function(y4) {
|
|
24581
|
-
yearsList.push(
|
|
24774
|
+
yearsList.push(import_react46.default.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
24582
24775
|
_this.onYearClick(event, y4);
|
|
24583
24776
|
}, onKeyDown: function(event) {
|
|
24584
24777
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24600,14 +24793,14 @@ var Year = (
|
|
|
24600
24793
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
24601
24794
|
_loop_1(y3);
|
|
24602
24795
|
}
|
|
24603
|
-
return
|
|
24796
|
+
return import_react46.default.createElement(
|
|
24604
24797
|
"div",
|
|
24605
24798
|
{ className: "react-datepicker__year" },
|
|
24606
|
-
|
|
24799
|
+
import_react46.default.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)
|
|
24607
24800
|
);
|
|
24608
24801
|
};
|
|
24609
24802
|
return Year2;
|
|
24610
|
-
}(
|
|
24803
|
+
}(import_react46.Component)
|
|
24611
24804
|
);
|
|
24612
24805
|
function generateYears(year, noOfYear, minDate, maxDate) {
|
|
24613
24806
|
var list = [];
|
|
@@ -24635,10 +24828,10 @@ var YearDropdownOptions = (
|
|
|
24635
24828
|
_this.renderOptions = function() {
|
|
24636
24829
|
var selectedYear = _this.props.year;
|
|
24637
24830
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
24638
|
-
return
|
|
24831
|
+
return import_react46.default.createElement(
|
|
24639
24832
|
"div",
|
|
24640
24833
|
{ 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 },
|
|
24641
|
-
selectedYear === year ?
|
|
24834
|
+
selectedYear === year ? import_react46.default.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
24642
24835
|
year
|
|
24643
24836
|
);
|
|
24644
24837
|
});
|
|
@@ -24647,19 +24840,19 @@ var YearDropdownOptions = (
|
|
|
24647
24840
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
24648
24841
|
return year === maxYear;
|
|
24649
24842
|
})) {
|
|
24650
|
-
options2.unshift(
|
|
24843
|
+
options2.unshift(import_react46.default.createElement(
|
|
24651
24844
|
"div",
|
|
24652
24845
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
24653
|
-
|
|
24846
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
24654
24847
|
));
|
|
24655
24848
|
}
|
|
24656
24849
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
24657
24850
|
return year === minYear;
|
|
24658
24851
|
})) {
|
|
24659
|
-
options2.push(
|
|
24852
|
+
options2.push(import_react46.default.createElement(
|
|
24660
24853
|
"div",
|
|
24661
24854
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
24662
|
-
|
|
24855
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
24663
24856
|
));
|
|
24664
24857
|
}
|
|
24665
24858
|
return options2;
|
|
@@ -24689,7 +24882,7 @@ var YearDropdownOptions = (
|
|
|
24689
24882
|
_this.state = {
|
|
24690
24883
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
24691
24884
|
};
|
|
24692
|
-
_this.dropdownRef = (0,
|
|
24885
|
+
_this.dropdownRef = (0, import_react46.createRef)();
|
|
24693
24886
|
return _this;
|
|
24694
24887
|
}
|
|
24695
24888
|
YearDropdownOptions2.prototype.componentDidMount = function() {
|
|
@@ -24707,10 +24900,10 @@ var YearDropdownOptions = (
|
|
|
24707
24900
|
"react-datepicker__year-dropdown": true,
|
|
24708
24901
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
24709
24902
|
});
|
|
24710
|
-
return
|
|
24903
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24711
24904
|
};
|
|
24712
24905
|
return YearDropdownOptions2;
|
|
24713
|
-
}(
|
|
24906
|
+
}(import_react46.Component)
|
|
24714
24907
|
);
|
|
24715
24908
|
var YearDropdown = (
|
|
24716
24909
|
/** @class */
|
|
@@ -24726,7 +24919,7 @@ var YearDropdown = (
|
|
|
24726
24919
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
24727
24920
|
var options2 = [];
|
|
24728
24921
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
24729
|
-
options2.push(
|
|
24922
|
+
options2.push(import_react46.default.createElement("option", { key: i3, value: i3 }, i3));
|
|
24730
24923
|
}
|
|
24731
24924
|
return options2;
|
|
24732
24925
|
};
|
|
@@ -24734,20 +24927,20 @@ var YearDropdown = (
|
|
|
24734
24927
|
_this.onChange(parseInt(event.target.value));
|
|
24735
24928
|
};
|
|
24736
24929
|
_this.renderSelectMode = function() {
|
|
24737
|
-
return
|
|
24930
|
+
return import_react46.default.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24738
24931
|
};
|
|
24739
24932
|
_this.renderReadView = function(visible) {
|
|
24740
|
-
return
|
|
24933
|
+
return import_react46.default.createElement(
|
|
24741
24934
|
"div",
|
|
24742
24935
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
24743
24936
|
return _this.toggleDropdown(event);
|
|
24744
24937
|
} },
|
|
24745
|
-
|
|
24746
|
-
|
|
24938
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24939
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
24747
24940
|
);
|
|
24748
24941
|
};
|
|
24749
24942
|
_this.renderDropdown = function() {
|
|
24750
|
-
return
|
|
24943
|
+
return import_react46.default.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24751
24944
|
};
|
|
24752
24945
|
_this.renderScrollMode = function() {
|
|
24753
24946
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24797,10 +24990,10 @@ var YearDropdown = (
|
|
|
24797
24990
|
renderedDropdown = this.renderSelectMode();
|
|
24798
24991
|
break;
|
|
24799
24992
|
}
|
|
24800
|
-
return
|
|
24993
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24801
24994
|
};
|
|
24802
24995
|
return YearDropdown2;
|
|
24803
|
-
}(
|
|
24996
|
+
}(import_react46.Component)
|
|
24804
24997
|
);
|
|
24805
24998
|
var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
24806
24999
|
"react-datepicker__year-select",
|
|
@@ -24971,13 +25164,13 @@ var Calendar = (
|
|
|
24971
25164
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24972
25165
|
var dayNames = [];
|
|
24973
25166
|
if (_this.props.showWeekNumbers) {
|
|
24974
|
-
dayNames.push(
|
|
25167
|
+
dayNames.push(import_react46.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24975
25168
|
}
|
|
24976
25169
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24977
25170
|
var day = addDays(startOfWeek2, offset4);
|
|
24978
25171
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24979
25172
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24980
|
-
return
|
|
25173
|
+
return import_react46.default.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
24981
25174
|
}));
|
|
24982
25175
|
};
|
|
24983
25176
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -25046,10 +25239,10 @@ var Calendar = (
|
|
|
25046
25239
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25047
25240
|
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;
|
|
25048
25241
|
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;
|
|
25049
|
-
return
|
|
25242
|
+
return import_react46.default.createElement(
|
|
25050
25243
|
"button",
|
|
25051
25244
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
25052
|
-
|
|
25245
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
25053
25246
|
);
|
|
25054
25247
|
};
|
|
25055
25248
|
_this.increaseYear = function() {
|
|
@@ -25111,10 +25304,10 @@ var Calendar = (
|
|
|
25111
25304
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25112
25305
|
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;
|
|
25113
25306
|
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;
|
|
25114
|
-
return
|
|
25307
|
+
return import_react46.default.createElement(
|
|
25115
25308
|
"button",
|
|
25116
25309
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
25117
|
-
|
|
25310
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
25118
25311
|
);
|
|
25119
25312
|
};
|
|
25120
25313
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -25131,7 +25324,7 @@ var Calendar = (
|
|
|
25131
25324
|
if (_this.props.showMonthYearDropdown) {
|
|
25132
25325
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
25133
25326
|
}
|
|
25134
|
-
return
|
|
25327
|
+
return import_react46.default.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
25135
25328
|
};
|
|
25136
25329
|
_this.renderYearDropdown = function(overrideHide) {
|
|
25137
25330
|
if (overrideHide === void 0) {
|
|
@@ -25140,7 +25333,7 @@ var Calendar = (
|
|
|
25140
25333
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
25141
25334
|
return;
|
|
25142
25335
|
}
|
|
25143
|
-
return
|
|
25336
|
+
return import_react46.default.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
25144
25337
|
};
|
|
25145
25338
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
25146
25339
|
if (overrideHide === void 0) {
|
|
@@ -25149,7 +25342,7 @@ var Calendar = (
|
|
|
25149
25342
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
25150
25343
|
return;
|
|
25151
25344
|
}
|
|
25152
|
-
return
|
|
25345
|
+
return import_react46.default.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
25153
25346
|
};
|
|
25154
25347
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
25155
25348
|
if (overrideHide === void 0) {
|
|
@@ -25158,7 +25351,7 @@ var Calendar = (
|
|
|
25158
25351
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
25159
25352
|
return;
|
|
25160
25353
|
}
|
|
25161
|
-
return
|
|
25354
|
+
return import_react46.default.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
25162
25355
|
};
|
|
25163
25356
|
_this.handleTodayButtonClick = function(event) {
|
|
25164
25357
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -25168,22 +25361,22 @@ var Calendar = (
|
|
|
25168
25361
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
25169
25362
|
return;
|
|
25170
25363
|
}
|
|
25171
|
-
return
|
|
25364
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
25172
25365
|
};
|
|
25173
25366
|
_this.renderDefaultHeader = function(_a2) {
|
|
25174
25367
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
25175
|
-
return
|
|
25368
|
+
return import_react46.default.createElement(
|
|
25176
25369
|
"div",
|
|
25177
25370
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
25178
25371
|
_this.renderCurrentMonth(monthDate),
|
|
25179
|
-
|
|
25372
|
+
import_react46.default.createElement(
|
|
25180
25373
|
"div",
|
|
25181
25374
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
25182
25375
|
_this.renderMonthDropdown(i3 !== 0),
|
|
25183
25376
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
25184
25377
|
_this.renderYearDropdown(i3 !== 0)
|
|
25185
25378
|
),
|
|
25186
|
-
|
|
25379
|
+
import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25187
25380
|
);
|
|
25188
25381
|
};
|
|
25189
25382
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -25197,18 +25390,18 @@ var Calendar = (
|
|
|
25197
25390
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
25198
25391
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
25199
25392
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
25200
|
-
return
|
|
25393
|
+
return import_react46.default.createElement(
|
|
25201
25394
|
"div",
|
|
25202
25395
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
25203
25396
|
(_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 })),
|
|
25204
|
-
showDayNames &&
|
|
25397
|
+
showDayNames && import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25205
25398
|
);
|
|
25206
25399
|
};
|
|
25207
25400
|
_this.renderYearHeader = function(_a2) {
|
|
25208
25401
|
var monthDate = _a2.monthDate;
|
|
25209
25402
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
25210
25403
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
25211
|
-
return
|
|
25404
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
25212
25405
|
};
|
|
25213
25406
|
_this.renderHeader = function(_a2) {
|
|
25214
25407
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -25238,13 +25431,13 @@ var Calendar = (
|
|
|
25238
25431
|
var monthKey = "month-".concat(i3);
|
|
25239
25432
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
25240
25433
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
25241
|
-
monthList.push(
|
|
25434
|
+
monthList.push(import_react46.default.createElement(
|
|
25242
25435
|
"div",
|
|
25243
25436
|
{ key: monthKey, ref: function(div) {
|
|
25244
25437
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
25245
25438
|
}, className: "react-datepicker__month-container" },
|
|
25246
25439
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
25247
|
-
|
|
25440
|
+
import_react46.default.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 }))
|
|
25248
25441
|
));
|
|
25249
25442
|
}
|
|
25250
25443
|
return monthList;
|
|
@@ -25254,18 +25447,18 @@ var Calendar = (
|
|
|
25254
25447
|
return;
|
|
25255
25448
|
}
|
|
25256
25449
|
if (_this.props.showYearPicker) {
|
|
25257
|
-
return
|
|
25450
|
+
return import_react46.default.createElement(
|
|
25258
25451
|
"div",
|
|
25259
25452
|
{ className: "react-datepicker__year--container" },
|
|
25260
25453
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
25261
|
-
|
|
25454
|
+
import_react46.default.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 }))
|
|
25262
25455
|
);
|
|
25263
25456
|
}
|
|
25264
25457
|
return;
|
|
25265
25458
|
};
|
|
25266
25459
|
_this.renderTimeSection = function() {
|
|
25267
25460
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
25268
|
-
return
|
|
25461
|
+
return import_react46.default.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
25269
25462
|
}
|
|
25270
25463
|
return;
|
|
25271
25464
|
};
|
|
@@ -25274,7 +25467,7 @@ var Calendar = (
|
|
|
25274
25467
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
25275
25468
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
25276
25469
|
if (_this.props.showTimeInput) {
|
|
25277
|
-
return
|
|
25470
|
+
return import_react46.default.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
25278
25471
|
}
|
|
25279
25472
|
return;
|
|
25280
25473
|
};
|
|
@@ -25289,15 +25482,15 @@ var Calendar = (
|
|
|
25289
25482
|
} else {
|
|
25290
25483
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
25291
25484
|
}
|
|
25292
|
-
return
|
|
25485
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
25293
25486
|
};
|
|
25294
25487
|
_this.renderChildren = function() {
|
|
25295
25488
|
if (_this.props.children) {
|
|
25296
|
-
return
|
|
25489
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
25297
25490
|
}
|
|
25298
25491
|
return;
|
|
25299
25492
|
};
|
|
25300
|
-
_this.containerRef = (0,
|
|
25493
|
+
_this.containerRef = (0, import_react46.createRef)();
|
|
25301
25494
|
_this.state = {
|
|
25302
25495
|
date: _this.getDateInView(),
|
|
25303
25496
|
selectingDate: void 0,
|
|
@@ -25347,13 +25540,13 @@ var Calendar = (
|
|
|
25347
25540
|
};
|
|
25348
25541
|
Calendar2.prototype.render = function() {
|
|
25349
25542
|
var Container = this.props.container || CalendarContainer;
|
|
25350
|
-
return
|
|
25543
|
+
return import_react46.default.createElement(
|
|
25351
25544
|
ClickOutsideWrapper,
|
|
25352
25545
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
25353
|
-
|
|
25546
|
+
import_react46.default.createElement(
|
|
25354
25547
|
"div",
|
|
25355
25548
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
25356
|
-
|
|
25549
|
+
import_react46.default.createElement(
|
|
25357
25550
|
Container,
|
|
25358
25551
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
25359
25552
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -25372,17 +25565,17 @@ var Calendar = (
|
|
|
25372
25565
|
);
|
|
25373
25566
|
};
|
|
25374
25567
|
return Calendar2;
|
|
25375
|
-
}(
|
|
25568
|
+
}(import_react46.Component)
|
|
25376
25569
|
);
|
|
25377
25570
|
var CalendarIcon2 = function(_a2) {
|
|
25378
25571
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
25379
25572
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
25380
25573
|
if (typeof icon === "string") {
|
|
25381
|
-
return
|
|
25574
|
+
return import_react46.default.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
25382
25575
|
}
|
|
25383
|
-
if (
|
|
25576
|
+
if (import_react46.default.isValidElement(icon)) {
|
|
25384
25577
|
var iconElement_1 = icon;
|
|
25385
|
-
return
|
|
25578
|
+
return import_react46.default.cloneElement(iconElement_1, {
|
|
25386
25579
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
25387
25580
|
onClick: function(event) {
|
|
25388
25581
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -25394,10 +25587,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25394
25587
|
}
|
|
25395
25588
|
});
|
|
25396
25589
|
}
|
|
25397
|
-
return
|
|
25590
|
+
return import_react46.default.createElement(
|
|
25398
25591
|
"svg",
|
|
25399
25592
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
25400
|
-
|
|
25593
|
+
import_react46.default.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" })
|
|
25401
25594
|
);
|
|
25402
25595
|
};
|
|
25403
25596
|
var Portal = (
|
|
@@ -25428,7 +25621,7 @@ var Portal = (
|
|
|
25428
25621
|
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
25429
25622
|
};
|
|
25430
25623
|
return Portal2;
|
|
25431
|
-
}(
|
|
25624
|
+
}(import_react46.Component)
|
|
25432
25625
|
);
|
|
25433
25626
|
var focusableElementsSelector = "[tabindex], a, button, input, select, textarea";
|
|
25434
25627
|
var focusableFilter = function(node2) {
|
|
@@ -25455,7 +25648,7 @@ var TabLoop = (
|
|
|
25455
25648
|
var tabChildren = _this.getTabChildren();
|
|
25456
25649
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
25457
25650
|
};
|
|
25458
|
-
_this.tabLoopRef = (0,
|
|
25651
|
+
_this.tabLoopRef = (0, import_react46.createRef)();
|
|
25459
25652
|
return _this;
|
|
25460
25653
|
}
|
|
25461
25654
|
TabLoop2.prototype.render = function() {
|
|
@@ -25463,32 +25656,32 @@ var TabLoop = (
|
|
|
25463
25656
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
25464
25657
|
return this.props.children;
|
|
25465
25658
|
}
|
|
25466
|
-
return
|
|
25659
|
+
return import_react46.default.createElement(
|
|
25467
25660
|
"div",
|
|
25468
25661
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
25469
|
-
|
|
25662
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
25470
25663
|
this.props.children,
|
|
25471
|
-
|
|
25664
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
25472
25665
|
);
|
|
25473
25666
|
};
|
|
25474
25667
|
TabLoop2.defaultProps = {
|
|
25475
25668
|
enableTabLoop: true
|
|
25476
25669
|
};
|
|
25477
25670
|
return TabLoop2;
|
|
25478
|
-
}(
|
|
25671
|
+
}(import_react46.Component)
|
|
25479
25672
|
);
|
|
25480
25673
|
function withFloating(Component3) {
|
|
25481
25674
|
var WithFloating = function(props) {
|
|
25482
25675
|
var _a2;
|
|
25483
25676
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25484
|
-
var arrowRef = (0,
|
|
25677
|
+
var arrowRef = (0, import_react46.useRef)(null);
|
|
25485
25678
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25486
25679
|
flip3({ padding: 15 }),
|
|
25487
25680
|
offset3(10),
|
|
25488
25681
|
arrow3({ element: arrowRef })
|
|
25489
25682
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
25490
25683
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
25491
|
-
return
|
|
25684
|
+
return import_react46.default.createElement(Component3, _assign({}, componentProps));
|
|
25492
25685
|
};
|
|
25493
25686
|
return WithFloating;
|
|
25494
25687
|
}
|
|
@@ -25513,33 +25706,33 @@ var PopperComponent = (
|
|
|
25513
25706
|
var popper = void 0;
|
|
25514
25707
|
if (!hidePopper) {
|
|
25515
25708
|
var classes = clsx("react-datepicker-popper", className);
|
|
25516
|
-
popper =
|
|
25709
|
+
popper = import_react46.default.createElement(
|
|
25517
25710
|
TabLoop,
|
|
25518
25711
|
{ enableTabLoop },
|
|
25519
|
-
|
|
25712
|
+
import_react46.default.createElement(
|
|
25520
25713
|
"div",
|
|
25521
25714
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
25522
25715
|
popperComponent,
|
|
25523
|
-
showArrow &&
|
|
25716
|
+
showArrow && import_react46.default.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
25524
25717
|
)
|
|
25525
25718
|
);
|
|
25526
25719
|
}
|
|
25527
25720
|
if (this.props.popperContainer) {
|
|
25528
|
-
popper = (0,
|
|
25721
|
+
popper = (0, import_react46.createElement)(this.props.popperContainer, {}, popper);
|
|
25529
25722
|
}
|
|
25530
25723
|
if (portalId && !hidePopper) {
|
|
25531
|
-
popper =
|
|
25724
|
+
popper = import_react46.default.createElement(Portal, { portalId, portalHost }, popper);
|
|
25532
25725
|
}
|
|
25533
25726
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
25534
|
-
return
|
|
25535
|
-
|
|
25727
|
+
return import_react46.default.createElement(
|
|
25728
|
+
import_react46.default.Fragment,
|
|
25536
25729
|
null,
|
|
25537
|
-
|
|
25730
|
+
import_react46.default.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
25538
25731
|
popper
|
|
25539
25732
|
);
|
|
25540
25733
|
};
|
|
25541
25734
|
return PopperComponent2;
|
|
25542
|
-
}(
|
|
25735
|
+
}(import_react46.Component)
|
|
25543
25736
|
);
|
|
25544
25737
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
25545
25738
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -26153,7 +26346,7 @@ var DatePicker = (
|
|
|
26153
26346
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
26154
26347
|
return null;
|
|
26155
26348
|
}
|
|
26156
|
-
return
|
|
26349
|
+
return import_react46.default.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
26157
26350
|
_this.calendar = elem;
|
|
26158
26351
|
} }, _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);
|
|
26159
26352
|
};
|
|
@@ -26189,13 +26382,13 @@ var DatePicker = (
|
|
|
26189
26382
|
}));
|
|
26190
26383
|
}
|
|
26191
26384
|
}
|
|
26192
|
-
return
|
|
26385
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
26193
26386
|
};
|
|
26194
26387
|
_this.renderDateInput = function() {
|
|
26195
26388
|
var _a2, _b;
|
|
26196
26389
|
var _c;
|
|
26197
26390
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
26198
|
-
var customInput = _this.props.customInput ||
|
|
26391
|
+
var customInput = _this.props.customInput || import_react46.default.createElement("input", { type: "text" });
|
|
26199
26392
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
26200
26393
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
26201
26394
|
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, {
|
|
@@ -26208,14 +26401,14 @@ var DatePicker = (
|
|
|
26208
26401
|
dateFormat,
|
|
26209
26402
|
locale
|
|
26210
26403
|
});
|
|
26211
|
-
return (0,
|
|
26404
|
+
return (0, import_react46.cloneElement)(customInput, (_b = {}, _b[customInputRef] = function(input) {
|
|
26212
26405
|
_this.input = input;
|
|
26213
26406
|
}, _b.value = inputValue, _b.onBlur = _this.handleBlur, _b.onChange = _this.handleChange, _b.onClick = _this.onInputClick, _b.onFocus = _this.handleFocus, _b.onKeyDown = _this.onInputKeyDown, _b.id = _this.props.id, _b.name = _this.props.name, _b.form = _this.props.form, _b.autoFocus = _this.props.autoFocus, _b.placeholder = _this.props.placeholderText, _b.disabled = _this.props.disabled, _b.autoComplete = _this.props.autoComplete, _b.className = clsx(customInput.props.className, className), _b.title = _this.props.title, _b.readOnly = _this.props.readOnly, _b.required = _this.props.required, _b.tabIndex = _this.props.tabIndex, _b["aria-describedby"] = _this.props.ariaDescribedBy, _b["aria-invalid"] = _this.props.ariaInvalid, _b["aria-labelledby"] = _this.props.ariaLabelledBy, _b["aria-required"] = _this.props.ariaRequired, _b));
|
|
26214
26407
|
};
|
|
26215
26408
|
_this.renderClearButton = function() {
|
|
26216
26409
|
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;
|
|
26217
26410
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
26218
|
-
return
|
|
26411
|
+
return import_react46.default.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 });
|
|
26219
26412
|
} else {
|
|
26220
26413
|
return null;
|
|
26221
26414
|
}
|
|
@@ -26316,10 +26509,10 @@ var DatePicker = (
|
|
|
26316
26509
|
if (calendarIconClassname) {
|
|
26317
26510
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
26318
26511
|
}
|
|
26319
|
-
return
|
|
26512
|
+
return import_react46.default.createElement(
|
|
26320
26513
|
"div",
|
|
26321
26514
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
26322
|
-
showIcon &&
|
|
26515
|
+
showIcon && import_react46.default.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
26323
26516
|
onClick: this.toggleCalendar
|
|
26324
26517
|
} : null)),
|
|
26325
26518
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -26332,25 +26525,25 @@ var DatePicker = (
|
|
|
26332
26525
|
if (this.props.inline)
|
|
26333
26526
|
return calendar;
|
|
26334
26527
|
if (this.props.withPortal) {
|
|
26335
|
-
var portalContainer = this.state.open ?
|
|
26528
|
+
var portalContainer = this.state.open ? import_react46.default.createElement(
|
|
26336
26529
|
TabLoop,
|
|
26337
26530
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
26338
|
-
|
|
26531
|
+
import_react46.default.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
26339
26532
|
) : null;
|
|
26340
26533
|
if (this.state.open && this.props.portalId) {
|
|
26341
|
-
portalContainer =
|
|
26534
|
+
portalContainer = import_react46.default.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
26342
26535
|
}
|
|
26343
|
-
return
|
|
26536
|
+
return import_react46.default.createElement(
|
|
26344
26537
|
"div",
|
|
26345
26538
|
null,
|
|
26346
26539
|
this.renderInputContainer(),
|
|
26347
26540
|
portalContainer
|
|
26348
26541
|
);
|
|
26349
26542
|
}
|
|
26350
|
-
return
|
|
26543
|
+
return import_react46.default.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 }));
|
|
26351
26544
|
};
|
|
26352
26545
|
return DatePicker2;
|
|
26353
|
-
}(
|
|
26546
|
+
}(import_react46.Component)
|
|
26354
26547
|
);
|
|
26355
26548
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
26356
26549
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
@@ -26493,33 +26686,33 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26493
26686
|
}
|
|
26494
26687
|
|
|
26495
26688
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26496
|
-
var
|
|
26689
|
+
var import_react48 = require("react");
|
|
26497
26690
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26498
26691
|
function useStateManager(_ref3) {
|
|
26499
26692
|
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);
|
|
26500
|
-
var _useState = (0,
|
|
26501
|
-
var _useState3 = (0,
|
|
26502
|
-
var _useState5 = (0,
|
|
26503
|
-
var onChange2 = (0,
|
|
26693
|
+
var _useState = (0, import_react48.useState)(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26694
|
+
var _useState3 = (0, import_react48.useState)(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26695
|
+
var _useState5 = (0, import_react48.useState)(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26696
|
+
var onChange2 = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
26504
26697
|
if (typeof propsOnChange === "function") {
|
|
26505
26698
|
propsOnChange(value2, actionMeta);
|
|
26506
26699
|
}
|
|
26507
26700
|
setStateValue(value2);
|
|
26508
26701
|
}, [propsOnChange]);
|
|
26509
|
-
var onInputChange = (0,
|
|
26702
|
+
var onInputChange = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
26510
26703
|
var newValue;
|
|
26511
26704
|
if (typeof propsOnInputChange === "function") {
|
|
26512
26705
|
newValue = propsOnInputChange(value2, actionMeta);
|
|
26513
26706
|
}
|
|
26514
26707
|
setStateInputValue(newValue !== void 0 ? newValue : value2);
|
|
26515
26708
|
}, [propsOnInputChange]);
|
|
26516
|
-
var onMenuOpen = (0,
|
|
26709
|
+
var onMenuOpen = (0, import_react48.useCallback)(function() {
|
|
26517
26710
|
if (typeof propsOnMenuOpen === "function") {
|
|
26518
26711
|
propsOnMenuOpen();
|
|
26519
26712
|
}
|
|
26520
26713
|
setStateMenuIsOpen(true);
|
|
26521
26714
|
}, [propsOnMenuOpen]);
|
|
26522
|
-
var onMenuClose = (0,
|
|
26715
|
+
var onMenuClose = (0, import_react48.useCallback)(function() {
|
|
26523
26716
|
if (typeof propsOnMenuClose === "function") {
|
|
26524
26717
|
propsOnMenuClose();
|
|
26525
26718
|
}
|
|
@@ -26551,8 +26744,8 @@ function _extends() {
|
|
|
26551
26744
|
}
|
|
26552
26745
|
|
|
26553
26746
|
// node_modules/react-select/dist/react-select.esm.js
|
|
26554
|
-
var
|
|
26555
|
-
var
|
|
26747
|
+
var React15 = __toESM(require("react"));
|
|
26748
|
+
var import_react55 = require("react");
|
|
26556
26749
|
|
|
26557
26750
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
26558
26751
|
function _classCallCheck(a2, n4) {
|
|
@@ -26659,12 +26852,12 @@ function _toConsumableArray(r4) {
|
|
|
26659
26852
|
}
|
|
26660
26853
|
|
|
26661
26854
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26662
|
-
var
|
|
26663
|
-
var
|
|
26855
|
+
var React14 = __toESM(require("react"));
|
|
26856
|
+
var import_react53 = require("react");
|
|
26664
26857
|
|
|
26665
26858
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26666
|
-
var
|
|
26667
|
-
var
|
|
26859
|
+
var React12 = __toESM(require("react"));
|
|
26860
|
+
var import_react49 = require("react");
|
|
26668
26861
|
|
|
26669
26862
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
26670
26863
|
var isDevelopment = false;
|
|
@@ -27828,18 +28021,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27828
28021
|
}
|
|
27829
28022
|
|
|
27830
28023
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27831
|
-
var
|
|
28024
|
+
var React11 = __toESM(require("react"));
|
|
27832
28025
|
var isBrowser3 = typeof document !== "undefined";
|
|
27833
28026
|
var syncFallback = function syncFallback2(create) {
|
|
27834
28027
|
return create();
|
|
27835
28028
|
};
|
|
27836
|
-
var useInsertionEffect3 =
|
|
28029
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27837
28030
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27838
28031
|
|
|
27839
28032
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27840
28033
|
var isDevelopment3 = false;
|
|
27841
28034
|
var isBrowser4 = typeof document !== "undefined";
|
|
27842
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
28035
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27843
28036
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27844
28037
|
// because this module is primarily intended for the browser and node
|
|
27845
28038
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27852,20 +28045,20 @@ var EmotionCacheContext = /* @__PURE__ */ React11.createContext(
|
|
|
27852
28045
|
);
|
|
27853
28046
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
27854
28047
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
27855
|
-
return /* @__PURE__ */ (0,
|
|
27856
|
-
var cache = (0,
|
|
28048
|
+
return /* @__PURE__ */ (0, import_react49.forwardRef)(function(props, ref) {
|
|
28049
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27857
28050
|
return func(props, cache, ref);
|
|
27858
28051
|
});
|
|
27859
28052
|
};
|
|
27860
28053
|
if (!isBrowser4) {
|
|
27861
28054
|
withEmotionCache = function withEmotionCache3(func) {
|
|
27862
28055
|
return function(props) {
|
|
27863
|
-
var cache = (0,
|
|
28056
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27864
28057
|
if (cache === null) {
|
|
27865
28058
|
cache = createCache({
|
|
27866
28059
|
key: "css"
|
|
27867
28060
|
});
|
|
27868
|
-
return /* @__PURE__ */
|
|
28061
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27869
28062
|
value: cache
|
|
27870
28063
|
}, func(props, cache));
|
|
27871
28064
|
} else {
|
|
@@ -27874,7 +28067,7 @@ if (!isBrowser4) {
|
|
|
27874
28067
|
};
|
|
27875
28068
|
};
|
|
27876
28069
|
}
|
|
27877
|
-
var ThemeContext = /* @__PURE__ */
|
|
28070
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27878
28071
|
var hasOwn = {}.hasOwnProperty;
|
|
27879
28072
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27880
28073
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27901,7 +28094,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27901
28094
|
serializedNames += " " + next2.name;
|
|
27902
28095
|
next2 = next2.next;
|
|
27903
28096
|
}
|
|
27904
|
-
return /* @__PURE__ */
|
|
28097
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27905
28098
|
__html: rules
|
|
27906
28099
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27907
28100
|
}
|
|
@@ -27920,7 +28113,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27920
28113
|
} else if (props.className != null) {
|
|
27921
28114
|
className = props.className + " ";
|
|
27922
28115
|
}
|
|
27923
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
28116
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27924
28117
|
className += cache.key + "-" + serialized.name;
|
|
27925
28118
|
var newProps = {};
|
|
27926
28119
|
for (var _key2 in props) {
|
|
@@ -27932,22 +28125,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27932
28125
|
if (ref) {
|
|
27933
28126
|
newProps.ref = ref;
|
|
27934
28127
|
}
|
|
27935
|
-
return /* @__PURE__ */
|
|
28128
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27936
28129
|
cache,
|
|
27937
28130
|
serialized,
|
|
27938
28131
|
isStringTag: typeof WrappedComponent === "string"
|
|
27939
|
-
}), /* @__PURE__ */
|
|
28132
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27940
28133
|
});
|
|
27941
28134
|
var Emotion$1 = Emotion;
|
|
27942
28135
|
|
|
27943
28136
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27944
|
-
var
|
|
28137
|
+
var React13 = __toESM(require("react"));
|
|
27945
28138
|
var import_extends2 = __toESM(require_extends());
|
|
27946
28139
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27947
|
-
var
|
|
28140
|
+
var jsx86 = function jsx87(type, props) {
|
|
27948
28141
|
var args = arguments;
|
|
27949
28142
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27950
|
-
return
|
|
28143
|
+
return React13.createElement.apply(void 0, args);
|
|
27951
28144
|
}
|
|
27952
28145
|
var argsLength = args.length;
|
|
27953
28146
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27956,13 +28149,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27956
28149
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27957
28150
|
createElementArgArray[i3] = args[i3];
|
|
27958
28151
|
}
|
|
27959
|
-
return
|
|
28152
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27960
28153
|
};
|
|
27961
28154
|
(function(_jsx) {
|
|
27962
28155
|
var JSX;
|
|
27963
28156
|
/* @__PURE__ */ (function(_JSX) {
|
|
27964
28157
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27965
|
-
})(
|
|
28158
|
+
})(jsx86 || (jsx86 = {}));
|
|
27966
28159
|
function css() {
|
|
27967
28160
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27968
28161
|
args[_key] = arguments[_key];
|
|
@@ -27992,15 +28185,15 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27992
28185
|
}
|
|
27993
28186
|
|
|
27994
28187
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27995
|
-
var
|
|
28188
|
+
var import_react52 = require("react");
|
|
27996
28189
|
var import_react_dom6 = require("react-dom");
|
|
27997
28190
|
|
|
27998
28191
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27999
|
-
var
|
|
28192
|
+
var import_react50 = require("react");
|
|
28000
28193
|
var isClient3 = typeof document !== "undefined";
|
|
28001
28194
|
var noop6 = function noop7() {
|
|
28002
28195
|
};
|
|
28003
|
-
var index3 = isClient3 ?
|
|
28196
|
+
var index3 = isClient3 ? import_react50.useLayoutEffect : noop6;
|
|
28004
28197
|
|
|
28005
28198
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28006
28199
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
@@ -28334,13 +28527,13 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
28334
28527
|
marginTop: spacing2.menuGutter
|
|
28335
28528
|
});
|
|
28336
28529
|
};
|
|
28337
|
-
var PortalPlacementContext = /* @__PURE__ */ (0,
|
|
28530
|
+
var PortalPlacementContext = /* @__PURE__ */ (0, import_react52.createContext)(null);
|
|
28338
28531
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
28339
28532
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28340
|
-
var _ref3 = (0,
|
|
28341
|
-
var ref = (0,
|
|
28342
|
-
var _useState = (0,
|
|
28343
|
-
var _useState3 = (0,
|
|
28533
|
+
var _ref3 = (0, import_react52.useContext)(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28534
|
+
var ref = (0, import_react52.useRef)(null);
|
|
28535
|
+
var _useState = (0, import_react52.useState)(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28536
|
+
var _useState3 = (0, import_react52.useState)(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28344
28537
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28345
28538
|
index3(function() {
|
|
28346
28539
|
var menuEl = ref.current;
|
|
@@ -28370,7 +28563,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28370
28563
|
};
|
|
28371
28564
|
var Menu = function Menu2(props) {
|
|
28372
28565
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28373
|
-
return
|
|
28566
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
28374
28567
|
menu: true
|
|
28375
28568
|
}), {
|
|
28376
28569
|
ref: innerRef
|
|
@@ -28392,7 +28585,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28392
28585
|
};
|
|
28393
28586
|
var MenuList = function MenuList2(props) {
|
|
28394
28587
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28395
|
-
return
|
|
28588
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28396
28589
|
"menu-list": true,
|
|
28397
28590
|
"menu-list--is-multi": isMulti
|
|
28398
28591
|
}), {
|
|
@@ -28412,7 +28605,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28412
28605
|
var loadingMessageCSS = noticeCSS;
|
|
28413
28606
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28414
28607
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28415
|
-
return
|
|
28608
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28416
28609
|
children,
|
|
28417
28610
|
innerProps
|
|
28418
28611
|
}), "noOptionsMessage", {
|
|
@@ -28422,7 +28615,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28422
28615
|
};
|
|
28423
28616
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28424
28617
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28425
|
-
return
|
|
28618
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28426
28619
|
children,
|
|
28427
28620
|
innerProps
|
|
28428
28621
|
}), "loadingMessage", {
|
|
@@ -28442,16 +28635,16 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
28442
28635
|
};
|
|
28443
28636
|
var MenuPortal = function MenuPortal2(props) {
|
|
28444
28637
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28445
|
-
var menuPortalRef = (0,
|
|
28446
|
-
var cleanupRef = (0,
|
|
28447
|
-
var _useState5 = (0,
|
|
28448
|
-
var portalPlacementContext = (0,
|
|
28638
|
+
var menuPortalRef = (0, import_react52.useRef)(null);
|
|
28639
|
+
var cleanupRef = (0, import_react52.useRef)(null);
|
|
28640
|
+
var _useState5 = (0, import_react52.useState)(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28641
|
+
var portalPlacementContext = (0, import_react52.useMemo)(function() {
|
|
28449
28642
|
return {
|
|
28450
28643
|
setPortalPlacement
|
|
28451
28644
|
};
|
|
28452
28645
|
}, []);
|
|
28453
|
-
var _useState7 = (0,
|
|
28454
|
-
var updateComputedPosition = (0,
|
|
28646
|
+
var _useState7 = (0, import_react52.useState)(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28647
|
+
var updateComputedPosition = (0, import_react52.useCallback)(function() {
|
|
28455
28648
|
if (!controlElement) return;
|
|
28456
28649
|
var rect = getBoundingClientObj(controlElement);
|
|
28457
28650
|
var scrollDistance = menuPosition === "fixed" ? 0 : window.pageYOffset;
|
|
@@ -28466,7 +28659,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28466
28659
|
index3(function() {
|
|
28467
28660
|
updateComputedPosition();
|
|
28468
28661
|
}, [updateComputedPosition]);
|
|
28469
|
-
var runAutoUpdate = (0,
|
|
28662
|
+
var runAutoUpdate = (0, import_react52.useCallback)(function() {
|
|
28470
28663
|
if (typeof cleanupRef.current === "function") {
|
|
28471
28664
|
cleanupRef.current();
|
|
28472
28665
|
cleanupRef.current = null;
|
|
@@ -28480,12 +28673,12 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28480
28673
|
index3(function() {
|
|
28481
28674
|
runAutoUpdate();
|
|
28482
28675
|
}, [runAutoUpdate]);
|
|
28483
|
-
var setMenuPortalElement = (0,
|
|
28676
|
+
var setMenuPortalElement = (0, import_react52.useCallback)(function(menuPortalElement) {
|
|
28484
28677
|
menuPortalRef.current = menuPortalElement;
|
|
28485
28678
|
runAutoUpdate();
|
|
28486
28679
|
}, [runAutoUpdate]);
|
|
28487
28680
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28488
|
-
var menuWrapper =
|
|
28681
|
+
var menuWrapper = jsx86("div", _extends({
|
|
28489
28682
|
ref: setMenuPortalElement
|
|
28490
28683
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28491
28684
|
offset: computedPosition.offset,
|
|
@@ -28494,7 +28687,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28494
28687
|
}), "menuPortal", {
|
|
28495
28688
|
"menu-portal": true
|
|
28496
28689
|
}), innerProps), children);
|
|
28497
|
-
return
|
|
28690
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
28498
28691
|
value: portalPlacementContext
|
|
28499
28692
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
28500
28693
|
};
|
|
@@ -28510,7 +28703,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28510
28703
|
};
|
|
28511
28704
|
var SelectContainer = function SelectContainer2(props) {
|
|
28512
28705
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28513
|
-
return
|
|
28706
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
28514
28707
|
"--is-disabled": isDisabled,
|
|
28515
28708
|
"--is-rtl": isRtl
|
|
28516
28709
|
}), innerProps), children);
|
|
@@ -28531,7 +28724,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28531
28724
|
};
|
|
28532
28725
|
var ValueContainer = function ValueContainer2(props) {
|
|
28533
28726
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28534
|
-
return
|
|
28727
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28535
28728
|
"value-container": true,
|
|
28536
28729
|
"value-container--is-multi": isMulti,
|
|
28537
28730
|
"value-container--has-value": hasValue
|
|
@@ -28547,7 +28740,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28547
28740
|
};
|
|
28548
28741
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28549
28742
|
var children = props.children, innerProps = props.innerProps;
|
|
28550
|
-
return
|
|
28743
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28551
28744
|
indicators: true
|
|
28552
28745
|
}), innerProps), children);
|
|
28553
28746
|
};
|
|
@@ -28568,7 +28761,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28568
28761
|
};
|
|
28569
28762
|
var Svg = function Svg2(_ref3) {
|
|
28570
28763
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28571
|
-
return
|
|
28764
|
+
return jsx86("svg", _extends({
|
|
28572
28765
|
height: size4,
|
|
28573
28766
|
width: size4,
|
|
28574
28767
|
viewBox: "0 0 20 20",
|
|
@@ -28578,16 +28771,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28578
28771
|
}, props));
|
|
28579
28772
|
};
|
|
28580
28773
|
var CrossIcon = function CrossIcon2(props) {
|
|
28581
|
-
return
|
|
28774
|
+
return jsx86(Svg, _extends({
|
|
28582
28775
|
size: 20
|
|
28583
|
-
}, props),
|
|
28776
|
+
}, props), jsx86("path", {
|
|
28584
28777
|
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"
|
|
28585
28778
|
}));
|
|
28586
28779
|
};
|
|
28587
28780
|
var DownChevron = function DownChevron2(props) {
|
|
28588
|
-
return
|
|
28781
|
+
return jsx86(Svg, _extends({
|
|
28589
28782
|
size: 20
|
|
28590
|
-
}, props),
|
|
28783
|
+
}, props), jsx86("path", {
|
|
28591
28784
|
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"
|
|
28592
28785
|
}));
|
|
28593
28786
|
};
|
|
@@ -28608,18 +28801,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28608
28801
|
var dropdownIndicatorCSS = baseCSS;
|
|
28609
28802
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28610
28803
|
var children = props.children, innerProps = props.innerProps;
|
|
28611
|
-
return
|
|
28804
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28612
28805
|
indicator: true,
|
|
28613
28806
|
"dropdown-indicator": true
|
|
28614
|
-
}), innerProps), children ||
|
|
28807
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
28615
28808
|
};
|
|
28616
28809
|
var clearIndicatorCSS = baseCSS;
|
|
28617
28810
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28618
28811
|
var children = props.children, innerProps = props.innerProps;
|
|
28619
|
-
return
|
|
28812
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28620
28813
|
indicator: true,
|
|
28621
28814
|
"clear-indicator": true
|
|
28622
|
-
}), innerProps), children ||
|
|
28815
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
28623
28816
|
};
|
|
28624
28817
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28625
28818
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28635,7 +28828,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28635
28828
|
};
|
|
28636
28829
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28637
28830
|
var innerProps = props.innerProps;
|
|
28638
|
-
return
|
|
28831
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28639
28832
|
"indicator-separator": true
|
|
28640
28833
|
})));
|
|
28641
28834
|
};
|
|
@@ -28659,7 +28852,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28659
28852
|
};
|
|
28660
28853
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28661
28854
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28662
|
-
return
|
|
28855
|
+
return jsx86("span", {
|
|
28663
28856
|
css: /* @__PURE__ */ css({
|
|
28664
28857
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28665
28858
|
backgroundColor: "currentColor",
|
|
@@ -28674,20 +28867,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28674
28867
|
};
|
|
28675
28868
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28676
28869
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28677
|
-
return
|
|
28870
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28678
28871
|
innerProps,
|
|
28679
28872
|
isRtl,
|
|
28680
28873
|
size: size4
|
|
28681
28874
|
}), "loadingIndicator", {
|
|
28682
28875
|
indicator: true,
|
|
28683
28876
|
"loading-indicator": true
|
|
28684
|
-
}), innerProps),
|
|
28877
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
28685
28878
|
delay: 0,
|
|
28686
28879
|
offset: isRtl
|
|
28687
|
-
}),
|
|
28880
|
+
}), jsx86(LoadingDot, {
|
|
28688
28881
|
delay: 160,
|
|
28689
28882
|
offset: true
|
|
28690
|
-
}),
|
|
28883
|
+
}), jsx86(LoadingDot, {
|
|
28691
28884
|
delay: 320,
|
|
28692
28885
|
offset: !isRtl
|
|
28693
28886
|
}));
|
|
@@ -28719,7 +28912,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28719
28912
|
};
|
|
28720
28913
|
var Control = function Control2(props) {
|
|
28721
28914
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28722
|
-
return
|
|
28915
|
+
return jsx86("div", _extends({
|
|
28723
28916
|
ref: innerRef
|
|
28724
28917
|
}, getStyleProps(props, "control", {
|
|
28725
28918
|
control: true,
|
|
@@ -28741,15 +28934,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28741
28934
|
};
|
|
28742
28935
|
var Group = function Group2(props) {
|
|
28743
28936
|
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;
|
|
28744
|
-
return
|
|
28937
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
28745
28938
|
group: true
|
|
28746
|
-
}), innerProps),
|
|
28939
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
28747
28940
|
selectProps,
|
|
28748
28941
|
theme,
|
|
28749
28942
|
getStyles,
|
|
28750
28943
|
getClassNames,
|
|
28751
28944
|
cx
|
|
28752
|
-
}), label),
|
|
28945
|
+
}), label), jsx86("div", null, children));
|
|
28753
28946
|
};
|
|
28754
28947
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28755
28948
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28771,7 +28964,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28771
28964
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28772
28965
|
_cleanCommonProps.data;
|
|
28773
28966
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28774
|
-
return
|
|
28967
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28775
28968
|
"group-heading": true
|
|
28776
28969
|
}), innerProps));
|
|
28777
28970
|
};
|
|
@@ -28823,11 +29016,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28823
29016
|
var Input = function Input2(props) {
|
|
28824
29017
|
var cx = props.cx, value = props.value;
|
|
28825
29018
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28826
|
-
return
|
|
29019
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28827
29020
|
"input-container": true
|
|
28828
29021
|
}), {
|
|
28829
29022
|
"data-value": value || ""
|
|
28830
|
-
}),
|
|
29023
|
+
}), jsx86("input", _extends({
|
|
28831
29024
|
className: cx({
|
|
28832
29025
|
input: true
|
|
28833
29026
|
}, inputClassName),
|
|
@@ -28881,35 +29074,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28881
29074
|
};
|
|
28882
29075
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28883
29076
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28884
|
-
return
|
|
29077
|
+
return jsx86("div", innerProps, children);
|
|
28885
29078
|
};
|
|
28886
29079
|
var MultiValueContainer = MultiValueGeneric;
|
|
28887
29080
|
var MultiValueLabel = MultiValueGeneric;
|
|
28888
29081
|
function MultiValueRemove(_ref5) {
|
|
28889
29082
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28890
|
-
return
|
|
29083
|
+
return jsx86("div", _extends({
|
|
28891
29084
|
role: "button"
|
|
28892
|
-
}, innerProps), children ||
|
|
29085
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28893
29086
|
size: 14
|
|
28894
29087
|
}));
|
|
28895
29088
|
}
|
|
28896
29089
|
var MultiValue = function MultiValue2(props) {
|
|
28897
29090
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28898
29091
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28899
|
-
return
|
|
29092
|
+
return jsx86(Container, {
|
|
28900
29093
|
data,
|
|
28901
29094
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28902
29095
|
"multi-value": true,
|
|
28903
29096
|
"multi-value--is-disabled": isDisabled
|
|
28904
29097
|
})), innerProps),
|
|
28905
29098
|
selectProps
|
|
28906
|
-
},
|
|
29099
|
+
}, jsx86(Label, {
|
|
28907
29100
|
data,
|
|
28908
29101
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28909
29102
|
"multi-value__label": true
|
|
28910
29103
|
})),
|
|
28911
29104
|
selectProps
|
|
28912
|
-
}, children),
|
|
29105
|
+
}, children), jsx86(Remove, {
|
|
28913
29106
|
data,
|
|
28914
29107
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28915
29108
|
"multi-value__remove": true
|
|
@@ -28942,7 +29135,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28942
29135
|
};
|
|
28943
29136
|
var Option = function Option2(props) {
|
|
28944
29137
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28945
|
-
return
|
|
29138
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28946
29139
|
option: true,
|
|
28947
29140
|
"option--is-disabled": isDisabled,
|
|
28948
29141
|
"option--is-focused": isFocused,
|
|
@@ -28966,7 +29159,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28966
29159
|
};
|
|
28967
29160
|
var Placeholder = function Placeholder2(props) {
|
|
28968
29161
|
var children = props.children, innerProps = props.innerProps;
|
|
28969
|
-
return
|
|
29162
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28970
29163
|
placeholder: true
|
|
28971
29164
|
}), innerProps), children);
|
|
28972
29165
|
};
|
|
@@ -28988,7 +29181,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28988
29181
|
};
|
|
28989
29182
|
var SingleValue = function SingleValue2(props) {
|
|
28990
29183
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28991
|
-
return
|
|
29184
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28992
29185
|
"single-value": true,
|
|
28993
29186
|
"single-value--is-disabled": isDisabled
|
|
28994
29187
|
}), innerProps), children);
|
|
@@ -29090,7 +29283,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29090
29283
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
29091
29284
|
};
|
|
29092
29285
|
var A11yText = function A11yText2(props) {
|
|
29093
|
-
return
|
|
29286
|
+
return jsx86("span", _extends({
|
|
29094
29287
|
css: _ref
|
|
29095
29288
|
}, props));
|
|
29096
29289
|
};
|
|
@@ -29151,10 +29344,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29151
29344
|
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;
|
|
29152
29345
|
var ariaLabel = selectProps["aria-label"];
|
|
29153
29346
|
var ariaLive = selectProps["aria-live"];
|
|
29154
|
-
var messages = (0,
|
|
29347
|
+
var messages = (0, import_react53.useMemo)(function() {
|
|
29155
29348
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
29156
29349
|
}, [ariaLiveMessages]);
|
|
29157
|
-
var ariaSelected = (0,
|
|
29350
|
+
var ariaSelected = (0, import_react53.useMemo)(function() {
|
|
29158
29351
|
var message2 = "";
|
|
29159
29352
|
if (ariaSelection && messages.onChange) {
|
|
29160
29353
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -29176,7 +29369,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29176
29369
|
}
|
|
29177
29370
|
return message2;
|
|
29178
29371
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
29179
|
-
var ariaFocused = (0,
|
|
29372
|
+
var ariaFocused = (0, import_react53.useMemo)(function() {
|
|
29180
29373
|
var focusMsg = "";
|
|
29181
29374
|
var focused = focusedOption || focusedValue;
|
|
29182
29375
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -29195,7 +29388,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29195
29388
|
}
|
|
29196
29389
|
return focusMsg;
|
|
29197
29390
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
29198
|
-
var ariaResults = (0,
|
|
29391
|
+
var ariaResults = (0, import_react53.useMemo)(function() {
|
|
29199
29392
|
var resultsMsg = "";
|
|
29200
29393
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
29201
29394
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -29209,7 +29402,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29209
29402
|
return resultsMsg;
|
|
29210
29403
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
29211
29404
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
29212
|
-
var ariaGuidance = (0,
|
|
29405
|
+
var ariaGuidance = (0, import_react53.useMemo)(function() {
|
|
29213
29406
|
var guidanceMsg = "";
|
|
29214
29407
|
if (messages.guidance) {
|
|
29215
29408
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -29225,18 +29418,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29225
29418
|
}
|
|
29226
29419
|
return guidanceMsg;
|
|
29227
29420
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29228
|
-
var ScreenReaderText =
|
|
29421
|
+
var ScreenReaderText = jsx86(import_react53.Fragment, null, jsx86("span", {
|
|
29229
29422
|
id: "aria-selection"
|
|
29230
|
-
}, ariaSelected),
|
|
29423
|
+
}, ariaSelected), jsx86("span", {
|
|
29231
29424
|
id: "aria-focused"
|
|
29232
|
-
}, ariaFocused),
|
|
29425
|
+
}, ariaFocused), jsx86("span", {
|
|
29233
29426
|
id: "aria-results"
|
|
29234
|
-
}, ariaResults),
|
|
29427
|
+
}, ariaResults), jsx86("span", {
|
|
29235
29428
|
id: "aria-guidance"
|
|
29236
29429
|
}, ariaGuidance));
|
|
29237
|
-
return
|
|
29430
|
+
return jsx86(import_react53.Fragment, null, jsx86(A11yText$1, {
|
|
29238
29431
|
id
|
|
29239
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29432
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
29240
29433
|
"aria-live": ariaLive,
|
|
29241
29434
|
"aria-atomic": "false",
|
|
29242
29435
|
"aria-relevant": "additions text",
|
|
@@ -29549,7 +29742,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29549
29742
|
function DummyInput(_ref3) {
|
|
29550
29743
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29551
29744
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29552
|
-
return
|
|
29745
|
+
return jsx86("input", _extends({
|
|
29553
29746
|
ref: innerRef
|
|
29554
29747
|
}, filteredProps, {
|
|
29555
29748
|
css: /* @__PURE__ */ css({
|
|
@@ -29581,11 +29774,11 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29581
29774
|
};
|
|
29582
29775
|
function useScrollCapture(_ref3) {
|
|
29583
29776
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
29584
|
-
var isBottom = (0,
|
|
29585
|
-
var isTop = (0,
|
|
29586
|
-
var touchStart = (0,
|
|
29587
|
-
var scrollTarget = (0,
|
|
29588
|
-
var handleEventDelta = (0,
|
|
29777
|
+
var isBottom = (0, import_react53.useRef)(false);
|
|
29778
|
+
var isTop = (0, import_react53.useRef)(false);
|
|
29779
|
+
var touchStart = (0, import_react53.useRef)(0);
|
|
29780
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29781
|
+
var handleEventDelta = (0, import_react53.useCallback)(function(event, delta) {
|
|
29589
29782
|
if (scrollTarget.current === null) return;
|
|
29590
29783
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
29591
29784
|
var target = scrollTarget.current;
|
|
@@ -29619,17 +29812,17 @@ function useScrollCapture(_ref3) {
|
|
|
29619
29812
|
cancelScroll(event);
|
|
29620
29813
|
}
|
|
29621
29814
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
29622
|
-
var onWheel = (0,
|
|
29815
|
+
var onWheel = (0, import_react53.useCallback)(function(event) {
|
|
29623
29816
|
handleEventDelta(event, event.deltaY);
|
|
29624
29817
|
}, [handleEventDelta]);
|
|
29625
|
-
var onTouchStart = (0,
|
|
29818
|
+
var onTouchStart = (0, import_react53.useCallback)(function(event) {
|
|
29626
29819
|
touchStart.current = event.changedTouches[0].clientY;
|
|
29627
29820
|
}, []);
|
|
29628
|
-
var onTouchMove = (0,
|
|
29821
|
+
var onTouchMove = (0, import_react53.useCallback)(function(event) {
|
|
29629
29822
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
29630
29823
|
handleEventDelta(event, deltaY);
|
|
29631
29824
|
}, [handleEventDelta]);
|
|
29632
|
-
var startListening = (0,
|
|
29825
|
+
var startListening = (0, import_react53.useCallback)(function(el) {
|
|
29633
29826
|
if (!el) return;
|
|
29634
29827
|
var notPassive = supportsPassiveEvents ? {
|
|
29635
29828
|
passive: false
|
|
@@ -29638,13 +29831,13 @@ function useScrollCapture(_ref3) {
|
|
|
29638
29831
|
el.addEventListener("touchstart", onTouchStart, notPassive);
|
|
29639
29832
|
el.addEventListener("touchmove", onTouchMove, notPassive);
|
|
29640
29833
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29641
|
-
var stopListening = (0,
|
|
29834
|
+
var stopListening = (0, import_react53.useCallback)(function(el) {
|
|
29642
29835
|
if (!el) return;
|
|
29643
29836
|
el.removeEventListener("wheel", onWheel, false);
|
|
29644
29837
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29645
29838
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29646
29839
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29647
|
-
(0,
|
|
29840
|
+
(0, import_react53.useEffect)(function() {
|
|
29648
29841
|
if (!isEnabled) return;
|
|
29649
29842
|
var element = scrollTarget.current;
|
|
29650
29843
|
startListening(element);
|
|
@@ -29691,9 +29884,9 @@ var listenerOptions = {
|
|
|
29691
29884
|
};
|
|
29692
29885
|
function useScrollLock(_ref3) {
|
|
29693
29886
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
29694
|
-
var originalStyles = (0,
|
|
29695
|
-
var scrollTarget = (0,
|
|
29696
|
-
var addScrollLock = (0,
|
|
29887
|
+
var originalStyles = (0, import_react53.useRef)({});
|
|
29888
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29889
|
+
var addScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
29697
29890
|
if (!canUseDOM) return;
|
|
29698
29891
|
var target = document.body;
|
|
29699
29892
|
var targetStyle = target && target.style;
|
|
@@ -29726,7 +29919,7 @@ function useScrollLock(_ref3) {
|
|
|
29726
29919
|
}
|
|
29727
29920
|
activeScrollLocks += 1;
|
|
29728
29921
|
}, [accountForScrollbars]);
|
|
29729
|
-
var removeScrollLock = (0,
|
|
29922
|
+
var removeScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
29730
29923
|
if (!canUseDOM) return;
|
|
29731
29924
|
var target = document.body;
|
|
29732
29925
|
var targetStyle = target && target.style;
|
|
@@ -29747,7 +29940,7 @@ function useScrollLock(_ref3) {
|
|
|
29747
29940
|
}
|
|
29748
29941
|
}
|
|
29749
29942
|
}, [accountForScrollbars]);
|
|
29750
|
-
(0,
|
|
29943
|
+
(0, import_react53.useEffect)(function() {
|
|
29751
29944
|
if (!isEnabled) return;
|
|
29752
29945
|
var element = scrollTarget.current;
|
|
29753
29946
|
addScrollLock(element);
|
|
@@ -29791,7 +29984,7 @@ function ScrollManager(_ref3) {
|
|
|
29791
29984
|
setScrollCaptureTarget(element);
|
|
29792
29985
|
setScrollLockTarget(element);
|
|
29793
29986
|
};
|
|
29794
|
-
return
|
|
29987
|
+
return jsx86(import_react53.Fragment, null, lockEnabled && jsx86("div", {
|
|
29795
29988
|
onClick: blurSelectInput,
|
|
29796
29989
|
css: _ref2$1
|
|
29797
29990
|
}), children(targetRef));
|
|
@@ -29810,7 +30003,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29810
30003
|
};
|
|
29811
30004
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29812
30005
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29813
|
-
return
|
|
30006
|
+
return jsx86("input", {
|
|
29814
30007
|
required: true,
|
|
29815
30008
|
name: name2,
|
|
29816
30009
|
tabIndex: -1,
|
|
@@ -30951,7 +31144,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30951
31144
|
"aria-describedby": this.getElementId("placeholder")
|
|
30952
31145
|
});
|
|
30953
31146
|
if (!isSearchable) {
|
|
30954
|
-
return /* @__PURE__ */
|
|
31147
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30955
31148
|
id,
|
|
30956
31149
|
innerRef: this.getInputRef,
|
|
30957
31150
|
onBlur: this.onInputBlur,
|
|
@@ -30964,7 +31157,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30964
31157
|
value: ""
|
|
30965
31158
|
}, ariaAttributes));
|
|
30966
31159
|
}
|
|
30967
|
-
return /* @__PURE__ */
|
|
31160
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30968
31161
|
autoCapitalize: "none",
|
|
30969
31162
|
autoComplete: "off",
|
|
30970
31163
|
autoCorrect: "off",
|
|
@@ -30992,7 +31185,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30992
31185
|
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;
|
|
30993
31186
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30994
31187
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30995
|
-
return inputValue ? null : /* @__PURE__ */
|
|
31188
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30996
31189
|
key: "placeholder",
|
|
30997
31190
|
isDisabled,
|
|
30998
31191
|
isFocused,
|
|
@@ -31005,7 +31198,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31005
31198
|
return selectValue.map(function(opt, index4) {
|
|
31006
31199
|
var isOptionFocused = opt === focusedValue;
|
|
31007
31200
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
31008
|
-
return /* @__PURE__ */
|
|
31201
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
31009
31202
|
components: {
|
|
31010
31203
|
Container: MultiValueContainer2,
|
|
31011
31204
|
Label: MultiValueLabel2,
|
|
@@ -31034,7 +31227,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31034
31227
|
return null;
|
|
31035
31228
|
}
|
|
31036
31229
|
var singleValue = selectValue[0];
|
|
31037
|
-
return /* @__PURE__ */
|
|
31230
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
31038
31231
|
data: singleValue,
|
|
31039
31232
|
isDisabled
|
|
31040
31233
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -31054,7 +31247,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31054
31247
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
31055
31248
|
"aria-hidden": "true"
|
|
31056
31249
|
};
|
|
31057
|
-
return /* @__PURE__ */
|
|
31250
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
31058
31251
|
innerProps,
|
|
31059
31252
|
isFocused
|
|
31060
31253
|
}));
|
|
@@ -31070,7 +31263,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31070
31263
|
var innerProps = {
|
|
31071
31264
|
"aria-hidden": "true"
|
|
31072
31265
|
};
|
|
31073
|
-
return /* @__PURE__ */
|
|
31266
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
31074
31267
|
innerProps,
|
|
31075
31268
|
isDisabled,
|
|
31076
31269
|
isFocused
|
|
@@ -31084,7 +31277,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31084
31277
|
var commonProps = this.commonProps;
|
|
31085
31278
|
var isDisabled = this.props.isDisabled;
|
|
31086
31279
|
var isFocused = this.state.isFocused;
|
|
31087
|
-
return /* @__PURE__ */
|
|
31280
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
31088
31281
|
isDisabled,
|
|
31089
31282
|
isFocused
|
|
31090
31283
|
}));
|
|
@@ -31102,7 +31295,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31102
31295
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
31103
31296
|
"aria-hidden": "true"
|
|
31104
31297
|
};
|
|
31105
|
-
return /* @__PURE__ */
|
|
31298
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
31106
31299
|
innerProps,
|
|
31107
31300
|
isDisabled,
|
|
31108
31301
|
isFocused
|
|
@@ -31137,7 +31330,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31137
31330
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
31138
31331
|
// is not supported on Apple devices
|
|
31139
31332
|
};
|
|
31140
|
-
return /* @__PURE__ */
|
|
31333
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
31141
31334
|
innerProps,
|
|
31142
31335
|
data,
|
|
31143
31336
|
isDisabled,
|
|
@@ -31157,7 +31350,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31157
31350
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
31158
31351
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
31159
31352
|
var headingId = "".concat(groupId, "-heading");
|
|
31160
|
-
return /* @__PURE__ */
|
|
31353
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
31161
31354
|
key: groupId,
|
|
31162
31355
|
data: _data,
|
|
31163
31356
|
options: options2,
|
|
@@ -31179,13 +31372,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31179
31372
|
inputValue
|
|
31180
31373
|
});
|
|
31181
31374
|
if (message2 === null) return null;
|
|
31182
|
-
menuUI = /* @__PURE__ */
|
|
31375
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
31183
31376
|
} else {
|
|
31184
31377
|
var _message = noOptionsMessage2({
|
|
31185
31378
|
inputValue
|
|
31186
31379
|
});
|
|
31187
31380
|
if (_message === null) return null;
|
|
31188
|
-
menuUI = /* @__PURE__ */
|
|
31381
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
31189
31382
|
}
|
|
31190
31383
|
var menuPlacementProps = {
|
|
31191
31384
|
minMenuHeight,
|
|
@@ -31194,9 +31387,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31194
31387
|
menuPosition,
|
|
31195
31388
|
menuShouldScrollIntoView
|
|
31196
31389
|
};
|
|
31197
|
-
var menuElement = /* @__PURE__ */
|
|
31390
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
31198
31391
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
31199
|
-
return /* @__PURE__ */
|
|
31392
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
31200
31393
|
innerRef: ref,
|
|
31201
31394
|
innerProps: {
|
|
31202
31395
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -31204,13 +31397,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31204
31397
|
},
|
|
31205
31398
|
isLoading,
|
|
31206
31399
|
placement
|
|
31207
|
-
}), /* @__PURE__ */
|
|
31400
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
31208
31401
|
captureEnabled: captureMenuScroll,
|
|
31209
31402
|
onTopArrive: onMenuScrollToTop,
|
|
31210
31403
|
onBottomArrive: onMenuScrollToBottom,
|
|
31211
31404
|
lockEnabled: menuShouldBlockScroll
|
|
31212
31405
|
}, function(scrollTargetRef) {
|
|
31213
|
-
return /* @__PURE__ */
|
|
31406
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
31214
31407
|
innerRef: function innerRef(instance2) {
|
|
31215
31408
|
_this4.getMenuListRef(instance2);
|
|
31216
31409
|
scrollTargetRef(instance2);
|
|
@@ -31226,7 +31419,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31226
31419
|
}), menuUI);
|
|
31227
31420
|
}));
|
|
31228
31421
|
});
|
|
31229
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
31422
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
31230
31423
|
appendTo: menuPortalTarget,
|
|
31231
31424
|
controlElement: this.controlRef,
|
|
31232
31425
|
menuPlacement,
|
|
@@ -31240,7 +31433,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31240
31433
|
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;
|
|
31241
31434
|
var selectValue = this.state.selectValue;
|
|
31242
31435
|
if (required && !this.hasValue() && !isDisabled) {
|
|
31243
|
-
return /* @__PURE__ */
|
|
31436
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
31244
31437
|
name: name2,
|
|
31245
31438
|
onFocus: this.onValueInputFocus
|
|
31246
31439
|
});
|
|
@@ -31251,29 +31444,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31251
31444
|
var value = selectValue.map(function(opt) {
|
|
31252
31445
|
return _this5.getOptionValue(opt);
|
|
31253
31446
|
}).join(delimiter2);
|
|
31254
|
-
return /* @__PURE__ */
|
|
31447
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31255
31448
|
name: name2,
|
|
31256
31449
|
type: "hidden",
|
|
31257
31450
|
value
|
|
31258
31451
|
});
|
|
31259
31452
|
} else {
|
|
31260
31453
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
31261
|
-
return /* @__PURE__ */
|
|
31454
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31262
31455
|
key: "i-".concat(i3),
|
|
31263
31456
|
name: name2,
|
|
31264
31457
|
type: "hidden",
|
|
31265
31458
|
value: _this5.getOptionValue(opt)
|
|
31266
31459
|
});
|
|
31267
|
-
}) : /* @__PURE__ */
|
|
31460
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
31268
31461
|
name: name2,
|
|
31269
31462
|
type: "hidden",
|
|
31270
31463
|
value: ""
|
|
31271
31464
|
});
|
|
31272
|
-
return /* @__PURE__ */
|
|
31465
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
31273
31466
|
}
|
|
31274
31467
|
} else {
|
|
31275
31468
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
31276
|
-
return /* @__PURE__ */
|
|
31469
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31277
31470
|
name: name2,
|
|
31278
31471
|
type: "hidden",
|
|
31279
31472
|
value: _value
|
|
@@ -31286,7 +31479,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31286
31479
|
var commonProps = this.commonProps;
|
|
31287
31480
|
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;
|
|
31288
31481
|
var focusableOptions = this.getFocusableOptions();
|
|
31289
|
-
return /* @__PURE__ */
|
|
31482
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
31290
31483
|
id: this.getElementId("live-region"),
|
|
31291
31484
|
ariaSelection,
|
|
31292
31485
|
focusedOption,
|
|
@@ -31304,7 +31497,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31304
31497
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
31305
31498
|
var isFocused = this.state.isFocused;
|
|
31306
31499
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
31307
|
-
return /* @__PURE__ */
|
|
31500
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
31308
31501
|
className,
|
|
31309
31502
|
innerProps: {
|
|
31310
31503
|
id,
|
|
@@ -31312,7 +31505,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31312
31505
|
},
|
|
31313
31506
|
isDisabled,
|
|
31314
31507
|
isFocused
|
|
31315
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
31508
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
31316
31509
|
innerRef: this.getControlRef,
|
|
31317
31510
|
innerProps: {
|
|
31318
31511
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -31321,9 +31514,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31321
31514
|
isDisabled,
|
|
31322
31515
|
isFocused,
|
|
31323
31516
|
menuIsOpen
|
|
31324
|
-
}), /* @__PURE__ */
|
|
31517
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
31325
31518
|
isDisabled
|
|
31326
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
31519
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
31327
31520
|
isDisabled
|
|
31328
31521
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
31329
31522
|
}
|
|
@@ -31374,7 +31567,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31374
31567
|
}
|
|
31375
31568
|
}]);
|
|
31376
31569
|
return Select2;
|
|
31377
|
-
}(
|
|
31570
|
+
}(import_react53.Component);
|
|
31378
31571
|
Select.defaultProps = defaultProps;
|
|
31379
31572
|
|
|
31380
31573
|
// node_modules/react-select/dist/react-select.esm.js
|
|
@@ -31390,9 +31583,9 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
31390
31583
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
31391
31584
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
31392
31585
|
var import_react_dom7 = require("react-dom");
|
|
31393
|
-
var StateManagedSelect = /* @__PURE__ */ (0,
|
|
31586
|
+
var StateManagedSelect = /* @__PURE__ */ (0, import_react55.forwardRef)(function(props, ref) {
|
|
31394
31587
|
var baseSelectProps = useStateManager(props);
|
|
31395
|
-
return /* @__PURE__ */
|
|
31588
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
31396
31589
|
ref
|
|
31397
31590
|
}, baseSelectProps));
|
|
31398
31591
|
});
|
|
@@ -31400,7 +31593,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31400
31593
|
|
|
31401
31594
|
// src/widgets/basic/date-field/date.tsx
|
|
31402
31595
|
var import_moment2 = __toESM(require_moment());
|
|
31403
|
-
var
|
|
31596
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
31404
31597
|
var DateField = (props) => {
|
|
31405
31598
|
const {
|
|
31406
31599
|
name: name2,
|
|
@@ -31427,9 +31620,9 @@ var DateField = (props) => {
|
|
|
31427
31620
|
context
|
|
31428
31621
|
} = props;
|
|
31429
31622
|
const { t: t3 } = useI18n();
|
|
31430
|
-
const InputDateCustom = (0,
|
|
31431
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
31432
|
-
/* @__PURE__ */ (0,
|
|
31623
|
+
const InputDateCustom = (0, import_react56.forwardRef)(
|
|
31624
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("label", { className: `flex ${className}`, children: [
|
|
31625
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31433
31626
|
"input",
|
|
31434
31627
|
{
|
|
31435
31628
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31443,13 +31636,13 @@ var DateField = (props) => {
|
|
|
31443
31636
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31444
31637
|
}
|
|
31445
31638
|
),
|
|
31446
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
31639
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CalendarIcon, {})
|
|
31447
31640
|
] })
|
|
31448
31641
|
);
|
|
31449
31642
|
if (!isForm && !isEditTable) {
|
|
31450
|
-
return /* @__PURE__ */ (0,
|
|
31643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31451
31644
|
} else {
|
|
31452
|
-
return /* @__PURE__ */ (0,
|
|
31645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31453
31646
|
Controller,
|
|
31454
31647
|
{
|
|
31455
31648
|
name: name2 || "",
|
|
@@ -31465,14 +31658,14 @@ var DateField = (props) => {
|
|
|
31465
31658
|
},
|
|
31466
31659
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31467
31660
|
const { setError, clearErrors } = methods;
|
|
31468
|
-
(0,
|
|
31661
|
+
(0, import_react56.useEffect)(() => {
|
|
31469
31662
|
if (value) {
|
|
31470
31663
|
clearErrors(name2);
|
|
31471
31664
|
}
|
|
31472
31665
|
}, [value, clearErrors, name2]);
|
|
31473
31666
|
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;
|
|
31474
|
-
return /* @__PURE__ */ (0,
|
|
31475
|
-
/* @__PURE__ */ (0,
|
|
31667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
31668
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31476
31669
|
DatePicker,
|
|
31477
31670
|
{
|
|
31478
31671
|
selected: selectedDate,
|
|
@@ -31520,7 +31713,7 @@ var DateField = (props) => {
|
|
|
31520
31713
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31521
31714
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31522
31715
|
showTimeInput: showTime,
|
|
31523
|
-
customInput: /* @__PURE__ */ (0,
|
|
31716
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31524
31717
|
InputDateCustom,
|
|
31525
31718
|
{
|
|
31526
31719
|
isForm,
|
|
@@ -31538,7 +31731,7 @@ var DateField = (props) => {
|
|
|
31538
31731
|
increaseMonth,
|
|
31539
31732
|
prevMonthButtonDisabled,
|
|
31540
31733
|
nextMonthButtonDisabled
|
|
31541
|
-
}) => /* @__PURE__ */ (0,
|
|
31734
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
31542
31735
|
"div",
|
|
31543
31736
|
{
|
|
31544
31737
|
style: {
|
|
@@ -31547,7 +31740,7 @@ var DateField = (props) => {
|
|
|
31547
31740
|
justifyContent: "center"
|
|
31548
31741
|
},
|
|
31549
31742
|
children: [
|
|
31550
|
-
/* @__PURE__ */ (0,
|
|
31743
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31551
31744
|
"button",
|
|
31552
31745
|
{
|
|
31553
31746
|
onClick: decreaseMonth,
|
|
@@ -31555,7 +31748,7 @@ var DateField = (props) => {
|
|
|
31555
31748
|
children: "<"
|
|
31556
31749
|
}
|
|
31557
31750
|
),
|
|
31558
|
-
/* @__PURE__ */ (0,
|
|
31751
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31559
31752
|
StateManagedSelect$1,
|
|
31560
31753
|
{
|
|
31561
31754
|
classNames: {
|
|
@@ -31581,7 +31774,7 @@ var DateField = (props) => {
|
|
|
31581
31774
|
autoFocus: true
|
|
31582
31775
|
}
|
|
31583
31776
|
),
|
|
31584
|
-
/* @__PURE__ */ (0,
|
|
31777
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31585
31778
|
StateManagedSelect$1,
|
|
31586
31779
|
{
|
|
31587
31780
|
classNames: {
|
|
@@ -31609,7 +31802,7 @@ var DateField = (props) => {
|
|
|
31609
31802
|
}))
|
|
31610
31803
|
}
|
|
31611
31804
|
),
|
|
31612
|
-
/* @__PURE__ */ (0,
|
|
31805
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31613
31806
|
"button",
|
|
31614
31807
|
{
|
|
31615
31808
|
onClick: increaseMonth,
|
|
@@ -31622,7 +31815,7 @@ var DateField = (props) => {
|
|
|
31622
31815
|
)
|
|
31623
31816
|
}
|
|
31624
31817
|
),
|
|
31625
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31818
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31626
31819
|
] });
|
|
31627
31820
|
}
|
|
31628
31821
|
}
|
|
@@ -31631,26 +31824,26 @@ var DateField = (props) => {
|
|
|
31631
31824
|
};
|
|
31632
31825
|
|
|
31633
31826
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31634
|
-
var
|
|
31827
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
31635
31828
|
var DownLoadBinaryField = (props) => {
|
|
31636
31829
|
const { handleFileDownload } = props;
|
|
31637
31830
|
const { t: t3 } = useI18n();
|
|
31638
|
-
return /* @__PURE__ */ (0,
|
|
31831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
31639
31832
|
"button",
|
|
31640
31833
|
{
|
|
31641
31834
|
type: "button",
|
|
31642
31835
|
onClick: handleFileDownload,
|
|
31643
31836
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31644
31837
|
children: [
|
|
31645
|
-
/* @__PURE__ */ (0,
|
|
31646
|
-
/* @__PURE__ */ (0,
|
|
31838
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DownloadIcon, {}),
|
|
31839
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31647
31840
|
]
|
|
31648
31841
|
}
|
|
31649
31842
|
);
|
|
31650
31843
|
};
|
|
31651
31844
|
|
|
31652
31845
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31653
|
-
var
|
|
31846
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
31654
31847
|
var DownloadFileField = (props) => {
|
|
31655
31848
|
const {
|
|
31656
31849
|
readonly,
|
|
@@ -31662,15 +31855,15 @@ var DownloadFileField = (props) => {
|
|
|
31662
31855
|
handleFileChange,
|
|
31663
31856
|
handleFileDownload
|
|
31664
31857
|
} = props;
|
|
31665
|
-
return /* @__PURE__ */ (0,
|
|
31666
|
-
/* @__PURE__ */ (0,
|
|
31858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "", children: [
|
|
31859
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
31667
31860
|
"label",
|
|
31668
31861
|
{
|
|
31669
31862
|
htmlFor: inputId,
|
|
31670
31863
|
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",
|
|
31671
31864
|
children: [
|
|
31672
|
-
file ? /* @__PURE__ */ (0,
|
|
31673
|
-
/* @__PURE__ */ (0,
|
|
31865
|
+
file ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31866
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31674
31867
|
"input",
|
|
31675
31868
|
{
|
|
31676
31869
|
id: inputId,
|
|
@@ -31684,7 +31877,7 @@ var DownloadFileField = (props) => {
|
|
|
31684
31877
|
]
|
|
31685
31878
|
}
|
|
31686
31879
|
),
|
|
31687
|
-
file && /* @__PURE__ */ (0,
|
|
31880
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31688
31881
|
"button",
|
|
31689
31882
|
{
|
|
31690
31883
|
onClick: handleFileDownload,
|
|
@@ -31697,8 +31890,8 @@ var DownloadFileField = (props) => {
|
|
|
31697
31890
|
};
|
|
31698
31891
|
|
|
31699
31892
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31700
|
-
var
|
|
31701
|
-
var
|
|
31893
|
+
var import_react57 = require("react");
|
|
31894
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
31702
31895
|
var DropdownField = (props) => {
|
|
31703
31896
|
const {
|
|
31704
31897
|
options: options2,
|
|
@@ -31710,32 +31903,32 @@ var DropdownField = (props) => {
|
|
|
31710
31903
|
dropdownClassName = "",
|
|
31711
31904
|
useClickOutside: useClickOutside2
|
|
31712
31905
|
} = props;
|
|
31713
|
-
const [open, setOpen] = (0,
|
|
31906
|
+
const [open, setOpen] = (0, import_react57.useState)(false);
|
|
31714
31907
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31715
|
-
return /* @__PURE__ */ (0,
|
|
31908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
31716
31909
|
"div",
|
|
31717
31910
|
{
|
|
31718
31911
|
ref: dropdownRef,
|
|
31719
31912
|
className: `relative ${className}`,
|
|
31720
31913
|
onClick: () => setOpen(!open),
|
|
31721
31914
|
children: [
|
|
31722
|
-
/* @__PURE__ */ (0,
|
|
31915
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
31723
31916
|
"div",
|
|
31724
31917
|
{
|
|
31725
31918
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31726
31919
|
children: [
|
|
31727
31920
|
selectedValue?.icon,
|
|
31728
|
-
/* @__PURE__ */ (0,
|
|
31729
|
-
/* @__PURE__ */ (0,
|
|
31921
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: selectedValue?.label }),
|
|
31922
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31730
31923
|
]
|
|
31731
31924
|
}
|
|
31732
31925
|
),
|
|
31733
|
-
open && /* @__PURE__ */ (0,
|
|
31926
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31734
31927
|
"div",
|
|
31735
31928
|
{
|
|
31736
31929
|
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}`,
|
|
31737
31930
|
onClick: (e3) => e3.stopPropagation(),
|
|
31738
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31931
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31739
31932
|
"div",
|
|
31740
31933
|
{
|
|
31741
31934
|
onClick: () => {
|
|
@@ -31755,7 +31948,7 @@ var DropdownField = (props) => {
|
|
|
31755
31948
|
};
|
|
31756
31949
|
|
|
31757
31950
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31758
|
-
var
|
|
31951
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31759
31952
|
var FeeField = (props) => {
|
|
31760
31953
|
const { value, formValues } = props;
|
|
31761
31954
|
const { t: t3 } = useI18n();
|
|
@@ -31766,27 +31959,27 @@ var FeeField = (props) => {
|
|
|
31766
31959
|
)
|
|
31767
31960
|
) + " VND";
|
|
31768
31961
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31769
|
-
return /* @__PURE__ */ (0,
|
|
31962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31770
31963
|
value?.subtotals?.map((sub) => {
|
|
31771
31964
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31772
|
-
return /* @__PURE__ */ (0,
|
|
31773
|
-
/* @__PURE__ */ (0,
|
|
31774
|
-
/* @__PURE__ */ (0,
|
|
31965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31966
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31967
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31775
31968
|
sub?.name,
|
|
31776
31969
|
":"
|
|
31777
31970
|
] }),
|
|
31778
|
-
/* @__PURE__ */ (0,
|
|
31971
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31779
31972
|
] }),
|
|
31780
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31973
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
31781
31974
|
"div",
|
|
31782
31975
|
{
|
|
31783
31976
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31784
31977
|
children: [
|
|
31785
|
-
/* @__PURE__ */ (0,
|
|
31978
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31786
31979
|
group?.group_name,
|
|
31787
31980
|
":"
|
|
31788
31981
|
] }),
|
|
31789
|
-
/* @__PURE__ */ (0,
|
|
31982
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31790
31983
|
]
|
|
31791
31984
|
},
|
|
31792
31985
|
`tax_groups_${group?.id}`
|
|
@@ -31794,33 +31987,33 @@ var FeeField = (props) => {
|
|
|
31794
31987
|
] });
|
|
31795
31988
|
}
|
|
31796
31989
|
}),
|
|
31797
|
-
/* @__PURE__ */ (0,
|
|
31798
|
-
/* @__PURE__ */ (0,
|
|
31990
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
|
|
31991
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31799
31992
|
t3("total"),
|
|
31800
31993
|
":"
|
|
31801
31994
|
] }),
|
|
31802
|
-
/* @__PURE__ */ (0,
|
|
31995
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31803
31996
|
] }),
|
|
31804
|
-
/* @__PURE__ */ (0,
|
|
31805
|
-
/* @__PURE__ */ (0,
|
|
31997
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
|
|
31998
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31806
31999
|
t3("paid_amount"),
|
|
31807
32000
|
":"
|
|
31808
32001
|
] }),
|
|
31809
|
-
/* @__PURE__ */ (0,
|
|
32002
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31810
32003
|
] }),
|
|
31811
|
-
/* @__PURE__ */ (0,
|
|
31812
|
-
/* @__PURE__ */ (0,
|
|
32004
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
|
|
32005
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31813
32006
|
t3("remanining_amount"),
|
|
31814
32007
|
":"
|
|
31815
32008
|
] }),
|
|
31816
|
-
/* @__PURE__ */ (0,
|
|
32009
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31817
32010
|
] })
|
|
31818
32011
|
] });
|
|
31819
32012
|
};
|
|
31820
32013
|
|
|
31821
32014
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31822
|
-
var
|
|
31823
|
-
var
|
|
32015
|
+
var import_react58 = require("react");
|
|
32016
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31824
32017
|
var RenderFile = ({
|
|
31825
32018
|
file,
|
|
31826
32019
|
onDelete,
|
|
@@ -31830,16 +32023,16 @@ var RenderFile = ({
|
|
|
31830
32023
|
readAs: "all"
|
|
31831
32024
|
});
|
|
31832
32025
|
const fileTypeIcon = {
|
|
31833
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
31834
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
31835
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
31836
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
31837
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
32026
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PdfIcon, {}),
|
|
32027
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
32028
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
32029
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {}),
|
|
32030
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {})
|
|
31838
32031
|
};
|
|
31839
|
-
return /* @__PURE__ */ (0,
|
|
31840
|
-
/* @__PURE__ */ (0,
|
|
31841
|
-
/* @__PURE__ */ (0,
|
|
31842
|
-
/* @__PURE__ */ (0,
|
|
32032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
32033
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
32034
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
32035
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31843
32036
|
"div",
|
|
31844
32037
|
{
|
|
31845
32038
|
style: {
|
|
@@ -31849,20 +32042,20 @@ var RenderFile = ({
|
|
|
31849
32042
|
children: file?.name || file?.display_name || info?.name
|
|
31850
32043
|
}
|
|
31851
32044
|
),
|
|
31852
|
-
/* @__PURE__ */ (0,
|
|
32045
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31853
32046
|
] }),
|
|
31854
|
-
/* @__PURE__ */ (0,
|
|
31855
|
-
/* @__PURE__ */ (0,
|
|
32047
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("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: [
|
|
32048
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31856
32049
|
"span",
|
|
31857
32050
|
{
|
|
31858
32051
|
onClick: () => onDownload && onDownload(
|
|
31859
32052
|
file?.data,
|
|
31860
32053
|
file?.name || file?.display_name || info?.name
|
|
31861
32054
|
),
|
|
31862
|
-
children: /* @__PURE__ */ (0,
|
|
32055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DownloadIcon, {})
|
|
31863
32056
|
}
|
|
31864
32057
|
),
|
|
31865
|
-
/* @__PURE__ */ (0,
|
|
32058
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DeleteIconDanger, {}) })
|
|
31866
32059
|
] })
|
|
31867
32060
|
] });
|
|
31868
32061
|
};
|
|
@@ -31884,10 +32077,10 @@ var FileUploadField = (props) => {
|
|
|
31884
32077
|
downloadFunction
|
|
31885
32078
|
} = props;
|
|
31886
32079
|
const { t: t3 } = useI18n();
|
|
31887
|
-
const fileInputRef = (0,
|
|
31888
|
-
const [selectedFiles, setSelectedFiles] = (0,
|
|
31889
|
-
const [uploadError, setUploadError] = (0,
|
|
31890
|
-
(0,
|
|
32080
|
+
const fileInputRef = (0, import_react58.useRef)(null);
|
|
32081
|
+
const [selectedFiles, setSelectedFiles] = (0, import_react58.useState)([]);
|
|
32082
|
+
const [uploadError, setUploadError] = (0, import_react58.useState)();
|
|
32083
|
+
(0, import_react58.useEffect)(() => {
|
|
31891
32084
|
if (selectedFiles?.length === 0 && value) {
|
|
31892
32085
|
setSelectedFiles([
|
|
31893
32086
|
{
|
|
@@ -31896,7 +32089,7 @@ var FileUploadField = (props) => {
|
|
|
31896
32089
|
]);
|
|
31897
32090
|
}
|
|
31898
32091
|
}, [value]);
|
|
31899
|
-
return /* @__PURE__ */ (0,
|
|
32092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31900
32093
|
Controller,
|
|
31901
32094
|
{
|
|
31902
32095
|
name: name2 || "",
|
|
@@ -31905,7 +32098,7 @@ var FileUploadField = (props) => {
|
|
|
31905
32098
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31906
32099
|
},
|
|
31907
32100
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31908
|
-
(0,
|
|
32101
|
+
(0, import_react58.useEffect)(() => {
|
|
31909
32102
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31910
32103
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31911
32104
|
data = data.split(",")[1];
|
|
@@ -31921,8 +32114,8 @@ var FileUploadField = (props) => {
|
|
|
31921
32114
|
);
|
|
31922
32115
|
}
|
|
31923
32116
|
}, [selectedFiles]);
|
|
31924
|
-
return /* @__PURE__ */ (0,
|
|
31925
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
32117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
32118
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31926
32119
|
RenderFile,
|
|
31927
32120
|
{
|
|
31928
32121
|
file: fileItem,
|
|
@@ -31937,8 +32130,8 @@ var FileUploadField = (props) => {
|
|
|
31937
32130
|
}
|
|
31938
32131
|
}
|
|
31939
32132
|
)),
|
|
31940
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31941
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
32133
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
32134
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31942
32135
|
ButtonSelectFiles,
|
|
31943
32136
|
{
|
|
31944
32137
|
fileInputRef,
|
|
@@ -31953,7 +32146,7 @@ var FileUploadField = (props) => {
|
|
|
31953
32146
|
useUploadFile
|
|
31954
32147
|
}
|
|
31955
32148
|
),
|
|
31956
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32149
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31957
32150
|
] });
|
|
31958
32151
|
}
|
|
31959
32152
|
}
|
|
@@ -31961,8 +32154,8 @@ var FileUploadField = (props) => {
|
|
|
31961
32154
|
};
|
|
31962
32155
|
|
|
31963
32156
|
// src/widgets/basic/float-field/float.tsx
|
|
31964
|
-
var
|
|
31965
|
-
var
|
|
32157
|
+
var import_react59 = require("react");
|
|
32158
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31966
32159
|
var FloatField = (props) => {
|
|
31967
32160
|
const {
|
|
31968
32161
|
name: name2,
|
|
@@ -31980,9 +32173,9 @@ var FloatField = (props) => {
|
|
|
31980
32173
|
} = props;
|
|
31981
32174
|
const { t: t3 } = useI18n();
|
|
31982
32175
|
if (!isForm && !isEditTable) {
|
|
31983
|
-
return /* @__PURE__ */ (0,
|
|
32176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31984
32177
|
}
|
|
31985
|
-
return /* @__PURE__ */ (0,
|
|
32178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31986
32179
|
Controller,
|
|
31987
32180
|
{
|
|
31988
32181
|
name: name2 ?? "",
|
|
@@ -31993,12 +32186,12 @@ var FloatField = (props) => {
|
|
|
31993
32186
|
},
|
|
31994
32187
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31995
32188
|
const { setError, clearErrors } = methods;
|
|
31996
|
-
const [inputValue, setInputValue] = (0,
|
|
32189
|
+
const [inputValue, setInputValue] = (0, import_react59.useState)(
|
|
31997
32190
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31998
32191
|
);
|
|
31999
|
-
const isDirtyRef = (0,
|
|
32000
|
-
const lastCommittedValueRef = (0,
|
|
32001
|
-
(0,
|
|
32192
|
+
const isDirtyRef = (0, import_react59.useRef)(false);
|
|
32193
|
+
const lastCommittedValueRef = (0, import_react59.useRef)(null);
|
|
32194
|
+
(0, import_react59.useEffect)(() => {
|
|
32002
32195
|
if (isDirtyRef.current) return;
|
|
32003
32196
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
32004
32197
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -32076,8 +32269,8 @@ var FloatField = (props) => {
|
|
|
32076
32269
|
}
|
|
32077
32270
|
isDirtyRef.current = false;
|
|
32078
32271
|
};
|
|
32079
|
-
return /* @__PURE__ */ (0,
|
|
32080
|
-
/* @__PURE__ */ (0,
|
|
32272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
32273
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32081
32274
|
"input",
|
|
32082
32275
|
{
|
|
32083
32276
|
value: inputValue,
|
|
@@ -32096,7 +32289,7 @@ var FloatField = (props) => {
|
|
|
32096
32289
|
`
|
|
32097
32290
|
}
|
|
32098
32291
|
),
|
|
32099
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32292
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32100
32293
|
] });
|
|
32101
32294
|
}
|
|
32102
32295
|
}
|
|
@@ -32104,8 +32297,8 @@ var FloatField = (props) => {
|
|
|
32104
32297
|
};
|
|
32105
32298
|
|
|
32106
32299
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32107
|
-
var
|
|
32108
|
-
var
|
|
32300
|
+
var import_react60 = require("react");
|
|
32301
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
32109
32302
|
var FloatTimeField = (props) => {
|
|
32110
32303
|
const {
|
|
32111
32304
|
name: name2,
|
|
@@ -32121,9 +32314,9 @@ var FloatTimeField = (props) => {
|
|
|
32121
32314
|
const { t: t3 } = useI18n();
|
|
32122
32315
|
if (!isForm) {
|
|
32123
32316
|
const formatValue = value ?? 0;
|
|
32124
|
-
return /* @__PURE__ */ (0,
|
|
32317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
32125
32318
|
}
|
|
32126
|
-
return /* @__PURE__ */ (0,
|
|
32319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32127
32320
|
Controller,
|
|
32128
32321
|
{
|
|
32129
32322
|
name: name2 ?? "",
|
|
@@ -32136,11 +32329,11 @@ var FloatTimeField = (props) => {
|
|
|
32136
32329
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32137
32330
|
fieldState: { error: error2, isDirty }
|
|
32138
32331
|
}) => {
|
|
32139
|
-
const [input, setInput] = (0,
|
|
32332
|
+
const [input, setInput] = (0, import_react60.useState)(
|
|
32140
32333
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32141
32334
|
);
|
|
32142
|
-
const [formattedTime, setFormattedTime] = (0,
|
|
32143
|
-
const [errors, setErrors] = (0,
|
|
32335
|
+
const [formattedTime, setFormattedTime] = (0, import_react60.useState)("");
|
|
32336
|
+
const [errors, setErrors] = (0, import_react60.useState)("");
|
|
32144
32337
|
const handleInputChange = (e3) => {
|
|
32145
32338
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32146
32339
|
setInput(raw);
|
|
@@ -32185,8 +32378,8 @@ var FloatTimeField = (props) => {
|
|
|
32185
32378
|
}
|
|
32186
32379
|
onBlur();
|
|
32187
32380
|
};
|
|
32188
|
-
return /* @__PURE__ */ (0,
|
|
32189
|
-
/* @__PURE__ */ (0,
|
|
32381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
32382
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32190
32383
|
"input",
|
|
32191
32384
|
{
|
|
32192
32385
|
type: "text",
|
|
@@ -32218,7 +32411,7 @@ var FloatTimeField = (props) => {
|
|
|
32218
32411
|
readOnly: readonly
|
|
32219
32412
|
}
|
|
32220
32413
|
),
|
|
32221
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
32414
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32222
32415
|
] });
|
|
32223
32416
|
}
|
|
32224
32417
|
}
|
|
@@ -32226,8 +32419,8 @@ var FloatTimeField = (props) => {
|
|
|
32226
32419
|
};
|
|
32227
32420
|
|
|
32228
32421
|
// src/widgets/basic/html-field/html.tsx
|
|
32229
|
-
var
|
|
32230
|
-
var
|
|
32422
|
+
var import_react61 = require("react");
|
|
32423
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
32231
32424
|
var HtmlField = (props) => {
|
|
32232
32425
|
const {
|
|
32233
32426
|
name: name2,
|
|
@@ -32239,18 +32432,18 @@ var HtmlField = (props) => {
|
|
|
32239
32432
|
value,
|
|
32240
32433
|
isEditTable
|
|
32241
32434
|
} = props;
|
|
32242
|
-
const divRef = (0,
|
|
32435
|
+
const divRef = (0, import_react61.useRef)(null);
|
|
32243
32436
|
if (!isForm && !isEditTable) {
|
|
32244
|
-
return /* @__PURE__ */ (0,
|
|
32437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32245
32438
|
}
|
|
32246
|
-
return /* @__PURE__ */ (0,
|
|
32439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
32247
32440
|
Controller,
|
|
32248
32441
|
{
|
|
32249
32442
|
name: name2 ?? "",
|
|
32250
32443
|
control: methods?.control,
|
|
32251
32444
|
defaultValue,
|
|
32252
32445
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32253
|
-
(0,
|
|
32446
|
+
(0, import_react61.useEffect)(() => {
|
|
32254
32447
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32255
32448
|
divRef.current.innerHTML = value2 || "";
|
|
32256
32449
|
}
|
|
@@ -32262,7 +32455,7 @@ var HtmlField = (props) => {
|
|
|
32262
32455
|
onChange2(newValue, "");
|
|
32263
32456
|
}
|
|
32264
32457
|
};
|
|
32265
|
-
return /* @__PURE__ */ (0,
|
|
32458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
32266
32459
|
"div",
|
|
32267
32460
|
{
|
|
32268
32461
|
ref: divRef,
|
|
@@ -32281,28 +32474,28 @@ var HtmlField = (props) => {
|
|
|
32281
32474
|
};
|
|
32282
32475
|
|
|
32283
32476
|
// src/widgets/basic/image-field/image.tsx
|
|
32284
|
-
var
|
|
32477
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
32285
32478
|
var ImageField = (props) => {
|
|
32286
32479
|
const { value, type, name: name2, baseURL } = props;
|
|
32287
32480
|
if (!value) return null;
|
|
32288
32481
|
if (type === "url") {
|
|
32289
|
-
return /* @__PURE__ */ (0,
|
|
32482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32290
32483
|
}
|
|
32291
|
-
return /* @__PURE__ */ (0,
|
|
32484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32292
32485
|
};
|
|
32293
32486
|
|
|
32294
32487
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32295
|
-
var
|
|
32488
|
+
var import_react62 = __toESM(require("react"));
|
|
32296
32489
|
|
|
32297
32490
|
// src/widgets/basic/information-field/information.tsx
|
|
32298
|
-
var
|
|
32491
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
32299
32492
|
var InfomationField = (props) => {
|
|
32300
32493
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32301
32494
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32302
|
-
return /* @__PURE__ */ (0,
|
|
32495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_jsx_runtime96.Fragment, {});
|
|
32303
32496
|
}
|
|
32304
32497
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32305
|
-
return /* @__PURE__ */ (0,
|
|
32498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32306
32499
|
AvatarField,
|
|
32307
32500
|
{
|
|
32308
32501
|
id: item.id,
|
|
@@ -32311,8 +32504,8 @@ var InfomationField = (props) => {
|
|
|
32311
32504
|
stringToColor
|
|
32312
32505
|
},
|
|
32313
32506
|
item.id
|
|
32314
|
-
)) : /* @__PURE__ */ (0,
|
|
32315
|
-
/* @__PURE__ */ (0,
|
|
32507
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32508
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32316
32509
|
AvatarField,
|
|
32317
32510
|
{
|
|
32318
32511
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32322,12 +32515,12 @@ var InfomationField = (props) => {
|
|
|
32322
32515
|
stringToColor
|
|
32323
32516
|
}
|
|
32324
32517
|
),
|
|
32325
|
-
showName && /* @__PURE__ */ (0,
|
|
32518
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32326
32519
|
] }) });
|
|
32327
32520
|
};
|
|
32328
32521
|
|
|
32329
32522
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32330
|
-
var
|
|
32523
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
32331
32524
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32332
32525
|
const { selectProps, data, menuList } = props;
|
|
32333
32526
|
const { relation } = selectProps;
|
|
@@ -32336,8 +32529,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32336
32529
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32337
32530
|
)
|
|
32338
32531
|
)?.[0]?.action?.id;
|
|
32339
|
-
return /* @__PURE__ */ (0,
|
|
32340
|
-
/* @__PURE__ */ (0,
|
|
32532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32533
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32341
32534
|
AvatarField,
|
|
32342
32535
|
{
|
|
32343
32536
|
id: data?.id,
|
|
@@ -32349,8 +32542,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32349
32542
|
stringToColor
|
|
32350
32543
|
}
|
|
32351
32544
|
),
|
|
32352
|
-
/* @__PURE__ */ (0,
|
|
32353
|
-
/* @__PURE__ */ (0,
|
|
32545
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32546
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32354
32547
|
"span",
|
|
32355
32548
|
{
|
|
32356
32549
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32358,7 +32551,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32358
32551
|
e3.stopPropagation();
|
|
32359
32552
|
props.removeProps.onClick();
|
|
32360
32553
|
},
|
|
32361
|
-
children: /* @__PURE__ */ (0,
|
|
32554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CloseIcon, {})
|
|
32362
32555
|
}
|
|
32363
32556
|
)
|
|
32364
32557
|
] });
|
|
@@ -32367,10 +32560,10 @@ var CustomMenuList = (props) => {
|
|
|
32367
32560
|
const { options: options2, children, selectProps } = props;
|
|
32368
32561
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32369
32562
|
const { t: t3 } = useI18n();
|
|
32370
|
-
const limitedChildren =
|
|
32371
|
-
return /* @__PURE__ */ (0,
|
|
32563
|
+
const limitedChildren = import_react62.default.Children.toArray(children).slice(0, 10);
|
|
32564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32372
32565
|
limitedChildren,
|
|
32373
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
32566
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
32374
32567
|
"button",
|
|
32375
32568
|
{
|
|
32376
32569
|
type: "button",
|
|
@@ -32415,7 +32608,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32415
32608
|
value: item.id,
|
|
32416
32609
|
label: item.name ?? item.display_name
|
|
32417
32610
|
})) : [];
|
|
32418
|
-
return /* @__PURE__ */ (0,
|
|
32611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32419
32612
|
InfomationField,
|
|
32420
32613
|
{
|
|
32421
32614
|
value: optionValue || null,
|
|
@@ -32424,7 +32617,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32424
32617
|
}
|
|
32425
32618
|
);
|
|
32426
32619
|
}
|
|
32427
|
-
return /* @__PURE__ */ (0,
|
|
32620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32428
32621
|
Controller,
|
|
32429
32622
|
{
|
|
32430
32623
|
name: name2 ?? "",
|
|
@@ -32434,12 +32627,12 @@ var Many2ManyTagField = (props) => {
|
|
|
32434
32627
|
},
|
|
32435
32628
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32436
32629
|
const { clearErrors } = methods;
|
|
32437
|
-
(0,
|
|
32630
|
+
(0, import_react62.useEffect)(() => {
|
|
32438
32631
|
if (field.value) {
|
|
32439
32632
|
clearErrors(name2);
|
|
32440
32633
|
}
|
|
32441
32634
|
}, [field.value]);
|
|
32442
|
-
const filteredValue = (0,
|
|
32635
|
+
const filteredValue = (0, import_react62.useMemo)(() => {
|
|
32443
32636
|
if (!Array.isArray(field?.value)) return null;
|
|
32444
32637
|
const fieldValueMapped = field.value.map((v) => ({
|
|
32445
32638
|
value: v?.id,
|
|
@@ -32460,8 +32653,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32460
32653
|
onChange2?.(name2 ?? "", newValue);
|
|
32461
32654
|
clearErrors(name2);
|
|
32462
32655
|
};
|
|
32463
|
-
return /* @__PURE__ */ (0,
|
|
32464
|
-
/* @__PURE__ */ (0,
|
|
32656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
32657
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32465
32658
|
StateManagedSelect$1,
|
|
32466
32659
|
{
|
|
32467
32660
|
options: options2,
|
|
@@ -32540,7 +32733,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32540
32733
|
})
|
|
32541
32734
|
},
|
|
32542
32735
|
components: isUser ? {
|
|
32543
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
32736
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32544
32737
|
CustomMultiValue,
|
|
32545
32738
|
{
|
|
32546
32739
|
...multiValueProps,
|
|
@@ -32549,7 +32742,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32549
32742
|
),
|
|
32550
32743
|
IndicatorSeparator: () => null
|
|
32551
32744
|
} : {
|
|
32552
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
32745
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32553
32746
|
CustomMenuList,
|
|
32554
32747
|
{
|
|
32555
32748
|
...menuListProps,
|
|
@@ -32560,13 +32753,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32560
32753
|
}
|
|
32561
32754
|
),
|
|
32562
32755
|
IndicatorSeparator: () => null,
|
|
32563
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32564
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32756
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32757
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.ClearIndicator, { ...props2 })
|
|
32565
32758
|
},
|
|
32566
32759
|
required: !invisible && required
|
|
32567
32760
|
}
|
|
32568
32761
|
),
|
|
32569
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32762
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32570
32763
|
] });
|
|
32571
32764
|
}
|
|
32572
32765
|
}
|
|
@@ -32574,8 +32767,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32574
32767
|
};
|
|
32575
32768
|
|
|
32576
32769
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32577
|
-
var
|
|
32578
|
-
var
|
|
32770
|
+
var import_react63 = require("react");
|
|
32771
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
32579
32772
|
var MonetaryField = (props) => {
|
|
32580
32773
|
const { t: t3 } = useI18n();
|
|
32581
32774
|
const {
|
|
@@ -32596,26 +32789,26 @@ var MonetaryField = (props) => {
|
|
|
32596
32789
|
symbol = "VND"
|
|
32597
32790
|
} = props;
|
|
32598
32791
|
if (isForm && name2 === "amount_residual") {
|
|
32599
|
-
return /* @__PURE__ */ (0,
|
|
32600
|
-
/* @__PURE__ */ (0,
|
|
32792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32793
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "font-semibold", children: [
|
|
32601
32794
|
string,
|
|
32602
32795
|
":"
|
|
32603
32796
|
] }),
|
|
32604
|
-
/* @__PURE__ */ (0,
|
|
32797
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} ${symbol}` })
|
|
32605
32798
|
] });
|
|
32606
32799
|
}
|
|
32607
32800
|
if (!isForm) {
|
|
32608
32801
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
32609
32802
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32610
|
-
return /* @__PURE__ */ (0,
|
|
32803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
32611
32804
|
parseFloat(String(value ?? defaultValue))
|
|
32612
32805
|
)} ${symbol}` });
|
|
32613
32806
|
}
|
|
32614
|
-
return /* @__PURE__ */ (0,
|
|
32807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
32615
32808
|
parseFloat(value ?? defaultValue)
|
|
32616
32809
|
)} ${currencySymbol}` });
|
|
32617
32810
|
}
|
|
32618
|
-
return /* @__PURE__ */ (0,
|
|
32811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32619
32812
|
Controller,
|
|
32620
32813
|
{
|
|
32621
32814
|
name: name2 ?? "",
|
|
@@ -32629,13 +32822,13 @@ var MonetaryField = (props) => {
|
|
|
32629
32822
|
fieldState: { error: error2 }
|
|
32630
32823
|
}) => {
|
|
32631
32824
|
const { setError, clearErrors } = methods;
|
|
32632
|
-
(0,
|
|
32825
|
+
(0, import_react63.useEffect)(() => {
|
|
32633
32826
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32634
32827
|
clearErrors(name2);
|
|
32635
32828
|
}
|
|
32636
32829
|
}, [value2]);
|
|
32637
|
-
return /* @__PURE__ */ (0,
|
|
32638
|
-
/* @__PURE__ */ (0,
|
|
32830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
32831
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32639
32832
|
"input",
|
|
32640
32833
|
{
|
|
32641
32834
|
value: formatNumberOnly(value2),
|
|
@@ -32673,7 +32866,7 @@ var MonetaryField = (props) => {
|
|
|
32673
32866
|
`
|
|
32674
32867
|
}
|
|
32675
32868
|
),
|
|
32676
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32869
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32677
32870
|
] });
|
|
32678
32871
|
}
|
|
32679
32872
|
}
|
|
@@ -32681,14 +32874,14 @@ var MonetaryField = (props) => {
|
|
|
32681
32874
|
};
|
|
32682
32875
|
|
|
32683
32876
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32684
|
-
var
|
|
32877
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
32685
32878
|
var PaidBadgedField = () => {
|
|
32686
|
-
return /* @__PURE__ */ (0,
|
|
32879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PaidIcon, {}) });
|
|
32687
32880
|
};
|
|
32688
32881
|
|
|
32689
32882
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32690
|
-
var
|
|
32691
|
-
var
|
|
32883
|
+
var import_react64 = __toESM(require("react"));
|
|
32884
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
32692
32885
|
var RatingStarField = (props) => {
|
|
32693
32886
|
const {
|
|
32694
32887
|
label,
|
|
@@ -32697,9 +32890,9 @@ var RatingStarField = (props) => {
|
|
|
32697
32890
|
onSelectPriority,
|
|
32698
32891
|
id
|
|
32699
32892
|
} = props;
|
|
32700
|
-
const [rating, setRating] = (0,
|
|
32701
|
-
const [hover, setHover] = (0,
|
|
32702
|
-
(0,
|
|
32893
|
+
const [rating, setRating] = (0, import_react64.useState)(defaultValue);
|
|
32894
|
+
const [hover, setHover] = (0, import_react64.useState)(0);
|
|
32895
|
+
(0, import_react64.useEffect)(() => {
|
|
32703
32896
|
setRating(defaultValue);
|
|
32704
32897
|
}, [defaultValue]);
|
|
32705
32898
|
const handleClick = (value) => {
|
|
@@ -32723,7 +32916,7 @@ var RatingStarField = (props) => {
|
|
|
32723
32916
|
setHover(0);
|
|
32724
32917
|
setRating(0);
|
|
32725
32918
|
};
|
|
32726
|
-
return /* @__PURE__ */ (0,
|
|
32919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32727
32920
|
"div",
|
|
32728
32921
|
{
|
|
32729
32922
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32733,17 +32926,17 @@ var RatingStarField = (props) => {
|
|
|
32733
32926
|
const starValue = index4 + 1;
|
|
32734
32927
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32735
32928
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32736
|
-
return /* @__PURE__ */ (0,
|
|
32737
|
-
/* @__PURE__ */ (0,
|
|
32929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react64.default.Fragment, { children: [
|
|
32930
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32738
32931
|
"div",
|
|
32739
32932
|
{
|
|
32740
32933
|
onMouseEnter: () => handleHover(starValue),
|
|
32741
32934
|
onClick: () => handleClick(starValue),
|
|
32742
32935
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32743
|
-
children: /* @__PURE__ */ (0,
|
|
32936
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32744
32937
|
}
|
|
32745
32938
|
),
|
|
32746
|
-
/* @__PURE__ */ (0,
|
|
32939
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32747
32940
|
M,
|
|
32748
32941
|
{
|
|
32749
32942
|
className: "z-50",
|
|
@@ -32759,7 +32952,7 @@ var RatingStarField = (props) => {
|
|
|
32759
32952
|
};
|
|
32760
32953
|
|
|
32761
32954
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32762
|
-
var
|
|
32955
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32763
32956
|
var PriorityField = (props) => {
|
|
32764
32957
|
const {
|
|
32765
32958
|
isForm,
|
|
@@ -32775,7 +32968,7 @@ var PriorityField = (props) => {
|
|
|
32775
32968
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32776
32969
|
const defaultPriority = parseInt(value) + 1;
|
|
32777
32970
|
if (!isForm) {
|
|
32778
|
-
return /* @__PURE__ */ (0,
|
|
32971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32779
32972
|
RatingStarField,
|
|
32780
32973
|
{
|
|
32781
32974
|
label,
|
|
@@ -32786,7 +32979,7 @@ var PriorityField = (props) => {
|
|
|
32786
32979
|
}
|
|
32787
32980
|
);
|
|
32788
32981
|
}
|
|
32789
|
-
return /* @__PURE__ */ (0,
|
|
32982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32790
32983
|
Controller,
|
|
32791
32984
|
{
|
|
32792
32985
|
name: name ?? "",
|
|
@@ -32796,7 +32989,7 @@ var PriorityField = (props) => {
|
|
|
32796
32989
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32797
32990
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32798
32991
|
};
|
|
32799
|
-
return /* @__PURE__ */ (0,
|
|
32992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32800
32993
|
RatingStarField,
|
|
32801
32994
|
{
|
|
32802
32995
|
label,
|
|
@@ -32812,8 +33005,8 @@ var PriorityField = (props) => {
|
|
|
32812
33005
|
};
|
|
32813
33006
|
|
|
32814
33007
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32815
|
-
var
|
|
32816
|
-
var
|
|
33008
|
+
var import_react65 = require("react");
|
|
33009
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32817
33010
|
var RadioGroupField = (props) => {
|
|
32818
33011
|
const {
|
|
32819
33012
|
name: name2,
|
|
@@ -32826,19 +33019,19 @@ var RadioGroupField = (props) => {
|
|
|
32826
33019
|
onChange: onChange2,
|
|
32827
33020
|
setValue
|
|
32828
33021
|
} = props;
|
|
32829
|
-
(0,
|
|
33022
|
+
(0, import_react65.useEffect)(() => {
|
|
32830
33023
|
if (selection?.length > 0) {
|
|
32831
33024
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32832
33025
|
}
|
|
32833
33026
|
}, [selection, name2, setValue]);
|
|
32834
33027
|
if (!methods) return null;
|
|
32835
|
-
return /* @__PURE__ */ (0,
|
|
33028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32836
33029
|
Controller,
|
|
32837
33030
|
{
|
|
32838
33031
|
name: name2 ?? "",
|
|
32839
33032
|
control: methods.control,
|
|
32840
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32841
|
-
/* @__PURE__ */ (0,
|
|
33033
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
33034
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32842
33035
|
"input",
|
|
32843
33036
|
{
|
|
32844
33037
|
type: "radio",
|
|
@@ -32857,7 +33050,7 @@ var RadioGroupField = (props) => {
|
|
|
32857
33050
|
className: "custom-radio"
|
|
32858
33051
|
}
|
|
32859
33052
|
),
|
|
32860
|
-
/* @__PURE__ */ (0,
|
|
33053
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32861
33054
|
] }, select[0])) })
|
|
32862
33055
|
}
|
|
32863
33056
|
);
|
|
@@ -32865,7 +33058,7 @@ var RadioGroupField = (props) => {
|
|
|
32865
33058
|
|
|
32866
33059
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32867
33060
|
var import_moment3 = __toESM(require_moment());
|
|
32868
|
-
var
|
|
33061
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32869
33062
|
var RemainingDaysField = (props) => {
|
|
32870
33063
|
const {
|
|
32871
33064
|
value,
|
|
@@ -32876,14 +33069,14 @@ var RemainingDaysField = (props) => {
|
|
|
32876
33069
|
if (!value) return null;
|
|
32877
33070
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32878
33071
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32879
|
-
return /* @__PURE__ */ (0,
|
|
32880
|
-
/* @__PURE__ */ (0,
|
|
32881
|
-
/* @__PURE__ */ (0,
|
|
33072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
33073
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
33074
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32882
33075
|
"div",
|
|
32883
33076
|
{
|
|
32884
33077
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32885
33078
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32886
|
-
children: /* @__PURE__ */ (0,
|
|
33079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32887
33080
|
"div",
|
|
32888
33081
|
{
|
|
32889
33082
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32896,7 +33089,7 @@ var RemainingDaysField = (props) => {
|
|
|
32896
33089
|
};
|
|
32897
33090
|
|
|
32898
33091
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32899
|
-
var
|
|
33092
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32900
33093
|
var SelectDropdownField = (props) => {
|
|
32901
33094
|
const { t: t3 } = useI18n();
|
|
32902
33095
|
const {
|
|
@@ -32918,9 +33111,9 @@ var SelectDropdownField = (props) => {
|
|
|
32918
33111
|
label: val[1]
|
|
32919
33112
|
})) : [];
|
|
32920
33113
|
if (!isForm && !isEditTable) {
|
|
32921
|
-
return /* @__PURE__ */ (0,
|
|
33114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32922
33115
|
} else {
|
|
32923
|
-
return /* @__PURE__ */ (0,
|
|
33116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32924
33117
|
Controller,
|
|
32925
33118
|
{
|
|
32926
33119
|
name: name2 || "",
|
|
@@ -32947,8 +33140,8 @@ var SelectDropdownField = (props) => {
|
|
|
32947
33140
|
value: defaultValue || null,
|
|
32948
33141
|
required: !invisible && required
|
|
32949
33142
|
};
|
|
32950
|
-
return /* @__PURE__ */ (0,
|
|
32951
|
-
/* @__PURE__ */ (0,
|
|
33143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
33144
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32952
33145
|
StateManagedSelect$1,
|
|
32953
33146
|
{
|
|
32954
33147
|
...commonProps,
|
|
@@ -33005,12 +33198,12 @@ var SelectDropdownField = (props) => {
|
|
|
33005
33198
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
33006
33199
|
components: {
|
|
33007
33200
|
IndicatorSeparator: () => null,
|
|
33008
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
33201
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33009
33202
|
},
|
|
33010
33203
|
noOptionsMessage: () => t3("no-available")
|
|
33011
33204
|
}
|
|
33012
33205
|
) }),
|
|
33013
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33206
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33014
33207
|
] });
|
|
33015
33208
|
}
|
|
33016
33209
|
}
|
|
@@ -33019,7 +33212,7 @@ var SelectDropdownField = (props) => {
|
|
|
33019
33212
|
};
|
|
33020
33213
|
|
|
33021
33214
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
33022
|
-
var
|
|
33215
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
33023
33216
|
var TextAreaField = (props) => {
|
|
33024
33217
|
const {
|
|
33025
33218
|
methods,
|
|
@@ -33043,9 +33236,9 @@ var TextAreaField = (props) => {
|
|
|
33043
33236
|
}
|
|
33044
33237
|
}) : {};
|
|
33045
33238
|
if (!isForm) {
|
|
33046
|
-
return /* @__PURE__ */ (0,
|
|
33239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
33047
33240
|
}
|
|
33048
|
-
return /* @__PURE__ */ (0,
|
|
33241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33049
33242
|
"textarea",
|
|
33050
33243
|
{
|
|
33051
33244
|
...formProps,
|
|
@@ -33061,7 +33254,7 @@ var TextAreaField = (props) => {
|
|
|
33061
33254
|
};
|
|
33062
33255
|
|
|
33063
33256
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33064
|
-
var
|
|
33257
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
33065
33258
|
var ToggleButtonField = (props) => {
|
|
33066
33259
|
const {
|
|
33067
33260
|
name: name2,
|
|
@@ -33071,13 +33264,13 @@ var ToggleButtonField = (props) => {
|
|
|
33071
33264
|
onChange: onChange2,
|
|
33072
33265
|
methods
|
|
33073
33266
|
} = props;
|
|
33074
|
-
return /* @__PURE__ */ (0,
|
|
33267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33075
33268
|
Controller,
|
|
33076
33269
|
{
|
|
33077
33270
|
name: name2 ?? "",
|
|
33078
33271
|
control: methods?.control,
|
|
33079
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33080
|
-
/* @__PURE__ */ (0,
|
|
33272
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
33273
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33081
33274
|
"input",
|
|
33082
33275
|
{
|
|
33083
33276
|
...field,
|
|
@@ -33096,7 +33289,7 @@ var ToggleButtonField = (props) => {
|
|
|
33096
33289
|
checked: field.value ?? false
|
|
33097
33290
|
}
|
|
33098
33291
|
),
|
|
33099
|
-
/* @__PURE__ */ (0,
|
|
33292
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33100
33293
|
"span",
|
|
33101
33294
|
{
|
|
33102
33295
|
style: {
|
|
@@ -33106,7 +33299,7 @@ var ToggleButtonField = (props) => {
|
|
|
33106
33299
|
},
|
|
33107
33300
|
className: `rounded-full transition duration-300
|
|
33108
33301
|
`,
|
|
33109
|
-
children: /* @__PURE__ */ (0,
|
|
33302
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33110
33303
|
"span",
|
|
33111
33304
|
{
|
|
33112
33305
|
style: {
|
|
@@ -33130,8 +33323,8 @@ var ToggleButtonField = (props) => {
|
|
|
33130
33323
|
};
|
|
33131
33324
|
|
|
33132
33325
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33133
|
-
var
|
|
33134
|
-
var
|
|
33326
|
+
var import_react66 = require("react");
|
|
33327
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
33135
33328
|
var IntegerField = (props) => {
|
|
33136
33329
|
const {
|
|
33137
33330
|
name: name2,
|
|
@@ -33150,9 +33343,9 @@ var IntegerField = (props) => {
|
|
|
33150
33343
|
const { t: t3 } = useI18n();
|
|
33151
33344
|
if (!isForm && !isEditTable) {
|
|
33152
33345
|
const displayValue = value ?? defaultValue;
|
|
33153
|
-
return /* @__PURE__ */ (0,
|
|
33346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33154
33347
|
}
|
|
33155
|
-
return /* @__PURE__ */ (0,
|
|
33348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33156
33349
|
Controller,
|
|
33157
33350
|
{
|
|
33158
33351
|
name: name2 || "",
|
|
@@ -33166,13 +33359,13 @@ var IntegerField = (props) => {
|
|
|
33166
33359
|
fieldState: { error: error2 }
|
|
33167
33360
|
}) => {
|
|
33168
33361
|
const { setError, clearErrors } = methods;
|
|
33169
|
-
const isDirtyRef = (0,
|
|
33170
|
-
const inputRef = (0,
|
|
33171
|
-
const lastCommittedValueRef = (0,
|
|
33172
|
-
const [inputValue, setInputValue] = (0,
|
|
33362
|
+
const isDirtyRef = (0, import_react66.useRef)(false);
|
|
33363
|
+
const inputRef = (0, import_react66.useRef)(null);
|
|
33364
|
+
const lastCommittedValueRef = (0, import_react66.useRef)(null);
|
|
33365
|
+
const [inputValue, setInputValue] = (0, import_react66.useState)(
|
|
33173
33366
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33174
33367
|
);
|
|
33175
|
-
(0,
|
|
33368
|
+
(0, import_react66.useEffect)(() => {
|
|
33176
33369
|
if (value2 !== void 0 && value2 !== null) {
|
|
33177
33370
|
setInputValue(String(value2));
|
|
33178
33371
|
clearErrors(name2);
|
|
@@ -33230,8 +33423,8 @@ var IntegerField = (props) => {
|
|
|
33230
33423
|
inputRef.current?.blur();
|
|
33231
33424
|
clearErrors(name2);
|
|
33232
33425
|
};
|
|
33233
|
-
return /* @__PURE__ */ (0,
|
|
33234
|
-
/* @__PURE__ */ (0,
|
|
33426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
33427
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33235
33428
|
"input",
|
|
33236
33429
|
{
|
|
33237
33430
|
ref: inputRef,
|
|
@@ -33266,7 +33459,7 @@ var IntegerField = (props) => {
|
|
|
33266
33459
|
`
|
|
33267
33460
|
}
|
|
33268
33461
|
),
|
|
33269
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
33462
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33270
33463
|
] });
|
|
33271
33464
|
}
|
|
33272
33465
|
}
|
|
@@ -33274,7 +33467,7 @@ var IntegerField = (props) => {
|
|
|
33274
33467
|
};
|
|
33275
33468
|
|
|
33276
33469
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33277
|
-
var
|
|
33470
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
33278
33471
|
var StatusDropdownField = (props) => {
|
|
33279
33472
|
const {
|
|
33280
33473
|
buttonRef,
|
|
@@ -33286,13 +33479,13 @@ var StatusDropdownField = (props) => {
|
|
|
33286
33479
|
handleClick,
|
|
33287
33480
|
colors: colors2
|
|
33288
33481
|
} = props;
|
|
33289
|
-
return /* @__PURE__ */ (0,
|
|
33482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
33290
33483
|
"div",
|
|
33291
33484
|
{
|
|
33292
33485
|
ref: buttonRef,
|
|
33293
33486
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33294
33487
|
children: [
|
|
33295
|
-
/* @__PURE__ */ (0,
|
|
33488
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33296
33489
|
"button",
|
|
33297
33490
|
{
|
|
33298
33491
|
type: "button",
|
|
@@ -33300,23 +33493,23 @@ var StatusDropdownField = (props) => {
|
|
|
33300
33493
|
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"}`
|
|
33301
33494
|
}
|
|
33302
33495
|
),
|
|
33303
|
-
isOpen && /* @__PURE__ */ (0,
|
|
33496
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("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) => {
|
|
33304
33497
|
const isActive = item[0] == state;
|
|
33305
|
-
return /* @__PURE__ */ (0,
|
|
33498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
33306
33499
|
"div",
|
|
33307
33500
|
{
|
|
33308
33501
|
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" : ""}`,
|
|
33309
33502
|
onClick: () => handleClick(item[0]),
|
|
33310
33503
|
children: [
|
|
33311
|
-
/* @__PURE__ */ (0,
|
|
33312
|
-
/* @__PURE__ */ (0,
|
|
33313
|
-
/* @__PURE__ */ (0,
|
|
33504
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CheckIcon, {}) }),
|
|
33505
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
33506
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33314
33507
|
"div",
|
|
33315
33508
|
{
|
|
33316
33509
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33317
33510
|
}
|
|
33318
33511
|
),
|
|
33319
|
-
/* @__PURE__ */ (0,
|
|
33512
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-sm", children: item[1] })
|
|
33320
33513
|
] })
|
|
33321
33514
|
]
|
|
33322
33515
|
},
|
|
@@ -33330,8 +33523,8 @@ var StatusDropdownField = (props) => {
|
|
|
33330
33523
|
|
|
33331
33524
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33332
33525
|
var import_react_dom8 = require("react-dom");
|
|
33333
|
-
var
|
|
33334
|
-
var
|
|
33526
|
+
var import_react67 = require("react");
|
|
33527
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
33335
33528
|
var Many2ManyField = (props) => {
|
|
33336
33529
|
const { t: t3 } = useI18n();
|
|
33337
33530
|
const {
|
|
@@ -33390,7 +33583,7 @@ var Many2ManyField = (props) => {
|
|
|
33390
33583
|
clearSearch
|
|
33391
33584
|
} = searchController;
|
|
33392
33585
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33393
|
-
(0,
|
|
33586
|
+
(0, import_react67.useEffect)(() => {
|
|
33394
33587
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33395
33588
|
if (groupItems?.length > 0) {
|
|
33396
33589
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33405,7 +33598,7 @@ var Many2ManyField = (props) => {
|
|
|
33405
33598
|
};
|
|
33406
33599
|
}, [selectedTags]);
|
|
33407
33600
|
return (0, import_react_dom8.createPortal)(
|
|
33408
|
-
/* @__PURE__ */ (0,
|
|
33601
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33409
33602
|
"div",
|
|
33410
33603
|
{
|
|
33411
33604
|
style: {
|
|
@@ -33413,8 +33606,8 @@ var Many2ManyField = (props) => {
|
|
|
33413
33606
|
},
|
|
33414
33607
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33415
33608
|
children: [
|
|
33416
|
-
/* @__PURE__ */ (0,
|
|
33417
|
-
/* @__PURE__ */ (0,
|
|
33609
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33610
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33418
33611
|
"div",
|
|
33419
33612
|
{
|
|
33420
33613
|
style: {
|
|
@@ -33422,12 +33615,12 @@ var Many2ManyField = (props) => {
|
|
|
33422
33615
|
},
|
|
33423
33616
|
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",
|
|
33424
33617
|
children: [
|
|
33425
|
-
/* @__PURE__ */ (0,
|
|
33426
|
-
/* @__PURE__ */ (0,
|
|
33427
|
-
/* @__PURE__ */ (0,
|
|
33618
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33619
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33620
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(CloseIcon, {}) })
|
|
33428
33621
|
] }),
|
|
33429
|
-
/* @__PURE__ */ (0,
|
|
33430
|
-
/* @__PURE__ */ (0,
|
|
33622
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33623
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33431
33624
|
Search,
|
|
33432
33625
|
{
|
|
33433
33626
|
removeSearchItems,
|
|
@@ -33461,7 +33654,7 @@ var Many2ManyField = (props) => {
|
|
|
33461
33654
|
groupByList
|
|
33462
33655
|
}
|
|
33463
33656
|
) }),
|
|
33464
|
-
/* @__PURE__ */ (0,
|
|
33657
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33465
33658
|
PaginationView,
|
|
33466
33659
|
{
|
|
33467
33660
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -33478,20 +33671,20 @@ var Many2ManyField = (props) => {
|
|
|
33478
33671
|
}
|
|
33479
33672
|
)
|
|
33480
33673
|
] }),
|
|
33481
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
33674
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33482
33675
|
"div",
|
|
33483
33676
|
{
|
|
33484
33677
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33485
|
-
children: /* @__PURE__ */ (0,
|
|
33678
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33486
33679
|
"div",
|
|
33487
33680
|
{
|
|
33488
33681
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33489
|
-
children: /* @__PURE__ */ (0,
|
|
33682
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33490
33683
|
"table",
|
|
33491
33684
|
{
|
|
33492
33685
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33493
33686
|
children: [
|
|
33494
|
-
/* @__PURE__ */ (0,
|
|
33687
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33495
33688
|
TableHead,
|
|
33496
33689
|
{
|
|
33497
33690
|
columns,
|
|
@@ -33501,7 +33694,7 @@ var Many2ManyField = (props) => {
|
|
|
33501
33694
|
handleCheckBoxAll
|
|
33502
33695
|
}
|
|
33503
33696
|
),
|
|
33504
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
33697
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33505
33698
|
TableBody,
|
|
33506
33699
|
{
|
|
33507
33700
|
tableGroupController,
|
|
@@ -33541,16 +33734,16 @@ var Many2ManyField = (props) => {
|
|
|
33541
33734
|
checkedAll,
|
|
33542
33735
|
context
|
|
33543
33736
|
}
|
|
33544
|
-
) : /* @__PURE__ */ (0,
|
|
33737
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33545
33738
|
"td",
|
|
33546
33739
|
{
|
|
33547
33740
|
className: "w-full",
|
|
33548
33741
|
colSpan: columns?.length + 2,
|
|
33549
|
-
children: /* @__PURE__ */ (0,
|
|
33742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33550
33743
|
"div",
|
|
33551
33744
|
{
|
|
33552
33745
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33553
|
-
children: /* @__PURE__ */ (0,
|
|
33746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(EmptyTable, {})
|
|
33554
33747
|
}
|
|
33555
33748
|
)
|
|
33556
33749
|
}
|
|
@@ -33561,9 +33754,9 @@ var Many2ManyField = (props) => {
|
|
|
33561
33754
|
}
|
|
33562
33755
|
) }) })
|
|
33563
33756
|
}
|
|
33564
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
33565
|
-
/* @__PURE__ */ (0,
|
|
33566
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33757
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(LayerLoading, {}),
|
|
33758
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33759
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33567
33760
|
"button",
|
|
33568
33761
|
{
|
|
33569
33762
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33573,7 +33766,7 @@ var Many2ManyField = (props) => {
|
|
|
33573
33766
|
children: t3("choose")
|
|
33574
33767
|
}
|
|
33575
33768
|
),
|
|
33576
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33769
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33577
33770
|
"button",
|
|
33578
33771
|
{
|
|
33579
33772
|
type: "button",
|
|
@@ -33589,7 +33782,7 @@ var Many2ManyField = (props) => {
|
|
|
33589
33782
|
children: t3("new")
|
|
33590
33783
|
}
|
|
33591
33784
|
),
|
|
33592
|
-
/* @__PURE__ */ (0,
|
|
33785
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33593
33786
|
"button",
|
|
33594
33787
|
{
|
|
33595
33788
|
type: "button",
|
|
@@ -33610,16 +33803,16 @@ var Many2ManyField = (props) => {
|
|
|
33610
33803
|
};
|
|
33611
33804
|
|
|
33612
33805
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33613
|
-
var
|
|
33614
|
-
var
|
|
33806
|
+
var import_react68 = __toESM(require("react"));
|
|
33807
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
33615
33808
|
var CustomMenuList2 = (props) => {
|
|
33616
33809
|
const { t: t3 } = useI18n();
|
|
33617
33810
|
const { options: options2, children, selectProps } = props;
|
|
33618
33811
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33619
|
-
const limitedChildren =
|
|
33620
|
-
return /* @__PURE__ */ (0,
|
|
33812
|
+
const limitedChildren = import_react68.default.Children.toArray(children).slice(0, 10);
|
|
33813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33621
33814
|
limitedChildren,
|
|
33622
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33815
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
33623
33816
|
"button",
|
|
33624
33817
|
{
|
|
33625
33818
|
type: "button",
|
|
@@ -33662,14 +33855,14 @@ var Many2OneField = (props) => {
|
|
|
33662
33855
|
const { t: t3 } = useI18n();
|
|
33663
33856
|
if (!isForm && !isEditTable) {
|
|
33664
33857
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33665
|
-
return /* @__PURE__ */ (0,
|
|
33858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
33666
33859
|
allowShowDetail && renderDetail({
|
|
33667
33860
|
idToolTip: String(name2) + Number(index4),
|
|
33668
33861
|
model: options2?.model ?? relation,
|
|
33669
33862
|
context: contextObject,
|
|
33670
33863
|
idForm: id
|
|
33671
33864
|
}),
|
|
33672
|
-
/* @__PURE__ */ (0,
|
|
33865
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33673
33866
|
"span",
|
|
33674
33867
|
{
|
|
33675
33868
|
className: "cursor-pointer",
|
|
@@ -33680,20 +33873,20 @@ var Many2OneField = (props) => {
|
|
|
33680
33873
|
)
|
|
33681
33874
|
] });
|
|
33682
33875
|
}
|
|
33683
|
-
return /* @__PURE__ */ (0,
|
|
33876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
33684
33877
|
allowShowDetail && renderDetail({
|
|
33685
33878
|
idToolTip: String(name2),
|
|
33686
33879
|
model: options2?.model ?? relation,
|
|
33687
33880
|
context: contextObject,
|
|
33688
33881
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33689
33882
|
}),
|
|
33690
|
-
/* @__PURE__ */ (0,
|
|
33883
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33691
33884
|
"div",
|
|
33692
33885
|
{
|
|
33693
33886
|
id: name2,
|
|
33694
33887
|
"data-tooltip-id": name2,
|
|
33695
33888
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33696
|
-
children: /* @__PURE__ */ (0,
|
|
33889
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33697
33890
|
Controller,
|
|
33698
33891
|
{
|
|
33699
33892
|
name: name2 ?? "",
|
|
@@ -33713,13 +33906,13 @@ var Many2OneField = (props) => {
|
|
|
33713
33906
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33714
33907
|
(option) => option.value === tempSelectedOption?.value
|
|
33715
33908
|
) : currentValue ? currentValue : null;
|
|
33716
|
-
(0,
|
|
33909
|
+
(0, import_react68.useEffect)(() => {
|
|
33717
33910
|
if (error2 && selectedOption) {
|
|
33718
33911
|
methods?.clearErrors(name2);
|
|
33719
33912
|
}
|
|
33720
33913
|
}, [selectedOption]);
|
|
33721
|
-
return /* @__PURE__ */ (0,
|
|
33722
|
-
/* @__PURE__ */ (0,
|
|
33914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "h-full", children: [
|
|
33915
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33723
33916
|
StateManagedSelect$1,
|
|
33724
33917
|
{
|
|
33725
33918
|
menuShouldScrollIntoView: false,
|
|
@@ -33796,7 +33989,7 @@ var Many2OneField = (props) => {
|
|
|
33796
33989
|
})
|
|
33797
33990
|
},
|
|
33798
33991
|
components: {
|
|
33799
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33992
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33800
33993
|
CustomMenuList2,
|
|
33801
33994
|
{
|
|
33802
33995
|
...menuListProps,
|
|
@@ -33807,13 +34000,13 @@ var Many2OneField = (props) => {
|
|
|
33807
34000
|
}
|
|
33808
34001
|
),
|
|
33809
34002
|
IndicatorSeparator: () => null,
|
|
33810
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
34003
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33811
34004
|
},
|
|
33812
34005
|
isDisabled: readonly,
|
|
33813
34006
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33814
34007
|
}
|
|
33815
34008
|
),
|
|
33816
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
34009
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33817
34010
|
] });
|
|
33818
34011
|
}
|
|
33819
34012
|
}
|
|
@@ -33824,7 +34017,7 @@ var Many2OneField = (props) => {
|
|
|
33824
34017
|
};
|
|
33825
34018
|
|
|
33826
34019
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33827
|
-
var
|
|
34020
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
33828
34021
|
var StatusbarDurationField = (props) => {
|
|
33829
34022
|
const {
|
|
33830
34023
|
disabled,
|
|
@@ -33834,14 +34027,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33834
34027
|
defaultValue,
|
|
33835
34028
|
setModalStatus
|
|
33836
34029
|
} = props;
|
|
33837
|
-
return /* @__PURE__ */ (0,
|
|
34030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33838
34031
|
"div",
|
|
33839
34032
|
{
|
|
33840
34033
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33841
|
-
children: /* @__PURE__ */ (0,
|
|
33842
|
-
/* @__PURE__ */ (0,
|
|
34034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
34035
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33843
34036
|
const value = option?.id === defaultValue;
|
|
33844
|
-
return /* @__PURE__ */ (0,
|
|
34037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33845
34038
|
"label",
|
|
33846
34039
|
{
|
|
33847
34040
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33851,7 +34044,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33851
34044
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33852
34045
|
`,
|
|
33853
34046
|
children: [
|
|
33854
|
-
/* @__PURE__ */ (0,
|
|
34047
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33855
34048
|
"input",
|
|
33856
34049
|
{
|
|
33857
34050
|
type: "radio",
|
|
@@ -33861,7 +34054,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33861
34054
|
}
|
|
33862
34055
|
),
|
|
33863
34056
|
option?.name,
|
|
33864
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
34057
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33865
34058
|
"div",
|
|
33866
34059
|
{
|
|
33867
34060
|
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]
|
|
@@ -33876,14 +34069,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33876
34069
|
}) }),
|
|
33877
34070
|
dataResponse?.records?.some(
|
|
33878
34071
|
(item) => item?.fold && item.id !== defaultValue
|
|
33879
|
-
) && /* @__PURE__ */ (0,
|
|
34072
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33880
34073
|
"div",
|
|
33881
34074
|
{
|
|
33882
34075
|
onClick: () => setModalStatus(!modelStatus),
|
|
33883
34076
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33884
34077
|
children: [
|
|
33885
|
-
/* @__PURE__ */ (0,
|
|
33886
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
34078
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(MoreIcon, {}),
|
|
34079
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33887
34080
|
"div",
|
|
33888
34081
|
{
|
|
33889
34082
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33892,7 +34085,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33892
34085
|
(item) => item?.fold && item.id !== defaultValue
|
|
33893
34086
|
)?.map((option) => {
|
|
33894
34087
|
const value = option?.id === defaultValue;
|
|
33895
|
-
return /* @__PURE__ */ (0,
|
|
34088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33896
34089
|
"div",
|
|
33897
34090
|
{
|
|
33898
34091
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33913,15 +34106,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33913
34106
|
};
|
|
33914
34107
|
|
|
33915
34108
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33916
|
-
var
|
|
33917
|
-
var
|
|
34109
|
+
var import_react69 = require("react");
|
|
34110
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
33918
34111
|
var StatusBarOptionField = (props) => {
|
|
33919
34112
|
const { selection, defaultValue } = props;
|
|
33920
|
-
const memoizedStatusOptions = (0,
|
|
34113
|
+
const memoizedStatusOptions = (0, import_react69.useMemo)(() => selection, [selection]);
|
|
33921
34114
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33922
34115
|
(option) => option?.[0] === defaultValue
|
|
33923
34116
|
);
|
|
33924
|
-
return /* @__PURE__ */ (0,
|
|
34117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33925
34118
|
"div",
|
|
33926
34119
|
{
|
|
33927
34120
|
style: {
|
|
@@ -33930,8 +34123,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33930
34123
|
flexWrap: "wrap"
|
|
33931
34124
|
},
|
|
33932
34125
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33933
|
-
return /* @__PURE__ */ (0,
|
|
33934
|
-
/* @__PURE__ */ (0,
|
|
34126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
34127
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
33935
34128
|
"div",
|
|
33936
34129
|
{
|
|
33937
34130
|
style: {
|
|
@@ -33949,7 +34142,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33949
34142
|
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" : ""
|
|
33950
34143
|
},
|
|
33951
34144
|
children: [
|
|
33952
|
-
/* @__PURE__ */ (0,
|
|
34145
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33953
34146
|
"span",
|
|
33954
34147
|
{
|
|
33955
34148
|
style: {
|
|
@@ -33961,10 +34154,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33961
34154
|
alignItems: "center",
|
|
33962
34155
|
borderRadius: "100%"
|
|
33963
34156
|
},
|
|
33964
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
34157
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICMinus, {})
|
|
33965
34158
|
}
|
|
33966
34159
|
),
|
|
33967
|
-
/* @__PURE__ */ (0,
|
|
34160
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33968
34161
|
"span",
|
|
33969
34162
|
{
|
|
33970
34163
|
style: {
|
|
@@ -33977,7 +34170,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33977
34170
|
},
|
|
33978
34171
|
option?.[0]
|
|
33979
34172
|
),
|
|
33980
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
34173
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33981
34174
|
"div",
|
|
33982
34175
|
{
|
|
33983
34176
|
style: {
|
|
@@ -33993,7 +34186,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33993
34186
|
);
|
|
33994
34187
|
};
|
|
33995
34188
|
var ICMinus = () => {
|
|
33996
|
-
return /* @__PURE__ */ (0,
|
|
34189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33997
34190
|
"svg",
|
|
33998
34191
|
{
|
|
33999
34192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34001,7 +34194,7 @@ var ICMinus = () => {
|
|
|
34001
34194
|
height: "16",
|
|
34002
34195
|
viewBox: "0 0 16 16",
|
|
34003
34196
|
fill: "none",
|
|
34004
|
-
children: /* @__PURE__ */ (0,
|
|
34197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34005
34198
|
"path",
|
|
34006
34199
|
{
|
|
34007
34200
|
d: "M4 8H12",
|
|
@@ -34015,7 +34208,7 @@ var ICMinus = () => {
|
|
|
34015
34208
|
);
|
|
34016
34209
|
};
|
|
34017
34210
|
var ICCircle = () => {
|
|
34018
|
-
return /* @__PURE__ */ (0,
|
|
34211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34019
34212
|
"svg",
|
|
34020
34213
|
{
|
|
34021
34214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34023,12 +34216,12 @@ var ICCircle = () => {
|
|
|
34023
34216
|
height: "8",
|
|
34024
34217
|
viewBox: "0 0 8 8",
|
|
34025
34218
|
fill: "none",
|
|
34026
|
-
children: /* @__PURE__ */ (0,
|
|
34219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
34027
34220
|
}
|
|
34028
34221
|
);
|
|
34029
34222
|
};
|
|
34030
34223
|
var ICCheck = () => {
|
|
34031
|
-
return /* @__PURE__ */ (0,
|
|
34224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34032
34225
|
"svg",
|
|
34033
34226
|
{
|
|
34034
34227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34036,7 +34229,7 @@ var ICCheck = () => {
|
|
|
34036
34229
|
height: "16",
|
|
34037
34230
|
viewBox: "0 0 16 16",
|
|
34038
34231
|
fill: "none",
|
|
34039
|
-
children: /* @__PURE__ */ (0,
|
|
34232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34040
34233
|
"path",
|
|
34041
34234
|
{
|
|
34042
34235
|
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",
|
|
@@ -34050,7 +34243,7 @@ var ICCheck = () => {
|
|
|
34050
34243
|
};
|
|
34051
34244
|
|
|
34052
34245
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34053
|
-
var
|
|
34246
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
34054
34247
|
var DateOptionField = (props) => {
|
|
34055
34248
|
const {
|
|
34056
34249
|
name: name2,
|
|
@@ -34061,19 +34254,19 @@ var DateOptionField = (props) => {
|
|
|
34061
34254
|
string,
|
|
34062
34255
|
onChange: onChange2
|
|
34063
34256
|
} = props;
|
|
34064
|
-
return /* @__PURE__ */ (0,
|
|
34257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
34065
34258
|
Controller,
|
|
34066
34259
|
{
|
|
34067
34260
|
name: name2 ?? "",
|
|
34068
34261
|
control: methods?.control,
|
|
34069
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
34262
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
34070
34263
|
"label",
|
|
34071
34264
|
{
|
|
34072
34265
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
34073
34266
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
34074
34267
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
34075
34268
|
children: [
|
|
34076
|
-
/* @__PURE__ */ (0,
|
|
34269
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
34077
34270
|
"input",
|
|
34078
34271
|
{
|
|
34079
34272
|
type: "checkbox",
|
|
@@ -34182,6 +34375,7 @@ var DateOptionField = (props) => {
|
|
|
34182
34375
|
Search,
|
|
34183
34376
|
SearchIcon,
|
|
34184
34377
|
SearchType,
|
|
34378
|
+
SecureField,
|
|
34185
34379
|
SelectDropdownField,
|
|
34186
34380
|
SettingIcon,
|
|
34187
34381
|
StarIcon,
|