@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.js
CHANGED
|
@@ -4981,6 +4981,7 @@ __export(widgets_exports, {
|
|
|
4981
4981
|
RemainingDaysField: () => RemainingDaysField,
|
|
4982
4982
|
Row: () => Row,
|
|
4983
4983
|
Search: () => Search,
|
|
4984
|
+
SecureField: () => SecureField,
|
|
4984
4985
|
SelectDropdownField: () => SelectDropdownField,
|
|
4985
4986
|
StatusBarOptionField: () => StatusBarOptionField,
|
|
4986
4987
|
StatusDropdownField: () => StatusDropdownField,
|
|
@@ -8804,26 +8805,30 @@ var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
|
8804
8805
|
var EyeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
8805
8806
|
"svg",
|
|
8806
8807
|
{
|
|
8807
|
-
width: "20",
|
|
8808
|
-
height: "21",
|
|
8809
|
-
viewBox: "0 0 20 21",
|
|
8810
|
-
fill: "none",
|
|
8811
8808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8809
|
+
width: "16",
|
|
8810
|
+
height: "16",
|
|
8811
|
+
viewBox: "0 0 16 16",
|
|
8812
|
+
fill: "none",
|
|
8812
8813
|
children: [
|
|
8813
8814
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8814
8815
|
"path",
|
|
8815
8816
|
{
|
|
8816
|
-
d: "
|
|
8817
|
-
stroke: "#
|
|
8818
|
-
strokeWidth: "1.5"
|
|
8817
|
+
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",
|
|
8818
|
+
stroke: "#646566",
|
|
8819
|
+
strokeWidth: "1.5",
|
|
8820
|
+
strokeLinecap: "round",
|
|
8821
|
+
strokeLinejoin: "round"
|
|
8819
8822
|
}
|
|
8820
8823
|
),
|
|
8821
8824
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8822
8825
|
"path",
|
|
8823
8826
|
{
|
|
8824
|
-
d: "
|
|
8825
|
-
stroke: "#
|
|
8826
|
-
strokeWidth: "1.5"
|
|
8827
|
+
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",
|
|
8828
|
+
stroke: "#646566",
|
|
8829
|
+
strokeWidth: "1.5",
|
|
8830
|
+
strokeLinecap: "round",
|
|
8831
|
+
strokeLinejoin: "round"
|
|
8827
8832
|
}
|
|
8828
8833
|
)
|
|
8829
8834
|
]
|
|
@@ -16612,8 +16617,196 @@ var CharField = (props) => {
|
|
|
16612
16617
|
);
|
|
16613
16618
|
};
|
|
16614
16619
|
|
|
16615
|
-
// src/widgets/basic/
|
|
16620
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16621
|
+
var import_react41 = require("react");
|
|
16622
|
+
|
|
16623
|
+
// src/icons/eye-hidden-icon.tsx
|
|
16616
16624
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
16625
|
+
var EyeHiddenIcon = () => {
|
|
16626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16627
|
+
"svg",
|
|
16628
|
+
{
|
|
16629
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16630
|
+
width: "16",
|
|
16631
|
+
height: "16",
|
|
16632
|
+
viewBox: "0 0 16 16",
|
|
16633
|
+
fill: "none",
|
|
16634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16635
|
+
"path",
|
|
16636
|
+
{
|
|
16637
|
+
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",
|
|
16638
|
+
fill: "#646566"
|
|
16639
|
+
}
|
|
16640
|
+
)
|
|
16641
|
+
}
|
|
16642
|
+
);
|
|
16643
|
+
};
|
|
16644
|
+
|
|
16645
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16646
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
16647
|
+
function isSensitive(widget) {
|
|
16648
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
16649
|
+
}
|
|
16650
|
+
function EyeIconComponent({ open }) {
|
|
16651
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeHiddenIcon, {});
|
|
16652
|
+
}
|
|
16653
|
+
var SecureField = (props) => {
|
|
16654
|
+
const {
|
|
16655
|
+
name: name2,
|
|
16656
|
+
readonly,
|
|
16657
|
+
placeholder,
|
|
16658
|
+
required,
|
|
16659
|
+
invisible,
|
|
16660
|
+
methods,
|
|
16661
|
+
onChange: onChange2,
|
|
16662
|
+
string = name2,
|
|
16663
|
+
widget,
|
|
16664
|
+
min: min3,
|
|
16665
|
+
max: max3,
|
|
16666
|
+
special,
|
|
16667
|
+
upcase,
|
|
16668
|
+
digit,
|
|
16669
|
+
regex,
|
|
16670
|
+
className,
|
|
16671
|
+
value,
|
|
16672
|
+
defaultValue,
|
|
16673
|
+
isForm,
|
|
16674
|
+
isEditTable
|
|
16675
|
+
} = props;
|
|
16676
|
+
const { t: t3 } = useI18n();
|
|
16677
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
16678
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
16679
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
16680
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
16681
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
16682
|
+
return message2;
|
|
16683
|
+
};
|
|
16684
|
+
if (!isForm && !isEditTable) {
|
|
16685
|
+
const propValue = value || defaultValue;
|
|
16686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
16687
|
+
}
|
|
16688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16689
|
+
Controller,
|
|
16690
|
+
{
|
|
16691
|
+
name: String(name2),
|
|
16692
|
+
control: methods.control,
|
|
16693
|
+
rules: {
|
|
16694
|
+
...required && !invisible ? {
|
|
16695
|
+
required: {
|
|
16696
|
+
value: true,
|
|
16697
|
+
message: `${string} ${t3("must_required")}`
|
|
16698
|
+
}
|
|
16699
|
+
} : {},
|
|
16700
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
16701
|
+
pattern: {
|
|
16702
|
+
value: new RegExp(regex),
|
|
16703
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
16704
|
+
}
|
|
16705
|
+
} : {}
|
|
16706
|
+
},
|
|
16707
|
+
render: ({
|
|
16708
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
16709
|
+
fieldState: { error: error2 }
|
|
16710
|
+
}) => {
|
|
16711
|
+
const { setError, clearErrors } = methods;
|
|
16712
|
+
const [showPlain, setShowPlain] = (0, import_react41.useState)(false);
|
|
16713
|
+
const realValue = (0, import_react41.useMemo)(
|
|
16714
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
16715
|
+
[value2]
|
|
16716
|
+
);
|
|
16717
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
16718
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
16719
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
16720
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
16721
|
+
(0, import_react41.useEffect)(() => {
|
|
16722
|
+
if (canToggle) setShowPlain(false);
|
|
16723
|
+
}, [canToggle]);
|
|
16724
|
+
(0, import_react41.useEffect)(() => {
|
|
16725
|
+
if (value2) clearErrors(name2);
|
|
16726
|
+
}, [value2, clearErrors, name2]);
|
|
16727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
16728
|
+
isCappedToken && shouldMask && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16729
|
+
"div",
|
|
16730
|
+
{
|
|
16731
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
16732
|
+
"aria-hidden": "true",
|
|
16733
|
+
children: maskedDisplay
|
|
16734
|
+
}
|
|
16735
|
+
),
|
|
16736
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16737
|
+
"input",
|
|
16738
|
+
{
|
|
16739
|
+
value: realValue,
|
|
16740
|
+
onChange: (e3) => {
|
|
16741
|
+
if (readonly) return;
|
|
16742
|
+
const inputValue = e3.target.value ?? "";
|
|
16743
|
+
fieldOnchange(inputValue);
|
|
16744
|
+
clearErrors(name2);
|
|
16745
|
+
},
|
|
16746
|
+
onBlur: (e3) => {
|
|
16747
|
+
if (readonly) return;
|
|
16748
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
16749
|
+
if (!inputValue && required && !invisible) {
|
|
16750
|
+
setError(name2, {
|
|
16751
|
+
type: "required",
|
|
16752
|
+
message: `${string} ${t3("must_required")}`
|
|
16753
|
+
});
|
|
16754
|
+
return;
|
|
16755
|
+
}
|
|
16756
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
16757
|
+
setError(name2, {
|
|
16758
|
+
type: "pattern",
|
|
16759
|
+
message: getPasswordMessage2(
|
|
16760
|
+
min3,
|
|
16761
|
+
max3,
|
|
16762
|
+
upcase,
|
|
16763
|
+
digit,
|
|
16764
|
+
special
|
|
16765
|
+
)
|
|
16766
|
+
});
|
|
16767
|
+
return;
|
|
16768
|
+
}
|
|
16769
|
+
fieldOnchange(inputValue);
|
|
16770
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
16771
|
+
clearErrors(name2);
|
|
16772
|
+
},
|
|
16773
|
+
readOnly: readonly,
|
|
16774
|
+
disabled: readonly,
|
|
16775
|
+
placeholder,
|
|
16776
|
+
required: !invisible && required,
|
|
16777
|
+
style: {
|
|
16778
|
+
...isCappedToken && shouldMask ? {
|
|
16779
|
+
WebkitTextSecurity: "none",
|
|
16780
|
+
color: "transparent",
|
|
16781
|
+
caretColor: void 0
|
|
16782
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
16783
|
+
},
|
|
16784
|
+
onCopy: (e3) => {
|
|
16785
|
+
if (shouldMask) e3.preventDefault();
|
|
16786
|
+
},
|
|
16787
|
+
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
|
|
16788
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
16789
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
16790
|
+
}
|
|
16791
|
+
),
|
|
16792
|
+
canToggle && !isCappedToken && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16793
|
+
"button",
|
|
16794
|
+
{
|
|
16795
|
+
type: "button",
|
|
16796
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
16797
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
16798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIconComponent, { open: showPlain })
|
|
16799
|
+
}
|
|
16800
|
+
),
|
|
16801
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16802
|
+
] });
|
|
16803
|
+
}
|
|
16804
|
+
}
|
|
16805
|
+
);
|
|
16806
|
+
};
|
|
16807
|
+
|
|
16808
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16809
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
16617
16810
|
var CheckboxField = (props) => {
|
|
16618
16811
|
const {
|
|
16619
16812
|
name: name2,
|
|
@@ -16628,9 +16821,9 @@ var CheckboxField = (props) => {
|
|
|
16628
16821
|
} = props;
|
|
16629
16822
|
if (!isForm) {
|
|
16630
16823
|
if (name2 === "is_active" || name2 === "active") {
|
|
16631
|
-
return /* @__PURE__ */ (0,
|
|
16824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ActiveBadgeField, { type: value });
|
|
16632
16825
|
} else {
|
|
16633
|
-
return /* @__PURE__ */ (0,
|
|
16826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16634
16827
|
"input",
|
|
16635
16828
|
{
|
|
16636
16829
|
type: "checkbox",
|
|
@@ -16641,12 +16834,12 @@ var CheckboxField = (props) => {
|
|
|
16641
16834
|
);
|
|
16642
16835
|
}
|
|
16643
16836
|
}
|
|
16644
|
-
return /* @__PURE__ */ (0,
|
|
16837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16645
16838
|
Controller,
|
|
16646
16839
|
{
|
|
16647
16840
|
name: name2 ?? "",
|
|
16648
16841
|
control: methods?.control,
|
|
16649
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
16842
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16650
16843
|
"div",
|
|
16651
16844
|
{
|
|
16652
16845
|
className: "flex items-center gap-2",
|
|
@@ -16659,7 +16852,7 @@ var CheckboxField = (props) => {
|
|
|
16659
16852
|
onChange2(name2 ?? "", checked);
|
|
16660
16853
|
}
|
|
16661
16854
|
},
|
|
16662
|
-
children: /* @__PURE__ */ (0,
|
|
16855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16663
16856
|
"input",
|
|
16664
16857
|
{
|
|
16665
16858
|
...field,
|
|
@@ -16686,21 +16879,21 @@ var CheckboxField = (props) => {
|
|
|
16686
16879
|
};
|
|
16687
16880
|
|
|
16688
16881
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16689
|
-
var
|
|
16690
|
-
var
|
|
16882
|
+
var import_react42 = require("react");
|
|
16883
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
16691
16884
|
var ColorWrapper = (props) => {
|
|
16692
16885
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
16693
16886
|
const { t: t3 } = useI18n();
|
|
16694
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
16695
|
-
const [showFullColors, setIsShowFullColor] = (0,
|
|
16696
|
-
const pickColorsRef = (0,
|
|
16697
|
-
(0,
|
|
16887
|
+
const [selectedColor, setSelectedColor] = (0, import_react42.useState)(colors2[defaultColor]);
|
|
16888
|
+
const [showFullColors, setIsShowFullColor] = (0, import_react42.useState)(false);
|
|
16889
|
+
const pickColorsRef = (0, import_react42.useRef)(null);
|
|
16890
|
+
(0, import_react42.useEffect)(() => {
|
|
16698
16891
|
setSelectedColor(colors2[defaultColor]);
|
|
16699
16892
|
}, [defaultColor]);
|
|
16700
16893
|
const handleShowFullColors = () => {
|
|
16701
16894
|
setIsShowFullColor(!showFullColors);
|
|
16702
16895
|
};
|
|
16703
|
-
(0,
|
|
16896
|
+
(0, import_react42.useEffect)(() => {
|
|
16704
16897
|
const handleClickOutside = (event) => {
|
|
16705
16898
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
16706
16899
|
setIsShowFullColor(false);
|
|
@@ -16711,8 +16904,8 @@ var ColorWrapper = (props) => {
|
|
|
16711
16904
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16712
16905
|
};
|
|
16713
16906
|
}, []);
|
|
16714
|
-
return /* @__PURE__ */ (0,
|
|
16715
|
-
/* @__PURE__ */ (0,
|
|
16907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
|
|
16908
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16716
16909
|
"button",
|
|
16717
16910
|
{
|
|
16718
16911
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16726,7 +16919,7 @@ var ColorWrapper = (props) => {
|
|
|
16726
16919
|
}
|
|
16727
16920
|
}
|
|
16728
16921
|
),
|
|
16729
|
-
/* @__PURE__ */ (0,
|
|
16922
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16730
16923
|
M,
|
|
16731
16924
|
{
|
|
16732
16925
|
className: "",
|
|
@@ -16735,8 +16928,8 @@ var ColorWrapper = (props) => {
|
|
|
16735
16928
|
content: t3(color?.name)
|
|
16736
16929
|
}
|
|
16737
16930
|
)
|
|
16738
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
16739
|
-
/* @__PURE__ */ (0,
|
|
16931
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
16932
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16740
16933
|
"button",
|
|
16741
16934
|
{
|
|
16742
16935
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16749,7 +16942,7 @@ var ColorWrapper = (props) => {
|
|
|
16749
16942
|
style: { backgroundColor: selectedColor?.color }
|
|
16750
16943
|
}
|
|
16751
16944
|
),
|
|
16752
|
-
/* @__PURE__ */ (0,
|
|
16945
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16753
16946
|
M,
|
|
16754
16947
|
{
|
|
16755
16948
|
place: "top",
|
|
@@ -16761,13 +16954,13 @@ var ColorWrapper = (props) => {
|
|
|
16761
16954
|
};
|
|
16762
16955
|
|
|
16763
16956
|
// src/widgets/basic/color-field/color.tsx
|
|
16764
|
-
var
|
|
16957
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
16765
16958
|
var ColorField = (props) => {
|
|
16766
16959
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16767
16960
|
if (!isForm) {
|
|
16768
|
-
return /* @__PURE__ */ (0,
|
|
16961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16769
16962
|
}
|
|
16770
|
-
return /* @__PURE__ */ (0,
|
|
16963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16771
16964
|
Controller,
|
|
16772
16965
|
{
|
|
16773
16966
|
name: name2 ?? "",
|
|
@@ -16777,7 +16970,7 @@ var ColorField = (props) => {
|
|
|
16777
16970
|
field.onChange(color?.id);
|
|
16778
16971
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
16779
16972
|
};
|
|
16780
|
-
return /* @__PURE__ */ (0,
|
|
16973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16781
16974
|
ColorWrapper,
|
|
16782
16975
|
{
|
|
16783
16976
|
savePickColor: handlePickColorChange,
|
|
@@ -16791,8 +16984,8 @@ var ColorField = (props) => {
|
|
|
16791
16984
|
};
|
|
16792
16985
|
|
|
16793
16986
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
16794
|
-
var
|
|
16795
|
-
var
|
|
16987
|
+
var import_react43 = require("react");
|
|
16988
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
16796
16989
|
var CopyLinkButtonField = (props) => {
|
|
16797
16990
|
const {
|
|
16798
16991
|
isForm,
|
|
@@ -16811,9 +17004,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
16811
17004
|
} = props;
|
|
16812
17005
|
const { t: t3 } = useI18n();
|
|
16813
17006
|
if (!isForm) {
|
|
16814
|
-
return /* @__PURE__ */ (0,
|
|
17007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16815
17008
|
}
|
|
16816
|
-
return /* @__PURE__ */ (0,
|
|
17009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16817
17010
|
Controller,
|
|
16818
17011
|
{
|
|
16819
17012
|
name: name2 ?? "",
|
|
@@ -16826,13 +17019,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
16826
17019
|
fieldState: { error: error2 }
|
|
16827
17020
|
}) => {
|
|
16828
17021
|
const { setError, clearErrors } = methods;
|
|
16829
|
-
(0,
|
|
17022
|
+
(0, import_react43.useEffect)(() => {
|
|
16830
17023
|
if (value) {
|
|
16831
17024
|
clearErrors(name2);
|
|
16832
17025
|
}
|
|
16833
17026
|
}, [value]);
|
|
16834
|
-
return /* @__PURE__ */ (0,
|
|
16835
|
-
/* @__PURE__ */ (0,
|
|
17027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "relative", children: [
|
|
17028
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
16836
17029
|
"div",
|
|
16837
17030
|
{
|
|
16838
17031
|
"aria-disabled": readonly,
|
|
@@ -16841,7 +17034,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
16841
17034
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16842
17035
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
16843
17036
|
children: [
|
|
16844
|
-
/* @__PURE__ */ (0,
|
|
17037
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16845
17038
|
"input",
|
|
16846
17039
|
{
|
|
16847
17040
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -16882,19 +17075,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
16882
17075
|
`
|
|
16883
17076
|
}
|
|
16884
17077
|
),
|
|
16885
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17078
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16886
17079
|
"button",
|
|
16887
17080
|
{
|
|
16888
17081
|
className: "cursor-pointer",
|
|
16889
17082
|
type: "button",
|
|
16890
17083
|
onClick: () => handleCopyToClipboard(propValue),
|
|
16891
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17084
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, {})
|
|
16892
17085
|
}
|
|
16893
17086
|
)
|
|
16894
17087
|
]
|
|
16895
17088
|
}
|
|
16896
17089
|
),
|
|
16897
|
-
error2 && /* @__PURE__ */ (0,
|
|
17090
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16898
17091
|
] });
|
|
16899
17092
|
}
|
|
16900
17093
|
}
|
|
@@ -16902,10 +17095,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
16902
17095
|
};
|
|
16903
17096
|
|
|
16904
17097
|
// src/widgets/basic/date-field/date.tsx
|
|
16905
|
-
var
|
|
17098
|
+
var import_react56 = require("react");
|
|
16906
17099
|
|
|
16907
17100
|
// node_modules/react-datepicker/dist/index.es.js
|
|
16908
|
-
var
|
|
17101
|
+
var import_react46 = __toESM(require("react"));
|
|
16909
17102
|
|
|
16910
17103
|
// node_modules/date-fns/constants.js
|
|
16911
17104
|
var daysInYear = 365.2425;
|
|
@@ -20803,22 +20996,22 @@ function subYears(date, amount, options2) {
|
|
|
20803
20996
|
}
|
|
20804
20997
|
|
|
20805
20998
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20806
|
-
var
|
|
20999
|
+
var React9 = __toESM(require("react"), 1);
|
|
20807
21000
|
|
|
20808
21001
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
20809
|
-
var
|
|
20810
|
-
var
|
|
21002
|
+
var React7 = __toESM(require("react"), 1);
|
|
21003
|
+
var import_react44 = require("react");
|
|
20811
21004
|
var isClient = typeof document !== "undefined";
|
|
20812
21005
|
var noop2 = function noop3() {
|
|
20813
21006
|
};
|
|
20814
|
-
var index = isClient ?
|
|
21007
|
+
var index = isClient ? import_react44.useLayoutEffect : noop2;
|
|
20815
21008
|
var SafeReact = {
|
|
20816
|
-
...
|
|
21009
|
+
...React7
|
|
20817
21010
|
};
|
|
20818
21011
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
20819
21012
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
20820
21013
|
function useEffectEvent(callback) {
|
|
20821
|
-
const ref =
|
|
21014
|
+
const ref = React7.useRef(() => {
|
|
20822
21015
|
if (process.env.NODE_ENV !== "production") {
|
|
20823
21016
|
throw new Error("Cannot call an event handler while rendering.");
|
|
20824
21017
|
}
|
|
@@ -20826,7 +21019,7 @@ function useEffectEvent(callback) {
|
|
|
20826
21019
|
useSafeInsertionEffect(() => {
|
|
20827
21020
|
ref.current = callback;
|
|
20828
21021
|
});
|
|
20829
|
-
return
|
|
21022
|
+
return React7.useCallback(function() {
|
|
20830
21023
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20831
21024
|
args[_key] = arguments[_key];
|
|
20832
21025
|
}
|
|
@@ -20835,17 +21028,17 @@ function useEffectEvent(callback) {
|
|
|
20835
21028
|
}
|
|
20836
21029
|
|
|
20837
21030
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20838
|
-
var
|
|
21031
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
20839
21032
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
20840
21033
|
|
|
20841
21034
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
20842
|
-
var
|
|
20843
|
-
var
|
|
21035
|
+
var React8 = __toESM(require("react"), 1);
|
|
21036
|
+
var import_react45 = require("react");
|
|
20844
21037
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
20845
21038
|
var isClient2 = typeof document !== "undefined";
|
|
20846
21039
|
var noop4 = function noop5() {
|
|
20847
21040
|
};
|
|
20848
|
-
var index2 = isClient2 ?
|
|
21041
|
+
var index2 = isClient2 ? import_react45.useLayoutEffect : noop4;
|
|
20849
21042
|
function deepEqual2(a2, b2) {
|
|
20850
21043
|
if (a2 === b2) {
|
|
20851
21044
|
return true;
|
|
@@ -20905,7 +21098,7 @@ function roundByDPR(element, value) {
|
|
|
20905
21098
|
return Math.round(value * dpr) / dpr;
|
|
20906
21099
|
}
|
|
20907
21100
|
function useLatestRef(value) {
|
|
20908
|
-
const ref =
|
|
21101
|
+
const ref = React8.useRef(value);
|
|
20909
21102
|
index2(() => {
|
|
20910
21103
|
ref.current = value;
|
|
20911
21104
|
});
|
|
@@ -20928,7 +21121,7 @@ function useFloating(options2) {
|
|
|
20928
21121
|
whileElementsMounted,
|
|
20929
21122
|
open
|
|
20930
21123
|
} = options2;
|
|
20931
|
-
const [data, setData] =
|
|
21124
|
+
const [data, setData] = React8.useState({
|
|
20932
21125
|
x: 0,
|
|
20933
21126
|
y: 0,
|
|
20934
21127
|
strategy,
|
|
@@ -20936,19 +21129,19 @@ function useFloating(options2) {
|
|
|
20936
21129
|
middlewareData: {},
|
|
20937
21130
|
isPositioned: false
|
|
20938
21131
|
});
|
|
20939
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21132
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
20940
21133
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
20941
21134
|
setLatestMiddleware(middleware2);
|
|
20942
21135
|
}
|
|
20943
|
-
const [_reference, _setReference] =
|
|
20944
|
-
const [_floating, _setFloating] =
|
|
20945
|
-
const setReference =
|
|
21136
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21137
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21138
|
+
const setReference = React8.useCallback((node2) => {
|
|
20946
21139
|
if (node2 !== referenceRef.current) {
|
|
20947
21140
|
referenceRef.current = node2;
|
|
20948
21141
|
_setReference(node2);
|
|
20949
21142
|
}
|
|
20950
21143
|
}, []);
|
|
20951
|
-
const setFloating =
|
|
21144
|
+
const setFloating = React8.useCallback((node2) => {
|
|
20952
21145
|
if (node2 !== floatingRef.current) {
|
|
20953
21146
|
floatingRef.current = node2;
|
|
20954
21147
|
_setFloating(node2);
|
|
@@ -20956,14 +21149,14 @@ function useFloating(options2) {
|
|
|
20956
21149
|
}, []);
|
|
20957
21150
|
const referenceEl = externalReference || _reference;
|
|
20958
21151
|
const floatingEl = externalFloating || _floating;
|
|
20959
|
-
const referenceRef =
|
|
20960
|
-
const floatingRef =
|
|
20961
|
-
const dataRef =
|
|
21152
|
+
const referenceRef = React8.useRef(null);
|
|
21153
|
+
const floatingRef = React8.useRef(null);
|
|
21154
|
+
const dataRef = React8.useRef(data);
|
|
20962
21155
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
20963
21156
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
20964
21157
|
const platformRef = useLatestRef(platform2);
|
|
20965
21158
|
const openRef = useLatestRef(open);
|
|
20966
|
-
const update =
|
|
21159
|
+
const update = React8.useCallback(() => {
|
|
20967
21160
|
if (!referenceRef.current || !floatingRef.current) {
|
|
20968
21161
|
return;
|
|
20969
21162
|
}
|
|
@@ -21001,7 +21194,7 @@ function useFloating(options2) {
|
|
|
21001
21194
|
}));
|
|
21002
21195
|
}
|
|
21003
21196
|
}, [open]);
|
|
21004
|
-
const isMountedRef =
|
|
21197
|
+
const isMountedRef = React8.useRef(false);
|
|
21005
21198
|
index2(() => {
|
|
21006
21199
|
isMountedRef.current = true;
|
|
21007
21200
|
return () => {
|
|
@@ -21018,17 +21211,17 @@ function useFloating(options2) {
|
|
|
21018
21211
|
update();
|
|
21019
21212
|
}
|
|
21020
21213
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21021
|
-
const refs =
|
|
21214
|
+
const refs = React8.useMemo(() => ({
|
|
21022
21215
|
reference: referenceRef,
|
|
21023
21216
|
floating: floatingRef,
|
|
21024
21217
|
setReference,
|
|
21025
21218
|
setFloating
|
|
21026
21219
|
}), [setReference, setFloating]);
|
|
21027
|
-
const elements =
|
|
21220
|
+
const elements = React8.useMemo(() => ({
|
|
21028
21221
|
reference: referenceEl,
|
|
21029
21222
|
floating: floatingEl
|
|
21030
21223
|
}), [referenceEl, floatingEl]);
|
|
21031
|
-
const floatingStyles =
|
|
21224
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21032
21225
|
const initialStyles = {
|
|
21033
21226
|
position: strategy,
|
|
21034
21227
|
left: 0,
|
|
@@ -21054,7 +21247,7 @@ function useFloating(options2) {
|
|
|
21054
21247
|
top: y3
|
|
21055
21248
|
};
|
|
21056
21249
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21057
|
-
return
|
|
21250
|
+
return React8.useMemo(() => ({
|
|
21058
21251
|
...data,
|
|
21059
21252
|
update,
|
|
21060
21253
|
refs,
|
|
@@ -21115,7 +21308,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21115
21308
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21116
21309
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21117
21310
|
var SafeReact2 = {
|
|
21118
|
-
...
|
|
21311
|
+
...React9
|
|
21119
21312
|
};
|
|
21120
21313
|
var serverHandoffComplete = false;
|
|
21121
21314
|
var count = 0;
|
|
@@ -21125,13 +21318,13 @@ var genId = () => (
|
|
|
21125
21318
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21126
21319
|
);
|
|
21127
21320
|
function useFloatingId() {
|
|
21128
|
-
const [id, setId] =
|
|
21321
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21129
21322
|
index(() => {
|
|
21130
21323
|
if (id == null) {
|
|
21131
21324
|
setId(genId());
|
|
21132
21325
|
}
|
|
21133
21326
|
}, []);
|
|
21134
|
-
|
|
21327
|
+
React9.useEffect(() => {
|
|
21135
21328
|
serverHandoffComplete = true;
|
|
21136
21329
|
}, []);
|
|
21137
21330
|
return id;
|
|
@@ -21166,7 +21359,7 @@ function error() {
|
|
|
21166
21359
|
console.error(message2);
|
|
21167
21360
|
}
|
|
21168
21361
|
}
|
|
21169
|
-
var FloatingArrow = /* @__PURE__ */
|
|
21362
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21170
21363
|
const {
|
|
21171
21364
|
context: {
|
|
21172
21365
|
placement,
|
|
@@ -21197,7 +21390,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21197
21390
|
}
|
|
21198
21391
|
}
|
|
21199
21392
|
const clipPathId = useId();
|
|
21200
|
-
const [isRTL2, setIsRTL] =
|
|
21393
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21201
21394
|
index(() => {
|
|
21202
21395
|
if (!floating) return;
|
|
21203
21396
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21233,7 +21426,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21233
21426
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21234
21427
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21235
21428
|
}[side];
|
|
21236
|
-
return /* @__PURE__ */ (0,
|
|
21429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("svg", {
|
|
21237
21430
|
...rest,
|
|
21238
21431
|
"aria-hidden": true,
|
|
21239
21432
|
ref,
|
|
@@ -21249,18 +21442,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21249
21442
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21250
21443
|
...restStyle
|
|
21251
21444
|
},
|
|
21252
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
21445
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
21253
21446
|
clipPath: "url(#" + clipPathId + ")",
|
|
21254
21447
|
fill: "none",
|
|
21255
21448
|
stroke,
|
|
21256
21449
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21257
21450
|
d: dValue
|
|
21258
|
-
}), /* @__PURE__ */ (0,
|
|
21451
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
21259
21452
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21260
21453
|
d: dValue
|
|
21261
|
-
}), /* @__PURE__ */ (0,
|
|
21454
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("clipPath", {
|
|
21262
21455
|
id: clipPathId,
|
|
21263
|
-
children: /* @__PURE__ */ (0,
|
|
21456
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("rect", {
|
|
21264
21457
|
x: -halfStrokeWidth,
|
|
21265
21458
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21266
21459
|
width: width + computedStrokeWidth,
|
|
@@ -21288,13 +21481,13 @@ function createEventEmitter() {
|
|
|
21288
21481
|
}
|
|
21289
21482
|
};
|
|
21290
21483
|
}
|
|
21291
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
21292
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
21484
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21485
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21293
21486
|
var useFloatingParentNodeId = () => {
|
|
21294
21487
|
var _React$useContext;
|
|
21295
|
-
return ((_React$useContext =
|
|
21488
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
21296
21489
|
};
|
|
21297
|
-
var useFloatingTree = () =>
|
|
21490
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
21298
21491
|
function useFloatingRootContext(options2) {
|
|
21299
21492
|
const {
|
|
21300
21493
|
open = false,
|
|
@@ -21302,8 +21495,8 @@ function useFloatingRootContext(options2) {
|
|
|
21302
21495
|
elements: elementsProp
|
|
21303
21496
|
} = options2;
|
|
21304
21497
|
const floatingId = useId();
|
|
21305
|
-
const dataRef =
|
|
21306
|
-
const [events] =
|
|
21498
|
+
const dataRef = React9.useRef({});
|
|
21499
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
21307
21500
|
const nested = useFloatingParentNodeId() != null;
|
|
21308
21501
|
if (process.env.NODE_ENV !== "production") {
|
|
21309
21502
|
const optionDomReference = elementsProp.reference;
|
|
@@ -21311,7 +21504,7 @@ function useFloatingRootContext(options2) {
|
|
|
21311
21504
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
21312
21505
|
}
|
|
21313
21506
|
}
|
|
21314
|
-
const [positionReference, setPositionReference] =
|
|
21507
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
21315
21508
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
21316
21509
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
21317
21510
|
events.emit("openchange", {
|
|
@@ -21322,15 +21515,15 @@ function useFloatingRootContext(options2) {
|
|
|
21322
21515
|
});
|
|
21323
21516
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
21324
21517
|
});
|
|
21325
|
-
const refs =
|
|
21518
|
+
const refs = React9.useMemo(() => ({
|
|
21326
21519
|
setPositionReference
|
|
21327
21520
|
}), []);
|
|
21328
|
-
const elements =
|
|
21521
|
+
const elements = React9.useMemo(() => ({
|
|
21329
21522
|
reference: positionReference || elementsProp.reference || null,
|
|
21330
21523
|
floating: elementsProp.floating || null,
|
|
21331
21524
|
domReference: elementsProp.reference
|
|
21332
21525
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
21333
|
-
return
|
|
21526
|
+
return React9.useMemo(() => ({
|
|
21334
21527
|
dataRef,
|
|
21335
21528
|
open,
|
|
21336
21529
|
onOpenChange,
|
|
@@ -21357,11 +21550,11 @@ function useFloating2(options2) {
|
|
|
21357
21550
|
});
|
|
21358
21551
|
const rootContext = options2.rootContext || internalRootContext;
|
|
21359
21552
|
const computedElements = rootContext.elements;
|
|
21360
|
-
const [_domReference, setDomReference] =
|
|
21361
|
-
const [positionReference, _setPositionReference] =
|
|
21553
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
21554
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
21362
21555
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
21363
21556
|
const domReference = optionDomReference || _domReference;
|
|
21364
|
-
const domReferenceRef =
|
|
21557
|
+
const domReferenceRef = React9.useRef(null);
|
|
21365
21558
|
const tree = useFloatingTree();
|
|
21366
21559
|
index(() => {
|
|
21367
21560
|
if (domReference) {
|
|
@@ -21377,7 +21570,7 @@ function useFloating2(options2) {
|
|
|
21377
21570
|
}
|
|
21378
21571
|
}
|
|
21379
21572
|
});
|
|
21380
|
-
const setPositionReference =
|
|
21573
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
21381
21574
|
const computedPositionReference = isElement(node2) ? {
|
|
21382
21575
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
21383
21576
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -21386,7 +21579,7 @@ function useFloating2(options2) {
|
|
|
21386
21579
|
_setPositionReference(computedPositionReference);
|
|
21387
21580
|
position2.refs.setReference(computedPositionReference);
|
|
21388
21581
|
}, [position2.refs]);
|
|
21389
|
-
const setReference =
|
|
21582
|
+
const setReference = React9.useCallback((node2) => {
|
|
21390
21583
|
if (isElement(node2) || node2 === null) {
|
|
21391
21584
|
domReferenceRef.current = node2;
|
|
21392
21585
|
setDomReference(node2);
|
|
@@ -21398,17 +21591,17 @@ function useFloating2(options2) {
|
|
|
21398
21591
|
position2.refs.setReference(node2);
|
|
21399
21592
|
}
|
|
21400
21593
|
}, [position2.refs]);
|
|
21401
|
-
const refs =
|
|
21594
|
+
const refs = React9.useMemo(() => ({
|
|
21402
21595
|
...position2.refs,
|
|
21403
21596
|
setReference,
|
|
21404
21597
|
setPositionReference,
|
|
21405
21598
|
domReference: domReferenceRef
|
|
21406
21599
|
}), [position2.refs, setReference, setPositionReference]);
|
|
21407
|
-
const elements =
|
|
21600
|
+
const elements = React9.useMemo(() => ({
|
|
21408
21601
|
...position2.elements,
|
|
21409
21602
|
domReference
|
|
21410
21603
|
}), [position2.elements, domReference]);
|
|
21411
|
-
const context =
|
|
21604
|
+
const context = React9.useMemo(() => ({
|
|
21412
21605
|
...position2,
|
|
21413
21606
|
...rootContext,
|
|
21414
21607
|
refs,
|
|
@@ -21422,7 +21615,7 @@ function useFloating2(options2) {
|
|
|
21422
21615
|
node2.context = context;
|
|
21423
21616
|
}
|
|
21424
21617
|
});
|
|
21425
|
-
return
|
|
21618
|
+
return React9.useMemo(() => ({
|
|
21426
21619
|
...position2,
|
|
21427
21620
|
context,
|
|
21428
21621
|
refs,
|
|
@@ -21472,13 +21665,13 @@ function __spreadArray(to2, from2, pack) {
|
|
|
21472
21665
|
var CalendarContainer = function(_a2) {
|
|
21473
21666
|
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;
|
|
21474
21667
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
21475
|
-
return
|
|
21668
|
+
return import_react46.default.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
21476
21669
|
};
|
|
21477
21670
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
21478
|
-
var ref = (0,
|
|
21479
|
-
var onClickOutsideRef = (0,
|
|
21671
|
+
var ref = (0, import_react46.useRef)(null);
|
|
21672
|
+
var onClickOutsideRef = (0, import_react46.useRef)(onClickOutside);
|
|
21480
21673
|
onClickOutsideRef.current = onClickOutside;
|
|
21481
|
-
var handleClickOutside = (0,
|
|
21674
|
+
var handleClickOutside = (0, import_react46.useCallback)(function(event) {
|
|
21482
21675
|
var _a2;
|
|
21483
21676
|
var target = event.composed && event.composedPath && event.composedPath().find(function(eventTarget) {
|
|
21484
21677
|
return eventTarget instanceof Node;
|
|
@@ -21489,7 +21682,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21489
21682
|
}
|
|
21490
21683
|
}
|
|
21491
21684
|
}, [ignoreClass]);
|
|
21492
|
-
(0,
|
|
21685
|
+
(0, import_react46.useEffect)(function() {
|
|
21493
21686
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21494
21687
|
return function() {
|
|
21495
21688
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -21500,7 +21693,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21500
21693
|
var ClickOutsideWrapper = function(_a2) {
|
|
21501
21694
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
21502
21695
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
21503
|
-
return
|
|
21696
|
+
return import_react46.default.createElement("div", { className, style, ref: function(node2) {
|
|
21504
21697
|
detectRef.current = node2;
|
|
21505
21698
|
if (containerRef) {
|
|
21506
21699
|
containerRef.current = node2;
|
|
@@ -22096,7 +22289,7 @@ var InputTime = (
|
|
|
22096
22289
|
__extends(InputTime2, _super);
|
|
22097
22290
|
function InputTime2(props) {
|
|
22098
22291
|
var _this = _super.call(this, props) || this;
|
|
22099
|
-
_this.inputRef =
|
|
22292
|
+
_this.inputRef = import_react46.default.createRef();
|
|
22100
22293
|
_this.onTimeChange = function(time) {
|
|
22101
22294
|
var _a2, _b;
|
|
22102
22295
|
_this.setState({ time });
|
|
@@ -22114,13 +22307,13 @@ var InputTime = (
|
|
|
22114
22307
|
var time = _this.state.time;
|
|
22115
22308
|
var _a2 = _this.props, date = _a2.date, timeString = _a2.timeString, customTimeInput = _a2.customTimeInput;
|
|
22116
22309
|
if (customTimeInput) {
|
|
22117
|
-
return (0,
|
|
22310
|
+
return (0, import_react46.cloneElement)(customTimeInput, {
|
|
22118
22311
|
date,
|
|
22119
22312
|
value: time,
|
|
22120
22313
|
onChange: _this.onTimeChange
|
|
22121
22314
|
});
|
|
22122
22315
|
}
|
|
22123
|
-
return
|
|
22316
|
+
return import_react46.default.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22124
22317
|
var _a3;
|
|
22125
22318
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22126
22319
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22141,19 +22334,19 @@ var InputTime = (
|
|
|
22141
22334
|
return null;
|
|
22142
22335
|
};
|
|
22143
22336
|
InputTime2.prototype.render = function() {
|
|
22144
|
-
return
|
|
22337
|
+
return import_react46.default.createElement(
|
|
22145
22338
|
"div",
|
|
22146
22339
|
{ className: "react-datepicker__input-time-container" },
|
|
22147
|
-
|
|
22148
|
-
|
|
22340
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
22341
|
+
import_react46.default.createElement(
|
|
22149
22342
|
"div",
|
|
22150
22343
|
{ className: "react-datepicker-time__input-container" },
|
|
22151
|
-
|
|
22344
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22152
22345
|
)
|
|
22153
22346
|
);
|
|
22154
22347
|
};
|
|
22155
22348
|
return InputTime2;
|
|
22156
|
-
}(
|
|
22349
|
+
}(import_react46.Component)
|
|
22157
22350
|
);
|
|
22158
22351
|
var Day = (
|
|
22159
22352
|
/** @class */
|
|
@@ -22161,7 +22354,7 @@ var Day = (
|
|
|
22161
22354
|
__extends(Day2, _super);
|
|
22162
22355
|
function Day2() {
|
|
22163
22356
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22164
|
-
_this.dayEl = (0,
|
|
22357
|
+
_this.dayEl = (0, import_react46.createRef)();
|
|
22165
22358
|
_this.handleClick = function(event) {
|
|
22166
22359
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
22167
22360
|
_this.props.onClick(event);
|
|
@@ -22396,11 +22589,11 @@ var Day = (
|
|
|
22396
22589
|
_this.render = function() {
|
|
22397
22590
|
return (
|
|
22398
22591
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
22399
|
-
|
|
22592
|
+
import_react46.default.createElement(
|
|
22400
22593
|
"div",
|
|
22401
22594
|
{ 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() },
|
|
22402
22595
|
_this.renderDayContents(),
|
|
22403
|
-
_this.getTitle() !== "" &&
|
|
22596
|
+
_this.getTitle() !== "" && import_react46.default.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
22404
22597
|
)
|
|
22405
22598
|
);
|
|
22406
22599
|
};
|
|
@@ -22441,7 +22634,7 @@ var Day = (
|
|
|
22441
22634
|
);
|
|
22442
22635
|
};
|
|
22443
22636
|
return Day2;
|
|
22444
|
-
}(
|
|
22637
|
+
}(import_react46.Component)
|
|
22445
22638
|
);
|
|
22446
22639
|
var WeekNumber = (
|
|
22447
22640
|
/** @class */
|
|
@@ -22449,7 +22642,7 @@ var WeekNumber = (
|
|
|
22449
22642
|
__extends(WeekNumber2, _super);
|
|
22450
22643
|
function WeekNumber2() {
|
|
22451
22644
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22452
|
-
_this.weekNumberEl = (0,
|
|
22645
|
+
_this.weekNumberEl = (0, import_react46.createRef)();
|
|
22453
22646
|
_this.handleClick = function(event) {
|
|
22454
22647
|
if (_this.props.onClick) {
|
|
22455
22648
|
_this.props.onClick(event);
|
|
@@ -22509,10 +22702,10 @@ var WeekNumber = (
|
|
|
22509
22702
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
22510
22703
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
22511
22704
|
};
|
|
22512
|
-
return
|
|
22705
|
+
return import_react46.default.createElement("div", { ref: this.weekNumberEl, className: clsx(weekNumberClasses), "aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex() }, weekNumber);
|
|
22513
22706
|
};
|
|
22514
22707
|
return WeekNumber2;
|
|
22515
|
-
}(
|
|
22708
|
+
}(import_react46.Component)
|
|
22516
22709
|
);
|
|
22517
22710
|
var Week = (
|
|
22518
22711
|
/** @class */
|
|
@@ -22586,11 +22779,11 @@ var Week = (
|
|
|
22586
22779
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
22587
22780
|
if (_this.props.showWeekNumber) {
|
|
22588
22781
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
22589
|
-
days.push(
|
|
22782
|
+
days.push(import_react46.default.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
22590
22783
|
}
|
|
22591
22784
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
22592
22785
|
var day = addDays(startOfWeek2, offset4);
|
|
22593
|
-
return
|
|
22786
|
+
return import_react46.default.createElement(Day, _assign({}, Week2.defaultProps, _this.props, { ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix, key: day.valueOf(), day, onClick: _this.handleDayClick.bind(_this, day), onMouseEnter: _this.handleDayMouseEnter.bind(_this, day) }));
|
|
22594
22787
|
}));
|
|
22595
22788
|
};
|
|
22596
22789
|
_this.startOfWeek = function() {
|
|
@@ -22616,10 +22809,10 @@ var Week = (
|
|
|
22616
22809
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
22617
22810
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
22618
22811
|
};
|
|
22619
|
-
return
|
|
22812
|
+
return import_react46.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
22620
22813
|
};
|
|
22621
22814
|
return Week2;
|
|
22622
|
-
}(
|
|
22815
|
+
}(import_react46.Component)
|
|
22623
22816
|
);
|
|
22624
22817
|
var _a;
|
|
22625
22818
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
@@ -22671,10 +22864,10 @@ var Month = (
|
|
|
22671
22864
|
function Month2() {
|
|
22672
22865
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22673
22866
|
_this.MONTH_REFS = __spreadArray([], Array(12), true).map(function() {
|
|
22674
|
-
return (0,
|
|
22867
|
+
return (0, import_react46.createRef)();
|
|
22675
22868
|
});
|
|
22676
22869
|
_this.QUARTER_REFS = __spreadArray([], Array(4), true).map(function() {
|
|
22677
|
-
return (0,
|
|
22870
|
+
return (0, import_react46.createRef)();
|
|
22678
22871
|
});
|
|
22679
22872
|
_this.isDisabled = function(day) {
|
|
22680
22873
|
return isDayDisabled(day, {
|
|
@@ -22844,7 +23037,7 @@ var Month = (
|
|
|
22844
23037
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
22845
23038
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
22846
23039
|
while (true) {
|
|
22847
|
-
weeks.push(
|
|
23040
|
+
weeks.push(import_react46.default.createElement(Week, _assign({}, _this.props, { ariaLabelPrefix: _this.props.weekAriaLabelPrefix, key: i3, day: currentWeekStart, month: getMonth(_this.props.day), onDayClick: _this.handleDayClick, onDayMouseEnter: _this.handleDayMouseEnter, selected, preSelection, showWeekNumber: _this.props.showWeekNumbers })));
|
|
22848
23041
|
if (breakAfterNextPush)
|
|
22849
23042
|
break;
|
|
22850
23043
|
i3++;
|
|
@@ -23113,8 +23306,8 @@ var Month = (
|
|
|
23113
23306
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23114
23307
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23115
23308
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23116
|
-
return
|
|
23117
|
-
return
|
|
23309
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23310
|
+
return import_react46.default.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23118
23311
|
_this.onMonthClick(event, m);
|
|
23119
23312
|
}, onKeyDown: function(event) {
|
|
23120
23313
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23133,8 +23326,8 @@ var Month = (
|
|
|
23133
23326
|
_this.renderQuarters = function() {
|
|
23134
23327
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23135
23328
|
var quarters = [1, 2, 3, 4];
|
|
23136
|
-
return
|
|
23137
|
-
return
|
|
23329
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
23330
|
+
return import_react46.default.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23138
23331
|
_this.onQuarterClick(event, q3);
|
|
23139
23332
|
}, onKeyDown: function(event) {
|
|
23140
23333
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23166,10 +23359,10 @@ var Month = (
|
|
|
23166
23359
|
Month2.prototype.render = function() {
|
|
23167
23360
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23168
23361
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23169
|
-
return
|
|
23362
|
+
return import_react46.default.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : void 0, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : void 0, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
23170
23363
|
};
|
|
23171
23364
|
return Month2;
|
|
23172
|
-
}(
|
|
23365
|
+
}(import_react46.Component)
|
|
23173
23366
|
);
|
|
23174
23367
|
var MonthDropdownOptions = (
|
|
23175
23368
|
/** @class */
|
|
@@ -23182,10 +23375,10 @@ var MonthDropdownOptions = (
|
|
|
23182
23375
|
};
|
|
23183
23376
|
_this.renderOptions = function() {
|
|
23184
23377
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23185
|
-
return
|
|
23378
|
+
return import_react46.default.createElement(
|
|
23186
23379
|
"div",
|
|
23187
23380
|
{ 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 },
|
|
23188
|
-
_this.isSelectedMonth(i3) ?
|
|
23381
|
+
_this.isSelectedMonth(i3) ? import_react46.default.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23189
23382
|
month
|
|
23190
23383
|
);
|
|
23191
23384
|
});
|
|
@@ -23199,10 +23392,10 @@ var MonthDropdownOptions = (
|
|
|
23199
23392
|
return _this;
|
|
23200
23393
|
}
|
|
23201
23394
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23202
|
-
return
|
|
23395
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23203
23396
|
};
|
|
23204
23397
|
return MonthDropdownOptions2;
|
|
23205
|
-
}(
|
|
23398
|
+
}(import_react46.Component)
|
|
23206
23399
|
);
|
|
23207
23400
|
var MonthDropdown = (
|
|
23208
23401
|
/** @class */
|
|
@@ -23215,24 +23408,24 @@ var MonthDropdown = (
|
|
|
23215
23408
|
};
|
|
23216
23409
|
_this.renderSelectOptions = function(monthNames) {
|
|
23217
23410
|
return monthNames.map(function(m, i3) {
|
|
23218
|
-
return
|
|
23411
|
+
return import_react46.default.createElement("option", { key: m, value: i3 }, m);
|
|
23219
23412
|
});
|
|
23220
23413
|
};
|
|
23221
23414
|
_this.renderSelectMode = function(monthNames) {
|
|
23222
|
-
return
|
|
23415
|
+
return import_react46.default.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23223
23416
|
return _this.onChange(parseInt(e3.target.value));
|
|
23224
23417
|
} }, _this.renderSelectOptions(monthNames));
|
|
23225
23418
|
};
|
|
23226
23419
|
_this.renderReadView = function(visible, monthNames) {
|
|
23227
|
-
return
|
|
23420
|
+
return import_react46.default.createElement(
|
|
23228
23421
|
"div",
|
|
23229
23422
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23230
|
-
|
|
23231
|
-
|
|
23423
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
23424
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23232
23425
|
);
|
|
23233
23426
|
};
|
|
23234
23427
|
_this.renderDropdown = function(monthNames) {
|
|
23235
|
-
return
|
|
23428
|
+
return import_react46.default.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23236
23429
|
};
|
|
23237
23430
|
_this.renderScrollMode = function(monthNames) {
|
|
23238
23431
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23271,10 +23464,10 @@ var MonthDropdown = (
|
|
|
23271
23464
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
23272
23465
|
break;
|
|
23273
23466
|
}
|
|
23274
|
-
return
|
|
23467
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23275
23468
|
};
|
|
23276
23469
|
return MonthDropdown2;
|
|
23277
|
-
}(
|
|
23470
|
+
}(import_react46.Component)
|
|
23278
23471
|
);
|
|
23279
23472
|
function generateMonthYears(minDate, maxDate) {
|
|
23280
23473
|
var list = [];
|
|
@@ -23296,10 +23489,10 @@ var MonthYearDropdownOptions = (
|
|
|
23296
23489
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
23297
23490
|
var monthYearPoint = getTime(monthYear);
|
|
23298
23491
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
23299
|
-
return
|
|
23492
|
+
return import_react46.default.createElement(
|
|
23300
23493
|
"div",
|
|
23301
23494
|
{ 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 },
|
|
23302
|
-
isSameMonthYear ?
|
|
23495
|
+
isSameMonthYear ? import_react46.default.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
23303
23496
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
23304
23497
|
);
|
|
23305
23498
|
});
|
|
@@ -23320,10 +23513,10 @@ var MonthYearDropdownOptions = (
|
|
|
23320
23513
|
"react-datepicker__month-year-dropdown": true,
|
|
23321
23514
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
23322
23515
|
});
|
|
23323
|
-
return
|
|
23516
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23324
23517
|
};
|
|
23325
23518
|
return MonthYearDropdownOptions2;
|
|
23326
|
-
}(
|
|
23519
|
+
}(import_react46.Component)
|
|
23327
23520
|
);
|
|
23328
23521
|
var MonthYearDropdown = (
|
|
23329
23522
|
/** @class */
|
|
@@ -23340,7 +23533,7 @@ var MonthYearDropdown = (
|
|
|
23340
23533
|
var options2 = [];
|
|
23341
23534
|
while (!isAfter(currDate, lastDate)) {
|
|
23342
23535
|
var timePoint = getTime(currDate);
|
|
23343
|
-
options2.push(
|
|
23536
|
+
options2.push(import_react46.default.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
23344
23537
|
currDate = addMonths(currDate, 1);
|
|
23345
23538
|
}
|
|
23346
23539
|
return options2;
|
|
@@ -23349,19 +23542,19 @@ var MonthYearDropdown = (
|
|
|
23349
23542
|
_this.onChange(parseInt(event.target.value));
|
|
23350
23543
|
};
|
|
23351
23544
|
_this.renderSelectMode = function() {
|
|
23352
|
-
return
|
|
23545
|
+
return import_react46.default.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23353
23546
|
};
|
|
23354
23547
|
_this.renderReadView = function(visible) {
|
|
23355
23548
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
23356
|
-
return
|
|
23549
|
+
return import_react46.default.createElement(
|
|
23357
23550
|
"div",
|
|
23358
23551
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
23359
|
-
|
|
23360
|
-
|
|
23552
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
23553
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
23361
23554
|
);
|
|
23362
23555
|
};
|
|
23363
23556
|
_this.renderDropdown = function() {
|
|
23364
|
-
return
|
|
23557
|
+
return import_react46.default.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23365
23558
|
};
|
|
23366
23559
|
_this.renderScrollMode = function() {
|
|
23367
23560
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23396,10 +23589,10 @@ var MonthYearDropdown = (
|
|
|
23396
23589
|
renderedDropdown = this.renderSelectMode();
|
|
23397
23590
|
break;
|
|
23398
23591
|
}
|
|
23399
|
-
return
|
|
23592
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23400
23593
|
};
|
|
23401
23594
|
return MonthYearDropdown2;
|
|
23402
|
-
}(
|
|
23595
|
+
}(import_react46.Component)
|
|
23403
23596
|
);
|
|
23404
23597
|
var Time = (
|
|
23405
23598
|
/** @class */
|
|
@@ -23494,7 +23687,7 @@ var Time = (
|
|
|
23494
23687
|
return prev2;
|
|
23495
23688
|
}, times[0]);
|
|
23496
23689
|
return times.map(function(time) {
|
|
23497
|
-
return
|
|
23690
|
+
return import_react46.default.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
23498
23691
|
if (time === timeToFocus) {
|
|
23499
23692
|
_this.centerLi = li;
|
|
23500
23693
|
}
|
|
@@ -23505,14 +23698,14 @@ var Time = (
|
|
|
23505
23698
|
};
|
|
23506
23699
|
_this.renderTimeCaption = function() {
|
|
23507
23700
|
if (_this.props.showTimeCaption === false) {
|
|
23508
|
-
return
|
|
23701
|
+
return import_react46.default.createElement(import_react46.default.Fragment, null);
|
|
23509
23702
|
}
|
|
23510
|
-
return
|
|
23703
|
+
return import_react46.default.createElement(
|
|
23511
23704
|
"div",
|
|
23512
23705
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
23513
23706
|
_this.header = header;
|
|
23514
23707
|
} },
|
|
23515
|
-
|
|
23708
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
23516
23709
|
);
|
|
23517
23710
|
};
|
|
23518
23711
|
return _this;
|
|
@@ -23559,17 +23752,17 @@ var Time = (
|
|
|
23559
23752
|
var _this = this;
|
|
23560
23753
|
var _a2;
|
|
23561
23754
|
var height = this.state.height;
|
|
23562
|
-
return
|
|
23755
|
+
return import_react46.default.createElement(
|
|
23563
23756
|
"div",
|
|
23564
23757
|
{ 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" : "") },
|
|
23565
23758
|
this.renderTimeCaption(),
|
|
23566
|
-
|
|
23759
|
+
import_react46.default.createElement(
|
|
23567
23760
|
"div",
|
|
23568
23761
|
{ className: "react-datepicker__time" },
|
|
23569
|
-
|
|
23762
|
+
import_react46.default.createElement(
|
|
23570
23763
|
"div",
|
|
23571
23764
|
{ className: "react-datepicker__time-box" },
|
|
23572
|
-
|
|
23765
|
+
import_react46.default.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
23573
23766
|
_this.list = list;
|
|
23574
23767
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
23575
23768
|
)
|
|
@@ -23580,7 +23773,7 @@ var Time = (
|
|
|
23580
23773
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
23581
23774
|
};
|
|
23582
23775
|
return Time2;
|
|
23583
|
-
}(
|
|
23776
|
+
}(import_react46.Component)
|
|
23584
23777
|
);
|
|
23585
23778
|
var VERTICAL_NAVIGATION_OFFSET = 3;
|
|
23586
23779
|
var Year = (
|
|
@@ -23590,7 +23783,7 @@ var Year = (
|
|
|
23590
23783
|
function Year2(props) {
|
|
23591
23784
|
var _this = _super.call(this, props) || this;
|
|
23592
23785
|
_this.YEAR_REFS = __spreadArray([], Array(_this.props.yearItemNumber), true).map(function() {
|
|
23593
|
-
return (0,
|
|
23786
|
+
return (0, import_react46.createRef)();
|
|
23594
23787
|
});
|
|
23595
23788
|
_this.isDisabled = function(date) {
|
|
23596
23789
|
return isDayDisabled(date, {
|
|
@@ -23827,7 +24020,7 @@ var Year = (
|
|
|
23827
24020
|
}
|
|
23828
24021
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
23829
24022
|
var _loop_1 = function(y4) {
|
|
23830
|
-
yearsList.push(
|
|
24023
|
+
yearsList.push(import_react46.default.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
23831
24024
|
_this.onYearClick(event, y4);
|
|
23832
24025
|
}, onKeyDown: function(event) {
|
|
23833
24026
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23849,14 +24042,14 @@ var Year = (
|
|
|
23849
24042
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
23850
24043
|
_loop_1(y3);
|
|
23851
24044
|
}
|
|
23852
|
-
return
|
|
24045
|
+
return import_react46.default.createElement(
|
|
23853
24046
|
"div",
|
|
23854
24047
|
{ className: "react-datepicker__year" },
|
|
23855
|
-
|
|
24048
|
+
import_react46.default.createElement("div", { className: "react-datepicker__year-wrapper", onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : void 0, onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : void 0 }, yearsList)
|
|
23856
24049
|
);
|
|
23857
24050
|
};
|
|
23858
24051
|
return Year2;
|
|
23859
|
-
}(
|
|
24052
|
+
}(import_react46.Component)
|
|
23860
24053
|
);
|
|
23861
24054
|
function generateYears(year, noOfYear, minDate, maxDate) {
|
|
23862
24055
|
var list = [];
|
|
@@ -23884,10 +24077,10 @@ var YearDropdownOptions = (
|
|
|
23884
24077
|
_this.renderOptions = function() {
|
|
23885
24078
|
var selectedYear = _this.props.year;
|
|
23886
24079
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
23887
|
-
return
|
|
24080
|
+
return import_react46.default.createElement(
|
|
23888
24081
|
"div",
|
|
23889
24082
|
{ 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 },
|
|
23890
|
-
selectedYear === year ?
|
|
24083
|
+
selectedYear === year ? import_react46.default.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
23891
24084
|
year
|
|
23892
24085
|
);
|
|
23893
24086
|
});
|
|
@@ -23896,19 +24089,19 @@ var YearDropdownOptions = (
|
|
|
23896
24089
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
23897
24090
|
return year === maxYear;
|
|
23898
24091
|
})) {
|
|
23899
|
-
options2.unshift(
|
|
24092
|
+
options2.unshift(import_react46.default.createElement(
|
|
23900
24093
|
"div",
|
|
23901
24094
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
23902
|
-
|
|
24095
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
23903
24096
|
));
|
|
23904
24097
|
}
|
|
23905
24098
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
23906
24099
|
return year === minYear;
|
|
23907
24100
|
})) {
|
|
23908
|
-
options2.push(
|
|
24101
|
+
options2.push(import_react46.default.createElement(
|
|
23909
24102
|
"div",
|
|
23910
24103
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
23911
|
-
|
|
24104
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
23912
24105
|
));
|
|
23913
24106
|
}
|
|
23914
24107
|
return options2;
|
|
@@ -23938,7 +24131,7 @@ var YearDropdownOptions = (
|
|
|
23938
24131
|
_this.state = {
|
|
23939
24132
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
23940
24133
|
};
|
|
23941
|
-
_this.dropdownRef = (0,
|
|
24134
|
+
_this.dropdownRef = (0, import_react46.createRef)();
|
|
23942
24135
|
return _this;
|
|
23943
24136
|
}
|
|
23944
24137
|
YearDropdownOptions2.prototype.componentDidMount = function() {
|
|
@@ -23956,10 +24149,10 @@ var YearDropdownOptions = (
|
|
|
23956
24149
|
"react-datepicker__year-dropdown": true,
|
|
23957
24150
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
23958
24151
|
});
|
|
23959
|
-
return
|
|
24152
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23960
24153
|
};
|
|
23961
24154
|
return YearDropdownOptions2;
|
|
23962
|
-
}(
|
|
24155
|
+
}(import_react46.Component)
|
|
23963
24156
|
);
|
|
23964
24157
|
var YearDropdown = (
|
|
23965
24158
|
/** @class */
|
|
@@ -23975,7 +24168,7 @@ var YearDropdown = (
|
|
|
23975
24168
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
23976
24169
|
var options2 = [];
|
|
23977
24170
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
23978
|
-
options2.push(
|
|
24171
|
+
options2.push(import_react46.default.createElement("option", { key: i3, value: i3 }, i3));
|
|
23979
24172
|
}
|
|
23980
24173
|
return options2;
|
|
23981
24174
|
};
|
|
@@ -23983,20 +24176,20 @@ var YearDropdown = (
|
|
|
23983
24176
|
_this.onChange(parseInt(event.target.value));
|
|
23984
24177
|
};
|
|
23985
24178
|
_this.renderSelectMode = function() {
|
|
23986
|
-
return
|
|
24179
|
+
return import_react46.default.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23987
24180
|
};
|
|
23988
24181
|
_this.renderReadView = function(visible) {
|
|
23989
|
-
return
|
|
24182
|
+
return import_react46.default.createElement(
|
|
23990
24183
|
"div",
|
|
23991
24184
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
23992
24185
|
return _this.toggleDropdown(event);
|
|
23993
24186
|
} },
|
|
23994
|
-
|
|
23995
|
-
|
|
24187
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24188
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
23996
24189
|
);
|
|
23997
24190
|
};
|
|
23998
24191
|
_this.renderDropdown = function() {
|
|
23999
|
-
return
|
|
24192
|
+
return import_react46.default.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24000
24193
|
};
|
|
24001
24194
|
_this.renderScrollMode = function() {
|
|
24002
24195
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24046,10 +24239,10 @@ var YearDropdown = (
|
|
|
24046
24239
|
renderedDropdown = this.renderSelectMode();
|
|
24047
24240
|
break;
|
|
24048
24241
|
}
|
|
24049
|
-
return
|
|
24242
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24050
24243
|
};
|
|
24051
24244
|
return YearDropdown2;
|
|
24052
|
-
}(
|
|
24245
|
+
}(import_react46.Component)
|
|
24053
24246
|
);
|
|
24054
24247
|
var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
24055
24248
|
"react-datepicker__year-select",
|
|
@@ -24220,13 +24413,13 @@ var Calendar = (
|
|
|
24220
24413
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24221
24414
|
var dayNames = [];
|
|
24222
24415
|
if (_this.props.showWeekNumbers) {
|
|
24223
|
-
dayNames.push(
|
|
24416
|
+
dayNames.push(import_react46.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24224
24417
|
}
|
|
24225
24418
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24226
24419
|
var day = addDays(startOfWeek2, offset4);
|
|
24227
24420
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24228
24421
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24229
|
-
return
|
|
24422
|
+
return import_react46.default.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
24230
24423
|
}));
|
|
24231
24424
|
};
|
|
24232
24425
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -24295,10 +24488,10 @@ var Calendar = (
|
|
|
24295
24488
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24296
24489
|
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;
|
|
24297
24490
|
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;
|
|
24298
|
-
return
|
|
24491
|
+
return import_react46.default.createElement(
|
|
24299
24492
|
"button",
|
|
24300
24493
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
24301
|
-
|
|
24494
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
24302
24495
|
);
|
|
24303
24496
|
};
|
|
24304
24497
|
_this.increaseYear = function() {
|
|
@@ -24360,10 +24553,10 @@ var Calendar = (
|
|
|
24360
24553
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24361
24554
|
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;
|
|
24362
24555
|
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;
|
|
24363
|
-
return
|
|
24556
|
+
return import_react46.default.createElement(
|
|
24364
24557
|
"button",
|
|
24365
24558
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
24366
|
-
|
|
24559
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
24367
24560
|
);
|
|
24368
24561
|
};
|
|
24369
24562
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -24380,7 +24573,7 @@ var Calendar = (
|
|
|
24380
24573
|
if (_this.props.showMonthYearDropdown) {
|
|
24381
24574
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
24382
24575
|
}
|
|
24383
|
-
return
|
|
24576
|
+
return import_react46.default.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
24384
24577
|
};
|
|
24385
24578
|
_this.renderYearDropdown = function(overrideHide) {
|
|
24386
24579
|
if (overrideHide === void 0) {
|
|
@@ -24389,7 +24582,7 @@ var Calendar = (
|
|
|
24389
24582
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
24390
24583
|
return;
|
|
24391
24584
|
}
|
|
24392
|
-
return
|
|
24585
|
+
return import_react46.default.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
24393
24586
|
};
|
|
24394
24587
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
24395
24588
|
if (overrideHide === void 0) {
|
|
@@ -24398,7 +24591,7 @@ var Calendar = (
|
|
|
24398
24591
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
24399
24592
|
return;
|
|
24400
24593
|
}
|
|
24401
|
-
return
|
|
24594
|
+
return import_react46.default.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
24402
24595
|
};
|
|
24403
24596
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
24404
24597
|
if (overrideHide === void 0) {
|
|
@@ -24407,7 +24600,7 @@ var Calendar = (
|
|
|
24407
24600
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
24408
24601
|
return;
|
|
24409
24602
|
}
|
|
24410
|
-
return
|
|
24603
|
+
return import_react46.default.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
24411
24604
|
};
|
|
24412
24605
|
_this.handleTodayButtonClick = function(event) {
|
|
24413
24606
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -24417,22 +24610,22 @@ var Calendar = (
|
|
|
24417
24610
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
24418
24611
|
return;
|
|
24419
24612
|
}
|
|
24420
|
-
return
|
|
24613
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
24421
24614
|
};
|
|
24422
24615
|
_this.renderDefaultHeader = function(_a2) {
|
|
24423
24616
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
24424
|
-
return
|
|
24617
|
+
return import_react46.default.createElement(
|
|
24425
24618
|
"div",
|
|
24426
24619
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
24427
24620
|
_this.renderCurrentMonth(monthDate),
|
|
24428
|
-
|
|
24621
|
+
import_react46.default.createElement(
|
|
24429
24622
|
"div",
|
|
24430
24623
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
24431
24624
|
_this.renderMonthDropdown(i3 !== 0),
|
|
24432
24625
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
24433
24626
|
_this.renderYearDropdown(i3 !== 0)
|
|
24434
24627
|
),
|
|
24435
|
-
|
|
24628
|
+
import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24436
24629
|
);
|
|
24437
24630
|
};
|
|
24438
24631
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -24446,18 +24639,18 @@ var Calendar = (
|
|
|
24446
24639
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
24447
24640
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
24448
24641
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
24449
|
-
return
|
|
24642
|
+
return import_react46.default.createElement(
|
|
24450
24643
|
"div",
|
|
24451
24644
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
24452
24645
|
(_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 })),
|
|
24453
|
-
showDayNames &&
|
|
24646
|
+
showDayNames && import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24454
24647
|
);
|
|
24455
24648
|
};
|
|
24456
24649
|
_this.renderYearHeader = function(_a2) {
|
|
24457
24650
|
var monthDate = _a2.monthDate;
|
|
24458
24651
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
24459
24652
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
24460
|
-
return
|
|
24653
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
24461
24654
|
};
|
|
24462
24655
|
_this.renderHeader = function(_a2) {
|
|
24463
24656
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -24487,13 +24680,13 @@ var Calendar = (
|
|
|
24487
24680
|
var monthKey = "month-".concat(i3);
|
|
24488
24681
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
24489
24682
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
24490
|
-
monthList.push(
|
|
24683
|
+
monthList.push(import_react46.default.createElement(
|
|
24491
24684
|
"div",
|
|
24492
24685
|
{ key: monthKey, ref: function(div) {
|
|
24493
24686
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
24494
24687
|
}, className: "react-datepicker__month-container" },
|
|
24495
24688
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
24496
|
-
|
|
24689
|
+
import_react46.default.createElement(Month, _assign({}, Calendar2.defaultProps, _this.props, { containerRef: _this.containerRef, ariaLabelPrefix: _this.props.monthAriaLabelPrefix, day: monthDate, onDayClick: _this.handleDayClick, handleOnKeyDown: _this.props.handleOnDayKeyDown, handleOnMonthKeyDown: _this.props.handleOnKeyDown, onDayMouseEnter: _this.handleDayMouseEnter, onMouseLeave: _this.handleMonthMouseLeave, orderInDisplay: i3, selectingDate: _this.state.selectingDate, monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart }))
|
|
24497
24690
|
));
|
|
24498
24691
|
}
|
|
24499
24692
|
return monthList;
|
|
@@ -24503,18 +24696,18 @@ var Calendar = (
|
|
|
24503
24696
|
return;
|
|
24504
24697
|
}
|
|
24505
24698
|
if (_this.props.showYearPicker) {
|
|
24506
|
-
return
|
|
24699
|
+
return import_react46.default.createElement(
|
|
24507
24700
|
"div",
|
|
24508
24701
|
{ className: "react-datepicker__year--container" },
|
|
24509
24702
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
24510
|
-
|
|
24703
|
+
import_react46.default.createElement(Year, _assign({}, Calendar2.defaultProps, _this.props, { selectingDate: _this.state.selectingDate, date: _this.state.date, onDayClick: _this.handleDayClick, clearSelectingDate: _this.clearSelectingDate, onYearMouseEnter: _this.handleYearMouseEnter, onYearMouseLeave: _this.handleYearMouseLeave }))
|
|
24511
24704
|
);
|
|
24512
24705
|
}
|
|
24513
24706
|
return;
|
|
24514
24707
|
};
|
|
24515
24708
|
_this.renderTimeSection = function() {
|
|
24516
24709
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
24517
|
-
return
|
|
24710
|
+
return import_react46.default.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
24518
24711
|
}
|
|
24519
24712
|
return;
|
|
24520
24713
|
};
|
|
@@ -24523,7 +24716,7 @@ var Calendar = (
|
|
|
24523
24716
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
24524
24717
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
24525
24718
|
if (_this.props.showTimeInput) {
|
|
24526
|
-
return
|
|
24719
|
+
return import_react46.default.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
24527
24720
|
}
|
|
24528
24721
|
return;
|
|
24529
24722
|
};
|
|
@@ -24538,15 +24731,15 @@ var Calendar = (
|
|
|
24538
24731
|
} else {
|
|
24539
24732
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
24540
24733
|
}
|
|
24541
|
-
return
|
|
24734
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
24542
24735
|
};
|
|
24543
24736
|
_this.renderChildren = function() {
|
|
24544
24737
|
if (_this.props.children) {
|
|
24545
|
-
return
|
|
24738
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
24546
24739
|
}
|
|
24547
24740
|
return;
|
|
24548
24741
|
};
|
|
24549
|
-
_this.containerRef = (0,
|
|
24742
|
+
_this.containerRef = (0, import_react46.createRef)();
|
|
24550
24743
|
_this.state = {
|
|
24551
24744
|
date: _this.getDateInView(),
|
|
24552
24745
|
selectingDate: void 0,
|
|
@@ -24596,13 +24789,13 @@ var Calendar = (
|
|
|
24596
24789
|
};
|
|
24597
24790
|
Calendar2.prototype.render = function() {
|
|
24598
24791
|
var Container = this.props.container || CalendarContainer;
|
|
24599
|
-
return
|
|
24792
|
+
return import_react46.default.createElement(
|
|
24600
24793
|
ClickOutsideWrapper,
|
|
24601
24794
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
24602
|
-
|
|
24795
|
+
import_react46.default.createElement(
|
|
24603
24796
|
"div",
|
|
24604
24797
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
24605
|
-
|
|
24798
|
+
import_react46.default.createElement(
|
|
24606
24799
|
Container,
|
|
24607
24800
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
24608
24801
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -24621,17 +24814,17 @@ var Calendar = (
|
|
|
24621
24814
|
);
|
|
24622
24815
|
};
|
|
24623
24816
|
return Calendar2;
|
|
24624
|
-
}(
|
|
24817
|
+
}(import_react46.Component)
|
|
24625
24818
|
);
|
|
24626
24819
|
var CalendarIcon2 = function(_a2) {
|
|
24627
24820
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
24628
24821
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
24629
24822
|
if (typeof icon === "string") {
|
|
24630
|
-
return
|
|
24823
|
+
return import_react46.default.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
24631
24824
|
}
|
|
24632
|
-
if (
|
|
24825
|
+
if (import_react46.default.isValidElement(icon)) {
|
|
24633
24826
|
var iconElement_1 = icon;
|
|
24634
|
-
return
|
|
24827
|
+
return import_react46.default.cloneElement(iconElement_1, {
|
|
24635
24828
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
24636
24829
|
onClick: function(event) {
|
|
24637
24830
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -24643,10 +24836,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
24643
24836
|
}
|
|
24644
24837
|
});
|
|
24645
24838
|
}
|
|
24646
|
-
return
|
|
24839
|
+
return import_react46.default.createElement(
|
|
24647
24840
|
"svg",
|
|
24648
24841
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
24649
|
-
|
|
24842
|
+
import_react46.default.createElement("path", { d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z" })
|
|
24650
24843
|
);
|
|
24651
24844
|
};
|
|
24652
24845
|
var Portal = (
|
|
@@ -24677,7 +24870,7 @@ var Portal = (
|
|
|
24677
24870
|
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
24678
24871
|
};
|
|
24679
24872
|
return Portal2;
|
|
24680
|
-
}(
|
|
24873
|
+
}(import_react46.Component)
|
|
24681
24874
|
);
|
|
24682
24875
|
var focusableElementsSelector = "[tabindex], a, button, input, select, textarea";
|
|
24683
24876
|
var focusableFilter = function(node2) {
|
|
@@ -24704,7 +24897,7 @@ var TabLoop = (
|
|
|
24704
24897
|
var tabChildren = _this.getTabChildren();
|
|
24705
24898
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
24706
24899
|
};
|
|
24707
|
-
_this.tabLoopRef = (0,
|
|
24900
|
+
_this.tabLoopRef = (0, import_react46.createRef)();
|
|
24708
24901
|
return _this;
|
|
24709
24902
|
}
|
|
24710
24903
|
TabLoop2.prototype.render = function() {
|
|
@@ -24712,32 +24905,32 @@ var TabLoop = (
|
|
|
24712
24905
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
24713
24906
|
return this.props.children;
|
|
24714
24907
|
}
|
|
24715
|
-
return
|
|
24908
|
+
return import_react46.default.createElement(
|
|
24716
24909
|
"div",
|
|
24717
24910
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
24718
|
-
|
|
24911
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
24719
24912
|
this.props.children,
|
|
24720
|
-
|
|
24913
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
24721
24914
|
);
|
|
24722
24915
|
};
|
|
24723
24916
|
TabLoop2.defaultProps = {
|
|
24724
24917
|
enableTabLoop: true
|
|
24725
24918
|
};
|
|
24726
24919
|
return TabLoop2;
|
|
24727
|
-
}(
|
|
24920
|
+
}(import_react46.Component)
|
|
24728
24921
|
);
|
|
24729
24922
|
function withFloating(Component3) {
|
|
24730
24923
|
var WithFloating = function(props) {
|
|
24731
24924
|
var _a2;
|
|
24732
24925
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
24733
|
-
var arrowRef = (0,
|
|
24926
|
+
var arrowRef = (0, import_react46.useRef)(null);
|
|
24734
24927
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
24735
24928
|
flip3({ padding: 15 }),
|
|
24736
24929
|
offset3(10),
|
|
24737
24930
|
arrow3({ element: arrowRef })
|
|
24738
24931
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
24739
24932
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
24740
|
-
return
|
|
24933
|
+
return import_react46.default.createElement(Component3, _assign({}, componentProps));
|
|
24741
24934
|
};
|
|
24742
24935
|
return WithFloating;
|
|
24743
24936
|
}
|
|
@@ -24762,33 +24955,33 @@ var PopperComponent = (
|
|
|
24762
24955
|
var popper = void 0;
|
|
24763
24956
|
if (!hidePopper) {
|
|
24764
24957
|
var classes = clsx("react-datepicker-popper", className);
|
|
24765
|
-
popper =
|
|
24958
|
+
popper = import_react46.default.createElement(
|
|
24766
24959
|
TabLoop,
|
|
24767
24960
|
{ enableTabLoop },
|
|
24768
|
-
|
|
24961
|
+
import_react46.default.createElement(
|
|
24769
24962
|
"div",
|
|
24770
24963
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
24771
24964
|
popperComponent,
|
|
24772
|
-
showArrow &&
|
|
24965
|
+
showArrow && import_react46.default.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
24773
24966
|
)
|
|
24774
24967
|
);
|
|
24775
24968
|
}
|
|
24776
24969
|
if (this.props.popperContainer) {
|
|
24777
|
-
popper = (0,
|
|
24970
|
+
popper = (0, import_react46.createElement)(this.props.popperContainer, {}, popper);
|
|
24778
24971
|
}
|
|
24779
24972
|
if (portalId && !hidePopper) {
|
|
24780
|
-
popper =
|
|
24973
|
+
popper = import_react46.default.createElement(Portal, { portalId, portalHost }, popper);
|
|
24781
24974
|
}
|
|
24782
24975
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
24783
|
-
return
|
|
24784
|
-
|
|
24976
|
+
return import_react46.default.createElement(
|
|
24977
|
+
import_react46.default.Fragment,
|
|
24785
24978
|
null,
|
|
24786
|
-
|
|
24979
|
+
import_react46.default.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
24787
24980
|
popper
|
|
24788
24981
|
);
|
|
24789
24982
|
};
|
|
24790
24983
|
return PopperComponent2;
|
|
24791
|
-
}(
|
|
24984
|
+
}(import_react46.Component)
|
|
24792
24985
|
);
|
|
24793
24986
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
24794
24987
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -25402,7 +25595,7 @@ var DatePicker = (
|
|
|
25402
25595
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
25403
25596
|
return null;
|
|
25404
25597
|
}
|
|
25405
|
-
return
|
|
25598
|
+
return import_react46.default.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
25406
25599
|
_this.calendar = elem;
|
|
25407
25600
|
} }, _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);
|
|
25408
25601
|
};
|
|
@@ -25438,13 +25631,13 @@ var DatePicker = (
|
|
|
25438
25631
|
}));
|
|
25439
25632
|
}
|
|
25440
25633
|
}
|
|
25441
|
-
return
|
|
25634
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
25442
25635
|
};
|
|
25443
25636
|
_this.renderDateInput = function() {
|
|
25444
25637
|
var _a2, _b;
|
|
25445
25638
|
var _c;
|
|
25446
25639
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
25447
|
-
var customInput = _this.props.customInput ||
|
|
25640
|
+
var customInput = _this.props.customInput || import_react46.default.createElement("input", { type: "text" });
|
|
25448
25641
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
25449
25642
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
25450
25643
|
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, {
|
|
@@ -25457,14 +25650,14 @@ var DatePicker = (
|
|
|
25457
25650
|
dateFormat,
|
|
25458
25651
|
locale
|
|
25459
25652
|
});
|
|
25460
|
-
return (0,
|
|
25653
|
+
return (0, import_react46.cloneElement)(customInput, (_b = {}, _b[customInputRef] = function(input) {
|
|
25461
25654
|
_this.input = input;
|
|
25462
25655
|
}, _b.value = inputValue, _b.onBlur = _this.handleBlur, _b.onChange = _this.handleChange, _b.onClick = _this.onInputClick, _b.onFocus = _this.handleFocus, _b.onKeyDown = _this.onInputKeyDown, _b.id = _this.props.id, _b.name = _this.props.name, _b.form = _this.props.form, _b.autoFocus = _this.props.autoFocus, _b.placeholder = _this.props.placeholderText, _b.disabled = _this.props.disabled, _b.autoComplete = _this.props.autoComplete, _b.className = clsx(customInput.props.className, className), _b.title = _this.props.title, _b.readOnly = _this.props.readOnly, _b.required = _this.props.required, _b.tabIndex = _this.props.tabIndex, _b["aria-describedby"] = _this.props.ariaDescribedBy, _b["aria-invalid"] = _this.props.ariaInvalid, _b["aria-labelledby"] = _this.props.ariaLabelledBy, _b["aria-required"] = _this.props.ariaRequired, _b));
|
|
25463
25656
|
};
|
|
25464
25657
|
_this.renderClearButton = function() {
|
|
25465
25658
|
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;
|
|
25466
25659
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
25467
|
-
return
|
|
25660
|
+
return import_react46.default.createElement("button", { type: "button", className: clsx("react-datepicker__close-icon", clearButtonClassName, { "react-datepicker__close-icon--disabled": disabled }), disabled, "aria-label": ariaLabelClose, onClick: _this.onClearClick, title: clearButtonTitle, tabIndex: -1 });
|
|
25468
25661
|
} else {
|
|
25469
25662
|
return null;
|
|
25470
25663
|
}
|
|
@@ -25565,10 +25758,10 @@ var DatePicker = (
|
|
|
25565
25758
|
if (calendarIconClassname) {
|
|
25566
25759
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
25567
25760
|
}
|
|
25568
|
-
return
|
|
25761
|
+
return import_react46.default.createElement(
|
|
25569
25762
|
"div",
|
|
25570
25763
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
25571
|
-
showIcon &&
|
|
25764
|
+
showIcon && import_react46.default.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
25572
25765
|
onClick: this.toggleCalendar
|
|
25573
25766
|
} : null)),
|
|
25574
25767
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -25581,25 +25774,25 @@ var DatePicker = (
|
|
|
25581
25774
|
if (this.props.inline)
|
|
25582
25775
|
return calendar;
|
|
25583
25776
|
if (this.props.withPortal) {
|
|
25584
|
-
var portalContainer = this.state.open ?
|
|
25777
|
+
var portalContainer = this.state.open ? import_react46.default.createElement(
|
|
25585
25778
|
TabLoop,
|
|
25586
25779
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
25587
|
-
|
|
25780
|
+
import_react46.default.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
25588
25781
|
) : null;
|
|
25589
25782
|
if (this.state.open && this.props.portalId) {
|
|
25590
|
-
portalContainer =
|
|
25783
|
+
portalContainer = import_react46.default.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
25591
25784
|
}
|
|
25592
|
-
return
|
|
25785
|
+
return import_react46.default.createElement(
|
|
25593
25786
|
"div",
|
|
25594
25787
|
null,
|
|
25595
25788
|
this.renderInputContainer(),
|
|
25596
25789
|
portalContainer
|
|
25597
25790
|
);
|
|
25598
25791
|
}
|
|
25599
|
-
return
|
|
25792
|
+
return import_react46.default.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
25600
25793
|
};
|
|
25601
25794
|
return DatePicker2;
|
|
25602
|
-
}(
|
|
25795
|
+
}(import_react46.Component)
|
|
25603
25796
|
);
|
|
25604
25797
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
25605
25798
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
@@ -25742,33 +25935,33 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
25742
25935
|
}
|
|
25743
25936
|
|
|
25744
25937
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
25745
|
-
var
|
|
25938
|
+
var import_react48 = require("react");
|
|
25746
25939
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
25747
25940
|
function useStateManager(_ref3) {
|
|
25748
25941
|
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);
|
|
25749
|
-
var _useState = (0,
|
|
25750
|
-
var _useState3 = (0,
|
|
25751
|
-
var _useState5 = (0,
|
|
25752
|
-
var onChange2 = (0,
|
|
25942
|
+
var _useState = (0, import_react48.useState)(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
25943
|
+
var _useState3 = (0, import_react48.useState)(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
25944
|
+
var _useState5 = (0, import_react48.useState)(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
25945
|
+
var onChange2 = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
25753
25946
|
if (typeof propsOnChange === "function") {
|
|
25754
25947
|
propsOnChange(value2, actionMeta);
|
|
25755
25948
|
}
|
|
25756
25949
|
setStateValue(value2);
|
|
25757
25950
|
}, [propsOnChange]);
|
|
25758
|
-
var onInputChange = (0,
|
|
25951
|
+
var onInputChange = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
25759
25952
|
var newValue;
|
|
25760
25953
|
if (typeof propsOnInputChange === "function") {
|
|
25761
25954
|
newValue = propsOnInputChange(value2, actionMeta);
|
|
25762
25955
|
}
|
|
25763
25956
|
setStateInputValue(newValue !== void 0 ? newValue : value2);
|
|
25764
25957
|
}, [propsOnInputChange]);
|
|
25765
|
-
var onMenuOpen = (0,
|
|
25958
|
+
var onMenuOpen = (0, import_react48.useCallback)(function() {
|
|
25766
25959
|
if (typeof propsOnMenuOpen === "function") {
|
|
25767
25960
|
propsOnMenuOpen();
|
|
25768
25961
|
}
|
|
25769
25962
|
setStateMenuIsOpen(true);
|
|
25770
25963
|
}, [propsOnMenuOpen]);
|
|
25771
|
-
var onMenuClose = (0,
|
|
25964
|
+
var onMenuClose = (0, import_react48.useCallback)(function() {
|
|
25772
25965
|
if (typeof propsOnMenuClose === "function") {
|
|
25773
25966
|
propsOnMenuClose();
|
|
25774
25967
|
}
|
|
@@ -25800,8 +25993,8 @@ function _extends() {
|
|
|
25800
25993
|
}
|
|
25801
25994
|
|
|
25802
25995
|
// node_modules/react-select/dist/react-select.esm.js
|
|
25803
|
-
var
|
|
25804
|
-
var
|
|
25996
|
+
var React15 = __toESM(require("react"));
|
|
25997
|
+
var import_react55 = require("react");
|
|
25805
25998
|
|
|
25806
25999
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
25807
26000
|
function _classCallCheck(a2, n4) {
|
|
@@ -25908,12 +26101,12 @@ function _toConsumableArray(r4) {
|
|
|
25908
26101
|
}
|
|
25909
26102
|
|
|
25910
26103
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
25911
|
-
var
|
|
25912
|
-
var
|
|
26104
|
+
var React14 = __toESM(require("react"));
|
|
26105
|
+
var import_react53 = require("react");
|
|
25913
26106
|
|
|
25914
26107
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
25915
|
-
var
|
|
25916
|
-
var
|
|
26108
|
+
var React12 = __toESM(require("react"));
|
|
26109
|
+
var import_react49 = require("react");
|
|
25917
26110
|
|
|
25918
26111
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
25919
26112
|
var isDevelopment = false;
|
|
@@ -27077,18 +27270,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27077
27270
|
}
|
|
27078
27271
|
|
|
27079
27272
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27080
|
-
var
|
|
27273
|
+
var React11 = __toESM(require("react"));
|
|
27081
27274
|
var isBrowser3 = typeof document !== "undefined";
|
|
27082
27275
|
var syncFallback = function syncFallback2(create) {
|
|
27083
27276
|
return create();
|
|
27084
27277
|
};
|
|
27085
|
-
var useInsertionEffect3 =
|
|
27278
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27086
27279
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27087
27280
|
|
|
27088
27281
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27089
27282
|
var isDevelopment3 = false;
|
|
27090
27283
|
var isBrowser4 = typeof document !== "undefined";
|
|
27091
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
27284
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27092
27285
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27093
27286
|
// because this module is primarily intended for the browser and node
|
|
27094
27287
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27101,20 +27294,20 @@ var EmotionCacheContext = /* @__PURE__ */ React11.createContext(
|
|
|
27101
27294
|
);
|
|
27102
27295
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
27103
27296
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
27104
|
-
return /* @__PURE__ */ (0,
|
|
27105
|
-
var cache = (0,
|
|
27297
|
+
return /* @__PURE__ */ (0, import_react49.forwardRef)(function(props, ref) {
|
|
27298
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27106
27299
|
return func(props, cache, ref);
|
|
27107
27300
|
});
|
|
27108
27301
|
};
|
|
27109
27302
|
if (!isBrowser4) {
|
|
27110
27303
|
withEmotionCache = function withEmotionCache3(func) {
|
|
27111
27304
|
return function(props) {
|
|
27112
|
-
var cache = (0,
|
|
27305
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27113
27306
|
if (cache === null) {
|
|
27114
27307
|
cache = createCache({
|
|
27115
27308
|
key: "css"
|
|
27116
27309
|
});
|
|
27117
|
-
return /* @__PURE__ */
|
|
27310
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27118
27311
|
value: cache
|
|
27119
27312
|
}, func(props, cache));
|
|
27120
27313
|
} else {
|
|
@@ -27123,7 +27316,7 @@ if (!isBrowser4) {
|
|
|
27123
27316
|
};
|
|
27124
27317
|
};
|
|
27125
27318
|
}
|
|
27126
|
-
var ThemeContext = /* @__PURE__ */
|
|
27319
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27127
27320
|
var hasOwn = {}.hasOwnProperty;
|
|
27128
27321
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27129
27322
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27150,7 +27343,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27150
27343
|
serializedNames += " " + next2.name;
|
|
27151
27344
|
next2 = next2.next;
|
|
27152
27345
|
}
|
|
27153
|
-
return /* @__PURE__ */
|
|
27346
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27154
27347
|
__html: rules
|
|
27155
27348
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27156
27349
|
}
|
|
@@ -27169,7 +27362,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27169
27362
|
} else if (props.className != null) {
|
|
27170
27363
|
className = props.className + " ";
|
|
27171
27364
|
}
|
|
27172
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
27365
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27173
27366
|
className += cache.key + "-" + serialized.name;
|
|
27174
27367
|
var newProps = {};
|
|
27175
27368
|
for (var _key2 in props) {
|
|
@@ -27181,22 +27374,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27181
27374
|
if (ref) {
|
|
27182
27375
|
newProps.ref = ref;
|
|
27183
27376
|
}
|
|
27184
|
-
return /* @__PURE__ */
|
|
27377
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27185
27378
|
cache,
|
|
27186
27379
|
serialized,
|
|
27187
27380
|
isStringTag: typeof WrappedComponent === "string"
|
|
27188
|
-
}), /* @__PURE__ */
|
|
27381
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27189
27382
|
});
|
|
27190
27383
|
var Emotion$1 = Emotion;
|
|
27191
27384
|
|
|
27192
27385
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27193
|
-
var
|
|
27386
|
+
var React13 = __toESM(require("react"));
|
|
27194
27387
|
var import_extends2 = __toESM(require_extends());
|
|
27195
27388
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27196
|
-
var
|
|
27389
|
+
var jsx86 = function jsx87(type, props) {
|
|
27197
27390
|
var args = arguments;
|
|
27198
27391
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27199
|
-
return
|
|
27392
|
+
return React13.createElement.apply(void 0, args);
|
|
27200
27393
|
}
|
|
27201
27394
|
var argsLength = args.length;
|
|
27202
27395
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27205,13 +27398,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27205
27398
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27206
27399
|
createElementArgArray[i3] = args[i3];
|
|
27207
27400
|
}
|
|
27208
|
-
return
|
|
27401
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27209
27402
|
};
|
|
27210
27403
|
(function(_jsx) {
|
|
27211
27404
|
var JSX;
|
|
27212
27405
|
/* @__PURE__ */ (function(_JSX) {
|
|
27213
27406
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27214
|
-
})(
|
|
27407
|
+
})(jsx86 || (jsx86 = {}));
|
|
27215
27408
|
function css() {
|
|
27216
27409
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27217
27410
|
args[_key] = arguments[_key];
|
|
@@ -27241,15 +27434,15 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27241
27434
|
}
|
|
27242
27435
|
|
|
27243
27436
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27244
|
-
var
|
|
27437
|
+
var import_react52 = require("react");
|
|
27245
27438
|
var import_react_dom6 = require("react-dom");
|
|
27246
27439
|
|
|
27247
27440
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27248
|
-
var
|
|
27441
|
+
var import_react50 = require("react");
|
|
27249
27442
|
var isClient3 = typeof document !== "undefined";
|
|
27250
27443
|
var noop6 = function noop7() {
|
|
27251
27444
|
};
|
|
27252
|
-
var index3 = isClient3 ?
|
|
27445
|
+
var index3 = isClient3 ? import_react50.useLayoutEffect : noop6;
|
|
27253
27446
|
|
|
27254
27447
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27255
27448
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
@@ -27583,13 +27776,13 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
27583
27776
|
marginTop: spacing2.menuGutter
|
|
27584
27777
|
});
|
|
27585
27778
|
};
|
|
27586
|
-
var PortalPlacementContext = /* @__PURE__ */ (0,
|
|
27779
|
+
var PortalPlacementContext = /* @__PURE__ */ (0, import_react52.createContext)(null);
|
|
27587
27780
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
27588
27781
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
27589
|
-
var _ref3 = (0,
|
|
27590
|
-
var ref = (0,
|
|
27591
|
-
var _useState = (0,
|
|
27592
|
-
var _useState3 = (0,
|
|
27782
|
+
var _ref3 = (0, import_react52.useContext)(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
27783
|
+
var ref = (0, import_react52.useRef)(null);
|
|
27784
|
+
var _useState = (0, import_react52.useState)(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
27785
|
+
var _useState3 = (0, import_react52.useState)(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
27593
27786
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
27594
27787
|
index3(function() {
|
|
27595
27788
|
var menuEl = ref.current;
|
|
@@ -27619,7 +27812,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27619
27812
|
};
|
|
27620
27813
|
var Menu = function Menu2(props) {
|
|
27621
27814
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27622
|
-
return
|
|
27815
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
27623
27816
|
menu: true
|
|
27624
27817
|
}), {
|
|
27625
27818
|
ref: innerRef
|
|
@@ -27641,7 +27834,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27641
27834
|
};
|
|
27642
27835
|
var MenuList = function MenuList2(props) {
|
|
27643
27836
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27644
|
-
return
|
|
27837
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27645
27838
|
"menu-list": true,
|
|
27646
27839
|
"menu-list--is-multi": isMulti
|
|
27647
27840
|
}), {
|
|
@@ -27661,7 +27854,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27661
27854
|
var loadingMessageCSS = noticeCSS;
|
|
27662
27855
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27663
27856
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27664
|
-
return
|
|
27857
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27665
27858
|
children,
|
|
27666
27859
|
innerProps
|
|
27667
27860
|
}), "noOptionsMessage", {
|
|
@@ -27671,7 +27864,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27671
27864
|
};
|
|
27672
27865
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27673
27866
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27674
|
-
return
|
|
27867
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27675
27868
|
children,
|
|
27676
27869
|
innerProps
|
|
27677
27870
|
}), "loadingMessage", {
|
|
@@ -27691,16 +27884,16 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
27691
27884
|
};
|
|
27692
27885
|
var MenuPortal = function MenuPortal2(props) {
|
|
27693
27886
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
27694
|
-
var menuPortalRef = (0,
|
|
27695
|
-
var cleanupRef = (0,
|
|
27696
|
-
var _useState5 = (0,
|
|
27697
|
-
var portalPlacementContext = (0,
|
|
27887
|
+
var menuPortalRef = (0, import_react52.useRef)(null);
|
|
27888
|
+
var cleanupRef = (0, import_react52.useRef)(null);
|
|
27889
|
+
var _useState5 = (0, import_react52.useState)(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
27890
|
+
var portalPlacementContext = (0, import_react52.useMemo)(function() {
|
|
27698
27891
|
return {
|
|
27699
27892
|
setPortalPlacement
|
|
27700
27893
|
};
|
|
27701
27894
|
}, []);
|
|
27702
|
-
var _useState7 = (0,
|
|
27703
|
-
var updateComputedPosition = (0,
|
|
27895
|
+
var _useState7 = (0, import_react52.useState)(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
27896
|
+
var updateComputedPosition = (0, import_react52.useCallback)(function() {
|
|
27704
27897
|
if (!controlElement) return;
|
|
27705
27898
|
var rect = getBoundingClientObj(controlElement);
|
|
27706
27899
|
var scrollDistance = menuPosition === "fixed" ? 0 : window.pageYOffset;
|
|
@@ -27715,7 +27908,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27715
27908
|
index3(function() {
|
|
27716
27909
|
updateComputedPosition();
|
|
27717
27910
|
}, [updateComputedPosition]);
|
|
27718
|
-
var runAutoUpdate = (0,
|
|
27911
|
+
var runAutoUpdate = (0, import_react52.useCallback)(function() {
|
|
27719
27912
|
if (typeof cleanupRef.current === "function") {
|
|
27720
27913
|
cleanupRef.current();
|
|
27721
27914
|
cleanupRef.current = null;
|
|
@@ -27729,12 +27922,12 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27729
27922
|
index3(function() {
|
|
27730
27923
|
runAutoUpdate();
|
|
27731
27924
|
}, [runAutoUpdate]);
|
|
27732
|
-
var setMenuPortalElement = (0,
|
|
27925
|
+
var setMenuPortalElement = (0, import_react52.useCallback)(function(menuPortalElement) {
|
|
27733
27926
|
menuPortalRef.current = menuPortalElement;
|
|
27734
27927
|
runAutoUpdate();
|
|
27735
27928
|
}, [runAutoUpdate]);
|
|
27736
27929
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27737
|
-
var menuWrapper =
|
|
27930
|
+
var menuWrapper = jsx86("div", _extends({
|
|
27738
27931
|
ref: setMenuPortalElement
|
|
27739
27932
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27740
27933
|
offset: computedPosition.offset,
|
|
@@ -27743,7 +27936,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27743
27936
|
}), "menuPortal", {
|
|
27744
27937
|
"menu-portal": true
|
|
27745
27938
|
}), innerProps), children);
|
|
27746
|
-
return
|
|
27939
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
27747
27940
|
value: portalPlacementContext
|
|
27748
27941
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
27749
27942
|
};
|
|
@@ -27759,7 +27952,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27759
27952
|
};
|
|
27760
27953
|
var SelectContainer = function SelectContainer2(props) {
|
|
27761
27954
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27762
|
-
return
|
|
27955
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
27763
27956
|
"--is-disabled": isDisabled,
|
|
27764
27957
|
"--is-rtl": isRtl
|
|
27765
27958
|
}), innerProps), children);
|
|
@@ -27780,7 +27973,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
27780
27973
|
};
|
|
27781
27974
|
var ValueContainer = function ValueContainer2(props) {
|
|
27782
27975
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
27783
|
-
return
|
|
27976
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
27784
27977
|
"value-container": true,
|
|
27785
27978
|
"value-container--is-multi": isMulti,
|
|
27786
27979
|
"value-container--has-value": hasValue
|
|
@@ -27796,7 +27989,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
27796
27989
|
};
|
|
27797
27990
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
27798
27991
|
var children = props.children, innerProps = props.innerProps;
|
|
27799
|
-
return
|
|
27992
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
27800
27993
|
indicators: true
|
|
27801
27994
|
}), innerProps), children);
|
|
27802
27995
|
};
|
|
@@ -27817,7 +28010,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27817
28010
|
};
|
|
27818
28011
|
var Svg = function Svg2(_ref3) {
|
|
27819
28012
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
27820
|
-
return
|
|
28013
|
+
return jsx86("svg", _extends({
|
|
27821
28014
|
height: size4,
|
|
27822
28015
|
width: size4,
|
|
27823
28016
|
viewBox: "0 0 20 20",
|
|
@@ -27827,16 +28020,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
27827
28020
|
}, props));
|
|
27828
28021
|
};
|
|
27829
28022
|
var CrossIcon = function CrossIcon2(props) {
|
|
27830
|
-
return
|
|
28023
|
+
return jsx86(Svg, _extends({
|
|
27831
28024
|
size: 20
|
|
27832
|
-
}, props),
|
|
28025
|
+
}, props), jsx86("path", {
|
|
27833
28026
|
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"
|
|
27834
28027
|
}));
|
|
27835
28028
|
};
|
|
27836
28029
|
var DownChevron = function DownChevron2(props) {
|
|
27837
|
-
return
|
|
28030
|
+
return jsx86(Svg, _extends({
|
|
27838
28031
|
size: 20
|
|
27839
|
-
}, props),
|
|
28032
|
+
}, props), jsx86("path", {
|
|
27840
28033
|
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"
|
|
27841
28034
|
}));
|
|
27842
28035
|
};
|
|
@@ -27857,18 +28050,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
27857
28050
|
var dropdownIndicatorCSS = baseCSS;
|
|
27858
28051
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
27859
28052
|
var children = props.children, innerProps = props.innerProps;
|
|
27860
|
-
return
|
|
28053
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
27861
28054
|
indicator: true,
|
|
27862
28055
|
"dropdown-indicator": true
|
|
27863
|
-
}), innerProps), children ||
|
|
28056
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
27864
28057
|
};
|
|
27865
28058
|
var clearIndicatorCSS = baseCSS;
|
|
27866
28059
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
27867
28060
|
var children = props.children, innerProps = props.innerProps;
|
|
27868
|
-
return
|
|
28061
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
27869
28062
|
indicator: true,
|
|
27870
28063
|
"clear-indicator": true
|
|
27871
|
-
}), innerProps), children ||
|
|
28064
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
27872
28065
|
};
|
|
27873
28066
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
27874
28067
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -27884,7 +28077,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
27884
28077
|
};
|
|
27885
28078
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
27886
28079
|
var innerProps = props.innerProps;
|
|
27887
|
-
return
|
|
28080
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
27888
28081
|
"indicator-separator": true
|
|
27889
28082
|
})));
|
|
27890
28083
|
};
|
|
@@ -27908,7 +28101,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
27908
28101
|
};
|
|
27909
28102
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
27910
28103
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
27911
|
-
return
|
|
28104
|
+
return jsx86("span", {
|
|
27912
28105
|
css: /* @__PURE__ */ css({
|
|
27913
28106
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
27914
28107
|
backgroundColor: "currentColor",
|
|
@@ -27923,20 +28116,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
27923
28116
|
};
|
|
27924
28117
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
27925
28118
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
27926
|
-
return
|
|
28119
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27927
28120
|
innerProps,
|
|
27928
28121
|
isRtl,
|
|
27929
28122
|
size: size4
|
|
27930
28123
|
}), "loadingIndicator", {
|
|
27931
28124
|
indicator: true,
|
|
27932
28125
|
"loading-indicator": true
|
|
27933
|
-
}), innerProps),
|
|
28126
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
27934
28127
|
delay: 0,
|
|
27935
28128
|
offset: isRtl
|
|
27936
|
-
}),
|
|
28129
|
+
}), jsx86(LoadingDot, {
|
|
27937
28130
|
delay: 160,
|
|
27938
28131
|
offset: true
|
|
27939
|
-
}),
|
|
28132
|
+
}), jsx86(LoadingDot, {
|
|
27940
28133
|
delay: 320,
|
|
27941
28134
|
offset: !isRtl
|
|
27942
28135
|
}));
|
|
@@ -27968,7 +28161,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
27968
28161
|
};
|
|
27969
28162
|
var Control = function Control2(props) {
|
|
27970
28163
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
27971
|
-
return
|
|
28164
|
+
return jsx86("div", _extends({
|
|
27972
28165
|
ref: innerRef
|
|
27973
28166
|
}, getStyleProps(props, "control", {
|
|
27974
28167
|
control: true,
|
|
@@ -27990,15 +28183,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
27990
28183
|
};
|
|
27991
28184
|
var Group = function Group2(props) {
|
|
27992
28185
|
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;
|
|
27993
|
-
return
|
|
28186
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
27994
28187
|
group: true
|
|
27995
|
-
}), innerProps),
|
|
28188
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
27996
28189
|
selectProps,
|
|
27997
28190
|
theme,
|
|
27998
28191
|
getStyles,
|
|
27999
28192
|
getClassNames,
|
|
28000
28193
|
cx
|
|
28001
|
-
}), label),
|
|
28194
|
+
}), label), jsx86("div", null, children));
|
|
28002
28195
|
};
|
|
28003
28196
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28004
28197
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28020,7 +28213,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28020
28213
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28021
28214
|
_cleanCommonProps.data;
|
|
28022
28215
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28023
|
-
return
|
|
28216
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28024
28217
|
"group-heading": true
|
|
28025
28218
|
}), innerProps));
|
|
28026
28219
|
};
|
|
@@ -28072,11 +28265,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28072
28265
|
var Input = function Input2(props) {
|
|
28073
28266
|
var cx = props.cx, value = props.value;
|
|
28074
28267
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28075
|
-
return
|
|
28268
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28076
28269
|
"input-container": true
|
|
28077
28270
|
}), {
|
|
28078
28271
|
"data-value": value || ""
|
|
28079
|
-
}),
|
|
28272
|
+
}), jsx86("input", _extends({
|
|
28080
28273
|
className: cx({
|
|
28081
28274
|
input: true
|
|
28082
28275
|
}, inputClassName),
|
|
@@ -28130,35 +28323,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28130
28323
|
};
|
|
28131
28324
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28132
28325
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28133
|
-
return
|
|
28326
|
+
return jsx86("div", innerProps, children);
|
|
28134
28327
|
};
|
|
28135
28328
|
var MultiValueContainer = MultiValueGeneric;
|
|
28136
28329
|
var MultiValueLabel = MultiValueGeneric;
|
|
28137
28330
|
function MultiValueRemove(_ref5) {
|
|
28138
28331
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28139
|
-
return
|
|
28332
|
+
return jsx86("div", _extends({
|
|
28140
28333
|
role: "button"
|
|
28141
|
-
}, innerProps), children ||
|
|
28334
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28142
28335
|
size: 14
|
|
28143
28336
|
}));
|
|
28144
28337
|
}
|
|
28145
28338
|
var MultiValue = function MultiValue2(props) {
|
|
28146
28339
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28147
28340
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28148
|
-
return
|
|
28341
|
+
return jsx86(Container, {
|
|
28149
28342
|
data,
|
|
28150
28343
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28151
28344
|
"multi-value": true,
|
|
28152
28345
|
"multi-value--is-disabled": isDisabled
|
|
28153
28346
|
})), innerProps),
|
|
28154
28347
|
selectProps
|
|
28155
|
-
},
|
|
28348
|
+
}, jsx86(Label, {
|
|
28156
28349
|
data,
|
|
28157
28350
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28158
28351
|
"multi-value__label": true
|
|
28159
28352
|
})),
|
|
28160
28353
|
selectProps
|
|
28161
|
-
}, children),
|
|
28354
|
+
}, children), jsx86(Remove, {
|
|
28162
28355
|
data,
|
|
28163
28356
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28164
28357
|
"multi-value__remove": true
|
|
@@ -28191,7 +28384,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28191
28384
|
};
|
|
28192
28385
|
var Option = function Option2(props) {
|
|
28193
28386
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28194
|
-
return
|
|
28387
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28195
28388
|
option: true,
|
|
28196
28389
|
"option--is-disabled": isDisabled,
|
|
28197
28390
|
"option--is-focused": isFocused,
|
|
@@ -28215,7 +28408,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28215
28408
|
};
|
|
28216
28409
|
var Placeholder = function Placeholder2(props) {
|
|
28217
28410
|
var children = props.children, innerProps = props.innerProps;
|
|
28218
|
-
return
|
|
28411
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28219
28412
|
placeholder: true
|
|
28220
28413
|
}), innerProps), children);
|
|
28221
28414
|
};
|
|
@@ -28237,7 +28430,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28237
28430
|
};
|
|
28238
28431
|
var SingleValue = function SingleValue2(props) {
|
|
28239
28432
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28240
|
-
return
|
|
28433
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28241
28434
|
"single-value": true,
|
|
28242
28435
|
"single-value--is-disabled": isDisabled
|
|
28243
28436
|
}), innerProps), children);
|
|
@@ -28339,7 +28532,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28339
28532
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28340
28533
|
};
|
|
28341
28534
|
var A11yText = function A11yText2(props) {
|
|
28342
|
-
return
|
|
28535
|
+
return jsx86("span", _extends({
|
|
28343
28536
|
css: _ref
|
|
28344
28537
|
}, props));
|
|
28345
28538
|
};
|
|
@@ -28400,10 +28593,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28400
28593
|
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;
|
|
28401
28594
|
var ariaLabel = selectProps["aria-label"];
|
|
28402
28595
|
var ariaLive = selectProps["aria-live"];
|
|
28403
|
-
var messages = (0,
|
|
28596
|
+
var messages = (0, import_react53.useMemo)(function() {
|
|
28404
28597
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
28405
28598
|
}, [ariaLiveMessages]);
|
|
28406
|
-
var ariaSelected = (0,
|
|
28599
|
+
var ariaSelected = (0, import_react53.useMemo)(function() {
|
|
28407
28600
|
var message2 = "";
|
|
28408
28601
|
if (ariaSelection && messages.onChange) {
|
|
28409
28602
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -28425,7 +28618,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28425
28618
|
}
|
|
28426
28619
|
return message2;
|
|
28427
28620
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
28428
|
-
var ariaFocused = (0,
|
|
28621
|
+
var ariaFocused = (0, import_react53.useMemo)(function() {
|
|
28429
28622
|
var focusMsg = "";
|
|
28430
28623
|
var focused = focusedOption || focusedValue;
|
|
28431
28624
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -28444,7 +28637,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28444
28637
|
}
|
|
28445
28638
|
return focusMsg;
|
|
28446
28639
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
28447
|
-
var ariaResults = (0,
|
|
28640
|
+
var ariaResults = (0, import_react53.useMemo)(function() {
|
|
28448
28641
|
var resultsMsg = "";
|
|
28449
28642
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
28450
28643
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -28458,7 +28651,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28458
28651
|
return resultsMsg;
|
|
28459
28652
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
28460
28653
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
28461
|
-
var ariaGuidance = (0,
|
|
28654
|
+
var ariaGuidance = (0, import_react53.useMemo)(function() {
|
|
28462
28655
|
var guidanceMsg = "";
|
|
28463
28656
|
if (messages.guidance) {
|
|
28464
28657
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -28474,18 +28667,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28474
28667
|
}
|
|
28475
28668
|
return guidanceMsg;
|
|
28476
28669
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28477
|
-
var ScreenReaderText =
|
|
28670
|
+
var ScreenReaderText = jsx86(import_react53.Fragment, null, jsx86("span", {
|
|
28478
28671
|
id: "aria-selection"
|
|
28479
|
-
}, ariaSelected),
|
|
28672
|
+
}, ariaSelected), jsx86("span", {
|
|
28480
28673
|
id: "aria-focused"
|
|
28481
|
-
}, ariaFocused),
|
|
28674
|
+
}, ariaFocused), jsx86("span", {
|
|
28482
28675
|
id: "aria-results"
|
|
28483
|
-
}, ariaResults),
|
|
28676
|
+
}, ariaResults), jsx86("span", {
|
|
28484
28677
|
id: "aria-guidance"
|
|
28485
28678
|
}, ariaGuidance));
|
|
28486
|
-
return
|
|
28679
|
+
return jsx86(import_react53.Fragment, null, jsx86(A11yText$1, {
|
|
28487
28680
|
id
|
|
28488
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28681
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
28489
28682
|
"aria-live": ariaLive,
|
|
28490
28683
|
"aria-atomic": "false",
|
|
28491
28684
|
"aria-relevant": "additions text",
|
|
@@ -28798,7 +28991,7 @@ var _excluded4 = ["innerRef"];
|
|
|
28798
28991
|
function DummyInput(_ref3) {
|
|
28799
28992
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
28800
28993
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
28801
|
-
return
|
|
28994
|
+
return jsx86("input", _extends({
|
|
28802
28995
|
ref: innerRef
|
|
28803
28996
|
}, filteredProps, {
|
|
28804
28997
|
css: /* @__PURE__ */ css({
|
|
@@ -28830,11 +29023,11 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
28830
29023
|
};
|
|
28831
29024
|
function useScrollCapture(_ref3) {
|
|
28832
29025
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
28833
|
-
var isBottom = (0,
|
|
28834
|
-
var isTop = (0,
|
|
28835
|
-
var touchStart = (0,
|
|
28836
|
-
var scrollTarget = (0,
|
|
28837
|
-
var handleEventDelta = (0,
|
|
29026
|
+
var isBottom = (0, import_react53.useRef)(false);
|
|
29027
|
+
var isTop = (0, import_react53.useRef)(false);
|
|
29028
|
+
var touchStart = (0, import_react53.useRef)(0);
|
|
29029
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29030
|
+
var handleEventDelta = (0, import_react53.useCallback)(function(event, delta) {
|
|
28838
29031
|
if (scrollTarget.current === null) return;
|
|
28839
29032
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
28840
29033
|
var target = scrollTarget.current;
|
|
@@ -28868,17 +29061,17 @@ function useScrollCapture(_ref3) {
|
|
|
28868
29061
|
cancelScroll(event);
|
|
28869
29062
|
}
|
|
28870
29063
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
28871
|
-
var onWheel = (0,
|
|
29064
|
+
var onWheel = (0, import_react53.useCallback)(function(event) {
|
|
28872
29065
|
handleEventDelta(event, event.deltaY);
|
|
28873
29066
|
}, [handleEventDelta]);
|
|
28874
|
-
var onTouchStart = (0,
|
|
29067
|
+
var onTouchStart = (0, import_react53.useCallback)(function(event) {
|
|
28875
29068
|
touchStart.current = event.changedTouches[0].clientY;
|
|
28876
29069
|
}, []);
|
|
28877
|
-
var onTouchMove = (0,
|
|
29070
|
+
var onTouchMove = (0, import_react53.useCallback)(function(event) {
|
|
28878
29071
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
28879
29072
|
handleEventDelta(event, deltaY);
|
|
28880
29073
|
}, [handleEventDelta]);
|
|
28881
|
-
var startListening = (0,
|
|
29074
|
+
var startListening = (0, import_react53.useCallback)(function(el) {
|
|
28882
29075
|
if (!el) return;
|
|
28883
29076
|
var notPassive = supportsPassiveEvents ? {
|
|
28884
29077
|
passive: false
|
|
@@ -28887,13 +29080,13 @@ function useScrollCapture(_ref3) {
|
|
|
28887
29080
|
el.addEventListener("touchstart", onTouchStart, notPassive);
|
|
28888
29081
|
el.addEventListener("touchmove", onTouchMove, notPassive);
|
|
28889
29082
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28890
|
-
var stopListening = (0,
|
|
29083
|
+
var stopListening = (0, import_react53.useCallback)(function(el) {
|
|
28891
29084
|
if (!el) return;
|
|
28892
29085
|
el.removeEventListener("wheel", onWheel, false);
|
|
28893
29086
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
28894
29087
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
28895
29088
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28896
|
-
(0,
|
|
29089
|
+
(0, import_react53.useEffect)(function() {
|
|
28897
29090
|
if (!isEnabled) return;
|
|
28898
29091
|
var element = scrollTarget.current;
|
|
28899
29092
|
startListening(element);
|
|
@@ -28940,9 +29133,9 @@ var listenerOptions = {
|
|
|
28940
29133
|
};
|
|
28941
29134
|
function useScrollLock(_ref3) {
|
|
28942
29135
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
28943
|
-
var originalStyles = (0,
|
|
28944
|
-
var scrollTarget = (0,
|
|
28945
|
-
var addScrollLock = (0,
|
|
29136
|
+
var originalStyles = (0, import_react53.useRef)({});
|
|
29137
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29138
|
+
var addScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
28946
29139
|
if (!canUseDOM) return;
|
|
28947
29140
|
var target = document.body;
|
|
28948
29141
|
var targetStyle = target && target.style;
|
|
@@ -28975,7 +29168,7 @@ function useScrollLock(_ref3) {
|
|
|
28975
29168
|
}
|
|
28976
29169
|
activeScrollLocks += 1;
|
|
28977
29170
|
}, [accountForScrollbars]);
|
|
28978
|
-
var removeScrollLock = (0,
|
|
29171
|
+
var removeScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
28979
29172
|
if (!canUseDOM) return;
|
|
28980
29173
|
var target = document.body;
|
|
28981
29174
|
var targetStyle = target && target.style;
|
|
@@ -28996,7 +29189,7 @@ function useScrollLock(_ref3) {
|
|
|
28996
29189
|
}
|
|
28997
29190
|
}
|
|
28998
29191
|
}, [accountForScrollbars]);
|
|
28999
|
-
(0,
|
|
29192
|
+
(0, import_react53.useEffect)(function() {
|
|
29000
29193
|
if (!isEnabled) return;
|
|
29001
29194
|
var element = scrollTarget.current;
|
|
29002
29195
|
addScrollLock(element);
|
|
@@ -29040,7 +29233,7 @@ function ScrollManager(_ref3) {
|
|
|
29040
29233
|
setScrollCaptureTarget(element);
|
|
29041
29234
|
setScrollLockTarget(element);
|
|
29042
29235
|
};
|
|
29043
|
-
return
|
|
29236
|
+
return jsx86(import_react53.Fragment, null, lockEnabled && jsx86("div", {
|
|
29044
29237
|
onClick: blurSelectInput,
|
|
29045
29238
|
css: _ref2$1
|
|
29046
29239
|
}), children(targetRef));
|
|
@@ -29059,7 +29252,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29059
29252
|
};
|
|
29060
29253
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29061
29254
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29062
|
-
return
|
|
29255
|
+
return jsx86("input", {
|
|
29063
29256
|
required: true,
|
|
29064
29257
|
name: name2,
|
|
29065
29258
|
tabIndex: -1,
|
|
@@ -30200,7 +30393,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30200
30393
|
"aria-describedby": this.getElementId("placeholder")
|
|
30201
30394
|
});
|
|
30202
30395
|
if (!isSearchable) {
|
|
30203
|
-
return /* @__PURE__ */
|
|
30396
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30204
30397
|
id,
|
|
30205
30398
|
innerRef: this.getInputRef,
|
|
30206
30399
|
onBlur: this.onInputBlur,
|
|
@@ -30213,7 +30406,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30213
30406
|
value: ""
|
|
30214
30407
|
}, ariaAttributes));
|
|
30215
30408
|
}
|
|
30216
|
-
return /* @__PURE__ */
|
|
30409
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30217
30410
|
autoCapitalize: "none",
|
|
30218
30411
|
autoComplete: "off",
|
|
30219
30412
|
autoCorrect: "off",
|
|
@@ -30241,7 +30434,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30241
30434
|
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;
|
|
30242
30435
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30243
30436
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30244
|
-
return inputValue ? null : /* @__PURE__ */
|
|
30437
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30245
30438
|
key: "placeholder",
|
|
30246
30439
|
isDisabled,
|
|
30247
30440
|
isFocused,
|
|
@@ -30254,7 +30447,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30254
30447
|
return selectValue.map(function(opt, index4) {
|
|
30255
30448
|
var isOptionFocused = opt === focusedValue;
|
|
30256
30449
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
30257
|
-
return /* @__PURE__ */
|
|
30450
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
30258
30451
|
components: {
|
|
30259
30452
|
Container: MultiValueContainer2,
|
|
30260
30453
|
Label: MultiValueLabel2,
|
|
@@ -30283,7 +30476,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30283
30476
|
return null;
|
|
30284
30477
|
}
|
|
30285
30478
|
var singleValue = selectValue[0];
|
|
30286
|
-
return /* @__PURE__ */
|
|
30479
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
30287
30480
|
data: singleValue,
|
|
30288
30481
|
isDisabled
|
|
30289
30482
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -30303,7 +30496,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30303
30496
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
30304
30497
|
"aria-hidden": "true"
|
|
30305
30498
|
};
|
|
30306
|
-
return /* @__PURE__ */
|
|
30499
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
30307
30500
|
innerProps,
|
|
30308
30501
|
isFocused
|
|
30309
30502
|
}));
|
|
@@ -30319,7 +30512,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30319
30512
|
var innerProps = {
|
|
30320
30513
|
"aria-hidden": "true"
|
|
30321
30514
|
};
|
|
30322
|
-
return /* @__PURE__ */
|
|
30515
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
30323
30516
|
innerProps,
|
|
30324
30517
|
isDisabled,
|
|
30325
30518
|
isFocused
|
|
@@ -30333,7 +30526,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30333
30526
|
var commonProps = this.commonProps;
|
|
30334
30527
|
var isDisabled = this.props.isDisabled;
|
|
30335
30528
|
var isFocused = this.state.isFocused;
|
|
30336
|
-
return /* @__PURE__ */
|
|
30529
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
30337
30530
|
isDisabled,
|
|
30338
30531
|
isFocused
|
|
30339
30532
|
}));
|
|
@@ -30351,7 +30544,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30351
30544
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
30352
30545
|
"aria-hidden": "true"
|
|
30353
30546
|
};
|
|
30354
|
-
return /* @__PURE__ */
|
|
30547
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
30355
30548
|
innerProps,
|
|
30356
30549
|
isDisabled,
|
|
30357
30550
|
isFocused
|
|
@@ -30386,7 +30579,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30386
30579
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
30387
30580
|
// is not supported on Apple devices
|
|
30388
30581
|
};
|
|
30389
|
-
return /* @__PURE__ */
|
|
30582
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
30390
30583
|
innerProps,
|
|
30391
30584
|
data,
|
|
30392
30585
|
isDisabled,
|
|
@@ -30406,7 +30599,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30406
30599
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
30407
30600
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
30408
30601
|
var headingId = "".concat(groupId, "-heading");
|
|
30409
|
-
return /* @__PURE__ */
|
|
30602
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
30410
30603
|
key: groupId,
|
|
30411
30604
|
data: _data,
|
|
30412
30605
|
options: options2,
|
|
@@ -30428,13 +30621,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30428
30621
|
inputValue
|
|
30429
30622
|
});
|
|
30430
30623
|
if (message2 === null) return null;
|
|
30431
|
-
menuUI = /* @__PURE__ */
|
|
30624
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
30432
30625
|
} else {
|
|
30433
30626
|
var _message = noOptionsMessage2({
|
|
30434
30627
|
inputValue
|
|
30435
30628
|
});
|
|
30436
30629
|
if (_message === null) return null;
|
|
30437
|
-
menuUI = /* @__PURE__ */
|
|
30630
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
30438
30631
|
}
|
|
30439
30632
|
var menuPlacementProps = {
|
|
30440
30633
|
minMenuHeight,
|
|
@@ -30443,9 +30636,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30443
30636
|
menuPosition,
|
|
30444
30637
|
menuShouldScrollIntoView
|
|
30445
30638
|
};
|
|
30446
|
-
var menuElement = /* @__PURE__ */
|
|
30639
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
30447
30640
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
30448
|
-
return /* @__PURE__ */
|
|
30641
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
30449
30642
|
innerRef: ref,
|
|
30450
30643
|
innerProps: {
|
|
30451
30644
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -30453,13 +30646,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30453
30646
|
},
|
|
30454
30647
|
isLoading,
|
|
30455
30648
|
placement
|
|
30456
|
-
}), /* @__PURE__ */
|
|
30649
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
30457
30650
|
captureEnabled: captureMenuScroll,
|
|
30458
30651
|
onTopArrive: onMenuScrollToTop,
|
|
30459
30652
|
onBottomArrive: onMenuScrollToBottom,
|
|
30460
30653
|
lockEnabled: menuShouldBlockScroll
|
|
30461
30654
|
}, function(scrollTargetRef) {
|
|
30462
|
-
return /* @__PURE__ */
|
|
30655
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
30463
30656
|
innerRef: function innerRef(instance2) {
|
|
30464
30657
|
_this4.getMenuListRef(instance2);
|
|
30465
30658
|
scrollTargetRef(instance2);
|
|
@@ -30475,7 +30668,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30475
30668
|
}), menuUI);
|
|
30476
30669
|
}));
|
|
30477
30670
|
});
|
|
30478
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
30671
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
30479
30672
|
appendTo: menuPortalTarget,
|
|
30480
30673
|
controlElement: this.controlRef,
|
|
30481
30674
|
menuPlacement,
|
|
@@ -30489,7 +30682,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30489
30682
|
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;
|
|
30490
30683
|
var selectValue = this.state.selectValue;
|
|
30491
30684
|
if (required && !this.hasValue() && !isDisabled) {
|
|
30492
|
-
return /* @__PURE__ */
|
|
30685
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
30493
30686
|
name: name2,
|
|
30494
30687
|
onFocus: this.onValueInputFocus
|
|
30495
30688
|
});
|
|
@@ -30500,29 +30693,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30500
30693
|
var value = selectValue.map(function(opt) {
|
|
30501
30694
|
return _this5.getOptionValue(opt);
|
|
30502
30695
|
}).join(delimiter2);
|
|
30503
|
-
return /* @__PURE__ */
|
|
30696
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30504
30697
|
name: name2,
|
|
30505
30698
|
type: "hidden",
|
|
30506
30699
|
value
|
|
30507
30700
|
});
|
|
30508
30701
|
} else {
|
|
30509
30702
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
30510
|
-
return /* @__PURE__ */
|
|
30703
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30511
30704
|
key: "i-".concat(i3),
|
|
30512
30705
|
name: name2,
|
|
30513
30706
|
type: "hidden",
|
|
30514
30707
|
value: _this5.getOptionValue(opt)
|
|
30515
30708
|
});
|
|
30516
|
-
}) : /* @__PURE__ */
|
|
30709
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
30517
30710
|
name: name2,
|
|
30518
30711
|
type: "hidden",
|
|
30519
30712
|
value: ""
|
|
30520
30713
|
});
|
|
30521
|
-
return /* @__PURE__ */
|
|
30714
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
30522
30715
|
}
|
|
30523
30716
|
} else {
|
|
30524
30717
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
30525
|
-
return /* @__PURE__ */
|
|
30718
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30526
30719
|
name: name2,
|
|
30527
30720
|
type: "hidden",
|
|
30528
30721
|
value: _value
|
|
@@ -30535,7 +30728,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30535
30728
|
var commonProps = this.commonProps;
|
|
30536
30729
|
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;
|
|
30537
30730
|
var focusableOptions = this.getFocusableOptions();
|
|
30538
|
-
return /* @__PURE__ */
|
|
30731
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
30539
30732
|
id: this.getElementId("live-region"),
|
|
30540
30733
|
ariaSelection,
|
|
30541
30734
|
focusedOption,
|
|
@@ -30553,7 +30746,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30553
30746
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
30554
30747
|
var isFocused = this.state.isFocused;
|
|
30555
30748
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
30556
|
-
return /* @__PURE__ */
|
|
30749
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
30557
30750
|
className,
|
|
30558
30751
|
innerProps: {
|
|
30559
30752
|
id,
|
|
@@ -30561,7 +30754,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30561
30754
|
},
|
|
30562
30755
|
isDisabled,
|
|
30563
30756
|
isFocused
|
|
30564
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
30757
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
30565
30758
|
innerRef: this.getControlRef,
|
|
30566
30759
|
innerProps: {
|
|
30567
30760
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -30570,9 +30763,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30570
30763
|
isDisabled,
|
|
30571
30764
|
isFocused,
|
|
30572
30765
|
menuIsOpen
|
|
30573
|
-
}), /* @__PURE__ */
|
|
30766
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
30574
30767
|
isDisabled
|
|
30575
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
30768
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
30576
30769
|
isDisabled
|
|
30577
30770
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
30578
30771
|
}
|
|
@@ -30623,7 +30816,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30623
30816
|
}
|
|
30624
30817
|
}]);
|
|
30625
30818
|
return Select2;
|
|
30626
|
-
}(
|
|
30819
|
+
}(import_react53.Component);
|
|
30627
30820
|
Select.defaultProps = defaultProps;
|
|
30628
30821
|
|
|
30629
30822
|
// node_modules/react-select/dist/react-select.esm.js
|
|
@@ -30639,9 +30832,9 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
30639
30832
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
30640
30833
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
30641
30834
|
var import_react_dom7 = require("react-dom");
|
|
30642
|
-
var StateManagedSelect = /* @__PURE__ */ (0,
|
|
30835
|
+
var StateManagedSelect = /* @__PURE__ */ (0, import_react55.forwardRef)(function(props, ref) {
|
|
30643
30836
|
var baseSelectProps = useStateManager(props);
|
|
30644
|
-
return /* @__PURE__ */
|
|
30837
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
30645
30838
|
ref
|
|
30646
30839
|
}, baseSelectProps));
|
|
30647
30840
|
});
|
|
@@ -30649,7 +30842,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30649
30842
|
|
|
30650
30843
|
// src/widgets/basic/date-field/date.tsx
|
|
30651
30844
|
var import_moment2 = __toESM(require_moment());
|
|
30652
|
-
var
|
|
30845
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
30653
30846
|
var DateField = (props) => {
|
|
30654
30847
|
const {
|
|
30655
30848
|
name: name2,
|
|
@@ -30676,9 +30869,9 @@ var DateField = (props) => {
|
|
|
30676
30869
|
context
|
|
30677
30870
|
} = props;
|
|
30678
30871
|
const { t: t3 } = useI18n();
|
|
30679
|
-
const InputDateCustom = (0,
|
|
30680
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
30681
|
-
/* @__PURE__ */ (0,
|
|
30872
|
+
const InputDateCustom = (0, import_react56.forwardRef)(
|
|
30873
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("label", { className: `flex ${className}`, children: [
|
|
30874
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30682
30875
|
"input",
|
|
30683
30876
|
{
|
|
30684
30877
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30692,13 +30885,13 @@ var DateField = (props) => {
|
|
|
30692
30885
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30693
30886
|
}
|
|
30694
30887
|
),
|
|
30695
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
30888
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CalendarIcon, {})
|
|
30696
30889
|
] })
|
|
30697
30890
|
);
|
|
30698
30891
|
if (!isForm && !isEditTable) {
|
|
30699
|
-
return /* @__PURE__ */ (0,
|
|
30892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
30700
30893
|
} else {
|
|
30701
|
-
return /* @__PURE__ */ (0,
|
|
30894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30702
30895
|
Controller,
|
|
30703
30896
|
{
|
|
30704
30897
|
name: name2 || "",
|
|
@@ -30714,14 +30907,14 @@ var DateField = (props) => {
|
|
|
30714
30907
|
},
|
|
30715
30908
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
30716
30909
|
const { setError, clearErrors } = methods;
|
|
30717
|
-
(0,
|
|
30910
|
+
(0, import_react56.useEffect)(() => {
|
|
30718
30911
|
if (value) {
|
|
30719
30912
|
clearErrors(name2);
|
|
30720
30913
|
}
|
|
30721
30914
|
}, [value, clearErrors, name2]);
|
|
30722
30915
|
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;
|
|
30723
|
-
return /* @__PURE__ */ (0,
|
|
30724
|
-
/* @__PURE__ */ (0,
|
|
30916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
30917
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30725
30918
|
DatePicker,
|
|
30726
30919
|
{
|
|
30727
30920
|
selected: selectedDate,
|
|
@@ -30769,7 +30962,7 @@ var DateField = (props) => {
|
|
|
30769
30962
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30770
30963
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30771
30964
|
showTimeInput: showTime,
|
|
30772
|
-
customInput: /* @__PURE__ */ (0,
|
|
30965
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30773
30966
|
InputDateCustom,
|
|
30774
30967
|
{
|
|
30775
30968
|
isForm,
|
|
@@ -30787,7 +30980,7 @@ var DateField = (props) => {
|
|
|
30787
30980
|
increaseMonth,
|
|
30788
30981
|
prevMonthButtonDisabled,
|
|
30789
30982
|
nextMonthButtonDisabled
|
|
30790
|
-
}) => /* @__PURE__ */ (0,
|
|
30983
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
30791
30984
|
"div",
|
|
30792
30985
|
{
|
|
30793
30986
|
style: {
|
|
@@ -30796,7 +30989,7 @@ var DateField = (props) => {
|
|
|
30796
30989
|
justifyContent: "center"
|
|
30797
30990
|
},
|
|
30798
30991
|
children: [
|
|
30799
|
-
/* @__PURE__ */ (0,
|
|
30992
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30800
30993
|
"button",
|
|
30801
30994
|
{
|
|
30802
30995
|
onClick: decreaseMonth,
|
|
@@ -30804,7 +30997,7 @@ var DateField = (props) => {
|
|
|
30804
30997
|
children: "<"
|
|
30805
30998
|
}
|
|
30806
30999
|
),
|
|
30807
|
-
/* @__PURE__ */ (0,
|
|
31000
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30808
31001
|
StateManagedSelect$1,
|
|
30809
31002
|
{
|
|
30810
31003
|
classNames: {
|
|
@@ -30830,7 +31023,7 @@ var DateField = (props) => {
|
|
|
30830
31023
|
autoFocus: true
|
|
30831
31024
|
}
|
|
30832
31025
|
),
|
|
30833
|
-
/* @__PURE__ */ (0,
|
|
31026
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30834
31027
|
StateManagedSelect$1,
|
|
30835
31028
|
{
|
|
30836
31029
|
classNames: {
|
|
@@ -30858,7 +31051,7 @@ var DateField = (props) => {
|
|
|
30858
31051
|
}))
|
|
30859
31052
|
}
|
|
30860
31053
|
),
|
|
30861
|
-
/* @__PURE__ */ (0,
|
|
31054
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30862
31055
|
"button",
|
|
30863
31056
|
{
|
|
30864
31057
|
onClick: increaseMonth,
|
|
@@ -30871,7 +31064,7 @@ var DateField = (props) => {
|
|
|
30871
31064
|
)
|
|
30872
31065
|
}
|
|
30873
31066
|
),
|
|
30874
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31067
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30875
31068
|
] });
|
|
30876
31069
|
}
|
|
30877
31070
|
}
|
|
@@ -30880,26 +31073,26 @@ var DateField = (props) => {
|
|
|
30880
31073
|
};
|
|
30881
31074
|
|
|
30882
31075
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
30883
|
-
var
|
|
31076
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
30884
31077
|
var DownLoadBinaryField = (props) => {
|
|
30885
31078
|
const { handleFileDownload } = props;
|
|
30886
31079
|
const { t: t3 } = useI18n();
|
|
30887
|
-
return /* @__PURE__ */ (0,
|
|
31080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
30888
31081
|
"button",
|
|
30889
31082
|
{
|
|
30890
31083
|
type: "button",
|
|
30891
31084
|
onClick: handleFileDownload,
|
|
30892
31085
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
30893
31086
|
children: [
|
|
30894
|
-
/* @__PURE__ */ (0,
|
|
30895
|
-
/* @__PURE__ */ (0,
|
|
31087
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DownloadIcon, {}),
|
|
31088
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
30896
31089
|
]
|
|
30897
31090
|
}
|
|
30898
31091
|
);
|
|
30899
31092
|
};
|
|
30900
31093
|
|
|
30901
31094
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
30902
|
-
var
|
|
31095
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
30903
31096
|
var DownloadFileField = (props) => {
|
|
30904
31097
|
const {
|
|
30905
31098
|
readonly,
|
|
@@ -30911,15 +31104,15 @@ var DownloadFileField = (props) => {
|
|
|
30911
31104
|
handleFileChange,
|
|
30912
31105
|
handleFileDownload
|
|
30913
31106
|
} = props;
|
|
30914
|
-
return /* @__PURE__ */ (0,
|
|
30915
|
-
/* @__PURE__ */ (0,
|
|
31107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "", children: [
|
|
31108
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
30916
31109
|
"label",
|
|
30917
31110
|
{
|
|
30918
31111
|
htmlFor: inputId,
|
|
30919
31112
|
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",
|
|
30920
31113
|
children: [
|
|
30921
|
-
file ? /* @__PURE__ */ (0,
|
|
30922
|
-
/* @__PURE__ */ (0,
|
|
31114
|
+
file ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31115
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
30923
31116
|
"input",
|
|
30924
31117
|
{
|
|
30925
31118
|
id: inputId,
|
|
@@ -30933,7 +31126,7 @@ var DownloadFileField = (props) => {
|
|
|
30933
31126
|
]
|
|
30934
31127
|
}
|
|
30935
31128
|
),
|
|
30936
|
-
file && /* @__PURE__ */ (0,
|
|
31129
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
30937
31130
|
"button",
|
|
30938
31131
|
{
|
|
30939
31132
|
onClick: handleFileDownload,
|
|
@@ -30946,8 +31139,8 @@ var DownloadFileField = (props) => {
|
|
|
30946
31139
|
};
|
|
30947
31140
|
|
|
30948
31141
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
30949
|
-
var
|
|
30950
|
-
var
|
|
31142
|
+
var import_react57 = require("react");
|
|
31143
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
30951
31144
|
var DropdownField = (props) => {
|
|
30952
31145
|
const {
|
|
30953
31146
|
options: options2,
|
|
@@ -30959,32 +31152,32 @@ var DropdownField = (props) => {
|
|
|
30959
31152
|
dropdownClassName = "",
|
|
30960
31153
|
useClickOutside: useClickOutside2
|
|
30961
31154
|
} = props;
|
|
30962
|
-
const [open, setOpen] = (0,
|
|
31155
|
+
const [open, setOpen] = (0, import_react57.useState)(false);
|
|
30963
31156
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
30964
|
-
return /* @__PURE__ */ (0,
|
|
31157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
30965
31158
|
"div",
|
|
30966
31159
|
{
|
|
30967
31160
|
ref: dropdownRef,
|
|
30968
31161
|
className: `relative ${className}`,
|
|
30969
31162
|
onClick: () => setOpen(!open),
|
|
30970
31163
|
children: [
|
|
30971
|
-
/* @__PURE__ */ (0,
|
|
31164
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
30972
31165
|
"div",
|
|
30973
31166
|
{
|
|
30974
31167
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
30975
31168
|
children: [
|
|
30976
31169
|
selectedValue?.icon,
|
|
30977
|
-
/* @__PURE__ */ (0,
|
|
30978
|
-
/* @__PURE__ */ (0,
|
|
31170
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: selectedValue?.label }),
|
|
31171
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
30979
31172
|
]
|
|
30980
31173
|
}
|
|
30981
31174
|
),
|
|
30982
|
-
open && /* @__PURE__ */ (0,
|
|
31175
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
30983
31176
|
"div",
|
|
30984
31177
|
{
|
|
30985
31178
|
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}`,
|
|
30986
31179
|
onClick: (e3) => e3.stopPropagation(),
|
|
30987
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31180
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
30988
31181
|
"div",
|
|
30989
31182
|
{
|
|
30990
31183
|
onClick: () => {
|
|
@@ -31004,7 +31197,7 @@ var DropdownField = (props) => {
|
|
|
31004
31197
|
};
|
|
31005
31198
|
|
|
31006
31199
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31007
|
-
var
|
|
31200
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31008
31201
|
var FeeField = (props) => {
|
|
31009
31202
|
const { value, formValues } = props;
|
|
31010
31203
|
const { t: t3 } = useI18n();
|
|
@@ -31015,27 +31208,27 @@ var FeeField = (props) => {
|
|
|
31015
31208
|
)
|
|
31016
31209
|
) + " VND";
|
|
31017
31210
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31018
|
-
return /* @__PURE__ */ (0,
|
|
31211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31019
31212
|
value?.subtotals?.map((sub) => {
|
|
31020
31213
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31021
|
-
return /* @__PURE__ */ (0,
|
|
31022
|
-
/* @__PURE__ */ (0,
|
|
31023
|
-
/* @__PURE__ */ (0,
|
|
31214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31215
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31216
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31024
31217
|
sub?.name,
|
|
31025
31218
|
":"
|
|
31026
31219
|
] }),
|
|
31027
|
-
/* @__PURE__ */ (0,
|
|
31220
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31028
31221
|
] }),
|
|
31029
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31222
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
31030
31223
|
"div",
|
|
31031
31224
|
{
|
|
31032
31225
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31033
31226
|
children: [
|
|
31034
|
-
/* @__PURE__ */ (0,
|
|
31227
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31035
31228
|
group?.group_name,
|
|
31036
31229
|
":"
|
|
31037
31230
|
] }),
|
|
31038
|
-
/* @__PURE__ */ (0,
|
|
31231
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31039
31232
|
]
|
|
31040
31233
|
},
|
|
31041
31234
|
`tax_groups_${group?.id}`
|
|
@@ -31043,33 +31236,33 @@ var FeeField = (props) => {
|
|
|
31043
31236
|
] });
|
|
31044
31237
|
}
|
|
31045
31238
|
}),
|
|
31046
|
-
/* @__PURE__ */ (0,
|
|
31047
|
-
/* @__PURE__ */ (0,
|
|
31239
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31240
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31048
31241
|
t3("total"),
|
|
31049
31242
|
":"
|
|
31050
31243
|
] }),
|
|
31051
|
-
/* @__PURE__ */ (0,
|
|
31244
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31052
31245
|
] }),
|
|
31053
|
-
/* @__PURE__ */ (0,
|
|
31054
|
-
/* @__PURE__ */ (0,
|
|
31246
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31247
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31055
31248
|
t3("paid_amount"),
|
|
31056
31249
|
":"
|
|
31057
31250
|
] }),
|
|
31058
|
-
/* @__PURE__ */ (0,
|
|
31251
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31059
31252
|
] }),
|
|
31060
|
-
/* @__PURE__ */ (0,
|
|
31061
|
-
/* @__PURE__ */ (0,
|
|
31253
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31254
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31062
31255
|
t3("remanining_amount"),
|
|
31063
31256
|
":"
|
|
31064
31257
|
] }),
|
|
31065
|
-
/* @__PURE__ */ (0,
|
|
31258
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31066
31259
|
] })
|
|
31067
31260
|
] });
|
|
31068
31261
|
};
|
|
31069
31262
|
|
|
31070
31263
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31071
|
-
var
|
|
31072
|
-
var
|
|
31264
|
+
var import_react58 = require("react");
|
|
31265
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31073
31266
|
var RenderFile = ({
|
|
31074
31267
|
file,
|
|
31075
31268
|
onDelete,
|
|
@@ -31079,16 +31272,16 @@ var RenderFile = ({
|
|
|
31079
31272
|
readAs: "all"
|
|
31080
31273
|
});
|
|
31081
31274
|
const fileTypeIcon = {
|
|
31082
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
31083
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
31084
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
31085
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
31086
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
31275
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PdfIcon, {}),
|
|
31276
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
31277
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
31278
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {}),
|
|
31279
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {})
|
|
31087
31280
|
};
|
|
31088
|
-
return /* @__PURE__ */ (0,
|
|
31089
|
-
/* @__PURE__ */ (0,
|
|
31090
|
-
/* @__PURE__ */ (0,
|
|
31091
|
-
/* @__PURE__ */ (0,
|
|
31281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31282
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31283
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
31284
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31092
31285
|
"div",
|
|
31093
31286
|
{
|
|
31094
31287
|
style: {
|
|
@@ -31098,20 +31291,20 @@ var RenderFile = ({
|
|
|
31098
31291
|
children: file?.name || file?.display_name || info?.name
|
|
31099
31292
|
}
|
|
31100
31293
|
),
|
|
31101
|
-
/* @__PURE__ */ (0,
|
|
31294
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31102
31295
|
] }),
|
|
31103
|
-
/* @__PURE__ */ (0,
|
|
31104
|
-
/* @__PURE__ */ (0,
|
|
31296
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31297
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31105
31298
|
"span",
|
|
31106
31299
|
{
|
|
31107
31300
|
onClick: () => onDownload && onDownload(
|
|
31108
31301
|
file?.data,
|
|
31109
31302
|
file?.name || file?.display_name || info?.name
|
|
31110
31303
|
),
|
|
31111
|
-
children: /* @__PURE__ */ (0,
|
|
31304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DownloadIcon, {})
|
|
31112
31305
|
}
|
|
31113
31306
|
),
|
|
31114
|
-
/* @__PURE__ */ (0,
|
|
31307
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DeleteIconDanger, {}) })
|
|
31115
31308
|
] })
|
|
31116
31309
|
] });
|
|
31117
31310
|
};
|
|
@@ -31133,10 +31326,10 @@ var FileUploadField = (props) => {
|
|
|
31133
31326
|
downloadFunction
|
|
31134
31327
|
} = props;
|
|
31135
31328
|
const { t: t3 } = useI18n();
|
|
31136
|
-
const fileInputRef = (0,
|
|
31137
|
-
const [selectedFiles, setSelectedFiles] = (0,
|
|
31138
|
-
const [uploadError, setUploadError] = (0,
|
|
31139
|
-
(0,
|
|
31329
|
+
const fileInputRef = (0, import_react58.useRef)(null);
|
|
31330
|
+
const [selectedFiles, setSelectedFiles] = (0, import_react58.useState)([]);
|
|
31331
|
+
const [uploadError, setUploadError] = (0, import_react58.useState)();
|
|
31332
|
+
(0, import_react58.useEffect)(() => {
|
|
31140
31333
|
if (selectedFiles?.length === 0 && value) {
|
|
31141
31334
|
setSelectedFiles([
|
|
31142
31335
|
{
|
|
@@ -31145,7 +31338,7 @@ var FileUploadField = (props) => {
|
|
|
31145
31338
|
]);
|
|
31146
31339
|
}
|
|
31147
31340
|
}, [value]);
|
|
31148
|
-
return /* @__PURE__ */ (0,
|
|
31341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31149
31342
|
Controller,
|
|
31150
31343
|
{
|
|
31151
31344
|
name: name2 || "",
|
|
@@ -31154,7 +31347,7 @@ var FileUploadField = (props) => {
|
|
|
31154
31347
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31155
31348
|
},
|
|
31156
31349
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31157
|
-
(0,
|
|
31350
|
+
(0, import_react58.useEffect)(() => {
|
|
31158
31351
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31159
31352
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31160
31353
|
data = data.split(",")[1];
|
|
@@ -31170,8 +31363,8 @@ var FileUploadField = (props) => {
|
|
|
31170
31363
|
);
|
|
31171
31364
|
}
|
|
31172
31365
|
}, [selectedFiles]);
|
|
31173
|
-
return /* @__PURE__ */ (0,
|
|
31174
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
31366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
31367
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31175
31368
|
RenderFile,
|
|
31176
31369
|
{
|
|
31177
31370
|
file: fileItem,
|
|
@@ -31186,8 +31379,8 @@ var FileUploadField = (props) => {
|
|
|
31186
31379
|
}
|
|
31187
31380
|
}
|
|
31188
31381
|
)),
|
|
31189
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31190
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
31382
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31383
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31191
31384
|
ButtonSelectFiles,
|
|
31192
31385
|
{
|
|
31193
31386
|
fileInputRef,
|
|
@@ -31202,7 +31395,7 @@ var FileUploadField = (props) => {
|
|
|
31202
31395
|
useUploadFile
|
|
31203
31396
|
}
|
|
31204
31397
|
),
|
|
31205
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31398
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31206
31399
|
] });
|
|
31207
31400
|
}
|
|
31208
31401
|
}
|
|
@@ -31210,8 +31403,8 @@ var FileUploadField = (props) => {
|
|
|
31210
31403
|
};
|
|
31211
31404
|
|
|
31212
31405
|
// src/widgets/basic/float-field/float.tsx
|
|
31213
|
-
var
|
|
31214
|
-
var
|
|
31406
|
+
var import_react59 = require("react");
|
|
31407
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31215
31408
|
var FloatField = (props) => {
|
|
31216
31409
|
const {
|
|
31217
31410
|
name: name2,
|
|
@@ -31229,9 +31422,9 @@ var FloatField = (props) => {
|
|
|
31229
31422
|
} = props;
|
|
31230
31423
|
const { t: t3 } = useI18n();
|
|
31231
31424
|
if (!isForm && !isEditTable) {
|
|
31232
|
-
return /* @__PURE__ */ (0,
|
|
31425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31233
31426
|
}
|
|
31234
|
-
return /* @__PURE__ */ (0,
|
|
31427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31235
31428
|
Controller,
|
|
31236
31429
|
{
|
|
31237
31430
|
name: name2 ?? "",
|
|
@@ -31242,12 +31435,12 @@ var FloatField = (props) => {
|
|
|
31242
31435
|
},
|
|
31243
31436
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31244
31437
|
const { setError, clearErrors } = methods;
|
|
31245
|
-
const [inputValue, setInputValue] = (0,
|
|
31438
|
+
const [inputValue, setInputValue] = (0, import_react59.useState)(
|
|
31246
31439
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31247
31440
|
);
|
|
31248
|
-
const isDirtyRef = (0,
|
|
31249
|
-
const lastCommittedValueRef = (0,
|
|
31250
|
-
(0,
|
|
31441
|
+
const isDirtyRef = (0, import_react59.useRef)(false);
|
|
31442
|
+
const lastCommittedValueRef = (0, import_react59.useRef)(null);
|
|
31443
|
+
(0, import_react59.useEffect)(() => {
|
|
31251
31444
|
if (isDirtyRef.current) return;
|
|
31252
31445
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31253
31446
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -31325,8 +31518,8 @@ var FloatField = (props) => {
|
|
|
31325
31518
|
}
|
|
31326
31519
|
isDirtyRef.current = false;
|
|
31327
31520
|
};
|
|
31328
|
-
return /* @__PURE__ */ (0,
|
|
31329
|
-
/* @__PURE__ */ (0,
|
|
31521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
31522
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31330
31523
|
"input",
|
|
31331
31524
|
{
|
|
31332
31525
|
value: inputValue,
|
|
@@ -31345,7 +31538,7 @@ var FloatField = (props) => {
|
|
|
31345
31538
|
`
|
|
31346
31539
|
}
|
|
31347
31540
|
),
|
|
31348
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31541
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31349
31542
|
] });
|
|
31350
31543
|
}
|
|
31351
31544
|
}
|
|
@@ -31353,8 +31546,8 @@ var FloatField = (props) => {
|
|
|
31353
31546
|
};
|
|
31354
31547
|
|
|
31355
31548
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31356
|
-
var
|
|
31357
|
-
var
|
|
31549
|
+
var import_react60 = require("react");
|
|
31550
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
31358
31551
|
var FloatTimeField = (props) => {
|
|
31359
31552
|
const {
|
|
31360
31553
|
name: name2,
|
|
@@ -31370,9 +31563,9 @@ var FloatTimeField = (props) => {
|
|
|
31370
31563
|
const { t: t3 } = useI18n();
|
|
31371
31564
|
if (!isForm) {
|
|
31372
31565
|
const formatValue = value ?? 0;
|
|
31373
|
-
return /* @__PURE__ */ (0,
|
|
31566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
31374
31567
|
}
|
|
31375
|
-
return /* @__PURE__ */ (0,
|
|
31568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
31376
31569
|
Controller,
|
|
31377
31570
|
{
|
|
31378
31571
|
name: name2 ?? "",
|
|
@@ -31385,11 +31578,11 @@ var FloatTimeField = (props) => {
|
|
|
31385
31578
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
31386
31579
|
fieldState: { error: error2, isDirty }
|
|
31387
31580
|
}) => {
|
|
31388
|
-
const [input, setInput] = (0,
|
|
31581
|
+
const [input, setInput] = (0, import_react60.useState)(
|
|
31389
31582
|
convertFloatToTime(value2 ?? defaultValue)
|
|
31390
31583
|
);
|
|
31391
|
-
const [formattedTime, setFormattedTime] = (0,
|
|
31392
|
-
const [errors, setErrors] = (0,
|
|
31584
|
+
const [formattedTime, setFormattedTime] = (0, import_react60.useState)("");
|
|
31585
|
+
const [errors, setErrors] = (0, import_react60.useState)("");
|
|
31393
31586
|
const handleInputChange = (e3) => {
|
|
31394
31587
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
31395
31588
|
setInput(raw);
|
|
@@ -31434,8 +31627,8 @@ var FloatTimeField = (props) => {
|
|
|
31434
31627
|
}
|
|
31435
31628
|
onBlur();
|
|
31436
31629
|
};
|
|
31437
|
-
return /* @__PURE__ */ (0,
|
|
31438
|
-
/* @__PURE__ */ (0,
|
|
31630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
31631
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
31439
31632
|
"input",
|
|
31440
31633
|
{
|
|
31441
31634
|
type: "text",
|
|
@@ -31467,7 +31660,7 @@ var FloatTimeField = (props) => {
|
|
|
31467
31660
|
readOnly: readonly
|
|
31468
31661
|
}
|
|
31469
31662
|
),
|
|
31470
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
31663
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31471
31664
|
] });
|
|
31472
31665
|
}
|
|
31473
31666
|
}
|
|
@@ -31475,8 +31668,8 @@ var FloatTimeField = (props) => {
|
|
|
31475
31668
|
};
|
|
31476
31669
|
|
|
31477
31670
|
// src/widgets/basic/html-field/html.tsx
|
|
31478
|
-
var
|
|
31479
|
-
var
|
|
31671
|
+
var import_react61 = require("react");
|
|
31672
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
31480
31673
|
var HtmlField = (props) => {
|
|
31481
31674
|
const {
|
|
31482
31675
|
name: name2,
|
|
@@ -31488,18 +31681,18 @@ var HtmlField = (props) => {
|
|
|
31488
31681
|
value,
|
|
31489
31682
|
isEditTable
|
|
31490
31683
|
} = props;
|
|
31491
|
-
const divRef = (0,
|
|
31684
|
+
const divRef = (0, import_react61.useRef)(null);
|
|
31492
31685
|
if (!isForm && !isEditTable) {
|
|
31493
|
-
return /* @__PURE__ */ (0,
|
|
31686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31494
31687
|
}
|
|
31495
|
-
return /* @__PURE__ */ (0,
|
|
31688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31496
31689
|
Controller,
|
|
31497
31690
|
{
|
|
31498
31691
|
name: name2 ?? "",
|
|
31499
31692
|
control: methods?.control,
|
|
31500
31693
|
defaultValue,
|
|
31501
31694
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
31502
|
-
(0,
|
|
31695
|
+
(0, import_react61.useEffect)(() => {
|
|
31503
31696
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
31504
31697
|
divRef.current.innerHTML = value2 || "";
|
|
31505
31698
|
}
|
|
@@ -31511,7 +31704,7 @@ var HtmlField = (props) => {
|
|
|
31511
31704
|
onChange2(newValue, "");
|
|
31512
31705
|
}
|
|
31513
31706
|
};
|
|
31514
|
-
return /* @__PURE__ */ (0,
|
|
31707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31515
31708
|
"div",
|
|
31516
31709
|
{
|
|
31517
31710
|
ref: divRef,
|
|
@@ -31530,28 +31723,28 @@ var HtmlField = (props) => {
|
|
|
31530
31723
|
};
|
|
31531
31724
|
|
|
31532
31725
|
// src/widgets/basic/image-field/image.tsx
|
|
31533
|
-
var
|
|
31726
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
31534
31727
|
var ImageField = (props) => {
|
|
31535
31728
|
const { value, type, name: name2, baseURL } = props;
|
|
31536
31729
|
if (!value) return null;
|
|
31537
31730
|
if (type === "url") {
|
|
31538
|
-
return /* @__PURE__ */ (0,
|
|
31731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31539
31732
|
}
|
|
31540
|
-
return /* @__PURE__ */ (0,
|
|
31733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31541
31734
|
};
|
|
31542
31735
|
|
|
31543
31736
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31544
|
-
var
|
|
31737
|
+
var import_react62 = __toESM(require("react"));
|
|
31545
31738
|
|
|
31546
31739
|
// src/widgets/basic/information-field/information.tsx
|
|
31547
|
-
var
|
|
31740
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
31548
31741
|
var InfomationField = (props) => {
|
|
31549
31742
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31550
31743
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31551
|
-
return /* @__PURE__ */ (0,
|
|
31744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_jsx_runtime96.Fragment, {});
|
|
31552
31745
|
}
|
|
31553
31746
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31554
|
-
return /* @__PURE__ */ (0,
|
|
31747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
31555
31748
|
AvatarField,
|
|
31556
31749
|
{
|
|
31557
31750
|
id: item.id,
|
|
@@ -31560,8 +31753,8 @@ var InfomationField = (props) => {
|
|
|
31560
31753
|
stringToColor
|
|
31561
31754
|
},
|
|
31562
31755
|
item.id
|
|
31563
|
-
)) : /* @__PURE__ */ (0,
|
|
31564
|
-
/* @__PURE__ */ (0,
|
|
31756
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31757
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
31565
31758
|
AvatarField,
|
|
31566
31759
|
{
|
|
31567
31760
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31571,12 +31764,12 @@ var InfomationField = (props) => {
|
|
|
31571
31764
|
stringToColor
|
|
31572
31765
|
}
|
|
31573
31766
|
),
|
|
31574
|
-
showName && /* @__PURE__ */ (0,
|
|
31767
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31575
31768
|
] }) });
|
|
31576
31769
|
};
|
|
31577
31770
|
|
|
31578
31771
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31579
|
-
var
|
|
31772
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
31580
31773
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31581
31774
|
const { selectProps, data, menuList } = props;
|
|
31582
31775
|
const { relation } = selectProps;
|
|
@@ -31585,8 +31778,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31585
31778
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31586
31779
|
)
|
|
31587
31780
|
)?.[0]?.action?.id;
|
|
31588
|
-
return /* @__PURE__ */ (0,
|
|
31589
|
-
/* @__PURE__ */ (0,
|
|
31781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31782
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31590
31783
|
AvatarField,
|
|
31591
31784
|
{
|
|
31592
31785
|
id: data?.id,
|
|
@@ -31598,8 +31791,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31598
31791
|
stringToColor
|
|
31599
31792
|
}
|
|
31600
31793
|
),
|
|
31601
|
-
/* @__PURE__ */ (0,
|
|
31602
|
-
/* @__PURE__ */ (0,
|
|
31794
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31795
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31603
31796
|
"span",
|
|
31604
31797
|
{
|
|
31605
31798
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31607,7 +31800,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31607
31800
|
e3.stopPropagation();
|
|
31608
31801
|
props.removeProps.onClick();
|
|
31609
31802
|
},
|
|
31610
|
-
children: /* @__PURE__ */ (0,
|
|
31803
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CloseIcon, {})
|
|
31611
31804
|
}
|
|
31612
31805
|
)
|
|
31613
31806
|
] });
|
|
@@ -31616,10 +31809,10 @@ var CustomMenuList = (props) => {
|
|
|
31616
31809
|
const { options: options2, children, selectProps } = props;
|
|
31617
31810
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31618
31811
|
const { t: t3 } = useI18n();
|
|
31619
|
-
const limitedChildren =
|
|
31620
|
-
return /* @__PURE__ */ (0,
|
|
31812
|
+
const limitedChildren = import_react62.default.Children.toArray(children).slice(0, 10);
|
|
31813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31621
31814
|
limitedChildren,
|
|
31622
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
31815
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
31623
31816
|
"button",
|
|
31624
31817
|
{
|
|
31625
31818
|
type: "button",
|
|
@@ -31664,7 +31857,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31664
31857
|
value: item.id,
|
|
31665
31858
|
label: item.name ?? item.display_name
|
|
31666
31859
|
})) : [];
|
|
31667
|
-
return /* @__PURE__ */ (0,
|
|
31860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31668
31861
|
InfomationField,
|
|
31669
31862
|
{
|
|
31670
31863
|
value: optionValue || null,
|
|
@@ -31673,7 +31866,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31673
31866
|
}
|
|
31674
31867
|
);
|
|
31675
31868
|
}
|
|
31676
|
-
return /* @__PURE__ */ (0,
|
|
31869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31677
31870
|
Controller,
|
|
31678
31871
|
{
|
|
31679
31872
|
name: name2 ?? "",
|
|
@@ -31683,12 +31876,12 @@ var Many2ManyTagField = (props) => {
|
|
|
31683
31876
|
},
|
|
31684
31877
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31685
31878
|
const { clearErrors } = methods;
|
|
31686
|
-
(0,
|
|
31879
|
+
(0, import_react62.useEffect)(() => {
|
|
31687
31880
|
if (field.value) {
|
|
31688
31881
|
clearErrors(name2);
|
|
31689
31882
|
}
|
|
31690
31883
|
}, [field.value]);
|
|
31691
|
-
const filteredValue = (0,
|
|
31884
|
+
const filteredValue = (0, import_react62.useMemo)(() => {
|
|
31692
31885
|
if (!Array.isArray(field?.value)) return null;
|
|
31693
31886
|
const fieldValueMapped = field.value.map((v) => ({
|
|
31694
31887
|
value: v?.id,
|
|
@@ -31709,8 +31902,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31709
31902
|
onChange2?.(name2 ?? "", newValue);
|
|
31710
31903
|
clearErrors(name2);
|
|
31711
31904
|
};
|
|
31712
|
-
return /* @__PURE__ */ (0,
|
|
31713
|
-
/* @__PURE__ */ (0,
|
|
31905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
31906
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31714
31907
|
StateManagedSelect$1,
|
|
31715
31908
|
{
|
|
31716
31909
|
options: options2,
|
|
@@ -31789,7 +31982,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31789
31982
|
})
|
|
31790
31983
|
},
|
|
31791
31984
|
components: isUser ? {
|
|
31792
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
31985
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31793
31986
|
CustomMultiValue,
|
|
31794
31987
|
{
|
|
31795
31988
|
...multiValueProps,
|
|
@@ -31798,7 +31991,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31798
31991
|
),
|
|
31799
31992
|
IndicatorSeparator: () => null
|
|
31800
31993
|
} : {
|
|
31801
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
31994
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31802
31995
|
CustomMenuList,
|
|
31803
31996
|
{
|
|
31804
31997
|
...menuListProps,
|
|
@@ -31809,13 +32002,13 @@ var Many2ManyTagField = (props) => {
|
|
|
31809
32002
|
}
|
|
31810
32003
|
),
|
|
31811
32004
|
IndicatorSeparator: () => null,
|
|
31812
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
31813
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32005
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32006
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.ClearIndicator, { ...props2 })
|
|
31814
32007
|
},
|
|
31815
32008
|
required: !invisible && required
|
|
31816
32009
|
}
|
|
31817
32010
|
),
|
|
31818
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32011
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31819
32012
|
] });
|
|
31820
32013
|
}
|
|
31821
32014
|
}
|
|
@@ -31823,8 +32016,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31823
32016
|
};
|
|
31824
32017
|
|
|
31825
32018
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
31826
|
-
var
|
|
31827
|
-
var
|
|
32019
|
+
var import_react63 = require("react");
|
|
32020
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
31828
32021
|
var MonetaryField = (props) => {
|
|
31829
32022
|
const { t: t3 } = useI18n();
|
|
31830
32023
|
const {
|
|
@@ -31845,26 +32038,26 @@ var MonetaryField = (props) => {
|
|
|
31845
32038
|
symbol = "VND"
|
|
31846
32039
|
} = props;
|
|
31847
32040
|
if (isForm && name2 === "amount_residual") {
|
|
31848
|
-
return /* @__PURE__ */ (0,
|
|
31849
|
-
/* @__PURE__ */ (0,
|
|
32041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32042
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "font-semibold", children: [
|
|
31850
32043
|
string,
|
|
31851
32044
|
":"
|
|
31852
32045
|
] }),
|
|
31853
|
-
/* @__PURE__ */ (0,
|
|
32046
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} ${symbol}` })
|
|
31854
32047
|
] });
|
|
31855
32048
|
}
|
|
31856
32049
|
if (!isForm) {
|
|
31857
32050
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
31858
32051
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
31859
|
-
return /* @__PURE__ */ (0,
|
|
32052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
31860
32053
|
parseFloat(String(value ?? defaultValue))
|
|
31861
32054
|
)} ${symbol}` });
|
|
31862
32055
|
}
|
|
31863
|
-
return /* @__PURE__ */ (0,
|
|
32056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
31864
32057
|
parseFloat(value ?? defaultValue)
|
|
31865
32058
|
)} ${currencySymbol}` });
|
|
31866
32059
|
}
|
|
31867
|
-
return /* @__PURE__ */ (0,
|
|
32060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
31868
32061
|
Controller,
|
|
31869
32062
|
{
|
|
31870
32063
|
name: name2 ?? "",
|
|
@@ -31878,13 +32071,13 @@ var MonetaryField = (props) => {
|
|
|
31878
32071
|
fieldState: { error: error2 }
|
|
31879
32072
|
}) => {
|
|
31880
32073
|
const { setError, clearErrors } = methods;
|
|
31881
|
-
(0,
|
|
32074
|
+
(0, import_react63.useEffect)(() => {
|
|
31882
32075
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
31883
32076
|
clearErrors(name2);
|
|
31884
32077
|
}
|
|
31885
32078
|
}, [value2]);
|
|
31886
|
-
return /* @__PURE__ */ (0,
|
|
31887
|
-
/* @__PURE__ */ (0,
|
|
32079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
32080
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
31888
32081
|
"input",
|
|
31889
32082
|
{
|
|
31890
32083
|
value: formatNumberOnly(value2),
|
|
@@ -31922,7 +32115,7 @@ var MonetaryField = (props) => {
|
|
|
31922
32115
|
`
|
|
31923
32116
|
}
|
|
31924
32117
|
),
|
|
31925
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32118
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31926
32119
|
] });
|
|
31927
32120
|
}
|
|
31928
32121
|
}
|
|
@@ -31930,14 +32123,14 @@ var MonetaryField = (props) => {
|
|
|
31930
32123
|
};
|
|
31931
32124
|
|
|
31932
32125
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
31933
|
-
var
|
|
32126
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
31934
32127
|
var PaidBadgedField = () => {
|
|
31935
|
-
return /* @__PURE__ */ (0,
|
|
32128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PaidIcon, {}) });
|
|
31936
32129
|
};
|
|
31937
32130
|
|
|
31938
32131
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
31939
|
-
var
|
|
31940
|
-
var
|
|
32132
|
+
var import_react64 = __toESM(require("react"));
|
|
32133
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
31941
32134
|
var RatingStarField = (props) => {
|
|
31942
32135
|
const {
|
|
31943
32136
|
label,
|
|
@@ -31946,9 +32139,9 @@ var RatingStarField = (props) => {
|
|
|
31946
32139
|
onSelectPriority,
|
|
31947
32140
|
id
|
|
31948
32141
|
} = props;
|
|
31949
|
-
const [rating, setRating] = (0,
|
|
31950
|
-
const [hover, setHover] = (0,
|
|
31951
|
-
(0,
|
|
32142
|
+
const [rating, setRating] = (0, import_react64.useState)(defaultValue);
|
|
32143
|
+
const [hover, setHover] = (0, import_react64.useState)(0);
|
|
32144
|
+
(0, import_react64.useEffect)(() => {
|
|
31952
32145
|
setRating(defaultValue);
|
|
31953
32146
|
}, [defaultValue]);
|
|
31954
32147
|
const handleClick = (value) => {
|
|
@@ -31972,7 +32165,7 @@ var RatingStarField = (props) => {
|
|
|
31972
32165
|
setHover(0);
|
|
31973
32166
|
setRating(0);
|
|
31974
32167
|
};
|
|
31975
|
-
return /* @__PURE__ */ (0,
|
|
32168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31976
32169
|
"div",
|
|
31977
32170
|
{
|
|
31978
32171
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -31982,17 +32175,17 @@ var RatingStarField = (props) => {
|
|
|
31982
32175
|
const starValue = index4 + 1;
|
|
31983
32176
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
31984
32177
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
31985
|
-
return /* @__PURE__ */ (0,
|
|
31986
|
-
/* @__PURE__ */ (0,
|
|
32178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react64.default.Fragment, { children: [
|
|
32179
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31987
32180
|
"div",
|
|
31988
32181
|
{
|
|
31989
32182
|
onMouseEnter: () => handleHover(starValue),
|
|
31990
32183
|
onClick: () => handleClick(starValue),
|
|
31991
32184
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
31992
|
-
children: /* @__PURE__ */ (0,
|
|
32185
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
31993
32186
|
}
|
|
31994
32187
|
),
|
|
31995
|
-
/* @__PURE__ */ (0,
|
|
32188
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31996
32189
|
M,
|
|
31997
32190
|
{
|
|
31998
32191
|
className: "z-50",
|
|
@@ -32008,7 +32201,7 @@ var RatingStarField = (props) => {
|
|
|
32008
32201
|
};
|
|
32009
32202
|
|
|
32010
32203
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32011
|
-
var
|
|
32204
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32012
32205
|
var PriorityField = (props) => {
|
|
32013
32206
|
const {
|
|
32014
32207
|
isForm,
|
|
@@ -32024,7 +32217,7 @@ var PriorityField = (props) => {
|
|
|
32024
32217
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32025
32218
|
const defaultPriority = parseInt(value) + 1;
|
|
32026
32219
|
if (!isForm) {
|
|
32027
|
-
return /* @__PURE__ */ (0,
|
|
32220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32028
32221
|
RatingStarField,
|
|
32029
32222
|
{
|
|
32030
32223
|
label,
|
|
@@ -32035,7 +32228,7 @@ var PriorityField = (props) => {
|
|
|
32035
32228
|
}
|
|
32036
32229
|
);
|
|
32037
32230
|
}
|
|
32038
|
-
return /* @__PURE__ */ (0,
|
|
32231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32039
32232
|
Controller,
|
|
32040
32233
|
{
|
|
32041
32234
|
name: name ?? "",
|
|
@@ -32045,7 +32238,7 @@ var PriorityField = (props) => {
|
|
|
32045
32238
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32046
32239
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32047
32240
|
};
|
|
32048
|
-
return /* @__PURE__ */ (0,
|
|
32241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32049
32242
|
RatingStarField,
|
|
32050
32243
|
{
|
|
32051
32244
|
label,
|
|
@@ -32061,8 +32254,8 @@ var PriorityField = (props) => {
|
|
|
32061
32254
|
};
|
|
32062
32255
|
|
|
32063
32256
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32064
|
-
var
|
|
32065
|
-
var
|
|
32257
|
+
var import_react65 = require("react");
|
|
32258
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32066
32259
|
var RadioGroupField = (props) => {
|
|
32067
32260
|
const {
|
|
32068
32261
|
name: name2,
|
|
@@ -32075,19 +32268,19 @@ var RadioGroupField = (props) => {
|
|
|
32075
32268
|
onChange: onChange2,
|
|
32076
32269
|
setValue
|
|
32077
32270
|
} = props;
|
|
32078
|
-
(0,
|
|
32271
|
+
(0, import_react65.useEffect)(() => {
|
|
32079
32272
|
if (selection?.length > 0) {
|
|
32080
32273
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32081
32274
|
}
|
|
32082
32275
|
}, [selection, name2, setValue]);
|
|
32083
32276
|
if (!methods) return null;
|
|
32084
|
-
return /* @__PURE__ */ (0,
|
|
32277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32085
32278
|
Controller,
|
|
32086
32279
|
{
|
|
32087
32280
|
name: name2 ?? "",
|
|
32088
32281
|
control: methods.control,
|
|
32089
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32090
|
-
/* @__PURE__ */ (0,
|
|
32282
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
32283
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32091
32284
|
"input",
|
|
32092
32285
|
{
|
|
32093
32286
|
type: "radio",
|
|
@@ -32106,7 +32299,7 @@ var RadioGroupField = (props) => {
|
|
|
32106
32299
|
className: "custom-radio"
|
|
32107
32300
|
}
|
|
32108
32301
|
),
|
|
32109
|
-
/* @__PURE__ */ (0,
|
|
32302
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32110
32303
|
] }, select[0])) })
|
|
32111
32304
|
}
|
|
32112
32305
|
);
|
|
@@ -32114,7 +32307,7 @@ var RadioGroupField = (props) => {
|
|
|
32114
32307
|
|
|
32115
32308
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32116
32309
|
var import_moment3 = __toESM(require_moment());
|
|
32117
|
-
var
|
|
32310
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32118
32311
|
var RemainingDaysField = (props) => {
|
|
32119
32312
|
const {
|
|
32120
32313
|
value,
|
|
@@ -32125,14 +32318,14 @@ var RemainingDaysField = (props) => {
|
|
|
32125
32318
|
if (!value) return null;
|
|
32126
32319
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32127
32320
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32128
|
-
return /* @__PURE__ */ (0,
|
|
32129
|
-
/* @__PURE__ */ (0,
|
|
32130
|
-
/* @__PURE__ */ (0,
|
|
32321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
32322
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32323
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32131
32324
|
"div",
|
|
32132
32325
|
{
|
|
32133
32326
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32134
32327
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32135
|
-
children: /* @__PURE__ */ (0,
|
|
32328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32136
32329
|
"div",
|
|
32137
32330
|
{
|
|
32138
32331
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32145,7 +32338,7 @@ var RemainingDaysField = (props) => {
|
|
|
32145
32338
|
};
|
|
32146
32339
|
|
|
32147
32340
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32148
|
-
var
|
|
32341
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32149
32342
|
var SelectDropdownField = (props) => {
|
|
32150
32343
|
const { t: t3 } = useI18n();
|
|
32151
32344
|
const {
|
|
@@ -32167,9 +32360,9 @@ var SelectDropdownField = (props) => {
|
|
|
32167
32360
|
label: val[1]
|
|
32168
32361
|
})) : [];
|
|
32169
32362
|
if (!isForm && !isEditTable) {
|
|
32170
|
-
return /* @__PURE__ */ (0,
|
|
32363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32171
32364
|
} else {
|
|
32172
|
-
return /* @__PURE__ */ (0,
|
|
32365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32173
32366
|
Controller,
|
|
32174
32367
|
{
|
|
32175
32368
|
name: name2 || "",
|
|
@@ -32196,8 +32389,8 @@ var SelectDropdownField = (props) => {
|
|
|
32196
32389
|
value: defaultValue || null,
|
|
32197
32390
|
required: !invisible && required
|
|
32198
32391
|
};
|
|
32199
|
-
return /* @__PURE__ */ (0,
|
|
32200
|
-
/* @__PURE__ */ (0,
|
|
32392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
32393
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32201
32394
|
StateManagedSelect$1,
|
|
32202
32395
|
{
|
|
32203
32396
|
...commonProps,
|
|
@@ -32254,12 +32447,12 @@ var SelectDropdownField = (props) => {
|
|
|
32254
32447
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32255
32448
|
components: {
|
|
32256
32449
|
IndicatorSeparator: () => null,
|
|
32257
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
32450
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(components.DropdownIndicator, { ...props2 })
|
|
32258
32451
|
},
|
|
32259
32452
|
noOptionsMessage: () => t3("no-available")
|
|
32260
32453
|
}
|
|
32261
32454
|
) }),
|
|
32262
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32455
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32263
32456
|
] });
|
|
32264
32457
|
}
|
|
32265
32458
|
}
|
|
@@ -32268,7 +32461,7 @@ var SelectDropdownField = (props) => {
|
|
|
32268
32461
|
};
|
|
32269
32462
|
|
|
32270
32463
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32271
|
-
var
|
|
32464
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
32272
32465
|
var TextAreaField = (props) => {
|
|
32273
32466
|
const {
|
|
32274
32467
|
methods,
|
|
@@ -32292,9 +32485,9 @@ var TextAreaField = (props) => {
|
|
|
32292
32485
|
}
|
|
32293
32486
|
}) : {};
|
|
32294
32487
|
if (!isForm) {
|
|
32295
|
-
return /* @__PURE__ */ (0,
|
|
32488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32296
32489
|
}
|
|
32297
|
-
return /* @__PURE__ */ (0,
|
|
32490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
32298
32491
|
"textarea",
|
|
32299
32492
|
{
|
|
32300
32493
|
...formProps,
|
|
@@ -32310,7 +32503,7 @@ var TextAreaField = (props) => {
|
|
|
32310
32503
|
};
|
|
32311
32504
|
|
|
32312
32505
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32313
|
-
var
|
|
32506
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
32314
32507
|
var ToggleButtonField = (props) => {
|
|
32315
32508
|
const {
|
|
32316
32509
|
name: name2,
|
|
@@ -32320,13 +32513,13 @@ var ToggleButtonField = (props) => {
|
|
|
32320
32513
|
onChange: onChange2,
|
|
32321
32514
|
methods
|
|
32322
32515
|
} = props;
|
|
32323
|
-
return /* @__PURE__ */ (0,
|
|
32516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32324
32517
|
Controller,
|
|
32325
32518
|
{
|
|
32326
32519
|
name: name2 ?? "",
|
|
32327
32520
|
control: methods?.control,
|
|
32328
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32329
|
-
/* @__PURE__ */ (0,
|
|
32521
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32522
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32330
32523
|
"input",
|
|
32331
32524
|
{
|
|
32332
32525
|
...field,
|
|
@@ -32345,7 +32538,7 @@ var ToggleButtonField = (props) => {
|
|
|
32345
32538
|
checked: field.value ?? false
|
|
32346
32539
|
}
|
|
32347
32540
|
),
|
|
32348
|
-
/* @__PURE__ */ (0,
|
|
32541
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32349
32542
|
"span",
|
|
32350
32543
|
{
|
|
32351
32544
|
style: {
|
|
@@ -32355,7 +32548,7 @@ var ToggleButtonField = (props) => {
|
|
|
32355
32548
|
},
|
|
32356
32549
|
className: `rounded-full transition duration-300
|
|
32357
32550
|
`,
|
|
32358
|
-
children: /* @__PURE__ */ (0,
|
|
32551
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32359
32552
|
"span",
|
|
32360
32553
|
{
|
|
32361
32554
|
style: {
|
|
@@ -32379,8 +32572,8 @@ var ToggleButtonField = (props) => {
|
|
|
32379
32572
|
};
|
|
32380
32573
|
|
|
32381
32574
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32382
|
-
var
|
|
32383
|
-
var
|
|
32575
|
+
var import_react66 = require("react");
|
|
32576
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
32384
32577
|
var IntegerField = (props) => {
|
|
32385
32578
|
const {
|
|
32386
32579
|
name: name2,
|
|
@@ -32399,9 +32592,9 @@ var IntegerField = (props) => {
|
|
|
32399
32592
|
const { t: t3 } = useI18n();
|
|
32400
32593
|
if (!isForm && !isEditTable) {
|
|
32401
32594
|
const displayValue = value ?? defaultValue;
|
|
32402
|
-
return /* @__PURE__ */ (0,
|
|
32595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32403
32596
|
}
|
|
32404
|
-
return /* @__PURE__ */ (0,
|
|
32597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32405
32598
|
Controller,
|
|
32406
32599
|
{
|
|
32407
32600
|
name: name2 || "",
|
|
@@ -32415,13 +32608,13 @@ var IntegerField = (props) => {
|
|
|
32415
32608
|
fieldState: { error: error2 }
|
|
32416
32609
|
}) => {
|
|
32417
32610
|
const { setError, clearErrors } = methods;
|
|
32418
|
-
const isDirtyRef = (0,
|
|
32419
|
-
const inputRef = (0,
|
|
32420
|
-
const lastCommittedValueRef = (0,
|
|
32421
|
-
const [inputValue, setInputValue] = (0,
|
|
32611
|
+
const isDirtyRef = (0, import_react66.useRef)(false);
|
|
32612
|
+
const inputRef = (0, import_react66.useRef)(null);
|
|
32613
|
+
const lastCommittedValueRef = (0, import_react66.useRef)(null);
|
|
32614
|
+
const [inputValue, setInputValue] = (0, import_react66.useState)(
|
|
32422
32615
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
32423
32616
|
);
|
|
32424
|
-
(0,
|
|
32617
|
+
(0, import_react66.useEffect)(() => {
|
|
32425
32618
|
if (value2 !== void 0 && value2 !== null) {
|
|
32426
32619
|
setInputValue(String(value2));
|
|
32427
32620
|
clearErrors(name2);
|
|
@@ -32479,8 +32672,8 @@ var IntegerField = (props) => {
|
|
|
32479
32672
|
inputRef.current?.blur();
|
|
32480
32673
|
clearErrors(name2);
|
|
32481
32674
|
};
|
|
32482
|
-
return /* @__PURE__ */ (0,
|
|
32483
|
-
/* @__PURE__ */ (0,
|
|
32675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
32676
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32484
32677
|
"input",
|
|
32485
32678
|
{
|
|
32486
32679
|
ref: inputRef,
|
|
@@ -32515,7 +32708,7 @@ var IntegerField = (props) => {
|
|
|
32515
32708
|
`
|
|
32516
32709
|
}
|
|
32517
32710
|
),
|
|
32518
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32711
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32519
32712
|
] });
|
|
32520
32713
|
}
|
|
32521
32714
|
}
|
|
@@ -32523,7 +32716,7 @@ var IntegerField = (props) => {
|
|
|
32523
32716
|
};
|
|
32524
32717
|
|
|
32525
32718
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32526
|
-
var
|
|
32719
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
32527
32720
|
var StatusDropdownField = (props) => {
|
|
32528
32721
|
const {
|
|
32529
32722
|
buttonRef,
|
|
@@ -32535,13 +32728,13 @@ var StatusDropdownField = (props) => {
|
|
|
32535
32728
|
handleClick,
|
|
32536
32729
|
colors: colors2
|
|
32537
32730
|
} = props;
|
|
32538
|
-
return /* @__PURE__ */ (0,
|
|
32731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
32539
32732
|
"div",
|
|
32540
32733
|
{
|
|
32541
32734
|
ref: buttonRef,
|
|
32542
32735
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32543
32736
|
children: [
|
|
32544
|
-
/* @__PURE__ */ (0,
|
|
32737
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
32545
32738
|
"button",
|
|
32546
32739
|
{
|
|
32547
32740
|
type: "button",
|
|
@@ -32549,23 +32742,23 @@ var StatusDropdownField = (props) => {
|
|
|
32549
32742
|
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"}`
|
|
32550
32743
|
}
|
|
32551
32744
|
),
|
|
32552
|
-
isOpen && /* @__PURE__ */ (0,
|
|
32745
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
32553
32746
|
const isActive = item[0] == state;
|
|
32554
|
-
return /* @__PURE__ */ (0,
|
|
32747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
32555
32748
|
"div",
|
|
32556
32749
|
{
|
|
32557
32750
|
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" : ""}`,
|
|
32558
32751
|
onClick: () => handleClick(item[0]),
|
|
32559
32752
|
children: [
|
|
32560
|
-
/* @__PURE__ */ (0,
|
|
32561
|
-
/* @__PURE__ */ (0,
|
|
32562
|
-
/* @__PURE__ */ (0,
|
|
32753
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CheckIcon, {}) }),
|
|
32754
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
32755
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
32563
32756
|
"div",
|
|
32564
32757
|
{
|
|
32565
32758
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32566
32759
|
}
|
|
32567
32760
|
),
|
|
32568
|
-
/* @__PURE__ */ (0,
|
|
32761
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-sm", children: item[1] })
|
|
32569
32762
|
] })
|
|
32570
32763
|
]
|
|
32571
32764
|
},
|
|
@@ -32579,8 +32772,8 @@ var StatusDropdownField = (props) => {
|
|
|
32579
32772
|
|
|
32580
32773
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32581
32774
|
var import_react_dom8 = require("react-dom");
|
|
32582
|
-
var
|
|
32583
|
-
var
|
|
32775
|
+
var import_react67 = require("react");
|
|
32776
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
32584
32777
|
var Many2ManyField = (props) => {
|
|
32585
32778
|
const { t: t3 } = useI18n();
|
|
32586
32779
|
const {
|
|
@@ -32639,7 +32832,7 @@ var Many2ManyField = (props) => {
|
|
|
32639
32832
|
clearSearch
|
|
32640
32833
|
} = searchController;
|
|
32641
32834
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
32642
|
-
(0,
|
|
32835
|
+
(0, import_react67.useEffect)(() => {
|
|
32643
32836
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
32644
32837
|
if (groupItems?.length > 0) {
|
|
32645
32838
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -32654,7 +32847,7 @@ var Many2ManyField = (props) => {
|
|
|
32654
32847
|
};
|
|
32655
32848
|
}, [selectedTags]);
|
|
32656
32849
|
return (0, import_react_dom8.createPortal)(
|
|
32657
|
-
/* @__PURE__ */ (0,
|
|
32850
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
32658
32851
|
"div",
|
|
32659
32852
|
{
|
|
32660
32853
|
style: {
|
|
@@ -32662,8 +32855,8 @@ var Many2ManyField = (props) => {
|
|
|
32662
32855
|
},
|
|
32663
32856
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32664
32857
|
children: [
|
|
32665
|
-
/* @__PURE__ */ (0,
|
|
32666
|
-
/* @__PURE__ */ (0,
|
|
32858
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32859
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
32667
32860
|
"div",
|
|
32668
32861
|
{
|
|
32669
32862
|
style: {
|
|
@@ -32671,12 +32864,12 @@ var Many2ManyField = (props) => {
|
|
|
32671
32864
|
},
|
|
32672
32865
|
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",
|
|
32673
32866
|
children: [
|
|
32674
|
-
/* @__PURE__ */ (0,
|
|
32675
|
-
/* @__PURE__ */ (0,
|
|
32676
|
-
/* @__PURE__ */ (0,
|
|
32867
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
32868
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32869
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(CloseIcon, {}) })
|
|
32677
32870
|
] }),
|
|
32678
|
-
/* @__PURE__ */ (0,
|
|
32679
|
-
/* @__PURE__ */ (0,
|
|
32871
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32872
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32680
32873
|
Search,
|
|
32681
32874
|
{
|
|
32682
32875
|
removeSearchItems,
|
|
@@ -32710,7 +32903,7 @@ var Many2ManyField = (props) => {
|
|
|
32710
32903
|
groupByList
|
|
32711
32904
|
}
|
|
32712
32905
|
) }),
|
|
32713
|
-
/* @__PURE__ */ (0,
|
|
32906
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32714
32907
|
PaginationView,
|
|
32715
32908
|
{
|
|
32716
32909
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -32727,20 +32920,20 @@ var Many2ManyField = (props) => {
|
|
|
32727
32920
|
}
|
|
32728
32921
|
)
|
|
32729
32922
|
] }),
|
|
32730
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
32923
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32731
32924
|
"div",
|
|
32732
32925
|
{
|
|
32733
32926
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32734
|
-
children: /* @__PURE__ */ (0,
|
|
32927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32735
32928
|
"div",
|
|
32736
32929
|
{
|
|
32737
32930
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32738
|
-
children: /* @__PURE__ */ (0,
|
|
32931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
32739
32932
|
"table",
|
|
32740
32933
|
{
|
|
32741
32934
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32742
32935
|
children: [
|
|
32743
|
-
/* @__PURE__ */ (0,
|
|
32936
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32744
32937
|
TableHead,
|
|
32745
32938
|
{
|
|
32746
32939
|
columns,
|
|
@@ -32750,7 +32943,7 @@ var Many2ManyField = (props) => {
|
|
|
32750
32943
|
handleCheckBoxAll
|
|
32751
32944
|
}
|
|
32752
32945
|
),
|
|
32753
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
32946
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32754
32947
|
TableBody,
|
|
32755
32948
|
{
|
|
32756
32949
|
tableGroupController,
|
|
@@ -32790,16 +32983,16 @@ var Many2ManyField = (props) => {
|
|
|
32790
32983
|
checkedAll,
|
|
32791
32984
|
context
|
|
32792
32985
|
}
|
|
32793
|
-
) : /* @__PURE__ */ (0,
|
|
32986
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32794
32987
|
"td",
|
|
32795
32988
|
{
|
|
32796
32989
|
className: "w-full",
|
|
32797
32990
|
colSpan: columns?.length + 2,
|
|
32798
|
-
children: /* @__PURE__ */ (0,
|
|
32991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32799
32992
|
"div",
|
|
32800
32993
|
{
|
|
32801
32994
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
32802
|
-
children: /* @__PURE__ */ (0,
|
|
32995
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(EmptyTable, {})
|
|
32803
32996
|
}
|
|
32804
32997
|
)
|
|
32805
32998
|
}
|
|
@@ -32810,9 +33003,9 @@ var Many2ManyField = (props) => {
|
|
|
32810
33003
|
}
|
|
32811
33004
|
) }) })
|
|
32812
33005
|
}
|
|
32813
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
32814
|
-
/* @__PURE__ */ (0,
|
|
32815
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33006
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(LayerLoading, {}),
|
|
33007
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33008
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32816
33009
|
"button",
|
|
32817
33010
|
{
|
|
32818
33011
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -32822,7 +33015,7 @@ var Many2ManyField = (props) => {
|
|
|
32822
33015
|
children: t3("choose")
|
|
32823
33016
|
}
|
|
32824
33017
|
),
|
|
32825
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33018
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32826
33019
|
"button",
|
|
32827
33020
|
{
|
|
32828
33021
|
type: "button",
|
|
@@ -32838,7 +33031,7 @@ var Many2ManyField = (props) => {
|
|
|
32838
33031
|
children: t3("new")
|
|
32839
33032
|
}
|
|
32840
33033
|
),
|
|
32841
|
-
/* @__PURE__ */ (0,
|
|
33034
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32842
33035
|
"button",
|
|
32843
33036
|
{
|
|
32844
33037
|
type: "button",
|
|
@@ -32859,16 +33052,16 @@ var Many2ManyField = (props) => {
|
|
|
32859
33052
|
};
|
|
32860
33053
|
|
|
32861
33054
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
32862
|
-
var
|
|
32863
|
-
var
|
|
33055
|
+
var import_react68 = __toESM(require("react"));
|
|
33056
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
32864
33057
|
var CustomMenuList2 = (props) => {
|
|
32865
33058
|
const { t: t3 } = useI18n();
|
|
32866
33059
|
const { options: options2, children, selectProps } = props;
|
|
32867
33060
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32868
|
-
const limitedChildren =
|
|
32869
|
-
return /* @__PURE__ */ (0,
|
|
33061
|
+
const limitedChildren = import_react68.default.Children.toArray(children).slice(0, 10);
|
|
33062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32870
33063
|
limitedChildren,
|
|
32871
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33064
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
32872
33065
|
"button",
|
|
32873
33066
|
{
|
|
32874
33067
|
type: "button",
|
|
@@ -32911,14 +33104,14 @@ var Many2OneField = (props) => {
|
|
|
32911
33104
|
const { t: t3 } = useI18n();
|
|
32912
33105
|
if (!isForm && !isEditTable) {
|
|
32913
33106
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
32914
|
-
return /* @__PURE__ */ (0,
|
|
33107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
32915
33108
|
allowShowDetail && renderDetail({
|
|
32916
33109
|
idToolTip: String(name2) + Number(index4),
|
|
32917
33110
|
model: options2?.model ?? relation,
|
|
32918
33111
|
context: contextObject,
|
|
32919
33112
|
idForm: id
|
|
32920
33113
|
}),
|
|
32921
|
-
/* @__PURE__ */ (0,
|
|
33114
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32922
33115
|
"span",
|
|
32923
33116
|
{
|
|
32924
33117
|
className: "cursor-pointer",
|
|
@@ -32929,20 +33122,20 @@ var Many2OneField = (props) => {
|
|
|
32929
33122
|
)
|
|
32930
33123
|
] });
|
|
32931
33124
|
}
|
|
32932
|
-
return /* @__PURE__ */ (0,
|
|
33125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
32933
33126
|
allowShowDetail && renderDetail({
|
|
32934
33127
|
idToolTip: String(name2),
|
|
32935
33128
|
model: options2?.model ?? relation,
|
|
32936
33129
|
context: contextObject,
|
|
32937
33130
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
32938
33131
|
}),
|
|
32939
|
-
/* @__PURE__ */ (0,
|
|
33132
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32940
33133
|
"div",
|
|
32941
33134
|
{
|
|
32942
33135
|
id: name2,
|
|
32943
33136
|
"data-tooltip-id": name2,
|
|
32944
33137
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
32945
|
-
children: /* @__PURE__ */ (0,
|
|
33138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32946
33139
|
Controller,
|
|
32947
33140
|
{
|
|
32948
33141
|
name: name2 ?? "",
|
|
@@ -32962,13 +33155,13 @@ var Many2OneField = (props) => {
|
|
|
32962
33155
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
32963
33156
|
(option) => option.value === tempSelectedOption?.value
|
|
32964
33157
|
) : currentValue ? currentValue : null;
|
|
32965
|
-
(0,
|
|
33158
|
+
(0, import_react68.useEffect)(() => {
|
|
32966
33159
|
if (error2 && selectedOption) {
|
|
32967
33160
|
methods?.clearErrors(name2);
|
|
32968
33161
|
}
|
|
32969
33162
|
}, [selectedOption]);
|
|
32970
|
-
return /* @__PURE__ */ (0,
|
|
32971
|
-
/* @__PURE__ */ (0,
|
|
33163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "h-full", children: [
|
|
33164
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32972
33165
|
StateManagedSelect$1,
|
|
32973
33166
|
{
|
|
32974
33167
|
menuShouldScrollIntoView: false,
|
|
@@ -33045,7 +33238,7 @@ var Many2OneField = (props) => {
|
|
|
33045
33238
|
})
|
|
33046
33239
|
},
|
|
33047
33240
|
components: {
|
|
33048
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33241
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33049
33242
|
CustomMenuList2,
|
|
33050
33243
|
{
|
|
33051
33244
|
...menuListProps,
|
|
@@ -33056,13 +33249,13 @@ var Many2OneField = (props) => {
|
|
|
33056
33249
|
}
|
|
33057
33250
|
),
|
|
33058
33251
|
IndicatorSeparator: () => null,
|
|
33059
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
33252
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33060
33253
|
},
|
|
33061
33254
|
isDisabled: readonly,
|
|
33062
33255
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33063
33256
|
}
|
|
33064
33257
|
),
|
|
33065
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33258
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33066
33259
|
] });
|
|
33067
33260
|
}
|
|
33068
33261
|
}
|
|
@@ -33073,7 +33266,7 @@ var Many2OneField = (props) => {
|
|
|
33073
33266
|
};
|
|
33074
33267
|
|
|
33075
33268
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33076
|
-
var
|
|
33269
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
33077
33270
|
var StatusbarDurationField = (props) => {
|
|
33078
33271
|
const {
|
|
33079
33272
|
disabled,
|
|
@@ -33083,14 +33276,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33083
33276
|
defaultValue,
|
|
33084
33277
|
setModalStatus
|
|
33085
33278
|
} = props;
|
|
33086
|
-
return /* @__PURE__ */ (0,
|
|
33279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33087
33280
|
"div",
|
|
33088
33281
|
{
|
|
33089
33282
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33090
|
-
children: /* @__PURE__ */ (0,
|
|
33091
|
-
/* @__PURE__ */ (0,
|
|
33283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
33284
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33092
33285
|
const value = option?.id === defaultValue;
|
|
33093
|
-
return /* @__PURE__ */ (0,
|
|
33286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33094
33287
|
"label",
|
|
33095
33288
|
{
|
|
33096
33289
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33100,7 +33293,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33100
33293
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33101
33294
|
`,
|
|
33102
33295
|
children: [
|
|
33103
|
-
/* @__PURE__ */ (0,
|
|
33296
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33104
33297
|
"input",
|
|
33105
33298
|
{
|
|
33106
33299
|
type: "radio",
|
|
@@ -33110,7 +33303,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33110
33303
|
}
|
|
33111
33304
|
),
|
|
33112
33305
|
option?.name,
|
|
33113
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
33306
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33114
33307
|
"div",
|
|
33115
33308
|
{
|
|
33116
33309
|
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]
|
|
@@ -33125,14 +33318,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33125
33318
|
}) }),
|
|
33126
33319
|
dataResponse?.records?.some(
|
|
33127
33320
|
(item) => item?.fold && item.id !== defaultValue
|
|
33128
|
-
) && /* @__PURE__ */ (0,
|
|
33321
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33129
33322
|
"div",
|
|
33130
33323
|
{
|
|
33131
33324
|
onClick: () => setModalStatus(!modelStatus),
|
|
33132
33325
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33133
33326
|
children: [
|
|
33134
|
-
/* @__PURE__ */ (0,
|
|
33135
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
33327
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(MoreIcon, {}),
|
|
33328
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33136
33329
|
"div",
|
|
33137
33330
|
{
|
|
33138
33331
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33141,7 +33334,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33141
33334
|
(item) => item?.fold && item.id !== defaultValue
|
|
33142
33335
|
)?.map((option) => {
|
|
33143
33336
|
const value = option?.id === defaultValue;
|
|
33144
|
-
return /* @__PURE__ */ (0,
|
|
33337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33145
33338
|
"div",
|
|
33146
33339
|
{
|
|
33147
33340
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33162,15 +33355,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33162
33355
|
};
|
|
33163
33356
|
|
|
33164
33357
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33165
|
-
var
|
|
33166
|
-
var
|
|
33358
|
+
var import_react69 = require("react");
|
|
33359
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
33167
33360
|
var StatusBarOptionField = (props) => {
|
|
33168
33361
|
const { selection, defaultValue } = props;
|
|
33169
|
-
const memoizedStatusOptions = (0,
|
|
33362
|
+
const memoizedStatusOptions = (0, import_react69.useMemo)(() => selection, [selection]);
|
|
33170
33363
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33171
33364
|
(option) => option?.[0] === defaultValue
|
|
33172
33365
|
);
|
|
33173
|
-
return /* @__PURE__ */ (0,
|
|
33366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33174
33367
|
"div",
|
|
33175
33368
|
{
|
|
33176
33369
|
style: {
|
|
@@ -33179,8 +33372,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33179
33372
|
flexWrap: "wrap"
|
|
33180
33373
|
},
|
|
33181
33374
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33182
|
-
return /* @__PURE__ */ (0,
|
|
33183
|
-
/* @__PURE__ */ (0,
|
|
33375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
33376
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
33184
33377
|
"div",
|
|
33185
33378
|
{
|
|
33186
33379
|
style: {
|
|
@@ -33198,7 +33391,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33198
33391
|
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" : ""
|
|
33199
33392
|
},
|
|
33200
33393
|
children: [
|
|
33201
|
-
/* @__PURE__ */ (0,
|
|
33394
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33202
33395
|
"span",
|
|
33203
33396
|
{
|
|
33204
33397
|
style: {
|
|
@@ -33210,10 +33403,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33210
33403
|
alignItems: "center",
|
|
33211
33404
|
borderRadius: "100%"
|
|
33212
33405
|
},
|
|
33213
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
33406
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ICMinus, {})
|
|
33214
33407
|
}
|
|
33215
33408
|
),
|
|
33216
|
-
/* @__PURE__ */ (0,
|
|
33409
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33217
33410
|
"span",
|
|
33218
33411
|
{
|
|
33219
33412
|
style: {
|
|
@@ -33226,7 +33419,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33226
33419
|
},
|
|
33227
33420
|
option?.[0]
|
|
33228
33421
|
),
|
|
33229
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
33422
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33230
33423
|
"div",
|
|
33231
33424
|
{
|
|
33232
33425
|
style: {
|
|
@@ -33242,7 +33435,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33242
33435
|
);
|
|
33243
33436
|
};
|
|
33244
33437
|
var ICMinus = () => {
|
|
33245
|
-
return /* @__PURE__ */ (0,
|
|
33438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33246
33439
|
"svg",
|
|
33247
33440
|
{
|
|
33248
33441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33250,7 +33443,7 @@ var ICMinus = () => {
|
|
|
33250
33443
|
height: "16",
|
|
33251
33444
|
viewBox: "0 0 16 16",
|
|
33252
33445
|
fill: "none",
|
|
33253
|
-
children: /* @__PURE__ */ (0,
|
|
33446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33254
33447
|
"path",
|
|
33255
33448
|
{
|
|
33256
33449
|
d: "M4 8H12",
|
|
@@ -33264,7 +33457,7 @@ var ICMinus = () => {
|
|
|
33264
33457
|
);
|
|
33265
33458
|
};
|
|
33266
33459
|
var ICCircle = () => {
|
|
33267
|
-
return /* @__PURE__ */ (0,
|
|
33460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33268
33461
|
"svg",
|
|
33269
33462
|
{
|
|
33270
33463
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33272,12 +33465,12 @@ var ICCircle = () => {
|
|
|
33272
33465
|
height: "8",
|
|
33273
33466
|
viewBox: "0 0 8 8",
|
|
33274
33467
|
fill: "none",
|
|
33275
|
-
children: /* @__PURE__ */ (0,
|
|
33468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33276
33469
|
}
|
|
33277
33470
|
);
|
|
33278
33471
|
};
|
|
33279
33472
|
var ICCheck = () => {
|
|
33280
|
-
return /* @__PURE__ */ (0,
|
|
33473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33281
33474
|
"svg",
|
|
33282
33475
|
{
|
|
33283
33476
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33285,7 +33478,7 @@ var ICCheck = () => {
|
|
|
33285
33478
|
height: "16",
|
|
33286
33479
|
viewBox: "0 0 16 16",
|
|
33287
33480
|
fill: "none",
|
|
33288
|
-
children: /* @__PURE__ */ (0,
|
|
33481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33289
33482
|
"path",
|
|
33290
33483
|
{
|
|
33291
33484
|
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",
|
|
@@ -33299,7 +33492,7 @@ var ICCheck = () => {
|
|
|
33299
33492
|
};
|
|
33300
33493
|
|
|
33301
33494
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33302
|
-
var
|
|
33495
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
33303
33496
|
var DateOptionField = (props) => {
|
|
33304
33497
|
const {
|
|
33305
33498
|
name: name2,
|
|
@@ -33310,19 +33503,19 @@ var DateOptionField = (props) => {
|
|
|
33310
33503
|
string,
|
|
33311
33504
|
onChange: onChange2
|
|
33312
33505
|
} = props;
|
|
33313
|
-
return /* @__PURE__ */ (0,
|
|
33506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
33314
33507
|
Controller,
|
|
33315
33508
|
{
|
|
33316
33509
|
name: name2 ?? "",
|
|
33317
33510
|
control: methods?.control,
|
|
33318
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33511
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
33319
33512
|
"label",
|
|
33320
33513
|
{
|
|
33321
33514
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33322
33515
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33323
33516
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33324
33517
|
children: [
|
|
33325
|
-
/* @__PURE__ */ (0,
|
|
33518
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
33326
33519
|
"input",
|
|
33327
33520
|
{
|
|
33328
33521
|
type: "checkbox",
|
|
@@ -33392,6 +33585,7 @@ var DateOptionField = (props) => {
|
|
|
33392
33585
|
RemainingDaysField,
|
|
33393
33586
|
Row,
|
|
33394
33587
|
Search,
|
|
33588
|
+
SecureField,
|
|
33395
33589
|
SelectDropdownField,
|
|
33396
33590
|
StatusBarOptionField,
|
|
33397
33591
|
StatusDropdownField,
|