@fctc/sme-widget-ui 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.js +14 -10
- package/dist/icons.mjs +14 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +888 -694
- package/dist/index.mjs +807 -614
- package/dist/widgets.d.mts +3 -1
- package/dist/widgets.d.ts +3 -1
- package/dist/widgets.js +888 -694
- package/dist/widgets.mjs +807 -614
- package/package.json +1 -1
package/dist/widgets.mjs
CHANGED
|
@@ -8742,26 +8742,30 @@ import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
|
8742
8742
|
var EyeIcon = () => /* @__PURE__ */ jsxs7(
|
|
8743
8743
|
"svg",
|
|
8744
8744
|
{
|
|
8745
|
-
width: "20",
|
|
8746
|
-
height: "21",
|
|
8747
|
-
viewBox: "0 0 20 21",
|
|
8748
|
-
fill: "none",
|
|
8749
8745
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8746
|
+
width: "16",
|
|
8747
|
+
height: "16",
|
|
8748
|
+
viewBox: "0 0 16 16",
|
|
8749
|
+
fill: "none",
|
|
8750
8750
|
children: [
|
|
8751
8751
|
/* @__PURE__ */ jsx19(
|
|
8752
8752
|
"path",
|
|
8753
8753
|
{
|
|
8754
|
-
d: "
|
|
8755
|
-
stroke: "#
|
|
8756
|
-
strokeWidth: "1.5"
|
|
8754
|
+
d: "M10.3866 7.99995C10.3866 9.31995 9.31995 10.3866 7.99995 10.3866C6.67995 10.3866 5.61328 9.31995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C9.31995 5.61328 10.3866 6.67995 10.3866 7.99995Z",
|
|
8755
|
+
stroke: "#646566",
|
|
8756
|
+
strokeWidth: "1.5",
|
|
8757
|
+
strokeLinecap: "round",
|
|
8758
|
+
strokeLinejoin: "round"
|
|
8757
8759
|
}
|
|
8758
8760
|
),
|
|
8759
8761
|
/* @__PURE__ */ jsx19(
|
|
8760
8762
|
"path",
|
|
8761
8763
|
{
|
|
8762
|
-
d: "
|
|
8763
|
-
stroke: "#
|
|
8764
|
-
strokeWidth: "1.5"
|
|
8764
|
+
d: "M7.9999 13.5138C10.3532 13.5138 12.5466 12.1271 14.0732 9.72714C14.6732 8.78714 14.6732 7.20714 14.0732 6.26714C12.5466 3.86714 10.3532 2.48047 7.9999 2.48047C5.64656 2.48047 3.45323 3.86714 1.92656 6.26714C1.32656 7.20714 1.32656 8.78714 1.92656 9.72714C3.45323 12.1271 5.64656 13.5138 7.9999 13.5138Z",
|
|
8765
|
+
stroke: "#646566",
|
|
8766
|
+
strokeWidth: "1.5",
|
|
8767
|
+
strokeLinecap: "round",
|
|
8768
|
+
strokeLinejoin: "round"
|
|
8765
8769
|
}
|
|
8766
8770
|
)
|
|
8767
8771
|
]
|
|
@@ -16550,8 +16554,196 @@ var CharField = (props) => {
|
|
|
16550
16554
|
);
|
|
16551
16555
|
};
|
|
16552
16556
|
|
|
16553
|
-
// src/widgets/basic/
|
|
16557
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16558
|
+
import { useEffect as useEffect12, useMemo as useMemo5, useState as useState11 } from "react";
|
|
16559
|
+
|
|
16560
|
+
// src/icons/eye-hidden-icon.tsx
|
|
16554
16561
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
16562
|
+
var EyeHiddenIcon = () => {
|
|
16563
|
+
return /* @__PURE__ */ jsx79(
|
|
16564
|
+
"svg",
|
|
16565
|
+
{
|
|
16566
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16567
|
+
width: "16",
|
|
16568
|
+
height: "16",
|
|
16569
|
+
viewBox: "0 0 16 16",
|
|
16570
|
+
fill: "none",
|
|
16571
|
+
children: /* @__PURE__ */ jsx79(
|
|
16572
|
+
"path",
|
|
16573
|
+
{
|
|
16574
|
+
d: "M2.02273 4.37106C1.85957 3.99034 1.41866 3.81398 1.03793 3.97715C0.657212 4.14031 0.480849 4.58122 0.644015 4.96194L1.33337 4.6665L2.02273 4.37106ZM10.3915 8.88564L10.1168 8.18775L10.1168 8.18775L10.3915 8.88564ZM6.23722 9.29468C6.46313 8.94749 6.36481 8.48291 6.01762 8.257C5.67043 8.03109 5.20585 8.12941 4.97994 8.4766L5.60858 8.88564L6.23722 9.29468ZM4.03807 9.92413C3.81216 10.2713 3.91048 10.7359 4.25767 10.9618C4.60486 11.1877 5.06944 11.0894 5.29535 10.7422L4.66671 10.3332L4.03807 9.92413ZM15.3561 4.96194C15.5192 4.58122 15.3429 4.14031 14.9621 3.97715C14.5814 3.81398 14.1405 3.99034 13.9773 4.37106L14.6667 4.6665L15.3561 4.96194ZM12.6667 7.41906L12.1534 6.87221H12.1534L12.6667 7.41906ZM13.1364 8.94939C13.4293 9.24229 13.9041 9.24229 14.197 8.94939C14.4899 8.6565 14.4899 8.18163 14.197 7.88873L13.6667 8.41906L13.1364 8.94939ZM7.25004 10.9998C7.25004 11.4141 7.58583 11.7498 8.00004 11.7498C8.41425 11.7498 8.75004 11.4141 8.75004 10.9998H8.00004H7.25004ZM10.7047 10.7422C10.9306 11.0894 11.3952 11.1877 11.7424 10.9618C12.0896 10.7359 12.1879 10.2713 11.962 9.92413L11.3334 10.3332L10.7047 10.7422ZM3.8637 7.94939C4.1566 7.6565 4.1566 7.18163 3.8637 6.88873C3.57081 6.59584 3.09594 6.59584 2.80304 6.88873L3.33337 7.41906L3.8637 7.94939ZM1.80304 7.88873C1.51015 8.18163 1.51015 8.6565 1.80304 8.94939C2.09594 9.24229 2.57081 9.24229 2.8637 8.94939L2.33337 8.41906L1.80304 7.88873ZM8.00004 9.33317V8.58317C5.94282 8.58317 4.46137 7.56111 3.4663 6.4895C2.96899 5.95393 2.60371 5.41601 2.36326 5.01206C2.24346 4.81079 2.15582 4.64476 2.09925 4.53161C2.07099 4.4751 2.05057 4.43196 2.03785 4.40441C2.03149 4.39065 2.02706 4.3808 2.02455 4.37514C2.02329 4.37231 2.02251 4.37054 2.02221 4.36984C2.02206 4.3695 2.02203 4.36942 2.02211 4.36963C2.02216 4.36973 2.02223 4.3699 2.02233 4.37014C2.02239 4.37026 2.02249 4.37049 2.02251 4.37055C2.02262 4.3708 2.02273 4.37106 1.33337 4.6665C0.644015 4.96194 0.644145 4.96225 0.644283 4.96257C0.644339 4.9627 0.644484 4.96304 0.644597 4.9633C0.644822 4.96382 0.645079 4.96442 0.645367 4.96508C0.645943 4.96641 0.646645 4.96803 0.647473 4.96993C0.64913 4.97372 0.651291 4.97864 0.65396 4.98464C0.659298 4.99664 0.666671 5.013 0.6761 5.03341C0.694953 5.07423 0.722061 5.13135 0.757606 5.20243C0.828639 5.3445 0.933705 5.54305 1.07432 5.77928C1.35471 6.25033 1.78109 6.87907 2.36711 7.51018C3.53871 8.7719 5.3906 10.0832 8.00004 10.0832V9.33317ZM10.3915 8.88564L10.1168 8.18775C9.49772 8.43143 8.7951 8.58317 8.00004 8.58317V9.33317V10.0832C8.9916 10.0832 9.88017 9.89291 10.6662 9.58352L10.3915 8.88564ZM5.60858 8.88564L4.97994 8.4766L4.03807 9.92413L4.66671 10.3332L5.29535 10.7422L6.23722 9.29468L5.60858 8.88564ZM14.6667 4.6665C13.9773 4.37106 13.9774 4.37091 13.9775 4.37076C13.9775 4.37072 13.9776 4.37058 13.9776 4.37049C13.9777 4.37032 13.9777 4.37018 13.9778 4.37005C13.9779 4.3698 13.978 4.36964 13.978 4.36957C13.9781 4.36941 13.978 4.36961 13.9777 4.37014C13.9773 4.37121 13.9762 4.37363 13.9745 4.37736C13.9712 4.38483 13.9655 4.39752 13.9573 4.41503C13.941 4.45007 13.915 4.50434 13.8791 4.5747C13.8072 4.71559 13.6963 4.91998 13.5448 5.1631C13.2405 5.65149 12.7799 6.28423 12.1534 6.87221L12.6667 7.41906L13.18 7.96591C13.9259 7.26575 14.4653 6.52221 14.8179 5.95636C14.9949 5.67235 15.1266 5.43013 15.2153 5.25619C15.2597 5.16913 15.2935 5.09893 15.3168 5.04886C15.3285 5.02381 15.3376 5.00378 15.3441 4.98916C15.3474 4.98186 15.35 4.9759 15.352 4.97135C15.353 4.96907 15.3538 4.96714 15.3545 4.96557C15.3548 4.96479 15.3551 4.96409 15.3554 4.96349C15.3555 4.96319 15.3557 4.96291 15.3558 4.96265C15.3558 4.96252 15.3559 4.96234 15.3559 4.96228C15.356 4.96211 15.3561 4.96194 14.6667 4.6665ZM12.6667 7.41906L12.1534 6.87221C11.5987 7.39287 10.9224 7.87068 10.1168 8.18775L10.3915 8.88564L10.6662 9.58352C11.684 9.18292 12.5176 8.58764 13.18 7.96591L12.6667 7.41906ZM12.6667 7.41906L12.1364 7.94939L13.1364 8.94939L13.6667 8.41906L14.197 7.88873L13.197 6.88873L12.6667 7.41906ZM8.00004 9.33317H7.25004V10.9998H8.00004H8.75004V9.33317H8.00004ZM10.3915 8.88564L9.76286 9.29468L10.7047 10.7422L11.3334 10.3332L11.962 9.92413L11.0201 8.4766L10.3915 8.88564ZM3.33337 7.41906L2.80304 6.88873L1.80304 7.88873L2.33337 8.41906L2.8637 8.94939L3.8637 7.94939L3.33337 7.41906Z",
|
|
16575
|
+
fill: "#646566"
|
|
16576
|
+
}
|
|
16577
|
+
)
|
|
16578
|
+
}
|
|
16579
|
+
);
|
|
16580
|
+
};
|
|
16581
|
+
|
|
16582
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16583
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16584
|
+
function isSensitive(widget) {
|
|
16585
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
16586
|
+
}
|
|
16587
|
+
function EyeIconComponent({ open }) {
|
|
16588
|
+
return open ? /* @__PURE__ */ jsx80(EyeIcon, {}) : /* @__PURE__ */ jsx80(EyeHiddenIcon, {});
|
|
16589
|
+
}
|
|
16590
|
+
var SecureField = (props) => {
|
|
16591
|
+
const {
|
|
16592
|
+
name: name2,
|
|
16593
|
+
readonly,
|
|
16594
|
+
placeholder,
|
|
16595
|
+
required,
|
|
16596
|
+
invisible,
|
|
16597
|
+
methods,
|
|
16598
|
+
onChange: onChange2,
|
|
16599
|
+
string = name2,
|
|
16600
|
+
widget,
|
|
16601
|
+
min: min3,
|
|
16602
|
+
max: max3,
|
|
16603
|
+
special,
|
|
16604
|
+
upcase,
|
|
16605
|
+
digit,
|
|
16606
|
+
regex,
|
|
16607
|
+
className,
|
|
16608
|
+
value,
|
|
16609
|
+
defaultValue,
|
|
16610
|
+
isForm,
|
|
16611
|
+
isEditTable
|
|
16612
|
+
} = props;
|
|
16613
|
+
const { t: t3 } = useI18n();
|
|
16614
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
16615
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
16616
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
16617
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
16618
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
16619
|
+
return message2;
|
|
16620
|
+
};
|
|
16621
|
+
if (!isForm && !isEditTable) {
|
|
16622
|
+
const propValue = value || defaultValue;
|
|
16623
|
+
return /* @__PURE__ */ jsx80("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
16624
|
+
}
|
|
16625
|
+
return /* @__PURE__ */ jsx80(
|
|
16626
|
+
Controller,
|
|
16627
|
+
{
|
|
16628
|
+
name: String(name2),
|
|
16629
|
+
control: methods.control,
|
|
16630
|
+
rules: {
|
|
16631
|
+
...required && !invisible ? {
|
|
16632
|
+
required: {
|
|
16633
|
+
value: true,
|
|
16634
|
+
message: `${string} ${t3("must_required")}`
|
|
16635
|
+
}
|
|
16636
|
+
} : {},
|
|
16637
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
16638
|
+
pattern: {
|
|
16639
|
+
value: new RegExp(regex),
|
|
16640
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
16641
|
+
}
|
|
16642
|
+
} : {}
|
|
16643
|
+
},
|
|
16644
|
+
render: ({
|
|
16645
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
16646
|
+
fieldState: { error: error2 }
|
|
16647
|
+
}) => {
|
|
16648
|
+
const { setError, clearErrors } = methods;
|
|
16649
|
+
const [showPlain, setShowPlain] = useState11(false);
|
|
16650
|
+
const realValue = useMemo5(
|
|
16651
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
16652
|
+
[value2]
|
|
16653
|
+
);
|
|
16654
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
16655
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
16656
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
16657
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
16658
|
+
useEffect12(() => {
|
|
16659
|
+
if (canToggle) setShowPlain(false);
|
|
16660
|
+
}, [canToggle]);
|
|
16661
|
+
useEffect12(() => {
|
|
16662
|
+
if (value2) clearErrors(name2);
|
|
16663
|
+
}, [value2, clearErrors, name2]);
|
|
16664
|
+
return /* @__PURE__ */ jsxs52("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
16665
|
+
isCappedToken && shouldMask && /* @__PURE__ */ jsx80(
|
|
16666
|
+
"div",
|
|
16667
|
+
{
|
|
16668
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
16669
|
+
"aria-hidden": "true",
|
|
16670
|
+
children: maskedDisplay
|
|
16671
|
+
}
|
|
16672
|
+
),
|
|
16673
|
+
/* @__PURE__ */ jsx80(
|
|
16674
|
+
"input",
|
|
16675
|
+
{
|
|
16676
|
+
value: realValue,
|
|
16677
|
+
onChange: (e3) => {
|
|
16678
|
+
if (readonly) return;
|
|
16679
|
+
const inputValue = e3.target.value ?? "";
|
|
16680
|
+
fieldOnchange(inputValue);
|
|
16681
|
+
clearErrors(name2);
|
|
16682
|
+
},
|
|
16683
|
+
onBlur: (e3) => {
|
|
16684
|
+
if (readonly) return;
|
|
16685
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
16686
|
+
if (!inputValue && required && !invisible) {
|
|
16687
|
+
setError(name2, {
|
|
16688
|
+
type: "required",
|
|
16689
|
+
message: `${string} ${t3("must_required")}`
|
|
16690
|
+
});
|
|
16691
|
+
return;
|
|
16692
|
+
}
|
|
16693
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
16694
|
+
setError(name2, {
|
|
16695
|
+
type: "pattern",
|
|
16696
|
+
message: getPasswordMessage2(
|
|
16697
|
+
min3,
|
|
16698
|
+
max3,
|
|
16699
|
+
upcase,
|
|
16700
|
+
digit,
|
|
16701
|
+
special
|
|
16702
|
+
)
|
|
16703
|
+
});
|
|
16704
|
+
return;
|
|
16705
|
+
}
|
|
16706
|
+
fieldOnchange(inputValue);
|
|
16707
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
16708
|
+
clearErrors(name2);
|
|
16709
|
+
},
|
|
16710
|
+
readOnly: readonly,
|
|
16711
|
+
disabled: readonly,
|
|
16712
|
+
placeholder,
|
|
16713
|
+
required: !invisible && required,
|
|
16714
|
+
style: {
|
|
16715
|
+
...isCappedToken && shouldMask ? {
|
|
16716
|
+
WebkitTextSecurity: "none",
|
|
16717
|
+
color: "transparent",
|
|
16718
|
+
caretColor: void 0
|
|
16719
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
16720
|
+
},
|
|
16721
|
+
onCopy: (e3) => {
|
|
16722
|
+
if (shouldMask) e3.preventDefault();
|
|
16723
|
+
},
|
|
16724
|
+
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
|
|
16725
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
16726
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
16727
|
+
}
|
|
16728
|
+
),
|
|
16729
|
+
canToggle && !isCappedToken && /* @__PURE__ */ jsx80(
|
|
16730
|
+
"button",
|
|
16731
|
+
{
|
|
16732
|
+
type: "button",
|
|
16733
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
16734
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
16735
|
+
children: /* @__PURE__ */ jsx80(EyeIconComponent, { open: showPlain })
|
|
16736
|
+
}
|
|
16737
|
+
),
|
|
16738
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx80("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16739
|
+
] });
|
|
16740
|
+
}
|
|
16741
|
+
}
|
|
16742
|
+
);
|
|
16743
|
+
};
|
|
16744
|
+
|
|
16745
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16746
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
16555
16747
|
var CheckboxField = (props) => {
|
|
16556
16748
|
const {
|
|
16557
16749
|
name: name2,
|
|
@@ -16566,9 +16758,9 @@ var CheckboxField = (props) => {
|
|
|
16566
16758
|
} = props;
|
|
16567
16759
|
if (!isForm) {
|
|
16568
16760
|
if (name2 === "is_active" || name2 === "active") {
|
|
16569
|
-
return /* @__PURE__ */
|
|
16761
|
+
return /* @__PURE__ */ jsx81(ActiveBadgeField, { type: value });
|
|
16570
16762
|
} else {
|
|
16571
|
-
return /* @__PURE__ */
|
|
16763
|
+
return /* @__PURE__ */ jsx81(
|
|
16572
16764
|
"input",
|
|
16573
16765
|
{
|
|
16574
16766
|
type: "checkbox",
|
|
@@ -16579,12 +16771,12 @@ var CheckboxField = (props) => {
|
|
|
16579
16771
|
);
|
|
16580
16772
|
}
|
|
16581
16773
|
}
|
|
16582
|
-
return /* @__PURE__ */
|
|
16774
|
+
return /* @__PURE__ */ jsx81(
|
|
16583
16775
|
Controller,
|
|
16584
16776
|
{
|
|
16585
16777
|
name: name2 ?? "",
|
|
16586
16778
|
control: methods?.control,
|
|
16587
|
-
render: ({ field }) => /* @__PURE__ */
|
|
16779
|
+
render: ({ field }) => /* @__PURE__ */ jsx81(
|
|
16588
16780
|
"div",
|
|
16589
16781
|
{
|
|
16590
16782
|
className: "flex items-center gap-2",
|
|
@@ -16597,7 +16789,7 @@ var CheckboxField = (props) => {
|
|
|
16597
16789
|
onChange2(name2 ?? "", checked);
|
|
16598
16790
|
}
|
|
16599
16791
|
},
|
|
16600
|
-
children: /* @__PURE__ */
|
|
16792
|
+
children: /* @__PURE__ */ jsx81(
|
|
16601
16793
|
"input",
|
|
16602
16794
|
{
|
|
16603
16795
|
...field,
|
|
@@ -16624,21 +16816,21 @@ var CheckboxField = (props) => {
|
|
|
16624
16816
|
};
|
|
16625
16817
|
|
|
16626
16818
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16627
|
-
import { useEffect as
|
|
16628
|
-
import { Fragment as Fragment19, jsx as
|
|
16819
|
+
import { useEffect as useEffect13, useRef as useRef6, useState as useState12 } from "react";
|
|
16820
|
+
import { Fragment as Fragment19, jsx as jsx82, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16629
16821
|
var ColorWrapper = (props) => {
|
|
16630
16822
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
16631
16823
|
const { t: t3 } = useI18n();
|
|
16632
|
-
const [selectedColor, setSelectedColor] =
|
|
16633
|
-
const [showFullColors, setIsShowFullColor] =
|
|
16824
|
+
const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
|
|
16825
|
+
const [showFullColors, setIsShowFullColor] = useState12(false);
|
|
16634
16826
|
const pickColorsRef = useRef6(null);
|
|
16635
|
-
|
|
16827
|
+
useEffect13(() => {
|
|
16636
16828
|
setSelectedColor(colors2[defaultColor]);
|
|
16637
16829
|
}, [defaultColor]);
|
|
16638
16830
|
const handleShowFullColors = () => {
|
|
16639
16831
|
setIsShowFullColor(!showFullColors);
|
|
16640
16832
|
};
|
|
16641
|
-
|
|
16833
|
+
useEffect13(() => {
|
|
16642
16834
|
const handleClickOutside = (event) => {
|
|
16643
16835
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
16644
16836
|
setIsShowFullColor(false);
|
|
@@ -16649,8 +16841,8 @@ var ColorWrapper = (props) => {
|
|
|
16649
16841
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16650
16842
|
};
|
|
16651
16843
|
}, []);
|
|
16652
|
-
return /* @__PURE__ */
|
|
16653
|
-
/* @__PURE__ */
|
|
16844
|
+
return /* @__PURE__ */ jsx82("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx82("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs53("div", { children: [
|
|
16845
|
+
/* @__PURE__ */ jsx82(
|
|
16654
16846
|
"button",
|
|
16655
16847
|
{
|
|
16656
16848
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16664,7 +16856,7 @@ var ColorWrapper = (props) => {
|
|
|
16664
16856
|
}
|
|
16665
16857
|
}
|
|
16666
16858
|
),
|
|
16667
|
-
/* @__PURE__ */
|
|
16859
|
+
/* @__PURE__ */ jsx82(
|
|
16668
16860
|
M,
|
|
16669
16861
|
{
|
|
16670
16862
|
className: "",
|
|
@@ -16673,8 +16865,8 @@ var ColorWrapper = (props) => {
|
|
|
16673
16865
|
content: t3(color?.name)
|
|
16674
16866
|
}
|
|
16675
16867
|
)
|
|
16676
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
16677
|
-
/* @__PURE__ */
|
|
16868
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs53(Fragment19, { children: [
|
|
16869
|
+
/* @__PURE__ */ jsx82(
|
|
16678
16870
|
"button",
|
|
16679
16871
|
{
|
|
16680
16872
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16687,7 +16879,7 @@ var ColorWrapper = (props) => {
|
|
|
16687
16879
|
style: { backgroundColor: selectedColor?.color }
|
|
16688
16880
|
}
|
|
16689
16881
|
),
|
|
16690
|
-
/* @__PURE__ */
|
|
16882
|
+
/* @__PURE__ */ jsx82(
|
|
16691
16883
|
M,
|
|
16692
16884
|
{
|
|
16693
16885
|
place: "top",
|
|
@@ -16699,13 +16891,13 @@ var ColorWrapper = (props) => {
|
|
|
16699
16891
|
};
|
|
16700
16892
|
|
|
16701
16893
|
// src/widgets/basic/color-field/color.tsx
|
|
16702
|
-
import { jsx as
|
|
16894
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
16703
16895
|
var ColorField = (props) => {
|
|
16704
16896
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16705
16897
|
if (!isForm) {
|
|
16706
|
-
return /* @__PURE__ */
|
|
16898
|
+
return /* @__PURE__ */ jsx83(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16707
16899
|
}
|
|
16708
|
-
return /* @__PURE__ */
|
|
16900
|
+
return /* @__PURE__ */ jsx83(
|
|
16709
16901
|
Controller,
|
|
16710
16902
|
{
|
|
16711
16903
|
name: name2 ?? "",
|
|
@@ -16715,7 +16907,7 @@ var ColorField = (props) => {
|
|
|
16715
16907
|
field.onChange(color?.id);
|
|
16716
16908
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
16717
16909
|
};
|
|
16718
|
-
return /* @__PURE__ */
|
|
16910
|
+
return /* @__PURE__ */ jsx83(
|
|
16719
16911
|
ColorWrapper,
|
|
16720
16912
|
{
|
|
16721
16913
|
savePickColor: handlePickColorChange,
|
|
@@ -16729,8 +16921,8 @@ var ColorField = (props) => {
|
|
|
16729
16921
|
};
|
|
16730
16922
|
|
|
16731
16923
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
16732
|
-
import { useEffect as
|
|
16733
|
-
import { jsx as
|
|
16924
|
+
import { useEffect as useEffect14 } from "react";
|
|
16925
|
+
import { jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
16734
16926
|
var CopyLinkButtonField = (props) => {
|
|
16735
16927
|
const {
|
|
16736
16928
|
isForm,
|
|
@@ -16749,9 +16941,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
16749
16941
|
} = props;
|
|
16750
16942
|
const { t: t3 } = useI18n();
|
|
16751
16943
|
if (!isForm) {
|
|
16752
|
-
return /* @__PURE__ */
|
|
16944
|
+
return /* @__PURE__ */ jsx84("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16753
16945
|
}
|
|
16754
|
-
return /* @__PURE__ */
|
|
16946
|
+
return /* @__PURE__ */ jsx84(
|
|
16755
16947
|
Controller,
|
|
16756
16948
|
{
|
|
16757
16949
|
name: name2 ?? "",
|
|
@@ -16764,13 +16956,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
16764
16956
|
fieldState: { error: error2 }
|
|
16765
16957
|
}) => {
|
|
16766
16958
|
const { setError, clearErrors } = methods;
|
|
16767
|
-
|
|
16959
|
+
useEffect14(() => {
|
|
16768
16960
|
if (value) {
|
|
16769
16961
|
clearErrors(name2);
|
|
16770
16962
|
}
|
|
16771
16963
|
}, [value]);
|
|
16772
|
-
return /* @__PURE__ */
|
|
16773
|
-
/* @__PURE__ */
|
|
16964
|
+
return /* @__PURE__ */ jsxs54("div", { className: "relative", children: [
|
|
16965
|
+
/* @__PURE__ */ jsxs54(
|
|
16774
16966
|
"div",
|
|
16775
16967
|
{
|
|
16776
16968
|
"aria-disabled": readonly,
|
|
@@ -16779,7 +16971,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
16779
16971
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16780
16972
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
16781
16973
|
children: [
|
|
16782
|
-
/* @__PURE__ */
|
|
16974
|
+
/* @__PURE__ */ jsx84(
|
|
16783
16975
|
"input",
|
|
16784
16976
|
{
|
|
16785
16977
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -16820,19 +17012,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
16820
17012
|
`
|
|
16821
17013
|
}
|
|
16822
17014
|
),
|
|
16823
|
-
readonly && value && /* @__PURE__ */
|
|
17015
|
+
readonly && value && /* @__PURE__ */ jsx84(
|
|
16824
17016
|
"button",
|
|
16825
17017
|
{
|
|
16826
17018
|
className: "cursor-pointer",
|
|
16827
17019
|
type: "button",
|
|
16828
17020
|
onClick: () => handleCopyToClipboard(propValue),
|
|
16829
|
-
children: isCopied ? /* @__PURE__ */
|
|
17021
|
+
children: isCopied ? /* @__PURE__ */ jsx84(CheckIcon, {}) : /* @__PURE__ */ jsx84(CopyIcon, {})
|
|
16830
17022
|
}
|
|
16831
17023
|
)
|
|
16832
17024
|
]
|
|
16833
17025
|
}
|
|
16834
17026
|
),
|
|
16835
|
-
error2 && /* @__PURE__ */
|
|
17027
|
+
error2 && /* @__PURE__ */ jsx84("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16836
17028
|
] });
|
|
16837
17029
|
}
|
|
16838
17030
|
}
|
|
@@ -16840,10 +17032,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
16840
17032
|
};
|
|
16841
17033
|
|
|
16842
17034
|
// src/widgets/basic/date-field/date.tsx
|
|
16843
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
17035
|
+
import { forwardRef as forwardRef6, useEffect as useEffect18 } from "react";
|
|
16844
17036
|
|
|
16845
17037
|
// node_modules/react-datepicker/dist/index.es.js
|
|
16846
|
-
import
|
|
17038
|
+
import React10, { useRef as useRef10, useCallback as useCallback5, useEffect as useEffect16, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
16847
17039
|
|
|
16848
17040
|
// node_modules/date-fns/constants.js
|
|
16849
17041
|
var daysInYear = 365.2425;
|
|
@@ -20741,22 +20933,22 @@ function subYears(date, amount, options2) {
|
|
|
20741
20933
|
}
|
|
20742
20934
|
|
|
20743
20935
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20744
|
-
import * as
|
|
20936
|
+
import * as React9 from "react";
|
|
20745
20937
|
|
|
20746
20938
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
20747
|
-
import * as
|
|
20939
|
+
import * as React7 from "react";
|
|
20748
20940
|
import { useLayoutEffect } from "react";
|
|
20749
20941
|
var isClient = typeof document !== "undefined";
|
|
20750
20942
|
var noop2 = function noop3() {
|
|
20751
20943
|
};
|
|
20752
20944
|
var index = isClient ? useLayoutEffect : noop2;
|
|
20753
20945
|
var SafeReact = {
|
|
20754
|
-
...
|
|
20946
|
+
...React7
|
|
20755
20947
|
};
|
|
20756
20948
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
20757
20949
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
20758
20950
|
function useEffectEvent(callback) {
|
|
20759
|
-
const ref =
|
|
20951
|
+
const ref = React7.useRef(() => {
|
|
20760
20952
|
if (process.env.NODE_ENV !== "production") {
|
|
20761
20953
|
throw new Error("Cannot call an event handler while rendering.");
|
|
20762
20954
|
}
|
|
@@ -20764,7 +20956,7 @@ function useEffectEvent(callback) {
|
|
|
20764
20956
|
useSafeInsertionEffect(() => {
|
|
20765
20957
|
ref.current = callback;
|
|
20766
20958
|
});
|
|
20767
|
-
return
|
|
20959
|
+
return React7.useCallback(function() {
|
|
20768
20960
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20769
20961
|
args[_key] = arguments[_key];
|
|
20770
20962
|
}
|
|
@@ -20773,11 +20965,11 @@ function useEffectEvent(callback) {
|
|
|
20773
20965
|
}
|
|
20774
20966
|
|
|
20775
20967
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20776
|
-
import { jsx as
|
|
20968
|
+
import { jsx as jsx85, jsxs as jsxs55, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
20777
20969
|
import * as ReactDOM2 from "react-dom";
|
|
20778
20970
|
|
|
20779
20971
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
20780
|
-
import * as
|
|
20972
|
+
import * as React8 from "react";
|
|
20781
20973
|
import { useLayoutEffect as useLayoutEffect2 } from "react";
|
|
20782
20974
|
import * as ReactDOM from "react-dom";
|
|
20783
20975
|
var isClient2 = typeof document !== "undefined";
|
|
@@ -20843,7 +21035,7 @@ function roundByDPR(element, value) {
|
|
|
20843
21035
|
return Math.round(value * dpr) / dpr;
|
|
20844
21036
|
}
|
|
20845
21037
|
function useLatestRef(value) {
|
|
20846
|
-
const ref =
|
|
21038
|
+
const ref = React8.useRef(value);
|
|
20847
21039
|
index2(() => {
|
|
20848
21040
|
ref.current = value;
|
|
20849
21041
|
});
|
|
@@ -20866,7 +21058,7 @@ function useFloating(options2) {
|
|
|
20866
21058
|
whileElementsMounted,
|
|
20867
21059
|
open
|
|
20868
21060
|
} = options2;
|
|
20869
|
-
const [data, setData] =
|
|
21061
|
+
const [data, setData] = React8.useState({
|
|
20870
21062
|
x: 0,
|
|
20871
21063
|
y: 0,
|
|
20872
21064
|
strategy,
|
|
@@ -20874,19 +21066,19 @@ function useFloating(options2) {
|
|
|
20874
21066
|
middlewareData: {},
|
|
20875
21067
|
isPositioned: false
|
|
20876
21068
|
});
|
|
20877
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21069
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
20878
21070
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
20879
21071
|
setLatestMiddleware(middleware2);
|
|
20880
21072
|
}
|
|
20881
|
-
const [_reference, _setReference] =
|
|
20882
|
-
const [_floating, _setFloating] =
|
|
20883
|
-
const setReference =
|
|
21073
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21074
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21075
|
+
const setReference = React8.useCallback((node2) => {
|
|
20884
21076
|
if (node2 !== referenceRef.current) {
|
|
20885
21077
|
referenceRef.current = node2;
|
|
20886
21078
|
_setReference(node2);
|
|
20887
21079
|
}
|
|
20888
21080
|
}, []);
|
|
20889
|
-
const setFloating =
|
|
21081
|
+
const setFloating = React8.useCallback((node2) => {
|
|
20890
21082
|
if (node2 !== floatingRef.current) {
|
|
20891
21083
|
floatingRef.current = node2;
|
|
20892
21084
|
_setFloating(node2);
|
|
@@ -20894,14 +21086,14 @@ function useFloating(options2) {
|
|
|
20894
21086
|
}, []);
|
|
20895
21087
|
const referenceEl = externalReference || _reference;
|
|
20896
21088
|
const floatingEl = externalFloating || _floating;
|
|
20897
|
-
const referenceRef =
|
|
20898
|
-
const floatingRef =
|
|
20899
|
-
const dataRef =
|
|
21089
|
+
const referenceRef = React8.useRef(null);
|
|
21090
|
+
const floatingRef = React8.useRef(null);
|
|
21091
|
+
const dataRef = React8.useRef(data);
|
|
20900
21092
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
20901
21093
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
20902
21094
|
const platformRef = useLatestRef(platform2);
|
|
20903
21095
|
const openRef = useLatestRef(open);
|
|
20904
|
-
const update =
|
|
21096
|
+
const update = React8.useCallback(() => {
|
|
20905
21097
|
if (!referenceRef.current || !floatingRef.current) {
|
|
20906
21098
|
return;
|
|
20907
21099
|
}
|
|
@@ -20939,7 +21131,7 @@ function useFloating(options2) {
|
|
|
20939
21131
|
}));
|
|
20940
21132
|
}
|
|
20941
21133
|
}, [open]);
|
|
20942
|
-
const isMountedRef =
|
|
21134
|
+
const isMountedRef = React8.useRef(false);
|
|
20943
21135
|
index2(() => {
|
|
20944
21136
|
isMountedRef.current = true;
|
|
20945
21137
|
return () => {
|
|
@@ -20956,17 +21148,17 @@ function useFloating(options2) {
|
|
|
20956
21148
|
update();
|
|
20957
21149
|
}
|
|
20958
21150
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
20959
|
-
const refs =
|
|
21151
|
+
const refs = React8.useMemo(() => ({
|
|
20960
21152
|
reference: referenceRef,
|
|
20961
21153
|
floating: floatingRef,
|
|
20962
21154
|
setReference,
|
|
20963
21155
|
setFloating
|
|
20964
21156
|
}), [setReference, setFloating]);
|
|
20965
|
-
const elements =
|
|
21157
|
+
const elements = React8.useMemo(() => ({
|
|
20966
21158
|
reference: referenceEl,
|
|
20967
21159
|
floating: floatingEl
|
|
20968
21160
|
}), [referenceEl, floatingEl]);
|
|
20969
|
-
const floatingStyles =
|
|
21161
|
+
const floatingStyles = React8.useMemo(() => {
|
|
20970
21162
|
const initialStyles = {
|
|
20971
21163
|
position: strategy,
|
|
20972
21164
|
left: 0,
|
|
@@ -20992,7 +21184,7 @@ function useFloating(options2) {
|
|
|
20992
21184
|
top: y3
|
|
20993
21185
|
};
|
|
20994
21186
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
20995
|
-
return
|
|
21187
|
+
return React8.useMemo(() => ({
|
|
20996
21188
|
...data,
|
|
20997
21189
|
update,
|
|
20998
21190
|
refs,
|
|
@@ -21053,7 +21245,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21053
21245
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21054
21246
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21055
21247
|
var SafeReact2 = {
|
|
21056
|
-
...
|
|
21248
|
+
...React9
|
|
21057
21249
|
};
|
|
21058
21250
|
var serverHandoffComplete = false;
|
|
21059
21251
|
var count = 0;
|
|
@@ -21063,13 +21255,13 @@ var genId = () => (
|
|
|
21063
21255
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21064
21256
|
);
|
|
21065
21257
|
function useFloatingId() {
|
|
21066
|
-
const [id, setId] =
|
|
21258
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21067
21259
|
index(() => {
|
|
21068
21260
|
if (id == null) {
|
|
21069
21261
|
setId(genId());
|
|
21070
21262
|
}
|
|
21071
21263
|
}, []);
|
|
21072
|
-
|
|
21264
|
+
React9.useEffect(() => {
|
|
21073
21265
|
serverHandoffComplete = true;
|
|
21074
21266
|
}, []);
|
|
21075
21267
|
return id;
|
|
@@ -21104,7 +21296,7 @@ function error() {
|
|
|
21104
21296
|
console.error(message2);
|
|
21105
21297
|
}
|
|
21106
21298
|
}
|
|
21107
|
-
var FloatingArrow = /* @__PURE__ */
|
|
21299
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21108
21300
|
const {
|
|
21109
21301
|
context: {
|
|
21110
21302
|
placement,
|
|
@@ -21135,7 +21327,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21135
21327
|
}
|
|
21136
21328
|
}
|
|
21137
21329
|
const clipPathId = useId();
|
|
21138
|
-
const [isRTL2, setIsRTL] =
|
|
21330
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21139
21331
|
index(() => {
|
|
21140
21332
|
if (!floating) return;
|
|
21141
21333
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21171,7 +21363,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21171
21363
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21172
21364
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21173
21365
|
}[side];
|
|
21174
|
-
return /* @__PURE__ */
|
|
21366
|
+
return /* @__PURE__ */ jsxs55("svg", {
|
|
21175
21367
|
...rest,
|
|
21176
21368
|
"aria-hidden": true,
|
|
21177
21369
|
ref,
|
|
@@ -21187,18 +21379,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21187
21379
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21188
21380
|
...restStyle
|
|
21189
21381
|
},
|
|
21190
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
21382
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx85("path", {
|
|
21191
21383
|
clipPath: "url(#" + clipPathId + ")",
|
|
21192
21384
|
fill: "none",
|
|
21193
21385
|
stroke,
|
|
21194
21386
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21195
21387
|
d: dValue
|
|
21196
|
-
}), /* @__PURE__ */
|
|
21388
|
+
}), /* @__PURE__ */ jsx85("path", {
|
|
21197
21389
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21198
21390
|
d: dValue
|
|
21199
|
-
}), /* @__PURE__ */
|
|
21391
|
+
}), /* @__PURE__ */ jsx85("clipPath", {
|
|
21200
21392
|
id: clipPathId,
|
|
21201
|
-
children: /* @__PURE__ */
|
|
21393
|
+
children: /* @__PURE__ */ jsx85("rect", {
|
|
21202
21394
|
x: -halfStrokeWidth,
|
|
21203
21395
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21204
21396
|
width: width + computedStrokeWidth,
|
|
@@ -21226,13 +21418,13 @@ function createEventEmitter() {
|
|
|
21226
21418
|
}
|
|
21227
21419
|
};
|
|
21228
21420
|
}
|
|
21229
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
21230
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
21421
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21422
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21231
21423
|
var useFloatingParentNodeId = () => {
|
|
21232
21424
|
var _React$useContext;
|
|
21233
|
-
return ((_React$useContext =
|
|
21425
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
21234
21426
|
};
|
|
21235
|
-
var useFloatingTree = () =>
|
|
21427
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
21236
21428
|
function useFloatingRootContext(options2) {
|
|
21237
21429
|
const {
|
|
21238
21430
|
open = false,
|
|
@@ -21240,8 +21432,8 @@ function useFloatingRootContext(options2) {
|
|
|
21240
21432
|
elements: elementsProp
|
|
21241
21433
|
} = options2;
|
|
21242
21434
|
const floatingId = useId();
|
|
21243
|
-
const dataRef =
|
|
21244
|
-
const [events] =
|
|
21435
|
+
const dataRef = React9.useRef({});
|
|
21436
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
21245
21437
|
const nested = useFloatingParentNodeId() != null;
|
|
21246
21438
|
if (process.env.NODE_ENV !== "production") {
|
|
21247
21439
|
const optionDomReference = elementsProp.reference;
|
|
@@ -21249,7 +21441,7 @@ function useFloatingRootContext(options2) {
|
|
|
21249
21441
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
21250
21442
|
}
|
|
21251
21443
|
}
|
|
21252
|
-
const [positionReference, setPositionReference] =
|
|
21444
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
21253
21445
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
21254
21446
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
21255
21447
|
events.emit("openchange", {
|
|
@@ -21260,15 +21452,15 @@ function useFloatingRootContext(options2) {
|
|
|
21260
21452
|
});
|
|
21261
21453
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
21262
21454
|
});
|
|
21263
|
-
const refs =
|
|
21455
|
+
const refs = React9.useMemo(() => ({
|
|
21264
21456
|
setPositionReference
|
|
21265
21457
|
}), []);
|
|
21266
|
-
const elements =
|
|
21458
|
+
const elements = React9.useMemo(() => ({
|
|
21267
21459
|
reference: positionReference || elementsProp.reference || null,
|
|
21268
21460
|
floating: elementsProp.floating || null,
|
|
21269
21461
|
domReference: elementsProp.reference
|
|
21270
21462
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
21271
|
-
return
|
|
21463
|
+
return React9.useMemo(() => ({
|
|
21272
21464
|
dataRef,
|
|
21273
21465
|
open,
|
|
21274
21466
|
onOpenChange,
|
|
@@ -21295,11 +21487,11 @@ function useFloating2(options2) {
|
|
|
21295
21487
|
});
|
|
21296
21488
|
const rootContext = options2.rootContext || internalRootContext;
|
|
21297
21489
|
const computedElements = rootContext.elements;
|
|
21298
|
-
const [_domReference, setDomReference] =
|
|
21299
|
-
const [positionReference, _setPositionReference] =
|
|
21490
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
21491
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
21300
21492
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
21301
21493
|
const domReference = optionDomReference || _domReference;
|
|
21302
|
-
const domReferenceRef =
|
|
21494
|
+
const domReferenceRef = React9.useRef(null);
|
|
21303
21495
|
const tree = useFloatingTree();
|
|
21304
21496
|
index(() => {
|
|
21305
21497
|
if (domReference) {
|
|
@@ -21315,7 +21507,7 @@ function useFloating2(options2) {
|
|
|
21315
21507
|
}
|
|
21316
21508
|
}
|
|
21317
21509
|
});
|
|
21318
|
-
const setPositionReference =
|
|
21510
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
21319
21511
|
const computedPositionReference = isElement(node2) ? {
|
|
21320
21512
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
21321
21513
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -21324,7 +21516,7 @@ function useFloating2(options2) {
|
|
|
21324
21516
|
_setPositionReference(computedPositionReference);
|
|
21325
21517
|
position2.refs.setReference(computedPositionReference);
|
|
21326
21518
|
}, [position2.refs]);
|
|
21327
|
-
const setReference =
|
|
21519
|
+
const setReference = React9.useCallback((node2) => {
|
|
21328
21520
|
if (isElement(node2) || node2 === null) {
|
|
21329
21521
|
domReferenceRef.current = node2;
|
|
21330
21522
|
setDomReference(node2);
|
|
@@ -21336,17 +21528,17 @@ function useFloating2(options2) {
|
|
|
21336
21528
|
position2.refs.setReference(node2);
|
|
21337
21529
|
}
|
|
21338
21530
|
}, [position2.refs]);
|
|
21339
|
-
const refs =
|
|
21531
|
+
const refs = React9.useMemo(() => ({
|
|
21340
21532
|
...position2.refs,
|
|
21341
21533
|
setReference,
|
|
21342
21534
|
setPositionReference,
|
|
21343
21535
|
domReference: domReferenceRef
|
|
21344
21536
|
}), [position2.refs, setReference, setPositionReference]);
|
|
21345
|
-
const elements =
|
|
21537
|
+
const elements = React9.useMemo(() => ({
|
|
21346
21538
|
...position2.elements,
|
|
21347
21539
|
domReference
|
|
21348
21540
|
}), [position2.elements, domReference]);
|
|
21349
|
-
const context =
|
|
21541
|
+
const context = React9.useMemo(() => ({
|
|
21350
21542
|
...position2,
|
|
21351
21543
|
...rootContext,
|
|
21352
21544
|
refs,
|
|
@@ -21360,7 +21552,7 @@ function useFloating2(options2) {
|
|
|
21360
21552
|
node2.context = context;
|
|
21361
21553
|
}
|
|
21362
21554
|
});
|
|
21363
|
-
return
|
|
21555
|
+
return React9.useMemo(() => ({
|
|
21364
21556
|
...position2,
|
|
21365
21557
|
context,
|
|
21366
21558
|
refs,
|
|
@@ -21410,7 +21602,7 @@ function __spreadArray(to2, from2, pack) {
|
|
|
21410
21602
|
var CalendarContainer = function(_a2) {
|
|
21411
21603
|
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;
|
|
21412
21604
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
21413
|
-
return
|
|
21605
|
+
return React10.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
21414
21606
|
};
|
|
21415
21607
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
21416
21608
|
var ref = useRef10(null);
|
|
@@ -21427,7 +21619,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21427
21619
|
}
|
|
21428
21620
|
}
|
|
21429
21621
|
}, [ignoreClass]);
|
|
21430
|
-
|
|
21622
|
+
useEffect16(function() {
|
|
21431
21623
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21432
21624
|
return function() {
|
|
21433
21625
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -21438,7 +21630,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21438
21630
|
var ClickOutsideWrapper = function(_a2) {
|
|
21439
21631
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
21440
21632
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
21441
|
-
return
|
|
21633
|
+
return React10.createElement("div", { className, style, ref: function(node2) {
|
|
21442
21634
|
detectRef.current = node2;
|
|
21443
21635
|
if (containerRef) {
|
|
21444
21636
|
containerRef.current = node2;
|
|
@@ -22034,7 +22226,7 @@ var InputTime = (
|
|
|
22034
22226
|
__extends(InputTime2, _super);
|
|
22035
22227
|
function InputTime2(props) {
|
|
22036
22228
|
var _this = _super.call(this, props) || this;
|
|
22037
|
-
_this.inputRef =
|
|
22229
|
+
_this.inputRef = React10.createRef();
|
|
22038
22230
|
_this.onTimeChange = function(time) {
|
|
22039
22231
|
var _a2, _b;
|
|
22040
22232
|
_this.setState({ time });
|
|
@@ -22058,7 +22250,7 @@ var InputTime = (
|
|
|
22058
22250
|
onChange: _this.onTimeChange
|
|
22059
22251
|
});
|
|
22060
22252
|
}
|
|
22061
|
-
return
|
|
22253
|
+
return React10.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22062
22254
|
var _a3;
|
|
22063
22255
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22064
22256
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22079,14 +22271,14 @@ var InputTime = (
|
|
|
22079
22271
|
return null;
|
|
22080
22272
|
};
|
|
22081
22273
|
InputTime2.prototype.render = function() {
|
|
22082
|
-
return
|
|
22274
|
+
return React10.createElement(
|
|
22083
22275
|
"div",
|
|
22084
22276
|
{ className: "react-datepicker__input-time-container" },
|
|
22085
|
-
|
|
22086
|
-
|
|
22277
|
+
React10.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
22278
|
+
React10.createElement(
|
|
22087
22279
|
"div",
|
|
22088
22280
|
{ className: "react-datepicker-time__input-container" },
|
|
22089
|
-
|
|
22281
|
+
React10.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22090
22282
|
)
|
|
22091
22283
|
);
|
|
22092
22284
|
};
|
|
@@ -22334,11 +22526,11 @@ var Day = (
|
|
|
22334
22526
|
_this.render = function() {
|
|
22335
22527
|
return (
|
|
22336
22528
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
22337
|
-
|
|
22529
|
+
React10.createElement(
|
|
22338
22530
|
"div",
|
|
22339
22531
|
{ 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() },
|
|
22340
22532
|
_this.renderDayContents(),
|
|
22341
|
-
_this.getTitle() !== "" &&
|
|
22533
|
+
_this.getTitle() !== "" && React10.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
22342
22534
|
)
|
|
22343
22535
|
);
|
|
22344
22536
|
};
|
|
@@ -22447,7 +22639,7 @@ var WeekNumber = (
|
|
|
22447
22639
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
22448
22640
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
22449
22641
|
};
|
|
22450
|
-
return
|
|
22642
|
+
return React10.createElement("div", { ref: this.weekNumberEl, className: clsx(weekNumberClasses), "aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex() }, weekNumber);
|
|
22451
22643
|
};
|
|
22452
22644
|
return WeekNumber2;
|
|
22453
22645
|
}(Component)
|
|
@@ -22524,11 +22716,11 @@ var Week = (
|
|
|
22524
22716
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
22525
22717
|
if (_this.props.showWeekNumber) {
|
|
22526
22718
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
22527
|
-
days.push(
|
|
22719
|
+
days.push(React10.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
22528
22720
|
}
|
|
22529
22721
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
22530
22722
|
var day = addDays(startOfWeek2, offset4);
|
|
22531
|
-
return
|
|
22723
|
+
return React10.createElement(Day, _assign({}, Week2.defaultProps, _this.props, { ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix, key: day.valueOf(), day, onClick: _this.handleDayClick.bind(_this, day), onMouseEnter: _this.handleDayMouseEnter.bind(_this, day) }));
|
|
22532
22724
|
}));
|
|
22533
22725
|
};
|
|
22534
22726
|
_this.startOfWeek = function() {
|
|
@@ -22554,7 +22746,7 @@ var Week = (
|
|
|
22554
22746
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
22555
22747
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
22556
22748
|
};
|
|
22557
|
-
return
|
|
22749
|
+
return React10.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
22558
22750
|
};
|
|
22559
22751
|
return Week2;
|
|
22560
22752
|
}(Component)
|
|
@@ -22782,7 +22974,7 @@ var Month = (
|
|
|
22782
22974
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
22783
22975
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
22784
22976
|
while (true) {
|
|
22785
|
-
weeks.push(
|
|
22977
|
+
weeks.push(React10.createElement(Week, _assign({}, _this.props, { ariaLabelPrefix: _this.props.weekAriaLabelPrefix, key: i3, day: currentWeekStart, month: getMonth(_this.props.day), onDayClick: _this.handleDayClick, onDayMouseEnter: _this.handleDayMouseEnter, selected, preSelection, showWeekNumber: _this.props.showWeekNumbers })));
|
|
22786
22978
|
if (breakAfterNextPush)
|
|
22787
22979
|
break;
|
|
22788
22980
|
i3++;
|
|
@@ -23051,8 +23243,8 @@ var Month = (
|
|
|
23051
23243
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23052
23244
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23053
23245
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23054
|
-
return
|
|
23055
|
-
return
|
|
23246
|
+
return React10.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23247
|
+
return React10.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23056
23248
|
_this.onMonthClick(event, m);
|
|
23057
23249
|
}, onKeyDown: function(event) {
|
|
23058
23250
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23071,8 +23263,8 @@ var Month = (
|
|
|
23071
23263
|
_this.renderQuarters = function() {
|
|
23072
23264
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23073
23265
|
var quarters = [1, 2, 3, 4];
|
|
23074
|
-
return
|
|
23075
|
-
return
|
|
23266
|
+
return React10.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
23267
|
+
return React10.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23076
23268
|
_this.onQuarterClick(event, q3);
|
|
23077
23269
|
}, onKeyDown: function(event) {
|
|
23078
23270
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23104,7 +23296,7 @@ var Month = (
|
|
|
23104
23296
|
Month2.prototype.render = function() {
|
|
23105
23297
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23106
23298
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23107
|
-
return
|
|
23299
|
+
return React10.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : void 0, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : void 0, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
23108
23300
|
};
|
|
23109
23301
|
return Month2;
|
|
23110
23302
|
}(Component)
|
|
@@ -23120,10 +23312,10 @@ var MonthDropdownOptions = (
|
|
|
23120
23312
|
};
|
|
23121
23313
|
_this.renderOptions = function() {
|
|
23122
23314
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23123
|
-
return
|
|
23315
|
+
return React10.createElement(
|
|
23124
23316
|
"div",
|
|
23125
23317
|
{ 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 },
|
|
23126
|
-
_this.isSelectedMonth(i3) ?
|
|
23318
|
+
_this.isSelectedMonth(i3) ? React10.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23127
23319
|
month
|
|
23128
23320
|
);
|
|
23129
23321
|
});
|
|
@@ -23137,7 +23329,7 @@ var MonthDropdownOptions = (
|
|
|
23137
23329
|
return _this;
|
|
23138
23330
|
}
|
|
23139
23331
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23140
|
-
return
|
|
23332
|
+
return React10.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23141
23333
|
};
|
|
23142
23334
|
return MonthDropdownOptions2;
|
|
23143
23335
|
}(Component)
|
|
@@ -23153,24 +23345,24 @@ var MonthDropdown = (
|
|
|
23153
23345
|
};
|
|
23154
23346
|
_this.renderSelectOptions = function(monthNames) {
|
|
23155
23347
|
return monthNames.map(function(m, i3) {
|
|
23156
|
-
return
|
|
23348
|
+
return React10.createElement("option", { key: m, value: i3 }, m);
|
|
23157
23349
|
});
|
|
23158
23350
|
};
|
|
23159
23351
|
_this.renderSelectMode = function(monthNames) {
|
|
23160
|
-
return
|
|
23352
|
+
return React10.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23161
23353
|
return _this.onChange(parseInt(e3.target.value));
|
|
23162
23354
|
} }, _this.renderSelectOptions(monthNames));
|
|
23163
23355
|
};
|
|
23164
23356
|
_this.renderReadView = function(visible, monthNames) {
|
|
23165
|
-
return
|
|
23357
|
+
return React10.createElement(
|
|
23166
23358
|
"div",
|
|
23167
23359
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23168
|
-
|
|
23169
|
-
|
|
23360
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
23361
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23170
23362
|
);
|
|
23171
23363
|
};
|
|
23172
23364
|
_this.renderDropdown = function(monthNames) {
|
|
23173
|
-
return
|
|
23365
|
+
return React10.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23174
23366
|
};
|
|
23175
23367
|
_this.renderScrollMode = function(monthNames) {
|
|
23176
23368
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23209,7 +23401,7 @@ var MonthDropdown = (
|
|
|
23209
23401
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
23210
23402
|
break;
|
|
23211
23403
|
}
|
|
23212
|
-
return
|
|
23404
|
+
return React10.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23213
23405
|
};
|
|
23214
23406
|
return MonthDropdown2;
|
|
23215
23407
|
}(Component)
|
|
@@ -23234,10 +23426,10 @@ var MonthYearDropdownOptions = (
|
|
|
23234
23426
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
23235
23427
|
var monthYearPoint = getTime(monthYear);
|
|
23236
23428
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
23237
|
-
return
|
|
23429
|
+
return React10.createElement(
|
|
23238
23430
|
"div",
|
|
23239
23431
|
{ 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 },
|
|
23240
|
-
isSameMonthYear ?
|
|
23432
|
+
isSameMonthYear ? React10.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
23241
23433
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
23242
23434
|
);
|
|
23243
23435
|
});
|
|
@@ -23258,7 +23450,7 @@ var MonthYearDropdownOptions = (
|
|
|
23258
23450
|
"react-datepicker__month-year-dropdown": true,
|
|
23259
23451
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
23260
23452
|
});
|
|
23261
|
-
return
|
|
23453
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23262
23454
|
};
|
|
23263
23455
|
return MonthYearDropdownOptions2;
|
|
23264
23456
|
}(Component)
|
|
@@ -23278,7 +23470,7 @@ var MonthYearDropdown = (
|
|
|
23278
23470
|
var options2 = [];
|
|
23279
23471
|
while (!isAfter(currDate, lastDate)) {
|
|
23280
23472
|
var timePoint = getTime(currDate);
|
|
23281
|
-
options2.push(
|
|
23473
|
+
options2.push(React10.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
23282
23474
|
currDate = addMonths(currDate, 1);
|
|
23283
23475
|
}
|
|
23284
23476
|
return options2;
|
|
@@ -23287,19 +23479,19 @@ var MonthYearDropdown = (
|
|
|
23287
23479
|
_this.onChange(parseInt(event.target.value));
|
|
23288
23480
|
};
|
|
23289
23481
|
_this.renderSelectMode = function() {
|
|
23290
|
-
return
|
|
23482
|
+
return React10.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23291
23483
|
};
|
|
23292
23484
|
_this.renderReadView = function(visible) {
|
|
23293
23485
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
23294
|
-
return
|
|
23486
|
+
return React10.createElement(
|
|
23295
23487
|
"div",
|
|
23296
23488
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
23297
|
-
|
|
23298
|
-
|
|
23489
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
23490
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
23299
23491
|
);
|
|
23300
23492
|
};
|
|
23301
23493
|
_this.renderDropdown = function() {
|
|
23302
|
-
return
|
|
23494
|
+
return React10.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23303
23495
|
};
|
|
23304
23496
|
_this.renderScrollMode = function() {
|
|
23305
23497
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23334,7 +23526,7 @@ var MonthYearDropdown = (
|
|
|
23334
23526
|
renderedDropdown = this.renderSelectMode();
|
|
23335
23527
|
break;
|
|
23336
23528
|
}
|
|
23337
|
-
return
|
|
23529
|
+
return React10.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23338
23530
|
};
|
|
23339
23531
|
return MonthYearDropdown2;
|
|
23340
23532
|
}(Component)
|
|
@@ -23432,7 +23624,7 @@ var Time = (
|
|
|
23432
23624
|
return prev2;
|
|
23433
23625
|
}, times[0]);
|
|
23434
23626
|
return times.map(function(time) {
|
|
23435
|
-
return
|
|
23627
|
+
return React10.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
23436
23628
|
if (time === timeToFocus) {
|
|
23437
23629
|
_this.centerLi = li;
|
|
23438
23630
|
}
|
|
@@ -23443,14 +23635,14 @@ var Time = (
|
|
|
23443
23635
|
};
|
|
23444
23636
|
_this.renderTimeCaption = function() {
|
|
23445
23637
|
if (_this.props.showTimeCaption === false) {
|
|
23446
|
-
return
|
|
23638
|
+
return React10.createElement(React10.Fragment, null);
|
|
23447
23639
|
}
|
|
23448
|
-
return
|
|
23640
|
+
return React10.createElement(
|
|
23449
23641
|
"div",
|
|
23450
23642
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
23451
23643
|
_this.header = header;
|
|
23452
23644
|
} },
|
|
23453
|
-
|
|
23645
|
+
React10.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
23454
23646
|
);
|
|
23455
23647
|
};
|
|
23456
23648
|
return _this;
|
|
@@ -23497,17 +23689,17 @@ var Time = (
|
|
|
23497
23689
|
var _this = this;
|
|
23498
23690
|
var _a2;
|
|
23499
23691
|
var height = this.state.height;
|
|
23500
|
-
return
|
|
23692
|
+
return React10.createElement(
|
|
23501
23693
|
"div",
|
|
23502
23694
|
{ 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" : "") },
|
|
23503
23695
|
this.renderTimeCaption(),
|
|
23504
|
-
|
|
23696
|
+
React10.createElement(
|
|
23505
23697
|
"div",
|
|
23506
23698
|
{ className: "react-datepicker__time" },
|
|
23507
|
-
|
|
23699
|
+
React10.createElement(
|
|
23508
23700
|
"div",
|
|
23509
23701
|
{ className: "react-datepicker__time-box" },
|
|
23510
|
-
|
|
23702
|
+
React10.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
23511
23703
|
_this.list = list;
|
|
23512
23704
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
23513
23705
|
)
|
|
@@ -23765,7 +23957,7 @@ var Year = (
|
|
|
23765
23957
|
}
|
|
23766
23958
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
23767
23959
|
var _loop_1 = function(y4) {
|
|
23768
|
-
yearsList.push(
|
|
23960
|
+
yearsList.push(React10.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
23769
23961
|
_this.onYearClick(event, y4);
|
|
23770
23962
|
}, onKeyDown: function(event) {
|
|
23771
23963
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23787,10 +23979,10 @@ var Year = (
|
|
|
23787
23979
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
23788
23980
|
_loop_1(y3);
|
|
23789
23981
|
}
|
|
23790
|
-
return
|
|
23982
|
+
return React10.createElement(
|
|
23791
23983
|
"div",
|
|
23792
23984
|
{ className: "react-datepicker__year" },
|
|
23793
|
-
|
|
23985
|
+
React10.createElement("div", { className: "react-datepicker__year-wrapper", onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : void 0, onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : void 0 }, yearsList)
|
|
23794
23986
|
);
|
|
23795
23987
|
};
|
|
23796
23988
|
return Year2;
|
|
@@ -23822,10 +24014,10 @@ var YearDropdownOptions = (
|
|
|
23822
24014
|
_this.renderOptions = function() {
|
|
23823
24015
|
var selectedYear = _this.props.year;
|
|
23824
24016
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
23825
|
-
return
|
|
24017
|
+
return React10.createElement(
|
|
23826
24018
|
"div",
|
|
23827
24019
|
{ 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 },
|
|
23828
|
-
selectedYear === year ?
|
|
24020
|
+
selectedYear === year ? React10.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
23829
24021
|
year
|
|
23830
24022
|
);
|
|
23831
24023
|
});
|
|
@@ -23834,19 +24026,19 @@ var YearDropdownOptions = (
|
|
|
23834
24026
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
23835
24027
|
return year === maxYear;
|
|
23836
24028
|
})) {
|
|
23837
|
-
options2.unshift(
|
|
24029
|
+
options2.unshift(React10.createElement(
|
|
23838
24030
|
"div",
|
|
23839
24031
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
23840
|
-
|
|
24032
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
23841
24033
|
));
|
|
23842
24034
|
}
|
|
23843
24035
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
23844
24036
|
return year === minYear;
|
|
23845
24037
|
})) {
|
|
23846
|
-
options2.push(
|
|
24038
|
+
options2.push(React10.createElement(
|
|
23847
24039
|
"div",
|
|
23848
24040
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
23849
|
-
|
|
24041
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
23850
24042
|
));
|
|
23851
24043
|
}
|
|
23852
24044
|
return options2;
|
|
@@ -23894,7 +24086,7 @@ var YearDropdownOptions = (
|
|
|
23894
24086
|
"react-datepicker__year-dropdown": true,
|
|
23895
24087
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
23896
24088
|
});
|
|
23897
|
-
return
|
|
24089
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23898
24090
|
};
|
|
23899
24091
|
return YearDropdownOptions2;
|
|
23900
24092
|
}(Component)
|
|
@@ -23913,7 +24105,7 @@ var YearDropdown = (
|
|
|
23913
24105
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
23914
24106
|
var options2 = [];
|
|
23915
24107
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
23916
|
-
options2.push(
|
|
24108
|
+
options2.push(React10.createElement("option", { key: i3, value: i3 }, i3));
|
|
23917
24109
|
}
|
|
23918
24110
|
return options2;
|
|
23919
24111
|
};
|
|
@@ -23921,20 +24113,20 @@ var YearDropdown = (
|
|
|
23921
24113
|
_this.onChange(parseInt(event.target.value));
|
|
23922
24114
|
};
|
|
23923
24115
|
_this.renderSelectMode = function() {
|
|
23924
|
-
return
|
|
24116
|
+
return React10.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23925
24117
|
};
|
|
23926
24118
|
_this.renderReadView = function(visible) {
|
|
23927
|
-
return
|
|
24119
|
+
return React10.createElement(
|
|
23928
24120
|
"div",
|
|
23929
24121
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
23930
24122
|
return _this.toggleDropdown(event);
|
|
23931
24123
|
} },
|
|
23932
|
-
|
|
23933
|
-
|
|
24124
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24125
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
23934
24126
|
);
|
|
23935
24127
|
};
|
|
23936
24128
|
_this.renderDropdown = function() {
|
|
23937
|
-
return
|
|
24129
|
+
return React10.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23938
24130
|
};
|
|
23939
24131
|
_this.renderScrollMode = function() {
|
|
23940
24132
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23984,7 +24176,7 @@ var YearDropdown = (
|
|
|
23984
24176
|
renderedDropdown = this.renderSelectMode();
|
|
23985
24177
|
break;
|
|
23986
24178
|
}
|
|
23987
|
-
return
|
|
24179
|
+
return React10.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23988
24180
|
};
|
|
23989
24181
|
return YearDropdown2;
|
|
23990
24182
|
}(Component)
|
|
@@ -24158,13 +24350,13 @@ var Calendar = (
|
|
|
24158
24350
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24159
24351
|
var dayNames = [];
|
|
24160
24352
|
if (_this.props.showWeekNumbers) {
|
|
24161
|
-
dayNames.push(
|
|
24353
|
+
dayNames.push(React10.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24162
24354
|
}
|
|
24163
24355
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24164
24356
|
var day = addDays(startOfWeek2, offset4);
|
|
24165
24357
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24166
24358
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24167
|
-
return
|
|
24359
|
+
return React10.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
24168
24360
|
}));
|
|
24169
24361
|
};
|
|
24170
24362
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -24233,10 +24425,10 @@ var Calendar = (
|
|
|
24233
24425
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24234
24426
|
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;
|
|
24235
24427
|
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;
|
|
24236
|
-
return
|
|
24428
|
+
return React10.createElement(
|
|
24237
24429
|
"button",
|
|
24238
24430
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
24239
|
-
|
|
24431
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
24240
24432
|
);
|
|
24241
24433
|
};
|
|
24242
24434
|
_this.increaseYear = function() {
|
|
@@ -24298,10 +24490,10 @@ var Calendar = (
|
|
|
24298
24490
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24299
24491
|
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;
|
|
24300
24492
|
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;
|
|
24301
|
-
return
|
|
24493
|
+
return React10.createElement(
|
|
24302
24494
|
"button",
|
|
24303
24495
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
24304
|
-
|
|
24496
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
24305
24497
|
);
|
|
24306
24498
|
};
|
|
24307
24499
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -24318,7 +24510,7 @@ var Calendar = (
|
|
|
24318
24510
|
if (_this.props.showMonthYearDropdown) {
|
|
24319
24511
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
24320
24512
|
}
|
|
24321
|
-
return
|
|
24513
|
+
return React10.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
24322
24514
|
};
|
|
24323
24515
|
_this.renderYearDropdown = function(overrideHide) {
|
|
24324
24516
|
if (overrideHide === void 0) {
|
|
@@ -24327,7 +24519,7 @@ var Calendar = (
|
|
|
24327
24519
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
24328
24520
|
return;
|
|
24329
24521
|
}
|
|
24330
|
-
return
|
|
24522
|
+
return React10.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
24331
24523
|
};
|
|
24332
24524
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
24333
24525
|
if (overrideHide === void 0) {
|
|
@@ -24336,7 +24528,7 @@ var Calendar = (
|
|
|
24336
24528
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
24337
24529
|
return;
|
|
24338
24530
|
}
|
|
24339
|
-
return
|
|
24531
|
+
return React10.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
24340
24532
|
};
|
|
24341
24533
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
24342
24534
|
if (overrideHide === void 0) {
|
|
@@ -24345,7 +24537,7 @@ var Calendar = (
|
|
|
24345
24537
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
24346
24538
|
return;
|
|
24347
24539
|
}
|
|
24348
|
-
return
|
|
24540
|
+
return React10.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
24349
24541
|
};
|
|
24350
24542
|
_this.handleTodayButtonClick = function(event) {
|
|
24351
24543
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -24355,22 +24547,22 @@ var Calendar = (
|
|
|
24355
24547
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
24356
24548
|
return;
|
|
24357
24549
|
}
|
|
24358
|
-
return
|
|
24550
|
+
return React10.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
24359
24551
|
};
|
|
24360
24552
|
_this.renderDefaultHeader = function(_a2) {
|
|
24361
24553
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
24362
|
-
return
|
|
24554
|
+
return React10.createElement(
|
|
24363
24555
|
"div",
|
|
24364
24556
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
24365
24557
|
_this.renderCurrentMonth(monthDate),
|
|
24366
|
-
|
|
24558
|
+
React10.createElement(
|
|
24367
24559
|
"div",
|
|
24368
24560
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
24369
24561
|
_this.renderMonthDropdown(i3 !== 0),
|
|
24370
24562
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
24371
24563
|
_this.renderYearDropdown(i3 !== 0)
|
|
24372
24564
|
),
|
|
24373
|
-
|
|
24565
|
+
React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24374
24566
|
);
|
|
24375
24567
|
};
|
|
24376
24568
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -24384,18 +24576,18 @@ var Calendar = (
|
|
|
24384
24576
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
24385
24577
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
24386
24578
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
24387
|
-
return
|
|
24579
|
+
return React10.createElement(
|
|
24388
24580
|
"div",
|
|
24389
24581
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
24390
24582
|
(_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 })),
|
|
24391
|
-
showDayNames &&
|
|
24583
|
+
showDayNames && React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24392
24584
|
);
|
|
24393
24585
|
};
|
|
24394
24586
|
_this.renderYearHeader = function(_a2) {
|
|
24395
24587
|
var monthDate = _a2.monthDate;
|
|
24396
24588
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
24397
24589
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
24398
|
-
return
|
|
24590
|
+
return React10.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
24399
24591
|
};
|
|
24400
24592
|
_this.renderHeader = function(_a2) {
|
|
24401
24593
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -24425,13 +24617,13 @@ var Calendar = (
|
|
|
24425
24617
|
var monthKey = "month-".concat(i3);
|
|
24426
24618
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
24427
24619
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
24428
|
-
monthList.push(
|
|
24620
|
+
monthList.push(React10.createElement(
|
|
24429
24621
|
"div",
|
|
24430
24622
|
{ key: monthKey, ref: function(div) {
|
|
24431
24623
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
24432
24624
|
}, className: "react-datepicker__month-container" },
|
|
24433
24625
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
24434
|
-
|
|
24626
|
+
React10.createElement(Month, _assign({}, Calendar2.defaultProps, _this.props, { containerRef: _this.containerRef, ariaLabelPrefix: _this.props.monthAriaLabelPrefix, day: monthDate, onDayClick: _this.handleDayClick, handleOnKeyDown: _this.props.handleOnDayKeyDown, handleOnMonthKeyDown: _this.props.handleOnKeyDown, onDayMouseEnter: _this.handleDayMouseEnter, onMouseLeave: _this.handleMonthMouseLeave, orderInDisplay: i3, selectingDate: _this.state.selectingDate, monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart }))
|
|
24435
24627
|
));
|
|
24436
24628
|
}
|
|
24437
24629
|
return monthList;
|
|
@@ -24441,18 +24633,18 @@ var Calendar = (
|
|
|
24441
24633
|
return;
|
|
24442
24634
|
}
|
|
24443
24635
|
if (_this.props.showYearPicker) {
|
|
24444
|
-
return
|
|
24636
|
+
return React10.createElement(
|
|
24445
24637
|
"div",
|
|
24446
24638
|
{ className: "react-datepicker__year--container" },
|
|
24447
24639
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
24448
|
-
|
|
24640
|
+
React10.createElement(Year, _assign({}, Calendar2.defaultProps, _this.props, { selectingDate: _this.state.selectingDate, date: _this.state.date, onDayClick: _this.handleDayClick, clearSelectingDate: _this.clearSelectingDate, onYearMouseEnter: _this.handleYearMouseEnter, onYearMouseLeave: _this.handleYearMouseLeave }))
|
|
24449
24641
|
);
|
|
24450
24642
|
}
|
|
24451
24643
|
return;
|
|
24452
24644
|
};
|
|
24453
24645
|
_this.renderTimeSection = function() {
|
|
24454
24646
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
24455
|
-
return
|
|
24647
|
+
return React10.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
24456
24648
|
}
|
|
24457
24649
|
return;
|
|
24458
24650
|
};
|
|
@@ -24461,7 +24653,7 @@ var Calendar = (
|
|
|
24461
24653
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
24462
24654
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
24463
24655
|
if (_this.props.showTimeInput) {
|
|
24464
|
-
return
|
|
24656
|
+
return React10.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
24465
24657
|
}
|
|
24466
24658
|
return;
|
|
24467
24659
|
};
|
|
@@ -24476,11 +24668,11 @@ var Calendar = (
|
|
|
24476
24668
|
} else {
|
|
24477
24669
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
24478
24670
|
}
|
|
24479
|
-
return
|
|
24671
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
24480
24672
|
};
|
|
24481
24673
|
_this.renderChildren = function() {
|
|
24482
24674
|
if (_this.props.children) {
|
|
24483
|
-
return
|
|
24675
|
+
return React10.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
24484
24676
|
}
|
|
24485
24677
|
return;
|
|
24486
24678
|
};
|
|
@@ -24534,13 +24726,13 @@ var Calendar = (
|
|
|
24534
24726
|
};
|
|
24535
24727
|
Calendar2.prototype.render = function() {
|
|
24536
24728
|
var Container = this.props.container || CalendarContainer;
|
|
24537
|
-
return
|
|
24729
|
+
return React10.createElement(
|
|
24538
24730
|
ClickOutsideWrapper,
|
|
24539
24731
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
24540
|
-
|
|
24732
|
+
React10.createElement(
|
|
24541
24733
|
"div",
|
|
24542
24734
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
24543
|
-
|
|
24735
|
+
React10.createElement(
|
|
24544
24736
|
Container,
|
|
24545
24737
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
24546
24738
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -24565,11 +24757,11 @@ var CalendarIcon2 = function(_a2) {
|
|
|
24565
24757
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
24566
24758
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
24567
24759
|
if (typeof icon === "string") {
|
|
24568
|
-
return
|
|
24760
|
+
return React10.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
24569
24761
|
}
|
|
24570
|
-
if (
|
|
24762
|
+
if (React10.isValidElement(icon)) {
|
|
24571
24763
|
var iconElement_1 = icon;
|
|
24572
|
-
return
|
|
24764
|
+
return React10.cloneElement(iconElement_1, {
|
|
24573
24765
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
24574
24766
|
onClick: function(event) {
|
|
24575
24767
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -24581,10 +24773,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
24581
24773
|
}
|
|
24582
24774
|
});
|
|
24583
24775
|
}
|
|
24584
|
-
return
|
|
24776
|
+
return React10.createElement(
|
|
24585
24777
|
"svg",
|
|
24586
24778
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
24587
|
-
|
|
24779
|
+
React10.createElement("path", { d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z" })
|
|
24588
24780
|
);
|
|
24589
24781
|
};
|
|
24590
24782
|
var Portal = (
|
|
@@ -24650,12 +24842,12 @@ var TabLoop = (
|
|
|
24650
24842
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
24651
24843
|
return this.props.children;
|
|
24652
24844
|
}
|
|
24653
|
-
return
|
|
24845
|
+
return React10.createElement(
|
|
24654
24846
|
"div",
|
|
24655
24847
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
24656
|
-
|
|
24848
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
24657
24849
|
this.props.children,
|
|
24658
|
-
|
|
24850
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
24659
24851
|
);
|
|
24660
24852
|
};
|
|
24661
24853
|
TabLoop2.defaultProps = {
|
|
@@ -24675,7 +24867,7 @@ function withFloating(Component3) {
|
|
|
24675
24867
|
arrow3({ element: arrowRef })
|
|
24676
24868
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
24677
24869
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
24678
|
-
return
|
|
24870
|
+
return React10.createElement(Component3, _assign({}, componentProps));
|
|
24679
24871
|
};
|
|
24680
24872
|
return WithFloating;
|
|
24681
24873
|
}
|
|
@@ -24700,14 +24892,14 @@ var PopperComponent = (
|
|
|
24700
24892
|
var popper = void 0;
|
|
24701
24893
|
if (!hidePopper) {
|
|
24702
24894
|
var classes = clsx("react-datepicker-popper", className);
|
|
24703
|
-
popper =
|
|
24895
|
+
popper = React10.createElement(
|
|
24704
24896
|
TabLoop,
|
|
24705
24897
|
{ enableTabLoop },
|
|
24706
|
-
|
|
24898
|
+
React10.createElement(
|
|
24707
24899
|
"div",
|
|
24708
24900
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
24709
24901
|
popperComponent,
|
|
24710
|
-
showArrow &&
|
|
24902
|
+
showArrow && React10.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
24711
24903
|
)
|
|
24712
24904
|
);
|
|
24713
24905
|
}
|
|
@@ -24715,13 +24907,13 @@ var PopperComponent = (
|
|
|
24715
24907
|
popper = createElement5(this.props.popperContainer, {}, popper);
|
|
24716
24908
|
}
|
|
24717
24909
|
if (portalId && !hidePopper) {
|
|
24718
|
-
popper =
|
|
24910
|
+
popper = React10.createElement(Portal, { portalId, portalHost }, popper);
|
|
24719
24911
|
}
|
|
24720
24912
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
24721
|
-
return
|
|
24722
|
-
|
|
24913
|
+
return React10.createElement(
|
|
24914
|
+
React10.Fragment,
|
|
24723
24915
|
null,
|
|
24724
|
-
|
|
24916
|
+
React10.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
24725
24917
|
popper
|
|
24726
24918
|
);
|
|
24727
24919
|
};
|
|
@@ -25340,7 +25532,7 @@ var DatePicker = (
|
|
|
25340
25532
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
25341
25533
|
return null;
|
|
25342
25534
|
}
|
|
25343
|
-
return
|
|
25535
|
+
return React10.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
25344
25536
|
_this.calendar = elem;
|
|
25345
25537
|
} }, _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);
|
|
25346
25538
|
};
|
|
@@ -25376,13 +25568,13 @@ var DatePicker = (
|
|
|
25376
25568
|
}));
|
|
25377
25569
|
}
|
|
25378
25570
|
}
|
|
25379
|
-
return
|
|
25571
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
25380
25572
|
};
|
|
25381
25573
|
_this.renderDateInput = function() {
|
|
25382
25574
|
var _a2, _b;
|
|
25383
25575
|
var _c;
|
|
25384
25576
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
25385
|
-
var customInput = _this.props.customInput ||
|
|
25577
|
+
var customInput = _this.props.customInput || React10.createElement("input", { type: "text" });
|
|
25386
25578
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
25387
25579
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
25388
25580
|
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, {
|
|
@@ -25402,7 +25594,7 @@ var DatePicker = (
|
|
|
25402
25594
|
_this.renderClearButton = function() {
|
|
25403
25595
|
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;
|
|
25404
25596
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
25405
|
-
return
|
|
25597
|
+
return React10.createElement("button", { type: "button", className: clsx("react-datepicker__close-icon", clearButtonClassName, { "react-datepicker__close-icon--disabled": disabled }), disabled, "aria-label": ariaLabelClose, onClick: _this.onClearClick, title: clearButtonTitle, tabIndex: -1 });
|
|
25406
25598
|
} else {
|
|
25407
25599
|
return null;
|
|
25408
25600
|
}
|
|
@@ -25503,10 +25695,10 @@ var DatePicker = (
|
|
|
25503
25695
|
if (calendarIconClassname) {
|
|
25504
25696
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
25505
25697
|
}
|
|
25506
|
-
return
|
|
25698
|
+
return React10.createElement(
|
|
25507
25699
|
"div",
|
|
25508
25700
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
25509
|
-
showIcon &&
|
|
25701
|
+
showIcon && React10.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
25510
25702
|
onClick: this.toggleCalendar
|
|
25511
25703
|
} : null)),
|
|
25512
25704
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -25519,22 +25711,22 @@ var DatePicker = (
|
|
|
25519
25711
|
if (this.props.inline)
|
|
25520
25712
|
return calendar;
|
|
25521
25713
|
if (this.props.withPortal) {
|
|
25522
|
-
var portalContainer = this.state.open ?
|
|
25714
|
+
var portalContainer = this.state.open ? React10.createElement(
|
|
25523
25715
|
TabLoop,
|
|
25524
25716
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
25525
|
-
|
|
25717
|
+
React10.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
25526
25718
|
) : null;
|
|
25527
25719
|
if (this.state.open && this.props.portalId) {
|
|
25528
|
-
portalContainer =
|
|
25720
|
+
portalContainer = React10.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
25529
25721
|
}
|
|
25530
|
-
return
|
|
25722
|
+
return React10.createElement(
|
|
25531
25723
|
"div",
|
|
25532
25724
|
null,
|
|
25533
25725
|
this.renderInputContainer(),
|
|
25534
25726
|
portalContainer
|
|
25535
25727
|
);
|
|
25536
25728
|
}
|
|
25537
|
-
return
|
|
25729
|
+
return React10.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
25538
25730
|
};
|
|
25539
25731
|
return DatePicker2;
|
|
25540
25732
|
}(Component)
|
|
@@ -25680,13 +25872,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
25680
25872
|
}
|
|
25681
25873
|
|
|
25682
25874
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
25683
|
-
import { useState as
|
|
25875
|
+
import { useState as useState15, useCallback as useCallback6 } from "react";
|
|
25684
25876
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
25685
25877
|
function useStateManager(_ref3) {
|
|
25686
25878
|
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);
|
|
25687
|
-
var _useState =
|
|
25688
|
-
var _useState3 =
|
|
25689
|
-
var _useState5 =
|
|
25879
|
+
var _useState = useState15(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
25880
|
+
var _useState3 = useState15(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
25881
|
+
var _useState5 = useState15(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
25690
25882
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
25691
25883
|
if (typeof propsOnChange === "function") {
|
|
25692
25884
|
propsOnChange(value2, actionMeta);
|
|
@@ -25738,8 +25930,8 @@ function _extends() {
|
|
|
25738
25930
|
}
|
|
25739
25931
|
|
|
25740
25932
|
// node_modules/react-select/dist/react-select.esm.js
|
|
25741
|
-
import * as
|
|
25742
|
-
import { forwardRef as forwardRef5, useMemo as
|
|
25933
|
+
import * as React15 from "react";
|
|
25934
|
+
import { forwardRef as forwardRef5, useMemo as useMemo10 } from "react";
|
|
25743
25935
|
|
|
25744
25936
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
25745
25937
|
function _classCallCheck(a2, n4) {
|
|
@@ -25846,11 +26038,11 @@ function _toConsumableArray(r4) {
|
|
|
25846
26038
|
}
|
|
25847
26039
|
|
|
25848
26040
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
25849
|
-
import * as
|
|
25850
|
-
import { useMemo as
|
|
26041
|
+
import * as React14 from "react";
|
|
26042
|
+
import { useMemo as useMemo9, Fragment as Fragment23, useRef as useRef13, useCallback as useCallback8, useEffect as useEffect17, Component as Component2 } from "react";
|
|
25851
26043
|
|
|
25852
26044
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
25853
|
-
import * as
|
|
26045
|
+
import * as React12 from "react";
|
|
25854
26046
|
import { useContext as useContext7, forwardRef as forwardRef4 } from "react";
|
|
25855
26047
|
|
|
25856
26048
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
@@ -27015,18 +27207,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27015
27207
|
}
|
|
27016
27208
|
|
|
27017
27209
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27018
|
-
import * as
|
|
27210
|
+
import * as React11 from "react";
|
|
27019
27211
|
var isBrowser3 = typeof document !== "undefined";
|
|
27020
27212
|
var syncFallback = function syncFallback2(create) {
|
|
27021
27213
|
return create();
|
|
27022
27214
|
};
|
|
27023
|
-
var useInsertionEffect3 =
|
|
27215
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27024
27216
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27025
27217
|
|
|
27026
27218
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27027
27219
|
var isDevelopment3 = false;
|
|
27028
27220
|
var isBrowser4 = typeof document !== "undefined";
|
|
27029
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
27221
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27030
27222
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27031
27223
|
// because this module is primarily intended for the browser and node
|
|
27032
27224
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27052,7 +27244,7 @@ if (!isBrowser4) {
|
|
|
27052
27244
|
cache = createCache({
|
|
27053
27245
|
key: "css"
|
|
27054
27246
|
});
|
|
27055
|
-
return /* @__PURE__ */
|
|
27247
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27056
27248
|
value: cache
|
|
27057
27249
|
}, func(props, cache));
|
|
27058
27250
|
} else {
|
|
@@ -27061,7 +27253,7 @@ if (!isBrowser4) {
|
|
|
27061
27253
|
};
|
|
27062
27254
|
};
|
|
27063
27255
|
}
|
|
27064
|
-
var ThemeContext = /* @__PURE__ */
|
|
27256
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27065
27257
|
var hasOwn = {}.hasOwnProperty;
|
|
27066
27258
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27067
27259
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27088,7 +27280,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27088
27280
|
serializedNames += " " + next2.name;
|
|
27089
27281
|
next2 = next2.next;
|
|
27090
27282
|
}
|
|
27091
|
-
return /* @__PURE__ */
|
|
27283
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27092
27284
|
__html: rules
|
|
27093
27285
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27094
27286
|
}
|
|
@@ -27107,7 +27299,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27107
27299
|
} else if (props.className != null) {
|
|
27108
27300
|
className = props.className + " ";
|
|
27109
27301
|
}
|
|
27110
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
27302
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27111
27303
|
className += cache.key + "-" + serialized.name;
|
|
27112
27304
|
var newProps = {};
|
|
27113
27305
|
for (var _key2 in props) {
|
|
@@ -27119,22 +27311,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27119
27311
|
if (ref) {
|
|
27120
27312
|
newProps.ref = ref;
|
|
27121
27313
|
}
|
|
27122
|
-
return /* @__PURE__ */
|
|
27314
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27123
27315
|
cache,
|
|
27124
27316
|
serialized,
|
|
27125
27317
|
isStringTag: typeof WrappedComponent === "string"
|
|
27126
|
-
}), /* @__PURE__ */
|
|
27318
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27127
27319
|
});
|
|
27128
27320
|
var Emotion$1 = Emotion;
|
|
27129
27321
|
|
|
27130
27322
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27131
|
-
import * as
|
|
27323
|
+
import * as React13 from "react";
|
|
27132
27324
|
var import_extends2 = __toESM(require_extends());
|
|
27133
27325
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27134
|
-
var
|
|
27326
|
+
var jsx86 = function jsx87(type, props) {
|
|
27135
27327
|
var args = arguments;
|
|
27136
27328
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27137
|
-
return
|
|
27329
|
+
return React13.createElement.apply(void 0, args);
|
|
27138
27330
|
}
|
|
27139
27331
|
var argsLength = args.length;
|
|
27140
27332
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27143,13 +27335,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27143
27335
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27144
27336
|
createElementArgArray[i3] = args[i3];
|
|
27145
27337
|
}
|
|
27146
|
-
return
|
|
27338
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27147
27339
|
};
|
|
27148
27340
|
(function(_jsx) {
|
|
27149
27341
|
var JSX;
|
|
27150
27342
|
/* @__PURE__ */ (function(_JSX) {
|
|
27151
27343
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27152
|
-
})(
|
|
27344
|
+
})(jsx86 || (jsx86 = {}));
|
|
27153
27345
|
function css() {
|
|
27154
27346
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27155
27347
|
args[_key] = arguments[_key];
|
|
@@ -27179,7 +27371,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27179
27371
|
}
|
|
27180
27372
|
|
|
27181
27373
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27182
|
-
import { useContext as useContext9, useRef as useRef12, useState as
|
|
27374
|
+
import { useContext as useContext9, useRef as useRef12, useState as useState16, useMemo as useMemo8, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
27183
27375
|
import { createPortal as createPortal4 } from "react-dom";
|
|
27184
27376
|
|
|
27185
27377
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
@@ -27526,8 +27718,8 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27526
27718
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
27527
27719
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
27528
27720
|
var ref = useRef12(null);
|
|
27529
|
-
var _useState =
|
|
27530
|
-
var _useState3 =
|
|
27721
|
+
var _useState = useState16(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
27722
|
+
var _useState3 = useState16(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
27531
27723
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
27532
27724
|
index3(function() {
|
|
27533
27725
|
var menuEl = ref.current;
|
|
@@ -27557,7 +27749,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27557
27749
|
};
|
|
27558
27750
|
var Menu = function Menu2(props) {
|
|
27559
27751
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27560
|
-
return
|
|
27752
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
27561
27753
|
menu: true
|
|
27562
27754
|
}), {
|
|
27563
27755
|
ref: innerRef
|
|
@@ -27579,7 +27771,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27579
27771
|
};
|
|
27580
27772
|
var MenuList = function MenuList2(props) {
|
|
27581
27773
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27582
|
-
return
|
|
27774
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27583
27775
|
"menu-list": true,
|
|
27584
27776
|
"menu-list--is-multi": isMulti
|
|
27585
27777
|
}), {
|
|
@@ -27599,7 +27791,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27599
27791
|
var loadingMessageCSS = noticeCSS;
|
|
27600
27792
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27601
27793
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27602
|
-
return
|
|
27794
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27603
27795
|
children,
|
|
27604
27796
|
innerProps
|
|
27605
27797
|
}), "noOptionsMessage", {
|
|
@@ -27609,7 +27801,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27609
27801
|
};
|
|
27610
27802
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27611
27803
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27612
|
-
return
|
|
27804
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27613
27805
|
children,
|
|
27614
27806
|
innerProps
|
|
27615
27807
|
}), "loadingMessage", {
|
|
@@ -27631,13 +27823,13 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27631
27823
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
27632
27824
|
var menuPortalRef = useRef12(null);
|
|
27633
27825
|
var cleanupRef = useRef12(null);
|
|
27634
|
-
var _useState5 =
|
|
27635
|
-
var portalPlacementContext =
|
|
27826
|
+
var _useState5 = useState16(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
27827
|
+
var portalPlacementContext = useMemo8(function() {
|
|
27636
27828
|
return {
|
|
27637
27829
|
setPortalPlacement
|
|
27638
27830
|
};
|
|
27639
27831
|
}, []);
|
|
27640
|
-
var _useState7 =
|
|
27832
|
+
var _useState7 = useState16(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
27641
27833
|
var updateComputedPosition = useCallback7(function() {
|
|
27642
27834
|
if (!controlElement) return;
|
|
27643
27835
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -27672,7 +27864,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27672
27864
|
runAutoUpdate();
|
|
27673
27865
|
}, [runAutoUpdate]);
|
|
27674
27866
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27675
|
-
var menuWrapper =
|
|
27867
|
+
var menuWrapper = jsx86("div", _extends({
|
|
27676
27868
|
ref: setMenuPortalElement
|
|
27677
27869
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27678
27870
|
offset: computedPosition.offset,
|
|
@@ -27681,7 +27873,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27681
27873
|
}), "menuPortal", {
|
|
27682
27874
|
"menu-portal": true
|
|
27683
27875
|
}), innerProps), children);
|
|
27684
|
-
return
|
|
27876
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
27685
27877
|
value: portalPlacementContext
|
|
27686
27878
|
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
27687
27879
|
};
|
|
@@ -27697,7 +27889,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27697
27889
|
};
|
|
27698
27890
|
var SelectContainer = function SelectContainer2(props) {
|
|
27699
27891
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27700
|
-
return
|
|
27892
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
27701
27893
|
"--is-disabled": isDisabled,
|
|
27702
27894
|
"--is-rtl": isRtl
|
|
27703
27895
|
}), innerProps), children);
|
|
@@ -27718,7 +27910,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
27718
27910
|
};
|
|
27719
27911
|
var ValueContainer = function ValueContainer2(props) {
|
|
27720
27912
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
27721
|
-
return
|
|
27913
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
27722
27914
|
"value-container": true,
|
|
27723
27915
|
"value-container--is-multi": isMulti,
|
|
27724
27916
|
"value-container--has-value": hasValue
|
|
@@ -27734,7 +27926,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
27734
27926
|
};
|
|
27735
27927
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
27736
27928
|
var children = props.children, innerProps = props.innerProps;
|
|
27737
|
-
return
|
|
27929
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
27738
27930
|
indicators: true
|
|
27739
27931
|
}), innerProps), children);
|
|
27740
27932
|
};
|
|
@@ -27755,7 +27947,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27755
27947
|
};
|
|
27756
27948
|
var Svg = function Svg2(_ref3) {
|
|
27757
27949
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
27758
|
-
return
|
|
27950
|
+
return jsx86("svg", _extends({
|
|
27759
27951
|
height: size4,
|
|
27760
27952
|
width: size4,
|
|
27761
27953
|
viewBox: "0 0 20 20",
|
|
@@ -27765,16 +27957,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
27765
27957
|
}, props));
|
|
27766
27958
|
};
|
|
27767
27959
|
var CrossIcon = function CrossIcon2(props) {
|
|
27768
|
-
return
|
|
27960
|
+
return jsx86(Svg, _extends({
|
|
27769
27961
|
size: 20
|
|
27770
|
-
}, props),
|
|
27962
|
+
}, props), jsx86("path", {
|
|
27771
27963
|
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"
|
|
27772
27964
|
}));
|
|
27773
27965
|
};
|
|
27774
27966
|
var DownChevron = function DownChevron2(props) {
|
|
27775
|
-
return
|
|
27967
|
+
return jsx86(Svg, _extends({
|
|
27776
27968
|
size: 20
|
|
27777
|
-
}, props),
|
|
27969
|
+
}, props), jsx86("path", {
|
|
27778
27970
|
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"
|
|
27779
27971
|
}));
|
|
27780
27972
|
};
|
|
@@ -27795,18 +27987,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
27795
27987
|
var dropdownIndicatorCSS = baseCSS;
|
|
27796
27988
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
27797
27989
|
var children = props.children, innerProps = props.innerProps;
|
|
27798
|
-
return
|
|
27990
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
27799
27991
|
indicator: true,
|
|
27800
27992
|
"dropdown-indicator": true
|
|
27801
|
-
}), innerProps), children ||
|
|
27993
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
27802
27994
|
};
|
|
27803
27995
|
var clearIndicatorCSS = baseCSS;
|
|
27804
27996
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
27805
27997
|
var children = props.children, innerProps = props.innerProps;
|
|
27806
|
-
return
|
|
27998
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
27807
27999
|
indicator: true,
|
|
27808
28000
|
"clear-indicator": true
|
|
27809
|
-
}), innerProps), children ||
|
|
28001
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
27810
28002
|
};
|
|
27811
28003
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
27812
28004
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -27822,7 +28014,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
27822
28014
|
};
|
|
27823
28015
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
27824
28016
|
var innerProps = props.innerProps;
|
|
27825
|
-
return
|
|
28017
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
27826
28018
|
"indicator-separator": true
|
|
27827
28019
|
})));
|
|
27828
28020
|
};
|
|
@@ -27846,7 +28038,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
27846
28038
|
};
|
|
27847
28039
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
27848
28040
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
27849
|
-
return
|
|
28041
|
+
return jsx86("span", {
|
|
27850
28042
|
css: /* @__PURE__ */ css({
|
|
27851
28043
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
27852
28044
|
backgroundColor: "currentColor",
|
|
@@ -27861,20 +28053,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
27861
28053
|
};
|
|
27862
28054
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
27863
28055
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
27864
|
-
return
|
|
28056
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27865
28057
|
innerProps,
|
|
27866
28058
|
isRtl,
|
|
27867
28059
|
size: size4
|
|
27868
28060
|
}), "loadingIndicator", {
|
|
27869
28061
|
indicator: true,
|
|
27870
28062
|
"loading-indicator": true
|
|
27871
|
-
}), innerProps),
|
|
28063
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
27872
28064
|
delay: 0,
|
|
27873
28065
|
offset: isRtl
|
|
27874
|
-
}),
|
|
28066
|
+
}), jsx86(LoadingDot, {
|
|
27875
28067
|
delay: 160,
|
|
27876
28068
|
offset: true
|
|
27877
|
-
}),
|
|
28069
|
+
}), jsx86(LoadingDot, {
|
|
27878
28070
|
delay: 320,
|
|
27879
28071
|
offset: !isRtl
|
|
27880
28072
|
}));
|
|
@@ -27906,7 +28098,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
27906
28098
|
};
|
|
27907
28099
|
var Control = function Control2(props) {
|
|
27908
28100
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
27909
|
-
return
|
|
28101
|
+
return jsx86("div", _extends({
|
|
27910
28102
|
ref: innerRef
|
|
27911
28103
|
}, getStyleProps(props, "control", {
|
|
27912
28104
|
control: true,
|
|
@@ -27928,15 +28120,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
27928
28120
|
};
|
|
27929
28121
|
var Group = function Group2(props) {
|
|
27930
28122
|
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;
|
|
27931
|
-
return
|
|
28123
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
27932
28124
|
group: true
|
|
27933
|
-
}), innerProps),
|
|
28125
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
27934
28126
|
selectProps,
|
|
27935
28127
|
theme,
|
|
27936
28128
|
getStyles,
|
|
27937
28129
|
getClassNames,
|
|
27938
28130
|
cx
|
|
27939
|
-
}), label),
|
|
28131
|
+
}), label), jsx86("div", null, children));
|
|
27940
28132
|
};
|
|
27941
28133
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
27942
28134
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -27958,7 +28150,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
27958
28150
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
27959
28151
|
_cleanCommonProps.data;
|
|
27960
28152
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
27961
|
-
return
|
|
28153
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
27962
28154
|
"group-heading": true
|
|
27963
28155
|
}), innerProps));
|
|
27964
28156
|
};
|
|
@@ -28010,11 +28202,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28010
28202
|
var Input = function Input2(props) {
|
|
28011
28203
|
var cx = props.cx, value = props.value;
|
|
28012
28204
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28013
|
-
return
|
|
28205
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28014
28206
|
"input-container": true
|
|
28015
28207
|
}), {
|
|
28016
28208
|
"data-value": value || ""
|
|
28017
|
-
}),
|
|
28209
|
+
}), jsx86("input", _extends({
|
|
28018
28210
|
className: cx({
|
|
28019
28211
|
input: true
|
|
28020
28212
|
}, inputClassName),
|
|
@@ -28068,35 +28260,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28068
28260
|
};
|
|
28069
28261
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28070
28262
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28071
|
-
return
|
|
28263
|
+
return jsx86("div", innerProps, children);
|
|
28072
28264
|
};
|
|
28073
28265
|
var MultiValueContainer = MultiValueGeneric;
|
|
28074
28266
|
var MultiValueLabel = MultiValueGeneric;
|
|
28075
28267
|
function MultiValueRemove(_ref5) {
|
|
28076
28268
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28077
|
-
return
|
|
28269
|
+
return jsx86("div", _extends({
|
|
28078
28270
|
role: "button"
|
|
28079
|
-
}, innerProps), children ||
|
|
28271
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28080
28272
|
size: 14
|
|
28081
28273
|
}));
|
|
28082
28274
|
}
|
|
28083
28275
|
var MultiValue = function MultiValue2(props) {
|
|
28084
28276
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28085
28277
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28086
|
-
return
|
|
28278
|
+
return jsx86(Container, {
|
|
28087
28279
|
data,
|
|
28088
28280
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28089
28281
|
"multi-value": true,
|
|
28090
28282
|
"multi-value--is-disabled": isDisabled
|
|
28091
28283
|
})), innerProps),
|
|
28092
28284
|
selectProps
|
|
28093
|
-
},
|
|
28285
|
+
}, jsx86(Label, {
|
|
28094
28286
|
data,
|
|
28095
28287
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28096
28288
|
"multi-value__label": true
|
|
28097
28289
|
})),
|
|
28098
28290
|
selectProps
|
|
28099
|
-
}, children),
|
|
28291
|
+
}, children), jsx86(Remove, {
|
|
28100
28292
|
data,
|
|
28101
28293
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28102
28294
|
"multi-value__remove": true
|
|
@@ -28129,7 +28321,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28129
28321
|
};
|
|
28130
28322
|
var Option = function Option2(props) {
|
|
28131
28323
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28132
|
-
return
|
|
28324
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28133
28325
|
option: true,
|
|
28134
28326
|
"option--is-disabled": isDisabled,
|
|
28135
28327
|
"option--is-focused": isFocused,
|
|
@@ -28153,7 +28345,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28153
28345
|
};
|
|
28154
28346
|
var Placeholder = function Placeholder2(props) {
|
|
28155
28347
|
var children = props.children, innerProps = props.innerProps;
|
|
28156
|
-
return
|
|
28348
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28157
28349
|
placeholder: true
|
|
28158
28350
|
}), innerProps), children);
|
|
28159
28351
|
};
|
|
@@ -28175,7 +28367,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28175
28367
|
};
|
|
28176
28368
|
var SingleValue = function SingleValue2(props) {
|
|
28177
28369
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28178
|
-
return
|
|
28370
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28179
28371
|
"single-value": true,
|
|
28180
28372
|
"single-value--is-disabled": isDisabled
|
|
28181
28373
|
}), innerProps), children);
|
|
@@ -28277,7 +28469,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28277
28469
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28278
28470
|
};
|
|
28279
28471
|
var A11yText = function A11yText2(props) {
|
|
28280
|
-
return
|
|
28472
|
+
return jsx86("span", _extends({
|
|
28281
28473
|
css: _ref
|
|
28282
28474
|
}, props));
|
|
28283
28475
|
};
|
|
@@ -28338,10 +28530,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28338
28530
|
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;
|
|
28339
28531
|
var ariaLabel = selectProps["aria-label"];
|
|
28340
28532
|
var ariaLive = selectProps["aria-live"];
|
|
28341
|
-
var messages =
|
|
28533
|
+
var messages = useMemo9(function() {
|
|
28342
28534
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
28343
28535
|
}, [ariaLiveMessages]);
|
|
28344
|
-
var ariaSelected =
|
|
28536
|
+
var ariaSelected = useMemo9(function() {
|
|
28345
28537
|
var message2 = "";
|
|
28346
28538
|
if (ariaSelection && messages.onChange) {
|
|
28347
28539
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -28363,7 +28555,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28363
28555
|
}
|
|
28364
28556
|
return message2;
|
|
28365
28557
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
28366
|
-
var ariaFocused =
|
|
28558
|
+
var ariaFocused = useMemo9(function() {
|
|
28367
28559
|
var focusMsg = "";
|
|
28368
28560
|
var focused = focusedOption || focusedValue;
|
|
28369
28561
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -28382,7 +28574,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28382
28574
|
}
|
|
28383
28575
|
return focusMsg;
|
|
28384
28576
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
28385
|
-
var ariaResults =
|
|
28577
|
+
var ariaResults = useMemo9(function() {
|
|
28386
28578
|
var resultsMsg = "";
|
|
28387
28579
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
28388
28580
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -28396,7 +28588,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28396
28588
|
return resultsMsg;
|
|
28397
28589
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
28398
28590
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
28399
|
-
var ariaGuidance =
|
|
28591
|
+
var ariaGuidance = useMemo9(function() {
|
|
28400
28592
|
var guidanceMsg = "";
|
|
28401
28593
|
if (messages.guidance) {
|
|
28402
28594
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -28412,18 +28604,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28412
28604
|
}
|
|
28413
28605
|
return guidanceMsg;
|
|
28414
28606
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28415
|
-
var ScreenReaderText =
|
|
28607
|
+
var ScreenReaderText = jsx86(Fragment23, null, jsx86("span", {
|
|
28416
28608
|
id: "aria-selection"
|
|
28417
|
-
}, ariaSelected),
|
|
28609
|
+
}, ariaSelected), jsx86("span", {
|
|
28418
28610
|
id: "aria-focused"
|
|
28419
|
-
}, ariaFocused),
|
|
28611
|
+
}, ariaFocused), jsx86("span", {
|
|
28420
28612
|
id: "aria-results"
|
|
28421
|
-
}, ariaResults),
|
|
28613
|
+
}, ariaResults), jsx86("span", {
|
|
28422
28614
|
id: "aria-guidance"
|
|
28423
28615
|
}, ariaGuidance));
|
|
28424
|
-
return
|
|
28616
|
+
return jsx86(Fragment23, null, jsx86(A11yText$1, {
|
|
28425
28617
|
id
|
|
28426
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28618
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
28427
28619
|
"aria-live": ariaLive,
|
|
28428
28620
|
"aria-atomic": "false",
|
|
28429
28621
|
"aria-relevant": "additions text",
|
|
@@ -28736,7 +28928,7 @@ var _excluded4 = ["innerRef"];
|
|
|
28736
28928
|
function DummyInput(_ref3) {
|
|
28737
28929
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
28738
28930
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
28739
|
-
return
|
|
28931
|
+
return jsx86("input", _extends({
|
|
28740
28932
|
ref: innerRef
|
|
28741
28933
|
}, filteredProps, {
|
|
28742
28934
|
css: /* @__PURE__ */ css({
|
|
@@ -28831,7 +29023,7 @@ function useScrollCapture(_ref3) {
|
|
|
28831
29023
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
28832
29024
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
28833
29025
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28834
|
-
|
|
29026
|
+
useEffect17(function() {
|
|
28835
29027
|
if (!isEnabled) return;
|
|
28836
29028
|
var element = scrollTarget.current;
|
|
28837
29029
|
startListening(element);
|
|
@@ -28934,7 +29126,7 @@ function useScrollLock(_ref3) {
|
|
|
28934
29126
|
}
|
|
28935
29127
|
}
|
|
28936
29128
|
}, [accountForScrollbars]);
|
|
28937
|
-
|
|
29129
|
+
useEffect17(function() {
|
|
28938
29130
|
if (!isEnabled) return;
|
|
28939
29131
|
var element = scrollTarget.current;
|
|
28940
29132
|
addScrollLock(element);
|
|
@@ -28978,7 +29170,7 @@ function ScrollManager(_ref3) {
|
|
|
28978
29170
|
setScrollCaptureTarget(element);
|
|
28979
29171
|
setScrollLockTarget(element);
|
|
28980
29172
|
};
|
|
28981
|
-
return
|
|
29173
|
+
return jsx86(Fragment23, null, lockEnabled && jsx86("div", {
|
|
28982
29174
|
onClick: blurSelectInput,
|
|
28983
29175
|
css: _ref2$1
|
|
28984
29176
|
}), children(targetRef));
|
|
@@ -28997,7 +29189,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
28997
29189
|
};
|
|
28998
29190
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
28999
29191
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29000
|
-
return
|
|
29192
|
+
return jsx86("input", {
|
|
29001
29193
|
required: true,
|
|
29002
29194
|
name: name2,
|
|
29003
29195
|
tabIndex: -1,
|
|
@@ -30138,7 +30330,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30138
30330
|
"aria-describedby": this.getElementId("placeholder")
|
|
30139
30331
|
});
|
|
30140
30332
|
if (!isSearchable) {
|
|
30141
|
-
return /* @__PURE__ */
|
|
30333
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30142
30334
|
id,
|
|
30143
30335
|
innerRef: this.getInputRef,
|
|
30144
30336
|
onBlur: this.onInputBlur,
|
|
@@ -30151,7 +30343,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30151
30343
|
value: ""
|
|
30152
30344
|
}, ariaAttributes));
|
|
30153
30345
|
}
|
|
30154
|
-
return /* @__PURE__ */
|
|
30346
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30155
30347
|
autoCapitalize: "none",
|
|
30156
30348
|
autoComplete: "off",
|
|
30157
30349
|
autoCorrect: "off",
|
|
@@ -30179,7 +30371,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30179
30371
|
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;
|
|
30180
30372
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30181
30373
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30182
|
-
return inputValue ? null : /* @__PURE__ */
|
|
30374
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30183
30375
|
key: "placeholder",
|
|
30184
30376
|
isDisabled,
|
|
30185
30377
|
isFocused,
|
|
@@ -30192,7 +30384,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30192
30384
|
return selectValue.map(function(opt, index4) {
|
|
30193
30385
|
var isOptionFocused = opt === focusedValue;
|
|
30194
30386
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
30195
|
-
return /* @__PURE__ */
|
|
30387
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
30196
30388
|
components: {
|
|
30197
30389
|
Container: MultiValueContainer2,
|
|
30198
30390
|
Label: MultiValueLabel2,
|
|
@@ -30221,7 +30413,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30221
30413
|
return null;
|
|
30222
30414
|
}
|
|
30223
30415
|
var singleValue = selectValue[0];
|
|
30224
|
-
return /* @__PURE__ */
|
|
30416
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
30225
30417
|
data: singleValue,
|
|
30226
30418
|
isDisabled
|
|
30227
30419
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -30241,7 +30433,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30241
30433
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
30242
30434
|
"aria-hidden": "true"
|
|
30243
30435
|
};
|
|
30244
|
-
return /* @__PURE__ */
|
|
30436
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
30245
30437
|
innerProps,
|
|
30246
30438
|
isFocused
|
|
30247
30439
|
}));
|
|
@@ -30257,7 +30449,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30257
30449
|
var innerProps = {
|
|
30258
30450
|
"aria-hidden": "true"
|
|
30259
30451
|
};
|
|
30260
|
-
return /* @__PURE__ */
|
|
30452
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
30261
30453
|
innerProps,
|
|
30262
30454
|
isDisabled,
|
|
30263
30455
|
isFocused
|
|
@@ -30271,7 +30463,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30271
30463
|
var commonProps = this.commonProps;
|
|
30272
30464
|
var isDisabled = this.props.isDisabled;
|
|
30273
30465
|
var isFocused = this.state.isFocused;
|
|
30274
|
-
return /* @__PURE__ */
|
|
30466
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
30275
30467
|
isDisabled,
|
|
30276
30468
|
isFocused
|
|
30277
30469
|
}));
|
|
@@ -30289,7 +30481,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30289
30481
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
30290
30482
|
"aria-hidden": "true"
|
|
30291
30483
|
};
|
|
30292
|
-
return /* @__PURE__ */
|
|
30484
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
30293
30485
|
innerProps,
|
|
30294
30486
|
isDisabled,
|
|
30295
30487
|
isFocused
|
|
@@ -30324,7 +30516,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30324
30516
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
30325
30517
|
// is not supported on Apple devices
|
|
30326
30518
|
};
|
|
30327
|
-
return /* @__PURE__ */
|
|
30519
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
30328
30520
|
innerProps,
|
|
30329
30521
|
data,
|
|
30330
30522
|
isDisabled,
|
|
@@ -30344,7 +30536,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30344
30536
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
30345
30537
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
30346
30538
|
var headingId = "".concat(groupId, "-heading");
|
|
30347
|
-
return /* @__PURE__ */
|
|
30539
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
30348
30540
|
key: groupId,
|
|
30349
30541
|
data: _data,
|
|
30350
30542
|
options: options2,
|
|
@@ -30366,13 +30558,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30366
30558
|
inputValue
|
|
30367
30559
|
});
|
|
30368
30560
|
if (message2 === null) return null;
|
|
30369
|
-
menuUI = /* @__PURE__ */
|
|
30561
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
30370
30562
|
} else {
|
|
30371
30563
|
var _message = noOptionsMessage2({
|
|
30372
30564
|
inputValue
|
|
30373
30565
|
});
|
|
30374
30566
|
if (_message === null) return null;
|
|
30375
|
-
menuUI = /* @__PURE__ */
|
|
30567
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
30376
30568
|
}
|
|
30377
30569
|
var menuPlacementProps = {
|
|
30378
30570
|
minMenuHeight,
|
|
@@ -30381,9 +30573,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30381
30573
|
menuPosition,
|
|
30382
30574
|
menuShouldScrollIntoView
|
|
30383
30575
|
};
|
|
30384
|
-
var menuElement = /* @__PURE__ */
|
|
30576
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
30385
30577
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
30386
|
-
return /* @__PURE__ */
|
|
30578
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
30387
30579
|
innerRef: ref,
|
|
30388
30580
|
innerProps: {
|
|
30389
30581
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -30391,13 +30583,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30391
30583
|
},
|
|
30392
30584
|
isLoading,
|
|
30393
30585
|
placement
|
|
30394
|
-
}), /* @__PURE__ */
|
|
30586
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
30395
30587
|
captureEnabled: captureMenuScroll,
|
|
30396
30588
|
onTopArrive: onMenuScrollToTop,
|
|
30397
30589
|
onBottomArrive: onMenuScrollToBottom,
|
|
30398
30590
|
lockEnabled: menuShouldBlockScroll
|
|
30399
30591
|
}, function(scrollTargetRef) {
|
|
30400
|
-
return /* @__PURE__ */
|
|
30592
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
30401
30593
|
innerRef: function innerRef(instance2) {
|
|
30402
30594
|
_this4.getMenuListRef(instance2);
|
|
30403
30595
|
scrollTargetRef(instance2);
|
|
@@ -30413,7 +30605,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30413
30605
|
}), menuUI);
|
|
30414
30606
|
}));
|
|
30415
30607
|
});
|
|
30416
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
30608
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
30417
30609
|
appendTo: menuPortalTarget,
|
|
30418
30610
|
controlElement: this.controlRef,
|
|
30419
30611
|
menuPlacement,
|
|
@@ -30427,7 +30619,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30427
30619
|
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;
|
|
30428
30620
|
var selectValue = this.state.selectValue;
|
|
30429
30621
|
if (required && !this.hasValue() && !isDisabled) {
|
|
30430
|
-
return /* @__PURE__ */
|
|
30622
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
30431
30623
|
name: name2,
|
|
30432
30624
|
onFocus: this.onValueInputFocus
|
|
30433
30625
|
});
|
|
@@ -30438,29 +30630,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30438
30630
|
var value = selectValue.map(function(opt) {
|
|
30439
30631
|
return _this5.getOptionValue(opt);
|
|
30440
30632
|
}).join(delimiter2);
|
|
30441
|
-
return /* @__PURE__ */
|
|
30633
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30442
30634
|
name: name2,
|
|
30443
30635
|
type: "hidden",
|
|
30444
30636
|
value
|
|
30445
30637
|
});
|
|
30446
30638
|
} else {
|
|
30447
30639
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
30448
|
-
return /* @__PURE__ */
|
|
30640
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30449
30641
|
key: "i-".concat(i3),
|
|
30450
30642
|
name: name2,
|
|
30451
30643
|
type: "hidden",
|
|
30452
30644
|
value: _this5.getOptionValue(opt)
|
|
30453
30645
|
});
|
|
30454
|
-
}) : /* @__PURE__ */
|
|
30646
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
30455
30647
|
name: name2,
|
|
30456
30648
|
type: "hidden",
|
|
30457
30649
|
value: ""
|
|
30458
30650
|
});
|
|
30459
|
-
return /* @__PURE__ */
|
|
30651
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
30460
30652
|
}
|
|
30461
30653
|
} else {
|
|
30462
30654
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
30463
|
-
return /* @__PURE__ */
|
|
30655
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30464
30656
|
name: name2,
|
|
30465
30657
|
type: "hidden",
|
|
30466
30658
|
value: _value
|
|
@@ -30473,7 +30665,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30473
30665
|
var commonProps = this.commonProps;
|
|
30474
30666
|
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;
|
|
30475
30667
|
var focusableOptions = this.getFocusableOptions();
|
|
30476
|
-
return /* @__PURE__ */
|
|
30668
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
30477
30669
|
id: this.getElementId("live-region"),
|
|
30478
30670
|
ariaSelection,
|
|
30479
30671
|
focusedOption,
|
|
@@ -30491,7 +30683,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30491
30683
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
30492
30684
|
var isFocused = this.state.isFocused;
|
|
30493
30685
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
30494
|
-
return /* @__PURE__ */
|
|
30686
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
30495
30687
|
className,
|
|
30496
30688
|
innerProps: {
|
|
30497
30689
|
id,
|
|
@@ -30499,7 +30691,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30499
30691
|
},
|
|
30500
30692
|
isDisabled,
|
|
30501
30693
|
isFocused
|
|
30502
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
30694
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
30503
30695
|
innerRef: this.getControlRef,
|
|
30504
30696
|
innerProps: {
|
|
30505
30697
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -30508,9 +30700,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30508
30700
|
isDisabled,
|
|
30509
30701
|
isFocused,
|
|
30510
30702
|
menuIsOpen
|
|
30511
|
-
}), /* @__PURE__ */
|
|
30703
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
30512
30704
|
isDisabled
|
|
30513
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
30705
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
30514
30706
|
isDisabled
|
|
30515
30707
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
30516
30708
|
}
|
|
@@ -30579,7 +30771,7 @@ var import_defineProperty3 = __toESM(require_defineProperty());
|
|
|
30579
30771
|
import "react-dom";
|
|
30580
30772
|
var StateManagedSelect = /* @__PURE__ */ forwardRef5(function(props, ref) {
|
|
30581
30773
|
var baseSelectProps = useStateManager(props);
|
|
30582
|
-
return /* @__PURE__ */
|
|
30774
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
30583
30775
|
ref
|
|
30584
30776
|
}, baseSelectProps));
|
|
30585
30777
|
});
|
|
@@ -30587,7 +30779,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30587
30779
|
|
|
30588
30780
|
// src/widgets/basic/date-field/date.tsx
|
|
30589
30781
|
var import_moment2 = __toESM(require_moment());
|
|
30590
|
-
import { Fragment as Fragment24, jsx as
|
|
30782
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
30591
30783
|
var DateField = (props) => {
|
|
30592
30784
|
const {
|
|
30593
30785
|
name: name2,
|
|
@@ -30615,8 +30807,8 @@ var DateField = (props) => {
|
|
|
30615
30807
|
} = props;
|
|
30616
30808
|
const { t: t3 } = useI18n();
|
|
30617
30809
|
const InputDateCustom = forwardRef6(
|
|
30618
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
30619
|
-
/* @__PURE__ */
|
|
30810
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs56("label", { className: `flex ${className}`, children: [
|
|
30811
|
+
/* @__PURE__ */ jsx88(
|
|
30620
30812
|
"input",
|
|
30621
30813
|
{
|
|
30622
30814
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30630,13 +30822,13 @@ var DateField = (props) => {
|
|
|
30630
30822
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30631
30823
|
}
|
|
30632
30824
|
),
|
|
30633
|
-
isForm2 && /* @__PURE__ */
|
|
30825
|
+
isForm2 && /* @__PURE__ */ jsx88(CalendarIcon, {})
|
|
30634
30826
|
] })
|
|
30635
30827
|
);
|
|
30636
30828
|
if (!isForm && !isEditTable) {
|
|
30637
|
-
return /* @__PURE__ */
|
|
30829
|
+
return /* @__PURE__ */ jsx88("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
30638
30830
|
} else {
|
|
30639
|
-
return /* @__PURE__ */
|
|
30831
|
+
return /* @__PURE__ */ jsx88(
|
|
30640
30832
|
Controller,
|
|
30641
30833
|
{
|
|
30642
30834
|
name: name2 || "",
|
|
@@ -30652,14 +30844,14 @@ var DateField = (props) => {
|
|
|
30652
30844
|
},
|
|
30653
30845
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
30654
30846
|
const { setError, clearErrors } = methods;
|
|
30655
|
-
|
|
30847
|
+
useEffect18(() => {
|
|
30656
30848
|
if (value) {
|
|
30657
30849
|
clearErrors(name2);
|
|
30658
30850
|
}
|
|
30659
30851
|
}, [value, clearErrors, name2]);
|
|
30660
30852
|
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;
|
|
30661
|
-
return /* @__PURE__ */
|
|
30662
|
-
/* @__PURE__ */
|
|
30853
|
+
return /* @__PURE__ */ jsxs56(Fragment24, { children: [
|
|
30854
|
+
/* @__PURE__ */ jsx88(
|
|
30663
30855
|
DatePicker,
|
|
30664
30856
|
{
|
|
30665
30857
|
selected: selectedDate,
|
|
@@ -30707,7 +30899,7 @@ var DateField = (props) => {
|
|
|
30707
30899
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30708
30900
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30709
30901
|
showTimeInput: showTime,
|
|
30710
|
-
customInput: /* @__PURE__ */
|
|
30902
|
+
customInput: /* @__PURE__ */ jsx88(
|
|
30711
30903
|
InputDateCustom,
|
|
30712
30904
|
{
|
|
30713
30905
|
isForm,
|
|
@@ -30725,7 +30917,7 @@ var DateField = (props) => {
|
|
|
30725
30917
|
increaseMonth,
|
|
30726
30918
|
prevMonthButtonDisabled,
|
|
30727
30919
|
nextMonthButtonDisabled
|
|
30728
|
-
}) => /* @__PURE__ */
|
|
30920
|
+
}) => /* @__PURE__ */ jsxs56(
|
|
30729
30921
|
"div",
|
|
30730
30922
|
{
|
|
30731
30923
|
style: {
|
|
@@ -30734,7 +30926,7 @@ var DateField = (props) => {
|
|
|
30734
30926
|
justifyContent: "center"
|
|
30735
30927
|
},
|
|
30736
30928
|
children: [
|
|
30737
|
-
/* @__PURE__ */
|
|
30929
|
+
/* @__PURE__ */ jsx88(
|
|
30738
30930
|
"button",
|
|
30739
30931
|
{
|
|
30740
30932
|
onClick: decreaseMonth,
|
|
@@ -30742,7 +30934,7 @@ var DateField = (props) => {
|
|
|
30742
30934
|
children: "<"
|
|
30743
30935
|
}
|
|
30744
30936
|
),
|
|
30745
|
-
/* @__PURE__ */
|
|
30937
|
+
/* @__PURE__ */ jsx88(
|
|
30746
30938
|
StateManagedSelect$1,
|
|
30747
30939
|
{
|
|
30748
30940
|
classNames: {
|
|
@@ -30768,7 +30960,7 @@ var DateField = (props) => {
|
|
|
30768
30960
|
autoFocus: true
|
|
30769
30961
|
}
|
|
30770
30962
|
),
|
|
30771
|
-
/* @__PURE__ */
|
|
30963
|
+
/* @__PURE__ */ jsx88(
|
|
30772
30964
|
StateManagedSelect$1,
|
|
30773
30965
|
{
|
|
30774
30966
|
classNames: {
|
|
@@ -30796,7 +30988,7 @@ var DateField = (props) => {
|
|
|
30796
30988
|
}))
|
|
30797
30989
|
}
|
|
30798
30990
|
),
|
|
30799
|
-
/* @__PURE__ */
|
|
30991
|
+
/* @__PURE__ */ jsx88(
|
|
30800
30992
|
"button",
|
|
30801
30993
|
{
|
|
30802
30994
|
onClick: increaseMonth,
|
|
@@ -30809,7 +31001,7 @@ var DateField = (props) => {
|
|
|
30809
31001
|
)
|
|
30810
31002
|
}
|
|
30811
31003
|
),
|
|
30812
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31004
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx88("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30813
31005
|
] });
|
|
30814
31006
|
}
|
|
30815
31007
|
}
|
|
@@ -30818,26 +31010,26 @@ var DateField = (props) => {
|
|
|
30818
31010
|
};
|
|
30819
31011
|
|
|
30820
31012
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
30821
|
-
import { jsx as
|
|
31013
|
+
import { jsx as jsx89, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
30822
31014
|
var DownLoadBinaryField = (props) => {
|
|
30823
31015
|
const { handleFileDownload } = props;
|
|
30824
31016
|
const { t: t3 } = useI18n();
|
|
30825
|
-
return /* @__PURE__ */
|
|
31017
|
+
return /* @__PURE__ */ jsxs57(
|
|
30826
31018
|
"button",
|
|
30827
31019
|
{
|
|
30828
31020
|
type: "button",
|
|
30829
31021
|
onClick: handleFileDownload,
|
|
30830
31022
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
30831
31023
|
children: [
|
|
30832
|
-
/* @__PURE__ */
|
|
30833
|
-
/* @__PURE__ */
|
|
31024
|
+
/* @__PURE__ */ jsx89(DownloadIcon, {}),
|
|
31025
|
+
/* @__PURE__ */ jsx89("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
30834
31026
|
]
|
|
30835
31027
|
}
|
|
30836
31028
|
);
|
|
30837
31029
|
};
|
|
30838
31030
|
|
|
30839
31031
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
30840
|
-
import { jsx as
|
|
31032
|
+
import { jsx as jsx90, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
30841
31033
|
var DownloadFileField = (props) => {
|
|
30842
31034
|
const {
|
|
30843
31035
|
readonly,
|
|
@@ -30849,15 +31041,15 @@ var DownloadFileField = (props) => {
|
|
|
30849
31041
|
handleFileChange,
|
|
30850
31042
|
handleFileDownload
|
|
30851
31043
|
} = props;
|
|
30852
|
-
return /* @__PURE__ */
|
|
30853
|
-
/* @__PURE__ */
|
|
31044
|
+
return /* @__PURE__ */ jsxs58("div", { className: "", children: [
|
|
31045
|
+
/* @__PURE__ */ jsxs58(
|
|
30854
31046
|
"label",
|
|
30855
31047
|
{
|
|
30856
31048
|
htmlFor: inputId,
|
|
30857
31049
|
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",
|
|
30858
31050
|
children: [
|
|
30859
|
-
file ? /* @__PURE__ */
|
|
30860
|
-
/* @__PURE__ */
|
|
31051
|
+
file ? /* @__PURE__ */ jsx90("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31052
|
+
/* @__PURE__ */ jsx90(
|
|
30861
31053
|
"input",
|
|
30862
31054
|
{
|
|
30863
31055
|
id: inputId,
|
|
@@ -30871,7 +31063,7 @@ var DownloadFileField = (props) => {
|
|
|
30871
31063
|
]
|
|
30872
31064
|
}
|
|
30873
31065
|
),
|
|
30874
|
-
file && /* @__PURE__ */
|
|
31066
|
+
file && /* @__PURE__ */ jsx90(
|
|
30875
31067
|
"button",
|
|
30876
31068
|
{
|
|
30877
31069
|
onClick: handleFileDownload,
|
|
@@ -30884,8 +31076,8 @@ var DownloadFileField = (props) => {
|
|
|
30884
31076
|
};
|
|
30885
31077
|
|
|
30886
31078
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
30887
|
-
import { useState as
|
|
30888
|
-
import { jsx as
|
|
31079
|
+
import { useState as useState17 } from "react";
|
|
31080
|
+
import { jsx as jsx91, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
30889
31081
|
var DropdownField = (props) => {
|
|
30890
31082
|
const {
|
|
30891
31083
|
options: options2,
|
|
@@ -30897,32 +31089,32 @@ var DropdownField = (props) => {
|
|
|
30897
31089
|
dropdownClassName = "",
|
|
30898
31090
|
useClickOutside: useClickOutside2
|
|
30899
31091
|
} = props;
|
|
30900
|
-
const [open, setOpen] =
|
|
31092
|
+
const [open, setOpen] = useState17(false);
|
|
30901
31093
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
30902
|
-
return /* @__PURE__ */
|
|
31094
|
+
return /* @__PURE__ */ jsxs59(
|
|
30903
31095
|
"div",
|
|
30904
31096
|
{
|
|
30905
31097
|
ref: dropdownRef,
|
|
30906
31098
|
className: `relative ${className}`,
|
|
30907
31099
|
onClick: () => setOpen(!open),
|
|
30908
31100
|
children: [
|
|
30909
|
-
/* @__PURE__ */
|
|
31101
|
+
/* @__PURE__ */ jsxs59(
|
|
30910
31102
|
"div",
|
|
30911
31103
|
{
|
|
30912
31104
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
30913
31105
|
children: [
|
|
30914
31106
|
selectedValue?.icon,
|
|
30915
|
-
/* @__PURE__ */
|
|
30916
|
-
/* @__PURE__ */
|
|
31107
|
+
/* @__PURE__ */ jsx91("span", { children: selectedValue?.label }),
|
|
31108
|
+
/* @__PURE__ */ jsx91(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
30917
31109
|
]
|
|
30918
31110
|
}
|
|
30919
31111
|
),
|
|
30920
|
-
open && /* @__PURE__ */
|
|
31112
|
+
open && /* @__PURE__ */ jsx91(
|
|
30921
31113
|
"div",
|
|
30922
31114
|
{
|
|
30923
31115
|
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}`,
|
|
30924
31116
|
onClick: (e3) => e3.stopPropagation(),
|
|
30925
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31117
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx91(
|
|
30926
31118
|
"div",
|
|
30927
31119
|
{
|
|
30928
31120
|
onClick: () => {
|
|
@@ -30942,7 +31134,7 @@ var DropdownField = (props) => {
|
|
|
30942
31134
|
};
|
|
30943
31135
|
|
|
30944
31136
|
// src/widgets/basic/fee-field/fee.tsx
|
|
30945
|
-
import { Fragment as Fragment25, jsx as
|
|
31137
|
+
import { Fragment as Fragment25, jsx as jsx92, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
30946
31138
|
var FeeField = (props) => {
|
|
30947
31139
|
const { value, formValues } = props;
|
|
30948
31140
|
const { t: t3 } = useI18n();
|
|
@@ -30953,27 +31145,27 @@ var FeeField = (props) => {
|
|
|
30953
31145
|
)
|
|
30954
31146
|
) + " VND";
|
|
30955
31147
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
30956
|
-
return /* @__PURE__ */
|
|
31148
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
30957
31149
|
value?.subtotals?.map((sub) => {
|
|
30958
31150
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
30959
|
-
return /* @__PURE__ */
|
|
30960
|
-
/* @__PURE__ */
|
|
30961
|
-
/* @__PURE__ */
|
|
31151
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
31152
|
+
/* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31153
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30962
31154
|
sub?.name,
|
|
30963
31155
|
":"
|
|
30964
31156
|
] }),
|
|
30965
|
-
/* @__PURE__ */
|
|
31157
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
30966
31158
|
] }),
|
|
30967
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31159
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs60(
|
|
30968
31160
|
"div",
|
|
30969
31161
|
{
|
|
30970
31162
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
30971
31163
|
children: [
|
|
30972
|
-
/* @__PURE__ */
|
|
31164
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30973
31165
|
group?.group_name,
|
|
30974
31166
|
":"
|
|
30975
31167
|
] }),
|
|
30976
|
-
/* @__PURE__ */
|
|
31168
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
30977
31169
|
]
|
|
30978
31170
|
},
|
|
30979
31171
|
`tax_groups_${group?.id}`
|
|
@@ -30981,33 +31173,33 @@ var FeeField = (props) => {
|
|
|
30981
31173
|
] });
|
|
30982
31174
|
}
|
|
30983
31175
|
}),
|
|
30984
|
-
/* @__PURE__ */
|
|
30985
|
-
/* @__PURE__ */
|
|
31176
|
+
/* @__PURE__ */ jsxs60("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: [
|
|
31177
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30986
31178
|
t3("total"),
|
|
30987
31179
|
":"
|
|
30988
31180
|
] }),
|
|
30989
|
-
/* @__PURE__ */
|
|
31181
|
+
/* @__PURE__ */ jsx92("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
30990
31182
|
] }),
|
|
30991
|
-
/* @__PURE__ */
|
|
30992
|
-
/* @__PURE__ */
|
|
31183
|
+
/* @__PURE__ */ jsxs60("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: [
|
|
31184
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30993
31185
|
t3("paid_amount"),
|
|
30994
31186
|
":"
|
|
30995
31187
|
] }),
|
|
30996
|
-
/* @__PURE__ */
|
|
31188
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
30997
31189
|
] }),
|
|
30998
|
-
/* @__PURE__ */
|
|
30999
|
-
/* @__PURE__ */
|
|
31190
|
+
/* @__PURE__ */ jsxs60("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: [
|
|
31191
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31000
31192
|
t3("remanining_amount"),
|
|
31001
31193
|
":"
|
|
31002
31194
|
] }),
|
|
31003
|
-
/* @__PURE__ */
|
|
31195
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31004
31196
|
] })
|
|
31005
31197
|
] });
|
|
31006
31198
|
};
|
|
31007
31199
|
|
|
31008
31200
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31009
|
-
import { useEffect as
|
|
31010
|
-
import { jsx as
|
|
31201
|
+
import { useEffect as useEffect19, useRef as useRef14, useState as useState18 } from "react";
|
|
31202
|
+
import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31011
31203
|
var RenderFile = ({
|
|
31012
31204
|
file,
|
|
31013
31205
|
onDelete,
|
|
@@ -31017,16 +31209,16 @@ var RenderFile = ({
|
|
|
31017
31209
|
readAs: "all"
|
|
31018
31210
|
});
|
|
31019
31211
|
const fileTypeIcon = {
|
|
31020
|
-
"application/pdf": /* @__PURE__ */
|
|
31021
|
-
"application/zip": /* @__PURE__ */
|
|
31022
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31023
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31024
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31212
|
+
"application/pdf": /* @__PURE__ */ jsx93(PdfIcon, {}),
|
|
31213
|
+
"application/zip": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31214
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31215
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx93(ExcelIcon, {}),
|
|
31216
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx93(ExcelIcon, {})
|
|
31025
31217
|
};
|
|
31026
|
-
return /* @__PURE__ */
|
|
31027
|
-
/* @__PURE__ */
|
|
31028
|
-
/* @__PURE__ */
|
|
31029
|
-
/* @__PURE__ */
|
|
31218
|
+
return /* @__PURE__ */ jsxs61("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31219
|
+
/* @__PURE__ */ jsx93("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31220
|
+
/* @__PURE__ */ jsxs61("div", { children: [
|
|
31221
|
+
/* @__PURE__ */ jsx93(
|
|
31030
31222
|
"div",
|
|
31031
31223
|
{
|
|
31032
31224
|
style: {
|
|
@@ -31036,20 +31228,20 @@ var RenderFile = ({
|
|
|
31036
31228
|
children: file?.name || file?.display_name || info?.name
|
|
31037
31229
|
}
|
|
31038
31230
|
),
|
|
31039
|
-
/* @__PURE__ */
|
|
31231
|
+
/* @__PURE__ */ jsx93("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31040
31232
|
] }),
|
|
31041
|
-
/* @__PURE__ */
|
|
31042
|
-
/* @__PURE__ */
|
|
31233
|
+
/* @__PURE__ */ jsxs61("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: [
|
|
31234
|
+
/* @__PURE__ */ jsx93(
|
|
31043
31235
|
"span",
|
|
31044
31236
|
{
|
|
31045
31237
|
onClick: () => onDownload && onDownload(
|
|
31046
31238
|
file?.data,
|
|
31047
31239
|
file?.name || file?.display_name || info?.name
|
|
31048
31240
|
),
|
|
31049
|
-
children: /* @__PURE__ */
|
|
31241
|
+
children: /* @__PURE__ */ jsx93(DownloadIcon, {})
|
|
31050
31242
|
}
|
|
31051
31243
|
),
|
|
31052
|
-
/* @__PURE__ */
|
|
31244
|
+
/* @__PURE__ */ jsx93("span", { onClick: onDelete, children: /* @__PURE__ */ jsx93(DeleteIconDanger, {}) })
|
|
31053
31245
|
] })
|
|
31054
31246
|
] });
|
|
31055
31247
|
};
|
|
@@ -31072,9 +31264,9 @@ var FileUploadField = (props) => {
|
|
|
31072
31264
|
} = props;
|
|
31073
31265
|
const { t: t3 } = useI18n();
|
|
31074
31266
|
const fileInputRef = useRef14(null);
|
|
31075
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31076
|
-
const [uploadError, setUploadError] =
|
|
31077
|
-
|
|
31267
|
+
const [selectedFiles, setSelectedFiles] = useState18([]);
|
|
31268
|
+
const [uploadError, setUploadError] = useState18();
|
|
31269
|
+
useEffect19(() => {
|
|
31078
31270
|
if (selectedFiles?.length === 0 && value) {
|
|
31079
31271
|
setSelectedFiles([
|
|
31080
31272
|
{
|
|
@@ -31083,7 +31275,7 @@ var FileUploadField = (props) => {
|
|
|
31083
31275
|
]);
|
|
31084
31276
|
}
|
|
31085
31277
|
}, [value]);
|
|
31086
|
-
return /* @__PURE__ */
|
|
31278
|
+
return /* @__PURE__ */ jsx93(
|
|
31087
31279
|
Controller,
|
|
31088
31280
|
{
|
|
31089
31281
|
name: name2 || "",
|
|
@@ -31092,7 +31284,7 @@ var FileUploadField = (props) => {
|
|
|
31092
31284
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31093
31285
|
},
|
|
31094
31286
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31095
|
-
|
|
31287
|
+
useEffect19(() => {
|
|
31096
31288
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31097
31289
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31098
31290
|
data = data.split(",")[1];
|
|
@@ -31108,8 +31300,8 @@ var FileUploadField = (props) => {
|
|
|
31108
31300
|
);
|
|
31109
31301
|
}
|
|
31110
31302
|
}, [selectedFiles]);
|
|
31111
|
-
return /* @__PURE__ */
|
|
31112
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
31303
|
+
return /* @__PURE__ */ jsxs61("div", { children: [
|
|
31304
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx93(
|
|
31113
31305
|
RenderFile,
|
|
31114
31306
|
{
|
|
31115
31307
|
file: fileItem,
|
|
@@ -31124,8 +31316,8 @@ var FileUploadField = (props) => {
|
|
|
31124
31316
|
}
|
|
31125
31317
|
}
|
|
31126
31318
|
)),
|
|
31127
|
-
uploadError && /* @__PURE__ */
|
|
31128
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
31319
|
+
uploadError && /* @__PURE__ */ jsx93("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31320
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx93(
|
|
31129
31321
|
ButtonSelectFiles,
|
|
31130
31322
|
{
|
|
31131
31323
|
fileInputRef,
|
|
@@ -31140,7 +31332,7 @@ var FileUploadField = (props) => {
|
|
|
31140
31332
|
useUploadFile
|
|
31141
31333
|
}
|
|
31142
31334
|
),
|
|
31143
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31335
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx93("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31144
31336
|
] });
|
|
31145
31337
|
}
|
|
31146
31338
|
}
|
|
@@ -31148,8 +31340,8 @@ var FileUploadField = (props) => {
|
|
|
31148
31340
|
};
|
|
31149
31341
|
|
|
31150
31342
|
// src/widgets/basic/float-field/float.tsx
|
|
31151
|
-
import { useEffect as
|
|
31152
|
-
import { Fragment as Fragment26, jsx as
|
|
31343
|
+
import { useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
|
|
31344
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31153
31345
|
var FloatField = (props) => {
|
|
31154
31346
|
const {
|
|
31155
31347
|
name: name2,
|
|
@@ -31167,9 +31359,9 @@ var FloatField = (props) => {
|
|
|
31167
31359
|
} = props;
|
|
31168
31360
|
const { t: t3 } = useI18n();
|
|
31169
31361
|
if (!isForm && !isEditTable) {
|
|
31170
|
-
return /* @__PURE__ */
|
|
31362
|
+
return /* @__PURE__ */ jsx94("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31171
31363
|
}
|
|
31172
|
-
return /* @__PURE__ */
|
|
31364
|
+
return /* @__PURE__ */ jsx94(
|
|
31173
31365
|
Controller,
|
|
31174
31366
|
{
|
|
31175
31367
|
name: name2 ?? "",
|
|
@@ -31180,12 +31372,12 @@ var FloatField = (props) => {
|
|
|
31180
31372
|
},
|
|
31181
31373
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31182
31374
|
const { setError, clearErrors } = methods;
|
|
31183
|
-
const [inputValue, setInputValue] =
|
|
31375
|
+
const [inputValue, setInputValue] = useState19(
|
|
31184
31376
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31185
31377
|
);
|
|
31186
31378
|
const isDirtyRef = useRef15(false);
|
|
31187
31379
|
const lastCommittedValueRef = useRef15(null);
|
|
31188
|
-
|
|
31380
|
+
useEffect20(() => {
|
|
31189
31381
|
if (isDirtyRef.current) return;
|
|
31190
31382
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31191
31383
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -31263,8 +31455,8 @@ var FloatField = (props) => {
|
|
|
31263
31455
|
}
|
|
31264
31456
|
isDirtyRef.current = false;
|
|
31265
31457
|
};
|
|
31266
|
-
return /* @__PURE__ */
|
|
31267
|
-
/* @__PURE__ */
|
|
31458
|
+
return /* @__PURE__ */ jsxs62(Fragment26, { children: [
|
|
31459
|
+
/* @__PURE__ */ jsx94(
|
|
31268
31460
|
"input",
|
|
31269
31461
|
{
|
|
31270
31462
|
value: inputValue,
|
|
@@ -31283,7 +31475,7 @@ var FloatField = (props) => {
|
|
|
31283
31475
|
`
|
|
31284
31476
|
}
|
|
31285
31477
|
),
|
|
31286
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31478
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx94("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31287
31479
|
] });
|
|
31288
31480
|
}
|
|
31289
31481
|
}
|
|
@@ -31291,8 +31483,8 @@ var FloatField = (props) => {
|
|
|
31291
31483
|
};
|
|
31292
31484
|
|
|
31293
31485
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31294
|
-
import { useState as
|
|
31295
|
-
import { Fragment as Fragment27, jsx as
|
|
31486
|
+
import { useState as useState20 } from "react";
|
|
31487
|
+
import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
31296
31488
|
var FloatTimeField = (props) => {
|
|
31297
31489
|
const {
|
|
31298
31490
|
name: name2,
|
|
@@ -31308,9 +31500,9 @@ var FloatTimeField = (props) => {
|
|
|
31308
31500
|
const { t: t3 } = useI18n();
|
|
31309
31501
|
if (!isForm) {
|
|
31310
31502
|
const formatValue = value ?? 0;
|
|
31311
|
-
return /* @__PURE__ */
|
|
31503
|
+
return /* @__PURE__ */ jsx95("span", { children: convertFloatToTime(formatValue) });
|
|
31312
31504
|
}
|
|
31313
|
-
return /* @__PURE__ */
|
|
31505
|
+
return /* @__PURE__ */ jsx95(
|
|
31314
31506
|
Controller,
|
|
31315
31507
|
{
|
|
31316
31508
|
name: name2 ?? "",
|
|
@@ -31323,11 +31515,11 @@ var FloatTimeField = (props) => {
|
|
|
31323
31515
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
31324
31516
|
fieldState: { error: error2, isDirty }
|
|
31325
31517
|
}) => {
|
|
31326
|
-
const [input, setInput] =
|
|
31518
|
+
const [input, setInput] = useState20(
|
|
31327
31519
|
convertFloatToTime(value2 ?? defaultValue)
|
|
31328
31520
|
);
|
|
31329
|
-
const [formattedTime, setFormattedTime] =
|
|
31330
|
-
const [errors, setErrors] =
|
|
31521
|
+
const [formattedTime, setFormattedTime] = useState20("");
|
|
31522
|
+
const [errors, setErrors] = useState20("");
|
|
31331
31523
|
const handleInputChange = (e3) => {
|
|
31332
31524
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
31333
31525
|
setInput(raw);
|
|
@@ -31372,8 +31564,8 @@ var FloatTimeField = (props) => {
|
|
|
31372
31564
|
}
|
|
31373
31565
|
onBlur();
|
|
31374
31566
|
};
|
|
31375
|
-
return /* @__PURE__ */
|
|
31376
|
-
/* @__PURE__ */
|
|
31567
|
+
return /* @__PURE__ */ jsxs63(Fragment27, { children: [
|
|
31568
|
+
/* @__PURE__ */ jsx95(
|
|
31377
31569
|
"input",
|
|
31378
31570
|
{
|
|
31379
31571
|
type: "text",
|
|
@@ -31405,7 +31597,7 @@ var FloatTimeField = (props) => {
|
|
|
31405
31597
|
readOnly: readonly
|
|
31406
31598
|
}
|
|
31407
31599
|
),
|
|
31408
|
-
(error2 || errors) && /* @__PURE__ */
|
|
31600
|
+
(error2 || errors) && /* @__PURE__ */ jsx95("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31409
31601
|
] });
|
|
31410
31602
|
}
|
|
31411
31603
|
}
|
|
@@ -31413,8 +31605,8 @@ var FloatTimeField = (props) => {
|
|
|
31413
31605
|
};
|
|
31414
31606
|
|
|
31415
31607
|
// src/widgets/basic/html-field/html.tsx
|
|
31416
|
-
import { useEffect as
|
|
31417
|
-
import { jsx as
|
|
31608
|
+
import { useEffect as useEffect21, useRef as useRef16 } from "react";
|
|
31609
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
31418
31610
|
var HtmlField = (props) => {
|
|
31419
31611
|
const {
|
|
31420
31612
|
name: name2,
|
|
@@ -31428,16 +31620,16 @@ var HtmlField = (props) => {
|
|
|
31428
31620
|
} = props;
|
|
31429
31621
|
const divRef = useRef16(null);
|
|
31430
31622
|
if (!isForm && !isEditTable) {
|
|
31431
|
-
return /* @__PURE__ */
|
|
31623
|
+
return /* @__PURE__ */ jsx96("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31432
31624
|
}
|
|
31433
|
-
return /* @__PURE__ */
|
|
31625
|
+
return /* @__PURE__ */ jsx96(
|
|
31434
31626
|
Controller,
|
|
31435
31627
|
{
|
|
31436
31628
|
name: name2 ?? "",
|
|
31437
31629
|
control: methods?.control,
|
|
31438
31630
|
defaultValue,
|
|
31439
31631
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
31440
|
-
|
|
31632
|
+
useEffect21(() => {
|
|
31441
31633
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
31442
31634
|
divRef.current.innerHTML = value2 || "";
|
|
31443
31635
|
}
|
|
@@ -31449,7 +31641,7 @@ var HtmlField = (props) => {
|
|
|
31449
31641
|
onChange2(newValue, "");
|
|
31450
31642
|
}
|
|
31451
31643
|
};
|
|
31452
|
-
return /* @__PURE__ */
|
|
31644
|
+
return /* @__PURE__ */ jsx96(
|
|
31453
31645
|
"div",
|
|
31454
31646
|
{
|
|
31455
31647
|
ref: divRef,
|
|
@@ -31468,28 +31660,28 @@ var HtmlField = (props) => {
|
|
|
31468
31660
|
};
|
|
31469
31661
|
|
|
31470
31662
|
// src/widgets/basic/image-field/image.tsx
|
|
31471
|
-
import { jsx as
|
|
31663
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
31472
31664
|
var ImageField = (props) => {
|
|
31473
31665
|
const { value, type, name: name2, baseURL } = props;
|
|
31474
31666
|
if (!value) return null;
|
|
31475
31667
|
if (type === "url") {
|
|
31476
|
-
return /* @__PURE__ */
|
|
31668
|
+
return /* @__PURE__ */ jsx97("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31477
31669
|
}
|
|
31478
|
-
return /* @__PURE__ */
|
|
31670
|
+
return /* @__PURE__ */ jsx97("div", { id: "qr-code", children: /* @__PURE__ */ jsx97("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31479
31671
|
};
|
|
31480
31672
|
|
|
31481
31673
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31482
|
-
import
|
|
31674
|
+
import React17, { useEffect as useEffect22, useMemo as useMemo11 } from "react";
|
|
31483
31675
|
|
|
31484
31676
|
// src/widgets/basic/information-field/information.tsx
|
|
31485
|
-
import { Fragment as Fragment28, jsx as
|
|
31677
|
+
import { Fragment as Fragment28, jsx as jsx98, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
31486
31678
|
var InfomationField = (props) => {
|
|
31487
31679
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31488
31680
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31489
|
-
return /* @__PURE__ */
|
|
31681
|
+
return /* @__PURE__ */ jsx98(Fragment28, {});
|
|
31490
31682
|
}
|
|
31491
31683
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31492
|
-
return /* @__PURE__ */
|
|
31684
|
+
return /* @__PURE__ */ jsx98("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx98(
|
|
31493
31685
|
AvatarField,
|
|
31494
31686
|
{
|
|
31495
31687
|
id: item.id,
|
|
@@ -31498,8 +31690,8 @@ var InfomationField = (props) => {
|
|
|
31498
31690
|
stringToColor
|
|
31499
31691
|
},
|
|
31500
31692
|
item.id
|
|
31501
|
-
)) : /* @__PURE__ */
|
|
31502
|
-
/* @__PURE__ */
|
|
31693
|
+
)) : /* @__PURE__ */ jsxs64("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31694
|
+
/* @__PURE__ */ jsx98(
|
|
31503
31695
|
AvatarField,
|
|
31504
31696
|
{
|
|
31505
31697
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31509,12 +31701,12 @@ var InfomationField = (props) => {
|
|
|
31509
31701
|
stringToColor
|
|
31510
31702
|
}
|
|
31511
31703
|
),
|
|
31512
|
-
showName && /* @__PURE__ */
|
|
31704
|
+
showName && /* @__PURE__ */ jsx98("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31513
31705
|
] }) });
|
|
31514
31706
|
};
|
|
31515
31707
|
|
|
31516
31708
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31517
|
-
import { jsx as
|
|
31709
|
+
import { jsx as jsx99, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
31518
31710
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31519
31711
|
const { selectProps, data, menuList } = props;
|
|
31520
31712
|
const { relation } = selectProps;
|
|
@@ -31523,8 +31715,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31523
31715
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31524
31716
|
)
|
|
31525
31717
|
)?.[0]?.action?.id;
|
|
31526
|
-
return /* @__PURE__ */
|
|
31527
|
-
/* @__PURE__ */
|
|
31718
|
+
return /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31719
|
+
/* @__PURE__ */ jsx99(
|
|
31528
31720
|
AvatarField,
|
|
31529
31721
|
{
|
|
31530
31722
|
id: data?.id,
|
|
@@ -31536,8 +31728,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31536
31728
|
stringToColor
|
|
31537
31729
|
}
|
|
31538
31730
|
),
|
|
31539
|
-
/* @__PURE__ */
|
|
31540
|
-
/* @__PURE__ */
|
|
31731
|
+
/* @__PURE__ */ jsx99("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31732
|
+
/* @__PURE__ */ jsx99(
|
|
31541
31733
|
"span",
|
|
31542
31734
|
{
|
|
31543
31735
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31545,7 +31737,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31545
31737
|
e3.stopPropagation();
|
|
31546
31738
|
props.removeProps.onClick();
|
|
31547
31739
|
},
|
|
31548
|
-
children: /* @__PURE__ */
|
|
31740
|
+
children: /* @__PURE__ */ jsx99(CloseIcon, {})
|
|
31549
31741
|
}
|
|
31550
31742
|
)
|
|
31551
31743
|
] });
|
|
@@ -31554,10 +31746,10 @@ var CustomMenuList = (props) => {
|
|
|
31554
31746
|
const { options: options2, children, selectProps } = props;
|
|
31555
31747
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31556
31748
|
const { t: t3 } = useI18n();
|
|
31557
|
-
const limitedChildren =
|
|
31558
|
-
return /* @__PURE__ */
|
|
31749
|
+
const limitedChildren = React17.Children.toArray(children).slice(0, 10);
|
|
31750
|
+
return /* @__PURE__ */ jsxs65(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31559
31751
|
limitedChildren,
|
|
31560
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
31752
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs65(
|
|
31561
31753
|
"button",
|
|
31562
31754
|
{
|
|
31563
31755
|
type: "button",
|
|
@@ -31602,7 +31794,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31602
31794
|
value: item.id,
|
|
31603
31795
|
label: item.name ?? item.display_name
|
|
31604
31796
|
})) : [];
|
|
31605
|
-
return /* @__PURE__ */
|
|
31797
|
+
return /* @__PURE__ */ jsx99(
|
|
31606
31798
|
InfomationField,
|
|
31607
31799
|
{
|
|
31608
31800
|
value: optionValue || null,
|
|
@@ -31611,7 +31803,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31611
31803
|
}
|
|
31612
31804
|
);
|
|
31613
31805
|
}
|
|
31614
|
-
return /* @__PURE__ */
|
|
31806
|
+
return /* @__PURE__ */ jsx99(
|
|
31615
31807
|
Controller,
|
|
31616
31808
|
{
|
|
31617
31809
|
name: name2 ?? "",
|
|
@@ -31621,12 +31813,12 @@ var Many2ManyTagField = (props) => {
|
|
|
31621
31813
|
},
|
|
31622
31814
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31623
31815
|
const { clearErrors } = methods;
|
|
31624
|
-
|
|
31816
|
+
useEffect22(() => {
|
|
31625
31817
|
if (field.value) {
|
|
31626
31818
|
clearErrors(name2);
|
|
31627
31819
|
}
|
|
31628
31820
|
}, [field.value]);
|
|
31629
|
-
const filteredValue =
|
|
31821
|
+
const filteredValue = useMemo11(() => {
|
|
31630
31822
|
if (!Array.isArray(field?.value)) return null;
|
|
31631
31823
|
const fieldValueMapped = field.value.map((v) => ({
|
|
31632
31824
|
value: v?.id,
|
|
@@ -31647,8 +31839,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31647
31839
|
onChange2?.(name2 ?? "", newValue);
|
|
31648
31840
|
clearErrors(name2);
|
|
31649
31841
|
};
|
|
31650
|
-
return /* @__PURE__ */
|
|
31651
|
-
/* @__PURE__ */
|
|
31842
|
+
return /* @__PURE__ */ jsxs65("div", { className: "group h-full overflow-y-auto", children: [
|
|
31843
|
+
/* @__PURE__ */ jsx99(
|
|
31652
31844
|
StateManagedSelect$1,
|
|
31653
31845
|
{
|
|
31654
31846
|
options: options2,
|
|
@@ -31727,7 +31919,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31727
31919
|
})
|
|
31728
31920
|
},
|
|
31729
31921
|
components: isUser ? {
|
|
31730
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
31922
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx99(
|
|
31731
31923
|
CustomMultiValue,
|
|
31732
31924
|
{
|
|
31733
31925
|
...multiValueProps,
|
|
@@ -31736,7 +31928,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31736
31928
|
),
|
|
31737
31929
|
IndicatorSeparator: () => null
|
|
31738
31930
|
} : {
|
|
31739
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
31931
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx99(
|
|
31740
31932
|
CustomMenuList,
|
|
31741
31933
|
{
|
|
31742
31934
|
...menuListProps,
|
|
@@ -31747,13 +31939,13 @@ var Many2ManyTagField = (props) => {
|
|
|
31747
31939
|
}
|
|
31748
31940
|
),
|
|
31749
31941
|
IndicatorSeparator: () => null,
|
|
31750
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
31751
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
31942
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.DropdownIndicator, { ...props2 }),
|
|
31943
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.ClearIndicator, { ...props2 })
|
|
31752
31944
|
},
|
|
31753
31945
|
required: !invisible && required
|
|
31754
31946
|
}
|
|
31755
31947
|
),
|
|
31756
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31948
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx99("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31757
31949
|
] });
|
|
31758
31950
|
}
|
|
31759
31951
|
}
|
|
@@ -31761,8 +31953,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31761
31953
|
};
|
|
31762
31954
|
|
|
31763
31955
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
31764
|
-
import { useEffect as
|
|
31765
|
-
import { Fragment as Fragment29, jsx as
|
|
31956
|
+
import { useEffect as useEffect23 } from "react";
|
|
31957
|
+
import { Fragment as Fragment29, jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
31766
31958
|
var MonetaryField = (props) => {
|
|
31767
31959
|
const { t: t3 } = useI18n();
|
|
31768
31960
|
const {
|
|
@@ -31783,26 +31975,26 @@ var MonetaryField = (props) => {
|
|
|
31783
31975
|
symbol = "VND"
|
|
31784
31976
|
} = props;
|
|
31785
31977
|
if (isForm && name2 === "amount_residual") {
|
|
31786
|
-
return /* @__PURE__ */
|
|
31787
|
-
/* @__PURE__ */
|
|
31978
|
+
return /* @__PURE__ */ jsxs66("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
31979
|
+
/* @__PURE__ */ jsxs66("span", { className: "font-semibold", children: [
|
|
31788
31980
|
string,
|
|
31789
31981
|
":"
|
|
31790
31982
|
] }),
|
|
31791
|
-
/* @__PURE__ */
|
|
31983
|
+
/* @__PURE__ */ jsx100("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} ${symbol}` })
|
|
31792
31984
|
] });
|
|
31793
31985
|
}
|
|
31794
31986
|
if (!isForm) {
|
|
31795
31987
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
31796
31988
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
31797
|
-
return /* @__PURE__ */
|
|
31989
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
31798
31990
|
parseFloat(String(value ?? defaultValue))
|
|
31799
31991
|
)} ${symbol}` });
|
|
31800
31992
|
}
|
|
31801
|
-
return /* @__PURE__ */
|
|
31993
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
31802
31994
|
parseFloat(value ?? defaultValue)
|
|
31803
31995
|
)} ${currencySymbol}` });
|
|
31804
31996
|
}
|
|
31805
|
-
return /* @__PURE__ */
|
|
31997
|
+
return /* @__PURE__ */ jsx100(
|
|
31806
31998
|
Controller,
|
|
31807
31999
|
{
|
|
31808
32000
|
name: name2 ?? "",
|
|
@@ -31816,13 +32008,13 @@ var MonetaryField = (props) => {
|
|
|
31816
32008
|
fieldState: { error: error2 }
|
|
31817
32009
|
}) => {
|
|
31818
32010
|
const { setError, clearErrors } = methods;
|
|
31819
|
-
|
|
32011
|
+
useEffect23(() => {
|
|
31820
32012
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
31821
32013
|
clearErrors(name2);
|
|
31822
32014
|
}
|
|
31823
32015
|
}, [value2]);
|
|
31824
|
-
return /* @__PURE__ */
|
|
31825
|
-
/* @__PURE__ */
|
|
32016
|
+
return /* @__PURE__ */ jsxs66(Fragment29, { children: [
|
|
32017
|
+
/* @__PURE__ */ jsx100(
|
|
31826
32018
|
"input",
|
|
31827
32019
|
{
|
|
31828
32020
|
value: formatNumberOnly(value2),
|
|
@@ -31860,7 +32052,7 @@ var MonetaryField = (props) => {
|
|
|
31860
32052
|
`
|
|
31861
32053
|
}
|
|
31862
32054
|
),
|
|
31863
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32055
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx100("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31864
32056
|
] });
|
|
31865
32057
|
}
|
|
31866
32058
|
}
|
|
@@ -31868,14 +32060,14 @@ var MonetaryField = (props) => {
|
|
|
31868
32060
|
};
|
|
31869
32061
|
|
|
31870
32062
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
31871
|
-
import { jsx as
|
|
32063
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
31872
32064
|
var PaidBadgedField = () => {
|
|
31873
|
-
return /* @__PURE__ */
|
|
32065
|
+
return /* @__PURE__ */ jsx101("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx101(PaidIcon, {}) });
|
|
31874
32066
|
};
|
|
31875
32067
|
|
|
31876
32068
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
31877
|
-
import
|
|
31878
|
-
import { jsx as
|
|
32069
|
+
import React18, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
32070
|
+
import { jsx as jsx102, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
31879
32071
|
var RatingStarField = (props) => {
|
|
31880
32072
|
const {
|
|
31881
32073
|
label,
|
|
@@ -31884,9 +32076,9 @@ var RatingStarField = (props) => {
|
|
|
31884
32076
|
onSelectPriority,
|
|
31885
32077
|
id
|
|
31886
32078
|
} = props;
|
|
31887
|
-
const [rating, setRating] =
|
|
31888
|
-
const [hover, setHover] =
|
|
31889
|
-
|
|
32079
|
+
const [rating, setRating] = useState21(defaultValue);
|
|
32080
|
+
const [hover, setHover] = useState21(0);
|
|
32081
|
+
useEffect24(() => {
|
|
31890
32082
|
setRating(defaultValue);
|
|
31891
32083
|
}, [defaultValue]);
|
|
31892
32084
|
const handleClick = (value) => {
|
|
@@ -31910,7 +32102,7 @@ var RatingStarField = (props) => {
|
|
|
31910
32102
|
setHover(0);
|
|
31911
32103
|
setRating(0);
|
|
31912
32104
|
};
|
|
31913
|
-
return /* @__PURE__ */
|
|
32105
|
+
return /* @__PURE__ */ jsx102(
|
|
31914
32106
|
"div",
|
|
31915
32107
|
{
|
|
31916
32108
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -31920,17 +32112,17 @@ var RatingStarField = (props) => {
|
|
|
31920
32112
|
const starValue = index4 + 1;
|
|
31921
32113
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
31922
32114
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
31923
|
-
return /* @__PURE__ */
|
|
31924
|
-
/* @__PURE__ */
|
|
32115
|
+
return /* @__PURE__ */ jsxs67(React18.Fragment, { children: [
|
|
32116
|
+
/* @__PURE__ */ jsx102(
|
|
31925
32117
|
"div",
|
|
31926
32118
|
{
|
|
31927
32119
|
onMouseEnter: () => handleHover(starValue),
|
|
31928
32120
|
onClick: () => handleClick(starValue),
|
|
31929
32121
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
31930
|
-
children: /* @__PURE__ */
|
|
32122
|
+
children: /* @__PURE__ */ jsx102(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
31931
32123
|
}
|
|
31932
32124
|
),
|
|
31933
|
-
/* @__PURE__ */
|
|
32125
|
+
/* @__PURE__ */ jsx102(
|
|
31934
32126
|
M,
|
|
31935
32127
|
{
|
|
31936
32128
|
className: "z-50",
|
|
@@ -31946,7 +32138,7 @@ var RatingStarField = (props) => {
|
|
|
31946
32138
|
};
|
|
31947
32139
|
|
|
31948
32140
|
// src/widgets/basic/priority-field/priority.tsx
|
|
31949
|
-
import { jsx as
|
|
32141
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
31950
32142
|
var PriorityField = (props) => {
|
|
31951
32143
|
const {
|
|
31952
32144
|
isForm,
|
|
@@ -31962,7 +32154,7 @@ var PriorityField = (props) => {
|
|
|
31962
32154
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
31963
32155
|
const defaultPriority = parseInt(value) + 1;
|
|
31964
32156
|
if (!isForm) {
|
|
31965
|
-
return /* @__PURE__ */
|
|
32157
|
+
return /* @__PURE__ */ jsx103(
|
|
31966
32158
|
RatingStarField,
|
|
31967
32159
|
{
|
|
31968
32160
|
label,
|
|
@@ -31973,7 +32165,7 @@ var PriorityField = (props) => {
|
|
|
31973
32165
|
}
|
|
31974
32166
|
);
|
|
31975
32167
|
}
|
|
31976
|
-
return /* @__PURE__ */
|
|
32168
|
+
return /* @__PURE__ */ jsx103(
|
|
31977
32169
|
Controller,
|
|
31978
32170
|
{
|
|
31979
32171
|
name: name ?? "",
|
|
@@ -31983,7 +32175,7 @@ var PriorityField = (props) => {
|
|
|
31983
32175
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
31984
32176
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
31985
32177
|
};
|
|
31986
|
-
return /* @__PURE__ */
|
|
32178
|
+
return /* @__PURE__ */ jsx103(
|
|
31987
32179
|
RatingStarField,
|
|
31988
32180
|
{
|
|
31989
32181
|
label,
|
|
@@ -31999,8 +32191,8 @@ var PriorityField = (props) => {
|
|
|
31999
32191
|
};
|
|
32000
32192
|
|
|
32001
32193
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32002
|
-
import { useEffect as
|
|
32003
|
-
import { jsx as
|
|
32194
|
+
import { useEffect as useEffect25 } from "react";
|
|
32195
|
+
import { jsx as jsx104, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32004
32196
|
var RadioGroupField = (props) => {
|
|
32005
32197
|
const {
|
|
32006
32198
|
name: name2,
|
|
@@ -32013,19 +32205,19 @@ var RadioGroupField = (props) => {
|
|
|
32013
32205
|
onChange: onChange2,
|
|
32014
32206
|
setValue
|
|
32015
32207
|
} = props;
|
|
32016
|
-
|
|
32208
|
+
useEffect25(() => {
|
|
32017
32209
|
if (selection?.length > 0) {
|
|
32018
32210
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32019
32211
|
}
|
|
32020
32212
|
}, [selection, name2, setValue]);
|
|
32021
32213
|
if (!methods) return null;
|
|
32022
|
-
return /* @__PURE__ */
|
|
32214
|
+
return /* @__PURE__ */ jsx104(
|
|
32023
32215
|
Controller,
|
|
32024
32216
|
{
|
|
32025
32217
|
name: name2 ?? "",
|
|
32026
32218
|
control: methods.control,
|
|
32027
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32028
|
-
/* @__PURE__ */
|
|
32219
|
+
render: ({ field }) => /* @__PURE__ */ jsx104("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-1", children: [
|
|
32220
|
+
/* @__PURE__ */ jsx104(
|
|
32029
32221
|
"input",
|
|
32030
32222
|
{
|
|
32031
32223
|
type: "radio",
|
|
@@ -32044,7 +32236,7 @@ var RadioGroupField = (props) => {
|
|
|
32044
32236
|
className: "custom-radio"
|
|
32045
32237
|
}
|
|
32046
32238
|
),
|
|
32047
|
-
/* @__PURE__ */
|
|
32239
|
+
/* @__PURE__ */ jsx104("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32048
32240
|
] }, select[0])) })
|
|
32049
32241
|
}
|
|
32050
32242
|
);
|
|
@@ -32052,7 +32244,7 @@ var RadioGroupField = (props) => {
|
|
|
32052
32244
|
|
|
32053
32245
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32054
32246
|
var import_moment3 = __toESM(require_moment());
|
|
32055
|
-
import { jsx as
|
|
32247
|
+
import { jsx as jsx105, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
32056
32248
|
var RemainingDaysField = (props) => {
|
|
32057
32249
|
const {
|
|
32058
32250
|
value,
|
|
@@ -32063,14 +32255,14 @@ var RemainingDaysField = (props) => {
|
|
|
32063
32255
|
if (!value) return null;
|
|
32064
32256
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32065
32257
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32066
|
-
return /* @__PURE__ */
|
|
32067
|
-
/* @__PURE__ */
|
|
32068
|
-
/* @__PURE__ */
|
|
32258
|
+
return /* @__PURE__ */ jsxs69("div", { className: isForm ? "mb-4" : "", children: [
|
|
32259
|
+
/* @__PURE__ */ jsx105(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32260
|
+
/* @__PURE__ */ jsx105(
|
|
32069
32261
|
"div",
|
|
32070
32262
|
{
|
|
32071
32263
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32072
32264
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32073
|
-
children: /* @__PURE__ */
|
|
32265
|
+
children: /* @__PURE__ */ jsx105(
|
|
32074
32266
|
"div",
|
|
32075
32267
|
{
|
|
32076
32268
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32083,7 +32275,7 @@ var RemainingDaysField = (props) => {
|
|
|
32083
32275
|
};
|
|
32084
32276
|
|
|
32085
32277
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32086
|
-
import { Fragment as Fragment30, jsx as
|
|
32278
|
+
import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
32087
32279
|
var SelectDropdownField = (props) => {
|
|
32088
32280
|
const { t: t3 } = useI18n();
|
|
32089
32281
|
const {
|
|
@@ -32105,9 +32297,9 @@ var SelectDropdownField = (props) => {
|
|
|
32105
32297
|
label: val[1]
|
|
32106
32298
|
})) : [];
|
|
32107
32299
|
if (!isForm && !isEditTable) {
|
|
32108
|
-
return /* @__PURE__ */
|
|
32300
|
+
return /* @__PURE__ */ jsx106("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32109
32301
|
} else {
|
|
32110
|
-
return /* @__PURE__ */
|
|
32302
|
+
return /* @__PURE__ */ jsx106(
|
|
32111
32303
|
Controller,
|
|
32112
32304
|
{
|
|
32113
32305
|
name: name2 || "",
|
|
@@ -32134,8 +32326,8 @@ var SelectDropdownField = (props) => {
|
|
|
32134
32326
|
value: defaultValue || null,
|
|
32135
32327
|
required: !invisible && required
|
|
32136
32328
|
};
|
|
32137
|
-
return /* @__PURE__ */
|
|
32138
|
-
/* @__PURE__ */
|
|
32329
|
+
return /* @__PURE__ */ jsxs70(Fragment30, { children: [
|
|
32330
|
+
/* @__PURE__ */ jsx106("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ jsx106(
|
|
32139
32331
|
StateManagedSelect$1,
|
|
32140
32332
|
{
|
|
32141
32333
|
...commonProps,
|
|
@@ -32192,12 +32384,12 @@ var SelectDropdownField = (props) => {
|
|
|
32192
32384
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32193
32385
|
components: {
|
|
32194
32386
|
IndicatorSeparator: () => null,
|
|
32195
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
32387
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx106(components.DropdownIndicator, { ...props2 })
|
|
32196
32388
|
},
|
|
32197
32389
|
noOptionsMessage: () => t3("no-available")
|
|
32198
32390
|
}
|
|
32199
32391
|
) }),
|
|
32200
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32392
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32201
32393
|
] });
|
|
32202
32394
|
}
|
|
32203
32395
|
}
|
|
@@ -32206,7 +32398,7 @@ var SelectDropdownField = (props) => {
|
|
|
32206
32398
|
};
|
|
32207
32399
|
|
|
32208
32400
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32209
|
-
import { jsx as
|
|
32401
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
32210
32402
|
var TextAreaField = (props) => {
|
|
32211
32403
|
const {
|
|
32212
32404
|
methods,
|
|
@@ -32230,9 +32422,9 @@ var TextAreaField = (props) => {
|
|
|
32230
32422
|
}
|
|
32231
32423
|
}) : {};
|
|
32232
32424
|
if (!isForm) {
|
|
32233
|
-
return /* @__PURE__ */
|
|
32425
|
+
return /* @__PURE__ */ jsx107("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32234
32426
|
}
|
|
32235
|
-
return /* @__PURE__ */
|
|
32427
|
+
return /* @__PURE__ */ jsx107(
|
|
32236
32428
|
"textarea",
|
|
32237
32429
|
{
|
|
32238
32430
|
...formProps,
|
|
@@ -32248,7 +32440,7 @@ var TextAreaField = (props) => {
|
|
|
32248
32440
|
};
|
|
32249
32441
|
|
|
32250
32442
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32251
|
-
import { jsx as
|
|
32443
|
+
import { jsx as jsx108, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
32252
32444
|
var ToggleButtonField = (props) => {
|
|
32253
32445
|
const {
|
|
32254
32446
|
name: name2,
|
|
@@ -32258,13 +32450,13 @@ var ToggleButtonField = (props) => {
|
|
|
32258
32450
|
onChange: onChange2,
|
|
32259
32451
|
methods
|
|
32260
32452
|
} = props;
|
|
32261
|
-
return /* @__PURE__ */
|
|
32453
|
+
return /* @__PURE__ */ jsx108(
|
|
32262
32454
|
Controller,
|
|
32263
32455
|
{
|
|
32264
32456
|
name: name2 ?? "",
|
|
32265
32457
|
control: methods?.control,
|
|
32266
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32267
|
-
/* @__PURE__ */
|
|
32458
|
+
render: ({ field }) => /* @__PURE__ */ jsx108("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs71("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32459
|
+
/* @__PURE__ */ jsx108(
|
|
32268
32460
|
"input",
|
|
32269
32461
|
{
|
|
32270
32462
|
...field,
|
|
@@ -32283,7 +32475,7 @@ var ToggleButtonField = (props) => {
|
|
|
32283
32475
|
checked: field.value ?? false
|
|
32284
32476
|
}
|
|
32285
32477
|
),
|
|
32286
|
-
/* @__PURE__ */
|
|
32478
|
+
/* @__PURE__ */ jsx108(
|
|
32287
32479
|
"span",
|
|
32288
32480
|
{
|
|
32289
32481
|
style: {
|
|
@@ -32293,7 +32485,7 @@ var ToggleButtonField = (props) => {
|
|
|
32293
32485
|
},
|
|
32294
32486
|
className: `rounded-full transition duration-300
|
|
32295
32487
|
`,
|
|
32296
|
-
children: /* @__PURE__ */
|
|
32488
|
+
children: /* @__PURE__ */ jsx108(
|
|
32297
32489
|
"span",
|
|
32298
32490
|
{
|
|
32299
32491
|
style: {
|
|
@@ -32317,8 +32509,8 @@ var ToggleButtonField = (props) => {
|
|
|
32317
32509
|
};
|
|
32318
32510
|
|
|
32319
32511
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32320
|
-
import { useEffect as
|
|
32321
|
-
import { Fragment as Fragment31, jsx as
|
|
32512
|
+
import { useEffect as useEffect26, useRef as useRef17, useState as useState22 } from "react";
|
|
32513
|
+
import { Fragment as Fragment31, jsx as jsx109, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
32322
32514
|
var IntegerField = (props) => {
|
|
32323
32515
|
const {
|
|
32324
32516
|
name: name2,
|
|
@@ -32337,9 +32529,9 @@ var IntegerField = (props) => {
|
|
|
32337
32529
|
const { t: t3 } = useI18n();
|
|
32338
32530
|
if (!isForm && !isEditTable) {
|
|
32339
32531
|
const displayValue = value ?? defaultValue;
|
|
32340
|
-
return /* @__PURE__ */
|
|
32532
|
+
return /* @__PURE__ */ jsx109("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32341
32533
|
}
|
|
32342
|
-
return /* @__PURE__ */
|
|
32534
|
+
return /* @__PURE__ */ jsx109(
|
|
32343
32535
|
Controller,
|
|
32344
32536
|
{
|
|
32345
32537
|
name: name2 || "",
|
|
@@ -32356,10 +32548,10 @@ var IntegerField = (props) => {
|
|
|
32356
32548
|
const isDirtyRef = useRef17(false);
|
|
32357
32549
|
const inputRef = useRef17(null);
|
|
32358
32550
|
const lastCommittedValueRef = useRef17(null);
|
|
32359
|
-
const [inputValue, setInputValue] =
|
|
32551
|
+
const [inputValue, setInputValue] = useState22(
|
|
32360
32552
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
32361
32553
|
);
|
|
32362
|
-
|
|
32554
|
+
useEffect26(() => {
|
|
32363
32555
|
if (value2 !== void 0 && value2 !== null) {
|
|
32364
32556
|
setInputValue(String(value2));
|
|
32365
32557
|
clearErrors(name2);
|
|
@@ -32417,8 +32609,8 @@ var IntegerField = (props) => {
|
|
|
32417
32609
|
inputRef.current?.blur();
|
|
32418
32610
|
clearErrors(name2);
|
|
32419
32611
|
};
|
|
32420
|
-
return /* @__PURE__ */
|
|
32421
|
-
/* @__PURE__ */
|
|
32612
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
32613
|
+
/* @__PURE__ */ jsx109(
|
|
32422
32614
|
"input",
|
|
32423
32615
|
{
|
|
32424
32616
|
ref: inputRef,
|
|
@@ -32453,7 +32645,7 @@ var IntegerField = (props) => {
|
|
|
32453
32645
|
`
|
|
32454
32646
|
}
|
|
32455
32647
|
),
|
|
32456
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32648
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx109("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32457
32649
|
] });
|
|
32458
32650
|
}
|
|
32459
32651
|
}
|
|
@@ -32461,7 +32653,7 @@ var IntegerField = (props) => {
|
|
|
32461
32653
|
};
|
|
32462
32654
|
|
|
32463
32655
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32464
|
-
import { jsx as
|
|
32656
|
+
import { jsx as jsx110, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
32465
32657
|
var StatusDropdownField = (props) => {
|
|
32466
32658
|
const {
|
|
32467
32659
|
buttonRef,
|
|
@@ -32473,13 +32665,13 @@ var StatusDropdownField = (props) => {
|
|
|
32473
32665
|
handleClick,
|
|
32474
32666
|
colors: colors2
|
|
32475
32667
|
} = props;
|
|
32476
|
-
return /* @__PURE__ */
|
|
32668
|
+
return /* @__PURE__ */ jsxs73(
|
|
32477
32669
|
"div",
|
|
32478
32670
|
{
|
|
32479
32671
|
ref: buttonRef,
|
|
32480
32672
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32481
32673
|
children: [
|
|
32482
|
-
/* @__PURE__ */
|
|
32674
|
+
/* @__PURE__ */ jsx110(
|
|
32483
32675
|
"button",
|
|
32484
32676
|
{
|
|
32485
32677
|
type: "button",
|
|
@@ -32487,23 +32679,23 @@ var StatusDropdownField = (props) => {
|
|
|
32487
32679
|
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"}`
|
|
32488
32680
|
}
|
|
32489
32681
|
),
|
|
32490
|
-
isOpen && /* @__PURE__ */
|
|
32682
|
+
isOpen && /* @__PURE__ */ jsx110("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
32491
32683
|
const isActive = item[0] == state;
|
|
32492
|
-
return /* @__PURE__ */
|
|
32684
|
+
return /* @__PURE__ */ jsxs73(
|
|
32493
32685
|
"div",
|
|
32494
32686
|
{
|
|
32495
32687
|
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" : ""}`,
|
|
32496
32688
|
onClick: () => handleClick(item[0]),
|
|
32497
32689
|
children: [
|
|
32498
|
-
/* @__PURE__ */
|
|
32499
|
-
/* @__PURE__ */
|
|
32500
|
-
/* @__PURE__ */
|
|
32690
|
+
/* @__PURE__ */ jsx110("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx110(CheckIcon, {}) }),
|
|
32691
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2", children: [
|
|
32692
|
+
/* @__PURE__ */ jsx110(
|
|
32501
32693
|
"div",
|
|
32502
32694
|
{
|
|
32503
32695
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32504
32696
|
}
|
|
32505
32697
|
),
|
|
32506
|
-
/* @__PURE__ */
|
|
32698
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm", children: item[1] })
|
|
32507
32699
|
] })
|
|
32508
32700
|
]
|
|
32509
32701
|
},
|
|
@@ -32517,8 +32709,8 @@ var StatusDropdownField = (props) => {
|
|
|
32517
32709
|
|
|
32518
32710
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32519
32711
|
import { createPortal as createPortal5 } from "react-dom";
|
|
32520
|
-
import { useEffect as
|
|
32521
|
-
import { jsx as
|
|
32712
|
+
import { useEffect as useEffect27 } from "react";
|
|
32713
|
+
import { jsx as jsx111, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
32522
32714
|
var Many2ManyField = (props) => {
|
|
32523
32715
|
const { t: t3 } = useI18n();
|
|
32524
32716
|
const {
|
|
@@ -32577,7 +32769,7 @@ var Many2ManyField = (props) => {
|
|
|
32577
32769
|
clearSearch
|
|
32578
32770
|
} = searchController;
|
|
32579
32771
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
32580
|
-
|
|
32772
|
+
useEffect27(() => {
|
|
32581
32773
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
32582
32774
|
if (groupItems?.length > 0) {
|
|
32583
32775
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -32592,7 +32784,7 @@ var Many2ManyField = (props) => {
|
|
|
32592
32784
|
};
|
|
32593
32785
|
}, [selectedTags]);
|
|
32594
32786
|
return createPortal5(
|
|
32595
|
-
/* @__PURE__ */
|
|
32787
|
+
/* @__PURE__ */ jsxs74(
|
|
32596
32788
|
"div",
|
|
32597
32789
|
{
|
|
32598
32790
|
style: {
|
|
@@ -32600,8 +32792,8 @@ var Many2ManyField = (props) => {
|
|
|
32600
32792
|
},
|
|
32601
32793
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32602
32794
|
children: [
|
|
32603
|
-
/* @__PURE__ */
|
|
32604
|
-
/* @__PURE__ */
|
|
32795
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32796
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs74(
|
|
32605
32797
|
"div",
|
|
32606
32798
|
{
|
|
32607
32799
|
style: {
|
|
@@ -32609,12 +32801,12 @@ var Many2ManyField = (props) => {
|
|
|
32609
32801
|
},
|
|
32610
32802
|
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",
|
|
32611
32803
|
children: [
|
|
32612
|
-
/* @__PURE__ */
|
|
32613
|
-
/* @__PURE__ */
|
|
32614
|
-
/* @__PURE__ */
|
|
32804
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
32805
|
+
/* @__PURE__ */ jsx111("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32806
|
+
/* @__PURE__ */ jsx111("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx111(CloseIcon, {}) })
|
|
32615
32807
|
] }),
|
|
32616
|
-
/* @__PURE__ */
|
|
32617
|
-
/* @__PURE__ */
|
|
32808
|
+
/* @__PURE__ */ jsxs74("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32809
|
+
/* @__PURE__ */ jsx111("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ jsx111(
|
|
32618
32810
|
Search,
|
|
32619
32811
|
{
|
|
32620
32812
|
removeSearchItems,
|
|
@@ -32648,7 +32840,7 @@ var Many2ManyField = (props) => {
|
|
|
32648
32840
|
groupByList
|
|
32649
32841
|
}
|
|
32650
32842
|
) }),
|
|
32651
|
-
/* @__PURE__ */
|
|
32843
|
+
/* @__PURE__ */ jsx111(
|
|
32652
32844
|
PaginationView,
|
|
32653
32845
|
{
|
|
32654
32846
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -32665,20 +32857,20 @@ var Many2ManyField = (props) => {
|
|
|
32665
32857
|
}
|
|
32666
32858
|
)
|
|
32667
32859
|
] }),
|
|
32668
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
32860
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx111("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx111("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx111(
|
|
32669
32861
|
"div",
|
|
32670
32862
|
{
|
|
32671
32863
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32672
|
-
children: /* @__PURE__ */
|
|
32864
|
+
children: /* @__PURE__ */ jsx111("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx111("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx111(
|
|
32673
32865
|
"div",
|
|
32674
32866
|
{
|
|
32675
32867
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32676
|
-
children: /* @__PURE__ */
|
|
32868
|
+
children: /* @__PURE__ */ jsx111("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs74(
|
|
32677
32869
|
"table",
|
|
32678
32870
|
{
|
|
32679
32871
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32680
32872
|
children: [
|
|
32681
|
-
/* @__PURE__ */
|
|
32873
|
+
/* @__PURE__ */ jsx111(
|
|
32682
32874
|
TableHead,
|
|
32683
32875
|
{
|
|
32684
32876
|
columns,
|
|
@@ -32688,7 +32880,7 @@ var Many2ManyField = (props) => {
|
|
|
32688
32880
|
handleCheckBoxAll
|
|
32689
32881
|
}
|
|
32690
32882
|
),
|
|
32691
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
32883
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx111(
|
|
32692
32884
|
TableBody,
|
|
32693
32885
|
{
|
|
32694
32886
|
tableGroupController,
|
|
@@ -32728,16 +32920,16 @@ var Many2ManyField = (props) => {
|
|
|
32728
32920
|
checkedAll,
|
|
32729
32921
|
context
|
|
32730
32922
|
}
|
|
32731
|
-
) : /* @__PURE__ */
|
|
32923
|
+
) : /* @__PURE__ */ jsx111("tr", { children: /* @__PURE__ */ jsx111(
|
|
32732
32924
|
"td",
|
|
32733
32925
|
{
|
|
32734
32926
|
className: "w-full",
|
|
32735
32927
|
colSpan: columns?.length + 2,
|
|
32736
|
-
children: /* @__PURE__ */
|
|
32928
|
+
children: /* @__PURE__ */ jsx111(
|
|
32737
32929
|
"div",
|
|
32738
32930
|
{
|
|
32739
32931
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
32740
|
-
children: /* @__PURE__ */
|
|
32932
|
+
children: /* @__PURE__ */ jsx111(EmptyTable, {})
|
|
32741
32933
|
}
|
|
32742
32934
|
)
|
|
32743
32935
|
}
|
|
@@ -32748,9 +32940,9 @@ var Many2ManyField = (props) => {
|
|
|
32748
32940
|
}
|
|
32749
32941
|
) }) })
|
|
32750
32942
|
}
|
|
32751
|
-
) }) }) : /* @__PURE__ */
|
|
32752
|
-
/* @__PURE__ */
|
|
32753
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
32943
|
+
) }) }) : /* @__PURE__ */ jsx111(LayerLoading, {}),
|
|
32944
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
32945
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx111(
|
|
32754
32946
|
"button",
|
|
32755
32947
|
{
|
|
32756
32948
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -32760,7 +32952,7 @@ var Many2ManyField = (props) => {
|
|
|
32760
32952
|
children: t3("choose")
|
|
32761
32953
|
}
|
|
32762
32954
|
),
|
|
32763
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
32955
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx111(
|
|
32764
32956
|
"button",
|
|
32765
32957
|
{
|
|
32766
32958
|
type: "button",
|
|
@@ -32776,7 +32968,7 @@ var Many2ManyField = (props) => {
|
|
|
32776
32968
|
children: t3("new")
|
|
32777
32969
|
}
|
|
32778
32970
|
),
|
|
32779
|
-
/* @__PURE__ */
|
|
32971
|
+
/* @__PURE__ */ jsx111(
|
|
32780
32972
|
"button",
|
|
32781
32973
|
{
|
|
32782
32974
|
type: "button",
|
|
@@ -32797,16 +32989,16 @@ var Many2ManyField = (props) => {
|
|
|
32797
32989
|
};
|
|
32798
32990
|
|
|
32799
32991
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
32800
|
-
import
|
|
32801
|
-
import { Fragment as Fragment32, jsx as
|
|
32992
|
+
import React19, { useEffect as useEffect28 } from "react";
|
|
32993
|
+
import { Fragment as Fragment32, jsx as jsx112, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
32802
32994
|
var CustomMenuList2 = (props) => {
|
|
32803
32995
|
const { t: t3 } = useI18n();
|
|
32804
32996
|
const { options: options2, children, selectProps } = props;
|
|
32805
32997
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32806
|
-
const limitedChildren =
|
|
32807
|
-
return /* @__PURE__ */
|
|
32998
|
+
const limitedChildren = React19.Children.toArray(children).slice(0, 10);
|
|
32999
|
+
return /* @__PURE__ */ jsxs75(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32808
33000
|
limitedChildren,
|
|
32809
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33001
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs75(
|
|
32810
33002
|
"button",
|
|
32811
33003
|
{
|
|
32812
33004
|
type: "button",
|
|
@@ -32849,14 +33041,14 @@ var Many2OneField = (props) => {
|
|
|
32849
33041
|
const { t: t3 } = useI18n();
|
|
32850
33042
|
if (!isForm && !isEditTable) {
|
|
32851
33043
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
32852
|
-
return /* @__PURE__ */
|
|
33044
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
32853
33045
|
allowShowDetail && renderDetail({
|
|
32854
33046
|
idToolTip: String(name2) + Number(index4),
|
|
32855
33047
|
model: options2?.model ?? relation,
|
|
32856
33048
|
context: contextObject,
|
|
32857
33049
|
idForm: id
|
|
32858
33050
|
}),
|
|
32859
|
-
/* @__PURE__ */
|
|
33051
|
+
/* @__PURE__ */ jsx112(
|
|
32860
33052
|
"span",
|
|
32861
33053
|
{
|
|
32862
33054
|
className: "cursor-pointer",
|
|
@@ -32867,20 +33059,20 @@ var Many2OneField = (props) => {
|
|
|
32867
33059
|
)
|
|
32868
33060
|
] });
|
|
32869
33061
|
}
|
|
32870
|
-
return /* @__PURE__ */
|
|
33062
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
32871
33063
|
allowShowDetail && renderDetail({
|
|
32872
33064
|
idToolTip: String(name2),
|
|
32873
33065
|
model: options2?.model ?? relation,
|
|
32874
33066
|
context: contextObject,
|
|
32875
33067
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
32876
33068
|
}),
|
|
32877
|
-
/* @__PURE__ */
|
|
33069
|
+
/* @__PURE__ */ jsx112(
|
|
32878
33070
|
"div",
|
|
32879
33071
|
{
|
|
32880
33072
|
id: name2,
|
|
32881
33073
|
"data-tooltip-id": name2,
|
|
32882
33074
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
32883
|
-
children: /* @__PURE__ */
|
|
33075
|
+
children: /* @__PURE__ */ jsx112(
|
|
32884
33076
|
Controller,
|
|
32885
33077
|
{
|
|
32886
33078
|
name: name2 ?? "",
|
|
@@ -32900,13 +33092,13 @@ var Many2OneField = (props) => {
|
|
|
32900
33092
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
32901
33093
|
(option) => option.value === tempSelectedOption?.value
|
|
32902
33094
|
) : currentValue ? currentValue : null;
|
|
32903
|
-
|
|
33095
|
+
useEffect28(() => {
|
|
32904
33096
|
if (error2 && selectedOption) {
|
|
32905
33097
|
methods?.clearErrors(name2);
|
|
32906
33098
|
}
|
|
32907
33099
|
}, [selectedOption]);
|
|
32908
|
-
return /* @__PURE__ */
|
|
32909
|
-
/* @__PURE__ */
|
|
33100
|
+
return /* @__PURE__ */ jsxs75("div", { className: "h-full", children: [
|
|
33101
|
+
/* @__PURE__ */ jsx112(
|
|
32910
33102
|
StateManagedSelect$1,
|
|
32911
33103
|
{
|
|
32912
33104
|
menuShouldScrollIntoView: false,
|
|
@@ -32983,7 +33175,7 @@ var Many2OneField = (props) => {
|
|
|
32983
33175
|
})
|
|
32984
33176
|
},
|
|
32985
33177
|
components: {
|
|
32986
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33178
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx112(
|
|
32987
33179
|
CustomMenuList2,
|
|
32988
33180
|
{
|
|
32989
33181
|
...menuListProps,
|
|
@@ -32994,13 +33186,13 @@ var Many2OneField = (props) => {
|
|
|
32994
33186
|
}
|
|
32995
33187
|
),
|
|
32996
33188
|
IndicatorSeparator: () => null,
|
|
32997
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33189
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx112(components.DropdownIndicator, { ...props2 })
|
|
32998
33190
|
},
|
|
32999
33191
|
isDisabled: readonly,
|
|
33000
33192
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33001
33193
|
}
|
|
33002
33194
|
),
|
|
33003
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33195
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx112("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33004
33196
|
] });
|
|
33005
33197
|
}
|
|
33006
33198
|
}
|
|
@@ -33011,7 +33203,7 @@ var Many2OneField = (props) => {
|
|
|
33011
33203
|
};
|
|
33012
33204
|
|
|
33013
33205
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33014
|
-
import { jsx as
|
|
33206
|
+
import { jsx as jsx113, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
33015
33207
|
var StatusbarDurationField = (props) => {
|
|
33016
33208
|
const {
|
|
33017
33209
|
disabled,
|
|
@@ -33021,14 +33213,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33021
33213
|
defaultValue,
|
|
33022
33214
|
setModalStatus
|
|
33023
33215
|
} = props;
|
|
33024
|
-
return /* @__PURE__ */
|
|
33216
|
+
return /* @__PURE__ */ jsx113(
|
|
33025
33217
|
"div",
|
|
33026
33218
|
{
|
|
33027
33219
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33028
|
-
children: /* @__PURE__ */
|
|
33029
|
-
/* @__PURE__ */
|
|
33220
|
+
children: /* @__PURE__ */ jsxs76("div", { className: "flex items-center gap-[24px]", children: [
|
|
33221
|
+
/* @__PURE__ */ jsx113("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33030
33222
|
const value = option?.id === defaultValue;
|
|
33031
|
-
return /* @__PURE__ */
|
|
33223
|
+
return /* @__PURE__ */ jsxs76(
|
|
33032
33224
|
"label",
|
|
33033
33225
|
{
|
|
33034
33226
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33038,7 +33230,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33038
33230
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33039
33231
|
`,
|
|
33040
33232
|
children: [
|
|
33041
|
-
/* @__PURE__ */
|
|
33233
|
+
/* @__PURE__ */ jsx113(
|
|
33042
33234
|
"input",
|
|
33043
33235
|
{
|
|
33044
33236
|
type: "radio",
|
|
@@ -33048,7 +33240,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33048
33240
|
}
|
|
33049
33241
|
),
|
|
33050
33242
|
option?.name,
|
|
33051
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33243
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx113(
|
|
33052
33244
|
"div",
|
|
33053
33245
|
{
|
|
33054
33246
|
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]
|
|
@@ -33063,14 +33255,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33063
33255
|
}) }),
|
|
33064
33256
|
dataResponse?.records?.some(
|
|
33065
33257
|
(item) => item?.fold && item.id !== defaultValue
|
|
33066
|
-
) && /* @__PURE__ */
|
|
33258
|
+
) && /* @__PURE__ */ jsxs76(
|
|
33067
33259
|
"div",
|
|
33068
33260
|
{
|
|
33069
33261
|
onClick: () => setModalStatus(!modelStatus),
|
|
33070
33262
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33071
33263
|
children: [
|
|
33072
|
-
/* @__PURE__ */
|
|
33073
|
-
modelStatus && /* @__PURE__ */
|
|
33264
|
+
/* @__PURE__ */ jsx113(MoreIcon, {}),
|
|
33265
|
+
modelStatus && /* @__PURE__ */ jsx113(
|
|
33074
33266
|
"div",
|
|
33075
33267
|
{
|
|
33076
33268
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33079,7 +33271,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33079
33271
|
(item) => item?.fold && item.id !== defaultValue
|
|
33080
33272
|
)?.map((option) => {
|
|
33081
33273
|
const value = option?.id === defaultValue;
|
|
33082
|
-
return /* @__PURE__ */
|
|
33274
|
+
return /* @__PURE__ */ jsx113(
|
|
33083
33275
|
"div",
|
|
33084
33276
|
{
|
|
33085
33277
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33100,15 +33292,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33100
33292
|
};
|
|
33101
33293
|
|
|
33102
33294
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33103
|
-
import { useMemo as
|
|
33104
|
-
import { Fragment as Fragment33, jsx as
|
|
33295
|
+
import { useMemo as useMemo12 } from "react";
|
|
33296
|
+
import { Fragment as Fragment33, jsx as jsx114, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
33105
33297
|
var StatusBarOptionField = (props) => {
|
|
33106
33298
|
const { selection, defaultValue } = props;
|
|
33107
|
-
const memoizedStatusOptions =
|
|
33299
|
+
const memoizedStatusOptions = useMemo12(() => selection, [selection]);
|
|
33108
33300
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33109
33301
|
(option) => option?.[0] === defaultValue
|
|
33110
33302
|
);
|
|
33111
|
-
return /* @__PURE__ */
|
|
33303
|
+
return /* @__PURE__ */ jsx114(
|
|
33112
33304
|
"div",
|
|
33113
33305
|
{
|
|
33114
33306
|
style: {
|
|
@@ -33117,8 +33309,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33117
33309
|
flexWrap: "wrap"
|
|
33118
33310
|
},
|
|
33119
33311
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33120
|
-
return /* @__PURE__ */
|
|
33121
|
-
/* @__PURE__ */
|
|
33312
|
+
return /* @__PURE__ */ jsxs77(Fragment33, { children: [
|
|
33313
|
+
/* @__PURE__ */ jsxs77(
|
|
33122
33314
|
"div",
|
|
33123
33315
|
{
|
|
33124
33316
|
style: {
|
|
@@ -33136,7 +33328,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33136
33328
|
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" : ""
|
|
33137
33329
|
},
|
|
33138
33330
|
children: [
|
|
33139
|
-
/* @__PURE__ */
|
|
33331
|
+
/* @__PURE__ */ jsx114(
|
|
33140
33332
|
"span",
|
|
33141
33333
|
{
|
|
33142
33334
|
style: {
|
|
@@ -33148,10 +33340,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33148
33340
|
alignItems: "center",
|
|
33149
33341
|
borderRadius: "100%"
|
|
33150
33342
|
},
|
|
33151
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
33343
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx114(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx114(ICCircle, {}) : /* @__PURE__ */ jsx114(ICMinus, {})
|
|
33152
33344
|
}
|
|
33153
33345
|
),
|
|
33154
|
-
/* @__PURE__ */
|
|
33346
|
+
/* @__PURE__ */ jsx114(
|
|
33155
33347
|
"span",
|
|
33156
33348
|
{
|
|
33157
33349
|
style: {
|
|
@@ -33164,7 +33356,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33164
33356
|
},
|
|
33165
33357
|
option?.[0]
|
|
33166
33358
|
),
|
|
33167
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
33359
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx114(
|
|
33168
33360
|
"div",
|
|
33169
33361
|
{
|
|
33170
33362
|
style: {
|
|
@@ -33180,7 +33372,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33180
33372
|
);
|
|
33181
33373
|
};
|
|
33182
33374
|
var ICMinus = () => {
|
|
33183
|
-
return /* @__PURE__ */
|
|
33375
|
+
return /* @__PURE__ */ jsx114(
|
|
33184
33376
|
"svg",
|
|
33185
33377
|
{
|
|
33186
33378
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33188,7 +33380,7 @@ var ICMinus = () => {
|
|
|
33188
33380
|
height: "16",
|
|
33189
33381
|
viewBox: "0 0 16 16",
|
|
33190
33382
|
fill: "none",
|
|
33191
|
-
children: /* @__PURE__ */
|
|
33383
|
+
children: /* @__PURE__ */ jsx114(
|
|
33192
33384
|
"path",
|
|
33193
33385
|
{
|
|
33194
33386
|
d: "M4 8H12",
|
|
@@ -33202,7 +33394,7 @@ var ICMinus = () => {
|
|
|
33202
33394
|
);
|
|
33203
33395
|
};
|
|
33204
33396
|
var ICCircle = () => {
|
|
33205
|
-
return /* @__PURE__ */
|
|
33397
|
+
return /* @__PURE__ */ jsx114(
|
|
33206
33398
|
"svg",
|
|
33207
33399
|
{
|
|
33208
33400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33210,12 +33402,12 @@ var ICCircle = () => {
|
|
|
33210
33402
|
height: "8",
|
|
33211
33403
|
viewBox: "0 0 8 8",
|
|
33212
33404
|
fill: "none",
|
|
33213
|
-
children: /* @__PURE__ */
|
|
33405
|
+
children: /* @__PURE__ */ jsx114("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33214
33406
|
}
|
|
33215
33407
|
);
|
|
33216
33408
|
};
|
|
33217
33409
|
var ICCheck = () => {
|
|
33218
|
-
return /* @__PURE__ */
|
|
33410
|
+
return /* @__PURE__ */ jsx114(
|
|
33219
33411
|
"svg",
|
|
33220
33412
|
{
|
|
33221
33413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33223,7 +33415,7 @@ var ICCheck = () => {
|
|
|
33223
33415
|
height: "16",
|
|
33224
33416
|
viewBox: "0 0 16 16",
|
|
33225
33417
|
fill: "none",
|
|
33226
|
-
children: /* @__PURE__ */
|
|
33418
|
+
children: /* @__PURE__ */ jsx114(
|
|
33227
33419
|
"path",
|
|
33228
33420
|
{
|
|
33229
33421
|
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",
|
|
@@ -33237,7 +33429,7 @@ var ICCheck = () => {
|
|
|
33237
33429
|
};
|
|
33238
33430
|
|
|
33239
33431
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33240
|
-
import { jsx as
|
|
33432
|
+
import { jsx as jsx115, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
33241
33433
|
var DateOptionField = (props) => {
|
|
33242
33434
|
const {
|
|
33243
33435
|
name: name2,
|
|
@@ -33248,19 +33440,19 @@ var DateOptionField = (props) => {
|
|
|
33248
33440
|
string,
|
|
33249
33441
|
onChange: onChange2
|
|
33250
33442
|
} = props;
|
|
33251
|
-
return /* @__PURE__ */
|
|
33443
|
+
return /* @__PURE__ */ jsx115(
|
|
33252
33444
|
Controller,
|
|
33253
33445
|
{
|
|
33254
33446
|
name: name2 ?? "",
|
|
33255
33447
|
control: methods?.control,
|
|
33256
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33448
|
+
render: ({ field }) => /* @__PURE__ */ jsxs78(
|
|
33257
33449
|
"label",
|
|
33258
33450
|
{
|
|
33259
33451
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33260
33452
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33261
33453
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33262
33454
|
children: [
|
|
33263
|
-
/* @__PURE__ */
|
|
33455
|
+
/* @__PURE__ */ jsx115(
|
|
33264
33456
|
"input",
|
|
33265
33457
|
{
|
|
33266
33458
|
type: "checkbox",
|
|
@@ -33329,6 +33521,7 @@ export {
|
|
|
33329
33521
|
RemainingDaysField,
|
|
33330
33522
|
Row,
|
|
33331
33523
|
Search,
|
|
33524
|
+
SecureField,
|
|
33332
33525
|
SelectDropdownField,
|
|
33333
33526
|
StatusBarOptionField,
|
|
33334
33527
|
StatusDropdownField,
|