@fctc/sme-widget-ui 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +933 -687
- package/dist/index.mjs +852 -607
- package/dist/widgets.d.mts +4 -1
- package/dist/widgets.d.ts +4 -1
- package/dist/widgets.js +933 -687
- package/dist/widgets.mjs +852 -607
- 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,
|
|
@@ -16612,8 +16613,251 @@ var CharField = (props) => {
|
|
|
16612
16613
|
);
|
|
16613
16614
|
};
|
|
16614
16615
|
|
|
16615
|
-
// src/widgets/basic/
|
|
16616
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16617
|
+
var import_react41 = require("react");
|
|
16618
|
+
|
|
16619
|
+
// src/icons/eye-hidden-icon.tsx
|
|
16616
16620
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
16621
|
+
var EyeHiddenIcon = () => {
|
|
16622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
16623
|
+
"svg",
|
|
16624
|
+
{
|
|
16625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16626
|
+
width: "16",
|
|
16627
|
+
height: "16",
|
|
16628
|
+
viewBox: "0 0 16 16",
|
|
16629
|
+
fill: "none",
|
|
16630
|
+
children: [
|
|
16631
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16632
|
+
"path",
|
|
16633
|
+
{
|
|
16634
|
+
d: "M9.68661 6.31328L6.31328 9.68661C5.87995 9.25328 5.61328 8.65995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C8.65995 5.61328 9.25328 5.87995 9.68661 6.31328Z",
|
|
16635
|
+
stroke: "#576071",
|
|
16636
|
+
strokeWidth: "1.5",
|
|
16637
|
+
strokeLinecap: "round",
|
|
16638
|
+
strokeLinejoin: "round"
|
|
16639
|
+
}
|
|
16640
|
+
),
|
|
16641
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16642
|
+
"path",
|
|
16643
|
+
{
|
|
16644
|
+
d: "M11.8799 3.8473C10.7132 2.9673 9.3799 2.4873 7.9999 2.4873C5.64656 2.4873 3.45323 3.87397 1.92656 6.27397C1.32656 7.21397 1.32656 8.79397 1.92656 9.73397C2.45323 10.5606 3.06656 11.274 3.73323 11.8473",
|
|
16645
|
+
stroke: "#576071",
|
|
16646
|
+
strokeWidth: "1.5",
|
|
16647
|
+
strokeLinecap: "round",
|
|
16648
|
+
strokeLinejoin: "round"
|
|
16649
|
+
}
|
|
16650
|
+
),
|
|
16651
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16652
|
+
"path",
|
|
16653
|
+
{
|
|
16654
|
+
d: "M5.61328 13.0195C6.37328 13.3395 7.17995 13.5128 7.99995 13.5128C10.3533 13.5128 12.5466 12.1261 14.0733 9.72613C14.6733 8.78613 14.6733 7.20613 14.0733 6.26613C13.8533 5.91947 13.6133 5.5928 13.3666 5.28613",
|
|
16655
|
+
stroke: "#576071",
|
|
16656
|
+
strokeWidth: "1.5",
|
|
16657
|
+
strokeLinecap: "round",
|
|
16658
|
+
strokeLinejoin: "round"
|
|
16659
|
+
}
|
|
16660
|
+
),
|
|
16661
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16662
|
+
"path",
|
|
16663
|
+
{
|
|
16664
|
+
d: "M10.3409 8.4668C10.1676 9.4068 9.40094 10.1735 8.46094 10.3468",
|
|
16665
|
+
stroke: "#576071",
|
|
16666
|
+
strokeWidth: "1.5",
|
|
16667
|
+
strokeLinecap: "round",
|
|
16668
|
+
strokeLinejoin: "round"
|
|
16669
|
+
}
|
|
16670
|
+
),
|
|
16671
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16672
|
+
"path",
|
|
16673
|
+
{
|
|
16674
|
+
d: "M6.31203 9.68652L1.33203 14.6665",
|
|
16675
|
+
stroke: "#576071",
|
|
16676
|
+
strokeWidth: "1.5",
|
|
16677
|
+
strokeLinecap: "round",
|
|
16678
|
+
strokeLinejoin: "round"
|
|
16679
|
+
}
|
|
16680
|
+
),
|
|
16681
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16682
|
+
"path",
|
|
16683
|
+
{
|
|
16684
|
+
d: "M14.6675 1.33301L9.6875 6.31301",
|
|
16685
|
+
stroke: "#576071",
|
|
16686
|
+
strokeWidth: "1.5",
|
|
16687
|
+
strokeLinecap: "round",
|
|
16688
|
+
strokeLinejoin: "round"
|
|
16689
|
+
}
|
|
16690
|
+
)
|
|
16691
|
+
]
|
|
16692
|
+
}
|
|
16693
|
+
);
|
|
16694
|
+
};
|
|
16695
|
+
|
|
16696
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
16697
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
16698
|
+
function isSensitive(widget) {
|
|
16699
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
16700
|
+
}
|
|
16701
|
+
function EyeIconComponent({ open }) {
|
|
16702
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeHiddenIcon, {});
|
|
16703
|
+
}
|
|
16704
|
+
var SecureField = (props) => {
|
|
16705
|
+
const {
|
|
16706
|
+
name: name2,
|
|
16707
|
+
readonly,
|
|
16708
|
+
placeholder,
|
|
16709
|
+
required,
|
|
16710
|
+
invisible,
|
|
16711
|
+
methods,
|
|
16712
|
+
onChange: onChange2,
|
|
16713
|
+
string = name2,
|
|
16714
|
+
widget,
|
|
16715
|
+
min: min3,
|
|
16716
|
+
max: max3,
|
|
16717
|
+
special,
|
|
16718
|
+
upcase,
|
|
16719
|
+
digit,
|
|
16720
|
+
regex,
|
|
16721
|
+
className,
|
|
16722
|
+
value,
|
|
16723
|
+
defaultValue,
|
|
16724
|
+
isForm,
|
|
16725
|
+
isEditTable
|
|
16726
|
+
} = props;
|
|
16727
|
+
const { t: t3 } = useI18n();
|
|
16728
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
16729
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
16730
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
16731
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
16732
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
16733
|
+
return message2;
|
|
16734
|
+
};
|
|
16735
|
+
if (!isForm && !isEditTable) {
|
|
16736
|
+
const propValue = value || defaultValue;
|
|
16737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
16738
|
+
}
|
|
16739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16740
|
+
Controller,
|
|
16741
|
+
{
|
|
16742
|
+
name: String(name2),
|
|
16743
|
+
control: methods.control,
|
|
16744
|
+
rules: {
|
|
16745
|
+
...required && !invisible ? {
|
|
16746
|
+
required: {
|
|
16747
|
+
value: true,
|
|
16748
|
+
message: `${string} ${t3("must_required")}`
|
|
16749
|
+
}
|
|
16750
|
+
} : {},
|
|
16751
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
16752
|
+
pattern: {
|
|
16753
|
+
value: new RegExp(regex),
|
|
16754
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
16755
|
+
}
|
|
16756
|
+
} : {}
|
|
16757
|
+
},
|
|
16758
|
+
render: ({
|
|
16759
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
16760
|
+
fieldState: { error: error2 }
|
|
16761
|
+
}) => {
|
|
16762
|
+
const { setError, clearErrors } = methods;
|
|
16763
|
+
const [showPlain, setShowPlain] = (0, import_react41.useState)(false);
|
|
16764
|
+
const realValue = (0, import_react41.useMemo)(
|
|
16765
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
16766
|
+
[value2]
|
|
16767
|
+
);
|
|
16768
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
16769
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
16770
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
16771
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
16772
|
+
(0, import_react41.useEffect)(() => {
|
|
16773
|
+
if (canToggle) setShowPlain(false);
|
|
16774
|
+
}, [canToggle]);
|
|
16775
|
+
(0, import_react41.useEffect)(() => {
|
|
16776
|
+
if (value2) clearErrors(name2);
|
|
16777
|
+
}, [value2, clearErrors, name2]);
|
|
16778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
16779
|
+
isCappedToken && shouldMask && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16780
|
+
"div",
|
|
16781
|
+
{
|
|
16782
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
16783
|
+
"aria-hidden": "true",
|
|
16784
|
+
children: maskedDisplay
|
|
16785
|
+
}
|
|
16786
|
+
),
|
|
16787
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16788
|
+
"input",
|
|
16789
|
+
{
|
|
16790
|
+
value: realValue,
|
|
16791
|
+
onChange: (e3) => {
|
|
16792
|
+
if (readonly) return;
|
|
16793
|
+
const inputValue = e3.target.value ?? "";
|
|
16794
|
+
fieldOnchange(inputValue);
|
|
16795
|
+
clearErrors(name2);
|
|
16796
|
+
},
|
|
16797
|
+
onBlur: (e3) => {
|
|
16798
|
+
if (readonly) return;
|
|
16799
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
16800
|
+
if (!inputValue && required && !invisible) {
|
|
16801
|
+
setError(name2, {
|
|
16802
|
+
type: "required",
|
|
16803
|
+
message: `${string} ${t3("must_required")}`
|
|
16804
|
+
});
|
|
16805
|
+
return;
|
|
16806
|
+
}
|
|
16807
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
16808
|
+
setError(name2, {
|
|
16809
|
+
type: "pattern",
|
|
16810
|
+
message: getPasswordMessage2(
|
|
16811
|
+
min3,
|
|
16812
|
+
max3,
|
|
16813
|
+
upcase,
|
|
16814
|
+
digit,
|
|
16815
|
+
special
|
|
16816
|
+
)
|
|
16817
|
+
});
|
|
16818
|
+
return;
|
|
16819
|
+
}
|
|
16820
|
+
fieldOnchange(inputValue);
|
|
16821
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
16822
|
+
clearErrors(name2);
|
|
16823
|
+
},
|
|
16824
|
+
readOnly: readonly,
|
|
16825
|
+
disabled: readonly,
|
|
16826
|
+
placeholder,
|
|
16827
|
+
required: !invisible && required,
|
|
16828
|
+
style: {
|
|
16829
|
+
...isCappedToken && shouldMask ? {
|
|
16830
|
+
WebkitTextSecurity: "none",
|
|
16831
|
+
color: "transparent",
|
|
16832
|
+
caretColor: void 0
|
|
16833
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
16834
|
+
},
|
|
16835
|
+
onCopy: (e3) => {
|
|
16836
|
+
if (shouldMask) e3.preventDefault();
|
|
16837
|
+
},
|
|
16838
|
+
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
|
|
16839
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
16840
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
16841
|
+
}
|
|
16842
|
+
),
|
|
16843
|
+
canToggle && !isCappedToken && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16844
|
+
"button",
|
|
16845
|
+
{
|
|
16846
|
+
type: "button",
|
|
16847
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
16848
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
16849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EyeIconComponent, { open: showPlain })
|
|
16850
|
+
}
|
|
16851
|
+
),
|
|
16852
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16853
|
+
] });
|
|
16854
|
+
}
|
|
16855
|
+
}
|
|
16856
|
+
);
|
|
16857
|
+
};
|
|
16858
|
+
|
|
16859
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16860
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
16617
16861
|
var CheckboxField = (props) => {
|
|
16618
16862
|
const {
|
|
16619
16863
|
name: name2,
|
|
@@ -16628,9 +16872,9 @@ var CheckboxField = (props) => {
|
|
|
16628
16872
|
} = props;
|
|
16629
16873
|
if (!isForm) {
|
|
16630
16874
|
if (name2 === "is_active" || name2 === "active") {
|
|
16631
|
-
return /* @__PURE__ */ (0,
|
|
16875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ActiveBadgeField, { type: value });
|
|
16632
16876
|
} else {
|
|
16633
|
-
return /* @__PURE__ */ (0,
|
|
16877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16634
16878
|
"input",
|
|
16635
16879
|
{
|
|
16636
16880
|
type: "checkbox",
|
|
@@ -16641,12 +16885,12 @@ var CheckboxField = (props) => {
|
|
|
16641
16885
|
);
|
|
16642
16886
|
}
|
|
16643
16887
|
}
|
|
16644
|
-
return /* @__PURE__ */ (0,
|
|
16888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16645
16889
|
Controller,
|
|
16646
16890
|
{
|
|
16647
16891
|
name: name2 ?? "",
|
|
16648
16892
|
control: methods?.control,
|
|
16649
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
16893
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16650
16894
|
"div",
|
|
16651
16895
|
{
|
|
16652
16896
|
className: "flex items-center gap-2",
|
|
@@ -16659,7 +16903,7 @@ var CheckboxField = (props) => {
|
|
|
16659
16903
|
onChange2(name2 ?? "", checked);
|
|
16660
16904
|
}
|
|
16661
16905
|
},
|
|
16662
|
-
children: /* @__PURE__ */ (0,
|
|
16906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16663
16907
|
"input",
|
|
16664
16908
|
{
|
|
16665
16909
|
...field,
|
|
@@ -16686,21 +16930,21 @@ var CheckboxField = (props) => {
|
|
|
16686
16930
|
};
|
|
16687
16931
|
|
|
16688
16932
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16689
|
-
var
|
|
16690
|
-
var
|
|
16933
|
+
var import_react42 = require("react");
|
|
16934
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
16691
16935
|
var ColorWrapper = (props) => {
|
|
16692
16936
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
16693
16937
|
const { t: t3 } = useI18n();
|
|
16694
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
16695
|
-
const [showFullColors, setIsShowFullColor] = (0,
|
|
16696
|
-
const pickColorsRef = (0,
|
|
16697
|
-
(0,
|
|
16938
|
+
const [selectedColor, setSelectedColor] = (0, import_react42.useState)(colors2[defaultColor]);
|
|
16939
|
+
const [showFullColors, setIsShowFullColor] = (0, import_react42.useState)(false);
|
|
16940
|
+
const pickColorsRef = (0, import_react42.useRef)(null);
|
|
16941
|
+
(0, import_react42.useEffect)(() => {
|
|
16698
16942
|
setSelectedColor(colors2[defaultColor]);
|
|
16699
16943
|
}, [defaultColor]);
|
|
16700
16944
|
const handleShowFullColors = () => {
|
|
16701
16945
|
setIsShowFullColor(!showFullColors);
|
|
16702
16946
|
};
|
|
16703
|
-
(0,
|
|
16947
|
+
(0, import_react42.useEffect)(() => {
|
|
16704
16948
|
const handleClickOutside = (event) => {
|
|
16705
16949
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
16706
16950
|
setIsShowFullColor(false);
|
|
@@ -16711,8 +16955,8 @@ var ColorWrapper = (props) => {
|
|
|
16711
16955
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16712
16956
|
};
|
|
16713
16957
|
}, []);
|
|
16714
|
-
return /* @__PURE__ */ (0,
|
|
16715
|
-
/* @__PURE__ */ (0,
|
|
16958
|
+
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: [
|
|
16959
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16716
16960
|
"button",
|
|
16717
16961
|
{
|
|
16718
16962
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16726,7 +16970,7 @@ var ColorWrapper = (props) => {
|
|
|
16726
16970
|
}
|
|
16727
16971
|
}
|
|
16728
16972
|
),
|
|
16729
|
-
/* @__PURE__ */ (0,
|
|
16973
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16730
16974
|
M,
|
|
16731
16975
|
{
|
|
16732
16976
|
className: "",
|
|
@@ -16735,8 +16979,8 @@ var ColorWrapper = (props) => {
|
|
|
16735
16979
|
content: t3(color?.name)
|
|
16736
16980
|
}
|
|
16737
16981
|
)
|
|
16738
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
16739
|
-
/* @__PURE__ */ (0,
|
|
16982
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
16983
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16740
16984
|
"button",
|
|
16741
16985
|
{
|
|
16742
16986
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16749,7 +16993,7 @@ var ColorWrapper = (props) => {
|
|
|
16749
16993
|
style: { backgroundColor: selectedColor?.color }
|
|
16750
16994
|
}
|
|
16751
16995
|
),
|
|
16752
|
-
/* @__PURE__ */ (0,
|
|
16996
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16753
16997
|
M,
|
|
16754
16998
|
{
|
|
16755
16999
|
place: "top",
|
|
@@ -16761,13 +17005,13 @@ var ColorWrapper = (props) => {
|
|
|
16761
17005
|
};
|
|
16762
17006
|
|
|
16763
17007
|
// src/widgets/basic/color-field/color.tsx
|
|
16764
|
-
var
|
|
17008
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
16765
17009
|
var ColorField = (props) => {
|
|
16766
17010
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16767
17011
|
if (!isForm) {
|
|
16768
|
-
return /* @__PURE__ */ (0,
|
|
17012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16769
17013
|
}
|
|
16770
|
-
return /* @__PURE__ */ (0,
|
|
17014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16771
17015
|
Controller,
|
|
16772
17016
|
{
|
|
16773
17017
|
name: name2 ?? "",
|
|
@@ -16777,7 +17021,7 @@ var ColorField = (props) => {
|
|
|
16777
17021
|
field.onChange(color?.id);
|
|
16778
17022
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
16779
17023
|
};
|
|
16780
|
-
return /* @__PURE__ */ (0,
|
|
17024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16781
17025
|
ColorWrapper,
|
|
16782
17026
|
{
|
|
16783
17027
|
savePickColor: handlePickColorChange,
|
|
@@ -16791,8 +17035,8 @@ var ColorField = (props) => {
|
|
|
16791
17035
|
};
|
|
16792
17036
|
|
|
16793
17037
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
16794
|
-
var
|
|
16795
|
-
var
|
|
17038
|
+
var import_react43 = require("react");
|
|
17039
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
16796
17040
|
var CopyLinkButtonField = (props) => {
|
|
16797
17041
|
const {
|
|
16798
17042
|
isForm,
|
|
@@ -16811,9 +17055,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
16811
17055
|
} = props;
|
|
16812
17056
|
const { t: t3 } = useI18n();
|
|
16813
17057
|
if (!isForm) {
|
|
16814
|
-
return /* @__PURE__ */ (0,
|
|
17058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16815
17059
|
}
|
|
16816
|
-
return /* @__PURE__ */ (0,
|
|
17060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16817
17061
|
Controller,
|
|
16818
17062
|
{
|
|
16819
17063
|
name: name2 ?? "",
|
|
@@ -16826,13 +17070,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
16826
17070
|
fieldState: { error: error2 }
|
|
16827
17071
|
}) => {
|
|
16828
17072
|
const { setError, clearErrors } = methods;
|
|
16829
|
-
(0,
|
|
17073
|
+
(0, import_react43.useEffect)(() => {
|
|
16830
17074
|
if (value) {
|
|
16831
17075
|
clearErrors(name2);
|
|
16832
17076
|
}
|
|
16833
17077
|
}, [value]);
|
|
16834
|
-
return /* @__PURE__ */ (0,
|
|
16835
|
-
/* @__PURE__ */ (0,
|
|
17078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "relative", children: [
|
|
17079
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
16836
17080
|
"div",
|
|
16837
17081
|
{
|
|
16838
17082
|
"aria-disabled": readonly,
|
|
@@ -16841,7 +17085,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
16841
17085
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16842
17086
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
16843
17087
|
children: [
|
|
16844
|
-
/* @__PURE__ */ (0,
|
|
17088
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16845
17089
|
"input",
|
|
16846
17090
|
{
|
|
16847
17091
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -16882,19 +17126,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
16882
17126
|
`
|
|
16883
17127
|
}
|
|
16884
17128
|
),
|
|
16885
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17129
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
16886
17130
|
"button",
|
|
16887
17131
|
{
|
|
16888
17132
|
className: "cursor-pointer",
|
|
16889
17133
|
type: "button",
|
|
16890
17134
|
onClick: () => handleCopyToClipboard(propValue),
|
|
16891
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17135
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, {})
|
|
16892
17136
|
}
|
|
16893
17137
|
)
|
|
16894
17138
|
]
|
|
16895
17139
|
}
|
|
16896
17140
|
),
|
|
16897
|
-
error2 && /* @__PURE__ */ (0,
|
|
17141
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16898
17142
|
] });
|
|
16899
17143
|
}
|
|
16900
17144
|
}
|
|
@@ -16902,10 +17146,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
16902
17146
|
};
|
|
16903
17147
|
|
|
16904
17148
|
// src/widgets/basic/date-field/date.tsx
|
|
16905
|
-
var
|
|
17149
|
+
var import_react56 = require("react");
|
|
16906
17150
|
|
|
16907
17151
|
// node_modules/react-datepicker/dist/index.es.js
|
|
16908
|
-
var
|
|
17152
|
+
var import_react46 = __toESM(require("react"));
|
|
16909
17153
|
|
|
16910
17154
|
// node_modules/date-fns/constants.js
|
|
16911
17155
|
var daysInYear = 365.2425;
|
|
@@ -20803,22 +21047,22 @@ function subYears(date, amount, options2) {
|
|
|
20803
21047
|
}
|
|
20804
21048
|
|
|
20805
21049
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20806
|
-
var
|
|
21050
|
+
var React9 = __toESM(require("react"), 1);
|
|
20807
21051
|
|
|
20808
21052
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
20809
|
-
var
|
|
20810
|
-
var
|
|
21053
|
+
var React7 = __toESM(require("react"), 1);
|
|
21054
|
+
var import_react44 = require("react");
|
|
20811
21055
|
var isClient = typeof document !== "undefined";
|
|
20812
21056
|
var noop2 = function noop3() {
|
|
20813
21057
|
};
|
|
20814
|
-
var index = isClient ?
|
|
21058
|
+
var index = isClient ? import_react44.useLayoutEffect : noop2;
|
|
20815
21059
|
var SafeReact = {
|
|
20816
|
-
...
|
|
21060
|
+
...React7
|
|
20817
21061
|
};
|
|
20818
21062
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
20819
21063
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
20820
21064
|
function useEffectEvent(callback) {
|
|
20821
|
-
const ref =
|
|
21065
|
+
const ref = React7.useRef(() => {
|
|
20822
21066
|
if (process.env.NODE_ENV !== "production") {
|
|
20823
21067
|
throw new Error("Cannot call an event handler while rendering.");
|
|
20824
21068
|
}
|
|
@@ -20826,7 +21070,7 @@ function useEffectEvent(callback) {
|
|
|
20826
21070
|
useSafeInsertionEffect(() => {
|
|
20827
21071
|
ref.current = callback;
|
|
20828
21072
|
});
|
|
20829
|
-
return
|
|
21073
|
+
return React7.useCallback(function() {
|
|
20830
21074
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20831
21075
|
args[_key] = arguments[_key];
|
|
20832
21076
|
}
|
|
@@ -20835,17 +21079,17 @@ function useEffectEvent(callback) {
|
|
|
20835
21079
|
}
|
|
20836
21080
|
|
|
20837
21081
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20838
|
-
var
|
|
21082
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
20839
21083
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
20840
21084
|
|
|
20841
21085
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
20842
|
-
var
|
|
20843
|
-
var
|
|
21086
|
+
var React8 = __toESM(require("react"), 1);
|
|
21087
|
+
var import_react45 = require("react");
|
|
20844
21088
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
20845
21089
|
var isClient2 = typeof document !== "undefined";
|
|
20846
21090
|
var noop4 = function noop5() {
|
|
20847
21091
|
};
|
|
20848
|
-
var index2 = isClient2 ?
|
|
21092
|
+
var index2 = isClient2 ? import_react45.useLayoutEffect : noop4;
|
|
20849
21093
|
function deepEqual2(a2, b2) {
|
|
20850
21094
|
if (a2 === b2) {
|
|
20851
21095
|
return true;
|
|
@@ -20905,7 +21149,7 @@ function roundByDPR(element, value) {
|
|
|
20905
21149
|
return Math.round(value * dpr) / dpr;
|
|
20906
21150
|
}
|
|
20907
21151
|
function useLatestRef(value) {
|
|
20908
|
-
const ref =
|
|
21152
|
+
const ref = React8.useRef(value);
|
|
20909
21153
|
index2(() => {
|
|
20910
21154
|
ref.current = value;
|
|
20911
21155
|
});
|
|
@@ -20928,7 +21172,7 @@ function useFloating(options2) {
|
|
|
20928
21172
|
whileElementsMounted,
|
|
20929
21173
|
open
|
|
20930
21174
|
} = options2;
|
|
20931
|
-
const [data, setData] =
|
|
21175
|
+
const [data, setData] = React8.useState({
|
|
20932
21176
|
x: 0,
|
|
20933
21177
|
y: 0,
|
|
20934
21178
|
strategy,
|
|
@@ -20936,19 +21180,19 @@ function useFloating(options2) {
|
|
|
20936
21180
|
middlewareData: {},
|
|
20937
21181
|
isPositioned: false
|
|
20938
21182
|
});
|
|
20939
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21183
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
20940
21184
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
20941
21185
|
setLatestMiddleware(middleware2);
|
|
20942
21186
|
}
|
|
20943
|
-
const [_reference, _setReference] =
|
|
20944
|
-
const [_floating, _setFloating] =
|
|
20945
|
-
const setReference =
|
|
21187
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21188
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21189
|
+
const setReference = React8.useCallback((node2) => {
|
|
20946
21190
|
if (node2 !== referenceRef.current) {
|
|
20947
21191
|
referenceRef.current = node2;
|
|
20948
21192
|
_setReference(node2);
|
|
20949
21193
|
}
|
|
20950
21194
|
}, []);
|
|
20951
|
-
const setFloating =
|
|
21195
|
+
const setFloating = React8.useCallback((node2) => {
|
|
20952
21196
|
if (node2 !== floatingRef.current) {
|
|
20953
21197
|
floatingRef.current = node2;
|
|
20954
21198
|
_setFloating(node2);
|
|
@@ -20956,14 +21200,14 @@ function useFloating(options2) {
|
|
|
20956
21200
|
}, []);
|
|
20957
21201
|
const referenceEl = externalReference || _reference;
|
|
20958
21202
|
const floatingEl = externalFloating || _floating;
|
|
20959
|
-
const referenceRef =
|
|
20960
|
-
const floatingRef =
|
|
20961
|
-
const dataRef =
|
|
21203
|
+
const referenceRef = React8.useRef(null);
|
|
21204
|
+
const floatingRef = React8.useRef(null);
|
|
21205
|
+
const dataRef = React8.useRef(data);
|
|
20962
21206
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
20963
21207
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
20964
21208
|
const platformRef = useLatestRef(platform2);
|
|
20965
21209
|
const openRef = useLatestRef(open);
|
|
20966
|
-
const update =
|
|
21210
|
+
const update = React8.useCallback(() => {
|
|
20967
21211
|
if (!referenceRef.current || !floatingRef.current) {
|
|
20968
21212
|
return;
|
|
20969
21213
|
}
|
|
@@ -21001,7 +21245,7 @@ function useFloating(options2) {
|
|
|
21001
21245
|
}));
|
|
21002
21246
|
}
|
|
21003
21247
|
}, [open]);
|
|
21004
|
-
const isMountedRef =
|
|
21248
|
+
const isMountedRef = React8.useRef(false);
|
|
21005
21249
|
index2(() => {
|
|
21006
21250
|
isMountedRef.current = true;
|
|
21007
21251
|
return () => {
|
|
@@ -21018,17 +21262,17 @@ function useFloating(options2) {
|
|
|
21018
21262
|
update();
|
|
21019
21263
|
}
|
|
21020
21264
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21021
|
-
const refs =
|
|
21265
|
+
const refs = React8.useMemo(() => ({
|
|
21022
21266
|
reference: referenceRef,
|
|
21023
21267
|
floating: floatingRef,
|
|
21024
21268
|
setReference,
|
|
21025
21269
|
setFloating
|
|
21026
21270
|
}), [setReference, setFloating]);
|
|
21027
|
-
const elements =
|
|
21271
|
+
const elements = React8.useMemo(() => ({
|
|
21028
21272
|
reference: referenceEl,
|
|
21029
21273
|
floating: floatingEl
|
|
21030
21274
|
}), [referenceEl, floatingEl]);
|
|
21031
|
-
const floatingStyles =
|
|
21275
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21032
21276
|
const initialStyles = {
|
|
21033
21277
|
position: strategy,
|
|
21034
21278
|
left: 0,
|
|
@@ -21054,7 +21298,7 @@ function useFloating(options2) {
|
|
|
21054
21298
|
top: y3
|
|
21055
21299
|
};
|
|
21056
21300
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21057
|
-
return
|
|
21301
|
+
return React8.useMemo(() => ({
|
|
21058
21302
|
...data,
|
|
21059
21303
|
update,
|
|
21060
21304
|
refs,
|
|
@@ -21115,7 +21359,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21115
21359
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21116
21360
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21117
21361
|
var SafeReact2 = {
|
|
21118
|
-
...
|
|
21362
|
+
...React9
|
|
21119
21363
|
};
|
|
21120
21364
|
var serverHandoffComplete = false;
|
|
21121
21365
|
var count = 0;
|
|
@@ -21125,13 +21369,13 @@ var genId = () => (
|
|
|
21125
21369
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21126
21370
|
);
|
|
21127
21371
|
function useFloatingId() {
|
|
21128
|
-
const [id, setId] =
|
|
21372
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21129
21373
|
index(() => {
|
|
21130
21374
|
if (id == null) {
|
|
21131
21375
|
setId(genId());
|
|
21132
21376
|
}
|
|
21133
21377
|
}, []);
|
|
21134
|
-
|
|
21378
|
+
React9.useEffect(() => {
|
|
21135
21379
|
serverHandoffComplete = true;
|
|
21136
21380
|
}, []);
|
|
21137
21381
|
return id;
|
|
@@ -21166,7 +21410,7 @@ function error() {
|
|
|
21166
21410
|
console.error(message2);
|
|
21167
21411
|
}
|
|
21168
21412
|
}
|
|
21169
|
-
var FloatingArrow = /* @__PURE__ */
|
|
21413
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21170
21414
|
const {
|
|
21171
21415
|
context: {
|
|
21172
21416
|
placement,
|
|
@@ -21197,7 +21441,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21197
21441
|
}
|
|
21198
21442
|
}
|
|
21199
21443
|
const clipPathId = useId();
|
|
21200
|
-
const [isRTL2, setIsRTL] =
|
|
21444
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21201
21445
|
index(() => {
|
|
21202
21446
|
if (!floating) return;
|
|
21203
21447
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21233,7 +21477,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21233
21477
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21234
21478
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21235
21479
|
}[side];
|
|
21236
|
-
return /* @__PURE__ */ (0,
|
|
21480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("svg", {
|
|
21237
21481
|
...rest,
|
|
21238
21482
|
"aria-hidden": true,
|
|
21239
21483
|
ref,
|
|
@@ -21249,18 +21493,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21249
21493
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21250
21494
|
...restStyle
|
|
21251
21495
|
},
|
|
21252
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
21496
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
21253
21497
|
clipPath: "url(#" + clipPathId + ")",
|
|
21254
21498
|
fill: "none",
|
|
21255
21499
|
stroke,
|
|
21256
21500
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21257
21501
|
d: dValue
|
|
21258
|
-
}), /* @__PURE__ */ (0,
|
|
21502
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("path", {
|
|
21259
21503
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21260
21504
|
d: dValue
|
|
21261
|
-
}), /* @__PURE__ */ (0,
|
|
21505
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("clipPath", {
|
|
21262
21506
|
id: clipPathId,
|
|
21263
|
-
children: /* @__PURE__ */ (0,
|
|
21507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("rect", {
|
|
21264
21508
|
x: -halfStrokeWidth,
|
|
21265
21509
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21266
21510
|
width: width + computedStrokeWidth,
|
|
@@ -21288,13 +21532,13 @@ function createEventEmitter() {
|
|
|
21288
21532
|
}
|
|
21289
21533
|
};
|
|
21290
21534
|
}
|
|
21291
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
21292
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
21535
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21536
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21293
21537
|
var useFloatingParentNodeId = () => {
|
|
21294
21538
|
var _React$useContext;
|
|
21295
|
-
return ((_React$useContext =
|
|
21539
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
21296
21540
|
};
|
|
21297
|
-
var useFloatingTree = () =>
|
|
21541
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
21298
21542
|
function useFloatingRootContext(options2) {
|
|
21299
21543
|
const {
|
|
21300
21544
|
open = false,
|
|
@@ -21302,8 +21546,8 @@ function useFloatingRootContext(options2) {
|
|
|
21302
21546
|
elements: elementsProp
|
|
21303
21547
|
} = options2;
|
|
21304
21548
|
const floatingId = useId();
|
|
21305
|
-
const dataRef =
|
|
21306
|
-
const [events] =
|
|
21549
|
+
const dataRef = React9.useRef({});
|
|
21550
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
21307
21551
|
const nested = useFloatingParentNodeId() != null;
|
|
21308
21552
|
if (process.env.NODE_ENV !== "production") {
|
|
21309
21553
|
const optionDomReference = elementsProp.reference;
|
|
@@ -21311,7 +21555,7 @@ function useFloatingRootContext(options2) {
|
|
|
21311
21555
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
21312
21556
|
}
|
|
21313
21557
|
}
|
|
21314
|
-
const [positionReference, setPositionReference] =
|
|
21558
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
21315
21559
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
21316
21560
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
21317
21561
|
events.emit("openchange", {
|
|
@@ -21322,15 +21566,15 @@ function useFloatingRootContext(options2) {
|
|
|
21322
21566
|
});
|
|
21323
21567
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
21324
21568
|
});
|
|
21325
|
-
const refs =
|
|
21569
|
+
const refs = React9.useMemo(() => ({
|
|
21326
21570
|
setPositionReference
|
|
21327
21571
|
}), []);
|
|
21328
|
-
const elements =
|
|
21572
|
+
const elements = React9.useMemo(() => ({
|
|
21329
21573
|
reference: positionReference || elementsProp.reference || null,
|
|
21330
21574
|
floating: elementsProp.floating || null,
|
|
21331
21575
|
domReference: elementsProp.reference
|
|
21332
21576
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
21333
|
-
return
|
|
21577
|
+
return React9.useMemo(() => ({
|
|
21334
21578
|
dataRef,
|
|
21335
21579
|
open,
|
|
21336
21580
|
onOpenChange,
|
|
@@ -21357,11 +21601,11 @@ function useFloating2(options2) {
|
|
|
21357
21601
|
});
|
|
21358
21602
|
const rootContext = options2.rootContext || internalRootContext;
|
|
21359
21603
|
const computedElements = rootContext.elements;
|
|
21360
|
-
const [_domReference, setDomReference] =
|
|
21361
|
-
const [positionReference, _setPositionReference] =
|
|
21604
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
21605
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
21362
21606
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
21363
21607
|
const domReference = optionDomReference || _domReference;
|
|
21364
|
-
const domReferenceRef =
|
|
21608
|
+
const domReferenceRef = React9.useRef(null);
|
|
21365
21609
|
const tree = useFloatingTree();
|
|
21366
21610
|
index(() => {
|
|
21367
21611
|
if (domReference) {
|
|
@@ -21377,7 +21621,7 @@ function useFloating2(options2) {
|
|
|
21377
21621
|
}
|
|
21378
21622
|
}
|
|
21379
21623
|
});
|
|
21380
|
-
const setPositionReference =
|
|
21624
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
21381
21625
|
const computedPositionReference = isElement(node2) ? {
|
|
21382
21626
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
21383
21627
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -21386,7 +21630,7 @@ function useFloating2(options2) {
|
|
|
21386
21630
|
_setPositionReference(computedPositionReference);
|
|
21387
21631
|
position2.refs.setReference(computedPositionReference);
|
|
21388
21632
|
}, [position2.refs]);
|
|
21389
|
-
const setReference =
|
|
21633
|
+
const setReference = React9.useCallback((node2) => {
|
|
21390
21634
|
if (isElement(node2) || node2 === null) {
|
|
21391
21635
|
domReferenceRef.current = node2;
|
|
21392
21636
|
setDomReference(node2);
|
|
@@ -21398,17 +21642,17 @@ function useFloating2(options2) {
|
|
|
21398
21642
|
position2.refs.setReference(node2);
|
|
21399
21643
|
}
|
|
21400
21644
|
}, [position2.refs]);
|
|
21401
|
-
const refs =
|
|
21645
|
+
const refs = React9.useMemo(() => ({
|
|
21402
21646
|
...position2.refs,
|
|
21403
21647
|
setReference,
|
|
21404
21648
|
setPositionReference,
|
|
21405
21649
|
domReference: domReferenceRef
|
|
21406
21650
|
}), [position2.refs, setReference, setPositionReference]);
|
|
21407
|
-
const elements =
|
|
21651
|
+
const elements = React9.useMemo(() => ({
|
|
21408
21652
|
...position2.elements,
|
|
21409
21653
|
domReference
|
|
21410
21654
|
}), [position2.elements, domReference]);
|
|
21411
|
-
const context =
|
|
21655
|
+
const context = React9.useMemo(() => ({
|
|
21412
21656
|
...position2,
|
|
21413
21657
|
...rootContext,
|
|
21414
21658
|
refs,
|
|
@@ -21422,7 +21666,7 @@ function useFloating2(options2) {
|
|
|
21422
21666
|
node2.context = context;
|
|
21423
21667
|
}
|
|
21424
21668
|
});
|
|
21425
|
-
return
|
|
21669
|
+
return React9.useMemo(() => ({
|
|
21426
21670
|
...position2,
|
|
21427
21671
|
context,
|
|
21428
21672
|
refs,
|
|
@@ -21472,13 +21716,13 @@ function __spreadArray(to2, from2, pack) {
|
|
|
21472
21716
|
var CalendarContainer = function(_a2) {
|
|
21473
21717
|
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
21718
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
21475
|
-
return
|
|
21719
|
+
return import_react46.default.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
21476
21720
|
};
|
|
21477
21721
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
21478
|
-
var ref = (0,
|
|
21479
|
-
var onClickOutsideRef = (0,
|
|
21722
|
+
var ref = (0, import_react46.useRef)(null);
|
|
21723
|
+
var onClickOutsideRef = (0, import_react46.useRef)(onClickOutside);
|
|
21480
21724
|
onClickOutsideRef.current = onClickOutside;
|
|
21481
|
-
var handleClickOutside = (0,
|
|
21725
|
+
var handleClickOutside = (0, import_react46.useCallback)(function(event) {
|
|
21482
21726
|
var _a2;
|
|
21483
21727
|
var target = event.composed && event.composedPath && event.composedPath().find(function(eventTarget) {
|
|
21484
21728
|
return eventTarget instanceof Node;
|
|
@@ -21489,7 +21733,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21489
21733
|
}
|
|
21490
21734
|
}
|
|
21491
21735
|
}, [ignoreClass]);
|
|
21492
|
-
(0,
|
|
21736
|
+
(0, import_react46.useEffect)(function() {
|
|
21493
21737
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21494
21738
|
return function() {
|
|
21495
21739
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -21500,7 +21744,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21500
21744
|
var ClickOutsideWrapper = function(_a2) {
|
|
21501
21745
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
21502
21746
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
21503
|
-
return
|
|
21747
|
+
return import_react46.default.createElement("div", { className, style, ref: function(node2) {
|
|
21504
21748
|
detectRef.current = node2;
|
|
21505
21749
|
if (containerRef) {
|
|
21506
21750
|
containerRef.current = node2;
|
|
@@ -22096,7 +22340,7 @@ var InputTime = (
|
|
|
22096
22340
|
__extends(InputTime2, _super);
|
|
22097
22341
|
function InputTime2(props) {
|
|
22098
22342
|
var _this = _super.call(this, props) || this;
|
|
22099
|
-
_this.inputRef =
|
|
22343
|
+
_this.inputRef = import_react46.default.createRef();
|
|
22100
22344
|
_this.onTimeChange = function(time) {
|
|
22101
22345
|
var _a2, _b;
|
|
22102
22346
|
_this.setState({ time });
|
|
@@ -22114,13 +22358,13 @@ var InputTime = (
|
|
|
22114
22358
|
var time = _this.state.time;
|
|
22115
22359
|
var _a2 = _this.props, date = _a2.date, timeString = _a2.timeString, customTimeInput = _a2.customTimeInput;
|
|
22116
22360
|
if (customTimeInput) {
|
|
22117
|
-
return (0,
|
|
22361
|
+
return (0, import_react46.cloneElement)(customTimeInput, {
|
|
22118
22362
|
date,
|
|
22119
22363
|
value: time,
|
|
22120
22364
|
onChange: _this.onTimeChange
|
|
22121
22365
|
});
|
|
22122
22366
|
}
|
|
22123
|
-
return
|
|
22367
|
+
return import_react46.default.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22124
22368
|
var _a3;
|
|
22125
22369
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22126
22370
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22141,19 +22385,19 @@ var InputTime = (
|
|
|
22141
22385
|
return null;
|
|
22142
22386
|
};
|
|
22143
22387
|
InputTime2.prototype.render = function() {
|
|
22144
|
-
return
|
|
22388
|
+
return import_react46.default.createElement(
|
|
22145
22389
|
"div",
|
|
22146
22390
|
{ className: "react-datepicker__input-time-container" },
|
|
22147
|
-
|
|
22148
|
-
|
|
22391
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
22392
|
+
import_react46.default.createElement(
|
|
22149
22393
|
"div",
|
|
22150
22394
|
{ className: "react-datepicker-time__input-container" },
|
|
22151
|
-
|
|
22395
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22152
22396
|
)
|
|
22153
22397
|
);
|
|
22154
22398
|
};
|
|
22155
22399
|
return InputTime2;
|
|
22156
|
-
}(
|
|
22400
|
+
}(import_react46.Component)
|
|
22157
22401
|
);
|
|
22158
22402
|
var Day = (
|
|
22159
22403
|
/** @class */
|
|
@@ -22161,7 +22405,7 @@ var Day = (
|
|
|
22161
22405
|
__extends(Day2, _super);
|
|
22162
22406
|
function Day2() {
|
|
22163
22407
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22164
|
-
_this.dayEl = (0,
|
|
22408
|
+
_this.dayEl = (0, import_react46.createRef)();
|
|
22165
22409
|
_this.handleClick = function(event) {
|
|
22166
22410
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
22167
22411
|
_this.props.onClick(event);
|
|
@@ -22396,11 +22640,11 @@ var Day = (
|
|
|
22396
22640
|
_this.render = function() {
|
|
22397
22641
|
return (
|
|
22398
22642
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
22399
|
-
|
|
22643
|
+
import_react46.default.createElement(
|
|
22400
22644
|
"div",
|
|
22401
22645
|
{ 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
22646
|
_this.renderDayContents(),
|
|
22403
|
-
_this.getTitle() !== "" &&
|
|
22647
|
+
_this.getTitle() !== "" && import_react46.default.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
22404
22648
|
)
|
|
22405
22649
|
);
|
|
22406
22650
|
};
|
|
@@ -22441,7 +22685,7 @@ var Day = (
|
|
|
22441
22685
|
);
|
|
22442
22686
|
};
|
|
22443
22687
|
return Day2;
|
|
22444
|
-
}(
|
|
22688
|
+
}(import_react46.Component)
|
|
22445
22689
|
);
|
|
22446
22690
|
var WeekNumber = (
|
|
22447
22691
|
/** @class */
|
|
@@ -22449,7 +22693,7 @@ var WeekNumber = (
|
|
|
22449
22693
|
__extends(WeekNumber2, _super);
|
|
22450
22694
|
function WeekNumber2() {
|
|
22451
22695
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22452
|
-
_this.weekNumberEl = (0,
|
|
22696
|
+
_this.weekNumberEl = (0, import_react46.createRef)();
|
|
22453
22697
|
_this.handleClick = function(event) {
|
|
22454
22698
|
if (_this.props.onClick) {
|
|
22455
22699
|
_this.props.onClick(event);
|
|
@@ -22509,10 +22753,10 @@ var WeekNumber = (
|
|
|
22509
22753
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
22510
22754
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
22511
22755
|
};
|
|
22512
|
-
return
|
|
22756
|
+
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
22757
|
};
|
|
22514
22758
|
return WeekNumber2;
|
|
22515
|
-
}(
|
|
22759
|
+
}(import_react46.Component)
|
|
22516
22760
|
);
|
|
22517
22761
|
var Week = (
|
|
22518
22762
|
/** @class */
|
|
@@ -22586,11 +22830,11 @@ var Week = (
|
|
|
22586
22830
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
22587
22831
|
if (_this.props.showWeekNumber) {
|
|
22588
22832
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
22589
|
-
days.push(
|
|
22833
|
+
days.push(import_react46.default.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
22590
22834
|
}
|
|
22591
22835
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
22592
22836
|
var day = addDays(startOfWeek2, offset4);
|
|
22593
|
-
return
|
|
22837
|
+
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
22838
|
}));
|
|
22595
22839
|
};
|
|
22596
22840
|
_this.startOfWeek = function() {
|
|
@@ -22616,10 +22860,10 @@ var Week = (
|
|
|
22616
22860
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
22617
22861
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
22618
22862
|
};
|
|
22619
|
-
return
|
|
22863
|
+
return import_react46.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
22620
22864
|
};
|
|
22621
22865
|
return Week2;
|
|
22622
|
-
}(
|
|
22866
|
+
}(import_react46.Component)
|
|
22623
22867
|
);
|
|
22624
22868
|
var _a;
|
|
22625
22869
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
@@ -22671,10 +22915,10 @@ var Month = (
|
|
|
22671
22915
|
function Month2() {
|
|
22672
22916
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22673
22917
|
_this.MONTH_REFS = __spreadArray([], Array(12), true).map(function() {
|
|
22674
|
-
return (0,
|
|
22918
|
+
return (0, import_react46.createRef)();
|
|
22675
22919
|
});
|
|
22676
22920
|
_this.QUARTER_REFS = __spreadArray([], Array(4), true).map(function() {
|
|
22677
|
-
return (0,
|
|
22921
|
+
return (0, import_react46.createRef)();
|
|
22678
22922
|
});
|
|
22679
22923
|
_this.isDisabled = function(day) {
|
|
22680
22924
|
return isDayDisabled(day, {
|
|
@@ -22844,7 +23088,7 @@ var Month = (
|
|
|
22844
23088
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
22845
23089
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
22846
23090
|
while (true) {
|
|
22847
|
-
weeks.push(
|
|
23091
|
+
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
23092
|
if (breakAfterNextPush)
|
|
22849
23093
|
break;
|
|
22850
23094
|
i3++;
|
|
@@ -23113,8 +23357,8 @@ var Month = (
|
|
|
23113
23357
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23114
23358
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23115
23359
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23116
|
-
return
|
|
23117
|
-
return
|
|
23360
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23361
|
+
return import_react46.default.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23118
23362
|
_this.onMonthClick(event, m);
|
|
23119
23363
|
}, onKeyDown: function(event) {
|
|
23120
23364
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23133,8 +23377,8 @@ var Month = (
|
|
|
23133
23377
|
_this.renderQuarters = function() {
|
|
23134
23378
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23135
23379
|
var quarters = [1, 2, 3, 4];
|
|
23136
|
-
return
|
|
23137
|
-
return
|
|
23380
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
23381
|
+
return import_react46.default.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23138
23382
|
_this.onQuarterClick(event, q3);
|
|
23139
23383
|
}, onKeyDown: function(event) {
|
|
23140
23384
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23166,10 +23410,10 @@ var Month = (
|
|
|
23166
23410
|
Month2.prototype.render = function() {
|
|
23167
23411
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23168
23412
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23169
|
-
return
|
|
23413
|
+
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
23414
|
};
|
|
23171
23415
|
return Month2;
|
|
23172
|
-
}(
|
|
23416
|
+
}(import_react46.Component)
|
|
23173
23417
|
);
|
|
23174
23418
|
var MonthDropdownOptions = (
|
|
23175
23419
|
/** @class */
|
|
@@ -23182,10 +23426,10 @@ var MonthDropdownOptions = (
|
|
|
23182
23426
|
};
|
|
23183
23427
|
_this.renderOptions = function() {
|
|
23184
23428
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23185
|
-
return
|
|
23429
|
+
return import_react46.default.createElement(
|
|
23186
23430
|
"div",
|
|
23187
23431
|
{ 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) ?
|
|
23432
|
+
_this.isSelectedMonth(i3) ? import_react46.default.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23189
23433
|
month
|
|
23190
23434
|
);
|
|
23191
23435
|
});
|
|
@@ -23199,10 +23443,10 @@ var MonthDropdownOptions = (
|
|
|
23199
23443
|
return _this;
|
|
23200
23444
|
}
|
|
23201
23445
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23202
|
-
return
|
|
23446
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23203
23447
|
};
|
|
23204
23448
|
return MonthDropdownOptions2;
|
|
23205
|
-
}(
|
|
23449
|
+
}(import_react46.Component)
|
|
23206
23450
|
);
|
|
23207
23451
|
var MonthDropdown = (
|
|
23208
23452
|
/** @class */
|
|
@@ -23215,24 +23459,24 @@ var MonthDropdown = (
|
|
|
23215
23459
|
};
|
|
23216
23460
|
_this.renderSelectOptions = function(monthNames) {
|
|
23217
23461
|
return monthNames.map(function(m, i3) {
|
|
23218
|
-
return
|
|
23462
|
+
return import_react46.default.createElement("option", { key: m, value: i3 }, m);
|
|
23219
23463
|
});
|
|
23220
23464
|
};
|
|
23221
23465
|
_this.renderSelectMode = function(monthNames) {
|
|
23222
|
-
return
|
|
23466
|
+
return import_react46.default.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23223
23467
|
return _this.onChange(parseInt(e3.target.value));
|
|
23224
23468
|
} }, _this.renderSelectOptions(monthNames));
|
|
23225
23469
|
};
|
|
23226
23470
|
_this.renderReadView = function(visible, monthNames) {
|
|
23227
|
-
return
|
|
23471
|
+
return import_react46.default.createElement(
|
|
23228
23472
|
"div",
|
|
23229
23473
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23230
|
-
|
|
23231
|
-
|
|
23474
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
23475
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23232
23476
|
);
|
|
23233
23477
|
};
|
|
23234
23478
|
_this.renderDropdown = function(monthNames) {
|
|
23235
|
-
return
|
|
23479
|
+
return import_react46.default.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23236
23480
|
};
|
|
23237
23481
|
_this.renderScrollMode = function(monthNames) {
|
|
23238
23482
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23271,10 +23515,10 @@ var MonthDropdown = (
|
|
|
23271
23515
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
23272
23516
|
break;
|
|
23273
23517
|
}
|
|
23274
|
-
return
|
|
23518
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23275
23519
|
};
|
|
23276
23520
|
return MonthDropdown2;
|
|
23277
|
-
}(
|
|
23521
|
+
}(import_react46.Component)
|
|
23278
23522
|
);
|
|
23279
23523
|
function generateMonthYears(minDate, maxDate) {
|
|
23280
23524
|
var list = [];
|
|
@@ -23296,10 +23540,10 @@ var MonthYearDropdownOptions = (
|
|
|
23296
23540
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
23297
23541
|
var monthYearPoint = getTime(monthYear);
|
|
23298
23542
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
23299
|
-
return
|
|
23543
|
+
return import_react46.default.createElement(
|
|
23300
23544
|
"div",
|
|
23301
23545
|
{ 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 ?
|
|
23546
|
+
isSameMonthYear ? import_react46.default.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
23303
23547
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
23304
23548
|
);
|
|
23305
23549
|
});
|
|
@@ -23320,10 +23564,10 @@ var MonthYearDropdownOptions = (
|
|
|
23320
23564
|
"react-datepicker__month-year-dropdown": true,
|
|
23321
23565
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
23322
23566
|
});
|
|
23323
|
-
return
|
|
23567
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23324
23568
|
};
|
|
23325
23569
|
return MonthYearDropdownOptions2;
|
|
23326
|
-
}(
|
|
23570
|
+
}(import_react46.Component)
|
|
23327
23571
|
);
|
|
23328
23572
|
var MonthYearDropdown = (
|
|
23329
23573
|
/** @class */
|
|
@@ -23340,7 +23584,7 @@ var MonthYearDropdown = (
|
|
|
23340
23584
|
var options2 = [];
|
|
23341
23585
|
while (!isAfter(currDate, lastDate)) {
|
|
23342
23586
|
var timePoint = getTime(currDate);
|
|
23343
|
-
options2.push(
|
|
23587
|
+
options2.push(import_react46.default.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
23344
23588
|
currDate = addMonths(currDate, 1);
|
|
23345
23589
|
}
|
|
23346
23590
|
return options2;
|
|
@@ -23349,19 +23593,19 @@ var MonthYearDropdown = (
|
|
|
23349
23593
|
_this.onChange(parseInt(event.target.value));
|
|
23350
23594
|
};
|
|
23351
23595
|
_this.renderSelectMode = function() {
|
|
23352
|
-
return
|
|
23596
|
+
return import_react46.default.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23353
23597
|
};
|
|
23354
23598
|
_this.renderReadView = function(visible) {
|
|
23355
23599
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
23356
|
-
return
|
|
23600
|
+
return import_react46.default.createElement(
|
|
23357
23601
|
"div",
|
|
23358
23602
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
23359
|
-
|
|
23360
|
-
|
|
23603
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
23604
|
+
import_react46.default.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
23361
23605
|
);
|
|
23362
23606
|
};
|
|
23363
23607
|
_this.renderDropdown = function() {
|
|
23364
|
-
return
|
|
23608
|
+
return import_react46.default.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23365
23609
|
};
|
|
23366
23610
|
_this.renderScrollMode = function() {
|
|
23367
23611
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23396,10 +23640,10 @@ var MonthYearDropdown = (
|
|
|
23396
23640
|
renderedDropdown = this.renderSelectMode();
|
|
23397
23641
|
break;
|
|
23398
23642
|
}
|
|
23399
|
-
return
|
|
23643
|
+
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
23644
|
};
|
|
23401
23645
|
return MonthYearDropdown2;
|
|
23402
|
-
}(
|
|
23646
|
+
}(import_react46.Component)
|
|
23403
23647
|
);
|
|
23404
23648
|
var Time = (
|
|
23405
23649
|
/** @class */
|
|
@@ -23494,7 +23738,7 @@ var Time = (
|
|
|
23494
23738
|
return prev2;
|
|
23495
23739
|
}, times[0]);
|
|
23496
23740
|
return times.map(function(time) {
|
|
23497
|
-
return
|
|
23741
|
+
return import_react46.default.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
23498
23742
|
if (time === timeToFocus) {
|
|
23499
23743
|
_this.centerLi = li;
|
|
23500
23744
|
}
|
|
@@ -23505,14 +23749,14 @@ var Time = (
|
|
|
23505
23749
|
};
|
|
23506
23750
|
_this.renderTimeCaption = function() {
|
|
23507
23751
|
if (_this.props.showTimeCaption === false) {
|
|
23508
|
-
return
|
|
23752
|
+
return import_react46.default.createElement(import_react46.default.Fragment, null);
|
|
23509
23753
|
}
|
|
23510
|
-
return
|
|
23754
|
+
return import_react46.default.createElement(
|
|
23511
23755
|
"div",
|
|
23512
23756
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
23513
23757
|
_this.header = header;
|
|
23514
23758
|
} },
|
|
23515
|
-
|
|
23759
|
+
import_react46.default.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
23516
23760
|
);
|
|
23517
23761
|
};
|
|
23518
23762
|
return _this;
|
|
@@ -23559,17 +23803,17 @@ var Time = (
|
|
|
23559
23803
|
var _this = this;
|
|
23560
23804
|
var _a2;
|
|
23561
23805
|
var height = this.state.height;
|
|
23562
|
-
return
|
|
23806
|
+
return import_react46.default.createElement(
|
|
23563
23807
|
"div",
|
|
23564
23808
|
{ 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
23809
|
this.renderTimeCaption(),
|
|
23566
|
-
|
|
23810
|
+
import_react46.default.createElement(
|
|
23567
23811
|
"div",
|
|
23568
23812
|
{ className: "react-datepicker__time" },
|
|
23569
|
-
|
|
23813
|
+
import_react46.default.createElement(
|
|
23570
23814
|
"div",
|
|
23571
23815
|
{ className: "react-datepicker__time-box" },
|
|
23572
|
-
|
|
23816
|
+
import_react46.default.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
23573
23817
|
_this.list = list;
|
|
23574
23818
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
23575
23819
|
)
|
|
@@ -23580,7 +23824,7 @@ var Time = (
|
|
|
23580
23824
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
23581
23825
|
};
|
|
23582
23826
|
return Time2;
|
|
23583
|
-
}(
|
|
23827
|
+
}(import_react46.Component)
|
|
23584
23828
|
);
|
|
23585
23829
|
var VERTICAL_NAVIGATION_OFFSET = 3;
|
|
23586
23830
|
var Year = (
|
|
@@ -23590,7 +23834,7 @@ var Year = (
|
|
|
23590
23834
|
function Year2(props) {
|
|
23591
23835
|
var _this = _super.call(this, props) || this;
|
|
23592
23836
|
_this.YEAR_REFS = __spreadArray([], Array(_this.props.yearItemNumber), true).map(function() {
|
|
23593
|
-
return (0,
|
|
23837
|
+
return (0, import_react46.createRef)();
|
|
23594
23838
|
});
|
|
23595
23839
|
_this.isDisabled = function(date) {
|
|
23596
23840
|
return isDayDisabled(date, {
|
|
@@ -23827,7 +24071,7 @@ var Year = (
|
|
|
23827
24071
|
}
|
|
23828
24072
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
23829
24073
|
var _loop_1 = function(y4) {
|
|
23830
|
-
yearsList.push(
|
|
24074
|
+
yearsList.push(import_react46.default.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
23831
24075
|
_this.onYearClick(event, y4);
|
|
23832
24076
|
}, onKeyDown: function(event) {
|
|
23833
24077
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23849,14 +24093,14 @@ var Year = (
|
|
|
23849
24093
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
23850
24094
|
_loop_1(y3);
|
|
23851
24095
|
}
|
|
23852
|
-
return
|
|
24096
|
+
return import_react46.default.createElement(
|
|
23853
24097
|
"div",
|
|
23854
24098
|
{ className: "react-datepicker__year" },
|
|
23855
|
-
|
|
24099
|
+
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
24100
|
);
|
|
23857
24101
|
};
|
|
23858
24102
|
return Year2;
|
|
23859
|
-
}(
|
|
24103
|
+
}(import_react46.Component)
|
|
23860
24104
|
);
|
|
23861
24105
|
function generateYears(year, noOfYear, minDate, maxDate) {
|
|
23862
24106
|
var list = [];
|
|
@@ -23884,10 +24128,10 @@ var YearDropdownOptions = (
|
|
|
23884
24128
|
_this.renderOptions = function() {
|
|
23885
24129
|
var selectedYear = _this.props.year;
|
|
23886
24130
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
23887
|
-
return
|
|
24131
|
+
return import_react46.default.createElement(
|
|
23888
24132
|
"div",
|
|
23889
24133
|
{ 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 ?
|
|
24134
|
+
selectedYear === year ? import_react46.default.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
23891
24135
|
year
|
|
23892
24136
|
);
|
|
23893
24137
|
});
|
|
@@ -23896,19 +24140,19 @@ var YearDropdownOptions = (
|
|
|
23896
24140
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
23897
24141
|
return year === maxYear;
|
|
23898
24142
|
})) {
|
|
23899
|
-
options2.unshift(
|
|
24143
|
+
options2.unshift(import_react46.default.createElement(
|
|
23900
24144
|
"div",
|
|
23901
24145
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
23902
|
-
|
|
24146
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
23903
24147
|
));
|
|
23904
24148
|
}
|
|
23905
24149
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
23906
24150
|
return year === minYear;
|
|
23907
24151
|
})) {
|
|
23908
|
-
options2.push(
|
|
24152
|
+
options2.push(import_react46.default.createElement(
|
|
23909
24153
|
"div",
|
|
23910
24154
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
23911
|
-
|
|
24155
|
+
import_react46.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
23912
24156
|
));
|
|
23913
24157
|
}
|
|
23914
24158
|
return options2;
|
|
@@ -23938,7 +24182,7 @@ var YearDropdownOptions = (
|
|
|
23938
24182
|
_this.state = {
|
|
23939
24183
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
23940
24184
|
};
|
|
23941
|
-
_this.dropdownRef = (0,
|
|
24185
|
+
_this.dropdownRef = (0, import_react46.createRef)();
|
|
23942
24186
|
return _this;
|
|
23943
24187
|
}
|
|
23944
24188
|
YearDropdownOptions2.prototype.componentDidMount = function() {
|
|
@@ -23956,10 +24200,10 @@ var YearDropdownOptions = (
|
|
|
23956
24200
|
"react-datepicker__year-dropdown": true,
|
|
23957
24201
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
23958
24202
|
});
|
|
23959
|
-
return
|
|
24203
|
+
return import_react46.default.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23960
24204
|
};
|
|
23961
24205
|
return YearDropdownOptions2;
|
|
23962
|
-
}(
|
|
24206
|
+
}(import_react46.Component)
|
|
23963
24207
|
);
|
|
23964
24208
|
var YearDropdown = (
|
|
23965
24209
|
/** @class */
|
|
@@ -23975,7 +24219,7 @@ var YearDropdown = (
|
|
|
23975
24219
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
23976
24220
|
var options2 = [];
|
|
23977
24221
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
23978
|
-
options2.push(
|
|
24222
|
+
options2.push(import_react46.default.createElement("option", { key: i3, value: i3 }, i3));
|
|
23979
24223
|
}
|
|
23980
24224
|
return options2;
|
|
23981
24225
|
};
|
|
@@ -23983,20 +24227,20 @@ var YearDropdown = (
|
|
|
23983
24227
|
_this.onChange(parseInt(event.target.value));
|
|
23984
24228
|
};
|
|
23985
24229
|
_this.renderSelectMode = function() {
|
|
23986
|
-
return
|
|
24230
|
+
return import_react46.default.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23987
24231
|
};
|
|
23988
24232
|
_this.renderReadView = function(visible) {
|
|
23989
|
-
return
|
|
24233
|
+
return import_react46.default.createElement(
|
|
23990
24234
|
"div",
|
|
23991
24235
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
23992
24236
|
return _this.toggleDropdown(event);
|
|
23993
24237
|
} },
|
|
23994
|
-
|
|
23995
|
-
|
|
24238
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24239
|
+
import_react46.default.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
23996
24240
|
);
|
|
23997
24241
|
};
|
|
23998
24242
|
_this.renderDropdown = function() {
|
|
23999
|
-
return
|
|
24243
|
+
return import_react46.default.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24000
24244
|
};
|
|
24001
24245
|
_this.renderScrollMode = function() {
|
|
24002
24246
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24046,10 +24290,10 @@ var YearDropdown = (
|
|
|
24046
24290
|
renderedDropdown = this.renderSelectMode();
|
|
24047
24291
|
break;
|
|
24048
24292
|
}
|
|
24049
|
-
return
|
|
24293
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24050
24294
|
};
|
|
24051
24295
|
return YearDropdown2;
|
|
24052
|
-
}(
|
|
24296
|
+
}(import_react46.Component)
|
|
24053
24297
|
);
|
|
24054
24298
|
var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
24055
24299
|
"react-datepicker__year-select",
|
|
@@ -24220,13 +24464,13 @@ var Calendar = (
|
|
|
24220
24464
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24221
24465
|
var dayNames = [];
|
|
24222
24466
|
if (_this.props.showWeekNumbers) {
|
|
24223
|
-
dayNames.push(
|
|
24467
|
+
dayNames.push(import_react46.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24224
24468
|
}
|
|
24225
24469
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24226
24470
|
var day = addDays(startOfWeek2, offset4);
|
|
24227
24471
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24228
24472
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24229
|
-
return
|
|
24473
|
+
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
24474
|
}));
|
|
24231
24475
|
};
|
|
24232
24476
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -24295,10 +24539,10 @@ var Calendar = (
|
|
|
24295
24539
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24296
24540
|
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
24541
|
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
|
|
24542
|
+
return import_react46.default.createElement(
|
|
24299
24543
|
"button",
|
|
24300
24544
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
24301
|
-
|
|
24545
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
24302
24546
|
);
|
|
24303
24547
|
};
|
|
24304
24548
|
_this.increaseYear = function() {
|
|
@@ -24360,10 +24604,10 @@ var Calendar = (
|
|
|
24360
24604
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24361
24605
|
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
24606
|
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
|
|
24607
|
+
return import_react46.default.createElement(
|
|
24364
24608
|
"button",
|
|
24365
24609
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
24366
|
-
|
|
24610
|
+
import_react46.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
24367
24611
|
);
|
|
24368
24612
|
};
|
|
24369
24613
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -24380,7 +24624,7 @@ var Calendar = (
|
|
|
24380
24624
|
if (_this.props.showMonthYearDropdown) {
|
|
24381
24625
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
24382
24626
|
}
|
|
24383
|
-
return
|
|
24627
|
+
return import_react46.default.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
24384
24628
|
};
|
|
24385
24629
|
_this.renderYearDropdown = function(overrideHide) {
|
|
24386
24630
|
if (overrideHide === void 0) {
|
|
@@ -24389,7 +24633,7 @@ var Calendar = (
|
|
|
24389
24633
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
24390
24634
|
return;
|
|
24391
24635
|
}
|
|
24392
|
-
return
|
|
24636
|
+
return import_react46.default.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
24393
24637
|
};
|
|
24394
24638
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
24395
24639
|
if (overrideHide === void 0) {
|
|
@@ -24398,7 +24642,7 @@ var Calendar = (
|
|
|
24398
24642
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
24399
24643
|
return;
|
|
24400
24644
|
}
|
|
24401
|
-
return
|
|
24645
|
+
return import_react46.default.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
24402
24646
|
};
|
|
24403
24647
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
24404
24648
|
if (overrideHide === void 0) {
|
|
@@ -24407,7 +24651,7 @@ var Calendar = (
|
|
|
24407
24651
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
24408
24652
|
return;
|
|
24409
24653
|
}
|
|
24410
|
-
return
|
|
24654
|
+
return import_react46.default.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
24411
24655
|
};
|
|
24412
24656
|
_this.handleTodayButtonClick = function(event) {
|
|
24413
24657
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -24417,22 +24661,22 @@ var Calendar = (
|
|
|
24417
24661
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
24418
24662
|
return;
|
|
24419
24663
|
}
|
|
24420
|
-
return
|
|
24664
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
24421
24665
|
};
|
|
24422
24666
|
_this.renderDefaultHeader = function(_a2) {
|
|
24423
24667
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
24424
|
-
return
|
|
24668
|
+
return import_react46.default.createElement(
|
|
24425
24669
|
"div",
|
|
24426
24670
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
24427
24671
|
_this.renderCurrentMonth(monthDate),
|
|
24428
|
-
|
|
24672
|
+
import_react46.default.createElement(
|
|
24429
24673
|
"div",
|
|
24430
24674
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
24431
24675
|
_this.renderMonthDropdown(i3 !== 0),
|
|
24432
24676
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
24433
24677
|
_this.renderYearDropdown(i3 !== 0)
|
|
24434
24678
|
),
|
|
24435
|
-
|
|
24679
|
+
import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24436
24680
|
);
|
|
24437
24681
|
};
|
|
24438
24682
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -24446,18 +24690,18 @@ var Calendar = (
|
|
|
24446
24690
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
24447
24691
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
24448
24692
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
24449
|
-
return
|
|
24693
|
+
return import_react46.default.createElement(
|
|
24450
24694
|
"div",
|
|
24451
24695
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
24452
24696
|
(_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 &&
|
|
24697
|
+
showDayNames && import_react46.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
24454
24698
|
);
|
|
24455
24699
|
};
|
|
24456
24700
|
_this.renderYearHeader = function(_a2) {
|
|
24457
24701
|
var monthDate = _a2.monthDate;
|
|
24458
24702
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
24459
24703
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
24460
|
-
return
|
|
24704
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
24461
24705
|
};
|
|
24462
24706
|
_this.renderHeader = function(_a2) {
|
|
24463
24707
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -24487,13 +24731,13 @@ var Calendar = (
|
|
|
24487
24731
|
var monthKey = "month-".concat(i3);
|
|
24488
24732
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
24489
24733
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
24490
|
-
monthList.push(
|
|
24734
|
+
monthList.push(import_react46.default.createElement(
|
|
24491
24735
|
"div",
|
|
24492
24736
|
{ key: monthKey, ref: function(div) {
|
|
24493
24737
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
24494
24738
|
}, className: "react-datepicker__month-container" },
|
|
24495
24739
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
24496
|
-
|
|
24740
|
+
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
24741
|
));
|
|
24498
24742
|
}
|
|
24499
24743
|
return monthList;
|
|
@@ -24503,18 +24747,18 @@ var Calendar = (
|
|
|
24503
24747
|
return;
|
|
24504
24748
|
}
|
|
24505
24749
|
if (_this.props.showYearPicker) {
|
|
24506
|
-
return
|
|
24750
|
+
return import_react46.default.createElement(
|
|
24507
24751
|
"div",
|
|
24508
24752
|
{ className: "react-datepicker__year--container" },
|
|
24509
24753
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
24510
|
-
|
|
24754
|
+
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
24755
|
);
|
|
24512
24756
|
}
|
|
24513
24757
|
return;
|
|
24514
24758
|
};
|
|
24515
24759
|
_this.renderTimeSection = function() {
|
|
24516
24760
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
24517
|
-
return
|
|
24761
|
+
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
24762
|
}
|
|
24519
24763
|
return;
|
|
24520
24764
|
};
|
|
@@ -24523,7 +24767,7 @@ var Calendar = (
|
|
|
24523
24767
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
24524
24768
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
24525
24769
|
if (_this.props.showTimeInput) {
|
|
24526
|
-
return
|
|
24770
|
+
return import_react46.default.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
24527
24771
|
}
|
|
24528
24772
|
return;
|
|
24529
24773
|
};
|
|
@@ -24538,15 +24782,15 @@ var Calendar = (
|
|
|
24538
24782
|
} else {
|
|
24539
24783
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
24540
24784
|
}
|
|
24541
|
-
return
|
|
24785
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
24542
24786
|
};
|
|
24543
24787
|
_this.renderChildren = function() {
|
|
24544
24788
|
if (_this.props.children) {
|
|
24545
|
-
return
|
|
24789
|
+
return import_react46.default.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
24546
24790
|
}
|
|
24547
24791
|
return;
|
|
24548
24792
|
};
|
|
24549
|
-
_this.containerRef = (0,
|
|
24793
|
+
_this.containerRef = (0, import_react46.createRef)();
|
|
24550
24794
|
_this.state = {
|
|
24551
24795
|
date: _this.getDateInView(),
|
|
24552
24796
|
selectingDate: void 0,
|
|
@@ -24596,13 +24840,13 @@ var Calendar = (
|
|
|
24596
24840
|
};
|
|
24597
24841
|
Calendar2.prototype.render = function() {
|
|
24598
24842
|
var Container = this.props.container || CalendarContainer;
|
|
24599
|
-
return
|
|
24843
|
+
return import_react46.default.createElement(
|
|
24600
24844
|
ClickOutsideWrapper,
|
|
24601
24845
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
24602
|
-
|
|
24846
|
+
import_react46.default.createElement(
|
|
24603
24847
|
"div",
|
|
24604
24848
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
24605
|
-
|
|
24849
|
+
import_react46.default.createElement(
|
|
24606
24850
|
Container,
|
|
24607
24851
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
24608
24852
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -24621,17 +24865,17 @@ var Calendar = (
|
|
|
24621
24865
|
);
|
|
24622
24866
|
};
|
|
24623
24867
|
return Calendar2;
|
|
24624
|
-
}(
|
|
24868
|
+
}(import_react46.Component)
|
|
24625
24869
|
);
|
|
24626
24870
|
var CalendarIcon2 = function(_a2) {
|
|
24627
24871
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
24628
24872
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
24629
24873
|
if (typeof icon === "string") {
|
|
24630
|
-
return
|
|
24874
|
+
return import_react46.default.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
24631
24875
|
}
|
|
24632
|
-
if (
|
|
24876
|
+
if (import_react46.default.isValidElement(icon)) {
|
|
24633
24877
|
var iconElement_1 = icon;
|
|
24634
|
-
return
|
|
24878
|
+
return import_react46.default.cloneElement(iconElement_1, {
|
|
24635
24879
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
24636
24880
|
onClick: function(event) {
|
|
24637
24881
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -24643,10 +24887,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
24643
24887
|
}
|
|
24644
24888
|
});
|
|
24645
24889
|
}
|
|
24646
|
-
return
|
|
24890
|
+
return import_react46.default.createElement(
|
|
24647
24891
|
"svg",
|
|
24648
24892
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
24649
|
-
|
|
24893
|
+
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
24894
|
);
|
|
24651
24895
|
};
|
|
24652
24896
|
var Portal = (
|
|
@@ -24677,7 +24921,7 @@ var Portal = (
|
|
|
24677
24921
|
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
24678
24922
|
};
|
|
24679
24923
|
return Portal2;
|
|
24680
|
-
}(
|
|
24924
|
+
}(import_react46.Component)
|
|
24681
24925
|
);
|
|
24682
24926
|
var focusableElementsSelector = "[tabindex], a, button, input, select, textarea";
|
|
24683
24927
|
var focusableFilter = function(node2) {
|
|
@@ -24704,7 +24948,7 @@ var TabLoop = (
|
|
|
24704
24948
|
var tabChildren = _this.getTabChildren();
|
|
24705
24949
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
24706
24950
|
};
|
|
24707
|
-
_this.tabLoopRef = (0,
|
|
24951
|
+
_this.tabLoopRef = (0, import_react46.createRef)();
|
|
24708
24952
|
return _this;
|
|
24709
24953
|
}
|
|
24710
24954
|
TabLoop2.prototype.render = function() {
|
|
@@ -24712,32 +24956,32 @@ var TabLoop = (
|
|
|
24712
24956
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
24713
24957
|
return this.props.children;
|
|
24714
24958
|
}
|
|
24715
|
-
return
|
|
24959
|
+
return import_react46.default.createElement(
|
|
24716
24960
|
"div",
|
|
24717
24961
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
24718
|
-
|
|
24962
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
24719
24963
|
this.props.children,
|
|
24720
|
-
|
|
24964
|
+
import_react46.default.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
24721
24965
|
);
|
|
24722
24966
|
};
|
|
24723
24967
|
TabLoop2.defaultProps = {
|
|
24724
24968
|
enableTabLoop: true
|
|
24725
24969
|
};
|
|
24726
24970
|
return TabLoop2;
|
|
24727
|
-
}(
|
|
24971
|
+
}(import_react46.Component)
|
|
24728
24972
|
);
|
|
24729
24973
|
function withFloating(Component3) {
|
|
24730
24974
|
var WithFloating = function(props) {
|
|
24731
24975
|
var _a2;
|
|
24732
24976
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
24733
|
-
var arrowRef = (0,
|
|
24977
|
+
var arrowRef = (0, import_react46.useRef)(null);
|
|
24734
24978
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
24735
24979
|
flip3({ padding: 15 }),
|
|
24736
24980
|
offset3(10),
|
|
24737
24981
|
arrow3({ element: arrowRef })
|
|
24738
24982
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
24739
24983
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
24740
|
-
return
|
|
24984
|
+
return import_react46.default.createElement(Component3, _assign({}, componentProps));
|
|
24741
24985
|
};
|
|
24742
24986
|
return WithFloating;
|
|
24743
24987
|
}
|
|
@@ -24762,33 +25006,33 @@ var PopperComponent = (
|
|
|
24762
25006
|
var popper = void 0;
|
|
24763
25007
|
if (!hidePopper) {
|
|
24764
25008
|
var classes = clsx("react-datepicker-popper", className);
|
|
24765
|
-
popper =
|
|
25009
|
+
popper = import_react46.default.createElement(
|
|
24766
25010
|
TabLoop,
|
|
24767
25011
|
{ enableTabLoop },
|
|
24768
|
-
|
|
25012
|
+
import_react46.default.createElement(
|
|
24769
25013
|
"div",
|
|
24770
25014
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
24771
25015
|
popperComponent,
|
|
24772
|
-
showArrow &&
|
|
25016
|
+
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
25017
|
)
|
|
24774
25018
|
);
|
|
24775
25019
|
}
|
|
24776
25020
|
if (this.props.popperContainer) {
|
|
24777
|
-
popper = (0,
|
|
25021
|
+
popper = (0, import_react46.createElement)(this.props.popperContainer, {}, popper);
|
|
24778
25022
|
}
|
|
24779
25023
|
if (portalId && !hidePopper) {
|
|
24780
|
-
popper =
|
|
25024
|
+
popper = import_react46.default.createElement(Portal, { portalId, portalHost }, popper);
|
|
24781
25025
|
}
|
|
24782
25026
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
24783
|
-
return
|
|
24784
|
-
|
|
25027
|
+
return import_react46.default.createElement(
|
|
25028
|
+
import_react46.default.Fragment,
|
|
24785
25029
|
null,
|
|
24786
|
-
|
|
25030
|
+
import_react46.default.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
24787
25031
|
popper
|
|
24788
25032
|
);
|
|
24789
25033
|
};
|
|
24790
25034
|
return PopperComponent2;
|
|
24791
|
-
}(
|
|
25035
|
+
}(import_react46.Component)
|
|
24792
25036
|
);
|
|
24793
25037
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
24794
25038
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -25402,7 +25646,7 @@ var DatePicker = (
|
|
|
25402
25646
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
25403
25647
|
return null;
|
|
25404
25648
|
}
|
|
25405
|
-
return
|
|
25649
|
+
return import_react46.default.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
25406
25650
|
_this.calendar = elem;
|
|
25407
25651
|
} }, _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
25652
|
};
|
|
@@ -25438,13 +25682,13 @@ var DatePicker = (
|
|
|
25438
25682
|
}));
|
|
25439
25683
|
}
|
|
25440
25684
|
}
|
|
25441
|
-
return
|
|
25685
|
+
return import_react46.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
25442
25686
|
};
|
|
25443
25687
|
_this.renderDateInput = function() {
|
|
25444
25688
|
var _a2, _b;
|
|
25445
25689
|
var _c;
|
|
25446
25690
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
25447
|
-
var customInput = _this.props.customInput ||
|
|
25691
|
+
var customInput = _this.props.customInput || import_react46.default.createElement("input", { type: "text" });
|
|
25448
25692
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
25449
25693
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
25450
25694
|
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 +25701,14 @@ var DatePicker = (
|
|
|
25457
25701
|
dateFormat,
|
|
25458
25702
|
locale
|
|
25459
25703
|
});
|
|
25460
|
-
return (0,
|
|
25704
|
+
return (0, import_react46.cloneElement)(customInput, (_b = {}, _b[customInputRef] = function(input) {
|
|
25461
25705
|
_this.input = input;
|
|
25462
25706
|
}, _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
25707
|
};
|
|
25464
25708
|
_this.renderClearButton = function() {
|
|
25465
25709
|
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
25710
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
25467
|
-
return
|
|
25711
|
+
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
25712
|
} else {
|
|
25469
25713
|
return null;
|
|
25470
25714
|
}
|
|
@@ -25565,10 +25809,10 @@ var DatePicker = (
|
|
|
25565
25809
|
if (calendarIconClassname) {
|
|
25566
25810
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
25567
25811
|
}
|
|
25568
|
-
return
|
|
25812
|
+
return import_react46.default.createElement(
|
|
25569
25813
|
"div",
|
|
25570
25814
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
25571
|
-
showIcon &&
|
|
25815
|
+
showIcon && import_react46.default.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
25572
25816
|
onClick: this.toggleCalendar
|
|
25573
25817
|
} : null)),
|
|
25574
25818
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -25581,25 +25825,25 @@ var DatePicker = (
|
|
|
25581
25825
|
if (this.props.inline)
|
|
25582
25826
|
return calendar;
|
|
25583
25827
|
if (this.props.withPortal) {
|
|
25584
|
-
var portalContainer = this.state.open ?
|
|
25828
|
+
var portalContainer = this.state.open ? import_react46.default.createElement(
|
|
25585
25829
|
TabLoop,
|
|
25586
25830
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
25587
|
-
|
|
25831
|
+
import_react46.default.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
25588
25832
|
) : null;
|
|
25589
25833
|
if (this.state.open && this.props.portalId) {
|
|
25590
|
-
portalContainer =
|
|
25834
|
+
portalContainer = import_react46.default.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
25591
25835
|
}
|
|
25592
|
-
return
|
|
25836
|
+
return import_react46.default.createElement(
|
|
25593
25837
|
"div",
|
|
25594
25838
|
null,
|
|
25595
25839
|
this.renderInputContainer(),
|
|
25596
25840
|
portalContainer
|
|
25597
25841
|
);
|
|
25598
25842
|
}
|
|
25599
|
-
return
|
|
25843
|
+
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
25844
|
};
|
|
25601
25845
|
return DatePicker2;
|
|
25602
|
-
}(
|
|
25846
|
+
}(import_react46.Component)
|
|
25603
25847
|
);
|
|
25604
25848
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
25605
25849
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
@@ -25742,33 +25986,33 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
25742
25986
|
}
|
|
25743
25987
|
|
|
25744
25988
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
25745
|
-
var
|
|
25989
|
+
var import_react48 = require("react");
|
|
25746
25990
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
25747
25991
|
function useStateManager(_ref3) {
|
|
25748
25992
|
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,
|
|
25993
|
+
var _useState = (0, import_react48.useState)(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
25994
|
+
var _useState3 = (0, import_react48.useState)(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
25995
|
+
var _useState5 = (0, import_react48.useState)(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
25996
|
+
var onChange2 = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
25753
25997
|
if (typeof propsOnChange === "function") {
|
|
25754
25998
|
propsOnChange(value2, actionMeta);
|
|
25755
25999
|
}
|
|
25756
26000
|
setStateValue(value2);
|
|
25757
26001
|
}, [propsOnChange]);
|
|
25758
|
-
var onInputChange = (0,
|
|
26002
|
+
var onInputChange = (0, import_react48.useCallback)(function(value2, actionMeta) {
|
|
25759
26003
|
var newValue;
|
|
25760
26004
|
if (typeof propsOnInputChange === "function") {
|
|
25761
26005
|
newValue = propsOnInputChange(value2, actionMeta);
|
|
25762
26006
|
}
|
|
25763
26007
|
setStateInputValue(newValue !== void 0 ? newValue : value2);
|
|
25764
26008
|
}, [propsOnInputChange]);
|
|
25765
|
-
var onMenuOpen = (0,
|
|
26009
|
+
var onMenuOpen = (0, import_react48.useCallback)(function() {
|
|
25766
26010
|
if (typeof propsOnMenuOpen === "function") {
|
|
25767
26011
|
propsOnMenuOpen();
|
|
25768
26012
|
}
|
|
25769
26013
|
setStateMenuIsOpen(true);
|
|
25770
26014
|
}, [propsOnMenuOpen]);
|
|
25771
|
-
var onMenuClose = (0,
|
|
26015
|
+
var onMenuClose = (0, import_react48.useCallback)(function() {
|
|
25772
26016
|
if (typeof propsOnMenuClose === "function") {
|
|
25773
26017
|
propsOnMenuClose();
|
|
25774
26018
|
}
|
|
@@ -25800,8 +26044,8 @@ function _extends() {
|
|
|
25800
26044
|
}
|
|
25801
26045
|
|
|
25802
26046
|
// node_modules/react-select/dist/react-select.esm.js
|
|
25803
|
-
var
|
|
25804
|
-
var
|
|
26047
|
+
var React15 = __toESM(require("react"));
|
|
26048
|
+
var import_react55 = require("react");
|
|
25805
26049
|
|
|
25806
26050
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
25807
26051
|
function _classCallCheck(a2, n4) {
|
|
@@ -25908,12 +26152,12 @@ function _toConsumableArray(r4) {
|
|
|
25908
26152
|
}
|
|
25909
26153
|
|
|
25910
26154
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
25911
|
-
var
|
|
25912
|
-
var
|
|
26155
|
+
var React14 = __toESM(require("react"));
|
|
26156
|
+
var import_react53 = require("react");
|
|
25913
26157
|
|
|
25914
26158
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
25915
|
-
var
|
|
25916
|
-
var
|
|
26159
|
+
var React12 = __toESM(require("react"));
|
|
26160
|
+
var import_react49 = require("react");
|
|
25917
26161
|
|
|
25918
26162
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
25919
26163
|
var isDevelopment = false;
|
|
@@ -27077,18 +27321,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27077
27321
|
}
|
|
27078
27322
|
|
|
27079
27323
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27080
|
-
var
|
|
27324
|
+
var React11 = __toESM(require("react"));
|
|
27081
27325
|
var isBrowser3 = typeof document !== "undefined";
|
|
27082
27326
|
var syncFallback = function syncFallback2(create) {
|
|
27083
27327
|
return create();
|
|
27084
27328
|
};
|
|
27085
|
-
var useInsertionEffect3 =
|
|
27329
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27086
27330
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27087
27331
|
|
|
27088
27332
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27089
27333
|
var isDevelopment3 = false;
|
|
27090
27334
|
var isBrowser4 = typeof document !== "undefined";
|
|
27091
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
27335
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27092
27336
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27093
27337
|
// because this module is primarily intended for the browser and node
|
|
27094
27338
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27101,20 +27345,20 @@ var EmotionCacheContext = /* @__PURE__ */ React11.createContext(
|
|
|
27101
27345
|
);
|
|
27102
27346
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
27103
27347
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
27104
|
-
return /* @__PURE__ */ (0,
|
|
27105
|
-
var cache = (0,
|
|
27348
|
+
return /* @__PURE__ */ (0, import_react49.forwardRef)(function(props, ref) {
|
|
27349
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27106
27350
|
return func(props, cache, ref);
|
|
27107
27351
|
});
|
|
27108
27352
|
};
|
|
27109
27353
|
if (!isBrowser4) {
|
|
27110
27354
|
withEmotionCache = function withEmotionCache3(func) {
|
|
27111
27355
|
return function(props) {
|
|
27112
|
-
var cache = (0,
|
|
27356
|
+
var cache = (0, import_react49.useContext)(EmotionCacheContext);
|
|
27113
27357
|
if (cache === null) {
|
|
27114
27358
|
cache = createCache({
|
|
27115
27359
|
key: "css"
|
|
27116
27360
|
});
|
|
27117
|
-
return /* @__PURE__ */
|
|
27361
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27118
27362
|
value: cache
|
|
27119
27363
|
}, func(props, cache));
|
|
27120
27364
|
} else {
|
|
@@ -27123,7 +27367,7 @@ if (!isBrowser4) {
|
|
|
27123
27367
|
};
|
|
27124
27368
|
};
|
|
27125
27369
|
}
|
|
27126
|
-
var ThemeContext = /* @__PURE__ */
|
|
27370
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27127
27371
|
var hasOwn = {}.hasOwnProperty;
|
|
27128
27372
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27129
27373
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27150,7 +27394,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27150
27394
|
serializedNames += " " + next2.name;
|
|
27151
27395
|
next2 = next2.next;
|
|
27152
27396
|
}
|
|
27153
|
-
return /* @__PURE__ */
|
|
27397
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27154
27398
|
__html: rules
|
|
27155
27399
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27156
27400
|
}
|
|
@@ -27169,7 +27413,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27169
27413
|
} else if (props.className != null) {
|
|
27170
27414
|
className = props.className + " ";
|
|
27171
27415
|
}
|
|
27172
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
27416
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27173
27417
|
className += cache.key + "-" + serialized.name;
|
|
27174
27418
|
var newProps = {};
|
|
27175
27419
|
for (var _key2 in props) {
|
|
@@ -27181,22 +27425,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27181
27425
|
if (ref) {
|
|
27182
27426
|
newProps.ref = ref;
|
|
27183
27427
|
}
|
|
27184
|
-
return /* @__PURE__ */
|
|
27428
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27185
27429
|
cache,
|
|
27186
27430
|
serialized,
|
|
27187
27431
|
isStringTag: typeof WrappedComponent === "string"
|
|
27188
|
-
}), /* @__PURE__ */
|
|
27432
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27189
27433
|
});
|
|
27190
27434
|
var Emotion$1 = Emotion;
|
|
27191
27435
|
|
|
27192
27436
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27193
|
-
var
|
|
27437
|
+
var React13 = __toESM(require("react"));
|
|
27194
27438
|
var import_extends2 = __toESM(require_extends());
|
|
27195
27439
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27196
|
-
var
|
|
27440
|
+
var jsx86 = function jsx87(type, props) {
|
|
27197
27441
|
var args = arguments;
|
|
27198
27442
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27199
|
-
return
|
|
27443
|
+
return React13.createElement.apply(void 0, args);
|
|
27200
27444
|
}
|
|
27201
27445
|
var argsLength = args.length;
|
|
27202
27446
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27205,13 +27449,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27205
27449
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27206
27450
|
createElementArgArray[i3] = args[i3];
|
|
27207
27451
|
}
|
|
27208
|
-
return
|
|
27452
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27209
27453
|
};
|
|
27210
27454
|
(function(_jsx) {
|
|
27211
27455
|
var JSX;
|
|
27212
27456
|
/* @__PURE__ */ (function(_JSX) {
|
|
27213
27457
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27214
|
-
})(
|
|
27458
|
+
})(jsx86 || (jsx86 = {}));
|
|
27215
27459
|
function css() {
|
|
27216
27460
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27217
27461
|
args[_key] = arguments[_key];
|
|
@@ -27241,15 +27485,15 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27241
27485
|
}
|
|
27242
27486
|
|
|
27243
27487
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27244
|
-
var
|
|
27488
|
+
var import_react52 = require("react");
|
|
27245
27489
|
var import_react_dom6 = require("react-dom");
|
|
27246
27490
|
|
|
27247
27491
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27248
|
-
var
|
|
27492
|
+
var import_react50 = require("react");
|
|
27249
27493
|
var isClient3 = typeof document !== "undefined";
|
|
27250
27494
|
var noop6 = function noop7() {
|
|
27251
27495
|
};
|
|
27252
|
-
var index3 = isClient3 ?
|
|
27496
|
+
var index3 = isClient3 ? import_react50.useLayoutEffect : noop6;
|
|
27253
27497
|
|
|
27254
27498
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27255
27499
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
@@ -27583,13 +27827,13 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
27583
27827
|
marginTop: spacing2.menuGutter
|
|
27584
27828
|
});
|
|
27585
27829
|
};
|
|
27586
|
-
var PortalPlacementContext = /* @__PURE__ */ (0,
|
|
27830
|
+
var PortalPlacementContext = /* @__PURE__ */ (0, import_react52.createContext)(null);
|
|
27587
27831
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
27588
27832
|
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,
|
|
27833
|
+
var _ref3 = (0, import_react52.useContext)(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
27834
|
+
var ref = (0, import_react52.useRef)(null);
|
|
27835
|
+
var _useState = (0, import_react52.useState)(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
27836
|
+
var _useState3 = (0, import_react52.useState)(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
27593
27837
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
27594
27838
|
index3(function() {
|
|
27595
27839
|
var menuEl = ref.current;
|
|
@@ -27619,7 +27863,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27619
27863
|
};
|
|
27620
27864
|
var Menu = function Menu2(props) {
|
|
27621
27865
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27622
|
-
return
|
|
27866
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
27623
27867
|
menu: true
|
|
27624
27868
|
}), {
|
|
27625
27869
|
ref: innerRef
|
|
@@ -27641,7 +27885,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27641
27885
|
};
|
|
27642
27886
|
var MenuList = function MenuList2(props) {
|
|
27643
27887
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27644
|
-
return
|
|
27888
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27645
27889
|
"menu-list": true,
|
|
27646
27890
|
"menu-list--is-multi": isMulti
|
|
27647
27891
|
}), {
|
|
@@ -27661,7 +27905,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27661
27905
|
var loadingMessageCSS = noticeCSS;
|
|
27662
27906
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27663
27907
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27664
|
-
return
|
|
27908
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27665
27909
|
children,
|
|
27666
27910
|
innerProps
|
|
27667
27911
|
}), "noOptionsMessage", {
|
|
@@ -27671,7 +27915,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27671
27915
|
};
|
|
27672
27916
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27673
27917
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27674
|
-
return
|
|
27918
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27675
27919
|
children,
|
|
27676
27920
|
innerProps
|
|
27677
27921
|
}), "loadingMessage", {
|
|
@@ -27691,16 +27935,16 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
27691
27935
|
};
|
|
27692
27936
|
var MenuPortal = function MenuPortal2(props) {
|
|
27693
27937
|
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,
|
|
27938
|
+
var menuPortalRef = (0, import_react52.useRef)(null);
|
|
27939
|
+
var cleanupRef = (0, import_react52.useRef)(null);
|
|
27940
|
+
var _useState5 = (0, import_react52.useState)(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
27941
|
+
var portalPlacementContext = (0, import_react52.useMemo)(function() {
|
|
27698
27942
|
return {
|
|
27699
27943
|
setPortalPlacement
|
|
27700
27944
|
};
|
|
27701
27945
|
}, []);
|
|
27702
|
-
var _useState7 = (0,
|
|
27703
|
-
var updateComputedPosition = (0,
|
|
27946
|
+
var _useState7 = (0, import_react52.useState)(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
27947
|
+
var updateComputedPosition = (0, import_react52.useCallback)(function() {
|
|
27704
27948
|
if (!controlElement) return;
|
|
27705
27949
|
var rect = getBoundingClientObj(controlElement);
|
|
27706
27950
|
var scrollDistance = menuPosition === "fixed" ? 0 : window.pageYOffset;
|
|
@@ -27715,7 +27959,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27715
27959
|
index3(function() {
|
|
27716
27960
|
updateComputedPosition();
|
|
27717
27961
|
}, [updateComputedPosition]);
|
|
27718
|
-
var runAutoUpdate = (0,
|
|
27962
|
+
var runAutoUpdate = (0, import_react52.useCallback)(function() {
|
|
27719
27963
|
if (typeof cleanupRef.current === "function") {
|
|
27720
27964
|
cleanupRef.current();
|
|
27721
27965
|
cleanupRef.current = null;
|
|
@@ -27729,12 +27973,12 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27729
27973
|
index3(function() {
|
|
27730
27974
|
runAutoUpdate();
|
|
27731
27975
|
}, [runAutoUpdate]);
|
|
27732
|
-
var setMenuPortalElement = (0,
|
|
27976
|
+
var setMenuPortalElement = (0, import_react52.useCallback)(function(menuPortalElement) {
|
|
27733
27977
|
menuPortalRef.current = menuPortalElement;
|
|
27734
27978
|
runAutoUpdate();
|
|
27735
27979
|
}, [runAutoUpdate]);
|
|
27736
27980
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27737
|
-
var menuWrapper =
|
|
27981
|
+
var menuWrapper = jsx86("div", _extends({
|
|
27738
27982
|
ref: setMenuPortalElement
|
|
27739
27983
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27740
27984
|
offset: computedPosition.offset,
|
|
@@ -27743,7 +27987,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27743
27987
|
}), "menuPortal", {
|
|
27744
27988
|
"menu-portal": true
|
|
27745
27989
|
}), innerProps), children);
|
|
27746
|
-
return
|
|
27990
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
27747
27991
|
value: portalPlacementContext
|
|
27748
27992
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
27749
27993
|
};
|
|
@@ -27759,7 +28003,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27759
28003
|
};
|
|
27760
28004
|
var SelectContainer = function SelectContainer2(props) {
|
|
27761
28005
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27762
|
-
return
|
|
28006
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
27763
28007
|
"--is-disabled": isDisabled,
|
|
27764
28008
|
"--is-rtl": isRtl
|
|
27765
28009
|
}), innerProps), children);
|
|
@@ -27780,7 +28024,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
27780
28024
|
};
|
|
27781
28025
|
var ValueContainer = function ValueContainer2(props) {
|
|
27782
28026
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
27783
|
-
return
|
|
28027
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
27784
28028
|
"value-container": true,
|
|
27785
28029
|
"value-container--is-multi": isMulti,
|
|
27786
28030
|
"value-container--has-value": hasValue
|
|
@@ -27796,7 +28040,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
27796
28040
|
};
|
|
27797
28041
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
27798
28042
|
var children = props.children, innerProps = props.innerProps;
|
|
27799
|
-
return
|
|
28043
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
27800
28044
|
indicators: true
|
|
27801
28045
|
}), innerProps), children);
|
|
27802
28046
|
};
|
|
@@ -27817,7 +28061,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27817
28061
|
};
|
|
27818
28062
|
var Svg = function Svg2(_ref3) {
|
|
27819
28063
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
27820
|
-
return
|
|
28064
|
+
return jsx86("svg", _extends({
|
|
27821
28065
|
height: size4,
|
|
27822
28066
|
width: size4,
|
|
27823
28067
|
viewBox: "0 0 20 20",
|
|
@@ -27827,16 +28071,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
27827
28071
|
}, props));
|
|
27828
28072
|
};
|
|
27829
28073
|
var CrossIcon = function CrossIcon2(props) {
|
|
27830
|
-
return
|
|
28074
|
+
return jsx86(Svg, _extends({
|
|
27831
28075
|
size: 20
|
|
27832
|
-
}, props),
|
|
28076
|
+
}, props), jsx86("path", {
|
|
27833
28077
|
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
28078
|
}));
|
|
27835
28079
|
};
|
|
27836
28080
|
var DownChevron = function DownChevron2(props) {
|
|
27837
|
-
return
|
|
28081
|
+
return jsx86(Svg, _extends({
|
|
27838
28082
|
size: 20
|
|
27839
|
-
}, props),
|
|
28083
|
+
}, props), jsx86("path", {
|
|
27840
28084
|
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
28085
|
}));
|
|
27842
28086
|
};
|
|
@@ -27857,18 +28101,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
27857
28101
|
var dropdownIndicatorCSS = baseCSS;
|
|
27858
28102
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
27859
28103
|
var children = props.children, innerProps = props.innerProps;
|
|
27860
|
-
return
|
|
28104
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
27861
28105
|
indicator: true,
|
|
27862
28106
|
"dropdown-indicator": true
|
|
27863
|
-
}), innerProps), children ||
|
|
28107
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
27864
28108
|
};
|
|
27865
28109
|
var clearIndicatorCSS = baseCSS;
|
|
27866
28110
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
27867
28111
|
var children = props.children, innerProps = props.innerProps;
|
|
27868
|
-
return
|
|
28112
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
27869
28113
|
indicator: true,
|
|
27870
28114
|
"clear-indicator": true
|
|
27871
|
-
}), innerProps), children ||
|
|
28115
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
27872
28116
|
};
|
|
27873
28117
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
27874
28118
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -27884,7 +28128,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
27884
28128
|
};
|
|
27885
28129
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
27886
28130
|
var innerProps = props.innerProps;
|
|
27887
|
-
return
|
|
28131
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
27888
28132
|
"indicator-separator": true
|
|
27889
28133
|
})));
|
|
27890
28134
|
};
|
|
@@ -27908,7 +28152,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
27908
28152
|
};
|
|
27909
28153
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
27910
28154
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
27911
|
-
return
|
|
28155
|
+
return jsx86("span", {
|
|
27912
28156
|
css: /* @__PURE__ */ css({
|
|
27913
28157
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
27914
28158
|
backgroundColor: "currentColor",
|
|
@@ -27923,20 +28167,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
27923
28167
|
};
|
|
27924
28168
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
27925
28169
|
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
|
|
28170
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27927
28171
|
innerProps,
|
|
27928
28172
|
isRtl,
|
|
27929
28173
|
size: size4
|
|
27930
28174
|
}), "loadingIndicator", {
|
|
27931
28175
|
indicator: true,
|
|
27932
28176
|
"loading-indicator": true
|
|
27933
|
-
}), innerProps),
|
|
28177
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
27934
28178
|
delay: 0,
|
|
27935
28179
|
offset: isRtl
|
|
27936
|
-
}),
|
|
28180
|
+
}), jsx86(LoadingDot, {
|
|
27937
28181
|
delay: 160,
|
|
27938
28182
|
offset: true
|
|
27939
|
-
}),
|
|
28183
|
+
}), jsx86(LoadingDot, {
|
|
27940
28184
|
delay: 320,
|
|
27941
28185
|
offset: !isRtl
|
|
27942
28186
|
}));
|
|
@@ -27968,7 +28212,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
27968
28212
|
};
|
|
27969
28213
|
var Control = function Control2(props) {
|
|
27970
28214
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
27971
|
-
return
|
|
28215
|
+
return jsx86("div", _extends({
|
|
27972
28216
|
ref: innerRef
|
|
27973
28217
|
}, getStyleProps(props, "control", {
|
|
27974
28218
|
control: true,
|
|
@@ -27990,15 +28234,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
27990
28234
|
};
|
|
27991
28235
|
var Group = function Group2(props) {
|
|
27992
28236
|
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
|
|
28237
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
27994
28238
|
group: true
|
|
27995
|
-
}), innerProps),
|
|
28239
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
27996
28240
|
selectProps,
|
|
27997
28241
|
theme,
|
|
27998
28242
|
getStyles,
|
|
27999
28243
|
getClassNames,
|
|
28000
28244
|
cx
|
|
28001
|
-
}), label),
|
|
28245
|
+
}), label), jsx86("div", null, children));
|
|
28002
28246
|
};
|
|
28003
28247
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28004
28248
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28020,7 +28264,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28020
28264
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28021
28265
|
_cleanCommonProps.data;
|
|
28022
28266
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28023
|
-
return
|
|
28267
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28024
28268
|
"group-heading": true
|
|
28025
28269
|
}), innerProps));
|
|
28026
28270
|
};
|
|
@@ -28072,11 +28316,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28072
28316
|
var Input = function Input2(props) {
|
|
28073
28317
|
var cx = props.cx, value = props.value;
|
|
28074
28318
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28075
|
-
return
|
|
28319
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28076
28320
|
"input-container": true
|
|
28077
28321
|
}), {
|
|
28078
28322
|
"data-value": value || ""
|
|
28079
|
-
}),
|
|
28323
|
+
}), jsx86("input", _extends({
|
|
28080
28324
|
className: cx({
|
|
28081
28325
|
input: true
|
|
28082
28326
|
}, inputClassName),
|
|
@@ -28130,35 +28374,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28130
28374
|
};
|
|
28131
28375
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28132
28376
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28133
|
-
return
|
|
28377
|
+
return jsx86("div", innerProps, children);
|
|
28134
28378
|
};
|
|
28135
28379
|
var MultiValueContainer = MultiValueGeneric;
|
|
28136
28380
|
var MultiValueLabel = MultiValueGeneric;
|
|
28137
28381
|
function MultiValueRemove(_ref5) {
|
|
28138
28382
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28139
|
-
return
|
|
28383
|
+
return jsx86("div", _extends({
|
|
28140
28384
|
role: "button"
|
|
28141
|
-
}, innerProps), children ||
|
|
28385
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28142
28386
|
size: 14
|
|
28143
28387
|
}));
|
|
28144
28388
|
}
|
|
28145
28389
|
var MultiValue = function MultiValue2(props) {
|
|
28146
28390
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28147
28391
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28148
|
-
return
|
|
28392
|
+
return jsx86(Container, {
|
|
28149
28393
|
data,
|
|
28150
28394
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28151
28395
|
"multi-value": true,
|
|
28152
28396
|
"multi-value--is-disabled": isDisabled
|
|
28153
28397
|
})), innerProps),
|
|
28154
28398
|
selectProps
|
|
28155
|
-
},
|
|
28399
|
+
}, jsx86(Label, {
|
|
28156
28400
|
data,
|
|
28157
28401
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28158
28402
|
"multi-value__label": true
|
|
28159
28403
|
})),
|
|
28160
28404
|
selectProps
|
|
28161
|
-
}, children),
|
|
28405
|
+
}, children), jsx86(Remove, {
|
|
28162
28406
|
data,
|
|
28163
28407
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28164
28408
|
"multi-value__remove": true
|
|
@@ -28191,7 +28435,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28191
28435
|
};
|
|
28192
28436
|
var Option = function Option2(props) {
|
|
28193
28437
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28194
|
-
return
|
|
28438
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28195
28439
|
option: true,
|
|
28196
28440
|
"option--is-disabled": isDisabled,
|
|
28197
28441
|
"option--is-focused": isFocused,
|
|
@@ -28215,7 +28459,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28215
28459
|
};
|
|
28216
28460
|
var Placeholder = function Placeholder2(props) {
|
|
28217
28461
|
var children = props.children, innerProps = props.innerProps;
|
|
28218
|
-
return
|
|
28462
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28219
28463
|
placeholder: true
|
|
28220
28464
|
}), innerProps), children);
|
|
28221
28465
|
};
|
|
@@ -28237,7 +28481,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28237
28481
|
};
|
|
28238
28482
|
var SingleValue = function SingleValue2(props) {
|
|
28239
28483
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28240
|
-
return
|
|
28484
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28241
28485
|
"single-value": true,
|
|
28242
28486
|
"single-value--is-disabled": isDisabled
|
|
28243
28487
|
}), innerProps), children);
|
|
@@ -28339,7 +28583,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28339
28583
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28340
28584
|
};
|
|
28341
28585
|
var A11yText = function A11yText2(props) {
|
|
28342
|
-
return
|
|
28586
|
+
return jsx86("span", _extends({
|
|
28343
28587
|
css: _ref
|
|
28344
28588
|
}, props));
|
|
28345
28589
|
};
|
|
@@ -28400,10 +28644,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28400
28644
|
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
28645
|
var ariaLabel = selectProps["aria-label"];
|
|
28402
28646
|
var ariaLive = selectProps["aria-live"];
|
|
28403
|
-
var messages = (0,
|
|
28647
|
+
var messages = (0, import_react53.useMemo)(function() {
|
|
28404
28648
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
28405
28649
|
}, [ariaLiveMessages]);
|
|
28406
|
-
var ariaSelected = (0,
|
|
28650
|
+
var ariaSelected = (0, import_react53.useMemo)(function() {
|
|
28407
28651
|
var message2 = "";
|
|
28408
28652
|
if (ariaSelection && messages.onChange) {
|
|
28409
28653
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -28425,7 +28669,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28425
28669
|
}
|
|
28426
28670
|
return message2;
|
|
28427
28671
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
28428
|
-
var ariaFocused = (0,
|
|
28672
|
+
var ariaFocused = (0, import_react53.useMemo)(function() {
|
|
28429
28673
|
var focusMsg = "";
|
|
28430
28674
|
var focused = focusedOption || focusedValue;
|
|
28431
28675
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -28444,7 +28688,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28444
28688
|
}
|
|
28445
28689
|
return focusMsg;
|
|
28446
28690
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
28447
|
-
var ariaResults = (0,
|
|
28691
|
+
var ariaResults = (0, import_react53.useMemo)(function() {
|
|
28448
28692
|
var resultsMsg = "";
|
|
28449
28693
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
28450
28694
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -28458,7 +28702,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28458
28702
|
return resultsMsg;
|
|
28459
28703
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
28460
28704
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
28461
|
-
var ariaGuidance = (0,
|
|
28705
|
+
var ariaGuidance = (0, import_react53.useMemo)(function() {
|
|
28462
28706
|
var guidanceMsg = "";
|
|
28463
28707
|
if (messages.guidance) {
|
|
28464
28708
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -28474,18 +28718,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28474
28718
|
}
|
|
28475
28719
|
return guidanceMsg;
|
|
28476
28720
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28477
|
-
var ScreenReaderText =
|
|
28721
|
+
var ScreenReaderText = jsx86(import_react53.Fragment, null, jsx86("span", {
|
|
28478
28722
|
id: "aria-selection"
|
|
28479
|
-
}, ariaSelected),
|
|
28723
|
+
}, ariaSelected), jsx86("span", {
|
|
28480
28724
|
id: "aria-focused"
|
|
28481
|
-
}, ariaFocused),
|
|
28725
|
+
}, ariaFocused), jsx86("span", {
|
|
28482
28726
|
id: "aria-results"
|
|
28483
|
-
}, ariaResults),
|
|
28727
|
+
}, ariaResults), jsx86("span", {
|
|
28484
28728
|
id: "aria-guidance"
|
|
28485
28729
|
}, ariaGuidance));
|
|
28486
|
-
return
|
|
28730
|
+
return jsx86(import_react53.Fragment, null, jsx86(A11yText$1, {
|
|
28487
28731
|
id
|
|
28488
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28732
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
28489
28733
|
"aria-live": ariaLive,
|
|
28490
28734
|
"aria-atomic": "false",
|
|
28491
28735
|
"aria-relevant": "additions text",
|
|
@@ -28798,7 +29042,7 @@ var _excluded4 = ["innerRef"];
|
|
|
28798
29042
|
function DummyInput(_ref3) {
|
|
28799
29043
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
28800
29044
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
28801
|
-
return
|
|
29045
|
+
return jsx86("input", _extends({
|
|
28802
29046
|
ref: innerRef
|
|
28803
29047
|
}, filteredProps, {
|
|
28804
29048
|
css: /* @__PURE__ */ css({
|
|
@@ -28830,11 +29074,11 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
28830
29074
|
};
|
|
28831
29075
|
function useScrollCapture(_ref3) {
|
|
28832
29076
|
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,
|
|
29077
|
+
var isBottom = (0, import_react53.useRef)(false);
|
|
29078
|
+
var isTop = (0, import_react53.useRef)(false);
|
|
29079
|
+
var touchStart = (0, import_react53.useRef)(0);
|
|
29080
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29081
|
+
var handleEventDelta = (0, import_react53.useCallback)(function(event, delta) {
|
|
28838
29082
|
if (scrollTarget.current === null) return;
|
|
28839
29083
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
28840
29084
|
var target = scrollTarget.current;
|
|
@@ -28868,17 +29112,17 @@ function useScrollCapture(_ref3) {
|
|
|
28868
29112
|
cancelScroll(event);
|
|
28869
29113
|
}
|
|
28870
29114
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
28871
|
-
var onWheel = (0,
|
|
29115
|
+
var onWheel = (0, import_react53.useCallback)(function(event) {
|
|
28872
29116
|
handleEventDelta(event, event.deltaY);
|
|
28873
29117
|
}, [handleEventDelta]);
|
|
28874
|
-
var onTouchStart = (0,
|
|
29118
|
+
var onTouchStart = (0, import_react53.useCallback)(function(event) {
|
|
28875
29119
|
touchStart.current = event.changedTouches[0].clientY;
|
|
28876
29120
|
}, []);
|
|
28877
|
-
var onTouchMove = (0,
|
|
29121
|
+
var onTouchMove = (0, import_react53.useCallback)(function(event) {
|
|
28878
29122
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
28879
29123
|
handleEventDelta(event, deltaY);
|
|
28880
29124
|
}, [handleEventDelta]);
|
|
28881
|
-
var startListening = (0,
|
|
29125
|
+
var startListening = (0, import_react53.useCallback)(function(el) {
|
|
28882
29126
|
if (!el) return;
|
|
28883
29127
|
var notPassive = supportsPassiveEvents ? {
|
|
28884
29128
|
passive: false
|
|
@@ -28887,13 +29131,13 @@ function useScrollCapture(_ref3) {
|
|
|
28887
29131
|
el.addEventListener("touchstart", onTouchStart, notPassive);
|
|
28888
29132
|
el.addEventListener("touchmove", onTouchMove, notPassive);
|
|
28889
29133
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28890
|
-
var stopListening = (0,
|
|
29134
|
+
var stopListening = (0, import_react53.useCallback)(function(el) {
|
|
28891
29135
|
if (!el) return;
|
|
28892
29136
|
el.removeEventListener("wheel", onWheel, false);
|
|
28893
29137
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
28894
29138
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
28895
29139
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28896
|
-
(0,
|
|
29140
|
+
(0, import_react53.useEffect)(function() {
|
|
28897
29141
|
if (!isEnabled) return;
|
|
28898
29142
|
var element = scrollTarget.current;
|
|
28899
29143
|
startListening(element);
|
|
@@ -28940,9 +29184,9 @@ var listenerOptions = {
|
|
|
28940
29184
|
};
|
|
28941
29185
|
function useScrollLock(_ref3) {
|
|
28942
29186
|
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,
|
|
29187
|
+
var originalStyles = (0, import_react53.useRef)({});
|
|
29188
|
+
var scrollTarget = (0, import_react53.useRef)(null);
|
|
29189
|
+
var addScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
28946
29190
|
if (!canUseDOM) return;
|
|
28947
29191
|
var target = document.body;
|
|
28948
29192
|
var targetStyle = target && target.style;
|
|
@@ -28975,7 +29219,7 @@ function useScrollLock(_ref3) {
|
|
|
28975
29219
|
}
|
|
28976
29220
|
activeScrollLocks += 1;
|
|
28977
29221
|
}, [accountForScrollbars]);
|
|
28978
|
-
var removeScrollLock = (0,
|
|
29222
|
+
var removeScrollLock = (0, import_react53.useCallback)(function(touchScrollTarget) {
|
|
28979
29223
|
if (!canUseDOM) return;
|
|
28980
29224
|
var target = document.body;
|
|
28981
29225
|
var targetStyle = target && target.style;
|
|
@@ -28996,7 +29240,7 @@ function useScrollLock(_ref3) {
|
|
|
28996
29240
|
}
|
|
28997
29241
|
}
|
|
28998
29242
|
}, [accountForScrollbars]);
|
|
28999
|
-
(0,
|
|
29243
|
+
(0, import_react53.useEffect)(function() {
|
|
29000
29244
|
if (!isEnabled) return;
|
|
29001
29245
|
var element = scrollTarget.current;
|
|
29002
29246
|
addScrollLock(element);
|
|
@@ -29040,7 +29284,7 @@ function ScrollManager(_ref3) {
|
|
|
29040
29284
|
setScrollCaptureTarget(element);
|
|
29041
29285
|
setScrollLockTarget(element);
|
|
29042
29286
|
};
|
|
29043
|
-
return
|
|
29287
|
+
return jsx86(import_react53.Fragment, null, lockEnabled && jsx86("div", {
|
|
29044
29288
|
onClick: blurSelectInput,
|
|
29045
29289
|
css: _ref2$1
|
|
29046
29290
|
}), children(targetRef));
|
|
@@ -29059,7 +29303,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29059
29303
|
};
|
|
29060
29304
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29061
29305
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29062
|
-
return
|
|
29306
|
+
return jsx86("input", {
|
|
29063
29307
|
required: true,
|
|
29064
29308
|
name: name2,
|
|
29065
29309
|
tabIndex: -1,
|
|
@@ -30200,7 +30444,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30200
30444
|
"aria-describedby": this.getElementId("placeholder")
|
|
30201
30445
|
});
|
|
30202
30446
|
if (!isSearchable) {
|
|
30203
|
-
return /* @__PURE__ */
|
|
30447
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30204
30448
|
id,
|
|
30205
30449
|
innerRef: this.getInputRef,
|
|
30206
30450
|
onBlur: this.onInputBlur,
|
|
@@ -30213,7 +30457,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30213
30457
|
value: ""
|
|
30214
30458
|
}, ariaAttributes));
|
|
30215
30459
|
}
|
|
30216
|
-
return /* @__PURE__ */
|
|
30460
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30217
30461
|
autoCapitalize: "none",
|
|
30218
30462
|
autoComplete: "off",
|
|
30219
30463
|
autoCorrect: "off",
|
|
@@ -30241,7 +30485,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30241
30485
|
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
30486
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30243
30487
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30244
|
-
return inputValue ? null : /* @__PURE__ */
|
|
30488
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30245
30489
|
key: "placeholder",
|
|
30246
30490
|
isDisabled,
|
|
30247
30491
|
isFocused,
|
|
@@ -30254,7 +30498,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30254
30498
|
return selectValue.map(function(opt, index4) {
|
|
30255
30499
|
var isOptionFocused = opt === focusedValue;
|
|
30256
30500
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
30257
|
-
return /* @__PURE__ */
|
|
30501
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
30258
30502
|
components: {
|
|
30259
30503
|
Container: MultiValueContainer2,
|
|
30260
30504
|
Label: MultiValueLabel2,
|
|
@@ -30283,7 +30527,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30283
30527
|
return null;
|
|
30284
30528
|
}
|
|
30285
30529
|
var singleValue = selectValue[0];
|
|
30286
|
-
return /* @__PURE__ */
|
|
30530
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
30287
30531
|
data: singleValue,
|
|
30288
30532
|
isDisabled
|
|
30289
30533
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -30303,7 +30547,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30303
30547
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
30304
30548
|
"aria-hidden": "true"
|
|
30305
30549
|
};
|
|
30306
|
-
return /* @__PURE__ */
|
|
30550
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
30307
30551
|
innerProps,
|
|
30308
30552
|
isFocused
|
|
30309
30553
|
}));
|
|
@@ -30319,7 +30563,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30319
30563
|
var innerProps = {
|
|
30320
30564
|
"aria-hidden": "true"
|
|
30321
30565
|
};
|
|
30322
|
-
return /* @__PURE__ */
|
|
30566
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
30323
30567
|
innerProps,
|
|
30324
30568
|
isDisabled,
|
|
30325
30569
|
isFocused
|
|
@@ -30333,7 +30577,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30333
30577
|
var commonProps = this.commonProps;
|
|
30334
30578
|
var isDisabled = this.props.isDisabled;
|
|
30335
30579
|
var isFocused = this.state.isFocused;
|
|
30336
|
-
return /* @__PURE__ */
|
|
30580
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
30337
30581
|
isDisabled,
|
|
30338
30582
|
isFocused
|
|
30339
30583
|
}));
|
|
@@ -30351,7 +30595,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30351
30595
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
30352
30596
|
"aria-hidden": "true"
|
|
30353
30597
|
};
|
|
30354
|
-
return /* @__PURE__ */
|
|
30598
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
30355
30599
|
innerProps,
|
|
30356
30600
|
isDisabled,
|
|
30357
30601
|
isFocused
|
|
@@ -30386,7 +30630,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30386
30630
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
30387
30631
|
// is not supported on Apple devices
|
|
30388
30632
|
};
|
|
30389
|
-
return /* @__PURE__ */
|
|
30633
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
30390
30634
|
innerProps,
|
|
30391
30635
|
data,
|
|
30392
30636
|
isDisabled,
|
|
@@ -30406,7 +30650,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30406
30650
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
30407
30651
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
30408
30652
|
var headingId = "".concat(groupId, "-heading");
|
|
30409
|
-
return /* @__PURE__ */
|
|
30653
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
30410
30654
|
key: groupId,
|
|
30411
30655
|
data: _data,
|
|
30412
30656
|
options: options2,
|
|
@@ -30428,13 +30672,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30428
30672
|
inputValue
|
|
30429
30673
|
});
|
|
30430
30674
|
if (message2 === null) return null;
|
|
30431
|
-
menuUI = /* @__PURE__ */
|
|
30675
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
30432
30676
|
} else {
|
|
30433
30677
|
var _message = noOptionsMessage2({
|
|
30434
30678
|
inputValue
|
|
30435
30679
|
});
|
|
30436
30680
|
if (_message === null) return null;
|
|
30437
|
-
menuUI = /* @__PURE__ */
|
|
30681
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
30438
30682
|
}
|
|
30439
30683
|
var menuPlacementProps = {
|
|
30440
30684
|
minMenuHeight,
|
|
@@ -30443,9 +30687,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30443
30687
|
menuPosition,
|
|
30444
30688
|
menuShouldScrollIntoView
|
|
30445
30689
|
};
|
|
30446
|
-
var menuElement = /* @__PURE__ */
|
|
30690
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
30447
30691
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
30448
|
-
return /* @__PURE__ */
|
|
30692
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
30449
30693
|
innerRef: ref,
|
|
30450
30694
|
innerProps: {
|
|
30451
30695
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -30453,13 +30697,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30453
30697
|
},
|
|
30454
30698
|
isLoading,
|
|
30455
30699
|
placement
|
|
30456
|
-
}), /* @__PURE__ */
|
|
30700
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
30457
30701
|
captureEnabled: captureMenuScroll,
|
|
30458
30702
|
onTopArrive: onMenuScrollToTop,
|
|
30459
30703
|
onBottomArrive: onMenuScrollToBottom,
|
|
30460
30704
|
lockEnabled: menuShouldBlockScroll
|
|
30461
30705
|
}, function(scrollTargetRef) {
|
|
30462
|
-
return /* @__PURE__ */
|
|
30706
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
30463
30707
|
innerRef: function innerRef(instance2) {
|
|
30464
30708
|
_this4.getMenuListRef(instance2);
|
|
30465
30709
|
scrollTargetRef(instance2);
|
|
@@ -30475,7 +30719,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30475
30719
|
}), menuUI);
|
|
30476
30720
|
}));
|
|
30477
30721
|
});
|
|
30478
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
30722
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
30479
30723
|
appendTo: menuPortalTarget,
|
|
30480
30724
|
controlElement: this.controlRef,
|
|
30481
30725
|
menuPlacement,
|
|
@@ -30489,7 +30733,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30489
30733
|
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
30734
|
var selectValue = this.state.selectValue;
|
|
30491
30735
|
if (required && !this.hasValue() && !isDisabled) {
|
|
30492
|
-
return /* @__PURE__ */
|
|
30736
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
30493
30737
|
name: name2,
|
|
30494
30738
|
onFocus: this.onValueInputFocus
|
|
30495
30739
|
});
|
|
@@ -30500,29 +30744,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30500
30744
|
var value = selectValue.map(function(opt) {
|
|
30501
30745
|
return _this5.getOptionValue(opt);
|
|
30502
30746
|
}).join(delimiter2);
|
|
30503
|
-
return /* @__PURE__ */
|
|
30747
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30504
30748
|
name: name2,
|
|
30505
30749
|
type: "hidden",
|
|
30506
30750
|
value
|
|
30507
30751
|
});
|
|
30508
30752
|
} else {
|
|
30509
30753
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
30510
|
-
return /* @__PURE__ */
|
|
30754
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30511
30755
|
key: "i-".concat(i3),
|
|
30512
30756
|
name: name2,
|
|
30513
30757
|
type: "hidden",
|
|
30514
30758
|
value: _this5.getOptionValue(opt)
|
|
30515
30759
|
});
|
|
30516
|
-
}) : /* @__PURE__ */
|
|
30760
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
30517
30761
|
name: name2,
|
|
30518
30762
|
type: "hidden",
|
|
30519
30763
|
value: ""
|
|
30520
30764
|
});
|
|
30521
|
-
return /* @__PURE__ */
|
|
30765
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
30522
30766
|
}
|
|
30523
30767
|
} else {
|
|
30524
30768
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
30525
|
-
return /* @__PURE__ */
|
|
30769
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
30526
30770
|
name: name2,
|
|
30527
30771
|
type: "hidden",
|
|
30528
30772
|
value: _value
|
|
@@ -30535,7 +30779,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30535
30779
|
var commonProps = this.commonProps;
|
|
30536
30780
|
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
30781
|
var focusableOptions = this.getFocusableOptions();
|
|
30538
|
-
return /* @__PURE__ */
|
|
30782
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
30539
30783
|
id: this.getElementId("live-region"),
|
|
30540
30784
|
ariaSelection,
|
|
30541
30785
|
focusedOption,
|
|
@@ -30553,7 +30797,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30553
30797
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
30554
30798
|
var isFocused = this.state.isFocused;
|
|
30555
30799
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
30556
|
-
return /* @__PURE__ */
|
|
30800
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
30557
30801
|
className,
|
|
30558
30802
|
innerProps: {
|
|
30559
30803
|
id,
|
|
@@ -30561,7 +30805,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30561
30805
|
},
|
|
30562
30806
|
isDisabled,
|
|
30563
30807
|
isFocused
|
|
30564
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
30808
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
30565
30809
|
innerRef: this.getControlRef,
|
|
30566
30810
|
innerProps: {
|
|
30567
30811
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -30570,9 +30814,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30570
30814
|
isDisabled,
|
|
30571
30815
|
isFocused,
|
|
30572
30816
|
menuIsOpen
|
|
30573
|
-
}), /* @__PURE__ */
|
|
30817
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
30574
30818
|
isDisabled
|
|
30575
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
30819
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
30576
30820
|
isDisabled
|
|
30577
30821
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
30578
30822
|
}
|
|
@@ -30623,7 +30867,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30623
30867
|
}
|
|
30624
30868
|
}]);
|
|
30625
30869
|
return Select2;
|
|
30626
|
-
}(
|
|
30870
|
+
}(import_react53.Component);
|
|
30627
30871
|
Select.defaultProps = defaultProps;
|
|
30628
30872
|
|
|
30629
30873
|
// node_modules/react-select/dist/react-select.esm.js
|
|
@@ -30639,9 +30883,9 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
30639
30883
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
30640
30884
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
30641
30885
|
var import_react_dom7 = require("react-dom");
|
|
30642
|
-
var StateManagedSelect = /* @__PURE__ */ (0,
|
|
30886
|
+
var StateManagedSelect = /* @__PURE__ */ (0, import_react55.forwardRef)(function(props, ref) {
|
|
30643
30887
|
var baseSelectProps = useStateManager(props);
|
|
30644
|
-
return /* @__PURE__ */
|
|
30888
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
30645
30889
|
ref
|
|
30646
30890
|
}, baseSelectProps));
|
|
30647
30891
|
});
|
|
@@ -30649,7 +30893,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30649
30893
|
|
|
30650
30894
|
// src/widgets/basic/date-field/date.tsx
|
|
30651
30895
|
var import_moment2 = __toESM(require_moment());
|
|
30652
|
-
var
|
|
30896
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
30653
30897
|
var DateField = (props) => {
|
|
30654
30898
|
const {
|
|
30655
30899
|
name: name2,
|
|
@@ -30676,9 +30920,9 @@ var DateField = (props) => {
|
|
|
30676
30920
|
context
|
|
30677
30921
|
} = props;
|
|
30678
30922
|
const { t: t3 } = useI18n();
|
|
30679
|
-
const InputDateCustom = (0,
|
|
30680
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
30681
|
-
/* @__PURE__ */ (0,
|
|
30923
|
+
const InputDateCustom = (0, import_react56.forwardRef)(
|
|
30924
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("label", { className: `flex ${className}`, children: [
|
|
30925
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30682
30926
|
"input",
|
|
30683
30927
|
{
|
|
30684
30928
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30692,13 +30936,13 @@ var DateField = (props) => {
|
|
|
30692
30936
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30693
30937
|
}
|
|
30694
30938
|
),
|
|
30695
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
30939
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CalendarIcon, {})
|
|
30696
30940
|
] })
|
|
30697
30941
|
);
|
|
30698
30942
|
if (!isForm && !isEditTable) {
|
|
30699
|
-
return /* @__PURE__ */ (0,
|
|
30943
|
+
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
30944
|
} else {
|
|
30701
|
-
return /* @__PURE__ */ (0,
|
|
30945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30702
30946
|
Controller,
|
|
30703
30947
|
{
|
|
30704
30948
|
name: name2 || "",
|
|
@@ -30714,14 +30958,14 @@ var DateField = (props) => {
|
|
|
30714
30958
|
},
|
|
30715
30959
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
30716
30960
|
const { setError, clearErrors } = methods;
|
|
30717
|
-
(0,
|
|
30961
|
+
(0, import_react56.useEffect)(() => {
|
|
30718
30962
|
if (value) {
|
|
30719
30963
|
clearErrors(name2);
|
|
30720
30964
|
}
|
|
30721
30965
|
}, [value, clearErrors, name2]);
|
|
30722
30966
|
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,
|
|
30967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
30968
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30725
30969
|
DatePicker,
|
|
30726
30970
|
{
|
|
30727
30971
|
selected: selectedDate,
|
|
@@ -30769,7 +31013,7 @@ var DateField = (props) => {
|
|
|
30769
31013
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30770
31014
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30771
31015
|
showTimeInput: showTime,
|
|
30772
|
-
customInput: /* @__PURE__ */ (0,
|
|
31016
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30773
31017
|
InputDateCustom,
|
|
30774
31018
|
{
|
|
30775
31019
|
isForm,
|
|
@@ -30787,7 +31031,7 @@ var DateField = (props) => {
|
|
|
30787
31031
|
increaseMonth,
|
|
30788
31032
|
prevMonthButtonDisabled,
|
|
30789
31033
|
nextMonthButtonDisabled
|
|
30790
|
-
}) => /* @__PURE__ */ (0,
|
|
31034
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
30791
31035
|
"div",
|
|
30792
31036
|
{
|
|
30793
31037
|
style: {
|
|
@@ -30796,7 +31040,7 @@ var DateField = (props) => {
|
|
|
30796
31040
|
justifyContent: "center"
|
|
30797
31041
|
},
|
|
30798
31042
|
children: [
|
|
30799
|
-
/* @__PURE__ */ (0,
|
|
31043
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30800
31044
|
"button",
|
|
30801
31045
|
{
|
|
30802
31046
|
onClick: decreaseMonth,
|
|
@@ -30804,7 +31048,7 @@ var DateField = (props) => {
|
|
|
30804
31048
|
children: "<"
|
|
30805
31049
|
}
|
|
30806
31050
|
),
|
|
30807
|
-
/* @__PURE__ */ (0,
|
|
31051
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30808
31052
|
StateManagedSelect$1,
|
|
30809
31053
|
{
|
|
30810
31054
|
classNames: {
|
|
@@ -30830,7 +31074,7 @@ var DateField = (props) => {
|
|
|
30830
31074
|
autoFocus: true
|
|
30831
31075
|
}
|
|
30832
31076
|
),
|
|
30833
|
-
/* @__PURE__ */ (0,
|
|
31077
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30834
31078
|
StateManagedSelect$1,
|
|
30835
31079
|
{
|
|
30836
31080
|
classNames: {
|
|
@@ -30858,7 +31102,7 @@ var DateField = (props) => {
|
|
|
30858
31102
|
}))
|
|
30859
31103
|
}
|
|
30860
31104
|
),
|
|
30861
|
-
/* @__PURE__ */ (0,
|
|
31105
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30862
31106
|
"button",
|
|
30863
31107
|
{
|
|
30864
31108
|
onClick: increaseMonth,
|
|
@@ -30871,7 +31115,7 @@ var DateField = (props) => {
|
|
|
30871
31115
|
)
|
|
30872
31116
|
}
|
|
30873
31117
|
),
|
|
30874
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31118
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30875
31119
|
] });
|
|
30876
31120
|
}
|
|
30877
31121
|
}
|
|
@@ -30880,26 +31124,26 @@ var DateField = (props) => {
|
|
|
30880
31124
|
};
|
|
30881
31125
|
|
|
30882
31126
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
30883
|
-
var
|
|
31127
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
30884
31128
|
var DownLoadBinaryField = (props) => {
|
|
30885
31129
|
const { handleFileDownload } = props;
|
|
30886
31130
|
const { t: t3 } = useI18n();
|
|
30887
|
-
return /* @__PURE__ */ (0,
|
|
31131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
30888
31132
|
"button",
|
|
30889
31133
|
{
|
|
30890
31134
|
type: "button",
|
|
30891
31135
|
onClick: handleFileDownload,
|
|
30892
31136
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
30893
31137
|
children: [
|
|
30894
|
-
/* @__PURE__ */ (0,
|
|
30895
|
-
/* @__PURE__ */ (0,
|
|
31138
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DownloadIcon, {}),
|
|
31139
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
30896
31140
|
]
|
|
30897
31141
|
}
|
|
30898
31142
|
);
|
|
30899
31143
|
};
|
|
30900
31144
|
|
|
30901
31145
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
30902
|
-
var
|
|
31146
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
30903
31147
|
var DownloadFileField = (props) => {
|
|
30904
31148
|
const {
|
|
30905
31149
|
readonly,
|
|
@@ -30911,15 +31155,15 @@ var DownloadFileField = (props) => {
|
|
|
30911
31155
|
handleFileChange,
|
|
30912
31156
|
handleFileDownload
|
|
30913
31157
|
} = props;
|
|
30914
|
-
return /* @__PURE__ */ (0,
|
|
30915
|
-
/* @__PURE__ */ (0,
|
|
31158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "", children: [
|
|
31159
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
30916
31160
|
"label",
|
|
30917
31161
|
{
|
|
30918
31162
|
htmlFor: inputId,
|
|
30919
31163
|
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
31164
|
children: [
|
|
30921
|
-
file ? /* @__PURE__ */ (0,
|
|
30922
|
-
/* @__PURE__ */ (0,
|
|
31165
|
+
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" }),
|
|
31166
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
30923
31167
|
"input",
|
|
30924
31168
|
{
|
|
30925
31169
|
id: inputId,
|
|
@@ -30933,7 +31177,7 @@ var DownloadFileField = (props) => {
|
|
|
30933
31177
|
]
|
|
30934
31178
|
}
|
|
30935
31179
|
),
|
|
30936
|
-
file && /* @__PURE__ */ (0,
|
|
31180
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
30937
31181
|
"button",
|
|
30938
31182
|
{
|
|
30939
31183
|
onClick: handleFileDownload,
|
|
@@ -30946,8 +31190,8 @@ var DownloadFileField = (props) => {
|
|
|
30946
31190
|
};
|
|
30947
31191
|
|
|
30948
31192
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
30949
|
-
var
|
|
30950
|
-
var
|
|
31193
|
+
var import_react57 = require("react");
|
|
31194
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
30951
31195
|
var DropdownField = (props) => {
|
|
30952
31196
|
const {
|
|
30953
31197
|
options: options2,
|
|
@@ -30959,32 +31203,32 @@ var DropdownField = (props) => {
|
|
|
30959
31203
|
dropdownClassName = "",
|
|
30960
31204
|
useClickOutside: useClickOutside2
|
|
30961
31205
|
} = props;
|
|
30962
|
-
const [open, setOpen] = (0,
|
|
31206
|
+
const [open, setOpen] = (0, import_react57.useState)(false);
|
|
30963
31207
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
30964
|
-
return /* @__PURE__ */ (0,
|
|
31208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
30965
31209
|
"div",
|
|
30966
31210
|
{
|
|
30967
31211
|
ref: dropdownRef,
|
|
30968
31212
|
className: `relative ${className}`,
|
|
30969
31213
|
onClick: () => setOpen(!open),
|
|
30970
31214
|
children: [
|
|
30971
|
-
/* @__PURE__ */ (0,
|
|
31215
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
30972
31216
|
"div",
|
|
30973
31217
|
{
|
|
30974
31218
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
30975
31219
|
children: [
|
|
30976
31220
|
selectedValue?.icon,
|
|
30977
|
-
/* @__PURE__ */ (0,
|
|
30978
|
-
/* @__PURE__ */ (0,
|
|
31221
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: selectedValue?.label }),
|
|
31222
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
30979
31223
|
]
|
|
30980
31224
|
}
|
|
30981
31225
|
),
|
|
30982
|
-
open && /* @__PURE__ */ (0,
|
|
31226
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
30983
31227
|
"div",
|
|
30984
31228
|
{
|
|
30985
31229
|
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
31230
|
onClick: (e3) => e3.stopPropagation(),
|
|
30987
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31231
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
30988
31232
|
"div",
|
|
30989
31233
|
{
|
|
30990
31234
|
onClick: () => {
|
|
@@ -31004,7 +31248,7 @@ var DropdownField = (props) => {
|
|
|
31004
31248
|
};
|
|
31005
31249
|
|
|
31006
31250
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31007
|
-
var
|
|
31251
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31008
31252
|
var FeeField = (props) => {
|
|
31009
31253
|
const { value, formValues } = props;
|
|
31010
31254
|
const { t: t3 } = useI18n();
|
|
@@ -31015,27 +31259,27 @@ var FeeField = (props) => {
|
|
|
31015
31259
|
)
|
|
31016
31260
|
) + " VND";
|
|
31017
31261
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31018
|
-
return /* @__PURE__ */ (0,
|
|
31262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31019
31263
|
value?.subtotals?.map((sub) => {
|
|
31020
31264
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31021
|
-
return /* @__PURE__ */ (0,
|
|
31022
|
-
/* @__PURE__ */ (0,
|
|
31023
|
-
/* @__PURE__ */ (0,
|
|
31265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31266
|
+
/* @__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: [
|
|
31267
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31024
31268
|
sub?.name,
|
|
31025
31269
|
":"
|
|
31026
31270
|
] }),
|
|
31027
|
-
/* @__PURE__ */ (0,
|
|
31271
|
+
/* @__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
31272
|
] }),
|
|
31029
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31273
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
31030
31274
|
"div",
|
|
31031
31275
|
{
|
|
31032
31276
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31033
31277
|
children: [
|
|
31034
|
-
/* @__PURE__ */ (0,
|
|
31278
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31035
31279
|
group?.group_name,
|
|
31036
31280
|
":"
|
|
31037
31281
|
] }),
|
|
31038
|
-
/* @__PURE__ */ (0,
|
|
31282
|
+
/* @__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
31283
|
]
|
|
31040
31284
|
},
|
|
31041
31285
|
`tax_groups_${group?.id}`
|
|
@@ -31043,33 +31287,33 @@ var FeeField = (props) => {
|
|
|
31043
31287
|
] });
|
|
31044
31288
|
}
|
|
31045
31289
|
}),
|
|
31046
|
-
/* @__PURE__ */ (0,
|
|
31047
|
-
/* @__PURE__ */ (0,
|
|
31290
|
+
/* @__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: [
|
|
31291
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31048
31292
|
t3("total"),
|
|
31049
31293
|
":"
|
|
31050
31294
|
] }),
|
|
31051
|
-
/* @__PURE__ */ (0,
|
|
31295
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31052
31296
|
] }),
|
|
31053
|
-
/* @__PURE__ */ (0,
|
|
31054
|
-
/* @__PURE__ */ (0,
|
|
31297
|
+
/* @__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: [
|
|
31298
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31055
31299
|
t3("paid_amount"),
|
|
31056
31300
|
":"
|
|
31057
31301
|
] }),
|
|
31058
|
-
/* @__PURE__ */ (0,
|
|
31302
|
+
/* @__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
31303
|
] }),
|
|
31060
|
-
/* @__PURE__ */ (0,
|
|
31061
|
-
/* @__PURE__ */ (0,
|
|
31304
|
+
/* @__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: [
|
|
31305
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31062
31306
|
t3("remanining_amount"),
|
|
31063
31307
|
":"
|
|
31064
31308
|
] }),
|
|
31065
|
-
/* @__PURE__ */ (0,
|
|
31309
|
+
/* @__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
31310
|
] })
|
|
31067
31311
|
] });
|
|
31068
31312
|
};
|
|
31069
31313
|
|
|
31070
31314
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31071
|
-
var
|
|
31072
|
-
var
|
|
31315
|
+
var import_react58 = require("react");
|
|
31316
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31073
31317
|
var RenderFile = ({
|
|
31074
31318
|
file,
|
|
31075
31319
|
onDelete,
|
|
@@ -31079,16 +31323,16 @@ var RenderFile = ({
|
|
|
31079
31323
|
readAs: "all"
|
|
31080
31324
|
});
|
|
31081
31325
|
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,
|
|
31326
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PdfIcon, {}),
|
|
31327
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
31328
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ZipIcon, {}),
|
|
31329
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {}),
|
|
31330
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ExcelIcon, {})
|
|
31087
31331
|
};
|
|
31088
|
-
return /* @__PURE__ */ (0,
|
|
31089
|
-
/* @__PURE__ */ (0,
|
|
31090
|
-
/* @__PURE__ */ (0,
|
|
31091
|
-
/* @__PURE__ */ (0,
|
|
31332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31333
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31334
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
31335
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31092
31336
|
"div",
|
|
31093
31337
|
{
|
|
31094
31338
|
style: {
|
|
@@ -31098,20 +31342,20 @@ var RenderFile = ({
|
|
|
31098
31342
|
children: file?.name || file?.display_name || info?.name
|
|
31099
31343
|
}
|
|
31100
31344
|
),
|
|
31101
|
-
/* @__PURE__ */ (0,
|
|
31345
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31102
31346
|
] }),
|
|
31103
|
-
/* @__PURE__ */ (0,
|
|
31104
|
-
/* @__PURE__ */ (0,
|
|
31347
|
+
/* @__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: [
|
|
31348
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31105
31349
|
"span",
|
|
31106
31350
|
{
|
|
31107
31351
|
onClick: () => onDownload && onDownload(
|
|
31108
31352
|
file?.data,
|
|
31109
31353
|
file?.name || file?.display_name || info?.name
|
|
31110
31354
|
),
|
|
31111
|
-
children: /* @__PURE__ */ (0,
|
|
31355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DownloadIcon, {})
|
|
31112
31356
|
}
|
|
31113
31357
|
),
|
|
31114
|
-
/* @__PURE__ */ (0,
|
|
31358
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DeleteIconDanger, {}) })
|
|
31115
31359
|
] })
|
|
31116
31360
|
] });
|
|
31117
31361
|
};
|
|
@@ -31133,10 +31377,10 @@ var FileUploadField = (props) => {
|
|
|
31133
31377
|
downloadFunction
|
|
31134
31378
|
} = props;
|
|
31135
31379
|
const { t: t3 } = useI18n();
|
|
31136
|
-
const fileInputRef = (0,
|
|
31137
|
-
const [selectedFiles, setSelectedFiles] = (0,
|
|
31138
|
-
const [uploadError, setUploadError] = (0,
|
|
31139
|
-
(0,
|
|
31380
|
+
const fileInputRef = (0, import_react58.useRef)(null);
|
|
31381
|
+
const [selectedFiles, setSelectedFiles] = (0, import_react58.useState)([]);
|
|
31382
|
+
const [uploadError, setUploadError] = (0, import_react58.useState)();
|
|
31383
|
+
(0, import_react58.useEffect)(() => {
|
|
31140
31384
|
if (selectedFiles?.length === 0 && value) {
|
|
31141
31385
|
setSelectedFiles([
|
|
31142
31386
|
{
|
|
@@ -31145,7 +31389,7 @@ var FileUploadField = (props) => {
|
|
|
31145
31389
|
]);
|
|
31146
31390
|
}
|
|
31147
31391
|
}, [value]);
|
|
31148
|
-
return /* @__PURE__ */ (0,
|
|
31392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31149
31393
|
Controller,
|
|
31150
31394
|
{
|
|
31151
31395
|
name: name2 || "",
|
|
@@ -31154,7 +31398,7 @@ var FileUploadField = (props) => {
|
|
|
31154
31398
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31155
31399
|
},
|
|
31156
31400
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31157
|
-
(0,
|
|
31401
|
+
(0, import_react58.useEffect)(() => {
|
|
31158
31402
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31159
31403
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31160
31404
|
data = data.split(",")[1];
|
|
@@ -31170,8 +31414,8 @@ var FileUploadField = (props) => {
|
|
|
31170
31414
|
);
|
|
31171
31415
|
}
|
|
31172
31416
|
}, [selectedFiles]);
|
|
31173
|
-
return /* @__PURE__ */ (0,
|
|
31174
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
31417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
|
|
31418
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31175
31419
|
RenderFile,
|
|
31176
31420
|
{
|
|
31177
31421
|
file: fileItem,
|
|
@@ -31186,8 +31430,8 @@ var FileUploadField = (props) => {
|
|
|
31186
31430
|
}
|
|
31187
31431
|
}
|
|
31188
31432
|
)),
|
|
31189
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31190
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
31433
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31434
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31191
31435
|
ButtonSelectFiles,
|
|
31192
31436
|
{
|
|
31193
31437
|
fileInputRef,
|
|
@@ -31202,7 +31446,7 @@ var FileUploadField = (props) => {
|
|
|
31202
31446
|
useUploadFile
|
|
31203
31447
|
}
|
|
31204
31448
|
),
|
|
31205
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31449
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31206
31450
|
] });
|
|
31207
31451
|
}
|
|
31208
31452
|
}
|
|
@@ -31210,8 +31454,8 @@ var FileUploadField = (props) => {
|
|
|
31210
31454
|
};
|
|
31211
31455
|
|
|
31212
31456
|
// src/widgets/basic/float-field/float.tsx
|
|
31213
|
-
var
|
|
31214
|
-
var
|
|
31457
|
+
var import_react59 = require("react");
|
|
31458
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31215
31459
|
var FloatField = (props) => {
|
|
31216
31460
|
const {
|
|
31217
31461
|
name: name2,
|
|
@@ -31229,9 +31473,9 @@ var FloatField = (props) => {
|
|
|
31229
31473
|
} = props;
|
|
31230
31474
|
const { t: t3 } = useI18n();
|
|
31231
31475
|
if (!isForm && !isEditTable) {
|
|
31232
|
-
return /* @__PURE__ */ (0,
|
|
31476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31233
31477
|
}
|
|
31234
|
-
return /* @__PURE__ */ (0,
|
|
31478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31235
31479
|
Controller,
|
|
31236
31480
|
{
|
|
31237
31481
|
name: name2 ?? "",
|
|
@@ -31242,12 +31486,12 @@ var FloatField = (props) => {
|
|
|
31242
31486
|
},
|
|
31243
31487
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31244
31488
|
const { setError, clearErrors } = methods;
|
|
31245
|
-
const [inputValue, setInputValue] = (0,
|
|
31489
|
+
const [inputValue, setInputValue] = (0, import_react59.useState)(
|
|
31246
31490
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31247
31491
|
);
|
|
31248
|
-
const isDirtyRef = (0,
|
|
31249
|
-
const lastCommittedValueRef = (0,
|
|
31250
|
-
(0,
|
|
31492
|
+
const isDirtyRef = (0, import_react59.useRef)(false);
|
|
31493
|
+
const lastCommittedValueRef = (0, import_react59.useRef)(null);
|
|
31494
|
+
(0, import_react59.useEffect)(() => {
|
|
31251
31495
|
if (isDirtyRef.current) return;
|
|
31252
31496
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31253
31497
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -31325,8 +31569,8 @@ var FloatField = (props) => {
|
|
|
31325
31569
|
}
|
|
31326
31570
|
isDirtyRef.current = false;
|
|
31327
31571
|
};
|
|
31328
|
-
return /* @__PURE__ */ (0,
|
|
31329
|
-
/* @__PURE__ */ (0,
|
|
31572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
31573
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31330
31574
|
"input",
|
|
31331
31575
|
{
|
|
31332
31576
|
value: inputValue,
|
|
@@ -31345,7 +31589,7 @@ var FloatField = (props) => {
|
|
|
31345
31589
|
`
|
|
31346
31590
|
}
|
|
31347
31591
|
),
|
|
31348
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31592
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31349
31593
|
] });
|
|
31350
31594
|
}
|
|
31351
31595
|
}
|
|
@@ -31353,8 +31597,8 @@ var FloatField = (props) => {
|
|
|
31353
31597
|
};
|
|
31354
31598
|
|
|
31355
31599
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31356
|
-
var
|
|
31357
|
-
var
|
|
31600
|
+
var import_react60 = require("react");
|
|
31601
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
31358
31602
|
var FloatTimeField = (props) => {
|
|
31359
31603
|
const {
|
|
31360
31604
|
name: name2,
|
|
@@ -31370,9 +31614,9 @@ var FloatTimeField = (props) => {
|
|
|
31370
31614
|
const { t: t3 } = useI18n();
|
|
31371
31615
|
if (!isForm) {
|
|
31372
31616
|
const formatValue = value ?? 0;
|
|
31373
|
-
return /* @__PURE__ */ (0,
|
|
31617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
31374
31618
|
}
|
|
31375
|
-
return /* @__PURE__ */ (0,
|
|
31619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
31376
31620
|
Controller,
|
|
31377
31621
|
{
|
|
31378
31622
|
name: name2 ?? "",
|
|
@@ -31385,11 +31629,11 @@ var FloatTimeField = (props) => {
|
|
|
31385
31629
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
31386
31630
|
fieldState: { error: error2, isDirty }
|
|
31387
31631
|
}) => {
|
|
31388
|
-
const [input, setInput] = (0,
|
|
31632
|
+
const [input, setInput] = (0, import_react60.useState)(
|
|
31389
31633
|
convertFloatToTime(value2 ?? defaultValue)
|
|
31390
31634
|
);
|
|
31391
|
-
const [formattedTime, setFormattedTime] = (0,
|
|
31392
|
-
const [errors, setErrors] = (0,
|
|
31635
|
+
const [formattedTime, setFormattedTime] = (0, import_react60.useState)("");
|
|
31636
|
+
const [errors, setErrors] = (0, import_react60.useState)("");
|
|
31393
31637
|
const handleInputChange = (e3) => {
|
|
31394
31638
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
31395
31639
|
setInput(raw);
|
|
@@ -31434,8 +31678,8 @@ var FloatTimeField = (props) => {
|
|
|
31434
31678
|
}
|
|
31435
31679
|
onBlur();
|
|
31436
31680
|
};
|
|
31437
|
-
return /* @__PURE__ */ (0,
|
|
31438
|
-
/* @__PURE__ */ (0,
|
|
31681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
31682
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
31439
31683
|
"input",
|
|
31440
31684
|
{
|
|
31441
31685
|
type: "text",
|
|
@@ -31467,7 +31711,7 @@ var FloatTimeField = (props) => {
|
|
|
31467
31711
|
readOnly: readonly
|
|
31468
31712
|
}
|
|
31469
31713
|
),
|
|
31470
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
31714
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31471
31715
|
] });
|
|
31472
31716
|
}
|
|
31473
31717
|
}
|
|
@@ -31475,8 +31719,8 @@ var FloatTimeField = (props) => {
|
|
|
31475
31719
|
};
|
|
31476
31720
|
|
|
31477
31721
|
// src/widgets/basic/html-field/html.tsx
|
|
31478
|
-
var
|
|
31479
|
-
var
|
|
31722
|
+
var import_react61 = require("react");
|
|
31723
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
31480
31724
|
var HtmlField = (props) => {
|
|
31481
31725
|
const {
|
|
31482
31726
|
name: name2,
|
|
@@ -31488,18 +31732,18 @@ var HtmlField = (props) => {
|
|
|
31488
31732
|
value,
|
|
31489
31733
|
isEditTable
|
|
31490
31734
|
} = props;
|
|
31491
|
-
const divRef = (0,
|
|
31735
|
+
const divRef = (0, import_react61.useRef)(null);
|
|
31492
31736
|
if (!isForm && !isEditTable) {
|
|
31493
|
-
return /* @__PURE__ */ (0,
|
|
31737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31494
31738
|
}
|
|
31495
|
-
return /* @__PURE__ */ (0,
|
|
31739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31496
31740
|
Controller,
|
|
31497
31741
|
{
|
|
31498
31742
|
name: name2 ?? "",
|
|
31499
31743
|
control: methods?.control,
|
|
31500
31744
|
defaultValue,
|
|
31501
31745
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
31502
|
-
(0,
|
|
31746
|
+
(0, import_react61.useEffect)(() => {
|
|
31503
31747
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
31504
31748
|
divRef.current.innerHTML = value2 || "";
|
|
31505
31749
|
}
|
|
@@ -31511,7 +31755,7 @@ var HtmlField = (props) => {
|
|
|
31511
31755
|
onChange2(newValue, "");
|
|
31512
31756
|
}
|
|
31513
31757
|
};
|
|
31514
|
-
return /* @__PURE__ */ (0,
|
|
31758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31515
31759
|
"div",
|
|
31516
31760
|
{
|
|
31517
31761
|
ref: divRef,
|
|
@@ -31530,28 +31774,28 @@ var HtmlField = (props) => {
|
|
|
31530
31774
|
};
|
|
31531
31775
|
|
|
31532
31776
|
// src/widgets/basic/image-field/image.tsx
|
|
31533
|
-
var
|
|
31777
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
31534
31778
|
var ImageField = (props) => {
|
|
31535
31779
|
const { value, type, name: name2, baseURL } = props;
|
|
31536
31780
|
if (!value) return null;
|
|
31537
31781
|
if (type === "url") {
|
|
31538
|
-
return /* @__PURE__ */ (0,
|
|
31782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31539
31783
|
}
|
|
31540
|
-
return /* @__PURE__ */ (0,
|
|
31784
|
+
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
31785
|
};
|
|
31542
31786
|
|
|
31543
31787
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31544
|
-
var
|
|
31788
|
+
var import_react62 = __toESM(require("react"));
|
|
31545
31789
|
|
|
31546
31790
|
// src/widgets/basic/information-field/information.tsx
|
|
31547
|
-
var
|
|
31791
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
31548
31792
|
var InfomationField = (props) => {
|
|
31549
31793
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31550
31794
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31551
|
-
return /* @__PURE__ */ (0,
|
|
31795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_jsx_runtime96.Fragment, {});
|
|
31552
31796
|
}
|
|
31553
31797
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31554
|
-
return /* @__PURE__ */ (0,
|
|
31798
|
+
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
31799
|
AvatarField,
|
|
31556
31800
|
{
|
|
31557
31801
|
id: item.id,
|
|
@@ -31560,8 +31804,8 @@ var InfomationField = (props) => {
|
|
|
31560
31804
|
stringToColor
|
|
31561
31805
|
},
|
|
31562
31806
|
item.id
|
|
31563
|
-
)) : /* @__PURE__ */ (0,
|
|
31564
|
-
/* @__PURE__ */ (0,
|
|
31807
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31808
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
31565
31809
|
AvatarField,
|
|
31566
31810
|
{
|
|
31567
31811
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31571,12 +31815,12 @@ var InfomationField = (props) => {
|
|
|
31571
31815
|
stringToColor
|
|
31572
31816
|
}
|
|
31573
31817
|
),
|
|
31574
|
-
showName && /* @__PURE__ */ (0,
|
|
31818
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31575
31819
|
] }) });
|
|
31576
31820
|
};
|
|
31577
31821
|
|
|
31578
31822
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31579
|
-
var
|
|
31823
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
31580
31824
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31581
31825
|
const { selectProps, data, menuList } = props;
|
|
31582
31826
|
const { relation } = selectProps;
|
|
@@ -31585,8 +31829,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31585
31829
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31586
31830
|
)
|
|
31587
31831
|
)?.[0]?.action?.id;
|
|
31588
|
-
return /* @__PURE__ */ (0,
|
|
31589
|
-
/* @__PURE__ */ (0,
|
|
31832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31833
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31590
31834
|
AvatarField,
|
|
31591
31835
|
{
|
|
31592
31836
|
id: data?.id,
|
|
@@ -31598,8 +31842,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31598
31842
|
stringToColor
|
|
31599
31843
|
}
|
|
31600
31844
|
),
|
|
31601
|
-
/* @__PURE__ */ (0,
|
|
31602
|
-
/* @__PURE__ */ (0,
|
|
31845
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31846
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31603
31847
|
"span",
|
|
31604
31848
|
{
|
|
31605
31849
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31607,7 +31851,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31607
31851
|
e3.stopPropagation();
|
|
31608
31852
|
props.removeProps.onClick();
|
|
31609
31853
|
},
|
|
31610
|
-
children: /* @__PURE__ */ (0,
|
|
31854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CloseIcon, {})
|
|
31611
31855
|
}
|
|
31612
31856
|
)
|
|
31613
31857
|
] });
|
|
@@ -31616,10 +31860,10 @@ var CustomMenuList = (props) => {
|
|
|
31616
31860
|
const { options: options2, children, selectProps } = props;
|
|
31617
31861
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31618
31862
|
const { t: t3 } = useI18n();
|
|
31619
|
-
const limitedChildren =
|
|
31620
|
-
return /* @__PURE__ */ (0,
|
|
31863
|
+
const limitedChildren = import_react62.default.Children.toArray(children).slice(0, 10);
|
|
31864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31621
31865
|
limitedChildren,
|
|
31622
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
31866
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
31623
31867
|
"button",
|
|
31624
31868
|
{
|
|
31625
31869
|
type: "button",
|
|
@@ -31664,7 +31908,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31664
31908
|
value: item.id,
|
|
31665
31909
|
label: item.name ?? item.display_name
|
|
31666
31910
|
})) : [];
|
|
31667
|
-
return /* @__PURE__ */ (0,
|
|
31911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31668
31912
|
InfomationField,
|
|
31669
31913
|
{
|
|
31670
31914
|
value: optionValue || null,
|
|
@@ -31673,7 +31917,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31673
31917
|
}
|
|
31674
31918
|
);
|
|
31675
31919
|
}
|
|
31676
|
-
return /* @__PURE__ */ (0,
|
|
31920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31677
31921
|
Controller,
|
|
31678
31922
|
{
|
|
31679
31923
|
name: name2 ?? "",
|
|
@@ -31683,12 +31927,12 @@ var Many2ManyTagField = (props) => {
|
|
|
31683
31927
|
},
|
|
31684
31928
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31685
31929
|
const { clearErrors } = methods;
|
|
31686
|
-
(0,
|
|
31930
|
+
(0, import_react62.useEffect)(() => {
|
|
31687
31931
|
if (field.value) {
|
|
31688
31932
|
clearErrors(name2);
|
|
31689
31933
|
}
|
|
31690
31934
|
}, [field.value]);
|
|
31691
|
-
const filteredValue = (0,
|
|
31935
|
+
const filteredValue = (0, import_react62.useMemo)(() => {
|
|
31692
31936
|
if (!Array.isArray(field?.value)) return null;
|
|
31693
31937
|
const fieldValueMapped = field.value.map((v) => ({
|
|
31694
31938
|
value: v?.id,
|
|
@@ -31709,8 +31953,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31709
31953
|
onChange2?.(name2 ?? "", newValue);
|
|
31710
31954
|
clearErrors(name2);
|
|
31711
31955
|
};
|
|
31712
|
-
return /* @__PURE__ */ (0,
|
|
31713
|
-
/* @__PURE__ */ (0,
|
|
31956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
31957
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31714
31958
|
StateManagedSelect$1,
|
|
31715
31959
|
{
|
|
31716
31960
|
options: options2,
|
|
@@ -31789,7 +32033,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31789
32033
|
})
|
|
31790
32034
|
},
|
|
31791
32035
|
components: isUser ? {
|
|
31792
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
32036
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31793
32037
|
CustomMultiValue,
|
|
31794
32038
|
{
|
|
31795
32039
|
...multiValueProps,
|
|
@@ -31798,7 +32042,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31798
32042
|
),
|
|
31799
32043
|
IndicatorSeparator: () => null
|
|
31800
32044
|
} : {
|
|
31801
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
32045
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
31802
32046
|
CustomMenuList,
|
|
31803
32047
|
{
|
|
31804
32048
|
...menuListProps,
|
|
@@ -31809,13 +32053,13 @@ var Many2ManyTagField = (props) => {
|
|
|
31809
32053
|
}
|
|
31810
32054
|
),
|
|
31811
32055
|
IndicatorSeparator: () => null,
|
|
31812
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
31813
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32056
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32057
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(components.ClearIndicator, { ...props2 })
|
|
31814
32058
|
},
|
|
31815
32059
|
required: !invisible && required
|
|
31816
32060
|
}
|
|
31817
32061
|
),
|
|
31818
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32062
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31819
32063
|
] });
|
|
31820
32064
|
}
|
|
31821
32065
|
}
|
|
@@ -31823,8 +32067,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31823
32067
|
};
|
|
31824
32068
|
|
|
31825
32069
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
31826
|
-
var
|
|
31827
|
-
var
|
|
32070
|
+
var import_react63 = require("react");
|
|
32071
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
31828
32072
|
var MonetaryField = (props) => {
|
|
31829
32073
|
const { t: t3 } = useI18n();
|
|
31830
32074
|
const {
|
|
@@ -31841,29 +32085,30 @@ var MonetaryField = (props) => {
|
|
|
31841
32085
|
formValues,
|
|
31842
32086
|
widget,
|
|
31843
32087
|
placeholder,
|
|
31844
|
-
isEditTable
|
|
32088
|
+
isEditTable,
|
|
32089
|
+
symbol = "VND"
|
|
31845
32090
|
} = props;
|
|
31846
32091
|
if (isForm && name2 === "amount_residual") {
|
|
31847
|
-
return /* @__PURE__ */ (0,
|
|
31848
|
-
/* @__PURE__ */ (0,
|
|
32092
|
+
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: [
|
|
32093
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "font-semibold", children: [
|
|
31849
32094
|
string,
|
|
31850
32095
|
":"
|
|
31851
32096
|
] }),
|
|
31852
|
-
/* @__PURE__ */ (0,
|
|
32097
|
+
/* @__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}` })
|
|
31853
32098
|
] });
|
|
31854
32099
|
}
|
|
31855
32100
|
if (!isForm) {
|
|
31856
|
-
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol :
|
|
32101
|
+
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
31857
32102
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
31858
|
-
return /* @__PURE__ */ (0,
|
|
32103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
31859
32104
|
parseFloat(String(value ?? defaultValue))
|
|
31860
|
-
)}
|
|
32105
|
+
)} ${symbol}` });
|
|
31861
32106
|
}
|
|
31862
|
-
return /* @__PURE__ */ (0,
|
|
32107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
|
|
31863
32108
|
parseFloat(value ?? defaultValue)
|
|
31864
32109
|
)} ${currencySymbol}` });
|
|
31865
32110
|
}
|
|
31866
|
-
return /* @__PURE__ */ (0,
|
|
32111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
31867
32112
|
Controller,
|
|
31868
32113
|
{
|
|
31869
32114
|
name: name2 ?? "",
|
|
@@ -31877,13 +32122,13 @@ var MonetaryField = (props) => {
|
|
|
31877
32122
|
fieldState: { error: error2 }
|
|
31878
32123
|
}) => {
|
|
31879
32124
|
const { setError, clearErrors } = methods;
|
|
31880
|
-
(0,
|
|
32125
|
+
(0, import_react63.useEffect)(() => {
|
|
31881
32126
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
31882
32127
|
clearErrors(name2);
|
|
31883
32128
|
}
|
|
31884
32129
|
}, [value2]);
|
|
31885
|
-
return /* @__PURE__ */ (0,
|
|
31886
|
-
/* @__PURE__ */ (0,
|
|
32130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
32131
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
31887
32132
|
"input",
|
|
31888
32133
|
{
|
|
31889
32134
|
value: formatNumberOnly(value2),
|
|
@@ -31921,7 +32166,7 @@ var MonetaryField = (props) => {
|
|
|
31921
32166
|
`
|
|
31922
32167
|
}
|
|
31923
32168
|
),
|
|
31924
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32169
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31925
32170
|
] });
|
|
31926
32171
|
}
|
|
31927
32172
|
}
|
|
@@ -31929,14 +32174,14 @@ var MonetaryField = (props) => {
|
|
|
31929
32174
|
};
|
|
31930
32175
|
|
|
31931
32176
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
31932
|
-
var
|
|
32177
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
31933
32178
|
var PaidBadgedField = () => {
|
|
31934
|
-
return /* @__PURE__ */ (0,
|
|
32179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PaidIcon, {}) });
|
|
31935
32180
|
};
|
|
31936
32181
|
|
|
31937
32182
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
31938
|
-
var
|
|
31939
|
-
var
|
|
32183
|
+
var import_react64 = __toESM(require("react"));
|
|
32184
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
31940
32185
|
var RatingStarField = (props) => {
|
|
31941
32186
|
const {
|
|
31942
32187
|
label,
|
|
@@ -31945,9 +32190,9 @@ var RatingStarField = (props) => {
|
|
|
31945
32190
|
onSelectPriority,
|
|
31946
32191
|
id
|
|
31947
32192
|
} = props;
|
|
31948
|
-
const [rating, setRating] = (0,
|
|
31949
|
-
const [hover, setHover] = (0,
|
|
31950
|
-
(0,
|
|
32193
|
+
const [rating, setRating] = (0, import_react64.useState)(defaultValue);
|
|
32194
|
+
const [hover, setHover] = (0, import_react64.useState)(0);
|
|
32195
|
+
(0, import_react64.useEffect)(() => {
|
|
31951
32196
|
setRating(defaultValue);
|
|
31952
32197
|
}, [defaultValue]);
|
|
31953
32198
|
const handleClick = (value) => {
|
|
@@ -31971,7 +32216,7 @@ var RatingStarField = (props) => {
|
|
|
31971
32216
|
setHover(0);
|
|
31972
32217
|
setRating(0);
|
|
31973
32218
|
};
|
|
31974
|
-
return /* @__PURE__ */ (0,
|
|
32219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31975
32220
|
"div",
|
|
31976
32221
|
{
|
|
31977
32222
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -31981,17 +32226,17 @@ var RatingStarField = (props) => {
|
|
|
31981
32226
|
const starValue = index4 + 1;
|
|
31982
32227
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
31983
32228
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
31984
|
-
return /* @__PURE__ */ (0,
|
|
31985
|
-
/* @__PURE__ */ (0,
|
|
32229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react64.default.Fragment, { children: [
|
|
32230
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31986
32231
|
"div",
|
|
31987
32232
|
{
|
|
31988
32233
|
onMouseEnter: () => handleHover(starValue),
|
|
31989
32234
|
onClick: () => handleClick(starValue),
|
|
31990
32235
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
31991
|
-
children: /* @__PURE__ */ (0,
|
|
32236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
31992
32237
|
}
|
|
31993
32238
|
),
|
|
31994
|
-
/* @__PURE__ */ (0,
|
|
32239
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
31995
32240
|
M,
|
|
31996
32241
|
{
|
|
31997
32242
|
className: "z-50",
|
|
@@ -32007,7 +32252,7 @@ var RatingStarField = (props) => {
|
|
|
32007
32252
|
};
|
|
32008
32253
|
|
|
32009
32254
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32010
|
-
var
|
|
32255
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32011
32256
|
var PriorityField = (props) => {
|
|
32012
32257
|
const {
|
|
32013
32258
|
isForm,
|
|
@@ -32023,7 +32268,7 @@ var PriorityField = (props) => {
|
|
|
32023
32268
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32024
32269
|
const defaultPriority = parseInt(value) + 1;
|
|
32025
32270
|
if (!isForm) {
|
|
32026
|
-
return /* @__PURE__ */ (0,
|
|
32271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32027
32272
|
RatingStarField,
|
|
32028
32273
|
{
|
|
32029
32274
|
label,
|
|
@@ -32034,7 +32279,7 @@ var PriorityField = (props) => {
|
|
|
32034
32279
|
}
|
|
32035
32280
|
);
|
|
32036
32281
|
}
|
|
32037
|
-
return /* @__PURE__ */ (0,
|
|
32282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32038
32283
|
Controller,
|
|
32039
32284
|
{
|
|
32040
32285
|
name: name ?? "",
|
|
@@ -32044,7 +32289,7 @@ var PriorityField = (props) => {
|
|
|
32044
32289
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32045
32290
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32046
32291
|
};
|
|
32047
|
-
return /* @__PURE__ */ (0,
|
|
32292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32048
32293
|
RatingStarField,
|
|
32049
32294
|
{
|
|
32050
32295
|
label,
|
|
@@ -32060,8 +32305,8 @@ var PriorityField = (props) => {
|
|
|
32060
32305
|
};
|
|
32061
32306
|
|
|
32062
32307
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32063
|
-
var
|
|
32064
|
-
var
|
|
32308
|
+
var import_react65 = require("react");
|
|
32309
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32065
32310
|
var RadioGroupField = (props) => {
|
|
32066
32311
|
const {
|
|
32067
32312
|
name: name2,
|
|
@@ -32074,19 +32319,19 @@ var RadioGroupField = (props) => {
|
|
|
32074
32319
|
onChange: onChange2,
|
|
32075
32320
|
setValue
|
|
32076
32321
|
} = props;
|
|
32077
|
-
(0,
|
|
32322
|
+
(0, import_react65.useEffect)(() => {
|
|
32078
32323
|
if (selection?.length > 0) {
|
|
32079
32324
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32080
32325
|
}
|
|
32081
32326
|
}, [selection, name2, setValue]);
|
|
32082
32327
|
if (!methods) return null;
|
|
32083
|
-
return /* @__PURE__ */ (0,
|
|
32328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32084
32329
|
Controller,
|
|
32085
32330
|
{
|
|
32086
32331
|
name: name2 ?? "",
|
|
32087
32332
|
control: methods.control,
|
|
32088
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32089
|
-
/* @__PURE__ */ (0,
|
|
32333
|
+
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: [
|
|
32334
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32090
32335
|
"input",
|
|
32091
32336
|
{
|
|
32092
32337
|
type: "radio",
|
|
@@ -32105,7 +32350,7 @@ var RadioGroupField = (props) => {
|
|
|
32105
32350
|
className: "custom-radio"
|
|
32106
32351
|
}
|
|
32107
32352
|
),
|
|
32108
|
-
/* @__PURE__ */ (0,
|
|
32353
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32109
32354
|
] }, select[0])) })
|
|
32110
32355
|
}
|
|
32111
32356
|
);
|
|
@@ -32113,7 +32358,7 @@ var RadioGroupField = (props) => {
|
|
|
32113
32358
|
|
|
32114
32359
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32115
32360
|
var import_moment3 = __toESM(require_moment());
|
|
32116
|
-
var
|
|
32361
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32117
32362
|
var RemainingDaysField = (props) => {
|
|
32118
32363
|
const {
|
|
32119
32364
|
value,
|
|
@@ -32124,14 +32369,14 @@ var RemainingDaysField = (props) => {
|
|
|
32124
32369
|
if (!value) return null;
|
|
32125
32370
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32126
32371
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32127
|
-
return /* @__PURE__ */ (0,
|
|
32128
|
-
/* @__PURE__ */ (0,
|
|
32129
|
-
/* @__PURE__ */ (0,
|
|
32372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
32373
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32374
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32130
32375
|
"div",
|
|
32131
32376
|
{
|
|
32132
32377
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32133
32378
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32134
|
-
children: /* @__PURE__ */ (0,
|
|
32379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32135
32380
|
"div",
|
|
32136
32381
|
{
|
|
32137
32382
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32144,7 +32389,7 @@ var RemainingDaysField = (props) => {
|
|
|
32144
32389
|
};
|
|
32145
32390
|
|
|
32146
32391
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32147
|
-
var
|
|
32392
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32148
32393
|
var SelectDropdownField = (props) => {
|
|
32149
32394
|
const { t: t3 } = useI18n();
|
|
32150
32395
|
const {
|
|
@@ -32166,9 +32411,9 @@ var SelectDropdownField = (props) => {
|
|
|
32166
32411
|
label: val[1]
|
|
32167
32412
|
})) : [];
|
|
32168
32413
|
if (!isForm && !isEditTable) {
|
|
32169
|
-
return /* @__PURE__ */ (0,
|
|
32414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32170
32415
|
} else {
|
|
32171
|
-
return /* @__PURE__ */ (0,
|
|
32416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32172
32417
|
Controller,
|
|
32173
32418
|
{
|
|
32174
32419
|
name: name2 || "",
|
|
@@ -32195,8 +32440,8 @@ var SelectDropdownField = (props) => {
|
|
|
32195
32440
|
value: defaultValue || null,
|
|
32196
32441
|
required: !invisible && required
|
|
32197
32442
|
};
|
|
32198
|
-
return /* @__PURE__ */ (0,
|
|
32199
|
-
/* @__PURE__ */ (0,
|
|
32443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
32444
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32200
32445
|
StateManagedSelect$1,
|
|
32201
32446
|
{
|
|
32202
32447
|
...commonProps,
|
|
@@ -32253,12 +32498,12 @@ var SelectDropdownField = (props) => {
|
|
|
32253
32498
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32254
32499
|
components: {
|
|
32255
32500
|
IndicatorSeparator: () => null,
|
|
32256
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
32501
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(components.DropdownIndicator, { ...props2 })
|
|
32257
32502
|
},
|
|
32258
32503
|
noOptionsMessage: () => t3("no-available")
|
|
32259
32504
|
}
|
|
32260
32505
|
) }),
|
|
32261
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32506
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32262
32507
|
] });
|
|
32263
32508
|
}
|
|
32264
32509
|
}
|
|
@@ -32267,7 +32512,7 @@ var SelectDropdownField = (props) => {
|
|
|
32267
32512
|
};
|
|
32268
32513
|
|
|
32269
32514
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32270
|
-
var
|
|
32515
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
32271
32516
|
var TextAreaField = (props) => {
|
|
32272
32517
|
const {
|
|
32273
32518
|
methods,
|
|
@@ -32291,9 +32536,9 @@ var TextAreaField = (props) => {
|
|
|
32291
32536
|
}
|
|
32292
32537
|
}) : {};
|
|
32293
32538
|
if (!isForm) {
|
|
32294
|
-
return /* @__PURE__ */ (0,
|
|
32539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32295
32540
|
}
|
|
32296
|
-
return /* @__PURE__ */ (0,
|
|
32541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
32297
32542
|
"textarea",
|
|
32298
32543
|
{
|
|
32299
32544
|
...formProps,
|
|
@@ -32309,7 +32554,7 @@ var TextAreaField = (props) => {
|
|
|
32309
32554
|
};
|
|
32310
32555
|
|
|
32311
32556
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32312
|
-
var
|
|
32557
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
32313
32558
|
var ToggleButtonField = (props) => {
|
|
32314
32559
|
const {
|
|
32315
32560
|
name: name2,
|
|
@@ -32319,13 +32564,13 @@ var ToggleButtonField = (props) => {
|
|
|
32319
32564
|
onChange: onChange2,
|
|
32320
32565
|
methods
|
|
32321
32566
|
} = props;
|
|
32322
|
-
return /* @__PURE__ */ (0,
|
|
32567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32323
32568
|
Controller,
|
|
32324
32569
|
{
|
|
32325
32570
|
name: name2 ?? "",
|
|
32326
32571
|
control: methods?.control,
|
|
32327
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32328
|
-
/* @__PURE__ */ (0,
|
|
32572
|
+
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: [
|
|
32573
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32329
32574
|
"input",
|
|
32330
32575
|
{
|
|
32331
32576
|
...field,
|
|
@@ -32344,7 +32589,7 @@ var ToggleButtonField = (props) => {
|
|
|
32344
32589
|
checked: field.value ?? false
|
|
32345
32590
|
}
|
|
32346
32591
|
),
|
|
32347
|
-
/* @__PURE__ */ (0,
|
|
32592
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32348
32593
|
"span",
|
|
32349
32594
|
{
|
|
32350
32595
|
style: {
|
|
@@ -32354,7 +32599,7 @@ var ToggleButtonField = (props) => {
|
|
|
32354
32599
|
},
|
|
32355
32600
|
className: `rounded-full transition duration-300
|
|
32356
32601
|
`,
|
|
32357
|
-
children: /* @__PURE__ */ (0,
|
|
32602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32358
32603
|
"span",
|
|
32359
32604
|
{
|
|
32360
32605
|
style: {
|
|
@@ -32378,8 +32623,8 @@ var ToggleButtonField = (props) => {
|
|
|
32378
32623
|
};
|
|
32379
32624
|
|
|
32380
32625
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32381
|
-
var
|
|
32382
|
-
var
|
|
32626
|
+
var import_react66 = require("react");
|
|
32627
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
32383
32628
|
var IntegerField = (props) => {
|
|
32384
32629
|
const {
|
|
32385
32630
|
name: name2,
|
|
@@ -32398,9 +32643,9 @@ var IntegerField = (props) => {
|
|
|
32398
32643
|
const { t: t3 } = useI18n();
|
|
32399
32644
|
if (!isForm && !isEditTable) {
|
|
32400
32645
|
const displayValue = value ?? defaultValue;
|
|
32401
|
-
return /* @__PURE__ */ (0,
|
|
32646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32402
32647
|
}
|
|
32403
|
-
return /* @__PURE__ */ (0,
|
|
32648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32404
32649
|
Controller,
|
|
32405
32650
|
{
|
|
32406
32651
|
name: name2 || "",
|
|
@@ -32414,13 +32659,13 @@ var IntegerField = (props) => {
|
|
|
32414
32659
|
fieldState: { error: error2 }
|
|
32415
32660
|
}) => {
|
|
32416
32661
|
const { setError, clearErrors } = methods;
|
|
32417
|
-
const isDirtyRef = (0,
|
|
32418
|
-
const inputRef = (0,
|
|
32419
|
-
const lastCommittedValueRef = (0,
|
|
32420
|
-
const [inputValue, setInputValue] = (0,
|
|
32662
|
+
const isDirtyRef = (0, import_react66.useRef)(false);
|
|
32663
|
+
const inputRef = (0, import_react66.useRef)(null);
|
|
32664
|
+
const lastCommittedValueRef = (0, import_react66.useRef)(null);
|
|
32665
|
+
const [inputValue, setInputValue] = (0, import_react66.useState)(
|
|
32421
32666
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
32422
32667
|
);
|
|
32423
|
-
(0,
|
|
32668
|
+
(0, import_react66.useEffect)(() => {
|
|
32424
32669
|
if (value2 !== void 0 && value2 !== null) {
|
|
32425
32670
|
setInputValue(String(value2));
|
|
32426
32671
|
clearErrors(name2);
|
|
@@ -32478,8 +32723,8 @@ var IntegerField = (props) => {
|
|
|
32478
32723
|
inputRef.current?.blur();
|
|
32479
32724
|
clearErrors(name2);
|
|
32480
32725
|
};
|
|
32481
|
-
return /* @__PURE__ */ (0,
|
|
32482
|
-
/* @__PURE__ */ (0,
|
|
32726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
32727
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32483
32728
|
"input",
|
|
32484
32729
|
{
|
|
32485
32730
|
ref: inputRef,
|
|
@@ -32514,7 +32759,7 @@ var IntegerField = (props) => {
|
|
|
32514
32759
|
`
|
|
32515
32760
|
}
|
|
32516
32761
|
),
|
|
32517
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32762
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32518
32763
|
] });
|
|
32519
32764
|
}
|
|
32520
32765
|
}
|
|
@@ -32522,7 +32767,7 @@ var IntegerField = (props) => {
|
|
|
32522
32767
|
};
|
|
32523
32768
|
|
|
32524
32769
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32525
|
-
var
|
|
32770
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
32526
32771
|
var StatusDropdownField = (props) => {
|
|
32527
32772
|
const {
|
|
32528
32773
|
buttonRef,
|
|
@@ -32534,13 +32779,13 @@ var StatusDropdownField = (props) => {
|
|
|
32534
32779
|
handleClick,
|
|
32535
32780
|
colors: colors2
|
|
32536
32781
|
} = props;
|
|
32537
|
-
return /* @__PURE__ */ (0,
|
|
32782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
32538
32783
|
"div",
|
|
32539
32784
|
{
|
|
32540
32785
|
ref: buttonRef,
|
|
32541
32786
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32542
32787
|
children: [
|
|
32543
|
-
/* @__PURE__ */ (0,
|
|
32788
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
32544
32789
|
"button",
|
|
32545
32790
|
{
|
|
32546
32791
|
type: "button",
|
|
@@ -32548,23 +32793,23 @@ var StatusDropdownField = (props) => {
|
|
|
32548
32793
|
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"}`
|
|
32549
32794
|
}
|
|
32550
32795
|
),
|
|
32551
|
-
isOpen && /* @__PURE__ */ (0,
|
|
32796
|
+
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) => {
|
|
32552
32797
|
const isActive = item[0] == state;
|
|
32553
|
-
return /* @__PURE__ */ (0,
|
|
32798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
32554
32799
|
"div",
|
|
32555
32800
|
{
|
|
32556
32801
|
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" : ""}`,
|
|
32557
32802
|
onClick: () => handleClick(item[0]),
|
|
32558
32803
|
children: [
|
|
32559
|
-
/* @__PURE__ */ (0,
|
|
32560
|
-
/* @__PURE__ */ (0,
|
|
32561
|
-
/* @__PURE__ */ (0,
|
|
32804
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CheckIcon, {}) }),
|
|
32805
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
32806
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
32562
32807
|
"div",
|
|
32563
32808
|
{
|
|
32564
32809
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32565
32810
|
}
|
|
32566
32811
|
),
|
|
32567
|
-
/* @__PURE__ */ (0,
|
|
32812
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-sm", children: item[1] })
|
|
32568
32813
|
] })
|
|
32569
32814
|
]
|
|
32570
32815
|
},
|
|
@@ -32578,8 +32823,8 @@ var StatusDropdownField = (props) => {
|
|
|
32578
32823
|
|
|
32579
32824
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32580
32825
|
var import_react_dom8 = require("react-dom");
|
|
32581
|
-
var
|
|
32582
|
-
var
|
|
32826
|
+
var import_react67 = require("react");
|
|
32827
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
32583
32828
|
var Many2ManyField = (props) => {
|
|
32584
32829
|
const { t: t3 } = useI18n();
|
|
32585
32830
|
const {
|
|
@@ -32638,7 +32883,7 @@ var Many2ManyField = (props) => {
|
|
|
32638
32883
|
clearSearch
|
|
32639
32884
|
} = searchController;
|
|
32640
32885
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
32641
|
-
(0,
|
|
32886
|
+
(0, import_react67.useEffect)(() => {
|
|
32642
32887
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
32643
32888
|
if (groupItems?.length > 0) {
|
|
32644
32889
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -32653,7 +32898,7 @@ var Many2ManyField = (props) => {
|
|
|
32653
32898
|
};
|
|
32654
32899
|
}, [selectedTags]);
|
|
32655
32900
|
return (0, import_react_dom8.createPortal)(
|
|
32656
|
-
/* @__PURE__ */ (0,
|
|
32901
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
32657
32902
|
"div",
|
|
32658
32903
|
{
|
|
32659
32904
|
style: {
|
|
@@ -32661,8 +32906,8 @@ var Many2ManyField = (props) => {
|
|
|
32661
32906
|
},
|
|
32662
32907
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32663
32908
|
children: [
|
|
32664
|
-
/* @__PURE__ */ (0,
|
|
32665
|
-
/* @__PURE__ */ (0,
|
|
32909
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32910
|
+
/* @__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)(
|
|
32666
32911
|
"div",
|
|
32667
32912
|
{
|
|
32668
32913
|
style: {
|
|
@@ -32670,12 +32915,12 @@ var Many2ManyField = (props) => {
|
|
|
32670
32915
|
},
|
|
32671
32916
|
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",
|
|
32672
32917
|
children: [
|
|
32673
|
-
/* @__PURE__ */ (0,
|
|
32674
|
-
/* @__PURE__ */ (0,
|
|
32675
|
-
/* @__PURE__ */ (0,
|
|
32918
|
+
/* @__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: [
|
|
32919
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32920
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(CloseIcon, {}) })
|
|
32676
32921
|
] }),
|
|
32677
|
-
/* @__PURE__ */ (0,
|
|
32678
|
-
/* @__PURE__ */ (0,
|
|
32922
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32923
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32679
32924
|
Search,
|
|
32680
32925
|
{
|
|
32681
32926
|
removeSearchItems,
|
|
@@ -32709,7 +32954,7 @@ var Many2ManyField = (props) => {
|
|
|
32709
32954
|
groupByList
|
|
32710
32955
|
}
|
|
32711
32956
|
) }),
|
|
32712
|
-
/* @__PURE__ */ (0,
|
|
32957
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32713
32958
|
PaginationView,
|
|
32714
32959
|
{
|
|
32715
32960
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -32726,20 +32971,20 @@ var Many2ManyField = (props) => {
|
|
|
32726
32971
|
}
|
|
32727
32972
|
)
|
|
32728
32973
|
] }),
|
|
32729
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
32974
|
+
!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)(
|
|
32730
32975
|
"div",
|
|
32731
32976
|
{
|
|
32732
32977
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32733
|
-
children: /* @__PURE__ */ (0,
|
|
32978
|
+
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)(
|
|
32734
32979
|
"div",
|
|
32735
32980
|
{
|
|
32736
32981
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32737
|
-
children: /* @__PURE__ */ (0,
|
|
32982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
32738
32983
|
"table",
|
|
32739
32984
|
{
|
|
32740
32985
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32741
32986
|
children: [
|
|
32742
|
-
/* @__PURE__ */ (0,
|
|
32987
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32743
32988
|
TableHead,
|
|
32744
32989
|
{
|
|
32745
32990
|
columns,
|
|
@@ -32749,7 +32994,7 @@ var Many2ManyField = (props) => {
|
|
|
32749
32994
|
handleCheckBoxAll
|
|
32750
32995
|
}
|
|
32751
32996
|
),
|
|
32752
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
32997
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32753
32998
|
TableBody,
|
|
32754
32999
|
{
|
|
32755
33000
|
tableGroupController,
|
|
@@ -32789,16 +33034,16 @@ var Many2ManyField = (props) => {
|
|
|
32789
33034
|
checkedAll,
|
|
32790
33035
|
context
|
|
32791
33036
|
}
|
|
32792
|
-
) : /* @__PURE__ */ (0,
|
|
33037
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32793
33038
|
"td",
|
|
32794
33039
|
{
|
|
32795
33040
|
className: "w-full",
|
|
32796
33041
|
colSpan: columns?.length + 2,
|
|
32797
|
-
children: /* @__PURE__ */ (0,
|
|
33042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32798
33043
|
"div",
|
|
32799
33044
|
{
|
|
32800
33045
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
32801
|
-
children: /* @__PURE__ */ (0,
|
|
33046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(EmptyTable, {})
|
|
32802
33047
|
}
|
|
32803
33048
|
)
|
|
32804
33049
|
}
|
|
@@ -32809,9 +33054,9 @@ var Many2ManyField = (props) => {
|
|
|
32809
33054
|
}
|
|
32810
33055
|
) }) })
|
|
32811
33056
|
}
|
|
32812
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
32813
|
-
/* @__PURE__ */ (0,
|
|
32814
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33057
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(LayerLoading, {}),
|
|
33058
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33059
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32815
33060
|
"button",
|
|
32816
33061
|
{
|
|
32817
33062
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -32821,7 +33066,7 @@ var Many2ManyField = (props) => {
|
|
|
32821
33066
|
children: t3("choose")
|
|
32822
33067
|
}
|
|
32823
33068
|
),
|
|
32824
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33069
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32825
33070
|
"button",
|
|
32826
33071
|
{
|
|
32827
33072
|
type: "button",
|
|
@@ -32837,7 +33082,7 @@ var Many2ManyField = (props) => {
|
|
|
32837
33082
|
children: t3("new")
|
|
32838
33083
|
}
|
|
32839
33084
|
),
|
|
32840
|
-
/* @__PURE__ */ (0,
|
|
33085
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
32841
33086
|
"button",
|
|
32842
33087
|
{
|
|
32843
33088
|
type: "button",
|
|
@@ -32858,16 +33103,16 @@ var Many2ManyField = (props) => {
|
|
|
32858
33103
|
};
|
|
32859
33104
|
|
|
32860
33105
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
32861
|
-
var
|
|
32862
|
-
var
|
|
33106
|
+
var import_react68 = __toESM(require("react"));
|
|
33107
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
32863
33108
|
var CustomMenuList2 = (props) => {
|
|
32864
33109
|
const { t: t3 } = useI18n();
|
|
32865
33110
|
const { options: options2, children, selectProps } = props;
|
|
32866
33111
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32867
|
-
const limitedChildren =
|
|
32868
|
-
return /* @__PURE__ */ (0,
|
|
33112
|
+
const limitedChildren = import_react68.default.Children.toArray(children).slice(0, 10);
|
|
33113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32869
33114
|
limitedChildren,
|
|
32870
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33115
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
32871
33116
|
"button",
|
|
32872
33117
|
{
|
|
32873
33118
|
type: "button",
|
|
@@ -32910,14 +33155,14 @@ var Many2OneField = (props) => {
|
|
|
32910
33155
|
const { t: t3 } = useI18n();
|
|
32911
33156
|
if (!isForm && !isEditTable) {
|
|
32912
33157
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
32913
|
-
return /* @__PURE__ */ (0,
|
|
33158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
32914
33159
|
allowShowDetail && renderDetail({
|
|
32915
33160
|
idToolTip: String(name2) + Number(index4),
|
|
32916
33161
|
model: options2?.model ?? relation,
|
|
32917
33162
|
context: contextObject,
|
|
32918
33163
|
idForm: id
|
|
32919
33164
|
}),
|
|
32920
|
-
/* @__PURE__ */ (0,
|
|
33165
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32921
33166
|
"span",
|
|
32922
33167
|
{
|
|
32923
33168
|
className: "cursor-pointer",
|
|
@@ -32928,20 +33173,20 @@ var Many2OneField = (props) => {
|
|
|
32928
33173
|
)
|
|
32929
33174
|
] });
|
|
32930
33175
|
}
|
|
32931
|
-
return /* @__PURE__ */ (0,
|
|
33176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
32932
33177
|
allowShowDetail && renderDetail({
|
|
32933
33178
|
idToolTip: String(name2),
|
|
32934
33179
|
model: options2?.model ?? relation,
|
|
32935
33180
|
context: contextObject,
|
|
32936
33181
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
32937
33182
|
}),
|
|
32938
|
-
/* @__PURE__ */ (0,
|
|
33183
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32939
33184
|
"div",
|
|
32940
33185
|
{
|
|
32941
33186
|
id: name2,
|
|
32942
33187
|
"data-tooltip-id": name2,
|
|
32943
33188
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
32944
|
-
children: /* @__PURE__ */ (0,
|
|
33189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32945
33190
|
Controller,
|
|
32946
33191
|
{
|
|
32947
33192
|
name: name2 ?? "",
|
|
@@ -32961,13 +33206,13 @@ var Many2OneField = (props) => {
|
|
|
32961
33206
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
32962
33207
|
(option) => option.value === tempSelectedOption?.value
|
|
32963
33208
|
) : currentValue ? currentValue : null;
|
|
32964
|
-
(0,
|
|
33209
|
+
(0, import_react68.useEffect)(() => {
|
|
32965
33210
|
if (error2 && selectedOption) {
|
|
32966
33211
|
methods?.clearErrors(name2);
|
|
32967
33212
|
}
|
|
32968
33213
|
}, [selectedOption]);
|
|
32969
|
-
return /* @__PURE__ */ (0,
|
|
32970
|
-
/* @__PURE__ */ (0,
|
|
33214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "h-full", children: [
|
|
33215
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
32971
33216
|
StateManagedSelect$1,
|
|
32972
33217
|
{
|
|
32973
33218
|
menuShouldScrollIntoView: false,
|
|
@@ -33044,7 +33289,7 @@ var Many2OneField = (props) => {
|
|
|
33044
33289
|
})
|
|
33045
33290
|
},
|
|
33046
33291
|
components: {
|
|
33047
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33292
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33048
33293
|
CustomMenuList2,
|
|
33049
33294
|
{
|
|
33050
33295
|
...menuListProps,
|
|
@@ -33055,13 +33300,13 @@ var Many2OneField = (props) => {
|
|
|
33055
33300
|
}
|
|
33056
33301
|
),
|
|
33057
33302
|
IndicatorSeparator: () => null,
|
|
33058
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
33303
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33059
33304
|
},
|
|
33060
33305
|
isDisabled: readonly,
|
|
33061
33306
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33062
33307
|
}
|
|
33063
33308
|
),
|
|
33064
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33309
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33065
33310
|
] });
|
|
33066
33311
|
}
|
|
33067
33312
|
}
|
|
@@ -33072,7 +33317,7 @@ var Many2OneField = (props) => {
|
|
|
33072
33317
|
};
|
|
33073
33318
|
|
|
33074
33319
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33075
|
-
var
|
|
33320
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
33076
33321
|
var StatusbarDurationField = (props) => {
|
|
33077
33322
|
const {
|
|
33078
33323
|
disabled,
|
|
@@ -33082,14 +33327,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33082
33327
|
defaultValue,
|
|
33083
33328
|
setModalStatus
|
|
33084
33329
|
} = props;
|
|
33085
|
-
return /* @__PURE__ */ (0,
|
|
33330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33086
33331
|
"div",
|
|
33087
33332
|
{
|
|
33088
33333
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33089
|
-
children: /* @__PURE__ */ (0,
|
|
33090
|
-
/* @__PURE__ */ (0,
|
|
33334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
33335
|
+
/* @__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) => {
|
|
33091
33336
|
const value = option?.id === defaultValue;
|
|
33092
|
-
return /* @__PURE__ */ (0,
|
|
33337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33093
33338
|
"label",
|
|
33094
33339
|
{
|
|
33095
33340
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33099,7 +33344,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33099
33344
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33100
33345
|
`,
|
|
33101
33346
|
children: [
|
|
33102
|
-
/* @__PURE__ */ (0,
|
|
33347
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33103
33348
|
"input",
|
|
33104
33349
|
{
|
|
33105
33350
|
type: "radio",
|
|
@@ -33109,7 +33354,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33109
33354
|
}
|
|
33110
33355
|
),
|
|
33111
33356
|
option?.name,
|
|
33112
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
33357
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33113
33358
|
"div",
|
|
33114
33359
|
{
|
|
33115
33360
|
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]
|
|
@@ -33124,14 +33369,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33124
33369
|
}) }),
|
|
33125
33370
|
dataResponse?.records?.some(
|
|
33126
33371
|
(item) => item?.fold && item.id !== defaultValue
|
|
33127
|
-
) && /* @__PURE__ */ (0,
|
|
33372
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33128
33373
|
"div",
|
|
33129
33374
|
{
|
|
33130
33375
|
onClick: () => setModalStatus(!modelStatus),
|
|
33131
33376
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33132
33377
|
children: [
|
|
33133
|
-
/* @__PURE__ */ (0,
|
|
33134
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
33378
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(MoreIcon, {}),
|
|
33379
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33135
33380
|
"div",
|
|
33136
33381
|
{
|
|
33137
33382
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33140,7 +33385,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33140
33385
|
(item) => item?.fold && item.id !== defaultValue
|
|
33141
33386
|
)?.map((option) => {
|
|
33142
33387
|
const value = option?.id === defaultValue;
|
|
33143
|
-
return /* @__PURE__ */ (0,
|
|
33388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33144
33389
|
"div",
|
|
33145
33390
|
{
|
|
33146
33391
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33161,15 +33406,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33161
33406
|
};
|
|
33162
33407
|
|
|
33163
33408
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33164
|
-
var
|
|
33165
|
-
var
|
|
33409
|
+
var import_react69 = require("react");
|
|
33410
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
33166
33411
|
var StatusBarOptionField = (props) => {
|
|
33167
33412
|
const { selection, defaultValue } = props;
|
|
33168
|
-
const memoizedStatusOptions = (0,
|
|
33413
|
+
const memoizedStatusOptions = (0, import_react69.useMemo)(() => selection, [selection]);
|
|
33169
33414
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33170
33415
|
(option) => option?.[0] === defaultValue
|
|
33171
33416
|
);
|
|
33172
|
-
return /* @__PURE__ */ (0,
|
|
33417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33173
33418
|
"div",
|
|
33174
33419
|
{
|
|
33175
33420
|
style: {
|
|
@@ -33178,8 +33423,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33178
33423
|
flexWrap: "wrap"
|
|
33179
33424
|
},
|
|
33180
33425
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33181
|
-
return /* @__PURE__ */ (0,
|
|
33182
|
-
/* @__PURE__ */ (0,
|
|
33426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
33427
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
33183
33428
|
"div",
|
|
33184
33429
|
{
|
|
33185
33430
|
style: {
|
|
@@ -33197,7 +33442,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33197
33442
|
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" : ""
|
|
33198
33443
|
},
|
|
33199
33444
|
children: [
|
|
33200
|
-
/* @__PURE__ */ (0,
|
|
33445
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33201
33446
|
"span",
|
|
33202
33447
|
{
|
|
33203
33448
|
style: {
|
|
@@ -33209,10 +33454,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33209
33454
|
alignItems: "center",
|
|
33210
33455
|
borderRadius: "100%"
|
|
33211
33456
|
},
|
|
33212
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
33457
|
+
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, {})
|
|
33213
33458
|
}
|
|
33214
33459
|
),
|
|
33215
|
-
/* @__PURE__ */ (0,
|
|
33460
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33216
33461
|
"span",
|
|
33217
33462
|
{
|
|
33218
33463
|
style: {
|
|
@@ -33225,7 +33470,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33225
33470
|
},
|
|
33226
33471
|
option?.[0]
|
|
33227
33472
|
),
|
|
33228
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
33473
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33229
33474
|
"div",
|
|
33230
33475
|
{
|
|
33231
33476
|
style: {
|
|
@@ -33241,7 +33486,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33241
33486
|
);
|
|
33242
33487
|
};
|
|
33243
33488
|
var ICMinus = () => {
|
|
33244
|
-
return /* @__PURE__ */ (0,
|
|
33489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33245
33490
|
"svg",
|
|
33246
33491
|
{
|
|
33247
33492
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33249,7 +33494,7 @@ var ICMinus = () => {
|
|
|
33249
33494
|
height: "16",
|
|
33250
33495
|
viewBox: "0 0 16 16",
|
|
33251
33496
|
fill: "none",
|
|
33252
|
-
children: /* @__PURE__ */ (0,
|
|
33497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33253
33498
|
"path",
|
|
33254
33499
|
{
|
|
33255
33500
|
d: "M4 8H12",
|
|
@@ -33263,7 +33508,7 @@ var ICMinus = () => {
|
|
|
33263
33508
|
);
|
|
33264
33509
|
};
|
|
33265
33510
|
var ICCircle = () => {
|
|
33266
|
-
return /* @__PURE__ */ (0,
|
|
33511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33267
33512
|
"svg",
|
|
33268
33513
|
{
|
|
33269
33514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33271,12 +33516,12 @@ var ICCircle = () => {
|
|
|
33271
33516
|
height: "8",
|
|
33272
33517
|
viewBox: "0 0 8 8",
|
|
33273
33518
|
fill: "none",
|
|
33274
|
-
children: /* @__PURE__ */ (0,
|
|
33519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33275
33520
|
}
|
|
33276
33521
|
);
|
|
33277
33522
|
};
|
|
33278
33523
|
var ICCheck = () => {
|
|
33279
|
-
return /* @__PURE__ */ (0,
|
|
33524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33280
33525
|
"svg",
|
|
33281
33526
|
{
|
|
33282
33527
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33284,7 +33529,7 @@ var ICCheck = () => {
|
|
|
33284
33529
|
height: "16",
|
|
33285
33530
|
viewBox: "0 0 16 16",
|
|
33286
33531
|
fill: "none",
|
|
33287
|
-
children: /* @__PURE__ */ (0,
|
|
33532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
33288
33533
|
"path",
|
|
33289
33534
|
{
|
|
33290
33535
|
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",
|
|
@@ -33298,7 +33543,7 @@ var ICCheck = () => {
|
|
|
33298
33543
|
};
|
|
33299
33544
|
|
|
33300
33545
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33301
|
-
var
|
|
33546
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
33302
33547
|
var DateOptionField = (props) => {
|
|
33303
33548
|
const {
|
|
33304
33549
|
name: name2,
|
|
@@ -33309,19 +33554,19 @@ var DateOptionField = (props) => {
|
|
|
33309
33554
|
string,
|
|
33310
33555
|
onChange: onChange2
|
|
33311
33556
|
} = props;
|
|
33312
|
-
return /* @__PURE__ */ (0,
|
|
33557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
33313
33558
|
Controller,
|
|
33314
33559
|
{
|
|
33315
33560
|
name: name2 ?? "",
|
|
33316
33561
|
control: methods?.control,
|
|
33317
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33562
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
33318
33563
|
"label",
|
|
33319
33564
|
{
|
|
33320
33565
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33321
33566
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33322
33567
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33323
33568
|
children: [
|
|
33324
|
-
/* @__PURE__ */ (0,
|
|
33569
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
33325
33570
|
"input",
|
|
33326
33571
|
{
|
|
33327
33572
|
type: "checkbox",
|
|
@@ -33391,6 +33636,7 @@ var DateOptionField = (props) => {
|
|
|
33391
33636
|
RemainingDaysField,
|
|
33392
33637
|
Row,
|
|
33393
33638
|
Search,
|
|
33639
|
+
SecureField,
|
|
33394
33640
|
SelectDropdownField,
|
|
33395
33641
|
StatusBarOptionField,
|
|
33396
33642
|
StatusDropdownField,
|