@fctc/sme-widget-ui 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +929 -684
- package/dist/index.mjs +848 -604
- package/dist/widgets.d.mts +3 -1
- package/dist/widgets.d.ts +3 -1
- package/dist/widgets.js +929 -684
- package/dist/widgets.mjs +848 -604
- package/package.json +1 -1
package/dist/index.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,
|
|
@@ -17363,8 +17364,251 @@ var CharField = (props) => {
|
|
|
17363
17364
|
);
|
|
17364
17365
|
};
|
|
17365
17366
|
|
|
17366
|
-
// src/widgets/basic/
|
|
17367
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17368
|
+
var import_react41 = require("react");
|
|
17369
|
+
|
|
17370
|
+
// src/icons/eye-hidden-icon.tsx
|
|
17367
17371
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
17372
|
+
var EyeHiddenIcon = () => {
|
|
17373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
17374
|
+
"svg",
|
|
17375
|
+
{
|
|
17376
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17377
|
+
width: "16",
|
|
17378
|
+
height: "16",
|
|
17379
|
+
viewBox: "0 0 16 16",
|
|
17380
|
+
fill: "none",
|
|
17381
|
+
children: [
|
|
17382
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17383
|
+
"path",
|
|
17384
|
+
{
|
|
17385
|
+
d: "M9.68661 6.31328L6.31328 9.68661C5.87995 9.25328 5.61328 8.65995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C8.65995 5.61328 9.25328 5.87995 9.68661 6.31328Z",
|
|
17386
|
+
stroke: "#576071",
|
|
17387
|
+
strokeWidth: "1.5",
|
|
17388
|
+
strokeLinecap: "round",
|
|
17389
|
+
strokeLinejoin: "round"
|
|
17390
|
+
}
|
|
17391
|
+
),
|
|
17392
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17393
|
+
"path",
|
|
17394
|
+
{
|
|
17395
|
+
d: "M11.8799 3.8473C10.7132 2.9673 9.3799 2.4873 7.9999 2.4873C5.64656 2.4873 3.45323 3.87397 1.92656 6.27397C1.32656 7.21397 1.32656 8.79397 1.92656 9.73397C2.45323 10.5606 3.06656 11.274 3.73323 11.8473",
|
|
17396
|
+
stroke: "#576071",
|
|
17397
|
+
strokeWidth: "1.5",
|
|
17398
|
+
strokeLinecap: "round",
|
|
17399
|
+
strokeLinejoin: "round"
|
|
17400
|
+
}
|
|
17401
|
+
),
|
|
17402
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17403
|
+
"path",
|
|
17404
|
+
{
|
|
17405
|
+
d: "M5.61328 13.0195C6.37328 13.3395 7.17995 13.5128 7.99995 13.5128C10.3533 13.5128 12.5466 12.1261 14.0733 9.72613C14.6733 8.78613 14.6733 7.20613 14.0733 6.26613C13.8533 5.91947 13.6133 5.5928 13.3666 5.28613",
|
|
17406
|
+
stroke: "#576071",
|
|
17407
|
+
strokeWidth: "1.5",
|
|
17408
|
+
strokeLinecap: "round",
|
|
17409
|
+
strokeLinejoin: "round"
|
|
17410
|
+
}
|
|
17411
|
+
),
|
|
17412
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17413
|
+
"path",
|
|
17414
|
+
{
|
|
17415
|
+
d: "M10.3409 8.4668C10.1676 9.4068 9.40094 10.1735 8.46094 10.3468",
|
|
17416
|
+
stroke: "#576071",
|
|
17417
|
+
strokeWidth: "1.5",
|
|
17418
|
+
strokeLinecap: "round",
|
|
17419
|
+
strokeLinejoin: "round"
|
|
17420
|
+
}
|
|
17421
|
+
),
|
|
17422
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17423
|
+
"path",
|
|
17424
|
+
{
|
|
17425
|
+
d: "M6.31203 9.68652L1.33203 14.6665",
|
|
17426
|
+
stroke: "#576071",
|
|
17427
|
+
strokeWidth: "1.5",
|
|
17428
|
+
strokeLinecap: "round",
|
|
17429
|
+
strokeLinejoin: "round"
|
|
17430
|
+
}
|
|
17431
|
+
),
|
|
17432
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17433
|
+
"path",
|
|
17434
|
+
{
|
|
17435
|
+
d: "M14.6675 1.33301L9.6875 6.31301",
|
|
17436
|
+
stroke: "#576071",
|
|
17437
|
+
strokeWidth: "1.5",
|
|
17438
|
+
strokeLinecap: "round",
|
|
17439
|
+
strokeLinejoin: "round"
|
|
17440
|
+
}
|
|
17441
|
+
)
|
|
17442
|
+
]
|
|
17443
|
+
}
|
|
17444
|
+
);
|
|
17445
|
+
};
|
|
17446
|
+
|
|
17447
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17448
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
17449
|
+
function isSensitive(widget) {
|
|
17450
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
17451
|
+
}
|
|
17452
|
+
function EyeIconComponent({ open }) {
|
|
17453
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeHiddenIcon, {});
|
|
17454
|
+
}
|
|
17455
|
+
var SecureField = (props) => {
|
|
17456
|
+
const {
|
|
17457
|
+
name: name2,
|
|
17458
|
+
readonly,
|
|
17459
|
+
placeholder,
|
|
17460
|
+
required,
|
|
17461
|
+
invisible,
|
|
17462
|
+
methods,
|
|
17463
|
+
onChange: onChange2,
|
|
17464
|
+
string = name2,
|
|
17465
|
+
widget,
|
|
17466
|
+
min: min3,
|
|
17467
|
+
max: max3,
|
|
17468
|
+
special,
|
|
17469
|
+
upcase,
|
|
17470
|
+
digit,
|
|
17471
|
+
regex,
|
|
17472
|
+
className,
|
|
17473
|
+
value,
|
|
17474
|
+
defaultValue,
|
|
17475
|
+
isForm,
|
|
17476
|
+
isEditTable
|
|
17477
|
+
} = props;
|
|
17478
|
+
const { t: t3 } = useI18n();
|
|
17479
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
17480
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
17481
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
17482
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
17483
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
17484
|
+
return message2;
|
|
17485
|
+
};
|
|
17486
|
+
if (!isForm && !isEditTable) {
|
|
17487
|
+
const propValue = value || defaultValue;
|
|
17488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
17489
|
+
}
|
|
17490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17491
|
+
Controller,
|
|
17492
|
+
{
|
|
17493
|
+
name: String(name2),
|
|
17494
|
+
control: methods.control,
|
|
17495
|
+
rules: {
|
|
17496
|
+
...required && !invisible ? {
|
|
17497
|
+
required: {
|
|
17498
|
+
value: true,
|
|
17499
|
+
message: `${string} ${t3("must_required")}`
|
|
17500
|
+
}
|
|
17501
|
+
} : {},
|
|
17502
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
17503
|
+
pattern: {
|
|
17504
|
+
value: new RegExp(regex),
|
|
17505
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
17506
|
+
}
|
|
17507
|
+
} : {}
|
|
17508
|
+
},
|
|
17509
|
+
render: ({
|
|
17510
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
17511
|
+
fieldState: { error: error2 }
|
|
17512
|
+
}) => {
|
|
17513
|
+
const { setError, clearErrors } = methods;
|
|
17514
|
+
const [showPlain, setShowPlain] = (0, import_react41.useState)(false);
|
|
17515
|
+
const realValue = (0, import_react41.useMemo)(
|
|
17516
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
17517
|
+
[value2]
|
|
17518
|
+
);
|
|
17519
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
17520
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
17521
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
17522
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
17523
|
+
(0, import_react41.useEffect)(() => {
|
|
17524
|
+
if (canToggle) setShowPlain(false);
|
|
17525
|
+
}, [canToggle]);
|
|
17526
|
+
(0, import_react41.useEffect)(() => {
|
|
17527
|
+
if (value2) clearErrors(name2);
|
|
17528
|
+
}, [value2, clearErrors, name2]);
|
|
17529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
17530
|
+
isCappedToken && shouldMask && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17531
|
+
"div",
|
|
17532
|
+
{
|
|
17533
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
17534
|
+
"aria-hidden": "true",
|
|
17535
|
+
children: maskedDisplay
|
|
17536
|
+
}
|
|
17537
|
+
),
|
|
17538
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17539
|
+
"input",
|
|
17540
|
+
{
|
|
17541
|
+
value: realValue,
|
|
17542
|
+
onChange: (e3) => {
|
|
17543
|
+
if (readonly) return;
|
|
17544
|
+
const inputValue = e3.target.value ?? "";
|
|
17545
|
+
fieldOnchange(inputValue);
|
|
17546
|
+
clearErrors(name2);
|
|
17547
|
+
},
|
|
17548
|
+
onBlur: (e3) => {
|
|
17549
|
+
if (readonly) return;
|
|
17550
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
17551
|
+
if (!inputValue && required && !invisible) {
|
|
17552
|
+
setError(name2, {
|
|
17553
|
+
type: "required",
|
|
17554
|
+
message: `${string} ${t3("must_required")}`
|
|
17555
|
+
});
|
|
17556
|
+
return;
|
|
17557
|
+
}
|
|
17558
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
17559
|
+
setError(name2, {
|
|
17560
|
+
type: "pattern",
|
|
17561
|
+
message: getPasswordMessage2(
|
|
17562
|
+
min3,
|
|
17563
|
+
max3,
|
|
17564
|
+
upcase,
|
|
17565
|
+
digit,
|
|
17566
|
+
special
|
|
17567
|
+
)
|
|
17568
|
+
});
|
|
17569
|
+
return;
|
|
17570
|
+
}
|
|
17571
|
+
fieldOnchange(inputValue);
|
|
17572
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
17573
|
+
clearErrors(name2);
|
|
17574
|
+
},
|
|
17575
|
+
readOnly: readonly,
|
|
17576
|
+
disabled: readonly,
|
|
17577
|
+
placeholder,
|
|
17578
|
+
required: !invisible && required,
|
|
17579
|
+
style: {
|
|
17580
|
+
...isCappedToken && shouldMask ? {
|
|
17581
|
+
WebkitTextSecurity: "none",
|
|
17582
|
+
color: "transparent",
|
|
17583
|
+
caretColor: void 0
|
|
17584
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
17585
|
+
},
|
|
17586
|
+
onCopy: (e3) => {
|
|
17587
|
+
if (shouldMask) e3.preventDefault();
|
|
17588
|
+
},
|
|
17589
|
+
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
|
|
17590
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
17591
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
17592
|
+
}
|
|
17593
|
+
),
|
|
17594
|
+
canToggle && !isCappedToken && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
17595
|
+
"button",
|
|
17596
|
+
{
|
|
17597
|
+
type: "button",
|
|
17598
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
17599
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
17600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIconComponent, { open: showPlain })
|
|
17601
|
+
}
|
|
17602
|
+
),
|
|
17603
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17604
|
+
] });
|
|
17605
|
+
}
|
|
17606
|
+
}
|
|
17607
|
+
);
|
|
17608
|
+
};
|
|
17609
|
+
|
|
17610
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17611
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
17368
17612
|
var CheckboxField = (props) => {
|
|
17369
17613
|
const {
|
|
17370
17614
|
name: name2,
|
|
@@ -17379,9 +17623,9 @@ var CheckboxField = (props) => {
|
|
|
17379
17623
|
} = props;
|
|
17380
17624
|
if (!isForm) {
|
|
17381
17625
|
if (name2 === "is_active" || name2 === "active") {
|
|
17382
|
-
return /* @__PURE__ */ (0,
|
|
17626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ActiveBadgeField, { type: value });
|
|
17383
17627
|
} else {
|
|
17384
|
-
return /* @__PURE__ */ (0,
|
|
17628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17385
17629
|
"input",
|
|
17386
17630
|
{
|
|
17387
17631
|
type: "checkbox",
|
|
@@ -17392,12 +17636,12 @@ var CheckboxField = (props) => {
|
|
|
17392
17636
|
);
|
|
17393
17637
|
}
|
|
17394
17638
|
}
|
|
17395
|
-
return /* @__PURE__ */ (0,
|
|
17639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17396
17640
|
Controller,
|
|
17397
17641
|
{
|
|
17398
17642
|
name: name2 ?? "",
|
|
17399
17643
|
control: methods?.control,
|
|
17400
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
17644
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17401
17645
|
"div",
|
|
17402
17646
|
{
|
|
17403
17647
|
className: "flex items-center gap-2",
|
|
@@ -17410,7 +17654,7 @@ var CheckboxField = (props) => {
|
|
|
17410
17654
|
onChange2(name2 ?? "", checked);
|
|
17411
17655
|
}
|
|
17412
17656
|
},
|
|
17413
|
-
children: /* @__PURE__ */ (0,
|
|
17657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
17414
17658
|
"input",
|
|
17415
17659
|
{
|
|
17416
17660
|
...field,
|
|
@@ -17437,21 +17681,21 @@ var CheckboxField = (props) => {
|
|
|
17437
17681
|
};
|
|
17438
17682
|
|
|
17439
17683
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17440
|
-
var
|
|
17441
|
-
var
|
|
17684
|
+
var import_react42 = require("react");
|
|
17685
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
17442
17686
|
var ColorWrapper = (props) => {
|
|
17443
17687
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
17444
17688
|
const { t: t3 } = useI18n();
|
|
17445
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
17446
|
-
const [showFullColors, setIsShowFullColor] = (0,
|
|
17447
|
-
const pickColorsRef = (0,
|
|
17448
|
-
(0,
|
|
17689
|
+
const [selectedColor, setSelectedColor] = (0, import_react42.useState)(colors2[defaultColor]);
|
|
17690
|
+
const [showFullColors, setIsShowFullColor] = (0, import_react42.useState)(false);
|
|
17691
|
+
const pickColorsRef = (0, import_react42.useRef)(null);
|
|
17692
|
+
(0, import_react42.useEffect)(() => {
|
|
17449
17693
|
setSelectedColor(colors2[defaultColor]);
|
|
17450
17694
|
}, [defaultColor]);
|
|
17451
17695
|
const handleShowFullColors = () => {
|
|
17452
17696
|
setIsShowFullColor(!showFullColors);
|
|
17453
17697
|
};
|
|
17454
|
-
(0,
|
|
17698
|
+
(0, import_react42.useEffect)(() => {
|
|
17455
17699
|
const handleClickOutside = (event) => {
|
|
17456
17700
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17457
17701
|
setIsShowFullColor(false);
|
|
@@ -17462,8 +17706,8 @@ var ColorWrapper = (props) => {
|
|
|
17462
17706
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17463
17707
|
};
|
|
17464
17708
|
}, []);
|
|
17465
|
-
return /* @__PURE__ */ (0,
|
|
17466
|
-
/* @__PURE__ */ (0,
|
|
17709
|
+
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: [
|
|
17710
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17467
17711
|
"button",
|
|
17468
17712
|
{
|
|
17469
17713
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17477,7 +17721,7 @@ var ColorWrapper = (props) => {
|
|
|
17477
17721
|
}
|
|
17478
17722
|
}
|
|
17479
17723
|
),
|
|
17480
|
-
/* @__PURE__ */ (0,
|
|
17724
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17481
17725
|
M,
|
|
17482
17726
|
{
|
|
17483
17727
|
className: "",
|
|
@@ -17486,8 +17730,8 @@ var ColorWrapper = (props) => {
|
|
|
17486
17730
|
content: t3(color?.name)
|
|
17487
17731
|
}
|
|
17488
17732
|
)
|
|
17489
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
17490
|
-
/* @__PURE__ */ (0,
|
|
17733
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
17734
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17491
17735
|
"button",
|
|
17492
17736
|
{
|
|
17493
17737
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17500,7 +17744,7 @@ var ColorWrapper = (props) => {
|
|
|
17500
17744
|
style: { backgroundColor: selectedColor?.color }
|
|
17501
17745
|
}
|
|
17502
17746
|
),
|
|
17503
|
-
/* @__PURE__ */ (0,
|
|
17747
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
17504
17748
|
M,
|
|
17505
17749
|
{
|
|
17506
17750
|
place: "top",
|
|
@@ -17512,13 +17756,13 @@ var ColorWrapper = (props) => {
|
|
|
17512
17756
|
};
|
|
17513
17757
|
|
|
17514
17758
|
// src/widgets/basic/color-field/color.tsx
|
|
17515
|
-
var
|
|
17759
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
17516
17760
|
var ColorField = (props) => {
|
|
17517
17761
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17518
17762
|
if (!isForm) {
|
|
17519
|
-
return /* @__PURE__ */ (0,
|
|
17763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17520
17764
|
}
|
|
17521
|
-
return /* @__PURE__ */ (0,
|
|
17765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
17522
17766
|
Controller,
|
|
17523
17767
|
{
|
|
17524
17768
|
name: name2 ?? "",
|
|
@@ -17528,7 +17772,7 @@ var ColorField = (props) => {
|
|
|
17528
17772
|
field.onChange(color?.id);
|
|
17529
17773
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17530
17774
|
};
|
|
17531
|
-
return /* @__PURE__ */ (0,
|
|
17775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
17532
17776
|
ColorWrapper,
|
|
17533
17777
|
{
|
|
17534
17778
|
savePickColor: handlePickColorChange,
|
|
@@ -17542,8 +17786,8 @@ var ColorField = (props) => {
|
|
|
17542
17786
|
};
|
|
17543
17787
|
|
|
17544
17788
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17545
|
-
var
|
|
17546
|
-
var
|
|
17789
|
+
var import_react43 = require("react");
|
|
17790
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
17547
17791
|
var CopyLinkButtonField = (props) => {
|
|
17548
17792
|
const {
|
|
17549
17793
|
isForm,
|
|
@@ -17562,9 +17806,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17562
17806
|
} = props;
|
|
17563
17807
|
const { t: t3 } = useI18n();
|
|
17564
17808
|
if (!isForm) {
|
|
17565
|
-
return /* @__PURE__ */ (0,
|
|
17809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17566
17810
|
}
|
|
17567
|
-
return /* @__PURE__ */ (0,
|
|
17811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17568
17812
|
Controller,
|
|
17569
17813
|
{
|
|
17570
17814
|
name: name2 ?? "",
|
|
@@ -17577,13 +17821,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17577
17821
|
fieldState: { error: error2 }
|
|
17578
17822
|
}) => {
|
|
17579
17823
|
const { setError, clearErrors } = methods;
|
|
17580
|
-
(0,
|
|
17824
|
+
(0, import_react43.useEffect)(() => {
|
|
17581
17825
|
if (value) {
|
|
17582
17826
|
clearErrors(name2);
|
|
17583
17827
|
}
|
|
17584
17828
|
}, [value]);
|
|
17585
|
-
return /* @__PURE__ */ (0,
|
|
17586
|
-
/* @__PURE__ */ (0,
|
|
17829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "relative", children: [
|
|
17830
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
17587
17831
|
"div",
|
|
17588
17832
|
{
|
|
17589
17833
|
"aria-disabled": readonly,
|
|
@@ -17592,7 +17836,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17592
17836
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17593
17837
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17594
17838
|
children: [
|
|
17595
|
-
/* @__PURE__ */ (0,
|
|
17839
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17596
17840
|
"input",
|
|
17597
17841
|
{
|
|
17598
17842
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17633,19 +17877,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17633
17877
|
`
|
|
17634
17878
|
}
|
|
17635
17879
|
),
|
|
17636
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17880
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
17637
17881
|
"button",
|
|
17638
17882
|
{
|
|
17639
17883
|
className: "cursor-pointer",
|
|
17640
17884
|
type: "button",
|
|
17641
17885
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17642
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17886
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, {})
|
|
17643
17887
|
}
|
|
17644
17888
|
)
|
|
17645
17889
|
]
|
|
17646
17890
|
}
|
|
17647
17891
|
),
|
|
17648
|
-
error2 && /* @__PURE__ */ (0,
|
|
17892
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17649
17893
|
] });
|
|
17650
17894
|
}
|
|
17651
17895
|
}
|
|
@@ -17653,10 +17897,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17653
17897
|
};
|
|
17654
17898
|
|
|
17655
17899
|
// src/widgets/basic/date-field/date.tsx
|
|
17656
|
-
var
|
|
17900
|
+
var import_react56 = require("react");
|
|
17657
17901
|
|
|
17658
17902
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17659
|
-
var
|
|
17903
|
+
var import_react46 = __toESM(require("react"));
|
|
17660
17904
|
|
|
17661
17905
|
// node_modules/date-fns/constants.js
|
|
17662
17906
|
var daysInYear = 365.2425;
|
|
@@ -21554,22 +21798,22 @@ function subYears(date, amount, options2) {
|
|
|
21554
21798
|
}
|
|
21555
21799
|
|
|
21556
21800
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21557
|
-
var
|
|
21801
|
+
var React9 = __toESM(require("react"), 1);
|
|
21558
21802
|
|
|
21559
21803
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
21560
|
-
var
|
|
21561
|
-
var
|
|
21804
|
+
var React7 = __toESM(require("react"), 1);
|
|
21805
|
+
var import_react44 = require("react");
|
|
21562
21806
|
var isClient = typeof document !== "undefined";
|
|
21563
21807
|
var noop2 = function noop3() {
|
|
21564
21808
|
};
|
|
21565
|
-
var index = isClient ?
|
|
21809
|
+
var index = isClient ? import_react44.useLayoutEffect : noop2;
|
|
21566
21810
|
var SafeReact = {
|
|
21567
|
-
...
|
|
21811
|
+
...React7
|
|
21568
21812
|
};
|
|
21569
21813
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
21570
21814
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
21571
21815
|
function useEffectEvent(callback) {
|
|
21572
|
-
const ref =
|
|
21816
|
+
const ref = React7.useRef(() => {
|
|
21573
21817
|
if (process.env.NODE_ENV !== "production") {
|
|
21574
21818
|
throw new Error("Cannot call an event handler while rendering.");
|
|
21575
21819
|
}
|
|
@@ -21577,7 +21821,7 @@ function useEffectEvent(callback) {
|
|
|
21577
21821
|
useSafeInsertionEffect(() => {
|
|
21578
21822
|
ref.current = callback;
|
|
21579
21823
|
});
|
|
21580
|
-
return
|
|
21824
|
+
return React7.useCallback(function() {
|
|
21581
21825
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21582
21826
|
args[_key] = arguments[_key];
|
|
21583
21827
|
}
|
|
@@ -21586,17 +21830,17 @@ function useEffectEvent(callback) {
|
|
|
21586
21830
|
}
|
|
21587
21831
|
|
|
21588
21832
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21589
|
-
var
|
|
21833
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
21590
21834
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
21591
21835
|
|
|
21592
21836
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
21593
|
-
var
|
|
21594
|
-
var
|
|
21837
|
+
var React8 = __toESM(require("react"), 1);
|
|
21838
|
+
var import_react45 = require("react");
|
|
21595
21839
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
21596
21840
|
var isClient2 = typeof document !== "undefined";
|
|
21597
21841
|
var noop4 = function noop5() {
|
|
21598
21842
|
};
|
|
21599
|
-
var index2 = isClient2 ?
|
|
21843
|
+
var index2 = isClient2 ? import_react45.useLayoutEffect : noop4;
|
|
21600
21844
|
function deepEqual2(a2, b2) {
|
|
21601
21845
|
if (a2 === b2) {
|
|
21602
21846
|
return true;
|
|
@@ -21656,7 +21900,7 @@ function roundByDPR(element, value) {
|
|
|
21656
21900
|
return Math.round(value * dpr) / dpr;
|
|
21657
21901
|
}
|
|
21658
21902
|
function useLatestRef(value) {
|
|
21659
|
-
const ref =
|
|
21903
|
+
const ref = React8.useRef(value);
|
|
21660
21904
|
index2(() => {
|
|
21661
21905
|
ref.current = value;
|
|
21662
21906
|
});
|
|
@@ -21679,7 +21923,7 @@ function useFloating(options2) {
|
|
|
21679
21923
|
whileElementsMounted,
|
|
21680
21924
|
open
|
|
21681
21925
|
} = options2;
|
|
21682
|
-
const [data, setData] =
|
|
21926
|
+
const [data, setData] = React8.useState({
|
|
21683
21927
|
x: 0,
|
|
21684
21928
|
y: 0,
|
|
21685
21929
|
strategy,
|
|
@@ -21687,19 +21931,19 @@ function useFloating(options2) {
|
|
|
21687
21931
|
middlewareData: {},
|
|
21688
21932
|
isPositioned: false
|
|
21689
21933
|
});
|
|
21690
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21934
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
21691
21935
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
21692
21936
|
setLatestMiddleware(middleware2);
|
|
21693
21937
|
}
|
|
21694
|
-
const [_reference, _setReference] =
|
|
21695
|
-
const [_floating, _setFloating] =
|
|
21696
|
-
const setReference =
|
|
21938
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21939
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21940
|
+
const setReference = React8.useCallback((node2) => {
|
|
21697
21941
|
if (node2 !== referenceRef.current) {
|
|
21698
21942
|
referenceRef.current = node2;
|
|
21699
21943
|
_setReference(node2);
|
|
21700
21944
|
}
|
|
21701
21945
|
}, []);
|
|
21702
|
-
const setFloating =
|
|
21946
|
+
const setFloating = React8.useCallback((node2) => {
|
|
21703
21947
|
if (node2 !== floatingRef.current) {
|
|
21704
21948
|
floatingRef.current = node2;
|
|
21705
21949
|
_setFloating(node2);
|
|
@@ -21707,14 +21951,14 @@ function useFloating(options2) {
|
|
|
21707
21951
|
}, []);
|
|
21708
21952
|
const referenceEl = externalReference || _reference;
|
|
21709
21953
|
const floatingEl = externalFloating || _floating;
|
|
21710
|
-
const referenceRef =
|
|
21711
|
-
const floatingRef =
|
|
21712
|
-
const dataRef =
|
|
21954
|
+
const referenceRef = React8.useRef(null);
|
|
21955
|
+
const floatingRef = React8.useRef(null);
|
|
21956
|
+
const dataRef = React8.useRef(data);
|
|
21713
21957
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
21714
21958
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
21715
21959
|
const platformRef = useLatestRef(platform2);
|
|
21716
21960
|
const openRef = useLatestRef(open);
|
|
21717
|
-
const update =
|
|
21961
|
+
const update = React8.useCallback(() => {
|
|
21718
21962
|
if (!referenceRef.current || !floatingRef.current) {
|
|
21719
21963
|
return;
|
|
21720
21964
|
}
|
|
@@ -21752,7 +21996,7 @@ function useFloating(options2) {
|
|
|
21752
21996
|
}));
|
|
21753
21997
|
}
|
|
21754
21998
|
}, [open]);
|
|
21755
|
-
const isMountedRef =
|
|
21999
|
+
const isMountedRef = React8.useRef(false);
|
|
21756
22000
|
index2(() => {
|
|
21757
22001
|
isMountedRef.current = true;
|
|
21758
22002
|
return () => {
|
|
@@ -21769,17 +22013,17 @@ function useFloating(options2) {
|
|
|
21769
22013
|
update();
|
|
21770
22014
|
}
|
|
21771
22015
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21772
|
-
const refs =
|
|
22016
|
+
const refs = React8.useMemo(() => ({
|
|
21773
22017
|
reference: referenceRef,
|
|
21774
22018
|
floating: floatingRef,
|
|
21775
22019
|
setReference,
|
|
21776
22020
|
setFloating
|
|
21777
22021
|
}), [setReference, setFloating]);
|
|
21778
|
-
const elements =
|
|
22022
|
+
const elements = React8.useMemo(() => ({
|
|
21779
22023
|
reference: referenceEl,
|
|
21780
22024
|
floating: floatingEl
|
|
21781
22025
|
}), [referenceEl, floatingEl]);
|
|
21782
|
-
const floatingStyles =
|
|
22026
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21783
22027
|
const initialStyles = {
|
|
21784
22028
|
position: strategy,
|
|
21785
22029
|
left: 0,
|
|
@@ -21805,7 +22049,7 @@ function useFloating(options2) {
|
|
|
21805
22049
|
top: y3
|
|
21806
22050
|
};
|
|
21807
22051
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21808
|
-
return
|
|
22052
|
+
return React8.useMemo(() => ({
|
|
21809
22053
|
...data,
|
|
21810
22054
|
update,
|
|
21811
22055
|
refs,
|
|
@@ -21866,7 +22110,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21866
22110
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21867
22111
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21868
22112
|
var SafeReact2 = {
|
|
21869
|
-
...
|
|
22113
|
+
...React9
|
|
21870
22114
|
};
|
|
21871
22115
|
var serverHandoffComplete = false;
|
|
21872
22116
|
var count = 0;
|
|
@@ -21876,13 +22120,13 @@ var genId = () => (
|
|
|
21876
22120
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21877
22121
|
);
|
|
21878
22122
|
function useFloatingId() {
|
|
21879
|
-
const [id, setId] =
|
|
22123
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21880
22124
|
index(() => {
|
|
21881
22125
|
if (id == null) {
|
|
21882
22126
|
setId(genId());
|
|
21883
22127
|
}
|
|
21884
22128
|
}, []);
|
|
21885
|
-
|
|
22129
|
+
React9.useEffect(() => {
|
|
21886
22130
|
serverHandoffComplete = true;
|
|
21887
22131
|
}, []);
|
|
21888
22132
|
return id;
|
|
@@ -21917,7 +22161,7 @@ function error() {
|
|
|
21917
22161
|
console.error(message2);
|
|
21918
22162
|
}
|
|
21919
22163
|
}
|
|
21920
|
-
var FloatingArrow = /* @__PURE__ */
|
|
22164
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21921
22165
|
const {
|
|
21922
22166
|
context: {
|
|
21923
22167
|
placement,
|
|
@@ -21948,7 +22192,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21948
22192
|
}
|
|
21949
22193
|
}
|
|
21950
22194
|
const clipPathId = useId();
|
|
21951
|
-
const [isRTL2, setIsRTL] =
|
|
22195
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21952
22196
|
index(() => {
|
|
21953
22197
|
if (!floating) return;
|
|
21954
22198
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21984,7 +22228,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21984
22228
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21985
22229
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21986
22230
|
}[side];
|
|
21987
|
-
return /* @__PURE__ */ (0,
|
|
22231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("svg", {
|
|
21988
22232
|
...rest,
|
|
21989
22233
|
"aria-hidden": true,
|
|
21990
22234
|
ref,
|
|
@@ -22000,18 +22244,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22000
22244
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
22001
22245
|
...restStyle
|
|
22002
22246
|
},
|
|
22003
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
22247
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
22004
22248
|
clipPath: "url(#" + clipPathId + ")",
|
|
22005
22249
|
fill: "none",
|
|
22006
22250
|
stroke,
|
|
22007
22251
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
22008
22252
|
d: dValue
|
|
22009
|
-
}), /* @__PURE__ */ (0,
|
|
22253
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
22010
22254
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
22011
22255
|
d: dValue
|
|
22012
|
-
}), /* @__PURE__ */ (0,
|
|
22256
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("clipPath", {
|
|
22013
22257
|
id: clipPathId,
|
|
22014
|
-
children: /* @__PURE__ */ (0,
|
|
22258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("rect", {
|
|
22015
22259
|
x: -halfStrokeWidth,
|
|
22016
22260
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
22017
22261
|
width: width + computedStrokeWidth,
|
|
@@ -22039,13 +22283,13 @@ function createEventEmitter() {
|
|
|
22039
22283
|
}
|
|
22040
22284
|
};
|
|
22041
22285
|
}
|
|
22042
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
22043
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
22286
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22287
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22044
22288
|
var useFloatingParentNodeId = () => {
|
|
22045
22289
|
var _React$useContext;
|
|
22046
|
-
return ((_React$useContext =
|
|
22290
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
22047
22291
|
};
|
|
22048
|
-
var useFloatingTree = () =>
|
|
22292
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
22049
22293
|
function useFloatingRootContext(options2) {
|
|
22050
22294
|
const {
|
|
22051
22295
|
open = false,
|
|
@@ -22053,8 +22297,8 @@ function useFloatingRootContext(options2) {
|
|
|
22053
22297
|
elements: elementsProp
|
|
22054
22298
|
} = options2;
|
|
22055
22299
|
const floatingId = useId();
|
|
22056
|
-
const dataRef =
|
|
22057
|
-
const [events] =
|
|
22300
|
+
const dataRef = React9.useRef({});
|
|
22301
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
22058
22302
|
const nested = useFloatingParentNodeId() != null;
|
|
22059
22303
|
if (process.env.NODE_ENV !== "production") {
|
|
22060
22304
|
const optionDomReference = elementsProp.reference;
|
|
@@ -22062,7 +22306,7 @@ function useFloatingRootContext(options2) {
|
|
|
22062
22306
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
22063
22307
|
}
|
|
22064
22308
|
}
|
|
22065
|
-
const [positionReference, setPositionReference] =
|
|
22309
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
22066
22310
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
22067
22311
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
22068
22312
|
events.emit("openchange", {
|
|
@@ -22073,15 +22317,15 @@ function useFloatingRootContext(options2) {
|
|
|
22073
22317
|
});
|
|
22074
22318
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
22075
22319
|
});
|
|
22076
|
-
const refs =
|
|
22320
|
+
const refs = React9.useMemo(() => ({
|
|
22077
22321
|
setPositionReference
|
|
22078
22322
|
}), []);
|
|
22079
|
-
const elements =
|
|
22323
|
+
const elements = React9.useMemo(() => ({
|
|
22080
22324
|
reference: positionReference || elementsProp.reference || null,
|
|
22081
22325
|
floating: elementsProp.floating || null,
|
|
22082
22326
|
domReference: elementsProp.reference
|
|
22083
22327
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
22084
|
-
return
|
|
22328
|
+
return React9.useMemo(() => ({
|
|
22085
22329
|
dataRef,
|
|
22086
22330
|
open,
|
|
22087
22331
|
onOpenChange,
|
|
@@ -22108,11 +22352,11 @@ function useFloating2(options2) {
|
|
|
22108
22352
|
});
|
|
22109
22353
|
const rootContext = options2.rootContext || internalRootContext;
|
|
22110
22354
|
const computedElements = rootContext.elements;
|
|
22111
|
-
const [_domReference, setDomReference] =
|
|
22112
|
-
const [positionReference, _setPositionReference] =
|
|
22355
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
22356
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
22113
22357
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
22114
22358
|
const domReference = optionDomReference || _domReference;
|
|
22115
|
-
const domReferenceRef =
|
|
22359
|
+
const domReferenceRef = React9.useRef(null);
|
|
22116
22360
|
const tree = useFloatingTree();
|
|
22117
22361
|
index(() => {
|
|
22118
22362
|
if (domReference) {
|
|
@@ -22128,7 +22372,7 @@ function useFloating2(options2) {
|
|
|
22128
22372
|
}
|
|
22129
22373
|
}
|
|
22130
22374
|
});
|
|
22131
|
-
const setPositionReference =
|
|
22375
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
22132
22376
|
const computedPositionReference = isElement(node2) ? {
|
|
22133
22377
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
22134
22378
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -22137,7 +22381,7 @@ function useFloating2(options2) {
|
|
|
22137
22381
|
_setPositionReference(computedPositionReference);
|
|
22138
22382
|
position2.refs.setReference(computedPositionReference);
|
|
22139
22383
|
}, [position2.refs]);
|
|
22140
|
-
const setReference =
|
|
22384
|
+
const setReference = React9.useCallback((node2) => {
|
|
22141
22385
|
if (isElement(node2) || node2 === null) {
|
|
22142
22386
|
domReferenceRef.current = node2;
|
|
22143
22387
|
setDomReference(node2);
|
|
@@ -22149,17 +22393,17 @@ function useFloating2(options2) {
|
|
|
22149
22393
|
position2.refs.setReference(node2);
|
|
22150
22394
|
}
|
|
22151
22395
|
}, [position2.refs]);
|
|
22152
|
-
const refs =
|
|
22396
|
+
const refs = React9.useMemo(() => ({
|
|
22153
22397
|
...position2.refs,
|
|
22154
22398
|
setReference,
|
|
22155
22399
|
setPositionReference,
|
|
22156
22400
|
domReference: domReferenceRef
|
|
22157
22401
|
}), [position2.refs, setReference, setPositionReference]);
|
|
22158
|
-
const elements =
|
|
22402
|
+
const elements = React9.useMemo(() => ({
|
|
22159
22403
|
...position2.elements,
|
|
22160
22404
|
domReference
|
|
22161
22405
|
}), [position2.elements, domReference]);
|
|
22162
|
-
const context =
|
|
22406
|
+
const context = React9.useMemo(() => ({
|
|
22163
22407
|
...position2,
|
|
22164
22408
|
...rootContext,
|
|
22165
22409
|
refs,
|
|
@@ -22173,7 +22417,7 @@ function useFloating2(options2) {
|
|
|
22173
22417
|
node2.context = context;
|
|
22174
22418
|
}
|
|
22175
22419
|
});
|
|
22176
|
-
return
|
|
22420
|
+
return React9.useMemo(() => ({
|
|
22177
22421
|
...position2,
|
|
22178
22422
|
context,
|
|
22179
22423
|
refs,
|
|
@@ -22223,13 +22467,13 @@ function __spreadArray(to2, from2, pack) {
|
|
|
22223
22467
|
var CalendarContainer = function(_a2) {
|
|
22224
22468
|
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
22469
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
22226
|
-
return
|
|
22470
|
+
return import_react46.default.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22227
22471
|
};
|
|
22228
22472
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22229
|
-
var ref = (0,
|
|
22230
|
-
var onClickOutsideRef = (0,
|
|
22473
|
+
var ref = (0, import_react46.useRef)(null);
|
|
22474
|
+
var onClickOutsideRef = (0, import_react46.useRef)(onClickOutside);
|
|
22231
22475
|
onClickOutsideRef.current = onClickOutside;
|
|
22232
|
-
var handleClickOutside = (0,
|
|
22476
|
+
var handleClickOutside = (0, import_react46.useCallback)(function(event) {
|
|
22233
22477
|
var _a2;
|
|
22234
22478
|
var target = event.composed && event.composedPath && event.composedPath().find(function(eventTarget) {
|
|
22235
22479
|
return eventTarget instanceof Node;
|
|
@@ -22240,7 +22484,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22240
22484
|
}
|
|
22241
22485
|
}
|
|
22242
22486
|
}, [ignoreClass]);
|
|
22243
|
-
(0,
|
|
22487
|
+
(0, import_react46.useEffect)(function() {
|
|
22244
22488
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22245
22489
|
return function() {
|
|
22246
22490
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -22251,7 +22495,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22251
22495
|
var ClickOutsideWrapper = function(_a2) {
|
|
22252
22496
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
22253
22497
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
22254
|
-
return
|
|
22498
|
+
return import_react46.default.createElement("div", { className, style, ref: function(node2) {
|
|
22255
22499
|
detectRef.current = node2;
|
|
22256
22500
|
if (containerRef) {
|
|
22257
22501
|
containerRef.current = node2;
|
|
@@ -22847,7 +23091,7 @@ var InputTime = (
|
|
|
22847
23091
|
__extends(InputTime2, _super);
|
|
22848
23092
|
function InputTime2(props) {
|
|
22849
23093
|
var _this = _super.call(this, props) || this;
|
|
22850
|
-
_this.inputRef =
|
|
23094
|
+
_this.inputRef = import_react46.default.createRef();
|
|
22851
23095
|
_this.onTimeChange = function(time) {
|
|
22852
23096
|
var _a2, _b;
|
|
22853
23097
|
_this.setState({ time });
|
|
@@ -22865,13 +23109,13 @@ var InputTime = (
|
|
|
22865
23109
|
var time = _this.state.time;
|
|
22866
23110
|
var _a2 = _this.props, date = _a2.date, timeString = _a2.timeString, customTimeInput = _a2.customTimeInput;
|
|
22867
23111
|
if (customTimeInput) {
|
|
22868
|
-
return (0,
|
|
23112
|
+
return (0, import_react46.cloneElement)(customTimeInput, {
|
|
22869
23113
|
date,
|
|
22870
23114
|
value: time,
|
|
22871
23115
|
onChange: _this.onTimeChange
|
|
22872
23116
|
});
|
|
22873
23117
|
}
|
|
22874
|
-
return
|
|
23118
|
+
return import_react46.default.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22875
23119
|
var _a3;
|
|
22876
23120
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22877
23121
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22892,19 +23136,19 @@ var InputTime = (
|
|
|
22892
23136
|
return null;
|
|
22893
23137
|
};
|
|
22894
23138
|
InputTime2.prototype.render = function() {
|
|
22895
|
-
return
|
|
23139
|
+
return import_react46.default.createElement(
|
|
22896
23140
|
"div",
|
|
22897
23141
|
{ className: "react-datepicker__input-time-container" },
|
|
22898
|
-
|
|
22899
|
-
|
|
23142
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
23143
|
+
import_react46.default.createElement(
|
|
22900
23144
|
"div",
|
|
22901
23145
|
{ className: "react-datepicker-time__input-container" },
|
|
22902
|
-
|
|
23146
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22903
23147
|
)
|
|
22904
23148
|
);
|
|
22905
23149
|
};
|
|
22906
23150
|
return InputTime2;
|
|
22907
|
-
}(
|
|
23151
|
+
}(import_react46.Component)
|
|
22908
23152
|
);
|
|
22909
23153
|
var Day = (
|
|
22910
23154
|
/** @class */
|
|
@@ -22912,7 +23156,7 @@ var Day = (
|
|
|
22912
23156
|
__extends(Day2, _super);
|
|
22913
23157
|
function Day2() {
|
|
22914
23158
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22915
|
-
_this.dayEl = (0,
|
|
23159
|
+
_this.dayEl = (0, import_react46.createRef)();
|
|
22916
23160
|
_this.handleClick = function(event) {
|
|
22917
23161
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
22918
23162
|
_this.props.onClick(event);
|
|
@@ -23147,11 +23391,11 @@ var Day = (
|
|
|
23147
23391
|
_this.render = function() {
|
|
23148
23392
|
return (
|
|
23149
23393
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
23150
|
-
|
|
23394
|
+
import_react46.default.createElement(
|
|
23151
23395
|
"div",
|
|
23152
23396
|
{ 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
23397
|
_this.renderDayContents(),
|
|
23154
|
-
_this.getTitle() !== "" &&
|
|
23398
|
+
_this.getTitle() !== "" && import_react46.default.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
23155
23399
|
)
|
|
23156
23400
|
);
|
|
23157
23401
|
};
|
|
@@ -23192,7 +23436,7 @@ var Day = (
|
|
|
23192
23436
|
);
|
|
23193
23437
|
};
|
|
23194
23438
|
return Day2;
|
|
23195
|
-
}(
|
|
23439
|
+
}(import_react46.Component)
|
|
23196
23440
|
);
|
|
23197
23441
|
var WeekNumber = (
|
|
23198
23442
|
/** @class */
|
|
@@ -23200,7 +23444,7 @@ var WeekNumber = (
|
|
|
23200
23444
|
__extends(WeekNumber2, _super);
|
|
23201
23445
|
function WeekNumber2() {
|
|
23202
23446
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23203
|
-
_this.weekNumberEl = (0,
|
|
23447
|
+
_this.weekNumberEl = (0, import_react46.createRef)();
|
|
23204
23448
|
_this.handleClick = function(event) {
|
|
23205
23449
|
if (_this.props.onClick) {
|
|
23206
23450
|
_this.props.onClick(event);
|
|
@@ -23260,10 +23504,10 @@ var WeekNumber = (
|
|
|
23260
23504
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
23261
23505
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
23262
23506
|
};
|
|
23263
|
-
return
|
|
23507
|
+
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
23508
|
};
|
|
23265
23509
|
return WeekNumber2;
|
|
23266
|
-
}(
|
|
23510
|
+
}(import_react46.Component)
|
|
23267
23511
|
);
|
|
23268
23512
|
var Week = (
|
|
23269
23513
|
/** @class */
|
|
@@ -23337,11 +23581,11 @@ var Week = (
|
|
|
23337
23581
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
23338
23582
|
if (_this.props.showWeekNumber) {
|
|
23339
23583
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
23340
|
-
days.push(
|
|
23584
|
+
days.push(import_react46.default.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
23341
23585
|
}
|
|
23342
23586
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
23343
23587
|
var day = addDays(startOfWeek2, offset4);
|
|
23344
|
-
return
|
|
23588
|
+
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
23589
|
}));
|
|
23346
23590
|
};
|
|
23347
23591
|
_this.startOfWeek = function() {
|
|
@@ -23367,10 +23611,10 @@ var Week = (
|
|
|
23367
23611
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
23368
23612
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
23369
23613
|
};
|
|
23370
|
-
return
|
|
23614
|
+
return import_react46.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
23371
23615
|
};
|
|
23372
23616
|
return Week2;
|
|
23373
|
-
}(
|
|
23617
|
+
}(import_react46.Component)
|
|
23374
23618
|
);
|
|
23375
23619
|
var _a;
|
|
23376
23620
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
@@ -23422,10 +23666,10 @@ var Month = (
|
|
|
23422
23666
|
function Month2() {
|
|
23423
23667
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23424
23668
|
_this.MONTH_REFS = __spreadArray([], Array(12), true).map(function() {
|
|
23425
|
-
return (0,
|
|
23669
|
+
return (0, import_react46.createRef)();
|
|
23426
23670
|
});
|
|
23427
23671
|
_this.QUARTER_REFS = __spreadArray([], Array(4), true).map(function() {
|
|
23428
|
-
return (0,
|
|
23672
|
+
return (0, import_react46.createRef)();
|
|
23429
23673
|
});
|
|
23430
23674
|
_this.isDisabled = function(day) {
|
|
23431
23675
|
return isDayDisabled(day, {
|
|
@@ -23595,7 +23839,7 @@ var Month = (
|
|
|
23595
23839
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
23596
23840
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
23597
23841
|
while (true) {
|
|
23598
|
-
weeks.push(
|
|
23842
|
+
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
23843
|
if (breakAfterNextPush)
|
|
23600
23844
|
break;
|
|
23601
23845
|
i3++;
|
|
@@ -23864,8 +24108,8 @@ var Month = (
|
|
|
23864
24108
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23865
24109
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23866
24110
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23867
|
-
return
|
|
23868
|
-
return
|
|
24111
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
24112
|
+
return import_react46.default.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23869
24113
|
_this.onMonthClick(event, m);
|
|
23870
24114
|
}, onKeyDown: function(event) {
|
|
23871
24115
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23884,8 +24128,8 @@ var Month = (
|
|
|
23884
24128
|
_this.renderQuarters = function() {
|
|
23885
24129
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23886
24130
|
var quarters = [1, 2, 3, 4];
|
|
23887
|
-
return
|
|
23888
|
-
return
|
|
24131
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
24132
|
+
return import_react46.default.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23889
24133
|
_this.onQuarterClick(event, q3);
|
|
23890
24134
|
}, onKeyDown: function(event) {
|
|
23891
24135
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23917,10 +24161,10 @@ var Month = (
|
|
|
23917
24161
|
Month2.prototype.render = function() {
|
|
23918
24162
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23919
24163
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23920
|
-
return
|
|
24164
|
+
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
24165
|
};
|
|
23922
24166
|
return Month2;
|
|
23923
|
-
}(
|
|
24167
|
+
}(import_react46.Component)
|
|
23924
24168
|
);
|
|
23925
24169
|
var MonthDropdownOptions = (
|
|
23926
24170
|
/** @class */
|
|
@@ -23933,10 +24177,10 @@ var MonthDropdownOptions = (
|
|
|
23933
24177
|
};
|
|
23934
24178
|
_this.renderOptions = function() {
|
|
23935
24179
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23936
|
-
return
|
|
24180
|
+
return import_react46.default.createElement(
|
|
23937
24181
|
"div",
|
|
23938
24182
|
{ 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) ?
|
|
24183
|
+
_this.isSelectedMonth(i3) ? import_react46.default.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23940
24184
|
month
|
|
23941
24185
|
);
|
|
23942
24186
|
});
|
|
@@ -23950,10 +24194,10 @@ var MonthDropdownOptions = (
|
|
|
23950
24194
|
return _this;
|
|
23951
24195
|
}
|
|
23952
24196
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23953
|
-
return
|
|
24197
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23954
24198
|
};
|
|
23955
24199
|
return MonthDropdownOptions2;
|
|
23956
|
-
}(
|
|
24200
|
+
}(import_react46.Component)
|
|
23957
24201
|
);
|
|
23958
24202
|
var MonthDropdown = (
|
|
23959
24203
|
/** @class */
|
|
@@ -23966,24 +24210,24 @@ var MonthDropdown = (
|
|
|
23966
24210
|
};
|
|
23967
24211
|
_this.renderSelectOptions = function(monthNames) {
|
|
23968
24212
|
return monthNames.map(function(m, i3) {
|
|
23969
|
-
return
|
|
24213
|
+
return import_react46.default.createElement("option", { key: m, value: i3 }, m);
|
|
23970
24214
|
});
|
|
23971
24215
|
};
|
|
23972
24216
|
_this.renderSelectMode = function(monthNames) {
|
|
23973
|
-
return
|
|
24217
|
+
return import_react46.default.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23974
24218
|
return _this.onChange(parseInt(e3.target.value));
|
|
23975
24219
|
} }, _this.renderSelectOptions(monthNames));
|
|
23976
24220
|
};
|
|
23977
24221
|
_this.renderReadView = function(visible, monthNames) {
|
|
23978
|
-
return
|
|
24222
|
+
return import_react46.default.createElement(
|
|
23979
24223
|
"div",
|
|
23980
24224
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23981
|
-
|
|
23982
|
-
|
|
24225
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
24226
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23983
24227
|
);
|
|
23984
24228
|
};
|
|
23985
24229
|
_this.renderDropdown = function(monthNames) {
|
|
23986
|
-
return
|
|
24230
|
+
return import_react46.default.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23987
24231
|
};
|
|
23988
24232
|
_this.renderScrollMode = function(monthNames) {
|
|
23989
24233
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24022,10 +24266,10 @@ var MonthDropdown = (
|
|
|
24022
24266
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
24023
24267
|
break;
|
|
24024
24268
|
}
|
|
24025
|
-
return
|
|
24269
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24026
24270
|
};
|
|
24027
24271
|
return MonthDropdown2;
|
|
24028
|
-
}(
|
|
24272
|
+
}(import_react46.Component)
|
|
24029
24273
|
);
|
|
24030
24274
|
function generateMonthYears(minDate, maxDate) {
|
|
24031
24275
|
var list = [];
|
|
@@ -24047,10 +24291,10 @@ var MonthYearDropdownOptions = (
|
|
|
24047
24291
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
24048
24292
|
var monthYearPoint = getTime(monthYear);
|
|
24049
24293
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
24050
|
-
return
|
|
24294
|
+
return import_react46.default.createElement(
|
|
24051
24295
|
"div",
|
|
24052
24296
|
{ 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 ?
|
|
24297
|
+
isSameMonthYear ? import_react46.default.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
24054
24298
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
24055
24299
|
);
|
|
24056
24300
|
});
|
|
@@ -24071,10 +24315,10 @@ var MonthYearDropdownOptions = (
|
|
|
24071
24315
|
"react-datepicker__month-year-dropdown": true,
|
|
24072
24316
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
24073
24317
|
});
|
|
24074
|
-
return
|
|
24318
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24075
24319
|
};
|
|
24076
24320
|
return MonthYearDropdownOptions2;
|
|
24077
|
-
}(
|
|
24321
|
+
}(import_react46.Component)
|
|
24078
24322
|
);
|
|
24079
24323
|
var MonthYearDropdown = (
|
|
24080
24324
|
/** @class */
|
|
@@ -24091,7 +24335,7 @@ var MonthYearDropdown = (
|
|
|
24091
24335
|
var options2 = [];
|
|
24092
24336
|
while (!isAfter(currDate, lastDate)) {
|
|
24093
24337
|
var timePoint = getTime(currDate);
|
|
24094
|
-
options2.push(
|
|
24338
|
+
options2.push(import_react46.default.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
24095
24339
|
currDate = addMonths(currDate, 1);
|
|
24096
24340
|
}
|
|
24097
24341
|
return options2;
|
|
@@ -24100,19 +24344,19 @@ var MonthYearDropdown = (
|
|
|
24100
24344
|
_this.onChange(parseInt(event.target.value));
|
|
24101
24345
|
};
|
|
24102
24346
|
_this.renderSelectMode = function() {
|
|
24103
|
-
return
|
|
24347
|
+
return import_react46.default.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24104
24348
|
};
|
|
24105
24349
|
_this.renderReadView = function(visible) {
|
|
24106
24350
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
24107
|
-
return
|
|
24351
|
+
return import_react46.default.createElement(
|
|
24108
24352
|
"div",
|
|
24109
24353
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
24110
|
-
|
|
24111
|
-
|
|
24354
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
24355
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
24112
24356
|
);
|
|
24113
24357
|
};
|
|
24114
24358
|
_this.renderDropdown = function() {
|
|
24115
|
-
return
|
|
24359
|
+
return import_react46.default.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24116
24360
|
};
|
|
24117
24361
|
_this.renderScrollMode = function() {
|
|
24118
24362
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24147,10 +24391,10 @@ var MonthYearDropdown = (
|
|
|
24147
24391
|
renderedDropdown = this.renderSelectMode();
|
|
24148
24392
|
break;
|
|
24149
24393
|
}
|
|
24150
|
-
return
|
|
24394
|
+
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
24395
|
};
|
|
24152
24396
|
return MonthYearDropdown2;
|
|
24153
|
-
}(
|
|
24397
|
+
}(import_react46.Component)
|
|
24154
24398
|
);
|
|
24155
24399
|
var Time = (
|
|
24156
24400
|
/** @class */
|
|
@@ -24245,7 +24489,7 @@ var Time = (
|
|
|
24245
24489
|
return prev2;
|
|
24246
24490
|
}, times[0]);
|
|
24247
24491
|
return times.map(function(time) {
|
|
24248
|
-
return
|
|
24492
|
+
return import_react46.default.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
24249
24493
|
if (time === timeToFocus) {
|
|
24250
24494
|
_this.centerLi = li;
|
|
24251
24495
|
}
|
|
@@ -24256,14 +24500,14 @@ var Time = (
|
|
|
24256
24500
|
};
|
|
24257
24501
|
_this.renderTimeCaption = function() {
|
|
24258
24502
|
if (_this.props.showTimeCaption === false) {
|
|
24259
|
-
return
|
|
24503
|
+
return import_react46.default.createElement(import_react46.default.Fragment, null);
|
|
24260
24504
|
}
|
|
24261
|
-
return
|
|
24505
|
+
return import_react46.default.createElement(
|
|
24262
24506
|
"div",
|
|
24263
24507
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
24264
24508
|
_this.header = header;
|
|
24265
24509
|
} },
|
|
24266
|
-
|
|
24510
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
24267
24511
|
);
|
|
24268
24512
|
};
|
|
24269
24513
|
return _this;
|
|
@@ -24310,17 +24554,17 @@ var Time = (
|
|
|
24310
24554
|
var _this = this;
|
|
24311
24555
|
var _a2;
|
|
24312
24556
|
var height = this.state.height;
|
|
24313
|
-
return
|
|
24557
|
+
return import_react46.default.createElement(
|
|
24314
24558
|
"div",
|
|
24315
24559
|
{ 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
24560
|
this.renderTimeCaption(),
|
|
24317
|
-
|
|
24561
|
+
import_react46.default.createElement(
|
|
24318
24562
|
"div",
|
|
24319
24563
|
{ className: "react-datepicker__time" },
|
|
24320
|
-
|
|
24564
|
+
import_react46.default.createElement(
|
|
24321
24565
|
"div",
|
|
24322
24566
|
{ className: "react-datepicker__time-box" },
|
|
24323
|
-
|
|
24567
|
+
import_react46.default.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
24324
24568
|
_this.list = list;
|
|
24325
24569
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
24326
24570
|
)
|
|
@@ -24331,7 +24575,7 @@ var Time = (
|
|
|
24331
24575
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
24332
24576
|
};
|
|
24333
24577
|
return Time2;
|
|
24334
|
-
}(
|
|
24578
|
+
}(import_react46.Component)
|
|
24335
24579
|
);
|
|
24336
24580
|
var VERTICAL_NAVIGATION_OFFSET = 3;
|
|
24337
24581
|
var Year = (
|
|
@@ -24341,7 +24585,7 @@ var Year = (
|
|
|
24341
24585
|
function Year2(props) {
|
|
24342
24586
|
var _this = _super.call(this, props) || this;
|
|
24343
24587
|
_this.YEAR_REFS = __spreadArray([], Array(_this.props.yearItemNumber), true).map(function() {
|
|
24344
|
-
return (0,
|
|
24588
|
+
return (0, import_react46.createRef)();
|
|
24345
24589
|
});
|
|
24346
24590
|
_this.isDisabled = function(date) {
|
|
24347
24591
|
return isDayDisabled(date, {
|
|
@@ -24578,7 +24822,7 @@ var Year = (
|
|
|
24578
24822
|
}
|
|
24579
24823
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
24580
24824
|
var _loop_1 = function(y4) {
|
|
24581
|
-
yearsList.push(
|
|
24825
|
+
yearsList.push(import_react46.default.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
24582
24826
|
_this.onYearClick(event, y4);
|
|
24583
24827
|
}, onKeyDown: function(event) {
|
|
24584
24828
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24600,14 +24844,14 @@ var Year = (
|
|
|
24600
24844
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
24601
24845
|
_loop_1(y3);
|
|
24602
24846
|
}
|
|
24603
|
-
return
|
|
24847
|
+
return import_react46.default.createElement(
|
|
24604
24848
|
"div",
|
|
24605
24849
|
{ className: "react-datepicker__year" },
|
|
24606
|
-
|
|
24850
|
+
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
24851
|
);
|
|
24608
24852
|
};
|
|
24609
24853
|
return Year2;
|
|
24610
|
-
}(
|
|
24854
|
+
}(import_react46.Component)
|
|
24611
24855
|
);
|
|
24612
24856
|
function generateYears(year, noOfYear, minDate, maxDate) {
|
|
24613
24857
|
var list = [];
|
|
@@ -24635,10 +24879,10 @@ var YearDropdownOptions = (
|
|
|
24635
24879
|
_this.renderOptions = function() {
|
|
24636
24880
|
var selectedYear = _this.props.year;
|
|
24637
24881
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
24638
|
-
return
|
|
24882
|
+
return import_react46.default.createElement(
|
|
24639
24883
|
"div",
|
|
24640
24884
|
{ 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 ?
|
|
24885
|
+
selectedYear === year ? import_react46.default.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
24642
24886
|
year
|
|
24643
24887
|
);
|
|
24644
24888
|
});
|
|
@@ -24647,19 +24891,19 @@ var YearDropdownOptions = (
|
|
|
24647
24891
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
24648
24892
|
return year === maxYear;
|
|
24649
24893
|
})) {
|
|
24650
|
-
options2.unshift(
|
|
24894
|
+
options2.unshift(import_react46.default.createElement(
|
|
24651
24895
|
"div",
|
|
24652
24896
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
24653
|
-
|
|
24897
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
24654
24898
|
));
|
|
24655
24899
|
}
|
|
24656
24900
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
24657
24901
|
return year === minYear;
|
|
24658
24902
|
})) {
|
|
24659
|
-
options2.push(
|
|
24903
|
+
options2.push(import_react46.default.createElement(
|
|
24660
24904
|
"div",
|
|
24661
24905
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
24662
|
-
|
|
24906
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
24663
24907
|
));
|
|
24664
24908
|
}
|
|
24665
24909
|
return options2;
|
|
@@ -24689,7 +24933,7 @@ var YearDropdownOptions = (
|
|
|
24689
24933
|
_this.state = {
|
|
24690
24934
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
24691
24935
|
};
|
|
24692
|
-
_this.dropdownRef = (0,
|
|
24936
|
+
_this.dropdownRef = (0, import_react46.createRef)();
|
|
24693
24937
|
return _this;
|
|
24694
24938
|
}
|
|
24695
24939
|
YearDropdownOptions2.prototype.componentDidMount = function() {
|
|
@@ -24707,10 +24951,10 @@ var YearDropdownOptions = (
|
|
|
24707
24951
|
"react-datepicker__year-dropdown": true,
|
|
24708
24952
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
24709
24953
|
});
|
|
24710
|
-
return
|
|
24954
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24711
24955
|
};
|
|
24712
24956
|
return YearDropdownOptions2;
|
|
24713
|
-
}(
|
|
24957
|
+
}(import_react46.Component)
|
|
24714
24958
|
);
|
|
24715
24959
|
var YearDropdown = (
|
|
24716
24960
|
/** @class */
|
|
@@ -24726,7 +24970,7 @@ var YearDropdown = (
|
|
|
24726
24970
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
24727
24971
|
var options2 = [];
|
|
24728
24972
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
24729
|
-
options2.push(
|
|
24973
|
+
options2.push(import_react46.default.createElement("option", { key: i3, value: i3 }, i3));
|
|
24730
24974
|
}
|
|
24731
24975
|
return options2;
|
|
24732
24976
|
};
|
|
@@ -24734,20 +24978,20 @@ var YearDropdown = (
|
|
|
24734
24978
|
_this.onChange(parseInt(event.target.value));
|
|
24735
24979
|
};
|
|
24736
24980
|
_this.renderSelectMode = function() {
|
|
24737
|
-
return
|
|
24981
|
+
return import_react46.default.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24738
24982
|
};
|
|
24739
24983
|
_this.renderReadView = function(visible) {
|
|
24740
|
-
return
|
|
24984
|
+
return import_react46.default.createElement(
|
|
24741
24985
|
"div",
|
|
24742
24986
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
24743
24987
|
return _this.toggleDropdown(event);
|
|
24744
24988
|
} },
|
|
24745
|
-
|
|
24746
|
-
|
|
24989
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24990
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
24747
24991
|
);
|
|
24748
24992
|
};
|
|
24749
24993
|
_this.renderDropdown = function() {
|
|
24750
|
-
return
|
|
24994
|
+
return import_react46.default.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24751
24995
|
};
|
|
24752
24996
|
_this.renderScrollMode = function() {
|
|
24753
24997
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24797,10 +25041,10 @@ var YearDropdown = (
|
|
|
24797
25041
|
renderedDropdown = this.renderSelectMode();
|
|
24798
25042
|
break;
|
|
24799
25043
|
}
|
|
24800
|
-
return
|
|
25044
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24801
25045
|
};
|
|
24802
25046
|
return YearDropdown2;
|
|
24803
|
-
}(
|
|
25047
|
+
}(import_react46.Component)
|
|
24804
25048
|
);
|
|
24805
25049
|
var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
24806
25050
|
"react-datepicker__year-select",
|
|
@@ -24971,13 +25215,13 @@ var Calendar = (
|
|
|
24971
25215
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24972
25216
|
var dayNames = [];
|
|
24973
25217
|
if (_this.props.showWeekNumbers) {
|
|
24974
|
-
dayNames.push(
|
|
25218
|
+
dayNames.push(import_react46.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24975
25219
|
}
|
|
24976
25220
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24977
25221
|
var day = addDays(startOfWeek2, offset4);
|
|
24978
25222
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24979
25223
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24980
|
-
return
|
|
25224
|
+
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
25225
|
}));
|
|
24982
25226
|
};
|
|
24983
25227
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -25046,10 +25290,10 @@ var Calendar = (
|
|
|
25046
25290
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25047
25291
|
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
25292
|
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
|
|
25293
|
+
return import_react46.default.createElement(
|
|
25050
25294
|
"button",
|
|
25051
25295
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
25052
|
-
|
|
25296
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
25053
25297
|
);
|
|
25054
25298
|
};
|
|
25055
25299
|
_this.increaseYear = function() {
|
|
@@ -25111,10 +25355,10 @@ var Calendar = (
|
|
|
25111
25355
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25112
25356
|
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
25357
|
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
|
|
25358
|
+
return import_react46.default.createElement(
|
|
25115
25359
|
"button",
|
|
25116
25360
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
25117
|
-
|
|
25361
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
25118
25362
|
);
|
|
25119
25363
|
};
|
|
25120
25364
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -25131,7 +25375,7 @@ var Calendar = (
|
|
|
25131
25375
|
if (_this.props.showMonthYearDropdown) {
|
|
25132
25376
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
25133
25377
|
}
|
|
25134
|
-
return
|
|
25378
|
+
return import_react46.default.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
25135
25379
|
};
|
|
25136
25380
|
_this.renderYearDropdown = function(overrideHide) {
|
|
25137
25381
|
if (overrideHide === void 0) {
|
|
@@ -25140,7 +25384,7 @@ var Calendar = (
|
|
|
25140
25384
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
25141
25385
|
return;
|
|
25142
25386
|
}
|
|
25143
|
-
return
|
|
25387
|
+
return import_react46.default.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
25144
25388
|
};
|
|
25145
25389
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
25146
25390
|
if (overrideHide === void 0) {
|
|
@@ -25149,7 +25393,7 @@ var Calendar = (
|
|
|
25149
25393
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
25150
25394
|
return;
|
|
25151
25395
|
}
|
|
25152
|
-
return
|
|
25396
|
+
return import_react46.default.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
25153
25397
|
};
|
|
25154
25398
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
25155
25399
|
if (overrideHide === void 0) {
|
|
@@ -25158,7 +25402,7 @@ var Calendar = (
|
|
|
25158
25402
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
25159
25403
|
return;
|
|
25160
25404
|
}
|
|
25161
|
-
return
|
|
25405
|
+
return import_react46.default.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
25162
25406
|
};
|
|
25163
25407
|
_this.handleTodayButtonClick = function(event) {
|
|
25164
25408
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -25168,22 +25412,22 @@ var Calendar = (
|
|
|
25168
25412
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
25169
25413
|
return;
|
|
25170
25414
|
}
|
|
25171
|
-
return
|
|
25415
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
25172
25416
|
};
|
|
25173
25417
|
_this.renderDefaultHeader = function(_a2) {
|
|
25174
25418
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
25175
|
-
return
|
|
25419
|
+
return import_react46.default.createElement(
|
|
25176
25420
|
"div",
|
|
25177
25421
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
25178
25422
|
_this.renderCurrentMonth(monthDate),
|
|
25179
|
-
|
|
25423
|
+
import_react46.default.createElement(
|
|
25180
25424
|
"div",
|
|
25181
25425
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
25182
25426
|
_this.renderMonthDropdown(i3 !== 0),
|
|
25183
25427
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
25184
25428
|
_this.renderYearDropdown(i3 !== 0)
|
|
25185
25429
|
),
|
|
25186
|
-
|
|
25430
|
+
import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25187
25431
|
);
|
|
25188
25432
|
};
|
|
25189
25433
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -25197,18 +25441,18 @@ var Calendar = (
|
|
|
25197
25441
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
25198
25442
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
25199
25443
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
25200
|
-
return
|
|
25444
|
+
return import_react46.default.createElement(
|
|
25201
25445
|
"div",
|
|
25202
25446
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
25203
25447
|
(_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 &&
|
|
25448
|
+
showDayNames && import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25205
25449
|
);
|
|
25206
25450
|
};
|
|
25207
25451
|
_this.renderYearHeader = function(_a2) {
|
|
25208
25452
|
var monthDate = _a2.monthDate;
|
|
25209
25453
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
25210
25454
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
25211
|
-
return
|
|
25455
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
25212
25456
|
};
|
|
25213
25457
|
_this.renderHeader = function(_a2) {
|
|
25214
25458
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -25238,13 +25482,13 @@ var Calendar = (
|
|
|
25238
25482
|
var monthKey = "month-".concat(i3);
|
|
25239
25483
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
25240
25484
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
25241
|
-
monthList.push(
|
|
25485
|
+
monthList.push(import_react46.default.createElement(
|
|
25242
25486
|
"div",
|
|
25243
25487
|
{ key: monthKey, ref: function(div) {
|
|
25244
25488
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
25245
25489
|
}, className: "react-datepicker__month-container" },
|
|
25246
25490
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
25247
|
-
|
|
25491
|
+
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
25492
|
));
|
|
25249
25493
|
}
|
|
25250
25494
|
return monthList;
|
|
@@ -25254,18 +25498,18 @@ var Calendar = (
|
|
|
25254
25498
|
return;
|
|
25255
25499
|
}
|
|
25256
25500
|
if (_this.props.showYearPicker) {
|
|
25257
|
-
return
|
|
25501
|
+
return import_react46.default.createElement(
|
|
25258
25502
|
"div",
|
|
25259
25503
|
{ className: "react-datepicker__year--container" },
|
|
25260
25504
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
25261
|
-
|
|
25505
|
+
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
25506
|
);
|
|
25263
25507
|
}
|
|
25264
25508
|
return;
|
|
25265
25509
|
};
|
|
25266
25510
|
_this.renderTimeSection = function() {
|
|
25267
25511
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
25268
|
-
return
|
|
25512
|
+
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
25513
|
}
|
|
25270
25514
|
return;
|
|
25271
25515
|
};
|
|
@@ -25274,7 +25518,7 @@ var Calendar = (
|
|
|
25274
25518
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
25275
25519
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
25276
25520
|
if (_this.props.showTimeInput) {
|
|
25277
|
-
return
|
|
25521
|
+
return import_react46.default.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
25278
25522
|
}
|
|
25279
25523
|
return;
|
|
25280
25524
|
};
|
|
@@ -25289,15 +25533,15 @@ var Calendar = (
|
|
|
25289
25533
|
} else {
|
|
25290
25534
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
25291
25535
|
}
|
|
25292
|
-
return
|
|
25536
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
25293
25537
|
};
|
|
25294
25538
|
_this.renderChildren = function() {
|
|
25295
25539
|
if (_this.props.children) {
|
|
25296
|
-
return
|
|
25540
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
25297
25541
|
}
|
|
25298
25542
|
return;
|
|
25299
25543
|
};
|
|
25300
|
-
_this.containerRef = (0,
|
|
25544
|
+
_this.containerRef = (0, import_react46.createRef)();
|
|
25301
25545
|
_this.state = {
|
|
25302
25546
|
date: _this.getDateInView(),
|
|
25303
25547
|
selectingDate: void 0,
|
|
@@ -25347,13 +25591,13 @@ var Calendar = (
|
|
|
25347
25591
|
};
|
|
25348
25592
|
Calendar2.prototype.render = function() {
|
|
25349
25593
|
var Container = this.props.container || CalendarContainer;
|
|
25350
|
-
return
|
|
25594
|
+
return import_react46.default.createElement(
|
|
25351
25595
|
ClickOutsideWrapper,
|
|
25352
25596
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
25353
|
-
|
|
25597
|
+
import_react46.default.createElement(
|
|
25354
25598
|
"div",
|
|
25355
25599
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
25356
|
-
|
|
25600
|
+
import_react46.default.createElement(
|
|
25357
25601
|
Container,
|
|
25358
25602
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
25359
25603
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -25372,17 +25616,17 @@ var Calendar = (
|
|
|
25372
25616
|
);
|
|
25373
25617
|
};
|
|
25374
25618
|
return Calendar2;
|
|
25375
|
-
}(
|
|
25619
|
+
}(import_react46.Component)
|
|
25376
25620
|
);
|
|
25377
25621
|
var CalendarIcon2 = function(_a2) {
|
|
25378
25622
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
25379
25623
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
25380
25624
|
if (typeof icon === "string") {
|
|
25381
|
-
return
|
|
25625
|
+
return import_react46.default.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
25382
25626
|
}
|
|
25383
|
-
if (
|
|
25627
|
+
if (import_react46.default.isValidElement(icon)) {
|
|
25384
25628
|
var iconElement_1 = icon;
|
|
25385
|
-
return
|
|
25629
|
+
return import_react46.default.cloneElement(iconElement_1, {
|
|
25386
25630
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
25387
25631
|
onClick: function(event) {
|
|
25388
25632
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -25394,10 +25638,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25394
25638
|
}
|
|
25395
25639
|
});
|
|
25396
25640
|
}
|
|
25397
|
-
return
|
|
25641
|
+
return import_react46.default.createElement(
|
|
25398
25642
|
"svg",
|
|
25399
25643
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
25400
|
-
|
|
25644
|
+
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
25645
|
);
|
|
25402
25646
|
};
|
|
25403
25647
|
var Portal = (
|
|
@@ -25428,7 +25672,7 @@ var Portal = (
|
|
|
25428
25672
|
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
25429
25673
|
};
|
|
25430
25674
|
return Portal2;
|
|
25431
|
-
}(
|
|
25675
|
+
}(import_react46.Component)
|
|
25432
25676
|
);
|
|
25433
25677
|
var focusableElementsSelector = "[tabindex], a, button, input, select, textarea";
|
|
25434
25678
|
var focusableFilter = function(node2) {
|
|
@@ -25455,7 +25699,7 @@ var TabLoop = (
|
|
|
25455
25699
|
var tabChildren = _this.getTabChildren();
|
|
25456
25700
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
25457
25701
|
};
|
|
25458
|
-
_this.tabLoopRef = (0,
|
|
25702
|
+
_this.tabLoopRef = (0, import_react46.createRef)();
|
|
25459
25703
|
return _this;
|
|
25460
25704
|
}
|
|
25461
25705
|
TabLoop2.prototype.render = function() {
|
|
@@ -25463,32 +25707,32 @@ var TabLoop = (
|
|
|
25463
25707
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
25464
25708
|
return this.props.children;
|
|
25465
25709
|
}
|
|
25466
|
-
return
|
|
25710
|
+
return import_react46.default.createElement(
|
|
25467
25711
|
"div",
|
|
25468
25712
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
25469
|
-
|
|
25713
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
25470
25714
|
this.props.children,
|
|
25471
|
-
|
|
25715
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
25472
25716
|
);
|
|
25473
25717
|
};
|
|
25474
25718
|
TabLoop2.defaultProps = {
|
|
25475
25719
|
enableTabLoop: true
|
|
25476
25720
|
};
|
|
25477
25721
|
return TabLoop2;
|
|
25478
|
-
}(
|
|
25722
|
+
}(import_react46.Component)
|
|
25479
25723
|
);
|
|
25480
25724
|
function withFloating(Component3) {
|
|
25481
25725
|
var WithFloating = function(props) {
|
|
25482
25726
|
var _a2;
|
|
25483
25727
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25484
|
-
var arrowRef = (0,
|
|
25728
|
+
var arrowRef = (0, import_react46.useRef)(null);
|
|
25485
25729
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25486
25730
|
flip3({ padding: 15 }),
|
|
25487
25731
|
offset3(10),
|
|
25488
25732
|
arrow3({ element: arrowRef })
|
|
25489
25733
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
25490
25734
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
25491
|
-
return
|
|
25735
|
+
return import_react46.default.createElement(Component3, _assign({}, componentProps));
|
|
25492
25736
|
};
|
|
25493
25737
|
return WithFloating;
|
|
25494
25738
|
}
|
|
@@ -25513,33 +25757,33 @@ var PopperComponent = (
|
|
|
25513
25757
|
var popper = void 0;
|
|
25514
25758
|
if (!hidePopper) {
|
|
25515
25759
|
var classes = clsx("react-datepicker-popper", className);
|
|
25516
|
-
popper =
|
|
25760
|
+
popper = import_react46.default.createElement(
|
|
25517
25761
|
TabLoop,
|
|
25518
25762
|
{ enableTabLoop },
|
|
25519
|
-
|
|
25763
|
+
import_react46.default.createElement(
|
|
25520
25764
|
"div",
|
|
25521
25765
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
25522
25766
|
popperComponent,
|
|
25523
|
-
showArrow &&
|
|
25767
|
+
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
25768
|
)
|
|
25525
25769
|
);
|
|
25526
25770
|
}
|
|
25527
25771
|
if (this.props.popperContainer) {
|
|
25528
|
-
popper = (0,
|
|
25772
|
+
popper = (0, import_react46.createElement)(this.props.popperContainer, {}, popper);
|
|
25529
25773
|
}
|
|
25530
25774
|
if (portalId && !hidePopper) {
|
|
25531
|
-
popper =
|
|
25775
|
+
popper = import_react46.default.createElement(Portal, { portalId, portalHost }, popper);
|
|
25532
25776
|
}
|
|
25533
25777
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
25534
|
-
return
|
|
25535
|
-
|
|
25778
|
+
return import_react46.default.createElement(
|
|
25779
|
+
import_react46.default.Fragment,
|
|
25536
25780
|
null,
|
|
25537
|
-
|
|
25781
|
+
import_react46.default.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
25538
25782
|
popper
|
|
25539
25783
|
);
|
|
25540
25784
|
};
|
|
25541
25785
|
return PopperComponent2;
|
|
25542
|
-
}(
|
|
25786
|
+
}(import_react46.Component)
|
|
25543
25787
|
);
|
|
25544
25788
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
25545
25789
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -26153,7 +26397,7 @@ var DatePicker = (
|
|
|
26153
26397
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
26154
26398
|
return null;
|
|
26155
26399
|
}
|
|
26156
|
-
return
|
|
26400
|
+
return import_react46.default.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
26157
26401
|
_this.calendar = elem;
|
|
26158
26402
|
} }, _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
26403
|
};
|
|
@@ -26189,13 +26433,13 @@ var DatePicker = (
|
|
|
26189
26433
|
}));
|
|
26190
26434
|
}
|
|
26191
26435
|
}
|
|
26192
|
-
return
|
|
26436
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
26193
26437
|
};
|
|
26194
26438
|
_this.renderDateInput = function() {
|
|
26195
26439
|
var _a2, _b;
|
|
26196
26440
|
var _c;
|
|
26197
26441
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
26198
|
-
var customInput = _this.props.customInput ||
|
|
26442
|
+
var customInput = _this.props.customInput || import_react46.default.createElement("input", { type: "text" });
|
|
26199
26443
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
26200
26444
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
26201
26445
|
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 +26452,14 @@ var DatePicker = (
|
|
|
26208
26452
|
dateFormat,
|
|
26209
26453
|
locale
|
|
26210
26454
|
});
|
|
26211
|
-
return (0,
|
|
26455
|
+
return (0, import_react46.cloneElement)(customInput, (_b = {}, _b[customInputRef] = function(input) {
|
|
26212
26456
|
_this.input = input;
|
|
26213
26457
|
}, _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
26458
|
};
|
|
26215
26459
|
_this.renderClearButton = function() {
|
|
26216
26460
|
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
26461
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
26218
|
-
return
|
|
26462
|
+
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
26463
|
} else {
|
|
26220
26464
|
return null;
|
|
26221
26465
|
}
|
|
@@ -26316,10 +26560,10 @@ var DatePicker = (
|
|
|
26316
26560
|
if (calendarIconClassname) {
|
|
26317
26561
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
26318
26562
|
}
|
|
26319
|
-
return
|
|
26563
|
+
return import_react46.default.createElement(
|
|
26320
26564
|
"div",
|
|
26321
26565
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
26322
|
-
showIcon &&
|
|
26566
|
+
showIcon && import_react46.default.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
26323
26567
|
onClick: this.toggleCalendar
|
|
26324
26568
|
} : null)),
|
|
26325
26569
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -26332,25 +26576,25 @@ var DatePicker = (
|
|
|
26332
26576
|
if (this.props.inline)
|
|
26333
26577
|
return calendar;
|
|
26334
26578
|
if (this.props.withPortal) {
|
|
26335
|
-
var portalContainer = this.state.open ?
|
|
26579
|
+
var portalContainer = this.state.open ? import_react46.default.createElement(
|
|
26336
26580
|
TabLoop,
|
|
26337
26581
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
26338
|
-
|
|
26582
|
+
import_react46.default.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
26339
26583
|
) : null;
|
|
26340
26584
|
if (this.state.open && this.props.portalId) {
|
|
26341
|
-
portalContainer =
|
|
26585
|
+
portalContainer = import_react46.default.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
26342
26586
|
}
|
|
26343
|
-
return
|
|
26587
|
+
return import_react46.default.createElement(
|
|
26344
26588
|
"div",
|
|
26345
26589
|
null,
|
|
26346
26590
|
this.renderInputContainer(),
|
|
26347
26591
|
portalContainer
|
|
26348
26592
|
);
|
|
26349
26593
|
}
|
|
26350
|
-
return
|
|
26594
|
+
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
26595
|
};
|
|
26352
26596
|
return DatePicker2;
|
|
26353
|
-
}(
|
|
26597
|
+
}(import_react46.Component)
|
|
26354
26598
|
);
|
|
26355
26599
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
26356
26600
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
@@ -26493,33 +26737,33 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26493
26737
|
}
|
|
26494
26738
|
|
|
26495
26739
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26496
|
-
var
|
|
26740
|
+
var import_react48 = require("react");
|
|
26497
26741
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26498
26742
|
function useStateManager(_ref3) {
|
|
26499
26743
|
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,
|
|
26744
|
+
var _useState = (0, import_react48.useState)(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26745
|
+
var _useState3 = (0, import_react48.useState)(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26746
|
+
var _useState5 = (0, import_react48.useState)(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26747
|
+
var onChange2 = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
26504
26748
|
if (typeof propsOnChange === "function") {
|
|
26505
26749
|
propsOnChange(value2, actionMeta);
|
|
26506
26750
|
}
|
|
26507
26751
|
setStateValue(value2);
|
|
26508
26752
|
}, [propsOnChange]);
|
|
26509
|
-
var onInputChange = (0,
|
|
26753
|
+
var onInputChange = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
26510
26754
|
var newValue;
|
|
26511
26755
|
if (typeof propsOnInputChange === "function") {
|
|
26512
26756
|
newValue = propsOnInputChange(value2, actionMeta);
|
|
26513
26757
|
}
|
|
26514
26758
|
setStateInputValue(newValue !== void 0 ? newValue : value2);
|
|
26515
26759
|
}, [propsOnInputChange]);
|
|
26516
|
-
var onMenuOpen = (0,
|
|
26760
|
+
var onMenuOpen = (0, import_react48.useCallback)(function() {
|
|
26517
26761
|
if (typeof propsOnMenuOpen === "function") {
|
|
26518
26762
|
propsOnMenuOpen();
|
|
26519
26763
|
}
|
|
26520
26764
|
setStateMenuIsOpen(true);
|
|
26521
26765
|
}, [propsOnMenuOpen]);
|
|
26522
|
-
var onMenuClose = (0,
|
|
26766
|
+
var onMenuClose = (0, import_react48.useCallback)(function() {
|
|
26523
26767
|
if (typeof propsOnMenuClose === "function") {
|
|
26524
26768
|
propsOnMenuClose();
|
|
26525
26769
|
}
|
|
@@ -26551,8 +26795,8 @@ function _extends() {
|
|
|
26551
26795
|
}
|
|
26552
26796
|
|
|
26553
26797
|
// node_modules/react-select/dist/react-select.esm.js
|
|
26554
|
-
var
|
|
26555
|
-
var
|
|
26798
|
+
var React15 = __toESM(require("react"));
|
|
26799
|
+
var import_react55 = require("react");
|
|
26556
26800
|
|
|
26557
26801
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
26558
26802
|
function _classCallCheck(a2, n4) {
|
|
@@ -26659,12 +26903,12 @@ function _toConsumableArray(r4) {
|
|
|
26659
26903
|
}
|
|
26660
26904
|
|
|
26661
26905
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26662
|
-
var
|
|
26663
|
-
var
|
|
26906
|
+
var React14 = __toESM(require("react"));
|
|
26907
|
+
var import_react53 = require("react");
|
|
26664
26908
|
|
|
26665
26909
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26666
|
-
var
|
|
26667
|
-
var
|
|
26910
|
+
var React12 = __toESM(require("react"));
|
|
26911
|
+
var import_react49 = require("react");
|
|
26668
26912
|
|
|
26669
26913
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
26670
26914
|
var isDevelopment = false;
|
|
@@ -27828,18 +28072,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27828
28072
|
}
|
|
27829
28073
|
|
|
27830
28074
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27831
|
-
var
|
|
28075
|
+
var React11 = __toESM(require("react"));
|
|
27832
28076
|
var isBrowser3 = typeof document !== "undefined";
|
|
27833
28077
|
var syncFallback = function syncFallback2(create) {
|
|
27834
28078
|
return create();
|
|
27835
28079
|
};
|
|
27836
|
-
var useInsertionEffect3 =
|
|
28080
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27837
28081
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27838
28082
|
|
|
27839
28083
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27840
28084
|
var isDevelopment3 = false;
|
|
27841
28085
|
var isBrowser4 = typeof document !== "undefined";
|
|
27842
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
28086
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27843
28087
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27844
28088
|
// because this module is primarily intended for the browser and node
|
|
27845
28089
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27852,20 +28096,20 @@ var EmotionCacheContext = /* @__PURE__ */ React11.createContext(
|
|
|
27852
28096
|
);
|
|
27853
28097
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
27854
28098
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
27855
|
-
return /* @__PURE__ */ (0,
|
|
27856
|
-
var cache = (0,
|
|
28099
|
+
return /* @__PURE__ */ (0, import_react49.forwardRef)(function(props, ref) {
|
|
28100
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27857
28101
|
return func(props, cache, ref);
|
|
27858
28102
|
});
|
|
27859
28103
|
};
|
|
27860
28104
|
if (!isBrowser4) {
|
|
27861
28105
|
withEmotionCache = function withEmotionCache3(func) {
|
|
27862
28106
|
return function(props) {
|
|
27863
|
-
var cache = (0,
|
|
28107
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27864
28108
|
if (cache === null) {
|
|
27865
28109
|
cache = createCache({
|
|
27866
28110
|
key: "css"
|
|
27867
28111
|
});
|
|
27868
|
-
return /* @__PURE__ */
|
|
28112
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27869
28113
|
value: cache
|
|
27870
28114
|
}, func(props, cache));
|
|
27871
28115
|
} else {
|
|
@@ -27874,7 +28118,7 @@ if (!isBrowser4) {
|
|
|
27874
28118
|
};
|
|
27875
28119
|
};
|
|
27876
28120
|
}
|
|
27877
|
-
var ThemeContext = /* @__PURE__ */
|
|
28121
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27878
28122
|
var hasOwn = {}.hasOwnProperty;
|
|
27879
28123
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27880
28124
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27901,7 +28145,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27901
28145
|
serializedNames += " " + next2.name;
|
|
27902
28146
|
next2 = next2.next;
|
|
27903
28147
|
}
|
|
27904
|
-
return /* @__PURE__ */
|
|
28148
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27905
28149
|
__html: rules
|
|
27906
28150
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27907
28151
|
}
|
|
@@ -27920,7 +28164,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27920
28164
|
} else if (props.className != null) {
|
|
27921
28165
|
className = props.className + " ";
|
|
27922
28166
|
}
|
|
27923
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
28167
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27924
28168
|
className += cache.key + "-" + serialized.name;
|
|
27925
28169
|
var newProps = {};
|
|
27926
28170
|
for (var _key2 in props) {
|
|
@@ -27932,22 +28176,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27932
28176
|
if (ref) {
|
|
27933
28177
|
newProps.ref = ref;
|
|
27934
28178
|
}
|
|
27935
|
-
return /* @__PURE__ */
|
|
28179
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27936
28180
|
cache,
|
|
27937
28181
|
serialized,
|
|
27938
28182
|
isStringTag: typeof WrappedComponent === "string"
|
|
27939
|
-
}), /* @__PURE__ */
|
|
28183
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27940
28184
|
});
|
|
27941
28185
|
var Emotion$1 = Emotion;
|
|
27942
28186
|
|
|
27943
28187
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27944
|
-
var
|
|
28188
|
+
var React13 = __toESM(require("react"));
|
|
27945
28189
|
var import_extends2 = __toESM(require_extends());
|
|
27946
28190
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27947
|
-
var
|
|
28191
|
+
var jsx86 = function jsx87(type, props) {
|
|
27948
28192
|
var args = arguments;
|
|
27949
28193
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27950
|
-
return
|
|
28194
|
+
return React13.createElement.apply(void 0, args);
|
|
27951
28195
|
}
|
|
27952
28196
|
var argsLength = args.length;
|
|
27953
28197
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27956,13 +28200,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27956
28200
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27957
28201
|
createElementArgArray[i3] = args[i3];
|
|
27958
28202
|
}
|
|
27959
|
-
return
|
|
28203
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27960
28204
|
};
|
|
27961
28205
|
(function(_jsx) {
|
|
27962
28206
|
var JSX;
|
|
27963
28207
|
/* @__PURE__ */ (function(_JSX) {
|
|
27964
28208
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27965
|
-
})(
|
|
28209
|
+
})(jsx86 || (jsx86 = {}));
|
|
27966
28210
|
function css() {
|
|
27967
28211
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27968
28212
|
args[_key] = arguments[_key];
|
|
@@ -27992,15 +28236,15 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27992
28236
|
}
|
|
27993
28237
|
|
|
27994
28238
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27995
|
-
var
|
|
28239
|
+
var import_react52 = require("react");
|
|
27996
28240
|
var import_react_dom6 = require("react-dom");
|
|
27997
28241
|
|
|
27998
28242
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27999
|
-
var
|
|
28243
|
+
var import_react50 = require("react");
|
|
28000
28244
|
var isClient3 = typeof document !== "undefined";
|
|
28001
28245
|
var noop6 = function noop7() {
|
|
28002
28246
|
};
|
|
28003
|
-
var index3 = isClient3 ?
|
|
28247
|
+
var index3 = isClient3 ? import_react50.useLayoutEffect : noop6;
|
|
28004
28248
|
|
|
28005
28249
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28006
28250
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
@@ -28334,13 +28578,13 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
28334
28578
|
marginTop: spacing2.menuGutter
|
|
28335
28579
|
});
|
|
28336
28580
|
};
|
|
28337
|
-
var PortalPlacementContext = /* @__PURE__ */ (0,
|
|
28581
|
+
var PortalPlacementContext = /* @__PURE__ */ (0, import_react52.createContext)(null);
|
|
28338
28582
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
28339
28583
|
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,
|
|
28584
|
+
var _ref3 = (0, import_react52.useContext)(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28585
|
+
var ref = (0, import_react52.useRef)(null);
|
|
28586
|
+
var _useState = (0, import_react52.useState)(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28587
|
+
var _useState3 = (0, import_react52.useState)(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28344
28588
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28345
28589
|
index3(function() {
|
|
28346
28590
|
var menuEl = ref.current;
|
|
@@ -28370,7 +28614,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28370
28614
|
};
|
|
28371
28615
|
var Menu = function Menu2(props) {
|
|
28372
28616
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28373
|
-
return
|
|
28617
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
28374
28618
|
menu: true
|
|
28375
28619
|
}), {
|
|
28376
28620
|
ref: innerRef
|
|
@@ -28392,7 +28636,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28392
28636
|
};
|
|
28393
28637
|
var MenuList = function MenuList2(props) {
|
|
28394
28638
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28395
|
-
return
|
|
28639
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28396
28640
|
"menu-list": true,
|
|
28397
28641
|
"menu-list--is-multi": isMulti
|
|
28398
28642
|
}), {
|
|
@@ -28412,7 +28656,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28412
28656
|
var loadingMessageCSS = noticeCSS;
|
|
28413
28657
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28414
28658
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28415
|
-
return
|
|
28659
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28416
28660
|
children,
|
|
28417
28661
|
innerProps
|
|
28418
28662
|
}), "noOptionsMessage", {
|
|
@@ -28422,7 +28666,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28422
28666
|
};
|
|
28423
28667
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28424
28668
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28425
|
-
return
|
|
28669
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28426
28670
|
children,
|
|
28427
28671
|
innerProps
|
|
28428
28672
|
}), "loadingMessage", {
|
|
@@ -28442,16 +28686,16 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
28442
28686
|
};
|
|
28443
28687
|
var MenuPortal = function MenuPortal2(props) {
|
|
28444
28688
|
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,
|
|
28689
|
+
var menuPortalRef = (0, import_react52.useRef)(null);
|
|
28690
|
+
var cleanupRef = (0, import_react52.useRef)(null);
|
|
28691
|
+
var _useState5 = (0, import_react52.useState)(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28692
|
+
var portalPlacementContext = (0, import_react52.useMemo)(function() {
|
|
28449
28693
|
return {
|
|
28450
28694
|
setPortalPlacement
|
|
28451
28695
|
};
|
|
28452
28696
|
}, []);
|
|
28453
|
-
var _useState7 = (0,
|
|
28454
|
-
var updateComputedPosition = (0,
|
|
28697
|
+
var _useState7 = (0, import_react52.useState)(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28698
|
+
var updateComputedPosition = (0, import_react52.useCallback)(function() {
|
|
28455
28699
|
if (!controlElement) return;
|
|
28456
28700
|
var rect = getBoundingClientObj(controlElement);
|
|
28457
28701
|
var scrollDistance = menuPosition === "fixed" ? 0 : window.pageYOffset;
|
|
@@ -28466,7 +28710,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28466
28710
|
index3(function() {
|
|
28467
28711
|
updateComputedPosition();
|
|
28468
28712
|
}, [updateComputedPosition]);
|
|
28469
|
-
var runAutoUpdate = (0,
|
|
28713
|
+
var runAutoUpdate = (0, import_react52.useCallback)(function() {
|
|
28470
28714
|
if (typeof cleanupRef.current === "function") {
|
|
28471
28715
|
cleanupRef.current();
|
|
28472
28716
|
cleanupRef.current = null;
|
|
@@ -28480,12 +28724,12 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28480
28724
|
index3(function() {
|
|
28481
28725
|
runAutoUpdate();
|
|
28482
28726
|
}, [runAutoUpdate]);
|
|
28483
|
-
var setMenuPortalElement = (0,
|
|
28727
|
+
var setMenuPortalElement = (0, import_react52.useCallback)(function(menuPortalElement) {
|
|
28484
28728
|
menuPortalRef.current = menuPortalElement;
|
|
28485
28729
|
runAutoUpdate();
|
|
28486
28730
|
}, [runAutoUpdate]);
|
|
28487
28731
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28488
|
-
var menuWrapper =
|
|
28732
|
+
var menuWrapper = jsx86("div", _extends({
|
|
28489
28733
|
ref: setMenuPortalElement
|
|
28490
28734
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28491
28735
|
offset: computedPosition.offset,
|
|
@@ -28494,7 +28738,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28494
28738
|
}), "menuPortal", {
|
|
28495
28739
|
"menu-portal": true
|
|
28496
28740
|
}), innerProps), children);
|
|
28497
|
-
return
|
|
28741
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
28498
28742
|
value: portalPlacementContext
|
|
28499
28743
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
28500
28744
|
};
|
|
@@ -28510,7 +28754,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28510
28754
|
};
|
|
28511
28755
|
var SelectContainer = function SelectContainer2(props) {
|
|
28512
28756
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28513
|
-
return
|
|
28757
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
28514
28758
|
"--is-disabled": isDisabled,
|
|
28515
28759
|
"--is-rtl": isRtl
|
|
28516
28760
|
}), innerProps), children);
|
|
@@ -28531,7 +28775,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28531
28775
|
};
|
|
28532
28776
|
var ValueContainer = function ValueContainer2(props) {
|
|
28533
28777
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28534
|
-
return
|
|
28778
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28535
28779
|
"value-container": true,
|
|
28536
28780
|
"value-container--is-multi": isMulti,
|
|
28537
28781
|
"value-container--has-value": hasValue
|
|
@@ -28547,7 +28791,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28547
28791
|
};
|
|
28548
28792
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28549
28793
|
var children = props.children, innerProps = props.innerProps;
|
|
28550
|
-
return
|
|
28794
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28551
28795
|
indicators: true
|
|
28552
28796
|
}), innerProps), children);
|
|
28553
28797
|
};
|
|
@@ -28568,7 +28812,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28568
28812
|
};
|
|
28569
28813
|
var Svg = function Svg2(_ref3) {
|
|
28570
28814
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28571
|
-
return
|
|
28815
|
+
return jsx86("svg", _extends({
|
|
28572
28816
|
height: size4,
|
|
28573
28817
|
width: size4,
|
|
28574
28818
|
viewBox: "0 0 20 20",
|
|
@@ -28578,16 +28822,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28578
28822
|
}, props));
|
|
28579
28823
|
};
|
|
28580
28824
|
var CrossIcon = function CrossIcon2(props) {
|
|
28581
|
-
return
|
|
28825
|
+
return jsx86(Svg, _extends({
|
|
28582
28826
|
size: 20
|
|
28583
|
-
}, props),
|
|
28827
|
+
}, props), jsx86("path", {
|
|
28584
28828
|
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
28829
|
}));
|
|
28586
28830
|
};
|
|
28587
28831
|
var DownChevron = function DownChevron2(props) {
|
|
28588
|
-
return
|
|
28832
|
+
return jsx86(Svg, _extends({
|
|
28589
28833
|
size: 20
|
|
28590
|
-
}, props),
|
|
28834
|
+
}, props), jsx86("path", {
|
|
28591
28835
|
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
28836
|
}));
|
|
28593
28837
|
};
|
|
@@ -28608,18 +28852,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28608
28852
|
var dropdownIndicatorCSS = baseCSS;
|
|
28609
28853
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28610
28854
|
var children = props.children, innerProps = props.innerProps;
|
|
28611
|
-
return
|
|
28855
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28612
28856
|
indicator: true,
|
|
28613
28857
|
"dropdown-indicator": true
|
|
28614
|
-
}), innerProps), children ||
|
|
28858
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
28615
28859
|
};
|
|
28616
28860
|
var clearIndicatorCSS = baseCSS;
|
|
28617
28861
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28618
28862
|
var children = props.children, innerProps = props.innerProps;
|
|
28619
|
-
return
|
|
28863
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28620
28864
|
indicator: true,
|
|
28621
28865
|
"clear-indicator": true
|
|
28622
|
-
}), innerProps), children ||
|
|
28866
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
28623
28867
|
};
|
|
28624
28868
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28625
28869
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28635,7 +28879,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28635
28879
|
};
|
|
28636
28880
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28637
28881
|
var innerProps = props.innerProps;
|
|
28638
|
-
return
|
|
28882
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28639
28883
|
"indicator-separator": true
|
|
28640
28884
|
})));
|
|
28641
28885
|
};
|
|
@@ -28659,7 +28903,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28659
28903
|
};
|
|
28660
28904
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28661
28905
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28662
|
-
return
|
|
28906
|
+
return jsx86("span", {
|
|
28663
28907
|
css: /* @__PURE__ */ css({
|
|
28664
28908
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28665
28909
|
backgroundColor: "currentColor",
|
|
@@ -28674,20 +28918,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28674
28918
|
};
|
|
28675
28919
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28676
28920
|
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
|
|
28921
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28678
28922
|
innerProps,
|
|
28679
28923
|
isRtl,
|
|
28680
28924
|
size: size4
|
|
28681
28925
|
}), "loadingIndicator", {
|
|
28682
28926
|
indicator: true,
|
|
28683
28927
|
"loading-indicator": true
|
|
28684
|
-
}), innerProps),
|
|
28928
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
28685
28929
|
delay: 0,
|
|
28686
28930
|
offset: isRtl
|
|
28687
|
-
}),
|
|
28931
|
+
}), jsx86(LoadingDot, {
|
|
28688
28932
|
delay: 160,
|
|
28689
28933
|
offset: true
|
|
28690
|
-
}),
|
|
28934
|
+
}), jsx86(LoadingDot, {
|
|
28691
28935
|
delay: 320,
|
|
28692
28936
|
offset: !isRtl
|
|
28693
28937
|
}));
|
|
@@ -28719,7 +28963,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28719
28963
|
};
|
|
28720
28964
|
var Control = function Control2(props) {
|
|
28721
28965
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28722
|
-
return
|
|
28966
|
+
return jsx86("div", _extends({
|
|
28723
28967
|
ref: innerRef
|
|
28724
28968
|
}, getStyleProps(props, "control", {
|
|
28725
28969
|
control: true,
|
|
@@ -28741,15 +28985,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28741
28985
|
};
|
|
28742
28986
|
var Group = function Group2(props) {
|
|
28743
28987
|
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
|
|
28988
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
28745
28989
|
group: true
|
|
28746
|
-
}), innerProps),
|
|
28990
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
28747
28991
|
selectProps,
|
|
28748
28992
|
theme,
|
|
28749
28993
|
getStyles,
|
|
28750
28994
|
getClassNames,
|
|
28751
28995
|
cx
|
|
28752
|
-
}), label),
|
|
28996
|
+
}), label), jsx86("div", null, children));
|
|
28753
28997
|
};
|
|
28754
28998
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28755
28999
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28771,7 +29015,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28771
29015
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28772
29016
|
_cleanCommonProps.data;
|
|
28773
29017
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28774
|
-
return
|
|
29018
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28775
29019
|
"group-heading": true
|
|
28776
29020
|
}), innerProps));
|
|
28777
29021
|
};
|
|
@@ -28823,11 +29067,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28823
29067
|
var Input = function Input2(props) {
|
|
28824
29068
|
var cx = props.cx, value = props.value;
|
|
28825
29069
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28826
|
-
return
|
|
29070
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28827
29071
|
"input-container": true
|
|
28828
29072
|
}), {
|
|
28829
29073
|
"data-value": value || ""
|
|
28830
|
-
}),
|
|
29074
|
+
}), jsx86("input", _extends({
|
|
28831
29075
|
className: cx({
|
|
28832
29076
|
input: true
|
|
28833
29077
|
}, inputClassName),
|
|
@@ -28881,35 +29125,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28881
29125
|
};
|
|
28882
29126
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28883
29127
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28884
|
-
return
|
|
29128
|
+
return jsx86("div", innerProps, children);
|
|
28885
29129
|
};
|
|
28886
29130
|
var MultiValueContainer = MultiValueGeneric;
|
|
28887
29131
|
var MultiValueLabel = MultiValueGeneric;
|
|
28888
29132
|
function MultiValueRemove(_ref5) {
|
|
28889
29133
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28890
|
-
return
|
|
29134
|
+
return jsx86("div", _extends({
|
|
28891
29135
|
role: "button"
|
|
28892
|
-
}, innerProps), children ||
|
|
29136
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28893
29137
|
size: 14
|
|
28894
29138
|
}));
|
|
28895
29139
|
}
|
|
28896
29140
|
var MultiValue = function MultiValue2(props) {
|
|
28897
29141
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28898
29142
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28899
|
-
return
|
|
29143
|
+
return jsx86(Container, {
|
|
28900
29144
|
data,
|
|
28901
29145
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28902
29146
|
"multi-value": true,
|
|
28903
29147
|
"multi-value--is-disabled": isDisabled
|
|
28904
29148
|
})), innerProps),
|
|
28905
29149
|
selectProps
|
|
28906
|
-
},
|
|
29150
|
+
}, jsx86(Label, {
|
|
28907
29151
|
data,
|
|
28908
29152
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28909
29153
|
"multi-value__label": true
|
|
28910
29154
|
})),
|
|
28911
29155
|
selectProps
|
|
28912
|
-
}, children),
|
|
29156
|
+
}, children), jsx86(Remove, {
|
|
28913
29157
|
data,
|
|
28914
29158
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28915
29159
|
"multi-value__remove": true
|
|
@@ -28942,7 +29186,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28942
29186
|
};
|
|
28943
29187
|
var Option = function Option2(props) {
|
|
28944
29188
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28945
|
-
return
|
|
29189
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28946
29190
|
option: true,
|
|
28947
29191
|
"option--is-disabled": isDisabled,
|
|
28948
29192
|
"option--is-focused": isFocused,
|
|
@@ -28966,7 +29210,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28966
29210
|
};
|
|
28967
29211
|
var Placeholder = function Placeholder2(props) {
|
|
28968
29212
|
var children = props.children, innerProps = props.innerProps;
|
|
28969
|
-
return
|
|
29213
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28970
29214
|
placeholder: true
|
|
28971
29215
|
}), innerProps), children);
|
|
28972
29216
|
};
|
|
@@ -28988,7 +29232,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28988
29232
|
};
|
|
28989
29233
|
var SingleValue = function SingleValue2(props) {
|
|
28990
29234
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28991
|
-
return
|
|
29235
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28992
29236
|
"single-value": true,
|
|
28993
29237
|
"single-value--is-disabled": isDisabled
|
|
28994
29238
|
}), innerProps), children);
|
|
@@ -29090,7 +29334,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29090
29334
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
29091
29335
|
};
|
|
29092
29336
|
var A11yText = function A11yText2(props) {
|
|
29093
|
-
return
|
|
29337
|
+
return jsx86("span", _extends({
|
|
29094
29338
|
css: _ref
|
|
29095
29339
|
}, props));
|
|
29096
29340
|
};
|
|
@@ -29151,10 +29395,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29151
29395
|
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
29396
|
var ariaLabel = selectProps["aria-label"];
|
|
29153
29397
|
var ariaLive = selectProps["aria-live"];
|
|
29154
|
-
var messages = (0,
|
|
29398
|
+
var messages = (0, import_react53.useMemo)(function() {
|
|
29155
29399
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
29156
29400
|
}, [ariaLiveMessages]);
|
|
29157
|
-
var ariaSelected = (0,
|
|
29401
|
+
var ariaSelected = (0, import_react53.useMemo)(function() {
|
|
29158
29402
|
var message2 = "";
|
|
29159
29403
|
if (ariaSelection && messages.onChange) {
|
|
29160
29404
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -29176,7 +29420,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29176
29420
|
}
|
|
29177
29421
|
return message2;
|
|
29178
29422
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
29179
|
-
var ariaFocused = (0,
|
|
29423
|
+
var ariaFocused = (0, import_react53.useMemo)(function() {
|
|
29180
29424
|
var focusMsg = "";
|
|
29181
29425
|
var focused = focusedOption || focusedValue;
|
|
29182
29426
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -29195,7 +29439,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29195
29439
|
}
|
|
29196
29440
|
return focusMsg;
|
|
29197
29441
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
29198
|
-
var ariaResults = (0,
|
|
29442
|
+
var ariaResults = (0, import_react53.useMemo)(function() {
|
|
29199
29443
|
var resultsMsg = "";
|
|
29200
29444
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
29201
29445
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -29209,7 +29453,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29209
29453
|
return resultsMsg;
|
|
29210
29454
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
29211
29455
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
29212
|
-
var ariaGuidance = (0,
|
|
29456
|
+
var ariaGuidance = (0, import_react53.useMemo)(function() {
|
|
29213
29457
|
var guidanceMsg = "";
|
|
29214
29458
|
if (messages.guidance) {
|
|
29215
29459
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -29225,18 +29469,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29225
29469
|
}
|
|
29226
29470
|
return guidanceMsg;
|
|
29227
29471
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29228
|
-
var ScreenReaderText =
|
|
29472
|
+
var ScreenReaderText = jsx86(import_react53.Fragment, null, jsx86("span", {
|
|
29229
29473
|
id: "aria-selection"
|
|
29230
|
-
}, ariaSelected),
|
|
29474
|
+
}, ariaSelected), jsx86("span", {
|
|
29231
29475
|
id: "aria-focused"
|
|
29232
|
-
}, ariaFocused),
|
|
29476
|
+
}, ariaFocused), jsx86("span", {
|
|
29233
29477
|
id: "aria-results"
|
|
29234
|
-
}, ariaResults),
|
|
29478
|
+
}, ariaResults), jsx86("span", {
|
|
29235
29479
|
id: "aria-guidance"
|
|
29236
29480
|
}, ariaGuidance));
|
|
29237
|
-
return
|
|
29481
|
+
return jsx86(import_react53.Fragment, null, jsx86(A11yText$1, {
|
|
29238
29482
|
id
|
|
29239
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29483
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
29240
29484
|
"aria-live": ariaLive,
|
|
29241
29485
|
"aria-atomic": "false",
|
|
29242
29486
|
"aria-relevant": "additions text",
|
|
@@ -29549,7 +29793,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29549
29793
|
function DummyInput(_ref3) {
|
|
29550
29794
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29551
29795
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29552
|
-
return
|
|
29796
|
+
return jsx86("input", _extends({
|
|
29553
29797
|
ref: innerRef
|
|
29554
29798
|
}, filteredProps, {
|
|
29555
29799
|
css: /* @__PURE__ */ css({
|
|
@@ -29581,11 +29825,11 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29581
29825
|
};
|
|
29582
29826
|
function useScrollCapture(_ref3) {
|
|
29583
29827
|
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,
|
|
29828
|
+
var isBottom = (0, import_react53.useRef)(false);
|
|
29829
|
+
var isTop = (0, import_react53.useRef)(false);
|
|
29830
|
+
var touchStart = (0, import_react53.useRef)(0);
|
|
29831
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29832
|
+
var handleEventDelta = (0, import_react53.useCallback)(function(event, delta) {
|
|
29589
29833
|
if (scrollTarget.current === null) return;
|
|
29590
29834
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
29591
29835
|
var target = scrollTarget.current;
|
|
@@ -29619,17 +29863,17 @@ function useScrollCapture(_ref3) {
|
|
|
29619
29863
|
cancelScroll(event);
|
|
29620
29864
|
}
|
|
29621
29865
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
29622
|
-
var onWheel = (0,
|
|
29866
|
+
var onWheel = (0, import_react53.useCallback)(function(event) {
|
|
29623
29867
|
handleEventDelta(event, event.deltaY);
|
|
29624
29868
|
}, [handleEventDelta]);
|
|
29625
|
-
var onTouchStart = (0,
|
|
29869
|
+
var onTouchStart = (0, import_react53.useCallback)(function(event) {
|
|
29626
29870
|
touchStart.current = event.changedTouches[0].clientY;
|
|
29627
29871
|
}, []);
|
|
29628
|
-
var onTouchMove = (0,
|
|
29872
|
+
var onTouchMove = (0, import_react53.useCallback)(function(event) {
|
|
29629
29873
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
29630
29874
|
handleEventDelta(event, deltaY);
|
|
29631
29875
|
}, [handleEventDelta]);
|
|
29632
|
-
var startListening = (0,
|
|
29876
|
+
var startListening = (0, import_react53.useCallback)(function(el) {
|
|
29633
29877
|
if (!el) return;
|
|
29634
29878
|
var notPassive = supportsPassiveEvents ? {
|
|
29635
29879
|
passive: false
|
|
@@ -29638,13 +29882,13 @@ function useScrollCapture(_ref3) {
|
|
|
29638
29882
|
el.addEventListener("touchstart", onTouchStart, notPassive);
|
|
29639
29883
|
el.addEventListener("touchmove", onTouchMove, notPassive);
|
|
29640
29884
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29641
|
-
var stopListening = (0,
|
|
29885
|
+
var stopListening = (0, import_react53.useCallback)(function(el) {
|
|
29642
29886
|
if (!el) return;
|
|
29643
29887
|
el.removeEventListener("wheel", onWheel, false);
|
|
29644
29888
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29645
29889
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29646
29890
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29647
|
-
(0,
|
|
29891
|
+
(0, import_react53.useEffect)(function() {
|
|
29648
29892
|
if (!isEnabled) return;
|
|
29649
29893
|
var element = scrollTarget.current;
|
|
29650
29894
|
startListening(element);
|
|
@@ -29691,9 +29935,9 @@ var listenerOptions = {
|
|
|
29691
29935
|
};
|
|
29692
29936
|
function useScrollLock(_ref3) {
|
|
29693
29937
|
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,
|
|
29938
|
+
var originalStyles = (0, import_react53.useRef)({});
|
|
29939
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29940
|
+
var addScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
29697
29941
|
if (!canUseDOM) return;
|
|
29698
29942
|
var target = document.body;
|
|
29699
29943
|
var targetStyle = target && target.style;
|
|
@@ -29726,7 +29970,7 @@ function useScrollLock(_ref3) {
|
|
|
29726
29970
|
}
|
|
29727
29971
|
activeScrollLocks += 1;
|
|
29728
29972
|
}, [accountForScrollbars]);
|
|
29729
|
-
var removeScrollLock = (0,
|
|
29973
|
+
var removeScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
29730
29974
|
if (!canUseDOM) return;
|
|
29731
29975
|
var target = document.body;
|
|
29732
29976
|
var targetStyle = target && target.style;
|
|
@@ -29747,7 +29991,7 @@ function useScrollLock(_ref3) {
|
|
|
29747
29991
|
}
|
|
29748
29992
|
}
|
|
29749
29993
|
}, [accountForScrollbars]);
|
|
29750
|
-
(0,
|
|
29994
|
+
(0, import_react53.useEffect)(function() {
|
|
29751
29995
|
if (!isEnabled) return;
|
|
29752
29996
|
var element = scrollTarget.current;
|
|
29753
29997
|
addScrollLock(element);
|
|
@@ -29791,7 +30035,7 @@ function ScrollManager(_ref3) {
|
|
|
29791
30035
|
setScrollCaptureTarget(element);
|
|
29792
30036
|
setScrollLockTarget(element);
|
|
29793
30037
|
};
|
|
29794
|
-
return
|
|
30038
|
+
return jsx86(import_react53.Fragment, null, lockEnabled && jsx86("div", {
|
|
29795
30039
|
onClick: blurSelectInput,
|
|
29796
30040
|
css: _ref2$1
|
|
29797
30041
|
}), children(targetRef));
|
|
@@ -29810,7 +30054,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29810
30054
|
};
|
|
29811
30055
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29812
30056
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29813
|
-
return
|
|
30057
|
+
return jsx86("input", {
|
|
29814
30058
|
required: true,
|
|
29815
30059
|
name: name2,
|
|
29816
30060
|
tabIndex: -1,
|
|
@@ -30951,7 +31195,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30951
31195
|
"aria-describedby": this.getElementId("placeholder")
|
|
30952
31196
|
});
|
|
30953
31197
|
if (!isSearchable) {
|
|
30954
|
-
return /* @__PURE__ */
|
|
31198
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30955
31199
|
id,
|
|
30956
31200
|
innerRef: this.getInputRef,
|
|
30957
31201
|
onBlur: this.onInputBlur,
|
|
@@ -30964,7 +31208,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30964
31208
|
value: ""
|
|
30965
31209
|
}, ariaAttributes));
|
|
30966
31210
|
}
|
|
30967
|
-
return /* @__PURE__ */
|
|
31211
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30968
31212
|
autoCapitalize: "none",
|
|
30969
31213
|
autoComplete: "off",
|
|
30970
31214
|
autoCorrect: "off",
|
|
@@ -30992,7 +31236,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30992
31236
|
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
31237
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30994
31238
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30995
|
-
return inputValue ? null : /* @__PURE__ */
|
|
31239
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30996
31240
|
key: "placeholder",
|
|
30997
31241
|
isDisabled,
|
|
30998
31242
|
isFocused,
|
|
@@ -31005,7 +31249,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31005
31249
|
return selectValue.map(function(opt, index4) {
|
|
31006
31250
|
var isOptionFocused = opt === focusedValue;
|
|
31007
31251
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
31008
|
-
return /* @__PURE__ */
|
|
31252
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
31009
31253
|
components: {
|
|
31010
31254
|
Container: MultiValueContainer2,
|
|
31011
31255
|
Label: MultiValueLabel2,
|
|
@@ -31034,7 +31278,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31034
31278
|
return null;
|
|
31035
31279
|
}
|
|
31036
31280
|
var singleValue = selectValue[0];
|
|
31037
|
-
return /* @__PURE__ */
|
|
31281
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
31038
31282
|
data: singleValue,
|
|
31039
31283
|
isDisabled
|
|
31040
31284
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -31054,7 +31298,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31054
31298
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
31055
31299
|
"aria-hidden": "true"
|
|
31056
31300
|
};
|
|
31057
|
-
return /* @__PURE__ */
|
|
31301
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
31058
31302
|
innerProps,
|
|
31059
31303
|
isFocused
|
|
31060
31304
|
}));
|
|
@@ -31070,7 +31314,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31070
31314
|
var innerProps = {
|
|
31071
31315
|
"aria-hidden": "true"
|
|
31072
31316
|
};
|
|
31073
|
-
return /* @__PURE__ */
|
|
31317
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
31074
31318
|
innerProps,
|
|
31075
31319
|
isDisabled,
|
|
31076
31320
|
isFocused
|
|
@@ -31084,7 +31328,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31084
31328
|
var commonProps = this.commonProps;
|
|
31085
31329
|
var isDisabled = this.props.isDisabled;
|
|
31086
31330
|
var isFocused = this.state.isFocused;
|
|
31087
|
-
return /* @__PURE__ */
|
|
31331
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
31088
31332
|
isDisabled,
|
|
31089
31333
|
isFocused
|
|
31090
31334
|
}));
|
|
@@ -31102,7 +31346,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31102
31346
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
31103
31347
|
"aria-hidden": "true"
|
|
31104
31348
|
};
|
|
31105
|
-
return /* @__PURE__ */
|
|
31349
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
31106
31350
|
innerProps,
|
|
31107
31351
|
isDisabled,
|
|
31108
31352
|
isFocused
|
|
@@ -31137,7 +31381,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31137
31381
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
31138
31382
|
// is not supported on Apple devices
|
|
31139
31383
|
};
|
|
31140
|
-
return /* @__PURE__ */
|
|
31384
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
31141
31385
|
innerProps,
|
|
31142
31386
|
data,
|
|
31143
31387
|
isDisabled,
|
|
@@ -31157,7 +31401,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31157
31401
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
31158
31402
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
31159
31403
|
var headingId = "".concat(groupId, "-heading");
|
|
31160
|
-
return /* @__PURE__ */
|
|
31404
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
31161
31405
|
key: groupId,
|
|
31162
31406
|
data: _data,
|
|
31163
31407
|
options: options2,
|
|
@@ -31179,13 +31423,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31179
31423
|
inputValue
|
|
31180
31424
|
});
|
|
31181
31425
|
if (message2 === null) return null;
|
|
31182
|
-
menuUI = /* @__PURE__ */
|
|
31426
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
31183
31427
|
} else {
|
|
31184
31428
|
var _message = noOptionsMessage2({
|
|
31185
31429
|
inputValue
|
|
31186
31430
|
});
|
|
31187
31431
|
if (_message === null) return null;
|
|
31188
|
-
menuUI = /* @__PURE__ */
|
|
31432
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
31189
31433
|
}
|
|
31190
31434
|
var menuPlacementProps = {
|
|
31191
31435
|
minMenuHeight,
|
|
@@ -31194,9 +31438,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31194
31438
|
menuPosition,
|
|
31195
31439
|
menuShouldScrollIntoView
|
|
31196
31440
|
};
|
|
31197
|
-
var menuElement = /* @__PURE__ */
|
|
31441
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
31198
31442
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
31199
|
-
return /* @__PURE__ */
|
|
31443
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
31200
31444
|
innerRef: ref,
|
|
31201
31445
|
innerProps: {
|
|
31202
31446
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -31204,13 +31448,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31204
31448
|
},
|
|
31205
31449
|
isLoading,
|
|
31206
31450
|
placement
|
|
31207
|
-
}), /* @__PURE__ */
|
|
31451
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
31208
31452
|
captureEnabled: captureMenuScroll,
|
|
31209
31453
|
onTopArrive: onMenuScrollToTop,
|
|
31210
31454
|
onBottomArrive: onMenuScrollToBottom,
|
|
31211
31455
|
lockEnabled: menuShouldBlockScroll
|
|
31212
31456
|
}, function(scrollTargetRef) {
|
|
31213
|
-
return /* @__PURE__ */
|
|
31457
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
31214
31458
|
innerRef: function innerRef(instance2) {
|
|
31215
31459
|
_this4.getMenuListRef(instance2);
|
|
31216
31460
|
scrollTargetRef(instance2);
|
|
@@ -31226,7 +31470,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31226
31470
|
}), menuUI);
|
|
31227
31471
|
}));
|
|
31228
31472
|
});
|
|
31229
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
31473
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
31230
31474
|
appendTo: menuPortalTarget,
|
|
31231
31475
|
controlElement: this.controlRef,
|
|
31232
31476
|
menuPlacement,
|
|
@@ -31240,7 +31484,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31240
31484
|
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
31485
|
var selectValue = this.state.selectValue;
|
|
31242
31486
|
if (required && !this.hasValue() && !isDisabled) {
|
|
31243
|
-
return /* @__PURE__ */
|
|
31487
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
31244
31488
|
name: name2,
|
|
31245
31489
|
onFocus: this.onValueInputFocus
|
|
31246
31490
|
});
|
|
@@ -31251,29 +31495,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31251
31495
|
var value = selectValue.map(function(opt) {
|
|
31252
31496
|
return _this5.getOptionValue(opt);
|
|
31253
31497
|
}).join(delimiter2);
|
|
31254
|
-
return /* @__PURE__ */
|
|
31498
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31255
31499
|
name: name2,
|
|
31256
31500
|
type: "hidden",
|
|
31257
31501
|
value
|
|
31258
31502
|
});
|
|
31259
31503
|
} else {
|
|
31260
31504
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
31261
|
-
return /* @__PURE__ */
|
|
31505
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31262
31506
|
key: "i-".concat(i3),
|
|
31263
31507
|
name: name2,
|
|
31264
31508
|
type: "hidden",
|
|
31265
31509
|
value: _this5.getOptionValue(opt)
|
|
31266
31510
|
});
|
|
31267
|
-
}) : /* @__PURE__ */
|
|
31511
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
31268
31512
|
name: name2,
|
|
31269
31513
|
type: "hidden",
|
|
31270
31514
|
value: ""
|
|
31271
31515
|
});
|
|
31272
|
-
return /* @__PURE__ */
|
|
31516
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
31273
31517
|
}
|
|
31274
31518
|
} else {
|
|
31275
31519
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
31276
|
-
return /* @__PURE__ */
|
|
31520
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31277
31521
|
name: name2,
|
|
31278
31522
|
type: "hidden",
|
|
31279
31523
|
value: _value
|
|
@@ -31286,7 +31530,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31286
31530
|
var commonProps = this.commonProps;
|
|
31287
31531
|
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
31532
|
var focusableOptions = this.getFocusableOptions();
|
|
31289
|
-
return /* @__PURE__ */
|
|
31533
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
31290
31534
|
id: this.getElementId("live-region"),
|
|
31291
31535
|
ariaSelection,
|
|
31292
31536
|
focusedOption,
|
|
@@ -31304,7 +31548,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31304
31548
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
31305
31549
|
var isFocused = this.state.isFocused;
|
|
31306
31550
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
31307
|
-
return /* @__PURE__ */
|
|
31551
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
31308
31552
|
className,
|
|
31309
31553
|
innerProps: {
|
|
31310
31554
|
id,
|
|
@@ -31312,7 +31556,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31312
31556
|
},
|
|
31313
31557
|
isDisabled,
|
|
31314
31558
|
isFocused
|
|
31315
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
31559
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
31316
31560
|
innerRef: this.getControlRef,
|
|
31317
31561
|
innerProps: {
|
|
31318
31562
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -31321,9 +31565,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31321
31565
|
isDisabled,
|
|
31322
31566
|
isFocused,
|
|
31323
31567
|
menuIsOpen
|
|
31324
|
-
}), /* @__PURE__ */
|
|
31568
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
31325
31569
|
isDisabled
|
|
31326
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
31570
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
31327
31571
|
isDisabled
|
|
31328
31572
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
31329
31573
|
}
|
|
@@ -31374,7 +31618,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31374
31618
|
}
|
|
31375
31619
|
}]);
|
|
31376
31620
|
return Select2;
|
|
31377
|
-
}(
|
|
31621
|
+
}(import_react53.Component);
|
|
31378
31622
|
Select.defaultProps = defaultProps;
|
|
31379
31623
|
|
|
31380
31624
|
// node_modules/react-select/dist/react-select.esm.js
|
|
@@ -31390,9 +31634,9 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
31390
31634
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
31391
31635
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
31392
31636
|
var import_react_dom7 = require("react-dom");
|
|
31393
|
-
var StateManagedSelect = /* @__PURE__ */ (0,
|
|
31637
|
+
var StateManagedSelect = /* @__PURE__ */ (0, import_react55.forwardRef)(function(props, ref) {
|
|
31394
31638
|
var baseSelectProps = useStateManager(props);
|
|
31395
|
-
return /* @__PURE__ */
|
|
31639
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
31396
31640
|
ref
|
|
31397
31641
|
}, baseSelectProps));
|
|
31398
31642
|
});
|
|
@@ -31400,7 +31644,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31400
31644
|
|
|
31401
31645
|
// src/widgets/basic/date-field/date.tsx
|
|
31402
31646
|
var import_moment2 = __toESM(require_moment());
|
|
31403
|
-
var
|
|
31647
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
31404
31648
|
var DateField = (props) => {
|
|
31405
31649
|
const {
|
|
31406
31650
|
name: name2,
|
|
@@ -31427,9 +31671,9 @@ var DateField = (props) => {
|
|
|
31427
31671
|
context
|
|
31428
31672
|
} = props;
|
|
31429
31673
|
const { t: t3 } = useI18n();
|
|
31430
|
-
const InputDateCustom = (0,
|
|
31431
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
31432
|
-
/* @__PURE__ */ (0,
|
|
31674
|
+
const InputDateCustom = (0, import_react56.forwardRef)(
|
|
31675
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("label", { className: `flex ${className}`, children: [
|
|
31676
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31433
31677
|
"input",
|
|
31434
31678
|
{
|
|
31435
31679
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31443,13 +31687,13 @@ var DateField = (props) => {
|
|
|
31443
31687
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31444
31688
|
}
|
|
31445
31689
|
),
|
|
31446
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
31690
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CalendarIcon, {})
|
|
31447
31691
|
] })
|
|
31448
31692
|
);
|
|
31449
31693
|
if (!isForm && !isEditTable) {
|
|
31450
|
-
return /* @__PURE__ */ (0,
|
|
31694
|
+
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
31695
|
} else {
|
|
31452
|
-
return /* @__PURE__ */ (0,
|
|
31696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31453
31697
|
Controller,
|
|
31454
31698
|
{
|
|
31455
31699
|
name: name2 || "",
|
|
@@ -31465,14 +31709,14 @@ var DateField = (props) => {
|
|
|
31465
31709
|
},
|
|
31466
31710
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31467
31711
|
const { setError, clearErrors } = methods;
|
|
31468
|
-
(0,
|
|
31712
|
+
(0, import_react56.useEffect)(() => {
|
|
31469
31713
|
if (value) {
|
|
31470
31714
|
clearErrors(name2);
|
|
31471
31715
|
}
|
|
31472
31716
|
}, [value, clearErrors, name2]);
|
|
31473
31717
|
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,
|
|
31718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
31719
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31476
31720
|
DatePicker,
|
|
31477
31721
|
{
|
|
31478
31722
|
selected: selectedDate,
|
|
@@ -31520,7 +31764,7 @@ var DateField = (props) => {
|
|
|
31520
31764
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31521
31765
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31522
31766
|
showTimeInput: showTime,
|
|
31523
|
-
customInput: /* @__PURE__ */ (0,
|
|
31767
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31524
31768
|
InputDateCustom,
|
|
31525
31769
|
{
|
|
31526
31770
|
isForm,
|
|
@@ -31538,7 +31782,7 @@ var DateField = (props) => {
|
|
|
31538
31782
|
increaseMonth,
|
|
31539
31783
|
prevMonthButtonDisabled,
|
|
31540
31784
|
nextMonthButtonDisabled
|
|
31541
|
-
}) => /* @__PURE__ */ (0,
|
|
31785
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
31542
31786
|
"div",
|
|
31543
31787
|
{
|
|
31544
31788
|
style: {
|
|
@@ -31547,7 +31791,7 @@ var DateField = (props) => {
|
|
|
31547
31791
|
justifyContent: "center"
|
|
31548
31792
|
},
|
|
31549
31793
|
children: [
|
|
31550
|
-
/* @__PURE__ */ (0,
|
|
31794
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31551
31795
|
"button",
|
|
31552
31796
|
{
|
|
31553
31797
|
onClick: decreaseMonth,
|
|
@@ -31555,7 +31799,7 @@ var DateField = (props) => {
|
|
|
31555
31799
|
children: "<"
|
|
31556
31800
|
}
|
|
31557
31801
|
),
|
|
31558
|
-
/* @__PURE__ */ (0,
|
|
31802
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31559
31803
|
StateManagedSelect$1,
|
|
31560
31804
|
{
|
|
31561
31805
|
classNames: {
|
|
@@ -31581,7 +31825,7 @@ var DateField = (props) => {
|
|
|
31581
31825
|
autoFocus: true
|
|
31582
31826
|
}
|
|
31583
31827
|
),
|
|
31584
|
-
/* @__PURE__ */ (0,
|
|
31828
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31585
31829
|
StateManagedSelect$1,
|
|
31586
31830
|
{
|
|
31587
31831
|
classNames: {
|
|
@@ -31609,7 +31853,7 @@ var DateField = (props) => {
|
|
|
31609
31853
|
}))
|
|
31610
31854
|
}
|
|
31611
31855
|
),
|
|
31612
|
-
/* @__PURE__ */ (0,
|
|
31856
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31613
31857
|
"button",
|
|
31614
31858
|
{
|
|
31615
31859
|
onClick: increaseMonth,
|
|
@@ -31622,7 +31866,7 @@ var DateField = (props) => {
|
|
|
31622
31866
|
)
|
|
31623
31867
|
}
|
|
31624
31868
|
),
|
|
31625
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31869
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31626
31870
|
] });
|
|
31627
31871
|
}
|
|
31628
31872
|
}
|
|
@@ -31631,26 +31875,26 @@ var DateField = (props) => {
|
|
|
31631
31875
|
};
|
|
31632
31876
|
|
|
31633
31877
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31634
|
-
var
|
|
31878
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
31635
31879
|
var DownLoadBinaryField = (props) => {
|
|
31636
31880
|
const { handleFileDownload } = props;
|
|
31637
31881
|
const { t: t3 } = useI18n();
|
|
31638
|
-
return /* @__PURE__ */ (0,
|
|
31882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
31639
31883
|
"button",
|
|
31640
31884
|
{
|
|
31641
31885
|
type: "button",
|
|
31642
31886
|
onClick: handleFileDownload,
|
|
31643
31887
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31644
31888
|
children: [
|
|
31645
|
-
/* @__PURE__ */ (0,
|
|
31646
|
-
/* @__PURE__ */ (0,
|
|
31889
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DownloadIcon, {}),
|
|
31890
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31647
31891
|
]
|
|
31648
31892
|
}
|
|
31649
31893
|
);
|
|
31650
31894
|
};
|
|
31651
31895
|
|
|
31652
31896
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31653
|
-
var
|
|
31897
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
31654
31898
|
var DownloadFileField = (props) => {
|
|
31655
31899
|
const {
|
|
31656
31900
|
readonly,
|
|
@@ -31662,15 +31906,15 @@ var DownloadFileField = (props) => {
|
|
|
31662
31906
|
handleFileChange,
|
|
31663
31907
|
handleFileDownload
|
|
31664
31908
|
} = props;
|
|
31665
|
-
return /* @__PURE__ */ (0,
|
|
31666
|
-
/* @__PURE__ */ (0,
|
|
31909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "", children: [
|
|
31910
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
31667
31911
|
"label",
|
|
31668
31912
|
{
|
|
31669
31913
|
htmlFor: inputId,
|
|
31670
31914
|
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
31915
|
children: [
|
|
31672
|
-
file ? /* @__PURE__ */ (0,
|
|
31673
|
-
/* @__PURE__ */ (0,
|
|
31916
|
+
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" }),
|
|
31917
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31674
31918
|
"input",
|
|
31675
31919
|
{
|
|
31676
31920
|
id: inputId,
|
|
@@ -31684,7 +31928,7 @@ var DownloadFileField = (props) => {
|
|
|
31684
31928
|
]
|
|
31685
31929
|
}
|
|
31686
31930
|
),
|
|
31687
|
-
file && /* @__PURE__ */ (0,
|
|
31931
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31688
31932
|
"button",
|
|
31689
31933
|
{
|
|
31690
31934
|
onClick: handleFileDownload,
|
|
@@ -31697,8 +31941,8 @@ var DownloadFileField = (props) => {
|
|
|
31697
31941
|
};
|
|
31698
31942
|
|
|
31699
31943
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31700
|
-
var
|
|
31701
|
-
var
|
|
31944
|
+
var import_react57 = require("react");
|
|
31945
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
31702
31946
|
var DropdownField = (props) => {
|
|
31703
31947
|
const {
|
|
31704
31948
|
options: options2,
|
|
@@ -31710,32 +31954,32 @@ var DropdownField = (props) => {
|
|
|
31710
31954
|
dropdownClassName = "",
|
|
31711
31955
|
useClickOutside: useClickOutside2
|
|
31712
31956
|
} = props;
|
|
31713
|
-
const [open, setOpen] = (0,
|
|
31957
|
+
const [open, setOpen] = (0, import_react57.useState)(false);
|
|
31714
31958
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31715
|
-
return /* @__PURE__ */ (0,
|
|
31959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
31716
31960
|
"div",
|
|
31717
31961
|
{
|
|
31718
31962
|
ref: dropdownRef,
|
|
31719
31963
|
className: `relative ${className}`,
|
|
31720
31964
|
onClick: () => setOpen(!open),
|
|
31721
31965
|
children: [
|
|
31722
|
-
/* @__PURE__ */ (0,
|
|
31966
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
31723
31967
|
"div",
|
|
31724
31968
|
{
|
|
31725
31969
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31726
31970
|
children: [
|
|
31727
31971
|
selectedValue?.icon,
|
|
31728
|
-
/* @__PURE__ */ (0,
|
|
31729
|
-
/* @__PURE__ */ (0,
|
|
31972
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: selectedValue?.label }),
|
|
31973
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31730
31974
|
]
|
|
31731
31975
|
}
|
|
31732
31976
|
),
|
|
31733
|
-
open && /* @__PURE__ */ (0,
|
|
31977
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31734
31978
|
"div",
|
|
31735
31979
|
{
|
|
31736
31980
|
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
31981
|
onClick: (e3) => e3.stopPropagation(),
|
|
31738
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31982
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31739
31983
|
"div",
|
|
31740
31984
|
{
|
|
31741
31985
|
onClick: () => {
|
|
@@ -31755,7 +31999,7 @@ var DropdownField = (props) => {
|
|
|
31755
31999
|
};
|
|
31756
32000
|
|
|
31757
32001
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31758
|
-
var
|
|
32002
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31759
32003
|
var FeeField = (props) => {
|
|
31760
32004
|
const { value, formValues } = props;
|
|
31761
32005
|
const { t: t3 } = useI18n();
|
|
@@ -31766,27 +32010,27 @@ var FeeField = (props) => {
|
|
|
31766
32010
|
)
|
|
31767
32011
|
) + " VND";
|
|
31768
32012
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31769
|
-
return /* @__PURE__ */ (0,
|
|
32013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31770
32014
|
value?.subtotals?.map((sub) => {
|
|
31771
32015
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31772
|
-
return /* @__PURE__ */ (0,
|
|
31773
|
-
/* @__PURE__ */ (0,
|
|
31774
|
-
/* @__PURE__ */ (0,
|
|
32016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
32017
|
+
/* @__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: [
|
|
32018
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31775
32019
|
sub?.name,
|
|
31776
32020
|
":"
|
|
31777
32021
|
] }),
|
|
31778
|
-
/* @__PURE__ */ (0,
|
|
32022
|
+
/* @__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
32023
|
] }),
|
|
31780
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
32024
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
31781
32025
|
"div",
|
|
31782
32026
|
{
|
|
31783
32027
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31784
32028
|
children: [
|
|
31785
|
-
/* @__PURE__ */ (0,
|
|
32029
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31786
32030
|
group?.group_name,
|
|
31787
32031
|
":"
|
|
31788
32032
|
] }),
|
|
31789
|
-
/* @__PURE__ */ (0,
|
|
32033
|
+
/* @__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
32034
|
]
|
|
31791
32035
|
},
|
|
31792
32036
|
`tax_groups_${group?.id}`
|
|
@@ -31794,33 +32038,33 @@ var FeeField = (props) => {
|
|
|
31794
32038
|
] });
|
|
31795
32039
|
}
|
|
31796
32040
|
}),
|
|
31797
|
-
/* @__PURE__ */ (0,
|
|
31798
|
-
/* @__PURE__ */ (0,
|
|
32041
|
+
/* @__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: [
|
|
32042
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31799
32043
|
t3("total"),
|
|
31800
32044
|
":"
|
|
31801
32045
|
] }),
|
|
31802
|
-
/* @__PURE__ */ (0,
|
|
32046
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31803
32047
|
] }),
|
|
31804
|
-
/* @__PURE__ */ (0,
|
|
31805
|
-
/* @__PURE__ */ (0,
|
|
32048
|
+
/* @__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: [
|
|
32049
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31806
32050
|
t3("paid_amount"),
|
|
31807
32051
|
":"
|
|
31808
32052
|
] }),
|
|
31809
|
-
/* @__PURE__ */ (0,
|
|
32053
|
+
/* @__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
32054
|
] }),
|
|
31811
|
-
/* @__PURE__ */ (0,
|
|
31812
|
-
/* @__PURE__ */ (0,
|
|
32055
|
+
/* @__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: [
|
|
32056
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31813
32057
|
t3("remanining_amount"),
|
|
31814
32058
|
":"
|
|
31815
32059
|
] }),
|
|
31816
|
-
/* @__PURE__ */ (0,
|
|
32060
|
+
/* @__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
32061
|
] })
|
|
31818
32062
|
] });
|
|
31819
32063
|
};
|
|
31820
32064
|
|
|
31821
32065
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31822
|
-
var
|
|
31823
|
-
var
|
|
32066
|
+
var import_react58 = require("react");
|
|
32067
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31824
32068
|
var RenderFile = ({
|
|
31825
32069
|
file,
|
|
31826
32070
|
onDelete,
|
|
@@ -31830,16 +32074,16 @@ var RenderFile = ({
|
|
|
31830
32074
|
readAs: "all"
|
|
31831
32075
|
});
|
|
31832
32076
|
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,
|
|
32077
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PdfIcon, {}),
|
|
32078
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
32079
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
32080
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {}),
|
|
32081
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {})
|
|
31838
32082
|
};
|
|
31839
|
-
return /* @__PURE__ */ (0,
|
|
31840
|
-
/* @__PURE__ */ (0,
|
|
31841
|
-
/* @__PURE__ */ (0,
|
|
31842
|
-
/* @__PURE__ */ (0,
|
|
32083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
32084
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
32085
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
32086
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31843
32087
|
"div",
|
|
31844
32088
|
{
|
|
31845
32089
|
style: {
|
|
@@ -31849,20 +32093,20 @@ var RenderFile = ({
|
|
|
31849
32093
|
children: file?.name || file?.display_name || info?.name
|
|
31850
32094
|
}
|
|
31851
32095
|
),
|
|
31852
|
-
/* @__PURE__ */ (0,
|
|
32096
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31853
32097
|
] }),
|
|
31854
|
-
/* @__PURE__ */ (0,
|
|
31855
|
-
/* @__PURE__ */ (0,
|
|
32098
|
+
/* @__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: [
|
|
32099
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31856
32100
|
"span",
|
|
31857
32101
|
{
|
|
31858
32102
|
onClick: () => onDownload && onDownload(
|
|
31859
32103
|
file?.data,
|
|
31860
32104
|
file?.name || file?.display_name || info?.name
|
|
31861
32105
|
),
|
|
31862
|
-
children: /* @__PURE__ */ (0,
|
|
32106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DownloadIcon, {})
|
|
31863
32107
|
}
|
|
31864
32108
|
),
|
|
31865
|
-
/* @__PURE__ */ (0,
|
|
32109
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DeleteIconDanger, {}) })
|
|
31866
32110
|
] })
|
|
31867
32111
|
] });
|
|
31868
32112
|
};
|
|
@@ -31884,10 +32128,10 @@ var FileUploadField = (props) => {
|
|
|
31884
32128
|
downloadFunction
|
|
31885
32129
|
} = props;
|
|
31886
32130
|
const { t: t3 } = useI18n();
|
|
31887
|
-
const fileInputRef = (0,
|
|
31888
|
-
const [selectedFiles, setSelectedFiles] = (0,
|
|
31889
|
-
const [uploadError, setUploadError] = (0,
|
|
31890
|
-
(0,
|
|
32131
|
+
const fileInputRef = (0, import_react58.useRef)(null);
|
|
32132
|
+
const [selectedFiles, setSelectedFiles] = (0, import_react58.useState)([]);
|
|
32133
|
+
const [uploadError, setUploadError] = (0, import_react58.useState)();
|
|
32134
|
+
(0, import_react58.useEffect)(() => {
|
|
31891
32135
|
if (selectedFiles?.length === 0 && value) {
|
|
31892
32136
|
setSelectedFiles([
|
|
31893
32137
|
{
|
|
@@ -31896,7 +32140,7 @@ var FileUploadField = (props) => {
|
|
|
31896
32140
|
]);
|
|
31897
32141
|
}
|
|
31898
32142
|
}, [value]);
|
|
31899
|
-
return /* @__PURE__ */ (0,
|
|
32143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31900
32144
|
Controller,
|
|
31901
32145
|
{
|
|
31902
32146
|
name: name2 || "",
|
|
@@ -31905,7 +32149,7 @@ var FileUploadField = (props) => {
|
|
|
31905
32149
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31906
32150
|
},
|
|
31907
32151
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31908
|
-
(0,
|
|
32152
|
+
(0, import_react58.useEffect)(() => {
|
|
31909
32153
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31910
32154
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31911
32155
|
data = data.split(",")[1];
|
|
@@ -31921,8 +32165,8 @@ var FileUploadField = (props) => {
|
|
|
31921
32165
|
);
|
|
31922
32166
|
}
|
|
31923
32167
|
}, [selectedFiles]);
|
|
31924
|
-
return /* @__PURE__ */ (0,
|
|
31925
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
32168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
32169
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31926
32170
|
RenderFile,
|
|
31927
32171
|
{
|
|
31928
32172
|
file: fileItem,
|
|
@@ -31937,8 +32181,8 @@ var FileUploadField = (props) => {
|
|
|
31937
32181
|
}
|
|
31938
32182
|
}
|
|
31939
32183
|
)),
|
|
31940
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31941
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
32184
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
32185
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31942
32186
|
ButtonSelectFiles,
|
|
31943
32187
|
{
|
|
31944
32188
|
fileInputRef,
|
|
@@ -31953,7 +32197,7 @@ var FileUploadField = (props) => {
|
|
|
31953
32197
|
useUploadFile
|
|
31954
32198
|
}
|
|
31955
32199
|
),
|
|
31956
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32200
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31957
32201
|
] });
|
|
31958
32202
|
}
|
|
31959
32203
|
}
|
|
@@ -31961,8 +32205,8 @@ var FileUploadField = (props) => {
|
|
|
31961
32205
|
};
|
|
31962
32206
|
|
|
31963
32207
|
// src/widgets/basic/float-field/float.tsx
|
|
31964
|
-
var
|
|
31965
|
-
var
|
|
32208
|
+
var import_react59 = require("react");
|
|
32209
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31966
32210
|
var FloatField = (props) => {
|
|
31967
32211
|
const {
|
|
31968
32212
|
name: name2,
|
|
@@ -31980,9 +32224,9 @@ var FloatField = (props) => {
|
|
|
31980
32224
|
} = props;
|
|
31981
32225
|
const { t: t3 } = useI18n();
|
|
31982
32226
|
if (!isForm && !isEditTable) {
|
|
31983
|
-
return /* @__PURE__ */ (0,
|
|
32227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31984
32228
|
}
|
|
31985
|
-
return /* @__PURE__ */ (0,
|
|
32229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31986
32230
|
Controller,
|
|
31987
32231
|
{
|
|
31988
32232
|
name: name2 ?? "",
|
|
@@ -31993,12 +32237,12 @@ var FloatField = (props) => {
|
|
|
31993
32237
|
},
|
|
31994
32238
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31995
32239
|
const { setError, clearErrors } = methods;
|
|
31996
|
-
const [inputValue, setInputValue] = (0,
|
|
32240
|
+
const [inputValue, setInputValue] = (0, import_react59.useState)(
|
|
31997
32241
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31998
32242
|
);
|
|
31999
|
-
const isDirtyRef = (0,
|
|
32000
|
-
const lastCommittedValueRef = (0,
|
|
32001
|
-
(0,
|
|
32243
|
+
const isDirtyRef = (0, import_react59.useRef)(false);
|
|
32244
|
+
const lastCommittedValueRef = (0, import_react59.useRef)(null);
|
|
32245
|
+
(0, import_react59.useEffect)(() => {
|
|
32002
32246
|
if (isDirtyRef.current) return;
|
|
32003
32247
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
32004
32248
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -32076,8 +32320,8 @@ var FloatField = (props) => {
|
|
|
32076
32320
|
}
|
|
32077
32321
|
isDirtyRef.current = false;
|
|
32078
32322
|
};
|
|
32079
|
-
return /* @__PURE__ */ (0,
|
|
32080
|
-
/* @__PURE__ */ (0,
|
|
32323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
32324
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32081
32325
|
"input",
|
|
32082
32326
|
{
|
|
32083
32327
|
value: inputValue,
|
|
@@ -32096,7 +32340,7 @@ var FloatField = (props) => {
|
|
|
32096
32340
|
`
|
|
32097
32341
|
}
|
|
32098
32342
|
),
|
|
32099
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32343
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32100
32344
|
] });
|
|
32101
32345
|
}
|
|
32102
32346
|
}
|
|
@@ -32104,8 +32348,8 @@ var FloatField = (props) => {
|
|
|
32104
32348
|
};
|
|
32105
32349
|
|
|
32106
32350
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32107
|
-
var
|
|
32108
|
-
var
|
|
32351
|
+
var import_react60 = require("react");
|
|
32352
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
32109
32353
|
var FloatTimeField = (props) => {
|
|
32110
32354
|
const {
|
|
32111
32355
|
name: name2,
|
|
@@ -32121,9 +32365,9 @@ var FloatTimeField = (props) => {
|
|
|
32121
32365
|
const { t: t3 } = useI18n();
|
|
32122
32366
|
if (!isForm) {
|
|
32123
32367
|
const formatValue = value ?? 0;
|
|
32124
|
-
return /* @__PURE__ */ (0,
|
|
32368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
32125
32369
|
}
|
|
32126
|
-
return /* @__PURE__ */ (0,
|
|
32370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32127
32371
|
Controller,
|
|
32128
32372
|
{
|
|
32129
32373
|
name: name2 ?? "",
|
|
@@ -32136,11 +32380,11 @@ var FloatTimeField = (props) => {
|
|
|
32136
32380
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32137
32381
|
fieldState: { error: error2, isDirty }
|
|
32138
32382
|
}) => {
|
|
32139
|
-
const [input, setInput] = (0,
|
|
32383
|
+
const [input, setInput] = (0, import_react60.useState)(
|
|
32140
32384
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32141
32385
|
);
|
|
32142
|
-
const [formattedTime, setFormattedTime] = (0,
|
|
32143
|
-
const [errors, setErrors] = (0,
|
|
32386
|
+
const [formattedTime, setFormattedTime] = (0, import_react60.useState)("");
|
|
32387
|
+
const [errors, setErrors] = (0, import_react60.useState)("");
|
|
32144
32388
|
const handleInputChange = (e3) => {
|
|
32145
32389
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32146
32390
|
setInput(raw);
|
|
@@ -32185,8 +32429,8 @@ var FloatTimeField = (props) => {
|
|
|
32185
32429
|
}
|
|
32186
32430
|
onBlur();
|
|
32187
32431
|
};
|
|
32188
|
-
return /* @__PURE__ */ (0,
|
|
32189
|
-
/* @__PURE__ */ (0,
|
|
32432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
32433
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32190
32434
|
"input",
|
|
32191
32435
|
{
|
|
32192
32436
|
type: "text",
|
|
@@ -32218,7 +32462,7 @@ var FloatTimeField = (props) => {
|
|
|
32218
32462
|
readOnly: readonly
|
|
32219
32463
|
}
|
|
32220
32464
|
),
|
|
32221
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
32465
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32222
32466
|
] });
|
|
32223
32467
|
}
|
|
32224
32468
|
}
|
|
@@ -32226,8 +32470,8 @@ var FloatTimeField = (props) => {
|
|
|
32226
32470
|
};
|
|
32227
32471
|
|
|
32228
32472
|
// src/widgets/basic/html-field/html.tsx
|
|
32229
|
-
var
|
|
32230
|
-
var
|
|
32473
|
+
var import_react61 = require("react");
|
|
32474
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
32231
32475
|
var HtmlField = (props) => {
|
|
32232
32476
|
const {
|
|
32233
32477
|
name: name2,
|
|
@@ -32239,18 +32483,18 @@ var HtmlField = (props) => {
|
|
|
32239
32483
|
value,
|
|
32240
32484
|
isEditTable
|
|
32241
32485
|
} = props;
|
|
32242
|
-
const divRef = (0,
|
|
32486
|
+
const divRef = (0, import_react61.useRef)(null);
|
|
32243
32487
|
if (!isForm && !isEditTable) {
|
|
32244
|
-
return /* @__PURE__ */ (0,
|
|
32488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32245
32489
|
}
|
|
32246
|
-
return /* @__PURE__ */ (0,
|
|
32490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
32247
32491
|
Controller,
|
|
32248
32492
|
{
|
|
32249
32493
|
name: name2 ?? "",
|
|
32250
32494
|
control: methods?.control,
|
|
32251
32495
|
defaultValue,
|
|
32252
32496
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32253
|
-
(0,
|
|
32497
|
+
(0, import_react61.useEffect)(() => {
|
|
32254
32498
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32255
32499
|
divRef.current.innerHTML = value2 || "";
|
|
32256
32500
|
}
|
|
@@ -32262,7 +32506,7 @@ var HtmlField = (props) => {
|
|
|
32262
32506
|
onChange2(newValue, "");
|
|
32263
32507
|
}
|
|
32264
32508
|
};
|
|
32265
|
-
return /* @__PURE__ */ (0,
|
|
32509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
32266
32510
|
"div",
|
|
32267
32511
|
{
|
|
32268
32512
|
ref: divRef,
|
|
@@ -32281,28 +32525,28 @@ var HtmlField = (props) => {
|
|
|
32281
32525
|
};
|
|
32282
32526
|
|
|
32283
32527
|
// src/widgets/basic/image-field/image.tsx
|
|
32284
|
-
var
|
|
32528
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
32285
32529
|
var ImageField = (props) => {
|
|
32286
32530
|
const { value, type, name: name2, baseURL } = props;
|
|
32287
32531
|
if (!value) return null;
|
|
32288
32532
|
if (type === "url") {
|
|
32289
|
-
return /* @__PURE__ */ (0,
|
|
32533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32290
32534
|
}
|
|
32291
|
-
return /* @__PURE__ */ (0,
|
|
32535
|
+
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
32536
|
};
|
|
32293
32537
|
|
|
32294
32538
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32295
|
-
var
|
|
32539
|
+
var import_react62 = __toESM(require("react"));
|
|
32296
32540
|
|
|
32297
32541
|
// src/widgets/basic/information-field/information.tsx
|
|
32298
|
-
var
|
|
32542
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
32299
32543
|
var InfomationField = (props) => {
|
|
32300
32544
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32301
32545
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32302
|
-
return /* @__PURE__ */ (0,
|
|
32546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_jsx_runtime96.Fragment, {});
|
|
32303
32547
|
}
|
|
32304
32548
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32305
|
-
return /* @__PURE__ */ (0,
|
|
32549
|
+
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
32550
|
AvatarField,
|
|
32307
32551
|
{
|
|
32308
32552
|
id: item.id,
|
|
@@ -32311,8 +32555,8 @@ var InfomationField = (props) => {
|
|
|
32311
32555
|
stringToColor
|
|
32312
32556
|
},
|
|
32313
32557
|
item.id
|
|
32314
|
-
)) : /* @__PURE__ */ (0,
|
|
32315
|
-
/* @__PURE__ */ (0,
|
|
32558
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32559
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32316
32560
|
AvatarField,
|
|
32317
32561
|
{
|
|
32318
32562
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32322,12 +32566,12 @@ var InfomationField = (props) => {
|
|
|
32322
32566
|
stringToColor
|
|
32323
32567
|
}
|
|
32324
32568
|
),
|
|
32325
|
-
showName && /* @__PURE__ */ (0,
|
|
32569
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32326
32570
|
] }) });
|
|
32327
32571
|
};
|
|
32328
32572
|
|
|
32329
32573
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32330
|
-
var
|
|
32574
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
32331
32575
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32332
32576
|
const { selectProps, data, menuList } = props;
|
|
32333
32577
|
const { relation } = selectProps;
|
|
@@ -32336,8 +32580,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32336
32580
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32337
32581
|
)
|
|
32338
32582
|
)?.[0]?.action?.id;
|
|
32339
|
-
return /* @__PURE__ */ (0,
|
|
32340
|
-
/* @__PURE__ */ (0,
|
|
32583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32584
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32341
32585
|
AvatarField,
|
|
32342
32586
|
{
|
|
32343
32587
|
id: data?.id,
|
|
@@ -32349,8 +32593,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32349
32593
|
stringToColor
|
|
32350
32594
|
}
|
|
32351
32595
|
),
|
|
32352
|
-
/* @__PURE__ */ (0,
|
|
32353
|
-
/* @__PURE__ */ (0,
|
|
32596
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32597
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32354
32598
|
"span",
|
|
32355
32599
|
{
|
|
32356
32600
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32358,7 +32602,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32358
32602
|
e3.stopPropagation();
|
|
32359
32603
|
props.removeProps.onClick();
|
|
32360
32604
|
},
|
|
32361
|
-
children: /* @__PURE__ */ (0,
|
|
32605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CloseIcon, {})
|
|
32362
32606
|
}
|
|
32363
32607
|
)
|
|
32364
32608
|
] });
|
|
@@ -32367,10 +32611,10 @@ var CustomMenuList = (props) => {
|
|
|
32367
32611
|
const { options: options2, children, selectProps } = props;
|
|
32368
32612
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32369
32613
|
const { t: t3 } = useI18n();
|
|
32370
|
-
const limitedChildren =
|
|
32371
|
-
return /* @__PURE__ */ (0,
|
|
32614
|
+
const limitedChildren = import_react62.default.Children.toArray(children).slice(0, 10);
|
|
32615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32372
32616
|
limitedChildren,
|
|
32373
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
32617
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
32374
32618
|
"button",
|
|
32375
32619
|
{
|
|
32376
32620
|
type: "button",
|
|
@@ -32415,7 +32659,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32415
32659
|
value: item.id,
|
|
32416
32660
|
label: item.name ?? item.display_name
|
|
32417
32661
|
})) : [];
|
|
32418
|
-
return /* @__PURE__ */ (0,
|
|
32662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32419
32663
|
InfomationField,
|
|
32420
32664
|
{
|
|
32421
32665
|
value: optionValue || null,
|
|
@@ -32424,7 +32668,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32424
32668
|
}
|
|
32425
32669
|
);
|
|
32426
32670
|
}
|
|
32427
|
-
return /* @__PURE__ */ (0,
|
|
32671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32428
32672
|
Controller,
|
|
32429
32673
|
{
|
|
32430
32674
|
name: name2 ?? "",
|
|
@@ -32434,12 +32678,12 @@ var Many2ManyTagField = (props) => {
|
|
|
32434
32678
|
},
|
|
32435
32679
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32436
32680
|
const { clearErrors } = methods;
|
|
32437
|
-
(0,
|
|
32681
|
+
(0, import_react62.useEffect)(() => {
|
|
32438
32682
|
if (field.value) {
|
|
32439
32683
|
clearErrors(name2);
|
|
32440
32684
|
}
|
|
32441
32685
|
}, [field.value]);
|
|
32442
|
-
const filteredValue = (0,
|
|
32686
|
+
const filteredValue = (0, import_react62.useMemo)(() => {
|
|
32443
32687
|
if (!Array.isArray(field?.value)) return null;
|
|
32444
32688
|
const fieldValueMapped = field.value.map((v) => ({
|
|
32445
32689
|
value: v?.id,
|
|
@@ -32460,8 +32704,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32460
32704
|
onChange2?.(name2 ?? "", newValue);
|
|
32461
32705
|
clearErrors(name2);
|
|
32462
32706
|
};
|
|
32463
|
-
return /* @__PURE__ */ (0,
|
|
32464
|
-
/* @__PURE__ */ (0,
|
|
32707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
32708
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32465
32709
|
StateManagedSelect$1,
|
|
32466
32710
|
{
|
|
32467
32711
|
options: options2,
|
|
@@ -32540,7 +32784,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32540
32784
|
})
|
|
32541
32785
|
},
|
|
32542
32786
|
components: isUser ? {
|
|
32543
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
32787
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32544
32788
|
CustomMultiValue,
|
|
32545
32789
|
{
|
|
32546
32790
|
...multiValueProps,
|
|
@@ -32549,7 +32793,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32549
32793
|
),
|
|
32550
32794
|
IndicatorSeparator: () => null
|
|
32551
32795
|
} : {
|
|
32552
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
32796
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32553
32797
|
CustomMenuList,
|
|
32554
32798
|
{
|
|
32555
32799
|
...menuListProps,
|
|
@@ -32560,13 +32804,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32560
32804
|
}
|
|
32561
32805
|
),
|
|
32562
32806
|
IndicatorSeparator: () => null,
|
|
32563
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32564
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32807
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32808
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.ClearIndicator, { ...props2 })
|
|
32565
32809
|
},
|
|
32566
32810
|
required: !invisible && required
|
|
32567
32811
|
}
|
|
32568
32812
|
),
|
|
32569
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32813
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32570
32814
|
] });
|
|
32571
32815
|
}
|
|
32572
32816
|
}
|
|
@@ -32574,8 +32818,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32574
32818
|
};
|
|
32575
32819
|
|
|
32576
32820
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32577
|
-
var
|
|
32578
|
-
var
|
|
32821
|
+
var import_react63 = require("react");
|
|
32822
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
32579
32823
|
var MonetaryField = (props) => {
|
|
32580
32824
|
const { t: t3 } = useI18n();
|
|
32581
32825
|
const {
|
|
@@ -32596,26 +32840,26 @@ var MonetaryField = (props) => {
|
|
|
32596
32840
|
symbol = "VND"
|
|
32597
32841
|
} = props;
|
|
32598
32842
|
if (isForm && name2 === "amount_residual") {
|
|
32599
|
-
return /* @__PURE__ */ (0,
|
|
32600
|
-
/* @__PURE__ */ (0,
|
|
32843
|
+
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: [
|
|
32844
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "font-semibold", children: [
|
|
32601
32845
|
string,
|
|
32602
32846
|
":"
|
|
32603
32847
|
] }),
|
|
32604
|
-
/* @__PURE__ */ (0,
|
|
32848
|
+
/* @__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
32849
|
] });
|
|
32606
32850
|
}
|
|
32607
32851
|
if (!isForm) {
|
|
32608
32852
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
32609
32853
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32610
|
-
return /* @__PURE__ */ (0,
|
|
32854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
32611
32855
|
parseFloat(String(value ?? defaultValue))
|
|
32612
32856
|
)} ${symbol}` });
|
|
32613
32857
|
}
|
|
32614
|
-
return /* @__PURE__ */ (0,
|
|
32858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
32615
32859
|
parseFloat(value ?? defaultValue)
|
|
32616
32860
|
)} ${currencySymbol}` });
|
|
32617
32861
|
}
|
|
32618
|
-
return /* @__PURE__ */ (0,
|
|
32862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32619
32863
|
Controller,
|
|
32620
32864
|
{
|
|
32621
32865
|
name: name2 ?? "",
|
|
@@ -32629,13 +32873,13 @@ var MonetaryField = (props) => {
|
|
|
32629
32873
|
fieldState: { error: error2 }
|
|
32630
32874
|
}) => {
|
|
32631
32875
|
const { setError, clearErrors } = methods;
|
|
32632
|
-
(0,
|
|
32876
|
+
(0, import_react63.useEffect)(() => {
|
|
32633
32877
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32634
32878
|
clearErrors(name2);
|
|
32635
32879
|
}
|
|
32636
32880
|
}, [value2]);
|
|
32637
|
-
return /* @__PURE__ */ (0,
|
|
32638
|
-
/* @__PURE__ */ (0,
|
|
32881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
32882
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32639
32883
|
"input",
|
|
32640
32884
|
{
|
|
32641
32885
|
value: formatNumberOnly(value2),
|
|
@@ -32673,7 +32917,7 @@ var MonetaryField = (props) => {
|
|
|
32673
32917
|
`
|
|
32674
32918
|
}
|
|
32675
32919
|
),
|
|
32676
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32920
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32677
32921
|
] });
|
|
32678
32922
|
}
|
|
32679
32923
|
}
|
|
@@ -32681,14 +32925,14 @@ var MonetaryField = (props) => {
|
|
|
32681
32925
|
};
|
|
32682
32926
|
|
|
32683
32927
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32684
|
-
var
|
|
32928
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
32685
32929
|
var PaidBadgedField = () => {
|
|
32686
|
-
return /* @__PURE__ */ (0,
|
|
32930
|
+
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
32931
|
};
|
|
32688
32932
|
|
|
32689
32933
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32690
|
-
var
|
|
32691
|
-
var
|
|
32934
|
+
var import_react64 = __toESM(require("react"));
|
|
32935
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
32692
32936
|
var RatingStarField = (props) => {
|
|
32693
32937
|
const {
|
|
32694
32938
|
label,
|
|
@@ -32697,9 +32941,9 @@ var RatingStarField = (props) => {
|
|
|
32697
32941
|
onSelectPriority,
|
|
32698
32942
|
id
|
|
32699
32943
|
} = props;
|
|
32700
|
-
const [rating, setRating] = (0,
|
|
32701
|
-
const [hover, setHover] = (0,
|
|
32702
|
-
(0,
|
|
32944
|
+
const [rating, setRating] = (0, import_react64.useState)(defaultValue);
|
|
32945
|
+
const [hover, setHover] = (0, import_react64.useState)(0);
|
|
32946
|
+
(0, import_react64.useEffect)(() => {
|
|
32703
32947
|
setRating(defaultValue);
|
|
32704
32948
|
}, [defaultValue]);
|
|
32705
32949
|
const handleClick = (value) => {
|
|
@@ -32723,7 +32967,7 @@ var RatingStarField = (props) => {
|
|
|
32723
32967
|
setHover(0);
|
|
32724
32968
|
setRating(0);
|
|
32725
32969
|
};
|
|
32726
|
-
return /* @__PURE__ */ (0,
|
|
32970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32727
32971
|
"div",
|
|
32728
32972
|
{
|
|
32729
32973
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32733,17 +32977,17 @@ var RatingStarField = (props) => {
|
|
|
32733
32977
|
const starValue = index4 + 1;
|
|
32734
32978
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32735
32979
|
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,
|
|
32980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react64.default.Fragment, { children: [
|
|
32981
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32738
32982
|
"div",
|
|
32739
32983
|
{
|
|
32740
32984
|
onMouseEnter: () => handleHover(starValue),
|
|
32741
32985
|
onClick: () => handleClick(starValue),
|
|
32742
32986
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32743
|
-
children: /* @__PURE__ */ (0,
|
|
32987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32744
32988
|
}
|
|
32745
32989
|
),
|
|
32746
|
-
/* @__PURE__ */ (0,
|
|
32990
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32747
32991
|
M,
|
|
32748
32992
|
{
|
|
32749
32993
|
className: "z-50",
|
|
@@ -32759,7 +33003,7 @@ var RatingStarField = (props) => {
|
|
|
32759
33003
|
};
|
|
32760
33004
|
|
|
32761
33005
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32762
|
-
var
|
|
33006
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32763
33007
|
var PriorityField = (props) => {
|
|
32764
33008
|
const {
|
|
32765
33009
|
isForm,
|
|
@@ -32775,7 +33019,7 @@ var PriorityField = (props) => {
|
|
|
32775
33019
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32776
33020
|
const defaultPriority = parseInt(value) + 1;
|
|
32777
33021
|
if (!isForm) {
|
|
32778
|
-
return /* @__PURE__ */ (0,
|
|
33022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32779
33023
|
RatingStarField,
|
|
32780
33024
|
{
|
|
32781
33025
|
label,
|
|
@@ -32786,7 +33030,7 @@ var PriorityField = (props) => {
|
|
|
32786
33030
|
}
|
|
32787
33031
|
);
|
|
32788
33032
|
}
|
|
32789
|
-
return /* @__PURE__ */ (0,
|
|
33033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32790
33034
|
Controller,
|
|
32791
33035
|
{
|
|
32792
33036
|
name: name ?? "",
|
|
@@ -32796,7 +33040,7 @@ var PriorityField = (props) => {
|
|
|
32796
33040
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32797
33041
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32798
33042
|
};
|
|
32799
|
-
return /* @__PURE__ */ (0,
|
|
33043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32800
33044
|
RatingStarField,
|
|
32801
33045
|
{
|
|
32802
33046
|
label,
|
|
@@ -32812,8 +33056,8 @@ var PriorityField = (props) => {
|
|
|
32812
33056
|
};
|
|
32813
33057
|
|
|
32814
33058
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32815
|
-
var
|
|
32816
|
-
var
|
|
33059
|
+
var import_react65 = require("react");
|
|
33060
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32817
33061
|
var RadioGroupField = (props) => {
|
|
32818
33062
|
const {
|
|
32819
33063
|
name: name2,
|
|
@@ -32826,19 +33070,19 @@ var RadioGroupField = (props) => {
|
|
|
32826
33070
|
onChange: onChange2,
|
|
32827
33071
|
setValue
|
|
32828
33072
|
} = props;
|
|
32829
|
-
(0,
|
|
33073
|
+
(0, import_react65.useEffect)(() => {
|
|
32830
33074
|
if (selection?.length > 0) {
|
|
32831
33075
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32832
33076
|
}
|
|
32833
33077
|
}, [selection, name2, setValue]);
|
|
32834
33078
|
if (!methods) return null;
|
|
32835
|
-
return /* @__PURE__ */ (0,
|
|
33079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32836
33080
|
Controller,
|
|
32837
33081
|
{
|
|
32838
33082
|
name: name2 ?? "",
|
|
32839
33083
|
control: methods.control,
|
|
32840
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32841
|
-
/* @__PURE__ */ (0,
|
|
33084
|
+
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: [
|
|
33085
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32842
33086
|
"input",
|
|
32843
33087
|
{
|
|
32844
33088
|
type: "radio",
|
|
@@ -32857,7 +33101,7 @@ var RadioGroupField = (props) => {
|
|
|
32857
33101
|
className: "custom-radio"
|
|
32858
33102
|
}
|
|
32859
33103
|
),
|
|
32860
|
-
/* @__PURE__ */ (0,
|
|
33104
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32861
33105
|
] }, select[0])) })
|
|
32862
33106
|
}
|
|
32863
33107
|
);
|
|
@@ -32865,7 +33109,7 @@ var RadioGroupField = (props) => {
|
|
|
32865
33109
|
|
|
32866
33110
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32867
33111
|
var import_moment3 = __toESM(require_moment());
|
|
32868
|
-
var
|
|
33112
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32869
33113
|
var RemainingDaysField = (props) => {
|
|
32870
33114
|
const {
|
|
32871
33115
|
value,
|
|
@@ -32876,14 +33120,14 @@ var RemainingDaysField = (props) => {
|
|
|
32876
33120
|
if (!value) return null;
|
|
32877
33121
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32878
33122
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32879
|
-
return /* @__PURE__ */ (0,
|
|
32880
|
-
/* @__PURE__ */ (0,
|
|
32881
|
-
/* @__PURE__ */ (0,
|
|
33123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
33124
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
33125
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32882
33126
|
"div",
|
|
32883
33127
|
{
|
|
32884
33128
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32885
33129
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32886
|
-
children: /* @__PURE__ */ (0,
|
|
33130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32887
33131
|
"div",
|
|
32888
33132
|
{
|
|
32889
33133
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32896,7 +33140,7 @@ var RemainingDaysField = (props) => {
|
|
|
32896
33140
|
};
|
|
32897
33141
|
|
|
32898
33142
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32899
|
-
var
|
|
33143
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32900
33144
|
var SelectDropdownField = (props) => {
|
|
32901
33145
|
const { t: t3 } = useI18n();
|
|
32902
33146
|
const {
|
|
@@ -32918,9 +33162,9 @@ var SelectDropdownField = (props) => {
|
|
|
32918
33162
|
label: val[1]
|
|
32919
33163
|
})) : [];
|
|
32920
33164
|
if (!isForm && !isEditTable) {
|
|
32921
|
-
return /* @__PURE__ */ (0,
|
|
33165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32922
33166
|
} else {
|
|
32923
|
-
return /* @__PURE__ */ (0,
|
|
33167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32924
33168
|
Controller,
|
|
32925
33169
|
{
|
|
32926
33170
|
name: name2 || "",
|
|
@@ -32947,8 +33191,8 @@ var SelectDropdownField = (props) => {
|
|
|
32947
33191
|
value: defaultValue || null,
|
|
32948
33192
|
required: !invisible && required
|
|
32949
33193
|
};
|
|
32950
|
-
return /* @__PURE__ */ (0,
|
|
32951
|
-
/* @__PURE__ */ (0,
|
|
33194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
33195
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32952
33196
|
StateManagedSelect$1,
|
|
32953
33197
|
{
|
|
32954
33198
|
...commonProps,
|
|
@@ -33005,12 +33249,12 @@ var SelectDropdownField = (props) => {
|
|
|
33005
33249
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
33006
33250
|
components: {
|
|
33007
33251
|
IndicatorSeparator: () => null,
|
|
33008
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
33252
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33009
33253
|
},
|
|
33010
33254
|
noOptionsMessage: () => t3("no-available")
|
|
33011
33255
|
}
|
|
33012
33256
|
) }),
|
|
33013
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33257
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33014
33258
|
] });
|
|
33015
33259
|
}
|
|
33016
33260
|
}
|
|
@@ -33019,7 +33263,7 @@ var SelectDropdownField = (props) => {
|
|
|
33019
33263
|
};
|
|
33020
33264
|
|
|
33021
33265
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
33022
|
-
var
|
|
33266
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
33023
33267
|
var TextAreaField = (props) => {
|
|
33024
33268
|
const {
|
|
33025
33269
|
methods,
|
|
@@ -33043,9 +33287,9 @@ var TextAreaField = (props) => {
|
|
|
33043
33287
|
}
|
|
33044
33288
|
}) : {};
|
|
33045
33289
|
if (!isForm) {
|
|
33046
|
-
return /* @__PURE__ */ (0,
|
|
33290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
33047
33291
|
}
|
|
33048
|
-
return /* @__PURE__ */ (0,
|
|
33292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33049
33293
|
"textarea",
|
|
33050
33294
|
{
|
|
33051
33295
|
...formProps,
|
|
@@ -33061,7 +33305,7 @@ var TextAreaField = (props) => {
|
|
|
33061
33305
|
};
|
|
33062
33306
|
|
|
33063
33307
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33064
|
-
var
|
|
33308
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
33065
33309
|
var ToggleButtonField = (props) => {
|
|
33066
33310
|
const {
|
|
33067
33311
|
name: name2,
|
|
@@ -33071,13 +33315,13 @@ var ToggleButtonField = (props) => {
|
|
|
33071
33315
|
onChange: onChange2,
|
|
33072
33316
|
methods
|
|
33073
33317
|
} = props;
|
|
33074
|
-
return /* @__PURE__ */ (0,
|
|
33318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33075
33319
|
Controller,
|
|
33076
33320
|
{
|
|
33077
33321
|
name: name2 ?? "",
|
|
33078
33322
|
control: methods?.control,
|
|
33079
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33080
|
-
/* @__PURE__ */ (0,
|
|
33323
|
+
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: [
|
|
33324
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33081
33325
|
"input",
|
|
33082
33326
|
{
|
|
33083
33327
|
...field,
|
|
@@ -33096,7 +33340,7 @@ var ToggleButtonField = (props) => {
|
|
|
33096
33340
|
checked: field.value ?? false
|
|
33097
33341
|
}
|
|
33098
33342
|
),
|
|
33099
|
-
/* @__PURE__ */ (0,
|
|
33343
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33100
33344
|
"span",
|
|
33101
33345
|
{
|
|
33102
33346
|
style: {
|
|
@@ -33106,7 +33350,7 @@ var ToggleButtonField = (props) => {
|
|
|
33106
33350
|
},
|
|
33107
33351
|
className: `rounded-full transition duration-300
|
|
33108
33352
|
`,
|
|
33109
|
-
children: /* @__PURE__ */ (0,
|
|
33353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33110
33354
|
"span",
|
|
33111
33355
|
{
|
|
33112
33356
|
style: {
|
|
@@ -33130,8 +33374,8 @@ var ToggleButtonField = (props) => {
|
|
|
33130
33374
|
};
|
|
33131
33375
|
|
|
33132
33376
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33133
|
-
var
|
|
33134
|
-
var
|
|
33377
|
+
var import_react66 = require("react");
|
|
33378
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
33135
33379
|
var IntegerField = (props) => {
|
|
33136
33380
|
const {
|
|
33137
33381
|
name: name2,
|
|
@@ -33150,9 +33394,9 @@ var IntegerField = (props) => {
|
|
|
33150
33394
|
const { t: t3 } = useI18n();
|
|
33151
33395
|
if (!isForm && !isEditTable) {
|
|
33152
33396
|
const displayValue = value ?? defaultValue;
|
|
33153
|
-
return /* @__PURE__ */ (0,
|
|
33397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33154
33398
|
}
|
|
33155
|
-
return /* @__PURE__ */ (0,
|
|
33399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33156
33400
|
Controller,
|
|
33157
33401
|
{
|
|
33158
33402
|
name: name2 || "",
|
|
@@ -33166,13 +33410,13 @@ var IntegerField = (props) => {
|
|
|
33166
33410
|
fieldState: { error: error2 }
|
|
33167
33411
|
}) => {
|
|
33168
33412
|
const { setError, clearErrors } = methods;
|
|
33169
|
-
const isDirtyRef = (0,
|
|
33170
|
-
const inputRef = (0,
|
|
33171
|
-
const lastCommittedValueRef = (0,
|
|
33172
|
-
const [inputValue, setInputValue] = (0,
|
|
33413
|
+
const isDirtyRef = (0, import_react66.useRef)(false);
|
|
33414
|
+
const inputRef = (0, import_react66.useRef)(null);
|
|
33415
|
+
const lastCommittedValueRef = (0, import_react66.useRef)(null);
|
|
33416
|
+
const [inputValue, setInputValue] = (0, import_react66.useState)(
|
|
33173
33417
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33174
33418
|
);
|
|
33175
|
-
(0,
|
|
33419
|
+
(0, import_react66.useEffect)(() => {
|
|
33176
33420
|
if (value2 !== void 0 && value2 !== null) {
|
|
33177
33421
|
setInputValue(String(value2));
|
|
33178
33422
|
clearErrors(name2);
|
|
@@ -33230,8 +33474,8 @@ var IntegerField = (props) => {
|
|
|
33230
33474
|
inputRef.current?.blur();
|
|
33231
33475
|
clearErrors(name2);
|
|
33232
33476
|
};
|
|
33233
|
-
return /* @__PURE__ */ (0,
|
|
33234
|
-
/* @__PURE__ */ (0,
|
|
33477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
33478
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33235
33479
|
"input",
|
|
33236
33480
|
{
|
|
33237
33481
|
ref: inputRef,
|
|
@@ -33266,7 +33510,7 @@ var IntegerField = (props) => {
|
|
|
33266
33510
|
`
|
|
33267
33511
|
}
|
|
33268
33512
|
),
|
|
33269
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
33513
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33270
33514
|
] });
|
|
33271
33515
|
}
|
|
33272
33516
|
}
|
|
@@ -33274,7 +33518,7 @@ var IntegerField = (props) => {
|
|
|
33274
33518
|
};
|
|
33275
33519
|
|
|
33276
33520
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33277
|
-
var
|
|
33521
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
33278
33522
|
var StatusDropdownField = (props) => {
|
|
33279
33523
|
const {
|
|
33280
33524
|
buttonRef,
|
|
@@ -33286,13 +33530,13 @@ var StatusDropdownField = (props) => {
|
|
|
33286
33530
|
handleClick,
|
|
33287
33531
|
colors: colors2
|
|
33288
33532
|
} = props;
|
|
33289
|
-
return /* @__PURE__ */ (0,
|
|
33533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
33290
33534
|
"div",
|
|
33291
33535
|
{
|
|
33292
33536
|
ref: buttonRef,
|
|
33293
33537
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33294
33538
|
children: [
|
|
33295
|
-
/* @__PURE__ */ (0,
|
|
33539
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33296
33540
|
"button",
|
|
33297
33541
|
{
|
|
33298
33542
|
type: "button",
|
|
@@ -33300,23 +33544,23 @@ var StatusDropdownField = (props) => {
|
|
|
33300
33544
|
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
33545
|
}
|
|
33302
33546
|
),
|
|
33303
|
-
isOpen && /* @__PURE__ */ (0,
|
|
33547
|
+
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
33548
|
const isActive = item[0] == state;
|
|
33305
|
-
return /* @__PURE__ */ (0,
|
|
33549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
33306
33550
|
"div",
|
|
33307
33551
|
{
|
|
33308
33552
|
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
33553
|
onClick: () => handleClick(item[0]),
|
|
33310
33554
|
children: [
|
|
33311
|
-
/* @__PURE__ */ (0,
|
|
33312
|
-
/* @__PURE__ */ (0,
|
|
33313
|
-
/* @__PURE__ */ (0,
|
|
33555
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CheckIcon, {}) }),
|
|
33556
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
33557
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33314
33558
|
"div",
|
|
33315
33559
|
{
|
|
33316
33560
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33317
33561
|
}
|
|
33318
33562
|
),
|
|
33319
|
-
/* @__PURE__ */ (0,
|
|
33563
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-sm", children: item[1] })
|
|
33320
33564
|
] })
|
|
33321
33565
|
]
|
|
33322
33566
|
},
|
|
@@ -33330,8 +33574,8 @@ var StatusDropdownField = (props) => {
|
|
|
33330
33574
|
|
|
33331
33575
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33332
33576
|
var import_react_dom8 = require("react-dom");
|
|
33333
|
-
var
|
|
33334
|
-
var
|
|
33577
|
+
var import_react67 = require("react");
|
|
33578
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
33335
33579
|
var Many2ManyField = (props) => {
|
|
33336
33580
|
const { t: t3 } = useI18n();
|
|
33337
33581
|
const {
|
|
@@ -33390,7 +33634,7 @@ var Many2ManyField = (props) => {
|
|
|
33390
33634
|
clearSearch
|
|
33391
33635
|
} = searchController;
|
|
33392
33636
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33393
|
-
(0,
|
|
33637
|
+
(0, import_react67.useEffect)(() => {
|
|
33394
33638
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33395
33639
|
if (groupItems?.length > 0) {
|
|
33396
33640
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33405,7 +33649,7 @@ var Many2ManyField = (props) => {
|
|
|
33405
33649
|
};
|
|
33406
33650
|
}, [selectedTags]);
|
|
33407
33651
|
return (0, import_react_dom8.createPortal)(
|
|
33408
|
-
/* @__PURE__ */ (0,
|
|
33652
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33409
33653
|
"div",
|
|
33410
33654
|
{
|
|
33411
33655
|
style: {
|
|
@@ -33413,8 +33657,8 @@ var Many2ManyField = (props) => {
|
|
|
33413
33657
|
},
|
|
33414
33658
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33415
33659
|
children: [
|
|
33416
|
-
/* @__PURE__ */ (0,
|
|
33417
|
-
/* @__PURE__ */ (0,
|
|
33660
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33661
|
+
/* @__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
33662
|
"div",
|
|
33419
33663
|
{
|
|
33420
33664
|
style: {
|
|
@@ -33422,12 +33666,12 @@ var Many2ManyField = (props) => {
|
|
|
33422
33666
|
},
|
|
33423
33667
|
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
33668
|
children: [
|
|
33425
|
-
/* @__PURE__ */ (0,
|
|
33426
|
-
/* @__PURE__ */ (0,
|
|
33427
|
-
/* @__PURE__ */ (0,
|
|
33669
|
+
/* @__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: [
|
|
33670
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33671
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(CloseIcon, {}) })
|
|
33428
33672
|
] }),
|
|
33429
|
-
/* @__PURE__ */ (0,
|
|
33430
|
-
/* @__PURE__ */ (0,
|
|
33673
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33674
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33431
33675
|
Search,
|
|
33432
33676
|
{
|
|
33433
33677
|
removeSearchItems,
|
|
@@ -33461,7 +33705,7 @@ var Many2ManyField = (props) => {
|
|
|
33461
33705
|
groupByList
|
|
33462
33706
|
}
|
|
33463
33707
|
) }),
|
|
33464
|
-
/* @__PURE__ */ (0,
|
|
33708
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33465
33709
|
PaginationView,
|
|
33466
33710
|
{
|
|
33467
33711
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -33478,20 +33722,20 @@ var Many2ManyField = (props) => {
|
|
|
33478
33722
|
}
|
|
33479
33723
|
)
|
|
33480
33724
|
] }),
|
|
33481
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
33725
|
+
!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
33726
|
"div",
|
|
33483
33727
|
{
|
|
33484
33728
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33485
|
-
children: /* @__PURE__ */ (0,
|
|
33729
|
+
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
33730
|
"div",
|
|
33487
33731
|
{
|
|
33488
33732
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33489
|
-
children: /* @__PURE__ */ (0,
|
|
33733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33490
33734
|
"table",
|
|
33491
33735
|
{
|
|
33492
33736
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33493
33737
|
children: [
|
|
33494
|
-
/* @__PURE__ */ (0,
|
|
33738
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33495
33739
|
TableHead,
|
|
33496
33740
|
{
|
|
33497
33741
|
columns,
|
|
@@ -33501,7 +33745,7 @@ var Many2ManyField = (props) => {
|
|
|
33501
33745
|
handleCheckBoxAll
|
|
33502
33746
|
}
|
|
33503
33747
|
),
|
|
33504
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
33748
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33505
33749
|
TableBody,
|
|
33506
33750
|
{
|
|
33507
33751
|
tableGroupController,
|
|
@@ -33541,16 +33785,16 @@ var Many2ManyField = (props) => {
|
|
|
33541
33785
|
checkedAll,
|
|
33542
33786
|
context
|
|
33543
33787
|
}
|
|
33544
|
-
) : /* @__PURE__ */ (0,
|
|
33788
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33545
33789
|
"td",
|
|
33546
33790
|
{
|
|
33547
33791
|
className: "w-full",
|
|
33548
33792
|
colSpan: columns?.length + 2,
|
|
33549
|
-
children: /* @__PURE__ */ (0,
|
|
33793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33550
33794
|
"div",
|
|
33551
33795
|
{
|
|
33552
33796
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33553
|
-
children: /* @__PURE__ */ (0,
|
|
33797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(EmptyTable, {})
|
|
33554
33798
|
}
|
|
33555
33799
|
)
|
|
33556
33800
|
}
|
|
@@ -33561,9 +33805,9 @@ var Many2ManyField = (props) => {
|
|
|
33561
33805
|
}
|
|
33562
33806
|
) }) })
|
|
33563
33807
|
}
|
|
33564
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
33565
|
-
/* @__PURE__ */ (0,
|
|
33566
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33808
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(LayerLoading, {}),
|
|
33809
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33810
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33567
33811
|
"button",
|
|
33568
33812
|
{
|
|
33569
33813
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33573,7 +33817,7 @@ var Many2ManyField = (props) => {
|
|
|
33573
33817
|
children: t3("choose")
|
|
33574
33818
|
}
|
|
33575
33819
|
),
|
|
33576
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33820
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33577
33821
|
"button",
|
|
33578
33822
|
{
|
|
33579
33823
|
type: "button",
|
|
@@ -33589,7 +33833,7 @@ var Many2ManyField = (props) => {
|
|
|
33589
33833
|
children: t3("new")
|
|
33590
33834
|
}
|
|
33591
33835
|
),
|
|
33592
|
-
/* @__PURE__ */ (0,
|
|
33836
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33593
33837
|
"button",
|
|
33594
33838
|
{
|
|
33595
33839
|
type: "button",
|
|
@@ -33610,16 +33854,16 @@ var Many2ManyField = (props) => {
|
|
|
33610
33854
|
};
|
|
33611
33855
|
|
|
33612
33856
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33613
|
-
var
|
|
33614
|
-
var
|
|
33857
|
+
var import_react68 = __toESM(require("react"));
|
|
33858
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
33615
33859
|
var CustomMenuList2 = (props) => {
|
|
33616
33860
|
const { t: t3 } = useI18n();
|
|
33617
33861
|
const { options: options2, children, selectProps } = props;
|
|
33618
33862
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33619
|
-
const limitedChildren =
|
|
33620
|
-
return /* @__PURE__ */ (0,
|
|
33863
|
+
const limitedChildren = import_react68.default.Children.toArray(children).slice(0, 10);
|
|
33864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33621
33865
|
limitedChildren,
|
|
33622
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33866
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
33623
33867
|
"button",
|
|
33624
33868
|
{
|
|
33625
33869
|
type: "button",
|
|
@@ -33662,14 +33906,14 @@ var Many2OneField = (props) => {
|
|
|
33662
33906
|
const { t: t3 } = useI18n();
|
|
33663
33907
|
if (!isForm && !isEditTable) {
|
|
33664
33908
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33665
|
-
return /* @__PURE__ */ (0,
|
|
33909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
33666
33910
|
allowShowDetail && renderDetail({
|
|
33667
33911
|
idToolTip: String(name2) + Number(index4),
|
|
33668
33912
|
model: options2?.model ?? relation,
|
|
33669
33913
|
context: contextObject,
|
|
33670
33914
|
idForm: id
|
|
33671
33915
|
}),
|
|
33672
|
-
/* @__PURE__ */ (0,
|
|
33916
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33673
33917
|
"span",
|
|
33674
33918
|
{
|
|
33675
33919
|
className: "cursor-pointer",
|
|
@@ -33680,20 +33924,20 @@ var Many2OneField = (props) => {
|
|
|
33680
33924
|
)
|
|
33681
33925
|
] });
|
|
33682
33926
|
}
|
|
33683
|
-
return /* @__PURE__ */ (0,
|
|
33927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
33684
33928
|
allowShowDetail && renderDetail({
|
|
33685
33929
|
idToolTip: String(name2),
|
|
33686
33930
|
model: options2?.model ?? relation,
|
|
33687
33931
|
context: contextObject,
|
|
33688
33932
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33689
33933
|
}),
|
|
33690
|
-
/* @__PURE__ */ (0,
|
|
33934
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33691
33935
|
"div",
|
|
33692
33936
|
{
|
|
33693
33937
|
id: name2,
|
|
33694
33938
|
"data-tooltip-id": name2,
|
|
33695
33939
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33696
|
-
children: /* @__PURE__ */ (0,
|
|
33940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33697
33941
|
Controller,
|
|
33698
33942
|
{
|
|
33699
33943
|
name: name2 ?? "",
|
|
@@ -33713,13 +33957,13 @@ var Many2OneField = (props) => {
|
|
|
33713
33957
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33714
33958
|
(option) => option.value === tempSelectedOption?.value
|
|
33715
33959
|
) : currentValue ? currentValue : null;
|
|
33716
|
-
(0,
|
|
33960
|
+
(0, import_react68.useEffect)(() => {
|
|
33717
33961
|
if (error2 && selectedOption) {
|
|
33718
33962
|
methods?.clearErrors(name2);
|
|
33719
33963
|
}
|
|
33720
33964
|
}, [selectedOption]);
|
|
33721
|
-
return /* @__PURE__ */ (0,
|
|
33722
|
-
/* @__PURE__ */ (0,
|
|
33965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "h-full", children: [
|
|
33966
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33723
33967
|
StateManagedSelect$1,
|
|
33724
33968
|
{
|
|
33725
33969
|
menuShouldScrollIntoView: false,
|
|
@@ -33796,7 +34040,7 @@ var Many2OneField = (props) => {
|
|
|
33796
34040
|
})
|
|
33797
34041
|
},
|
|
33798
34042
|
components: {
|
|
33799
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
34043
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33800
34044
|
CustomMenuList2,
|
|
33801
34045
|
{
|
|
33802
34046
|
...menuListProps,
|
|
@@ -33807,13 +34051,13 @@ var Many2OneField = (props) => {
|
|
|
33807
34051
|
}
|
|
33808
34052
|
),
|
|
33809
34053
|
IndicatorSeparator: () => null,
|
|
33810
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
34054
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33811
34055
|
},
|
|
33812
34056
|
isDisabled: readonly,
|
|
33813
34057
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33814
34058
|
}
|
|
33815
34059
|
),
|
|
33816
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
34060
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33817
34061
|
] });
|
|
33818
34062
|
}
|
|
33819
34063
|
}
|
|
@@ -33824,7 +34068,7 @@ var Many2OneField = (props) => {
|
|
|
33824
34068
|
};
|
|
33825
34069
|
|
|
33826
34070
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33827
|
-
var
|
|
34071
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
33828
34072
|
var StatusbarDurationField = (props) => {
|
|
33829
34073
|
const {
|
|
33830
34074
|
disabled,
|
|
@@ -33834,14 +34078,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33834
34078
|
defaultValue,
|
|
33835
34079
|
setModalStatus
|
|
33836
34080
|
} = props;
|
|
33837
|
-
return /* @__PURE__ */ (0,
|
|
34081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33838
34082
|
"div",
|
|
33839
34083
|
{
|
|
33840
34084
|
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,
|
|
34085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
34086
|
+
/* @__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
34087
|
const value = option?.id === defaultValue;
|
|
33844
|
-
return /* @__PURE__ */ (0,
|
|
34088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33845
34089
|
"label",
|
|
33846
34090
|
{
|
|
33847
34091
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33851,7 +34095,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33851
34095
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33852
34096
|
`,
|
|
33853
34097
|
children: [
|
|
33854
|
-
/* @__PURE__ */ (0,
|
|
34098
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33855
34099
|
"input",
|
|
33856
34100
|
{
|
|
33857
34101
|
type: "radio",
|
|
@@ -33861,7 +34105,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33861
34105
|
}
|
|
33862
34106
|
),
|
|
33863
34107
|
option?.name,
|
|
33864
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
34108
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33865
34109
|
"div",
|
|
33866
34110
|
{
|
|
33867
34111
|
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 +34120,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33876
34120
|
}) }),
|
|
33877
34121
|
dataResponse?.records?.some(
|
|
33878
34122
|
(item) => item?.fold && item.id !== defaultValue
|
|
33879
|
-
) && /* @__PURE__ */ (0,
|
|
34123
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33880
34124
|
"div",
|
|
33881
34125
|
{
|
|
33882
34126
|
onClick: () => setModalStatus(!modelStatus),
|
|
33883
34127
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33884
34128
|
children: [
|
|
33885
|
-
/* @__PURE__ */ (0,
|
|
33886
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
34129
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(MoreIcon, {}),
|
|
34130
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33887
34131
|
"div",
|
|
33888
34132
|
{
|
|
33889
34133
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33892,7 +34136,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33892
34136
|
(item) => item?.fold && item.id !== defaultValue
|
|
33893
34137
|
)?.map((option) => {
|
|
33894
34138
|
const value = option?.id === defaultValue;
|
|
33895
|
-
return /* @__PURE__ */ (0,
|
|
34139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33896
34140
|
"div",
|
|
33897
34141
|
{
|
|
33898
34142
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33913,15 +34157,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33913
34157
|
};
|
|
33914
34158
|
|
|
33915
34159
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33916
|
-
var
|
|
33917
|
-
var
|
|
34160
|
+
var import_react69 = require("react");
|
|
34161
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
33918
34162
|
var StatusBarOptionField = (props) => {
|
|
33919
34163
|
const { selection, defaultValue } = props;
|
|
33920
|
-
const memoizedStatusOptions = (0,
|
|
34164
|
+
const memoizedStatusOptions = (0, import_react69.useMemo)(() => selection, [selection]);
|
|
33921
34165
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33922
34166
|
(option) => option?.[0] === defaultValue
|
|
33923
34167
|
);
|
|
33924
|
-
return /* @__PURE__ */ (0,
|
|
34168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33925
34169
|
"div",
|
|
33926
34170
|
{
|
|
33927
34171
|
style: {
|
|
@@ -33930,8 +34174,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33930
34174
|
flexWrap: "wrap"
|
|
33931
34175
|
},
|
|
33932
34176
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33933
|
-
return /* @__PURE__ */ (0,
|
|
33934
|
-
/* @__PURE__ */ (0,
|
|
34177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
34178
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
33935
34179
|
"div",
|
|
33936
34180
|
{
|
|
33937
34181
|
style: {
|
|
@@ -33949,7 +34193,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33949
34193
|
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
34194
|
},
|
|
33951
34195
|
children: [
|
|
33952
|
-
/* @__PURE__ */ (0,
|
|
34196
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33953
34197
|
"span",
|
|
33954
34198
|
{
|
|
33955
34199
|
style: {
|
|
@@ -33961,10 +34205,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33961
34205
|
alignItems: "center",
|
|
33962
34206
|
borderRadius: "100%"
|
|
33963
34207
|
},
|
|
33964
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
34208
|
+
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
34209
|
}
|
|
33966
34210
|
),
|
|
33967
|
-
/* @__PURE__ */ (0,
|
|
34211
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33968
34212
|
"span",
|
|
33969
34213
|
{
|
|
33970
34214
|
style: {
|
|
@@ -33977,7 +34221,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33977
34221
|
},
|
|
33978
34222
|
option?.[0]
|
|
33979
34223
|
),
|
|
33980
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
34224
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33981
34225
|
"div",
|
|
33982
34226
|
{
|
|
33983
34227
|
style: {
|
|
@@ -33993,7 +34237,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33993
34237
|
);
|
|
33994
34238
|
};
|
|
33995
34239
|
var ICMinus = () => {
|
|
33996
|
-
return /* @__PURE__ */ (0,
|
|
34240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33997
34241
|
"svg",
|
|
33998
34242
|
{
|
|
33999
34243
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34001,7 +34245,7 @@ var ICMinus = () => {
|
|
|
34001
34245
|
height: "16",
|
|
34002
34246
|
viewBox: "0 0 16 16",
|
|
34003
34247
|
fill: "none",
|
|
34004
|
-
children: /* @__PURE__ */ (0,
|
|
34248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34005
34249
|
"path",
|
|
34006
34250
|
{
|
|
34007
34251
|
d: "M4 8H12",
|
|
@@ -34015,7 +34259,7 @@ var ICMinus = () => {
|
|
|
34015
34259
|
);
|
|
34016
34260
|
};
|
|
34017
34261
|
var ICCircle = () => {
|
|
34018
|
-
return /* @__PURE__ */ (0,
|
|
34262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34019
34263
|
"svg",
|
|
34020
34264
|
{
|
|
34021
34265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34023,12 +34267,12 @@ var ICCircle = () => {
|
|
|
34023
34267
|
height: "8",
|
|
34024
34268
|
viewBox: "0 0 8 8",
|
|
34025
34269
|
fill: "none",
|
|
34026
|
-
children: /* @__PURE__ */ (0,
|
|
34270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
34027
34271
|
}
|
|
34028
34272
|
);
|
|
34029
34273
|
};
|
|
34030
34274
|
var ICCheck = () => {
|
|
34031
|
-
return /* @__PURE__ */ (0,
|
|
34275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34032
34276
|
"svg",
|
|
34033
34277
|
{
|
|
34034
34278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34036,7 +34280,7 @@ var ICCheck = () => {
|
|
|
34036
34280
|
height: "16",
|
|
34037
34281
|
viewBox: "0 0 16 16",
|
|
34038
34282
|
fill: "none",
|
|
34039
|
-
children: /* @__PURE__ */ (0,
|
|
34283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
34040
34284
|
"path",
|
|
34041
34285
|
{
|
|
34042
34286
|
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 +34294,7 @@ var ICCheck = () => {
|
|
|
34050
34294
|
};
|
|
34051
34295
|
|
|
34052
34296
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34053
|
-
var
|
|
34297
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
34054
34298
|
var DateOptionField = (props) => {
|
|
34055
34299
|
const {
|
|
34056
34300
|
name: name2,
|
|
@@ -34061,19 +34305,19 @@ var DateOptionField = (props) => {
|
|
|
34061
34305
|
string,
|
|
34062
34306
|
onChange: onChange2
|
|
34063
34307
|
} = props;
|
|
34064
|
-
return /* @__PURE__ */ (0,
|
|
34308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
34065
34309
|
Controller,
|
|
34066
34310
|
{
|
|
34067
34311
|
name: name2 ?? "",
|
|
34068
34312
|
control: methods?.control,
|
|
34069
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
34313
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
34070
34314
|
"label",
|
|
34071
34315
|
{
|
|
34072
34316
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
34073
34317
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
34074
34318
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
34075
34319
|
children: [
|
|
34076
|
-
/* @__PURE__ */ (0,
|
|
34320
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
34077
34321
|
"input",
|
|
34078
34322
|
{
|
|
34079
34323
|
type: "checkbox",
|
|
@@ -34182,6 +34426,7 @@ var DateOptionField = (props) => {
|
|
|
34182
34426
|
Search,
|
|
34183
34427
|
SearchIcon,
|
|
34184
34428
|
SearchType,
|
|
34429
|
+
SecureField,
|
|
34185
34430
|
SelectDropdownField,
|
|
34186
34431
|
SettingIcon,
|
|
34187
34432
|
StarIcon,
|